Skip to content

Instantly share code, notes, and snippets.

# base image
FROM node:12.1.0
#
# All your other docker statements
#
# Add wait-for-it
COPY wait-for-it.sh wait-for-it.sh
RUN chmod +x wait-for-it.sh
version: '3'
services:
postgres:
build:
context: .
dockerfile: postgres/Dockerfile
image: postgres:tag
env_file: .env
ports:
- '5432:5432'
@kisna72
kisna72 / aws_file_upload.py
Last active July 26, 2016 15:47
Code to upload files to AWS
import boto3
import botocore
import os,sys
ACCESS_KEY = os.environ["AWS_ACCESS_KEY_ID"]
SECRET_KEY = os.environ["AWS_SECRET_ACCESS_KEY"]
bucket_name = "foo"
s3 = boto3.resource('s3')
bucket = s3.Bucket(bucket_name)
@kisna72
kisna72 / useful_pandas_snippets.py
Last active April 28, 2017 14:19 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]
# Can't find the source
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
@kisna72
kisna72 / note.md
Last active August 29, 2015 14:27 — forked from fyears/note.md
how to install scipy numpy matplotlib ipython in virtualenv

if you are using linux, unix, os x:

pip install -U setuptools
pip install -U pip

pip install numpy
pip install scipy
pip install matplotlib
#pip install PySide