This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # | |
| # Diffusion youtube avec ffmpeg | |
| # Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
| VBR="2500k" # Bitrate de la vidéo en sortie | |
| FPS="30" # FPS de la vidéo en sortie | |
| QUAL="medium" # Preset de qualité FFMPEG | |
| YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bisect | |
| import itertools | |
| import operator | |
| class _BNode(object): | |
| __slots__ = ["tree", "contents", "children"] | |
| def __init__(self, tree, contents=None, children=None): | |
| self.tree = tree |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_count(q): | |
| count_q = q.statement.with_only_columns([func.count()]).order_by(None) | |
| count = q.session.execute(count_q).scalar() | |
| return count | |
| q = session.query(TestModel).filter(...).order_by(...) | |
| # Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ... | |
| print q.count() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Flask-Login example | |
| =================== | |
| This is a small application that provides a trivial demonstration of | |
| Flask-Login, including remember me functionality. | |
| :copyright: (C) 2011 by Matthew Frazier. | |
| :license: MIT/X11, see LICENSE for more details. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding=utf-8 | |
| from blessings import Terminal | |
| import readchar | |
| from readchar import key | |
| import os | |
| terminal = Terminal() | |
| current = 0 | |
| choices = ['a','b','c'] | |
| #os.system('clear') |
NewerOlder