Skip to content

Instantly share code, notes, and snippets.

View beosro's full-sized avatar
💭
Grabbing info!

beosro

💭
Grabbing info!
View GitHub Profile
@beosro
beosro / !Selecting Objects in QuPath
Created December 3, 2023 11:00 — forked from Svidro/!Selecting Objects in QuPath
Selecting things in QuPath
Scripts mostly taken from Pete, and also from the forums. For easy access and reference.
Covers both Selecting, which is necessary to run most commands like cell detection, and collecting objects into a variable
for processing. The latter is more efficient when you do not need to run a command like cell detection.
TOC
A Selection guide.groovy - not actually a script, just a collection of useful tips.
Access top level objects.groovy - Creates a list of all objects at the "top" of the hierarchy. This list is dynamic.
@beosro
beosro / !Making Measurements in QuPath
Created December 3, 2023 11:00 — forked from Svidro/!Making Measurements in QuPath
Making Measurements in QuPath
Collections of scripts harvested mainly from Pete, but also picked up from the forums
TOC
Accessing dynamic measurements.groovy - Most annotation measurements are dynamically created when you click on the annotation, and
are not accessible through the standard getMeasurement function. This is a way around that.
Affine transformation.groovy - access more accurate measurements for the affine transformation used in the image alignment (m5/m6+)
Alignment of local cells.groovy - check neighborhood for similarly aligned cells
@beosro
beosro / !Classifying objects in QuPath
Created December 3, 2023 10:58 — 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
@beosro
beosro / nvm.md
Created January 12, 2023 23:21 — forked from ybhwang/nvm.md

nvm allows you to quickly install and use different versions of node via the command line.

curl

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
@beosro
beosro / config.md
Created December 14, 2021 13:21 — forked from 0XDE57/config.md
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@beosro
beosro / yolov4.py
Created August 13, 2021 17:20 — forked from YashasSamaga/yolov4.py
CUDA4DNN YOLOv4 Discussion
import cv2
import time
CONFIDENCE_THRESHOLD = 0.2
NMS_THRESHOLD = 0.4
COLORS = [(0, 255, 255), (255, 255, 0), (0, 255, 0), (255, 0, 0)]
class_names = []
with open("classes.txt", "r") as f:
class_names = [cname.strip() for cname in f.readlines()]
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@beosro
beosro / Arch Linux Ngnix|PHP Server.md
Created May 18, 2021 17:34 — forked from anthillsocial/Arch Linux Ngnix|PHP Server.md
Setting up an Arch linux server on the Raspberry Pi. The sever uses a combination of Nginx and php

Burn the SD card

  1. Check the downloaded img is ok by comparing checksum: $ sha1sum archlinux-hf-2013-07-22.img.zip
  2. Burn the image to a new SD card: $ cd Downloads $ sudo umount /dev/mmcblk0* $ sudo dcfldd bs=4M if=archlinux-hf-2013-07-22.img of=/dev/mmcblk0
  3. Plug your Rpi into an ethernet network.
  4. Find its IP address with: $ sudo nmap -sP 192.168.1.0/24
@beosro
beosro / gist:97a5ebb42cd4fe74248753029a1e2782
Created April 24, 2021 00:05 — forked from holms/gist:5005629
midnight commander dark color theme
Edit mc’s ini file (either ~/.mc/ini or ~/.config/mc/ini) and look for the line [Colors]. Then, change the line base_color to this:
[Colors]
base_color=linux:normal=white,black:marked=yellow,black:input=,green:menu=black:menusel=white:menuhot=red,:menuhotsel=black,red:dfocus=white,black:dhotnormal=white,black:dhotfocus=white,black:executable=,black:directory=white,black:link=white,black:device=white,black:special=white,black:core=,black:stalelink=red,black:editnormal=white,black