This link is refferenced all the time. Keep it open in tab. http://docs.python.org/2/reference/
The numbers before each section refer to this document. Use it to get more detail on a subject.
import sys, thread, time | |
# define some settings | |
threads = 4 | |
logname = "log.log" | |
def getprimes(rangemin, rangemax, log): # This function returns all primes between | |
# rangemin and rangemax, and puts them into log | |
if rangemin % 2 == 0: # if number is divisible by 2 | |
rangemin += 1 #make odd | |
while rangemin < rangemax: #make sure we don't search over the specified number |
<script> | |
var num = []; | |
var total = 0; | |
for (var i = 0; i < 10; i++) {// for i as each number between 0 and 9: | |
num.push(parseInt(prompt()));// ask for a number | |
} | |
for (i=0; i < num.length; i++){// for i as each number in num.length: | |
total += num[i];// total equals itself plus the current number in num | |
} | |
</script> |
This link is refferenced all the time. Keep it open in tab. http://docs.python.org/2/reference/
The numbers before each section refer to this document. Use it to get more detail on a subject.
prime_count = 1 | |
start_number = 2 | |
number_to_check = 2 | |
while prime_count <= 100: | |
result = number_to_check % start_number | |
if result > 0: | |
start_number +=1 | |
elif result == 0: |
"""Inspired by /g/sicp's bot's threadsearching module | |
https://github.com/gentoomen/bhottu/blob/master/modules/threadsearch.py | |
irc.rizon.net #/g/sicp | |
Search intensity added by Taiiwo - github.com/Taiiwo | |
Usage: python 4chansearch.py "1" 2 3/4 | |
1: String to search for | |
2: Board letter | |
3: all: Search every reply to every thread on the board |
import urllib2 | |
def docrypt(password): | |
# insert hash here | |
orig = "sl/iECN%22ttp%3AP%20%3Chwxh.Iw3g/TR%22.Prhl/l%201//xhtTD/D1.%20r%20anionaOsTtdxa%22/%3EmhtmlLmY%3CmwDs%20%3D%22p%3A//Dh%20twxB3T.o1999nrH/h%3ETlC%22%3E%3Chea%22mtmmea%3CXmehttpot%20%20qTlvi%3D%22tentTC/nytC%22E%20cent%3DioLtes0/-ht%20chammn%3Bem/uMtf%20/%3Emt-/%22%3C0wtole9%2033g%3E/11im0t%20311%3C/m3m9ttt%3EWmmtyleamlsy%3Ed%3D1%22t/cssoe%20tm%20n%3C%21%21-mbodn-wm%7BdwmU%09bgroula/k-0mlDor00008%3Ad%23%3Bdmmr%7Dmody%2C1m-b%2C%3Ai%20m%7Bmcolo%20m-%09%20meF3FFmmm%7D%3CF%22%3Bm%3Et%3E.mmstylxmr/%3Cb%3De/admmmmm%3Emmoii%3Ewmmiv%20acm%20dgm1%22tcer%22%3Em%20nte%20%20ep-%3E133%200m1%20%201me3t3%20%3C/p%3Em9%221mpm%3Clp%3Esp%3B%3CF%26yb%3E%3Bmm.%20%20%26nbs%3C%3Cn%3E%3Cmo%3Etmmdiv%3Emm0/mtmbmodmm%3C/%3Cytmm%3Dhmummc/F-tmrm%20%3Cpppm9mp-//pte0%20%3Cxm11tmhd%3C/%20%3C%20%20%3Etmmn%23hynl%3Ellm" | |
#urldeode: | |
orig = urllib2.unquote(orig) | |
# Here is the algorithm from the js | |
passnum = len(orig) % len(str(password)) | |
i = 0 | |
while i >= |
import urllib2 | |
import sys | |
import json | |
# initialize: | |
## mkdir ~./fpspm | |
## touch ~./fpspm/local.repo | |
# This part is for adding things to the local repo. | |
# You can add: |
<link href="../core-icon-button/core-icon-button.html" rel="import"> | |
<link href="../core-toolbar/core-toolbar.html" rel="import"> | |
<link href="../core-icons/core-icons.html" rel="import"> | |
<link href="../paper-icon-button/paper-icon-button.html" rel="import"> | |
<link href="../paper-tabs/paper-tabs.html" rel="import"> | |
<link href="../paper-tabs/paper-tab.html" rel="import"> | |
<link href="../core-pages/core-pages.html" rel="import"> | |
<polymer-element name="my-element"> |
import mechanize | |
import cookielib | |
import re | |
class Login: | |
def __init__(self): | |
# set a bunch of properties as default settings | |
self.url = False | |
self.formIndex = 0 |
So the general concept behind an artificial intelligence is quite simple. It's basically just a replication of what we see in other sentient beings. It has been abstracted to mean things like speech, the ability to play a game well, to guess a person's motives and intentions, and to use that against them in order to win. The reason this seems like a form of intelligence to us, a being with sentience, is because as humans, we see anything with an understanding of anything to be sentient. Almost, anyway. An understanding is a very important part, but where it really hits