09 2022 档案
摘要:参考:https://www.cnblogs.com/ajietext/p/13837750.html 首先先装nvm,为什么装这个?就是node.js各类版本的管理器,随时能切换版本。 如果遇到这种情况 只需要改下版本就可以解决了,不需要处理依赖或重装node.js等问题。 # windows 安
阅读全文
摘要:input_python = { 'n_layer':n_layer, 'L':L, 'Emm':Emm, 'mu':mu, 'h':h, 'P':P, 'Q':Q, 'a':a, 'p':[p], 'q':[q], 'xx_':xx_, 'yy_':yy_, 'n_d':n_d, 'upper_h
阅读全文
摘要:使用pandas库,使用read_csv()函数,能够将csv文件直接转化为dataframe对象。 使用numpy库的array()函数,将dataframe对象转化为array import pandas as pd from numpy import * input_data = array(
阅读全文
摘要:注意不要和python内置的round函数弄混了 内置的round函数只能作用于单个数 import pandas as pd import numpy as np pd.DataFrame(变量名).to_csv("data.csv") pd.DataFrame(np.round(变量名,n)).
阅读全文
摘要:关键: from 文件名 import 函数名 主文件(main.py)需要和包含子函数的文件(fun_cal_modulus8.py)放到同一路径下 fun_cal_modulus8.py from numpy import * # 8水平 def cal_modulus8(Eal,Eah): E
阅读全文
摘要:main.rs #![windows_subsystem = "windows"] use std::process::Command; use std::os::windows::process::CommandExt; use std::thread::sleep; use std::time:
阅读全文
摘要:main.rs use std::thread::sleep; use std::time::{Duration,Instant}; fn main() { let now = Instant::now(); // 程序起始时间 println!("{:?}",now); let three_sec
阅读全文
摘要:main.rs #![windows_subsystem = "windows"] use std::process::Command; use std::os::windows::process::CommandExt; fn main() { let output = if cfg!(targe
阅读全文
摘要:main.rs #![windows_subsystem = "windows"] use std::process::Command; use std::os::windows::process::CommandExt; fn main() { let output = if cfg!(targe
阅读全文
摘要:main.rs #![windows_subsystem = "windows"] use std::process::Command; use std::os::windows::process::CommandExt; fn main() { let output = if cfg!(targe
阅读全文
摘要:main.rs #![windows_subsystem = "windows"] use std::process::Command; use std::os::windows::process::CommandExt; fn main() { let output = if cfg!(targe
阅读全文
摘要:main.rs #![windows_subsystem = "windows"] use std::process::Command; use std::os::windows::process::CommandExt; fn main() { let output = if cfg!(targe
阅读全文
摘要:https://blog.csdn.net/weixin_35894173/article/details/112282032 https://rustcc.cn/article?id=f1630b61-4637-4e80-8414-8a921af50d68 主要原理是,通过函数creation_f
阅读全文
摘要:main.rs use std::process::Command; fn main() { let output = if cfg!(target_os = "windows") { Command::new("cmd") .arg("/C") .arg("rundll32 sysdm.cpl,E
阅读全文
摘要:https://rust.ffactory.org/std/process/struct.Command.html 进程生成器,提供对如何生成新进程的细粒度控制。 可以使用 Command::new(program) 生成默认配置,其中 program 提供了要执行的程序的路径。 其他生成器方法允许
阅读全文
摘要:https://juejin.cn/post/6844903821307723789 extern crate 关键字用于导入依赖库,你只需将其添加到主文件中,应用程序的任何源文件就都可以引用它了。 use 部分则是指你将在这个文件中使用依赖库的哪个模块。 Rust 模块(module)的简要说明:
阅读全文
摘要:Cargo.toml [package] name = "rust-example-0012" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/
阅读全文
摘要:Cargo.toml [package] name = "rust-example-0011" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/
阅读全文
摘要:Cargo.toml [package] name = "rust-example10" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/car
阅读全文
摘要:Cargo.toml [package] name = "rust-example9" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/carg
阅读全文
摘要:Cargo.toml [package] name = "rust-example5" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/carg
阅读全文
摘要:Cargo.toml [package] name = "rust-example5" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/carg
阅读全文
摘要:cargo.toml [package] name = "rust-example5" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/carg
阅读全文
摘要:Cargo.toml [package] name = "rust-example4" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/carg
阅读全文
摘要:Cargo.toml [package] name = "rust-example5" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/carg
阅读全文
摘要:Cargo.toml main.rs example.py
阅读全文
摘要:# -*- coding: utf-8 -*- """ Created on Fri Sep 2 13:36:56 2022 @author: Userss """ from xml.etree.ElementTree import indent from numpy import * # impo
阅读全文
摘要:完整实例,已编译运行成功 参考: rust ffi数据之间相互转换 https://kaisawind.gitee.io/2020/05/25/2020-05-25-rust-ffi/ python使用rust编译的dll传递字符串 https://www.cnblogs.com/hardfood/
阅读全文
摘要:#![allow(non_snake_case)] #![allow(unused)] extern crate peroxide; use peroxide::fuga::*; let input1 = hex::decode(input0).unwrap(); let input2 = from
阅读全文
摘要:https://blog.csdn.net/wowotuo/article/details/86251414 在处理一些计算密集型,或者系统交互较多的时候,使用编译后的程序,动态库效率会高不少,而且把相应功能封装成动态库可以便于复用,隐藏脚本语言的实现细节 一般制作DLL都是用C/C++等语言来写,
阅读全文
摘要:转自 https://blog.csdn.net/yuanren201/article/details/115035323 #encoding=utf-8 import os main = r'D:\cloc\cloc-1.64.exe' # 你要运行的exe文件 params1 = r'C:\Us
阅读全文
摘要:转自 https://blog.csdn.net/zsc201825/article/details/80918185 方法一、os.system() 会保存可执行程序中的打印值和主函数的返回值,且会将执行过程中要打印的内容打印出来 import os main = "project1.exe" r
阅读全文
摘要:rust中String,&str,Vec 和&[u8]的惯用转换 https://zhuanlan.zhihu.com/p/372082802 &str -> String--| String::from(s) or s.to_string() or s.to_owned() &str -> &[u
阅读全文
摘要:conda install pandas import pandas as pd pd.DataFrame(变量名).to_csv('data1.csv') # 利用pandas将数据保存到csv文件中 pd.DataFrame(p_i).round(4).to_csv('data1.csv') #
阅读全文
摘要:int float string list array tuple dict
阅读全文
摘要:--基本概念-- 数据类型(零维、一维、二维、多维、嵌套)、数据类型转换、动态赋值(::new()、.push()) 所有权(一仆只一主、主走仆亦离)、生命周期、borrow、move、copy if条件语句、for循环语句、迭代器
阅读全文
摘要:以下: 例1和例2产生相同的结果:vec<> or list 例3产生: vec<vec<>> 可以使用py_matrix转化为矩阵 例1 #![allow(non_snake_case)] // #[macro_use] extern crate peroxide; use peroxide::f
阅读全文
摘要:#![allow(non_snake_case)] // #[macro_use] extern crate peroxide; use peroxide::fuga::*; // mod coeff; fn main() { let vx1 = vec![1,2,3]; let vx2 = vec
阅读全文
摘要:数据类型定义及调用 整型(i32)、浮点型(i64)、字符型、布尔型 零维、一维、二维、多维 高维可以理解为低维的嵌套 变量使用必须定义 不可变变量不可二次赋值,可变变量可以二次赋值 usize 根据系统情况自动选择u32还是u64 vec<i32> = vec![1,2,3] vec<f64> =
阅读全文
摘要:网址 Rust语言中文社区 https://rustcc.cn/ https://www.rustwiki.org.cn/docs/ https://course.rs/basic/intro.html http://crates.io/ https://docs.rs/peroxide/lates
阅读全文