Skip to content

Instantly share code, notes, and snippets.

View rukku's full-sized avatar

RK Aranas rukku

  • Philippine Space Agency
  • Quezon City, Philippines
View GitHub Profile
@rukku
rukku / modern-geospatial-python.md
Last active December 21, 2023 16:34 — forked from jqtrde/modern-geospatial-python.md
Modern remote sensing image processing with Python
@rukku
rukku / httpd.conf
Created August 21, 2012 04:39
XAMPP httpd.conf
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk. If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
from facepy import GraphAPI
import json
group_id = "YOUR_GROUP_ID"
access_token = "YOUR_ACCESS_TOKEN"
graph = GraphAPI(access_token)
# https://facepy.readthedocs.org/en/latest/usage/graph-api.html
data = graph.get(group_id + "/feed", page=False, retry=3, limit=800)
@rukku
rukku / georefTest_HPT.py
Last active May 13, 2021 08:39
HPT georeferencer
from osgeo import gdal, osr
import csv
import os
##
gdal.UseExceptions()
testPoints = "D2_HPT_2021-05-01T061835085_p1.points"
fileName = os.path.basename(testPoints)[0:27]
@rukku
rukku / gist:2a06fb451021550cd63f7ac36180aabc
Last active February 24, 2021 15:38 — forked from joubertnel/gist:d31328d6db838a4d978a1c20e8d16e40
Nim: compile for Apple M1 / macOS
# based on information from: https://github.com/nim-lang/Nim/issues/16211
git clone https://github.com/nim-lang/Nim
cd Nim
git clone -q --depth 1 https://github.com/nim-lang/csources_v1.git csources
./build_all.sh
def expTime(smd, v, h):
if smd == 1 or smd == 3:
exposureTime = (v * 525 + h) * 0.00006356
else:
exposureTime = (0.03337 * v) + (524 - h) * (0.00006356) + \
(float(487) / float(780)) * (0.00006356)
return exposureTime

Diwata-1
1 41463U 98067HT 17031.41795199 .00008876 00000-0 11502-3 0 9996
2 41463 51.6443 354.2093 0001375 68.1765 23.3338 15.59719069 43436

Diwata-1
1 41463U 98067HT 17031.41795199 .00008876 00000-0 11502-3 0 9996
2 41463 51.6443 354.2093 0001375 68.1765 23.3338 15.59719069 43436

Diwata-1

@rukku
rukku / diwata1.tle
Last active February 2, 2017 14:54
Diwata-1
1 41463U 98067HT 17031.41795199 .00008876 00000-0 11502-3 0 9996
2 41463 51.6443 354.2093 0001375 68.1765 23.3338 15.59719069 43436
@rukku
rukku / iterate_csv.py
Created February 1, 2017 15:08 — forked from nsonnad/iterate_csv.py
Iterate over specific range of rows with python csv.reader()
import csv
import itertools
f = csv.reader(open('file.csv'))
for row in itertools.islice(f, 0, 50):
print row
from numpy import flipud
from numpy import zeros
import matplotlib.image
image_dn = zeros([494,659], dtype = float) #image size
filename = r'image_150529_123155_0x79_HPCM_750nm_659x494_complete.bin' #directory + filename ng bin
def binToInt(astring):
temp = ' '.join(format(ord(i),'b').zfill(8) for i in astring)
temp = temp[0:8]+temp[9:17]