Skip to content

Instantly share code, notes, and snippets.

:octocat:
Interning @google

Rohit Kumar aquatiko

:octocat:
Interning @google
View GitHub Profile
@aquatiko
aquatiko / server.go
Last active Jul 22, 2020
Server file which need to run on laptop for screen-latency-testing
View server.go
package main
import (
"bufio"
"bytes"
"fmt"
"net"
"os/exec"
"strconv"
"time"
@aquatiko
aquatiko / server.py
Created Jul 14, 2020
Server on laptop for screen-latency testing
View server.py
# first of all import the socket library
import socket
import os
# next create a socket object
s = socket.socket()
print("Socket successfully created")
# reserve a port on your computer in our
# case it is 12345 but it can be anything
@aquatiko
aquatiko / AstroImageView.jl
Created Jul 27, 2019
Basic UI panel AstroImageView
View AstroImageView.jl
using AstroImages, GtkReactive, Gtk.ShortNames, Graphics, Gtk, Colors, IntervalSets, Cairo
using AstroImages: render
using WCS, FITSIO
function ui(img::AstroImage, indx = 1)
header = WCS.to_header(img.wcs[indx])
win = Window("Image", 700,700)
g = Grid()
push!(win, g)
View covert_pixel_coordinate.jl
using SkyCoords: lon, lat
using FITSIO, WCS, SkyCoords, Interpolations
function wcs_to_celestial_frame(wcs::WCSTransform)
if wcs.latpole == -1 && wcs.lonpole == -1 # or lat/lng ?
return nothing
end
radesys = wcs.radesys
if !isnan(wcs.equinox)
equinox = wcs.equinox
@aquatiko
aquatiko / gist:0b08f6b8efcb460bb550fcfeaa00ce30
Last active Apr 7, 2019
Gtk initial Interface for AstroImage
View gist:0b08f6b8efcb460bb550fcfeaa00ce30
# creates a zoom-able window with feature to view coordinate of AstroImage by hovering mouse over it
using AstroImages, GtkReactive, Gtk.ShortNames, Graphics, Gtk, Colors, IntervalSets, Cairo
using AstroImages: render
function ui(img::AstroImage{T,C}) where {T,C}
win = Window("Image")
g = Grid()
push!(win, g)
l1 = Label("X =")
l2 = Label("Y =")
g[1,2] = l1
You can’t perform that action at this time.