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
| # Install devel library | |
| yum install rpm-devel | |
| # Download available srpm (using f20 srpm) | |
| wget https://kojipkgs.fedoraproject.org//packages/rpm/4.11.2/1.fc20/src/rpm-4.11.2-1.fc20.src.rpm | |
| # Extract SRPM | |
| rpm -Uvh <SRPM> | |
| # Install rpm dependencies |
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
| [tox] | |
| envlist = py26, py27 | |
| [testenv] | |
| commands = | |
| python pytest | |
| [testenv:py26] | |
| deps= | |
| argparse |
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
| data_file = open('<file_name>', 'r') | |
| running_job_object = new_job.invoke(block=True, | |
| build_params={'<para1>': '<value>', '<para2>': '<value>'}, | |
| files={'<file_para_name>': data_file}) | |
| data_file.close() |
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
| package main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| pre := 0 | |
| post := 1 | |
| return func() int{ |
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
| package main | |
| import ( | |
| "code.google.com/p/go-tour/wc" | |
| "strings" | |
| ) | |
| func WordCount(s string) map[string]int { | |
| words := strings.Fields(s) | |
| m := make(map[string]int) |
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 libvirt | |
| # Get a connection to Hypervisor (optional URI). | |
| # Return virConnect object if successfull otherwise NULL | |
| # More: http://libvirt.org/html/libvirt-libvirt.html#virConnectOpen | |
| # Check openAuth and openReadOnly methods also. |
NewerOlder