This file contains hidden or 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" | |
func factorial_iter(product, counter, max_count int) int { | |
if counter > max_count { | |
return product | |
} else { | |
return factorial_iter(counter*product, counter+1, max_count) | |
} |
This file contains hidden or 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" | |
"math/rand" | |
"time" | |
) | |
func MaxHeaplify(a []int, i, len int) { | |
left := 2*i + 1 |
This file contains hidden or 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 ( | |
"encoding/csv" | |
"os" | |
"strings" | |
) | |
func main() { | |
file, err := os.Open("google.csv") |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import urlparse | |
import requests | |
def getURL(): | |
url = 'http://www.163.com' |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import os | |
import time | |
from pixivpy3 import * | |
from multiprocessing import Pool | |
api = AppPixivAPI() | |
username = 'account' | |
password = 'password' | |
path = u'your path' |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import os | |
import requests | |
import shutil | |
keywords = { | |
'art': ['painting', 'art workshop', 'sketching workshop', 'drawing workshop'], | |
'badminton': ['badminton'], | |
'baseball': ['baseball'], | |
'basketball': ['basketball'], |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
from imghdr import what | |
from sys import argv | |
from getopt import getopt | |
from PIL import Image, ImageFont, ImageFilter | |
use_help = '''getwallpaper [-h] source''' |