Skip to content

Instantly share code, notes, and snippets.

View ashwanirathee's full-sized avatar
☀️
day

Ashwani Rathee ashwanirathee

☀️
day
View GitHub Profile
###
# Write example
###
data = Vector{Cuchar}([
0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01,
0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xdb, 0x00, 0x43,
0x00, 0x14, 0x0e, 0x0f, 0x12, 0x0f, 0x0d, 0x14, 0x12, 0x10, 0x12, 0x17,
0x15, 0x14, 0x18, 0x1e, 0x32, 0x21, 0x1e, 0x1c, 0x1c, 0x1e, 0x3d, 0x2c,
0x2e, 0x24, 0x32, 0x49, 0x40, 0x4c, 0x4b, 0x47, 0x40, 0x46, 0x45, 0x50,
0x5a, 0x73, 0x62, 0x50, 0x55, 0x6d, 0x56, 0x45, 0x46, 0x64, 0x88, 0x65,
@ashwanirathee
ashwanirathee / LibExif.jl
Created March 8, 2022 05:24
EXIF project
module LibExif
using libexif_jll
mutable struct _ExifContentPrivate end
const ExifContentPrivate = _ExifContentPrivate
mutable struct _ExifContent
entries::Ptr{Ptr{Cvoid}} # entries::Ptr{Ptr{ExifEntry}}
@ashwanirathee
ashwanirathee / handgesturerecogniser.jl
Last active January 7, 2023 01:41
hand landmarks and gesture recognition in julia
### A Pluto.jl notebook ###
# v0.17.3
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
using Gtk
win = GtkWindow("Skyring", 300, 350)
set_gtk_property!(win,:resizable,false)
grid = GtkGrid()
set_gtk_property!(grid,:margin,20)
text = ""
@ashwanirathee
ashwanirathee / Calculator.jl
Created June 28, 2021 14:27
INIT2022- Day 1
using Gtk
win = GtkWindow("Doritos Calculator", 300, 350)
set_gtk_property!(win,:resizable,false)
grid = GtkGrid()
set_gtk_property!(grid,:margin,20)
text = ""
b1 = GtkButton("1")
@ashwanirathee
ashwanirathee / benchmark.md
Created May 23, 2021 04:35
A benchmark for PkgBenchmark

Benchmark Report for ImageDistances

Job Properties

  • Time of benchmark: 23 May 2021 - 10:4
  • Package commit: dirty
  • Julia commit: 6aaede
  • Julia command flags: None
  • Environment variables: None

Results

@ashwanirathee
ashwanirathee / run.jl
Last active May 20, 2021 16:49
MineCraft Game in Julia
# Instructions to get something running of Malmo
# In terminal 1 and a particular environment
# 1) Do `pip3 install gym lxml numpy pillow`
# 2) Do `git clone https://github.com/Microsoft/malmo.git`
# 3) Go to `cd malmo/MalmoEnv`
# 4) Do `(echo -n "malmomod.version=" && cat ../VERSION) > ./src/main/resources/version.properties`
# 5) Then run this file `julia run.jl`
# In terminal 2
@ashwanirathee
ashwanirathee / results.md
Created May 15, 2021 16:34
Benchmark testresults

Benchmark Report for ImageDistances

Job Properties

  • Time of benchmark: 15 May 2021 - 21:57
  • Package commit: dirty
  • Julia commit: 6aaede
  • Julia command flags: None
  • Environment variables: None

Results

@ashwanirathee
ashwanirathee / Vertices.jl
Created March 26, 2021 14:57
Vertices for test image in polygon filling algorithm
vert=CartesianIndex{2}[]
push!(vert, CartesianIndex(2,2))
push!(vert, CartesianIndex(3,2))
push!(vert, CartesianIndex(4,2))
push!(vert, CartesianIndex(5,2))
push!(vert, CartesianIndex(6,3))
push!(vert, CartesianIndex(7,4))
push!(vert, CartesianIndex(8,4))
push!(vert, CartesianIndex(9,3))
push!(vert, CartesianIndex(10,2))
@ashwanirathee
ashwanirathee / Test_morphology.py
Created March 25, 2021 18:12
Image Morphology Test
import cProfile
from skimage import data
from skimage.util import img_as_ubyte
from skimage import io
from skimage.morphology import disk
from skimage.morphology import erosion
def test():
orig_phantom = img_as_ubyte(data.shepp_logan_phantom())
selem = disk(6)