Using asyncio.Task.all_tasks
+ tracemalloc
vendor-neutral open source library for metric collection and tracing. OpenCensus is built to add minimal overhead and be deployed fleet wide, especially for microservice-based architectures.
OpenCensus currently supports Prometheus, SignalFX, Stackdriver, Zipkin, Datadog, and Azure App Insights.
A single set of libraries for many languages, including Java, C++, Go, .Net, Python, PHP, Node.js, Erlang, and Ruby.
TL;DR:
- List Resizing : the backing array is grown by approximately 12% (in Java ArrayList grows by 50% when expanded2 and in Ruby, Array grows by 100%). The Python implementation optimizes for memory usage over speed. Another reason to preallocate Python lists when possible.
- Inserting at the beginning of a list takes linear time. Sometimes, better use Deques which trade constant time insert and remove from both ends in exchange for constant time indexing.
By Russel Cohen
Speed, reproducibility, easy rollbacks, and predictability is what we strive for when deploying our diverse Python applications. And that’s what we achieved by leveraging virtual environments and Linux system packages.
Provide a free plan & education accounts
Our mission is to remove the pain of handling servers, application stacks, software dependencies and databases.
Focus on your app development and deploy it in 2 minutes. No server to manage, hosting becomes instant and easy!
Looks very similar to Heroku
Top 2 performers are bjoern (written in C) > meinheld (based on picoev)
This project contains pytudes—Python programs for perfecting programming skills.
Some are in Jupyter (IPython) notebooks, some in *.py files.
Connaissez-vous l'accessibilité numérique ?
En très bref:
L'accessibilité numérique est la mise à la disposition de tous les individus, quels que soient leur matériel ou logiciel, leur infrastructure réseau, leur langue maternelle, leur culture, leur localisation géographique, ou leurs aptitudes physiques ou mentales, des ressources numériques.
Pour plus de détails …
I often hear people who are happy because PyPy makes their code 2 times faster or so. Here is a short personal story which shows PyPy can go well beyond that.
There is a plugin for French addresses : https://github.com/eig-2017/addok-fr
Cette année, voyages-sncf.com m'a permis d'aller à la conférence annuelle Python à Toulouse.
En vrac, voici un petit résumé personnel de cette PyConFr.
J'y étais présent 3 jours sur 4 (sprint le premier et conférences les deux autres), et j'y ai donné donné 2 présentations, dont le contenu est …
While CPython has a test suite and we try to do our best to have good code coverage (currently sitting at above 83% ), nothing beats having people run CPython against real code because people use Python's features in ways we never anticipated all the time
With Travis you can actually do just that [by changing a single configuration file] and help test CPython !
Quelques avantages:
- il est vraiment très rapide (il exploite les multi-cœurs).
- il ne met à jour que ce qui est nécessaire.
- la navigation js est vraiment très bien (avec le thème colorbox).
- on peut naviguer dans la galerie au clavier (flèches droite/gauche).
- le thème colorbox passe remarquablement bien sur mobiles.
- on peut commenter les galeries en markdown.
- on peut lui faire afficher un lien vers l'image originale (j'y tiens).
Une limitation : sigal
n'affiche pour le moment aucune miniature dans les dossiers contenant des medias et des sous-dossiers #408
Il n'est pas non plus possible d'uploader des fichiers via l'interface web.
Cela reste néanmoins un excellent outil, testé & approuvé de mon côté !
Alternatives :
- https://github.com/sebsauvage/MinigalNano : KISS, PHP, JS Lightbox
- https://www.files.gallery : single-file PHP app that can be dropped into any folder - FROM: https://sebsauvage.net/links/?y_HVuQ
Using Python’s matplotlib and pandas, we’ll see that it’s rather easy to replicate the core parts of any FiveThirtyEight (FTE) visualization.
A tutu on how to count hapaxes (words which occur only once in a text or corpus) using NLTK.
Some alternatives mentioned:
- Pattern : Python package for datamining the WWW which includes submodules for language processing and machine learning
- Polyglot : language library focusing on "massive multilingual applications"
- spaCy : an "industrial strength" NLP library focused on performance with a streamlined API
Recipe on how to build a 35$ cloud hosted distributed Python web scrapper.
There is also really interesting advice on the legal aspect of scrapping on this blog: https://benbernardblog.com/web-scraping-and-crawling-are-perfectly-legal-right/