Skip to content

Instantly share code, notes, and snippets.

View adamisntdead's full-sized avatar
🐢
Working on stuff

Adam Kelly adamisntdead

🐢
Working on stuff
View GitHub Profile
@adamisntdead
adamisntdead / grammar.py
Created August 16, 2019 23:08
QASM Grammar
// The following is an implementation of OpenQASM
// using a recursive descent style parser.
// MainProgram := "OPENQASM" Real ";" Program
// Program ::= Statement | Program Statement
// Statement ::= Decl
// | GateDecl GeoList "}"
// | GateDecl "}"
// | "opaque" Id Idlist ";"
// | "opaque" Id "()" IdList ";"
import face_recognition
import cv2
import numpy as np
# This is a demo of running face recognition on live video from your webcam. It's a little more complicated than the
# other example, but it includes some basic performance tweaks to make things run a lot faster:
# 1. Process each video frame at 1/4 resolution (though still display it at full resolution)
# 2. Only detect faces in every other frame of video.
# PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam.
@adamisntdead
adamisntdead / README.md
Created June 9, 2019 00:07
Group Theory in Python

Group Theory

This gist shows the implementation of a group using python. All of the group axioms are checked by the code.

RT @memecrashes: This meme is a sin.
(Submitted by @santiagoaciago)
https://t.co/UdzrevTHfY

Keybase proof

I hereby claim:

  • I am adamisntdead on github.
  • I am adamkelly2201 (https://keybase.io/adamkelly2201) on keybase.
  • I have a public key ASAdj9vFFeoYQ7eSauChmQWoiy0jj1HHu1aRSubDV6Gaugo

To claim this, I am signing this object:

const blessed = require("blessed");
const earth =
" _____\r\n ,-:` \\;',`'-, \r\n .'-;_,; ':-;_,'.\r\n /; '/ , _`.-\\\r\n | '`. (` /` ` \\`|";
// Create a screen object.
var screen = blessed.screen({
smartCSR: true,
dockBorders: true
});
module.exports = entry => pack(getModules(entry))
function pack(modules) {
const modulesSource = modules.map(module =>
`${module.id}: {
factory: (module, require) => {
${module.source}
},
map: ${JSON.stringify(module.map)}
}`
).join()
// A factory function
(require, module) => {
/* Module Source */
}