A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
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' ] |
"use strict"; | |
/** | |
* @template https://gist.github.com/sbrl/f8b584a383116b38da29 | |
*/ | |
class Renderer | |
{ | |
constructor(canvas) | |
{ | |
this.canvas = canvas; |
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.
Get into developer mode, go to terminal and enter shell.
Install chromebrew:
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.
Name | Stars | Last Commit | Description |
---|---|---|---|
three.js | ![GitHub |
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', |
"""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 |
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): |
# 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 |
// 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 |