Skip to content

Instantly share code, notes, and snippets.

@gasabr
gasabr / build.gradle.kts
Created March 14, 2022 10:58
Not working fat jar in spark
plugins {
id("org.jetbrains.kotlin.jvm") version "1.6.10"
id("com.github.johnrengelman.shadow") version "5.2.0"
`maven-publish`
// Apply the application plugin to add support for building a CLI application in Java.
application
}
group = "co.fun"
@gasabr
gasabr / lab.c
Created January 12, 2021 19:09
lab5
/// Lab1 var 324
/// B 7
/// X1 1 (hyperbolic sin squared)
/// X2 3 (tan modulus)
/// X3 1 (M2[i] = M1[i]^M2[i])
/// X4 1 (selection sort)
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'rust-lang/rust.vim'
{
"boots": {
"builds": [
{
"items": [
3020
],
"matches_count": 62,
"optional_items": [],
"pickrate": 72.09,
{
"boots": {
"builds": [
{
"items": [
3117
],
"matches_count": 86,
"optional_items": [],
"pickrate": 0.47,
{
"boots": {
"current_patch": {
"boot_sets": [
{
"boot": 3006,
"matches_count": 1689,
"pickrate": 55.45,
"winrate": 56.6
},
gasabr@gasabr-VirtualBox:~/dist/2_lab$ ps
PID TTY TIME CMD
1900 pts/0 00:00:01 bash
1931 pts/0 00:00:54 vim
6013 pts/0 00:00:00 ps
gasabr@gasabr-VirtualBox:~/dist/2_lab$ grep -rni sleep pa4
Binary file pa4/libruntime.so matches
pa4/ipc_impl.c:134: //nanosleep(&t1, &t2);
pa4/ipc_impl.c:194: //nanosleep(&t1, &t2);
Binary file pa4/pa2 matches
#include <pthread.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
#include <dirent.h>
#include <stdbool.h>
#include <netinet/in.h>
@gasabr
gasabr / sin.py
Last active April 20, 2018 13:07
from decimal import Decimal
from cmath import pi, inf
import math
import scipy as sp
def sin(x):
# choose the closest anchor point to the `x`
x_in_period = abs(x) % pi
osmfilter spb.osm --keep-tags="addr:* tram bus rout" --drop-tags="name:* \
opening_hours* parking* payment* phone* piste* playground* recycling:* \
seamark:* service:* toilets:* was:* wiki* website* zoo wood* wifi \
abandoned* after_opening* alt_name* anime* brand* camera* contact:* \
description* disused:* drink:* education* fire_hydrant* fuel* \
generator:* health_speciality:* official_name:* old_name:* operator:* \
source:* tickets:*" -o=spb-slim.osm