Skip to content

Instantly share code, notes, and snippets.

@vperron
vperron / analyze.py
Created November 21, 2019 07:37
Analyze Jeanne
# 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
#!/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 / architecture automotive
Created May 15, 2018 13:01
Gist from yEd-Live
<?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
<?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
# -*- coding: utf-8 -*-
from __future__ import division
import logging
import os
import json
import pydash
from decimal import Decimal
from celery import task
#!/bin/bash
# Add this to your bashrc to get 'git branch'-like completion:
#
# _git_polypush()
# {
#  _git_branch
# }
set -xe # fail on first error

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:

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']:

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@vperron
vperron / gist:9db66663de0767ca046b
Created March 9, 2015 14:22
roles/uwsgi/templates/upstart.uwsgi.conf.j2
# simple uWSGI upstart job
description "uWsgi server for {{ application.name }}"
start on runlevel [2345]
stop on runlevel [06]
{% include "templates/env_vars.j2" %}