This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Git filter to ignore lines in your files. | |
| # | |
| # Copyright (c) 2017-2019 Aryel Mota Góis <aryel.gois@gmail.com> | |
| # | |
| # MIT License | |
| # | |
| # | |
| # SETUP: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from shapely.geometry import Point | |
| from functools import partial | |
| from shapely.ops import transform | |
| import pyproj | |
| def buffer_in_meters(lng, lat, radius): | |
| proj_meters = pyproj.Proj(init='epsg:3857') | |
| proj_latlng = pyproj.Proj(init='epsg:4326') | |
| project_to_meters = partial(pyproj.transform, proj_latlng, proj_meters) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fiona | |
| import geopandas as gpd | |
| # Enable fiona driver | |
| gpd.io.file.fiona.drvsupport.supported_drivers['KML'] = 'rw' | |
| # Read file | |
| df = gpd.read_file(path, driver='KML') | |
| # Write file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| from pprint import pformat, pprint | |
| import logging | |
| class PasswordMaskingFilter(logging.Filter): | |
| """Demonstrate how to filter sensitive data:""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.segra; | |
| /** | |
| * | |
| */ | |
| public class Main { | |
| public static void main(String[] args) { | |
| // create the command line parser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.commons.cli.* | |
| class App(args: Array<String>) { | |
| var cliOptions: Options | |
| var cliParser: DefaultParser | |
| init { | |
| cliOptions = Options() | |
| setupOptions() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Encrypt the repository | |
| # Remove/modify this line if the repository is meant to be open-source | |
| *.* filter=git-crypt diff=git-crypt | |
| .gitattributes !filter !diff | |
| # These files are text and should be normalized (Convert crlf => lf) | |
| *.php text | |
| *.css text | |
| *.js text | |
| *.htm text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A python program to create user-defined exception | |
| # class MyError is derived from super class Exception | |
| class MyError(Exception): | |
| # Constructor or Initializer | |
| def __init__(self, value): | |
| self.value = value | |
| # __str__ is to print() the value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import contextlib | |
| import os | |
| import shutil | |
| import tempfile | |
| @contextlib.contextmanager | |
| def cd(newdir, cleanup=lambda: True): | |
| prevdir = os.getcwd() | |
| os.chdir(os.path.expanduser(newdir)) | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import absolute_import, division, print_function, unicode_literals | |
| import sqlite3 | |
| import logging | |
| import time | |
| __version__ = "0.1.0" | |
| initial_sql = """CREATE TABLE IF NOT EXISTS log( |
NewerOlder