Turing game

We all know " Turing test ". In its classic version, a person and a car answer the judge's questions, and the judge does not see the respondents and should only guess from the answers who is who. 3r361.  
3r361.  
About this test, even filmed a short feature film "Who is behind the wall." It can be said, fantastic, because the action of the plot takes place at the end of 200? and it was shot, for a minute, in 1977. If you haven’t seen it - you’ll see it, and it’s necessary to the end - as it should be in a short film, the outcome will be unexpected. 3r361.  
3r361.  
3r314. 3r361.  
3r318...
+ 0 -

Metamorphosis of the attributes of the class

 3r33150. 3r3-31. A short note from the “You Warned” series
 3r33150. The transition from classical programming languages ​​to Python delivers a lot of surprises. 3r3138.  3r33150. We read documentation:
 3r33150.
For example, it is important to say that
3r3138.  3r33150. 3r3138.  3r33150. Let's try to play
 3r33150. 3r3122. class Vessel:
#class attribute
vtype = "boat"
3r33150. #instance attribute
def __init __ (self, name):
self.name = name
3r33130.
3r3138.  3r33150.
3r330. 3r3138.  3r33150. Create two objects and check the values ​​of all attributes: 3r3138.  3r33150. 3r3122.
+ 0 -

Introduction to WSGI Servers: Part One

 3r3406. 3r3-31. This article is a translation of Kevin Goldberg’s “An Introduction to Python WSGI Servers: Part 1” article blog.appdynamics.com/engineering/an-introduction-to-python-wsgi-servers-part-1 with minor additions from the translator 3r33382.  3r3406. 3r33382.  3r3406. Introduction to WSGI Servers: Part One 3r33382.  3r3406. 3r33382.  3r3406. 3r33380. A brief history of servers WSGI Python
3r33382.  3r3406. 3r33394. WSGI [/b] Servers appeared because web servers at that time could not interact with applications written in Python. 3r33394. WSGI [/b] ( Pronounced “whiz-gee” with a solid “g” ) Was developed ...
+ 0 -

Automate Google BigQuery data import with Google Cloud Functions

 3r33333. 3r3-31. We are constantly working with Google BigQuery - importing data about users, their orders and advertising costs from various sources in order to be able to combine them with each other. What does this give us? For example, if you have an online store and a customer places an order by phone, and then logs into the site, then using Google BigQuery, you can link all of his actions backdating. You can track the client’s entire journey through the marketing funnel - from the first hit on the site to buying at the brick and mortar store, and evaluate advertising campaigns taking into ...
+ 0 -

Python installer for Android builds from TeamCity do it yourself

Python installer for Android builds from TeamCity do it yourself 3r33232.  
Audience
3r33232.  
QA-engineers, mobile application testers, automation.
3r33232.  
The problem is
3r33232.  
During testing of applications for Android (not only, but then we will only discuss this platform), we have to install many assemblies of the tested product /products. This process takes time and effort, which is more efficient to spend on finding bugs.
3r33232.  
In this article, we will look at the existing solution, write ours in Python and compare them.
Android Debug Bridge (adb) 3r33333.  
3r33333. 3r33232.  Audience3r33232.  QA-engineers, mobile application testers, automation.3r33232.  The problem is3r33232.  During testing of applications for Android (not only, but then we will only discuss this platform), we have to install many assemblies of the tested product /products. This process takes time and effort, which is more efficient to spend on finding bugs.3r33232.  In this article, we will look at the existing solution, write ours in Python and compare them. Android Debug Bridge (adb) 3r33333.  3r33333...
+ 0 -

Build functions in the console. Part 2 (Graph)

+ 0 -

Memoization of the default kwarg in Python

 3r3147. 3r3-31. This is how you can memorize the Python function: 3r3133.  3r3147.
 3r3147. 3r33112. 3r3113. def memo_square (a, cache = {}):
if a not in cache:
cache[a]= a * a
return cache[a] 3r3122.
 3r3147. The reception is undeservedly little known, so under the cut we will analyze how it works and what it is for.
 3r3147. @ functools.lru_cache . The decorator from the functools module, which remembers the last function calls. Reliably and simply, but uses all the parameters of a function as keys, which means that it requires their hashing and cannot notice that two formally different values ...[/a][/a]
+ 0 -

Symbolic solution of linear differential equations and systems using the Laplace transform method using SymPy

 3r31228. 3r3-31.
Symbolic solution of linear differential equations and systems using the Laplace transform method using SymPy  3r31228. The implementation of algorithms in Python using symbolic calculations is very convenient when solving problems of mathematical modeling of objects defined by differential equations. To solve such equations, the Laplace transformations are widely used, which, to put it simply, allow us to reduce the problem to the solution of the simplest algebraic equations.
 3r31228.
 3r31228. In this publication, I propose to consider the functions of the direct and inverse Laplace transform from the SymPy library, which allow using the Laplace method to solve differential equations and systems ...
+ 0 -

What the programmer needs to remember when switching to Python

 3r33557. 3r3-31. 3r? 3543. Once upon a time, in my student years, I was bitten by a python, although the incubation period dragged on and it turned out that I became a programmer on a pearl. 3r33546. 3r33541.  3r33557. 3r? 3543. However, at some point, the pearl exhausted itself, and I decided to go in for python, at first I just did something and understood what was needed for this task, and then I realized that we need some systematic knowledge and read several books: 3r33546. 3r33541.  3r33557.
 3r33557. 3r318. Bill Lyubanovich “Simple Python. Modern programming style ”3r3193.  3r33557. 3r318...
+ 0 -

Python: metaprogramming in production. Part Two

+ 0 -