Initial commit
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
0
pqos/Example files/.gitkeep
Normal file
0
pqos/Example files/.gitkeep
Normal file
29
pqos/Example files/pqos_curl.py
Normal file
29
pqos/Example files/pqos_curl.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import requests
|
||||
import pandas as pd
|
||||
import pickle
|
||||
from time import sleep
|
||||
|
||||
# This part of the code is to be manually edited:
|
||||
#
|
||||
# url='http://IP_OF_THE_PQoS:PORT_5000_INTERNALLY/accept_data'
|
||||
url = 'http://192.168.2.213:5000/accept_data' # url to send the request to
|
||||
total_sets = 10 # The total number of sets of 100s to send to the PQoS
|
||||
#
|
||||
# End of the part to manually edit
|
||||
|
||||
def send_dataset(start, end, sets):
|
||||
try:
|
||||
dataset = pd.read_csv("test.csv")
|
||||
elements = dataset[start-1:end]
|
||||
to_send = pickle.dumps(elements)
|
||||
requests.post(url, data= to_send)
|
||||
sets += 1
|
||||
print("Dataset sent to PQoS")
|
||||
if (end < len(dataset)) and (sets != total_sets):
|
||||
sleep(5)
|
||||
send_dataset(start + 100, end + 100, sets)
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"Error while sending data to PQoS: {e}")
|
||||
|
||||
sets = 0
|
||||
send_dataset(1, 100, sets)
|
||||
2404
pqos/Example files/test.csv
Normal file
2404
pqos/Example files/test.csv
Normal file
File diff suppressed because it is too large
Load Diff
101
pqos/Example files/test100.csv
Normal file
101
pqos/Example files/test100.csv
Normal file
@@ -0,0 +1,101 @@
|
||||
lat,long,rtt
|
||||
48.4339443,9.967161733333334,78900000
|
||||
48.43394475,9.9671683,78900000
|
||||
48.43393966666667,9.9671245,51800000
|
||||
48.4339408,9.96712915,51800000
|
||||
48.43393145,9.96710145,77200000
|
||||
48.43391836666667,9.967084033333334,82100000
|
||||
48.4339061,9.9670742,17200000
|
||||
48.43389823333333,9.9670709,17200000
|
||||
48.4339024,9.96707235,17200000
|
||||
48.4338805,9.9670667,21400000
|
||||
48.4338755,9.96706675,21400000
|
||||
48.43385146666666,9.9670702,41500000
|
||||
48.433824900000005,9.96708105,92800000
|
||||
48.43379503333333,9.967094366666666,75400000
|
||||
48.43376073333334,9.967111333333332,172000000
|
||||
48.4337206,9.9671297,119000000
|
||||
48.43372695,9.9671269,119000000
|
||||
48.43368280000001,9.967145766666668,28000000
|
||||
48.43364845,9.9671582,18000000
|
||||
48.43364193333334,9.967160833333333,18000000
|
||||
48.4336012,9.967175066666666,50600000
|
||||
48.433549825,9.96718925,94500000
|
||||
48.43355746666666,9.967187366666668,94500000
|
||||
48.43349716666666,9.9672049,38000000
|
||||
48.43345243333332,9.967218666666668,21900000
|
||||
48.4334024,9.96723545,26100000
|
||||
48.433353966666665,9.967254733333334,34100000
|
||||
48.43331236666666,9.967272533333334,18400000
|
||||
48.43327283333334,9.967288466666666,22700000
|
||||
48.433266875,9.967290825,22700000
|
||||
48.433233400000006,9.96730325,28600000
|
||||
48.433228533333335,9.967305133333332,28600000
|
||||
48.4332024,9.96731445,26800000
|
||||
48.43319576666666,9.967316466666666,26800000
|
||||
48.4331661,9.96732555,20200000
|
||||
48.433161000000005,9.967327233333334,20200000
|
||||
48.43313016666667,9.967335133333334,22100000
|
||||
48.4331365,9.96733405,22100000
|
||||
48.43310035,9.967341,34500000
|
||||
48.4330944,9.9673422,34500000
|
||||
48.433064,9.9673496,28400000
|
||||
48.433057600000005,9.967351266666666,28400000
|
||||
48.4330266,9.9673621,26500000
|
||||
48.43301893333333,9.967365466666664,26500000
|
||||
48.43298155,9.9673846,30600000
|
||||
48.43297520000001,9.967387166666668,30600000
|
||||
48.4329455,9.9674008,30500000
|
||||
48.43293645,9.96740435,30500000
|
||||
48.43290655,9.96741765,16700000
|
||||
48.432897966666665,9.967420833333334,16700000
|
||||
48.4328529,9.967438200000002,27200000
|
||||
48.432813566666674,9.967453433333334,37000000
|
||||
48.4327773,9.967465,31800000
|
||||
48.4327722,9.967466675,31800000
|
||||
48.43274195,9.9674775,37400000
|
||||
48.43273713333334,9.967479633333332,37400000
|
||||
48.43270859999999,9.9674912,33800000
|
||||
48.43267659999999,9.967503575,52400000
|
||||
48.4326811,9.967501733333334,52400000
|
||||
48.4326455,9.967515566666666,42300000
|
||||
48.43264985,9.96751385,42300000
|
||||
48.432623750000005,9.96752325,82800000
|
||||
48.43261966666668,9.967524666666666,82800000
|
||||
48.43259766666666,9.967532233333332,75400000
|
||||
48.432594775,9.967533275,75400000
|
||||
48.43257795,9.9675397,37800000
|
||||
48.43257533333334,9.967540666666666,37800000
|
||||
48.43255946666667,9.967545433333337,36000000
|
||||
48.432543900000006,9.967550766666667,32400000
|
||||
48.4325268,9.96755595,20900000
|
||||
48.4325292,9.967555333333332,20900000
|
||||
48.43251245,9.96755925,29300000
|
||||
48.43250983333333,9.967559766666668,29300000
|
||||
48.4324989,9.96756175,25500000
|
||||
48.432496833333325,9.9675621,25500000
|
||||
48.4324861,9.9675637,39500000
|
||||
48.43248413333333,9.967563833333331,39500000
|
||||
48.4324748,9.9675651,27200000
|
||||
48.43247515,9.9675647,27200000
|
||||
48.4324734,9.967566266666667,33600000
|
||||
48.4324737,9.9675665,19700000
|
||||
48.4324737,9.9675665,22500000
|
||||
48.4324737,9.9675665,22500000
|
||||
48.43247363333334,9.9675666,37100000
|
||||
48.43247362500001,9.96756665,37100000
|
||||
48.4324736,9.9675668,35500000
|
||||
48.4324736,9.9675668,26700000
|
||||
48.4324736,9.9675668,26700000
|
||||
48.4324736,9.9675668,28400000
|
||||
48.4324736,9.9675668,43600000
|
||||
48.432473,9.967566,26200000
|
||||
48.432471825,9.9675648,26200000
|
||||
48.43247246666667,9.967565366666667,26200000
|
||||
48.43246805,9.96756225,32000000
|
||||
48.43246783333333,9.967562166666667,32000000
|
||||
48.4324674,9.967562,28000000
|
||||
48.4324674,9.967562,28000000
|
||||
48.4324674,9.967562,19000000
|
||||
48.4324674,9.967562,19000000
|
||||
48.4324674,9.967562,26000000
|
||||
|
Reference in New Issue
Block a user