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
""" | |
bson.encode 3.905530183998053 | |
bson.decode 2.354907840999658 | |
orjson.dumps 0.35170182900037616 | |
orjson.loads 1.2572932409966597 | |
pickle.dumps 0.9980631790022017 | |
pickle.loads 1.2438834620043053 | |
""" | |
COUNT = 100000 |
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
""" | |
Results: | |
orig | |
write 21.48s (0.215ms) | |
read x5 24.67s (0.049ms) | |
size 142.30Mb | |
ujson + zlib | |
write 33.79s (0.338ms) |
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
// file: /usr/share/X11/xkb/symbols/se | |
default partial alphanumeric_keys | |
xkb_symbols "basic" { | |
include "latin(type2)" | |
include "se(se)" | |
}; | |
partial alphanumeric_keys |
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
<script> | |
import Button from './button.xht'; | |
// able to create a component/block by JS | |
function Custom($option) { | |
return document.createTextNode('Custom JS-component'); | |
} | |
</script> |
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
<script type="typescript"> | |
let name: string = 'bar'; | |
</script> | |
<h1>Hello {name}!</h1> |
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
<script> | |
let name = ''; | |
let todos = [{name: 'Linux'}, {name: 'Ubuntu', done: true}]; | |
let active; | |
function add() { | |
if(!name) return; | |
todos.push({name}); | |
name = ''; | |
} |
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
<script> | |
const styleDiv = el => { | |
el.style.border = '2px dotted red'; | |
el.style.padding = '8px'; | |
} | |
</script> | |
<div {* styleDiv($element) }> | |
{* $element.textContent = 'inserted text' } | |
</div> |
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
diff --git a/dist/static/index.html b/dist/static/index.html | |
index 889ce60..66c9f93 100644 | |
--- a/dist/static/index.html | |
+++ b/dist/static/index.html | |
@@ -4,10 +4,10 @@ | |
<meta charset='utf-8'> | |
<meta name='viewport' content='width=device-width,initial-scale=1'> | |
<title>Malina.js - import ES modules</title> | |
- <link rel="shortcut icon" href="./malinajs.svg"> | |
- <link rel='stylesheet' href='./global.css'> |
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
<script> | |
import Box from './Box.xht'; | |
</script> | |
<Box class="purple">Purple class</Box> | |
<Box class="green">Green</Box> | |
<style> | |
.purple { |
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
<script> | |
import Child from './Child.xht'; | |
let value = 'text'; | |
const action = (el) => { | |
el.style.backgroundColor = '#b1daf8'; | |
} | |
</script> | |
Value: {value} |
NewerOlder