Skip to content

Instantly share code, notes, and snippets.

View salman0's full-sized avatar
🎯
Focusing

Salman Javed salman0

🎯
Focusing
  • Data Engineer | AWS
  • Lahore, Pakistan
View GitHub Profile
@salman0
salman0 / pdfminer_lambda_layer.sh
Created October 11, 2019 17:22 — forked from haranjackson/pdfminer_lambda_layer.sh
Deploys Python PDFMiner library to an AWS Lambda layer (removing unnecessary test files to reduce size). You can specify the region, library version, and runtime.
REGION=eu-west-1
VER=20181108
RUNTIME=python3.7
docker run -v $(pwd):/out -it lambci/lambda:build-$RUNTIME \
pip install pdfminer.six==$VER -t /out/build/pdfminer/python
pushd build/pdfminer
rm -rf python/Crypto/SelfTest/
zip -r ../../pdfminer.zip python/
@salman0
salman0 / loadModel.py
Created September 9, 2019 20:50 — forked from vgpena/loadModel.py
Basic text classification with Keras and TensorFlow
import json
import numpy as np
import keras
import keras.preprocessing.text as kpt
from keras.preprocessing.text import Tokenizer
from keras.models import model_from_json
# we're still going to use a Tokenizer here, but we don't need to fit it
tokenizer = Tokenizer(num_words=3000)
# for human-friendly printing