运行Jupyter Notebook时出现以下错误:
(base) C:\Users\ramne>jupyter notebook
[I 01:19:00.648 NotebookApp] The port 8888 is already in use, trying another port.
Run Code Online (Sandbox Code Playgroud)
而当我做netstat -ano | 找到Str“ 8888”,得到以下信息:
C:\Users\ramne>netstat -ano | findStr "8888"
TCP 127.0.0.1:8888 0.0.0.0:0 LISTENING 16024
TCP [::1]:8888 [::]:0 LISTENING 16024
Run Code Online (Sandbox Code Playgroud)
我不知道端口8888的默认连接是什么或其行为应该是什么样的。如何解决此错误,以便可以打开Jupyter Notebook?
I have a really huge text file (more than 4GB). And I have multiple entries to be searched and replaced in this huge file (pattern.txt).
So, I made up a file called leo.sed and used sed -f command.
leo.sed: This file contains around 500 entries. Example:
s/"PET10"/"PETfdfd0"/g
s/"PET11"/"PET123wef"/g
s/"PET12"/"TETPrandom"/g
Run Code Online (Sandbox Code Playgroud)
I am using following sed command but it is extremely slow.
sed -f leo.sed pattern.text | sed -f leo1.sed > pattern_after_leo_leo1_sed.txt
Run Code Online (Sandbox Code Playgroud)
Any faster way to do with perl one-liner?
我想在@array_mem_depth_$i 中使用 $i 值,以便我动态创建的数组看起来像@array_mem_depth_1024,@array_mem_depth_512。
如何实现这一目标?
while(<FH>) {
$line = $_;
chomp($line);
foreach my $i (@depth_uarr) { if ( $line =~ /$i/) {push (@array_mem_depth_${i}, $line);} }
}
Run Code Online (Sandbox Code Playgroud)
谢谢