FROM python:3-alpine
WORKDIR /usr/source/app
COPY requirements.txt ./
RUN apk update
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
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 golang | |
| RUN apt-get update && apt-get install -y ca-certificates git-core ssh | |
| ADD keys/my_key_rsa /root/.ssh/id_rsa | |
| RUN chmod 700 /root/.ssh/id_rsa | |
| RUN echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config | |
| RUN git config --global url.ssh://[email protected]/.insteadOf https://github.com/ | |
| ADD . /go/src/github.com/myaccount/myprivaterepo |
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
| git reset --hard HEAD^ | |
| git push origin -f |
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04
Use these following commands, this will solve the error:
sudo apt-get install postgresql then fire:
sudo apt-get install python-psycopg2 and last:
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
| # DEMO CLASS | |
| class PlotTimeSeries: | |
| def __init__(self): | |
| pass | |
| def _find_weekend_indices(self, datetime_array, weekend=5): | |
| """ | |
| Returns all indices of Saturdays & Sundays in a datetime array | |
| datetime_array(pandas) = pandas datetime array | |
| weekend(int) = assume weekend starts at day=5=Saturday |
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
| $ ssh-keygen -t rsa | |
| $ cat /you/.ssh/id_rsa.pub | ssh -i pem_file.pem [email protected] "cat >> .ssh/authorized_keys" | |
| } | |
| # CRONTAB | |
| # ┌───────────── minute (0 - 59) |
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
| $ ls -al ~/.ssh+ | |
| # Generate | |
| ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
| # Start the ssh-agent in the background. | |
| $ eval "$(ssh-agent -s)" | |
| $ ssh-add ~/.ssh/id_rsa |
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
| def draw_graph3(networkx_graph,notebook=False,output_filename='graph.html',show_buttons=True,only_physics_buttons=False, | |
| height=None,width=None,bgcolor=None,font_color=None,pyvis_options=None): | |
| """ | |
| This function accepts a networkx graph object, | |
| converts it to a pyvis network object preserving its node and edge attributes, | |
| and both returns and saves a dynamic network visualization. | |
| Valid node attributes include: | |
| "size", "value", "title", "x", "y", "label", "color". | |
| (For more info: https://pyvis.readthedocs.io/en/latest/documentation.html#pyvis.network.Network.add_node) | |
| Valid edge attributes include: |