git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
| " Specify a directory for plugins | |
| call plug#begin('~/.vim/plugged') | |
| Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
| Plug 'scrooloose/nerdtree' | |
| "Plug 'tsony-tsonev/nerdtree-git-plugin' | |
| Plug 'Xuyuanp/nerdtree-git-plugin' | |
| Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
| Plug 'ryanoasis/vim-devicons' | |
| Plug 'airblade/vim-gitgutter' |
| # Python 3.6 min | |
| import json | |
| import re | |
| import argparse | |
| # CONSTS | |
| DEFAULT = 'default' | |
| VERSION = 'version' |
| import np | |
| from torch.utils.data import Dataset | |
| class GenHelper(Dataset): | |
| def __init__(self, mother, length, mapping): | |
| # here is a mapping from this index to the mother ds index | |
| self.mapping=mapping | |
| self.length=length | |
| self.mother=mother |
| version: 2 | |
| jobs: | |
| test: | |
| docker: | |
| - image: rust:1 | |
| steps: | |
| - checkout | |
| - run: | |
| name: Version information |
| #include <iomanip> | |
| #include <iostream> | |
| #include <cstdlib> | |
| #include <vector> | |
| #include <cuda.h> | |
| #include <cudnn.h> | |
| #define CUDA_CALL(f) { \ | |
| cudaError_t err = (f); \ |
| #include <cudnn.h> | |
| #include <cassert> | |
| #include <cstdlib> | |
| #include <iostream> | |
| #include <opencv2/opencv.hpp> | |
| #define checkCUDNN(expression) \ | |
| { \ | |
| cudnnStatus_t status = (expression); \ | |
| if (status != CUDNN_STATUS_SUCCESS) { \ |
| def dice(im1, im2, empty_score=1.0): | |
| """ | |
| Computes the Dice coefficient, a measure of set similarity. | |
| Parameters | |
| ---------- | |
| im1 : array-like, bool | |
| Any array of arbitrary size. If not boolean, will be converted. | |
| im2 : array-like, bool | |
| Any other array of identical size. If not boolean, will be converted. | |
| Returns |
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import Session | |
| from myapp.models import BaseModel | |
| import pytest | |
| @pytest.fixture(scope="session") | |
| def engine(): | |
| return create_engine("postgresql://localhost/test_database") |