Skip to content

Instantly share code, notes, and snippets.

View nexovec's full-sized avatar

nexovec nexovec

  • DCUK
  • Czech republic
View GitHub Profile
@kalsprite
kalsprite / sample_440hz.odin
Last active November 28, 2024 03:28
wasapi min example - 440 hz tone
// Released as Public Domain, Attribution appreciated but not required, Jon Lipstate
package scratch
import win32 "core:sys/windows"
import "core:fmt"
import "core:math"
import "core:mem"
import "./wasapi"
/////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// https://learn.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nn-mmdeviceapi-immdeviceenumerator
// https://learn.microsoft.com/en-us/windows/win32/coreaudio/rendering-a-stream
@kalsprite
kalsprite / dsound.odin
Last active July 28, 2025 05:34
dsound init
// Released as Public Domain, Attribution appreciated but not required, Jon Lipstate
package scratch
import win32 "core:sys/windows"
import "core:dynlib"
import "core:fmt"
import "vendor:directx/dxgi"
IDirectSound :: struct {
using lpVtbl: ^IDirectSoundVtbl,
@johntlangton
johntlangton / sqlalchemy_asyncio_example.py
Created August 26, 2022 14:27
Example of executing multiple queries concurrently (in parallel) with sqlalchemy core using sqlalchemy.ext.asyncio, the asyncio extension
"""
This seems like such a common use case, but I couldn't find any examples after looking through all of the documentation
of SQLAlchemy and random spots on the internet. Posting in case it's helpful to others.
You can run this on any data, just have to update the queries. The code compares serial and parallel query execution.
It shows the number of connections used from the engine's pool by each (serial is one, parallel is 5). I did the view creation
just trying to hit queries that would take time, but any queries will do.
There are other recipes for parallel execution that may be more applicable to your use case.
"""
@jdah
jdah / wfc.hpp
Created August 5, 2022 15:18
Wave Function Collapse
#pragma once
#include "util/types.hpp"
#include "util/std.hpp"
#include "util/ndarray.hpp"
#include "util/collections.hpp"
#include "util/rand.hpp"
#include "util/hash.hpp"
#include "util/assert.hpp"
#include "util/bitset.hpp"
@scyto
scyto / docker-swarm-architecture.md
Last active November 30, 2025 15:23
My Docker Swarm Architecture

This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...

Installation Step-by-Step

Each major task has its own gist, this is to help with maitainability long term.

  1. Install Debian VM for each docker host
  2. install Docker
  3. Configure Docker Swarm
  4. Install Portainer
  5. Install KeepaliveD
  6. Using VirtioFS backed by CephFS for bind mounts (migrating from glsuterFS - WIP)
@sreeragh-ar
sreeragh-ar / python_quick_tips.ipynb
Created June 23, 2021 14:07
Python_quick_tips.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aditya-malte
aditya-malte / smallberta_pretraining.ipynb
Created February 22, 2020 13:41
smallBERTa_Pretraining.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Zibri
Zibri / KMS_office.cmd
Created January 18, 2020 15:59 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
@echo off
title Microsoft Office 2019 versions are supported!&cls&echo
============================================================================&echo
#Project: Activating Microsoft software products for FREE without software&echo
============================================================================&echo.&echo
#Supported products:&echo - Microsoft Office Standard 2019&echo - Microsoft Office Professional Plus 2019&echo.&echo.&(if exist
"%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist
"%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b
..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b
..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo
@mvwestendorp
mvwestendorp / playing_openai.ipynb
Created March 7, 2019 09:54
playing_openAI.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.