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
data = ";".join([API_KEY, 'random_number', str(4.3)]) | |
req = requests.post('http://iot.hkar.eu/dash/%s/event' % DASH_ID, data=data) |
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 json | |
import boto3 | |
import json | |
import time | |
import datetime | |
ec2 = boto3.resource('ec2') | |
print('Loading function') |
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
from pprint import pprint as print | |
import random | |
import string | |
class Crypter: | |
# iniciace | |
NAMESPACE_LENGH = 60 | |
NAMESPACE = string.ascii_lowercase | |
def __init__(self, text, table=False): |
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
<?php | |
/* | |
########################################################################## | |
# PHP Benchmark Performance Script mk2 # | |
# # | |
# Author : Jan Karásek # | |
# Company : ---- | |
# Date : August 2, 2014 # | |
# version : 2.0.0 # |
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 redis | |
# připojení k serveru | |
# host localhost | |
# port 6379 | |
# database 0 | |
rd = redis.StrictRedis(host='localhost', port=6379, db=0) | |
rd.set('guacamole', 'ahoj') # pro 'guacamole' (klíč) přiřaď 'ahoj' (hodnotu) | |
text = rd.get('guacamole') # získání hodnoty 'guacamole' |