Skip to content

Instantly share code, notes, and snippets.

View reedjones's full-sized avatar
👾
chilling

Reed Jones reedjones

👾
chilling
  • oakland, california
  • 21:32 (UTC -07:00)
View GitHub Profile
@reedjones
reedjones / cli-app-typer.py
Last active September 11, 2024 23:42 — forked from mrjk/cli-app-typer.py
A quite complete example of python CLI Typer boilerplate [python]
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Version: 08-2024
"""{{ app_name }} CLI interface
This CLI provides a similar experience as the git CLI, but in Python with Typer.
Example:
``` py title="test.py"
@reedjones
reedjones / getAllVariables.js
Created August 4, 2024 07:49 — forked from vneri/getAllVariables.js
How to get all variables and search through their values in JavaScript
function getAllVariables(){
var searchVarByValue = function(searchString){
var values = Object.keys(this.ValueToVar);
var findings = [];
for (var i=0; i< values.length; i++){
if (values[i] == undefined)
continue;
var position = values[i].toLowerCase().indexOf(searchString.toLowerCase());
if (position != -1){
findings.push({ 'variable': this.ValueToVar[values[i]], 'value' : values[i] });
@reedjones
reedjones / db.py
Created July 30, 2024 08:11 — forked from rustprooflabs/db.py
Python and Postgres - psycopg2 quick example
import getpass
import psycopg2
import psycopg2.extras
def select_one(sql_raw, params):
""" Runs SELECT query that will return zero or 1 rows. `params` is required."""
return _execute_query(sql_raw, params, 'sel_single')
@reedjones
reedjones / tl06001_bg.geo_30ps.topo.json
Created July 25, 2024 08:30 — forked from rdhyee/tl06001_bg.geo_30ps.topo.json
simplified topjson Census block groups for Alameda County
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.