Skip to content

Instantly share code, notes, and snippets.

View free udemy courses
Pessoal, a Udemy tornou gratuito até amanhã diversos cursos da área de programação e tecnologia. Corre lá e já adiciona todos na sua conta.
Cursos pagos que estão de graça na Udemy até amanhã!
Python: https://lnkd.in/epdtT8Y
Ionic 3: https://lnkd.in/e8mdY4V
HTML5: https://lnkd.in/eRZVUSN
Android: https://lnkd.in/eHg7kbz
C++: https://lnkd.in/eZvb4rV
Python: https://lnkd.in/ekavMui
C e C++: https://lnkd.in/eKUJ97p
Unity 5: https://lnkd.in/e-ftZCJ
View vtkLogoRepresentation-bug.py
from vtk import *
colors = vtkNamedColors()
colors.SetColor("Bkg", 0.2, 0.3, 0.4)
sphereSource = vtkSphereSource()
sphereSource.SetCenter(0.0, 0.0, 0.0)
sphereSource.SetRadius(4.0)
sphereSource.SetPhiResolution(4)
sphereSource.SetThetaResolution(8)
View vtk-meta.yaml
# This file created by conda-build 2.1.17
# meta.yaml template originally from:
# C:\projects\vtk-feedstock\recipe, last modified Tue Oct 17 23:17:50 2017
# ------------------------------------------------
package:
name: vtk
version: 7.1.1
source:
fn: VTK-7.1.1.tar.gz
View shared_vtkpoints.py
#!/usr/bin/env python
# This example attempts to render 2 poly datas that share the same vtkPoints
import vtk
# Create 8 points
points = vtk.vtkPoints()
points.InsertPoint(0, 0.0, 0.0, 0.0)
points.InsertPoint(1, 0.0, 1.0, 0.0)
View raise.py
import weakref
def inner():
raise RuntimeError()
def outer(obj):
try:
inner()
except RuntimeError as e:
n = RuntimeError()
View ren_pytest_prefix.py
import os
import fnmatch
import sys
import subprocess
directory = sys.argv[1]
for root, dirs, names in os.walk(sys.argv[1]):
for name in names:
if fnmatch.fnmatch(name, 'pytest_*.py') and os.path.basename(root) == '_tests':