Skip to content

Instantly share code, notes, and snippets.

@RouxRC
RouxRC / prez-2022-2.json
Created April 24, 2022 19:59
Prez 2022 - tour 2
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A basic line chart example.",
"width": 1000,
"height": 700,
"padding": 5,
"data": [
{
"name": "table",
"format": {"type": "csv", "parse": {"datetime": "date"}},
@RouxRC
RouxRC / prez-2022-2.json
Created April 24, 2022 19:59
Prez 2022 - tour 2
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A basic line chart example.",
"width": 1000,
"height": 700,
"padding": 5,
"data": [
{
"name": "table",
"format": {"type": "csv", "parse": {"datetime": "date"}},
@RouxRC
RouxRC / prez-2022.json
Last active April 11, 2022 00:31
Prez 2022
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A basic line chart example.",
"width": 1000,
"height": 700,
"padding": 5,
"data": [
{
"name": "table",
2017
# LICENCE OUVERTE / OPEN LICENCE
Vous pouvez réutiliser, dans les conditions prévues par la présente licence, les Informations placées sous cette licence et mises à disposition par l’Administration, dans le cadre défini par le code des relations entre le public et l’administration et, le cas échéant, le code du patrimoine (livre II relatif aux archives).
## Réutilisation des informations sous cette licence
@RouxRC
RouxRC / dl_all.sh
Created June 30, 2015 07:28
Backup anima-vet.fr
#!/bin/bash
rurl="anima-vet.fr/"
function bingrep {
cat "$2" | tr -d '\000' | grep "$1"
}
function handle_page {
url=$1
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, re, xmltodict
def convert_date(s):
if not s:
return s
d, m, y = s.split('/')
return '-'.join((y, m, d))
var clickPI = function(pi) {
var nums = $(".shadow"), next = pi.slice(0,1), cur = $(nums.length > 1 ? nums[nums.length-1] : ".startdigit").text();
$("#b" + (next > cur ? "1" : "2")).click();
setTimeout(function(){clickPI(pi.slice(1));})
}; clickPI("141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949129833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132000568127145263560827785771342757789609173637178721468440901224953430146549585371050792279689258923542019956112129021960864034418159813629774771309960518707211349999998
@RouxRC
RouxRC / places_deputes_hemicycle.csv
Last active August 29, 2015 14:05
Emplacement des sièges des députés en hémicycle
place_en_hemicycle x y
1 412 303
2 411 292
3 410 280
1 409 308
2 409 297
3 406 285
4 426 310
5 427 309
6 426 294
@RouxRC
RouxRC / test_twitter_stream.py
Created February 16, 2014 03:50
Tester for python-twitter streams
# -*- coding: utf-8 -*-
# USAGE:
# First create a keys.py file setting your api keys: KEY, SECRET, OAUTH_TOKEN, OAUTH_SECRET
# python test_twitter_stream.py [block|noblock|timeout] [low|high|high][+] [regular|user]
import sys
from twitter import OAuth, TwitterStream
from keys import KEY, SECRET, OAUTH_TOKEN, OAUTH_SECRET
stream = 'regular'
@RouxRC
RouxRC / get_twitter_oauth2_token.sh
Last active July 15, 2017 11:25
Get an application-type OAuth2 token from Twitter in bash
#!/bin/bash
# Run with:
#
# bash get_twitter_oauth2_token.sh $KEY $SECRET > oauth2_token
#
# Then enjoy Twitter's API app functions such as search/tweets or lists/members:
#
# curl -H "$(cat oauth2_token)" "https://api.twitter.com/1.1/search/tweets.json?q=assembleenat+OR+deputes&count=200"
# curl -H "$(cat oauth2_token)" "https://api.twitter.com/1.1/lists/members.json?slug=les-d%C3%A9put%C3%A9s&owner_screen_name=AssembleeNat&skip_status=1"