Skip to content

Instantly share code, notes, and snippets.

View farice's full-sized avatar
⚛️

Faris Sbahi farice

⚛️
View GitHub Profile
@farice
farice / report.html
Last active April 28, 2026 13:15
c4c8698a — I2C session deep audit (T3 root cause: LLM passed max_concurrent=1)
<!doctype html>
<html lang="en"><head><meta charset="utf-8">
<title>c4c8698a — I2C session deep audit</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
max-width: 980px; margin: 32px auto; padding: 0 24px; color: #1f2328;
line-height: 1.55; }
h1 { border-bottom: 2px solid #d0d7de; padding-bottom: 8px; }
h2 { border-bottom: 1px solid #d0d7de; padding-bottom: 4px; margin-top: 32px; }
@farice
farice / setup-latency-report.html
Last active April 28, 2026 11:56
Conductor session-setup latency — root-cause analysis (c4c8698a, 2026-04-28)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Conductor session-setup latency — root-cause analysis</title>
<style>
:root {
--bg: #0d1117;
--panel: #161b22;
--border: #30363d;
@farice
farice / keybase.md
Created October 4, 2021 12:23
keybase.md

Keybase proof

I hereby claim:

  • I am farice on github.
  • I am farissbahi (https://keybase.io/farissbahi) on keybase.
  • I have a public key ASDYpPJOSSwUgwTO-ISoh2gVNCY3TMJz8zl8eKUcwwg4dwo

To claim this, I am signing this object:

from qutip import *
import numpy as np
# Consider image relative to |+> in cos(\theta) |+> + e^(i\phi) |-> representation.
def extract_theta_phi(single_qubit_gate, b=snot() * basis(2,0)):
# apply gate to |+>
ket = single_qubit_gate * b
alpha = ket.full()[0][0]
beta = ket.full()[1][0]
@farice
farice / duchi_notes_errata.md
Last active July 24, 2019 20:23
Stats 311 Lecture Notes - Duchi - Errata
  • Example 14.1 (Bernoulli Distribution):
p^x(1-p)^(1-x) = exp[xlog(p) + (1-x) log(1-p)]
## https://xkcd.com/1185/
import random
def panicSort(list):
if isSorted(list)
return list
for i in range(10000):
pivot = random(0, len(list))
list = list[pivot:] + list[:pivot]
@farice
farice / get_historical_data.py
Last active January 7, 2018 00:44
Retrieve historical data from the GDAX API and output to CSV
import requests
import datetime
import time
import csv
import progressbar
import argparse
import logging
url = 'https://api.gdax.com'
bar = progressbar.ProgressBar(max_value=1, redirect_stdout=True)
import getpass
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
userStr = raw_input("Username: ")