Skip to content

Instantly share code, notes, and snippets.

View fr1ll's full-sized avatar

Will Sanger fr1ll

View GitHub Profile
@minrk
minrk / Retina Figures.ipynb
Created August 9, 2012 04:37
2x plots for Retina displays with matplotlib and the IPython Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willurd
willurd / web-servers.md
Last active December 5, 2025 14:02
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@kidpixo
kidpixo / jupyter_shortcuts.md
Last active October 5, 2025 16:50
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!

Disclaimer : I just copied those shortcuts from Jupyter Menú > Help > Keyboard Shortcuts, I didn't wrote them myself.

Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.

Toc

Keyboard shortcuts

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active November 30, 2025 16:27
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@WebReflection
WebReflection / superposition.md
Last active May 5, 2020 02:32
How to run Unigine Superposition Benchmark in ArchLinux

OK, the amount of gotchas with unigine-superposition 1.1 benchmark is too damn high, which is a pity because it's awesome!!!

How to run Unigine Superposition Benchmark in ArchLinux

  • download the Linux (.run) version of Qt5.9, the latest version that works https://download.qt.io/official_releases/qt/5.9/5.9.0/
  • make it executable chmod a+x qt-opensource-linux-x64-5.9.0.run
  • run it ./qt-opensource-linux-x64-5.9.0.run
  • skip the registration bit and when prompt about what to install, check Qt5.9 too (top checkbox) and don't change the default path (or do it and adjust following commands). You migt try to not install the tools and see how that goes.
  • use yay, yaourt or pakku / pamac to install pakku -S --needed unigine-superposition and I suggest you do that after a sudo mount -o remount,size=20G,noatime /tmp. If it ends with an error, just sudo pacman -U the-big-tar-file-in-tmp
  • remove the Qt folder inside the unigine-super
@joshlk
joshlk / trio_progress_bar.py
Created May 31, 2019 13:58
Progress bar for Python Trio tasks using tqdm
import trio
import tqdm
class TrioProgress(trio.abc.Instrument):
def __init__(self, total, notebook_mode=False, **kwargs):
if notebook_mode:
from tqdm import tqdm_notebook as tqdm
else:
from tqdm import tqdm
@eXigentCoder
eXigentCoder / README.md
Last active April 17, 2020 21:37
VS Code Theme of destiny

Huge thank you to Nina Zakharenko for her Twitch video and other resources which inspired and helped me setup and customize my theme as well as my terminal.

  1. Follow this gist guide first.
  2. Copy the below custom CSS content into the file synthwave-x-fluoromachine.css
  3. Add the bellow settings to your VSCode's settings.json file
@kwinkunks
kwinkunks / Image-based_modeling_with_PSF.ipynb
Created September 8, 2021 17:18
Forward model seismic data by convolution of a reflectivity series with a point-spread function
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NickCrews
NickCrews / coalesce_parquet.py
Last active January 10, 2024 03:48
Coalesce parquet files
"""coalesce_parquets.py
gist of how to coalesce small row groups into larger row groups.
Solves the problem described in https://issues.apache.org/jira/browse/PARQUET-1115
"""
from __future__ import annotations
from pathlib import Path
from typing import Callable, Iterable, TypeVar
import json
import logging
from dataclasses import dataclass
from pathlib import Path
from typing import TYPE_CHECKING, Literal
from ray._private.runtime_env.conda_utils import exec_cmd
from ray._private.runtime_env.plugin import RuntimeEnvPlugin
from ray.exceptions import RuntimeEnvSetupError