Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis Tsyplakov denistsyplakov

View GitHub Profile
View test.html
<html>
<body>
test
</body>
</html>
@denistsyplakov
denistsyplakov / System Design.md
Created Jul 5, 2020 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
View solution.py
import raccoon
raccoon.goRight(2)
#add your code here
raccoon.goUp()
while raccoon.look(1, -1) or raccoon.look(1, 0):
raccoon.wait()
raccoon.goRight(3)
View HzcSchedulingTestApplication.java
package com.dataart.hzc.scheduling.test;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.HazelcastInstanceAware;
import java.io.Serializable;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
@denistsyplakov
denistsyplakov / Main.java
Created Apr 18, 2019
Small demo of Condition and ReentrantLock usage
View Main.java
package ru.yandex.lc.proto.condition;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;
public class Main {
View vocabulary 2018.05.18.txt
unsuccess
-all falls through
-doesn't come off
-doesn't succeed
-it flops
-it turns out badly
-fail to come off
other topic
- work out
@denistsyplakov
denistsyplakov / test.java
Created Apr 25, 2018
Задача Алисе - перебор чисел.
View test.java
package ru.yandex.lc.alice2;
public class Test {
public static void main(String[] args) {
int[] pa = new int[] {1, 2, 3,4,5,6,7,8,9};
prmt(pa, 0);
}
private static void prmt(int[] pa, int i) {
@denistsyplakov
denistsyplakov / test.ts
Created Apr 8, 2018
Typescript How to create class instance from its reference
View test.ts
class A {
public do(): void {
console.log("do A!");
}
}
class B extends A {
public do() {
console.log("do B!");
}
@denistsyplakov
denistsyplakov / kangoo25.java
Created Mar 15, 2018
2018.03.15 Кенгуру математика, задание 25
View kangoo25.java
package com.company;
import java.util.HashMap;
import java.util.Map;
/**
* ДОМ+КЕН=ГУРУ
* ДОМ=256
* Найти чему равны остальные цифры.
*/
View gist:75001e3f4eb60636f810
my $result = eval {...};
if ($result) {
# deal with error here
}
You can’t perform that action at this time.