Skip to content

Instantly share code, notes, and snippets.

View QuantumFractal's full-sized avatar

Thomas Moll QuantumFractal

View GitHub Profile
# socket server for hololens
import socket
host = "127.0.0.1"
port = 20620
timeout = 5
blocksize = 1024
anchor_db = {}
def main():
#!/usr/bin/env python
"""
A simple echo server
"""
import socket
host = ''
port = 20602
@QuantumFractal
QuantumFractal / collector.py
Created October 19, 2016 09:05
cpre 184x demo
import twitter
import re
import html
import sys
from secrets import keys
from twitter.error import TwitterError
regex = re.compile(r"(#[A-Za-z]*)|(http(s|):\/\/[A-Za-z./0-9]*)|(@[A-Za-z]*)")
@QuantumFractal
QuantumFractal / Printer.java
Created October 18, 2016 19:23
342 FuncLang Console
/** Replace the first two print() methods with this **/
public void print(Value v) {
if(v.tostring() != "")
System.out.println("=> "+v.tostring());
}
public void print(Exception e) {
System.out.println("Error: "+e.toString());
}
package funclang;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.FileReader;
import funclang.AST.Program;
import funclang.parser.FuncLangLexer;
import funclang.parser.FuncLangParser;
@QuantumFractal
QuantumFractal / sum_map.sc
Last active September 27, 2016 20:33
342 Sum / Map Example
(define sum
(lambda (lst)
(if (null? lst)
0
(+ (car lst) (sum (cdr lst)))
)
)
)
(define map
@QuantumFractal
QuantumFractal / DiiB-3.sc
Created September 27, 2016 20:29
null created by QuantumFractal - https://repl.it/DiiB/3
(define sum
(lambda (lst)
(if (null? lst)
0
(+ (car lst) (sum (cdr lst)))
)
)
)
(define map
@QuantumFractal
QuantumFractal / sierpinski.py
Created September 8, 2016 07:37
sierpinski generation
import turtle
import math
WIDTH, HEIGHT = 800, 600
ANGLE = 60
SCALAR = 1.585
DEPTH = 8
def main():

CprE 308 Report - Lab 12

By: Thomas Moll - Lab Section B

Part 1: SSH

3.1.2

After running ls from linux-1.ece.iastate.edu the following output

[~/cpre308]
quanta-> ls
import socket, time
class cube:
def __init__(self):
self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.ClearBuffer()
server = ('localhost', 4444)