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 | |
| ############################################################################### | |
| # $Id$ | |
| # | |
| # Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
| # Global Map Tiles Classes | |
| # Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
| # generate a simple HTML viewers based on Google Maps and OpenLayers | |
| # Author: Klokan Petr Pridal, klokan at klokan dot cz | |
| # Web: http://www.klokan.cz/projects/gdal2tiles/ |
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
| (ns cascalog-repl.core | |
| "An example of consuming an HBase tap from Cascalog. First, create and | |
| populate the table: | |
| $ hbase shell | |
| > create 't1', 'f1' | |
| > put 't1', 'TheRealMT', 'f1:user', 'Mark Twain' | |
| > put 't1', 'TheRealMT', 'f1:email', 'samuel@clemens.org' | |
| > put 't1', 'TheRealMT', 'f1:pass', 'abc123' | |
| > put 't1', 'GrandpaD', 'f1:user', 'Fyodor Dostoyevsky' |
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 | |
| import io | |
| import mapnik | |
| from shapely.geometry import box, MultiPoint | |
| class SimpleDatasource(mapnik.PythonDatasource): | |
| def __init__(self): |
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
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
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 bufperf; | |
| import sun.nio.ch.DirectBuffer; | |
| import java.lang.reflect.Field; | |
| import java.nio.Buffer; | |
| import java.nio.ByteBuffer; | |
| public class DirectByteBufferUtils { | |
| static final Field buffer_address; |
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 | |
| # | |
| # parse the log output produced by IntegrationTestRegionReplicaPerf to | |
| # collect the latency data from each client thread. Works on some build of | |
| # 0.98 + region replicas. | |
| # | |
| import fileinput | |
| import re |
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
| /* | |
| * Before and after examples based on extracts from the UserDAO in HBase In Action | |
| * https://github.com/hbaseinaction/twitbase/blob/master/src/main/java/HBaseIA/TwitBase/hbase/UsersDAO.java | |
| */ | |
| // | |
| // Using raw byte[]'s directly. | |
| // | |
| private static Put mkPut(User u) { |
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
| # in local sandbox: | |
| ## check compatibility report | |
| git checkout master | |
| GETOPT=/usr/local/Cellar/gnu-getopt/1.1.6/bin/getopt ./dev-support/check_compatibility.sh -r https://git-wip-us.apache.org/repos/asf/hbase.git 1.1.0 branch-1.1 | |
| open open dev-support/target/compatibility/report/1.1.0_branch-1.1_compat_report.html | |
| ## verify src tgz builds (this one is fragile) |
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.flink.api.common.functions.FlatMapFunction; | |
| import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; | |
| import org.apache.flink.streaming.api.functions.sink.SinkFunction; | |
| import org.apache.flink.streaming.util.StreamingMultipleProgramsTestBase; | |
| import org.junit.Before; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import org.junit.rules.TestName; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.Parameterized; |
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
| /** Use an {@link OutputFormat} in place of a {@link SinkFunction}. */ | |
| public class OutputFormatAdapter<T> extends RichSinkFunction<T> implements InputTypeConfigurable { | |
| private final OutputFormat<T> delegate; | |
| private final RichOutputFormat<T> richDelegate; | |
| public OutputFormatAdapter(OutputFormat<T> delegate) { | |
| this.delegate = delegate; | |
| this.richDelegate = (this.delegate instanceof RichOutputFormat) | |
| ? (RichOutputFormat<T>) delegate |