2072 private links
tout est dans le titre : <3
Il faudra installer manuellement PyCryptodomex :
sudo apt install python-pip pthon-setuptools
python -m pip install pycryptodomex
sudo ln -s /usr/lib/python2.7/dist-packages/Crypto /usr/lib/python2.7/dist-packages/Cryptodome
Puis récupérer le fichier DRM :
wget https://hg.mozilla.org/mozilla-central/raw-file/31465a03c03d1eec31cd4dd5d6b803724dcb29cd/toolkit/content/gmp-sources/widevinecdm.json -O ~/.kodi/cdm/libwidevine.sh
Et enfin, installer l'add-on Netflix (non-officiel) : https://github.com/asciidisco/plugin.video.netflix/archive/master.zip
Note : pour faire de la place (2 Go requis pour l'installation du plugin DRM) :
rm ~/.kodi/userdata/Database/Textures*.db
rm ~/.kodi/userdata/ThumbnailsUn bon guide sur AST.
Common GOF Patterns implemented in Python. Contribute to Sean-Bradley/Design-Patterns-In-Python development by creating an account on GitHub.
Outch !
You’ve run your batch process with your scientific model, and after hours and hours it spit out a result. And the result is wrong. You suspect there’s a bug in the calculation, you’re not sure what it is, and the slow feedback cycle is making debugging even harder. Wouldn’t it be great if you could debug and speed up your program without having to spend days running it just to reproduce your problem? Now, I’m not a scientist, I’m a software engineer. But I did spend a year and a half working on scientific computing, and based on that experience I’d like to offer a potential solution to this cluster of problems: logging, and in particular a logging library I and my coworkers found very helpful. But before I get to the solution, it’s worth considering where these problems come from: the specific characteristics of scientific computing.
Introduction The first thing we have to understand while dealing with constraint programming is that the way of thinking is very different from our usual way of thinking when we sit down to write code. Constraint programming is an example of the declarative programming paradigm, as opposed to the usual
The essentials of effective use of the debugger
Un hélicoptère s’est posé sur les pavés du centre-ville de Metz, samedi peu après 6 heures du matin, pour secourir un piéton fauché par une voiture. ...
(Et https://www.republicain-lorrain.fr/fil-info/2019/04/27/un-pieton-mortellement-fauche-au-centre-ville-de-metz-deux-hommes-en-garde-a-vue)
Au revoir l'ami :(
Aucun doute, Kirb, tu seras bien mieux là où tu te trouves maintenant :)
Ça, c'est super cool !
Sergent Tobogo propose des créations drôles et inspirés de la culture populaire. Les t-shirts sont bio et issus d'un commerce équitable.
I was asked on Twitter why Python uses 0-based indexing, with a link to a new (fascinating) post on the subject (http://exple.tive.org/blarg/2013/10/22/citation-needed/). I recall thinking about it a lot; ABC, one of Python's predecessors, used 1-based indexing, while C, the other big influence, used 0-based. My first few programming languages (Algol, Fortran, Pascal) used 1-based or variable-based. I think that one of the issues that helped me decide was slice notation.
Let's first look at use cases. Probably the most common use cases for slicing are "get the first n items" and "get the next n items starting at i" (the first is a special case of that for i == the first index). It would be nice if both of these could be expressed as without awkward +1 or -1 compensations.
Using 0-based indexing, half-open intervals, and suitable defaults (as Python ended up having), they are beautiful: a[:n] and a[i:i+n]; the former is long for a[0:n].
Using 1-based indexing, if you want a[:n] to mean the first n elements, you either have to use closed intervals or you can use a slice notation that uses start and length as the slice parameters. Using half-open intervals just isn't very elegant when combined with 1-based indexing. Using closed intervals, you'd have to write a[i:i+n-1] for the n items starting at i. So perhaps using the slice length would be more elegant with 1-based indexing? Then you could write a[i:n]. And this is in fact what ABC did -- it used a different notation so you could write a@i|n.(See http://homepages.cwi.nl/~steven/abc/qr.html#EXPRESSIONS.)
But how does the index:length convention work out for other use cases? TBH this is where my memory gets fuzzy, but I think I was swayed by the elegance of half-open intervals. Especially the invariant that when two slices are adjacent, the first slice's end index is the second slice's start index is just too beautiful to ignore. For example, suppose you split a string into three parts at indices i and j -- the parts would be a[:i], a[i:j], and a[j:].
So that's why Python uses 0-based indexing.
Oh que ça serait cool !
Borrowing from the technique used in the timeit module, loop with repeat() instead of range() to avoid unnecessary creation and destruction of integer objects. Gives a modest speed-up (in the 5% r...
A setup.py script using distutils / setuptools is the standard way to package Python code. Often, however, we need to perform custom actions for code generation, running tests, profiling, or building documentation, etc., and we’d like to integrate these actions into setup.py. In other words, we’d like...
mocha-style tests for python. Contribute to xi/assamtest development by creating an account on GitHub.
founder/Dir. of Engineering at Cuttlesoft, software engineer, CS researcher, brewer of coffee, drinker of teas, maker of faces. FSU '14.
Python implementation of the Rust dbg macro.
En attendant f"{foo:d}" :)
Un lock screen à tester : ça floute une capture d'écran.