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
using Requests | |
using JSON | |
# Import API key. | |
include("apikey.jl") | |
response = get("https://wordsapiv1.p.mashape.com/words/?partOfSpeech=noun&random=true"; headers=Dict("X-Mashape-Key" => "$key")) | |
word = JSON.parse(readstring(response))["word"] | |
startup = rand(["Uber", "AirBnB", "Tinder", "Oracle"]) |
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
# A script to take one list of words (topic-related), and one list of words (philosophy-related), and get searches for all the related words. | |
# Dependencies. | |
using Requests | |
using JSON | |
apikey = "919db630ecc84118a1acc2914dc7bd55" | |
# Words. | |
topicWords = ["health care", "single payer", "public option"] | |
philWords = ["genealogy", "phenomenology", "Foucault"] |
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
git checkout --orphan docs | |
git rm -rf . | |
git commit --allow-empty -a -m "Initial Commit" | |
git push origin docs |
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
# data source is: https://pomber.github.io/covid19/timeseries.json | |
# data is updated thrice daily from Johns Hopkins numbers | |
using Pkg | |
pkg"activate .." | |
using JSON, Statistics, Plots, Dates, LsqFit, TimeSeries | |
data = JSON.parsefile("../data/timeseries_03_31_20.json"); | |
# Aggregate statistics | |
function unpack_country(country) |
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
using ModelingToolkit, Test, SparseArrays | |
@variables a b c | |
# Auxiliary Functions and Constants | |
get_sparsity_pattern(h::Array{Expression}) = sparse(Int64.(map(~, h .=== ModelingToolkit.Constant(0)))) | |
get_sparsity_pattern(h::SparseMatrixCSC{Expression,Int64}) = sparse(Int64.(map(~, h .=== ModelingToolkit.Constant(0)))) | |
get_sparsity_pattern(h::SparseVector{Expression,Int64}) = sparse(Int64.(map(~, h .=== ModelingToolkit.Constant(0)))) | |
input = [1, 2, 3] |
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
# secrets | |
API_KEY = "something" | |
API_PASS = "something else" | |
API_SECRET = "also something else" | |
# boilerplate | |
import requests | |
import json, hmac, hashlib, time, requests, base64 | |
from requests.auth import AuthBase |