cd ~/Desktop
mkdir wget-build
cd wget-build
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/env python | |
""" | |
Interactive execution with automatic history, tries to mimic Mathematica's | |
prompt system. This environment's main features are: | |
- Numbered prompts (In/Out) similar to Mathematica. Only actions that produce | |
output (NOT assingments, for example) affect the counter and cache. | |
- The following GLOBAL variables always exist (so don't overwrite them!): | |
_p: stores previous result which generated printable output. |
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
# A xterm-256color based TERMINFO that adds the escape sequences for italic. | |
# | |
# Install: | |
# | |
# tic xterm-256color-italic.terminfo | |
# | |
# Usage: | |
# | |
# export TERM=xterm-256color-italic | |
# |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
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 re | |
def re_sub(pattern, replacement, string): | |
def _r(m): | |
# Now this is ugly. | |
# Python has a "feature" where unmatched groups return None | |
# then re.sub chokes on this. | |
# see http://bugs.python.org/issue1519638 | |
# this works around and hooks into the internal of the re module... |
This file has been truncated, but you can view the full file.
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
from sympy import S | |
######## small size expression | |
smallExpr = S('(((-sin(q1)*sin(q3) + cos(q1)*cos(q2)*cos(q3))*sin(q4) - sin(q2)*cos(q1)*cos(q4))*sin(q1) - ((sin(q1)*cos(q2)*cos(q3) + sin(q3)*cos(q1))*sin(q4) - sin(q1)*sin(q2)*cos(q4))*cos(q1))*(ddq1*sin(q2)*sin(q3) - ddq2*((-sin(q1)*cos(q3) - sin(q3)*cos(q1)*cos(q2))*sin(q1) - (-sin(q1)*sin(q3)*cos(q2) + cos(q1)*cos(q3))*cos(q1)) - ddq3*(-(-sin(q1)*cos(q3) - sin(q3)*cos(q1)*cos(q2))*sin(q2)*cos(q1) - (-sin(q1)*sin(q3)*cos(q2) + cos(q1)*cos(q3))*sin(q1)*sin(q2) - sin(q2)*sin(q3)*cos(q2)) - ddq4*((-sin(q1)*cos(q3) - sin(q3)*cos(q1)*cos(q2))**2 + (-sin(q1)*sin(q3)*cos(q2) + cos(q1)*cos(q3))**2 + sin(q2)**2*sin(q3)**2) + dq1*dq2*sin(q3)*cos(q2) + dq1*dq3*sin(q2)*cos(q3) - dq2*(dq1*(-sin(q1)*cos(q3) - sin(q3)*cos(q1)*cos(q2))*cos(q1) + dq1*(-sin(q1)*sin(q3)*cos(q2) + cos(q1)*cos(q3))*sin(q1) - (-dq1*sin(q1)*cos(q3) - dq1*sin(q3)*cos(q1)*cos(q2) + dq2*sin(q1)*sin(q2)*sin(q3) - dq3*sin(q1)*cos(q2)*cos(q3) - dq3*sin(q3)*cos(q1))*cos(q1) + (dq1*sin(q1)*sin(q3)*co |
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 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
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico |
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
from ctypes import CDLL, c_uint, byref, create_string_buffer | |
from ctypes.util import find_library | |
libc = CDLL(find_library("c")) | |
def sysctl(name, isString=True): | |
size = c_uint(0) | |
# Find out how big our buffer will be | |
libc.sysctlbyname(name, None, byref(size), None, 0) | |
# Make the buffer | |
buf = create_string_buffer(size.value) |
OlderNewer