Skip to content

Instantly share code, notes, and snippets.

View bowbahdoe's full-sized avatar

Ethan McCue bowbahdoe

View GitHub Profile
interface ILO {}
class LO<T> implements ILO {
boolean empty;
T first;
LO<T> rest;
// Creates an ILO
LO(T first, LO<T> rest) {
this.first = first;
export class Camera extends Fixture{
constructor(data,metadata={}) {
this._structure_id = ...
}
getCurrentImage() {...}
}
;; BASIC LISP SYNTAX TUTORIAL
;; Calls the function '+' on the arguments 2 and 2
;; Returns the value 4
(+ 2 2)
;; Calls the function 'println' on the result of
;; the call to (+ 2 2). Returns no value
(println (+ 2 2))
import re
import requests
import phonenumbers as pn
from requests.exceptions import RequestException
from bs4 import BeautifulSoup
from pymongo import MongoClient
client = MongoClient('localhost', 27017)
db = client.scraped_data
collection = db.phone_numbers
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
import os
filename = sys.argv[1]
output_name = 'emoji'
c_code ='''
import sys
import os
filename = sys.argv[1]
c_code ='''
#include <stdlib.h>
#include <stdio.h>
int main(){
int cell_size = 1000;
char * ptr = (char*)(calloc(cell_size * sizeof(char), 0));
def makeTree(files,parents):
tree = []
for e,i in enumerate(files):
index = e
tree.append([i])
while True:
if parents[index] == "-1":
tree[e].append("-1")
break
else:
'''
This defines an object to keep track of the game
This allows us to abstract the game logic from the rendering
'''
from board import Board
from key import Team
from key import Orientation
import enum
import itertools
from config import REQUIRED_TIMES
from config import LEFT_MOTOR_PORT
from config import RIGHT_MOTOR_PORT
from config import BACK_MOTOR_PORT
from movement import marshmallow_drive_forwards as dw
from movement import marshmallow_turn_right as tr
from wallaby import motor, all_off
import collections
import types
import inspect
import functools
class Tasker(object):
'''
class to simplify running tasks in order
'''
def __init__(self):