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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>new notebook - iodide</title> | |
<link rel="stylesheet" type="text/css" href="iodide.dev.css"> | |
</head> | |
<body> | |
<script id="jsmd" type="text/jsmd"> | |
%% meta | |
{ |
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"> | |
<title>untitled - iodide</title> | |
<link rel="stylesheet" type="text/css" href="iodide.dev.css"> | |
</head> | |
<body> | |
<script id="jsmd" type="text/jsmd"> | |
%% meta |
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
function go() { | |
function test() { | |
// This is a distillation of what emscripten's UTF8String does in the case of long strings. | |
// Commenting out these four lines causes the test to pass. | |
// It is important that the input string buffer is on the Wasm heap. If it's just a | |
// Javascript-allocated buffer, everything works fine. | |
var ptr = example._get_string(); | |
var bytes = new Uint8Array(example.HEAPU8.buffer, ptr, 5); | |
var jsval = new TextDecoder('utf-8').decode(bytes); | |
console.log("Got string " + jsval); |
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"> | |
<script src="https://code.jquery.com/jquery-latest.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/jquery.terminal.min.js"></script> | |
<link href="https://cdn.jsdelivr.net/npm/jquery.terminal/css/jquery.terminal.min.css" rel="stylesheet"/> | |
<script src="https://iodide.io/pyodide-demo/pyodide.js"></script> | |
</head> | |
<body> |
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 time: 1000 | 1000 | _hashlib | |
import time: 0 | 0 | _md5 | |
import time: 0 | 0 | _sha1 | |
import time: 1000 | 1000 | _sha256 | |
import time: 0 | 0 | _sha512 | |
import time: 0 | 0 | _blake2 | |
import time: 1000 | 1000 | _sha3 | |
import time: 5000 | 8000 | hashlib | |
import time: 0 | 0 | _bisect | |
import time: 4000 | 4000 | bisect |
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 PHP_MODULE = 'https://oraoto.github.io/pib/php.js' | |
const loadResource = url => new Promise((resolve) => { | |
const head = document.getElementsByTagName('head')[0] | |
const theScript = document.createElement('script') | |
console.log("window.PHP " + window.PHP) | |
theScript.src = url; | |
theScript.onload = () => { |
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
{ | |
"languageId": "mermaid", | |
"displayName": "Mermaid diagram", | |
"url": "https://gist.githubusercontent.com/wlach/2fbe93ee57b0acb87bf69cdb1488ccd0/raw/044d75169be301aa0116e1e64c6921ce9f3ec855/mermaidplugin.js", | |
"module": "mermaidPlugin", | |
"evaluator": "evaluateMermaid", | |
"pluginType": "language" | |
} |
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
# Look for problematic ordering of events in Glean events pings | |
import codecs | |
import gzip | |
import json | |
import sys | |
results = json.load(open(sys.argv[-1], "r")) | |
total = 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
#!/bin/env python | |
import sys | |
import inflection | |
content = sys.stdin.read() | |
content = content.replace("Kotlin", "Java") | |
kotlin_lines = content.split("\n") |
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 os | |
import sys | |
original_modules = dict(sys.modules) | |
import pandas | |
sizes = {} | |
total = 0 | |
files = set() |