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 subprocess | |
import serial | |
import string | |
import os | |
import time | |
ser = serial.Serial('/dev/ttyUSB0') | |
ser.write(b'{LP}') | |
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
#!/bin/bash | |
wget https://github.com/ethereum-mining/ethminer/releases/download/v0.19.0-alpha.0/ethminer-0.19.0-alpha.0-cuda-9-linux-x86_64.tar.gz | |
tar -xvzf ethminer-0.19.0-alpha.0-cuda-9-linux-x86_64.tar.gz | |
export GPU_FORCE_64BIT_PTR=0 | |
export GPU_MAX_HEAP_SIZE=100 | |
export GPU_USE_SYNC_OBJECTS=1 | |
export GPU_MAX_ALLOC_PERCENT=100 | |
export GPU_SINGLE_ALLOC_PERCENT=100 | |
cd bin | |
./ethminer --farm-recheck 200 -U -S us1.ethermine.org:4444 -FS us2.ethermine.org:4444 -O 0x5e9c910618ae158a312ba4f7ad2d365a7aa1659b.Benjamin |
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
#!/bin/bash | |
wget https://github.com/ethereum-mining/ethminer/releases/download/v0.13.0rc2/ethminer-0.13.0rc2-Linux.tar.gz | |
tar -xvzf ethminer-0.13.0rc2-Linux.tar.gz | |
export GPU_FORCE_64BIT_PTR=0 | |
export GPU_MAX_HEAP_SIZE=100 | |
export GPU_USE_SYNC_OBJECTS=1 | |
export GPU_MAX_ALLOC_PERCENT=100 | |
export GPU_SINGLE_ALLOC_PERCENT=100 | |
cd bin | |
./ethminer --farm-recheck 200 -U -S eu1-etc.ethermine.org:4444 -FS us1-etc.ethermine.org:4444 -O YOUR_ETC_ADDRESS.YOUR_WORKER_NAME |
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
n=2e3,e=255;c.width=n;t/=32;for(p=0;p<n*4;p++)i=C(p),j=T(t/i),k=S(t*i),x.strokeRect(j*n,k*n,n*j*i*C(k/j),n*k*i*C(j/k)); |
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 pika | |
import sys | |
import os | |
import re | |
import time | |
from datetime import datetime | |
import subprocess | |
from random import sample as rs, choice as rc | |
import threading | |
from collections import defaultdict |
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 flask import Flask, jsonify, request | |
import json | |
import os | |
import time | |
import subprocess | |
from random import randrange, choice | |
from pymongo import MongoClient | |
from nltk.stem.snowball import SnowballStemmer | |
from hashids import Hashids |
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
var messengerSend = require('messengerSend'); | |
// ------------------------------------------------------------ | |
// Actions | |
var actions = { | |
send: send, | |
addTopics: addTopics, | |
getQuestion: getQuestion, | |
findPriorDiscussions: findPriorDiscussions, | |
compileEbook: compileEbook |
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
#!/usr/bin/env python | |
import os | |
import math | |
from numpy import interp | |
from random import choice, sample | |
from time import sleep | |
from math import log1p | |
# from colour import Color |
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 random | |
import time | |
import json | |
import os | |
class Player(object): | |
def __init__(self, name, init_chips): | |
self.name = name |
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 re | |
with open('faulkner.txt', 'r') as infile: | |
complete_lines = infile.read().split('\n') | |
stripped_lines = map(lambda x: x.strip(), complete_lines) | |
lines = filter(lambda x: x and not x.isdigit(), stripped_lines) | |
print len(lines) |