Skip to content

Instantly share code, notes, and snippets.

View aolo2's full-sized avatar

Алексей Олохтонов aolo2

View GitHub Profile
@aolo2
aolo2 / inspector.css
Last active May 10, 2019 13:10
readable internet
body {
background: #eee;
padding: 5em;
font-family: Roboto;
line-height: 1.6;
}
pre {
background: white;
padding: .5em;
import numpy as np
import scipy.linalg as sp
N = 6
A = np.zeros((N, N))
ERR = 1e-6
A[0] = [ 2, 1, 0, 0, 0, 0 ]
A[1] = [ 0, 2, 1, 0, 0, 0 ]
import argparse
import sys
from enum import Enum
class Case(Enum):
SAME = 0
DIFFRENT = 1
GAP = 2,
#ifndef VECTOR_C
#define VECTOR_C
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <assert.h>
@aolo2
aolo2 / utils.c
Last active December 10, 2018 12:32
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <assert.h>
#include "vector.c"
#define MIN(a,b) (((a)<(b))?(a):(b))
@aolo2
aolo2 / fasta.c
Last active December 10, 2018 12:32
#include "utils.c"
#include <errno.h>
#include <sys/sysinfo.h>
const uint32_t DIAGONAL_CUTOFF = 10; // NOTE: diagonals with this or more 2-word matches are checked
const uint32_t DIAGONAL_OFFSET = 32;
const uint32_t MAX_GOOD_PLOTS = 100;
const uint32_t EXPECTED_GOOD_DIAGONAL_PIECES = 20;
const int32_t RESCORE_CUTOFF = 50;
THIS = $(HOME)/Documents/code/study/vulkan
VULKAN_SDK_PATH = $(THIS)/1.1.85.0/x86_64
CFLAGS = -Wall -Wextra -pedantic -I$(VULKAN_SDK_PATH)/include
LDFLAGS = -L$(VULKAN_SDK_PATH)/lib `pkg-config --static --libs glfw3` -lvulkan
all:
gcc $(CFLAGS) main.c $(LDFLAGS)
debug:
gcc $(CFLAGS) main.c -DDEBUG $(LDFLAGS)
@aolo2
aolo2 / main.c
Created November 5, 2018 21:50
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <gsl/gsl_matrix.h>
// #include <gsl/gsl_matrix.h>

== Курсач ==

  • ESCAPE ALL HTML!!!!
  • меню вставлять через getelementbyId не забыть валидацию editbox запроса (как и всех остальных) индексы в монге!

Зарегистриваться могут только студенты. Остальных пользователей можно только создать (во избежание контрафактов)

@aolo2
aolo2 / lab4.cpp
Created October 11, 2018 00:12
RK4
#include <iostream>
#include <cstdint>
#include <cmath>
#include <vector>
/*
* y''(x) + p(x) * y'(x) + q(x) * y(x) = f(x)
* y''(x) + y'(x) - y(x) = f(x)
* y(x) = e^x, p(x) = 1, q(x) = -1
* Начальные условия з. Коши: