Skip to content

Instantly share code, notes, and snippets.

View vickumar1981's full-sized avatar

Vic Kumar vickumar1981

View GitHub Profile
def setupRiakClient(config: Config): RiakClient = {
val maxConnections = config.getInt(RiakMaxConnections)
val port = config.getInt(RiakPort)
val hosts = config.getStringList(RiakHosts)
val builder = new RiakNode.Builder()
.withMaxConnections(maxConnections)
.withRemotePort(port)
var addresses: java.util.List[String] = new java.util.ArrayList[String]()
private def toJSData = newAnonymousJsFunction(
"""
|function(riakObject) {
| var d = riakObject.values[0].data;
| return [d];
|}
""".stripMargin)
def findByIndex (indexName: String, indexValue: String): List[T] = {
val mr = new IndexMapReduce.Builder()
Problem accessing /sessions. Reason:
com.basho.riak.client.core.netty.RiakResponseException: Error processing incoming message: error:function_clause:[{riak_index,
parse_binary,
[{struct,
[{<<"value">>,
<<"dHJ1ZQ==">>}]}],
[{file,
"src/riak_index.erl"},
{line,535}]},
version: "2"
services:
agreement_database:
build: ./docker/apps/agreement_database/
ccdb-content:
build: ./docker/apps/ccdb-content/
college-costs:
build: ./docker/apps/college-costs/
django-college-cost-comparison:
# Class: cfpb_jenkins
#
#
class cfpb_jenkins (
$mailhost = undef,
) {
include java::openjdk8
include epel
include git
> zappa tail
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
[1495490287800] Traceback (most recent call last):
[1495490287800] File "/var/runtime/awslambda/bootstrap.py", line 226, in handle_event_request
[1495490287800] result = request_handler(json_input, context)
[1495490287800] File "/var/task/handler.py", line 484, in lambda_handler
[1495490287800] return LambdaHandler.lambda_handler(event, context)
[1495490287800] File "/var/task/handler.py", line 240, in lambda_handler
[1495490287800] handler = cls()
`_____________________________________________________ test_serve_schema ______________________________________________________
def test_serve_schema():
response = client.get('/schema/')
codec = CoreJSONCodec()
> document = codec.decode(response.content)
tests/test_apischema.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.5/site-packages/coreapi/codecs/corejson.py:306: in decode
package bootstrap.liftweb
import net.liftweb.common.Loggable
import net.liftweb.util.{LoggingAutoConfigurer, Props}
import org.eclipse.jetty.server.{HttpConfiguration, HttpConnectionFactory, Server, ServerConnector}
import org.eclipse.jetty.webapp.WebAppContext
import scala.util.Properties
object Start extends App with Loggable {
@vickumar1981
vickumar1981 / ocr-test.py
Created October 8, 2017 03:30
ocr text bold example
from PIL import Image
from pytesseract import image_to_string
if __name__ == "__main__":
img = Image.open("license.jpg")
img = img.convert("RGBA")
pixdata = img.load()
# Make the letters bolder for easier recognition
for y in xrange(img.size[1]):
import signal
import sys
import asyncio
import aiohttp
import json
loop = asyncio.get_event_loop()
client = aiohttp.ClientSession(loop=loop)
async def get_json(client, url):