Skip to content

Instantly share code, notes, and snippets.

def distance(a, b):
return (a - b) * (a - b)
def full_distance(point_a, point_b):
res = 0
for index, value in enumerate(point_a):
res += distance(point_b[index], value)
@piekie
piekie / RootUtils.java
Last active July 30, 2021 08:09
Utils : Kill and Force-Stop functions for android app.
public class RootUtils {
private static Process su;
public static void gainRoot() {
try {
su = Runtime.getRuntime().exec("su");
} catch (IOException e) {
e.printStackTrace();
}
@piekie
piekie / .cpp
Last active May 20, 2016 19:04 — forked from kateseniva/.cpp
Частина курсової
#include <iostream>
#include <vector>
#include <math.h>
#include <iomanip>
using namespace std;
//4 1 2 3 4 2 1 2 3 3 2 -1 2 4 3 2 1
vector <vector<double>> matrix_inverse(vector <vector<double>> &matr, unsigned int n) {