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
package jeromq.bugs; | |
import org.zeromq.ZContext; | |
import org.zeromq.ZMQ; | |
import org.zeromq.ZMQ.Socket; | |
public class BindIssue { | |
public static void main(String[] args) { | |
System.out.printf("zeromq v%s\n",ZMQ.getVersionString()); |
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 scipy.io | |
>>> S=scipy.io.loadmat('samplestruct.mat') | |
>>> S['foo'] | |
array([[ ([[(array([[1, 2, 3]], dtype=uint8), array([[-1, -2, -3]], dtype=int16) | |
)]], [[123]])]], | |
dtype=[('bar', 'O'), ('quux', 'O')]) | |
>>> S['foo']['bar'] | |
array([[ array([[([[1, 2, 3]], [[-1, -2, -3]])]], | |
dtype=[('tweedledee', 'O'), ('tweedledum', 'O')])]], dtype=object) | |
>>> S['foo']['bar']['tweedledee'] |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# based on | |
# https://qt.gitorious.org/pyside/pyside-examples/source/060dca8e4b82f301dfb33a7182767eaf8ad3d024:examples/itemviews/simpletreemodel/simpletreemodel.py | |
############################################################################ | |
## | |
## Copyright (C) 2005-2005 Trolltech AS. All rights reserved. | |
## |
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
{%- extends 'html_basic.tpl' -%} | |
{%- block header -%} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>[{{nb.metadata.name}}]</title> |
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 PySide import QtCore, QtGui | |
from PySide.QtCore import Qt | |
from PySide.QtGui import QWidget, QTableView, QVBoxLayout, QApplication | |
def setup_consonants_vowels(): | |
letters = 'abcdefghijklmnopqrstuvwxyz' | |
vowels = set(['a','e','i','o','u','A','E','I','O','U']) | |
consonants = set([c for c in (letters + letters.upper()) if not c in vowels]) | |
return (consonants, vowels) |
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 zmq | |
import codecs | |
import logging | |
logger = logging.getLogger(__name__) | |
def rot13(s): | |
return codecs.encode(s,'rot_13') | |
class Rot13Server(object): |
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
''' | |
Copyright 2014 Jason M. Sachs | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
<html> | |
<head> | |
<style type="text/css"> | |
div.item { | |
display: block; | |
border: 1px solid #888; | |
border-radius: 5px; | |
padding: 2px 15px; | |
} | |
span.rotated { |
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 enaml | |
from enaml.widgets.api import Window, Form, Label, Field, ComboBox | |
from enaml.stdlib.fields import IntField | |
from enaml.qt.qt_application import QtApplication | |
from atom.api import Int, Long, Atom | |
class Model(Atom): | |
longvalue = Long() | |
enamldef Main(Window): |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function createSVG(e) | |
{ | |
return document.createElementNS("http://www.w3.org/2000/svg",e); | |
} | |
function left(v) | |
{ | |
x = v[0]; |
OlderNewer