This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@main(b0: bool, b1: bool) { | |
jmp .start; | |
.end: | |
print x_0_2; | |
print x_1_2; | |
ret; | |
.l_1_3: | |
jmp .end; | |
.l_1_2: | |
x_1_2 : int = const 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "primitives/core.futil"; | |
component stats(flow: 0, @go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) { | |
cells { | |
count_0_sto = std_reg(0); | |
eq_1 = std_eq(0); | |
} | |
wires { | |
group count_0_sto_incr_group { | |
count_0_sto.write_en = 1'd1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "primitives/core.futil"; | |
component main() -> () { | |
cells { | |
q = std_reg(4); //multiplier (11) | |
//will use these shifters and adders | |
add_3bits = std_add(3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Metalsmith = require('metalsmith'); | |
var markdown = require('metalsmith-markdown'); | |
var layouts = require('metalsmith-layouts'); | |
var sass = require('metalsmith-sass'); | |
var metadata = require('metalsmith-metadata'); | |
var inplace = require('metalsmith-in-place'); | |
var ignore = require('metalsmith-ignore'); | |
var metadataPat = require('./metalsmith-metadata-pattern'); | |
var marked = require('marked'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Z = \t. (\f. t (\z. f f z)) (\f. t (\z. f f z)) | |
function Z(t) { | |
return ( (f) => t((z) => (f(f))(z)) ) ( (f) => t((z) => (f(f))(z)) ); | |
} | |
function fact_template(f) { | |
return function(n) { | |
if (n <= 1) { | |
return 1; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "A simple bar chart with embedded data.", | |
"data": { | |
"values": [ | |
{"a": "A","b": 28}, | |
{"a": "B","b": 55}, | |
{"a": "C","b": 43}, | |
{"a": "D","b": 91}, | |
{"a": "E","b": 81}, | |
{"a": "F","b": 53}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* General features. This starts out as an "empty" type, which we'll then | |
extend. We also define feature values and feature vectors. *) | |
type 'a feat = .. | |
type 'a value = 'a feat * float | |
type 'a fvec = 'a value list | |
(* Domain adaptation. *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
PY2 = sys.version_info[0] == 2 | |
def py3_path(path): | |
"""Convert a bytestring path to Unicode on Python 3 only. On Python | |
2, return the bytestring path unchanged. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This is a Python transcription of the famous Quake III "fast inverse | |
square root" function. Run the script to see a quick comparison with an | |
"exact" square root. | |
""" | |
import struct | |
import math | |
# From: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"union": [ | |
{ | |
"object": { | |
"tag": { | |
"literal": "schedule" | |
}, | |
"attendees": { | |
"array": { |
NewerOlder