Skip to content

Instantly share code, notes, and snippets.

View jonnydubowsky's full-sized avatar

Jonny Dubowsky jonnydubowsky

View GitHub Profile
@eyeseast
eyeseast / python.md
Last active May 6, 2024 17:11
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
def get_crypto_combinations(market_symbols, base):
combinations = []
for sym1 in market_symbols:
sym1_token1 = sym1.split('/')[0]
sym1_token2 = sym1.split('/')[1]
if (sym1_token2 == base):
for sym2 in market_symbols:
sym2_token1 = sym2.split('/')[0]
sym2_token2 = sym2.split('/')[1]
if (sym1_token1 == sym2_token2):
@RangerMauve
RangerMauve / hyperswarm-web-2.md
Created July 20, 2021 17:15
hyperswarm-web-2

Hyperswarm Web 2

  • Actively prioritize WebRTC connections
    • Before looking up on hyperswarm-proxy, do WebRTC search
  • Optimize for fast initial connection
    • Debug performance to get the first peer ASAP
  • Strip out unneccessary dependencies
    • discrovery-swarm-webrtc has a lot of stuff in it, use lower levels instead
    • Use MMST directly to reduce overall connections
  • Agressive deduplication
@saagarjha
saagarjha / myutr.py
Created January 18, 2021 23:01
Add people to lists on the UTR website
#!/usr/bin/env python3
import getpass
import json
import pathlib
import sys
import urllib.parse
import urllib.request
@tobek
tobek / README.md
Last active April 3, 2024 15:55
Roam bookmarklet for rich link embeds, read later, and bookmark management

Setup:

  1. Create a browser bookmark (e.g. in bookmarks bar) where the URL is the text in bookmarklet below (open this "raw" link so it's not truncated). Yes it's huge, that's fine. You can name the bookmark "Roam Link" or whatever you like.
    • Alternately, go to this page for easier drag-and-drop bookmarklet setup (GitHub doesn't allow javascript links in gists, sorry)
  2. Go to or create a Roam page called roam/css, and create a CSS code block (``` for code block, then change the language selector dropdown to CSS) and paste the CSS below.

Usage:

  1. On the page you want to create a link embed of, hit the bookmarklet (optional: highlight some text first and it'll be included as a quote)
  2. Go to Roam and paste
@jxramos
jxramos / starlark_highlight_js.md
Last active January 21, 2023 00:40
Notes for implementing the starlark syntax support for highlight.js
@jgrahamc
jgrahamc / collage.py
Created August 8, 2019 11:53
Create a random photo collage from a directory of square photographs (all the same size)
# Makes a collage image from a directory full of images
#
# Assumes all the images are the same size and square
from os import listdir
from PIL import Image
import random
import math
images = listdir('.')
@samdoshi
samdoshi / .gitignore
Last active May 23, 2024 12:11
Running SuperCollider/Jack2 inside Docker with ALSA pass-through
/jackdrc
@bretton
bretton / crypto-tracks.md
Last active August 6, 2022 19:53
Crypto tracks