Meson is an open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible.
Multiplatform support for Linux, OSX, Windows, GCC, Clang, Visual Studio and others supported languages include C, C++, Fortran, Java, Rust
Optional Ninja backend
Ça y est ! Bascule effectuée !
Ce blog est désormais un blog statique, généré avec Pelican.
Et au passage: c'est son anniversaire ! 3 ans :)
Pourquoi migrer vers un blog statique avec Pelican ?
- par souci de simplicité:
make publish
et il n'y a plus qu'à servir les fichiers HTML générés - par sécurité …
"logging.basicConfig
configures the root logger : this is not something you want to do in practice, because it causes debugging output for all loggers in your program, including every library that uses logging.
In general, you'll want ot leave the root logger alone and configure a specific "main" logger for your program and put all the other loggers under that logger."
Correcteur grammatical open source dédié à la langue française, pour Writer (LibreOffice, OpenOffice), Firefox & Thunderbird.
mkdir grammalecte && cd grammalecte
fossil clone http://code.grammalecte.net grammalecte.fossil && fossil open grammalecte.fossil
./make.py fr
PYTHONPATH=$PWD ./cli.py -f tests/fr/text1.txt
Using:
- Librosa - Python library for audio and music analysis
- MoviePy - Python library for video editing
Python-based framework for configuring, compiling and installing applications
VIA: http://taint.org
function lazyRender(el, html) {
let cloneEl = el.cloneNode();
cloneEl.innerHTML = html;
window.requestAnimationFrame(function(){
morphdom(el, cloneEl);
});
};
I ended up not using this code, but it may be useful to others:
mock_setup_provider.py
:
import sys
from unittest.mock import Mock
class MockSetupProvider(Mock):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.captured_setup_requires = set()
def setup(self, *args, **kwargs):
self.captured_setup_requires.update(kwargs.get('setup_requires'))
setup_extractor …
Used by netsuite.com to build and upload packages of Python libs depending on C extensions, before pushing them to a Nexus with repositorytools
ProximityHash: Geohashes in Proximity (with the option of compression using Georaptor)
Programmable communications Embed messaging, voice, video, and authentication in your apps with a simple and powerful API.
"Here you have a trivially simple method of injecting legit-looking messages into text conversations with anyone, providing you know how your target stores the spoofee sender in their contacts. In the UK, that’s largely the difference between starting with 07, and +447.
The utterly exquisite reality is that, if your target then replies, that reply goes to the real sender, who is overwhelmingly likely to reply something like “what the hell are you on about?”, this being the first they’ve heard of this shady business. Does that look like backtracking or denial? I ain’t no Member of Parliament, but it sure sounds like it to me."
It is a pure python library for numerical computations.
Linear algebra example:
A = Matrix([[1,2],[4,9]])
print 1/A
print (A+2)*A
B = Matrix(2,2,lambda i,j: i+j**2)
Fitting
points = [(x0,y0,dy0), (x1,y1,dy1), (x2,y2,dy2), ...]
coefficients, chi2, fitting_function = fit_least_squares(points,POLYNOMIAL(2))
for x,y,dy in points:
print x, y, '~', fitting_function(x)
Solvers:
from math import sin
def f(x): return sin(x)-1+x
x0 = solve_newton(f, 0.0, ap=0.01, rp=0.01, ns=100)
print 'f(%s)=%s ~ 0' % (x0, f(x0))
(ap is target absolute precision, rp is target relative precision, ns is max number of steps)
Optimizers:
def f(x): return (sin(x)-1+x)**2
x0 = optimize_newton(f, 0.0, ap=0.01, rp=0.01, ns=100)
print 'f(%s)=%s ~ min f' % (x0, f(x0))
print 'f'(%s)=%s ~ 0' % (x0, D(f)(x0))
Statistics:
x = [random.random() for k in range(100)]
print 'mu =', mean(x)
print 'sigma =', sd(x)
print 'E[x] =', E(lambda x:x, x)
print 'E[x^2] =', E(lambda x:x2, x)
print 'E[x^3] =', E(lambda x:x3, x)
y = [random.random() for k in range(100)]
print 'corr(x,y) = ', correlation(x,y)
print 'cov(x,y) = ', covariance(x,y)
Finance:
google = YStock('GOOG')
current = google.current()
print current['price']
print current['market_cap']
for day in google.historical():
print day['date'], day['adjusted_close'], day['log_return']
Persistant Storage:
d = PersistentDictionary(path='test.sqlite')
d['key'] = 'value'
print d['key']
del d['key']
d works like a drop-in preplacement for any normal Python dictionary except that the data is stored in a sqlite database in a file called "test.sqlite" so it is still there if you re-start the program. Kind of like the shelve module but shelve files cannot safely be accessed by multiple threads/processes unless locked and locking the entire file is not efficient.
Neural Network:
pat = [[[0,0], [0]], [[0,1], [1]], [[1,0], [1]], [[1,1], [0]]]
n = NeuralNetwork(2, 2, 1)
n.train(pat)
n.test(pat)
[0, 0] -> [0.00...]
[0, 1] -> [0.98...]
[1, 0] -> [0.98...]
[1, 1] -> [-0.00...]
Plotting:
data = [(x0,y0), ...]
Canvas(title='my plot').plot(data, color='red').save('myplot.png')
Supported languages:
.NET, Adobe Air, Android, Cold Fusion, Drupal, Go, iOS, Java, JavaScript, Python, macOS, Nancy, Node.js, PHP, Ruby on Rails, Unity, WordPress
Closed-source server backend
https://airbrake.io/languages :
Ruby, Rails, Java, Javascript, Magento, Php, .NET, Python, Django, Node.js, Swift, Android, Go, Sinatra, Angularjs, Flask, Ember, Express, Hapi
Open-source server backend of Airbrake (which has a closed-source backend)
"PEP509 added a private version number... every dictionary has a version number, and elsewhere in memory a master version counter. And when you go and change a dictionary the master counter is incremented from a million to a million and one, and that value a million and one is written into the version number of that dictionary. So what this means is that you can come back later and know if it's been modified, without reading maybe its hundreds of keys and values: you just look and see if the version has increased since the last time you were there."
-
"Ansible is simple, which is a major strength", it "works by connecting to a server using SSH, copies the Python code over, executes it and then removes itself".
"Ansible Tower is the Enterprise version, it turns the command line Ansible into a service, with a web interface, scheduler and notification system."
"you can’t have long-running tasks." -
"StackStorm is designed as a highly-configurable if-this-then-that service. it can react to events and then run a simple command or a complex workflow."
"MongoDB can be scaled using well-documented patterns." "StackStorm extensibility system is a key strength." "If StackStorm were a programming language, it would be strongly typed." -
"Salt was born as a distributed remote execution system used to execute commands and query data on remote nodes."
"Ultra high-performance for large deployments." (LinkedIn use it)