In Jekyll set a variable for the mail, e.g. in the _config.yml
email: [email protected]
then use it in your page
Reach me under: {{ site.email | mailObfuscate }}
which will generate the following HTML
| import os | |
| import pickle | |
| import warnings | |
| import numpy as np | |
| import pandas as pd | |
| from sklearn.model_selection import train_test_split | |
| from tensorflow.keras.callbacks import EarlyStopping | |
| from tensorflow.keras.layers import Dense | |
| from tensorflow.keras.layers import Dropout |
In Jekyll set a variable for the mail, e.g. in the _config.yml
email: [email protected]
then use it in your page
Reach me under: {{ site.email | mailObfuscate }}
which will generate the following HTML
| #!/usr/bin/env python3 | |
| # Gambling Statistics Problem: | |
| # If you play roulette every day and quit whenever you're ahead by x amount, | |
| # do you make money in the long run? | |
| # Answer: | |
| # No. | |
| import random | |
| STARTING_BALANCE = 100000 |
| #/usr/bin/env python3 | |
| import time | |
| import threading | |
| import functools | |
| import tqdm | |
| def long_running_function(*args, **kwargs): |
gem 'rails_12factor' to your Gemfile. This will add error logging and the ability for your app to serve static assets.bundleRAILS_ENV=production rake db:create db:migrate db:seedrake secret and copy the outputexport SECRET_KEY_BASE=output-of-rake-secretrake assets:precompile. This will create a folder public/assets that contains all of your assets.RAILS_ENV=production rails s and you should see your app.Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.
new_user_pathUsersController with new actionnew.html.erbpassword_digest string fieldgem 'bcrypt' in Gemfile and add has_secure_password in User modelcreate action in UsersControllersession[:user_id] in create action| #!/usr/bin/ruby | |
| #usage: youtube-to-mp3 <youtube-url> | |
| #example: youtube-to-mp3 http://www.youtube.com/playlist?list=PL398CE05652474A1E | |
| #desc: downloads a single youtube vid or a playlist, then converts to mp3. | |
| # Requires youtube-dl and ffmpeg | |
| url = ARGV[0] | |
| system("youtube-dl -citA #{url}") |