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 | |
# Depends on https://github.com/sharkdp/fd | |
# To make this script work as intended, it should be run using the "." or "source" command. | |
# Therefore, it may be convenient to add an `alias goto='. goto'`. | |
projects=~/Projects # CHANGE THIS TO DIRECTORY WHERE YOU KEEP PROJECTS | |
entries="$(fd . ${projects} --type d)" | |
declare -a hits=() | |
for full_path in $entries | |
do |
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
"""Solution to Caliban's Will by brute force iteration. | |
""" | |
NUM_VARS = 8 | |
STR_ORDERINGS = {"LYC", "LCY", "YLC", "YCL", "CLY", "CYL"} | |
class Ordering: | |
"""An ordering of Low, YY, and Critic for choosing from Caliban's books. | |
""" |
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
"""Transcribes audio from microphone and produces real-time plot of word frequency by rank.""" | |
from collections import Counter | |
from multiprocessing import Process, Queue | |
import json | |
import string | |
import matplotlib.animation as ani | |
import matplotlib.pyplot as plt | |
import numpy as np |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/* | |
Implementation of binary and sequential search algorithms. | |
Takes input array from STDIN, integers separated by newlines with a | |
sentinel of ";". The final integer before the sentinel is searched | |
for in the previous integers. Its index is written to STDOUT. If not | |
in the array of integers, "Not in array." is written to STDOUT. Also | |
prints the time taken for the algorithm to run. | |
Usage: |
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
/* | |
Implementations of sorting algorithms. | |
Takes input array from STDIN, integers separated by newlines with a | |
sentinel of ";". Prints the sorted integers to STDOUT, also separated | |
by newlines. Also prints time taken for the algorithm to run. | |
Usage: | |
$ java Sorting <algorithm_switch> |
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 setuptools import find_packages, setup | |
import numpy as np | |
from Cython.Build import cythonize | |
with open("README.md", 'r') as f: | |
long_description = f.read() | |
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
graph = {255: [259, 246, 248, 256, 264, 243, 263], 259: [255, 265, 246, 263, 258], 265: [259, 263, 271, 258, 269], 242: [231, 246, 249, 236], 231: [242, 246, 238, 218, 210, 224], 246: [231, 242, 255, 259, 248, 249], 248: [246, 255, 243, 238], 280: [283, 279, 275], 283: [280, 278, 284], 279: [280, 274, 275, 282], 257: [256, 261, 268, 247, 250], 256: [255, 257, 264, 268, 243, 250], 264: [255, 256, 270, 274, 268, 263], 270: [264, 274, 263, 276, 271], 274: [264, 270, 279, 268, 275, 282, 276], 261: [257, 268, 260, 266, 267, 247], 268: [256, 257, 261, 264, 274, 275, 272, 267], 275: [268, 274, 280, 279, 278, 272], 278: [275, 283, 284, 272, 273], 284: [278, 283, 273], 272: [268, 278, 275, 273, 267], 273: [272, 278, 284, 260, 266, 267], 260: [273, 261, 266, 247], 266: [260, 261, 273, 267], 267: [261, 266, 273, 272, 268], 88: [62, 130, 116, 86, 82], 62: [88, 48, 35, 56], 130: [88, 114, 116, 86, 140, 155, 161, 148], 114: [130, 86, 108, 138, 140], 116: [88, 130, 148], 8: [5, 35, 52, 14], 5: [8, 48, 35], 48: [5, 62, 35, 4 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pygraph.classes.digraph import digraph as DirectedGraph | |
class BayesianNetwork(DirectedGraph): | |
"""A Bayesian Network. | |
Initialization takes no parameters. | |
Example usage: |