Read configuration from central configuration file.
This commit is contained in:
parent
86a5abd1b8
commit
2880cf3db3
@ -8,8 +8,12 @@ from yawning_titan.networks.node import Node
|
||||
from logging import getLogger
|
||||
|
||||
# Constants
|
||||
HOST = '172.16.12.69'
|
||||
PORT = 2048
|
||||
from yawning_titan_server.settings.base import BASE_DIR
|
||||
import yaml
|
||||
config = yaml.safe_load(open(BASE_DIR.parent.parent / "config.yaml"))
|
||||
HOST = config['server']['host']
|
||||
PORT = config['server']['port']
|
||||
|
||||
SPIKE_SIZE = struct.calcsize('<QB') # 9 bytes per spike
|
||||
|
||||
logger = getLogger(__name__)
|
||||
|
||||
@ -11,8 +11,12 @@ from yawning_titan.envs.generic.core.network_interface import NetworkInterface
|
||||
from yawning_titan.networks.node import Node
|
||||
from logging import getLogger
|
||||
|
||||
HOST = "172.16.12.69"
|
||||
PORT = 2048
|
||||
from yawning_titan_server.settings.base import BASE_DIR
|
||||
import yaml
|
||||
config = yaml.safe_load(open(BASE_DIR.parent.parent / "config.yaml"))
|
||||
HOST = config['server']['host']
|
||||
PORT = config['server']['port']
|
||||
|
||||
SPIKE_SIZE = struct.calcsize("<QB") # 9 bytes per spike
|
||||
|
||||
# Define action channel ranges
|
||||
|
||||
@ -9,8 +9,11 @@ import time
|
||||
|
||||
# Test script - takes spikes and timestamp into sb3 for AI training. Needs Neuron computer, jupyter neuron script runs 5 secs data then hands over to this script.
|
||||
|
||||
HOST = "172.16.12.69"
|
||||
PORT = 2048
|
||||
from yawning_titan_server.settings.base import BASE_DIR
|
||||
import yaml
|
||||
config = yaml.safe_load(open(BASE_DIR.parent.parent / "config.yaml"))
|
||||
HOST = config['server']['host']
|
||||
PORT = config['server']['port']
|
||||
SPIKE_SIZE = struct.calcsize("<QB") # 9 bytes per spike
|
||||
|
||||
|
||||
|
||||
@ -4,8 +4,11 @@ import struct
|
||||
|
||||
# Script for recieving basic timestamp and channel information, needs jupyter script on neuron computer.
|
||||
|
||||
HOST = "172.16.12.69"
|
||||
PORT = 2048
|
||||
from yawning_titan_server.settings.base import BASE_DIR
|
||||
import yaml
|
||||
config = yaml.safe_load(open(BASE_DIR.parent.parent / "config.yaml"))
|
||||
HOST = config['server']['host']
|
||||
PORT = config['server']['port']
|
||||
|
||||
SPIKE_SIZE = struct.calcsize("<QB") # 9 bytes per spike
|
||||
|
||||
|
||||
@ -3,8 +3,11 @@ import struct
|
||||
|
||||
# Script for recieving basic timestamp and channel information, needs jupyter script on neuron computer. Produces only one spike.
|
||||
|
||||
HOST = "172.16.12.69"
|
||||
PORT = 2048
|
||||
from yawning_titan_server.settings.base import BASE_DIR
|
||||
import yaml
|
||||
config = yaml.safe_load(open(BASE_DIR.parent.parent / "config.yaml"))
|
||||
HOST = config['server']['host']
|
||||
PORT = config['server']['port']
|
||||
|
||||
SPIKE_SIZE = struct.calcsize("<QB") # 9 bytes per spike
|
||||
|
||||
|
||||
4
config.yaml
Normal file
4
config.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
server:
|
||||
# port: 172.16.12.69
|
||||
host: 127.0.0.1
|
||||
port: 2048
|
||||
Loading…
Reference in New Issue
Block a user