-
Create a one-off Heroku app (or use an existing one) for the compilation.
-
Set the app to use the Python buildpack with OpenSSL 1.0.2g
heroku buildpacks:set https://github.com/yuvadm/heroku-buildpack-python-openssl-1.0.2.git -a myapp
-
Run a one-off dyno to do the compilation:
_____/\\\______________________________________________________
__/\\\\\\\\\\\____/\\\\\__/\\\\\____/\\\____/\\\__/\\\____/\\\_
_\////\\\////___/\\\///\\\\\///\\\_\/\\\___\/\\\_\///\\\/\\\/__
____\/\\\______\/\\\_\//\\\__\/\\\_\/\\\___\/\\\___\///\\\/____
____\/\\\_/\\__\/\\\__\/\\\__\/\\\_\/\\\___\/\\\____/\\\/\\\___
____\//\\\\\___\/\\\__\/\\\__\/\\\_\//\\\\\\\\\___/\\\/\///\\\_
_____\/////____\///___\///___\///___\/////////___\///____\///__
#!/bin/bash | |
# Cache sudo password | |
sudo -v | |
# Get latest OpenSSL 1.0.2 version from https://openssl.org/source/ | |
# v1.1.0 seems to have removed SSLv2/3 support | |
openssl_version=1.0.2k | |
# Install build dependencies |
#!/usr/bin/python | |
""" | |
Pre-commit hook for git written in Python. | |
Check if there is any migration number used more than one in each | |
migrations folder of South or Django >= 1.7. | |
You can install this pre-hook by executing the command: | |
ln -s ./git-pre-commit-hook .git/hooks/pre-commit | |
chmod +x .git/hooks/pre-commit |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
- Create a file called
.gitignore
in your home directory and add any filepath patterns you want to ignore. - Tell git where your global gitignore file is.
Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignore
for.gitignore
in your home directory, if you prefer.
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
#!/bin/bash | |
# Git pre-commit hook | |
##################### | |
# | |
# - check for whitespace problems (trailing spaces, ...) | |
# - check for lines with 'FIXME' | |
# - running tests | |
# - running code style check (pep8) on modified files | |
# - designed for Windows, for Linux replace `> NUL` with `> /dev/null` |
#!/bin/sh | |
# make sure requirements.txt is up to date with every commit | |
# by comparing the output of pip freeze | |
pip freeze | diff requirements.txt - > /dev/null | |
if [ $? != 0 ] | |
then | |
echo "Missing python module dependencies in requirements.txt. Run 'pip freeze > requirements.txt' to update." | |
exit 1 | |
fi |