yaobinwen / robin_on_rails

Robin on Rails: my notes about technology and some other knowledge.
1 stars 0 forks source link

Read tech articles or books #145

Open yaobinwen opened 1 year ago

yaobinwen commented 1 year ago

The List

Project ideas

Fundamentals

Can be important

Security

# ${HOME}/.ssh/authorized_keys
restrict,command="/bin/false",port-forwarding,permitopen="localhost:3306",permitopen="127.0.0.1:3306",permitopen="[::1]:3306" ssh-rsa AAAA...
restrict,command="/bin/false",port-forwarding,permitopen="localhost:3306",permitopen="127.0.0.1:3306",permitopen="[::1]:3306" ssh-rsa AAAB...
restrict,command="/bin/false",port-forwarding,permitopen="localhost:3306",permitopen="127.0.0.1:3306",permitopen="[::1]:3306" ssh-rsa AAAC...

OS/Linux/Ubuntu

Database

Compiler

Network

Database

Algorithms

Web/HTTP

OOP

Misc.

EE/Embedded

AI

JavaScript

C/C++

Racket

Software Testing

yaobinwen commented 10 months ago
from itertools import product

def generate_combinations(input_dict):
    keys = input_dict.keys()
    values = input_dict.values()

    # Use itertools.product to generate all combinations
    all_combinations = list(product(*values))

    # Combine keys with corresponding values in each combination
    result = [dict(zip(keys, combination)) for combination in all_combinations]

    return result

# Example usage:
input_dict = {
    "a": [1, 2],
    "b": [True, False],
}

combinations = generate_combinations(input_dict)

# Print the result
for combination in combinations:
    print(combination)