This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reads a file and searches for the word "Hitler" or "Nazi" | |
# It then prints "the Godwin Ratio" which I have defined as the ratio | |
# between the nubmer of the line the word "Hitler" or "nazi" was first | |
# found and the total number of lines in the file plus one. (The reason | |
# for the plus one is because in the definition below the probability | |
# approaches 1, but implies that it never reaches 1.) | |
# | |
# Godwin's law- as the duration of an argument on the Internet increases, | |
# the probability that a comparison to Nazis or Hitler will be made approaches 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01001001 00100000 01100001 01101101 00100000 01101000 01100101 01110010 01100101 00100000 01110100 01101111 00100000 01110111 01101001 01110011 01101000 00100000 01111001 01101111 01110101 00100000 01100001 00100000 01001000 01100001 01110000 01110000 01111001 00100000 01000010 01101001 01110010 01110100 01101000 01100100 01100001 01111001 00101110 00100000 01010100 01100101 01100011 01101000 01101110 01101001 01100011 01100001 01101100 01101100 01111001 00100000 01101001 01110100 00100111 01110011 00100000 01101110 01101111 01110100 00100000 01111001 01101111 01110101 01110010 00100000 01100001 01100011 01110100 01110101 01100001 01101100 00100000 01100100 01100001 01111001 00100000 01101111 01100110 00100000 01100010 01101001 01110010 01110100 01101000 00100000 01100001 01101110 01100100 00100000 01111001 01101111 01110101 00100000 01110010 01100101 01101101 01100101 01101101 01100010 01100101 01110010 00100000 01101110 01101111 01110100 01101000 01101001 01101110 01100111 00100000 01100001 01101111 0110001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.uix.scatter import Scatter | |
from kivy.uix.label import Label | |
from kivy.uix.floatlayout import FloatLayout | |
class TestApp(App): | |
def build(self): | |
f = FloatLayout() | |
s = Scatter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import argv | |
from os.path import exists | |
script, from_file, to_file = argv | |
#so much of this printing is incredibly uneccessary | |
with open(from_file) as src: | |
with open(to_file, 'w') as dest: | |
print("Copying from {} to {}".format(from_file, to_file) | |
data = src.read(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout << "hello, world"; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#the function from the exercise, modified | |
def loop_list(n, inc=1): | |
numbers = [] | |
for i in range(0, n, inc): | |
print("At the top i is %d" % i) | |
numbers.append(i) | |
print("Numbers now:", numbers) | |
print("At the bottom i is %d" % i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--The rest of your page --> | |
<div id="banner-wrap"> | |
<a href="path/to/java/page"><img src="path/to/java/img" /></a> | |
<a href="path/to/python/page"><img src="path/to/python/img" /></a> | |
<a href="path/to/html/page"><img src="path/to/html/img" /></a> | |
</div> | |
<!--Other part of your page --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int x; | |
printf("Enter a number: "); | |
scanf("%d", &x); | |
printf("You input: %d", x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=#complier | |
CFLAGS=-c -Wall -g | |
LDFLAGS= | |
SOURCES=#source files | |
OBJECTS=$(SOURCES:.cpp=.o) | |
TARGET=#build target | |
all: $(SOURCES) $(TARGET) | |
$(TARGET): $(OBJECTS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " Relinquish vi support | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim/ | |
call vundle#rc() | |
" Plugin 'githubUsername/repoName' | |
" Let vundle manage itself: | |
Plugin 'gmarik/vundle' |
OlderNewer