• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
yjyoon / Daegu-Jeju-DIP star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB 1
  • Files
  • Commit
  • Branches
Daegu-Jeju-DIPtrip.py
Download as .zip file
File name
Commit message
Commit date
database
first commit of refactoring of data transaction - gps data, attempt to fix problems that 1. data being sent too often, 2. in previous method, the data insert operation happens too often. this commit is trying to fix it by 1. data being sent every 15sec (or more) not every sec, 2. reformatted gps data so that data transaction will cost a lot less bandwidth and 3. insertion operation has been replaced with copy, which is more apt for bulk row appendage operation.
2024-07-17
logger
Hello Yona
2024-07-09
README.md
Hello Yona
2024-07-09
action.py
first commit of refactoring of data transaction - gps data, attempt to fix problems that 1. data being sent too often, 2. in previous method, the data insert operation happens too often. this commit is trying to fix it by 1. data being sent every 15sec (or more) not every sec, 2. reformatted gps data so that data transaction will cost a lot less bandwidth and 3. insertion operation has been replaced with copy, which is more apt for bulk row appendage operation.
2024-07-17
app.py
Hello Yona
2024-07-09
auth.py
added json communication format
2024-07-17
blocked_ips.json
Hello Yona
2024-07-09
example.json
added json communication format
2024-07-17
gcity.py
Hello Yona
2024-07-09
requirements.txt
Hello Yona
2024-07-09
trip.py
Hello Yona
2024-07-09
minipc 2024-07-09 7e2552b Hello Yona DOS
Raw Open in browser Change history
from flask import request from flask_restx import Resource, Api, Namespace, fields from navigation_model.model_trip import path_finder import time import numpy as np import networkx todos = {} count = 1 not_in_list=[] #trip = path_finder() Trip = Namespace( name="trip", description="경로 노드를 받기위한 사용하는 API.", ) trip_fields = Trip.model('Trip', { # Model 객체 생성 'path_start': fields.String(description='a Todo', required=True),'path_end' : fields.String(description='a Todo', required=True) }) @Trip.route('/trip') class TripPost(Resource): @Trip.expect(trip_fields) @Trip.response(201, 'Success', trip_fields) def post(self): """경로를 받습니다""" start_time=time.time() start = request.json['path_start'] end = request.json['path_end'] return { 'nodes' : trip.get_trip(start,end), 'start_point' : trip.get_dest(start), 'end_point' : trip.get_dest(end) }, 201 @Trip.route('/trip2') class TripPost(Resource): @Trip.expect(trip_fields) @Trip.response(201, 'Success', trip_fields) def post(self): """경로를 받습니다""" start_time=time.time() start_x = request.json['dest1_x'] start_y = request.json['dest1_y'] end = request.json['path_end'] return { 'nodes' : trip.get_trip_2(start_x,start_y,end,not_in_list), 'start_point' : (start_x,start_y), 'end_point' : trip.get_dest(end) }, 201 @Trip.route('/remove') class removenodePost(Resource): def post(self): """경로를 받습니다""" gps_x = request.json['gps_x'] gps_y = request.json['gps_y'] trip.G.remove_node((float(gps_x),float(gps_y))) not_in_list.append((float(gps_x),float(gps_y))) return { "done" : "done" }, 201

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up