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:
| 2019-07-26T20:42:53.235Z cypress:cli installing Cypress from NPM | |
| 2019-07-26T20:42:53.489Z cypress:cli installing with options {} | |
| 2019-07-26T20:42:53.490Z cypress:cli version in package.json is 3.4.0 | |
| 2019-07-26T20:42:53.494Z cypress:cli Reading binary package.json from: /root/.cache/Cypress/3.4.0/Cypress/resources/app/package.json | |
| 2019-07-26T20:42:53.496Z cypress:cli no binary installed under cli version | |
| 2019-07-26T20:42:53.497Z cypress:cli checking local file /usr/src/app/3.4.0 cwd /usr/src/app/node_modules/cypress | |
| 2019-07-26T20:42:53.497Z cypress:cli preparing to download and unzip version 3.4.0 to path /root/.cache/Cypress/3.4.0 | |
| Installing Cypress (version: 3.4.0) | |
| [?25l[20:42:53] Downloading Cypress [started] |
| function getFile(f) { | |
| return new Cypress.Promise((resolve, reject) => { | |
| return cy.fixture(f).then((img) => { | |
| const file = makeFile({ | |
| name: f, | |
| dataURL: `data:image/${f.slice(f.length - 3)};base64,${img}`, | |
| }) | |
| resolve(file) | |
| }) | |
| }) |
| openapi: 3.0.0 | |
| info: | |
| title: Sample API | |
| description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. | |
| version: 0.1.9 | |
| servers: | |
| - url: http://api.example.com/v1 | |
| description: Optional server description, e.g. Main (production) server | |
| - url: http://staging-api.example.com | |
| description: Optional server description, e.g. Internal staging server for testing |
| from locust import HttpLocust, TaskSet, task | |
| class UserBehavior(TaskSet): | |
| # def on_start(self): | |
| # """ on_start is called when a Locust start before any task is scheduled """ | |
| # self.login() | |
| @task(2) | |
| def index(self): |
| #!/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: |