Skip to content

Instantly share code, notes, and snippets.

View dermatologist's full-sized avatar
🔥
Playing with FHIR

Bell Eapen dermatologist

🔥
Playing with FHIR
View GitHub Profile
@dermatologist
dermatologist / extractAnnotations.py
Created August 2, 2020 11:38 — forked from stevepowell99/extractAnnotations.py
Extracts annotations and highlighted passages in all .pdf files in a folder recursively and outputs them as text files with the same name and modification date
#!/usr/bin/env python
# see http://socialdatablog.com/extract-pdf-annotations.html
myxkfolder="/home/steve/xk/" #you need to set this to where you want your to-dos to appear
import poppler, os.path, os, time, datetime
for root, dirs, files in os.walk('./'):
for lpath in files:
@dermatologist
dermatologist / ssh-config-windows
Created September 15, 2020 01:39 — forked from lvnilesh/ssh-config-windows
ssh proxycommand windows 10 with ssh on powershell
Host NAT
HostName 52.15.213.177
ForwardAgent yes
StrictHostKeyChecking ask
IdentityFile "C:\Users\Zach Tankersley\.ssh\id_rsa.pem"
User ec2-user
Host 10.0.1.12
ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -q -W %h:%p NAT
ForwardAgent yes
@dermatologist
dermatologist / export_tfserving.py
Created November 4, 2020 21:09 — forked from datlife/export_tfserving.py
Export pre-trained TF Object Detection API model to Tensorflow Serving
"""
Thiss script would convert a pre-trained TF model to a servable version for TF Serving.
A pre-trained model can be downloaded here
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo
Requirements:
* A directory contains pretrained model (can be download above).
* Edit three arguments `frozen_graph`, `model_name`, `base_dir` accordingly
@dermatologist
dermatologist / parse_dotenv.bash
Created December 23, 2020 14:19 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@dermatologist
dermatologist / index.html
Created April 30, 2021 16:29 — forked from benjchristensen/index.html
Simple Line Graph using SVG and d3.js
<html>
<head>
<title>Simple Line Graph using SVG and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
@dermatologist
dermatologist / image-predict-on-tfjs-node.js
Created May 5, 2021 11:13 — forked from mugifly/image-predict-on-tfjs-node.js
Image Prediction on tfjs-node (with model made by Teachable Machine Image)
const tf = require('@tensorflow/tfjs-node');
const Jimp = require('jimp');
// Directory path for model files (model.json, metadata.json, weights.bin)
// NOTE: It can be obtained from [Export Model] -> [Tensorflow.js] -> [Download my model]
// on https://teachablemachine.withgoogle.com/train/image
const MODEL_DIR_PATH = `${__dirname}`;
// Path for image file to predict class
const IMAGE_FILE_PATH = `${__dirname}/example.jpg`;
@dermatologist
dermatologist / 1.html
Created May 16, 2021 01:41 — forked from 0532/1.html
github button 'star' 'fork' 'fellow' and 'fork me on github'
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="gh-fork-ribbon.css">
<link rel="stylesheet" href="style.css" />
<style>
.right .github-fork-ribbon {
background-color: #333;
}
</style>
@dermatologist
dermatologist / README.md
Created December 19, 2022 23:54 — forked from ttimasdf/README.md
Integrate Git diffs and commits with Word DOCX files
@dermatologist
dermatologist / run-bert-tensorflow2.py
Created December 21, 2022 16:00 — forked from yuhanz/run-bert-tensorflow2.py
To run bert with tensorflow 2.0
pip install bert-for-tf2
pip install bert-tokenizer
pip install tensorflow-hub
pip install bert-tensorflow
pip install sentencepiece
import tensorflow_hub as hub
import tensorflow as tf
import bert
# Having a requirements.txt file has follows
torch==1.5.0
numpy==1.18.1
# Add channels. Last added is with the highest priorety
conda config --add channels pytorch
conda config --add channels conda-forge
conda config --add channels anaconda
# Install pip for fallback