Skip to content

Instantly share code, notes, and snippets.

@adrianolszewski
adrianolszewski / quantreg_mww.r
Last active April 16, 2024 19:22
Mann-Whitney (Wilcoxon) and Kruskal-Wallis FAIL to compare medians in general. Quantile regression should be used to compare medians instead
# Let's make some data to play with
set.seed(1234)
v1 <- rexp(500)
v2 <- rnorm(500) + log(2)
v3 <- -rgamma(500, 2.5, 3)
v4 <- runif(500, -2,4)
# Look at the data
layout(matrix(c(1:4), nrow = 2))
@rxaviers
rxaviers / gist:7360908
Last active April 16, 2024 19:22
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@jonico
jonico / count-committers-on-ghes.sh
Last active April 16, 2024 19:20
Count all unique committers in the last 90 days on GitHub Enterprise Server
ghe-console -y <<'ENDSCRIPT'
ActiveRecord::Base.connected_to(role: :reading) do
puts "Version 0.2.0"
emails = Set.new
start_time = 90.days.ago.beginning_of_day
Repository.where(active: true).find_each do |repo|
Push
.where(repository: repo)
.where("created_at >= ?", start_time)
.find_each do |push|
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 16, 2024 19:16
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@MiCurry
MiCurry / argParser.py
Last active April 16, 2024 19:14
ArgParser Example
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Easy way to produce plots of\
3D vector fields in python.')
parser.add_argument('task',
help='task name',
type=str)
parser.add_argument("-f", '--fileNameTag',
help='Appends it to the end of a filename so it can be unique when you plot it',
@williamcaban
williamcaban / Simulating Bare Metal with VirtualBMC.md
Last active April 16, 2024 19:14
Bare Metal IPMI for VMs with Virtual BMC

Simulate Bare-Metal IPMI for VMs in RHEL8 Libvirt

  • Install the Virtual BMC package in the machine to use as the vBMC server. Note1: When using OpenStack repos the python3-virtualbmc RPM might be available. These instrucctions do not use that package.
    pip3 install virtualbmc
    
    • The vBMC server can be running in any machine. When using a remote libvirt server it is recommended to have passwordless authentication from the vBMC server to the libvirt machines.
    • For this document the vBMC Server export vBMCServerIP=192.168.1.13
@martijnrondeel
martijnrondeel / motion_light.yaml
Last active April 16, 2024 19:14
Home Assistant blueprint
blueprint:
name: Motion-activated Light with time condition
description: Turn on a light when motion is detected.
domain: automation
source_url: https://gist.github.com/martijnrondeel/d3b0113036360531d9f52c44a9c55b2c
input:
motion_entity:
name: Motion Sensor
selector:
entity:
@charlesaloaye
charlesaloaye / gist:d5234275c8ed0bb4510ffaa9670d80aa
Last active April 16, 2024 19:14
2024 JETBRAINS ACTIVATION CODE | PHPSTORM | PYCHARM | Expires October 14, 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
@billyshub
billyshub / readme.md
Last active April 16, 2024 19:12
Home Assistant Automations

Intro

Thought I'd share some of my home automations for inspiration. Let me know of any further improvents or even some new ideas you've found useful.

Garage Door Automatically Opens When Arriving Home

What you'll need:

Name URL ~$AU
Sonoff SV link $10
Magnetic switch MC38 link $2.5