Skip to content

Instantly share code, notes, and snippets.

from arcpy import da
import os
inTable = arcpy.GetParameterAsText(0)
fileLocation = arcpy.GetParameterAsText(1)
with da.SearchCursor(inTable,['DATA','ATT_NAME']) as cursor:
for row in cursor:
binaryRep = row[0]
fileName = row[1]
(Map.h)
#ifndef HEADER_MAP
#define HEADER_MAP
class Map {
public:
Map(uint8_t walls_bmp[8]);
uint8_t walls[8];
void draw(Adafruit_BicolorMatrix matrix);
};
@TheNotary
TheNotary / bucket_sync_service.rb
Created November 27, 2015 01:24 — forked from bantic/bucket_sync_service.rb
ruby class to copy from one aws s3 bucket to another
require 'aws/s3' # gem name is 'aws-sdk'
class BucketSyncService
attr_reader :from_bucket, :to_bucket, :logger
attr_accessor :debug
DEFAULT_ACL = :public_read
# from_credentials and to_credentials are both hashes with these keys:
# * :aws_access_key_id
def print_triangle(size)
print_top_row_of_triangle(size)
return if size <= 1
print_middle_section_of_triangle(size)
print_bottom_of_triangle(size)
end
def print_triangle(size)
print_top_row_of_triangle(size)
return if size <= 1
print_middle_section_of_triangle(size)
print_bottom_of_triangle(size)
end
module RubyBBCode
def self.parse_youtube_id(url)
#url = "http://www.youtube.com/watch?v=E4Fbk52Mk1w"
url =~ /[vV]=([^&]*)/
id = $1
if id.nil?
module RubyBBCode
class TagInfo
def initialize(tag_info, tags)
@tag_data = find_tag_info(tag_info)
@tags = tags
@tag = @tags[@tag_data[:tag].to_sym] unless @tag_data[:tag].nil?
end
def [](key)
@tag_data[key]
module RubyBBCode
class TagInfo
def initialize(tag_info, tags)
@tag_data = find_tag_info(tag_info)
@tags = tags
@tag = @tags[@tag_data[:tag].to_sym] unless @tag_data[:tag].nil?
end
def [](key)
@tag_data[key]
module RubyBBCode
class TagInfo
def initialize(tag_info, tags)
@tag_data = find_tag_info(tag_info)
@tags = tags
@tag = @tags[@tag_data[:tag].to_sym] unless @tag_data[:tag].nil?
end
def [](key)
@tag_data[key]
module RubyBBCode
class TagInfo
def initialize(tag_info, tags)
@tag_data = find_tag_info(tag_info)
@tags = tags
@tag = @tags[@tag_data[:tag].to_sym] unless @tag_data[:tag].nil?
end
def [](key)
@tag_data[key]