Set up env
$ conda env create --prefix ./env -f environment.yml
Set up new env
$ conda create --prefix ./env python=3.10
Write env to Yaml
$ conda env export > environment.yml
This tutorial was originally written by Jannie Theunissen on onesheep.org. However, the website has been down for a while and this a clone from the web.archive.org backup. Also, the parts regarding the macOS are updated according to this post. You may find OneSheep here on Twitter and Jannie Theunissen here on StackOverflow. If you have any comments on this Gist please poke me here on Twitter, otherwise, I might miss your comments.
We were recently asked to automate some editing tasks for the Spotlight English editors w
from random import shuffle | |
import copy | |
""" | |
SudokuGenerator | |
input: grid can be a 2-D matrix of a Sudoku puzzle to solve, or None to generate a new puzzle. | |
""" | |
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
[metadata] | |
name = {name} | |
version = file: {name}/_version.txt | |
author = Martin Larralde | |
author_email = [email protected] | |
url = https://github.com/althonos/{name} | |
description = {description} | |
long_description = file: README.md |
""" Strip comments and docstrings from a file. | |
""" | |
import sys, token, tokenize | |
def do_file(fname): | |
""" Run on just one file. | |
""" | |
source = open(fname) |
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Ref : stackoverflow
The best solution in my opinion is to use the unittest
[command line interface][1] which will add the directory to the sys.path
so you don't have to (done in the TestLoader
class).
For example for a directory structure like this:
new_project
├── antigravity.py
#!/bin/bash | |
BACKUP_DIR="/Root/Backup/" | |
PIECE_SIZE=10M | |
ACTION=store | |
trap "exit 2" SIGINT | |
if [[ $1 =~ -h|--help ]]; then |