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
#pragma once | |
#include <type_traits> | |
#include <variant> | |
#include <string> | |
#include <vector> | |
#include <map> | |
#include <optional> | |
namespace gpds |
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
#include <QCoreApplication> | |
#include <QFile> | |
#include <QDir> | |
#define Size 150 * 2096 | |
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
QDir dir; | |
dir.mkdir("video"); |
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 logging | |
logger = logging.getLogger("compass") | |
from simulator import McuSimulator | |
simulator = McuSimulator() | |
# data protocol: nmea0183 | |
@simulator.route_cmd("PING") | |
def cmd_none(msg: bytes): | |
simulator.send( b'#ID?*hh' ) | |
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
"""by BriFuture | |
根据 http://neuralnetworksanddeeplearning.com/chap1.html 中的内容学习编写 Network,为了理解 Network, | |
自己根据文中的内容编写 Network 的代码,而不是简单的抄写文中的示例代码 | |
""" | |
import numpy as np | |
def sigmiod(z): | |
"""z: [0, 1] | |
""" |
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
#pragma execution_character_set("utf-8") | |
#include "cameradatapool.h" | |
#include <QDebug> | |
template<class T> | |
DataObjPool<T>::DataObjPool(int size) | |
{ | |
T *pt; | |
pool.reserve(size); |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
""" | |
## 如何查找特定设备的 IP | |
有几种方法在局域网中找到某个设备(设为设备 A)的 IP 地址: | |
1. 在设备 A 上运行一段程序,该程序每隔一段时间向局域网中发送广播包(UDP 广播包),(设备 B)上运行另一个程序监听相应的端口,当接收到特定格式的消息时认为收到正确的消息,此时在命令行中打印出来的的远程设备的 IP 地址即为需要的 IP。 | |
2. 在设备 A 上运行一段程序,该程序监听预先约定好的端口,在设备 B 上向所有 IP 地址的该端口(广播)发送消息,远程设备回复时即可得到对应的 IP。 | |
注意发送 UDP 的广播包时,将 IP 地址设为 "255.255.255.255" 即可广播到整个网络,设为 "192.168.0.255" 可广播到 "192.168.0.0/24" 的网络。如果设为其他的 IP 地址如 “192.168.255.255” 则程序运行时会报错。 | |
## 代码地址: | |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from pathlib import Path | |
mod_suffix = ('.cpp', '.h') | |
import os | |
statement = """#pragma execution_character_set("utf-8")\n""" | |
statement_len = len(statement) | |
src_encode = "utf-8" |
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
module.exports = { | |
devServer: { | |
index: 'home.html', | |
// user: 'user.html', | |
proxy: { | |
'/api': { | |
target: 'http://127.0.0.1:5050/api/', | |
changeOrigin: true, | |
pathRewrite: { | |
'^/api': '' |