Skip to content

Instantly share code, notes, and snippets.

View pchr8's full-sized avatar

Serhii Hamotskyi pchr8

View GitHub Profile
@janert
janert / hugo-survival-guide.md
Last active July 24, 2025 23:30
A Hugo Survival Guide

A Hugo Survival Guide

Hugo is a static site generator: it takes some plain-text content, marries it to a bunch of HTML templates, and produces a set of complete, static HTML pages that can be served by any generic, stand-alone web server. Simple.

Or maybe not. Hugo does a lot of things automatically, relying on conventions and implicit rules, rather than on explicit configuration. For example, it tries to match each piece of content with the most

@lassoan
lassoan / FillHolesInSegments.py
Last active September 24, 2024 21:21
Fills all internal holes inside segments. For example, fills in empty regions inside vertebral bodies segmented with Grow from seeds with intensity-based masking.
segmentationNode = slicer.mrmlScene.GetFirstNodeByClass('vtkMRMLSegmentationNode')
# set value to the size of the larges cracks in the segment surfaces
maximumHoleSizeMm = 2.0
############
masterVolumeNode = segmentationNode.GetNodeReference(segmentationNode.GetReferenceImageGeometryReferenceRole())
# Create segment editor to get access to effects
segmentEditorWidget = slicer.qMRMLSegmentEditorWidget()
# To show segment editor widget (useful for debugging):
@myksao
myksao / modify.py
Last active June 14, 2022 18:42
Modifying Document in Spacy Using Python
#I won't go through the process of installation in this article,want to go straight to the point but
#there are some few things i would like you to always put in mind;
#I will be talking about how to remove text in Doc object in this Part
#Doc - Document
#Spacy document 'Doc' i.e. Doc works with words and sentences object
@gene1wood
gene1wood / 01-explanation-of-python-logging-and-the-root-logger.md
Last active May 16, 2025 07:16
Explanation of the relationship between python logging root logger and other loggers

Explanation of the relationship between python logging root logger and other loggers

@ei-grad
ei-grad / .Xdefaults
Created August 14, 2012 01:47
My urxvt config.
!! Appearance
urxvt.termName: rxvt-unicode
urxvt.scrollBar: false
urxvt.background: black
urxvt.foreground: gray
!! Font prefferenes
urxvt.font: xft:DejaVu Sans Mono:pixelsize=13
urxvt.boldFont: xft:DejaVu Sans Mono:pixelsize=13:weight=bold
urxvt.letterSpace: -1
!! Larger history limit
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000