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 urllib2, urllib, random, time, hmac, hashlib, base64 | |
from datetime import datetime | |
def piweb(): | |
print 'starting' | |
value_endpoint = '<your PI Web API value endpoint>' | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() | |
password_manager.add_password(None, value_endpoint, '<your username>', '<your password>') |
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 urllib2, urllib, random, time, hmac, hashlib, base64 | |
from datetime import datetime | |
def eh(): | |
print 'starting' | |
uri = 'https://<Event Hub namespace>.servicebus.windows.net/<Event Hub path>/messages' | |
sas = _sign_string(uri, '<Event Hub key>', '<Event Hub key name>') |
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 | |
import sys | |
sys.path.insert(0, '/usr/lib/python2.7/bridge/') | |
import urllib2, urllib | |
import random | |
from time import gmtime, strftime, sleep | |
from bridgeclient import BridgeClient as bridgeclient |
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 <Bridge.h> | |
#include <Console.h> | |
const int temperaturePin = 0; | |
void setup() | |
{ | |
Bridge.begin(); | |
Console.begin(); |
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.Collections.Generic; | |
using OSIsoft.AF; | |
using OSIsoft.AF.Search; | |
namespace ElementSearch | |
{ | |
public class AFElementSearchBuilder | |
{ | |
private AFDatabase _database; |