Skip to content

Instantly share code, notes, and snippets.

View Erlemar's full-sized avatar

Andrey Erlemar

View GitHub Profile
import pandas as pd
import altair as alt
import numpy as np
alt.data_transformers.disable_max_rows()
from IPython.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
import matplotlib_inline.backend_inline
matplotlib_inline.backend_inline.set_matplotlib_formats('retina')
res_layers = list(range(1, 66))
upper_shale = [1, 2, 3, 4]
middle_shale =[29, 30, 31, 32, 33, 34]
lower_shale = [62, 63, 64, 65]
shale_layers = upper_shale + middle_shale + lower_shale
sand_layers = [x for x in res_layers if x not in shale_layers]
# create figure
import plotly.graph_objects as go
import numpy as np
import pandas as pd
df = pd.read_csv('/Users/andreylukyanenko/Downloads/df_numpy_3d_B4_pred.csv')
# Create figure
fig = go.Figure()
# Add traces, one for each slider step
for step in range(1, 126):
@Erlemar
Erlemar / plot_3d_time.py
Last active October 18, 2022 16:53
Plot 3d data with slider
import plotly.graph_objects as go
import numpy as np
import pandas as pd
df = pd.read_csv('/Users/andreylukyanenko/Downloads/df_numpy_3d_B4_pred.csv')
# Create figure
fig = go.Figure()
# Add traces, one for each slider step
for step in range(1, 66):
df_small = df.loc[df['k'] == step]
import itertools
import random
from typing import List, Tuple
import numpy as np
from interfaces.TaggingOperation import TaggingOperation
from tasks.TaskTypes import TaskType
@Erlemar
Erlemar / ner_sberloga.ipynb
Created June 24, 2021 09:37
Code for NER talk in Sberloga
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from fastai import *
@Erlemar
Erlemar / hydra_run.py
Created May 3, 2020 09:22
Run experiment with hydra, pytorch-lightning, comet
import os
import hydra
import pytorch_lightning as pl
from omegaconf import DictConfig
from pytorch_lightning.loggers import CometLogger, TensorBoardLogger
from src.lightning_classes.lightning_nbeats import LitM5NBeats
from src.utils.utils import set_seed
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
from nltk.tokenize import TweetTokenizer
import datetime
import lightgbm as lgb
from scipy import stats
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.