Les Partages de Memiks
Tag cloud
Picture wall
Daily
RSS Feed
  • RSS Feed
  • Daily Feed
  • Weekly Feed
  • Monthly Feed
Filters

Links per page

  • 20 links
  • 50 links
  • 100 links

Filters

Untagged links
page 1 / 3
44 results tagged Python  ✕
abhiTronix/vidgear: A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features https://github.com/abhiTronix/vidgear
Fri Nov 26 14:01:51 2021 archive.org
QRCode
thumbnail

What is vidgear?

"VidGear is a cross-platform High-Performance Framework that provides an one-stop Video-Processing solution for building complex real-time media applications in python."

What does it do?

"VidGear can read, write, process, send & receive video files/frames/streams from/to various devices in real-time, and faster than underline libraries."

What is its purpose?

"Write Less and Accomplish More" — VidGear's Motto

"Built with simplicity in mind, VidGear lets programmers and software developers to easily integrate and perform Complex Video-Processing Tasks in their existing or newer applications without going through hefty documentation and in just a few lines of code. Beneficial for both, if you're new to programming with Python language or already a pro at it."
video processing python library
Envoyer un mail par SMTP en python https://python.doctor/page-python-envoyer-mail-smtp
Fri Nov 12 07:59:30 2021 archive.org
QRCode
python mail smtp
Tweet-Toot: Building a bot for Mastodon using Python - ayush sharma's notes ☕ + 🎧 + 🕹️ https://notes.ayushsharma.in/2018/09/tweet-toot-building-a-bot-for-mastodon-using-python
Tue Jul 7 10:13:18 2020 archive.org
QRCode
Mastodon python bot creation
Thonny, Python IDE for beginners https://thonny.org/
Fri Nov 15 14:06:01 2019 archive.org
QRCode

https://github.com/thonny/thonny/wiki/MicroPython

Easy to get started. Thonny comes with Python 3.7 built in, so just one simple installer is needed and you're ready to learn programming. (You can also use a separate Python installation, if necessary.) The initial user interface is stripped of all features that may distract beginners.

Initial layout
No-hassle variables. Once you're done with hello-worlds, select View → Variables and see how your programs and shell commands affect Python variables.

Variables table
Simple debugger. Just press Ctrl+F5 instead of F5 and you can run your programs step-by-step, no breakpoints needed. Press F6 for a big step and F7 for a small step. Steps follow program structure, not just code lines.

Stepping through statements
Step through expression evaluation. If you use small steps, then you can even see how Python evaluates your expressions. You can think of this light-blue box as a piece of paper where Python replaces subexpressions with their values, piece-by-piece.

Visualization of expression evaluation
Faithful representation of function calls. Stepping into a function call opens a new window with separate local variables table and code pointer. Good understanding of how function calls work is especially important for understanding recursion.

Visualization of call frames
Highlights syntax errors. Unclosed quotes and parentheses are the most common beginners' syntax errors. Thonny's editor makes these easy to spot.

Visualization of syntax errors
Explains scopes. Highlighting variable occurrences reminds you that the same name doesn't always mean the same variable and helps spotting typos. Local variables are visually distinguished from globals.

Local and global names are visually distinguished
Mode for explaining references. Variables are initially presented according to simplified model (name → value) but you can switch to more realistic model (name → address/id → value).

Variables table vs values table
Code completion. Students can explore APIs with the help of code completion.

Code completion
Beginner friendly system shell. Select Tools → Open system shell to install extra packages or learn handling Python on command line. PATH and conflicts with other Python interpreters are taken care of by Thonny.

System shell prepared for Python commands
Simple and clean pip GUI. Select Tools → Manage packages for even easier installation of 3rd party packages.

python ide powerfull
Building MicroPython for ESP8266 http://akshaim.github.io/IoT/MicroPython_ESP8266/MP_ESP_101.html
Fri Nov 15 13:48:57 2019 archive.org
QRCode
esp8266 micro python compile
adafruit/Adafruit_CircuitPython_BME280: CircuitPython driver for the BME280 https://github.com/adafruit/Adafruit_CircuitPython_BME280/
Tue Nov 5 12:51:51 2019 archive.org
QRCode
thumbnail
esp8266 micro python spi
1. Getting started with MicroPython on the ESP8266 — MicroPython 1.11 documentation https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html
Fri Nov 1 15:21:42 2019 archive.org
QRCode
esp8266 micro python
How to Create a Python Package - Python Central https://www.pythoncentral.io/how-to-create-a-python-package/
Wed Mar 13 19:02:40 2019 archive.org
QRCode
thumbnail

When you've got a large number of Python classes (or "modules"), you'll want to organize them into packages. When the number of modules (simply stated, a module might be just a file containing some classes) in any project grows significantly, it is wiser to organize them into packages – that is, placing functionally similar modules/classes in the same directory. This article will show you how to create a Python package.

Steps to Create a Python Package

Working with Python packages is really simple. All you need to do is:

Create a directory and give it your package's name.
Put your classes in it.
Create a __init__.py file in the directory

That's all! In order to create a Python package, it is very easy. The init.py file is necessary because with this file, Python will know that this directory is a Python package directory other than an ordinary directory (or folder – whatever you want to call it). Anyway, it is in this file where we'll write some import statements to import classes from our brand new package.

python package Create
API — Jinja2 Documentation (2.10) http://jinja.pocoo.org/docs/2.10/api/#loaders
Thu Mar 7 21:57:00 2019 archive.org
QRCode
thumbnail

L'API de Jinja2 pour faire vos templates en python

python template api
retropie - How do I control GPIO-connected fan via code at a certain CPU temperature? - Raspberry Pi Stack Exchange https://raspberrypi.stackexchange.com/questions/62220/how-do-i-control-gpio-connected-fan-via-code-at-a-certain-cpu-temperature
Tue Feb 26 19:43:52 2019 archive.org
QRCode
thumbnail

from gpiozero import LED
#we are using the LED sub-module just as a generic output
fan = LED(18) #for the positive, put the negative in one of the grounds
def cputemp():
f = open("/sys/class/thermal/thermal_zone0/temp")
CPUTemp = f.read()
f.close()
StringToOutput= str(int(CPUTemp)/1000)

while True:
cputemp()
if StringToOutput >= 45:
fan.on()
elif StringToOutput < 45:
fan.off

This is some fairly simple code that gets the temperature from /sys/class/thermal/thermal_zone0/temp in thousandths Celsius divides by 1000 for Celsius and checks if it is more than 45. if it is it turns the "fan" on and if not , it stays off. But you'll almost certainly never need a fan as long as you're not doing anything stupid.

This code was adapted from a SE question but i am not sure which.

raspberry pi python fan control gpio
the4thdoctor/pg_chameleon: MySQL to PostgreSQL replica system https://github.com/the4thdoctor/pg_chameleon/
Mon Feb 25 23:38:13 2019 archive.org
QRCode

pg_chameleon is a MySQL to PostgreSQL replica system written in Python 3. The system use the library mysql-replication to pull the row images from MySQL which are stored into PostgreSQL as JSONB. A pl/pgsql function decodes the jsonb values and replays the changes against the PostgreSQL database.

pg_chameleon 2.0 is available on pypi

postgresql mysql migration python
Python: Call Functions by String | Open Source Kitty https://arithxu.com/2017/10/14/Python-Call-Functions-by-String/
Fri Feb 22 17:20:30 2019 archive.org
QRCode
thumbnail

Approach 3: Synbol Tables

Built-in function locals() and globals() return a dictionary of current local and global symbol table respectively. So you could call a function just like:

def my_func(arg1, arg2):
print(arg1, arg2)
return arg1 + arg2

r = locals()['my_func'](http://1, 2)
print(r)

The output is:

1 2
3

This approach is just like the examples provided in the very beginning of this post, in which, I maintained a symbol table by myself and called the function by its string-typed name.

python dynamic call function
readability-lxml · PyPI https://pypi.org/project/readability-lxml/
Fri Feb 22 01:48:31 2019 archive.org
QRCode
thumbnail

readability en python... humm ça me fait envie...

python readability
Skeleton: A minimal example generating HTML with Python Jinja https://code-maven.com/minimal-example-generating-html-with-python-jinja
Wed Feb 20 00:19:23 2019 archive.org
QRCode
thumbnail
python template jinja
Working With JSON Data in Python – Real Python https://realpython.com/python-json/
Tue Feb 19 19:02:49 2019 archive.org
QRCode
thumbnail
python serialize json
Bulk inserting on table with foreign key field - Stack Overflow https://stackoverflow.com/questions/48599465/bulk-inserting-on-table-with-foreign-key-field
Tue Feb 19 05:01:26 2019 archive.org
QRCode
thumbnail

Well, if you don't know ahead of time which servers are present in the DB it seems like your problem is the data-structure you're using. Keeping server_name -> member_names in a dict like that and trying to insert it all in one go is not how relational databases work.

Try this:

server_to_id = {}
for server_name in data:
if server_name not in server_to_id:
server = Server.create(name=server_name)
server_to_id[server_name] = server.id

for server_name, member_names in data.items():
server_id = server_to_id[server_name]
member_data = [{'name': name, 'server': server_id} for name in member_names]
Member.insert_many(member_data).execute()

Note: don't forget to call .execute() when using insert() or insert_many().

peewee python bulk insert foreign keys
Welcome to Flask — Flask 1.0.2 documentation http://flask.pocoo.org/docs/1.0/
Fri Feb 15 22:24:58 2019 archive.org
QRCode

Welcome to Flask

Flask: web development, one drop at a time

Welcome to Flask’s documentation.
Get started with Installation and then get an overview with the Quickstart.
There is also a more detailed Tutorial that shows how to create a small but complete application with Flask.
Common patterns are described in the Patterns for Flask section.
The rest of the docs describe each component of Flask in detail, with a full reference in the API section.

Flask depends on the Jinja template engine and the Werkzeug WSGI toolkit.

python flask framework web
python-cheatsheet/README.md at master · gto76/python-cheatsheet · GitHub https://github.com/gto76/python-cheatsheet/blob/master/README.md
Mon Feb 11 14:17:41 2019 archive.org
QRCode
thumbnail

Comprehensive Python Cheatsheet. Contribute to gto76/python-cheatsheet development by creating an account on GitHub.

python structure titoriel
Python Application Layouts: A Reference – Real Python https://realpython.com/python-application-layouts/
Mon Feb 11 14:13:34 2019 archive.org
QRCode
thumbnail

Table of Contents

Command-Line Application Layouts
    One-Off Script
    Installable Single Package
    Application with Internal Packages
Web Application Layouts
    Django
    Flask
Conclusions and Reminders
python structure tutoriel
Structuring Your Project — The Hitchhiker's Guide to Python https://docs.python-guide.org/writing/structure/
Mon Feb 11 14:10:06 2019 archive.org
QRCode
thumbnail

Un Projet en Python ?

  • Comment le structurer
  • Comment organiser les fichiers
  • Quels fichiers creer et pourquoi
  • Quelques bonnes pratiques.
python structure tutoriel
page 1 / 3
4756 links, including 1670 private
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Theme by kalvn