Skip to content

Instantly share code, notes, and snippets.

@mirceast
mirceast / Inference_PyTorch.py
Last active May 21, 2024 09:49
Inference with PyTorch
# Add the path to torchvision - change as needed
import sys
sys.path.insert(0, '/home/mircea/python-envs/env/lib/python3.6/site-packages/vision')
# Choose an image to pass through the model
test_image = 'images/dog.jpg'
# Imports
import torch, json
import numpy as np
@simonista
simonista / .vimrc
Last active May 21, 2024 09:46
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@varqox
varqox / recording_application_and_microphone.md
Last active May 21, 2024 09:46
How to record multiple applications and microphone into one audio file on Linux using PulseAudio

How to record multiple applications and microphone into one audio file on Linux

Step 0. Terminology

Sinks are for output, sources are for input. To stream source to sink a loopback must be created. More shall you find there.

Step 1. Create output sink that will be recorded

Our output sink will be named recording.

pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording
@roustem
roustem / openssl.md
Created July 29, 2018 17:56 — forked from NoMan2000/openssl.md
Common OpenSSL Commands with Keys and Certificates

Common OpenSSL Commands with Keys and Certificates

SSL Info

Generate RSA private key with certificate in a single command

openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar

Generate Certificate Signing Request (CSR) from private key with passphrase

openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar

@rhshah
rhshah / pip.md
Created January 16, 2018 22:27 — forked from saurabhshri/pip.md
Install and use pip in a local directory without root/sudo access.

#Install and use pip in a local directory without root/sudo access. #####By: @saurabhshri

##Why? Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

##How?

@soerenkornetzki
soerenkornetzki / dotnet-framework-and-dotnet-standard-compatibility-list-with-operating-systems.md
Last active May 21, 2024 09:40
.NET Framework (and .NET Standard) Compatibility List with Operating Systems

.NET Framework (and .NET Standard) Compatibility List with Operating Systems

This summary/conclusion will not be updated anymore. I have switched to .NET 5 completely, which runs on Windows 7 SP1 and newer.

For class libraries, I will use the targets .NET Standard 1.1, 2.0 and 2.1 at the same time, together with .NET Framework 2.0 and 4.0. Applications on the other hand will always targeted to .NET 5.0 only.

Recommended minimum system requirements

@deltheil
deltheil / gist:2916633
Created June 12, 2012 09:54
JPEG images: EXIF orientation
# 1/ Read EXIF orientation flag
identify -format "%[EXIF:orientation]" myimage.jpg
# NOTE: jhead can be used too
# see http://www.sentex.net/~mwandel/jhead/
jhead -exifmap myimage.jpg | grep Ori
# 2/ Remove EXIF orientation
# i.e. rotate the image accordingly and reset the orientation
# flag to 1 (default, i.e. origin = TopLeft)
@IMLaoJI
IMLaoJI / LLM.md
Created May 21, 2024 09:33 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@rain-1
rain-1 / LLM.md
Last active May 21, 2024 09:33
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@icedterminal
icedterminal / vmxfile.md
Last active May 21, 2024 09:30
Hide VM status in guest OS (VMWare)

Hide VM Identification in VMWare (Stealthy)

Tested using WorkStation Pro 16.x, Windows host and guest in UEFI mode, using an Intel CPU.

  1. Create a Windows 10 VM.
  2. Edit VM settings Processor section. Enable (tick) these:
    • Virtualize Intel VT-x/AMD-V
    • Virtualize CPU Performance Counters
    • Virtualize IOMMU
  3. Install Windows 10 in VM.