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
require("deepspeech"); |
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
from datetime import datetime | |
from glob import glob | |
import os | |
from hyperopt import hp | |
from hyperopt.pyll.base import scope | |
import numpy as np | |
import ray | |
from ray import tune | |
from ray.rllib.agents.dqn import DQNAgent |
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 kotlinx.coroutines.experimental.async | |
import kotlin.coroutines.experimental.CoroutineContext | |
suspend fun <T, R> Iterable<T>.pmap(context: CoroutineContext, transform: suspend (T) -> R): List<R> { | |
return this.map { | |
async(context) { | |
transform(it) | |
} | |
}.map { it.await() } | |
} |
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 android.util.Log; | |
import org.opencv.core.CvType; | |
import org.opencv.core.Mat; | |
import org.opencv.ml.LogisticRegression; | |
public class MLTest { | |
private final static String TAG = MLTest.class.getSimpleName(); | |
MLTest() { |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import sys | |
import math | |
import numpy as np | |
sys.path.append('xgboost/wrapper/') | |
import xgboost as xgb |
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
#!/usr/bin/env coffee | |
API_KEY = 'Your API Key' | |
util = require 'util' | |
path = require 'path' | |
fs = require 'fs' | |
exec = (require 'child_process').exec | |
google = require 'googleapis' | |
cheerio = require 'cheerio' |
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
- (void)displayNSDataAsPlist:(NSData*)data | |
{ | |
NSString *path = [NSTemporaryDirectory() stringByAppendingPathComponent:@"temp.plist"]; | |
[data writeToFile:path atomically:NO]; | |
NSString* str = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; | |
NSLog(@"%@", str); | |
} |
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
// http://yamadarake.web.fc2.com/trdi/2009/report000001.html | |
function calcHubenyDistance(lat1, lon1, lat2, lon2){ | |
var a = 6378137.000; | |
var b = 6356752.314245; | |
var e2= 0.00669437999019758; | |
var y1 = lat1 * Math.PI / 180; | |
var x1 = lon1 * Math.PI / 180; | |
var y2 = lat2 * Math.PI / 180; | |
var x2 = lon2 * Math.PI / 180; |