Skip to content

Instantly share code, notes, and snippets.

View skripov-ds-ai's full-sized avatar

Denis Skripov skripov-ds-ai

  • Russia, Omsk
View GitHub Profile
@kuk
kuk / task.md
Last active June 28, 2021 20:57
arb task

Тестовая задача

Предлагается написать программу для извлечения из текста ссылок на нормативные акты. Ссылка — это подстрока вида "ч. 3 ст.19 АПК РФ", "ст.ст. 15, 309 ГК РФ", "части 6, 7 статьи 210 АПК РФ". Программа должна находить такие подстроки в тексте и приводить их к нормальному виду, например:

В соответствии с частью 1 статьи 123 и частью 2 статьи 215 Арбитражного процессуального
кодекса Российской Федерации дело рассмотрено без участия представителей сторон.

[17, 116]  # начало и конец подстроки со ссылкой.

[
@naotokui
naotokui / conditional_vae_keras.ipynb
Created June 29, 2017 01:02
Conditional VAE in Keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akueisara
akueisara / 1. Bidirectional Dijkstra.md
Last active August 10, 2017 10:55
Week 6 of Coursera's Algorithms on Graphs

Bidirectional Dijkstra

1. Bidirectional Search

1.1 Shortest Path

  • Input: A graph G with non-negative edge weights, a source vertex s and a target vertex t.
  • Output: The shortest path between s and t in G.

1.2 Why not just Dijkstra?

  • O((|E| + |V |)log |V |) is pretty fast, right?
  • For a graph of USA with 20M vertices and 50M edges it will work for several seconds on average
  • Millions of users of Google Maps want the result in a blink of an eye, all at the same time
@ashleyholman
ashleyholman / johnson.cpp
Created October 2, 2013 13:01
This code implements Johnson's algorithm to solve the "all pairs shortest path" problem, ie. given an input graph with general edge weights (can be negative) with no negative cycles, find the shortest (u, w) path for all pairs of vertices (u, w). If the input graph has any negative cycles, the program will report this and halt (since there is no…
#include <iostream>
#include <fstream>
#include <vector>
#include <climits>
#include <exception>
#include <set>
using namespace std;
struct Edge {
@berlinbrown
berlinbrown / gist:4583728
Created January 21, 2013 05:05
Simplest Possible Web Crawler with C++
//============================================================================
// Name : OctaneCrawler.cpp
// Author : Berlin Brown (berlin dot brown at gmail.com)
// Version :
// Copyright : Copyright Berlin Brown 2012-2013
// License : BSD
// Description : This is the simplest possible web crawler in C++
// Uses boost_regex and boost_algorithm
//============================================================================
@Botffy
Botffy / NiochatServer.java
Created October 9, 2012 18:45
simple Java NIO chat server
package niochat;
import java.net.*;
import java.nio.*;
import java.nio.channels.*;
import java.io.IOException;
import java.util.*;
public class NiochatServer implements Runnable {
private final int port;
// This is the .cpp file for the binomial heap implementation of a
// Priority Queue, demonstrates some pointer work. All code on this
// page is mine.
// http://www.stanford.edu/class/cs106x/handouts/26-Assignment-4-PQueue.pdf
#include "pqueue-binomial-heap.h"
BinomialHeapPQueue::BinomialHeapPQueue()
{
logSize = 0;
@radiofreejohn
radiofreejohn / mergesort.c
Created April 15, 2011 01:13
Simple mergesort from Sedgewick's Algorithms in C++
#include <stdio.h>
#include "numbers.h" // https://gist.github.com/911872
int main()
{
struct numbers a;
struct numbers b;
/*
I feel like a tool, sort of. I spent more time than I should admit using
generateRandoms here, forgetting that mergesort can only merge two arrays