I hereby claim:
- I am claymcleod on github.
- I am clmcleod (https://keybase.io/clmcleod) on keybase.
- I have a public key ASAq3m8EC04REjVlhiiWoN_TyW6Exl2ZpR3387VQewzG4go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
useage() { | |
printf "\n\e[1;4mAscii Escape Code Helper Utility\e[m\n\n" | |
printf " \e[1mUseage:\e[m colors.sh [-|-b|-f|-bq|-fq|-?|?] [start] [end] [step]\n\n" | |
printf "The values for the first parameter may be one of the following:\n\n" | |
printf " \e[1m-\e[m Will result in the default output.\n" | |
printf " \e[1m-b\e[m This will display the 8 color version of this chart.\n" | |
printf " \e[1m-f\e[m This will display the 256 color version of this chart using foreground colors.\n" | |
printf " \e[1m-q\e[m This will display the 256 color version of this chart without the extra text.\n" |
import subprocess | |
def cmd(line): | |
complete_cmd = subprocess.run( | |
line, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
return {'stdout': complete_cmd.stdout, 'stderr': complete_cmd.stderr} | |
print(cmd("echo 'hello, world'")) |
# Setup | |
import os | |
import sys | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Dropout, Activation, Flatten | |
from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.layers.advanced_activations import Quorum | |
from keras.datasets import mnist |
# Setup | |
import os | |
import sys | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Dropout, Activation, Flatten | |
from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.layers.advanced_activations import Quorum | |
from keras.datasets import cifar100 |
import sys | |
import numpy as np | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Dropout, Activation, Flatten | |
from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
from keras.layers.advanced_activations import Quorum | |
from keras.datasets import mnist | |
from keras.utils import np_utils | |
from keras.activations import relu |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright © 2016 Clay L. McLeod <[email protected]> | |
# | |
# Distributed under terms of the MIT license. | |
from __future__ import print_function | |
import theano |
import sys,os | |
import curses | |
def draw_menu(stdscr): | |
k = 0 | |
cursor_x = 0 | |
cursor_y = 0 | |
# Clear and refresh the screen for a blank canvas | |
stdscr.clear() |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# This file presents an interface for interacting with the Playstation 4 Controller | |
# in Python. Simply plug your PS4 controller into your computer using USB and run this | |
# script! | |
# | |
# NOTE: I assume in this script that the only joystick plugged in is the PS4 controller. | |
# if this is not the case, you will need to change the class accordingly. | |
# |
import numpy as np | |
import pandas as pd | |
from sklearn.preprocessing import StandardScaler, LabelEncoder | |
df = pd.read_csv('data.csv') | |
df = df.fillna(0) | |
for (_col, _dtype) in zip(df.columns, df.dtypes): | |
_dtype_as_str = str(_dtype) | |
if 'int' in _dtype_as_str or 'float' in _dtype_as_str: |