Skip to content

Instantly share code, notes, and snippets.

View ly0's full-sized avatar
👊
已全仓买入

latyas ly0

👊
已全仓买入
View GitHub Profile
@ly0
ly0 / bitcoin.py
Created September 2, 2023 20:28 — forked from HelloZeroNet/bitcoin.py
Bitcoin signature signing and verficiation using coincurve
import hashlib
import struct
from coincurve import PrivateKey, PublicKey
from base58 import b58encode_check, b58decode_check
from hmac import compare_digest
RECID_MIN = 0
RECID_MAX = 3
RECID_UNCOMPR = 27
LEN_COMPACT_SIG = 65
name: "ResNet-50"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 1024
input_dim: 576
layer {
bottom: "data"
top: "conv1"
name: "conv1"
name: "ResNet-50"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
layer {
bottom: "data"
top: "conv1"
name: "conv1"
@ly0
ly0 / mobilenetv1_yolo_lite.prototxt
Created January 21, 2019 15:54
mobilenetv1_yolo_lite.prototxt
name: "MobileNet-YOLO"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 416
dim: 416
}
@ly0
ly0 / mobilenetv1_yolo.prototxt
Created January 21, 2019 15:51
mobilenetv1_yolo.prototxt
name: "MobileNet-YOLO"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 416
dim: 416
}
@ly0
ly0 / mobilenetv1.prototxt
Created January 21, 2019 15:27
mobilenetv1.prototxt
name: "MOBILENET"
# transform_param {
# scale: 0.017
# mirror: false
# crop_size: 224
# mean_value: [103.94,116.78,123.68]
# }
input: "data"
input_dim: 1
input_dim: 3
sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -A PREROUTING -t nat -p tcp --dport 443 -j REDIRECT --to-port 8443
sudo sh -c "iptables-save > /etc/iptables.rules"
sudo apt-get install iptables-persistent
@ly0
ly0 / procudure.md
Created June 15, 2018 19:15
raspberry connect internet through USB0
  1. Get a static IP vi /etc/network/interfaces
allow-hotplug usb0
iface usb0 inet static
        address 192.168.7.2
        netmask 255.255.255.0
        network 192.168.7.0
 broadcast 192.168.7.255
@ly0
ly0 / gitstars.json
Created February 6, 2018 03:10
github stars manager for production
{"tags":[],"lastModified":1517886637222}
@ly0
ly0 / telegram_notifier.py
Last active December 11, 2017 04:02
Simplify notification with less than 30 lines in telegram way
import aiohttp
from aiohttp import web
CHAT_ID = -1
BOT_TOKEN = 'YOURTOKENHERE'
async def notify(request):
try:
post_data = await request.post()
text = post_data.get('text', '')