Skip to content

Instantly share code, notes, and snippets.

View RMuskovets's full-sized avatar
🏠
home

Roman RMuskovets

🏠
home
View GitHub Profile
@RMuskovets
RMuskovets / morse.py
Created February 23, 2018 13:21 — forked from Saluev/morse.py
Morse code with Python unary + and - operators
# -*- coding: utf-8 -*-
morse_alphabet = {
"А" : ".-",
"Б" : "-...",
"В" : ".--",
"Г" : "--.",
"Д" : "-..",
"Е" : ".",
"Ж" : "...-",
@P0huber
P0huber / MinAndIndex.java
Created November 23, 2017 03:32
Finding Min digit and its index. Нахождение минимального числа массива и его индекс [Java]
public class MinAndIndex {
public static void main(String[] args) throws Exception {
int[] data = new int[]{1, 2, 3, 5, -2, -8, 0, 77, 5, 5};
Pair<Integer, Integer> result = getMinimumAndIndex(data);
System.out.println("Minimum is " + result.x);
System.out.println("Index of minimum element is " + result.y);}
public static Pair<Integer, Integer> getMinimumAndIndex(int[] array) {
if (array == null || array.length == 0) {
return new Pair<Integer, Integer>(null, null);}
@lgaff
lgaff / boot.asm
Created November 30, 2012 03:02
FAT12 stage 1 boot loader
; incboot.s
; Incrementally build a boot block for x86
; I'm going to keep adding bits to this one step at a time from
; boot-and hang to hopefully loading a kernel
; Here we go.
; We're implementing a FAT12 file system for the boot disk. This file system is well
; documented so it shouldn't be a hard ask for a first-timer like me.
; There is a certain order required for the metadata appearing at the top of the
; boot block below the jump to start, we'll introduce each as we go.