تکجوی

مرجعی برای آخرین مطالب طراحی سایت فول استک پایتون/جنگو

تکجوی

مرجعی برای آخرین مطالب طراحی سایت فول استک پایتون/جنگو

همیشا وقتی یه مطلبی رو نیاز دارم، اول مسلما سرچ می کنم. اما گاهی اوقات یه مطلب مفیدی برای طراحی سایت رو می خونم، یا جزئیاتش رو فراموش می کنم، یا آدرس سایتش رو گم می کنم و بعدا حتی شده دو، سه روز دنبالش می گردم تا مجددا پیداش کنم. این وبلاگ کمک می کنه دیگه دنبال مطالب تکراری نگردم و تو کارم صرفه جویی زیادی بشه. ممکنه این مطالب دسته بندی شده، به درد شما هم بخوره.

طبقه بندی موضوعی
بایگانی

۱۲ مطلب با کلمه‌ی کلیدی «Python» ثبت شده است

  • ۰
  • ۰
  • محمد خسروی زاده
  • ۰
  • ۰

http://www.bogotobogo.com/python/python_redis_with_python.php

Redis with Python

In order to use #Redis with Python, we will need a Python Redis client.

In following sections, we will demonstrate the use of redis-py, a Redis Python Client.

redis-py requires a running Redis server. See Redis Install for installation.

  • محمد خسروی زاده
  • ۰
  • ۰

PySide

Welcome to the PySide documentation wiki page. The PySide project provides LGPL-licensed Python bindings for the Qt. It also includes complete toolchain for rapidly generating bindings for any Qt-based C++ class hierarchies. PySide Qt bindings allow both free open source and proprietary software development and ultimately aim to support Qt platforms.

  • محمد خسروی زاده
  • ۰
  • ۰

http://www.wikipython.com/other-concepts/anatomy-of-a-class/


It seems obvious, but note that you must define a class before you use it.


When you create a class, it establishes its own namespace and all its own local variables (except global definitions) exist only inside that namespace. They do not interact with other variables of the same name outside it. This leads us to one very important “feature” of classes that you need to know. If you use the same word to designate some specific value both inside and outside the class blueprint, the instance value will take precedence when you try to use that value.

  • محمد خسروی زاده
  • ۰
  • ۰

Mixing static, class and abstract methods

When building classes and inheritances, the time will come where you will have to mix all these methods decorators. So here's some tips about it.

Keep in mind that declaring a method as being abstract, doesn't freeze the prototype of that method. That means that it must be implemented, but it can be implemented with any argument list.

  • محمد خسروی زاده
  • ۰
  • ۰

https://stackoverflow.com/questions/3224268/python-unicode-encode-error

I'm reading and parsing an Amazon XML file and while the XML file shows a ' , when I try to print it I get the following error:


'ascii' codec can't encode character u'\u2019' in position 16: ordinal not in range(128) 
  • محمد خسروی زاده
  • ۰
  • ۰

http://devarea.com/8-python-modules-for-files-handling/#.Wlu2RyehU8o

Python has input/output features which are very easy to use. Files are accessed through file objects and you can open, read, write and close files using a very simple and easy to use functions from the standard library. To manage files and deal with special file formats (xml, json..) python provides special packages that make the developer life ever easier.

  • محمد خسروی زاده
  • ۰
  • ۰

Python Fire

https://pypi.python.org/pypi/fire

Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.

Python Fire is a simple way to create a CLI in Python.
Python Fire is a helpful tool for developing and debugging Python code.
Python Fire helps with exploring existing code or turning other people's code into a CLI.
Python Fire makes transitioning between Bash and Python easier.
Python Fire makes using a Python REPL easier by setting up the REPL with the modules and variables you'll need already imported and created.

  • محمد خسروی زاده
  • ۰
  • ۰

http://pyflux.readthedocs.io/en/latest/getting_started.html

PyFlux is an open source library in Python built specifically for working with time series. The study of time series is a subfield of statistics and econometrics, and the goals can be describing how time series behave (in terms of latent components or features of interest), and also predicting how

  • محمد خسروی زاده
  • ۰
  • ۰

http://contrib.scikit-learn.org/imbalanced-learn/

In an ideal world, we would have perfectly balanced datasets and we would all train models and be happy. Unfortunately, the real world is not like that, and certain tasks favor very imbalanced data. For example, when predicting fraud in credit card transactions, you would expect that the vast majority of the transactions (+99.9%?) are actually legit. Training ML(machine_learning) algorithms naively will lead to dismal performance, so extra care is needed when working with these types of datasets.

Imbalanced-learn is a Python package which offers implementations of some of those techniques, to make your life much easier.

  • محمد خسروی زاده