Skip to content

Instantly share code, notes, and snippets.

View mouadino's full-sized avatar

Mouad Benchchaoui mouadino

View GitHub Profile
@mouadino
mouadino / actions.py
Last active May 3, 2018 08:35
Rasa data for bug report
# FIXME: Hanlde input like "the whole next week"!
# FIXME: Handle input like:
# - Starting when?
# - Monday
# - Until when?
# - Friday
# (here friday should mean friday after monday).
# FIXME: End of july seems to be interpreter as 1 July.
# TODO: support half day.
class ActionGetInterval(Action):
# List Python dependencies installed with the time that they were uploaded to PyPi.
for depend in $(pip freeze); do
pkg=$(echo $depend | awk -F== '{ print $1 }')
version=$(echo $depend | awk -F== '{ print $2 }')
# pip freeze can return package that are not in PyPi e.g. -e git+ssh://.. This packages doesn't have a version.
if [[ -z $version ]]; then
continue
fi
#!/usr/bin/env python
# -*- encoding: utf8 -*-
# copyright. Mouad Benchchaoui
# License. DO I LOOK LIKE I GIVE A SHIT PUBLIC LICENSE
"""
Run command over SSH in multiple machine at the same time.
Usage:
./remote.py "<cmd>" <user>@<ip>...
"""This script was created to test which wsgi server handle correctly
absolute request URI in HTTP request (check rfc2616 5.1.2).
http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
Results (12/12/2013):
+-----------------+----------------+
|Framework | Result |
| | (OK/NOT OK) |
default['openstack']['compute']['conf']['internal_service_availability_zone'] = 'internal'
default['openstack']['compute']['conf']['default_availability_zone'] = 'nova'
default['openstack']['compute']['conf']['ca_file'] = 'cacert.pem'
default['openstack']['compute']['conf']['key_file'] = 'private/cakey.pem'
default['openstack']['compute']['conf']['crl_file'] = 'crl.pem'
"""This script was created to test which server support closing connection
as soon as a response is available when the client has set Connection header
to close, assuming that we are using HTTP 1.1 here.
Results:
+-----------+----------------+---------------+
|Framework | Connection: | No Connection |
| | close | header |
+-----------+----------------+---------------+