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
| {%- macro mathjax(url='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_HTML') -%} | |
| <!-- Load mathjax --> | |
| <script src="{{url}}"></script> | |
| <!-- MathJax configuration --> | |
| <script type="text/x-mathjax-config"> | |
| MathJax.Hub.Config({ | |
| tex2jax: { | |
| inlineMath: [ ['$','$'], ["\\(","\\)"] ], | |
| displayMath: [ ['$$','$$'], ["\\[","\\]"] ], | |
| processEscapes: true, |
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
| out=`basename $CONDA_PREFIX` | |
| unset PS1 | |
| PS1="\w ${out} \u\n% " |
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
| def enum(*sequential, **named): | |
| enums = dict(zip(sequential, range(len(sequential))), **named) | |
| reverse = dict((value, key) for key, value, in enums.iteritems()) | |
| enums['reverse_mapping'] = reverse | |
| return type('Enum', (), enums) |
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
| /** | |
| * Plot selected lines on map | |
| */ | |
| private void plotLines() { | |
| StationManager stationManager = StationManager.getInstance(); | |
| Station stationObject = stationManager.getSelected(); | |
| if (stationObject != null) { | |
| for (Line line : stationObject.getLines()) { | |
| int color = line.getColour(); | |
| Set<Branch> setOfLineBranches = line.getBranches(); |
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
| import re, sys, time | |
| from PyQt4 import QtCore, QtGui, QtWebKit | |
| from bs4 import BeautifulSoup | |
| #comment out this line to see QT warnings: | |
| # QtCore.qInstallMsgHandler(lambda *args: None) | |
| # QtWebKit.QWebSettings.PluginsEnabled = True | |
| debug = True | |
| finished = False |
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
| import re, sys, time | |
| from PyQt4 import QtCore, QtGui, QtWebKit | |
| from bs4 import BeautifulSoup | |
| #comment out this line to see QT warnings: | |
| # QtCore.qInstallMsgHandler(lambda *args: None) | |
| # QtWebKit.QWebSettings.PluginsEnabled = True | |
| debug = True | |
| finished = False |
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
| import sys | |
| from PyQt4 import QtCore, QtGui, QtWebKit | |
| class WebPage(QtWebKit.QWebPage): | |
| def __init__(self): | |
| super(WebPage, self).__init__() | |
| self.mainFrame().loadFinished.connect(self.handleLoadFinished) | |
| def start(self, urls): | |
| print('starting') |
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
| import re, sys, time | |
| from PyQt4.QtGui import * | |
| from PyQt4.QtCore import * | |
| from PyQt4.QtWebKit import * | |
| from bs4 import BeautifulSoup | |
| import threading | |
| mutex = QMutex() | |
| lock = threading.RLock() |
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
| import re, sys, time | |
| from PyQt4.QtGui import * | |
| from PyQt4.QtCore import * | |
| from PyQt4.QtWebKit import * | |
| from bs4 import BeautifulSoup | |
| class Render(QWebPage): | |
| def __init__(self, url): |
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
| import sys | |
| from PyQt4.QtGui import * | |
| from PyQt4.QtCore import * | |
| from PyQt4.QtWebKit import * | |
| from bs4 import BeautifulSoup | |
| qInstallMsgHandler(lambda *args: None) | |
| class Render(QWebPage): | |
| def __init__(self, url): |