Navigation Menu

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 / RTF2TXTfn.sql
Created February 22, 2023 16:52 — forked from patpawlowski/RTF2TXTfn.sql
VERY simple SQL RTF to TXT converter primarily to convert Act notes to plain text
/*
Written by: patpawlowski
Created On: Oct 26, 2015 at 4:51:52 PM
Description: This is a rough attempt to create a funciton to strip the markup from
the Act TBL_NOTE.NOTETEXT field. It appears to work for what I need
but could probably use some work with the escaped characters.
It's not particularly fast but it is faster than other solutions I've come
across. It takes about 4 seconds to parse 2700 records.
@dermatologist
dermatologist / bundle.js
Created January 23, 2023 16:54 — forked from jackgill/bundle.js
A node.js script to create a bundle containing an npm package, and all of its dependencies.
/*
* This script will download a package (and all of its dependencies) from the
* online NPM registry, then create a gzip'd tarball containing that package
* and all of its dependencies. This archive can then be copied to a machine
* without internet access and installed using npm.
*
* The idea is pretty simple:
* - npm install [package]
* - rewrite [package]/package.json to copy dependencies to bundleDependencies
* - npm pack [package]
@dermatologist
dermatologist / ExportModel.py
Created January 6, 2023 13:51 — forked from ZachisGit/ExportModel.py
Make your model Tensorflow Serving compatible and modify it to accept png encoded images as input and return png encoded images as output.
''' ExportModel.py - TF-Serving
# Basically we are wrapping your pretrained model
# in a tensorflow serving compatible format.
# This excepts base64 encoded png images and uses
# them as input to your model. Then we convert
# your models output into a png encoded image and
# it gets returned by tensorflow serving base64 encoded.
'''
import tensorflow as tf
# 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
@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
@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 / 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 / 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 / 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 / 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)