Skip to content

Instantly share code, notes, and snippets.

@awesomez
awesomez / vox_to_obj_AUTO.py
Last active February 2, 2023 04:44 — forked from shivshank/vox_to_obj_exporter.py
Exports from MagicaVoxel VOX to OBJ. Can preserve all edges for easy editing in a program like Blender.
"""
AUTOMATIC drag and drop support for windows (NO PROMPT!)
1. Copy script to directory you want your files copied to.
2. Select the files you want to convert.
3. Drag & drop onto this script to convert .vox to .obj!
Files will be exported to directory of this script.
@kylemcdonald
kylemcdonald / stylegan.ipynb
Created February 5, 2019 16:57
StyleGAN.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattiasarro
mattiasarro / tensorflow_1_6_high_sierra_gpu.md
Last active August 24, 2022 15:24 — forked from orpcam/tensorflow_1_6_rc1_high_sierra_gpu.md
Install Tensorflow 1.6 on macOS High Sierra 10.13.3 with GPU Acceleration (without disabling SIP)

Tensorflow 1.6 on macOS High Sierra 10.13.3 with GPU Acceleration (without disabling SIP)

This gist (based on a blog post at byai.io) documents how to set up TensorFlow 1.6 with (e)GPU support without the need to disable SIP. Following the original gist got me a saystem in which training TF on eGPU was successful, but there were various visual glitches due to the newer / less stable version of the driver.

As pointed out by ronchigram, many people are having issues with newer NVIDIA drivers, so it's worth using the nvidia-update script by Benjamin Dobell that installs the latest stable NVIDIA web driver, and if necessary patches it to run on your system. We also don't need to disable SIP when using nvidia-update.

I have als

@orpcam
orpcam / tensorflow_1_6_rc1_high_sierra_gpu.md
Last active May 16, 2018 19:15
Tensorflow 1.6-rc1 on macOS High Sierra 10.13.3 with GPU Acceleration
@smitshilu
smitshilu / Tensorflow_Build_GPU.md
Last active June 9, 2020 18:27
Tensorflow 1.4 Mac OS High Sierra 10.13 GPU Support

Tensorflow

System information

  • OS - High Sierra 10.13
  • Tensorflow - 1.4
  • Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
  • Cmake - 3.7
  • Bazel - 0.7.0
@daz
daz / generate-silence.sh
Created October 23, 2017 07:25
Generate a silent AAC audio with ffmpeg
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a
@Prasad9
Prasad9 / add_gaussian_noise.py
Last active October 27, 2024 12:52
Python code to add random Gaussian noise on images
import cv2
def add_gaussian_noise(X_imgs):
gaussian_noise_imgs = []
row, col, _ = X_imgs[0].shape
# Gaussian distribution parameters
mean = 0
var = 0.1
sigma = var ** 0.5
@pvieito
pvieito / amfid_patch.py
Created December 27, 2016 00:14
This script can patch macOS 10.12.2 amfid daemon on memory to allow arbitrary entitlements in Developer ID signed binaries.
#!/usr/bin/env python3
'''amfid_patch.py - Pedro José Pereira Vieito © 2016
This script can patch macOS 10.12.2 amfid daemon on memory
to allow arbitrary entitlements in Developer ID signed binaries.
Killing amfid will make the patch disapear:
$ sudo kill -9 `pgrep amfid`
You must run the script as a root (sudo) and with SIP disabled.
@michaelochs
michaelochs / NSFormattingContextDynamic.m
Created December 13, 2016 15:37
`NSFormattingContextDynamic` makes a formatter return string proxies that change based on where you but them inside a format string.
NSDate *date = [NSDate new];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"nl_NL"];
dateFormatter.dateStyle = NSDateFormatterFullStyle;
dateFormatter.formattingContext = NSFormattingContextDynamic; // this is the important setting
NSString *dateString = [dateFormatter stringFromDate:date];
NSString *s1 = [NSString stringWithFormat:@"Foo %@", dateString]; // "Foo dinsdag 13 december 2016"
@steipete
steipete / watchOS-Simulator-Patch.sh
Last active February 3, 2018 23:07
Fixing watchSimulator to allow apps using CoreText or AVFoundation to compile. (Tested with Xcode 8.1GM)
#!/bin/sh
#
# https://gist.github.com/steipete/fc633fe4ac812f5c696c3db6554509a9
# CoreText.framework is missing for the watchOS Simulator (but is available on the device platform SDK)
# https://openradar.appspot.com/27844864
#
# This script is a quick patch to solve this issue, so we are all capable of running CoreText APIs on the Watch simulator too,
# by copying the WatchOS SDK's CoreText header files into the WatchSimulator's. This works great, although since editing the SDK files
# is protected, it needs to be run with sudo.