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
<v-btn | |
text | |
outlined | |
:class="{'text-none': true, clicked: individual == 'a relative'}" | |
style="width: 100%; height: 100%;" | |
@click="individual = 'a relative'; page++" | |
> | |
<v-col | |
cols="12" | |
> |
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
files: | |
"/etc/httpd/conf.d/wsgi_custom.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
WSGIApplicationGroup %{GLOBAL} | |
"/etc/httpd/conf.d/proxy-pass.conf": |
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
option_settings: | |
aws:elb:listener:80: | |
InstancePort: 80 | |
ListenerProtocol: HTTP | |
InstanceProtocol: HTTP | |
ListenerEnabled: 'false' | |
aws:elb:listener:443: | |
InstancePort: 80 |
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
FROM python:3.7-slim | |
RUN mkdir -p /app/storage | |
VOLUME /app | |
WORKDIR /app | |
COPY ./requirements.txt /app/requirements.txt | |
RUN pip install gunicorn | |
RUN pip install -r requirements.txt | |
COPY . /app |
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
from application import wss | |
if __name__ == '__main__': | |
from gevent import pywsgi | |
from geventwebsocket.handler import WebSocketHandler | |
# Development server to run locally on port 5000 | |
app = pywsgi.WSGIServer(('', 5000), wss, handler_class=WebSocketHandler) | |
app.serve_forever() |
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 json, base64, websocket | |
class Base64Encoder(json.JSONEncoder): | |
def default(self, o): | |
if isinstance(o, bytes): return base64.b64encode(o).decode() | |
return json.JSONEncoder.default(self, o) | |
class Emitter: |
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
# Initialize the Flask application | |
application = Flask(__name__) | |
app_sockets = Sockets(application) | |
# Websocket usage example | |
@app_sockets.route('/stream') | |
def stream(websocket): | |
while not websocket.closed: | |
msg = websocket.receive() | |
if msg is None: continue |
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
files: | |
"/etc/httpd/conf.d/wsgi_custom.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
WSGIApplicationGroup %{GLOBAL} | |
"/etc/httpd/conf.d/proxy-pass.conf": | |
mode: "000644" |
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
# Initialize San Francisco mapping | |
map_center_coordinates = (37.7749, -122.4194) | |
m = folium.Map(location=map_center_coordinates, tiles="Stamen Terrain", zoom_start=12) | |
# Load the processed graph of San Francisco | |
trj = Trajectory('../datasets/sanfrancisco.jb') | |
obj = np.random.choice(list(trj.G.keys()), 6) | |
# Build five random objectives given one starting point | |
for i in range(5): | |
pth = trj.shortest_path(obj[0], obj[i+1]) | |
pts = np.asarray([np.asarray(e.split(':')).astype('float')[::-1] for e in pth]) |
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
{ | |
'computeFFT': True, 'mainFrequency': True, | |
'computePeriodogram': True, 'computeSpectrogram': True, | |
'frequencyBands': True, | |
'coefficientsAR': True, | |
'crossingOver': True, 'computePolarity': True, | |
'computeWavelet': True, | |
'computeChaos': True, 'computeFractals': True, | |
'signalDecomposition': True, | |
'computeStatistics': True, |
NewerOlder