Skip to main content

Cerca

Elementi taggati con: python


 

Dear Lazyspora: How to edit video using scripts?



What I have:

  • a video snippet
  • a text for a title/subtitle
  • a text for credit lines

What I want:

  • a video consisting of the video snippet with a rendered title at the beginning, the rendered credit lines at the end
  • text rendering must look nice, i.e. I must be able to control font, size, style, colour
  • title must crossfade into actual video, video must crossfade into credit lines

How I want it:

  • must be a script, usable from a Makefile, not an interactive, graphical editor
  • must run on Linux
  • all necessary components should be in Debian (testing/unstable/experimental OK)

Bonus points:

  • if scripting language is Python
  • if I can put a logo behind the title and credit lines
  • if I can put an audio track on everything
AFAIK, one can use blender with Python (import bpy), but I'm not sure whether scripts are usable without the GUI.

Many thanks in advance for any useful hint!

#blender #videoediting #question #python #video

 

searx v0.11.0 is out!



privacy-respecting, hackable metasearch engine



Features:
  • New engines
    • Protein Data Bank Europe (science)
    • Voat.co (general, social media)
    • Online Etimology Dictionary (science)
    • CCC tv (video, it)
    • Searx (all categories - can rotate multiple other instances)
  • Answerer functionality (see answerer section on /preferences)
  • Local answerers
    • Statistical functions
    • Random value generator
  • Result proxy support (with morty)
  • Extended time range filter
  • Improved search language support
  • Multiple engine fixes (digbt, 500px, google news, ixquick, bing, kickass, google play movies, habrahabr, yandex)
  • Minor UI improvements
  • Suggestion support for JSON engine
  • Result and query escaping fixes
  • Configurable HTTP server version
  • More robust search error handling
  • Faster webapp initialization in debug mode
  • Search module refactor
  • Translation updates
#searx #privacy #python #decentralization #freesoftware #agpl3

asciimoo/searx

searx - Privacy-respecting metasearch engine

 
Scaling #Python is on its way https://julien.danjou.info/blog/2017/announcing-scaling-python #dev #programming #book

Scaling Python is on its way

My day-to-day activities are still evolving around the Python programming language, as I continue working on the OpenStack project as part of my job at Red Hat. OpenStack is still the biggest Python …

 
Good riddance #Python 2 🎉 ✨

#Django #future

 
Hey everyone, I’m #newhere.

[Not really. This is my 3rd pod attempt. But it's the first time I post the newhere tag]

I’m interested in #freesoftware, #mathematics, #python, #vegan, and #world.

 
Hey everyone, I’m #newhere.

[Not really. This is my 3rd pod attempt. But it's the first time I post the newhere tag]

I’m interested in #freesoftware, #mathematics, #python, #vegan, and #world.

 
Un nouveau projet totalement bienvenue pour simplifier l'installation des applications #python

kennethreitz/pipenv: Sacred Marriage of Pipfile, Pip, & Virtualenv.



https://github.com/kennethreitz/pipenv

#github

kennethreitz/pipenv

pipenv - Sacred Marriage of Pipfile, Pip, & Virtualenv.

 
Announcing #pipenv https://www.kennethreitz.org/essays/announcing-pipenv #python #dev #programming

Announcing Pipenv!

I wrote a new tool this weekend, called pipenv. Check it out on GitHub!

Pipenv in action.

Pipenv is an experimental project that aims to bring the best of all
packaging worlds to the Python world. It harnesses Pipfile, pip, and
virtualenv into one single toolchain. It features very pretty terminal
colors.

It automatically creates and manages a virtualenv for your projects, as
well as adds/removes packages from your Pipfile as you install/uninstall
packages. The lock command generates a lockfile (Pipfile.lock).

☤ Features
* Automatically finds your project home, recursively, by looking for a
Pipfile.
* Automatically generates a Pipfile, if one doesn't exist.
* Automatically generates a Pipfile.lock, if one doesn't exist.
* Automatically creates a virtualenv in a standard location
(project/.venv).
* Automatically adds packages to a Pipfile when they are installed.
* Automatically removes packages from a Pipfile when they are
un-installed.
* Also automatically updates pip.

The main commands are install, uninstall, and lock, which generates a
Pipfile.lock. These are intended to replace $ pip install usage, as well as
manual virtualenv management.

☤ Basic Concepts
* A virtualenv will automatically be created, when one doesn't exist.
* When no parameters are passed to install, all packages specified will
be installed.
* When no parameters are passed to uninstall, all packages will be
uninstalled.
* To initialize a Python 3 virtual environment, run $ pipenv --three
 first.
* To initialize a Python 2 virtual environment, run $ pipenv --two
 first.
* Otherwise, whatever $ which python will be the default.
☤ Other Commands
* shell will spawn a shell with the virtualenv activated.
* run will run a given command from the virtualenv, with any arguments
forwarded (e.g. $ pipenv run python).
* check asserts that PEP 508 requirements are being met by the current
environment.
☤ Usage

$ pipenv
Usage: pipenv [OPTIONS]COMMAND [ARGS]...

Options:
--where Output project home information.
--bare Minimal output.
--three / --two Use Python 3/2 when creating virtualenv.
--version Show the version and exit.
--help Show this message and exit.

Commands:
check Checks PEP 508 markers provided in Pipfile.
install Installs a provided package and adds it to...
lock Generates Pipfile.lock.
run Spans a command installed into the...
shell Spans a shell within the virtualenv.
uninstall Un-installs a provided package and removes it...
update Updates pip to latest version, uninstalls all...


$ pipenv --where
Pipfile found at /Users/kennethreitz/repos/kr/pip2/test/Pipfile. Considering this to be the project home.


$ pipenv install
Creating a virtualenv for this project...
...
No package provided, installing all dependencies.
Virtualenv location: /Users/kennethreitz/repos/kr/pip2/test/.venv
Installing dependencies from Pipfile.lock...
...

To activate this project's virtualenv, run the following:
$ pipenv shell


$ pipenv install pytest --dev
Installing pytest...
...
Adding pytest to Pipfile's [dev-packages]...


$ pipenv lock
Assuring all dependencies from Pipfile are installed...
Locking [dev-packages] dependencies...
Locking [packages]dependencies...
Note: your project now has only default [packages]installed.
To install [dev-packages], run: $ pipenv init --dev



$ pipenv install --dev
Pipfile found at /Users/kennethreitz/repos/kr/pip2/test/Pipfile. Considering this to be the project home.
Pipfile.lock out of date, updating...
Assuring all dependencies from Pipfile are installed...
Locking [dev-packages] dependencies...
Locking [packages]dependencies...
Note: your project now has only default [packages]installed.
To install [dev-packages], run: $ pipenv install --dev
Installing dependencies from Pipfile.lock...
...


$ pipenv uninstall
No package provided, un-installing all dependencies.
Found 25 installed package(s), purging...
...
Environment now purged and fresh!


$ pipenv shell
Spawning virtualenv shell (/bin/zsh).
(test)$

 ☤ Installation

$ pip install pipenv

✨🍰✨

 
#Pycycle: Find and fix circular imports in #python projects https://github.com/bndr/pycycle #dev #programming

bndr/pycycle

pycycle - Tool for pinpointing circular imports in Python. Find circle imports in any project

 
amélioration des métadonnés dans #imapbox, c'est maintenant plus facile de retrouver les mails sauvegardés https://github.com/polo2ro/imapbox thanks to JQ #github #python

polo2ro/imapbox

imapbox - Dump imap inbox to a local folder in a regular backupable format: html, json and attachements

 
#Django #Web #Framework ( #Python ) tutorial https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django #dev #programming

Django Web Framework (Python)

Django is an extremely popular and fully featured server-side web framework, written in Python. The module shows you why Django is one of the most popular web server frameworks, how to set up a development environment, and how to get started with using it to create your own web applications.

 
Immagine/foto
https://framagit.org/denissalem/VenC/
https://github.com/denissalem/VenC/

Me revoilà camarades! Ça faisait un moment! J'ai ENFIN terminé la version 1.2.0 de #VenC qui succède à la version 1.1.2

Pour rappel, #VenC est un éditeur de #blog static en ligne de commande pour #linux.

Voilà la liste des dernières features cool de cette dernière version, en plus de nombreuses corrections de bugs

- Support de style CSS unique par publication.
- Interpréteur #markdown optionnel.
- Copie en ligne du #blog.
- Ajout de thèmes.
- Installation via #pip
- Verbosité plus élevé lors d'erreurs.
- Support de la langue anglaise.
- Ajout d'un aide mémoire.

À cela s'ajoute maintenant une FAQ et des tutoriaux en anglais et en français. Je compléterais tout ça au fur et à mesure, mais il y a déjà de quoi prendre en main l'outil.

Également, pour bien démarrer avec l'outil des thèmes de base sont fournis avec #VenC!

Enfin, un ajout majeur qui arrive avec cette version est la possibilité d'installer/désinstaller #VenC proprement et facilement via pip.

La liste complète des ajouts/corrections ici

N'hésitez pas à essayer et me faire des retours si vous trouvez des bugs ou des erreurs dans la documentation!

Vous pouvez également soutenir mon travail sur tipeee ou Liberay, pensez-y, c'est important!

#VenC #Blog #Edition #Blogging #Static #Python #SiteStatic #BlogStatic #Libre #LogicielLibre #Logiciel #Free #FreeSoftware #Software #Auto-Edition #tipeee #liberapay #pip #pypi

Denis Salem / VenC

A static blog generator written in python

 
Immagine/foto
https://framagit.org/denissalem/VenC/
https://github.com/denissalem/VenC/

Me revoilà camarades! Ça faisait un moment! J'ai ENFIN terminé la version 1.2.0 de #VenC qui succède à la version 1.1.2

Pour rappel, #VenC est un éditeur de #blog static en ligne de commande pour #linux.

Voilà la liste des dernières features cool de cette dernière version, en plus de nombreuses corrections de bugs

- Support de style CSS unique par publication.
- Interpréteur #markdown optionnel.
- Copie en ligne du #blog.
- Ajout de thèmes.
- Installation via #pip
- Verbosité plus élevé lors d'erreurs.
- Support de la langue anglaise.
- Ajout d'un aide mémoire.

À cela s'ajoute maintenant une FAQ et des tutoriaux en anglais et en français. Je compléterais tout ça au fur et à mesure, mais il y a déjà de quoi prendre en main l'outil.

Également, pour bien démarrer avec l'outil des thèmes de base sont fournis avec #VenC!

Enfin, un ajout majeur qui arrive avec cette version est la possibilité d'installer/désinstaller #VenC proprement et facilement via pip.

La liste complète des ajouts/corrections ici

N'hésitez pas à essayer et me faire des retours si vous trouvez des bugs ou des erreurs dans la documentation!

Vous pouvez également soutenir mon travail sur tipeee ou Liberay, pensez-y, c'est important!

#VenC #Blog #Edition #Blogging #Static #Python #SiteStatic #BlogStatic #Libre #LogicielLibre #Logiciel #Free #FreeSoftware #Software #Auto-Edition #tipeee #liberapay #pip #pypi

Denis Salem / VenC

A static blog generator written in python

 

Oh no! This package is #Python 2 only


 

My Company (in Berlin, Germany) is Hiring



Hello D* - in case you or someone you know is looking for a job in either of the following two positions here in Berlin, Germany:
* DevOps/SRE (Hadoop, Python, Spark, Grafana, InfluxDB, MongoDB, Scylla, virtualization, Ansible, and so on and so on)
* System Administrator (both Debian- and Redhat families, Python, virtualization, wiki and git and so on, monitoring and alarming, backups, small local DC, no network management (routers, switches, firewalls), some offsite stuff at customer installations, and so on )

Goodies: interesting but not over-the-top levels of complexity, you get to play with interesting technologies, international team (English is business language), free fruit and veggies, admin your own notebook (you can install Linux if you like), small company ( < 30) but due to the ownership structure of the company you can get into a corporate pension plan if you want, and the pay check is totally on time every month.

#jobbörse #jobmarket #berlin #devops #sysadmin #python #hadoop #linux

 

My Company (in Berlin, Germany) is Hiring



Hello D* - in case you or someone you know is looking for a job in either of the following two positions here in Berlin, Germany:
* DevOps/SRE (Hadoop, Python, Spark, Grafana, InfluxDB, MongoDB, Scylla, virtualization, Ansible, and so on and so on)
* System Administrator (both Debian- and Redhat families, Python, virtualization, wiki and git and so on, monitoring and alarming, backups, small local DC, no network management (routers, switches, firewalls), some offsite stuff at customer installations, and so on )

Goodies: interesting but not over-the-top levels of complexity, you get to play with interesting technologies, international team (English is business language), free fruit and veggies, admin your own notebook (you can install Linux if you like), small company ( < 30) but due to the ownership structure of the company you can get into a corporate pension plan if you want, and the pay check is totally on time every month.

#jobbörse #jobmarket #berlin #devops #sysadmin #python #hadoop #linux

 
Hi there! I'm #newhere I just installed Diaspora pod on my dedicated server. There are resources to spare so why not. Despite the name this pod is not as Czech as it seems. Mainly because the server is located in France.

I'm interested in #music #photography #anime #cosplay #django #python #linux #docker and #opensource

 
Hi there! I'm #newhere I just installed Diaspora pod on my dedicated server. There are resources to spare so why not. Despite the name this pod is not as Czech as it seems. Mainly because the server is located in France.

I'm interested in #music #photography #anime #cosplay #django #python #linux #docker and #opensource

 

Essential #Python Tips and Tricks Every Programmer Should Know



Some are not really essential at all here, but most are good every Python coder should know things.

 
A small #python library to create very simple command line interface based on argparse from function definition.

Just because I'm lazy... :-) #argparse

 

searx v0.13.0 is out!



The great developers of the wonderful privacy-respecting, hackable metasearch engine, give us a new release, which features:
  • New theme: simple
  • New engines
    • Google videos (video)
    • Bing videos (video)
    • Arxiv (science)
    • OpenAIRE (science)
    • Pubmed (science)
    • Genius (music/lyrics)
  • Display engine errors
  • Faster startup
  • Lots of engine fixes (google images, dictzone, duckduckgo, duckduckgo images, torrentz, faroo, digg, tokyotoshokan, nyaa.si, google news, gitlab, gigablast, geektimes.ru, habrahabr.ru, voat.co, base, json engine, currency convert, google)
  • Shorter saved preferences URL
  • Fix engine duplications in results
  • Py3 compatibility fixes
  • Translation updates
Btw., the server searx.me seems to get slower and slower, because too many people use it. Please consider to use other entities of searx and - if you care for your privacy - use different servers alternating. There is a simple hack to automatically change the searx entity to use with every search, see here, here, and here.

#searx #privacy #python #decentralization #freesoftware #agpl3

asciimoo/searx

searx - Privacy-respecting metasearch engine

 

Rilasciato Django 2.0


#django #python

 

XMPP based tickets and merge requests with SàT



Interesting idea: A distributed bug tracking system based on XMPP. It even has MRs (merge requests) for git and mercurial. The developer, @goffi@framasphere.org, claim the following advantages:
  • it's decentralized and federated, no need to have X accounts to use X tickets handlers. You can also import tickets from third party projects (e.g. plugins for your project) into your website.
  • it's standard: we can handle or fetch tickets in third party servers easily, without proprietary API.
  • it's very flexible: any field can be used, and the mechanism can be used for any list (bug tracker, TODO list, shopping list, etc.)
  • being based on SàT, it's usable on any platform
  • it can be used with gateways, allowing to use transparently tickets from other services (think about Gitlab or Github for instance)
There is also a short demo video. Nice!

(Someone must package sat_pubsub for Debian!)

#xmpp #bugtracker #git #mercurial #freesoftware #salutatoi #python #tickets #decentralisation

goffi

goffi

 

Announcing sources.debian.org



Debian developer Matthieu Caneill announced today the new URL for Debsources. For those who do not know it: With Debsources you can search in the complete source code of Debian. This is very nice, when you like to learn, how your operating system or applications work, if you like to learn a new computing language, if you like to find an attack vector for your latest hack or you like to prevent the latter. It is like the late Google codesearch, but free as in freedom. Try out and have fun!
Dear developers,

We're happy to announce that Debsources, the Web application that
allows to browse and search the entire source code of all Debian
releases, is now hosted on the official Debian infrastructure and
available at https://sources.debian.org.

You may already know this service as previously hosted at
sources.debian.net . We took the move to Debian hardware as the
opportunity to officially announce it here.

Service description



Debsources is a web service that exposes the content of Debian source
packages on the Web, both via an HTML user interface and a JSON API
[0]. To that end, an updater runs regularly (currently 4 times a day)
to unpack and index new packages from all the available Debian
suites. It also runs various plugins, for example to count lines of
code and measure the size of packages; this information is exposed in
the interface.

[0]: https://sources.debian.org/doc/api/

Since all extracted information is stored in a PostgreSQL database,
various data warehouse features are available, such as the list of
file duplicates for every file, or package name search.

More than source code



Worth noting are two "sub-apps" that run on the same infrastructure:

* patches [1]: for packages using 3.0 (quilt) package format, the list
of patches is extracted and exposed, along with some metadata.

* copyright [2]: the copyright files of packages are exposed through
this interface, and displayed in a convenient way if they are
machine readable.

[1]: https://sources.debian.org/patches/
[2]: https://sources.debian.org/copyright/

Learn more



Debsources has been described extensively and used to conduct various
studies on the Debian source code. To learn more check out the paper:

Matthieu Caneill, Daniel M. Germán, Stefano Zacchiroli. The Debsources
Dataset: Two Decades of Free and Open Source Software. In Empirical
Software Engineering, Volume 22, pp. 1405-1437, June, 2017

An open access preprint of the paper and additional information about
Debsources are available on the Debsources documentation page [3].

[3]: https://sources.debian.org/doc/about/

Credits



Many credits go to everyone who submitted patches and feedback over
the years, thank you! In particular, Stefano Zacchiroli started the
project and wrote the updater infrastructure, and Orestis Ioannou
developed the patches/ and copyright/ apps.

This new instance of the service is hosted by DSA - without whom
sources.debian.org would not exist. Many thanks to the whole team for
their guidance in the d.n -> d.o migration, and in particular to
Julien Cristau and Peter Palfrader.

The previous instance of Debsources had been hosted by IRILL [4]for
more than 4 years, who has also spearheaded the initial development of
the service - thanks for the non-interrupted service!

[4]: https://www.irill.org/

As always, we're more than happy to hear your feedback; you can
contact us at qa-debsources@lists.alioth.debian.org . (See the footer
of the Debsources web page for bug report and contribution
information.)

For the Debsources team,



Matthieu
#debian #freesoftware #sourcecode #search #development #debsources #python #agpl3

Announcing sources.debian.org

Announcing sources.debian.org

 
#python #dev #test #ttd

 
Is there any way to reimplement python 2.6 print_function in python 2.4?

Specifically, how can I remove the keyword 'print' (while still use it in the implementing module)? I only need a limited set of its features and thus can implement it myself.

And yes, I know how long ago python 2.4 stopped being officially supported. Enough people care about it in a meaningful way and this is what matters.

I asked on IRC and the response was that it is only possible with quite some black magic. Any hints on the types of sorcery required?

#python

 
j'ai déjà montré ici des tentatives de représentations graphiques et/ou de placement automatique de plantes, en se basant sur les données de compagnonage (telle plante bénéficie de la proximité de telle autre plante, ou pas.. cf. par exemple ici)




Je continue de temps en temps ces histoires de graphes, j'ai notamment un billet de blog qui attend d'être fini depuis plus d'un an, joie de la procrastination.

En attendant, je m'aperçois que j'aurais plus besoin d'un outil concret, plus simple et utilisable: un truc qui me dit si telle plante et telle plante s'entendent bien, un truc qui me donne simplement la liste des plantes copines et pas copines pour une plante donnée.

J'ai développé une bibliothèque python et des scripts (un pour l'instant) qui devraient être utilisable depuis la ligne de commande, ici:

https://framagit.org/robertbiloute/list_plant_associations

C'est un peu le bordel linguisitique, les noms de plantes sont en français, les commentaires et aide en français.

dites moi si ça marche chez vous et/ou si vous avez besoin d'explications supplémentaires, je me suis fait chier avec le packaging python mais il semble que j'ai fini par converger (du coup installation en une ligne avec un sudo pip install git+https://framagit.org/robertbiloute/list_plant_associations, ce qui nécessite pip et git).

#french #jardin #graphe #permaculture #simulation #gephi #compagnonage #plantes #python

 

Raspberry Pi: Control Relay switch via GPIO


https://tutorials-raspberrypi.com/raspberry-pi-control-relay-switch-via-gpio

Immagine/foto

#230v #c++ #hardware & gpio #high voltage #python #reed switch #relay #switch

Often you want to control modules with a higher voltage with the Raspberry Pi. For this purpose, relays can be used on the Raspberry Pi: The relay “switch” is utilized by means of a low-voltage pulse. Since the Pi only tolerates a maximum of 5V (the GPIOs even only 3.3V) without relays, there is the risk that the Pi could burn out. However, if you have two separate circuits this can not happen.

In this tutorial, I will show how to control a relay with the Raspberry Pi and what has to be considered.

Required Hardware Parts


* 5V relay module

* Female – Female jumper cable

* an external circuit (e.g., batteries) and an application (eg, motors)

The relays are available as 2, 4, 8 and even 16 modules, depending on what you need. To avoid wasting too many GPIOs on the Pi it pays off to purchase a GPIO port expander with more than 4 channels.

Setup


The structure is very simple since all pins are labelled. Left (GND) comes to pin 6 of the Pi (GND), the right pin (VCC) comes to 3V3 (pin 1) of the Pis. Depending on how many of the relays you want to control, you need to connect a corresponding number of GPIOs to the IN pins. It is recommended to set a small resistor between the Pi and the relay, but it is not absolutely necessary with 3V3.

If you set 5V instead of 3.3V to VCC, you should definitely put one resistor each (~ 1kΩ) between the GPIOs and the IN pins.

On the other side are at each relay 3 connections (see picture below): Depending on whether the IN pin is a LOW (0V) or HIGH (3.3V or 5V) is applied either the switch between the centre and right, or Open centre and left. If you connect all 3 pins, you can use the relay as a kind of switch, leaving it free on the left or right has the effect of an on/off switch. Where VCC or ground are connected (middle or right/left) does not matter.

Immagine/foto

Either center-left or center-right is connected/”opened”.

If you want to connect devices with high voltages, you should either know exactly what you are doing or ask an electrician! 230V is life-threatening. Pay extra attention to the specifications of the relay and take, if possible, no dodgy parts from China (which doesn’t matter in the low-power range but at higher voltages you should spend a bit more and take proven products). I assume no liability for damages!

Raspberry Pi Relay Control


Also, the control is not very difficult, since only GPIOs have to be switched. You can use C++ (wiringPi) or Python for it. I am using Python and have used GPIO 17 (pin 11).
sudo python



import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM) # GPIO Numbers instead of board numbers



RELAIS_1_GPIO = 17

GPIO.setup(RELAIS_1_GPIO, GPIO.OUT) # GPIO Assign mode

GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # out

GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # on

If 0V is present at the relay pin, the corresponding LED lights up, at a HIGH level the LED goes out. So if you want the relay to open at a HIGH level, you need to connect the middle and left pins to the circuit. The LED is off there. If the relay is to open, if the LED is also on, middle and right OUT pins are connected.

That’s it. I would like to know, in which applications have you found the use for the Raspberry Pi relays?

Immagine/foto

Der Beitrag Raspberry Pi: Control Relay switch via GPIO erschien zuerst auf Raspberry Pi Tutorials.
Raspberry Pi: Control Relay switch via GPIO