These are my notes while installing jupyterhub on an AWS EC2 instance running Ubuntu 16.04
Prerequisites
- install python3, pip3
sudo apt-get update && sudo apt-get install python3 python3-pip
-
- ~~~`pip3 install pew`~~~
-
-
These are my notes while installing jupyterhub on an AWS EC2 instance running Ubuntu 16.04
Prerequisites
sudo apt-get update && sudo apt-get install python3 python3-pip
- ~~~`pip3 install pew`~~~
license: gpl-3.0 | |
height: 600 |
Generating a graphviz dot file equivalent to the mol file of pred(3)
in chemlambda v2: pred_3.mol (original name was erroneous)
The lambda calculus expression for pred(3)
(predecessor(3) == 2
) is PRED := λn.λf.λx.n (λg.λh.h (g f)) (λu.x) (λu.u)
(ref wikipedia)
Writing the above expression as nodes in a graph leads to the below graph. The corresponding dot file was written manually and available further below in this gist. An annotated version of pred_3.mol
to help compare it to pred_3.dot
is available further below in this gist.
To generate the dot file automatically from lambda terms, check http://www.teamshadi.net/chemlambda-js/ (a fork from this jsfiddle ). Its current output for pred(3)
matches with the manually specified graph below.
Version 4 (2019-04-11): shifted indeces back by 1 (e.g. L1 to L0) t
The below is an ackermann function implementation in awk based on the one on rosettacode.org and modified for higher verbosity to illustrate the details of calculations behind the ackermann function's recursion.
For example, the following shows Ackermann(2,2)
> awk -v m=2 -v n=2 -f ackermann_illustrated.awk
# Based on the below answer on the SO question: | |
# In a Django form, how do I make a field readonly (or disabled) so that it cannot be edited? | |
# https://stackoverflow.com/a/15134622/4126114 | |
# | |
# Usage of either widget classes below: | |
# class MyForm(forms.ModelForm): | |
# class Meta: | |
# widgets = { | |
# 'field': ReadOnlyWidgetSimple(), | |
# 'foreign_key': ReadOnlyWidgetMyModel() |
#!/bin/bash | |
# from https://raw.githubusercontent.com/golemfactory/golem/develop/Installer/Installer_Linux/install.sh | |
# Usage: bash spinner.sh | |
spin='⡄⡆⡇⠇⠃⠋⠉⠙⠘⠚⠒⠖⠆⠦⠤⢤⢠⣠⣀⣄' | |
printf "hey there .. working " | |
while true | |
do |
Instructions
cargo new test-rustgym-longestcommonprefix
cd test-rustgym-longestcommonprefix
cargo test
// Based on https://github.com/redox-os/orbtk/blob/a9653954fed7275328bc8e893c3465506154571e/examples/clear.rs | |
// Modified to add a trait member called "summary" which is either implemented as a Book or a NewsArticle | |
// The summarize button would call the trait function "summarize" (be it from Book or NewsArticle). | |
// I couldn't get this to work yet, with the troubling sections marked with FIXME | |
use orbtk::prelude::*; | |
//--------------------------------------- | |
// https://doc.rust-lang.org/1.30.0/book/second-edition/ch10-02-traits.html | |
pub trait Summary { |