Change XXXXXXX by your student id :
ssh XXXXXXX@ssh.ufr-info-p6.jussieu.frChange Y by the id of the machine :
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from random import * | |
| def euclidian(v1, v2): | |
| return (sum((v1 - v2) ** 2)) ** .5 |
| from random import * | |
| from psonic import * | |
| #random major scale chord progression from the transitions allowed by: | |
| #http://www.dummies.com/art-center/music/major-and-minor-chord-progressions-for-music-composition/ | |
| def get_major_chord(base_note): | |
| """Take the base note and return a list of 3 notes in | |
| the root position of the major chord of the base note. |
| class State: | |
| state_id_counter = 0 | |
| def __init__(self, initial=False, final=False): | |
| #setting an unique id | |
| self.id = State.state_id_counter | |
| State.state_id_counter += 1 | |
| #setting params | |
| self.initial = initial | |
| self.final = final |
| import numpy as np | |
| NB_STATES = input("nb autocollants a collectionner : ") | |
| PROBA = input("probaabilite minimale 'to catch them all' : ") #0.95 par example | |
| #transition matrix | |
| states = np.zeros((NB_STATES, NB_STATES)) | |
| #setting tranition probability | |
| for i in range(NB_STATES): |
| import cv2 | |
| import numpy as np | |
| from skvideo.io import vreader | |
| VIDEO_PATH = "room.mp4" #my room where i'm moving and i want to remove myself to get only the background... | |
| cap = vreader(VIDEO_PATH) | |
| L = list(cap) | |
| L = map(lambda img: cv2.cvtColor(img, cv2.COLOR_BGR2GRAY), L) #to gray scale |
| """ | |
| Discrete Fourier Transform | |
| """ | |
| import math | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| N = 200 #sample size | |
| x = np.cos(range(N)) #create a periodic cyclic function | |
| r = np.random.random(N) #create some noise |
| import Tkinter as tk | |
| from comptage_sql import * | |
| def format_row(t): | |
| return "ID: {}, {}, {}-{}".format( | |
| t[0], "HOMME" if not t[1] else "FEMME", | |
| t[2], t[2] + 10) | |
| def onselect(evt): |
| import time | |
| import sqlite3 | |
| DB_NAME = 'comptage.db' | |
| def create_base(): | |
| conn = sqlite3.connect(DB_NAME) | |
| c = conn.cursor() | |
| c.execute("""CREATE TABLE IF NOT EXISTS compte ( |