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
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]() |
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
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() |
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
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}]}, |
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
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: |
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
# Class: cfpb_jenkins | |
# | |
# | |
class cfpb_jenkins ( | |
$mailhost = undef, | |
) { | |
include java::openjdk8 | |
include epel | |
include git |
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
> 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() |
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
`_____________________________________________________ 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 |
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 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 { |
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
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]): |
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 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): |
OlderNewer