Author: Chris Lattner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import midi | |
# Music generated from the Fibonacci sequence and output to midi | |
# Inspired by https://dev.to/daniel40392/visualizing-fibonacci-for-the-music-lover-in-you-2609 | |
# Using https://github.com/vishnubob/python-midi for midi output | |
# Please excuse any python or music theory mistakes, I'm not an expert at either | |
print('Welcome to the Fibonacci Composer.') | |
x = int(input('Enter Song Length: ')) | |
k = input('Enter Song Key (C, G, D, A, E, B, F#, Db, Ab, Eb, Bb, F): ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import OrderedDict | |
import graphene | |
import rx | |
subject = rx.subjects.Subject() | |
class Author(graphene.ObjectType): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import collections | |
from collections import OrderedDict | |
import hug | |
import logging | |
from apispec import APISpec | |
from apispec.ext.marshmallow.swagger import field2parameter | |
from copy import copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import Slack Client | |
from slackclient import SlackClient | |
## Import Time | |
import time | |
#Set Bot Name | |
BOT_NAME = '' | |
#We will give the token in a moment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class objectview(object): | |
"""Convert dict(or parameters of dict) to object view | |
See also: | |
- https://goodcode.io/articles/python-dict-object/ | |
- https://stackoverflow.com/questions/1305532/convert-python-dict-to-object | |
>>> o = objectview({'a': 1, 'b': 2}) | |
>>> o.a, o.b | |
(1, 2) |
Structs in C have both host/compiler-specific padding and host endianness. When communicating over a network, the struct must be framed (prefix length or frame character), packed (this means getting rid of the padding) and ordered according to a common endianness. On the reverse, the bytestream must then be read, message framed, re-ordered, and unpacked into a struct.
It is important that the structs that are used as interfaces have fixed sizes, that is uint32_t
and not int
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem "graphql", github: "rmosolgo/graphql-ruby", branch: "subscriptions" | |
gem "sinatra" | |
gem "thin" |
This list has moved to a GitHub repo for easier tracking: https://github.com/coreos/awesome-kubernetes-extensions
Please comment below if you are using Kubernetes Third-Party Resources and I will add you to the list.
Known Users:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
****************** Server ******************** | |
import socket | |
import sys | |
HOST = '192.168.142.160' #this is your localhost | |
PORT = 8888 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
#socket.socket: must use to create a socket. | |
#socket.AF_INET: Address Format, Internet = IP Addresses. |
NewerOlder