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
'use strict'; | |
/** | |
* Basic code to parse the values in the "data" attribute in a Google Maps URL to an Array. | |
* There will likely still be some work to do to interpret the resulting Array. | |
* | |
* Based on information from: | |
* http://stackoverflow.com/a/34275131/1852838 | |
* http://stackoverflow.com/a/24662610/1852838 | |
*/ |
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/sh | |
ipt="iptables -w" | |
dedup() { | |
iptables-save | sed -n "/$1/,/COMMIT/p" | grep "^-" | sort | uniq -dc | while read l | |
do | |
c=$(echo "$l" | sed "s|^[ ]*\([0-9]*\).*$|\1|") | |
rule=$(echo "$l" | sed "s|^[ ]*[0-9]* -A\(.*\)$|-t $1 -D\1|") | |
while [ ${c} -gt 1 ]; do |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<language id="nginx" _name="Nginx conf file" version="2.0" _section="Other"> | |
<metadata> | |
<property name="mimetypes">text/x-nginx-conf-file;application/x-nginx-conf-file</property> | |
<property name="globs">*.conf</property> | |
<property name="line-comment-start">#</property> | |
</metadata> | |
<styles> | |
<style id="comment" _name="Comment" map-to="def:comment"/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
This file is part of GtkSourceView | |
Author: Antonio Ognio <[email protected]> | |
Modified: Adam Wallner | |
Copyright (C) 2005 Antonio Ognio <[email protected]> |
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 | |
############################################################ | |
### Shell script to uninstall Mac Os X packages ### | |
### Based on pkgutil. ### | |
### Created by Adam Wallner <adam.wallner at gmail.comu> ### | |
### V1.0.1 ### | |
############################################################ | |
IFS=$'\n' | |
function get_pkgid { |
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 | |
/** | |
* Print binary data as hex string | |
* @param string $data | |
* @param string $newline | |
* @param int $width | |
*/ | |
function hexdump($data, $newline = "\n", $width = 16) { | |
static $from = ''; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<language id="qasm" _name="Assembler (Broadcom QPU)" version="2.0" _section="Sources"> | |
<metadata> | |
<property name="mimetypes">text/x-qasm;application/x-qinc</property> | |
<property name="globs">*.qasm;*.qinc</property> | |
<property name="line-comment-start">#</property> | |
</metadata> | |
<styles> | |
<style id="comment" _name="Comment" map-to="def:comment" /> |
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
name: QASM | |
scopeName: source.asm.qasm | |
comment: 'Broadcom QPU assembly language' | |
fileTypes: | |
- qasm | |
- qinc | |
uuid: E82E7ADE-56A9-11E8-A223-1C3947C23EE3 | |
patterns: | |
- include: '#comments' |
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 numpy as np | |
from tensorflow.python.keras import utils | |
class MultiStepTimeseriesGenerator(utils.Sequence): | |
"""Utility class for generating batches of temporal data. | |
This class takes in a sequence of data-points gathered at | |
equal intervals, along with time series parameters such as | |
stride, length of history, etc., to produce batches for |