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 random | |
import sys | |
__author__ = 'zamr666' | |
def isInteger(*inp): | |
lst=[] | |
for val in inp: | |
try: | |
a=int(val) | |
lst.append(True) | |
except ValueError as e: |
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__ = 'zamr666' | |
total = 0 | |
asum = 0 | |
while(True): | |
line=input("Enter whole number or enter to finish: \n") | |
if line: | |
try: | |
asum+=int(line) |
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 random as r | |
__author__ = 'zamr666' | |
verbs=["farts ","jumps ","runs ","dreams ","sleeps ","dances ","creeps everybody out ","jerks off ","feels somebody's tits ","groans "] | |
pronouns=["fat ","ugly ","easy ","infected ","delighted ","astounded ","dissappointed ","morally mature ","half-dead ","deceased "] | |
adverbs=["violently ","passionately ","cruelly ","with no compassion ","sadly ","like there's no tommorow ","furiously ","with no regrets ","just like that ","pretty normally "] | |
nouns=["snape ","father ","cow ","cat ","your mum ","rat ", "president ", "programmer ","hacker ","spiderman ","undertaker "] | |
def get_int(prompt): | |
while(True): | |
try: | |
ret=int(input(prompt)) |
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 sys | |
def main(args): | |
lines=[] | |
while True : | |
try : | |
line = input("Enter comma separated values: ") | |
if not line : | |
break | |
lines.append(line) |
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 subprocess | |
arg="ifconfig" | |
shell=subprocess.Popen(arg,shell=True,stdout=subprocess.PIPE) | |
data = shell._communicate() |
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__ = 'zamr666' | |
import sys | |
import collections | |
def printLines(lines): | |
print("\nTime:\tGoing in:\tNumber:\t Direction:") | |
for _ in lines: | |
print(_.time,"\t",_.intime.center(7," "),"\t",_.number,"\t",_.direction) | |
#if ((len(sys.argv)== 1) | (sys.argv in ["-h","--help"])): | |
# print("No input given.") | |
# exit() |
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__ = 'zamr666' | |
import sys | |
import collections | |
def printLines(lines): | |
print("\nTime:\tGoing in:\tNumber:\t Direction:") | |
for _ in lines: | |
print(_.time,"\t",_.intime.center(7," "),"\t",_.number,"\t",_.direction) | |
if ((len(sys.argv)== 1) | (sys.argv in ["-h","--help"])): | |
print("No input given.") | |
exit() |
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__ = 'zamr666' | |
import sys | |
import collections | |
def printLines(lines): | |
print("\nTime:\tGoing in:\tNumber:\t Direction:") | |
for _ in lines: | |
print(_.time,"\t",_.intime.center(7," "),"\t",_.number,"\t",_.direction) | |
if ((len(sys.argv)== 1) | (sys.argv in ["-h","--help"])): | |
print("No input given.") | |
exit() |
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__ = 'zamr666' | |
import sys | |
import collections | |
def printLines(lines): | |
print("\nTime:\tGoing in:\tNumber:\t Direction:") | |
for _ in lines: | |
print(_.time,"\t",_.intime.center(7," "),"\t",_.number,"\t",_.direction) | |
if ((len(sys.argv)== 1) | (sys.argv in ["-h","--help"])): | |
print("No input given.") | |
exit() |
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 bs4 import BeautifulSoup | |
from collections import namedtuple as nt | |
import re | |
import requests | |
vych = "Damborskeho" | |
cielova = "Trhovisko" | |
r = requests.get("http://imhd.zoznam.sk/ba/planovac-cesty-vyhladanie-spojenia.html?spojenieodkial="+vych+"&spojeniekam="+cielova) | |
data = r.text |
OlderNewer