Skip to content

Instantly share code, notes, and snippets.

FourOhFour fourohfour

Block or report user

Report or block fourohfour

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fourohfour /
Created Mar 8, 2018
Load papers from PMT
import subprocess
import sys
def inp(prmpt):
result = input(prmpt)
if result == "redo":
raise IndexError # lol
elif result == "quit":
View sq.pi
n : 10
i : 0
sq : [n - i : ( @s
's' : 0
'c' : 0
'sum': [i - 'c' : (@c
's' : 's' + i
'c' : 'c' + 1

Hi Victor,

I'm a reasonably experienced programmer and I've identified some areas in which I feel you could improve your program. Firstly, I'd like to congratulate you on building a working version of your game. I remember working on a similar project about five years ago and it was the first non-trivial program I completed in Python. It was then that I first felt the satisfaction of creating something meaningful with a keyboard and a text editor. Enjoy that feeling - it makes up for the frustration of fighting errors after crashes after bugs.

The first suggestion I would make to you would be to reduce your use of global variables. Beginner programmers tend to overuse global variables, as they are very simple to use. If all the information about your program (commonly called 'state') is stored in global variables, you don't have to think very hard about where it is stored when you need to use it. This might seem like a good thing, but when your programs start to get more complex global variables will qu

fourohfour /
Last active Jul 19, 2017
Thoughts on VRC in the UK.

On the one hand I feel like JWS could do with putting their younger kids into IQ to develop their skills in the proverbial shallow-end and reduce the sheer number of their robots in VRC UK. On the other hand they do a reasonable job of bringing their younger kids up to a competitive level quickly, and there's a strong argument that the best training for VRC is to compete in VRC!

Besides - is it my place to say that an organisation should restrict the number of robots they enter? Perhaps it is not. Clearly VEX has a great positive impact on the students who participate in it. From my experience, I can say with absolute certainty that you don't have to be competing to be the best team in the country to take a great deal away from VEX competition. Even if you're just building a squarebot and are coming into competitions expecting to be back on the M25 by midday - not to insinuate that JWS teams do that, because they rarely enter genuinely weak teams - there are few more worthwhile extra-curricular pursuits than

fourohfour /
Created Mar 28, 2017
Calculate Product Moment Correlation Coefficient (Pearson Coefficient, r)
import math
import random
class Buffer:
def __init__(self, one, two): = str(one)
self.two = str(two)
self.length = max((len(, len(self.two))) + 1
def __call__(self, obj):
fourohfour /
Last active Mar 20, 2017
simple script for VEXDB
import requests
params = {"country": "United Kingdom", "grade": "High school"}
r = requests.get("", params = params)
j = r.json()
if j["status"] == 1:

Pre-Match Checklist


  • Are stand-offs correctly tightened


  • Are the band groups sufficiently fresh
    • Sufficient Strength
View vanwall.c
======= Vanwall Library Code =======
- Vanwall is a VEX Robotics library intended to streamline the process of programming VEX Robots
- It provides intuitive interfaces for working with Motors and Controllers
/* Motor Types, for the _type member of Motor structs */
typedef enum {HIGH_SPEED, TORQUE} MotorType;
/* Coefficient Presets, for the _coeff member of Motor structs */
fourohfour / vw_full_code
Created Jan 4, 2017
Main Robot Code for VEX Team 3117
View vw_full_code
// This code requires the vanwall library to function
#include "vanwall.c"
// =*=*= Main Robot Code for VEX Team 3117 =*=*=
// *= Release: 04/01/17 =*
// This file is composed of the following sections:
// - Allocation : Creating data structures in memory
// - Creation : Initialising data structures
// * Assigning ports to motors
fourohfour /
Created Nov 6, 2016
Information about the Show My Homework API

Show My Homework API

File detailing what I've worked out so far from investigating the Show My Homework API.

API Requests

API requests are made in the form of a HTTPS GET request to the SMH API endpoint.{request}
You can’t perform that action at this time.