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
# BTC-USDT | |
x125_lookup_table = [ | |
( 50_000, 0.004, 0), | |
( 250_000, 0.005, 50), | |
( 1_000_000, 0.01, 1_300), | |
( 10_000_000, 0.02, 16_300), | |
( 20_000_000, 0.05, 266_300), | |
( 50_000_000, 0.1, 1_266_300), | |
( 100_000_000, 0.125, 2_516_300), |
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 math | |
import torch | |
import torch.nn as nn | |
import torchvision | |
REGISTERED_OUTPUT_SHAPE_TYPES = [] | |
def compute_type(type): | |
def _wrap(func): |
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
# | |
# Original source: | |
# https://gist.github.com/sofyanhadia/37787e5ed098c97919b8c593f0ec44d8 | |
# | |
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 json | |
import socket | |
s = socket.create_connection(("127.0.0.1", 5090)) | |
s.sendall(json.dumps(({"id": 1, "method": "Hello.Hello", "params": ["hello"]}))) | |
print s.recv(4096) |
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
say "Create stub for '#{action_name = name.sub('rails_admin_', '')}' in gem '#{name}'. This may take a while" | |
run "rm -rf script/ config/ lib/tasks/" | |
run "rm -rf app/assets app/controllers app/helpers app/mailers app/models" | |
run "mkdir -p app/views/rails_admin/main" | |
inside "app/views/rails_admin/main" do | |
create_file "#{action_name}.html.haml", <<-END | |
%h2 Custom action loaded and active | |
%pre @abstract_model.inspect | |
%pre @object.inspect | |
END |
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
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n | |
# Devise v1.4.6 polish translation by saepia based on @rogal111's translation | |
pl: | |
errors: | |
messages: | |
expired: "stracił ważność, wyślij zapytanie o nowy" | |
not_found: "nie znaleziono" | |
already_confirmed: "już został aktywowany, możesz się zalogować" | |
not_locked: "nie był zablokowany" |