Skip to content

Instantly share code, notes, and snippets.

View ai2ys's full-sized avatar
🎯
Focusing

Sylvia Schmitt ai2ys

🎯
Focusing
View GitHub Profile
@JamesHovious
JamesHovious / Android SQLite.java
Last active October 24, 2018 21:07
A simple example of creating a SQLIte DB in Android.
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 {
@tscholl2
tscholl2 / Dockerfile
Last active April 8, 2019 19:19
Dockerfile for TexStudio
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 &&\
@aharonamir
aharonamir / tasks.json
Created June 21, 2018 14:17
vscode tasks
{
"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": []
},
{
@aharonamir
aharonamir / launch.json
Created June 21, 2018 14:29
debug config
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDBSERVER)",
"type": "cppdbg",
"request": "launch",
"miDebuggerServerAddress": "localhost:2000",
"preLaunchTask": "start-gdbserver",
@aharonamir
aharonamir / develop-compose.yml
Created June 21, 2018 14:06
develop compose file
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
# !/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):
@wildestpixel
wildestpixel / code.py
Last active July 17, 2022 23:43
Raspberry Pi Pico & Pimoroni RGB Keypad HID in Circuitpython 6.2+
# 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
@icqparty
icqparty / DNG SDK build on linux
Created June 5, 2014 22:31
This tutorial describes how to build the Adobe DNG SDK on Linux.
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
anonymous
anonymous / ImgAnalyser.py
Created September 25, 2016 17:00
#!python3
import requests
import openpyxl
import time
import os
link = 'https://www.eyeem.com/data/showcase/upload'
xl_path = '.\ImgAnalysis.xlsx'
@RaphaelMeudec
RaphaelMeudec / grad_cam.py
Created July 18, 2019 15:11
Grad CAM implementation with Tensorflow 2
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)