Skip to content

Instantly share code, notes, and snippets.

View VieVie31's full-sized avatar
👨‍💻
@universite-de-paris

Olivier RISSER-MAROIX VieVie31

👨‍💻
@universite-de-paris
View GitHub Profile
@endolith
endolith / frequency_estimator.py
Last active July 15, 2024 21:25
Frequency estimation methods in Python
from __future__ import division
from numpy.fft import rfft
from numpy import argmax, mean, diff, log, nonzero
from scipy.signal import blackmanharris, correlate
from time import time
import sys
try:
import soundfile as sf
except ImportError:
from scikits.audiolab import flacread
@mikeivanov
mikeivanov / paillier.py
Created June 29, 2011 02:32
Pure Python Paillier Homomorphic Cryptosystem
import math
import primes
def invmod(a, p):
'''
http://code.activestate.com/recipes/576737-inverse-modulo-p/
The multiplicitive inverse of a in the integers modulo p.
Return b s.t.
a * b == 1 mod p
'''
@vedant
vedant / pytsa.py
Created October 3, 2011 20:34
Simple time series utility for pedagogical purposes
#!/usr/bin/env python
# -*- coding: ascii -*-
#-----------------------------------------------------------------------------
"""
Time Series Analysis
pytsa (read "pizza") depends on scipy and numpy.
Pytsa is a simple timeseries utility for python.
It is good for pedagogical purposes, such as to understand moving averages,
linear regression, interpolation, and single/double/triple exponential smoothing.
@amueller
amueller / filterbank.py
Created July 17, 2012 14:23
Filterbank responses for low level vision
##########################################################################
# Maximum Response filterbank from
# http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html
# based on several edge and bar filters.
# Adapted to Python by Andreas Mueller amueller@ais.uni-bonn.de
# Share and enjoy
#
import numpy as np
import matplotlib.pyplot as plt
@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@aldous-rey
aldous-rey / transposer.py
Last active June 3, 2023 07:38
Transpose MIDI files into C Major or A Minor
#converts all midi files in the current folder
import glob
import os
import music21
#converting everything into the key of C major or A minor
# major conversions
majors = dict([("A-", 4),("A", 3),("B-", 2),("B", 1),("C", 0),("D-", -1),("D", -2),("E-", -3),("E", -4),("F", -5),("G-", 6),("G", 5)])
@baraldilorenzo
baraldilorenzo / readme.md
Last active June 13, 2024 03:07
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@EncodeTS
EncodeTS / keras VGG-Face Model.md
Last active February 19, 2024 06:56
VGG-Face model for keras

VGG-Face model for Keras

This is the Keras model of VGG-Face.

It has been obtained through the following method:

  • vgg-face-keras:directly convert the vgg-face matconvnet model to keras model
  • vgg-face-keras-fc:first convert vgg-face caffe model to mxnet model,and then convert it to keras model

Details about the network architecture can be found in the following paper:

@JPvRiel
JPvRiel / remove-docker-containers-and-untaged-images.md
Last active May 30, 2024 15:48 — forked from ngpestelos/remove-docker-containers.md
How to remove unused docker containers and images (cleanup)

Delete all containers

$ docker ps -q -a | xargs docker rm
  • -q prints only the container IDs
  • -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

@angeris
angeris / domino_counter_example.txt
Last active July 13, 2018 13:32
Greedy Counterexample for Dominos
Initial positions
Player A:
[0-5] [1-3] [1-4] [2-2] [3-4] [4-4] [5-6]
Player B:
[0-0] [0-1] [0-6] [1-1] [1-6] [2-3] [2-6]
Player C:
[0-2] [2-4] [2-5] [3-3] [3-6] [4-5] [4-6]
Player D:
[0-3] [0-4] [1-2] [1-5] [3-5] [5-5] [6-6]