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 some packages from matplotlib | |
import matplotlib.image as mpimg | |
import matplotlib.pyplot as plt | |
# Import the "numpy" package for working with arrays | |
import numpy as np | |
# Uncomment the next line for use in a Jupyter notebook | |
#%matplotlib inline | |
# Define the filename, read and plot the image | |
filename = 'sample.jpg' |
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 some packages from matplotlib | |
import matplotlib.image as mpimg | |
import matplotlib.pyplot as plt | |
# Uncomment the next line for use in a Jupyter notebook | |
#%matplotlib inline | |
# Define the filename, read and plot the image | |
filename = 'sample.jpg' | |
image = mpimg.imread(filename) | |
plt.imshow(image) |
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
#/bin/bash | |
################################################################## | |
# SIMPLE DIRECTORY WATCHER | |
# | |
# Usage: | |
# bash test.sh | |
# | |
# Role: | |
# Simple Directory Watcher allows you to monitor |
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
from revscoring.features import wikitext | |
from revscoring.languages import english | |
char_based = [ | |
wikitext.revision.chars, | |
wikitext.revision.whitespace_chars, | |
wikitext.revision.markup_chars, | |
wikitext.revision.cjk_chars, | |
wikitext.revision.entity_chars, | |
wikitext.revision.url_chars, |
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
#!/bin/bash | |
URL=$1 | |
echo $URL | |
wget --output-document="index.html" $URL | |
for code in `cat index.html | grep '/watch?v' | cut -d '=' -f 4 | grep -v 'title' | cut -d '"' -f 1` |
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
#!/usr/bin/python | |
# Compte et affiche le nombre de lignes et de caractères dans une fichier. | |
# Usage : ./counter.py fichier | |
# author yann feunteun | |
# mail yannfeunteun at gmail dot com | |
from sys import argv |
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
__author__ = 'yafeunteun' | |
import pyevolve | |
from pyevolve import G1DList, GSimpleGA, Selectors | |
# This function is the evaluation function, we want | |
# to give high score to more one'ed chromosomes | |
def eval_func(chromosome): | |
score = 0.0 |
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
""" | |
An RNA string is a string formed from the alphabet containing 'A', 'C', 'G', and 'U'. | |
Given a DNA string t corresponding to a coding strand, its transcribed RNA string u is formed by replacing all occurrences of 'T' in t with 'U' in u. | |
Given: A DNA string t having length at most 1000 nt. | |
Return: The transcribed RNA string of t. | |
""" |
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
""" | |
A string is simply an ordered collection of symbols selected from some alphabet and formed into a word; the length of a string is the number of symbols that it contains. | |
An example of a length 21 DNA string (whose alphabet contains the symbols 'A', 'C', 'G', and 'T') is "ATGCTTCAGAAAGGTCTTACG." | |
Given: A DNA string s of length at most 1000 nt. | |
Return: Four integers (separated by spaces) counting the respective number of times that the symbols 'A', 'C', 'G', and 'T' occur in s. | |
""" |
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
#include <stdio.h> | |
#include <stdlib.h> | |
unsigned int syracuse(unsigned int n) | |
{ | |
if(n%2 == 0) | |
return n/2; | |
else | |
return 3*n + 1; |