Skip to content

Instantly share code, notes, and snippets.

ssh -i emr.pem hadoop@ec2-3-249-21-2.eu-west-1.compute.amazonaws.com

Beginner

  1. atta@atta-vmware:~$ ssh -i emr.pem -N -L 9999:ec2-3-249-21-2.eu-west-1.compute.amazonaws.com:50070 hadoop@ec2-3-249-21-2.eu-west-1.compute.amazonaws.com3-24
  2. folder "data" contains single folder "texts"

Intermediate

/**
* D. База в джунглях
*/
//#define DEBUG
#include <assert.h>
#include <cmath>
#include <iostream>
#ifdef DEBUG
@attatrol
attatrol / game.cpp
Created April 9, 2020 17:35 — forked from msg555/game.cpp
Problem "Game" From IOI 2013 Day 2
#include "game.h"
#define MAXR 1000000000
#define MAXC 1000000000
#include <assert.h>
#include <stddef.h>
long long gcd2(long long X, long long Y) {
if(X == 0 || Y == 0) {
@attatrol
attatrol / LogPerformance.ts
Created June 29, 2018 15:00
typescript decorator for execution time check
/**
* Декоратор для проверки времени исполнения метода.
* Выводит в консоль 2 строки:
* - имя метода и список его параметров
* - время, за которое метод выполнился
* @param userMark пользовательский префикс строк
* @param consoleStyle css стиль строк в Chrome и FireFox, по умолчанию - синий текст
*/
function LogPerformance(userMark?: string, consoleStyle: string = "color: #6495ed;"): MethodDecorator {
let PerfomanceCounter = 0;
@attatrol
attatrol / gist:15d994e93e7f060e53b23a173678b221
Created July 29, 2017 19:41
typescript decorator for inherited classes
// typeof any non-abstract child of Base
type ChildOfBase = typeof Base & (new (...args: any[])=> Base);
// decorator
const ClassDecorator = function(valueA: string): (value: ChildOfBase) => ChildOfBase {
return (value: ChildOfBase) => {
value.prototype.DoSmthWithClassName = () => {
return value.name + ".DoSmth_" + value.A;
}
value.A = value.name + valueA;
;;входная таблица
(setq marks '((Иванов ((Матан 2)(Физра 4)(ООП 5)(ФП 3)))
(Петров ((Матан 2)(Физра 4)(ФП 2)(ООП 2)))
(Уткин ((Физра 3)(ФП 5)(БД 2)(Матан 3)(ООП 4))
)))
;выводит список с именами всех студентов, которые получили определенну оценку markValue по предмету subject
;использует список-таблицу с инфой по студентам - table
(defun getPeopleWithMark(subject markValue table) (progn (setq result nil)
@attatrol
attatrol / 1.java
Last active February 17, 2016 21:33
epam Q5
package attatrol.fuzzy.fuzzyparser;
import java.util.Set;
import attatrol.exparser.ExpressionParser;
import attatrol.exparser.tokens.InfixOperation;
import attatrol.exparser.tokens.PrefixOperation;
import attatrol.fuzzy.FuzzySet;
public class FuzzyParser {
void f0() {
//NP(ternary) = 2
int i = true ? 1 : 2;
//NP(cycle) = 2
for(; i<10; i++) {
}
}
//NP(f0) = 4
void f1() {
<section name="SuppressionAnnotationFilter">
<subsection name="Description">
<p>
Suppress all reports from elements annotated by user defined annotations.
It is possible to define checks that will bypass the filter.
</p>
<p>
Example:
</p>
<code>