Skip to content

Instantly share code, notes, and snippets.

View minrk's full-sized avatar

Min RK minrk

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Pipeable command to replace your home directory with ~/ or ${HOME}/
License: Public Domain
"""
#!/usr/bin/env python
import os
import sys
@minrk
minrk / env.txt
Last active April 21, 2023 07:18
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
@EXPLICIT
https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h0d85af4_4.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.18.1-h0d85af4_0.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/ca-certificates-2022.12.7-h033912b_0.conda
https://conda.anaconda.org/conda-forge/noarch/fenics-ufcx-0.6.0-h56297ac_0.conda
https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pytest
async def async_function():
print("in async function")
return "sync result"
@pytest.fixture
async def myfixture():
print("in setup")
yield await async_function()
c = get_config() # noqa
from pathlib import Path
# locate your custom templates dir
# in this example, it's next to this config file
# (gists don't like directories, so put page.html in `templates/page.html`)
here = Path(__file__).parent.resolve()
templates_dir = here / "templates"
import sys
c = get_config() # noqa
# start the service
c.JupyterHub.services = [
{"name": "list-notebooks", "command": [sys.executable, "list_notebooks.py"]}
]
# give the service the permissions it needs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.