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
# How women respond to questions | |
print \ | |
"1. How it should look like:" | |
def ask_a_question(question): | |
taste = { | |
"apples":True, | |
"oranges":False | |
} | |
if "like" in question: |
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 wave | |
import sys | |
if len(sys.argv) > 2: | |
path = sys.argv[1] | |
else: | |
path = "/home/whoeverest/code/klima-reverse/16c.wav" | |
wav = wave.open(path) | |
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
Листа на skill-ови / Андреј Т. | |
------------------------------ | |
Програмски јазици: | |
- Python 4/5 | |
- PHP 3/5 | |
- HTML/CSS 3/5 | |
- JavaScript 2/5 | |
- C/C++ 1/5 | |
- Java 1/5 |
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
def add(a, b): | |
return a + b + 100 |
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
def add(a, b): | |
return a + b | |
def subtract(a, b): | |
return a - b |
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 synchronize | |
import matz | |
print matz.add(2,3) | |
print matz.add(3,3) |
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 os | |
from collections import defaultdict | |
class DB(object): | |
def __init__(self, location, columns): | |
self.location = location # path to the location | |
self.columns = columns # names of the table columns | |
self.data = [] |
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
function DisplayImageCtrl($scope, $routeParams, API) { | |
var projectImages = null; | |
API.get({projectId: $routeParams.projectId}, function(data) { | |
projectImages = data['images']; | |
}) | |
for (var i=0; i < projectImages.length; ++i) { | |
if (projectImages[i]['image_id'] == imageId) { |
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 os | |
def songs_from_playlist(path): | |
return open(playlist).readlines() | |
songs_folder = "/home/whoeverest" | |
playlist = "/home/whoeverest/lista.m3u" | |
songs = songs_from_playlist(playlist) |
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 collections import deque | |
from random import shuffle, randint | |
from time import time | |
def t(msg=None, times=[]): | |
""" Timing function.""" | |
t = time() | |
if times and msg: | |
print msg, t - times[0] |
OlderNewer