Skip to content

Instantly share code, notes, and snippets.

View aneeshpanoli's full-sized avatar
💭
Image created with tensorflow and neural style transfer

Aneesh Panoli aneeshpanoli

💭
Image created with tensorflow and neural style transfer
View GitHub Profile
@aneeshpanoli
aneeshpanoli / Dockerfile
Created September 3, 2021 07:09
tfjupyter dockerfile
# pull the official image
FROM tensorflow/tensorflow:latest-gpu-jupyter
# make a dir inside the container to copy files
WORKDIR /tfjupyter
# install additional packages
COPY requirements.txt .
COPY entrypoint.sh .
RUN ["chmod", "+x", "entrypoint.sh"]
@aneeshpanoli
aneeshpanoli / docker-compose.yaml
Last active September 3, 2021 06:53
tf-jupyter
version: "3"
services:
tensorflow:
container_name: TfJupyter
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/tf
def set_conf():
conf = SparkConf().setAppName("App")
conf = (conf.setMaster('local[*]')
.set('spark.executor.memory', '4G')
.set('spark.driver.memory', '16G')
.set('spark.driver.maxResultSize', '8G'))
return conf
@aneeshpanoli
aneeshpanoli / download_sra.py
Last active January 24, 2020 19:38
Download sequence from NCBI SRA
import os
#download SRA tool kit
def setup_sra_tool(url):
!wget $url
!gunzip sratoolkit.2.9.6-1-ubuntu64.tar.gz
!tar -xf sratoolkit.2.9.6-1-ubuntu64.tar
#download SRA file and extract fastq
@aneeshpanoli
aneeshpanoli / setup_notebook.py
Last active January 23, 2020 18:11
Steps to setup colab notebook pyspark
from subprocess import STDOUT, check_call, check_output
def install_java_scala():
try:
java_ver = check_output(['java', '-version'], stderr=STDOUT)
except:
java_ver = b''
try:
scala_ver = check_output(['scala', '-version'], stderr=STDOUT)
except:
@aneeshpanoli
aneeshpanoli / understanding-word-vectors.ipynb
Created October 5, 2019 21:33 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def startup():
global matrix
matrix = load_large_matrix()
# then you would
from yourapp import matrix