Skip to content

Instantly share code, notes, and snippets.

View IgorVodka's full-sized avatar
🏠
Working from home

Igor Vodka IgorVodka

🏠
Working from home
View GitHub Profile
@IgorVodka
IgorVodka / get-pip.py
Created November 23, 2019 17:24
get-pip.py
This file has been truncated, but you can view the full file.
#!/usr/bin/env python
#
# Hi There!
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we're up to something nefarious (good for you for being
# paranoid!). This is a base85 encoding of a zip file, this zip file contains
# an entire copy of pip (version 19.3.1).
#
# Pip is a thing that installs packages, pip itself is a package that someone
# might want to install, especially if they're looking to run this get-pip.py
Index: .idea/vcs.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- .idea/vcs.xml (date 1551557351000)
+++ .idea/vcs.xml (date 1551557351000)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
@IgorVodka
IgorVodka / clear-versions.sh
Created August 7, 2018 18:24
Removes old patch tags, leaving only the latest ones for each tag (e.g. [1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2] => [1.0.1, 1.1.2]
#!/usr/bin/env bash
prev_minor=0
prev_tag=
all_tags=()
save_tags=()
while read -r tag
do
array=($(grep -o '[0-9]\+' <<< $tag))
patch=${array[-1]}
@IgorVodka
IgorVodka / metro map
Created August 3, 2018 11:20
metro map
setroutes(2);curvenum = 2;jumpnum = 2.4;cowpatuuuuu = 0;fontzsize = 12;line1col = "#ff0000";line1width = 4;line1ver = 5;line1ver1x = 516;line1ver1y1 = 260;line1ver1y2 = 501;line1ver2x = 594;line1ver2y1 = 115;line1ver2y2 = 182;line1ver3x = 594;line1ver3y1 = 86;line1ver3y2 = 115;line1ver4x = -10;line1ver4y1 = -10;line1ver4y2 = -10;line1ver5x = -10;line1ver5y1 = -10;line1ver5y2 = -10;line1hor = 1;line1hor1x1 = -20;line1hor1x2 = -20;line1hor1y = -20;line1topleft = 0;line1topright = 1;line1topright1x = 594;line1topright1y = 182;line1topright1width = 78;line1stations = 12;line1station1x = 594;line1station1y = 115;line1station1type = 0;line1station1dir = 1;line1station1text = "Station";line1station2x = 594;line1station2y = 115;line1station2type = 0;line1station2dir = 1;line1station2text = "[COA] Прибрежная";line1station3x = 594;line1station3y = 86;line1station3type = 1;line1station3dir = 1;line1station3text = "Прибрежная (COA)";line1station4x = 561;line1station4y = 215;line1station4type = 0;line1station4dir = 1;line
<import>
<brand name="audi" displayName="Audi">
<model name="rs5" displayName="RS5">
<complectation displayName="Base">
<property name="Двигатель">бензин 2.9 л. | 450 л.с.<property>
<property name="Скорость">250 км/ч<property>
<section title="Безопасность и системы">
<entry>Боковые подушки безопасности для водителя и переднего пассажира, включая подушки безопасности для головы</entry>
<entry>Полноразмерные фронтальные подушки безопасности для водителя и переднего пассажира</entry>
<!-- ... -->
[["Афганистан","af","93"],["Албания","al","355"],["Алжир","dz","213"],["Американское Самоа","as","1684"],["Андорра","ad","376"],["Ангола","ao","244"],["Ангилья","ai","1264"],["Антигуа и Барбуда","ag","1268"],["Аргентина","ar","54"],["Армения","am","374"],["Аруба","aw","297"],["Австралия","au","61",0],["Австрия","at","43"],["Азербайджан","az","994"],["Багамские о-ва","bs","1242"],["Бахрейн","bh","973"],["Бангладеш","bd","880"],["Барбадос","bb","1246"],["Беларусь","by","375"],["Бельгия","be","32"],["Белиз","bz","501"],["Бенин","bj","229"],["Бермудские о-ва","bm","1441"],["Бутан","bt","975"],["Боливия","bo","591"],["Босния и Герцеговина","ba","387"],["Ботсвана","bw","267"],["Бразилия","br","55"],["Британская территория в Индийском океане","io","246"],["Виргинские о-ва (Британские)","vg","1284"],["Бруней-Даруссалам","bn","673"],["Болгария","bg","359"],["Буркина-Фасо","bf","226"],["Бурунди","bi","257"],["Камбоджа","kh","855"],["Камерун","cm","237"],["Канада","ca","1",1,["204","226","236","249","250","289","306","
var orig = [
[
"Afghanistan (‫افغانستان‬‎)",
"af",
"93"
],
[
"Albania (Shqipëri)",
"al",
"355"
#include "stdafx.h"
#include <iostream>
using namespace std;
#define STR_LEN 81
bool sameStrings(char* first, char* second, int firstLen, int secondLen) {
if (firstLen != secondLen)
return false;
// ConsoleApplication4.cpp: определяет точку входа для консольного приложения.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
char* buf = new char[81];
double determinant(double** matrix, int num_rows) {
if (num_rows == 1) return matrix[0][0];
if (num_rows == 2) return matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0];
double s = 0;
double** tmp = new double*[num_rows - 1];
int tmpY = 0;
for (int i = 0; i < num_rows - 1; i++)
tmp[i] = new double[num_rows - 1];