Skip to content

Instantly share code, notes, and snippets.

View sbalci's full-sized avatar
πŸ”¬
πŸ”¬πŸ‘€πŸ“‘πŸ—ƒπŸ“ŠπŸ¨πŸ—„πŸ“‡πŸ“–βš—πŸ“πŸŽΆπŸ“ˆπŸ“‰πŸ“ƒπŸ–πŸ”¬πŸ”¬πŸ‹πŸ»β€β™‚πŸš΄πŸ»β€β™‚πŸš™πŸ‘¨β€πŸ’»πŸ€·β€β™‚πŸ“ΈπŸ“ΊπŸŽ›πŸ”­πŸ”¬πŸ’ŠπŸ”πŸ«πŸŒΈ

Serdar BalcΔ± sbalci

πŸ”¬
πŸ”¬πŸ‘€πŸ“‘πŸ—ƒπŸ“ŠπŸ¨πŸ—„πŸ“‡πŸ“–βš—πŸ“πŸŽΆπŸ“ˆπŸ“‰πŸ“ƒπŸ–πŸ”¬πŸ”¬πŸ‹πŸ»β€β™‚πŸš΄πŸ»β€β™‚πŸš™πŸ‘¨β€πŸ’»πŸ€·β€β™‚πŸ“ΈπŸ“ΊπŸŽ›πŸ”­πŸ”¬πŸ’ŠπŸ”πŸ«πŸŒΈ
View GitHub Profile
@sbalci
sbalci / delete_git_submodule.md
Created January 11, 2022 16:49 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@sbalci
sbalci / readme.md
Created October 2, 2021 19:51 — forked from Menencia/readme.md
Script to update a git project

Update a git repo

With this script, you can easily update a git repo.

Install

curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/update.sh > update.sh
curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/version.sh > version.sh
@sbalci
sbalci / github.R
Created September 11, 2021 19:47 — forked from z3tt/github.R
Configure GitHub for Rstudio
#### 1. Sign up at GitHub.com ################################################
## If you do not have a GitHub account, sign up here:
## https://github.com/join
# ----------------------------------------------------------------------------
#### 2. Install git ##########################################################
## If you do not have git installed, please do so:
@sbalci
sbalci / AperioToQuPath.groovy
Created June 28, 2021 12:34 — forked from DanaCase/AperioToQuPath.groovy
Convert Exported Aperio Image Scope Annotations to QuPath Annotations
import qupath.lib.scripting.QP
import qupath.lib.geom.Point2
import qupath.lib.roi.PolygonROI
import qupath.lib.objects.PathAnnotationObject
import qupath.lib.images.servers.ImageServer
//Aperio Image Scope displays images in a different orientation
def rotated = true
@sbalci
sbalci / block.R
Created June 10, 2021 15:37 — forked from krlmlr/block.R
Block assigning to a variable more than once
`<-` <- function(lhs, rhs, envir = parent.frame()) {
assign(as.character(substitute(lhs)), rhs, envir)
lockBinding(substitute(lhs), envir)
invisible(rhs)
}
@sbalci
sbalci / !Classifying objects in QuPath
Created April 13, 2021 14:34 — forked from Svidro/!Classifying objects in QuPath
Classification based groovy scripts for QuPath
Collection of scripts mostly from Pete, but also taken from the forums. Note you can always run a saved classifier using the
runClassifier() command, with the file path included as a string.
TOC
A simple cell classifier.groovy - One way to classify cells.
A simple classifier 2.groovy - Another way.
Annotation Classifications to Name field.groovy - Sets the Name of the annotation to its classification. Useful for applying a second
<?php
/*
Add bcc for checkout emails
*/
function my_pmpro_email_headers_admin_emails($headers, $email)
{
//bcc checkout emails
if($email->template == "membership_expiring" || $email->template == "membership_expired")
{
//add bcc
@sbalci
sbalci / QuPath_cells_to_areas.groovy
Created February 24, 2021 15:45 — forked from petebankhead/QuPath_cells_to_areas.groovy
QuPath script to calculate areas (e.g. of tumor) based upon classified cells only
/**
* QuPath script to calculate areas (e.g. of tumor) based upon classified cells only.
*
* It works by using a distance transform applied to binary images generated from the
* objects of each class, and then assigns each pixel to the closest object.
*
* Having done this, new annotations are generated for these regions.
*
* WARNINGS!
* - This will remove *all* previous annotations & replace them with new annotations
@sbalci
sbalci / repo-reset.md
Created January 31, 2021 16:14 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A