Skip to content

Instantly share code, notes, and snippets.

View qgeissmann's full-sized avatar
🪲
Sticking and trapping

Quentin Geissmann qgeissmann

🪲
Sticking and trapping
View GitHub Profile
@qgeissmann
qgeissmann / post-arch-pi
Last active August 29, 2015 14:07
Post installation script of a n arch raspeberry pi
######################################
# To build the sd card, follow instructions @ http://archlinuxarm.org/platforms/armv6/raspberry-pi
# before that install sudo, and use visudo to allow root access to wheel users
######################################
sudo useradd -m -g users -G wheel -s /bin/bash psv
sudo passwd psv
############# PACKAGES #########################
@qgeissmann
qgeissmann / PKGBUILD
Created January 22, 2015 20:56
RFDuino PKGBUILD
# Maintainer: Sergio Correia <[email protected]>
pkgname=arduino-rfduino
pkgver=2.2.2
pkgrel=2
pkgdesc="A finger-tip sized, Arduino compatible, wireless enabled microcontroller"
url="http://www.rfduino.com/"
license=('GPL')
arch=('i686' 'x86_64')
depends=('arduino-beta' 'wine')
library(rethomics)
# we define three functions to help us to download the data
syncIndexFile <- function(local_data_dir, remote, index_file = "index.txt"){
url = paste(remote, index_file,sep="/")
dst_name = paste(local_data_dir, index_file,sep="/")
dir.create(local_data_dir, recursive=T)
download.file(url, dst_name)
dst_name
}
# We source a few functions to help us:
source("https://gist.githubusercontent.com/qgeissmann/c977fdfe8528f1311e43ad505c3839eb/raw/rethomics_query2db_mirror.R")
# In any case, you need to tell R where your data lives/will live, on your own computer.
# The data from the cloud will be mirrored here, but only what matches your query.
local_data_dir = "C://Put/somehting/else/here"
#your query file
my_query_file <- "query.csv"
# ========= To fetch the files, THE FIRST TIME you want to analyse your experiment, you would do:
@qgeissmann
qgeissmann / xword.py
Created November 23, 2020 13:43
batch download guardian quick crosswords
import os
import datetime
import calendar
import requests
import tempfile
import atexit
import shutil
import PyPDF2
START_DATETIME = datetime.date(2020,1,1)