Skip to content

Instantly share code, notes, and snippets.

View arunsah's full-sized avatar

Arun arunsah

  • India
View GitHub Profile
@BrianHung
BrianHung / SyntaxHighlight.js
Last active April 25, 2021 08:53
ProseMirror Plugin for CodeBlock Decorations
import { Plugin, PluginKey, Extension } from 'tiptap'
import { Decoration, DecorationSet } from 'prosemirror-view'
import { findBlockNodes } from 'prosemirror-utils'
import CodeMirror from 'codemirror/addon/runmode/runmode.node.js';
import "codemirror/mode/meta";
/*
* Global set of CodeMirror languages to dynamically import.
*/
@BrianHung
BrianHung / MathBlock.css
Last active February 19, 2025 09:20
MathBlock NodeView for TipTap
.ProseMirror .MathBlock pre {
background: var(--default-back);
color: rgb(var(--default-font));
font-size: 0.8em;
display: flex;
padding: 1em;
}
.ProseMirror .MathBlock {
display: flex;
@BrianHung
BrianHung / Math.css
Last active October 30, 2022 04:58
Math NodeView for TipTap
.ProseMirror .Math {
display: contents;
}
.ProseMirror .Math .katex-editor {
display: inline;
}
.ProseMirror .Math .katex-render .katex {
font-size: 1em;
@underground
underground / indexedDB.js
Created September 6, 2016 01:42
Very simple indexed DB wrapper class for javascript
export default class IndexedDB {
constructor(dbName, dbVersion, stores) {
this.db;
this.dbName = dbName;
this.dbVersion = dbVersion;
this.stores = stores;
}
openDB(callback=(()=>{})) {
if (!window.indexedDB) {
import numpy as np
from sklearn.datasets import make_moons
from sklearn.cross_validation import train_test_split
n_feature = 2
n_class = 2
def make_network(n_hidden=100):
@ognis1205
ognis1205 / walkers-algorithm-with-canvas.js.html
Last active October 27, 2020 01:00
Javascript Implementation of Walkers Algorithm
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">
<title>TEST</title>
</head>
<body>
<div id="example-input">
<div>
<div>
<ul>
@erikroyall
erikroyall / textbooks.md
Last active October 24, 2024 21:38
Alex Stef's list of freely-available mathematics textbooks

Textbooks in Mathematics

A list of links to useful mathematical textbooks available for free on the Internet. They are all legal and maintained by their authors or by the legitimate publisher.

All the documents are in English. They are in a printable format - Postscript or Adobe Portable Document Format. You are free to download, read and print them. Here are some links to other sites offering lists of free mathematical textbooks.

For any comments, please, contact me: [email protected]

@e9t
e9t / data.json
Last active February 15, 2024 01:19
Drawing a neural network
{
"nodes": [
{"label": "i0", "layer": 1},
{"label": "i1", "layer": 1},
{"label": "h0", "layer": 2},
{"label": "i2", "layer": 1},
{"label": "h1", "layer": 2},
{"label": "h2", "layer": 2},
{"label": "h3", "layer": 2},
{"label": "o0", "layer": 3}
@adamfeuer
adamfeuer / D3JS Tree Editor.md
Last active November 13, 2023 09:56
d3js tree editor with node create, delete, and rename
We couldn’t find that file to show.
@nakato
nakato / haproxy.cfg
Created January 7, 2015 03:12
A quickly throw together haproxy config for RabbitMQ
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
tune.bufsize 128000