Skip to content

Instantly share code, notes, and snippets.

View lalamax3d's full-sized avatar

Haseeb Ahmed lalamax3d

View GitHub Profile
@fredrikaverpil
fredrikaverpil / custom_ui_docked.py
Last active December 1, 2022 16:29
Create custom PySide GUI and dock it into Nuke UI
import PySide.QtCore as QtCore
import PySide.QtGui as QtGui
from nukescripts import panels
class PanelTest(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setLayout(QtGui.QVBoxLayout())
self.myTable = QtGui.QTableWidget()
self.myTable.header = ['Date', 'Files', 'Size', 'Path' ]
@mozillazg
mozillazg / bobp-python.md
Created November 16, 2015 06:14 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@sbrl
sbrl / renderer.js
Last active January 30, 2018 22:57
An ES6 template for a HTML5 canvas experiment. #template #html5-canvas
"use strict";
/**
* @template https://gist.github.com/sbrl/f8b584a383116b38da29
*/
class Renderer
{
constructor(canvas)
{
this.canvas = canvas;
@wckdouglas
wckdouglas / chromeos_setup.md
Last active January 13, 2019 18:02
setting up chromebook for developer

Computing environment setup guide for chromebooks

Douglas Wu


This is a note for myself to setup a developer environment on chromebook without using crouton (Running Linux GUI on chromeOS). I chose chromebrew since it is just a CLI interface and doesn't require running anything on top of any apps. And I am also a fan of miniconda, which works well on the linux kernal of ChromeOS.

  1. Get into developer mode, go to terminal and enter shell.

  2. Install chromebrew:

@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active November 12, 2024 14:35
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@hiwonjoon
hiwonjoon / python-ffmpeg.py
Last active November 26, 2023 16:11
ffmpeg and ffprobe subprocess call in python; extract specific frame at some timepoint, extract duration of a video
import subprocess
import datetime
import numpy as np
THREAD_NUM=4
def get_video_info(fileloc) :
command = ['ffprobe',
'-v', 'fatal',
'-show_entries', 'stream=width,height,r_frame_rate,duration',
@dmahugh
dmahugh / comparision.py
Created May 23, 2017 17:21
comparison of asynchronous HTTP requests (aiohttp/asyncio) and traditional sequential requests (with Requests library)
"""Comparison of fetching web pages sequentially vs. asynchronously
Requirements: Python 3.5+, Requests, aiohttp, cchardet
For a walkthrough see this blog post:
http://mahugh.com/2017/05/23/http-requests-asyncio-aiohttp-vs-requests/
"""
import asyncio
from timeit import default_timer
@mozillazg
mozillazg / app.py
Created December 5, 2017 00:06
A simple demo for how to use flask-paginate.
from flask import Flask, render_template
from flask_paginate import Pagination, get_page_args
app = Flask(__name__)
app.template_folder = ''
users = list(range(100))
def get_users(offset=0, per_page=10):
@bogdan-kulynych
bogdan-kulynych / install-cuda-10-bionic.sh
Last active October 17, 2024 23:17
Install CUDA 10 on Ubuntu 18.04
# WARNING: These steps seem to not work anymore!
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
@howiemnet
howiemnet / Particle resizer.vex.cpp
Last active July 11, 2022 18:04
Houdini Particle distance resizer
// NOTE: ignore the .cpp extension on the filename - this is VEX
// but I couldn't find a gist-friendly way to syntax-hilight it
// ¯\_(ツ)_/¯
//
// h's magic adaptive point resizer for optimal
// rendering of tiny points/particles/wires
//
// 1/2/2018 [email protected]
// CC-0 - use and abuse