This file contains hidden or 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 { loadSync, Options } from '@grpc/proto-loader' | |
| import { PackageDefinition } from 'grpc' | |
| const ProtoBaseDir = process.env.JETSETTER_SCHEMAS_PATH || `${__dirname}/../../../schemas` | |
| const DefaultLoadOptions = { | |
| keepCase: true, | |
| longs: String, | |
| enums: String, | |
| defaults: false, |
This file contains hidden or 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
| FROM python:3.6.6-slim | |
| WORKDIR /fia | |
| RUN apt-get update | |
| # the big one | |
| RUN pip install torch | |
| RUN apt-get install -y --no-install-recommends build-essential wget |
This file contains hidden or 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
| [user] | |
| email = xxx@yyy.com | |
| [alias] | |
| # View the SHA, description, and history graph of the latest 20 commits | |
| l = log --pretty=oneline -n 20 --graph | |
| lg = log -p | |
| lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
| lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
| ls = ls-files |
This file contains hidden or 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
| " Make Vim more useful | |
| set nocompatible | |
| " Use the OS clipboard by default (on versions compiled with `+clipboard`) | |
| set clipboard=unnamed | |
| " Enhance command-line completion | |
| set wildmenu | |
| " Allow cursor keys in insert mode | |
| set esckeys | |
| " Allow backspace in insert mode | |
| set backspace=indent,eol,start |
This file contains hidden or 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
| # Create a new directory and enter it | |
| function mkd() { | |
| mkdir -p "$@" && cd "$@" | |
| } | |
| # Determine size of a file or total size of a directory | |
| function fs() { | |
| if du -b /dev/null > /dev/null 2>&1; then | |
| local arg=-sbh | |
| else |
This file contains hidden or 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
| from flair.data import Sentence | |
| from flair.models import SequenceTagger | |
| tagger = SequenceTagger.load('ner') | |
| filename = 'ts.txt' | |
| out_filename = 'ts_with_entities.txt' | |
| cnt = 0 | |
| with open(filename) as f: |
This file contains hidden or 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
| <script> | |
| export default { | |
| name: 'test-component', | |
| functional: true, | |
| props: { | |
| children: Array | |
| }, | |
| render (h, context) { | |
| return (context.props.children || []).map(child => { | |
| if (typeof child === 'string') return child |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 itertools | |
| def dict_product(dicts): | |
| """ | |
| Cartesian product. | |
| See https://stackoverflow.com/questions/5228158/cartesian-product-of-a-dictionary-of-lists | |
| >>> list(dict_product(dict(number=[1,2], character='ab'))) | |
| [{'character': 'a', 'number': 1}, | |
| {'character': 'a', 'number': 2}, |