Skip to content

Instantly share code, notes, and snippets.

@alchem0x2A
alchem0x2A / blender_venv.org
Last active May 29, 2024 13:14
Enable 3rd-party packages in Blender using virtualenv

Install external python packages + virtualenv with Blender

Requirements: Blender 2.80+ (2.79 should also work with pip method, not tested thoroughly)

Step 1: Install virtualenv on the system

In order not to mix the packages installed for Blender (such as scipy, matplotlib) with those system-wide packages, we need to create a virtual environment for the Blender alone.

Best practice is to use a single virtualenv for each version of

@seancoyne
seancoyne / fix-google-drive-menu-bar-icons.sh
Created October 21, 2014 15:34
Fix Google Drive Yosemite Dark Mode Menu Bar Icons
#!/usr/bin/env bash
# change to proper directory
cd /Applications/Google\ Drive.app/Contents/Resources/
# back up the files
sudo mkdir icon-backups
sudo cp mac-animate*.png icon-backups/
sudo cp mac-error*.png icon-backups/
sudo cp mac-inactive*.png icon-backups/
@mattjj
mattjj / chunk_data.py
Last active August 24, 2021 15:11
data chunking with overlapping windows! uses stride tricks so no data is copied; it just produces a view!
from __future__ import division
import numpy as np
from numpy.lib.stride_tricks import as_strided as ast
def chunk_data(data,window_size,overlap_size=0,flatten_inside_window=True):
assert data.ndim == 1 or data.ndim == 2
if data.ndim == 1:
data = data.reshape((-1,1))
# get the number of overlapping windows that fit into the data