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 Right Click Menu by Cracker Hax | |
// declare some arrays | |
var btn=[]; | |
var txt=[]; | |
// define our menu items | |
var cmd = ["Menu Item 1","Menu Item 2","Menu Item 3"]; | |
// define button size |
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
function post(method,params) | |
{ | |
var r_txt ='{"jsonrpc":"2.0","method":"'+method+'","params":{'+params+'},"id":1234}'; | |
var http = new XMLHttpRequest(); | |
http.open("POST", 'http://foo.com:8082', true); | |
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
http.setRequestHeader("Content-length", r_txt.length); | |
http.setRequestHeader("Connection", "close"); | |
http.onreadystatechange = function() { | |
if (http.readyState == 4) { |
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
(function() | |
{ | |
// define colors | |
var black = { red: 0, green:0, blue:0}; | |
var white = { red: 255, green:255, blue:255}; | |
var window = []; | |
function newWindow(posx,posy) | |
{ |
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
function scriptStopped() | |
{ | |
print("script stopped"); | |
} | |
Script.scriptEnding.connect(scriptStopped); |
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
var wsUri = "ws://echo.websocket.org"; | |
var wssUri = "wss://echo.websocket.org"; | |
var connection; | |
function load(uri) { | |
connection = new WebSocket(uri); | |
connection.onopen = function () { | |
var send = "Hello, world!"; |
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
from random import shuffle | |
import glob | |
import sys | |
import cv2 | |
import numpy as np | |
import tensorflow as tf | |
name = 'mountains' # name of your project directory where all images are | |
# should be under ./images/train (or change the path variable below) | |
image_size = 256 # size of images - should be square images (i.e. 256x256) |
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
# coding=utf-8 | |
# Copyright 2018 Google LLC & Hwalsuk Lee. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
#include "keccak-tiny.h" | |
#include "secp256k1.h" | |
#include "secp256k1_recovery.h" | |
std::string bytes_to_hex_string(const uint8_t *str, const uint64_t s) | |
{ | |
std::ostringstream ret; | |
for (size_t i = 0; i < s; ++i) | |
ret << std::hex << std::setfill('0') << std::setw(2) << std::nouppercase << (int) str[i]; |
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
import web3 | |
w3 = web3.Web3(web3.HTTPProvider('https://geth.golem.network:55555')) | |
tx = w3.eth.getTransaction('0x00ee93fd1e6fdbdf841b4458a078210449dce89525502c965fd3534ba397e2e3') | |
tx.hash | |
from eth_account._utils.signing import extract_chain_id, to_standard_v | |
s = w3.eth.account._keys.Signature(vrs=( | |
to_standard_v(extract_chain_id(tx.v)[1]), | |
w3.toInt(tx.r), |
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 | |
set -e | |
ENV_FILE=".env" | |
DOCKER_IMAGE_PARITY="fusenet/node" | |
DOCKER_CONTAINER_PARITY="fusenet" | |
DOCKER_IMAGE_APP="fusenet/validator-app" | |
DOCKER_CONTAINER_APP="fuseapp:" | |
DOCKER_IMAGE_NETSTAT="fusenet/netstat" | |
DOCKER_CONTAINER_NETSTAT="fusenetstat" |
OlderNewer