183 matching pages, found in 62 ms
Ask StyxWritten on your GPU machine; takes a few seconds the first time.
-
discuss.python.orghttps://discuss.python.org › t › can-anyone-tell-me-what-thing-… › 47594Can anyone tell me what thing i have to learn to achive this project - Python Help - Discussions on Python.org
More about discuss.python.org
ForumMar 4, 2024. Can anyone tell me what thing i have to learn to achive this project Python Help help htb.vishu (vishal) March 4, 2024, 4:57pm 1 i have an excel file. from there …
-
discuss.python.orghttps://discuss.python.org › t › can-mypy-speedup-python-scripts › 14638Can Mypy speedup python scripts - Python Help - Discussions on Python.org
More about discuss.python.org
ForumMar 27, 2022. … i in range(n): x: float = random.random() x = math.sqrt(x) x = math.pow(x, 2) x += x x /= 2 L.append(x) return len(L) print(f(100_000_000)) # test: $ python3 -m pip …
-
discuss.python.orghttps://discuss.python.org › t › best-way-to-sort-a-list-into-a… › 24158Best way to sort a list into a dict based off of an attr on list elements - Python Help - Discussions on Python.org
More about discuss.python.org
ForumFeb 23, 2023. … In [41]: def getProjectTypesToListOfProjects(projects): ...: result = {} ...: for project in projects: ...: result.setdefault(project.type, []).append(project) ...: return result ...: ...: And try it out In [42]: getProjectTypesToListOfProjects(projects) Out[42]: {"<class 'int'>": [Project(type="<class 'int …
-
discuss.python.orghttps://discuss.python.org › t › dice-detecting-opencv-dbscan › 68059Dice detecting OpenCV DBSCAN - Python Help - Discussions on Python.org
More about discuss.python.org
ForumOct 16, 2024. … pos!= None: X.append(pos) X = np.asarray(X) if len(X) > 0: clustering = cluster.DBSCAN(eps=60, min_samples=1).fit(X) num_dice = max(clustering.labels_) + 1 dice = [] for i in range(num_dice …
-
discuss.python.orghttps://discuss.python.org › t › collecting-examples-of-unsound… › 97568Collecting examples of unsoundness - Typing - Discussions on Python.org
More about discuss.python.org
ForumJul 3, 2025. … Base: def __init__(self, x: int) -> None: self.x = str(x) class Child(Base): def __init__(self, x: str) -> None: self.x = x def doit(t: type[Base], x: int) -> str: return t(x …
-
discuss.python.orghttps://discuss.python.org › t › add-symmetric-difference-to-co… › 103579Add symmetric difference to collections.Counter - Ideas - Discussions on Python.org
More about discuss.python.org
ForumSep 5, 2025. … multiset >>> Multiset({'a': 1}) >>> x = Multiset({'a': 1}) >>> y = Multiset({'a': 10}) >>> z = Multiset({'a': 100}) >>> (x ^ y) ^ z Multiset({'a': 91}) >>> x ^ (y ^ z) Multiset({'a': 89}) That project has been …
-
discuss.python.orghttps://discuss.python.org › t › code-on-the-same-line › 16777Code on the same line - Python Help - Discussions on Python.org
More about discuss.python.org
ForumJun 23, 2022. … established use of if x == y: break is clearer and “more readable” than applying the preferred style from PEP8. (Václav mentioned ‘breaking consistency’.) Local project requirements could also require short if: statements …
-
discuss.python.orghttps://discuss.python.org › t › contour-plot-projection-not-sh… › 49861Contour plot projection not showing properly in matplotlib 3d plotting - Python Help - Discussions on Python.org
More about discuss.python.org
ForumMar 29, 2024. … that you want to project them onto. i.e. it should be: ax.contourf(x_grid_xy, y_grid_xy, counts_xy.T, zdir=‘z’, offset=min(z), levels = 25, cmap=‘Reds’, zorder=0)ax.contourf …
-
discuss.python.orghttps://discuss.python.org › t › built-in-types-int-round-or-tr… › 24840Built-in Types ... INT: round or truncate ? please elaborate - Python Help - Discussions on Python.org
More about discuss.python.org
ForumMar 14, 2023. … to integer by: int(x) can result in (e.g.)math.round(x) ? 2nd and if so: when? under what circumstances the conversion from FLOAT to INT by int(x): -result in: math.trunc(x …
-
discuss.python.orghttps://discuss.python.org › t › dataclasses-asdict-transformat… › 24500Dataclasses.asdict - transformation of dict-fields - change type(obj) to dict directly - Ideas - Discussions on Python.org
More about discuss.python.org
ForumMar 5, 2023. … original_repr})" @dataclass class X: x: MyDict = field(default_factory=MyDict) inst = X() inst.x["Key"] = "value" converted = asdict(inst, dict_factory=MyDict) print(f"{converted=}") Error Traceback (most recent call last): File …
Search for “Project X site:discuss.python.org” on Google, or add !ddg, !w and other shortcuts to any search.