Skip to content

Instantly share code, notes, and snippets.

View dainis-boumber's full-sized avatar
🏠
Working from home

Dainis Boumber dainis-boumber

🏠
Working from home
View GitHub Profile
@dainis-boumber
dainis-boumber / create_protected_directory.md
Last active June 2, 2021 06:28
Making directory that cannot be deleted but is otherwise normal (not immutable) and lets users having read, write, and execute permissions to contents

How to create an otherwise normal direcory that cannot be deleted

Author: Dainis Boumber

Overview

Follow the instructions in this gist to create a directory under / for which, depending on the user's permissions, it will be possible to:

  • read, copy, write, move, paste, and delete files and folders inside
  • run and execute programs and scripts within
@dainis-boumber
dainis-boumber / pybert-multilabel.ipynb
Last active April 29, 2019 11:15
Multilabel Sequence Classification with BERT
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
import re
import string
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
import torch
from torch import nn
## NLP-papers-tools-discussion
Anything useful goes here
### Possible research directions and Fundamental discussions
[The 4 Biggest Open Problems in NLP Today](http://ruder.io/4-biggest-open-problems-in-nlp/)
[What innate priors should we build into the architecture of deep learning systems? A debate between Prof. Y. LeCun and Prof. C. Manning](https://www.abigailsee.com/2018/02/21/deep-learning-structure-and-innate-priors.html)
### New Libraries/SOTA we care about
from torch.optim.optimizer import Optimizer, required
class LARS(Optimizer):
def __init__(self, params, lr=required, momentum=0, dampening=0,
weight_decay=0, nesterov=False, eta=0.001):
if lr is not required and lr < 0.0:
raise ValueError("Invalid learning rate: {}".format(lr))
if momentum < 0.0:
raise ValueError("Invalid momentum value: {}".format(momentum))
@dainis-boumber
dainis-boumber / Docker-debug
Last active December 28, 2022 14:42
Setup PyCharm IDE to remote debug code inside a Docker container using ssh
## IMPORTANT:
# Should work for any IDE that supports ssh but only tested on PyCharm
# These instructions are for systemd OS (Ubuntu 16.04 and up, Debian).
# For systems running upstart like 14.04, modify /etc/default/docker by adding DOCKER_OPTS
#
#
#
## First, we need to get Docker to accept ssh connections:
#
## Open /lib/systemd/system/docker.service