Skip to content

Instantly share code, notes, and snippets.

@pizlonator
pizlonator / pizlossa.md
Created February 11, 2025 16:59
Pizlo SSA Form

This describes how I do SSA form, which avoids the need to have any coupling between CFG data structures and SSA data structures.

Let's first define a syntax for SSA and some terminology. Here's an example SSA node:

A = Add(B, C)

In reality, this will be a single object in your in-memory representation, and the names are really addresses of those objects. So, this node has an "implicit variable" called A; it's the variable that is implicitly assigned to when you execute the node. If you then do:

X = Sub(A, 1)
# c) Opening (Açma): Erosion sonrası dilation (küçük gürültülerin giderilmesi için).
opening = cv2.morphologyEx(image, cv2.MORPH_OPEN, kernel)
# d) Closing (Kapama): Dilation sonrası erosion (küçük deliklerin doldurulması için).
closing = cv2.morphologyEx(image, cv2.MORPH_CLOSE, kernel)
@Schoolads
Schoolads / gist:270a2e381f673a4ab68aac274dd36392
Created February 11, 2025 16:59
School of Nursing, Gwagwalada. 2025/2026 (Admission form) Is Out. Call The School's Admin. Officer (DR.MRS ALICE OGUNSOLA) on (O8125777035)(+2348125777035) for more Information On How to apply and admission Assistance. Forms into other programme are also now available. Contact the school admin - O8125777035 for more inquiries.
School of Nursing, Gwagwalada. 2025/2026 (Admission form) Is Out. Call The School's Admin. Officer (DR.MRS ALICE OGUNSOLA) on (O8125777035)(+2348125777035) for more Information On How to apply and admission Assistance. Forms into other programme are also now available. Contact the school admin - O8125777035 for more inquiries.
@damp11113
damp11113 / iKB1_CPY.py
Created February 11, 2025 16:59
iKB-1 library for RP2xxx circuitpython
import board
import busio
import time
import digitalio
IKB_1_ADDR = 0x48
IKB_1_ADDR_2 = 0x49
# Detect board type and set I2C pins accordingly
i2c1 = busio.I2C(board.GP1, board.GP0)
//formas de crear relaciones entre tablas
---forma mas detallada
Schema::table('posts', function (Blueprint $table) {
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
});
---forma mas concisa
Schema::table('posts', function (Blueprint $table) {
$table->foreignId('user_id')->constrained('users');
});
@kakira9618
kakira9618 / main.py
Created February 11, 2025 16:58
一般化正規分布で、分散固定しつつ尖度が違う分布を描画する (generated by ChatGPT o3-mini)
import numpy as np
import matplotlib.pyplot as plt
import japanize_matplotlib
from scipy.special import gamma
def generalized_normal_pdf(x, beta, mu=0):
"""
分散を1に標準化した一般化正規分布の確率密度関数を返す
パラメータ:
beta : 形状パラメータ
# b) Dilation (Genişletme): Nesnelerin kenarlarına piksel ekleme.
dilation = cv2.dilate(image, kernel, iterations=1)
# Config.ps1
# Default configuration path
$script:DEFAULT_CONFIG_PATH = Join-Path $PSScriptRoot "config.json"
# Global configuration object
$script:GlobalConfig = $null
function Initialize-Config {
param (
@CozmaRares
CozmaRares / Makefile
Created February 11, 2025 16:57
cpp makefile example
STDVER = c++17
CXX = g++
CXXFLAGS = \
-Wall -Wextra -Wcast-qual -Wshadow -Wconversion -Wpedantic -Werror \
-fdiagnostics-color=always -fno-exceptions \
-O2 -std=$(STDVER)
SRCDIR = src
SRCS = $(shell find $(SRCDIR) -name "*.cpp")
# a) Erosion (Aşındırma): Nesnelerin kenarlarından piksel kaybı sağlar.
erosion = cv2.erode(image, kernel, iterations=1)