Skip to content

Instantly share code, notes, and snippets.

View giacecco's full-sized avatar

Gianfranco Cecconi giacecco

View GitHub Profile
@giacecco
giacecco / brew install -v
Created May 11, 2014 19:03
brew install -v symphony installation fail
==> Downloading http://www.coin-or.org/download/source/SYMPHONY/SYMPHONY-5.3.3.tgz
Already downloaded: /Library/Caches/Homebrew/symphony-5.3.3.tgz
==> Verifying symphony-5.3.3.tgz checksum
tar xf /Library/Caches/Homebrew/symphony-5.3.3.tgz
==> ./configure --disable-debug --disable-dependency-tracking --enable-shared=no --enable-static-executable --prefix=/usr/local/Cellar/symphony/5.3.3
checking build system type... i386-apple-darwin13.1.0
checking whether we want to compile in debug mode... no
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
@giacecco
giacecco / console
Created June 26, 2014 19:45
TypeError: object is not a function
.../OLAF-fully-automated-ingestion$ foreman run node test.js
/Users/giacecco/Projects/OLAF-fully-automated-ingestion/test.js:4
csv()
^
TypeError: object is not a function
at Object.<anonymous> (/Users/giacecco/Projects/OLAF-fully-automated-ingestion/test.js:4:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
@giacecco
giacecco / main.js
Created July 18, 2014 14:40
Prints lists of articles from Wiley journals
var JOURNALS = {
D: 'journal/10.1002/(ISSN)1860-1324', // Deutsche Entomologische Zeitschrift
F: 'journal/10.1002/(ISSN)1860-1014', // Fossil Record
Z: 'journal/10.1002/(ISSN)1860-0743a', // Zoosystematics and Evolution
};
var argv = require('yargs')
.usage('Usage: $0 --journal D|F|Z --year <year>|all [--throttle <max_requests_per_minute>]')
.example('$0 --journal Z --year 2011', 'prints the urls for all Zoosystematics and Evolution articles in 2011')
.demand([ 'journal', 'year' ])
@giacecco
giacecco / Zoosystematics and Evolution
Created July 18, 2014 14:41
The URLs to all articles to date published on Wiley's "Zoosystematics and Evolution"
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300006/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300007/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300008/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300009/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300010/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300011/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300012/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300013/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300014/abstract
http://onlinelibrary.wiley.com/doi/10.1002/zoos.201300015/abstract
@giacecco
giacecco / brew --config
Created July 28, 2014 17:23
R 3.1.1 Homebrew install fail
.../~$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: a4a163b7d2643a8219b78701576b3b9a9eb0cc9e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.9.4-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
@giacecco
giacecco / test.js
Created August 10, 2014 17:58
Can't throw errors in the callback
var CONNECTION_PARAMETERS = {
'host': 'datafeeds.networkrail.co.uk',
'port': 61618,
'connectHeaders': {
'host': '/',
'login': process.env.NROD_USERNAME,
'passcode': process.env.NROD_PASSWORD,
'client-id': ((process.env.DEBUG !== 'true') ? process.env.NROD_USERNAME : undefined),
}
},
LOG FILE :
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex 2014.8.12) 14 AUG 2014 12:50
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
@giacecco
giacecco / example_of_full_provenance.json
Created November 21, 2014 12:48
Provenance scaffolding
{"saon":{"name":"823 SALISBURY HOUSE"},"paon":{"name":"29"},"street":{"name":"FINSBURY CIRCUS","geometry":{"type":"Point","coordinates":[532850,181571]}},"locality":{"name":null},"town":{"name":"LONDON"},"postcode":{"name":"EC2M 5QQ","geometry":{"type":"Point","coordinates":[532775,181588]}},"country":{"name":null},"provenance":{"activity":{"processing_scripts":"[LINK TO THE DISTILLER REPOSITORY **TREE** used for distillation]","executed_at":"2014-11-19T09:53:14.000Z","derived_from":[{"type":"Source","description_url":"http://download.companieshouse.gov.uk/en_output.html","url":["http://download.companieshouse.gov.uk/BasicCompanyData-2014-11-01-part1_5.zip","http://download.companieshouse.gov.uk/BasicCompanyData-2014-11-01-part2_5.zip","http://download.companieshouse.gov.uk/BasicCompanyData-2014-11-01-part3_5.zip","http://download.companieshouse.gov.uk/BasicCompanyData-2014-11-01-part4_5.zip","http://download.companieshouse.gov.uk/BasicCompanyData-2014-11-01-part5_5.zip"],"name":"Companies House's \"Free Comp
@giacecco
giacecco / R interactive session
Last active September 9, 2016 14:53
Open Addresses UK - Basic inference example
> library(dplyr)
> # I read the ZE postcode area data from the Open Addresses UK 'split'
> # CSV distro
> oa <- read.csv("~/Downloads/2014-12-10-openaddressesuk-addresses-only-split.csv/ZE.csv", stringsAsFactors=FALSE)
> # I drop the addresses whose Primary Addressable Objects (PAO) can't be
> # interpreted as numbers
> oa$pao <- as.integer(oa$pao)
Warning message:
NAs introduced by coercion
> oa <- oa[!is.na(oa$pao),]
@giacecco
giacecco / brew config
Created June 8, 2015 10:47
Homebrew incorrectly flags "dinkypumpkin/get_iplayer" as a private repository
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: ddba0eade696d61aec903cca0405a21aafccdb3b
Last commit: 18 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit haswell
OS X: 10.10.3-x86_64
Xcode: 6.3.2
CLT: 6.3.2.0.1.1431401888