I hereby claim:
- I am michelbl on github.
- I am michelbl (https://keybase.io/michelbl) on keybase.
- I have a public key ASARCujZSGtNoYEHB-ddVUZtoUs3wkd1jbpLKlq8gQSdRgo
To claim this, I am signing this object:
| from datetime import UTC | |
| from zoneinfo import ZoneInfo | |
| TZ_PARIS = ZoneInfo("Europe/Paris") | |
| TZ_UTC = UTC | |
| # datetime equality is bugged | |
| datetime(2023, 10, 29, 2, 30, fold=0, tzinfo=TZ_PARIS) == datetime(2023, 10, 29, 2, 30, fold=1, tzinfo=TZ_PARIS) # True | |
| datetime(2023, 10, 29, 2, 30, fold=0, tzinfo=TZ_PARIS).timestamp() == datetime(2023, 10, 29, 2, 30, fold=1, tzinfo=TZ_PARIS).timestamp() # False |
| from google.cloud import speech | |
| client = speech.SpeechClient() | |
| audio = speech.RecognitionAudio(uri="gs://speech-data-895/source_2_flac.wav") | |
| config = speech.RecognitionConfig( | |
| language_code="fr-FR", | |
| ) |
| # Beforehand, to make it work with SSH you'll have to: | |
| # * install xsel and xauth on target host | |
| # * set X11Forwarding=yes in /etc/ssh/sshd_config | |
| # * connect with option "-X" | |
| # * on Mac, install XQuartz | |
| # | |
| # Test with "echo $DISPLAY", that variable should be set on the server | |
| # tmux version 1.6 |
I hereby claim:
To claim this, I am signing this object:
| """ | |
| Inspired from http://stackp.online.fr/?p=25s | |
| Create a file named "mail_config.py" containing : | |
| HOST = 'mail.gandi.net' | |
| PORT = 993 | |
| USER = '[email protected]' | |
| PASSWORD = '***' |
| #!/usr/bin/env python | |
| ''' | |
| A Python class implementing KBHIT, the standard keyboard-interrupt poller. | |
| Works transparently on Windows and Posix (Linux, Mac OS X). Doesn't work | |
| with IDLE. | |
| This program is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU Lesser General Public License as | |
| published by the Free Software Foundation, either version 3 of the | |
| License, or (at your option) any later version. |
I need to give access to a private dependency. It can happen for continuous integration or deployment.
Here we use python and github, using the services CircleCI and Heroku. However, the principles applies everywhere.
See https://developer.github.com/v3/guides/managing-deploy-keys/
There are 4 ways of granting access to a private dependency, but deploy keys are a good compromise in term of security and ease of use for projects that do not require too many dependencies (in that case, prefer a machine user). In any case, do not use username/password of a developer account or oauth token as they do not provide privilege limitation.
| # See https://forums.meteor.com/t/acceptance-testing-on-circle-ci-2-0/37825/5 | |
| version: 2 | |
| jobs: | |
| build: | |
| working_directory: ~/app | |
| docker: | |
| - image: circleci/openjdk:8-jdk-browsers | |
| environment: | |
| # lang settings required for Meteor's Mongo |
| logoutput: /var/log/dante.log | |
| errorlog: /var/log/dante.error.log | |
| internal: 51.15.171.195 port = 7165 | |
| external: 51.15.171.195 | |
| socksmethod: none | |
| clientmethod: none | |
| user.privileged: root |
| acl localnet src 0.0.0.0/0 | |
| http_access allow localhost | |
| http_access allow localnet | |
| http_port 9999 | |
| forwarded_for off | |
| request_header_access Allow allow all |