Commit 0855e7d5 authored by Yuncong Yu's avatar Yuncong Yu
Browse files

Sort the directory structure.

parent aea9dde7
...@@ -7,8 +7,10 @@ __pycache__ ...@@ -7,8 +7,10 @@ __pycache__
*.pyd *.pyd
*.pyo *.pyo
*.obj *.obj
201207_IAVHeKu_212-SM-9221_WMA4ID41_DS18_TestV_10_EU5FM_800m_0C_freie_Fahrt_nrm_01.h5
201207_IAVHeKu_212-SM-9221_WMA4ID41_DS18_TestV_10_EU5FM_800m_0C_freie_Fahrt_nrm_01_compressed.h5
Angu:arApp/prototype/node_modules Angu:arApp/prototype/node_modules
clion-log.txt
Documents/ Documents/
Flaskserver/venv/* Flaskserver/venv/*
clion-log.txt
tmp.py tmp.py
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/AngularApp.iml" filepath="$PROJECT_DIR$/.idea/AngularApp.iml" />
</modules>
</component>
</project>
\ No newline at end of file
install: install:
conda env create -f ./environment.yml conda env create -f ./environment.yml
server: server:
cd Flaskserver && export FLASK_APP=main.py && export FLASK_ENV=development && export FLASK_DEBUG=1 && flask run cd backend && export FLASK_APP=src/main.py && export FLASK_ENV=development && export FLASK_DEBUG=1 && flask run
gui: ui:
cd AngularApp && cd prototype && ng serve --open cd frontend && ng serve --open
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
import logging import logging
import os
from pathlib import Path from pathlib import Path
from time import time, perf_counter from time import time, perf_counter
from typing import Any, Dict, List from typing import Dict, List
import numpy as np import numpy as np
import orjson import orjson
from flask import Flask, request from flask import Flask, request
from flask_cors import CORS from flask_cors import CORS
import preprocessing from src import preprocessing
import pseudo from src import pseudo
# Config # Config
......
...@@ -15,17 +15,17 @@ logging.basicConfig(level=logging.INFO) ...@@ -15,17 +15,17 @@ logging.basicConfig(level=logging.INFO)
data_path = "data/processed-data.npy" data_path = "data/processed-data.npy"
def read_data(): # def read_data():
size = bbi.chromsizes("test.bigWig")["chr1"] # size = bbi.chromsizes("test.bigWig")["chr1"]
bins = 100000 # bins = 100000
data = bigwig.get("data/test.bigWig", "chr1", 0, size, bins) # data = bigwig.get("data/test.bigWig", "chr1", 0, size, bins)
print(data.shape) # print(data.shape)
response = [ # response = [
{"index": list(range(0, size, int(size / (bins)))), "values": data.tolist()}, # {"index": list(range(0, size, int(size / (bins)))), "values": data.tolist()},
{"index": list(range(0, size, int(size / (bins)))), "values": data.tolist()}, # {"index": list(range(0, size, int(size / (bins)))), "values": data.tolist()},
{"index": list(range(0, size, int(size / (bins)))), "values": data.tolist()}, # {"index": list(range(0, size, int(size / (bins)))), "values": data.tolist()},
] # ]
return response # return response
def create_peax_windows_12kb(window_size): def create_peax_windows_12kb(window_size):
...@@ -97,7 +97,7 @@ def read_eeg_data(nr_of_channels): ...@@ -97,7 +97,7 @@ def read_eeg_data(nr_of_channels):
def read_weather_data(): def read_weather_data():
filename = "data/weather.pkl" filename = "../data/weather.pkl"
if not os.path.isfile(filename): if not os.path.isfile(filename):
print("start") print("start")
df = dd.read_csv("data/NW_Ground_Stations_2016.csv", usecols=["number_sta", "date", "t", "hu", "td", "dd", "ff", "psl", "precip"]) df = dd.read_csv("data/NW_Ground_Stations_2016.csv", usecols=["number_sta", "date", "t", "hu", "td", "dd", "ff", "psl", "precip"])
...@@ -152,7 +152,7 @@ def read_weather_data(): ...@@ -152,7 +152,7 @@ def read_weather_data():
def create_weather_windows(window_size): def create_weather_windows(window_size):
if not os.path.isfile("data/weather-" + str(window_size) + ".npy"): if not os.path.isfile("data/weather-" + str(window_size) + ".npy"):
filename = "data/weather.pkl" filename = "../data/weather.pkl"
df = pd.read_pickle(filename) df = pd.read_pickle(filename)
channels = list() channels = list()
channels.append(df.loc[df["number_sta"] == 14137001].loc[:, "t"].fillna(0).values.tolist()) channels.append(df.loc[df["number_sta"] == 14137001].loc[:, "t"].fillna(0).values.tolist())
......
...@@ -269,7 +269,7 @@ def query(data, window_indices): ...@@ -269,7 +269,7 @@ def query(data, window_indices):
def debug_test_lsh(): def debug_test_lsh():
data = np.load('data/processed-data.npy') data = np.load('../data/processed-data.npy')
# data = np.repeat(data, repeats=7, axis=1) # data = np.repeat(data, repeats=7, axis=1)
print(data.shape) print(data.shape)
data = np.reshape(data, (len(data), len(data[0][0]), len(data[0]))) data = np.reshape(data, (len(data), len(data[0][0]), len(data[0])))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment