Skip to content

Instantly share code, notes, and snippets.

View drbh's full-sized avatar
🕳️
a for AI

drbh drbh

🕳️
a for AI
  • drbh
  • state space
  • 01:11 (UTC -04:00)
View GitHub Profile
@drbh
drbh / typed-hash-tree-construction_v2.ipynb
Last active April 17, 2020 19:44
WIP implementation of typed hash tree
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drbh
drbh / typed-hash-tree-construction.ipynb
Created April 17, 2020 18:29
typed-hash-tree-construction.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drbh
drbh / jagged-loops.js
Last active April 3, 2020 19:28
Make circles and skew the points for jagged loops
const range = (start, end, length = end - start) =>
Array.from({ length }, (_, i) => start + i);
const randomNumber = (min, max) => {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
const points_in_circle = (r, n) => {
### Keybase proof
I hereby claim:
* I am drbh on github.
* I am drbh (https://keybase.io/drbh) on keybase.
* I have a public key ASBjal2m3iJOdayg_el6CbiP0F7wTd4I23tUu64PeAkcGwo
To claim this, I am signing this object:
@drbh
drbh / explore.ipynb
Created January 3, 2020 00:40
Create some fake person spending data and get weekly and monthly summaries in a notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drbh
drbh / app.ipynb
Created December 11, 2019 02:51
Checking out the VIX performance by comparing weekly changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drbh
drbh / using-bert-score-for-chatbots.ipynb
Created December 5, 2019 15:10
A simple way to use BERTScore to find the best FAQ response
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drbh
drbh / phoenix_gov_faq.csv
Created November 21, 2019 03:34
Scraped - parsed and saved city of phoenix's FAQ as CSV
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
,question,answer
0,Is there a charge for a verifier to obtain the verification of an employee's employment information?,"Verifiers pay a fee directly to the Work Number for employment verifications. City of Phoenix employees should not ever have to pay a fee. If you believe you have been charged a fee by a lender or other requestor for the verification of your employment, please contact Human Resources at 602-262-6608 or via e-mail at [email protected]. The vendor - The Work Number - does not charge the City a fee for providing this service."
1,What security measures are in place to protect my personal information?,"The database system that stores employees' personal data is isolated from the Internet with firewall technology and personal data is not stored on the Web server. Transactions conducted using the Web application are encrypted; security patches are installed as well. You can find more information about the security of The Work Number by logging onto their website, www.theworknumber.com."
2,"Afte
@drbh
drbh / phoenix_gov_faq.py
Created November 21, 2019 02:07
Scrape - parse and save the city of phoenix's FAQ questions to a CSV
from bs4 import BeautifulSoup
import requests
import pandas as pd
# function to remove non-ASCII
def remove_non_ascii(text):
return ''.join(i for i in text if ord(i)<128)
def extract_question_text(s):
html_tree = BeautifulSoup(s, "lxml").find("div")
@drbh
drbh / mutex_pool.rs
Created October 28, 2019 15:38
A simple mutex POOL for a custom obj. Useful for templating data storage connector polls in a multi threaded way
#![feature(drop_types_in_const)]
use std::sync::{Mutex, MutexGuard};
#[macro_use]
extern crate lazy_static;
lazy_static! {
static ref POOL: Mutex<Vec<Obj>> = Mutex::new(vec![]);
}