This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import time | |
WARMUP_RUNS = 5 | |
BENCH_RUNS = 20 | |
FACTOR = 200 | |
num_tasks = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
scene_max_dpr: 1, | |
scene_max_samples: 3, | |
scene_camera_fov: 55, | |
scene_camera_rot: { x: 0, y: 0, z: 0 }, | |
scene_camera_pos: { x: 0, y: 0, z: 5 }, | |
bg_nspace: 7, | |
bg_lines: 2, | |
bg_line_size_vari: { min: 0.3, max: 0.8 }, | |
bg_line_brightness: 87.04, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const buf = Buffer.allocUnsafe(16); | |
function f1(buf) { | |
return ( | |
buf.slice(0, 4).toString("hex") + | |
"-" + | |
buf.slice(4, 6).toString("hex") + | |
"-" + | |
buf.slice(6, 8).toString("hex") + | |
"-" + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import threading | |
def generator(): | |
try: | |
print('STARTED') | |
time.sleep(5) | |
yield 1 | |
finally: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyrsistent | |
import immutables | |
import time | |
I = 1000000 | |
KEY = '5' | |
for N in [5, 10, 20, 30, 100, 200, 300, 400, 500, 1000]: | |
print('=============') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This source file is part of the EdgeDB open source project. | |
# | |
# Copyright 2016-present MagicStack Inc. and the EdgeDB authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py | |
index 492e377d09..3b1ed00af3 100644 | |
--- a/Lib/asyncio/base_events.py | |
+++ b/Lib/asyncio/base_events.py | |
@@ -477,10 +477,7 @@ class BaseEventLoop(events.AbstractEventLoop): | |
def _asyncgen_finalizer_hook(self, agen): | |
self._asyncgens.discard(agen) | |
if not self.is_closed(): | |
- self.create_task(agen.aclose()) | |
- # Wake up the loop if the finalizer was called from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This source file is part of the EdgeDB open source project. | |
# | |
# Copyright 2016-present MagicStack Inc. and the EdgeDB authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py | |
index 28e9f75127..ad3dc46b67 100644 | |
--- a/Lib/dataclasses.py | |
+++ b/Lib/dataclasses.py | |
@@ -868,7 +868,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen): | |
# Include InitVars and regular fields (so, not ClassVars). | |
flds = [f for f in fields.values() | |
if f._field_type in (_FIELD, _FIELD_INITVAR)] | |
- _set_new_attribute(cls, '__init__', | |
+ had_own_init = _set_new_attribute(cls, '__init__', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Lib/test/bad_getattr.py b/Lib/test/bad_getattr.py | |
new file mode 100644 | |
index 0000000000..b4f790f3bf | |
--- /dev/null | |
+++ b/Lib/test/bad_getattr.py | |
@@ -0,0 +1,3 @@ | |
+x = 1 | |
+ | |
+__getattr__ = "Surprise!" | |
diff --git a/Lib/test/bad_getattr2.py b/Lib/test/bad_getattr2.py |
NewerOlder