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 rauth import OAuth1Service | |
import BaseHTTPServer | |
import threading,time | |
import webbrowser | |
import urlparse | |
class Config(object): | |
def __init__(self): | |
# Create a new consumer at https://bitbucket.org/account/user/{username}/api | |
self.consumer_key = <YOUR_KEY> |
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
proc s(x, y, b: var int)= | |
x = x div 2 | |
y = y div 2 | |
b *= 2 | |
proc n(x: var int): int = | |
return -(x+1) | |
proc a(x, y: var int): int = | |
var b = 1 |
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
using System; | |
using System.IO.Ports; | |
namespace VCPTest | |
{ | |
class Program | |
{ | |
static bool _continue; | |
static SerialPort _serialPort; |
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
/// <summary> | |
///A test for calibrate wifi | |
///</summary> | |
[TestMethod()] | |
public void CalibrateWifi_Test() | |
{ | |
ICommDevice target = CTalk.Calibrate(); | |
Action<byte> callback = new Action<byte>((byte b) => Assert.IsTrue(b == (byte)CTalkCommand.Code.ACK)); | |
PTalk.CalibrateWifitarget, callback); | |
} |
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
using System; | |
using System.IO.Ports; | |
class PortDataReceived | |
{ | |
public static void Main() | |
{ | |
SerialPort portA = new SerialPort("COM7"); |
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
internal static string Decrypt(byte[] key,string input) | |
{ | |
if (input == null || input.Length <= 0) | |
throw new ArgumentNullException("input"); | |
if (key == null || key.Length <= 0) | |
throw new ArgumentNullException("Key"); | |
var un64byte = Convert.FromBase64String(input); | |
if (un64byte.Length < 16) | |
return ""; // Too short |
NewerOlder