$ cd app-dir
$ ls
Dockerfile ...
$ docker build --tag=$IMAGE_NAME .
This file contains hidden or 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 math | |
| from datetime import datetime | |
| from calendar import timegm | |
| from bottle import (Bottle, HTTPResponse, run, request, response, | |
| json_dumps as dumps) | |
| FUNCTIONS = {'series A': math.sin, 'series B': math.cos} |
This file contains hidden or 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
| from flask import Flask, request | |
| import json | |
| import redis | |
| import subprocess | |
| import time | |
| app = Flask(__name__) | |
| redis_url = "0.0.0.0" |
This file contains hidden or 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
| from flask import Flask, request | |
| import json | |
| import subprocess | |
| import time | |
| app = Flask(__name__) | |
| @app.route('/', methods = ['POST']) | |
| def measure_container(): | |
| req_json = request.get_json() |
This file contains hidden or 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
| from Crypto.PublicKey import RSA | |
| from Crypto import Random | |
| from Crypto.Cipher import PKCS1_OAEP | |
| import base64 | |
| def rsa_encrypt_decrypt(): | |
| key = RSA.generate(2048) | |
| private_key = key.export_key('PEM') | |
| public_key = key.publickey().exportKey('PEM') |
This file contains hidden or 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
| #!/bin/sh | |
| # install npm and node | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash | |
| export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
| nvm install node | |
| # install truffle | |
| npm install -g truffle --silent |
This file contains hidden or 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.5.0 <0.7.0; | |
| contract DocIDContract { | |
| struct Identity { | |
| string firstName; | |
| string lastName; | |
| string dateOfBirth; | |
| string homeAddress; | |
| } |
This file contains hidden or 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
| digraph G { | |
| "401598" [inst="sub rsp, 8", address="0x401598"] | |
| "40159C" [inst="mov rax, qword ptr [rip + 0x2061e5]", address="0x40159C"] | |
| "4015A3" [inst="test rax, rax", address="0x4015A3"] | |
| "4015A6" [inst="je 0x4015ad", address="0x4015A6"] | |
| "4015A8" [inst="call 0x401830", address="0x4015A8"] | |
| "4015AD" [inst="add rsp, 8", address="0x4015AD"] | |
| "4015B1" [inst="ret", address="0x4015B1"] | |
| "4015D0" [inst="jmp qword ptr [rip + 0x2061d2]", address="0x4015D0"] | |
| "4015E0" [inst="jmp qword ptr [rip + 0x2061ca]", address="0x4015E0"] |
This file contains hidden or 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
| func: file format elf64-x86-64 | |
| Disassembly of section .init: | |
| 0000000000401598 <.init>: | |
| 401598: 48 83 ec 08 sub $0x8,%rsp | |
| 40159c: 48 8b 05 e5 61 20 00 mov 0x2061e5(%rip),%rax # 607788 <dlerror@plt+0x205d28> | |
| 4015a3: 48 85 c0 test %rax,%rax |
This file contains hidden or 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
| # implementation of https://github.com/bozhu/AES-Python | |
| def handle(arg): | |
| RegressionMatrix = ( | |
| 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, | |
| 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, | |
| 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15, | |
| 0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75, | |
| 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84, | |
| 0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF, |
NewerOlder