Skip to content

Instantly share code, notes, and snippets.

"""
Script to dowload video from the ARTE recording of the Paris's Philarmonie.
Example:
python3 download.py "https://www.arte.tv/fr/videos/087078-007-A/kazuki-yamada-dirige-berlioz-et-jarrell/"
python3 download.py "https://www.arte.tv/fr/videos/087078-007-A/kazuki-yamada-dirige-berlioz-et-jarrell/" my_output_name.mp4
"""
import os
import sys
import json
@Ricocotam
Ricocotam / amc_csv.py
Created July 20, 2018 11:24
AMC to CSV parser for CMU dataset
import pandas as pd
from itertools import chain
from collections import namedtuple
# Comes from : https://github.com/eric-heiden/mocap-roboschool-demo/blob/master/mocap_demo.py line 19-35
def get_frames(filename):
# filename : amc file
frames = [] # list of dicts {property: value(s)}
current_frame = {}
@wowkin2
wowkin2 / SingletonMongoClient.py
Created May 14, 2016 17:20
Python Singleton with parameters (so the same parameters get you the same object) with support to default arguments and passing arguments as kwargs (but no support for pure kwargs).
"""
Python Singleton with parameters (so the same parameters get you the same object)
with support to default arguments and passing arguments as kwargs (but no support for pure kwargs).
And implementation for MongoClient class from pymongo package.
"""
from pymongo import MongoClient
import inspect
@nealrs
nealrs / contractions.py
Created May 31, 2015 01:33
Expand common (and some very uncommon) english contractions
"""
this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python
all credits go to alko and arturomp @ stack overflow.
basically, it's a big find/replace.
"""
import re
cList = {
"ain't": "am not",