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
#!/usr/bin/env python3 | |
import time | |
from http.server import HTTPServer | |
from http.server import BaseHTTPRequestHandler | |
from zipfile import ZipFile | |
HOST_NAME = 'localhost' | |
PORT_NUMBER = 8000 | |
source = ZipFile('files.zip', 'r') |
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
function add(arr1, arr2) { | |
return arr1.map((x, i) => x + (arr2[i] || 0)); | |
} | |
function mult(arr1, arr2) { | |
return arr1.map((x, i) => x * (arr2[i] || 0)); | |
} | |
function sum(arr) { | |
return arr.reduce((acc, x) => acc + x); |
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
[ | |
{ | |
"name" : "Ace", | |
"gender" : "male", | |
"image" : "https://dodo.ac/np/images/thumb/4/4f/Ace_PG.png/30px-Ace_PG.png", | |
"species" : "bird", | |
"personality" : "jock" | |
}, | |
{ | |
"personality" : "cranky", |
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
<style>body{--b:#0cf;--f:#fff}.d{--b:#009;--f:#ddd;background: gray}x{display:flex;justify-content:center;background:var(--b)}z{color:var(--f)}</style><x><z>wow demo<button onclick="(o=document.body).className=o.className?'':'d'">+ |
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 seq1 = [2, 3]; | |
const seq2 = [2, 3, 5]; | |
const seq3 = [5, 7, 11, 13, 17]; | |
const seq4 = [7, 11, 13, 17, 19, 23, 29]; | |
const length = seq1.length * seq2.length * seq3.length * seq4.length; | |
const p = (seq, i) => seq[i % seq.length]; | |
for (let i = 0; i < length; i++) { |
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
function removeRulesThatApplyTo(element) { | |
for (let sheet of [...document.styleSheets]) { | |
for (let rule of [...sheet.cssRules]) { | |
if (element.matches(rule.selectorText)) { | |
sheet.removeRule([...sheet.cssRules].indexOf(rule)); | |
} | |
} | |
} | |
} |
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
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = "" | |
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO" | |
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO" | |
end | |
end | |
end |
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> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<canvas width="790" height="813">M5314 | |
8098 c-16 -11 -69 -61 -119 -109 -79 -77 -97 -90 -150 -104 -68 -19 -113 | |
-56 -151 -124 -13 -24 -24 -56 -24 -72 0 -15 -9 -54 -21 -85 -17 -46 -25 | |
-55 -40 -51 -30 8 -72 -81 -73 -155 -1 -31 -5 -61 -11 -67 -5 -5 -30 -11 |
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 Cocoa | |
let a: [String: String] = [ | |
"k1": "a1", | |
"k2": "a2", | |
"ka": "a3", | |
] | |
let b: [String: String] = [ | |
"k1": "b1", |
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
function subtract({ [subtract.minuend]: minuend, [subtract.subtrahend]: subtrahend }) { | |
return { | |
[subtract.difference]: minuend - subtrahend | |
}; | |
} | |
subtract.minuend = Symbol('subtract.minuend'); | |
subtract.subtrahend = Symbol('subtract.subtrahend'); | |
subtract.difference = Symbol('subtract.difference'); |