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 main | |
func modify (myarr *[]int) ([]int) { | |
return append(*myarr, 4) | |
} | |
func main() { | |
arr := []int{} | |
arr = append(arr, 1) | |
arr = append(arr, 2) |
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 requests | |
import time | |
def getReddit(subreddit): | |
request = requests.get("http://reddit.com/r/%s/.json" % subreddit) | |
return request.json()['data']['children'] | |
seen_ids = set() | |
while 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
# maybe we bit off more than we could chew | |
@start | |
push 0 | |
push @stackguard | |
call | |
push @fullsweep | |
call | |
push 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
# maybe we bit off more than we could chew | |
@STEPSIZE 12 | |
@start | |
# [] | |
push @fullsweep | |
# [@fullsweep] | |
call | |
# [] |
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
# maybe we bit off more than we could chew | |
store GRIDSIZE << 12 | |
<< GRIDSIZE | |
@start | |
minus << 1 | |
dup | |
equal << 0 | |
iftgoto << @up | |
@search |
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 main | |
import ( | |
"testing" | |
) | |
func Nop() { | |
} | |
type Stupid interface { |
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 main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"strings" | |
) |
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
# kaptin, safe from desg | |
def map(source, func): | |
return __builtins__.map(func, source) | |
# sixthgear | |
def mop(source, func): | |
return map(func, source) | |
# pythonic | |
def map(source, func): |
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
# pythonic | |
def map(source, func): | |
dest = [] | |
for x in source: | |
dest.append(func(x)) | |
return dest | |
# list comprehension | |
def map(source, func): | |
return [func(x) for x in source] |
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
This is the first iteration of a helpful gist irc roebit. | |
Try the following commands: | |
!gists - lists the last 5 gists pasted in the channel | |
!gists kaptin - list the last 5 gists pasted by kaptin | |
!search <search term> - search the last 5 gists with the search terms in the description | |
I'm welcome to questions and suggestions. | |
-Kaptin |
NewerOlder