Skip to content

Instantly share code, notes, and snippets.

View Chaztikov's full-sized avatar
🏠
Working from home

Chaztikov

🏠
Working from home
View GitHub Profile

Software Engineering Philosophy & Development Protocol

1. Global Integrity & Topology

  • System Awareness: Before implementation, map the dependency graph and system topology. Ensure local changes preserve global invariants and do not trigger "Shotgun Surgery."
  • Orthogonality: Design for independence. Ensure that changes in one module do not leak side effects into others. Minimize coupling and maximize cohesion.

2. Intent & Abstraction Hierarchy

  • Intent-Revealing Design: Prioritize human readability and intent over machine cleverness. Use naming that explains "Why" rather than "How."
  • Single Level of Abstraction (SLA): Adhere strictly to the Single Responsibility Principle (SRP). Each function must operate at a consistent level of abstraction and have exactly one reason to change.
@tlian25
tlian25 / options_data.py
Last active November 22, 2022 21:13
Yahoo Finance Webscraping
import pandas as pd
import numpy as np
import yfinance as yf
def options_chain(symbol):
tk = yf.Ticker(symbol)
# Expiration dates
exps = tk.options
tl;dr
use the package manager install (.deb or .rpm files, not .run file)
remove stuff using
sudo apt-get --purge remove 'cuda*'
sudo apt-get --purge -y remove 'nvidia*'
sudo apt-get --purge -y remove 'libnvidia*'
using
@ivan-pi
ivan-pi / ghiav.txt
Last active October 16, 2025 16:55
Lid-driven cavity flow benchmark v-velocity values from Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982), Journal of computational physics, 48(3), 387-411.
# Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982).
# High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method.
# Journal of computational physics, 48(3), 387-411.
#
# TABLE II
# Results for $v$-Velocity along Horizontal Line through Geometric Center of Cavity
# [Note: The velocity for Re = 400 and point (x,v) = (0.9063,-0.23827) is probably wrong]
#--------------------------------------------------------------------
# Re
# -------------------------------------------------------------
@john-bradshaw
john-bradshaw / mnist_gpdnn_example.py
Created November 7, 2017 14:16
Shows how to combine NN with GP for end to end training. run with TF 1.4, GPflow git commit f618fe4d9aa096b32a3d24576d68f46a3f260116
import os
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data as mnist_input_data
import numpy as np
from sklearn import cluster
from scipy.spatial import distance
import pandas as pd
@naotokui
naotokui / conditional_vae_keras.ipynb
Created June 29, 2017 01:01
Conditional VAE in Keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mehdidc
mehdidc / manifold_eval.py
Last active April 30, 2017 21:01
manifold_eval.py
"""
This is an implementation of the distance proposed by "An Information Geometry of Statistical Manifold Learning, Ke Sun, Stéphane Marchand-Maillet
" to measure quality of embedding techniques (e.g PCA, Isomap, LLE, TSNE). It is needs data points matrix of
the original data as well as the same data points with the embedding coordinates, and some additional parameters to fix.
How to use ?
============
Basic swiss roll example:
@nmayorov
nmayorov / solve_bvp_demo.ipynb
Last active November 17, 2023 19:56
Exampled of using solve_bvp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jc00ke
jc00ke / llvm-update-alternatives
Created November 4, 2014 02:19
LLVM & clang alternatives
#!/usr/bin/env sh
sudo update-alternatives --install \
/usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.4 200 \
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-3.4 \
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 \
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-3.4 \
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-3.4 \
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-3.4 \
--slave /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-3.4 \
@rbabich
rbabich / levmarq - Levenberg-Marquardt in plain C
Last active January 28, 2026 07:40
A simple implementation of the Levenberg-Marquardt algorithm in plain C
This file (with a leading space) exists so that the gist has a sensible name, rather than "LICENSE."