Skip to content

Instantly share code, notes, and snippets.

View gourneau's full-sized avatar

Joshua Gourneau gourneau

View GitHub Profile
@gourneau
gourneau / dream.py
Created November 7, 2023 23:44
dream.py
import base64
import json
import sys
import uuid
from openai import OpenAI
import requests
from environs import Env
@gourneau
gourneau / mac.md
Created June 19, 2023 05:32
mac setup
# Demo SSL server
# Make your keys like this
# openssl req -new -x509 -keyout localhost.pem -out localhost.pem -days 365 -nodes
import http.server, ssl
server_address = ('0.0.0.0', 443)
import os
import requests
from pprint import pprint
import time
from statistics import mean, median, median_grouped
def get_prices(verbose=False):
cookies = {}
import time
import subprocess
import os
import re
import glob
import sys
from blinkytape import BlinkyTape
devices = glob.glob("/dev/cu.usbmodem*")
@gourneau
gourneau / dask-custom-workflow.ipynb
Created April 19, 2017 08:24
Dask Custom Workflow example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pandas as pd
import json
with open("acs.json") as git_json:
git = json.load(git_json)
df = pd.DataFrame(git["gitinspector"]["blame"]["authors"])
df["rows"].sum()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gourneau
gourneau / keybase.md
Created November 17, 2016 18:44
keybase.md

Keybase proof

I hereby claim:

  • I am gourneau on github.
  • I am gourneau (https://keybase.io/gourneau) on keybase.
  • I have a public key whose fingerprint is 7F2A B0CE A26A 4BF4 2E66 44D1 F4B8 B4CD 9484 243D

To claim this, I am signing this object:

@gourneau
gourneau / conda-install.packages-error.txt
Last active May 22, 2017 20:47
Conda R package install error
(my-r-env)josh@desktop:~$ R
R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.