Skip to content

Instantly share code, notes, and snippets.

View jspenc72's full-sized avatar

Jspenc72 jspenc72

  • Redwood City, CA
View GitHub Profile
@OlafenwaMoses
OlafenwaMoses / FirstDetection.py
Last active August 13, 2022 17:11
Object detection in 10 lines of code
from imageai.Detection import ObjectDetection
import os
execution_path = os.getcwd()
detector = ObjectDetection()
detector.setModelTypeAsRetinaNet()
detector.setModelPath( os.path.join(execution_path , "resnet50_coco_best_v2.1.0.h5"))
detector.loadModel()
detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "image.jpg"), output_image_path=os.path.join(execution_path , "imagenew.jpg"))
@jspenc72
jspenc72 / docker_cheat_sheet.md
Last active November 16, 2018 21:05
Docker Cheat Sheet

Docker Commands

To ssh into container:

docker exec -it <container id> /bin/bash

Remove all old images:

@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active April 25, 2024 04:16
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@matiasfha
matiasfha / client.html
Created June 6, 2011 16:04
nodejs + thrift +socket.io for image streaming
<script src="jquery-1.6.1.min.js"></script>
<script src="socket.io/socket.io.js"></script>
<script>
var socket = new io.Socket(null,{port:8080});
socket.connect();
socket.on('message',function(obj){
switch(obj.tipo){
case 'imagen':
img = document.getElementById('stream');
img.src="";
@emmanuel
emmanuel / file.sql
Created June 2, 2011 07:54
Closure Table operations SQL fragments
-- Retrieve descendants
-- ====================
-- retrieve descendants of #4
SELECT c.*
FROM Comments AS c
JOIN TreePaths AS t ON c.comment_id = t.descendant
WHERE t.ancestor = 4;
-- Retrieve ancestors