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 | |
script, first, second, third = argv | |
print "this script , called %s, is going to ask you the questions %s, %s, %s" % ( script, first, second, third) | |
first_answer = raw_input(first) | |
second_answer = raw_input(second) | |
third_answer = raw_input(third) | |
print "for question %r, you answered %s" % ( first, first_answer) |
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 | |
open(argv[2], 'w').write(open(argv[1]).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
import random | |
statement_answer_pairs = {'not False ':'true', 'not true ':'false', | |
'True or False ':'true', 'True or True ':'true', | |
'False or True ':'true', 'False or False ':'false', | |
'True and False ':'false', 'True and True ':'true', | |
'False and True ':'false', 'False and False ':'false', | |
'not (True or False) ':'false', 'not (True or True) ':'false', | |
'not (False or True) ':'false', 'not (False or False) ':'true', | |
'not (True and False) ':'true', 'not (True and True) ':'false', | |
'not (False and True) ':'true', 'not (False and False) ':'true', |
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 fractions import gcd | |
primes = [2, 3] | |
def isprime(p): | |
if p == 2: return True | |
if p % 2==0: return False | |
max = p**0.5+1 | |
i=3 | |
while i <= max: | |
if p%i==0: return False |
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 exit | |
items = ["swooping sword", "nutritious nuggets"] | |
options = ["help", "look around"] | |
health = 100 | |
def start(): | |
print "You wake up in a room.\nWhat do you do?" | |
start_options = options | |
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
<html><body> | |
<?php | |
function best_tweet($user){ | |
$tweet_score=0; | |
$tweett=""; | |
foreach ($user->tweets as $tweet){ | |
if ($tweet->xp_value>$tweet_score){ | |
$tweett=json_decode(file_get_contents("http://api.twitter.com/1/statuses/show/".$tweet->tweet_id.".json"))->text; | |
$tweet_score=$tweet->xp_value; | |
} |
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
<html> | |
<head> | |
<style> | |
ul { | |
list-style: none; | |
padding: 0; | |
margin: 0; | |
} | |
.first, .second, .third{ | |
width:100px; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>canvas test</title> | |
<style> | |
#man1 { | |
background-image: url(man1.png); | |
width: 100px; | |
height: 100px; | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<title>canvas test</title> | |
<style> | |
#man1 { | |
width: 100px; | |
height: 100px; | |
} | |
</style> |
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
package PROJECT!; | |
import android.app.Activity; | |
import net.unto.twitter.Api; | |
import net.unto.twitter.TwitterProtos.Status; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
public class inkstorm extends Activity | |
{ |
OlderNewer