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 | |
| # An exponential backoff around Boto3 DynamoDB, whose own backoff eventually | |
| # fails on long multipage scans. We'd like to use this as a wrapper somehow, | |
| # see: https://gist.github.com/numberoverzero/cec21b8ca715401c5662 | |
| from time import sleep | |
| import boto3 | |
| from boto3.dynamodb.conditions import Attr |
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 arcpy | |
| import pandas as pd | |
| def arcgis_table_to_df(in_fc, input_fields=None, query=""): | |
| """Function will convert an arcgis table into a pandas dataframe with an object ID index, and the selected | |
| input fields using an arcpy.da.SearchCursor. | |
| :param - in_fc - input feature class or table to convert | |
| :param - input_fields - fields to input to a da search cursor for retrieval | |
| :param - query - sql query to grab appropriate values | |
| :returns - pandas.DataFrame""" |
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
| /** | |
| * Rotates coordinate system for velocities | |
| * | |
| * Takes velocities and alters them as if the coordinate system they're on was rotated | |
| * | |
| * @param Object | velocity | The velocity of an individual particle | |
| * @param Float | angle | The angle of collision between two objects in radians | |
| * @return Object | The altered x and y velocities after the coordinate system has been rotated | |
| */ |
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
| // BrowserRouter is the router implementation for HTML5 browsers (vs Native). | |
| // Link is your replacement for anchor tags. | |
| // Route is the conditionally shown component based on matching a path to a URL. | |
| // Switch returns only the first matching route rather than all matching routes. | |
| import { | |
| BrowserRouter as Router, | |
| Link, | |
| Route, | |
| Switch, | |
| } from 'react-router-dom'; |