Skip to content
python logo

Python

Python is a dynamically typed programming language designed by Guido van Rossum. Much like the programming language Ruby, Python was designed to be easily read by programmers. Because of its large following and many libraries, Python can be implemented and used to do anything from webpages to scientific research.

Here are 123,174 public repositories matching this topic...

httpie
rshurts
rshurts commented Mar 8, 2017

Brew is listed as the recommended way of installing httpie on macOS. However, it doesn't work with auth plugins.

For example, if you pip3 install requests-hawk and then run http --help hawk will not show as an auth type. If you pip3 install httpie-oauth it will install httpie via pip as a dependency and overwrite the brew installed link in /usr/local/bin/http and now all the plugins wil

requests
rabbbit
rabbbit commented Oct 2, 2017

tldr; in multi-process environment (Celery) sessions might lead to request/responses being mixed up.

It is unsafe to use Session in a multi-process environment - if the fork happens after Session initialisation the underlying connection pool will be shared across both processes, leading to potentially dangerous and hard to debug issues.

I'm not sure what should happen - whather a code change

jnothman
jnothman commented Sep 11, 2019

Currently, using OrdinalEncoder with a string-valued feature, and without categories explicitly specifying an order, means that OrdinalEncoder will number the categories according to their lexicographic ordering.

This is not appropriate if the categories have a natural ordering (e.g. ['Green', 'Amber', 'Red']) that can be harnessed by the downstream estimator.

Rather, we should allow the u

mohmad-null
mohmad-null commented Jul 13, 2019

When triggered, the DOWNLOAD_MAXSIZE setting raises an ERROR level logging event. I don't think it should be at this level. Error is "something went wrong"; I've explicitly told Scrapy I don't want files of this size, so it's not an error to not download them. WARN or even just INFO makes more sense.

I'm logging Error levels and above to stderr so I can keep track of them easily and it's bein

agadetsky
agadetsky commented Sep 18, 2019

🚀 Feature

Add numerically stable cumulative logsumexp function. Also we have associated PR on cummax that is needed for numerically stable implementation (pytorch/pytorch#20240).

Motivation

This is useful when computing sum of probabilities and have different applications.

Pitch

Torch has cumsum and cumprod so I suggest logcumsumexp to be added.

bmw
bmw commented Nov 12, 2019

One of our plugin interfaces takes a RenewableCert, however, we recently made the file containing that class private. This is awkward as there there is no guidance on how to use this parameter.

I personally don't want to make all of storage.py or even RenewableCert public because there's a lot of code there that I don't think will be used in plugins and making it public makes it harder for

azl397985856
azl397985856 commented Oct 28, 2019

数轴上放置了一些筹码,每个筹码的位置存在数组 chips 当中。

你可以对 任何筹码 执行下面两种操作之一(不限操作次数,0 次也可以):

将第 i 个筹码向左或者右移动 2 个单位,代价为 0。
将第 i 个筹码向左或者右移动 1 个单位,代价为 1。
最开始的时候,同一位置上也可能放着两个或者更多的筹码。

返回将所有筹码移动到同一位置(任意位置)上所需要的最小代价。

 

示例 1:

输入:chips = [1,2,3]
输出:1
解释:第二个筹码移动到位置三的代价是 1,第一个筹码移动到位置三的代价是 0,总代价为 1。
示例 2:

输入:chips = [2,2,2,3,3]
输出:2
解释:第四和第五个筹码移动到位置二的代价都是 1,所以最小总代价为 2。
 

提示:

1 <= chips.length <= 1

datapythonista
datapythonista commented Nov 17, 2019

In #28531 we started to parallelize tests in the CI by file. Meaning that each file in pandas/tests/ will be assigned to a core, and will run fully there. Before, each individual test was assigned to a core. This makes things much simpler, since tests that cannot run in parallel just need to live in the same file. But it implies, that if a test file is big and contains many tests, it will slow d

You can’t perform that action at this time.