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
| class Graph: | |
| def __init__(self): | |
| self.nodes = set() | |
| self.edges = defaultdict(list) | |
| self.distances = {} | |
| def add_node(self, value): | |
| self.nodes.add(value) | |
| def add_edge(self, from_node, to_node, distance): |
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
| require("lsqlite3") | |
| -- Igmar: Wanneer closen we dat DB object eigenlijk ? | |
| db = sqlite3.open('/etc/asterisk/users.sqlite') | |
| --CONSOLE = "Console/dsp" -- Console interface for demo | |
| --CONSOLE = "DAHDI/1" | |
| --CONSOLE = "Phone/phone0" | |
| TRUNK = "DAHDI/G1" |
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
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <ev++.h> | |
| #include <netinet/in.h> | |
| #include <sys/socket.h> | |
| #include <resolv.h> | |
| #include <errno.h> | |
| #include <list> |
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 time | |
| import zmq | |
| context = zmq.Context() | |
| # Socket to receive messages on | |
| receiver = context.socket(zmq.PULL) | |
| receiver.bind("tcp://*:5558") |
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
| bootstrap-tooltip.js | |
| bootstrap-popover.js | |
| bootstrap-alert.js | |
| bootstrap-button.js | |
| bootstrap-carousel.js | |
| bootstrap-collapse.js | |
| bootstrap-dropdown.js | |
| bootstrap-modal.js | |
| bootstrap-scrollspy.js | |
| bootstrap-tab.js |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on 23/10/2011 | |
| @author: Carlo Pires <[email protected]> | |
| """ | |
| import sys | |
| import time | |
| from daemon import DaemonContext | |
| from daemon.runner import make_pidlockfile, is_pidfile_stale |
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
| def store_pdfs_in_zip(): | |
| docs = Dokument.all().order('updated_at') | |
| file_name = files.blobstore.create(mime_type='application/zip', | |
| _blobinfo_uploaded_filename='test.zip') | |
| with files.open(file_name, 'w') as f: | |
| z = blobstoreZipFile(f) | |
| for doc in docs.fetch(75): | |
| pdf = doc.data | |
| fname = "%s-%s.pdf" % (doc.designator, doc.updated_at) | |
| fname = fname.encode('ascii', 'replace') |
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 | |
| # encoding: utf-8 | |
| """ | |
| replication.py - extport data to external systems | |
| Created by Maximillian Dornseif on 2011-05-01. | |
| Copyright (c) 2011 HUDORA. All rights reserved. | |
| """ | |
| from __future__ import with_statement |
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 bisect | |
| import itertools | |
| import operator | |
| class _BNode(object): | |
| __slots__ = ["tree", "contents", "children"] | |
| def __init__(self, tree, contents=None, children=None): | |
| self.tree = tree |
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
| ''' | |
| redis_search.py | |
| Written by Josiah Carlson July 3, 2010 | |
| Released into the public domain. | |
| This module implements a simple TF/IDF indexing and search algorithm using | |
| Redis as a datastore server. The particular algorithm implemented uses the |