Skip to content

Instantly share code, notes, and snippets.

@Vizdun
Vizdun / rsdb.json
Created April 4, 2022 20:39
The Racial Slur Database
[
{
"slur": "10% Off",
"group": "Jews",
"desc": "Refers to circumcision and consumerism (never pay retail). The term is most widely used in the UK where circumcision among non-Jews or non-Muslims is more rare, but in the United States, where it is more common, it can be considered insulting to many non-Jewish males as well."
},
{
"slur": "51st Stater",
"group": "Canadians",
"desc": "Canada is so culturally similar to the U. S. that they are practically the 51st state"
@SimonPadbury
SimonPadbury / scss-color-palette-generator.scss
Last active July 15, 2024 21:43
SCSS color palette generator — use to generate a range of color utilities (text color, background, border-color).
// Example: Set your color variables
$color--gray: #888888;
$color--blue: #3366FF;
$color--teal: #43E7F9;
$color--green: #5BD642;
$color--orange: #ffae18;
$color--red: #FF4732;
// Example: Set a color shade step interval
We can't make this file beautiful and searchable because it's too large.
"Airport ID","Name","City","Country","IATA","ICAO","Latitude","Longitude","Altitude","Timezone","DST","Tz database time zone","Type","Source"
1,"Goroka Airport","Goroka","Papua New Guinea","GKA","AYGA",-6.081689834590001,145.391998291,5282,10,"U","Pacific/Port_Moresby","airport","OurAirports"
2,"Madang Airport","Madang","Papua New Guinea","MAG","AYMD",-5.20707988739,145.789001465,20,10,"U","Pacific/Port_Moresby","airport","OurAirports"
3,"Mount Hagen Kagamuga Airport","Mount Hagen","Papua New Guinea","HGU","AYMH",-5.826789855957031,144.29600524902344,5388,10,"U","Pacific/Port_Moresby","airport","OurAirports"
4,"Nadzab Airport","Nadzab","Papua New Guinea","LAE","AYNZ",-6.569803,146.725977,239,10,"U","Pacific/Port_Moresby","airport","OurAirports"
5,"Port Moresby Jacksons International Airport","Port Moresby","Papua New Guinea","POM","AYPY",-9.443380355834961,147.22000122070312,146,10,"U","Pacific/Port_Moresby","airport","OurAirports"
6,"Wewak International Airport","Wewak","Papua New Guinea","WWK","AYWK",-3.583
@thisismattmiller
thisismattmiller / ner.js
Last active July 18, 2018 21:29
example python and node script for the docker image semlab/dadalytics-stanford-ner (https://hub.docker.com/r/semlab/dadalytics-stanford-ner/)
const request = require('request');
var my_text = `Dada (/ˈdɑːdɑː/) or Dadaism was an art movement of the European avant-garde in the early 20th century, with early centers in Zürich, Switzerland at the Cabaret Voltaire (circa 1916); New York Dada began circa 1915,[1] and after 1920 Dada flourished in Paris. Developed in reaction to World War I, the Dada movement consisted of artists who rejected the logic, reason, and aestheticism of modern capitalist society, instead expressing nonsense, irrationality, and anti-bourgeois protest in their works.[2][3][4] The art of the movement spanned visual, literary, and sound media, including collage, sound poetry, cut-up writing, and sculpture. Dadaist artists expressed their discontent with violence, war, and nationalism, and maintained political affinities with the radical left.[5]
Cover of the first edition of the publication Dada by Tristan Tzara; Zürich, 1917
There is no consensus on the origin of the movement's name; a common story is that the Austrian artist Ri
@thisismattmiller
thisismattmiller / curl.txt
Created October 23, 2017 18:50
example CURL command for semlab/dadalytics-stanford-ner
curl -XPOST -H "Content-type: application/json" -d "{\"text\":\"Dada (/ˈdɑːdɑː/) or Dadaism was an art movement of the European avant-garde in the early 20th century, with early centers in Zürich, Switzerland at the Cabaret Voltaire (circa 1916); New York Dada began circa 1915,[1] and after 1920 Dada flourished in Paris. Developed in reaction to World War I, the Dada movement consisted of artists who rejected the logic, reason, and aestheticism of modern capitalist society, instead expressing nonsense, irrationality, and anti-bourgeois protest in their works.[2][3][4] The art of the movement spanned visual, literary, and sound media, including collage, sound poetry, cut-up writing, and sculpture. Dadaist artists expressed their discontent with violence, war, and nationalism, and maintained political affinities with the radical left.[5] Cover of the first edition of the publication Dada by Tristan Tzara; Zürich, 1917 There is no consensus on the origin of the movement's name; a common story is that the Austria
@rkasigi
rkasigi / osx-random-string.txt
Last active February 5, 2024 16:39
OSX Generate Random String
openssl rand -base64 6
openssl rand -hex 4
openssl rand -base64 8 | md5 | head -c8;echo
openssl rand -base64 6
ping -c 1 yahoo.com |md5 | head -c8; echo
@Lazhari
Lazhari / README.md
Created February 25, 2017 22:01
Split a large CSV file and add headers to each file

Split a large CSV file and add headers to each file

Step One: Split file

$ split -l 5000 users.csv ./split-files 

5000 is the number of lines you want for each file.)

@edsu
edsu / replies.py
Last active December 7, 2022 18:59
Try to get replies to a particular set of tweets, recursively.
#!/usr/bin/env python
"""
Twitter's API doesn't allow you to get replies to a particular tweet. Strange
but true. But you can use Twitter's Search API to search for tweets that are
directed at a particular user, and then search through the results to see if
any are replies to a given tweet. You probably are also interested in the
replies to any replies as well, so the process is recursive. The big caveat
here is that the search API only returns results for the last 7 days. So
@jexp
jexp / bulk-neo4j-import-original.sh
Last active May 10, 2021 20:29
Panama Papers Import Scripts for Neo4j
export NEO4J_HOME=${NEO4J_HOME-~/Downloads/neo4j-community-3.0.1}
if [ ! -f data-csv.zip ]; then
curl -OL https://cloudfront-files-1.publicintegrity.org/offshoreleaks/data-csv.zip
fi
export DATA=${PWD}/import
rm -rf $DATA
@ernestoe
ernestoe / duplicate_relationships.adoc
Last active April 20, 2023 02:28
Finding Duplicate Relationships

Finding Duplicate Relationships

Introduction to Problem

Graph databases and Neo4j particularly, are excellent for a different set of purposes, such as storing, traversing and presenting graphy data (Graphs are Everywhere!), but let’s face it: too much freedom and not enough discipline might bring bad data quality into the formula. A common problem results when creating nodes and properties without indexes or when improperly using MERGE instead of CREATE.