Skip to content

Instantly share code, notes, and snippets.

@NickVeld
NickVeld / json2vcf_converter.py
Last active April 2, 2023 08:17 — forked from Amir-P/converter.py
Convert JSON exported contacts from Android/Telegram to vCard (.vcf)
import enum
import json
import sys
from typing import Any, Dict, Iterable, List, TextIO, Union
DOUBLE_UNDERSCORE = '__'
SPACE = ' '
from IPython.display import clear_output
from torch.autograd import Variable
w = torch.tensor(np.random.rand(10).astype('float32')/10, requires_grad=True)
x = torch.tensor(boston.data[:, -1] / 10, dtype=torch.float32)
y = torch.tensor(boston.target, dtype=torch.float32)
relu = lambda x: torch.max(torch.zeros_like(x), x )
for i in range(1000):
@NickVeld
NickVeld / run.sh
Created September 30, 2017 09:56
nickveld/nlp_ru_notebook start script
# Connect with me if you want more packages.
docker run --rm -it --user root -w /home/jovyan/shared -v $(pwd):/home/jovyan/shared -p 8888:8888 --name nlpj nickveld/nlp_ru_notebook start-notebook.sh --NotebookApp.token=''
# --rm Automatically remove the container when it exits. If you can start container, remove it.
# -it Show stdout and stderr, and let write to stdin (in this case let send stop signal with Ctrl+C)
# --user root In Notebook Terminal you can do operations with root rights
# Instead of $(pwd) you can write a directory on your device
# -p port_of_your_device:8888 (8888 - is a default Jupyter Notebook port) Using -p option is as setting simple NAT configuration
# --name name_of_container
# start-notebook.sh --NotebookApp.token='' - disable auth, if you want to auth and can do it delete or transform start-notebook.sh --NotebookApp.token=''
# More on https://hub.docker.com/r/jupyter/base-notebook/