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 pandas as pd | |
| import os | |
| from pprint import pprint | |
| ############# constants ######### | |
| # YOU MUST MODIFY data_dir # | |
| ################################# | |
| data_dir = '/Users/allen/Developer/' | |
| infile = 'cointracker_v_jh.xlsx' | |
| path = os.path.join(data_dir, infile) | |
| names = ['cointracker','send-receive','buy-sell','trade','totals_send-receive','totals_buy-sell','totals_trade'] |
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
| e='echo -e' | |
| or col in $cols; do | |
| # First we get the column we want to process with an SQL query | |
| # sed 1d supresses the column name | |
| $e "$(date):\tgetting column $col ... " >> $logfile | |
| column=$($sqlget "select \`$col\` from \`$db\`.\`$table\`"| sed 1d); |
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/env python3 | |
| # | |
| # Get a market summary given a market key string such | |
| # as "RDTS.071217" as a command line arguement, or | |
| # change default_key_string to run without an argument. | |
| # | |
| # Example: | |
| # | |
| # user@host:~ > python3 ticker.py RDTS.071217 | |
| # |
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 | |
| # | |
| # | |
| # Copyright (c) 2016 altoidnerd | |
| ################################################################################# | |
| # # | |
| # Permission is hereby granted, free of charge, to any person obtaining a # | |
| # copy of this software and associated documentation files (the "Software"), # | |
| # to deal in the Software without restriction, including without limitation # | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, # |
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/env python3 | |
| import numpy as np | |
| import sys | |
| ################################# | |
| ################################# | |
| ## #### | |
| ## working version! tested! #### | |
| ## #### |
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/env python | |
| # -*- coding: UTF-8 -*- | |
| class PrintColors: | |
| DIR = '\033[96m' | |
| HEADER = '\033[95m' | |
| OKBLUE = '\033[94m' | |
| WARNING = '\033[93m' | |
| OKGREEN = '\033[92m' | |
| FAIL = '\033[91m' |
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/env python | |
| class PrintColors: | |
| DIR = '\033[96m' | |
| HEADER = '\033[95m' | |
| OKBLUE = '\033[94m' | |
| WARNING = '\033[93m' | |
| OKGREEN = '\033[92m' | |
| FAIL = '\033[91m' | |
| bDIR = '\033[1;96m' |
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 os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip | |
| # Credits | |
| # | |
| # The python code here was written by pudquick@github | |
| # | |
| # License | |
| # | |
| # This code is released under a standard MIT license. | |
| # |
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 pyaudio | |
| import numpy as np | |
| def play_shit(samples, fs=44100, volume=0.5): | |
| p = pyaudio.PyAudio() | |
| stream = p.open(format=pyaudio.paFloat32, | |
| channels=1, | |
| rate=fs, | |
| output=True) |
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
| cd && echo 'watch -tcpn.5 '\''figlet -f big -W "$(date +%l:%M:%S)"|toilet -f term --gay'\' > fruitywatch && chmod +x fruitywatch; mv ./fruitywatch /usr/local/bin && fruitywatch |
NewerOlder