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 sklearn | |
if (sklearn.__version__ != '0.23.2'): | |
raise Exception("scikit-learn package version must be 0.23.2") | |
import os | |
import numpy as np | |
from scipy.io import loadmat | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import classification_report | |
from sklearn.metrics import confusion_matrix |
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
resolution = 10; | |
data=tabulate(... | |
round(activitydata(:,chnumber) * resolution)... | |
); | |
bar(data(:,1),data(:,3)/100,1, 'FaceColor','k'); | |
xlabel('Activity Level x Resolution(a.u.)'); | |
ylabel('Proportion'); |
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 serial | |
import serial.tools.list_ports | |
for i in serial.tools.list_ports.comports(): | |
print(i) | |
mySerial = serial.Serial('COM16',9600, timeout=2) | |
print(mySerial) | |
mySerial.write(b'A') |
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 pathlib import Path | |
import shutil | |
import re | |
baselocation = Path(r'D:/정지훈/20FEB') | |
copylocation = Path(r'C:/Users/SunwhiTDT/Desktop/') | |
print('Base Location : ') | |
print(baselocation) | |
print('\n') |
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
void setup() { | |
// code below only runs once | |
pinMode(6,OUTPUT); // setting up the digital pin 6. You don't need to call this func twice. | |
digitalWrite(6,HIGH); // supply 5V to the digital pin 6 | |
delay(1000); // freeze for 1000ms | |
digitalWrite(6,LOW); // supply 0V to the digital pin 6 | |
} | |
void loop() { | |
// code below runs repeatedly |
NewerOlder