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
// Calling Function from Above the function defination | |
Foo1(); | |
function Foo1(){ | |
console.log("Inside Foo1"); | |
} | |
// Calling Function from Below the function defination | |
Foo1(); |
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
// Calling Function from Above the function defination | |
Foo2(); | |
var Foo2 = function (){ | |
console.log("Inside Foo1"); | |
} | |
// Calling Function from Below the function defination | |
Foo2(); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Contact Form</title> | |
</head> | |
<body> | |
<script> | |
let $body = document.getElementsByTagName('body')[0]; |
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 Statements | |
# Core python imports | |
import datetime | |
import json | |
import os | |
import shutil | |
import base64 | |
import msgpack | |
import maya |
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
# I just made a simple change in this function, which is making cache=True over here in the function defination | |
def retrieve(self, message_kit, data_source, alice_verifying_key, label, cache=True): | |
print("changed") | |
# Try our best to get an UmbralPublicKey from input | |
alice_verifying_key = UmbralPublicKey.from_bytes(bytes(alice_verifying_key)) | |
capsule = message_kit.capsule # TODO: generalize for WorkOrders with more than one capsule | |
hrac, map_id = self.construct_hrac_and_map_id(alice_verifying_key, label) | |
_unknown_ursulas, _known_ursulas, m = self.follow_treasure_map(map_id=map_id, block=True) |
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
Ursula - nucypher ursula run --dev --federated-only | |
Alice - nucypher alice run --dev --federated-only --teacher 127.0.0.1:10151 | |
Bob - nucypher bob run --dev --federated-only --teacher 127.0.0.1:10151 --controller-port 4000 | |
Enrico - nucypher enrico run --policy-encrypting-key <Key from Policy Creation> --http-port 5000 | |
Create Policy - | |
POST | |
localhost:8151/derive_policy_encrypting_key/<Label> |
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 express = require("express"); | |
const app = express(); | |
const Web3 = require("web3"); | |
const abi = [ | |
{ | |
constant: false, | |
inputs: [], | |
name: "emitEvent", | |
outputs: [], |
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
[{"constant":true,"inputs":[],"name":"getTotalApprovalRequests","outputs":[{"name":"total","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"getNumberOfSpendings","outputs":[{"name":"numSpendings","type":"uint256"},{"name":"numSpendingsOpen","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"index","type":"uint256"},{"name":"to","type":"address"},{"name":"amount","type":"uint256"},{"name":"receipt","type":"string"},{"name":"isOpen","type":"bool"}],"name":"spendDonations","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"getCampaign","outputs":[{"name":"campaignName","type":"string"},{"name":"owner","type":"address"},{"name":"supportingDocuments","type":"string"},{"name":"totalDonations","type":"uint256[4]"},{"name":"times","type":"uint256[2]"},{"name" |
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
/** | |
* @author Arvind Kalra <[email protected]> | |
* @profile https://github.com/arvindkalra | |
* @date 08/08/20 | |
*/ | |
import axios from "axios"; | |
import _ from "lodash"; | |
const reqFunctions = { |