Skip to content

Instantly share code, notes, and snippets.

View tpmccallum's full-sized avatar

Timothy McCallum tpmccallum

View GitHub Profile
for kfrag in kfrags:
    cfrag = umbral.reencrypt(kfrag, umbral_capsule)
    bob_capsule.attach_cfrag(cfrag)
bob_plaintext = umbral.decrypt(bob_capsule, bob_priv_key, alice_ciphertext, alice_pub_key)
@tpmccallum
tpmccallum / ethereum_vyper_ubuntu_16_04_LTS.md
Created March 2, 2018 23:36
An installation procedure for Vyper using Ubuntu 16.04 LTS

Installing Vyper on Ubuntu 16.04LTS


sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install build-essential libssl-dev libffi-dev
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
tar xfz Python-3.6.2.tgz
cd Python-3.6.2/
@tpmccallum
tpmccallum / helloMessage.md
Last active March 20, 2018 04:34
Example of a high level blockchain language - Ethereum's Vyper

#State variables

helloMessage: public(bytes32)

owner: public(address)

#Constructor

```
#State variables
**helloMessage: public(bytes32)**
owner: public(address)
#Constructor
@public
def __init__(_message: bytes32):
#Sets the message which is passed in at execution
@tpmccallum
tpmccallum / install_eos.md
Last active April 20, 2018 22:30
Ubuntu commands for EOS Dawn 3.0 install

If you have a ~/opt directory full of folders like boost, delete that before commencing the following (rather get everything fresh)

cd ~
git clone https://github.com/EOSIO/eos.git
cd ~/eos
git submodule update --init --recursive
./eosio_build.sh

To make the executable programs available (such as eosiocpp) run the following commands

@tpmccallum
tpmccallum / eos_error.md
Last active April 16, 2018 12:27
EOS error when using eosiocpp -o tim.wasm tim.cpp

tim.cpp:15:64: error: no matching conversion for functional-style cast from 'uint64_t' (aka 'unsigned long long') to 'eosio::name'
       eosio::print( "Hello World: ", eosio::name(code), "->", eosio::name(action), "\n" );
       
       

The cpp file to which the error referrs is below

@tpmccallum
tpmccallum / gist:32b3038a54e6761402b846f6c42aaf5a
Last active April 21, 2018 01:17
install_cybermiles_travis_tesnet_node.md
```
sudo apt-get update
sudo apt-get upgrade
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source $HOME/.gvm/scripts/gvm
gvm install go1.9.2 -B
gvm use go1.9.2 --default
go get github.com/CyberMiles/travis
git checkout master
cd $GOPATH/src/github.com/CyberMiles/travis
@tpmccallum
tpmccallum / ubuntu_18_04_lts_cybermiles_information_sharing.sh
Last active May 12, 2018 01:38
Installing software to share information using decentralised blockchain application
#!/bin/bash
# Please note this is an experimantal installation; for research and development
# This installation must only be carried out on a clean/fresh Ubuntu 18.04 LTS system (and is for research and development purposes only)
#Let's get started
#System preparation Ubuntu 18.04 LTS
cd ~
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y autoremove
@tpmccallum
tpmccallum / vector_testing.cpp
Last active June 3, 2018 07:52
Vector Testing - A gist about using myNewVector.at(int) syntax over myNewVector[int] syntax to ensure range checking is performed
#include <vector>
#include <iostream>
int main(){
//Create a C++ vector
std::cout << "Creating a new vector v" << std::endl;
std::vector<int> v;
//Add the int 1 to the first position (position 0)
std::cout << "Adding 1 to position 0" << std::endl;
v.push_back(1);