Skip to content

Instantly share code, notes, and snippets.

View unaimillan's full-sized avatar

Mike unaimillan

  • Russia, Innopolis
View GitHub Profile
@unaimillan
unaimillan / main.cpp
Last active December 15, 2017 14:13
My Cpp template for olympiads
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
@unaimillan
unaimillan / server.py
Last active July 2, 2019 20:33 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
Forked from: https://gist.github.com/mdonkers/63e115cc0c79b4f6b8b3a6b797e485c7
"""
import logging
from http.server import BaseHTTPRequestHandler, HTTPServer
# Server address is a tuple of 'host' and 'port'
SERVER_ADDRESS = ("127.0.0.1", 8000)
@unaimillan
unaimillan / stddev.cpp
Created December 15, 2019 14:46
3081. Стандартное отклонение
#include <iostream> // cin, cout
#include <cmath> // sqrt
#include <iomanip> // setpresicion
using namespace std;
int main() {
// Настраиваем консоль выводить 12 знаков после запятой
cout << setprecision(12);
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char[] *argv)
{
@unaimillan
unaimillan / gist:c342375724c939775ea295f5e1ce0911
Last active February 6, 2024 21:35
IU S24 Databases. Lab3. Example
group: IU Databases. Lab 3. Example
description: Example database for the "Databases" course in Innopolis University.
Supplier = {
SID:number, Name:string, City:string
1, Robert, Moscow
2, Denis, Saratov
3, Patrick, Moscow
4, Bailey, Kazan
}
@unaimillan
unaimillan / gist:b033089430035733b79a56e859bb18a5
Last active February 6, 2024 21:38
IU S24 Databases. Lab3. Tasks
group: IU Databases. Lab 3. Tasks
description: Tasks database for the "Databases" course in Innopolis University.
Students = {
SID:number, Name:string, Surname:string
1, Warren, Hayes
2, Clement, Valdez
3, Albion, Fraley
4, Bailey, Ruiz
}
@unaimillan
unaimillan / jtagd.service
Last active September 8, 2024 01:33
jtag `jtagd.service` service file for Quartus Prime jtagd server to run it using the systemd service on startup. Copy file to the /etc/systemd/system/ folder
[Unit]
Description=JTAG Deamon
[Service]
Type=simple
Environment="LD_LIBRARY_PATH=/home/{YOUR USER}/intelFPGA_lite/{YOUR QUARTUS VERSION}/quartus/linux64"
# Environment="LD_LIBRARY_PATH=/home/user/intelFPGA_lite/21.1/quartus/linux64" # This works for "user" and Quartus 21.1
ExecStart=/home/user/intelFPGA_lite/21.1/quartus/linux64/jtagd --foreground # --debug
# Restart=on-failure
# RestartSec=5
@unaimillan
unaimillan / de10-lite-pins.qsf
Created September 9, 2024 21:22
Pin location assignment files for DE10-Lite (Blue) and Zeowaa A-C4E6 (Green) boards
set_global_assignment -name DEVICE 10M50DAF484C7G
set_global_assignment -name RESERVE_ALL_UNUSED_PINS_WEAK_PULLUP "AS INPUT TRI-STATED"
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to *
set_instance_assignment -name IO_STANDARD "3.3 V Schmitt Trigger" -to KEY[0]
set_instance_assignment -name IO_STANDARD "3.3 V Schmitt Trigger" -to KEY[1]
# set_instance_assignment -name IO_STANDARD "3.3 V Schmitt Trigger" -to ARDUINO_RESET_N
# set_location_assignment PIN_N5 -to ADC_CLK_10
set_location_assignment PIN_P11 -to MAX10_CLK1_50