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
package com.e3h.usmcknowledge.database; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
public class DatabaseHelper { |
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
FROM debian:stretch | |
# setup: language and ensure that external fonts and doc folders exists | |
RUN export LANG=C.UTF-8 &&\ | |
mkdir -p /usr/share/fonts/external/ &&\ | |
mkdir /doc/ | |
# install utilities, texlive, ghostscript, and remove unused docs | |
RUN apt-get clean &&\ | |
apt-get update &&\ |
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": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "start develop env", | |
"type": "shell", | |
"command": "docker-compose -f develop-compose.yml run --service-ports --name devenv dev-image bash", | |
"problemMatcher": [] | |
}, | |
{ |
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": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "C++ Launch (GDBSERVER)", | |
"type": "cppdbg", | |
"request": "launch", | |
"miDebuggerServerAddress": "localhost:2000", | |
"preLaunchTask": "start-gdbserver", |
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: '2' | |
services: | |
##### the develop image you've build | |
### don't forget to open ports for your app | |
dev-image: | |
image: your-company/your-project/develop | |
ports: | |
- "2000:2000" | |
- "50010:50010" | |
privileged: true |
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 python | |
import tensorflow as tf | |
from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2_as_graph | |
from tensorflow.lite.python.util import run_graph_optimizations, get_grappler_config | |
from pathlib import Path | |
import argparse | |
def frozen_keras_graph(model): |
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
# Adapted from Sandy J Macdonald's gist at https://gist.github.com/sandyjmacdonald/b465377dc11a8c83a8c40d1c9b990a90 to configure all buttons and switch off all lights in loop | |
import time | |
import board | |
import busio | |
import usb_hid | |
from adafruit_bus_device.i2c_device import I2CDevice | |
import adafruit_dotstar |
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
DNG 1.4 Parser | |
This tutorial describes how to build the Adobe DNG SDK on Linux. | |
It generates the dng_validate C++ program that can parse any DNG images, a bit like a "Hello world" for DNG image processing. | |
Adobe DNG SDK 1.4 | |
XMP SDK | |
DNG SDK | |
dcraw issue | |
Compatibility issue |
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
#!python3 | |
import requests | |
import openpyxl | |
import time | |
import os | |
link = 'https://www.eyeem.com/data/showcase/upload' | |
xl_path = '.\ImgAnalysis.xlsx' | |
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 cv2 | |
import numpy as np | |
import tensorflow as tf | |
IMAGE_PATH = './cat.jpg' | |
LAYER_NAME = 'block5_conv3' | |
CAT_CLASS_INDEX = 281 | |
img = tf.keras.preprocessing.image.load_img(IMAGE_PATH, target_size=(224, 224)) | |
img = tf.keras.preprocessing.image.img_to_array(img) |
OlderNewer