Skip to content

Instantly share code, notes, and snippets.

<div class="main">
<p></p>
<p></p>
<p></p>
<div>
import Gnuplot
g = Gnuplot.Gnuplot ()
xlist = [0.8, 1.7, 0.8, 0.7, 2.0,1.5]
result = []
for x in xlist:
result.append ([xlist.index(x), x])
#!/usr/bin/seed
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio
const LEFT = 113;
const RIGHT = 114;
var gallery = {
stage: null,
icons: null,
// Sample extension code, makes clicking on the panel show a message
const St = imports.gi.St;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
function _showHello() {
let text = new St.Label({ style_class: 'helloworld-label', text: "Hello, world!" });
let monitor = global.get_primary_monitor();
global.stage.add_actor(text);
// Sample extension code, makes clicking on the panel show a message
const St = imports.gi.St;
const Mainloop = imports.mainloop;
const Tweener = imports.ui.tweener;
const Main = imports.ui.main;
function _showHello() {
let text = new St.Label({ style_class: 'helloworld-label',
text: "Hello, world!" });
#!/usr/bin/env python
flickr = "http://www.flickr.com/photos/%s/"
people = ['johnroyer', 'huanglifu', 'othree',
'ernest', '38664137@N07', 'bobchao',
'kaba', 'matrixneo', 'acelan', 'sntc06',
'kkbox', 'timchen86', 'greenerc',
'jnlinn', 'joustonhuang', 'lagunawang',
'bizkit', 'ckm', 'jccchou', 'edwardc']
<html>
<head>
<link rel="stylesheet" href="./ui.css" type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="./ui.js"></script>
</head>
<body>
<div class="demo">
<img id="cover-art"></img>
Seed.include("./dbus-rhythmbox.js");
function sendNotification(summary, body, timeOut) {
var notification = new Notify.Notification({summary:summary, body:body});
notification.set_timeout(timeOut);
notification.show();
}
function getWindows () {
Wnck = imports.gi.Wnck;
// Sample extension code, makes clicking on the panel show a message
const St = imports.gi.St;
const Mainloop = imports.mainloop;
const Tweener = imports.ui.tweener;
const Clutter = imports.gi.Clutter;
const Main = imports.ui.main;
function _eatMushroom () {
global.log ("eat mushroom");
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from urllib2 import urlopen
from urllib import urlencode
import simplejson
import sys
def translate(text):
sl="zh-tw"