Skip to content

Instantly share code, notes, and snippets.

@CrazyPython
CrazyPython / list.md
Last active August 11, 2016 21:52
tqdm for all languages
@CrazyPython
CrazyPython / main.py
Created August 23, 2016 15:06
valid code - for showing non-programmers the world of programming
# This is a comment. The computer will ignores all comments.
# They are basically notes you put in code just to remind you (the human!)
# what the code does next time you read over it so we coders don't forget.
# In Python, anything after a "#" is considered a comment.
# We'll use comments to talk about the code that will be shown.
# And by the way, the computer ignores blank lines
wearing_pants = False # this is a variable assignment.
@CrazyPython
CrazyPython / main.py
Created August 23, 2016 15:22
valid code, part two
# Today we will learn about if-elif-else clauses and getting input.
# The programming language we've been using all along is Python 3, by the way
# Here's the code:
favorite_number = int(input("What's your favorite number? "))
if favorite_number > 900:
print("Woah, you like big numbers.")
elif favorite_number == 0:
print("Zero. The number of emptiness.")
elif favorite_number > 0 and favorite_number < 10:
@CrazyPython
CrazyPython / main.py
Created August 23, 2016 15:41
valid code, part three
# Today I'll tell you about FUNCTIONS.
# Often, we need to reuse code because we do similar operations and don't wanna repeat the code every single time
# that means larger code (read: less storage space!) and awkward and hard to understand code (for humans)
# You call (fancy word for execute) a function using function_name(paremeter1, paremeter2, paremeter3, ...).
# Functions can have anywhere from zero to virtually infinite paremeters
def countdown(start_number):
if start_number > 0: # only do a countdown if the start number is greater than zero
print(start_number) # print the starting number
countdown(start_number-1) # what's this? It's a functions that calls itself!
@CrazyPython
CrazyPython / main.py
Last active August 23, 2016 15:48
valid code, part three
# Today I'll tell you about FUNCTIONS.
# Often, we need to reuse code because we do similar operations and don't wanna repeat the code every single time
# because that means larger code (that's bad) and awkward and hard to understand code (for humans)
# You call (fancy word for execute) a function using function_name(paremeter1, paremeter2, paremeter3, ...).
# Functions can have anywhere from zero to virtually infinite paremeters
def countdown(start_number):
if start_number > 0: # only do a countdown if the start number is greater than zero
print(start_number) # print the starting number
countdown(start_number-1) # what's this? It's a functions that calls itself!

Part one

Part two

Part three

Part four is coming soon!

And you can try the code samples online at Ideone. Paste the code in and click the dropdown at the bottom left of the text box. Select "Python 3". Click "Run".

@CrazyPython
CrazyPython / skills.md
Last active August 25, 2016 19:21
My skills

Skills

This isn't a Linkedin URL. This is a (hastily put together*) list of skills.

  • 4 years experience programming
  • 2 years Django experience (= web/HTTP/TCP experience too, for the HR managers out there ;) )
  • 1.5 years android experience
  • Decent git/github experience
@CrazyPython
CrazyPython / bot.java
Last active August 29, 2016 23:43
bot?
package com.ppcg.stockexchange;
import com.ppcg.kothcomm.game.AbstractPlayer;
import com.ppcg.kothcomm.utils.Tools;
import java.util.List;
public class VincentKasuga extends Player {
int knownStock;
int knownPrice;
@CrazyPython
CrazyPython / doc.md
Created September 1, 2016 00:38
Ideas on scripting languages

Thoughts on scripting languages

JS has the "flavor" of a scripting language.

Very weak type system, beginner-friendly but finicky to work with, and has the simplicity for simple tasks. It's the language anyone can write in with a little experience, the language that's most portable for KOTHs. Many rules can be bent and still work.

Python has the flavor of a normal language but is good for scripting.

@CrazyPython
CrazyPython / CC∞
Created September 17, 2016 15:28
CC∞ License
© Licensor 2016. All Rights Reserved.