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 csv | |
| import json | |
| columns = [ | |
| 'name', | |
| 'type_line', | |
| 'oracle_text', | |
| 'colors', | |
| 'color_identity', | |
| 'rarity', |
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 unittest | |
| if __name__ == "__main__": | |
| suite = unittest.TestLoader().discover( | |
| start_dir=".", | |
| pattern="*_test.py", | |
| ) | |
| unittest.TextTestRunner( | |
| verbosity=2 |
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
| With constraints: | |
| pip install -r requirements.txt -c /opt/upper-constraints.txt | |
| pip install pymysql -c /opt/upper-constraints.txt | |
| pip install osprofiler -c /opt/upper-constraints.txt | |
| python setup.py install | |
| Without constraints: | |
| pip install -r requirements.txt | |
| pip install pymysql | |
| pip install osprofiler |
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
| diff --git a/requirements.txt b/requirements.txt | |
| index 1a19428..c734e16 100644 | |
| --- a/requirements.txt | |
| +++ b/requirements.txt | |
| @@ -17,7 +17,7 @@ sqlalchemy-migrate>=0.9.6 # Apache-2.0 | |
| stevedore>=1.5.0 # Apache-2.0 | |
| passlib>=1.6 # BSD | |
| python-keystoneclient!=1.8.0,!=2.1.0,<3.0.0,>=1.6.0 # Apache-2.0 | |
| -keystonemiddleware!=4.1.0,>=4.0.0 # Apache-2.0 | |
| +keystonemiddleware!=4.1.0,>=4.0.0,<4.11.0 # Apache-2.0 |
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
| PING 172.16.10.25 (172.16.10.25) 56(84) bytes of data. | |
| From 172.16.10.20 icmp_seq=1 Destination Host Unreachable | |
| From 172.16.10.20 icmp_seq=2 Destination Host Unreachable | |
| From 172.16.10.20 icmp_seq=3 Destination Host Unreachable | |
| From 172.16.10.20 icmp_seq=4 Destination Host Unreachable | |
| ^C | |
| --- 172.16.10.25 ping statistics --- | |
| 5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4005ms | |
| pipe 4 |
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
| 2016-11-14 11:12:40.446 30742 DEBUG oslo_concurrency.processutils [req-932cbe76-c34f-46b9-87d6-6d80a685ed5f eadcdac311c64dfd8e661d7a14158d79 6fed39a8f90e4913b9a752fdaaeb6a35 - - -] Running cmd (subprocess): genisoimage -o /opt/nova-data/instances/8f6dfb8c-154e-4c71-aae9-29b052cce3c0/disk.config -ldots -allow-lowercase -allow-multidot -l -publisher OpenStack Nova 13.1.3 -quiet -J -r -V config-2 /tmp/tmpDla_bR execute /opt/nova-env/lib/python2.7/site-packages/oslo_concurrency/processutils.py:349 | |
| 2016-11-14 11:12:40.459 30742 DEBUG oslo_concurrency.processutils [req-932cbe76-c34f-46b9-87d6-6d80a685ed5f eadcdac311c64dfd8e661d7a14158d79 6fed39a8f90e4913b9a752fdaaeb6a35 - - -] u'genisoimage -o /opt/nova-data/instances/8f6dfb8c-154e-4c71-aae9-29b052cce3c0/disk.config -ldots -allow-lowercase -allow-multidot -l -publisher OpenStack Nova 13.1.3 -quiet -J -r -V config-2 /tmp/tmpDla_bR' failed. Not Retrying. execute /opt/nova-env/lib/python2.7/site-packages/oslo_concurrency/processutils.py:427 | |
| 2016-11-14 11:12:40.461 307 |
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
| { | |
| "require": { | |
| "symfony/routing": "2.5.*", | |
| "symfony/http-foundation": "2.5.*" | |
| } | |
| } |
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
| #!/bin/bash | |
| curl \ | |
| -X POST \ | |
| -d '{"method": "add", "params": [1, 2], "id": 1}' \ | |
| http://127.0.0.1:8080/server.php |
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
| from string import digits | |
| class Decoder(object): | |
| def __init__(self, source): | |
| self.offset = 0 | |
| self.source = source | |
| def current(self): | |
| return self.source[self.offset] |
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
| from nugget import use, bind, find, load, save | |
| # Open a database. | |
| use(":memory:") | |
| # Create a class to bind to a database table. | |
| class Contact(object): | |
| pass | |
| # Associate a class with a database table. |
NewerOlder