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 ui | |
import sys | |
from yahoo_finance_api2 import share | |
#from yahoo_finance_api2.exceptions import YahooFinanceError | |
import threading | |
import sound | |
from datetime import datetime | |
TIC1 = 0 |
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 mock | |
with mock.patch('path.to.ObjectClass.my_property', new_callable=mock.PropertyMock) as mock_my_property: | |
mock_my_property.return_value = 'my value' |
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 suds import client | |
from suds.wsse import Security, UsernameToken | |
from suds.sax.text import Raw | |
from suds.sudsobject import asdict | |
from suds import WebFault | |
''' | |
Given a Workday Employee_ID, returns the last name of that employee. |
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 degrees_to_cardinal(d): | |
''' | |
note: this is highly approximate... | |
''' | |
dirs = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", | |
"S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"] | |
ix = int((d + 11.25)/22.5) | |
return dirs[ix % 16] |
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
grep -r --color --exclude-dir={custom,lib,scripts} --exclude={*.xml,error_log} "beta" . |