我围绕我的项目创建了一个virtualenv,但是当我尝试激活它时我不能.它可能只是语法或文件夹位置,但我现在很难过.
你可以在下面看到,我创建了virtualenv并称之为venv.一切看起来都不错,然后我尝试通过运行来激活它source venv/bin/activate
我想它可能只与我的系统路径有关,但不知道该指向什么(我知道如何编辑路径).我在python 7/windows os,虚拟环境2.2.x
Processing dependencies for virtualenv Finished processing dependencies for virtualenv c:\testdjangoproj\mysite>virtualenv --no-site-packages venv The --no-site-packages flag is deprecated; it is now the default behavior. Using real prefix 'C:\\Program Files (x86)\\Python' New python executable in venv\Scripts\python.exe File venv\Lib\distutils\distutils.cfg exists with different content; not overwri ting Installing setuptools.................done. Installing pip...................done. c:\testdjangoproj\mysite>source venv/bin/activate 'source' is not recognized as an internal or external command, operable program or batch file. c:\testdjangoproj\mysite>source venv/bin/activate 'source' is not recognized …
n log n > n- 但这就像是一段pseudo-linear感情.如果n=1 billion,log n~30;
所以,n log n将30 billion是30 X n,顺序n.我想知道这个时间复杂度之间n log n and n的差异在现实生活中是否显着.
例如:quick select在未排序数组中查找第k个元素是O(n)使用快速选择算法.
如果我对数组进行排序并找到第k个元素,那就是O(n log n).要排序一个数组1 trillion的元素,我会很60 times慢,如果我做quicksort和index it.
我在控制台中查看数据数组.
console.table(myArray)始终将索引作为第一列.这在查看对象数据时很好,当索引是键时,但是当索引是数组索引时(在我的情况下它是分散注意力/烦人)有没有办法显示没有这个索引的表?可选的columns参数允许只显示想要的列...索引除外.
user_1 (master *) 1_EchoServer $ python -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [30/Sep/2017 18:57:11] "GET / HTTP/1.1" 200 -
Run Code Online (Sandbox Code Playgroud)
设置一个简单的服务器。我想用ncat连接它来学习HTTP。
我安装 ncat(pip install nmap):
user_1 Documents $ pip install nmap
Requirement already satisfied: nmap in c:\python36\lib\site-packages
Run Code Online (Sandbox Code Playgroud)
然后,当我尝试连接时,找不到 cmd。它更早工作。不知道我是怎么弄坏的。
user_1 Documents $ pip install nmap
Requirement already satisfied: nmap in c:\python36\lib\site-packages
user_1 Documents $ ncat -l 9999
bash: ncat: command not found
Run Code Online (Sandbox Code Playgroud)
我在 Windows 上使用 git bash,我在 c 驱动器上设置了 python36 并相应地更改了 env 变量和路径。
algorithm ×1
big-o ×1
charts ×1
console.log ×1
http ×1
javascript ×1
nmap ×1
python ×1
virtualenv ×1