This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IMG=qemu-image.img | |
SRC=~/linux/linux-cc | |
OBJ=~/linux/objcc | |
MNTPOINT=mnt | |
sudo mount "$IMG" -o loop "$MNTPOINT" || exit 1 | |
sudo mkdir -p "$MNTPOINT/root/tests" || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! vagrant status | grep 'running (virtualbox)' | |
then | |
vagrant up | |
fi | |
vagrant ssh -c "cd /vagrant/my; make $1" | |
echo "Listening files..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- MiKTeX/preamble.tex 2018-02-18 16:32:27.006650858 +0300 | |
+++ my/preamble.tex 2018-03-26 20:42:44.939047859 +0300 | |
@@ -49,7 +49,7 @@ | |
% Зачем: Настраивает межстрочный интервал, для размещения 40 +/- 3 строки текста на странице. | |
% Почему: Пункт 2.1.1 Требований по оформлению пояснительной записки. | |
\usepackage[nodisplayskipstretch]{setspace} | |
-\setstretch{1.1} | |
+\setstretch{1.0} | |
%\onehalfspacing | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://spark.apache.org/docs/latest/rdd-programming-guide.html#resilient-distributed-datasets-rdds | |
import sys | |
from pyspark import SparkContext | |
# from pyspark.sql import SparkSession | |
n = {'asd': 0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IMG=qemu-image.img | |
SRC=~/linux-cc | |
MNTPOINT=mnt | |
sudo mount "$IMG" -o loop "$MNTPOINT" || exit 1 | |
sudo mkdir -p "$MNTPOINT/root/tests" || exit 1 | |
for i in \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unpack_rpm() { | |
local pkgname="${1%.*}" | |
pkgname="${pkgname%.*}" | |
echo "Package $pkgname" | |
mkdir "$pkgname" | |
cd "$pkgname" | |
rpm2cpio "../$1" | cpio -idmv | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qstrt() { | |
if [ "$1" == "help" ]; then | |
echo 'qstrt <kernel> <image> [gui [nokvm]]' | |
return | |
fi | |
local _QEMGUI="-nographic" | |
local _QEMCON="console=ttyS0" | |
local _QEMKVM="-enable-kvm" | |
if [ "$3" == "gui" ]; then | |
_QEMGUI="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://www.hackerrank.com/challenges/swap-nodes-algo | |
class Node: | |
def __init__(self,data, level=1): | |
self.data = data | |
self.left = None | |
self.right = None | |
self.level = level | |
root = Node(1) | |
n = int(input()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::prelude::*; | |
use std::collections::HashMap; | |
fn main() { | |
let mut input = String::new(); | |
std::io::stdin().read_to_string(&mut input).unwrap(); | |
let mut input_words = input.split_whitespace(); | |
let n: u32 = input_words.next().unwrap().parse().unwrap(); | |
let mut hashmap = HashMap::new(); | |
for _ in 0..n { |