Skip to content

Instantly share code, notes, and snippets.

View jcurtis-cc's full-sized avatar
🎯
Focusing

J Curtis jcurtis-cc

🎯
Focusing
View GitHub Profile
@ryanlua
ryanlua / fritzing-download.md
Last active February 15, 2026 20:48
Free download of Fritzing using the official download links
@liviaerxin
liviaerxin / README.md
Last active January 21, 2026 02:47
FastAPI and Uvicorn Logging #python #fastapi #uvicorn #logging

FastAPI and Uvicorn Logging

When running FastAPI app, all the logs in console are from Uvicorn and they do not have timestamp and other useful information. As Uvicorn applies python logging module, we can override Uvicorn logging formatter by applying a new logging configuration.

Meanwhile, it's able to unify the your endpoints logging with the Uvicorn logging by configuring all of them in the config file log_conf.yaml.

Before overriding:

uvicorn main:app --reload
@soufianekhiat
soufianekhiat / DearImGui.cpp
Last active September 24, 2025 17:28
Slider 2D & Slider 3D
bool InputVec2(char const* pLabel, ImVec2* pValue, ImVec2 const vMinValue, ImVec2 const vMaxValue, float const fScale /*= 1.0f*/)
{
return SliderScalar2D(pLabel, &pValue->x, &pValue->y, vMinValue.x, vMaxValue.x, vMinValue.y, vMaxValue.y, fScale);
}
bool InputVec3(char const* pLabel, ImVec4* pValue, ImVec4 const vMinValue, ImVec4 const vMaxValue, float const fScale /*= 1.0f*/)
{
return SliderScalar3D(pLabel, &pValue->x, &pValue->y, &pValue->z, vMinValue.x, vMaxValue.x, vMinValue.y, vMaxValue.y, vMinValue.z, vMaxValue.z, fScale);
}
@gxercavins
gxercavins / one_window_one_file.py
Last active December 1, 2020 23:22
Stackoverflow question 56234318
import argparse, json, logging, time
import apache_beam as beam
import apache_beam.transforms.window as window
from apache_beam.io import filesystems
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.options.pipeline_options import SetupOptions
class AddWindowingInfoFn(beam.DoFn):
@nuclearglow
nuclearglow / convert-arraybuffer.js
Created January 26, 2018 10:30
ArrayBuffer <-> JSON <-> ArrayBuffer
// array buffer to JSON
const dataString JSON.stringify(Array.from(new Uint8Array(arrayBuffer)));
// send around
// JSON to ArrayBuffer
new Uint8Array(JSON.parse(dataString)).buffer
@kylemcdonald
kylemcdonald / 1m-analysis.ipynb
Created August 6, 2017 17:01
Histogram analysis of the 1 million song dataset.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@garystafford
garystafford / helpful-docker-commands.sh
Last active April 20, 2025 11:08
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@noxan
noxan / namegenerator.py
Last active August 28, 2024 11:16
A simple python script to generate random names.
#!/usr/bin/python3
import random
import string
import sys
VOWELS = "aeiou"
CONSONANTS = "".join(set(string.ascii_lowercase) - set(VOWELS))
@Akira-Hayasaka
Akira-Hayasaka / gist:3045482
Created July 4, 2012 05:13
Jamless ofxOSCReciver
/****************************************
ofxOSCReciver.h
****************************************/
/*
Copyright (c) 2007-2009, Damian Stewart
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: