Skip to content

Instantly share code, notes, and snippets.

View AlexArcPy's full-sized avatar

Alexey Tereshenkov AlexArcPy

View GitHub Profile
@rjzak
rjzak / PyUtils.cpp
Last active May 15, 2024 21:06
Convert between Python list/tuples and C++ vectors
#include <Python.h> // Must be first
#include <vector>
#include <stdexcept>
#include "PyUtils.h"
using namespace std;
// =====
// LISTS
// =====
@scw
scw / example-toolbox.py
Created June 11, 2013 00:31
Example showing how to create categories within a Python toolbox.
import arcpy
class Toolbox(object):
def __init__(self):
self.label = u'Example_Toolbox'
self.alias = ''
self.tools = [FirstTool, SecondTool, ThirdTool]
class FirstTool(object):
@jwass
jwass / convert.py
Created August 10, 2013 21:13
Simple script used to convert some shapefiles to GeoJSON, leaving out a few undesired properties. Requires shapely 1.2.18.
import functools
import fiona
import geojson
import pyproj
import shapely.geometry
import shapely.ops
omit = ['SHAPE_AREA', 'SHAPE_LEN']
@sloria
sloria / bobp-python.md
Last active November 14, 2024 15:01
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@kjordahl
kjordahl / citibike.ipynb
Last active February 16, 2017 03:13
Citibike data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kjordahl
kjordahl / Geocoding.ipynb
Created November 9, 2013 17:01
GeoPandas geocoding example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kjordahl
kjordahl / GeoDataFrame.ipynb
Created November 9, 2013 17:01
working with GeoDataFrames in GeoPandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kjordahl
kjordahl / GeoSeries.ipynb
Created November 9, 2013 17:02
Working with GeoSeries in GeoPandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrkline
mrkline / c_sharp_for_python.md
Last active September 2, 2024 15:51
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • Single-line comments are started with //. Multi-line comments are started with /* and ended with */.

  • C# uses braces ({ and }) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,

@jiffyclub
jiffyclub / assert_frames_equal.ipynb
Last active October 27, 2020 17:02
Example of a function to compare two DataFrames independent of row/column ordering and with handling of null values.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.