Skip to content

Instantly share code, notes, and snippets.

View luiarthur's full-sized avatar

Arthur Lui luiarthur

View GitHub Profile
@luiarthur
luiarthur / shortcuts.jupyterlab-settings
Last active September 13, 2022 22:08
Keyboard shortcut settings for Jupyterlab
{
"shortcuts": [
{
"command": "notebook:run-all-below",
"keys": [
"Ctrl Shift Enter"
],
"selector": ".jp-Notebook:focus"
},
{
@Technetium1
Technetium1 / pyfiglet_test.py
Created November 24, 2020 01:19
Test all the pyfiglet fonts with a string. You should probably pipe the output to a file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from time import sleep
import pyfiglet
with open("pyfigletfonts.txt", "r") as file:
fonts = file.read().splitlines()
for fonty in fonts:
@Zsailer
Zsailer / hide_single_cell.py
Last active July 10, 2023 15:41
Hide a single cell in Jupyter notebook
from IPython.display import HTML
from IPython.display import display
# Taken from https://stackoverflow.com/questions/31517194/how-to-hide-one-specific-cell-input-or-output-in-ipython-notebook
tag = HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.cell.code_cell.rendered.selected div.input').hide();
} else {
@JamesMessinger
JamesMessinger / IndexedDB101.js
Last active April 4, 2024 02:00
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.