This file contains hidden or 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
@given( | |
st.lists(st.tuples(st.integers(min_value=0, max_value=10), st.integers(min_value=0, max_value=10)), min_size=1, | |
max_size=90)) | |
def test_resolve_dependencies(self, edges): | |
dag = DirectedGraph.from_edges(edges) | |
if DirectedGraph.is_cyclic(dag): | |
with self.assertRaises(CyclicDependencyError): | |
_ = EOWorkflow._resolve_dependencies(dag) | |
else: | |
ver2pos = {u: i for i, u in enumerate(EOWorkflow._resolve_dependencies(dag))} |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
) | |
func main() { |
This file contains hidden or 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 functools | |
from hypothesis import given, strategies as st | |
def selection_sort(items): | |
items = list(items) | |
for idx, _ in enumerate(items, 0): | |
min_idx = idx | |
for jdx, item in enumerate(items[idx+1:], idx+1): |
This file contains hidden or 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 sys | |
import collections | |
import string | |
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
LOGGER = logging.getLogger(__name__) |
This file contains hidden or 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
""" A simple trie implementation """ | |
class Node: | |
def __init__(self, value=None, count=0): | |
self.value = value | |
self.count = count | |
self.children = {} | |
def __contains__(self, value): |
This file contains hidden or 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
""" | |
A proof-of-concept implementation of algorithms and formulas described in [1]. | |
[1] https://arxiv.org/abs/1403.6348 | |
Blaz Sovdat ([email protected]) | |
""" | |
import collections | |
import math |
This file contains hidden or 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
// -- Description -- | |
// Assume 'S' is always the start symbol | |
// You may assume that your method will be tested in the following setting: | |
// - grammar will contain between 1 and 100 strings, | |
// - each string will represent one production (possibly with multiple right | |
// hand sides, separated by | (see examples)), | |
// - word can be empty or up to 10000 terminal symbols (characters) long. | |
// -- References -- | |
// [1] Jay Earley. An Efficient Context-Free Parsing Algorithm. Communications of the ACM, 1970. | |
// [2] John Aycock and Nigel Horspool. Practical Earley Parsing. Computer Journal, 2002. |
This file contains hidden or 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
""" | |
Quick and dirty prototypical implementation of the Huffman encoding. | |
Blaz Sovdat ([email protected]), December 20th 2017 | |
""" | |
import collections | |
import enum | |
import heapq |
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
import math | |
import itertools as it | |
import numpy as np | |
import scipy.misc |
This file contains hidden or 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
// 20170109132547 | |
// http://localhost:8086/v1/fis/b7b5e3ef-5a40-4e2a-9fd3-75ca2b81cb32?showLogo=false&SERVICE=WCS&LAYERS=B04,B03,B02&FORMAT=image%2Fjpeg&TRANSPARENT=FALSE&VERSION=1.1.1&HEIGHT=512&WIDTH=512&SRS=EPSG%3A4326&MAXCC=20&TIME=2015-01-01%2F2017-01-09&BBOX=29.02587890625,30.80791068136646,29.0478515625,30.826780904779774 | |
[ | |
{ | |
"time": "2017-01-04", | |
"data": [ | |
{ | |
"layer": "B04", | |
"min": 102.0, |
NewerOlder