Signal | Value | Action | Comment |
---|---|---|---|
SIGHUP | 1 | Term | Hangup detected on controlling terminal or death of controlling process |
SIGINT | 2 | Term | Interrupt from keyboard |
SIGQUIT | 3 | Core | Quit from keyboard |
SIGILL | 4 | Core | Illegal Instruction |
SIGABRT | 6 | Core | Abort signal from abort(3) |
SIGFPE | 8 | Core | Floating point exception |
SIGKILL | 9 | Term | Kill signal |
SIGSEGV | 11 | Core | Invalid memory reference |
SIGPIPE | 13 | Term | Broken pipe: write to pipe with no readers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import numpy as np | |
from sklearn.grid_search import GridSearchCV | |
def print_GridCV_scores(gs_clf, export_file): | |
'''Exports a CSV of the GridCV scores. | |
gs_clf: A GridSearchCV object which has been fitted | |
export_file: A file path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After that we just create the GUI Actors with a Props with the correct dispatcher set: | |
val javaFxActor = context.actorOf(Props[JavaFxActor].withDispatcher("javafx-dispatcher"), "javaFxActor") | |
val swingActor = context.actorOf(Props[SwingActor].withDispatcher("swing-dispatcher"), "swingActor") | |
// Done! Now all messages processed by the new actor will be executed by the Swing/JavaFX Event Dispatch Thread, enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shlex | |
import subprocess | |
import sys | |
def run_cmd(cmd, callback=None, watch=False): | |
"""Runs the given command and gathers the output. | |
If a callback is provided, then the output is sent to it, otherwise it | |
is just returned. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
from sqlalchemy.orm import relationship | |
from sqlalchemy.ext.declarative import declared_attr | |
from flask_security import current_user | |
class AuditMixin(object): | |
created_at = Column(DateTime, default=datetime.now) | |
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
rsync (Everyone seems to like -z, but it is much slower for me)
- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is text format of the instructions shown in the below Youtube video | |
# http://www.youtube.com/watch?v=ajs9rO5upZA | |
# First get a ubuntu Live CD or USB Stick and boot from it | |
# Check all the Hard disk and Partitions using following command | |
sudo fdisk -l # Now take a note of the partition, on which linux is installed which may be like: /dev/sda1 | |
# 3. Mount the partition where you need to install GRUB 2 (Hard disk partition) | |
# Now the file system appears in nautaulis and command line is not file system of Hard disk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Do a ping and output results as CSV. | |
# | |
# [email protected] | |
# 2011-12-23 | |
# | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 [--add-timestamp] <ping host>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [J, grad] = linearRegCostFunction(X, y, theta, lambda) | |
%LINEARREGCOSTFUNCTION Compute cost and gradient for regularized linear | |
%regression with multiple variables | |
% [J, grad] = LINEARREGCOSTFUNCTION(X, y, theta, lambda) computes the | |
% cost of using theta as the parameter for linear regression to fit the | |
% data points in X and y. Returns the cost in J and the gradient in grad | |
% Initialize some useful values | |
m = length(y); % number of training examples |
NewerOlder