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 | |
class Node(object): | |
def __init__(self, parent, obj): | |
self.parent = parent | |
self.next = None | |
self.obj = obj |
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 circuits import Component | |
from circuits.net.sockets import TCPClient, connect | |
from circuits.net.protocols.irc import IRC, PRIVMSG, USER, NICK, JOIN, RPL_ENDOFMOTD, ERR_NOMOTD # noqa | |
class PBot(Component): | |
def init(self, host, port=6667): | |
self.target = (host, port) | |
self += (TCPClient() + IRC()) |
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
$ python -i foo.py | |
10 | |
8 | |
>>> def digitalSum(n): | |
... if n < 0: sign = -1 | |
... else: sign = 1 | |
... n = abs(n) | |
... if n < 10: return n | |
... return sign * (n % 10 + digitalSum(n // 10)) | |
... |
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
class LinkedList: | |
def __init__(self, value, next=None): | |
self.value = value | |
self.next = next | |
def minmax(ll): | |
if ll.value is None: | |
return (None, None) |
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
---------------------------------------------------------------------- | |
PCpractico.es Wmon v0.64 | |
Developer: Francisco Martinez | |
* ------------ GENERAL SYSTEM INFO ------------------------------------- | |
* Platform: Linux-3.12.17-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-glibc2.2.5 | |
* System: Linux | |
* Release: 3.12.17 | |
* Version: #7 SMP PREEMPT Fri May 9 18:04:48 EST 2014 | |
* CPU ID: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz | |
* CPU Cores: 8 |
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
(chickencoup) | |
prologic@daisy | |
Thu May 29 22:20:40 | |
~/chickencoup | |
$ ino build | |
Searching for Board description file (boards.txt) ... /usr/share/arduino/hardware/arduino/boards.txt | |
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt | |
Detecting Arduino software version ... 1.0.5 (1.0.5) | |
Searching for Arduino core library ... /usr/share/arduino/hardware/arduino/cores/arduino | |
Searching for Arduino standard libraries ... /usr/share/arduino/libraries |
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
$ docker ps -a --no-trunc | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
d7ebbee825cecb4ec38e1efc5048c1656ae3be9194fe5fa0e16b5ae876adfecd ccaih/terranova:latest /bin/sh -c '#(nop) ADD file:54aafd124dc964fa814c64696e6a750788e6dc588957be40238380ea6b60a3bb in /etc/supervisor.d/plone.conf' 28 seconds ago Exited (0) 27 seconds ago ecstatic_lovelace |
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
#include <Adafruit_CC3000.h> | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <aREST.h> | |
#include <Wire.h> | |
#include <Adafruit_MotorShield.h> | |
#include "utility/Adafruit_PWMServoDriver.h" | |
#define ADAFRUIT_CC3000_IRQ 3 |
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/ports/contrib/go/work/pkg/usr/bin/go get -u code.google.com/p/go.tools/cmd/godoc | |
# code.google.com/p/go.tools/go/exact | |
/tmp/go/src/code.google.com/p/go.tools/go/exact/exact.go:255: new(big.Rat).SetFrac(x.val, int1).Float32 undefined (type *big.Rat has no field or method Float32) | |
/tmp/go/src/code.google.com/p/go.tools/go/exact/exact.go:255: not enough arguments to return | |
/tmp/go/src/code.google.com/p/go.tools/go/exact/exact.go:257: x.val.Float32 undefined (type *big.Rat has no field or method Float32) | |
/tmp/go/src/code.google.com/p/go.tools/go/exact/exact.go:257: not enough arguments to return | |
=======> ERROR: Building '/usr/ports/contrib/go/go#1.2.2-1.pkg.tar.gz' failed. | |
prt-get: error while install | |
-- Packages where install failed |
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 circuits import Component | |
from circuits.net.sockets import TCPClient, connect | |
from circuits.protocols.irc import IRC, PRIVMSG, USER, NICK, JOIN | |
from circuits.protocols.irc import ERR_NICKNAMEINUSE | |
from circuits.protocols.irc import RPL_ENDOFMOTD, ERR_NOMOTD | |
class Bot(Component): | |