Skip to content

Instantly share code, notes, and snippets.

View vaneseltine's full-sized avatar
🐍
py

Matt VanEseltine vaneseltine

🐍
py
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import logging.config
logging_config = {
'version': 1,
'formatters': {
'standard': {
'format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
}
},
'handlers': {
""" Raymond Hettinger's Structural Pattern Matching Toolkit
Problems Solved
---------------
1) Replace case clause constants with named constants.
x == PI
@vaneseltine
vaneseltine / tasks.json
Last active August 1, 2024 17:08
Implementing jupytext sync as a VSCode build task
{
"version": "2.0.0",
"tasks": [
{
"label": "JupyText Sync",
"type": "shell",
"command": "${command:python.interpreterPath} -m jupytext --sync ${file}",
"group": {
"kind": "build",
"isDefault": true
@vaneseltine
vaneseltine / 2PageOAI by Thomas Hickey
Last active September 26, 2022 20:17
2PageOAI by Thomas Hickey
https://www.oclc.org/research/activities/oai2page.html
@vaneseltine
vaneseltine / log_margins.do
Last active December 18, 2021 15:18
Stata: exponentiated margins for a log-transformed dependent variable
/*
YOU don't want to run OLS on a log-transformed dependent
variable. After all, you already explained the clear and
well-justified benefits in your methods section. You had
hoped that each reviewer would consider this, but what's
to be done when Reviewer 2 raises their very extra valid
concerns? Modified Park test and GLM be damned, it seems.
Anyway, now Stata just needs to calculate the comparable
marginal effects, because there's no way you're going to
@vaneseltine
vaneseltine / SoundGenerator.py
Created March 5, 2020 03:03 β€” forked from sparida/SoundGenerator.py
Oscillator and Sound Generator Module
import numpy as np
from scipy.io.wavfile import write
from math import pi, sin, floor
from fractions import gcd
from UtilityFunctions import *
class SoundGenerator():
# Constants
def __init__(self, waveType = "Sine", frequency = 500, amplitude = 1.0, duration = 5):
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF1cV0gBEACT+wlV7LmXpwO53lqbiD0zRsHsQ/FnG3Pryd5Kl82jrlr8rSwj
828NfNIA4FRLEZyvvCmRI8mOnHkrulAh7d9SeeKWEuhy6eAQA8xUNng8cAu2ew0+
/+QcSXGe5jCr9HG0bB1UISUaC4bDG4TTzjOzvZ5H3trQcjTp4y9yyqPLLvllysD8
O5mHfWCNJ33l2AOygn7Ru3Y5bxvBdkw03fmSQ09IZ3bLKGuvyCrSakQzNAfLU6Wj
yzhmSTkFD829MsgkuIVnerz1RCr7ylwmt5QBD4ZDZByz+srTqDiCu0zdq8kFTEwu
HypRSDQ01oGf4IpmCs+dqJNr4PEyOYCIvhS0sy6Luueu3u8APRF5nyrJvcvp068J
N6fNzdk3XGYEFyzsoSg/icT2EzgkHz5BY/JPymuKJupYdnUYrLNg2CMX39cL33/Z
N/yRXTxpvcAht8nDUSeSxh+SZGOIO4fV/fxqEtRxdSJ4z/ZKxNhE8LZT8pzmSnoW