This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from __future__ import division | |
| """ | |
| Created on Fri Nov 14 17:49:33 2014 | |
| @author: isra | |
| """ | |
| import numpy as np | |
| from matplotlib import pyplot as plt |
This file contains hidden or 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
| #Numbers from digits: | |
| #How to convert a list of digits into a number | |
| x = [2, 3, 4, 5, 9, 0] | |
| #First way: ping-pong between string and integer | |
| print int(''.join([str(d) for d in x])) | |
| #Second way: plain arithmetic |
This file contains hidden or 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
| #Aritmetic way to extract digits from a number | |
| #It should work in most programming languages | |
| x = 78449 | |
| digit = [] | |
| for k in range(4, -1, -1): | |
| digit.append( x / 10**k ) | |
| x = x % 10**k | |
This file contains hidden or 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 program converts a list of integers into a list of digits | |
| l = range(400, 450) | |
| numeros_separados = [] | |
| for v in l: | |
| digitos = [] | |
| y = v | |
| for k in range(4, -1, -1): |
This file contains hidden or 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 | |
| TRAINING_SET = 'data/training.csv' | |
| TEST_SET = 'data/test.csv' | |
| training = pd.read_csv(TRAINING_SET) | |
| #background and signal total weights | |
| total_weights = traininig.groupby(training.Label).sum() |
This file contains hidden or 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
| #include "linklabel.h" | |
| #include <QtWidgets> | |
| LinkLabel::LinkLabel(QWidget * parent) | |
| :QLabel(parent) | |
| { | |
| connect( this, SIGNAL( clicked() ), this, SLOT( slotClicked() ) ); | |
| } | |
| void LinkLabel::slotClicked() |
This file contains hidden or 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 re | |
| ''' | |
| gauss_parser.py | |
| parses instructions in gaussian elimination of the form | |
| F2 -> F2 + 3 * F1 | |
| see "parser" for a more detailed explanation. |
This file contains hidden or 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
| { | |
| "metadata": { | |
| "name": "" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # | |
| # | |
| #info2meta | |
| # | |
| #Reads metadata information as downloaded by cd-info and writes it to flac files. | |
| #I use this script together with https://gist.github.com/ixxra/9044268 to rip my | |
| #cds into flac format. | |
| # |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| #rip.sh | |
| # | |
| #Rip a cd into flac files. | |
| # | |
| #It uses cd-info and gstreamer 1.0 | |
| # | |