Skip to content

Instantly share code, notes, and snippets.

View cxspxr's full-sized avatar
🚴

Yaroslav Kasperovych cxspxr

🚴
View GitHub Profile
@cxspxr
cxspxr / snail.js
Created March 5, 2021 14:14
snail sort solution for Ilya
const snail = (arr) => {
if (arr.length === 1) return arr[0]
let right = arr.length - 1,
bottom = right,
left = 0,
top = 1;
const result = [arr[0][0]]
let rowIndex = 0,
columnIndex = 0;
while (result.length !== arr.length * arr.length) {
@cxspxr
cxspxr / nn.java
Created June 23, 2020 19:34
NER neural network
package javac.coursework.glossary.neuralnet;
import opennlp.tools.namefind.NameFinderME;
import opennlp.tools.namefind.TokenNameFinderModel;
import opennlp.tools.tokenize.TokenizerME;
import opennlp.tools.tokenize.TokenizerModel;
import opennlp.tools.util.Span;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@cxspxr
cxspxr / .eslintrc.js
Created April 5, 2019 16:18
suka blyad
const fs = require('fs');
const path = require('path');
const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
);
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
const actionSellRenderer = params =>
Object.keys(params.actions)
.filter(actionName => params.actions[actionName].showInTable !== false)
.map(actionName => {
const action = params.actions[actionName];
const button = document.createElement('button');
button.classList.add('btn', 'grid-action');
@cxspxr
cxspxr / gauss.cpp
Created December 20, 2018 20:21
huita
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <mpi.h>
int ProcNum; // Количество доступных процессов
int ProcRank; // Ранг текущего процесса
int *pParallelPivotPos; // Количество строк, выбранных в качестве опорных
int *pProcPivotIter; // Количество итераций, при которых строки процессора //использовались в качестве опорных
int* pProcInd; // Номер первой строки, расположенной в процессах
@cxspxr
cxspxr / lipscore.js
Created November 12, 2018 13:51
unminified lipscore
Picked up JAVA_TOOL_OPTIONS: -Xmx671m - XX: CICompilerCount = 2 - Dfile.encoding = UTF - 8
/*
jQuery JavaScript Library v2.1.0-pre -ajax/script,-ajax/jsonp,-css,-css/addGetHookIf,-css/curCSS,-css/defaultDisplay,-css/hiddenVisibleSelectors,-css/support,-css/swap,-css/var/cssExpand,-css/var/getStyles,-css/var/isHidden,-css/var/rmargin,-css/var/rnumnonpx,-effects,-effects/Tween,-effects/animatedSelector,-dimensions,-offset,-deprecated,-event/alias,-event,-event/support,-wrap,-exports/amd,-core/ready
http://jquery.com/
Includes Sizzle.js
http://sizzlejs.com/
Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
Released under the MIT license
@cxspxr
cxspxr / webpack.common.js
Created September 27, 2018 13:42
Webpack CoffeeScript + PostCSS (SugarSS) + Stylus +
const path = require('path')
const rupture = require('rupture')
const isDev = process.argv.indexOf('-p') === -1
let removeNull = array => array.filter(e => e !== null)
module.exports = {
output: {
path: path.resolve('./dist'),
filename: 'bundle.js',