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
# Note, I'm not running the docker process directly, instead I'm building the container and bashing in to start | |
# `$ python fast_server.py` and `python fast_client.py`. | |
FROM python:3.9.7 | |
ARG REQUIREMENTS_FILE=requirements-dev.txt | |
WORKDIR /code | |
ADD requirements.txt requirements-*.txt /code/ | |
RUN pip install -r $REQUIREMENTS_FILE |
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
Me: - Which currencies are supported? V's PR has CND and USD | |
Co: - Which currencies are supported? V's PR has CND and USD | |
Co: - Which currencies are supported? V's PR has CND and USD | |
Me: - What are you doing this doesn't look like your training distribution o _ o | |
Co: - What are you doing this doesn't look like your training distribution o _ o | |
Co: - What are you doing this doesn't look like your training distribution o _ o | |
Co: - What are you doing this doesn't look like your training distribution o _ o | |
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
# Simple Google Drive backup script with automatic authentication | |
# for Google Colaboratory (Python 3) | |
# Instructions: | |
# 1. Run this cell and authenticate via the link and text box. | |
# 2. Copy the JSON output below this cell into the `mycreds_file_contents` | |
# variable. Authentication will occur automatically from now on. | |
# 3. Create a new folder in Google Drive and copy the ID of this folder | |
# from the URL bar to the `folder_id` variable. | |
# 4. Specify the directory to be backed up in `dir_to_backup`. |
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
$ sudo find / -name *.pth | |
/usr/local/lib/python2.7/site-packages/geos.pth | |
/usr/local/lib/python2.7/site-packages/virtualenvwrapper-4.1.1-py2.7-nspkg.pth | |
/usr/local/lib/python2.7/site-packages/easy-install.pth | |
/usr/local/lib/python2.7/site-packages/pdbmm_hijack_pdb.pth | |
/usr/local/lib/python2.7/site-packages/libxslt.pth | |
/usr/local/lib/python2.7/site-packages/configparser-3.5.0-py2.7-nspkg.pth | |
/usr/local/lib/python2.7/site-packages/matplotlib-1.5.0-py2.7-nspkg.pth | |
/usr/local/Cellar/geos/3.6.2/lib/python2.7/site-packages/geos.pth | |
/usr/local/Cellar/pgcli/1.9.1/libexec/vendor/lib/python2.7/site-packages/backports.csv-1.0.5-py2.7-nspkg.pth |
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
<Successful import attempts from line 3 till line 20?> | |
# /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__pycache__/machinery.cpython-36.pyc matches /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/machinery.py | |
# code object from '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__pycache__/machinery.cpython-36.pyc' | |
import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x1041fe518> | |
import 'importlib.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x1041f1e10> | |
# trying /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.cpython-36m-darwin.so | |
# trying /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.abi3.so | |
# trying /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.so | |
# trying /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py |
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
lookup = { | |
'1': 'one', | |
'2': 'two', | |
'3': 'three', | |
'4': 'four', | |
'5': 'five', | |
'6': 'six', | |
'7': 'seven', | |
'8': 'eight', | |
'9': 'nine', |
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 collections import defaultdict | |
initial_pages = defaultdict(lambda: 0) | |
bounce_rates = defaultdict(lambda: 0) | |
for line in open('site_data.csv'): | |
first, second = line.rstrip().split(',') | |
if first == '-1': | |
initial_pages[second] += 1 |
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 enum import Enum | |
import attr | |
from attr.validators import instance_of | |
@attr.s | |
class EdgeNode: | |
""" | |
An Edge & a Node. |
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
ImportError Traceback (most recent call last) | |
<ipython-input-1-e19bbed7988a> in <module>() | |
----> 1 import ipytracer | |
2 from IPython.core.display import display | |
3 | |
4 def bubble_sort(unsorted_list): | |
5 x = ipytracer.ChartTracer(unsorted_list) | |
/Users/liavkoren/Envs/coding-university/lib/python3.6/site-packages/ipytracer/__init__.py in <module>() | |
14 """ |
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
Path /Users/liavkoren/.config/powerline/colorschemes/solarized.json.old is not a directory or configuration file | |
Path /Users/liavkoren/.config/powerline/colorschemes/vim/solarized.json.old is not a configuration file | |
Path /Users/liavkoren/.config/powerline/colorschemes/vim/solarizedlight.json.old is not a configuration file | |
One of the either variants failed. Messages from the first variant: | |
Error while loading groups (key /groups/email_alert) |
NewerOlder