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
| import requests | |
| from bs4 import BeautifulSoup | |
| GITHUB_EXPLORE_PAGE = "http://www.github.com/explore" | |
| def get_page(): | |
| res = requests.get(GITHUB_EXPLORE_PAGE) | |
| return res.content | |
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/python | |
| import urllib2 | |
| import sys | |
| from xml.dom.minidom import parseString | |
| def cek_md5(md5_hash): | |
| req = urllib2.Request('http://md5.noisette.ch/md5.php?hash=%s' % (md5_hash)) | |
| response = urllib2.urlopen(req) | |
| hasil = response.read() |
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
| .tes { | |
| height: 200px; | |
| width: 200px; | |
| background-color: #555; | |
| cursor:pointer; | |
| } |
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
| from celery import task | |
| @task() | |
| def multiply(x,y): | |
| hasil = x*y | |
| return 'hasilnya adalah %d' % (hasil,) |
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
| from django.http import HttpResponse | |
| from anyjson import serialize | |
| from celerytest import tasks | |
| def multiply(request): | |
| x = int(request.GET['x']) | |
| y = int(request.GET['y']) | |
| #add to tasks and add to result variabel | |
| result = tasks.multiply.delay(x,y) |
NewerOlder