This file contains 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
__author__ = "Farid Zakaria" | |
__copyright__ = "Copyright 2011, AMD" | |
__credits__ = ["Sherin Sasidhan ([email protected])"] | |
__license__ = "GPL" | |
__version__ = "1.0." | |
__maintainer__ = "Farid Zakaria" | |
__email__ = "[email protected]" | |
__status__ = "Prototype" | |
import argparse |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am fzakaria on github. | |
* I am fzakaria (https://keybase.io/fzakaria) on keybase. | |
* I have a public key whose fingerprint is B99A 67AA F928 5481 A39C 2470 5E4F AAD7 EECE 4B21 | |
To claim this, I am signing this object: |
This file contains 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
//You'd create this helper AuthoratativePropertilesFileAccessor that would wire in | |
// SqlitePropertiesAccessor. Once it's proven that the test is valid we can simply | |
// delete this class and wire in immediately SqlitePropertiesAccessor | |
public AuthoratativePropertilesFileAccessor implements PropertiesFileAccessor { | |
private final PropertiesFileAccessor authoriative; | |
private final PropertiesFileAccessor test; |
This file contains 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
class SqliteModelAccessor<T> implements ModelStoreAccessor<T> { | |
// Implement interface for a (TEXT, TEXT) SQLite table | |
} | |
@Autowired | |
class SqliteAccessorFactory(ModelResultSetTransformer transformer) { | |
enum PropertyDatabaseFile { | |
EPHEMERAL_DATABASE_FILE, | |
REPLICATED_DATABASE_FILE | |
} |
This file contains 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
console.log('Loading event'); | |
var CLOUDSEARCH_ENDPOINT = < INSERT HERE > | |
var async = require('async'); | |
var jpath = require('json-path') | |
var zlib = require('zlib'); | |
var aws = require('aws-sdk'); | |
var s3 = new aws.S3({ | |
apiVersion: '2006-03-01' | |
}); |
This file contains 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
public class SubsetSum { | |
public static List<List<Integer>> subsetSum( List<Integer> list, int sum) { | |
List<List<Integer>> solutions = new ArrayList<List<Integer>>(); | |
Stack<Integer> solution = new Stack<Integer>(); | |
subsetSum(list, sum,0, solutions, solution); | |
return solutions; | |
} |
This file contains 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
(defn str->int [s] | |
(when-let [d (re-find #"-?\d+" s)] (Integer. d))) | |
(defn vec-remove | |
"remove elem in coll" | |
[coll pos] | |
(vec (concat (subvec coll 0 pos) (subvec coll (inc pos))))) | |
(defn dissoc-in | |
"The purpose of this method is to handle vector indices as well as maps." |
This file contains 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 io.netty.bootstrap.Bootstrap; | |
import io.netty.bootstrap.ServerBootstrap; | |
import io.netty.buffer.ByteBuf; | |
import io.netty.buffer.Unpooled; | |
import io.netty.channel.Channel; | |
import io.netty.channel.ChannelFuture; | |
import io.netty.channel.ChannelFutureListener; | |
import io.netty.channel.ChannelHandlerContext; | |
import io.netty.channel.ChannelInitializer; | |
import io.netty.channel.EventLoopGroup; |
This file contains 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 io.netty.bootstrap.Bootstrap; | |
import io.netty.bootstrap.ServerBootstrap; | |
import io.netty.buffer.ByteBuf; | |
import io.netty.buffer.Unpooled; | |
import io.netty.channel.Channel; | |
import io.netty.channel.ChannelFuture; | |
import io.netty.channel.ChannelFutureListener; | |
import io.netty.channel.ChannelHandlerContext; | |
import io.netty.channel.ChannelInitializer; | |
import io.netty.channel.EventLoopGroup; |
This file contains 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 avformat | |
//#cgo pkg-config: libavformat | |
//#include <libavformat/avformat.h> | |
import "C" | |
import ( | |
"unsafe" | |
) | |
//https://www.ffmpeg.org/doxygen/2.7/structAVFormatContext.html |
OlderNewer