- 4 Cajun style andouille sausages
- 6 boneless skinless chicken thighs
- 1 lb raw shrimp, peeled, deveined, chopped
- 2 cups flour
- 1 cup peanut oil
- 1 cup canola oil
- 2 onions
- 2 green bell peppers
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
#!/usr/bin/env python | |
""" | |
example of using a simple python object to wrap a JSON | |
configuration mapping so that it can be accessed as | |
a python style object using conf.attr1.attr2.value | |
""" | |
CONF = { | |
"CREDENTIALS": { |
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
#!/usr/bin/env python | |
""" | |
mocking requests calls | |
""" | |
import mock | |
import unittest | |
import requests | |
from requests.exceptions import HTTPError |
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 pandas | |
import numpy | |
# random data with columns A, B, C, D | |
df = pandas.DataFrame(numpy.random.randn(50, 4), columns=list('ABCD')) | |
# | |
# style helpers |
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
#!/usr/bin/env python | |
""" | |
Example wordcount and ascii histogram script | |
- Writes a data file in a temporary dir | |
- defines function to parse file into a word iterable | |
- Histogram class that does the word count and draws it as | |
ascii strings with various sorting options | |
Example usage: |
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
Gumbo | |
Ingredients: | |
6 Cajun style andouille sausages or smoked sausage or mix | |
4 boneless skinless chicken thighs | |
1 lb raw shrimp, peeled, deveined, chopped | |
1 cups flour | |
1/2 cup peanut oil |
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
#!/usr/bin/env python | |
""" | |
mock examples | |
""" | |
import os | |
import unittest | |
import mock | |
import functools |
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
(base) root@0343625ee20e:/opt/unicron/imc-unicron-jupyter# conda list | |
# packages in environment at /opt/conda: | |
# | |
# Name Version Build Channel | |
_libgcc_mutex 0.1 main | |
asn1crypto 1.0.1 py37_0 | |
attrs 19.2.0 py_0 | |
backcall 0.1.0 py37_0 | |
bleach 3.1.0 py37_0 | |
ca-certificates 2019.8.28 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
from contextlib import contextmanager | |
@contextmanager | |
def context1(arg): | |
print("Bronte") | |
yield "Tolkien" | |
print(arg) | |
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
# | |
# required downloading source of cmakem protobuf, gsasl as well as hdfs3 | |
# | |
mv ~/Downloads/cmake-3.9.0-rc5.tar.gz . | |
tar -zxf cmake-3.9.0-rc5.tar.gz | |
cd cmake-3.9.0-rc5 | |
./bootstrap && make | |
sudo make install |
NewerOlder