Skip to content

Instantly share code, notes, and snippets.

View amirkdv's full-sized avatar

Amir Kadivar amirkdv

View GitHub Profile
#!/bin/bash
#
# Usage:
# $ inspect-tls-cert.sh facebook.com
set -eux
server=${1:-"stripe.com"}
certfile=/tmp/${server}.cert
openssl_client_connect="openssl s_client -connect ${server}:443 -servername ${server}"
@amirkdv
amirkdv / 0_notes.md
Created April 18, 2022 12:22
This is a toy example of XML-RPC in Python and Nodejs.

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 November 15, 2022 13:46
Questions to Ask Your Technical Interviewers

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 21:00
Binary Classification, a visual refresher
venv
pos.txt
neg.txt
plot.png
@amirkdv
amirkdv / git_clean_branch.py
Created March 6, 2020 00:09
Clean git branches and stale references
#!/usr/bin/env python
import sys
import argparse
import subprocess
REMOTE = 'origin'
class CmdError(RuntimeError):
@amirkdv
amirkdv / oop.md
Last active December 15, 2022 22:56
Object Oriented Programming in Python, A Graded Knowledge Check
@amirkdv
amirkdv / django_behavioral.md
Last active October 5, 2023 09:48
Behavioral Tests for Django Apps with Behave
@amirkdv
amirkdv / interaction_topology_evolution.py
Last active June 8, 2018 05:26
An Evolutionary Model for the Emergence of Scale-Free Biological Networks
#!/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 June 8, 2018 05:26
Statistical Analysis of Coherence in LFP recordings
#!/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 / web-ui-testing.md
Last active July 11, 2019 17:50
Web UI Testing Survey