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 wandb | |
| from tqdm import tqdm | |
| WANDB_PROJECT = "project" | |
| TEST_CHANGES = True # Run once before changing | |
| api = wandb.Api() | |
| runs = [run for run in api.runs(WANDB_PROJECT)] | |
| print(f"{len(runs)} runs found") |
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
| from pytorch_lightning import LightningDataModule | |
| from torch_geometric.datasets import TUDataset | |
| from torch_geometric.data import DataLoader | |
| from sklearn.model_selection import KFold | |
| class ProteinsKFoldDataModule(LightningDataModule): | |
| def __init__( | |
| self, | |
| data_dir: str = "data/", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # MIT License | |
| # | |
| # Copyright (c) 2018 Stefano Nardo https://gist.github.com/stefanonardo | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
- Change your database RDS instance security group to allow your machine to access it.
- Add your ip to the security group to acces the instance via Postgres.
- Make a copy of the database using pg_dump
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>- you will be asked for postgressql password.
- a dump file(.sql) will be created
- Restore that dump file to your local database.
- but you might need to drop the database and create it first
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
- the database is restored
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 os, filecmp | |
| codes = {200:'success',404:'file not found',400:'error',408:'timeout'} | |
| def compile(file,lang): | |
| if lang == 'java': | |
| class_file = file[:-4]+"class" | |
| elif lang == 'c': | |
| class_file = file[:-2] | |
| elif lang=='cpp': |