This file contains hidden or 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
| grammar SPQL; | |
| // ---- Parser rule ---- | |
| // | |
| spql | |
| : condition EOF | |
| ; | |
| condition | |
| : disjunction? |
This file contains hidden or 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
| <condition> ::= [ "NOT" ] <disjunction> | |
| <disjunction> ::= <conjunction> { "OR" <conjunction> } | |
| <conjunction> ::= <predicate> { "AND" <predicate> } | |
| <predicate> ::= <expression> | |
| | "(" <condition> ")" | |
| <expression> ::= <column> <comp_op> <value> |
This file contains hidden or 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 org.jetbrains.annotations.NotNull; | |
| import java.util.Collection; | |
| import java.util.HashMap; | |
| import java.io.Serializable; | |
| import java.util.Collection; | |
| import java.util.Set; | |
| import java.util.Map; | |
| import java.util.stream.Collectors; |
This file contains hidden or 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 org.jetbrains.annotations.NotNull; | |
| import java.util.HashMap; | |
| import java.util.Objects; | |
| import java.util.function.Predicate; | |
| public class PredicateExhaustiveSelector<O, V> extends HashMap<Predicate<O>, V> { | |
| /** |
This file contains hidden or 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
| package sg.dlt.indus.lib.functional; | |
| import java.util.NoSuchElementException; | |
| import java.util.Objects; | |
| import java.util.Optional; | |
| import java.util.function.Consumer; | |
| import java.util.function.Function; | |
| /** | |
| * Either Monad represents a value of two possible types. An Either is either a {@link Left} or a |
This file contains hidden or 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
| package net.mvaz.examples.graph; | |
| import org.jgrapht.DirectedGraph; | |
| import org.jgrapht.alg.DijkstraShortestPath; | |
| import org.jgrapht.event.ConnectedComponentTraversalEvent; | |
| import org.jgrapht.event.TraversalListenerAdapter; | |
| import org.jgrapht.event.VertexTraversalEvent; | |
| import org.jgrapht.graph.SimpleDirectedGraph; | |
| import org.jgrapht.traverse.DepthFirstIterator; | |
| import org.jgrapht.traverse.GraphIterator; |
This file contains hidden or 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
| version: '3' | |
| services: | |
| postgresql: | |
| image: postgres:11 | |
| volumes: | |
| - db-data:/var/lib/postgresql/data | |
| environment: | |
| POSTGRES_PASSWORD: testuser | |
| ports: | |
| - "5432:5432" |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| #Usage Example | |
| # python Word_counter.py --folder ./fileFolder --words nithin neetha --out d.csv | |
| import argparse | |
| import csv |
This file contains hidden or 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
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev | |
| curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash | |
| echo 'export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc | |
| source ~/.bashrc |
This file contains hidden or 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 subprocess | |
| import tempfile | |
| import cv2 | |
| import uuid | |
| import os | |
| import matplotlib.pyplot as plt | |
| def textcleaner(img_path): | |
| """Clean the text with text cleaner |
NewerOlder