My Recent Pastes (74 and counting)
Pastes by Alexander Ross (74 and counting)
Below are the 14 most recent pasties by Alexander Ross.
September 08, 2006
2:37PM EDT
by Alexander Ross
View all 7 lines
>>> import timeit
>>> t = timeit.Timer("'word1 word2 word3 word'.split()")
>>> t.timeit()
2.5699281692504883
>>> t = timeit.Timer("['word1', 'word2', 'word3', 'word4']")
September 06, 2006
8:51PM EDT
by Alexander Ross
View all 11 lines
def counter(maximum):
i = 0
while True:
if i == maximum:
break
August 31, 2006
8:08PM EDT
by Alexander Ross
View all 14 lines
<html>
<head>
<script>
function add_hi() {
var p = document.createElement("P");
August 30, 2006
11:45PM EDT
by Alexander Ross
View all 17 lines
<html>
<head>
<script>
function f(obj) {
if(obj.style.visibility == "hidden"){
August 30, 2006
11:07PM EDT
by Alexander Ross
View all 11 lines
def format(text, indent='', width=70):
out = []
stack = [word for word in text.replace("\n", " ").split(" ") if word]
while stack:
line = []
August 30, 2006
11:05PM EDT
by Alexander Ross
View all 11 lines
def format(text, indent='', width=70):
out = []
stack = [word for word in text.replace("\n", " ").split(" ") if word]
while stack:
line = []
August 30, 2006
11:00PM EDT
by Alexander Ross
View all 12 lines
def format(text, indent='', width=70):
out = []
stack = [word for word in text.replace("\n", " ").split(" ") if word]
while stack:
line = ""
August 30, 2006
10:59PM EDT
by Alexander Ross
View all 12 lines
def format(text, indent='', width=70):
out = []
stack = [word for word in text.replace("\n", " ").split(" ") if word]
while stack:
line = ""
August 30, 2006
10:54PM EDT
by Alexander Ross
View all 15 lines
import re
def format(s, indent='', width=70):
out = []
s = s.replace("\n", " ")
s = re.compile(" +").sub(" ", s)
August 30, 2006
10:46PM EDT
by Alexander Ross
{ name = 'source.js.embedded.html';
begin = '(?:^\s+)?<((?i:script))\b(?![^>]*/>)';
end = '(?<=</(script|SCRIPT))>(?:\s*\n)?';
August 30, 2006
10:44PM EDT
by Alexander Ross
View all 9 lines
<html>
<head>
<script>
function f(state) {
return 5;
August 30, 2006
10:43PM EDT
by Alexander Ross
View all 9 lines
<html>
<head>
<script>
function f(state) {
return 5;
