Skip to content

Instantly share code, notes, and snippets.

View semolex's full-sized avatar
🎯
Focusing

Oleksii Semeshchuk semolex

🎯
Focusing
View GitHub Profile
@semolex
semolex / elevation.ts
Created February 22, 2024 11:16
Node.js - based skeleton of HGT (NASA SRTM) elevation parser
import * as fs from "fs/promises";
import * as path from "path";
const HGT_FILE_ROWS = 3601;
export class ElevationService {
private readonly hgtFilesFolderPath: string;
private cachedTile: { fileName: string; data: Buffer } | null = null;
constructor(hgtFilesFolderPath: string) {
@semolex
semolex / gist:348f60159baee962f58b4c2b67ac0d2e
Created November 15, 2018 09:30 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
# mpc-fetch.py -- fetches properties of all objects that match search params.
# Sample call to retrieve all Near-Earth-Objects with inclination <= 2 degrees
# and eccentricities >= 0.5:
# python mpc-fetch.py neo 1 inclination_max 2.0 eccentricity_min 0.5 > data.xml
# For the list of possible search parameters, browse to:
# http://minorplanetcenter.net/web_service.html
# To get results in JSON format instead of xml, add 'json 1' to parameters.
@semolex
semolex / fetch_and_cache.py
Created March 2, 2018 08:59
Cache separated Pandas columns from Database into Redis
import json
import get_some_redis() # your redis connection
import get_db_connection() # your SQL DB connection (SQLAclhemy etc)
import pandas as pd
TABLE_NAME = 'your_table_name'
cache = get_some_redis()