Skip to content

Instantly share code, notes, and snippets.

import os, time
import pandas as pd
from pandas.io.json import json_normalize
from kucoin.client import Client as KucoinClient
from tabulate import tabulate
KUCOIN_API_KEY = os.getenv('KUCOIN_API_KEY')
KUCOIN_API_SECRET = os.getenv('KUCOIN_API_SECRET')
import os, requests, json
import sqlite3
from time import sleep, strftime, gmtime
from flask import Flask
from itertools import repeat
FLASK_PORT = int(os.getenv('FLASK_PORT'))
BINANCE_URL = os.getenv('BINANCE_URL')
API_DELAY = int(os.getenv('API_DELAY'))
drop table if exists t_cbsa_pop;
create table if not exists t_cbsa_pop (
cbsa integer,
mdiv integer,
stcou integer,
name varchar(127),
lsad varchar(63),
census2010pop integer,
estimatesbase2010 integer,
### Keybase proof
I hereby claim:
* I am mdexter on github.
* I am mattdexter (https://keybase.io/mattdexter) on keybase.
* I have a public key ASC7L448HCBbv5J8lgfXL5LV_7TPWv3OjG8G-VFj5_kBQgo
To claim this, I am signing this object:
@mattdexter
mattdexter / apm_pkg
Last active May 16, 2016 18:59
apm packages
apm install seti-ui
apm install monokai-seti
apm install open-recent
apm install minimap
apm install highlight-selected
apm install minimap-highlight-selected
apm install autoclose-html
apm install pigments
apm install linter
apm install linter-htmlhint
<html>
<head>
<script>
function loadXMLDoc() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
getQuotes(xmlhttp);
}
};
<html>
<head>
<script>
function loadXMLDoc() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
getQuotes(xmlhttp);
}
};
@mattdexter
mattdexter / cfClosures.txt
Last active February 20, 2016 03:06
ColdFusion closures
<cfscript>
variables.myArray = [2, 3, 4, 5];
variables.timesTwo = [];
arrayEach(variables.myArray, function(num){
arrayAppend(variables.timesTwo, num * 2);
});
</cfscript>
;;; FINANCIAL CALCULATORS
(define (fv-calc princ int per yrs)
(* princ (expt (+ 1 (/ int per)) (* per yrs)))))
(fv-calc 20000 .0325 2 10)
(define (pv-calc princ int per yrs)
(/ princ (expt (+ 1 (/ int per)) (* per yrs)))))
(pv-calc 27608.39 .0325 2 10)
@mattdexter
mattdexter / WheelOfFortune.java
Last active August 29, 2015 14:27
Prints all offensive words that could displayed during a game of Wheel of Fortune given a secret puzzle word and a list of offensive words. Inspired by this challenge on the "Daily Programmer" subreddit: https://goo.gl/1dMub8
import java.util.ArrayList;
import java.util.Arrays;
/**
* Created by mdexter on 8/11/2015.
*/
public class WheelOfFortune
{
public static String puzzleWord;
public static ArrayList<String> offensiveWords;