Skip to content

Instantly share code, notes, and snippets.

View bentan2013's full-sized avatar
🎯
Focusing

ben tan bentan2013

🎯
Focusing
View GitHub Profile
@bentan2013
bentan2013 / drawing_polygon.py
Created August 4, 2022 03:23
drawing 6 areas in Earth
from earth_api import EarthAPI
import re
# get degress, minutes, seconds from string
def get_degress_minutes_seconds(desc_string):
# get degress
degress = desc_string.split('°')[0][2:]
# get minutes
minutes = desc_string.split('°')[1].split('′')[0]
# get seconds
@bentan2013
bentan2013 / readthorg
Created July 24, 2018 02:04
org theme
# -*- mode: org; -*-
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
#+HTML_HEAD: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
#+HTML_HEAD: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
# for python 3.5
import os, sys
import os.path
import shutil
import argparse
import argparse
import os
import sys
import glob
import tempfile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
@bentan2013
bentan2013 / 0_reuse_code.js
Created June 14, 2016 06:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console