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 asyncio | |
import numpy as np | |
import pandas as pd | |
async def fun2(x): | |
return x * 2 | |
async def main(): | |
df = pd.DataFrame(np.arange(10), columns=['old']) |
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
fn printDefault(c: u8) void { | |
std.debug.print("{c}", .{ c }); | |
} | |
fn animate(buffer: *[]u8, rows: u32, cols: u32, comptime print_fn: fn(u8) void) void { | |
for(0..rows) |dy| { | |
for(0..cols) |dx| { | |
const idx = dy * cols + dx; | |
const pipe_tile = buffer.*[idx]; | |
std.debug.print("\x1B[{d};{d}H", .{ dy, dx }); |
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 std = @import("std"); | |
pub fn main() void { | |
std.log.info("mutable closure:",.{}); | |
runMutDemo(); | |
std.log.info("const closure:",.{}); | |
runConstDemo(); | |
} |
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 { srgb } from "@thi.ng/color"; | |
import type { Color, css } from "@thi.ng/color"; | |
import { randMinMax2 } from "@thi.ng/vectors"; | |
import type { Vec } from "@thi.ng/vectors"; | |
import { repeatedly } from "@thi.ng/transducers"; | |
import { draw } from "@thi.ng/hiccup-canvas"; | |
import type { IToHiccup } from "@thi.ng/api"; | |
const NUM_CELLS = 10; | |
const WIDTH = window.innerWidth; |
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
/* Hide scrollbar for Chrome, Safari and Opera */ | |
.scrollable::-webkit-scrollbar { | |
display: none; | |
} | |
.scrollable { | |
/* Hide scrollbar for IE, Edge and Firefox */ | |
-ms-overflow-style: none; /* IE and Edge */ | |
scrollbar-width: none; /* Firefox */ | |
} |
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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, |
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
;;; javascript-web.el --- Javascript & co. setup | |
;;; Commentary: | |
;; Setup web development tools | |
;;; Code: | |
;;; --- Javascript | |
(use-package indium | |
:ensure t | |
:config | |
(eval-when-compile |
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
/* You can aslo add */ | |
canvas { | |
image-rendering: optimizeSpeed; | |
image-rendering: -moz-crisp-edges; | |
image-rendering: -webkit-optimize-contrast; | |
image-rendering: optimize-contrast; | |
-ms-interpolation-mode: nearest-neighbor; | |
} |
NewerOlder