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 timeit import timeit | |
from decimal import * | |
getcontext().prec = 200 | |
print ("A PI értékének számítása folyamatban...") | |
def calc (prec = 100): | |
pi = Decimal(0) | |
for k in range (prec): | |
pi = pi + Decimal( (1/(16**k))*( (4/(8*k+1))-(2/(8*k+4))-(1/(8*k+5))-(1/(8*k+6)) ) ) | |
print (pi) | |
print (timeit(calc, number = 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
from timeit import timeit | |
from decimal import * | |
getcontext().prec = 101 | |
print ("A PI értékének számítása folyamatban...") | |
def calc (prec = 80): | |
pi = Decimal(0) | |
for k in range (prec): | |
pi = pi + Decimal( (Decimal(1)/Decimal(16**k))*( (Decimal(4)/Decimal(8*k+1))-(Decimal(2)/Decimal(8*k+4))-(Decimal(1)/Decimal(8*k+5))-(Decimal(1)/Decimal(8*k+6)) ) ) | |
print (k) | |
print (pi) |
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 timeit import timeit | |
from decimal import * | |
getcontext().prec = 101 | |
print ("A PI értékének számítása folyamatban...") | |
def calc (prec = 80): | |
pi = Decimal(0) | |
for k in range (prec): | |
pi = pi + (Decimal(1)/Decimal(str(16**k)))*( (Decimal(4)/Decimal(str(8*k+1)))-(Decimal(2)/Decimal(str(8*k+4)))-(Decimal(1)/Decimal(str(8*k+5)))-(Decimal(1)/Decimal(str(8*k+6))) ) | |
print (k) | |
print (pi) |
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 kilepes(): | |
print ("A kilépés megkezdődik...") | |
def belepes(): | |
print ("Bejelentkezés...") | |
def fo_menu(navig): | |
for e in enumerate(navig): | |
print("{0}. {1}".format(str(e[0]), e[1].__name__)) | |
valasz = int(input("Add meg a menüpont számá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
u0_a200@grouper:/ $ python | |
Python 3.2.2 (default, Jun 23 2014, 00:13:13) | |
[GCC 4.8] on linux-armv7l | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import re | |
>>> re.match('^[a-z0-9]{8}$', '878h76t5') | |
<_sre.SRE_Match object at 0x405ec480> | |
>>> re.match('^[a-z0-9]{8}$', '8786h76t5') | |
>>> re.match('^[a-z0-9]{8}$', '8786h76X5') | |
>>> s='ide az input' |
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/env python3 | |
fagyosok = [] | |
for i in range(1, 8): | |
homerseklet = int(input('{0}. nap homerseklete: '.format(i))) | |
if homerseklet < 0: | |
fagyosok.append(i) | |
if len(fagyosok) > 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
[z2s8@HELLCAT pys]$ python3 program.py | |
Udv a DANET rendszer fomenujeben! | |
0. Regisztracio | |
1. Bejelentkezes | |
Adja meg a menüpont számát: 1 | |
Bejelentkezes | |
Hozzaferes tipusok: TANAR es TANULO | |
A fomenube visszatereshez: ENTER billentyu | |
Hozzaferes tipusa: [TANAR/TANULO] TANULO | |
Danetkod: tothmari |
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
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
sudo apt-get update | |
sudo apt-get install python3 git idle git-doc python3-pip bpython ssh-askpass ssh-client binutils-doc man-db debian-keyring curl wget sl sublime-text-installer |
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
dd if=/dev/sda | pv | dd of=/dev/sdc bs=512 conv=noerror,sync |
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
sudo rsync -rlptgoDAEXH --progress /honnan/ /hova/ |
OlderNewer