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 python3 | |
| import sys | |
| from random import randrange | |
| from math import log, ceil, trunc | |
| import copy | |
| from multiprocessing import cpu_count, Process, SimpleQueue | |
| def minCut(g): | |
| '''Runs the random contraction algorithm and returns the min cut (# of |
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
| #Get the current configuration and save it locally | |
| curl -X GET http://user:password@hudson.server.org/job/myjobname/config.xml -o mylocalconfig.xml | |
| #Update the configuration via posting a local configuration file | |
| curl -X POST http://user:password@hudson.server.org/job/myjobname/config.xml --data-binary "@mymodifiedlocalconfig.xml" | |
| #Creating a new job via posting a local configuration file | |
| curl -X POST "http://user:password@hudson.server.org/createItem?name=newjobname" --data-binary "@newconfig.xml" -H "Content-Type: text/xml" |
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
| class CaselessDictionary(dict): | |
| """A dictionary with case-insensitive keys. | |
| A dictionary that is case-insensitive when searching, but also preserves | |
| the keys as inserted. | |
| """ | |
| def __init__(self, initval={}): | |
| if isinstance(initval, dict): | |
| for key, value in initval.iteritems(): |
NewerOlder