Skip to content

Instantly share code, notes, and snippets.

View lucidBrot's full-sized avatar

Eric Mink lucidBrot

View GitHub Profile
@sneakers-the-rat
sneakers-the-rat / clean_pdf.sh
Last active February 14, 2024 16:52
Strip PDF Metadata
# --------------------------------------------------------------------
# Recursively find pdfs from the directory given as the first argument,
# otherwise search the current directory.
# Use exiftool and qpdf (both must be installed and locatable on $PATH)
# to strip all top-level metadata from PDFs.
#
# Note - This only removes file-level metadata, not any metadata
# in embedded images, etc.
#
# Code is provided as-is, I take no responsibility for its use,
@d4rkeagle65
d4rkeagle65 / Disable-WindowsHello.ps1
Created August 5, 2021 13:36
Small script to disable Windows Hello Pin and Biometrics. This will disable the prompt the user to set one up, and will remove any existing pin/biometrics already set. Reboot required after running.
Set-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\System -Name 'AllowDomainPINLogon' -Value 0
Set-ItemProperty HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Settings\AllowSignInOptions -Name 'value' -Value 0
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\' -Name 'Biometrics' -Force
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Biometrics' -Name 'Enabled' -Value 0 -PropertyType Dword -Force
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\' -Name 'PassportforWork' -Force
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\PassportforWork' -Name 'Enabled' -Value 0 -PropertyType Dword -Force
Start-Process cmd -ArgumentList '/s,/c,takeown /f C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\NGC /r /d y & icacls C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\NGC /grant administrators:F /t & RD /S /Q C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\Ngc & MD C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\Ngc & icacls C:\Wi
@mihaidusmanu
mihaidusmanu / COLMAP_Leonhard.md
Last active April 19, 2022 15:44
COLMAP on Leonhard

Compiling COLMAP on Leonhard

This is a short tutorial for compiling COLMAP on Leonhard with GCC 6.3.0. Qt installation is quite large so COLMAP cannot be compiled in the home directories.

Modules and Paths

Create a file called colmap_startup.sh in your home directory containing the following:

export DATA=/cluster/project/infk/cvg/$USER
package org.ygl.openrndr.demos
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.DrawPrimitive
import org.openrndr.draw.VertexElementType
import org.openrndr.draw.renderTarget
import org.openrndr.draw.shadeStyle
import org.openrndr.draw.vertexBuffer
import org.openrndr.draw.vertexFormat
package org.ygl.openrndr.demos
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.color.mix
import org.openrndr.color.rgb
import org.openrndr.draw.LineCap
import org.openrndr.draw.LineJoin
import org.openrndr.extra.compositor.compose
import org.openrndr.extra.compositor.draw
def xxxx(x):
if x < 0 :
return 1
xx = 0
for xxx in range(10):
xx += xxxx(x-1-xxx)
return xx
xxxxxx = [0x370, 0x3aa, 0x1d3, 0x1f8, 0xaa, 0x244, 0x324, 0x2ad, 0x226, 0x224, 0x3dc, 0x2a9, 0x96, 0x13b, 0x9b, 0x251, 0x1e1, 0x7b, 0x317, 0x14f, 0x239, 0x29d, 0x18e, 0xac, 0x18e, 0x33a, 0x35, 0x45, 0x8b, 0xc0, 0x38e, 0x9e, 0x10d, 0x38c, 0x3cd, 0x193, 0x190, 0x16e, 0x35a, 0x5f, 0x66, 0x18d, 0x38, 0x3ce, 0x3c8, 0x239, 0xb4, 0x3b6, 0x3fb, 0x18d, 0xa9, 0x3fe, 0x32, 0x3a2, 0x25c, 0x90, 0x213, 0x3fb, 0x18b, 0x84, 0x2ba, 0x3e7, 0x32f, 0x327, 0x28f, 0x89, 0x20f, 0x10, 0x29, 0x35f, 0xbd, 0x32a, 0x2af, 0x1d5, 0x2d5, 0xd2, 0x88, 0x106, 0x3b9, 0x180, 0x240, 0x10d, 0x2c7, 0x5d, 0x1a1, 0x269, 0x185, 0x111, 0x327, 0x3c9, 0x21b, 0x4f, 0x37a, 0x233, 0x66, 0x148, 0xf5, 0x29e, 0x289, 0x284, 0x3a9, 0x122, 0x211, 0x33a, 0x17, 0xae, 0x33b, 0x1f1, 0x12f, 0x97, 0x23e, 0x11b, 0x140, 0x185, 0x2c1, 0x219, 0x1a, 0x23d, 0x35c, 0x20a, 0x309, 0x1a5, 0x189, 0x143, 0x142, 0x2dd, 0x14, 0x258, 0x2f9, 0x9b, 0x2e7, 0x396, 0x25b, 0x1ab, 0x297, 0x
@xmodar
xmodar / covariance.py
Last active December 25, 2023 07:37
torch.cov and torch.corrcoef equivalent to np.cov and np.corrcoef, respectively with gradient support.
# https://github.com/pytorch/pytorch/issues/19037
# https://discuss.pytorch.org/t/covariance-and-gradient-support/16217
def cov(tensor, rowvar=True, bias=False):
"""Estimate a covariance matrix (np.cov)"""
tensor = tensor if rowvar else tensor.transpose(-1, -2)
tensor = tensor - tensor.mean(dim=-1, keepdim=True)
factor = 1 / (tensor.shape[-1] - int(not bool(bias)))
return factor * tensor @ tensor.transpose(-1, -2).conj()
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@serycjon
serycjon / filter_events.py
Created September 20, 2018 09:33
Filter tensorflow event files
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
import argparse
import tqdm
import tensorflow as tf
@mvsde
mvsde / android-volume-steps.md
Last active April 14, 2024 00:04
Android Volume Steps

Android Volume Steps

Warning

This is a rather old guide and may or may not work with modern versions of Android.

Connect through ADB

  1. Boot into TWRP
  2. Connect device to computer
  3. Terminal: List devices with adb devices