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 {
@UniIsland
UniIsland / list-manually-installed-packages.sh
Created February 8, 2014 08:20
List all manually installed packages on a debian/ubuntu system
#!/bin/bash
## List all manually installed packages on a debian/ubuntu system
## manually installed means:
## 1. not pre-installed with the system
## 2. not marked auto-installed by apt (not dependencies of other
## packages)
## Note: pre-installed packages that got updated still needs to be
## filtered out.
@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'
@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 / 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
@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",
@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)
@kiding
kiding / HDRGainMap.swift
Last active May 9, 2024 07:29
Extracting HDR Gain Map from iOS 14.1+ (iPhone 12+) photos
import UIKit
import MobileCoreServices.UTCoreTypes
if #available(iOS 14.1, *) {
let input = Bundle.main.url(forResource: "IMG_0037", withExtension: "HEIC")!
let output = FileManager().temporaryDirectory.appendingPathComponent("IMG_0037.GAIN_MAP.BMP")
let source = CGImageSourceCreateWithURL(input as CFURL, nil)!
// urn:com:apple:photo:2020:aux:hdrgainmap
let dataInfo = CGImageSourceCopyAuxiliaryDataInfoAtIndex(source, 0, kCGImageAuxiliaryDataTypeHDRGainMap)! as Dictionary