Tested on Ubuntu 22.04 (arm64 and x64)
- Install dependicies
- pip:
sudo apt install python3-pip
- colcon:
pip install -U colcon-common-extensions
# Simple script to disable ASLR and make .nv_fatb sections read-only | |
# Requires: pefile ( python -m pip install pefile ) | |
# Usage: fixNvPe.py --input path/to/*.dll | |
import argparse | |
import pefile | |
import glob | |
import os | |
import shutil |
#!/usr/bin/env python | |
# PointCloud2 color cube | |
# https://answers.ros.org/question/289576/understanding-the-bytes-in-a-pcl2-message/ | |
import rospy | |
import struct | |
from sensor_msgs import point_cloud2 | |
from sensor_msgs.msg import PointCloud2, PointField | |
from std_msgs.msg import Header |
# Usage: download_spark_log.sh j-XXXXXXX <optional download path> | |
# Required: aws cli and jq | |
cluster=$1 | |
# Optional second argument defaults to . | |
dlLoc=${2:-\.} | |
instance=$(aws emr list-instances --cluster-id "$cluster" --instance-group-types MASTER | jq -r '.Instances[0].Ec2InstanceId') | |
logLocs3n=$(aws emr describe-cluster --cluster-id $cluster | jq -r '.Cluster.LogUri') | |
logLoc=${logLocs3n//s3n:/s3:} |
== Parsed Logical Plan == | |
Repartition 1, true | |
+- Project [channel#1422, geo#1421, is_funnelcake#1419, acquisition_period#1417, start_version#1583, sync_usage#1420, current_version#1418, current_week#1355L, source#1414, medium#1416, campaign#1409, content#1413, distribution_id#1410, default_search_engine#1415, locale#1411, is_active#1412, n_profiles#1636L, usage_hours#1638, sum_squared_usage_hours#1640, total_uri_count#1642L, unique_domains_count_per_profile#1645] | |
+- Aggregate [medium#1416, campaign#1409, source#1414, locale#1411, geo#1421, current_week#1355L, is_active#1412, content#1413, distribution_id#1410, default_search_engine#1415, acquisition_period#1417, current_version#1418, is_funnelcake#1419, sync_usage#1420, start_version#1583, channel#1422], [medium#1416, campaign#1409, source#1414, locale#1411, geo#1421, current_week#1355L, is_active#1412, content#1413, distribution_id#1410, default_search_engine#1415, acquisition_period#1417, current_version#1418, is_funnelcake#1419, sync_usage#1420, start_v |
These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.
OpenSSL has a variety of commands that can be used to operate on private
key files, some of which are specific to RSA (e.g. openssl rsa
and
openssl genrsa
) or which have other limitations. Here we always use
I found a post about suspending and then going into hibernate that included a really clever script. Turns out that with NixOS this is even esaier to coordinate as you have systemd so can have a before
and after
service. I just include this in my /etc/nixos/configuration.nix
file and nixos-rebuild
; then a systemctl suspend
or a close of the lid will cause the hibernate timer to be set.
This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages
branch using Travis CI.
This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.
Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.
To create a clean gh-pages
branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md
in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |