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
(ns lcm.utils.jython | |
"This NS has functionality for interop between jython and clojure" | |
(:require [clojure.tools.logging :as log] | |
[clojure.pprint :refer [pprint]] | |
[slingshot.slingshot :refer [throw+ try+]]) | |
(:import [org.python.core | |
Py | |
JyAttribute | |
PyString | |
PyInteger |
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 threading | |
from _io import _IOBase | |
def create_gc(): | |
io = _IOBase() | |
print io | |
del io | |
t = threading.Timer(0.001, create_gc) | |
t.start() |
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 httplib | |
for i in range(20): | |
conn = httplib.HTTPSConnection("www.python.org") | |
conn.request("GET", "/") | |
r1 = conn.getresponse() | |
print r1.status, r1.reason | |
print i |
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
""" | |
socket_workout is a short script designed to reproduce a socket behavior | |
difference between Jython and CPython. | |
""" | |
import socket | |
import errno | |
import threading | |
import traceback | |
import logging | |
logging.basicConfig(level=logging.DEBUG) |
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
[Nicks-MacBook-Pro:12:39:13 HULK-73-hulk-bundle*] hulk-ui$ time npm install | |
> [email protected] install /Users/nick/workspace/git/hulk/hulk-ui/node_modules/webpack-dev-server/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil | |
> node-gyp rebuild | |
child_process: customFds option is deprecated, use stdio instead. | |
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o | |
SOLINK_MODULE(target) Release/bufferutil.node | |
SOLINK_MODULE(target) Release/bufferutil.node: Finished |
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
Basics | |
scala> val daily = sc.cassandraTable("weathercql", "daily") | |
scala> daily.first() | |
scala> daily.cache() | |
scala> daily.first() | |
scala> daily.first() | |
Explore the data (what possible metrics do I have?) |
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
[Nicks-MacBook-Pro:14:22:15] opscenterd$ python test.py | |
Unable to verify ssl certificate. | |
Received response | |
200 | |
[Nicks-MacBook-Pro:14:22:52] opscenterd$ |