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
#! /usr/bin/env python3 | |
""" | |
utilty to reliably SCP using Python | |
""" | |
import os | |
import subprocess | |
import argparse | |
import glob | |
import logging |
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
#! /usr/bin/env python3 | |
""" | |
Script to compare outputs of find-cpu-hogs.sh | |
Alex Shires | |
14-05-2020 | |
""" | |
import logging | |
import os | |
import sys |
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
#! /usr/bin/env python3 | |
""" | |
Script to parse the CPU hog | |
* Alex Shires - 28-4-2020 | |
""" | |
import logging | |
import os | |
import sys | |
import pandas as pd |
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
# --------------------- | |
# Configuration | |
# --------------------- | |
# use UTF8 unicode | |
set -g utf8 | |
set-window-option -g utf8 on | |
set -g status-utf8 on |
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 Series Testing | |
import keras.callbacks | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Activation, Dense, Dropout | |
from keras.layers.recurrent import LSTM | |
# Call back to capture losses | |
class LossHistory(keras.callbacks.Callback): | |
def on_train_begin(self, logs={}): | |
self.losses = [] |
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
python Downloads/tensorflow_error_tutorial.py | |
WARNING:tensorflow:Change warning: default value of `enable_centered_bias` will change after 2016-10-09. It will be disabled by default.Instructions for keeping existing behaviour: | |
Explicitly set `enable_centered_bias` to 'True' if you want to keep existing behaviour. | |
INFO:tensorflow:Using config: {'task': 0, 'save_summary_steps': 100, 'keep_checkpoint_max': 5, '_is_chief': True, 'save_checkpoints_secs': 1, 'evaluation_master': '', 'tf_config': gpu_options { | |
per_process_gpu_memory_fraction: 1 | |
} | |
, 'master': '', 'keep_checkpoint_every_n_hours': 10000, '_job_name': None, 'cluster_spec': None, 'tf_random_seed': None, 'num_ps_replicas': 0} | |
INFO:tensorflow:Setting feature info to TensorSignature(dtype=tf.float32, shape=TensorShape([Dimension(None), Dimension(4)]), is_sparse=False) | |
INFO:tensorflow:Setting targets info to TensorSignature(dtype=tf.int64, shape=TensorShape([Dimension(None)]), is_sparse=False) | |
INFO:tensorflow:Transforming feature_column _RealValuedColumn(c |
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
# coding: utf-8 | |
# In[7]: | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import tensorflow as tf |
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 os | |
import luigi | |
class FileExists(luigi.ExternalTask): | |
filename = luigi.Parameter(default=None) | |
def output(self): | |
print "FE: output", self.filename | |
return luigi.LocalTarget(self.filename) | |
def create_new_filename(filename, ext): |
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
""" TEST Luigi processes """ | |
import os | |
def python_function(filename1): | |
# from filename1 create filename2 | |
if "." not in filename1: | |
print "can't split" | |
return None |
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
class testClass: | |
def foo(self, x): | |
print "foo", x | |
def bar(self, y): | |
print "bar", y | |
NewerOlder