This file contains hidden or 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/env python | |
import numpy, pandas, pylab | |
def _return_prob_dist_sub(M = 5, N = 1000000): | |
us = numpy.random.random_sample((M-1, N)) | |
ainits = numpy.zeros((M, N)) | |
# | |
z = numpy.ones( N ) | |
ainits[0,:] = z * us[0,:] |
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="Content-Style-Type" content="text/css" /> | |
<meta name="generator" content="pandoc" /> | |
<title></title> | |
<style type="text/css">code{white-space: pre;}</style> | |
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script> | |
</head> |
This file contains hidden or 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/env python | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
import requests, os, sys | |
from xml.etree import ElementTree | |
""" | |
This will give you the latest information on your USPS package. Just | |
give it the USPS tracking number of your package, and it will give you |
This file contains hidden or 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/env python | |
from icalendar import Calendar, Event | |
from bs4 import BeautifulSoup | |
import pytz, datetime, os, sys | |
from requests.compat import urljoin | |
from optparse import OptionParser | |
def get_events_from_html( htmlfile ): | |
html = BeautifulSoup( open( htmlfile, 'r' ), 'lxml' ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# don't upload the database | |
# app.db | |
*.core | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
# MS word and latex extensions | |
*.bak |
This file contains hidden or 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
# old URL: https://gist.github.com/tanimislam/305f551f09ceaffff2b8e142dd8c5e31 | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
# MS word and latex extensions | |
*.bak | |
*.aux | |
*.log |
This file contains hidden or 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
*.png |
This file contains hidden or 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/env python3 |
This file contains hidden or 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/env python3 | |
""" | |
I developed this Python CLI script to demonstrate creating an MP4 movie from an image sequence. | |
I follow instructions from https://hamelot.io/visualization/using-ffmpeg-to-convert-a-set-of-images-into-a-video. I make an MP4 movie that is 5 FPS with psychovisual quality of 25. | |
""" | |
import os, sys, numpy, subprocess, glob, re, logging, time | |
from PIL import Image | |
from distutils.spawn import find_executable | |
from argparse import ArgumentParser |
OlderNewer