Skip to content

Instantly share code, notes, and snippets.

View slzdevsnp's full-sized avatar

sviatoslav zimine slzdevsnp

  • UK
View GitHub Profile
@slzdevsnp
slzdevsnp / emr_job_submitting.md
Last active April 16, 2020 16:14
[spark emr] #emr #aws #spark

example of a spark-submit command

Create a bash script to defin a main class a job jar and assemple all necessary jars for a claspath

#!/bin/bash
echo "sumitting xxx.yyy.zzz.SparkKafkaReadWrite"

/usr/bin/spark-submit  --class xxx.yyy.zzz.SparkKafkaReadWrite  \
 --master yarn  --deploy-mode cluster \
@slzdevsnp
slzdevsnp / maven_cmds.md
Last active February 23, 2021 00:25
[maven] #java #devops #ok

see project dependencies

mvn dependency:tree

compile project with a specified profile

mvn clean package -P exclude-spark-libs

package with skipped tests

@slzdevsnp
slzdevsnp / gradle6_on_ubuntu.md
Last active April 26, 2021 12:42
[gradle] #java #devops #jar #prt

prereq java

sudo apt update
sudo apt install -y default-jdk

java --version

expect openjdk version "11.0.5" 2019-10-15

@slzdevsnp
slzdevsnp / grafana_install_redme.md
Created February 19, 2020 08:30
[grafana] #bi #unix #dashboard

installing grafana with an rpm package

applicable to redhat, centos, aws linux

via downloaded rpm package

on aws host:

sudo yum update
@slzdevsnp
slzdevsnp / bash_date
Last active February 17, 2020 16:12
[unix date] #unix #shell #date
##tested on cygwin : gnu date
##osx: has different version of date
ctimestamp=`date '+%s' #ok on osx
#get just the day precision date
today=`date +%Y-%m-%d` #2020-02-19
@slzdevsnp
slzdevsnp / al_stacks_ap_impl_dequeue_problem.md
Last active December 13, 2019 22:54
[al_stacks_ap_impl_dequeue] #algo #stacks #aproblem #impl_dequeue

Implement a Deque

A deque is a doubled-ended queue is an ordered collection wich generalizes a queue, for which alements can be added to or removed from either the fron (head) or back (tail).

This implements an unrestrictive nature of adding and removing items.

Problem

Implement a Deque class! It should be able to do the following:

  • Check if its empty
  • Add to both front and rear
@slzdevsnp
slzdevsnp / al_stacks_ap_impl_queue_problem.md
Last active December 12, 2019 13:20
[al_stacks_ap_impl_queue] #algo #stacks #aproblem #impl_queue

Implement a Queue

A queue is an ordred collection of elements where new elements are added added at the end (rear) and the removal of existing items occors at the start, (front). This is a FIFO principle (first in first out). The simple analogy is any waiting line with first-come first served principle.

Problem

It's very common to be asked to implement a Queue class! The class should be able to do the following:

  • Check if Queue is Empty
  • Enqueue
@slzdevsnp
slzdevsnp / al_stacks_ap_impl_stack_problem.md
Last active December 27, 2019 12:35
[al_stacks_ap_impl_stack] #algo #stacks #aproblem #impl_stack

Stack

is an ordered collection of elments with analogy like a stack of paper.

It supports a principle of LIFO. (grab first the element from the top which as put as a last)

Implement a Stack

Problem

A very common interview question is to begin by just implementing a Stack! Try your best to implement your own stack!

@slzdevsnp
slzdevsnp / al_arrays_ap_impl_dynamic_array_problem.md
Created December 12, 2019 12:27
[al_arrays_ap_impl_dynamic_array] #algo #arrays #aproblem #size

Problem

Create our own Dynamic Array class!

use a built in library ctypes

NB. A quick note on public vs private methods, we can use an underscore _ before the method name to keep it non-public.

@slzdevsnp
slzdevsnp / aa_themes_list.md
Last active December 12, 2019 13:03
[ap_problems] #algo #cs #aproblem

resources

  • 1 udemy python for data structures, algorithms and interviews

plan

  • 1v BigO
  • 1v Arrays
  • 1v Stacks Queues
  • 1 Linked Lists
  • 1 Recursion
  • 1 Trees
  • 1 Search Sort