Example on how to run locally an AWS Lambda via API Gateway using localstack.
Based on...
| /loop — Detailed Implementation in versions/2.1.71/cli.js | |
| Overview | |
| /loop is a slash command (skill) that schedules a prompt to run on a recurring | |
| interval. It is syntactic sugar over the internal Kairos Cron scheduling | |
| system (CronCreate / CronDelete / CronList tools). | |
| --- |
| // Type definitions for react-table 7 | |
| // Project: https://github.com/tannerlinsley/react-table#readme | |
| // Definitions by: Grsmto <https://github.com/grsmto> | |
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
| // TypeScript Version: 3.0 | |
| declare module 'react-table' { | |
| export type Cell = { | |
| render: (type: string) => any; | |
| getCellProps: () => any; | |
| column: Column; |
| /* | |
| * Usage: | |
| * <PopoverStickOnHover | |
| * component={<div>Holy guacamole! I'm Sticky.</div>} | |
| * placement="top" | |
| * onMouseEnter={() => { }} | |
| * delay={200} | |
| * > | |
| * <div>Show the sticky tooltip</div> | |
| * </PopoverStickOnHover> |
| location /blog/ { | |
| #auth_basic "Restricted"; | |
| #auth_basic_user_file /etc/nginx/.htpasswd; | |
| proxy_pass https://test-blog.bitstarz.com/; | |
| proxy_set_header X-Forwarded-Host $host; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| } |
Example on how to run locally an AWS Lambda via API Gateway using localstack.
Based on...
| from __future__ import absolute_import | |
| from __future__ import division | |
| from __future__ import print_function | |
| from __future__ import print_function | |
| import sys | |
| import numpy as np | |
| import os | |
| import tensorflow as tf |
Current configuration works for my GPU and notebook, hope it helps
It is based on (a different configuration): https://gist.github.com/jganzabal/8e59e3b0f59642dd0b5f2e4de03c7687
and on (multiple choices for different GPU drivers): https://www.tonymacx86.com/threads/nvidia-releases-alternate-graphics-drivers-for-macos-sierra-10-12-6-378-05-05-25.227494/
| pragma solidity ^0.4.0; | |
| import "SafeMath.sol"; | |
| import "IERC20Token.sol"; | |
| /** | |
| * @dev Implements a capped token sale using a second-price auction. | |
| * | |
| * @author Nick Johnson <arachnid@notdot.net> | |
| * |
| /** | |
| * Johannes Zweng <john@zweng.at>, 2017 | |
| * | |
| * This simple script just loads the 2 bancor contracts (Crowdsale and BNT Token) | |
| * into the geth client and then provides a single status function which you | |
| * can call on the geth console to query the current status of the crowdsale. | |
| * | |
| * Usage: | |
| * ------ | |
| * 1) Start geth instance |
| """adapted from https://github.com/OlavHN/bnlstm to store separate population statistics per state""" | |
| import tensorflow as tf, numpy as np | |
| RNNCell = tf.nn.rnn_cell.RNNCell | |
| class BNLSTMCell(RNNCell): | |
| '''Batch normalized LSTM as described in arxiv.org/abs/1603.09025''' | |
| def __init__(self, num_units, is_training_tensor, max_bn_steps, initial_scale=0.1, activation=tf.tanh, decay=0.95): | |
| """ | |
| * max bn steps is the maximum number of steps for which to store separate population stats | |
| """ |