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 torch | |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') | |
print('Using device:', device) | |
print() | |
#Additional Info when using cuda | |
if device.type == 'cuda': | |
print(torch.cuda.get_device_name(0)) | |
print('Memory Usage:') | |
print('Allocated:', round(torch.cuda.memory_allocated(0)/1024**3,1), 'GB') |
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 torch | |
import numpy as np | |
def seed_everything(seed: int): | |
random.seed(seed) | |
os.environ['PYTHONHASHSEED'] = str(seed) | |
np.random.seed(seed) | |
torch.manual_seed(seed) | |
if torch.cuda.is_available(): |
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
x | sol | |
---|---|---|
-12.1748046875 | 0 | |
11.991466522216797 | 0 | |
-12.00814437866211 | 0 | |
11.986132621765137 | 0 | |
-12.007420539855957 | 0 | |
12.002096176147461 | 0 | |
12.192679405212402 | 0 | |
12.278199195861816 | 0 | |
-12.004239082336426 | 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
trcr_time_stamp | trcr_co2_conc_pct | predicted_label | |
---|---|---|---|
2019-03-13 09:51:20 | 0.4621884093538548 | 0.0 | |
2019-03-13 09:51:30 | 0.48048942958314345 | 0.0 | |
2019-03-13 09:51:40 | 0.5470032574779469 | 0.0 | |
2019-03-13 09:51:41 | 0.553655402428856 | 0.0 | |
2019-03-13 09:51:50 | 0.6097581052057149 | 0.0 | |
2019-03-13 09:52:00 | 0.5908580260933587 | 0.0 | |
2019-03-13 09:52:10 | 0.49999009190142507 | 0.0 | |
2019-03-13 09:52:20 | 0.48048942958314345 | 0.0 | |
2019-03-13 09:52:30 | 0.44938104870363965 | 9.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
time | amplitude | |
---|---|---|
0 | 0.000096 | |
0.001 | 0.000134 | |
0.002 | 0.000108 | |
0.003 | 0.000112 | |
0.004 | 0.000115 | |
0.005 | 0.00014 | |
0.006 | 0.000144 | |
0.007 | 0.000126 | |
0.008 | 0.000108 |
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
0 | ||
---|---|---|
0 | 68.86199951171875 | |
1 | 68.77896118164062 | |
2 | 68.7582015991211 | |
3 | 68.7533187866211 | |
4 | 68.7520980834961 | |
5 | 68.59825897216797 | |
6 | 68.55979919433594 | |
7 | 68.69412231445312 | |
8 | 68.72769927978516 |
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
Load well | |
query solution | |
http://zbumper:8011/gql/ | |
mutation load_well { | |
cmd_load_well_from_tao2db( | |
well: { | |
opru_fld_nme: "EXAMPLE" | |
prod_govt_lse_nbr: "A" | |
well_nbr: "A1" |
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
default_language_version: | |
python: python | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v2.2.0 | |
hooks: | |
- id: trailing-whitespace | |
types: [python] | |
- id: end-of-file-fixer | |
types: [python] |
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 django.db import connection, reset_queries | |
import time | |
import functools | |
def query_debugger(func): | |
@functools.wraps(func) | |
def inner_func(*args, **kwargs): | |
reset_queries() |
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
# Unfortunately I am still working with `blob` | |
==================================== | |
PyCharm | |
LINE on chrome | |
MS team on Linux | |
Slack or use web | |
WhatsApp or use web | |
zoom feature in Gnome3 https://unix.stackexchange.com/questions/33243/does-gnome-3-support-desktop-zoom |
NewerOlder