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
dw =. 10 | |
dw2 =. dw | |
hw =. 5 50 | |
tl =. '..' ((-,+)/>.-:dw2,~{:hw) } 40 # ' ' | |
bg0 =. hw $ a.i.'.' | |
bg1 =. 26 | (]+ ] = dw |. ]) hw $? (*/hw)#26 | |
bg1 =. 65 + bg1 | |
bg =. a. {~ bg1 | |
el =. "_1 _ | |
lf =. 15 |
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
fn when(&mut self, v:VID, val:NID, nid:NID)->NID { | |
macro_rules! op { | |
[not $x:ident] => {{ let x1 = self.when(v, val, $x); self.not(x1) }}; | |
[$f:ident $x:ident $y:ident] => {{ | |
let x1 = self.when(v, val, $x); | |
let y1 = self.when(v, val, $y); | |
self.$f(x1,y1) }}} | |
if v >= self.vars.len() { nid } | |
else { match self[nid] { | |
Op::Var(x) if x==v => val, |
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
MODULE RISC; (* NW 22.9.07 / 28.3.11 *) | |
IMPORT SYSTEM, Texts, Oberon; | |
CONST | |
MemSize = 1024; (* in words *) | |
MOV = 0; AND = 1; IOR = 2; XOR = 3; LSL = 4; ASR = 5; | |
ADD = 8; SUB = 9; MUL = 10; Div = 11; CMP = 12; | |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using VRTK; | |
/* This class lets you leave a beacon in the scene and teleport to it later. | |
* | |
* It should be attached to an object that also has a VRTK_ControllerEvents | |
* component attached. | |
* |
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
/ https://en.wikipedia.org/wiki/Siamese_method | |
msq: {[m] s:(-1+m*m) (1 -1 +)\ (_ m%2; 0); 1+/.[m#,m#0; ; :; ]'[(s+2 -1*/:,/m#/:!m)!m; !#s]} |
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
#include <stdio.h> | |
#define I(n) for(int i=0; i<n; i++) | |
#define J(n) for(int j=0; j<n; j++) | |
#define O(str) printf(str) | |
#define Oc(c) putc(c, stdout) | |
#define M(x,y,c) m[y][x]=c; | |
int main() { | |
char c; char m[22][10]; |
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
{ | |
parserClass="com.x1010data.intellik.parser.KParser" | |
extends="com.intellij.extapi.psi.ASTWrapperPsiElement" | |
psiClassPrefix="K" | |
psiImplClassSuffix="Impl" | |
psiPackage="com.x1010data.intellik.psi" | |
psiImplPackage="com.x1010data.intellik.psi.impl" | |
elementTypeHolderClass="com.x1010data.intellik.psi.KTypes" |
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
#include <SoftwareSerial.h> | |
#include <LedControl.h> | |
#include <Key.h> | |
#include <Keypad.h> | |
const byte rows = 4; | |
const byte cols = 4; |
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
""" | |
>>> ebnf_sc.scan('x = A | b') | |
[('x', 'IDENT', 0), ('=', '=', 2), ('A', 'IDENT', 4), ('|', '|', 6), ('b', 'IDENT', 8)] | |
""" | |
from collections import namedtuple | |
from warnings import warn | |
import string | |
def T(tag, doc, args): | |
"""Creates a new tuple type.""" |
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
def read_ints(): | |
i = 0 | |
while True: | |
s = input('enter number[%i]:' % i) | |
try: | |
yield int(s); i+=1 | |
except ValueError: | |
if s == "": return | |
else: print "ignoring invalid number" |