Skip to content

Instantly share code, notes, and snippets.

@amir-saniyan
amir-saniyan / 3- Algorithms for DNA Sequencing.md
Last active August 7, 2026 00:27
Algorithms for DNA Sequencing

01_dna-sequencing-strings-and-matching/02_module-1-dna-sequencing-strings-and-matching/01_module-1-introduction

مقدمه‌ای بر توالی‌یابی DNA، رشته‌ها و تطبیق الگوها

Introduction to DNA Sequencing, Strings and Matching


خلاصه کلی

@amir-saniyan
amir-saniyan / 2- Python for Genomic Data Science.md
Created August 7, 2026 00:26
Python for Genomic Data Science

01_week-one/01_module-1/04_lecture-1-overview-of-python

01 — Overview of Python

مرور کلی زبان پایتون در علم داده‌های ژنومی

خلاصه کلی

در این درس، زبان برنامه‌نویسی Python معرفی می‌شود و نقش آن در حوزه Genomic Data Science و Bioinformatics بررسی می‌گردد. هدف اصلی این بخش، آشنایی اولیه با دلیل اهمیت یادگیری برنامه‌نویسی برای زیست‌شناسان، اصول طراحی یک برنامه، ویژگی‌های زبان Python و تاریخچه توسعه آن است.

@amir-saniyan
amir-saniyan / 1- Introduction to Genomic Technologies.md
Created August 7, 2026 00:26
Introduction to Genomic Technologies

01_overview - 01_overview - 03_why-genomics.en

جزوه درس: چرا ژنومیکس (Genomics) را مطالعه می‌کنیم؟


خلاصه کلی

موضوع درس

@amir-saniyan
amir-saniyan / Modern Git Workflow.md
Last active August 1, 2026 16:42
Modern Git Workflow on GitHub

Modern Git Workflow on GitHub

Based on: GitHub Flow + Conventional Commits + Squash Merge + Semantic Versioning

1. Core Philosophy

  • One permanent branch: main
  • All work happens in short-lived branches
  • No direct push to main
  • Pull Requests are required for all production changes
@amir-saniyan
amir-saniyan / The Go Programming Language Specification Persian.md
Created May 13, 2026 09:30
مشخصات زبان برنامه‌نویسی گو

مشخصات زبان برنامه‌نویسی Go

@amir-saniyan
amir-saniyan / vtk-2d-pipeline-minimal.py
Last active December 27, 2025 00:51
VTK 2D Pipeline
import sys
from pathlib import Path
import vtkmodules.all as vtk
from PySide6.QtWidgets import QApplication, QMainWindow
from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
IMAGE_PATH = "test.png"
@amir-saniyan
amir-saniyan / git-pull-all.sh
Created September 29, 2024 13:38
Pull all subdirectory repositories script (two level nested)
#!/usr/bin/env bash
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd "$SCRIPTPATH"
for dir in */ ; do
echo "$dir"
cd "$SCRIPTPATH/$dir"
@amir-saniyan
amir-saniyan / aes.py
Created September 24, 2024 10:53
Python 3 - Encrypt/Decrypt using AES 256
# Python 3 - Encrypt/Decrypt using AES 256
# pip install pycryptodome
# Crypto.__version__ == 3.20.0
import base64
import hashlib
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
@amir-saniyan
amir-saniyan / image_cropper.py
Last active October 17, 2024 03:59
Image Cropper
class ImageCropper:
@staticmethod
def crop(image, x, y, width, height):
try:
image_width = image.shape[1]
image_height = image.shape[0]
x = max(0, min(image_width - 1, x))
y = max(0, min(image_height - 1, y))