python code
python代码
一个python代码
确保你的Python代码 在web服务器的根目录外。 Make sure that your Python code is outside of the Web server's root. 这让阅读和理解其他人的Python代码 变得更容易了。 This makes it easier to read and understand other people's Python code . 下面的Python代码 显示了如何连接到一个现有的数据库。 The Python code below shows how to connect to an existing database. Here's how the Python code for pre-processing images looks like:. 这使得阅读和理解其他人的Python代码 更加容易。 This makes it easier to read and understand other people's Python code .
You can find the Python code here:. 我计划在不到20行的Python代码 中实现这一点。 It can be done in fewer than 20 lines of Python code . 复制此IP地址并在connect方法的Python代码 中使用。 Copy that address and use it on the Python code on the connect method. 如果您正在写开源的Python代码 ,并希望有尽可能广泛的用户,用CPython是最好的。 If you are writing open source Python code and want to reach the widest possible audience, targeting CPython is best. 如果您依赖于编写得不好的Python代码 ,那么您的性能问题不可能通过更快地执行来解决。 If you're relying on poorly-written Python code , your performance problems are unlikely to be solved by having it execute faster. 用于称赞符合语言习惯的Python代码 ,这些代码很好地利用了语言特性,从而显得简洁、易读,通常也更快。 Used to praise idiomatic Python code , which makes good use of language features to be concise, readable and often faster as well. 这会确保你的Python代码 不会意外被解析为纯文本(或者意外被执行)。 This will ensure that your Python code is not accidentally served as plain text(or accidentally executed). 每个Python使用者都可以更好地理解对方的Python代码 ,而其他语言的语法有可能会导致混淆和不一致的编程范例。 Everyone can understand each other's Python code much better than they could in some other language that has confusing and inconsistent programming paradigms. 我开发的Python代码 看起来比Lisp代码更像书中(独立开发)的伪代码。 The Python code I developed looks much more like the independently developed pseudo-code in the book than does the Lisp code. . 获取解析的JSON内容的Python代码 非常简单,在之前的文章中有更详细的解释。 The Python code to get the parsed JSON content is very simple and was explained in more detail in this previous post. 你将使用文本编辑器阅读和编写面向对象的Python代码 ,并阅读Python模块文档,以了解新的模块。 You will read and write object-oriented Python code using a text editor, and will read Python module documentation to learn about new modules. NumPy中的向量化操作将内部循环委托给高度优化的C和Fortran函数,从而实现更清晰,更快速的Python代码 。 Vectorized operations in NumPy delegate the looping internally to highly optimized C and Fortran functions, making for cleaner and faster Python code . 你不需要正式的证明,只需要简单的Python代码 和反复尝试。 You won't need formal proofs for that, just simply Python code and repeated attempts. 例如当浏览器向你的应用程序提出请求的时候,服务器返回的其实是你的Python代码 生成的一些东西。 For instance, when the browser in your application asks for something, the server is returning something your Python code generated. 在本次演讲中,我将介绍在MicroPython中编写快速高效的Python代码 的技巧和技巧。 In this talk I will go over the tricks and techniques for writing fast and efficient Python code in MicroPython. 作为一个额外的好处,Go代码的执行速度比我们高度优化的Python代码 快大约40倍。 As an added benefit, the Go code performed roughly 40 times faster than our highly-optimized Python code . 我计划在不到20行的Python代码 中实现这一点。 And it can all be achieved in less than 20 lines of Python code . 这通过一段称为“挂钩”的Python代码 来实现,您可以在其中添加自己的业务逻辑。 This is done via a piece of Python code called a hook, where you can add your own business logic. 每一个人都可以书写同样风格的Python代码 ,以利于阅读,或许是这样。 Everyone can write the same style of Python code , so it can be easier to read, maybe. 在我们的实现中,变换图像通过CPU的Python代码 生成,而此时GPU正在训练前一批图像。 In our implementation, the transformed images are generated in Python code on the CPU while the GPU is training on the previous batch of images.例如,Cython可以将稍微修改的Python代码 版本编译为C扩展,并且可以在许多不同的平台上使用。 Pyrex can compile a slightly modified version of Python code into a C extension, and can be used on many different platforms. PEP8是一种编码约定,它规定了一组指南,关于如何编写更易读的Python代码 。 PEP 8 is a coding convention, a set of rules, about how to make your Python code more readable. Format()比较新的函数,大多数的Python代码 仍然使用%操作符。 Format() is quite new, a lot of Python code still uses the% operator. 因此,为了开始使用这些数据集,请查看下面的Python代码 ,将其加载到你的计算机上。 So, for getting started with any of these datasets, look at the python code below for loading it onto your jupyter notebook.
Display more examples
Results: 54 ,
Time: 0.0217