[content to come]
This file contains 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
/* hextiling | |
Hexagonal tiling | |
Version: 1.3 DEVELOPMENT, 2013-03-22 | |
By Phillip Kent | |
Based on litmus2_hextiling prepared for the Cheltenham Science Festival 2013 | |
[http://design-science.org.uk/litmus-paper/] | |
Acknowledgements: |
This file contains 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
/* TrigMountains | |
Version: 1.0, 2012-10-26 | |
By Phillip Kent | |
http://www.phillipkent.net | |
Illustrates the use of randomness to generate visual richness. | |
In each drawing cycle, a sine-shaped solid is plotted, with random magnitude, period | |
and colour. | |
*/ | |
This file contains 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
# Greedy Algorithm for Egyptian Fractions | |
# To express a / b as a sum of unit fractions (1 / c_1) + ... + (1 / c_n) | |
def main(): | |
print("*** Greedy algorithm for Egyptian fractions ***\n") | |
while 1: | |
try: | |
a = int(input("Enter a: ")) | |
b = int(input("Enter b: ")) | |
result = iterate(a,b) |
This file contains 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 |
This file contains 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 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 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 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 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 |
OlderNewer