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
'''Thermo | |
A python module used to retrieve information about various other properties of steam , when either temperature , pressure and one of enthalpy , entropy , specific volume and quality are given . | |
Author = S.Manoj Kumar | |
''' | |
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 gtk | |
import thermo | |
class SteamSolver: | |
def __init__(self): | |
'''Initial window which has a combo box from which the user can choose either of temperature and pressure''' | |
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) |
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 sys | |
from PyQt4 import QtGui , QtCore | |
import time | |
class Hangman(QtGui.QWidget): | |
def __init__(self): | |
super(Hangman , self).__init__() | |
self.window() |
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 urllib2 | |
import re | |
html = urllib2.urlopen('http://12000.org/my_notes/kamek/KERNEL/index.htm', 'r') | |
html = html.readlines() | |
ode = open('ode.txt', 'w') | |
for line in html: | |
if line.startswith('<PRE'): | |
index = html.index(line) | |
ode.write(html[index + 2]) |
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 time | |
import gtk | |
import threading | |
import gobject | |
gtk.gdk.threads_init() | |
class main(): | |
def __init__(self): | |
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) | |
self.window.set_title('Stopwatch') |
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
chi = Function('chi')(x, y) | |
chix = chi.diff(x) | |
chiy = chi.diff(y) | |
cpde = chix + h*chiy - hy*chi | |
chieq = Symbol("chi") | |
for i in range(1, deg + 1): | |
chieq += Add(*[ | |
Symbol("chi_" + str(power) + "_" + str(i - power))*x**power*y**(i - power) | |
for power in range(i + 1)]) | |
cnum, cden = cancel(chieq.diff(x) + h*chieq.diff(y) |
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
[x*cos(y)**2, cos(y), 1/(x*log(x)*sin(y)), sin(y), x*sin(y)*cos(y), -1/(x**2*log(x)*sin(y)) - 1/(x**2*log(x)**2*sin(y)), cos(y)/(x*log(x)*sin(y)**2), cos(y)**2, x**2*cos(y)**4, cos(y)**2/(x**2*log(x)**2*sin(y)**4), 1/(x**4*log(x)**2*sin(y)**2) + 2/(x**4*log(x)**3*sin(y)**2) + 1/(x**4*log(x)**4*sin(y)**2), 1/(x**2*log(x)**2*sin(y)**2), cos(y)**4, x**2*sin(y)**2*cos(y)**2, sin(y)**2, x**2*sin(y)*cos(y)**3, cos(y)/(x*log(x)*sin(y)), -1/(x**2*log(x)) - 1/(x**2*log(x)**2), x*sin(y)**2*cos(y), cos(y)/log(x), cos(y)**3/(x*log(x)*sin(y)**2), cos(y)**3, cos(y)/(x**2*log(x)**2*sin(y)**3), x*sin(y)*cos(y)**3, -cos(y)**2/(x**2*log(x)*sin(y)) - cos(y)**2/(x**2*log(x)**2*sin(y)), -cos(y)**2/(x*log(x)*sin(y)) - cos(y)**2/(x*log(x)**2*sin(y)), x*cos(y)**4, cos(y)**2/(x*log(x)*sin(y)**2), cos(y)**2/(log(x)*sin(y)), x*cos(y)**3, -cos(y)/(x**2*log(x)*sin(y)) - cos(y)/(x**2*log(x)**2*sin(y)), -1/(x**3*log(x)**2*sin(y)**2) - 1/(x**3*log(x)**3*sin(y)**2), cos(y)**3/(log(x)*sin(y)**2), -cos(y)/(x*log(x)) - cos(y)/(x*log(x)**2), sin |
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
C = S(0) | |
A = simplify(hx.diff(y) | |
if A: | |
B = simplify(hy.diff(y) + hy**2) | |
if B: | |
C = simplify(hx.diff(x) - hx**2) | |
if C: | |
Ax = A.diff(x) | |
Ay = A.diff(y) |
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
⎛ ⌠ ⎞ | |
⎜ ⎮ 2 ⎟ | |
⎜ ⎮ b ⋅(a⋅F(a⋅x + b⋅y) - b) ⎟ ⎛ 2 2⎞ | |
-b⋅(a⋅y - b⋅x) + ⎜C₁ - ⎮ ────────────────────────────── dr⎟⋅⎝a + b ⎠ | |
⎜ ⎮ ⎛ 2 2⎞ ⎟ | |
⎜ ⎮ (a + b⋅F(a⋅x + b⋅y))⋅⎝a + b ⎠ ⎟ | |
⎝ ⌡ ⎠ | |
───────────────────────────────────────────────────────────────────── | |
2 2 | |
a + b |
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
Indefinite integrals: | |
1. If old is an integration variable, and new is a Symbol that is not present in expr, then expr.subs({old: new}), should xreplace old with new. | |
Example: | |
expr = Integral(f(x), x) | |
expr.subs(x, y) // should give | |
⌠ | |
⎮ f(y) dy |
OlderNewer