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
if __name__ == '__main__' and __package__ is None: | |
from os import sys, path | |
sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) |
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
# encoding: utf-8 | |
# Processor of Link Grammar for Russian output. | |
# | |
class LinkParser::Lexer | |
# This exception raises when link grammar is invalid and Lexer | |
# is unable to understand the output. | |
# | |
class InvalidLinkGrammar < RuntimeError | |
attr_reader :input |
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
6ля | |
6лядь | |
6лять | |
b3ъeб | |
cock | |
cunt | |
e6aль | |
ebal | |
eblan | |
eбaл |
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
#include <iostream> | |
#include <cstddef> | |
#include <tuple> | |
#include <utility> | |
#include <sstream> | |
#include <vector> | |
template <typename Tuple, typename F, std::size_t ...Indices> | |
void for_each_impl(Tuple&& tuple, F&& f, std::index_sequence<Indices...>) { | |
using swallow = int[]; |
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
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include "visitor.hpp" | |
struct foo; | |
struct bar; | |
using visitor_t = basic_visitor<std::tuple<foo, bar>, void(int)>; |
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
#include <functional> | |
#include <boost/mpl/inherit_linearly.hpp> | |
#include <boost/mpl/inherit.hpp> | |
#include <boost/mpl/vector.hpp> | |
template<typename TargetsVector, typename SignatureVector> | |
struct visit_method; | |
template<typename TargetType, typename ReturnType, typename ... ArgsTypes> | |
struct visit_method<TargetType, std::tuple<ReturnType, ArgsTypes ...>> { |
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 os | |
import numpy as np | |
import pandas as pd | |
from sklearn.model_selection import StratifiedKFold | |
prod_to_cat = pd.read_csv('levchik_folds/prod_to_category.csv') | |
skf = StratifiedKFold(n_splits=5, shuffle=True, random_state=4242) | |
split = skf.split(prod_to_cat.drop('category_id', axis=1), prod_to_cat['category_id']) |
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
@baker.command | |
def run(batch_size=8, epochs=5, device='cuda'): | |
train_loader, val_loader = get_data_loaders(batch_size) | |
model = NoiseClassifier() | |
model = model.to(device) | |
model.eval() | |
optimizer = Adam(model.parameters()) | |
criterion = nn.BCELoss() | |
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
noise = [ | |
'weird engine sound', | |
'engine buzzing/farting sound', | |
'car engine noise', | |
'Engine knocking', | |
'Engine bad sound', | |
'Engine Whining Noise', | |
'engine blown sounds', | |
'engine tick sound', | |
'engine Clicking Noise', |
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
healthy = [ | |
'healthy engine sound', | |
'Sound of a Healthy Engine', | |
] |
OlderNewer