Skip to content

Instantly share code, notes, and snippets.

Avatar

Amir Kadivar amirkdv

View GitHub Profile
@amirkdv
amirkdv / 0_notes.md
Created Apr 18, 2022
This is a toy example of XML-RPC in Python and Nodejs.
View 0_notes.md

XML-RPC Example

This is a toy example of XML-RPC in Python and Nodejs.

Usage:

$ python server.py

In a separate shell:

@amirkdv
amirkdv / questions_to_ask.md
Last active Mar 3, 2022
Questions to Ask Your Technical Interviewers
View questions_to_ask.md

Questions to Ask Your Technical Interviewers

Questions marked as (HM) are best suited for the hiring manager.

Area: Alignment

  • Why are you working at this company? What motivates you to stay?
  • What’s something that if your team/org achieves this year, the entire company/leadership would notice?
  • If you had a magic wand, what’s one thing you’d change about the company?
  • (HM) If you had filled this role 2 months ago, what would they be doing now?
@amirkdv
amirkdv / .gitignore
Last active May 7, 2020
Binary Classification, a visual refresher
View .gitignore
venv
pos.txt
neg.txt
plot.png
@amirkdv
amirkdv / git_clean_branch.py
Created Mar 6, 2020
Clean git branches and stale references
View git_clean_branch.py
#!/usr/bin/env python
import sys
import argparse
import subprocess
REMOTE = 'origin'
class CmdError(RuntimeError):
@amirkdv
amirkdv / oop.md
Last active Dec 6, 2021
Object Oriented Programming in Python, A Graded Knowledge Check
@amirkdv
amirkdv / django_behavioral.md
Last active Jun 26, 2022
Behavioral Tests for Django Apps with Behave
@amirkdv
amirkdv / interaction_topology_evolution.py
Last active Jun 8, 2018
An Evolutionary Model for the Emergence of Scale-Free Biological Networks
View interaction_topology_evolution.py
#!/usr/env/bin python3
# USAGE: LIB=work_space python3 interaction_topology_evolution.py
import random
import sys
import itertools
import math
import networkx as nx
import numpy as np
import os
from ctypes import cdll
@amirkdv
amirkdv / simulations.py
Last active Jun 8, 2018
Statistical Analysis of Coherence in LFP recordings
View simulations.py
#!/usr/bin/env python
import sys
import numpy as np
from numpy.fft import rfft, rfftfreq, irfft
from matplotlib import pyplot as plt
from scipy.signal import csd, welch
# install via `pip install git+https://github.com/aaren/wavelets`
from wavelets import WaveletAnalysis
@amirkdv
amirkdv / Allocate ports.md
Last active Aug 29, 2015
Generate deterministic *nix ports for services
View Allocate ports.md

Example usage:

$ python gimme_port.py
usage: gimme_port.py [-r|--resolve] NAME

$ python gimme_port.py muhc.ca.http
29595

$ python gimme_port.py staging.muhc.ca.http
port 31079 is in use by 'nc' (pid: 28569), use --resolve