test
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
"""Get useful information from live Python objects. | |
This module encapsulates the interface provided by the internal special | |
attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. | |
It also provides some help for examining source code and class layout. | |
Here are some of the useful functions provided by this module: | |
ismodule(), isclass(), ismethod(), isfunction(), isgeneratorfunction(), | |
isgenerator(), istraceback(), isframe(), iscode(), isbuiltin(), |
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 foo(): | |
print("one tab") | |
print("eight spaces") |
A basic HTML bar chart. Part of the Let’s Make a Bar Chart tutorial.
test
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 numpy as np | |
from numpy.fft import fft, fftshift, ifft, fftfreq | |
L = 10 | |
n = 128 | |
x2 = np.linspace(-L, L, n + 1) | |
x = x2[1:] | |
# k = (2 * np.pi / L) * np.concatenate((np.arange(0, n/2), np.arange(-n/2 + 1, 1))) |
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
class primes(): | |
def __init__(self): | |
self.primes_list = [2,3] | |
self.generator = self.generator() | |
def _append_if_no_prime_divides(self,q): | |
is_prime = not any( q % p == 0 for p in self.primes_list) | |
if is_prime: | |
self.primes_list.append(q) | |
return is_prime |
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
file_list = ["10.1.1.111.1781.pdf", "10.1.1.111.5264.pdf", "10.1.1.39.1596.pdf", "10.1.1.41.8589.pdf", "10.1.1.42.5619.pdf"] | |
apps_list = [ | |
"/Applications/Adobe Reader 9/Adobe Reader.app/Contents/MacOS/AdobeReader", | |
"/Applications/Adobe Reader.app/Contents/MacOS/AdobeReader", | |
"/Applications/Preview.app/Contents/MacOS/Preview"] | |
fuzz_output = "fuzz.pdf" | |
FuzzFactor = 250 |
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 f(): | |
a=1 | |
def g(): | |
print a | |
g() | |
f() |
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 f(): | |
a = 2 | |
b = 1 | |
def g(): | |
#a = 3 | |
b = 2 | |
c = 1 | |
print dict(globals(), **locals()) #prints a=1, but we want a=2 (from f) | |
g() | |
a = 1 |