Skip to content

Instantly share code, notes, and snippets.

View igorbrigadir's full-sized avatar

Igor Brigadir igorbrigadir

View GitHub Profile
@arjanelfassed
arjanelfassed / NLarmsexports.csv
Created February 23, 2016 15:06
Maandrapportages uitvoer, doorvoer en dual-use goederen 2004-2015
We can't make this file beautiful and searchable because it's too large.
datum,nummer,omschrijving,gebruik,aantal,type,catdt,herkomst,bestemming,waarde,Column 11,Column 12,Column 13,Column 14
2004-05-01T00:00:00Z,2.3632284E7,(Tweede generatie) beeldversterkerbuizen,Nachtzichtsystemen,,Dual-use,D,Nederland,Chili Via België,25740.0,,,,
2004-06-01T00:00:00Z,2.3653915E7,Dimethylamine,Vervaardiging van herbiciden,,Dual-use,D,Nederland,Kroatië,15000.0,,,,
2004-07-01T00:00:00Z,2.3691973E7,Methyldiethanolamine,Tbv de olie-industrie,,Dual-use,D,Onbekend,Zuid-afrika,377834.0,,,,
2004-08-01T00:00:00Z,2.3674858E7,Fosforoxychloride,Vervaardiging van harsen,,Dual-use,D,Onbekend,Turkije,5100.0,,,,
2004-08-01T00:00:00Z,2.3711486E7,(Tweede generatie) beeldversterkerbuizen,Demonstratie,,Dual-use,T,Onbekend,Jordanië,6600.0,,,,
2004-08-01T00:00:00Z,2.3711494E7,(Tweede generatie) beeldversterkerbuizen,Demonstratie,,Dual-use,T,Onbekend,Jordanië,2200.0,,,,
2004-01-14T00:00:00Z,2.3477165E7,Fosfortrichloride,Vervaardiging van fosfieten,,Dual-use,D,Duitsland,Taiwan,525000.0,,,,
@richarddmorey
richarddmorey / likert_check.R
Last active March 4, 2017 14:51
R script to check possible means and standard deviations for likert responses
############
# Option 1: Get all solutions
# using brute force
############
## This function creates every possible distribution of responses for
## a likert scale with nlev responses. This is total brute force. There's
## probably a better way.
## Argument:
## v : initially, the total number of responses
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

An idea that I proved unable to express in the number of characters on Twitter:

Train two word2vec models on the same corpus with 100 dimensions apiece; one with window size 5, and one with window size 15 (say).

Now you have 2 100-dimensional vector spaces with the same words in each.

That's the same as 1 200-dimensional vector space: you just append each of the vectors to each other.

That vector space has all the information from each of the original models in it: you can just use linear algebra to flatten it out along either of the original 100 degree vectors.

@andypiper
andypiper / basic-recipes.md
Last active May 21, 2025 15:12
Twitter API recipes for twurl +jq, and other useful Twitter code snippets and tools
@leeper
leeper / checkurls.R
Last active April 30, 2016 06:36
Check URLs in a document
# Check URLs in a document
## This code will extract URLs from a text document using regex,
## then execute an HTTP HEAD request on each and report whether
## the request failed, whether a redirect occurred, etc. It might
## be useful for cleaning up linkrot.
if (!require("httr")) {
install.packages("httr", repos = "http://cran.rstudio.com/")
}
@jimkang
jimkang / accidentally-poetic-LICENSE.txt
Created May 15, 2016 18:57
Accidentally find-and-replaced the MIT License into poeticness.
The MIT License (MIT)
Copyright (c) 2016 Jim Kang
Permission is hereby granted,
free of charge,
to any person obtaining a copy
of this software and associated documentation files (the "Software"),
to deal
in the Software without restriction,
@mikelove
mikelove / tsne.R
Last active April 6, 2024 01:11
Exploring behavior of t-SNE on linear data
n <- 200
m <- 40
set.seed(1)
x <- runif(n, -1, 1)
library(rafalib)
bigpar(2,2,mar=c(3,3,3,1))
library(RColorBrewer)
cols <- brewer.pal(11, "Spectral")[as.integer(cut(x, 11))]
plot(x, rep(0,n), ylim=c(-1,1), yaxt="n", xlab="", ylab="",
col=cols, pch=20, main="underlying data")

Interactive Machine Learning

Taught by Brad Knox at the MIT Media Lab in 2014. Course website. Lecture and visiting speaker notes.