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
require 'benchmark' | |
n = 100_000 | |
Benchmark.bm do |x| | |
x.report("string_hash:") do | |
n.times do | |
string_hash = {"test" => "some string"} | |
string_hash["test"] | |
end |
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
[ | |
{ | |
"created_at": "Fri Aug 02 02:41:51 +0000 2013", | |
"id": 363127475540623360, | |
"id_str": "363127475540623360", | |
"text": "I love this. #KennyChesney with my bff.", | |
"source": "<a href="http: //twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>", | |
"truncated": false, | |
"in_reply_to_status_id": null, | |
"in_reply_to_status_id_str": null, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
original_file_path = '' | |
new_file_path = '' | |
original_file = MiniMagick::Image.open(original_file_path) | |
og = original_file | |
og.combine_options do |ops| | |
ops.quality "85" | |
ops.interlace "Plane" | |
ops.strip |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
version: '3' | |
services: | |
miner: | |
image: cryptotrust/rpi-cpuminer-multi | |
command: "cpuminer -u ${EMAIL} -a ${ALGO} -o stratum+tcp://${URL}:${PORT} -t ${THREADS}" | |
camera: | |
image: ricklon/rpi-opencv | |
command: python motion_capture.py | |
volumes: | |
- .:/greenthumb-rails |
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
version: '3' | |
services: | |
miner: | |
image: cryptotrust/rpi-cpuminer-multi | |
command: "cpuminer -u ${EMAIL} -a ${ALGO} -o stratum+tcp://${URL}:${PORT} -t ${THREADS}" | |
camera: | |
image: ricklon/rpi-opencv | |
command: python motion_capture.py | |
volumes: | |
- .:/greenthumb-rails |
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
pi@raspberrypi:~ $ sudo docker run cryptotrust/rpi-cpuminer-multi --algo cryptonight-light | |
--url stratum+tcp://aeon.pool.host.com:45690 --user [email protected] --t | |
hreads 2 | |
** cpuminer-multi 1.3.3 by tpruvot@github ** | |
BTC donation address: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd (tpruvot) | |
[2018-05-13 23:58:28] Using JSON-RPC 2.0 | |
[2018-05-13 23:58:28] CPU Supports AES-NI: NO | |
[2018-05-13 23:58:28] Starting Stratum on stratum+tcp://aeon.pool.host.com:45690 | |
[2018-05-13 23:58:28] 2 miner threads started, using 'cryptolight' algorithm. |
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 imutils | |
def motion(current_frame=None, previous_frame=None, avg=None, min_area=2000): | |
motion = False | |
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) | |
gray = cv2.GaussianBlur(gray, (21, 21), 0) | |
# if the average frame is None, initialize it | |
if avg is None: |
OlderNewer