Skip to content

Instantly share code, notes, and snippets.

@jason-s
jason-s / scavhunt1.md
Last active June 13, 2020 20:14
Scavenger Hunt Part 1 Rules

At-Home Scavenger Hunt Rules: Part 1 (General)

J. Sachs, 13 Jun 2020

Version 1.01

Overview

Goal: to submit an entry which scores the most points based on a predetermined scoring procedure as outlined in Part 1 and Part 2.

import jsonschema
import yaml
schema1 = yaml.safe_load("""
title: SCHEMA 1 (foo_node or bar_node)
$ref: '#/definitions/root_node'
$schema: http://json-schema.org/draft-07/schema#
definitions:
bar_node:
additionalProperties: false
@jason-s
jason-s / person_view.enaml
Created April 9, 2020 16:03
Observing return events in Field objects in enaml
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------------------------------------------------------------------------
#
# mods by Jason Sachs
#
@jason-s
jason-s / baseline.tex
Last active April 1, 2020 16:18
prototype for circuitikz logic gate shapes matching IEEE 91-1984 recommendations, using https://tex.stackexchange.com/a/372996/46076 example as baseline
\documentclass{standalone}
\usepackage{circuitikz}
\ctikzset{tripoles/american and port/origin/.initial=0.8}
\ctikzset{tripoles/american and port/inputs/.initial=2}
\ctikzset{tripoles/american nand port/origin/.initial=0.8}
\ctikzset{tripoles/american nand port/inputs/.initial=2}
\ctikzset{tripoles/american nor port/origin/.initial=0.8}
<!DOCTYPE html><html><head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.2/katex.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.2/katex.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.2/contrib/auto-render.min.js"></script>
<script type='text/javascript'>
window.addEventListener('DOMContentLoaded',function() {
if (window.location.search != '?nokatex')
{
renderMathInElement(document.body, {delimiters:
[
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# based on
# https://qt.gitorious.org/pyside/pyside-examples/source/060dca8e4b82f301dfb33a7182767eaf8ad3d024:examples/itemviews/simpletreemodel/simpletreemodel.py
############################################################################
##
## Copyright (C) 2005-2005 Trolltech AS. All rights reserved.
##
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800);
body {
font-family: 'Open Sans', sans-serif;
margin: 0;
}
canvas {
@jason-s
jason-s / blockdiagram_example.pdf
Last active January 22, 2019 17:14
block diagram
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jason-s
jason-s / improve-fonts.pdf
Last active April 24, 2018 18:54
Various examples for discussion in https://github.com/Khan/KaTeX/issues/695
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
test