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/python | |
try: | |
from setuptools import setup | |
except ImportError: | |
from distutils.core import setup | |
config = { | |
'description': 'My Priject', | |
'author': 'Roman Fedoruk', |
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/python3 | |
import sys | |
sys.setrecursionlimit(100000) #Python seems to be a sissy language by default. | |
def ack(m, n): | |
if m == 0: | |
ans = n + 1 | |
elif n == 0: | |
ans = ack(m - 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
#!/usr/bin/python3 | |
a_name = "Akhilleos" | |
b_name = "Turtle" | |
a_velocity = 2 | |
b_velocity = 1 | |
a_position = 0 | |
b_position = 10 |
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 <iostream> | |
#include <cmath> | |
int main() | |
{ | |
using namespace std; | |
long long a[20] = {*a}; | |
int i = 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
body { | |
background-image: none; | |
background-color: #f9f9f9; | |
color: #2d2d2d; | |
font-family: Cantarell, Calibri, Arial, serif; | |
max-width: 800px; | |
margin-left: auto; | |
margin-right: auto; | |
} |
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 is a list of bash commands I've found useful, but hard to remember. | |
# Get the temperature of the graphics card. | |
# Note: Only works for ATI/AMD cards. | |
sensors | grep radeon -A 2 | grep temp | sed 's:[^+]*\(\S*\).*$:\1:' | |
# Show the progress of a dd process. | |
dd --status=progress | |
# or | |
watch -n 10 kill -USR1 $(pgrep -l '^dd$' | sed 's: dd::') |
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
local debug = false | |
local new_temperature = 0 | |
sim.ambientAirTemp(20) | |
-- Test Window | |
local testWindow = Window:new(-1, -1, 150, 55) | |
local currentY = 10 | |
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/python | |
import random | |
import time | |
import sys | |
def getNewQuestion(x, y): | |
print("{:^4} + {:^4} = ".format(x, y), end="") | |
try: | |
result = input() |
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/python | |
import random | |
import re | |
words = { | |
"pyytää, rukoilla": ["be", "ber", "bad", "bett"], | |
"sitoa": ["binda", "binder", "band", "bundit"], | |
"purra": ["bita", "biter", "bet", "bitit"], | |
"tarjota": ["bjuda", "bjuder", "bjöd", "bjudit"], |
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 python | |
import sys | |
import math | |
def simple(n): | |
a = 0 | |
for i in range(0, n): | |
a = a + (-1)**i * 1/(2*i+1) |