Skip to content

Instantly share code, notes, and snippets.

View gsmcwhirter's full-sized avatar

Gregory McWhirter gsmcwhirter

View GitHub Profile
@gsmcwhirter
gsmcwhirter / aliases.py
Created July 5, 2017 17:11 — forked from sampsyo/aliases.py
hack for argparse adding subcommand aliases
#!/usr/bin/env python
"""Aliases for argparse positional arguments."""
import argparse
class AliasedSubParsersAction(argparse._SubParsersAction):
class _AliasedPseudoAction(argparse.Action):
def __init__(self, name, aliases, help):
int n = 2;
int count = 1;
while (count < 5)
{
count *= n;
if (count / 2 < 2)
{
System.out.println("Hello");
}
public String mystery(String str)
{
int i = 0;
while (i < str.length())
{
if (str.substring(i,i+1).equals("c"))
{
str = str.substring(0,i) + str.substring(i+1);
}
i++;
public int mystery(int n)
{
int a = 0, b = 1;
while (n > 0)
{
n--;
b = b+a;
a = b-a;
if ((a + b) % 13 == 0)
public void mystery(int n)
{
while ( n > 1)
{
if (n % 2 == 0){
n /= 2;
}
else {
n = 3 * n + 1;
import pyglet.text as pygtext
class BaseObject(object):
pass
class Stuff(BaseObject, pygtext.Label):
pass

Keybase proof

I hereby claim:

  • I am gsmcwhirter on github.
  • I am gsmcwhirter (https://keybase.io/gsmcwhirter) on keybase.
  • I have a public key whose fingerprint is 146F 35EA 509E 47B6 2220 6D5A 2068 4302 8C17 D002

To claim this, I am signing this object:

[
{
"name": "TF Logic",
"order": 0,
"questions": [
{
"question": "What does it mean for a sentence to be a tautology?",
"answer": "Every possible interpretation makes the sentence true.",
"value": 100
},
"categories": [
{
"name": "TF Logic",
"order": 0,
"questions": [
{
"question": "What does it mean for a sentence to be a tautology?",
"answer": "Every possible interpretation makes the sentence true.",
"value": 100
},
//Snip from build
require.alias("forbeslindesay-booting-sub-nav/index.js", "dynamics-visualization/deps/booting-sub-nav/index.js");
require.alias("forbeslindesay-booting-sub-nav/scroll.js", "dynamics-visualization/deps/booting-sub-nav/scroll.js");