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 | |
# -*- coding: utf-8 -*- | |
import sqlite3 | |
import sys | |
con = None | |
try: | |
con = sqlite3.connect(':memory:') |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function () { | |
var temperature = '[{"y": 22.125, "x": 1398788844000}, {"y": 21.875, "x": 1398789023000}, {"y": 21.9375, "x": 1398789056000}, {"y": 21.875, "x": 1398789067000}, {"y": 21.9375, "x": 1398789089000}, {"y": 21.9375, "x": 1398789213000}, {"y": 22.0, "x": 1398789224000}, {"y": 22.0625, "x": 1398789365000}, {"y": 22.0, "x": 1398789376000}, {"y": 22.0625, "x": 1398789431000}, {"y": 22.0, "x": 1398789442000}, {"y": 22.0625, "x": 1398789583000}, {"y": 22.0, "x": 1398789594000}, {"y": 21.9375, "x": 1398789605000}, {"y": 21.875, "x": 1398789616000}, {"y": 21.8125, "x": 1398789638000}, {"y": 21.75, "x": 1398789649000}, {"y": 21.6875, "x": 1398789660000}, {"y": 21.625, "x": 1398789682000}, {"y": 21.5625, "x": 1398789736000}, {"y": 21.625, "x": 1398789758000}, {"y": 21.5625, "x": 1398789780000}, {"y": 21.625, "x": 1398789791000}, {"y": 21.5625, "x": 1398789802000}, {"y": 21.5, "x": 1398789824000}, {"y": 21.4375, "x": 139878 |
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 time | |
from threading import * | |
import wx | |
EVENT_TYPE_ID = wx.NewId() | |
class WorkerThread(Thread): | |
def __init__(self, notify_window): | |
Thread.__init__(self) | |
self._notify_window = notify_window |
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
#!/bin/bash | |
# oracle: Start/Stop Oracle Database 11g R2 | |
# | |
# chkconfig: 345 90 10 | |
# description: The Oracle Database is an Object-Relational Database Management System. | |
# | |
# processname: oracle | |
. /etc/rc.d/init.d/functions |
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
#!/bin/bash | |
nohup VBoxHeadless -s centOS |
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
#!/bin/bash | |
modprobe w1-gpio | |
modprobe w1-therm | |
if [ -d /sys/bus/w1/devices ]; then | |
id=$(ls /sys/bus/w1/devices/ | head -n 1); | |
temperature=$(tail -n 1 /sys/bus/w1/devices/$id/driver/$id/w1_slave | grep -o "[-0-9]*$") | |
echo "scale=3;" $temperature "/ 1000.0" | bc | |
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
//============================================================================ | |
// Name : socket_demo.cpp | |
// Author : aGuegu | |
// Version : | |
// Copyright : GPL v2.0 | |
// Description : Hello World in C++, Ansi-style | |
//============================================================================ | |
#include <stdio.h> | |
#include <stdlib.h> |
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
const int pingTrig = 9; // transmission pin | |
const int pingEcho = 8; //receiving pin | |
void setup() { | |
// initialize serial communication: | |
Serial.begin(9600); | |
pinMode(pingTrig, OUTPUT); | |
pinMode(pingEcho, INPUT); | |
} |
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 demo; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import processing.core.PApplet; | |
import processing.core.PVector; | |
import demo.DmPoint; |
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 os | |
import cx_Oracle | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.AL32UTF8' |