[content to come]
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
# Converts a docx file with tables and images to a new docx file | |
# The new file is based on a 'stub' document which contains preamble text and styles | |
# | |
# Requires the Python module 'python-docx' <https://python-docx.readthedocs.io> | |
# Written for Python 3 | |
# | |
# Source documents are taken from the directory 'source' and converted documents are saved | |
# to the directory 'converted' | |
# | |
# Two types of source documents are handled: 'Fiscal Guide' or 'Economics Regime'. Each one |
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
# Converts a docx file with tables and images to (simple) HTML | |
# ORIGINAL CODE BY DAVID SSALI AT SOURCE: https://medium.com/@dvdssali/docx-to-html-1374eb6491a1 | |
# | |
# Requires the Python module 'python-docx' <https://python-docx.readthedocs.io> | |
# | |
# Example use: | |
# >>> s = convert('./SOURCEDIR', 'SAMPLE.docx') | |
# >>> print(s) | |
# or | |
# $ python .\convert-docx-to-html.py > temp.html |
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
#! /usr/bin/env python | |
# This program is configured for Python version 2.6/2.7 | |
# | |
# Copyright (C) Interoute Communications Limited, 2016 | |
# | |
# The config file should have the form: | |
# {"api_secret": "ABCDEFe17Pgc5WMs28Jwm3H4Drn9CZa3y2K1RiFj5x9S8TzQo64Yfk0L7GqXp71AdWe3k9E0NzPw56XpHd8n4", | |
# "api_key": "GHIJKL7H0XeKt25Ygi6ANp89JrWj46Fbo5L0Zfc7PTn1z9D3MwQy28EaBq42Sdk4RJd85SoHc0s6FBw39LyDp", | |
# "api_url": "https://apiserver.example.com/host/c6142d6b-69d8-4114-9721-a627a76f8cce"} |
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
# citeulike_init_session.py | |
# | |
# by Phillip Kent | |
# | |
# Using the 'requests' module in Python [http://docs.python-requests.org], initiate a session with citeulike.org | |
# to generate a login cookie. A simple function cquery is defined to make queries on a specified citeulike account and | |
# return results as a Python dictionary (equivalent to JSON format) | |
# | |
# You can use this interactively on the Python commandline by running: | |
# $ python -i citeulike_init_session.py |
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
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
user haproxy | |
group haproxy | |
defaults | |
log global | |
mode http | |
option httplog |
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
{ | |
"count": 12, | |
"virtualmachine": [ | |
{ | |
"account": "Interoute Tutorial", | |
"affinitygroup": [], | |
"cpunumber": 1, | |
"cpuspeed": 2000, | |
"cpuused": "0%", | |
"created": "2014-06-17T10:34:59+0000", |
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
#!/usr/bin/python | |
# | |
# This file is part of cloudmonkey version 5.1.0 | |
# [https://pypi.python.org/pypi/cloudmonkey/5.1.0] | |
# Modified for use with Interoute VDC | |
# [information: http://cloudstore.interoute.com/main/knowledge-centre/library/vdc-api-introduction-api] | |
# | |
# |
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
// Anagram Test: Test if two strings are anagrams of each other | |
// Original question: Gayle Laakmann, "Cracking the Coding Interview", Chapter 1 | |
//Anagram rules: | |
// spaces are ignored | |
// case is ignored | |
// punctuation is ignored | |
// letters a..z and digits 0..9 are significant (?) | |
//Program logic: |
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
''' | |
Created on 14 Mar 2013 | |
@author: phillip | |
INCOMPLETE CODE UNDER DEVELOPMENT | |
''' | |
# Oulipo's 'N plus' transformation for text | |
# | |
# Words list 'nouns91k.txt' contains 91000 nouns, found at | |
# http://www.ashley-bovan.co.uk/words/partsofspeech.html |
NewerOlder