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/env python | |
# encoding: utf8 | |
"""Removes lower resolution duplicate wallpapers downloaded from | |
InterfaceLift. | |
""" | |
import os, re | |
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/env python | |
"""Static file server, using Python's CherryPy. Should be used when Django's static development server just doesn't cut.""" | |
import cherrypy | |
from cherrypy.lib.static import serve_file | |
import os.path | |
class Root: | |
@cherrypy.expose | |
def index(self, name): |
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
"""Simple Perceptron implementation. | |
No 3rd-party modules (numpy) used. | |
""" | |
from math import copysign | |
def sgn(x): | |
"""Mathemetical sign function implementation. |
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/env python | |
"""Copy & replace text from INPUT_PATH to OUTPUT_PATH.""" | |
# Consts | |
REPLACE = ('\n', ' ', '\t') | |
REPLACE_WITH = (',') | |
INPUT_PATH = 'path/to/input.txt' | |
OUTPUT_PATH = 'path/to/output.txt' |
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/env python | |
"""Prints all your "Not Interested" list on steam. | |
You need to first fetch the "Not Interested" game id numbers list | |
from this page: http://store.steampowered.com/dynamicstore/userdata | |
The ids you need are under the "rgIgnoredApps" field. | |
I've put an example of these ids down below, just replace them with yours. | |
This script requires the requests and beautifulsoup4 packages, | |
so execute "pip install requests beautifulsoup4" first. |
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
#!/bin/bash | |
# prepends branch name and description to commit message | |
# inspired by the following articles: | |
# http://stackoverflow.com/a/26796665/207894 | |
# http://blog.bartoszmajsak.com/blog/2012/11/07/lazy-developers-toolbox-number-1-prepend-git-commit-messages/ | |
# | |
# put this in repo/.git/hooks/ and chmod +x the file | |
# see the following stackoverflow question about how | |
# to do this for every new/cloned repo: | |
# http://stackoverflow.com/a/8842663/207894 |
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
2016/09/29 15:46:06 [INFO] Terraform version: 0.7.4 84592f5967490d118aae0b61a25d589d269fd0b6 | |
2016/09/29 15:46:06 [INFO] CLI args: []string{"...", "apply", "...", "-state", ".../terraform.state", "..."} | |
2016/09/29 15:46:06 [DEBUG] Detected home directory from env var: /home/ory | |
2016/09/29 15:46:06 [DEBUG] Detected home directory from env var: /home/ory | |
2016/09/29 15:46:06 [DEBUG] Attempting to open CLI config file: /home/ory/.terraformrc | |
2016/09/29 15:46:06 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2016/09/29 15:46:06 [DEBUG] Detected home directory from env var: /home/ory | |
2016/09/29 15:46:06 [DEBUG] New state was assigned lineage "cfd21e3e-22b2-4170-9880-3cb39f5cedad" | |
2016/09/29 15:46:06 [TRACE] Graph after step *terraform.ConfigTransformer: |
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
MyEthereumDapp/ | |
├── MobileCode # ios code, will be discussed later on | |
├── .travis.yml # CI service configuration | |
└── truffle/ # testing framework | |
├── contracts/ # Solidity .sol smart contracts. Includes ERC20 token contracts used for tests | |
├── migrations/ # Truffle contract initialization code onto testrpc Ethereum node | |
├── scripts/ # helper scripts, used with Makefile | |
│ ├── prepare-tests.sh # set variables required for tests e.g. account keys, contract address | |
│ ├── testrpc-accounts.sh # wallet account predefined private keys | |
│ ├── testrpc-kill.sh # kill testrpc when tests are done |
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
const assert = require('assert'); | |
let Migrations = artifacts.require('../contracts/Migrations.sol'); | |
let TestToken = artifacts.require('../contracts/BasicTokenMock.sol'); | |
module.exports = (deployer, network, accounts) => { | |
deployer.deploy(Migrations); | |
deployer.deploy(TestToken).then(async() => { | |
contract = await TestToken.deployed() | |
console.log(`TestToken contract deployed at ${contract.address}`); |
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
// ES6 support on ES5 | |
require('babel-register'); | |
require('babel-polyfill'); | |
module.exports = { | |
networks: { | |
development: { | |
host: 'localhost', | |
port: 8545, | |
network_id: '*', // Match any network id |
OlderNewer