- trade_updates: order updates
- account_updates: account updates
- T.: stock trades
- Q.: stock quotes
- A.: stock aggSec, the stock's aggregated per-second pricing
- AM.: stock aggMin, the stock's aggregated per-minute pricing
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
# coding | |
sudo snap install code --classic; | |
sudo snap install nvim --classic; | |
sudo snap install insomnia; | |
sudo snap install node --classic; | |
sudo snap install node-red; | |
sudo snap install dbeaver; | |
sudo snap install htop; | |
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
#calc win/loss | |
if contestant_choice == prize_door: | |
trial.append(1) | |
else: | |
trial.append(0) | |
results_list.append(trial) |
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
#calc win/loss | |
if contestant_choice == prize_door: | |
trial.append(1) | |
else: | |
trial.append(0) | |
results_list.append(trial) |
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
#contestant_choice switches to the 'other' door | |
doors.remove(contestant_choice) | |
contestant_choice = doors[0] | |
#output results_list | |
trial.append(contestant_choice) |
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
#announcer removes a door randomly, can't be contestant_choice or prize_door | |
to_remove = contestant_choice | |
while(to_remove == contestant_choice or to_remove == prize_door): | |
to_remove = random.choice(doors) | |
doors.remove(to_remove) |
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
for guess in range(iterations): | |
#setup the guess | |
doors = ['a','b','c'] | |
contestant_choice = random.choice(doors) | |
prize_door = random.choice(doors) | |
trial = [contestant_choice] |
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
import random | |
import json | |
results_list = [] | |
iterations = 5000 |
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
search_failure = [] | |
for drug in top200_names: | |
res = requests.get(f"https://cactus.nci.nih.gov/chemical/structure/{drug}/stdinchi") | |
if res.status_code == 404: | |
search_failure.append(drug) | |
else: | |
inchi_to_mol_file(res.text, drug) |
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
for key in inchi_dict: | |
inchi_to_mol_file(inchi_dict[key],key) |
NewerOlder