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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""WORK IN PROGRESS!! USE AT YOUR OWN RISK!!""" | |
import os | |
import sys | |
from typing import Dict, List, Optional | |
from urllib.parse import urlparse, ParseResult |
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
#!/bin/bash | |
# bash -c "$(curl -LSfs https://raw.githubusercontent.com/this-file.sh)" | |
sudo apt update | |
sudo apt install -y curl | |
sudo add-apt-repository ppa:yannubuntu/boot-repair | |
sudo apt update | |
sudo apt install -y boot-repair |
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
/* | |
* File: Log.h | |
* Based on https://stackoverflow.com/a/17605306/ by manu343726 | |
* https://github.com/Manu343726/Cpp11CustomLogClass | |
* Author: xkortex | |
* Stackoverflow code snipets are licensed under cc-wiki | |
*/ | |
#ifndef LOG_H | |
#define LOG_H |
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
#!/usr/bin/env python3 | |
""" | |
I've been want for something that lets me reuse flags across multiple subcommand, between projects, etc. | |
The native argparse makes this a little tricky, especially if you want custom pydantic data classes. | |
I have also wanted a click-like ease of experience but without all the decorators and deep stack traces clouding my logs. | |
I spent a bit of time hacking on the idea and came up with some interesting patterns. There's still a lot to iron out, | |
a lot of the ergonomics could be improved with more introspection, but I thought I would at least throw this over the wall | |
and see if there's any interest in it. |
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
## Conda with custom entrypoint from base ubuntu image | |
## Build with e.g. `docker build -t monoconda .` | |
## Run with `docker run --rm -it monoconda bash` to drop right into | |
## the environment `foo` ! | |
FROM ubuntu:18.04 | |
## Install things we need to install more things | |
RUN apt-get update -qq &&\ | |
apt-get install -qq curl wget git &&\ | |
apt-get install -qq --no-install-recommends \ |
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
## Conda with custom entrypoint from base ubuntu image | |
## Build with e.g. `docker build -t monoconda .` | |
## Run with `docker run --rm -it monoconda bash` to drop right into | |
## the environment `foo` ! | |
FROM ubuntu:18.04 | |
## Install things we need to install more things | |
RUN apt-get update -qq &&\ | |
apt-get install -qq curl wget git &&\ | |
apt-get install -qq --no-install-recommends \ |
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
#!/bin/bash | |
## Entrypoint for docker RUN directives as well as ENTRYPOINT with conda env | |
## Enable by adding: | |
## COPY entry.sh ./ | |
## SHELL ["/entry.sh", "/bin/bash", "-c"] | |
## | |
## Optionally, set the following env to select a conda env to run in | |
## ENV CONDA_DEFAULT_ENV=foo | |
## You may also want to add something like | |
## RUN conda init bash && echo 'conda activate "${CONDA_TARGET_ENV:-base}"' >> ~/.bashrc |
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 ( | |
"fmt" | |
"golang.org/x/net/context" | |
"net" | |
"time" | |
) | |
type AddrResponse struct { | |
addrs []string | |
err error |
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
Do you accept the previously read EULA? | |
accept/decline/quit: accept | |
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 410.48? | |
(y)es/(n)o/(q)uit: y | |
Do you want to install the OpenGL libraries? | |
(y)es/(n)o/(q)uit [ default is yes ]: n | |
Do you want to run nvidia-xconfig? |