[ Launch: Hexagon ] 70bc5e998c801cbf03e5 by NoahMarconi
This file contains 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
# Report | |
## Gas Optimizations | |
| |Issue|Instances| | |
|-|:-|:-:| | |
| [GAS-1](#GAS-1) | Use `selfbalance()` instead of `address(this).balance` | 10 | | |
| [GAS-2](#GAS-2) | Use assembly to check for `address(0)` | 44 | |
This file contains 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
const MetaCoin = artifacts.require("MetaCoin"); | |
const SafeMath = artifacts.require("SafeMath"); | |
const mode = process.env.MODE; | |
let metaCoinInstance; | |
let safeMathInstance; | |
contract("MetaCoin", accounts => { |
This file contains 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
pragma solidity ^0.4.24; | |
pragma experimental ABIEncoderV2; | |
contract ABIExample { | |
enum Permission { ReadOnly, Write, Admin } | |
struct User { | |
uint256 id; |
This file contains 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
pragma solidity ^0.4.24; | |
pragma experimental ABIEncoderV2; | |
contract ABIExample { | |
enum Permission { ReadOnly, Write, Admin } | |
struct User { | |
uint256 id; |
This file contains 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
Verifying my Blockstack ID is secured with the address 133xJqzjTTm3wpNeMS34tfdFENYteAAB1z https://explorer.blockstack.org/address/133xJqzjTTm3wpNeMS34tfdFENYteAAB1z |
This file contains 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
import org.apache.spark.sql._ | |
import org.apache.spark.sql.functions._ | |
import org.graphframes._ | |
// Load from shared location. | |
val nodes = spark.sqlContext.read.load("/mnt/hackondata/wattpadNodes.parquet") | |
val edges = spark.sqlContext.read.load("/mnt/hackondata/wattpadEdges.parquet") | |
// Filter graphs. | |
val gTotal = GraphFrame(nodes, edges) |
This file contains 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
import org.apache.spark.sql.functions._ | |
// Construct nodes table. | |
val newColNames = List( | |
"age", | |
"gender", | |
"has_atleast_three_reading_lists", | |
"has_profile_picture", | |
"id", | |
"is_author", |
This file contains 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
# jdk8 setup | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
java -version | |
sudo apt-get install oracle-java8-set-default | |
wget http://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz |
This file contains 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 r | |
# | |
# run-r handler for Hook.io R runtime. | |
# | |
# Copyright (C) 2016 Noah Marconi | |
# | |
# Released under MIT | |
doc <- "Usage: run-r [-c CODE] [-e ENVIRONMENT] [-s SERVICE] |
NewerOlder