Skip to content

Instantly share code, notes, and snippets.

@vperron
vperron / analyze.py
Created November 21, 2019 07:37
Analyze Jeanne
View analyze.py
# importer les modules Python
import collections
import csv
import datetime
import sys
# une fonction qui permet de transformer une chaine de caractères en date
def to_date(s):
@vperron
vperron / quizz.py
Created September 5, 2019 15:23 — forked from lionel-panhaleux/quizz.py
Python test
View quizz.py
#!/usr/bin/env python
# Write a function that determines if any of its arguments evaluates to True.
def test_find_true():
"""
>>> find_true(True, {})
True
>>> find_true(None, (), 0)
False
"""
@vperron
vperron / sfr.sh
Created January 23, 2015 16:51
SFR WiFi
View sfr.sh
#!/bin/bash
LOGIN="LOGIN@sfr.fr"
PASSWORD="PASSWORD"
MAIN_URL="https://hotspot.wifi.sfr.fr/nb4_crypt.php"
USER_URL="http%3A%2F%2Fwww.fon.com%2Ffr%2Flanding%2Ffoneroneufbox%3Bfon%3B%3B"
JS_POPUP_URL="http://192.168.2.1:3990/logon?username=ssowifi.neuf.fr"
@vperron
vperron / architecture automotive
Created May 15, 2018 13:01
Gist from yEd-Live
View architecture automotive
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Created by yFiles for HTML 2.1.0.2-->
<graphml xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml.html/2.0/ygraphml.xsd " xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:demostyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/1.0" xmlns:bpmn="http://www.yworks.com/xml/yfiles-for-html/bpmn/2.0" xmlns:demotablestyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoTableStyle/1.0" xmlns:uml="http://www.yworks.com/yFilesHTML/demos/UMLDemoStyle/1.0" xmlns:compat="http://www.yworks.com/xml/yfiles-compat-arrows/1.0" xmlns:VuejsNodeStyle="http://www.yworks.com/demos/yfiles-vuejs-node-style/1.0" xmlns:y="http://www.yworks.com/xml/yfiles-common/3.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/3.0" xmlns:yjs="http://www.yworks.com/xml/yfiles-for-html/2.0/xaml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<key id="d0" for="node" attr.type="boolean" attr.name="Expanded" y:attr.uri="h
@vperron
vperron / bpmn
Created April 26, 2018 10:19
Gist from yEd-Live
View bpmn
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Created by yFiles for HTML 2.1.0.2-->
<graphml xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml.html/2.0/ygraphml.xsd " xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:demostyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/1.0" xmlns:bpmn="http://www.yworks.com/xml/yfiles-for-html/bpmn/2.0" xmlns:demotablestyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoTableStyle/1.0" xmlns:uml="http://www.yworks.com/yFilesHTML/demos/UMLDemoStyle/1.0" xmlns:compat="http://www.yworks.com/xml/yfiles-compat-arrows/1.0" xmlns:VuejsNodeStyle="http://www.yworks.com/demos/yfiles-vuejs-node-style/1.0" xmlns:y="http://www.yworks.com/xml/yfiles-common/3.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/3.0" xmlns:yjs="http://www.yworks.com/xml/yfiles-for-html/2.0/xaml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<key id="d0" for="node" attr.type="boolean" attr.name="Expanded" y:attr.uri="h
View send_emails.py
# -*- coding: utf-8 -*-
from __future__ import division
import logging
import os
import json
import pydash
from decimal import Decimal
from celery import task
View git-polypush.sh
#!/bin/bash
# Add this to your bashrc to get 'git branch'-like completion:
#
# _git_polypush()
# {
#  _git_branch
# }
set -xe # fail on first error
View keybase.md

Keybase proof

I hereby claim:

  • I am vperron on github.
  • I am mrnicehands (https://keybase.io/mrnicehands) on keybase.
  • I have a public key whose fingerprint is 1729 5CA4 D494 845D 00D2 724B 85D4 2918 15E6 89A5

To claim this, I am signing this object:

View convert_svc_static.py
import sys
# Keeps ordering
import ruamel.yaml
with open(sys.argv[1], 'r') as f:
data = ruamel.yaml.load(f.read(), ruamel.yaml.RoundTripLoader)
lst = []
for svc in data['services']:
@vperron
vperron / bower.json
Last active December 26, 2015 04:39 — forked from brcharron/leaflet-google.js
Leaflet Google plugin (with bower.json)
View bower.json
{
"name": "leaflet-google",
"version": "0.0.1",
"_release": "0.01",
"main": "./leaflet-google.js",
"_resolution": {
"type": "branch",
"branch": "master",
"commit": "a7c205f84f8dcc60c8c5ab4ac453930810d39b15"
},