sudo apt purge nvidia*
sudo apt remove nvidia-*
sudo rm /etc/apt/sources.list.d/cuda*
This file contains 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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
# Initialization code that may require console input (password prompts, [y/n] | |
# confirmations, etc.) must go above this block; everything else may go below. | |
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH |
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 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
big_alphabet="AĄBCĆDEĘFGHIJKLŁMNŃOÓPRSŚTUWXYZŻŹ" | |
small_alphabet="aąbcćdeęfghijklłmnńoóprsśtuwxyzżź" | |
digits = "0123456789" | |
signs = "!@#$%^&*()-_+={}[]\"\\" |
This file contains 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.embeddings import BertEmbeddings | |
from flair.embeddings import WordEmbeddings | |
from flair.embeddings import FastTextEmbeddings | |
from flair.embeddings import ELMoEmbeddings | |
from flair.embeddings import BytePairEmbeddings | |
from flair.embeddings import FlairEmbeddings | |
from flair.embeddings import XLMEmbeddings | |
from flair.embeddings import RoBERTaEmbeddings |
This file contains 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 collections import Counter, OrderedDict | |
from itertools import zip_longest , tee | |
## ngram iterators and tokenizers, working on list or generators | |
def ngram_tokenizer_iter(iterable, n, fillvalue=''): | |
"generuje pary znaków obok siebie, tokenizuje [abcd]->ab, cd dla tekstu przekazanego w formie generatora" | |
# grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx" |
This file contains 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 nltk | |
# interactive download | |
# nltk.download() | |
nltk.download('punkt') | |
extra_abbreviations = [ | |
"ps", | |
"inc", | |
"corp", |
This file contains 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
#!/bin/bash | |
## This gist contains step by step instructions to install cuda v10.0 and cudnn 7.5 in Ubuntu 18.04 | |
## Clean install | |
### If you have previous installation remove it first. | |
sudo apt-get purge nvidia* | |
sudo apt remove nvidia-* | |
sudo rm /etc/apt/sources.list.d/cuda* | |
sudo apt-get autoremove && sudo apt-get autoclean |
This file contains 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
# This is shorthened version of blog post | |
# http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/ | |
# update packages | |
sudo apt-get update | |
sudo apt-get upgrade | |
#Add the ppa repo for NVIDIA graphics driver | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt-get update |
NewerOlder