This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tool | |
extends MeshInstance | |
export(Image) var heightmap setget set_heightmap, get_heightmap | |
export(float, 0.1, 25, 0.1) var factor = 5 setget set_factor, get_factor | |
export(int, 1, 500) var resolution = 32 setget set_resolution, get_resolution | |
export(int, 1, 200) var size = 50 setget set_size, get_size | |
var mesh_builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vistrails.core.api as API | |
from vistrails.core.modules.basic_modules import create_constant | |
org_vistrails_vistrails_vtk = API.load_package('org.vistrails.vistrails.vtk') | |
org_vistrails_vistrails_vtk_2 = API.load_package('org.vistrails.vistrails.vtk') | |
import requests | |
org_vistrails_vistrails_vtk_3 = API.load_package('org.vistrails.vistrails.vtk') | |
org_vistrails_vistrails_vtk_4 = API.load_package('org.vistrails.vistrails.vtk') | |
import vtk | |
org_vistrails_vistrails_vtk_5 = API.load_package('org.vistrails.vistrails.vtk') | |
from vistrails.core.modules.vistrails_module import ModuleConnector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate num; | |
use num::{Num, One, Zero}; | |
pub fn number_of_factors<T>(target: T) -> T | |
where T: Num + Ord + Copy | |
{ | |
let mut factor_count: T = Zero::zero();; | |
let mut limit: T = target; | |
let mut i: T = One::one(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def draw_line(pixels, origin, destination): | |
x, y = x1, y1 = origin | |
x2, y2 = destination | |
Δx = abs(x2 - x1) | |
Δy = abs(y2 - y1) | |
s1 = sign(x2-x1) | |
s2 = sign(y2-y1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python's handling of certificate verification is irresponsible and wrong. | |
# Having to include the code below to get what should be the only acceptable | |
# default behavior is a shame | |
# Code from https://gist.github.com/schlamar/2993700 | |
import httplib | |
import urllib2 | |
import ssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding=utf-8 | |
# Python version of Zach Holman's "spark" | |
# https://github.com/holman/spark | |
# by Stefan van der Walt <[email protected]> | |
""" | |
USAGE: |