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 requests, json | |
| from time import strftime | |
| timestamp = strftime("%H:%M:%S") | |
| class Curl(): | |
| def __init__(self): | |
| self.host = str(''.join(['http://localhost/service/'])) | |
| self.token = "" |
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 requests, json | |
| from time import strftime | |
| timestamp = strftime("%H:%M:%S") | |
| class Curl(): | |
| def __init__(self): | |
| self.host = str(''.join(['http://localhost/service/'])) | |
| self.token = "" |
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 | |
| $file = 'Linux.pdf'; | |
| $filename = 'Linux.pdf'; | |
| header('Content-type: application/pdf'); | |
| header('Content-Disposition: inline; filename="' . $filename . '"'); | |
| header('Content-Transfer-Encoding: binary'); | |
| header('Accept-Ranges: bytes'); |
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 | |
| function MultiTable($number_range, $multiple_range){ | |
| $number = 0; | |
| for ($i=1; $i<=$number_range; $i++){ | |
| $text = ""; | |
| $number++; |
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
| No: 1 | |
| Name: wannabe toys | |
| Number: 0146589868 | |
| Location: Sabah - Kota Kinabalu | |
| No: 2 | |
| Name: DeirdreLicious Closet | |
| Number: 0168449118 | |
| Location: Sabah - Kota Kinabalu |
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
| class LogCSV(object): | |
| """CSV generator. | |
| This class responds to GET methods. | |
| """ | |
| def on_get(self, req, resp): | |
| """Generates CSV for log.""" | |
| mylist = [ | |
| 'one','two','three' | |
| ] |
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
| # -*- coding: utf-8 -*- | |
| # | |
| # Copyright 2013-2014 Codebless Solutions. All rights reserved. | |
| # Copyright 2015 Ik-Huan (Sabah) Sdn. Bhd. All rights reserved. | |
| # | |
| # This file is part of Monserver System. | |
| """Resources for log.""" | |
| from datetime import datetime |
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
| csv_data = "" | |
| for x in json_format: | |
| csv_data += str(x['name']) + str(x['flowrate']) + str(x['temperature']) + str(x['power']) + str(x['log_time']) + str(x['created_on']) |
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
| # Function files: | |
| def convert_to_csv(json_format): | |
| """Converts json to csv.""" | |
| csv_data = "" | |
| if json_format: | |
| for x in json_format: | |
| csv_data += str(x['name']) + "," + str(x['flowrate']) + "," + str(x['temperature']) + "," + str(x['power']) + "," +str(x['log_time']) + "," + str(x['created_on']) + "\n" | |
| return csv_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
| #include <stdio.h> | |
| #include <time.h> | |
| int main() | |
| { | |
| time_t mytime; | |
| mytime = time(NULL); | |
| printf(ctime(&mytime)); | |
| return 0; |