Skip to content

Instantly share code, notes, and snippets.

View loretoparisi's full-sized avatar
🐍
NightShift

Loreto Parisi loretoparisi

🐍
NightShift
View GitHub Profile
@loretoparisi
loretoparisi / screams.txt
Created May 12, 2020 19:52
Screams Java Regex
(.{2,}?)([\s|-]*\1.?[\s|-]*){2,}
((.)*-(.)*){2,}
.*(\D)\1{2,}.+
.+(\D)\1{2,}.*
OH
(G)?(E)?(Y|E|A|H|-){4,}
B*(R){2,}
B(R)+(A)+(P)+
B+(O){2,}(M)+(B)+
B(O)+MB(A|O)+CL(A)+(T)+
@loretoparisi
loretoparisi / github_quick_setup.md
Last active March 20, 2025 05:26
Github Quick setup — if you’ve done this kind of thing before

Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore.

…or create a new repository on the command line

echo "# myrepo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/loretoparisi/myrepo.git
git push -u origin master
@loretoparisi
loretoparisi / report_2020-05-04T070000.txt
Created April 22, 2020 10:05
Contact Tracing Example report
Simulation Start Time: 2020-05-04T07:00:00
Family Count: 3
Friend Count: 10
Coworker Count: 50
Other Count: 10
--------------------
Handset ID: 4da604f3acf7448d9d8476774342a645
Relation to subject: family
@loretoparisi
loretoparisi / nodes.js
Last active April 10, 2020 20:18
nodes example for D3.js circle packing (flare graph)
NODES= window.LibName || {};
NODES = function () {
data = function() {
return {"children":[{"name":"#0","children":[{"name":"back","size":0.086},{"name":"time","size":0.036},{"name":"dance","size":0.036},{"name":"make","size":0.034},{"name":"summer","size":0.029},{"name":"stay","size":0.029},{"name":"white","size":0.022},{"name":"lying","size":0.022},{"name":"whoa","size":0.021}]},{"name":"#1","children":[{"name":"heart","size":0.086},{"name":"broke","size":0.072},{"name":"story","size":0.061},{"name":"life","size":0.05},{"name":"give","size":0.048},{"name":"start","size":0.025},{"name":"time","size":0.022}]},{"name":"#2","children":[{"name":"make","size":0.087},{"name":"beautiful","size":0.071},{"name":"world","size":0.068},{"name":"baby","size":0.033},{"name":"hair","size":0.03},{"name":"understand","size":0.029},{"name":"light","size":0.025},{"name":"hard","size":0.025},{"name":"ground","size":0.024},{"name":"smile","size":0.023},{"name":"heads","size":0.022},{"name":"hear","size":0.021},{"name":"fli
@loretoparisi
loretoparisi / ec2instances.md
Created April 10, 2020 16:30 — forked from julien-c/ec2instances.md
simple markdown table of AWS instance types with vCPU/RAM/price (us-east-1)
API Name Memory vCPUs Physical Processor Network Performance Linux On Demand cost Linux Reserved cost
a1.2xlarge 16.0 GiB 8 vCPUs AWS Graviton Processor Up to 10 Gigabit $148.92 monthly $93.80 monthly
a1.4xlarge 32.0 GiB 16 vCPUs AWS Graviton Processor Up to 10 Gigabit $297.84 monthly $187.61 monthly
a1.large 4.0 GiB 2 vCPUs AWS Graviton Processor Up to 10 Gigabit $37.23 monthly $23.43 monthly
a1.medium 2.0 GiB 1 vCPUs AWS Graviton Processor Up to 10 Gigabit $18.61 monthly $11.75 monthly
a1.metal 32.0 GiB 16 vCPUs AWS Graviton Processor Up to 10 Gigabit $297.84 monthly $187.61 monthly
a1.xlarge 8.0 GiB 4 vCPUs AWS Graviton Processor Up to 10 Gigabit $74.46 monthly $46.93 monthly
c1.medium 1.7 GiB 2 vCPUs Intel Xeon Family Moderate $94.90 monthly $66.43 monthly
@loretoparisi
loretoparisi / scipy_libblas_error.log
Created February 13, 2020 19:02
Scipy libblas error Ubuntu 18.04
(.env) ubuntu@blackrabbit:~/jupyter_notebooks/loreto_parisi/singing/mellotron$ pip install -r requirements.txt
Requirement already satisfied: matplotlib==2.1.0 in /home/ubuntu/jupyter_notebooks/.env/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (2.1.0)
Requirement already satisfied: tensorflow==1.15.2 in /home/ubuntu/jupyter_notebooks/.env/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (1.15.2)
Requirement already satisfied: inflect==0.2.5 in /home/ubuntu/jupyter_notebooks/.env/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (0.2.5)
Collecting librosa==0.6.0 (from -r requirements.txt (line 4))
Collecting scipy==1.0.0 (from -r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/d0/73/76fc6ea21818eed0de8dd38e1e9586725578864169a2b31acdeffb9131c8/scipy-1.0.0.tar.gz
Collecting tensorboardX==1.1 (from -r requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/0a/95/b5eb020dcda7568cafd9a035f61bffa38570995a2a7d0
[
{
"title": "'Corine, Corine'",
"artist": "The Abletones Big Band",
"count": "19",
"size": "393 MB",
"link": "http://mtkdata.cambridgemusictechnology.co.uk/Telefunken/AbletonesBigBand_CorineCorine_Full.zip"
},
{
"title": "'Song Of India'",
script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script);
function download(name,jsonObject) {
var fileContents = JSON.stringify(jsonObject, null, 2);
var pp = document.createElement('a');
pp.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(fileContents));
pp.setAttribute('download', name+'.json');
pp.click();
}
df=[]
$('.m-mtk-track').each((index,item) => {
@loretoparisi
loretoparisi / css_transparency.css
Created February 6, 2020 23:23
CSS Transparency hex codes
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
@loretoparisi
loretoparisi / sequence.js
Last active February 5, 2020 20:33
JavaScript Sequence of Promise
/**
* @param {Object} obj
* @return true if obj is Promise
*/
function isPromise(obj) {
return obj && typeof obj.then === 'function';
}
/**
* Waterfall of Promises
* @param list Array Array of Promises