Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / README.md
Created September 4, 2019 13:14 — forked from Remiii/README.md
How to delete Vault (AWS Glacier)

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
@cicorias
cicorias / suppressit.py
Created August 12, 2019 15:43
supressing FutureWarning in Python Jupyter and Tensorflow / Keras
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=FutureWarning)
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.preprocessing.text import Tokenizer
print('ready')
@cicorias
cicorias / java-alias.sh
Created August 3, 2019 14:52
switch java versions
alias j9="export JAVA_HOME=`/usr/libexec/java_home -v 9`; java -version"
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version"
alias j7="export JAVA_HOME=`/usr/libexec/java_home -v 1.7`; java -version"
@cicorias
cicorias / vscodeext.md
Created July 28, 2019 16:13
List and install s code extensions

Manual - By script

In machine A,

UNIX:

code --list-extensions | xargs -L 1 echo code --install-extension Windows (PowerShell, e. g. using VSCode's integrated Terminal): code --list-extensions | % { "code --install-extension $_" } copy and paste the echo output to machine B

@cicorias
cicorias / fix.sh
Created July 16, 2019 14:48
doccano and Error: pg_config executable not found.
/Applications/Postgres.app/Contents/Versions/latest/bin
@cicorias
cicorias / run-tf-container.sh
Created July 5, 2019 23:45
run the TF container from Google
docker run -d -p 8080:8080 -v $(pwd):/home gcr.io/deeplearning-platform-release/tf-cpu.1-13
@cicorias
cicorias / all-colors.sh
Created June 19, 2019 01:06
show all terminal colors bash
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#

#I had to do something a bit different in order to get my pyenv #virtualenv to work.

#Run @psomhorst suggested config opt on the ^base^ python (in my case 3.6.6)

$ env PYTHON_CONFIGURE_OPTS="--enable-framework CC=clang" pyenv install 3.6.6

#Uninstall my virtualenv (if you already have one that you want to reuse)

$ pyenv uninstall py3

@cicorias
cicorias / BinaryTree.js
Created May 1, 2019 05:49 — forked from benlesh/BinaryTree.js
A simple Binary Tree implementation in JavaScript
/**
* Binary Tree
* (c) 2014 Ben Lesh <[email protected]>
* MIT license
*/
/*
* A simple Binary Tree implementation in JavaScript
*/
@cicorias
cicorias / happy_git_on_osx.md
Created April 28, 2019 20:58 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "[email protected]"