Download CMake from: https://cmake.org/download/
wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz
tar zxvf cmake-3.*
| <# | |
| - BIOS of host machine also needs to be configured to allow hardware virtualization | |
| - Windows 10 Pro or otherwise is needed; Windows 10 Home Edition CANNOT get WSL | |
| - This gist WSLv2, but can use WSLv1 instead. I needed v1 as I run Windows 10 in a VM in Virtualbox. | |
| - WSLv2 has been giving me problems in Virtualbox 6.1, but WSLv1 works properly. | |
| - vbox has issues with the GUI settings when it comes to nested virtualization on certain systems, | |
| so run the following if needing to give a VM this enabled setting: | |
| VBoxManage modifyvm <vm-name> --nested-hw-virt on | |
| #> |
wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz
tar zxvf cmake-3.*
| import graphql | |
| # build_executable schema | |
| # | |
| # accepts schema_definition (string) and resolvers (object) in style of graphql-tools | |
| # returns a schema ready for execution | |
| def build_executable_schema(schema_definition, resolvers): | |
| ast = graphql.parse(schema_definition) | |
| schema = graphql.build_ast_schema(ast) |
This gist contains out.tex, a tex file that adds a PDF outline ("bookmarks") to the freely available pdf file of the book
The Elements of Statistical Learning (2nd ed), by Trevor Hastie, Robert Tibshirani, and Jerome Friedman
https://web.stanford.edu/~hastie/ElemStatLearn/
The bookmarks allow to navigate the contents of the book while reading it on a screen.
| """Script to illustrate usage of tf.estimator.Estimator in TF v1.3""" | |
| import tensorflow as tf | |
| from tensorflow.examples.tutorials.mnist import input_data as mnist_data | |
| from tensorflow.contrib import slim | |
| from tensorflow.contrib.learn import ModeKeys | |
| from tensorflow.contrib.learn import learn_runner | |
| # Show debugging output |
| import java.time.Instant | |
| import java.time.format.DateTimeFormatter | |
| import java.util.concurrent.ConcurrentLinkedQueue | |
| import sangria.ast._ | |
| import sangria.execution._ | |
| import sangria.schema.Context | |
| import sangria.marshalling.queryAst._ | |
| import sangria.renderer.SchemaRenderer |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutationReference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
| /* | |
| * Functional Programming in JavaScript | |
| * Chapter 01 | |
| * Magical -run- function in support of Listing 1.1 | |
| * Author: Luis Atencio | |
| */ | |
| // -run- with two functions | |
| var run2 = function(f, g) { | |
| return function(x) { | |
| return f(g(x)); |
Docker does not run natively on OSX, only Linux. Docker Machine was created to add a Linux VM environment to run Docker containers on OSX. Install using Homebrew:
brew install docker
brew install docker-machine
docker-machine create