Skip to content

Instantly share code, notes, and snippets.

View Auth0rM0rgan's full-sized avatar
:octocat:
Busy

Author Morgan Auth0rM0rgan

:octocat:
Busy
  • @own_business
  • FindMe
View GitHub Profile
@Chris-hughes10
Chris-hughes10 / timm.ipynb
Last active April 23, 2024 07:51
timm.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vertix
vertix / tf_data_augmentation_on_gpu.py
Last active April 9, 2022 20:55
TF data augmentation on GPU
def augment(images, labels,
resize=None, # (width, height) tuple or None
horizontal_flip=False,
vertical_flip=False,
rotate=0, # Maximum rotation angle in degrees
crop_probability=0, # How often we do crops
crop_min_percent=0.6, # Minimum linear dimension of a crop
crop_max_percent=1., # Maximum linear dimension of a crop
mixup=0): # Mixup coeffecient, see https://arxiv.org/abs/1710.09412.pdf
if resize is not None:
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip
# Unzip
unzip protoc-3.3.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@nathakits
nathakits / README.md
Last active August 25, 2023 17:59
Creating a `.desktop` file in Ubuntu that launches a Python script

Creating a .desktop file in Ubuntu that launches a Python script

Here we will make two .desktop files that will launch Pupil Capture and Pupil Player.

Steps

  1. Right click on your desktop and create a new empty document.
  2. Set the document file type by Renaming the document that ends with .desktop
  3. Drag the document into a text editor and edit the document with the example code below

Note: Change the X-Icon-Path to the icon you want to use and Execpath to where Pupil Capturemain.py` is located on your machine (see example pupil.desktop for reference)