Skip to content

Instantly share code, notes, and snippets.

View mrjazz's full-sized avatar
🎯
Code as a product

Denis mrjazz

🎯
Code as a product
View GitHub Profile
<?php
require('testrail.php');
// error_reporting(0);
function traverse($xml, $fn, $level = 0) {
$result = $fn($xml, $level);
if ($result !== false) {
return $result;
const s = input();
const allCharactersAreUnique = (s) => {
return (new Set(s.split(''))).size === s.length;
}
for (let i = 4; i < s.length; i++) {
if (allCharactersAreUnique(s.substring(i-4, i))) {
console.log(i);
break;
const [initState, moves] = input().split("\n\n")
const inputLines = initState.split("\n")
const columns = [];
for (let i = inputLines.length - 2; i >= 0; i--) {
const line = inputLines[i];
for (let j = 1, idx = 0; j < line.length; j+=4, idx++) {
columns.length <= idx && columns.push([]);
line[j].trim() != '' && columns[idx].push(line[j]);
}
const input = `7-24,8-8
2-75,37-51
47-78,20-39
53-91,34-53
13-50,14-50
93-93,20-93
74-80,48-81
30-87,27-38
6-93,7-94
56-98,12-49
const input = `gfWpjRRQffQGCHHJsGqjsj
SclzJZZvmmnPbJtVSqqNBqVCBdSCsd
tlbvZJDZtmtPcJmlPnhMFQWWpMRFTfLDRRTWRp
HjMPgSWjVrjgbHRRSSMRgjRdpdbGdlcdCvQfcCdlwQJfdf
LNDnhtNtLNFFZDtFnhzvdldDflvvDCdlJfldpJ
ZFLFZZmFtFtTNTSPRrVPWWMpRP
qLBSBLRwmgzqCbzCffDlrfCV
TFFFHNWFMFFMpHpGHMTHGNhrldWZCsdZsslZlZfrflDVss
PTMcPGntTThHhTGctnMvSwjjvmmqLBmnjqqgCR
nClJtMwwntqVVPJcgZqq
const input = `A Y
B Y
B Z
B Z
B X
B Z
C Y
A Z
C X
C X
const s = `18814
1927
12782
8734
10904
9548
1493
4576
const process = require("process")
function draw(arr) {
process.stdout.write('\u001b[0;0H')
for (let row of arr) {
for (let i of row) {
process.stdout.write(i == 1 ? "\u2588" : ' ')
}
process.stdout.write("\n")
}
from subprocess import Popen, PIPE
from time import time
CHARACTERS = [' ', '.', ',', ':', ';', 'i', '1', 't', 'f', 'L', 'C', 'G', '0', '8', '@']
HEIGHT = 240
WIDTH = 426
DISPLAY_MODES = {

Amazon Web Services in one line

Compute

  • EC2 - Virtual Private Servers
  • Lightsail - Amazon’s hosting provider (vps, dns, storage)
  • Lambda - Functions you can run, written in Python, NodeJS, Go etc. Can run many in parallel.
  • Batch - Run software jobs on EC2 machines
  • Elastic Beanstalk - Run software on managed virtual machines
  • Serverless Application Repository - Repository of serverless applications that you can deploy (on lambda)