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 | |
app = Flask(__name__) | |
@app.route('/') | |
def hello(): | |
return "Hello World!" | |
if __name__ == '__main__': | |
app.run() |
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
// https://www.npmjs.com/package/base64-arraybuffer | |
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
// Use a lookup table to find the index. | |
const lookup = new Uint8Array(256); | |
for (let i = 0; i < chars.length; i++) { | |
lookup[chars.charCodeAt(i)] = i; | |
} | |
function decode(base64) { |
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 sqlalchemy import create_engine | |
import pandas as pd | |
engine = create_engine( | |
'postgresql://postgres:YOURPASSWORDHERE@*.*.*.*.us-west-2.compute.amazonaws.com:5432/postgres') | |
frame = pd.read_sql('SELECT * FROM my_table LIMIT 10', engine) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<input type="button" value="Test" onclick="OnClickTest();" /> | |
<script id="scriptWorker" type="javascript/worker"> |
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
const fetch = require("node-fetch"); | |
const { TextDecoder } = require(String.raw `util`); | |
let wasm; | |
let WASM_VECTOR_LEN = 0; | |
var path = "https://unpkg.com/[email protected]/dist/9eae6f5a6ee0cd2a3640.module.wasm" | |
fetch(path) | |
.then(function(response) { | |
response.arrayBuffer() | |
.then(function(buffer) { |
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
let wasm; | |
let WASM_VECTOR_LEN = 0; | |
var path = "https://unpkg.com/[email protected]/dist/9eae6f5a6ee0cd2a3640.module.wasm" | |
fetch(path) | |
.then(function(response) { | |
response.arrayBuffer() | |
.then(function(buffer) { | |
WebAssembly.compile(buffer) | |
.then(function(obj) { | |
WebAssembly.instantiate(obj) |
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
version: '3' | |
services: | |
nucypher-alice: | |
command: nucypher alice run --dev --network devnet --teacher-uri 18.222.119.242:9151 | |
environment: | |
- NUCYPHER_SENTRY_LOGS=0 | |
image: nucypher:latest | |
container_name: nucypher-alice | |
ports: |
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
// helper to find Brave in User Agent string | |
function isBraveAgent(userAgentResponse) { | |
var isBraveIndex = ~userAgentResponse.indexOf('Brave') | |
if (isBraveIndex < 0) { | |
return true | |
} | |
return false | |
} | |
// Function from Javarome |
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 json | |
import time | |
import sys | |
import os | |
import base64 | |
import datetime | |
import hashlib | |
import hma | |
from botocore.vendored import requests | |
import boto3 |
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
alert("User Id: "+ jQuery("span.presence.active").attr("data-member-presence")) |