v4.42.0 (2020-01-24)
Implemented enhancements:
""" | |
This creates the following GIF, where the text appears to be "embedded" | |
in the video and "disappears" behind rapunzel. | |
http://i.imgur.com/gxEHfLX.gif | |
""" | |
from moviepy.editor import * | |
import numpy as np | |
import skimage.morphology as skm |
## issue: https://bugs.python.org/issue19264 | |
import ctypes | |
import subprocess | |
import _subprocess | |
from ctypes import byref, windll, c_char_p, c_wchar_p, c_void_p, \ | |
Structure, sizeof, c_wchar, WinError | |
from ctypes.wintypes import BYTE, WORD, LPWSTR, BOOL, DWORD, LPVOID, \ | |
HANDLE |
import os | |
import argparse | |
import nibabel as nib | |
def build_argparser(): | |
DESCRIPTION = "Convert tractograms (TRK -> TCK)." | |
p = argparse.ArgumentParser(description=DESCRIPTION) | |
p.add_argument('tractograms', metavar='bundle', nargs="+", help='list of tractograms.') | |
p.add_argument('-f', '--force', action="store_true", help='overwrite existing output files.') |
#!/usr/bin/env python | |
# | |
# Flattened nested dict | |
# Copyright (C) 2017 Larroque Stephen | |
# | |
# Licensed under the MIT License (MIT) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
These two files, pdf_linkchecker.py
and pdf_fontchecker.py
are code examples to go along with a blog article: http://reachtim.com/articles/PDF-Testing.html
See the article for details on how to test your PDFs for broken internal and external links and for unembedded fonts.
import os | |
import math | |
import time | |
import numpy | |
import pandas | |
import random | |
import matplotlib | |
import numpy.random as nrand | |
import matplotlib.pylab as plt | |
from sklearn.preprocessing import normalize |
def get_probability(self, d, y, x, n, c): | |
""" | |
This gets the probability of drop / pickup for any given Datum, d | |
:param d: the datum | |
:param x: the x location of the datum / ant carrying datum | |
:param y: the y location of the datum / ant carrying datum | |
:param n: the size of the neighbourhood function | |
:param c: constant for convergence control | |
:return: the probability of | |
""" |
import dis | |
import types | |
def getFuncByName(fname): | |
possibles = globals().copy() | |
possibles.update(locals()) | |
f = possibles.get(fname) | |
if f: | |
return f | |
else: |
<?php // Import a zip file and extract it | |
$custom_max_time = 10; | |
$custom_wait_time = 45; | |
$random_wait_time = 5; // plus or minus this value. Set to 0 or false to disable. | |
$time_start = time(); | |
$max_time = ini_get("max_execution_time"); | |
$wait_time = 5; | |
if (!empty($custom_max_time) and $custom_max_time > 0 and $custom_max_time < $max_time) $max_time = $custom_max_time; |