Skip to content

Instantly share code, notes, and snippets.

View kohutd's full-sized avatar
🚧
Mavka developer

Давид kohutd

🚧
Mavka developer
  • Україна
View GitHub Profile
#include <elf.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
static size_t align_to(size_t value, size_t alignment)
{
return (value + alignment - 1) & ~(alignment - 1);
}
chcp 65001 >NUL
set /p Build=<SourceFiles
echo %Build%
clang++ -municode -o out/mavka.exe %Build%
import turtle
t = turtle.Turtle()
t.speed(5)
def startpos():
t.penup()
t.goto(0, 0)
t.pendown()
@kohutd
kohutd / 15.c
Created December 5, 2019 21:46
#include <stdio.h>
#include <string.h>
#define uint unsigned int
typedef struct HistorycalEvents {
char event[255];
int year;
char country[50];
} HistorycalEvent;
@kohutd
kohutd / 14.c
Created December 5, 2019 19:52
#include <stdio.h>
#include <locale.h>
#include <wchar.h>
#include <wctype.h>
#define MAX_SENTENCES 256
#define MAX_SENTENCE_LEN 1024
int count_words(wchar_t sen[]);
#include <iostream>
#include <cmath>
using namespace std;
class Complex {
private:
double real;
double imagine;
@kohutd
kohutd / apachebench
Last active July 24, 2019 09:08
$ ab -n 5000 -c 1000 http://localhost:8080/public/restaurant
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
N = int(input("Enter N: "))
people = []
peopleTotalAge = 0
for i in range(0, N):
in_name = input("Name[{}]: ".format(i + 1))
in_surname = input("Surname[{}]: ".format(i + 1))
in_age = int(input("Age[{}]: ".format(i + 1)))
print()
#include <iostream>
#include <cmath>
using namespace std;
class numbers_pair {
protected:
int first, second;
#include <iostream>
using namespace std;
struct automobile {
char number[50];
char brand[50];
char color[10];
int year;
char owner[50];