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 clr | |
clr.AddReferenceToFileAndPath(r"c:\shared\lib\wiimote\v4\wiimotelib.dll") | |
clr.AddReference("System.CoreEx") | |
clr.AddReference("System.Reactive") | |
clr.AddReference("System.Interactive") | |
from System.Linq import * | |
from WiimoteLib import * | |
from System.Reactive import * |
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
#if INTERACTIVE | |
#r "Microsoft.CSharp.dll" | |
#endif | |
open System | |
open System.Dynamic | |
open System.Linq.Expressions | |
open System.Reflection | |
open System.Runtime.CompilerServices | |
open Microsoft.CSharp.RuntimeBinder |
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
open System | |
open System.Net.Mail | |
open System.Security | |
open System.Security.Cryptography | |
open System.Text | |
open SmtpClientExtension | |
type Account = { | |
User : string; |
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 clr | |
from System.Net import WebRequest | |
from System.Text import ASCIIEncoding | |
from System.IO import StreamReader | |
def http(method, url, data_string=None, header={}): | |
request = WebRequest.Create(url) | |
request.UseDefaultCredentials = True | |
request.Method = method |
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
//----------------------------------------------------------------------------- | |
// A script utility for using WPF with F# Interactive (fsi.exe) | |
// | |
// Copyright (c) Microsoft Corporation 2005-2006. | |
// This sample code is provided "as is" without warranty of any kind. | |
// We disclaim all warranties, either express or implied, including the | |
// warranties of merchantability and fitness for a particular purpose. | |
//----------------------------------------------------------------------------- | |
// When running inside fsi, this will install a WPF event loop |
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
#if INTERACTIVE | |
#load "load-wpf.fsx" | |
#endif | |
// === WPF === | |
open System.Windows | |
open System.Windows.Controls | |
open System.Windows.Media.Imaging |
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
# download and install http://pysvn.tigris.org | |
import pysvn | |
import csv | |
from datetime import datetime | |
svn = pysvn.Client() | |
#DATEFORMAT = "%Y-%m-%d %H:%M:%S" | |
DATEFORMAT = "%Y-%m-%d" |
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 os | |
import logging | |
import logging.handlers | |
import datetime | |
def configure_console_and_rotating_logger(log_file_name=__name__, | |
log_folder="./logs", | |
date_format="%Y-%m-%d %H:%M:%S", | |
log_format="%(asctime)s - %(module)s - %(levelname)s - %(message)s", | |
log_level=logging.NOTSET, |
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
$.ajax({url: "to/my/service/endpoint.what", | |
type: "POST", | |
contentType: "application/json", | |
data: JSON.stringify({"jsonrpc": "2.0", | |
"method": "remote_func", "params": ["arg1","arg2"], "id": 1, | |
}), | |
dataType: "json", | |
success: function(response) { | |
alert(response.result); | |
}, |
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/python | |
# -*- coding: utf-8 -*- | |
import sys | |
from PySide import QtCore, QtGui, QtDeclarative | |
import argparse | |
from PySide.QtWebKit import QWebPluginFactory, QWebView, QWebSettings |
OlderNewer