Skip to content

Instantly share code, notes, and snippets.

View Quantisan's full-sized avatar

Paul Lam Quantisan

View GitHub Profile
@Quantisan
Quantisan / 2010_PhysRevLett_Pulsating Tandem Microbubble for Localized and Directional Single-Cell Membrane Poration.tei.xml
Created September 6, 2023 00:54
2010_PhysRevLett_Pulsating Tandem Microbubble for Localized and Directional Single-Cell Membrane Poration
<?xml version="1.0" encoding="UTF-8"?><TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd">
<teiHeader xml:lang="en">
<fileDesc>
<titleStmt>
<title level="a" type="main">Pulsating Tandem Microbubble for Localized and Directional Single-Cell Membrane Poration</title>
<funder ref="#_ZHHKCkE #_34xNgJX #_9GAuwET #_CgHRkTC">
<orgName type="full">National Institutes of Health</orgName>
<orgName type="abbreviated">NIH</orgName>
<idno type="DOI" subtype="crossref">10.13039/100000002</idno>
</funder>
@Quantisan
Quantisan / stepwise2.clj
Last active May 10, 2023 21:55
stepwise_v2 interface doodle
;; defining a Step Functions state machine
(def pizza-making-state-machine
(sfn/->> request
(sfn/parallel (make-dough)
(make-sauce)
(sfn/map {:iterate-over :ingredients} prepare-ingredients))
(put-ingredients-on-dough)
(bake)
(sfn/wait 2 :minutes)
@Quantisan
Quantisan / LM_demo.py
Created April 11, 2023 22:03
Motiva show and tell: problem solving with language models
# pip install torch transformers
from transformers import pipeline
generate = pipeline(model="declare-lab/flan-alpaca-xl")
prompt = "Write an email about an alpaca that likes flan"
generate(prompt, max_length=128, do_sample=True)
@Quantisan
Quantisan / burt_api.py
Last active February 10, 2022 20:57
Burt API endpoints
# Motiva Burt is served over a Restful API with POST, PUT, GET, and DELETE endpoints as such:
# POST /api/experiment/ request body expectation
# campaignStart model that is expected for request body when creating a campaign
campaignStart = api.model(
"CampaignStart",
{
# Datetime string defining the current time
"now": fields.String(required=True),
# List of treatment ids
(require '[stepwise.core :as stepwise])
(stepwise/ensure-state-machine
:make-pizza
{:start-at :make-dough
:states
{:make-dough {:type :task
:resource :make-pizza/make-dough
:next :make-sauce}
@Quantisan
Quantisan / run_algo.sh
Created September 10, 2018 00:07
AlgoVPN Docker: Deploying with scripted Ansible in a Docker container
# I had trouble provisioning AlgoVPN to EC2 with the included Docker image. The stdin
# isn't reading my AWS credentials correctly. So I'm running the ansible
# playbook directly to bypass entering the secrets. This is a record of my
# shell commands to get it provisioning an AlgoVPN server.
# First follow the instruction at https://github.com/trailofbits/algo/blob/master/docs/Docker.md
# to setup your config.cfg
# On the host machine, inside the algo repository folder, build the Docker image from source.

Keybase proof

I hereby claim:

  • I am quantisan on github.
  • I am quantisan (https://keybase.io/quantisan) on keybase.
  • I have a public key ASCTfbD8h3Tj6_1bYqRUF9QnMOkuiy3UL0DJFjohnqRlHQo

To claim this, I am signing this object:

@Quantisan
Quantisan / articles_struct.clj
Created January 28, 2015 16:19
sample data structure
(def articles
[{:title "3 Langs" :author "boris" :tags #{:java :clojure :haskell}}
{:title "mylangs" :author "rocky" :tags #{:ruby :clojure :haskell}}
{:title "2 Langs" :author "boris" :tags #{:java :haskell}}])
@Quantisan
Quantisan / Dockerfile
Created October 20, 2014 21:16
Fig continuous dev setup
FROM clojure
ADD . /usr/src/app
WORKDIR /usr/src/app
RUN lein deps
@Quantisan
Quantisan / method_value_or_pointer.go
Created June 11, 2014 15:43
Defining methods on values or pointers
package main
import (
"fmt"
)
type rectPointer struct {
width int
height int
}