The recalbox repository moved to https://gitlab.com/recalbox/recalbox - recalbox/recalbox-os
Please note the following commands:
\list or \l: list all databases
\dt: list all tables in the current database
You will never see tables in other databases, these tables aren't visible. You have to connect to the correct database to see its tables (and other objects).
To switch databases:
\connect database_name or \c database_name
http://www.postgresql.org/docs/current/interactive/app-psql.html
Susi AI is an intelligent Open Source personal assistant. It is capable of chat and voice interaction and by using APIS to perform actions such as music playback, making to-do lists, setting alarms, streaming podcasts, playing audiobooks, and providing weather, traffic, and other real time information. Additional functionalities can be added as console services using external APIs. Susi AI is able to answer questions and depending on the context will ask for additional information in order to perform the desired outcome. The core of the assistant is the Susi AI server that holds the “intelligence” and “personality” of Susi AI. The Android and web applications make use of the APIs to access information from a hosted server.
An automatic deployment from the development branch at GitHub is available for tests here https://susi-server.herokuapp.com
Le violeur de la Sambre Un homme au-dessus de tout soupçon
Une longue enquete mais très interressante
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.
la version beta qui marche sur le 3b+
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
sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;
Il lavait déjà dit une fois en octobre 2016, lors de la conférence Linaro Connect, quil préférait larchitecture x86 à l'architecture ARM. Il y a un peu plus de deux ans, Torvalds disait que louverture et létendue de lécosystème matériel (PC) formé autour de x86 sont inégalées, alors que lécosystème ARM reste fragmenté. « Le jeu dinstructions et le noyau du CPU ne sont pas très importants », a déclaré Torvalds. « Cest un facteur sur lequel les gens ont tendance à se fixer, mais [ ] ce qu...
We are doing a release! Finally! Stable, too!
De plus en plus apprécié par les développeurs, Python est souvent considéré comme un langage simple et aux mises en application multiples. Zoom sur...
The weekend is about to crash into our lives once again, you're sat staring at your screen wondering what to play and we're here to help.
Support Status
PostgreSQL 11
PostgreSQL 10
PostgreSQL 9.6
PostgreSQL 9.5
PostgreSQL 9.4
PostgreSQL 9.3
Oracle
MySQL
MariaDB
Firebird
SQLite
SQL Server
IBM DB2Approach 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.
Qui sait que dès années 1940 aux années 1980, la place des femmes dans la programmation des ordinateurs était bien meilleure qu’aujourd’hui ? Qu’est ce qui s’est mal passé ? Le New York Times Magaz…
L'open source tel que nous l'avons connu est-il désormais obsolète ? Faut-il le remplacer ? Certaines entreprises affirment que oui, alors que d'autres dénoncent un non-sens !
readability en python... humm ça me fait envie...
Essayons de répondre à cette question avec des points rapides plutôt que de longues explications. Il y a beaucoup de similitudes entre flexbox et grid, à
Filtrage réseau, gestion des comptes et des accès, chiffrement et clé, conformité... retour d'expérience sur la sécurité dans le Cloud à travers des cas concrets.
Giving healthy mice gut bacteria from schizophrenic patients caused them to display symptoms of the disease.
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().
La veille technologique c'est une question de vie ou de mort. Tu le sais que si tu restes pas à jour t'es foutu ? En tous cas y'a plein de gens pénibles comme moi qui te le répètent en permanence.
Très intéressant... Je m'en servirais en archi microservice. On a tjrs besoin de cache...
2 random lru > lru simple.
Obtenez votre certification AWS ! Prenez des cours de formation Amazon, profitez des ressources de certification Amazon pratiquez afin de vous préparer aux examens de certification.
Did your last Yubikey just break? Perhaps you forgot an offline backup password.
Maybe you're just tired of living like a spy
[https://gist.github.com/grugq/03167bed45e774551155] and never using
smartphones. Whatever it is, you're here, and you're finally ready to give up
on
PGP [https://blog.filippo.io/giving-up-on-long-term-pgp]. That's great!
We're here to help!No one was sending you encrypted emails anyway, so that's
easy enough. But the most widespread uses of PGP are machine-oriented, fo
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.
How one CSS collection can define the styles for multiple sites that look different.
Via shaarli
Comparaison du cout de la vie entre Paris et Tokyo
ATTENTION:
Chanson du jour (avec les images...)
A cat(1) clone with syntax highlighting and Git integration.
Aller un bon REX ca fait pas de mal ! ( meme en famille ou entre amis parfois... )
A plain docker environment for building static binaries compiled with rust and linked against musl instead of glibc. Built nightly on travis.
This is only useful if you require external C dependencies, because otherwise you could do rustup target add x86_64-unknown-linux-musl.
This container comes with a bunch of statically compiled C libraries using musl-gcc so that we can statically link against these as well.
If you already have rustup installed on the machine that should compile, you might consider cross as a more general solution for cross compiling rust binaries.
Usage
Pull and run from a rust project root:
docker pull clux/muslrust
docker run -v $PWD:/volume --rm -t clux/muslrust cargo build
You should have a static executable in the target folder:
ldd target/x86_64-unknown-linux-musl/debug/EXECUTABLE
not a dynamic executable
From there on, you can include it in a blank docker image (because everything you need is included in the binary) and perhaps end up with a 5MB docker blog image.
This post is intended as a tour of various techniques (not necessarily all practical) of reducing program size, but if you demand some conclusion, the pragmatic takeaway is that:
Compile with --release.
Before distribution, enable LTO and strip the binary.
If your program is not memory-intensive, use the system allocator (assuming nightly).
You may be able to use the optimization level s/z in the future as well.
I didn’t mention this because it doesn’t improve such a small program, but you can also try UPX and other executable compressors if you are working with a much larger application.
Meet Rocket.
Rocket is a web framework for Rust that makes it simple to write fast, secure web applications without sacrificing flexibility, usability, or type safety.
Native desktop client for Slack, Skype, Gmail, Facebook, and more
Via shaarlo et sam&max.
Merci pour le poisson
Check 2G, 3G, and 4G LTE Network Frequency Compatibility for a Smartphone, Tablet, and Mobile Device in any Country and Mobile Network Carrier
David Patterson and Ion Stoica The publication of “Above the Clouds: A Berkeley View of Cloud Computing” on February 10, 2009 cleared up the considerable confusion about the new notion of “Cloud Computing.” The paper defined what Cloud Computing was, where it came from, why some were excited by it, what were its technical advantages, and what were the obstacles and research opportunities for it to become even more popular. More than 17,000 citations to this paper and an abridged version in CACM—with more than 1000 in the past year—document that it continues to shape the discussions and the evolution of Cloud Computing. “Cloud Programming Simplified: A Berkeley View on Serverless Computing” with some of the same authors commemorates the ... Read More
ssh-pageant-done
gpgconf --launch gpg-agent
failure
For some users, it may be desirable to tie OpenSSH in to the PuTTY authentication agent (Pageant) using ssh-pageant. This is a drop-in replacement for ssh-agent, which simply builds a connection between OpenSSH and Pageant for key-based authentication. The tool makes it easy to leverage OpenSSH for remote repository access, which tends to be the most reliable choice within the specific context of Git for Windows (Git), without the need to run multiple agents which don't interoperate.
This functionality became available with the release of Git 2.8.2.
If you always use Git from within Git Bash, then the most straightforward approach is to have it launch ssh-pageant on your behalf. Simply create/edit your _$HOME/.bashprofile (or $HOME/.profile, if you prefer), and add the following.
# ssh-pageant allows use of the PuTTY authentication agent (Pageant)
SSH_PAGEANT="$(command -v ssh-pageant)"
if [ -x "$SSH_PAGEANT" ]; then
eval $("$SSH_PAGEANT" -qra "${SSH_AUTH_SOCK:-${TEMP:-/tmp}/.ssh-pageant-$USERNAME}")
fi
unset SSH_PAGEANT
The -qra "${TEMP:-/tmp}/.ssh-pageant" construct is equivalent to the -q -r -a filename options. In this context it means:
By specifying the socket name (defaulting to $SSH_AUTH_SOCK, if set) along with the reuse option, we ensure that only a single running copy of ssh-pageant (per user) is required. Otherwise a separate incarnation would be launched every time Git Bash is invoked.
Now start a new Git Bash session, or source the profile edited just above, and run the ssh-add -l command. If all is well, and Pageant is running (with one or more keys loaded), you should see something similar to the following.
$ ssh-add -l
4096 SHA256:XjN/glikgdBoBclg4EaN8sJ/ibrxTq7zVydpkUwANzk Heinz Doofenshmirtz (RSA)
If you use Git from Git CMD, or directly from the Windows command prompt, then you'll probably want to ensure that ssh-pageant is launched automatically at logon time. The start-ssh-pageant.cmd script is provided for this purpose, which resides in the cmd subdirectory of your Git installation.
Unlike the Git Bash case above, this scenario requires the SSH_AUTH_SOCK environment variable to be set before running the script... otherwise it will simply exit without performing any action. This is normally configured as a persistent USER variable, with the value specifying the desired socket file path in Unix/MSYS2 format.
NOTE: Since there can only be a single global variable of a given name, this approach may or may not cause conflicts if you have multiple environments which utilize the SSH_AUTH_SOCK setting. Running Git alongside of Cygwin, or MSYS2, for example. One way to address this is to use a fully-qualified Windows path for the socket instead of an environment-specific Unix/MSYS2 path.
Launch the Control Panel, and then select System followed by Advanced system settings. Click on the Environment Variables button, and finally New... in the User variables (not System variables) section. Enter SSH_AUTH_SOCK for Variable name and /tmp/.ssh-pageant-%USERNAME% for Variable value, then click OK.
Now launch a new Git CMD or Windows command prompt (pre-existing sessions won't see the new variable), and enter the command set SSH_AUTH_SOCK. If all went according to plan, you should see something similar to the following.
C:\Users\heinz.doofenshmirtz> set SSH_AUTH_SOCK
SSH_AUTH_SOCK=/tmp/.ssh-pageant-heinz.doofenshmirtz
NOTE: the cross-environment-compatible (git for windows, msys2, and cygwin) equivalent would require a fully qualified windows path like C:\Users\MYUSERNAME\AppData\Local\Temp\.ssh-pageant-MYUSERNAME. The correct value can be determined by running a command like cygpath --windows /tmp/.ssh-pageant-%USERNAME% in a Git Bash window.
At this point you should run start-ssh-pageant.cmd manually, in order to verify that the agent starts successfully. Assuming that Git is installed into C:\Program Files\Git, this should look something like:
C:\Program Files\Git\cmd> start-ssh-pageant
Starting ssh-pageant...
SSH_AUTH_SOCK='/tmp/.ssh-pageant-heinz.doofenshmirtz'
SSH_PAGEANT_PID=11444
Assuming that the relevant keys have been loaded into Pageant, you should now be able to perform Git operations which rely upon them using OpenSSH without being prompted for the passphrase.
The most common approach is to create a shortcut pointing to start-ssh-pageant.cmd, and place it in your startup folder (Start Menu / Programs / Startup). Once in place, it should be launched automatically when you logon to Windows and be available to all Git processes.
Since ssh-pageant (like ssh-agent) is intended to bypass the requirement to repeatedly enter your private key password, it's imperative that its socket file be private in order to use it safely. In other words, you want to be extremely careful on multi-user systems to ensure that the SSH_AUTH_SOCK file -- and preferably the directory which includes it -- isn't accessible to anyone else. For a normal Git for Windows configuration this shouldn't be an issue, as /tmp is normally mapped to a private location under your Windows user profile.
MiniSearch is a tiny but powerful in-memory fulltext search engine for JavaScript. It is respectful of resources, and it can comfortably run both in Node and in the browser.
#Use case
MiniSearch addresses use cases where full-text search features are needed (e.g. prefix search, fuzzy search, boosting of fields), but the data to be indexed can fit locally in the process memory. While you may not index the whole Wikipedia with it, there are surprisingly many use cases that are served well by MiniSearch. By storing the index in local memory, MiniSearch can work offline, and can process queries quickly, without network latency.
A prominent use-case is search-as-you-type features in web and mobile applications, where keeping the index on the client-side enables fast and reactive UI, removing the need to make requests to a search server.
la boite à outils du product owner
Le Cleiss (Centre des liaisons européennes et internationales de sécurité sociale) est un établissement public national, notamment chargé d'informer sur la protection sociale dans un contexte de mobilité internationale. Il est placé sous la double tutelle du ministre chargé de la sécurité sociale et du ministre chargé du budget.
Comprehensive Python Cheatsheet. Contribute to gto76/python-cheatsheet development by creating an account on GitHub.
Table of Contents
Command-Line Application Layouts
One-Off Script
Installable Single Package
Application with Internal Packages
Web Application Layouts
Django
Flask
Conclusions and RemindersUn Projet en Python ?
Ya pas mieux qu'un petit CTF pour s'entraîner à résoudre des challenges informatiques. Pour les initiés, CTF signifie Capture The Flag. C'est un excellent
Bienvenue sur les cours de Japonais d'Ici Japon !
La méthode d'Ici Japon, c'est 28 cours de japonais complets et gratuits, accompagnés d'exercices et de fiches pratiques qui vous permettent d'assimiler la langue de manière progressive et naturelle.
Pour accélérer considérablement votre apprentissage, utilisez nos applications smartphone basées sur des mnémoniques. Ce sont des outils indispensables grâce auxquels l'écriture japonaise vous paraîtra beaucoup plus simple !
The terminal command palette. Contribute to pindexis/marker development by creating an account on GitHub.
comment bien debuter dans starlink ?
Très bon article très pédagogique.
(avec toutes les nuances que l'on veut entre les différents niveaux... :/ )
Changer le style de l'autoindex de NGINX via un hook et deux fichier ?
pas mal je vais tester
use_backend main-ssl if { req.ssl_hello_type 1 }
#use_backend openvpn if !{ req.ssl_hello_type 1 } !{ req.len 0 } // j'ai pas de VPN sur mon serveur.
use_backend xmpp if { payload(0,5) 3c3f786d6c } !{ req.ssl_hello_type 1 } !{ req.len 0 }
use_backend xmpp if { payload(0,5) 3c3f20786d6c } !{ req.ssl_hello_type 1 } !{ req.len 0 }
Super une porte dérobé dès la conception des processeurs... De mieux en mieux...
« On peut les appliquer quasiment partout »
« La technologie des pérovskites nous rapproche de l’objectif des bâtiments autosuffisants en énergie », souligne Adam Targowski, responsable du développement équitable chez Skanska. « Les pérovskites font leurs preuves même sur les surfaces peu exposées au soleil. On peut les appliquer quasiment partout. Plus ou moins transparents, les panneaux répondent aussi aux exigences du design. Grâce à leur souplesse et leurs teintes variables, pas besoin de construire des supports supplémentaires, d’intervenir sur la forme ou le dessin du bâtiment », explique-t-il.
Un panneau standard d’environ 1,3 m2, au coût attendu de 50 euros et au rendement comparable aux panneaux classiques, approvisionnera en énergie un poste de travail en bureautique à longueur de journée, selon les estimations actuelles. Un autre test grandeur nature a été lancé sur un hôtel au Japon, près de Nagasaki.
En quelques années seulement, « les pérovskites ont fait un long chemin, souligne le professeur Nazeeruddin, qui avait, par le passé, collaboré avec Olga Malinkiewicz. Leur efficacité étant passée de 3,8 % à 23,7 % », un taux comparable à celui des panneaux classiques en silicium.
The ultimate script that provides firmware packages for most Xiaomi devices.
Alors pour que ca marche chez moi j'ai du :
Voila le jeu a du son Oo