This file contains hidden or 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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: mpdfifo | |
# Required-Start: pulseaudio mpd | |
# Default-Start: 2 3 4 5 | |
# Short-Description: MPD FM radio broadcasting | |
### END INIT INFO | |
# Author: Pavel Sadikov <[email protected]> |
This file contains hidden or 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
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | |
hasProp = {}.hasOwnProperty; | |
var SUITS = ["H", "D", "S", "C"]; | |
var CARDS = ["2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"]; | |
var RANKS = ["HC", "1P", "2P", "3K", "ST", "FL", "FH", "4K", "SF", "RF"]; | |
This file contains hidden or 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
# Author: Pasha Sadikov <pashalab at gmail dot com> | |
# USAGE: | |
# Create a directory for each project with the code provided in the | |
# assignment. | |
# $ make PA0 # To make the tutorial; PA1, 2, 3 etc. for the other | |
# # projects | |
# CONFIGURE your USERNAME here |
This file contains hidden or 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
# Author: Pasha Sadikov <pashalab at gmail dot com> | |
# USAGE: | |
# Create a directory for each project with the code provided in the | |
# assignment. | |
# $ make PA0 # To make the tutorial; PA1, 2, 3 etc. for the other | |
# # projects | |
# CONFIGURE your USERNAME here |
This file contains hidden or 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 bpy | |
from math import pi | |
## Create a set of keyframes for Suzanne using Blender python | |
bpy.ops.graph.interpolation_type(type="CUBIC") | |
suzie = bpy.data.objects['Suzanne'] | |
# Each keyframe is (frame, location, rotation, scale) |
This file contains hidden or 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
#!/usr/bin/python2 | |
from tabulate import tabulate | |
from random import random | |
from math import floor | |
DAYS = 7 | |
SECTIONS = 10 | |
MAX_TTR = 6 # minutes -> max time to read | |
MIN_TTR = 2 |
This file contains hidden or 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
#!/usr/bin/python2 | |
from tabulate import tabulate | |
from random import random | |
from math import floor | |
DAYS = 7 | |
SECTIONS = 10 | |
MAX_TTR = 6 # minutes -> max time to read | |
MIN_TTR = 2 |
This file contains hidden or 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
#!/usr/bin/python | |
from Queue import Queue as Q | |
class UndirectedGraph: | |
def __init__(self, vertices, edges): | |
self.vertices = vertices | |
self.edges = edges | |
if not self.validate_edges(self.edges): | |
print "Invalid Graph" |
This file contains hidden or 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
#!/usr/bin/python | |
from Queue import Queue as Q | |
class UndirectedGraph: | |
def __init__(self, vertices, edges): | |
self.vertices = vertices | |
self.edges = edges | |
if not self.validate_edges(self.edges): | |
print "Invalid Graph" |
This file contains hidden or 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 itertools import permutations | |
import networkx as nx | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pylab | |
class BucketGraph: | |
def __init__(self, buckets): | |
self.buckets = buckets | |
self.g = nx.DiGraph() |