https://github.com/yaxu/deadpatterns
https://github.com/yaxu/embedded
https://github.com/kindohm/365tidalpatterns
| #!/usr/bin/bash | |
| # Download zeromq | |
| # Ref http://zeromq.org/intro:get-the-software | |
| wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
| # Unpack tarball package | |
| tar xvzf zeromq-4.2.2.tar.gz | |
| # Install dependency | 
| import types | |
| import tensorflow as tf | |
| import numpy as np | |
| # Expressions are represented as lists of lists, | |
| # in lisp style -- the symbol name is the head (first element) | |
| # of the list, and the arguments follow. | |
| # add an expression to an expression list, recursively if necessary. | |
| def add_expr_to_list(exprlist, expr): | 
| # Example for my blog post at: | |
| # https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/ | |
| import functools | |
| import sets | |
| import tensorflow as tf | |
| def lazy_property(function): | |
| attribute = '_' + function.__name__ | 
| import Tkinter | |
| from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg | |
| from matplotlib.figure import Figure | |
| class App: | |
| def __init__(self, master): | |
| # Create a container | |
| frame = Tkinter.Frame(master) | |
| # Create 2 buttons | |
| self.button_left = Tkinter.Button(frame,text="< Decrease Slope", | 
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| import random | |
| def get_random_color(pastel_factor = 0.5): | |
| return [(x+pastel_factor)/(1.0+pastel_factor) for x in [random.uniform(0,1.0) for i in [1,2,3]]] | |
| def color_distance(c1,c2): | |
| return sum([abs(x[0]-x[1]) for x in zip(c1,c2)]) | |
| def generate_new_color(existing_colors,pastel_factor = 0.5): | |
| max_distance = None |