Skip to content

Instantly share code, notes, and snippets.

View Khazbs's full-sized avatar
🐺
.let { it.be() }

Arthur Khazbulatov Khazbs

🐺
.let { it.be() }
  • TelePat, LLC
  • Moscow, Russia
  • 20:23 (UTC +03:00)
View GitHub Profile
@Khazbs
Khazbs / DateTimeExtensions.cs
Last active October 30, 2020 21:43
C# DateTime extensions to get the date of 'Last {DayOfTheWeek}' or 'Next {DayOfTheWeek}', see tests for usage examples
using System;
namespace MyNamespace
{
public static class DateTimeExtensions
{
public static DateTime GetLast(this DateTime date, DayOfWeek day) =>
date.AddDays(-(DaysInWeek - (int) day + (int) date.DayOfWeek) % DaysInWeek);
public static DateTime GetNext(this DateTime date, DayOfWeek day) =>
@Khazbs
Khazbs / lectures.md
Last active December 14, 2020 19:15
Моделирование Статических Зависимостей

Моделирование Статистических Зависимостей

Лекция 1

Этапы работы над статистической моделью

  1. Формализация
  2. Квантификация данных
    • Шкалы:
  3. Номинальная

Keybase proof

I hereby claim:

  • I am khazbs on github.
  • I am p3ps1m4n (https://keybase.io/p3ps1m4n) on keybase.
  • I have a public key ASAUBaKV6niYKZh8QnyvAaNFraJXC6eL7stJIiStEmFFsQo

To claim this, I am signing this object:

@Khazbs
Khazbs / second_column.py
Created August 13, 2020 15:48
Reads file.txt, splits each row by whitespace and takes second column values
column = [line.strip().split()[1] for line in open('file.txt', 'r', encoding='utf-8')]
@Khazbs
Khazbs / https_non-www_letsencrypt.nginx.conf
Last active December 13, 2020 10:09
Try this site conf if you (use SSL/TLS certificates by letsencrypt certbot for nginx and) want to redirect http: to https: and www to non-www
server {
# Listen for http:
listen [::]:80;
listen 80;
# Handle . and www.
server_name example.com www.example.com;
# Redirect to https:
return 301 https://$host$request_uri;
group: Hotel_Adam
RoomType = {
tid:number, rtName:string, nightPrice:number
1, "Standard single room", 40
2, "Standard double room", 50
3, "Luxury double room", 60
4, "Family of four room", 100
}
group: Hotel_Adam
RoomType = {
tid:number, rtName:string, nightPrice:number
1, "Standard single room", 40
2, "Standard double room", 50
3, "Luxury double room", 60
4, "Family of four room", 100
}
group: Hotel_Adam
RoomType = {
tid:number, rtName:string, nightPrice:number
1, "Standard single room", 40
2, "Standard double room", 50
3, "Luxury double room", 60
4, "Family of four room", 100
}
group: Hotel_Adam
RoomType = {
tid:number, rtName:string, nightPrice:number
1, "Standard single room", 40
2, "Standard double room", 50
3, "Luxury double room", 60
4, "Family of four room", 100
}
@Khazbs
Khazbs / HotelHomeworkQueries.txt
Last active October 2, 2019 20:18
Hotel Homework queries
-- Arthur Khazbulatov (BBI1803)
-- Task 1
/*
π Number, rtName (
σ s > 32 (
Room ⨝ RoomType
)
)
*/