id
int64
0
25.6k
text
stringlengths
0
4.59k
18,500
database and cgi script persistent dictionary databaseerror exceptiondatabase api databasesdbm-style dataerror exceptiondatabase api datagramhandler classlogging module datagramrequesthandler classsocketserver module datagrams date and time manipulation date classdatetime module date parsing date(functiondatabase api date(methodof datetime objects date_time attributeof zipinfo objects datefromticks(functiondatabase api datetime classdatetime module datetime module datetime(functionxmlrpc client module day attributeof date objects daylight variabletime module dbhash module dbm module dbm-style databases deadlocksource with locking debug attribute entire programs from command shell manually setting breakpoint pdb module running function specifying breakpoint use of logging module decimal classdecimal module decimal objectconverting to fraction decimal module and sum(function and threads rounding behavior decimal(functionunicodedata module declarative programming decode(function base module quopri module decode(method in python of codecinfo objects of incrementaldecoder objects of jsondecoder objects of strings - proper use of decodestring(function base module quopri module decomposition(functionunicodedata module of tarfile objects of zipfile objects of sys flags decompress(function _debug_ variable decompress(method debug(methodof logger objects debugging cgi scripts after an uncaught exception checking for memory leaks configuring the debugger bz module zlib module of bz decompressor objects of decompressobj objects decompressobj(functionzlib module decorators applied to class definitions copying function attributes how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,501
decorators documentation strings example of multiple performance benefits placement of recursive functions user-defined function attributes with arguments deep copy deepcopy(functioncopy module garbage collection - uses of del_param(methodof message objects delattr(function and private attributes _delattr_ (method - delayed evaluation delayed executionusing threads delete(methodof ftp objects _deepcopy_ (method _delete_ (methodof descriptors def statement deletekey(functionwinreg module default unicode encoding @deleter decorator of properties default unicode error handling policy deletevalue(functionwinreg module default arguments deleting items from dictionary and mutable values binding of values default(methodof jsonencoder objects default_factory attributeof defaultdict objects deleting sequence items deleting slices deletion of instance attributes delimiters delitem(functionoperator module defaultcontext variabledecimal module _delitem_ (method - defaultdict(functioncollections module delslice(functionoperator module _defaults_ attributeof functions defaults(methodof configparser objects defects attributeof message objects and slices demo_app(functionwsgiref simple_server module denominator attribute of fraction objects of integers defining functions deprecationwarning warning defining multiple instance creation methods deque object defining new exceptions collections module versus list degrees(functionmath module deque(functioncollections module del operatoron dictionaries der_cert_to_pem_cert(functionssl module del statement and _del_ (method and slices deleting mapping items _del_ (method and program termination danger of defining dereference attributeof tarfile objects derived class description attributeof cursor objects descriptors and metaclasses detecting end of file (eof) lib fl ff
18,502
detecting the settings of interpreter command line options devnull variableos module dialect classcsv module dict type _dict_ attribute of classes of functions of instances of modules of types of user-defined objects dict(function performance properties dict(methodof manager objects dictionary comprehensionpython dictionary acceptable key types accessing items and python caution and _hash_ (method and string formatting automatic creation of initial values clearing compared to defaultdict objects converting to list copying creating from database results creation with dict(function defining empty deleting items equality of indexing operator inserting items item assignment item deletion iterating over keys key values list of items lookup in composite string formatting lookup with default value obtaining keys - obtaining values performance of performance of in operator persistent with shelve module removing items shared by multiple processes tuples as keys updating use as data structure use as lookup table using functions as values using to pass keyword function arguments view objects in python dictreader(functioncsv module dictsversus classes for storing data dictwriter(functioncsv module diff_files attributeof dircmp objects difference operator -of sets difference(methodof sets difference_update(methodof sets difflib module dig attributeof sys float_info digest(method of digest objects of hmac objects digest_size attributeof digest objects digit(functionunicodedata module digits variablestring module dir(function hiding attribute names in classes dir(methodof ftp objects _dir_ (method dircmp(functionfilecmp module directories comparing copying reading files with shell wildcards recursive traversal how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,503
directories system functions for accessing temporary testing filenames for dirname(functionos path module dis module dis()dis module disable debugger commandpdb module disable(function gc module logging module disable_interspersed_args(methodof optionparser objects disabling garbage collection disabling newline translation disassembly discard(methodof sets discard_buffers(methodof asynchat objects dispatcher classasyncore module _displayhook_ variablesys module displayhook(functionsys module disposition attributeof fieldstorage objects disposition_options attributeof fieldstorage objects distributed computingand multiprocessing module distributing programs distutils module - and extension modules creating binary distributions creating extensions with swig div(functionoperator module _div_ (method division of integerspython division operator / division operatorpython versus python divisiontruncation of integers - division_new attributeof sys flags division_warning attributeof sys flags divmod(function _divmod_ (method dllhandle variablesys module dlls creating with distutils extension modules loading with ctypes do_handshake(methodof ssl objects _doc_ attribute of built-in functions of functions of methods of modules of objects of types doccgixmlrpcrequesthandler classxmlrpc server module doctest module - verbose option document classxml dom minidom module documentation stringcopying to decorator documentation strings and xml-rpc and decorators and indentation doctest module in extension modules stripping with -oo option testing documentelement attributeof dom document objects docxmlrpcserver classxmlrpc server module docxmlrpcserver module dollar-variable substitution dom interface xml parsing example of dont_write_bytecode attributeof sys flags dont_write_bytecode variablesys module lib fl ff
18,504
double precision floating point double-clicking on py files double-underscoresuse in identifiers dropwhile(functionitertools module dst(method of time objects of tzinfo objects element(functionxml etree elementtree module elementtree classxml etree elementtree module elementtree interfacexml parsing elementtreeexamples of elif statement ellipsis duck typing dumbdbm module dump(function json module marshal module pickle module xml etree elementtree module dump(methodof pickler objects dumps(function json module marshal module pickle module xmlrpc client module dup(functionos module expression in python type of use in extended slicing use in indexing methods else clause of try statement of while and for loops else statement email messages composing example of composing and sending example of sending parsing dup (functionos module email package dynamic bindingof object attributes emax attributeof context objects dynamic loadingof modules embedding unicode characters in web pages dynamic scopelack of dynamic typing of variables embedding the interpreter in programs embedding - command line option calling functions from converting python types to variablemath module emin attributeof context objects eai_constantssocket module empty exceptionqueue module east_asian_width(functionunicodedata module empty dictionary easy_install commandsetuptools package egg files and modules and site configuration structure of element classxml dom minidom module empty list empty(methodof queue objects enable debugger commandpdb module enable(function cgitb module gc module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,505
enable_callback_tracebacks(functionsqlite module enable_callback_tracebacks(functionsqlite module endpos attributeof matchobject objects enable_interspersed_args(methodof optionparser objects endprefixmapping(methodof contenthandler objects enabling the print(function in python endswith(methodof strings encapsulation _enter_ (methodof context managers encode(function enumerate(function base module quopri module encode(method in python of codecinfo objects of incrementalencoder objects of jsonencoder objects of strings - proper use of encodedfile classcodecs module encodedfile objectcodecs module encodestring(function base module quopri module threading module enumkey(functionwinreg module enumvalue(functionwinreg module environ variableos module environ variableos module environment variables python wsgi expanding in filenames in cgi script unsetting used by interpreter environmenterror exception eof characterinteractive mode encoding argument to open(function eof indicationfile / encoding attribute eoferror exception of textiowrapper objects of files encoding issues with network programming encodingof source code end attributeof slices end keyword argumentto print(function end(method of matchobject objects of treebuilder objects end_headers(methodof basehttprequesthandler objects enddocument(methodof contenthandler objects endelement(methodof contenthandler objects endelementns(methodof contenthandler objects endheaders(methodof httpconnection objects epilogue attributeof message objects epoll interfacelinux epsilon attributeof sys float_info eq(functionoperator module _eq_ (method equal to operator == equality comparison of objects errcheck attributeof ctypes function objects errno module error codeslist of system errors error exception socket module error messages error(methodof logger objects error_message_format attributeof basehttprequesthandler class errorcode variableerrno module errorlevel attributeof tarfile objects lib fl ff
18,506
errors attributeof textiowrapper objects errors parameter of encoding functions to open(function escape codes disabling in string literal in string literals non-printing characters escape(function cgi module re module xml sax saxutils module escaping characters for use in html eval(function and repr() evaluation of function arguments operator precedence and associativity order of event object multiprocessing module threading module event loop and asyncore module coroutines event(methodof manager objects event-driven / polling for signals when to consider exception exception exception handlingin extension modules exception(methodof logger objects exceptions - and locks attributes of catching all catching multiple types caution with catching all exceptions chained in python clearing last exception defining new difference from warnings error codes for system errors finally statement handling of - hierarchy of ignoring list of built-in matching rules optimization strategies performance of propagation of reraising the last exception value of exe filecreating with distutils exec statementcaution with legacy code exec(function python ex_exit code constants exec_prefix variablesys module exc_clear(functionsys module execl(functionos module exc_info attributeof record objects execle(functionos module exc_info(functionsys module execlp(functionos module except statement - execute(method change of syntax _excepthook_ variablesys module excepthook(functionsys module exception class executable variablesys module of connection objects of cursor objects executemany(method of connection objects of cursor objects how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,507
executescript(methodof connection objects executescript(methodof connection objects extended slicing operator [::] executing programs extended unpacking of iterablespython executing strings as code extendedcontextdecimal module executing system commands extending with popen(function subprocess module system(function execution model execution of _init_ py files execution of class bodies execv(functionos module execve(functionos module execvp(functionos module execvpe(functionos module exists(functionos path module _exit(functionos module exit(functionsys module _exit_ (method of context managers exitcode attributeof process objects exp(functionmath module exp(methodof decimal objects expand(methodof matchobject objects expandenvironmentstrings(functionwinreg module expandtabs(methodof strings - expanduser(functionos path module expandvars(functionos path module exponentsrange on floating point expovariate(functionrandom module expressions extend(method of array objects of deque objects of lists extended slices assignment to deletion of on sequences extendleft(methodof deque objects extensible codewith modules extension modules compilation with distutils converting types from to python converting types from python to ctypes module difference in python documentation strings exception handling global interpreter lock hand-written manual compilation naming of reference counting threads wrapper functions extension(functiondistutils module extensions_map attributeof httprequesthandler class external_attr attributeof zipinfo objects extra attributeof zipinfo objects extract(method of tarfile objects of zipfile objects extract_stack(functiontraceback module extract_tb(functiontraceback module extract_version attributeof zipinfo objects extractall(methodof zipfile objects extracterror exceptiontarfile module extractfile(methodof tarfile objects extsep variableos module lib fl ff
18,508
f_constantsfcntl(function f_attributes of frame objects of statvfs objects fabs(functionmath module factorial(functionmath module fail(methodof testcase objects failif(methodof testcase objects fieldstorage(functioncgi module file / file attributeof fieldstorage objects file descriptors functions for manipulation file keyword argumentto print(function file locking windows by sqlite module failifalmostequal(methodof testcase objects file modesuse with open(function failifequal(methodof testcase objects _file_ attributeof modules failunless(methodof testcase objects file uploadin cgi scripts file-like objects file_offset attributeof zipinfo objects failunlessalmostequal(methodof testcase objects file_size attributeof zipinfo objects failunlessequal(methodof testcase objects fileconfig(functionlogging module failunlessraises(methodof testcase objects failureexception attributeof testcase objects false value family attributeof socket objects fault exceptionxmlrpc client module fchdir(functionos module fchmod(functionos module fchown(functionos module fcntl module fcntl(functionfcntl module fdatasync(functionos module fdopen(functionos module feed(methodof htmlparser objects fetchall(methodof cursor objects fetching urls example of example with authentication example with cookies filecmp module filecookiejar classhttp cookiejar module filehandler class logging module urllib request module fileio classio module filename attribute of fieldstorage objects of record objects of zipinfo objects filenames windows drive letters absolute path of in python matching with shell wildcards portable manipulation of splitting into directory and base name testing for existence testing if directory testing if link fetchmany(methodof cursor objects fetchone(methodof cursor objects how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,509
fileno(method of connection objects of iobase objects of socketserver objects of files - of files and sockets of socket objects of urlopen objects files absolute path of and python attributes of buffer size buffered binary / bz compression comparing copying creation time decoding as unicode description of file modes detecting end of file (eof) file pointer finding on the filesystem functions for manipulating metadata gzip compression iterating over lines - last modification time locking on windows low-level control low-level system calls memory mapped methods on opening - opening with unicode decoding parsing csv problems with io library module raw binary / reading line by line seeking size of softspace attribute and print statement temporary testing for existence types of writing to fill characters in string format specifiers filter classlogging module filter(function and python and optimization fnmatch module future_builtins module filterwarnings(functionwarnings module finally statement and locks find(method of element objects of elementtree objects of mmap objects of strings - find_library(functionctypes module findall(functionre module findall(method of element objects of elementtree objects of regex objects findcaller(methodof logger objects finding all loaded modules finding files finditer(functionre module finditer(methodof regex objects findtext(method of element objects of elementtree objects finish(methodof baserequesthandler objects first-class objects use of firstchild attributeof dom node objects flag_bits attributeof zipinfo objects flags attribute of context objects of regex objects flags variablesys module lib fl ff
18,510
flaming deathin extension modules float type float(function _float_ (method - and type coercion float_info variablesys module floating point as dictionary key binary representation compared to decimal numbers converting to fraction defining nan and inf inexact representation low-level properties of mixing with complex numbers precision of random number distributions representation of floatingpointerror exception flock(functionfcntl module floor division floor(functionmath module floordiv(functionoperator module _floordiv_ (method flush(method of bz compressor objects of bufferwriter objects of handler objects of iobase objects of compressobj objects of decompressobj objects of files of mmap objects flushkey(functionwinreg module fma(methodof decimal objects fmod(functionmath module fnmatch module fnmatch(functionfnmatch module fnmatchcase(functionfnmatch module foothow to shoot for statement and files and generators and tuple unpacking forcing garbage collection foreign function interfacectypes module fork(functionos module forkingmixin classsocketserver module forkingtcpserver classsocketserver module forkingudpserver classsocketserver module forkpty(functionos module format attributeof struct objects format codes for dates and times for string formatting operator % - format specifiers alignment characters customized fill character format(method of strings - nesting of fields format(function - format(method format specifier codes of formatter objects of strings - - of strings and variable interpolation _format_ (method - format_exc(functiontraceback module format_exception(functiontraceback module format_exception_only(functiontraceback module format_list(functiontraceback module format_stack(functiontraceback module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,511
format_tb(functiontraceback module format_tb(functiontraceback module from_address(methodof ctypes type objects format_value(methodof formatter objects from_buffer(methodof ctypes type objects formatargspec(functioninspect module from_buffer_copy(methodof ctypes type objects formatargvalues(functioninspect module from_decimal(methodof fraction class formatted printing - from_float(methodof fraction class formatted strings - from_iterable(methodof objects formatter class from_param(methodof ctypes type objects logging module string module fromfd(functionsocket module formatter module fromfile(methodof array objects formattingof log messages fromhex(methodof floating point formatwarning(functionwarnings module fromkeys(methodof dicts fortran common blockslack of fromordinal(method found_terminator(methodof asynchat objects fpathconf(functionos module fromlist(methodof array objects of date class of datetime class fpectl module fromstring(functionxml etree elementtree module fpformat module fromstring(methodof array objects fraction classfractions module fromtimestamp(method fractions module fragment attribute of urlparse objects of urlsplit objects of date class of datetime class fromutc(methodof tzinfo objects frozenset type frame objects - frozenset(function attributes of fstat(functionos module frametype type fstatvfs(functionos module free variablesin functions fsum(functionmath module freeze_support(functionmultiprocessing module fsync(functionos module frexp(functionmath module ftp(functionftplib module from _future_ import ftphandler classurllib request module from module import * global variables identifiers with underscores _all_ variable from statement and import statement module imports ftp serveruploading files to ftplib module ftruncate(functionos module full exceptionqueue module full(methodof queue objects func attributeof partial objects _func_ attributeof methods lib fl ff
18,512
funcname attributeof record objects function call operator () functions _doc_ attribute and coroutines and generators annotations in python anonymous as closures as dictionary values as objects attributes and decorators attributes of binding of default values built-in callback calling change in func_attribute names changing recursion limit copying attributes to decorator creating wrappers for decorators decorators and attributes default arguments defining delayed execution with threads documentation strings evaluation of arguments example of taking any number of arguments free variables keyword arguments lambda operator modifying global variables mutable parameters nested optional arguments and none parameter passing partial evaluation pickling of recursion returning multiple values from running in the debugger scoping rules side effects termination functions type of built-in type of user-defined user-defined user-defined attributes variable arguments variable number of keyword arguments functiontype type functools module functor funny_files attributeof dircmp objects future featuresenabling _future_ module and division list of features future_builtins module futurewarning warning fuzzy date and time parsing gaierror exceptionsocket module gammavariate(functionrandom module garbage collection - and _del_ (method and cycles and program termination description of process observer pattern example problem with _del_ (method garbage variablegc module gauss(functionrandom module gc module gcd(functionfractions module gdbm module ge(functionoperator module _ge_ (method generator expressions - how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,513
generator expressions conditional expressions converting into list difference from list comprehension generator functionand context managers generator objects attributes of generatorexit exception generators - and break statement in iteration and memory efficiency and processing pipelines closing concurrent programming execution model handling of generatorexit exception multitasking example practical use of recursion throwing exception in use with / - use with wsgi generatortype type get(functionwebbrowser module get(method of asyncresult objects of configparser objects of element objects of message objects of queue objects of dicts _get_ (methodof descriptors get_content_subtype(methodof message objects get_content_type(methodof message objects get_count(functiongc module get_data(methodof request objects get_debug(functiongc module get_default_type(methodof message objects get_dialect(functioncsv module get_errno(functionctypes module get_field(methodof formatter objects get_filename(methodof message objects get_full_url(methodof request objects get_host(methodof request objects get_last_error(functionctypes module get_logger(functionmultiprocessing module get_method(methodof request objects get_nowait(methodof queue objects get_objects(functiongc module get_origin_req_host(methodof request objects get_osfhandle(functionmsvcrt module get_param(methodof message objects get_all(methodof message objects get_params(methodof message objects get_boundary(methodof message objects get_payload(methodof message objects get_charset(methodof message objects get_referents(functiongc module get_charsets(methodof message objects get_selector(methodof request objects get_content_charset(methodof message objects get_server_certificate(functionssl module get_content_maintype(methodof message objects get_starttag_text(methodof htmlparser objects get_referrers(functiongc module lib fl ff
18,514
get_terminator(methodof asynchat objects getdefaulttimeout(functionsocket module get_threshold(functiongc module getdlopenflags(functionsys module get_type(methodof request objects getdoc(functioninspect module get_unixfrom(methodof message objects geteffectivelevel(methodof logger objects get_value(methodof formatter objects getegid(functionos module getaddrinfo(functionsocket module getargspec(functioninspect module getargvalues(functioninspect module getatime(functionos path module getattr(function and private attributes _getattr_ (method and _slots_ getelementsbytagname(method of dom document objects of dom element objects getelementsbytagnamens(method of dom document objects of dom element objects geteuid(functionos module getfile(functioninspect module getfilesystemencoding(functionsys module getattribute(methodof dom element objects getfirst(methodof fieldstorage objects _getattribute_ (method - getfloat(methodof configparser objects and _slots_ getattributens(methodof dom element objects getfqdn(functionsocket module getboolean(methodof configparser objects getframeinfo(functioninspect module getch(functionmsvcrt module getgid(functionos module getche(functionmsvcrt module getgroups(functionos module getcheckinterval(functionsys module getheader(methodof httpresponse objects getchildren(methodof element objects getheaders(methodof httpresponse objects getclasstree(functioninspect module gethostbyaddr(functionsocket module getcode(methodof urlopen objects gethostbyname(functionsocket module getcomments(functioninspect module getcontext(functiondecimal module _getframe(functionsys module gethostbyname_ex(functionsocket module getcwd(functionos module gethostname(functionsocket module getcwdu(functionos module getinfo(methodof zipfile objects getdefaultencoding(functionsys module getinnerframes(functioninspect module getctime(functionos path module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,515
getint(methodof configparser objects getint(methodof configparser objects getpeercert(methodof ssl objects getitem(functionoperator module getpeername(methodof socket objects _getitem_ (method - getpgid(functionos module and slices getpgrp(functionos module getiterator(method getpid(functionos module of element objects of elementtree objects getpos(methodof htmlparser objects getitimer(functionsignal module getppid(functionos module getlength(methodof sax attributes objects getprofile(functionsys module getlevelname(functionlogging module getlist(methodof fieldstorage objects getprotobyname(functionsocket module getqnamebyname(methodof sax attributes objects getloadavg(functionos module getqnames(methodof sax attributes objects getlogger(functionlogging module getrandbits(functionrandom module getlogin(functionos module getrecursionlimit(functionsys module getmember(methodof tarfile objects getrefcount(functionsys module getmembers(functioninspect module getresponse(methodof httpconnection objects getmembers(methodof tarfile objects getroot(methodof elementtree objects getmodule(functioninspect module getservbyname(functionsocket module getmoduleinfo(functioninspect module getmodulename(functioninspect module getservbyport(functionsocket module getsetdescriptortype type getmro(functioninspect module getsid(functionos module getmtime(functionos path module getsignal(functionsignal module getname(methodof thread objects getsize(functionos path module getnamebyqname(methodof sax attributes objects getsizeof(functionsys module getnameinfo(functionsocket module getsockname(methodof socket objects getnames(methodof sax attributes objects getsockopt(methodof socket objects getnames(methodof tarfile objects getsource(functioninspect module getopt module getsourcefile(functioninspect module getouterframes(functioninspect module getoutput(functioncommands module getslice(functionoperator module getsourcelines(functioninspect module getstate(functionrandom module lib fl ff
18,516
_getstate_ (method and copying and pickle module global interpreter lock and multiprocessing module releasing in extensions getstatusoutput(functioncommands module global statement gettarinfo(methodof tarfile objects global variables gettempdir(functiontempfile module gettempprefix(functiontempfile module gettext module gettimeout(methodof socket objects getting helphelp(function getting the current working directory gettrace(functionsys module gettype(methodof sax attributes objects and modules and eval() and modules difference from and fortran modifying in function storage of in stack frames _globals_ attributeof functions globals(function gmtime(functiontime module gname attributeof tarinfo objects goto statementlack of gray-bearded hacker getuid(functionos module greater than operator > geturl(methodof urlopen objects greater than or equal to operator >= _getvalue(methodof baseproxy objects green threads getvalue(methodof sax attributes objects group(methodof matchobject objects getvalue(method groupby(functionitertools module of bytesio objects of fieldstorage objects of stringio objects greenlets groupdict(methodof matchobject objects groupindex attributeof regex objects getvaluebyqname(methodof sax attributes objects groups(methodof matchobject objects getwch(functionmsvcrt module grp module getwche(functionmsvcrt module gt(functionoperator module getweakrefcount(functionweakref module _gt_ (method getweakrefs(functionweakref module getwindowsversion(functionsys module gi_attributesof generator objects guess_all_extensions(functionmimetypes module guess_extension(functionmimetypes module guess_type(functionmimetypes module glob module gui programminguse of partial function evaluation glob(functionglob module guisand network programming gid attributeof tarinfo objects how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,517
gzip module gzip module gzipfile(functiongzip module has_data(methodof request objects has_header(method of request objects of sniffer objects - command line option has_ipv variablesocket module (elpdebugger commandpdb module has_key(methodof dicts handle(functioncgitb module has_option(methodof configparser objects handle(methodof baserequesthandler objects has_section(methodof configparser objects handle_accept(methodof dispatcher objects hasattr(function handle_charref(methodof htmlparser objects handle_close(methodof dispatcher objects handle_comment(methodof htmlparser objects handle_connect(methodof dispatcher objects handle_data(methodof htmlparser objects handle_decl(methodof htmlparser objects and private attributes hasattribute(methodof dom element objects hasattributens(methodof dom element objects hasattributes(methodof dom node objects haschildnodes(methodof dom node objects hash table hash table based databases hash(function handle_endtag(methodof htmlparser objects _hash_ (method handle_entityref(methodof htmlparser objects hashlib module handle_error(method header_offset attributeof zipinfo objects of socketserver class of dispatcher objects handle_expt(methodof dispatcher objects handle_pi(methodof htmlparser objects hashable abstract base class example of headers attribute of basehttprequesthandler objects of fieldstorage objects heap handle_read(methodof dispatcher objects heapify(functionheapq module handle_startendtag(methodof htmlparser objects heappop(functionheapq module handle_starttag(methodof htmlparser objects handle_timeout(methodof socketserver class handle_write(methodof dispatcher objects heapmin(functionmsvcrt module heappush(functionheapq module heappushpop(functionheapq module heapq module heapreplace(functionheapq module hello world program lib fl ff
18,518
help(function bizarre output with decorators herror exceptionsocket module hex(function future_builtins module hex(methodof floating point hexadecimal creating strings from integers integer literals hexdigest(method of digest objects of hmac objects hexdigits variablestring module hexversion variablesys module htons(functionsocket module http cookies http protocol description of request methods response codes http server custom handling of requests example with asynchat module example with asyncore module example with coroutines example with firewall standalone example uploading files in post request hiding attribute names from dir(function http package hierarchical locking http cookiejar module hierarchical logginglogging module http cookies module hierarchy of exceptions - http server module hierarchy of objects httpbasicauthhandler classurllib request module - highest_protocol constantpickle module hkey_constantswinreg module hmac authentication hmac module hostname attribute of urlparse objects of urlsplit objects hostnameobtaining for host machine hour attributeof time objects html forms example of uploading with urllib package html parsing html parser module htmlparser classhtml parser module http client module httpconnection(functionhttp client module httpcookieprocessor classurllib request module - httpdefaulterrorhandler classurllib request module httpdigestauthhandler classurllib request module - httperror exceptionurllib error module httpexception exceptionhttp client module httphandler class logging module urllib request module httplib modulesee http client htmlparser modulesee html parser httpredirecthandler classurllib request module htmlparsererror exceptionhtml parser module httpresponse objectshttp client module htonl(functionsocket module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,519
httpsconnection(functionhttp client module ignore_environment attributeof sys flags httpserver classhttp server module ignore_pattern(functionshutil module httpshandler classurllib request module hypot(functionmath module ignore_zeros attributeof tarfile objects ignored nameerror exception in _del_ ignoring exceptions - command line option - _ilshift_ (method / bufferingand generators imag attribute / multiplexing _iadd_ (method of complex numbers of floating point _iand_ (method imap(functionitertools module ibm general decimal arithmetic standard imap(methodof pool objects id(function imap_unordered(methodof pool objects ident attributeof thread objects imaplib module identifiers imghdr module and first-class data case sensitivity reserved words usage of underscores use of unicode in python identity comparison of objects identity of objects identity operator is _idiv_ (method _idivmod_ (method idle - and standard / streams ieee if statement and _debug_ variable ifilter(functionitertools module ifilterfalse(functionitertools module _ifloordiv_ (method iglob(functionglob module ignorablewhitespace(methodof contenthandler objects ignore debugger commandpdb module 'ignoreerror handlingunicode encoding immutabilityof tuples immutable typesinheriting from immutabledefinition of _imod_ (method imp module implicit type conversionlack of import statement - - python absolute imports in packages and main program and sys modules and sys path variable as qualifier case sensitivity compilation of pyc files execution of modules module search path multiple modules one-time execution of modules packages placement within program relative package imports - scoping rules of loaded code types of modules importerror exception lib fl ff
18,520
importing selected symbols from module improperconnectionstate exceptionhttp client module _imul_ (method in operator and _contains_ method and checking for substrings on dicts on sequences on strings on tuples indexing -based indexof(functionoperator module indices(methodof slices inet_aton(functionsocket module inet_ntoa(functionsocket module inet_ntop(functionsocket module inet_pton(functionsocket module in-place assignment operators inexact representation of floating point in-place file updates inf variabledecimal module in-place mathematical operators inf in-place modification of lists of sets in_dll(methodof ctypes type objects inaddr_constantssocket module incompleteread exceptionhttp client module incrementaldecoder classcodecs module incrementaldecoder(methodof codecinfo objects incrementalencoder classcodecs module incrementalencoder(methodof codecinfo objects indentation and documentation strings and line continuation character \ and tabs preferred style putting statements on the same line indentationerror exception index(method of array objects of lists - of strings indexerror exception indexing operator [] decimal module infinity info(method of logger objects of urlopen objects infolist(methodof zipfile objects inheritance _mro_ attribute of classes abstract base classes attribute binding calling methods in superclasses from built-in types from immutable types initialization of superclasses interaction with_ _slots_ internal optimization of isinstance(function issubclass(function metaclasses method resolution order multiple inheritance preventing redefinition of methods private methods use with exceptions ini files configuring logging with reading from python init(functionmimetypes module on lists on sequences how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,521
_init_ (method _init_ (method - and exceptions and inheritance and instance creation and metaclasses and pickle defining multiple instance creation methods of classes _init_ py files in packages input(function python insert(method of element objects of array objects of lists insertbefore(methodof dom node objects inserting items into dictionary inserting items into list insort(functionbisect module insort_left(functionbisect module insort_right(functionbisect module int(function _int_ (method - and type coercion integer divisionpython integers ' complement representation as dictionary key automatic promotion to long conversion to longs creating hexadecimal strings creating random overflow behavior range of specifying as hexoctalor binary integral abstract base class integrityerror exceptiondatabase api interactive attributeof sys flags interactive mode and blank lines display of results interactive terminal interfaceerror exceptiondatabase api inspect attributeof sys flags internal_attr attributeof zipinfo objects inspect module internalerror exceptiondatabase api inspecting objectswith dir() international characters install commandof setup py files and string comparison in source code install_opener(functionurllib request module interpolationof values in strings installation of third-party packages interpreter in user directory installing package instance methods _instancecheck_ (method instances as callable attribute assignment attribute deletion creation of definition of pickling of type of interpreter command line options interpreter environment variables interpreter prompts interpreter- and -tt options interprocess communication (ipc) interrupt(methodof connection objects intersection operator &of sets intersection(methodof sets intersection_update(methodof sets interval timer instantiation of abstract base class introspection of objects int type inv(functionoperator module lib fl ff
18,522
invalidurl exceptionhttp client module isalnum(methodof strings invert(functionoperator module isatty(functionos module _invert_ (method isatty(method io module python problems associated with isalpha(methodof strings of iobase objects of files isblk(methodof tarinfo objects iobase abstract base class isbuiltin(functioninspect module iobase classio module ischr(methodof tarinfo objects ioctl(functionfcntl module isclass(functioninspect module ioctl(methodof socket objects iscode(functioninspect module ioerror exception isdaemon(methodof thread objects _ior_ (method ip_socket optionssocket module isdatadescriptor(functioninspect module _ipow_ (method isdev(methodof tarinfo objects ipproto_constantssocket module isdigit(methodof strings ipv protocol isdir(functionos path module address format ipv protocol address format ipv _socket optionssocket module - ironpython isdir(methodof tarinfo objects isdisjoint(methodof sets iselement(functionxml etree elementtree module isenabled(functiongc module example of isenabledfor(methodof logger objects _irshift_ (method isfifo(methodof tarinfo objects is operatorobject identity isfile(functionos path module is_(functionoperator module isfile(methodof tarinfo objects is_alive(method isframe(functioninspect module of process objects of thread objects isfunction(functioninspect module isgenerator(functioninspect module is_multipart(methodof message objects isgeneratorfunction(functioninspect module is_not(functionoperator module isinf(functionmath module is_set(methodof event objects isinstance(function - is_tarfile(functiontarfile module is_unverifiable(methodof request objects and inheritance and proxy objects redefining behavior of is_zipfile(functionzipfile module islice(functionitertools module isabs(functionos path module islink(functionos path module isabstract(functioninspect module islnk(methodof tarinfo objects isalive(methodof thread objects islower(methodof strings how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,523
ismethod(functioninspect module ismethod(functioninspect module ismethoddescriptor(functioninspect module ismodule(functioninspect module ismount(functionos path module isnan(functionmath module iso- - encodingdescription of isocalendar(methodof date objects isoformat(method of date objects of time objects isoweekday(methodof date objects isreg(methodof tarinfo objects isreservedkey(methodof morsel objects isroutine(functioninspect module issamenode(methodof dom node objects isspace(methodof strings issubclass(function redefining behavior of over sequence over dictionary keys over dictionary values over multiple sequences portable function for next(operation protocol change in python protocol of scope of iteration variable supported objects unpacking of tuples iterator abstract base class iteratorsuse in python iterdecode(functioncodecs module iterdump(methodof connection objects iterencode(functioncodecs module iterencode(methodof jsonencoder objects iterkeyrefs(methodof weakkeydictionary objects issubset(methodof sets iterparse(functionxml etree elementtree module issuperset(methodof sets itertools module issym(methodof tarinfo objects istitle(methodof strings itervaluerefs(methodof weakvaluedictionary objects istraceback(functioninspect module _itruediv_ (method _isub_ (method _ixor_ (method isupper(methodof strings izip(functionitertools module itemgetter(functionoperator module items(method of configparser objects of element objects of message objects of dicts of dicts in python izip_longest(functionitertools module characteron complex number literals itemsize attributeof array objects (umpdebugger commandpdb module itemsview abstract base class java iter(function difference in class system _iter_ (method javascriptpop-up window example iterable abstract base class join(functionos path module iteration join(method breaking out of loop iteration variable of joinablequeue objects of pool objects lib fl ff
18,524
of process objects of queue objects of thread objects of strings keys acceptable types for dictionaries of dicts keysview abstract base class join_thread(methodof queue objects keyword arguments joinablequeue(functionmultiprocessing module keyword module js_output(method of morsel objects of simplecookie objects json (javascript object notation) mixing with positional arguments keyword-only argumentspython keywords attributeof partial objects kill(functionos module kill(methodof popen objects killpg(functionos module json module difference from pickle and marshal kqueuebsd jsondecoder classjson module jsonencoder classjson module jumpahead(functionrandom module characteron long integers jython lambda operator example of (istdebugger commandpdb module alternatives to - lambdatype type kbhit(functionmsvcrt module key attributeof morsel objects key index operator [] of dicts key keyword argumentto sort() key_constantswinreg module keyboard interrupts keyboardinterrupt class last_accepted attributeof listener objects last_traceback variablesys module last_type variablesys module last_value variablesys module lastchild attributeof dom node objects lastgroup attributeof matchobject objects keyboardinterrupt exception - lastindex attributeof matchobject objects keyerror exception latin- encodingdescription of keyrefs(methodof weakkeydictionary objects launching web browser keys(method launching subprocesses of element objects of message objects of dicts of dicts in python launching python applications examples lazy evaluation lchflags(functionos module lchmod(functionos module lchown(functionos module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,525
ldexp(functionmath module ldexp(functionmath module line structure of programs le(functionoperator module _le_ (method line_buffering attributeof textiowrapper objects leading on integersbinary linecache module leading on integersoctal lineno attributeof record objects leading on integershexadecimal linesep variableos module leading character on string literalsbyte strings link(functionos module leading character on stringsraw strings linux leading character on string literalsunicode strings left shift operator left_list attributeof dircmp objects left_only attributeof dircmp objects legacy codeand exec statement len(function on dicts on mappings - on sequences - on sets _len_ (method and truth testing length attributeof httpresponse objects less than operator less than or equal to operator <= letters variablestring module levelname attributeof record objects linkname attributeof tarinfo objects linux link-level packet protocol address format linuxepoll interface list comprehensions and declarative programming conditional expressions creation of tuples within difference from generator expression general syntax of scope of iteration variable similiarity to sql queries similiarity to awk command list of unix signal names list type list(function applied to dictionaries list(method of manager objects of tarfile objects levelno attributeof record objects list_dialects(functioncsv module lexical scoping listdir(function lexicographical ordering of utf- of strings lexists(functionos path module lifoqueue(functionqueue module python os module listen(method of dispatcher objects of socket objects limit_denominator(methodof fraction objects listener classmultiprocessing module limiting the output of error tracebacks lists line continuation character \ line continuationand parenthesesbracesor brackets line separator character for files appending to as sequence compared to array objects comparison of concatenation lib fl ff
18,526
counting items deletion of items empty equality of indexing operator inefficiency of insert() inserting items item assignment keeping in sorted order list comprehension making shallow copy of nested random shuffling reassigning slice removing items reversing searching shared by multiple processes slice assignment slice deletion slices sorting versus deque versus tuples little endian format little endianpacking and unpacking ljust(methodof strings ln(methodof decimal objects load(function json module marshal module pickle module load(method of simplecookie objects of unpickler objects loads(function json module marshal module pickle module xmlrpc client module local storage for threads local variables and eval() storage of in stack frames use before defined local(functionthreading module localcontext(functiondecimal module locale module locale settingand string comparison localname attributeof dom node objects locals(function localtime(functiontime module lock object multiprocessing module threading module lock(methodof manager objects lock_constantsflock(function lockf(functionfcntl module locking(functionmsvcrt module locking avoiding deadlock files on windows multiprocessing module of critical sections of files threading module locks and context managers and exceptions proper management of log filesreal-time monitoring example log(functionmath module log(methodof logger objects log (functionmath module log (methodof decimal objects log (functionmath module log_error(methodof basehttprequesthandler objects log_message(methodof basehttprequesthandler objects how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,527
log_request(methodof basehttprequesthandler objects log_request(methodof basehttprequesthandler objects lowercase variablestring module logadapter(functionlogging module lshift(functionoperator module logging module _lshift_ (method adding extra fields to log messages and multiprocessing module basic configuration configuring with ini files filtering messages formatting of messages handler objects how to configure including exceptions in log messages issuing log messages logger hierarchy message handling message propagation picking logger names using null logger login(method of ftp objects of smtp objects lseek(functionos module lstat(functionos module lstrip(methodof strings lt(functionoperator module _lt_ (method lwpcookiejar classhttp cookiejar module - command line option - - pdb option to interpreter mailbox module mailcap module main program execution main programand pickle module main thread _main_ module main(functionunittest module lognormvariate(functionrandom module _main_ _check needed for multiprocessing module long integers major(functionos module and integers automatic promotion from integers make_server(functionwsgiref simple_server module long type makedev(functionos module long(function makedirs(functionos module _long_ (method - makefile(methodof socket objects lookup tableand dictionaries maketrans(functionstring module lookup(function making timing measurements codecs module unicodedata module managed objectsmultiprocessing module lookuperror exception manager(functionmultiprocessing module loop(functionasyncore module looping breaking out prematurely keeping loop counter while statement loose-coupling of objects low-level file manipulation lower(methodof strings mant_dig attributeof sys float_info map(function and python and optimization future_builtins module map(methodof pool objects map-reducemultiprocessing module lib fl ff
18,528
map_async(methodof pool objects mapping abstract base class mappings deletion of items key index operator special methods of mappingview abstract base class marshal module match(functionre module match(methodof regex objects matchobject objectsre module math module mathematical operators in-place mixed types - mathematical special methods max attribute of date class of datetime class of sys float_info of time class of timedelta class memory efficiency and _slots_ of generator expressions of generators memory management checking for leaks creation of instances garbage collection reference counting memory mapped files and ipc memory use array objects measuring obtaining size of objects tuples versus lists memorylocation of objects memoryerror exception memoryhandler classlogging module memset(functionctypes module merge(functionheapq module mersenne twister max(function - message classemail package on sets required methods for user-defined objects message attributeof exception objects max_ _exp attributeof sys float_info max_exp attributeof sys float_info maxint variablesys module maxsize variablesys module maxunicode variablesys module md (functionhashlib module memberdescriptortype type membership test of dicts of sequences memmove(functionctypes module memoization of results message digests message passing - and coroutines and synchronization coroutines definition of sending byte buffers sending objects between processes message propagationof log messages message queues coroutines multiprocessing module message_from_file(functionemail package message_from_string(functionemail package how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,529
metaclass keyword argumentof class definitions metaclass keyword argumentof class definitions _metaclass_ attributeof classes migrating code python to practical strategy _metaclass_ global variable mimeapplication classemail package metaclasses mimeaudio classemail package _prepare_ (method - and descriptors and inheritance caution on use example of how to define performance benefits use of _new_ (method use of custom dictionary object method resolution orderand typeerror exception method resolution _mro_ attribute multiple inheritance single inheritance methodcaller(functionoperator module methodhelp(methodof serverproxy objects methods bound calling process class @classmethod decorator defining in classes definition of handling as properties preventing redefinition in subclasses static @staticmethod decorator type of type of built-in unbound use of super(function mimeimage classemail package mimemessage classemail package mimemultipart classemail package mimetext classemail package mimetypes module min attribute of date class of datetime class of sys float_info of time class of timedelta class min(function - on sets required methods for user-defined objects min_ _exp attributeof sys float_info min_exp attributeof sys float_info minimum requirements for supporting equality minor(functionos module minute attributeof time objects mirrored(functionunicodedata module missing parentheseseand tuples mixed-type mathematical operations - mixin classes mixing byte strings and unicode mkd(methodof ftp objects mkdir(functionos module mkdtemp(functiontempfile module mkfifo(functionos module mknod(functionos module mkstemp(functiontempfile module methodsignatures(methodof serverproxy objects mktemp(functiontempfile module methodtype type - mmap module microsecond attributeof time objects mmap(functionmmap module microthreading mod(functionoperator module mktime(functiontime module lib fl ff
18,530
_mod_ (method move(functionshutil module mode attribute move(methodof mmap objects of fileio objects of tarinfo objects of files moving the file pointer mozillacookiejar classhttp cookiejar module modf(functionmath module _mro_ attributeof classes modifying global variables from function msg_constantssocket module modifying the module search path mtime attributeof tarinfo objects module attributeof record objects mul(functionoperator module module loading _mul_ (method module reloading multi-dimensional lists module search path multicall(functionxmlrpc client module and site module and zip files modifying setting with environment variable msvcrt module multicoreand program execution multiple inheritance - multiple statements on the same line module unloading multiplexingof / _module_ attributeof types multiplication operator * modulefinder module multiprocessing module modules variablesys module modules accessing classes and pyc files as objects attribute access attributes of dynamic loading global namespace for functions importing multiple one-time execution search path of self-testing with doctest type of type of module object types of recognized files using to write extensible programs moduletype type modulo operator % month attributeof date objects morsel classhttp cookies module and global interpreter lock and pickle connecting separate processes distributed computing logging managed objects passing list through shared memory pipes process pools queues shared memory synchronization primitives use of _main_ check multithreaded chicken mutability default function arguments dictionary keys function parameters in-place assignment operators reference counting how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,531
mutabledefinition of mutabledefinition of mutablemapping abstract base class namespace(methodof manager objects mutablesequence abstract base class namespace mutableset abstract base class mutual exclusion lock mysqlaccesing from python \ escape codein strings (extdebugger commandpdb module name attribute of fieldstorage objects of fileio objects of process objects of record objects of tarinfo objects of thread objects of files name manglingof private attributes name variableos module _name_ attribute of built-in functions of functions of methods of modules of types _name_ variableof modules name(functionunicodedata module named tuples use as tuples use by standard library namedtemporaryfile(functiontempfile module namedtuple(functioncollections module nameerror exception nameerror exception in _del_ ignored and classes and import statement local variables of function namespaceuri attributeof dom node objects nan variabledecimal module nan not number not numberdecimal module ne(functionoperator module _ne_ (method neg(functionoperator module _neg_ (method negative indices - neginf variabledecimal module nested classesproblem with pickle nested functions and closures nested lists nested(functioncontextlib module netlink protocol address format netloc attribute of urlparse objects of urlsplit objects netrc module network programming modulespython reorganization network programming unicode encoding asynchronous event-driven programming getting hostname introduction performance of polling new(function nameerror exceptionand variable lookup hashlib module hmac module namelist(methodof zipfile objects _new_ (method - and instance creation and metaclasses lib fl ff
18,532
caution when reading code use by immutable types uses of none and default arguments return statement in functions newline characterdifference on unix/windows nonlocal statementpython newline escape code in strings normalize(functionunicodedata module newline parameterto open(function newline suppressionprint statement newline termination of statements newlines attribute of textiowrapper objects of files next(function next(method of tarfile objects of files of generators of iterators use with coroutines _next_ (method python of generators of iterators nextset(methodof cursor objects nextsibling attributeof dom node objects ni_constantssocket module nice(functionos module nis module nlargest(functionheapq module nntplib module no_site attributeof sys flags nodename attributeof dom node objects normalization of unicode strings normalize(methodof dom node objects normalvariate(functionrandom module normcase(functionos path module normpath(functionos path module not equal to operator != not operatorboolean expressions not_(functionoperator module notconnected exceptionhttp client module notify(methodof condition objects notify_all(methodof condition objects notimplementederror exception notsupportederror exceptiondatabase api now(methodof datetime class nsmallest(functionheapq module nteventloghandler classlogging module ntohl(functionsocket module ntohs(functionsocket module ntransfercmd(methodof ftp objects null object null values null-terminated stringsand utf- nodetype attributeof dom node objects number abstract base class nodevalue attributeof dom node objects numbers module non-printing charactersspecifying in string literals number of cpus on system numbersexample of defining new type numerator attribute of fraction objects of integers how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,533
numeric dataand strings numeric literals - numeric type coercision - numeric type hierarchy numeric types serializing with marshal serializing with pickle sharing in the interpreter supporting iteration type of weak references to numeric(functionunicodedata module observer pattern numpy extension oct(function future_builtins module octal integer literals octdigits variablestring module - command line option - object object base class object(function objects attributes of class of comparison comparison in python container or collection defining null object definition of first-class status getting list of referrers getting the size of hierarchy of how to copy identity of inspecting with dir() instance of introspection of methods for comparison name of obtaining size of persistence proxies in multiprocessing module reference counting of representation of requirements for ordering sending between processes with pipes sending between processes with queues old-style classes -oo command line option - open(function python codecs module codecs module and python dbm module description of file modes difference between python and gzip module io module os module shelve module tarfile module webbrowser module open(method of zipfile objects of controller objects open_new(functionwebbrowser module open_new(methodof controller objects open_new_tab(functionwebbrowser module open_osfhandle(functionmsvcrt module openkey(functionwinreg module openkeyex(functionwinreg module openpty(functionos module openssl example of creating certificates operating systemscheduling by lib fl ff
18,534
operationalerror exceptiondatabase api operator module alternative to lambda use in optimization operator overloading example of order of operands reversed operands type coercion operators mathematical precedence of optimization _slots_ attribute of classes array objects attribute binding - built-in types creation of instances decorators and metaclasses definition of speedup deque objects dict(function dict lookups dicts versus classes disassembly effect of adding layers exceptions - formatting of log messages functional programming impact of / polling internal type cache lists versus array objects logging module making timing measurements map(and filter(functions marshal versus pickle measuring memory use repeated timing measurements select(function sorting callback functions speedup tuning strategies use of io module use of multiprocessing pools use of operator module user defined classes optimize attributeof sys flags optimized modeenabling with an environment variable optional function arguments and none optionparser(functionoptparse module options(methodof configparser objects optionxform(methodof configparser objects optparse module example or operatorboolean expressions or_(functionoperator module _or_ (method ord(function order of evaluation attempts to modify order of operandsoperator overloading organizing code for distribution os os module os environ variable os path module oserror exception ossaudiodev module output(method of morsel objects of simplecookie objects outputstring(methodof morsel objects overflowlack of with integers overflowerror exception how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,535
debugger commandpdb module p_constantsspawnv(function pack(functionstruct module pack(methodof struct objects pack_into(functionstruct module pack_into(methodof struct objects packages relative import - packet_constantssocket module packing binary data structures of tuples pairscreating list of from dictionary parallel iteration over sequences parameter passing to functions params attributeof urlparse objects paramstyle variabledatabase api pardir variableos module parent class parentnode attributeof dom node objects paretovariate(functionrandom module parse(function xml dom minidom module xml etree elementtree module xml sax module parse(method of elementtree objects of formatter objects parse_args(methodof optionparser objects parsing csv files html urls xml command line options email messages form fields in cgi scripts large xml documents with elementtree robots txt file partial(function functools module use with network handlers partition(methodof strings pass statement password attribute of urlparse objects of urlsplit objects path attribute of basehttprequesthandler objects of urlparse objects of urlsplit objects path variable os module sys module _path_ attributeof modules _path_ variablein packages pathconf(functionos module pathname attributeof record objects pathsep variableos module pattern attributeof regex objects pattern syntaxregular expressions parse_header(functioncgi module pause(functionsignal module parse_multipart(functioncgi module pdb module parse_qs(functionurllib parse module debugging programs from command shell pdbrc configuration file parse_qsl(functionurllib parse module pdbrc configuration file parser module peek(methodof bufferreader objects parsestring(function xml dom minidom module xml sax module pem_cert_to_der_cert(functionssl module lib fl ff
18,536
pep python database api specification pipescreating with subprocess module pep (wsgi) pkgutil module per-user site directory placement of decorators installing packages in performance of binary file / - of generator expressions of logging module of type checking perl and dynamic scope interpretation of numeric strings vs python permutations(functionitertools module persistent dictionaryshelve module phpinterpretation of numeric strings vs python pi variablemath module pickle module platform module platform variablesys module plistlib module plock(functionos module pm(functionpdb module pointer(functionctypes module pointer(functionctypes module poll(functionselect module poll(method of connection objects of poll objects of popen objects pollconstantsselect module polling performance of - polymorphism _main_ module and multiprocessing module cpickle incompatible objects interaction with copy module protocol selection - security concerns used by shelve pool(functionmultiprocessing module pickle protocolselecting in shelve module popen(functionsubprocess module pickler classpickle module popitem(methodof dicts pickletools module popleft(methodof deque objects pid attribute poplib module of popen objects of process objects pipe(functionmultiprocessing module pipe(functionos module pipelines and generators pop(method of array objects of deque objects of dicts of lists of sets popen(functionos module port attribute of urlparse objects of urlsplit objects port number in network programs list of well known pipelinesand generators - portabilityof marshal module pipes module portable manipulation of filenames how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,537
pos attributeof matchobject objects pos attributeof matchobject objects pos(functionoperator module print_environ_usage(functioncgi module _pos_ (method print_exc(functiontraceback module posix interface print_exception(functiontraceback module posix attributeof tarfile objects post_mortem(functionpdb module pow(function math module _pow_ (method power operator ** print_form(functioncgi module print_last(functiontraceback module print_stack(functiontraceback module pp debugger commandpdb module print_tb(functiontraceback module - pprint module printable variablestring module preamble attributeof message objects printdir(methodof zipfile objects prec attributeof context objects printing to the screen precisionof floating point printing predicate(functionitertools module prefix attributeof dom node objects --prefix option to setup py printf(function equivalent creating custom formatters dates and times formatted prefix variablesys module priority queue _prepare_ (methodpython metaclasses - priorityqueue(functionqueue module preventing the creation of pyc files private attributes previoussibling attributeof dom node objects print statement and _str_ () and sys stdout file redirection formatted output newline suppression softspace attribute of files syntax error with python trailing comma print(function python enabling in python file redirection newline suppression separator character print_directory(functioncgi module print_environ(functioncgi module and properties name mangling of private class members private methodsand inheritance private specifierlack of probabilityrandom number distributions process attributeof record objects process idgetting process(functionmultiprocessing module processes connecting with pipes daemonic definition of joining scheduling of sending signals to terminating - worker pools lib fl ff
18,538
processinginstruction(functionxml etree elementtree module proto attributeof socket objects processinginstruction(methodof contenthandler objects protocol_version attributeof basehttprequesthandler class producer-consumer protocolerror exceptionxmlrpc client module with coroutines with pipes with queues with threads and condition variables with threads and semaphores product(functionitertools module profile module profiling interpreting output program execution model program executionmain program program structure program termination and garbage collection brutal brute force ignored nameerror exception registering cleanup functions programming errorslack of compiler checking programmingerror exceptiondatabase api prompts changing interactive mode propagate attributeof logger objects properties and _setattr_(method and private attributes definition of set and delete functions uniform access principle use by methods @property decorator property(function protocol parameterto pickle functions proxiesand attribute binding methods proxy proxy functions proxy objects and multiprocessing module problem with type checking proxy(functionweakref module proxybasicauthhandler classurllib request module - proxydigestauthhandler classurllib request module - proxyhandler classurllib request module - proxytypes classweakref module ps variablesys module ps variablesys module pth filessite configuration pty module punctuation variablestring module push(methodof asynchat objects push_with_producer(methodof asynchat objects put(methodof queue objects put_nowait(methodof queue objects putch(functionmsvcrt module putenv(functionos module putheader(methodof httpconnection objects putrequest(methodof httpconnection objects putwch(functionmsvcrt module pwd module pwd(methodof ftp objects protected specifierlack of how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,539
py files and library modules py app package py exe package py k_warning attributeof sys flags py kwarning variablesys module py_begin_allow_threads macro py_buildvalue(function py_compile module py_decref(macro py_end_allow_threads macro py_finalize(function py_getexecprefix(function py_getpath(function py_getprefix(function py_getprogramfullpath(function py_incref(macro pyerr_setstring(function pyeval_callobject(function pyeval_callobjectwithkeywords(function pyexc_exceptionsin extension modules pyfloat_asdouble(function pyimport_importmodule(function pyint_aslong(function pylong_aslong(function pymodule_addintconstant(function pymodule_addintmacro(function pymodule_addobject(function pymodule_addstringconstant(function pymodule_addstringmacro(function pyo files when created py_initialize(function pyobject_getattrstring(function py_isinitialized(function pyobject_setattrstring(function py_setprogramname(function pypi (python package index) py_xdecref(macro pyprocessing library py_xincref(macro pyrun_anyfile(function pyarg_parsetuple(function pyrun_interactiveloop(function pyarg_parsetupleandkeywords(function pyrun_interactiveone(function pybytes_asstring(function pyc files compilation on import preventing the creation of when created pyclbr module pyd filescompiled extensions pydev pydoc command pyerr_clear(function pyerr_exceptionmatches(function pyerr_nomemory(function pyerr_occurred(function pyerr_setfromerrno(function pyerr_setfromerrnowithfilename(function pyerr_setobject(function pyrun_simplefile(function pyrun_simplestring(function pystring_asstring(function pysys_setargv(function python to tool - ellipsis as an expression / system unicode characters in identifiers _next_ (method absolute imports abstract base class adoption of and wsgi byte strings and system interfaces chained exceptions command line options commands module lib fl ff
18,540
comparison dictionary comprehension dictionary operations difference in extension modules different behavior of byte strings division operator encode(and encode(methods environment variables exception attributes exec(function extended iterable unpacking filenames files filter(function function annotations generator changes import statement incompatibility with python integer division interactive mode encoding issues iterator protocol keyword-only arguments map(function metaclasses - migration pitfalls network programming next(method of generators nonlocal statement open(function practical porting strategy print(function raw_input(function reorganization of network modules round(function set comprehension set literals socketserver module standard library reorganization super(function supporting both python and syntax error with print third party libraries types module unbound methods unicode(function removal using new built-in functions in python view objects on dicts viewing objects in ascii who should use xrange(and range(functions xrange(function removal zip(function python interpreter pythonenvironment variables python header filein extensions pyw files pyzipfile(functionzipfile module - command line option (uitdebugger commandpdb module qsize(methodof queue objects querieshow to safely form for databases query attribute of urlparse objects of urlsplit objects queryinfokey(functionwinreg module queryvalue(functionwinreg module queryvalueex(functionwinreg module queue module queue(function multiprocessing module queue module queue(methodof manager objects queuecircular queues coroutines example with threads how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,541
queues message passing multiple consumers and producers priority shared by multiple processes thread programming quit(method range(function removal in python rational abstract base class rational numbers raw / on files raw socket of ftp objects of smtp objects quitting the interactive interpreter quopri module quote(functionurllib parse module quote_from_bytes(functionurllib parse module quote_plus(functionurllib parse module quoteattr(functionxml sax saxutils module quotesdifference between styles quotingcharacters in urls raw strings unicode backslash rules use in regular expressions raw-unicode-escape encodingdescription of raw_decode(methodof jsondecoder objects raw_input(function python rawarray(functionmultiprocessing module rawconfigparser classconfigparser module rawiobase abstract base class ! specifier in string formatting rawvalue(functionmultiprocessing module characterbefore string literal rcvall_constantssocket module 'rmodeto open(function _rdiv_ (method (eturndebugger commandpdb module _rdivmod_ (method race condition _radd_ (method when invoked over _add_ () radians(functionmath module radix attributeof sys float_info raise statement - _rand_ (method rand_add(functionssl module rand_egd(functionssl module rand_status(functionssl module randint(functionrandom module random module random numbersand threads random(functionrandom module randrange(functionrandom module range of integer values re attributeof matchobject objects re module read(functionos module read(method of bufferreader objects of configparser objects of fileio objects of httpresponse objects of streamreder objects of textiowrapper objects of zipfile objects of files - of mmap objects of ssl objects of urlopen objects read-eval loop read (methodof bufferreader objects lib fl ff
18,542
read_byte(methodof mmap objects reassigning part of list read_mime_types(functionmimetypes module record objectslogging module readable(method recursion of iobase objects of dispatcher objects recursion limitchanging and decorators and generator functions readall(methodof fileio objects recursive traversal of directory trees reader(functioncsv module recv(method readerror exceptiontarfile module readfp(methodof configparser objects reading csv dataexample of reading configuration files reading linesfiles reading user input of connection objects of dispatcher objects of socket objects recv_bytes(methodof connection objects recv_bytes_into(methodof connection objects readinto(methodof bufferreader objects recv_into(methodof socket objects readline library readline module recvfrom_info(methodof socket objects readline(method recvmsg(system calllack of support of iobase objects of streamreder objects of textiowrapper objects of files - of mmap objects of urlopen objects readlines(method of iobase objects of streamreder objects of files - of urlopen objects readlink(functionos module ready(methodof asyncresult objects real abstract base class real attribute of complex numbers of floating point recvfrom(methodof socket objects reduce(functionfunctools module _reduce_ (method _reduce_ex_ (method reentrant mutex lock ref(functionweakref module reference counting and copying and del statement and memory use and mutable objects in extension modules obtaining reference cycles and garbage collection avoiding with weak references referenceerror exception reg_constantswinreg module realpath(functionos path module regex objectsre module reason attributeof httpresponse objects register command of setup py file how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,543
register(function register(function atexit module webbrowser module register(method of basemanager class of poll objects of abstract base classes of deque objects of lists - of sets remove_option(methodof configparser objects remove_section(methodof configparser objects register_adapter(functionsqlite module removechild(methodof dom node objects register_converter(functionsqlite module removedirs(functionos module register_dialect(functioncsv module register_function(methodof xmlrpcserver objects register_instance(methodof xmlrpcserver objects removefilter(method of handler objects of logger objects removehandler(methodof logger objects removing directories register_introspection_functions(methodof xmlrpcserver objects removing files register_multicall_functions(methodof xmlrpcserver objects removing slices regloadkey(functionwinreg module regular expressions pattern syntax re module use of raw strings relational databasesaccessing from python relational operators relative package imports - release(method of condition objects of lock objects of rlock objects of semaphore objects reliable datagrams reload(function reloading modules removing sequence items rename(functionos module rename(methodof ftp objects renames(functionos module repeat(function cprofile module itertools module operator module timeit module 'replaceerror handlingunicode encoding replace(method of date objects of datetime objects of strings of time objects replace_header(methodof message objects relpath(functionos path module replacechild(methodof dom node objects remote procedure call replacing substrings xml-rpc multiprocessing module - replicationof sequences and shallow copies remove(functionos module report(methodof dircmp objects remove(method report_full_closure(methodof dircmp objects of element objects of array objects lib fl ff
18,544
report_partial_closure(methodof dircmp objects responsenotready exceptionhttp client module repr (reprlibmodule responses attributeof basehttprequesthandler class repr(function and eval() difference from str() _repr_ (method - representing dates and times request attributeof baserequesthandler objects restricting attribute names restype attributeof ctypes function objects result of last operation in interactive mode retrbinary(methodof ftp objects request(functionurllib request module retrlines(methodof ftp objects request(methodof httpconnection objects returncode attributeof popen objects request_queue_size attributeof socketserver class request_version attributeof basehttprequesthandler objects requesthandlerclass attributeof socketserver objects reraising the last exception reserved attributeof zipinfo objects return statement returning multiple values from function reverse keyword argumentto sort() reverse(method of array objects of lists - reversed operand methodswhen invoked reserved words reversed operandsoperator overloading reset(method reversed(function of htmlparser objects of incrementaldecoder objects of incrementalencoder objects of streamreder objects of streamwriter objects reversing list rfile attribute of basehttprequesthandler objects of streamrequesthandler objects resetwarnings(functionwarnings module rfind(methodof strings resize(functionctypes module right shift operator >> resize(methodof mmap objects right_list attributeof dircmp objects resolution attribute right_only attributeof dircmp objects of date class of datetime class of time class of timedelta class _rfloordiv_ (method rindex(methodof strings rjust(methodof strings rlcompleter module resource module rlecode_hqx(functionbinascii module response timeasynchronous networking rledecode_hqx(functionbinascii module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,545
rlock object rlock object multiprocessing module threading module rlock(methodof manager objects _rlshift_ (method rmd(methodof ftp objects rmdir(functionos module run(function cprofile module pdb module profile module run(method of process objects of thread objects _rmod_ (method runcall(functionpdb module rmtree(functionshutil module runeval(functionpdb module _rmul_ (method running programs robotparser module runtimeerror exception robots txt file runtimewarning warning rollback(methodof connection objects _rxor_ (method rollover(methodof spooltemporaryfile objects root loggerlogging module _ror_ (method rotate(methodof deque objects rotating log files rotatingfilehandler classlogging module round(function and python ! specifier in string formatting - command line option - - command line option (tepdebugger commandpdb module safe_substitute(methodof template objects safeconfigparser classconfigparser module rounding attributeof context objects same_files attributeof dircmp objects rounding behavior samefile(functionos path module change in python roundingdecimal module sameopenfile(functionos path module rounds attributeof sys float_info samestat(functionos path module row_factory attributeof connection objects sample(functionrandom module rowcount attributeof cursor objects sax interface rpartition(methodof strings _rpow_ (method savekey(functionwinreg module xml parsing example of _rrshift_ (method scalingwith concurrency rshift(functionoperator module sched module - _rshift_ (method rsplit(methodof strings schedulerfor generators and coroutines rstrip(methodof strings scheme attribute _rsub_ (method _rtruediv_ (method rubydifferences in object system of urlparse objects of urlsplit objects scientific notationfloating point run debugger commandpdb module lib fl ff
18,546
scoping rules and module imports and self parameter in methods lexical scoping of functions of classes of function variables of iteration variable in list comprehension of iteration variables script name search pathfor modules search(functionre module search(methodof regex objects searchingstrings with an offset semaphore object multiprocessing module threading module semaphore objectsuse for signaling semaphore(methodof manager objects semicolon ; send(method of connection objects of httpconnection objects of dispatcher objects of generators of socket objects second attributeof time objects send_bytes(methodof connection objects sections(methodof configparser objects send_error(methodof basehttprequesthandler objects secure sockets layer (ssl) send_header(methodof basehttprequesthandler objects security xml-rpc servers database queries marshal module pickle module seed(functionrandom module seek(method of iobase objects of files - of mmap objects send_response(methodof basehttprequesthandler objects send_signal(methodof popen objects sendall(methodof socket objects sendcmd(methodof ftp objects sending emailexample of sendmail(methodof smtp objects sendmsg(system calllack of support seekable(methodof iobase objects sendto(methodof socket objects select module sentineluse with queuing signal handling select(function and asyncore module performance problems select module self parameter of methods why required _self_ attribute of built-in functions of methods sep keyword argumentto print(function sep variableos module separator characterprint(function sequence abstract base class sequences comparison of concatenation extended slicing of in operator indexing in string formatting item assignment how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,547
sequences iteration over lookup in composite string formatting negative indices operators picking random elements random sampling replication shallow copies in replication slice assignment slicing operator special methods of unpacking - serve_forever(method of basemanager objects of socketserver objects server attributeof baserequesthandler objects server program set(method of configparser objects of element objects of event objects of morsel objects _set_ (methodof descriptors set_authorizer(methodof connection objects set_boundary(methodof message objects set_charset(methodof message objects set_conversion_mode(functionctypes module set_debug(functiongc module set_default_type(methodof message objects set_defaults(methodof optionparser objects tcp example udp example example of restricting access with http example with socketserver module example with coroutines set_errno(functionctypes module server_address attributeof socketserver objects set_pasv(methodof ftp objects server_version attribute of basehttprequesthandler class of httprequesthandler class serverproxy(functionxmlrpc client module set abstract base class set comprehensionpython set difference operator - set intersection operator & set literalspython set_executable(functionmultiprocessing module set_last_error(functionctypes module set_param(methodof message objects set_payload(methodof message objects set_progress_handler(methodof connection objects set_proxy(methodof request objects set_server_documentation(methodof xmlrpcserver objects set_server_name(methodof xmlrpcserver objects set_server_title(methodof xmlrpcserver objects set symmetric difference operator ^ set_terminator(methodof asynchat objects set theorysimilarity to list comprehensions set_threshold(functiongc module set type set union operator | set_trace(functionpdb module set_type(methodof message objects set(function lib fl ff
18,548
set_unixfrom(methodof message objects set_usage(methodof optionparser objects set_wakeup_fd(functionsignal module setattr(function and private attributes _setattr_ (method - and _slots_ setblocking(methodof socket objects setcheckinterval(functionsys module setcontext(functiondecimal module setdaemon(methodof thread objects setdefault(method of dicts of dicts and defaultdict objects setdefaultencoding(functionsys module setdefaultencoding(methodsys module setdefaulttimeout(functionsocket module setdlopenflags(functionsys module setdocumentlocator(methodof contenthandler objects setegid(functionos module seteuid(functionos module setformatter(methodof handler objects setlevel(method of handler objects of logger objects setmode(functionmsvcrt module setname(methodof thread objects setoutputsize(methodof cursor objects setpassword(methodof zipfile objects setpgid(functionos module setpgrp(functionos module setprofile(function sys module threading module setrecursionlimit(functionsys module setregid(functionos module setreuid(functionos module _setroot(methodof elementtree objects sets adding items creating from iterable objects difference operator equality of in-place modification of intersection operator length of removing items symmetric difference operator union operator updating setgid(functionos module setsid(functionos module setgroups(functionos module setslice(functionoperator module setinputsize(methodof cursor objects setsockopt(methodof socket objects setitem(functionoperator module _setstate_ (method _setitem_ (method - and slices setitimer(functionsignal module setstate(functionrandom module and copying and pickle module @setter decorator of properties settimeout(methodof socket objects how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,549
setting default encoding of standard / setting default encoding of standard / settrace(function sys module threading module setuid(functionos module setup(method testcase objects of testcase objects shell pipessimilarity to generators shelve module dbhash module selecting the pickle protocol shlex module short-circuit evaluationsof boolean expressions showwarning(functionwarnings module setup(functiondistutils module shuffle(functionrandom module setup(methodof baserequesthandler objects shutdown(functionlogging module setup py file extensions swig extensions and setuptools creating - install command - installing in per-user site directory shutdown(method of basemanager objects of socketserver objects of socket objects shutil module side effects in functions reasons to avoid setuptools library sigsignal names setvalue(functionwinreg module sighup signal setvalueex(functionwinreg module siginterrupt(functionsignal module sha (functionhashlib module signal handling sha (functionhashlib module signal module sha (functionhashlib module signal(functionsignal module sha (functionhashlib module signalingwith semaphores sha (functionhashlib module signals shallow copy of dicts of lists sequence replication shared arraysmultiprocessing module shared libraries extension modules loading with ctypes shared memory example of passing list multiprocessing module sharing of objects shelf classshelve module shell commands collecting output from emulating in python close(method of generators list of mixing with threads throw(method of generators sigterm signal simple_producer(functionasynchat module simplecookie(functionhttp cookies module simplehandler(functionwsgiref handlers module simplehttprequesthandler classhttp server module simplehttpserver modulesee http server simplexmlrpcserver classxmlrpc server module lib fl ff
18,550
simplexmlrpcserver module sin(functionmath module of class definitions optimization single precision floating point smalltalkdifferences in object system singleton tuple sinh(functionmath module smtp protocolexample of sending message site configuration files smtp(functionsmtplib module site module smtpd module site-packages directory smtphandler classlogging module sitecustomize module smtplib module size attribute sndhdr module of struct objects of tarinfo objects size(method of ftp objects of mmap objects sniff(methodof sniffer objects sniffer(functioncsv module so_socket optionssocket module sock_constantssocket module sized abstract base class socket attributeof socketserver objects sizeof(functionctypes module socket module skippedentity(methodof contenthandler objects socket(functionsocket module sleep(functiontime module socket_type attributeof socketserver class sleeping until signal received socketdefinition of sockethandler classlogging module slice assignmentlists socketpair(functionsocket module slice objects sockets and indexing methods attributes of slice type slice(function slices and special methods and xrange objects assignment to deletion of multidimensional slicing operator [:] - on lists on strings _slots_ attribute and _dict_ attribute of instances compatibility with other code inheritance address families methods on polling with select() specifying network addresses types of socketserver module and python changing server parameters softspace attributeof files sort(methodof lists - sorted(function sorting changing behavior of in-place on lists requirements for objects reverse order use of operator module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,551
source code encoding source code encoding python stack frames in tracebacks span(methodof matchobject objects stack sizefor threads spawnl(functionos module spawnle(functionos module stack_size(functionthreading module spawnlp(functionos module stackless python spawnlpe(functionos module standard / streams spawnv(functionos module spawnve(functionos module spawnvp(functionos module spawnvpe(functionos module special methods special symbols speedupdefinition of split(function os path module re module split(method of regex objects of strings splitdrive(functionos path module splitext(functionos path module splitlines(methodof strings splittingstrings splitunc(functionos path module spooledtemporaryfile(functiontempfile module sprintf(function equivalent spwd module sql queries sql injection attack examples of executing on database how to form similarity to list comprehensions sqlite database sqlite module sqrt(functionmath module sqrt(methodof decimal objects ssl module sslexample of creating certificates stack(functioninspect module and integrated development environments setting the default encoding standard error standard input and output standard library reorganizationpython standard_b decode(functionbase module standard_b encode(functionbase module standarderror exception starmap(functionitertools module start attributeof slices start(method of basemanager objects of matchobject objects of process objects of thread objects of timer objects of treebuilder objects startdocument(methodof contenthandler objects startelement(methodof contenthandler objects startelementns(methodof contenthandler objects startfile(functionos module startprefixmapping(methodof contenthandler objects startswith(methodof strings startup scriptin interactive mode stat module stat(function os module os path module st_attributesof stat objects lib fl ff
18,552
stat_float_times(functionos module statement termination and semicolons statements breaking across multiple lines putting on the same line - running in the debugger static method practical use of @staticmethod decorator streamrequesthandler classsocketserver module streams streamwriter classcodecs module streamwriter(methodof codecinfo objects strerror(functionos module strftime(functiontime module strftime(method of date objects of time objects statisticsrandom number distributions 'stricterror handlingunicode encoding status attributeof httpresponse objects string attributeof matchobject objects statvfs(functionos module string formatting stderr attributeof popen objects stderr variablesys module _stderr_ variablesys module stdin attributeof popen objects stdin variablesys module _stdin_ variablesys module stdout attributeof popen objects stdout variablesys module _stdout_ variablesys module step attributeof slices stopiteration exception and generators storbinary(methodof ftp objects storlines(methodof ftp objects str type str(function and print difference from repr() _str_ (method - ! specifier ! specifier alignment attribute lookup codes for operator - customizing format(method dictionaries dictionary lookup fill characters format specifiers formatting operator % string interpolation string literals unicode characters and unicode encodings and documentation strings byte strings unicode characters in source code string module template strings streamerror exceptiontarfile module string_at(functionctypes module streamhandler classlogging module stringio classio module streamreader classcodecs module stringprep module streamreader(methodof codecinfo objects strings unicode and numeric calculations how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,553
strings as dictionary key as in-memory text files as sequences basestring object for type checking byte literals byte strings case conversion - character substitution comparison of concatenation concatenation of adjacent literals creating custom formatters disabling escape codes in literals encoding for urls escape codes in literals escaping characters for use in html escaping characters for use in xml executing python code contained within format(method formatting formatting in log messages immutability of indexing internal representation iterating over characters joining line structure mixing byte strings and unicode mutable byte arrays partitioning regular expressions replacing substrings searching for substrings slices sorting and internationalization specifiers for format(method - splitting splitting into fields stripping unescaping xml character references strip(methodof strings stripping control characters from string strings strptime(functiontime module strptime(methodof datetime class struct classstruct module struct module structure classctypes module structuresand tuples sub(function operator module re module sub(methodof regex objects _sub_ (method subclass _subclasscheck_ (method subdirs attributeof dircmp objects subelement(functionxml etree elementtree module subn(functionre module subn(methodof regex objects subprocess module subprocessdefinition of substitute(method of template objects of template strings substrings checking for existence using in searching for subtraction operator - sucessful(methodof asyncresult objects sum(function - accuracy of and decimal module restriction to numeric data versus math fsum(function sunau module super(function python superclass calling methods in super(function lib fl ff
18,554
supporting both python and sys prefix variable supports_unicode_filenames variableos path module sys ps variable surrogate pair sys stderr variable suspensionof threads sys stdin variable swapcase(methodof strings sys stdout variable swig sys_version attributeof basehttprequesthandler class example of interface file sys ps variable sysconf(functionos module switch statementlack of syslog module symbol module sysloghandler classlogging module symbolic linkstesting filename for system callsos module symlink(functionos module system error codes symmetric difference operator ^of sets system(functionos module symmetric_difference(methodof sets system listmethods(methodof serverproxy objects symmetric_difference_update(methodof sets systemerror exception sync(method systemexit exception - of dbm-style database objects of shelve objects synchronization primitives multiprocessing module threading module synchronization of close(method of generators of concurrent programs of throw(method of generators - command line option - tab escape code in strings tabcheck attributeof sys flags taberror exception tabnanny module tabsand indentation syntaxerror exception tag attributeof element objects python print statement and default arguments and except statements tagname attributeof dom element objects tail attributeof element objects syntaxwarning warning tail commandexample with generators sys module tail-recursion optimizationlack of sys argv variable takewhile(functionitertools module sys displayhook variable tan(functionmath module sys exec_prefix variable tanh(functionmath module sys exit(function tarerror exceptiontarfile module sys modules variable tarfile objectstarfile module sys path variable tarfile module and site module third-party modules tarinfo objectstarfile module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,555
task schedulerexample with coroutines and select(task schedulerexample with coroutines and select() task_done(method of joinablequeue objects of queue objects tasklets asynchronous / tasksand coroutines tb_attributesof traceback objects tb_lineno(functiontraceback module tbreak debugger commandpdb module tcgetpgrp(functionos module terminate(method of pool objects of popen objects - of process objects terminating statements with semicolons termination immediate without garbage collection of programs of threads registering cleanup functions sys exit(function without garbage collection tcp connectiondiagram of termios module tcp protocol test module example code test(functioncgi module tcp_socket optionssocket module testcase classunittest module tcpserver classsocketserver module testing tcsetpgrp(functionos module teardown(method testcase objects of testcase objects tee(functionitertools module tell(method of iobase objects of files - of mmap objects doctest module documentation strings limitations of doctest unit testing testmod(function doctest(module doctest module testzip(methodof zipfile objects text classxml dom minidom module telnetlib module text / tempdir variabletempfile module text attributeof element objects tempfile module text file mode template classstring module text replacementreplace(method of strings template strings string module use in cgi script template attributeof template objects template variabletempfile module temporary files temporaryfile(functiontempfile module text versus bytes in python text_factory attributeof connection objects textiobase abstract base class textiowrapper classio module textwrap module third-party librariesand python third-party packages and / +code and sys path variable lib fl ff
18,556
installation of installing in per-user site directory this pointerself parameter of methods thread classthreading module thread attributeof record objects threading module signal handling signaling with semaphores suspending synchronization of termination of throw(method of generators use of queues worker thread example synchronization primitives threadsafety variabledatabase api threadingmixin classsocketserver module throw(methodof generators - threadingtcpserver classsocketserver module time classdatetime module threadingudpserver classsocketserver module threadname attributeof record objects threads cpu-bound tasks adding to network servers atomic operations and disassembly check interval close(method of generators compared to coroutines condition variables daemonic database modules decimal module definition of events extension modules global interpreter lock local storage main thread mutex lock obtaining number of active random number generation reentrant mutex lock scaling properties scheduling of semaphores setting stack size setting the name time and date parsing time manipulation time module accuracy of time functions current time time parsing time(functiondatabase api time(functiontime module time(methodof datetime objects timedelta classdatetime module timedrotatingfilehandler classlogging module timefromticks(functiondatabase api timeit module timeit(function cprofile module timeit module timeout attributeof socketserver class timeout exceptionsocket module timeoutexample with alarm signals timer(functionthreading module times(functionos module timestamp(functiondatabase api timestampfromticks(functiondatabase api timetuple(methodof date objects timetz(methodof datetime objects timezone variabletime module how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,557
timing measurements timing measurements tipc protocol address format tipc_constantssocket module title(methodof strings treebuilder(functionxml etree elementtree module triangular(functionrandom module triple-quoted strings and variable interpolation tkinter module true value today(methodof date class truediv(functionoperator module tofile(methodof array objects _truediv_ (method token module trunc(functionmath module tokenize module truncate(method tolist(methodof array objects toordinal(methodof date objects toprettyxml(methodof dom node objects of iobase objects of files truncating division operator // truncationof integer division tostring(functionxml etree elementtree module truth value testing tostring(methodof array objects truth(functionoperator module total_changes attributeof connection objects try statement - tounicode(methodof array objects tty module toxml(methodof dom node objects ttyname(functionos module trace(functioninspect module tuning strategies traceback messages tuple type traceback module tuple unpackingand for-loops traceback objects - tuple(function attributes of stack frames _traceback_ attributeof exception objects tracebacklimit variablesys module tracebacks creating with traceback module limiting the amount of output tracebacktype type trailing on complex number literals trailing on long integers trailing comma and tuples print statement transfercmd(methodof ftp objects translate(methodof strings traps attributeof context objects truth values -tt command line option - tuples and string formatting as dictionary key as dictionary keys as sequence comparison on concatenation creating list of from dictionary creating with named attributes immutability immutability of indexing memory savings of omission of parantheses problems with using as data structure representing records singleton lib fl ff
18,558
slicing unpacking in python unpacking in iteration use by standard library use in list comprehensions versus lists twisted library two-dimensional lists type type attribute of fieldstorage objects of tarinfo objects of socket objects type checking example with metaclass of objects performance impact of problem with proxy objects types boolean built-in callable dictionary floating point frozenset integers of sockets set type of tzinfo attributeof time objects tzname variabletime module tzname(method of time objects of tzinfo objects tzset(functiontime module type coercionand operator overloading type comparison of objects type conversion lack of implicit conversion of columns in datafile special methods for \ escape codein strings \ escape codein strings - command line option 'umodeto open(function characterbefore string literal type hierarchies - command line option type objects (pdebugger commandpdb module type of objects udp client example type(function udp communicationdiagram of and exceptions udp protocol type(metaclass udp server example type_options attributeof fieldstorage objects udpserver classsocketserver module typecode attributeof array objects uid attributeof tarinfo objects typeerror exception umask(functionos module and function calls and type coercion method resolution order types module and python unalias debugger commandpdb module uname attributeof tarinfo objects uname(functionos module unary minus operator - unary plus operator + how can we make this index more usefulemail us at indexes@samspublishing com lib fl ff
18,559
unbound method and python unboundlocalerror exception unbuffered file / unconsumed_tail attributeof decompressobj objects underscoresusage in identifiers unescape(functionxml sax saxutils module ungetch(functionmsvcrt module normalization of strings specifying characters in string literals surrogate pairs using -bit character code points unicode-escape encodingdescription of unicodedata module unicodedecodeerror exception unicodeencodeerror exception ungetwch(functionmsvcrt module python interactive mode unhexlify(functionbinascii module unicodeerror exception unichr(function unicodetranslateerror exception unicode character database unidata_version variableunicodedata module unicode charactersrepresentation of unicode string literals unicode strings and wsgi common encodings decomposing encoding and decoing encoding in network programs error handling options handling of mixing with byte strings normalizing regular expressions unicode attributeof sys flags unicode type unicode(function and python unicode python vs python and bom characters and xml byte order marker character encoding and decoding character properties database code points common encodings - encoding in string literals encoding of source code file / mixing with byte strings unification of integer and long types uniform access principle uniform type arrays uniform(functionrandom module unimplementedfilemode exceptionhttp client module union classctypes module union operator |of sets union(methodof sets unit testing python migration example unittest module unittest module example universal newline mode unix domain protocol address format unix systems logissuing message to unix #execution of programs per-user site directory time epoch definition unixdatagramserver classsocketserver module unixstreamserver classsocketserver module unknownhandler classurllib request module lib fl ff
18,560
18,561
about the authorxi about the technical reviewerxiii forewordxv acknowledgmentsxvii introductionxix ntroduction to supervised learning what is ml? relationship between data analysisdata miningmland ai datadata typesand data sources how ml differs from software engineering ml projects statistical and mathematical concepts for ml supervised learning algorithms regression vs classification problems steps in supervised learning algorithm unsupervised learning algorithms cluster analysis pca semi-supervised learning algorithms technical stack
18,562
ml' popularity use cases of ml summary upervised learning for regression analysis technical toolkit required regression analysis and use cases what is linear regression assumptions of linear regression measuring the efficacy of regression problem example creating simple linear regression example simple linear regression for housing dataset example multiple linear regression for housing dataset nonlinear regression analysis identifying nonlinear relationship assumptions for nonlinear regression challenges with regression model tree-based methods for regression case studypetrol consumption using decision tree ensemble methods for regression case studypetrol consumption using random forest feature selection using tree-based methods summary upervised learning for classification problems technical toolkit required hypothesis testing and -value classification algorithms logistic regression for classification vi
18,563
assessing the accuracy of the solution case studycredit risk additional notes naive bayes for classification case studyincome prediction on census data -nearest neighbors for classification case studyk-nearest neighbor the dataset business objective tree-based algorithms for classification types of decision tree algorithms summary dvanced algorithms for supervised learning technical toolkit required boosting algorithms using gradient boosting algorithm svm svm in - space ksvm case study using svm supervised algorithms for unstructured data text data use cases of text data challenges with text data text analytics modeling process text data extraction and management vii
18,564
preprocessing of text data extracting features from text data case studycustomer complaints analysis using nlp word embeddings case studycustomer complaints analysis using word embeddings image data use cases of image data challenges with image data image data management process image data modeling process fundamentals of deep learning artificial neural networks activation functions loss function in neural network optimization in neural network neural network training process case study create classification model on structured data case study image classification model summary end-to-end model development technical toolkit required ml model development step define the business problem step data discovery phase step data cleaning and preparation duplicates in the dataset categorical variable treatment in dataset missing values present in the dataset viii
18,565
imbalance in the dataset outliers in the dataset other common problems in the dataset step eda step ml model building train/test split of data finding the best threshold for classification algorithms overfitting vs underfitting problem key stakeholder discussion and iterations presenting the final model step deployment of the model step documentation step model refresh and maintenance summary index ix
18,566
vaibhav verdhan has years of experience in data sciencemachine learningand artificial intelligence an mba with engineering backgroundhe is hands-on technical expert with acumen to assimilate and analyze data he has led multiple engagements in ml and ai across geographies and across retailtelecommanufacturingenergyand utilities domains currently he resides in ireland with his family and is working as principal data scientist xi
18,567
irfan elahi is full stack customer-focused cloud analytics specialist bearing the unique and proven combination of diverse consulting and technical competencies (cloudbig dataand machine learningwith growing portfolio of successful projects delivering substantial impact and value in multiple capacities across telecomretailenergyand health-care sectors additionallyhe is an analytics evangelist as is evident from the published bookudemy coursesblogpoststrainingslecturesand presentations with global reach xiii
18,568
how safe is home birthingthat is good question pause moment and let yourself contemplate it am sure you can see how the answer to this question can affect personal decisions and policy choices the answer could be given as probabilitya level classificationor an alternative cost another natural reaction is "it depends there are many factors that could affect the safety of home birthing took you through this thought exercise to show you that you naturally think like data scientist you understood the importance of stipulating clearly the focus of the analysis and what could explain different outcomes the reason you are embarking on journey through this book is that you are not sure how to express these instinctive notions mathematically and instruct computer to "findthe relationship between the "featuresand the "target when started my career -odd years agothis was the domain of statisticians who crafted mathematical language to describe relationships and noise the purpose of predictive modeling was in its essence to be tool for separating signal or pattern out of seemingly chaotic information and reporting how well the partition was done todaymachine learning algorithms harnessing computing brute force add new paradigm this has created new professionthe data scientist the data scientist is practitioner who can think in terms of statistical methodologyinstruct computer to carry out the required processingand interpret the results and reports xv
18,569
becoming good data scientist is journey that starts with learning the basics and mechanics once you are done exploring this book you might also be able to better see where you will want to deepen your theoretical knowledge would like to suggest you might find it interesting to look into the theory of statistical modeling in general and the bayesian paradigm specifically machine learning is computational statistics after all dr eli kling (bsc eng msc phdlondonuk june xvi
18,570
would like to thank apress publicationscelestin johnshrikant vishwarkarmaand irfan elahi for the confidence shown and the support extended many thanks to dr eli kling for the fantastic forward to the book special words for my family--yashipakhiand rudra--without their support it would have been impossible to complete this work xvii
18,571
characterizing the audio signaltransforming to frequency domain generating monotone audio signal feature extraction from speech recognition of spoken words ai with python heuristic search concept of heuristic search in ai difference between uninformed and informed search real world problem solved by constraint satisfaction ai with python gaming search algorithms combinational search minimax algorithm alpha-beta pruning negamax algorithm building bots to play games bot to play last coin standing bot to play tic tac toe ai with python neural networks what is artificial neural networks (ann installing useful packages building neural networks perceptron based classifier single layer neural networks multi-layer neural networks ai with python reinforcement learning basics of reinforcement learning building blocksenvironment and agent constructing an environment with python
18,572
constructing learning agent with python ai with python genetic algorithms what are genetic algorithms how to use ga for optimization problems installing necessary packages implementing solutions using genetic algorithms ai with python computer vision computer vision computer vision vs image processing installing useful packages readingwriting and displaying an image color space conversion edge detection face detection eye detection ai with python deep learning machine learning / deep learning convolutional neural network (cnn installing useful python packages building linear regressor using ann image classifieran application of deep learning vi
18,573
ai with python primer concepts since the invention of computers or machinestheir capability to perform various tasks has experienced an exponential growth humans have developed the power of computer systems in terms of their diverse working domainstheir increasing speedand reducing size with respect to time branch of computer science named artificial intelligence pursues creating the computers or machines as intelligent as human beings basic concept of artificial intelligence (aiaccording to the father of artificial intelligencejohn mccarthyit is "the science and engineering of making intelligent machinesespecially intelligent computer programsartificial intelligence is way of making computera computer-controlled robotor software think intelligentlyin the similar manner the intelligent humans think ai is accomplished by studying how human brain thinks and how humans learndecideand work while trying to solve problemand then using the outcomes of this study as basis of developing intelligent software and systems while exploiting the power of the computer systemsthe curiosity of humanlead him to wonder"can machine think and behave like humans do?thusthe development of ai started with the intention of creating similar intelligence in machines that we find and regard high in humans the necessity of learning ai as we know that ai pursues creating the machines as intelligent as human beings there are numerous reasons for us to study ai the reasons are as followsai can learn through data in our daily lifewe deal with huge amount of data and human brain cannot keep track of so much data that is why we need to automate the things for doing automationwe need to study ai because it can learn from data and can do the repetitive tasks with accuracy and without tiredness ai can teach itself it is very necessary that system should teach itself because the data itself keeps changing and the knowledge which is derived from such data must be updated constantly we can use ai to fulfill this purpose because an ai enabled system can teach itself ai can respond in real time artificial intelligence with the help of neural networks can analyze the data more deeply due to this capabilityai can think and respond to the situations which are based on the conditions in real time
18,574
ai achieves accuracy with the help of deep neural networksai can achieve tremendous accuracy ai helps in the field of medicine to diagnose diseases such as cancer from the mris of patients ai can organize data to get most out of it the data is an intellectual property for the systems which are using self-learning algorithms we need ai to index and organize the data in way that it always gives the best results understanding intelligence with aismart systems can be built we need to understand the concept of intelligence so that our brain can construct another intelligence system like itself what is intelligencethe ability of system to calculatereasonperceive relationships and analogieslearn from experiencestore and retrieve information from memorysolve problemscomprehend complex ideasuse natural language fluentlyclassifygeneralizeand adapt new situations types of intelligence as described by howard gardneran american developmental psychologistintelligence comes in multifoldintelligence description example linguistic intelligence the ability to speakrecognizeand use mechanisms of phonology (speech sounds)syntax (grammar)and semantics (meaningnarratorsorators musical intelligence the ability to createcommunicate withand understand meanings made of soundunderstanding of pitchrhythm musicianssingerscomposers logical-mathematical intelligence the ability to use and understand relationships in the absence of action or objects it is also the ability to understand complex and abstract ideas mathematiciansscientists spatial intelligence the ability to perceive visual or spatial informationchange itand re-create visual images without reference to the objectsconstruct map readersastronautsphysicists
18,575
imagesand to move and rotate them bodily-kinesthetic intelligence the ability to use complete or part of the body to solve problems or fashion productscontrol over fine and coarse motor skillsand manipulate the objects playersdancers intra-personal intelligence the ability to distinguish among one' own feelingsintentionsand motivations gautam buddhha interpersonal intelligence the ability to recognize and make distinctions among other people' feelingsbeliefsand intentions mass communicatorsinterviewers you can say machine or system is artificially intelligent when it is equipped with at least one or all intelligences in it what is intelligence composed ofthe intelligence is intangible it is composed of reasoning learning problem solving perception linguistic intelligence
18,576
let us go through all the components briefly reasoning it is the set of processes that enable us to provide basis for judgementmaking decisionsand prediction there are broadly two types inductive reasoning it conducts specific observations to makes broad general statements even if all of the premises are true in statementinductive reasoning allows for the conclusion to be false example "nita is teacher nita is studious thereforeall teachers are studious deductive reasoning it starts with general statement and examines the possibilities to reach specificlogical conclusion if something is true of class of things in generalit is also true for all members of that class example "all women of age above years are grandmothers shalini is years thereforeshalini is grandmother learning the ability of learning is possessed by humansparticular species of animalsand aienabled systems learning is categorized as follows auditory learning it is learning by listening and hearing for examplestudents listening to recorded audio lectures episodic learning to learn by remembering sequences of events that one has witnessed or experienced this is linear and orderly motor learning it is learning by precise movement of muscles for examplepicking objectswritingetc
18,577
observational learning to learn by watching and imitating others for examplechild tries to learn by mimicking her parent perceptual learning it is learning to recognize stimuli that one has seen before for exampleidentifying and classifying objects and situations relational learning it involves learning to differentiate among various stimuli on the basis of relational propertiesrather than absolute properties for exampleadding 'little lesssalt at the time of cooking potatoes that came up salty last timewhen cooked with adding say tablespoon of salt spatial learning it is learning through visual stimuli such as imagescolorsmapsetc for examplea person can create roadmap in mind before actually following the road stimulus-response learning it is learning to perform particular behavior when certain stimulus is present for examplea dog raises its ear on hearing doorbell problem solving it is the process in which one perceives and tries to arrive at desired solution from present situation by taking some pathwhich is blocked by known or unknown hurdles problem solving also includes decision makingwhich is the process of selecting the best suitable alternative out of multiple alternatives to reach the desired goal perception it is the process of acquiringinterpretingselectingand organizing sensory information perception presumes sensing in humansperception is aided by sensory organs in the domain of aiperception mechanism puts the data acquired by the sensors together in meaningful manner linguistic intelligence it is one' ability to usecomprehendspeakand write the verbal and written language it is important in interpersonal communication
18,578
what' involved in ai artificial intelligence is vast area of study this field of study helps in finding solutions to real world problems let us now see the different fields of study within aimachine learning it is one of the most popular fields of ai the basic concept of this filed is to make the machine learning from data as the human beings can learn from his/her experience it contains learning models on the basis of which the predictions can be made on unknown data logic it is another important field of study in which mathematical logic is used to execute the computer programs it contains rules and facts to perform pattern matchingsemantic analysisetc searching this field of study is basically used in games like chesstic-tac-toe search algorithms give the optimal solution after searching the whole search space artificial neural networks this is network of efficient computing systems the central theme of which is borrowed from the analogy of biological neural networks ann can be used in roboticsspeech recognitionspeech processingetc genetic algorithm genetic algorithms help in solving problems with the assistance of more than one program the result would be based on selecting the fittest knowledge representation it is the field of study with the help of which we can represent the facts in way the machine that is understandable to the machine the more efficiently knowledge is representedthe more system would be intelligent application of ai in this sectionwe will see the different fields supported by aigaming ai plays crucial role in strategic games such as chesspokertic-tac-toeetc where machine can think of large number of possible positions based on heuristic knowledge
18,579
natural language processing it is possible to interact with the computer that understands natural language spoken by humans expert systems there are some applications which integrate machinesoftwareand special information to impart reasoning and advising they provide explanation and advice to the users vision systems these systems understandinterpretand comprehend visual input on the computer for examplea spying aeroplane takes photographswhich are used to figure out spatial information or map of the areas doctors use clinical expert system to diagnose the patient police use computer software that can recognize the face of criminal with the stored portrait made by forensic artist speech recognition some intelligent systems are capable of hearing and comprehending the language in terms of sentences and their meanings while human talks to it it can handle different accentsslang wordsnoise in the backgroundchange in human' noise due to coldetc handwriting recognition the handwriting recognition software reads the text written on paper by pen or on screen by stylus it can recognize the shapes of the letters and convert it into editable text intelligent robots robots are able to perform the tasks given by human they have sensors to detect physical data from the real world such as lightheattemperaturemovementsoundbumpand pressure they have efficient processorsmultiple sensors and huge memoryto exhibit intelligence in additionthey are capable of learning from their mistakes and they can adapt to the new environment cognitive modelingsimulating human thinking procedure cognitive modeling is basically the field of study within computer science that deals with the study and simulating the thinking process of human beings the main task of ai is to make machine think like human the most important feature of human thinking process is problem solving that is why more or less cognitive modeling tries to understand how humans can solve the problems after that this model can be used for various ai applications such as machine learningroboticsnatural language processingetc following is the diagram of different thinking levels of human brain
18,580
cognitive behaviora physical kinematic geometri agent environment in this sectionwe will focus on the agent and environment and how these help in artificial intelligence agent an agent is anything that can perceive its environment through sensors and acts upon that environment through effectors human agent has sensory organs such as eyesearsnosetongue and skin parallel to the sensorsand other organs such as handslegsmouthfor effectors robotic agent replaces cameras and infrared range finders for the sensorsand various motors and actuators for effectors software agent has encoded bit strings as its programs and actions environment some programs operate in an entirely artificial environment confined to keyboard inputdatabasecomputer file systems and character output on screen in contrastsome software agents (software robots or softbotsexist in richunlimited softbots domains the simulator has very detailedcomplex environment the software agent needs to choose from long array of actions in real time softbot is designed to scan the online preferences of the customer and shows interesting items to the customer works in the real as well as an artificial environment
18,581
in this we will learn how to get started with python we will also understand how python helps for artificial intelligence why python for ai artificial intelligence is considered to be the trending technology of the future already there are number of applications made on it due to thismany companies and researchers are taking interest in it but the main question that arises here is that in which programming language can these ai applications be developedthere are various programming languages like lispprologc++java and pythonwhich can be used for developing applications of ai among thempython programming language gains huge popularity and the reasons are as followssimple syntax less coding python involves very less coding and simple syntax among other programming languages which can be used for developing ai applications due to this featurethe testing can be easier and we can focus more on programming inbuilt libraries for ai projects major advantage for using python for ai is that it comes with inbuilt libraries python has libraries for almost all kinds of ai projects for examplenumpyscipymatplotlibnltksimpleai are some the important inbuilt libraries of python open sourcepython is an open source programming language this makes it widely popular in the community can be used for broad range of programmingpython can be used for broad range of programming tasks like small shell script to enterprise web applications this is another reason python is suitable for ai projects features of python python is high-levelinterpretedinteractive and object-oriented scripting language python is designed to be highly readable it uses english keywords frequently where as other languages use punctuationand it has fewer syntactical constructions than other languages python' features include the following easy-to-learn python has few keywordssimple structureand clearly defined syntax this allows the student to pick up the language quickly easy-to-read python code is more clearly defined and visible to the eyes easy-to-maintain python' source code is fairly easy-to-maintain broad standard library python' bulk of the library is very portable and crossplatform compatible on unixwindowsand macintosh
18,582
interactive mode python has support for an interactive mode which allows interactive testing and debugging of snippets of code portable python can run on wide variety of hardware platforms and has the same interface on all platforms extendable we can add low-level modules to the python interpreter these modules enable programmers to add to or customize their tools to be more efficient databases python provides interfaces to all major commercial databases gui programming python supports gui applications that can be created and ported to many system callslibraries and windows systemssuch as windows mfcmacintoshand the window system of unix scalable python provides better structure and support for large programs than shell scripting important features of python let us now consider the following important features of pythonit supports functional and structured programming methods as well as oop it can be used as scripting language or can be compiled to byte-code for building large applications it provides very high-level dynamic data types and supports dynamic type checking it supports automatic garbage collection it can be easily integrated with cc++comactivexcorbaand java installing python python distribution is available for large number of platforms you need to download only the binary code applicable for your platform and install python if the binary code for your platform is not availableyou need compiler to compile the source code manually compiling the source code offers more flexibility in terms of choice of features that you require in your installation here is quick overview of installing python on various platforms unix and linux installation follow these steps to install python on unix/linux machine open web browser and go to follow the link to download zipped source code available for unix/linux download and extract files editing the modules/setup file if you want to customize some options run /configure script
18,583
make make install this installs python at the standard location /usr/local/bin and at /usr/local/lib/pythonxx where xx is the version of python its libraries windows installation follow these steps to install python on windows machine open web browser and go to follow the link for the windows installer python-xyz msi file where xyz is the version you need to install to use this installer python-xyz msithe windows system must support microsoft installer save the installer file to your local machine and then run it to find out if your machine supports msi run the downloaded file this brings up the python install wizardwhich is really easy to use just accept the default settings and wait until the install is finished macintosh installation if you are on mac os xit is recommended that you use homebrew to install python it is great package installer for mac os and it is really easy to use if you don' have homebrewyou can install it using the following commandruby - "$(curl -fssl we can update the package manager with the command belowbrew update now run the following command to install python on your systembrew install python setting up path programs and other executable files can be in many directoriesso operating systems provide search path that lists the directories that the os searches for executables the path is stored in an environment variablewhich is named string maintained by the operating system this variable contains information available to the command shell and other programs the path variable is named as path in unix or path in windows (unix is case-sensitivewindows is notin mac osthe installer handles the path details to invoke the python interpreter from any particular directoryyou must add the python directory to your path
18,584
setting path at unix/linux to add the python directory to the path for particular session in unix in the csh shell type setenv path "$path:/usr/local/bin/pythonand press enter in the bash shell (linuxath="$path:/usr/local/bin/pythonand press enter in the sh or ksh shell type path="$path:/usr/local/bin/pythonand press enter type export note /usr/local/bin/python is the path of the python directory setting path at windows to add the python directory to the path for particular session in windows at the command prompt type path %path%; :\python and press enter note :\python is the path of the python directory running python let us now see the different ways to run python the ways are described belowinteractive interpreter we can start python from unixdosor any other system that provides you commandline interpreter or shell window enter python at the command line start coding right away in the interactive interpreter $python unix/linux or pythonunix/linux or :python windows/dos here is the list of all the available command line options no option description - it provides debug output
18,585
- it generates optimized bytecode (resulting in pyo files - do not run import site to look for python paths on startup - verbose output (detailed trace on import statements - disables class-based built-in exceptions (just use strings)obsolete starting with version - cmd runs python script sent in as cmd string file run python script from given file script from the command-line python script can be executed at the command line by invoking the interpreter on your applicationas in the following $python script py unix/linux orpythonscript py unix/linux orc>python script py windows/dos note be sure the file permission mode allows execution integrated development environment you can run python from graphical user interface (guienvironment as wellif you have gui application on your system that supports python unix idle is the very first unix ide for python
18,586
windows pythonwin is the first windows interface for python and is an ide with gui macintosh the macintosh version of python along with the idle ide is available from the main websitedownloadable as either macbinary or binhex' files if you are not able to set up the environment properlythen you can take help from your system admin make sure the python environment is properly set up and working perfectly fine we can also use another python platform called anaconda it includes hundreds of popular data science packages and the conda package and virtual environment manager for windowslinux and macos you can download it as per your operating system from the link for this tutorial we are using python version on ms windows
18,587
ai with python machine learning learning means the acquisition of knowledge or skills through study or experience based on thiswe can define machine learning (mlas followsit may be defined as the field of computer sciencemore specifically an application of artificial intelligencewhich provides computer systems the ability to learn with data and improve from experience without being explicitly programmed basicallythe main focus of machine learning is to allow the computers learn automatically without human intervention now the question arises that how such learning can be started and doneit can be started with the observations of data the data can be some examplesinstruction or some direct experiences too then on the basis of this inputmachine makes better decision by looking for some patterns in data types of machine learning (mlmachine learning algorithms helps computer system learn without being explicitly programmed these algorithms are categorized into supervised or unsupervised let us now see few algorithmssupervised machine learning algorithms this is the most commonly used machine learning algorithm it is called supervised because the process of algorithm learning from the training dataset can be thought of as teacher supervising the learning process in this kind of ml algorithmthe possible outcomes are already known and training data is also labeled with correct answers it can be understood as followssuppose we have input variables and an output variable and we applied an algorithm to learn the mapping function from the input to output such asy= (xnowthe main goal is to approximate the mapping function so well that when we have new input data ( )we can predict the output variable (yfor that data mainly supervised leaning problems can be divided into the following two kinds of problemsclassificationa problem is called classification problem when we have the categorized output such as "black""teaching""non-teaching"etc regressiona problem is called regression problem when we have the real value output such as "distance""kilogram"etc decision treerandom forestknnlogistic regression are the examples of supervised machine learning algorithms
18,588
unsupervised machine learning algorithms as the name suggeststhese kinds of machine learning algorithms do not have any supervisor to provide any sort of guidance that is why unsupervised machine learning algorithms are closely aligned with what some call true artificial intelligence it can be understood as followssuppose we have input variable xthen there will be no corresponding output variables as there is in supervised learning algorithms in simple wordswe can say that in unsupervised learning there will be no correct answer and no teacher for the guidance algorithms help to discover interesting patterns in data unsupervised learning problems can be divided into the following two kinds of problemclusteringin clustering problemswe need to discover the inherent groupings in the data for examplegrouping customers by their purchasing behavior associationa problem is called association problem because such kinds of problem require discovering the rules that describe large portions of our data for examplefinding the customers who buy both and -means for clusteringapriori algorithm for association are the examples of unsupervised machine learning algorithms reinforcement machine learning algorithms these kinds of machine learning algorithms are used very less these algorithms train the systems to make specific decisions basicallythe machine is exposed to an environment where it trains itself continually using the trial and error method these algorithms learn from past experience and tries to capture the best possible knowledge to make accurate decisions markov decision process is an example of reinforcement machine learning algorithms most common machine learning algorithms in this sectionwe will learn about the most common machine learning algorithms the algorithms are described belowlinear regression it is one of the most well-known algorithms in statistics and machine learning basic conceptmainly linear regression is linear model that assumes linear relationship between the input variables say and the single output variable say in other wordswe can say that can be calculated from linear combination of the input variables the relationship between variables can be established by fitting best line types of linear regression linear regression is of the following two typessimple linear regressiona linear regression algorithm is called simple linear regression if it is having only one independent variable
18,589
multiple linear regressiona linear regression algorithm is called multiple linear regression if it is having more than one independent variable linear regression is mainly used to estimate the real values based on continuous variable(sfor examplethe total sale of shop in daybased on real valuescan be estimated by linear regression logistic regression it is classification algorithm and also known as logit regression mainly logistic regression is classification algorithm that is used to estimate the discrete values like or true or falseyes or no based on given set of independent variable basicallyit predicts the probability hence its output lies in between and decision tree decision tree is supervised learning algorithm that is mostly used for classification problems basically it is classifier expressed as recursive partition based on the independent variables decision tree has nodes which form the rooted tree rooted tree is directed tree with node called "rootroot does not have any incoming edges and all the other nodes have one incoming edge these nodes are called leaves or decision nodes for exampleconsider the following decision tree to see whether person is fit or not age< yrs ye no eat lots of fast food ye unfit no fit exercise in the morning daily ye fit no unfit support vector machine (svmit is used for both classification and regression problems but mainly it is used for classification problems the main concept of svm is to plot each data item as point in ndimensional space with the value of each feature being the value of particular coordinate here would be the features we would have following is simple graphical representation to understand the concept of svm
18,590
in the above diagramwe have two features hence we first need to plot these two variables in two dimensional space where each point has two co-ordinatescalled support vectors the line splits the data into two different classified groups this line would be the classifier naive bayes it is also classification technique the logic behind this classification technique is to use bayes theorem for building classifiers the assumption is that the predictors are independent in simple wordsit assumes that the presence of particular feature in class is unrelated to the presence of any other feature below is the equation for bayes theoremp( |bp( |ap(ap(bthe naive bayes model is easy to build and particularly useful for large data sets -nearest neighbors (knnit is used for both classification and regression of the problems it is widely used to solve classification problems the main concept of this algorithm is that it used to store all the available cases and classifies new cases by majority votes of its neighbors the case being then assigned to the class which is the most common amongst its -nearest neighborsmeasured by distance function the distance function can be euclideanminkowski and hamming distance consider the following to use knncomputationally knn are expensive than other algorithms used for classification problems the normalization of variables needed otherwise higher range variables can bias it in knnwe need to work on pre-processing stage like noise removal -means clustering as the name suggestsit is used to solve the clustering problems it is basically type of unsupervised learning the main logic of -means clustering algorithm is to classify the data set through number of clusters follow these steps to form clusters by -meansk-means picks number of points for each cluster known as centroids now each data point forms cluster with the closest centroidsi clusters
18,591
nowit will find the centroids of each cluster based on the existing cluster members we need to repeat these steps until convergence occurs random forest it is supervised classification algorithm the advantage of random forest algorithm is that it can be used for both classification and regression kind of problems basically it is the collection of decision trees ( forestor you can say ensemble of the decision trees the basic concept of random forest is that each tree gives classification and the forest chooses the best classifications from them followings are the advantages of random forest algorithmrandom forest classifier can be used for both classification and regression tasks they can handle the missing values it won' over fit the model even if we have more number of trees in the forest
18,592
ai with python data preparation we have already studied supervised as well as unsupervised machine learning algorithms these algorithms require formatted data to start the training process we must prepare or format data in certain way so that it can be supplied as an input to ml algorithms this focuses on data preparation for machine learning algorithms preprocessing the data in our daily lifewe deal with lots of data but this data is in raw form to provide the data as the input of machine learning algorithmswe need to convert it into meaningful data that is where data preprocessing comes into picture in other simple wordswe can say that before providing the data to the machine learning algorithms we need to preprocess the data data preprocessing steps follow these steps to preprocess the data in pythonstep importing the useful packagesif we are using python then this would be the first step for converting the data into certain formati preprocessing it can be done as followsimport numpy as np from sklearn import preprocessing here we have used the following two packagesnumpybasically numpy is general purpose array-processing package designed to efficiently manipulate large multi-dimensional arrays of arbitrary records without sacrificing too much speed for small multi-dimensional arrays sklearn preprocessingthis package provides many common utility functions and transformer classes to change raw feature vectors into representation that is more suitable for machine learning algorithms step defining sample dataafter importing the packageswe need to define some sample data so that we can apply preprocessing techniques on that data we will now define the following sample datainput_data np array([ - ][- ][ - ][ - ]]
18,593
step applying preprocessing techniquein this stepwe need to apply any of the preprocessing techniques the following section describes the data preprocessing techniques techniques for data preprocessing the techniques for data preprocessing are described belowbinarization this is the preprocessing technique which is used when we need to convert our numerical values into boolean values we can use an inbuilt method to binarize the input data say by using as the threshold value in the following waydata_binarized preprocessing binarizer(threshold= transform(input_data print("\nbinarized data:\ "data_binarizednowafter running the above code we will get the following outputall the values above (threshold valuewould be converted to and all the values below would be converted to binarized data [ ]mean removal it is another very common preprocessing technique that is used in machine learning basically it is used to eliminate the mean from feature vector so that every feature is centered on zero we can also remove the bias from the features in the feature vector for applying mean removal preprocessing technique on the sample datawe can write the python code shown below the code will display the mean and standard deviation of the input dataprint("mean ="input_data mean(axis= )print("std deviation "input_data std(axis= )we will get the following output after running the above lines of codemean std deviation -
18,594
nowthe code below will remove the mean and standard deviation of the input datadata_scaled preprocessing scale(input_dataprint("mean ="data_scaled mean(axis= )print("std deviation ="data_scaled std(axis= )we will get the following output after running the above lines of codemean - std deviation + + scaling it is another data preprocessing technique that is used to scale the feature vectors scaling of feature vectors is needed because the values of every feature can vary between many random values in other words we can say that scaling is important because we do not want any feature to be synthetically large or small with the help of the following python codewe can do the scaling of our input datai feature vectormin max scaling data_scaler_minmax preprocessing minmaxscaler(feature_range=( , )data_scaled_minmax data_scaler_minmax fit_transform(input_dataprint ("\nmin max scaled data:\ "data_scaled_minmaxwe will get the following output after running the above lines of codemin max scaled data [ ]normalization it is another data preprocessing technique that is used to modify the feature vectors such kind of modification is necessary to measure the feature vectors on common scale followings are two types of normalization which can be used in machine learningl normalization it is also referred to as least absolute deviations this kind of normalization modifies the values so that the sum of the absolute values is always up to in each row it can be implemented on the input data with the help of the following python codenormalize data data_normalized_l preprocessing normalize(input_datanorm=' '
18,595
print("\nl normalized data:\ "data_normalized_l the above line of code generates the following outputl normalized data[ - [- - - ] normalization it is also referred to as least squares this kind of normalization modifies the values so that the sum of the squares is always up to in each row it can be implemented on the input data with the help of the following python codenormalize data data_normalized_l preprocessing normalize(input_datanorm=' 'print("\nl normalized data:\ "data_normalized_l the above line of code will generate the following outputl normalized data[ - [- - - ]labeling the data we already know that data in certain format is necessary for machine learning algorithms another important requirement is that the data must be labelled properly before sending it as the input of machine learning algorithms for exampleif we talk about classificationthere are lot of labels on the data those labels are in the form of wordsnumbersetc functions related to machine learning in sklearn expect that the data must have number labels henceif the data is in other form then it must be converted to numbers this process of transforming the word labels into numerical form is called label encoding label encoding steps follow these steps for encoding the data labels in pythonstep importing the useful packages if we are using python then this would be first step for converting the data into certain formati preprocessing it can be done as follows
18,596
import numpy as np from sklearn import preprocessing step defining sample labels after importing the packageswe need to define some sample labels so that we can create and train the label encoder we will now define the following sample labelssample input labels input_labels ['red','black','red','green','black','yellow','white'step creating training of label encoder object in this stepwe need to create the label encoder and train it the following python code will help in doing thiscreating the label encoder encoder preprocessing labelencoder(encoder fit(input_labelsfollowing would be the output after running the above python codelabelencoder(step checking the performance by encoding random ordered list this step can be used to check the performance by encoding the random ordered list following python code can be written to do the sameencoding set of labels test_labels ['green','red','black'encoded_values encoder transform(test_labelsprint("\nlabels ="test_labelsthe labels would get printed as followslabels ['green''red''black'nowwe can get the list of encoded values word labels converted to numbers as followsprint("encoded values ="list(encoded_values)the encoded values would get printed as followsencoded values [
18,597
step checking the performance by decoding random set of numbersthis step can be used to check the performance by decoding the random set of numbers following python code can be written to do the samedecoding set of values encoded_values [ , , , decoded_list encoder inverse_transform(encoded_valuesprint("\nencoded values ="encoded_valuesnowencoded values would get printed as followsencoded values [ print("\ndecoded labels ="list(decoded_list)nowdecoded values would get printed as followsdecoded labels ['white''black''yellow''green'labeled / unlabeled data unlabeled data mainly consists of the samples of natural or human-created object that can easily be obtained from the world they includeaudiovideophotosnews articlesetc on the other handlabeled data takes set of unlabeled data and augments each piece of that unlabeled data with some tag or label or class that is meaningful for exampleif we have photo then the label can be put based on the content of the photoi it is photo of boy or girl or animal or anything else labeling the data needs human expertise or judgment about given piece of unlabeled data there are many scenarios where unlabeled data is plentiful and easily obtained but labeled data often requires human/expert to annotate semi-supervised learning attempts to combine labeled and unlabeled data to build better models
18,598
ai with python supervised learningclassification in this we will focus on implementing supervised learning classification the classification technique or model attempts to get some conclusion from observed values in classification problemwe have the categorized output such as "blackor "whiteor "teachingand "non-teachingwhile building the classification modelwe need to have training dataset that contains data points and the corresponding labels for exampleif we want to check whether the image is of car or not for checking thiswe will build training dataset having the two classes related to "carand "no carthen we need to train the model by using the training samples the classification models are mainly used in face recognitionspam identificationetc steps for building classifier in python for building classifier in pythonwe are going to use python and scikit-learn which is tool for machine learning follow these steps to build classifier in pythonstep import scikit-learn this would be very first step for building classifier in python in this stepwe will install python package called scikit-learn which is one of the best machine learning modules in python the following command will help us import the packageimport sklearn step import scikit-learn' dataset in this stepwe can begin working with the dataset for our machine learning model herewe are going to use the breast cancer wisconsin diagnostic database the dataset includes various information about breast cancer tumorsas well as classification labels of malignant or benign the dataset has instancesor dataon tumors and includes information on attributesor featuressuch as the radius of the tumortexturesmoothnessand area with the help of the following commandwe can import the scikitlearn' breast cancer datasetfrom sklearn datasets import load_breast_cancer nowthe following command will load the dataset data load_breast_cancer(following is list of important dictionary keysclassification label names(target_namesthe actual labels(targetthe attribute/feature names(feature_names
18,599
the attribute (datanowwith the help of the following commandwe can create new variables for each important set of information and assign the data in other wordswe can organize the data with the following commandslabel_names data['target_names'labels data['target'feature_names data['feature_names'features data['data'nowto make it clearer we can print the class labelsthe first data instance' labelour feature names and the feature' value with the help of the following commandsprint(label_namesthe above command will print the class names which are malignant and benign respectively it is shown as the output below['malignant'benign'nowthe command below will show that they are mapped to binary values and here represents malignant cancer and represents benign cancer you will receive the following outputprint(labels[ ] the two commands given below will produce the feature names and feature values print(feature_names[ ]mean radius print(features[ ] + + + + - - - - - - + - + + - - - - - - + + + + - - - - - -