text
stringlengths 0
6.86k
|
---|
python provides a round function for rounding a float to the nearest integer for tie @@ breaking versions before 3 use round @@ away @@ from @@ zero round ( 0 @@ 5 ) is 1 @@ 0 round ( <unk> ) is − 1 @@ 0 python 3 uses round to even round ( 1 @@ 5 ) is 2 round ( 2 @@ 5 ) is 2
|
python allows boolean expressions with multiple equality relations in a manner that is consistent with general use in mathematics for example the expression a < b < c tests whether a is less than b and b is less than c c @@ derived languages interpret this expression differently in c the expression would first evaluate a < b resulting in 0 or 1 and that result would then be compared with c
|
python has extensive built @@ in support for arbitrary precision arithmetic integers are transparently switched from the machine @@ supported maximum fixed @@ precision ( usually 32 or 64 bits ) belonging to the python type int to arbitrary precision belonging to the python type long where needed the latter have an l suffix in their textual representation the decimal type / class in module decimal ( since version 2 @@ 4 ) provides decimal floating point numbers to arbitrary precision and several rounding modes the fraction type in module fractions ( since version 2 @@ 6 ) provides arbitrary precision for rational numbers
|
due to python 's extensive mathematics library it is frequently used as a scientific scripting language to aid in problems such as numerical data processing and manipulation
|
= = libraries = =
|
python has a large standard library commonly cited as one of python 's greatest strengths providing tools suited to many tasks this is deliberate and has been described as a batteries included python philosophy for internet @@ facing applications many standard formats and protocols ( such as mime and http ) are supported modules for creating graphical user interfaces connecting to relational databases pseudorandom number generators arithmetic with arbitrary precision decimals manipulating regular expressions and doing unit testing are also included
|
some parts of the standard library are covered by specifications ( for example the web server gateway interface ( <unk> ) implementation <unk> follows pep 333 ) but most modules are not they are specified by their code internal documentation and test suite ( if supplied ) however because most of the standard library is cross @@ platform python code only a few modules need altering or rewriting for variant implementations
|
the standard library is not needed to run python or embed it in an application for example blender 2 @@ 49 omits most of the standard library
|
as of january 2016 the python package index the official repository of third @@ party software for python contains more than 72 @@ 000 packages offering a wide range of functionality including
|
graphical user interfaces web frameworks multimedia databases networking and communications
|
test frameworks automation and web scraping documentation tools system administration
|
scientific computing text processing image processing
|
= = development environments = =
|
most python implementations ( including cpython ) can function as a command line interpreter for which the user enters statements sequentially and receives the results immediately ( read eval print loop ( <unk> ) ) in short python acts as a command @@ line interface or shell
|
other shells add abilities beyond those in the basic interpreter including <unk> and <unk> while generally following the visual style of the python shell they implement features like auto @@ completion session state retention and syntax highlighting
|
in addition to standard desktop integrated development environments ( python <unk> ) there are also web browser @@ based <unk> sage ( intended for developing science and math @@ related python programs ) and a browser @@ based <unk> and hosting environment <unk>
|
= = implementations = =
|
the main python implementation named cpython is written in c meeting the <unk> standard it compiles python programs into intermediate bytecode which is executed by the virtual machine cpython is distributed with a large standard library written in a mixture of c and python it is available in versions for many platforms including windows and most modern unix @@ like systems cpython was intended from almost its very conception to be cross @@ platform
|
pypy is a fast compliant interpreter of python 2 @@ 7 and 3 @@ 2 its just @@ in @@ time compiler brings a significant speed improvement over cpython a version taking advantage of multi @@ core processors using software transactional memory is being created
|
<unk> python is a significant fork of cpython that implements <unk> it does not use the c memory stack thus allowing massively concurrent programs pypy also has a <unk> version
|
<unk> is a lean fast python 3 variant that is optimised to run on <unk>
|
other just @@ in @@ time compilers have been developed in the past but are now unsupported
|
google began a project named <unk> swallow in 2009 with the aims of speeding up the python interpreter by 5 times by using the <unk> and of improving its multithreading ability to scale to thousands of cores
|
<unk> is a just @@ in @@ time specialising compiler that integrates with cpython and transforms bytecode to machine code at runtime the emitted code is specialised for certain data types and is faster than standard python code
|
in 2005 nokia released a python interpreter for the series 60 mobile phones named <unk> it includes many of the modules from the cpython implementations and some added modules to integrate with the symbian operating system this project has been kept up to date to run on all variants of the s60 platform and there are several third party modules available the nokia <unk> also supports python with gtk widget libraries with the feature that programs can be both written and run on the target device
|
there are several compilers to high @@ level object languages with either unrestricted python a restricted subset of python or a language similar to python as the source language
|
<unk> compiles into java byte code which can then be executed by every java virtual machine implementation this also enables the use of java class library functions from the python program
|
<unk> follows a similar approach in order to run python programs on the net common language runtime
|
the <unk> language can be compiled to c java bytecode or common intermediate language and is used to build the pypy interpreter of python
|
pyjamas compiles python to javascript
|
shed skin compiles python to c + +
|
<unk> and pyrex compile to c
|
a performance comparison of various python implementations on a non @@ numerical ( combinatorial ) workload was presented at <unk> ' 13
|
= = development = =
|
python 's development is conducted largely through the python enhancement proposal ( pep ) process the pep process is the primary mechanism for proposing major new features for collecting community input on an issue and for documenting the design decisions that have gone into python outstanding <unk> are reviewed and commented upon by the python community and by van rossum the python project 's benevolent dictator for life
|
enhancement of the language goes along with development of the cpython reference implementation the mailing list python @@ dev is the primary forum for discussion about the language 's development specific issues are discussed in the roundup bug tracker maintained at <unk> development takes place on a self @@ hosted source code repository running mercurial
|
cpython 's public releases come in three types distinguished by which part of the version number is incremented
|
backwards @@ incompatible versions where code is expected to break and must be manually ported the first part of the version number is incremented these releases happen infrequently for example version 3 @@ 0 was released 8 years after 2 @@ 0
|
major or feature releases which are largely compatible but introduce new features the second part of the version number is incremented these releases are scheduled to occur roughly every 18 months and each major version is supported by bugfixes for several years after its release
|
<unk> releases which introduce no new features but fix bugs the third and final part of the version number is incremented these releases are made whenever a sufficient number of bugs have been fixed upstream since the last release or roughly every 3 months security vulnerabilities are also patched in <unk> releases
|
many alpha beta and release @@ candidates are also released as previews and for testing before final releases although there is a rough schedule for each release this is often pushed back if the code is not ready the development team monitors the state of the code by running the large unit test suite during development and using the <unk> continuous integration system
|
the community of python developers has also contributed over 72 @@ 000 software modules ( as of january 2016 ) to the python package index ( <unk> ) the official repository of third @@ party libraries for python
|
the major academic conference on python is named <unk> there are special mentoring programmes like the <unk>
|
= = naming = =
|
python 's name is derived from the television series monty python 's flying circus and it is common to use monty python references in example code for example the <unk> variables often used in python literature are spam and eggs instead of the traditional foo and bar also the official python documentation often contains various obscure monty python references
|
the prefix <unk> is used to show that something is related to python examples of the use of this prefix in names of python applications or libraries include <unk> a binding of sdl to python ( commonly used to create games ) <unk> an implementation for the symbian s60 operating system <unk> and <unk> which bind <unk> and gtk respectively to python and pypy a python implementation originally written in python
|
= = uses = =
|
since 2003 python has consistently ranked in the top ten most popular programming languages as measured by the tiobe programming community index as of june 2016 it is the fourth most popular language it was ranked as programming language of the year for the year 2007 and 2010 it is the third most popular language whose grammatical syntax is not predominantly based on c eg c + + objective @@ c ( note c # and java only have partial syntactic similarity to c such as the use of curly braces and are closer in similarity to each other than c )
|
an empirical study found scripting languages ( such as python ) more productive than conventional languages ( such as c and java ) for a programming problem involving string manipulation and search in a dictionary memory consumption was often better than java and not much worse than c or c + +
|
large organizations that make use of python include google yahoo cern nasa and some smaller ones like ilm and ita the social news networking site reddit is written entirely in python
|
python can serve as a scripting language for web applications eg via mod _ <unk> for the apache web server with web server gateway interface a standard api has evolved to facilitate these applications web frameworks like django pylons pyramid <unk> <unk> tornado flask bottle and <unk> support developers in the design and maintenance of complex applications pyjamas and <unk> can be used to develop the client @@ side of ajax @@ based applications <unk> can be used as data mapper to a relational database twisted is a framework to program communications between computers and is used ( for example ) by dropbox
|
libraries like <unk> <unk> and <unk> allow the effective use of python in scientific computing with specialized libraries such as <unk> and <unk> providing domain @@ specific functionality sage is a mathematical software with a notebook programmable in python its library covers many aspects of mathematics including algebra combinatorics numerical mathematics number theory and calculus
|
python has been successfully embedded in many software products as a scripting language including in finite element method software such as <unk> 3d parametric modeler like <unk> 3d animation packages such as 3ds max blender cinema 4d lightwave houdini maya modo <unk> softimage the visual effects compositor nuke 2d imaging programs like <unk> <unk> <unk> and paint shop pro and musical notation program or <unk> capella gnu debugger uses python as a pretty printer to show complex structures such as c + + containers <unk> promotes python as the best choice for writing scripts in <unk> it has also been used in several video games and has been adopted as first of the three available programming languages in google app engine the other two being java and go
|
python has been used in artificial intelligence tasks as a scripting language with module architecture simple syntax and rich text processing tools python is often used for natural language processing tasks
|
many operating systems include python as a standard component the language ships with most linux distributions amigaos 4 freebsd netbsd openbsd and os x and can be used from the terminal many linux distributions use installers written in python ubuntu uses the <unk> installer while red hat linux and fedora use the anaconda installer gentoo linux uses python in its package management system portage
|
python has also seen extensive use in the information security industry including in exploit development
|
most of the sugar software for the one laptop per child xo now developed at sugar labs is written in python
|
the raspberry pi single @@ board computer project has adopted python as its main user @@ programming language
|
<unk> includes python and intends to replace java with python python scripting provider is a core feature since version 4 @@ 0 from 7 february 2013
|
= = languages influenced by python = =
|
python 's design and philosophy have influenced several programming languages including
|
boo uses indentation a similar syntax and a similar object model however boo uses static typing ( and optional duck typing ) and is closely integrated with the net framework
|
cobra uses indentation and a similar syntax cobra 's acknowledgements document lists python first among languages that influenced it however cobra directly supports design @@ by @@ contract unit tests and optional static typing
|
<unk> borrowed <unk> generators and list comprehensions from python
|
go is described as incorporating the development speed of working in a dynamic language like python
|
groovy was motivated by the desire to bring the python design philosophy to java
|
julia was designed with true macros [ and to be ] as usable for general programming as python [ and ] should be as fast as c calling to or from julia is possible to with <unk> and a python package <unk> allows calling in the other direction from python
|
ocaml has an optional syntax named <unk> ( the <unk> thing ) inspired by python and haskell
|
ruby 's creator yukihiro matsumoto has said i wanted a scripting language that was more powerful than perl and more object @@ oriented than python that 's why i decided to design my own language
|
<unk> is a programming language that cross @@ compiles to javascript it has python @@ inspired syntax
|
swift is a programming language invented by apple it has some python @@ inspired syntax
|
python 's development practices have also been emulated by other languages the practice of requiring a document describing the rationale for and issues surrounding a change to the language ( in python 's case a pep ) is also used in tcl and <unk> because of python 's influence
|
python has been awarded a tiobe programming language of the year award twice ( in 2007 and 2010 ) which is given to the language with the greatest growth in popularity over the course of a year as measured by the tiobe index
|
= lisa the vegetarian =
|
lisa the vegetarian is the fifth episode of the seventh season of the american television series the simpsons it originally aired on the fox network in the united states on october 15 1995 in the episode lisa decides to stop eating meat after bonding with a lamb at a petting zoo her schoolmates and family members ridicule her for her beliefs but with the help of apu paul and linda mccartney she commits to vegetarianism
|
directed by mark kirkland lisa the vegetarian is the first full @@ length episode david s cohen wrote for the simpsons david mirkin the show runner at the time supported the episode in part because he had just become a vegetarian himself former beatle paul mccartney and his then wife linda mccartney guest star in the episode paul mccartney 's condition for appearing was that lisa would remain a vegetarian for the rest of the series the episode makes several references to mccartney 's musical career and his song maybe i 'm amazed plays during the closing credits
|
the inaugural airing of lisa the vegetarian was watched by 14 @@ 6 million viewers and finished 47th in the ratings for the week of october 9 15 1995 with a 9 @@ 0 nielsen rating it was the fourth highest @@ rated show on the fox network that week the episode received generally positive reviews from television critics it has won two awards an environmental media award and a genesis award for highlighting environmental and animal issues
|
= = plot = =
|
the simpson family visit story town village an amusement park for babies as a special treat for maggie in the village there is a petting zoo where lisa is enamored by a cute lamb that night marge serves lamb chops for dinner but lisa is troubled by the connection between the dish and its living counterpart and announces that she will no longer eat meat in response bart and homer mock her relentlessly reaction at school is no better when lisa requests a vegetarian alternative to the cafeteria food principal skinner labels her an agitator the students are then forced to watch a meat council propaganda film the meat council presents meat and you partners in patriotism starring troy mcclure which portrays eating meat as a patriotic duty and criticizes vegetarianism lisa is unimpressed by the film but her classmates tease her
|
homer and bart continue to give lisa a hard time at home particularly since homer is preparing to host a barbecue complete with roast pig bart and homer even form a conga line and sing you don 't win friends with salad on the day of the barbecue lisa makes gazpacho for all the guests as an alternative to meat but the partygoers laugh in her face enraged and deeply hurt she climbs aboard a riding mower and drives away with the roast pig in tow homer and bart chase her but she pushes the pig off a slope and they are too late the pig rolls through bushes into a river and is shot into the air by a dam spillway 's suction
|
at home homer reprimands lisa for ruining his party and demands an apology but lisa refuses to apologize and chews him out for serving a meat @@ based dish they fight and she leaves the house not wanting to live in a house with a prehistoric carnivore as lisa walks along she decides that she can no longer fight the pressure to eat meat prompting her to grab a hot dog from the grill at the kwik @@ e @@ mart and take a bite however apu himself a vegan reveals that she has eaten a tofu dog which he subtly switched out and none of his loyal customers had noticed the change
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.