Skip to content

Instantly share code, notes, and snippets.

View timoninmaxim's full-sized avatar
🔥

Maksim Timonin timoninmaxim

🔥
View GitHub Profile
@timoninmaxim
timoninmaxim / IgniteQueryEntityTest.java
Last active October 27, 2021 07:25
Ignite QueryEntity Example
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
static class A {
private Set<Integer> t;
public boolean f(int val) {
Set<Integer> a = t;
return a != null && a.contains(val);
}
public void checkT(int val) {
import java.util.List;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.cache.query.TextQuery;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.junit.Test;
public class GridCacheStringValueLuceneTest extends GridCommonAbstractTest {
@timoninmaxim
timoninmaxim / debug_ducktape.py
Created July 31, 2020 11:25
Script for debugging ducktape locally
# pylint: disable=C0415
def debug():
"""
Useful start point for debugging
Be sure ducktape cluster is up (use 'ducker-ignite up' command)
"""
import os
import sys
from ducktape.command_line import main
@timoninmaxim
timoninmaxim / game.py
Last active September 28, 2018 08:54
import random
import unittest
class GameException(Exception):
def __init__(self, message):
self.message = message
@timoninmaxim
timoninmaxim / CarsRegion.java
Created June 4, 2018 06:48
Look for median
package cars;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.primitives.Ints;
import java.util.*;
public class CarsRegion {