Skip to content

Instantly share code, notes, and snippets.

View xelibrion's full-sized avatar

Dmitry Kryuchkov xelibrion

  • Melbourne, Australia
View GitHub Profile
@xelibrion
xelibrion / gist:2f8111a7e33a4cede2ae1348af7bc9bb
Last active August 10, 2020 07:20
Emacs build dependencies
libx11-dev
libncurses-dev
libxaw7-dev / libxaw3dxft8-dev
libjpeg-dev
libpng-dev
libtiff-dev
gnutls-dev
libxft-dev
@xelibrion
xelibrion / row_to_prodigy.py
Last active December 20, 2019 03:49
Convert text and list of keyphrases to prodigy format
def _find_inclusions(list_a, list_b):
# list_a = [x.lower() for x in list_a]
# list_b = [x.lower() for x in list_b]
return [x for x in range(len(list_a)) if list_a[x:x + len(list_b)] == list_b]
def row_to_prodigy(nlp, text, keyphrases):
doc = nlp(text)
@xelibrion
xelibrion / prodigy_ner_train.sh
Last active November 17, 2019 22:51
Prodigy ner.batch-train
#!/usr/bin/env bash
set -e
TRAIN_DATASETS="re-tag-keyphrases-zoey,lyft-0-50-gold,lyft-100-150-gold,lyft-150-200-gold"
EVAL_DATASETS="re-tag-keyphrases-dmitry,lyft-50-100-gold"
FINAL_TRAIN="train-$(date +%s)"
FINAL_EVAL="eval-$(date +%s)"
MODEL_NAME="model-$(date +%s)"
@xelibrion
xelibrion / pyproject.toml
Created March 30, 2019 01:15
Poetry empty project
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Dmitry Kryuchkov <xelibrion@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.6"
[tool.poetry.dev-dependencies]
@xelibrion
xelibrion / networking_stack.template.yml
Last active September 14, 2017 04:26
CloudFormation template for creating VPC and subnets
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
VpcCidr:
Type: String
Description: CIDR for the new VPC
VpcName:
Type: String
Description: Name for the new VPC
PrivateSubnetsRange:
Type: Number
@xelibrion
xelibrion / 01_swap_ecs_agent.config
Created July 23, 2015 12:53
How to swap ECS agent in Elastic Beanstalk
commands:
01_pull_custom_ecs_agent:
command: docker pull xelibrion/amazon-ecs-agent:latest
02_mask_default_ecs_agent:
command: docker tag -f xelibrion/amazon-ecs-agent:latest amazon/amazon-ecs-agent:latest
sudo yum install -y yum-utils
sudo rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
sudo yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
sudo yum install -y mono-complete
sudo yum -y install docker-io
sudo groupadd docker
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -a -G docker vagrant
@xelibrion
xelibrion / Dockerfile - mono-nightly
Created July 9, 2015 00:24
Creating Docker container using nightly builds of mono
FROM debian:wheezy
RUN apt-get update \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
RUN echo "deb http://download.mono-project.com/repo/debian nightly main" > /etc/apt/sources.list.d/mono-nightly.list
RUN apt-get update