I hereby claim:
- I am jdmar3 on github.
- I am jdmar3 (https://keybase.io/jdmar3) on keybase.
- I have a public key whose fingerprint is 67BB C847 14E0 C31A 736A 5E08 C787 DF8D D41F A8D1
To claim this, I am signing this object:
| # Split multi-year dataframe into smaller dataframes by year. | |
| # This will label the new dataframes as "year1997", "year1998", etc. | |
| # Replace DATAFRAME below with the name of your dataframe object | |
| invisible(lapply(split(DATAFRAME, DATAFRAME$year), function(x) { | |
| assign(paste0("year", x$year[1]), x, pos=.GlobalEnv) })) | |
| # You can change the sort value to country or whatever other variable | |
| # you like by changing all instances of "year" to whatever the other |
| #!/usr/bin/env python3 | |
| import re | |
| import os | |
| import sys | |
| import requests | |
| import argparse | |
| # This website allows information about a paper to be retrieved by accessing | |
| # http://dx.doi.org/DOI |
| library(ggplot2) | |
| library(Cairo) # MAGIC PACKAGE | |
| fake.data <- data.frame(x = rnorm(100), y = rnorm(100), z = rbinom(100, 1, 0.5)) | |
| p <- ggplot(fake.data, aes(x=x, y=y)) + | |
| geom_line() + | |
| labs(x="Science", y="More science", title="Here's a title") + | |
| facet_wrap(~ z) + | |
| theme_bw() + |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/python | |
| import argparse | |
| import json | |
| import re | |
| import sys | |
| import uuid | |
| class OpenVPNNetworkConfiguration(object): |
| #!/usr/bin/python | |
| # Title: Reddit Data Mining Script | |
| # Authors: Clay McLeod | |
| # Description: This script mines JSON data | |
| # from the Reddit front page and stores it | |
| # as a CSV file for analysis. | |
| # Section: Python | |
| # Subsection: Data Science | |
| want=["domain", "subreddit", "subreddit_id" "id", "author", "score", "over_18", "downs", "created_utc", "ups", "num_comments"] |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
Here I will describe a simple configuration of the slurm management tool for launching jobs in a really simplistic cluster. I will assume the following configuration: a main node (for me it is an Arch Linux distribution) and 3 compute nodes (for me compute nodes are Debian VMs). I also assume there is ping access between the nodes and some sort of mechanism for you to know the IP of each node at all times (most basic should be a local NAT with static IPs)
Slurm management tool work on a set of nodes, one of which is considered the master node, and has the slurmctld daemon running; all other compute nodes have the slurmd daemon. All communications are authenticated via the munge service and all nodes need to share the same authentication key. Slurm by default holds a journal of activities in a directory configured in the slurm.conf file, however a Database management system can be set. All in all what we will try to do is:
| blueprint: | |
| name: Yet Another Motion Automation | |
| description: > | |
| # YAMA V10 | |
| Turn on lights or scenes when motion is detected. | |
| Four different scenes can be defined depending on time of day. | |