I hereby claim:
- I am alanzchen on github.
- I am alanchen (https://keybase.io/alanchen) on keybase.
- I have a public key ASCTAEcX1pPYgMKi4hFzuLuFb-Hd5S0QIuYbiofxtipRnQo
To claim this, I am signing this object:
| //First, we'll require the 'http' library to use later for calling a 3rd party webservice | |
| var http = require("http"); | |
| //Getting parameters from the request body. For a nested json, we only want the first one. | |
| try { | |
| var parameters = JSON.parse(request.rawBody); | |
| parameters = parameters[0] | |
| var ip = parameters.ip; | |
| var email = parameters.email; |
I hereby claim:
To claim this, I am signing this object:
| # coding: utf-8 | |
| #r = 8 | |
| # p is a probability constructed in the following way: | |
| # node position: 0-0 0-1 0-2 1-0 1-1 1-2 2-0 2-1 2-2 | |
| # probability: 1/16 1/8 1/16 1/8 1/4 1/8 1/16 1/8 1/16 | |
| # so we have 8 nodes here, and the output will be a way such that the probability is stationary. | |
| p = [0.0625 ,0.1250 ,0.0625 ,0.1250 ,0.2500 ,0.1250,0.0625 ,0.1250 ,0.0625] | |
| #p = [0.5, 0.33333333, 0.166666667] |
| from flask import Flask, request, jsonify | |
| import json | |
| from hashlib import sha256 | |
| from datetime import datetime | |
| from glob import glob | |
| import os | |
| app = Flask(__name__) | |
| SECRET = "some_random_string" |
| # | |
| # Worksheet A | |
| # | |
| # This worksheet is also a Python program. Your task is to read the | |
| # task descriptions below and then write one or more Python statements to | |
| # carry out the tasks. There's a Python "print" statement before each | |
| # task that will display the expected output for that task; you can use | |
| # this to ensure that your statements are correct. | |
| # |