Skip to content

Instantly share code, notes, and snippets.

View IamPhytan's full-sized avatar
GitLabing / Pythoning / LaTeXing

Damien LaRocque IamPhytan

GitLabing / Pythoning / LaTeXing
View GitHub Profile
IamPhytan /
Last active November 23, 2018 22:16
Infinite loop of curl piped on bash
curl | bash
import json
import logging
import threading
import fibre
from fibre.utils import Logger
logger = logging.getLogger(__name__)
fibre_logger = Logger(verbose=logger.getEffectiveLevel() == logging.DEBUG)
IamPhytan / mat.bat
Last active June 29, 2019 02:02
Batch file to run MATLAB files in a terminal or in the command prompt
:: Run MATLAB scripts in CMD
:: Usage Examples
:: 'mat' is the name of my batch file
:: mat myScript.m
@echo off
:: Get filename by removing extension
set filename=%1
IamPhytan / .gitignore
Last active June 29, 2019 02:03
Standardized .gitignore for Python projects
# Byte-compiled / optimized / DLL files
# C extensions
# Distribution / packaging
IamPhytan /
Created September 9, 2019 00:33
Append text to filename
for name in $FOLDERPATH/*;
do SUBSTRING=${name%.*};
IamPhytan /
Last active February 11, 2020 12:32
ODE Examples in Sympy
import sympy as sym
import numpy as np
import matplotlib.pyplot as plt
# Integral calculation constants
a = 0
b = 20
h = 0.4
IamPhytan /
Created July 10, 2020 00:59
Small script to change a Git repo remote URL easily
# use : remren_git <ssh-url>
if [ "x$1" != "x" ]
git remote rename origin old-origin;
git remote add origin $1;
git push -u origin --all;
else echo "No arguments";
IamPhytan /
Created October 1, 2020 16:45
OpenCV Contrib Python Dependencies Installation for Raspberry Pi
sudo apt update && sudo apt upgrade
sudo apt install -y build-essential cmake pkg-config
sudo apt install -y libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt install -y libxvidcore-dev libx264-dev
sudo apt install -y libfontconfig1-dev libcairo2-dev
sudo apt install -y libgtk2.0-dev
sudo apt install -y libatlas-base-dev gfortran
IamPhytan / 555-timer.tex
Created January 14, 2022 05:00
555 Timer Block Diagram using CircuiTikZ
% !TEX program = pdflatex
% !TEX options = --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error "%DOC%"
% Block diagrams & Flowcharts
% ========================================