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 socket import socket, error, setdefaulttimeout | |
import ssl | |
import re | |
import time | |
import sys | |
import os | |
from hashlib import md5 | |
import json | |
os.chdir(os.path.split(sys.argv[0])[0]) |
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
# Make ML-Pipeline Runs Reproducible | |
random_state=7 | |
# Testing our Pipeline with an ML-Ready Dataset | |
from sklearn.datasets import load_iris | |
iris = load_iris() | |
# Assign ML-Input and Ml-Target | |
Xi = iris.data # Input | |
yi = iris.target # Output |
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
# Performs a beam search, to be run in the "Decoder" | |
def Beamsearch(self, | |
predict_fun, # RNN() with: new_states as a list, outputs of shape (batch_size, n_symbols) | |
states0, # RNN()'s initial layer states are equal to states0 | |
batch_size, # Size derived from initial layer states0 | |
start_symbol # Tagging the encoded target sequence with <S> as a start symbol for example | |
stop_symbol # ' ' </S> as a stop symbol for example | |
max_length, # Maximum length of a given sequence | |
beam_size=4 # See [simple beam search](https://github.com/SeitaroShinagawa/simple_beamsearch) for an example of probabilities | |
): |
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
/* C-Standard-Libraries */ | |
#ifndef LIBRARIES | |
#define LIBRARIES | |
#include <stdio.h> /* stdio.h — standard buffered input/output */ | |
#include <stdlib.h> /* stdlib.h — standard library definitions */ | |
#include <string.h> /* string.h — string operations */ | |
#include <stdarg.h> /* stdarg.h — handle variable argument list */ | |
#include <stdbool.h> /* stdbool.h — boolean type and values */ | |
#include <stddef.h> /* stddef.h — standard type definitions */ |
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
{-# LANGUAGE UnicodeSyntax #-} | |
{- | |
Reads: AGATCGAGTG | |
Prints: sorted 3-mers: AGA AGT ATC CGA GAG GAT GTG TCG | |
unsorted 3-mers: AGA GAT ATC TCG CGA GAG AGT GTG | |
-} | |
import Data.Function | |
import Data.List |
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
Prerequisites: | |
============== | |
1. Raspbian | |
2. Raspberry Pi (2) | |
sudo apt-get update | |
sudo apt-get upgrade | |
cd | |
## Source: http://node-arm.herokuapp.com/ |
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
/* The class IODataQueue is used in various places in the kernel. There are a couple of exploitable integer overflow issues in the ::enqueue method: */ | |
Boolean IODataQueue::enqueue(void * data, UInt32 dataSize) | |
{ | |
const UInt32 head = dataQueue->head; // volatile | |
const UInt32 tail = dataQueue->tail; | |
const UInt32 entrySize = dataSize + DATA_QUEUE_ENTRY_HEADER_SIZE; <-- (a) | |
IODataQueueEntry * entry; | |
if ( tail >= head ) |
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 | |
ERASER=$(xinput --list | grep 'eraser' | grep -o [0-9][0-9]) | |
STYLUS=$(($ERASER+1)) | |
TOUCH=$(xinput --list | grep 'Wacom' | grep -o [0-9][0-9] | grep -v $ERASER | grep -v $STYLUS) | |
#xsetwacom set $STYLUS TopX -100 | |
#xsetwacom set $STYLUS TopY 12 | |
#xsetwacom set $STYLUS BottomX 26170 |
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
# Repository configuration file automatically generated | |
# by Entropy on your behalf. | |
[sabayonlinux.org] | |
enabled = true | |
desc = Sabayon Linux Official Repository | |
repo = http://pkg.sabayon.org#bz2 | |
repo = http://pkg.repo.sabayon.org#bz2 | |
# Main sabayonlinux.org Repository |
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
<?php | |
function getUA() | |
{ | |
$useragent = $_SERVER['HTTP_USER_AGENT']; | |
$mobile_ua = '/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i'; | |
$mobile_ua_alt = '/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|i |
NewerOlder