A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
from django.core.management.base import BaseCommand, CommandError | |
from django.core import serializers | |
from optparse import make_option | |
class Command(BaseCommand): | |
""" | |
Generate a fixture file for a specific model. | |
Useage: ./manage.py generate_fixtures app.models.MyModel --file=MyModelsOutputFile.json | |
""" |
# List unique values in a DataFrame column | |
# h/t @makmanalp for the updated syntax! | |
df['Column Name'].unique() | |
# Convert Series datatype to numeric (will error if column has non-numeric values) | |
# h/t @makmanalp | |
pd.to_numeric(df['Column Name']) | |
# Convert Series datatype to numeric, changing non-numeric values to NaN | |
# h/t @makmanalp for the updated syntax! |
#!/bin/bash -ex | |
# Paste this into ssh | |
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex | |
# When forking, you can get the URL from the raw (<>) button. | |
### Set some command variables depending on whether we are root or not ### | |
# This assumes you use a debian derivate, replace with yum, pacman etc. | |
aptget='sudo apt-get' | |
chsh='sudo chsh' |
## Meant to be scheudled on a cron/timer of 90 days (CIS Benchmark) | |
## The target keys need permissions to rotate themselves | |
import boto3 | |
from botocore.exceptions import ClientError | |
import os | |
from datetime import datetime | |
import shutil | |
from ConfigParser import SafeConfigParser |
#!/usr/bin/env python | |
""" | |
===================================== | |
PEP 20 (The Zen of Python) by example | |
===================================== | |
Usage: %prog | |
:Author: Hunter Blanks, [email protected] / [email protected] |
from pymongo import MongoClient | |
MONGO_URI = '' | |
DATABASE_NAME = '' | |
client = MongoClient(MONGO_URI) | |
db = client[DATABASE_NAME] | |
collections = db.collection_names() | |
def readable_size(file_size): |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes: