- Python 3
- Pip 3
$ brew install python3
#Download dwebp (WebP decoder tool) https://developers.google.com/speed/webp/download | |
#Run | |
for %f in (*.webp) do dwebp.exe "%f" -o "%~nf.png" |
from __future__ import print_function | |
''' | |
Basic Multi GPU computation example using TensorFlow library. | |
Author: Aymeric Damien | |
Project: https://github.com/aymericdamien/TensorFlow-Examples/ | |
''' | |
''' | |
This tutorial requires your machine to have 1 GPU | |
"/cpu:0": The CPU of your machine. |
import socket | |
hostname, sld, tld, port = 'www', 'integralist', 'co.uk', 80 | |
target = '{}.{}.{}'.format(hostname, sld, tld) | |
# create an ipv4 (AF_INET) socket object using the tcp protocol (SOCK_STREAM) | |
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
# connect the client | |
# client.connect((target, port)) |
function showDate(){ | |
var date = new Date(), str = date.toISOString(); | |
return str; | |
} | |
function formatArgs(args){ | |
return util.format.apply(util.format, Array.prototype.slice.call(args)); | |
} | |
var origLog = console.log; | |
console.log = function() { | |
var strDate = " [ " + showDate() + " ] "; |
"use strict"; | |
/** | |
* @param {!Function.<!Promise>} action. | |
* @param {!Number | !string | !BigNumber} gasToUse. | |
* @returns {!Promise} which throws unless it hit a valid error. | |
*/ | |
module.exports = function expectedExceptionPromise(action, gasToUse) { | |
return new Promise(function (resolve, reject) { | |
try { |
android.applicationVariants.all { variant -> | |
def appName | |
if (project.hasProperty("applicationName")) { | |
appName = applicationName | |
} else { | |
appName = parent.name | |
} | |
def gitSha = 'git rev-parse --short HEAD'.execute().text.trim() | |
def gitCommitCount = 'git rev-list HEAD --count'.execute().text.trim() |
def confirm(): | |
""" | |
Ask user to enter Y or N (case-insensitive). | |
:return: True if the answer is Y. | |
:rtype: bool | |
""" | |
answer = "" | |
while answer not in ["y", "n"]: | |
answer = raw_input("OK to push to continue [Y/N]? ").lower() |
// Copyright (c) 2012 Sutoiku, Inc. | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE O |