from sklearn.ensemble import RandomForestRegressor, ExtraTreesRegressor, AdaBoostRegressor, ExtraTreesClassifier, RandomForestClassifier, AdaBoostClassifier
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.kernel_ridge import KernelRidge
from sklearn.linear_model import LinearRegression, Lasso, LogisticRegression
from sklearn.neural_network import MLPRegressor, MLPClassifier
from sklearn.svm import SVC, SVR
from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier
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
// Fair use for whatever, don't need no license 'cause it's not useful. | |
// Compile with gcc -lncurses typewriter.c | |
// Also if you haven't installed ncurses-dev you'll need that, I used | |
// sudo apt-get install libncurses5-dev libncursesw5-dev | |
// output is written to foo.txt | |
#include <ncurses.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> |
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
// Pipe in random bytes, and it outputs alternting x and y ints of where to draw a low opacity point. | |
// Call from command line with an integer specifiying the output scale | |
#include "stdio.h" | |
#include <stdlib.h> | |
#include <stdint.h> | |
typedef struct { | |
float x; | |
float y; | |
} pair_t; |
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
// Compile with gcc -std=c99 mersenne_twister.c -o /dev/random | |
// ps the -o /dev/random part is a joke, it's not actually meant to be a random device. | |
// Absolutely no warranty, Kopyleft I guess who gives a shit | |
#include <stdint.h> | |
#include <stdio.h> | |
uint32_t x[624]; | |
uint32_t index = 0; | |
void twist() { | |
for (int k = 0; k < 624; k++) { | |
x[k] = x[(k+397)%624] |
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
'''Minimal example demonstrating that code still runs even if variable names are terrible.''' | |
import itertools | |
import random | |
def swippy_swap(set1, set2, item1, item2): | |
a = set1.copy() | |
a.discard(item1) | |
a.add(item2) | |
b = set2.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
int shift(int x, int s) { | |
if (s > 0) { | |
return x<<s; | |
} else if (s < 0) { | |
return x>>s; | |
} else { | |
return x; | |
} | |
} |
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
(defun inverse-collatz (n) | |
"returns a list with one or two values that collatz to n" | |
(cons (* 2 n) | |
(let ((other-result (/ (- n 1) 3))) | |
(if (integerp other-result) | |
(list other-result) | |
nil)))) | |
;; use lambda closure to access lexically scoped variable "starting-list" |
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 os | |
import os.path as p | |
import random | |
import sys | |
# TODO: DO TO | |
PACKAGE_NAME = "mastml" #TODO | |
#pure_print = print | |
#def make_myprint(leader): | |
# def myprint(*args): |
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
$ cowsay 'hello world' | cowsay -n | cowsay -n | cowsay -n | cowsay -n | |
__________________________________________ | |
/ ______________________________________ \ | |
| / __________________________________ \ | | |
| | / ______________________________ \ | | | |
| | | / _____________ \ | | | | |
| | | | < hello world > | | | | | |
| | | | ------------- | | | | | |
| | | | \ ^__^ | | | | | |
| | | | \ (oo)\_______ | | | | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder