Skip to content

Instantly share code, notes, and snippets.

@Zoldin
Zoldin / highest_paid_actors_birthyear
Created January 9, 2020 12:51
highest_paid_actors_birthyear output
highest_paid_actors_birthyear
[1968, 1969, 1981, 1966, 1975, 1954, 1967, 1965, 1983, 1972 ]
@Zoldin
Zoldin / print_screen_list
Created January 9, 2020 12:45
NewYearResolution
NewYearResolution
['stop smoking', 'lose weight', 'join gym', 'find a new job', 'reduce stress',’get more sleep’]
@Zoldin
Zoldin / birthyear.py
Created January 9, 2020 06:34
python birthyear
[birthyear for birthyear in highest_paid_actors_birthyear if birthyear>1970]
@Zoldin
Zoldin / create_list.py
Last active January 9, 2020 06:30
py create list
NewYearResolution = ["stop smoking", "lose weight", "join gym", "find a new job","enjoy life"]
import random
client_name= ["Mobili Ltd.","Tymy Ltd.", "Lukas Ltd.","Brod Ltd.", "Missyda Ltd.", "Abiti Ltd.", "Bomy Ltd." , "Citiwi Ltd.", "Dolphy Ltd.", "Doper Ltd."]
random.shuffle(client_name)
client_name
import random
import pandas as pd
clients = pd.DataFrame()
clients['client_id'] = [0,1,2,3,4,5,6,7,8,9]
clients['client_name'] = ["Mobili Ltd.","Tymy Ltd.", "Lukas Ltd.","Brod Ltd.",
"Missyda Ltd.", "Abiti Ltd.", "Bomy Ltd." , "Citiwi Ltd.", "Dolphy Ltd.", "Doper Ltd."]
random.choices(clients['client_name'],k=2)
import random
import pandas as pd
clients = pd.DataFrame()
clients['client_id'] = [0,1,2,3,4,5,6,7,8,9]
clients['client_name'] = ["Mobili Ltd.","Tymy Ltd.", "Lukas Ltd.","Brod Ltd.",
"Missyda Ltd.", "Abiti Ltd.", "Bomy Ltd." , "Citiwi Ltd.", "Dolphy Ltd.", "Doper Ltd."]
random.choice(clients['client_name'])
import random
import pandas as pd
clients = pd.DataFrame()
clients['client_id'] = [0,1,2,3,4,5,6,7,8,9]
clients['client_name'] = ["Mobili Ltd.","Tymy Ltd.", "Lukas Ltd.","Brod Ltd.",
"Missyda Ltd.", "Abiti Ltd.", "Bomy Ltd." , "Citiwi Ltd.", "Dolphy Ltd.", "Doper Ltd."]
clients.loc[clients['client_id'] == random.choice(clients['client_id'])]
import random
radom.uniform(0,10)
import random
random.random() * 10