I hereby claim:
- I am msabramo on github.
- I am msabramo (https://keybase.io/msabramo) on keybase.
- I have a public key ASAlHNkORhOLjfgneM_MPvQgkgP-7nodqWEmFfgrpL85tQo
To claim this, I am signing this object:
#!/usr/bin/expect -f | |
# | |
# Script to get the serial number of a Mac | |
# | |
set timeout 10 | |
log_user 0 | |
spawn /bin/sh -c "ioreg -rac IOPlatformExpertDevice | xpath 'plist/array/dict/key\[.=\"IOPlatformSerialNumber\"\]/following-sibling::*\[position()=1\]/text()' 2>/dev/null" | |
expect eof | |
set serial $expect_out(buffer) | |
puts $serial |
I hereby claim:
To claim this, I am signing this object:
@contextlib.contextmanager | |
def multiple_targets(mock_patches): | |
""" | |
`mock_patches` is a list (or iterable) of mock.patch objects | |
Example usage: | |
with mock.patch.multiple_targets([ | |
mock.patch('os.path.exists', side_effect=mock_path_exists), | |
mock.patch('subprocess.Popen'), |
@contextlib.contextmanager | |
def multiple_mocks(mock_specs): | |
""" | |
`mock_specs` is a dict of mock target name => mock patch kwargs | |
Example usage: | |
with multiple_mocks( | |
{'os.path.exists': {'side_effect': mock_path_exists}, | |
'subprocess.Popen': {}, |
https://gitter.im/DataStaxCommunity/Cassandra_Spark
To start communicating with Cassandra like a champ, Cassandra's Query Language (CQL) is your best bet. CQL is an SQL-like language, which makes it warm and fuzzy for those of us used to SQL, but don't let that fool you...
We still have to think about how we "converse" with Cassandra differently. When we model our data, we need to think about how we will access it before we model it. It's important to emphasize this point, because you can get into some very ugly territory if you model Cassandra like a relational database. Data Modeling with Cassandra is purely query-driven.
import os | |
FIELDS = os.environ.get('ANSIBLE_HUMAN_LOG_FIELDS').split(',') | |
if not FIELDS: | |
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr'] | |
def human_log(res): | |
if type(res) == type(dict()): | |
for field in FIELDS: |
Finally, after years of improvements and fixes we got a new version | |
Summary of Changes in release 0.95 | |
-------------------------------------------- | |
User visible (not in a particular order): | |
- Support for build with CMake under Windows. | |
- Support MSSQL 2008: | |
- new date/time types; | |
- NBCROWs; | |
- able to retrieve CLR UDT types in binary format. |
$ tox --version | |
1.9.0 imported from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tox/__init__.pyc | |
$ tox | |
py27 runtests: PYTHONHASHSEED='1229193552' | |
py27 runtests: commands[0] | echo 1 | |
1 | |
py27 runtests: commands[1] | false | |
ERROR: InvocationError: '/usr/bin/false' | |
py27 runtests: commands[2] | echo 2 |
C:\Program Files\Microsoft SQL Server\110>choco install -y mssqlserver2012express | |
Chocolatey (v0.9.8.33) is installing 'mssqlserver2012express' and dependencies. | |
By installing you accept the license for 'mssqlserver2012express' and each dependency you are installing. | |
MsSqlServer2012Express v11.00.3000.20140928 | |
Downloading SqlServer2012Express 64 bit | |
from 'http://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPRWT_x64_ENU.exe' | |
Installing SqlServer2012Express... | |
Write-Error : [ERROR] Running C:\Users\ADMINI~1\AppData\Local\Temp\1\chocolatey | |
\SqlServer2012Express\SqlServer2012ExpressInstall.exe with /q /INDICATEPROGRESS |
====================================================================== | |
ERROR: tests.test_class_import.test_start_and_stop_works | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Users/marca/dev/git-repos/freezegun/.tox/pypy3/site-packages/nose/case.py", line 198, in runTest | |
self.test(*self.arg) | |
File "/Users/marca/dev/git-repos/freezegun/tests/test_class_import.py", line 37, in test_start_and_stop_works | |
freezer = freeze_time("2012-01-14") | |
File "/Users/marca/dev/git-repos/freezegun/freezegun/api.py", line 366, in freeze_time | |
return _freeze_time(time_to_freeze, tz_offset, ignore) |