Skip to content

Instantly share code, notes, and snippets.

@kiwidamien
kiwidamien / unbalanced.ipynb
Created May 9, 2019 07:00
Example of cross-validation with unbalanced data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewseidl
andrewseidl / Clang-format Comparison.md
Last active December 28, 2024 13:25
Clang-format style comparison

This is a comparison of the different formatting styles including with clang-format.

Generated via:

styles=( LLVM Google Chromium Mozilla WebKit )
for style in $styles
do
  clang-format -style=$style ChLcpIterativeAPGD.h > ChLcpIterativeAPGD.$style.h

done

@denisxab
denisxab / docker-compose.yml
Created June 25, 2024 16:04
Настройка собственного GitLab CI/CD сервера с помощью Docker Compose
version: "3.5"
services:
gitlab:
image: gitlab/gitlab-ce:latest
hostname: "localhost"
restart: unless-stopped
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost'
gitlab_rails['gitlab_shell_ssh_port'] = 8822
@ynagatomo
ynagatomo / ContentView.swift
Created November 16, 2023 08:30
A sample of Head-up Display Component for visionOS
// ContentView.swift
import SwiftUI
import RealityKit
import RealityKitContent
struct ContentView: View {
@State private var showImmersiveSpace = false
@State private var immersiveSpaceIsShown = false
@petrilli
petrilli / main.py
Last active December 28, 2024 13:14
Example combination of FastAPI and Pydantic with aiosql and aiosqlite
# -*- coding: utf-8 -*-
"""Example combination of FastAPI and Pydantic with aiosql and aiosqlite.
This module demonstrates the minimum viable integration approach for putting
together a few components:
- FastAPI. This provides a very high-performance and type-driving approach to
building APIs in Python
- Pydantic. A powerful data validation library.
- aiosql. Inspired by annosql and originally Clojure's yeSql, a way to programatically,
@judero01col
judero01col / Service KMS
Last active December 28, 2024 13:14
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@pommicket
pommicket / win64_call.asm
Last active December 28, 2024 13:12
Call C functions with a dynamic number of arguments x64 MSVC
;;; Call C functions with a dynamic number of arguments x64 MSVC ;;;
;;; Written in NASM ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is free and unencumbered software released into the public domain.
;;
;; Anyone is free to copy, modify, publish, use, compile, sell, or
;; distribute this software, either in source code form or as a compiled
;; binary, for any purpose, commercial or non-commercial, and by any
;; means.
;;
@fnky
fnky / ANSI.md
Last active December 28, 2024 13:11
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@sassman
sassman / flamegraph-pr.yml
Created December 15, 2024 21:53
GitHub Action for flamegraphs on PR as comment
name: Flamegraph PR
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
@glasslion
glasslion / vtt2text.py
Last active December 28, 2024 13:09
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.