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
{-# LANGUAGE ForeignFunctionInterface #-} | |
module Geometry where | |
import Foreign.C.Types | |
import Foreign.C.String | |
add :: Num a => a -> a -> a | |
add x y = x + y | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python | |
""" | |
Simple demonstration of a aiohttp <-> Jupyter kernel gateway communication. | |
before running this script, the jupyter kernel gateway should be started with: | |
$ jupyter kernelgateway --JupyterWebsocketPersonality.list_kernels=True | |
""" | |
import aiohttp |
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
#!/usr/bin/env bash | |
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT | |
echo -e "\n==== START GATEWAY ====" | |
jupyter kernelgateway --JupyterWebsocketPersonality.list_kernels=True & | |
sleep 3 | |
echo -e "\n==== PING GATEWAY API ====" |
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
# Modified from: | |
# Copyright (c) Jupyter Development Team. | |
# Distributed under the terms of the Modified BSD License. | |
""" | |
Custom personality for the jupyter kernel gateway. | |
This personality adds a custom handler under: | |
localhost:xxxx/MyHandler | |
To start the kernel gateway with the custom personality, execute |
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
gistup |
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
gistup |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
bertTfHubModule = builtins.fetchTarball { | |
url="https://tfhub.dev/google/bert_multi_cased_L-12_H-768_A-12/1?tf-hub-format=compressed"; | |
sha256="sha256:01svqqhs4jlpi0lax3kr4cj43kfjvvvzlhd2gkb61849hish3qk3"; | |
}; | |
googleBertSrc = pkgs.fetchFromGitHub { | |
owner = "google-research"; | |
repo = "bert"; |
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.0' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.1 | |
container_name: elasticsearch | |
environment: | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: | |
memlock: | |
soft: -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
gistup |