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 { ethers } = require("ethers"); | |
/* Compressed public key stored in 264 bits (66 hex digits) | |
* https://www.oreilly.com/library/view/mastering-bitcoin-2nd/9781491954379/ch04.html | |
*/ | |
const compressedPubkey = "0x03aced43f9dddc120291f5cdf73580fbb592b5b21054ce61eb73cbaf98efcbe82e"; | |
const pubkey = ethers.utils.computePublicKey(compressedPubkey); | |
const walletAddress1 = ethers.utils.computeAddress(pubkey); | |
const walletAddress2 = ethers.utils.computeAddress(compressedPubkey); |
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 argparse | |
from datetime import datetime | |
from dateutil import parser as dparser | |
def datetime_iso_to_unix(iso_datetime_string): | |
target_datetime = dparser.isoparse(iso_datetime_string) | |
unix_timestamp = int(target_datetime.timestamp()) | |
return unix_timestamp |
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
{ | |
"data": { | |
"ancestors": [ | |
{ | |
"data": "/fotoweb/data/a/5000.wxkilZbXJiepciwEgVI5dneZC9M_N2v8LXyGH7N0E_M/", | |
"href": "/fotoweb/archives/5000-Starling/", | |
"name": "Starling" | |
} | |
], | |
"archiveHREF": "/fotoweb/archives/5000-Starling/", |
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
20-02-25 11:02:20.519 23521-23521/com.example.camerax I/example.camera: Late-enabling -Xcheck:jni | |
2020-02-25 11:02:20.519 23521-23521/com.example.camerax I/example.camera: VMHOOK: rlim_cur : 0 pid:23521 | |
2020-02-25 11:02:20.714 23521-23521/com.example.camerax W/example.camerax: type=1400 audit(0.0:28300): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=15153 scontext=u:r:untrusted_app:s0:c214,c256,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0 | |
2020-02-25 11:02:20.714 23521-23521/com.example.camerax I/chatty: uid=10214(com.example.camerax) identical 4 lines | |
2020-02-25 11:02:20.714 23521-23521/com.example.camerax W/example.camerax: type=1400 audit(0.0:28304): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=15153 scontext=u:r:untrusted_app:s0:c214,c256,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0 | |
2020-02-25 11:02:20.721 23521-23521/com.example.camerax D/Camera2Initializer: CameraX initia |
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 bash | |
# | |
# Textile Cafe node installation script. | |
# | |
# This script helps install and run a Cafe node on Amazon EC2 instance. | |
# | |
# You also need to enable these inbound TCP ports in the security group | |
# of the instance: | |
# | |
# 4001 - Swarm TCP; should be exposed to the public |
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
def generate_class_color(class_num=20): | |
"""Generate a RGB color set based on given class number. | |
Args: | |
class_num: Default is VOC dataset class number. | |
Returns: | |
A tuple containing RGB colors. | |
""" | |
colors = [(1, 0, 1), (0, 0, 1), (0, 1, 1), |
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
""" | |
Create pure color JPEG by given RGB values. | |
""" | |
import cv2 | |
import numpy as np | |
def paint_it_color(rgb=(0, 0, 0), shape=(720, 1280, 3), filename='black'): | |
img = np.zeros(shape) |
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/python3 | |
# Display RGB values in image's pixels. | |
import sys | |
import cv2 | |
def main(): | |
fpath = sys.argv[1] |
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 -*- | |
""" | |
Re-Pack `Wheel` to a PYC-Only One | |
""" | |
from __future__ import print_function, unicode_literals | |
import argparse | |
import compileall |
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
diff --git a/darkflow/net/flow.py b/darkflow/net/flow.py | |
index a5b8ceb..bb60704 100644 | |
--- a/darkflow/net/flow.py | |
+++ b/darkflow/net/flow.py | |
@@ -90,7 +90,8 @@ def return_predict(self, im): | |
"y": tmpBox[2]}, | |
"bottomright": { | |
"x": tmpBox[1], | |
- "y": tmpBox[3]} | |
+ "y": tmpBox[3]}, |
NewerOlder