Skip to content

Instantly share code, notes, and snippets.

🔥
Playing with FHIR

Bell Eapen dermatologist

🔥
Playing with FHIR
View GitHub Profile
@dermatologist
dermatologist / extractAnnotations.py
Created Aug 2, 2020 — 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
View extractAnnotations.py
#!/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 / gendoc.sh
Created Jul 27, 2020 — forked from Kegsay/gendoc.sh
Generate static docs for a Go package
View gendoc.sh
#!/bin/bash
set -u
DOC_DIR=godoc
PKG=github.com/matrix-org/go-neb
# Run a godoc server which we will scrape. Clobber the GOPATH to include
# only our dependencies.
GOPATH=$(pwd):$(pwd)/vendor godoc -http=localhost:6060 &
DOC_PID=$!
@dermatologist
dermatologist / sqlalchemy-orm-query-to-dataframe.py
Created Jun 27, 2020 — forked from garaud/sqlalchemy-orm-query-to-dataframe.py
Example to turn your SQLAlchemy Query result object to a pandas DataFrame
View sqlalchemy-orm-query-to-dataframe.py
# -*- coding: utf-8 -*-
"""From a Query.all(), turn this result to a pandas DataFrame
Table creation and example data come from the official SQLAlchemy ORM
tutorial at http://docs.sqlalchemy.org/en/latest/orm/tutorial.html
Just take a look at the 'query_to_dict' function and the last part of the __main__.
"""
@dermatologist
dermatologist / maven-archetype.list
Created May 10, 2020 — forked from zbigniewTomczak/maven-archetype.list
Maven archetypes list (mvn archetype:generate)
View maven-archetype.list
Choose archetype:
1: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-jsf-jpa (Archetype for web applications (JSF + JPA) using Demoiselle Framework)
2: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-minimal (Basic archetype for generic applications using Demoiselle Framework)
3: remote -> co.ntier:spring-mvc-archetype (An extremely simple Spring MVC archetype, configured with NO XML.)
4: remote -> com.agilejava.docbkx:docbkx-quickstart-archetype (-)
5: remote -> com.alibaba.citrus.sample:archetype-webx-quickstart (-)
6: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin.embed-simple-archetype (-)
7: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin7.embed-simple-archetype (-)
8: remote -> com.cedarsoft.open.archetype:multi (-)
9: remote -> com.cedarsoft.open.archetype:simple (-)
View install-multiple-jdk-on-macos-high-sierra.md

Install Multiple Java Versions on macOS High Sierra

Install Homebrew Cask

On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.

You don't need to install cask anymore, you just need homebrew. Try using any cask command

Install Homebrew Cask first if you haven’t:

View incremental_clustering.py
# Author: Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Lars Buitinck <L.J.Buitinck@uva.nl>
# License: Simplified BSD
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_extraction.text import HashingVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import FeatureHasher
from sklearn.pipeline import Pipeline
@dermatologist
dermatologist / base64-form-data.js
Created Dec 24, 2019 — forked from AshikNesin/base64-form-data.js
Base64 image to multipart/form-data
View base64-form-data.js
const base64 = 'data:image/png;base65,....' // Place your base64 url here.
fetch(base64)
.then(res => res.blob())
.then(blob => {
const fd = new FormData();
const file = new File([blob], "filename.jpeg");
fd.append('image', file)
// Let's upload the file
// Don't set contentType manually → https://github.com/github/fetch/issues/505#issuecomment-293064470
@dermatologist
dermatologist / dev-openfaas-env.sh
Created Nov 24, 2019 — forked from LucasRoesler/dev-openfaas-env.sh
Create a new dev environment using KinD and immediately forward the Gateway port
View dev-openfaas-env.sh
#!/bin/bash
DEVENV=${1:-devopenfaas}
kind create cluster --name "$DEVENV"
export KUBECONFIG="$(kind get kubeconfig-path --name="$DEVENV")"
kubectl rollout status deploy coredns --watch -n kube-system
# INSTALLING HELM
@dermatologist
dermatologist / docker.sh
Created Nov 18, 2019 — forked from monkeym4ster/docker.sh
Docker: save/load container using tgz file (tar.gz)
View docker.sh
#for not running docker, use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
@dermatologist
dermatologist / doit.sh
Created Sep 1, 2019 — forked from charlesreid1/doit.sh
Download the Large-scale CelebFaces Attributes (CelebA) Dataset from their Google Drive link
View doit.sh
#!/bin/bash
#
# Download the Large-scale CelebFaces Attributes (CelebA) Dataset
# from their Google Drive link.
#
# CelebA: http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
#
# Google Drive: https://drive.google.com/drive/folders/0B7EVK8r0v71pWEZsZE9oNnFzTm8
python3 get_drive_file.py 0B7EVK8r0v71pZjFTYXZWM3FlRnM celebA.zip
You can’t perform that action at this time.