This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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", |