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
export function render() { | |
var quoteElem = document | |
.evaluate( | |
"//blockquote[contains(., '[!')]", | |
document, | |
null, | |
XPathResult.UNORDERED_NODE_ITERATOR_TYPE, | |
null, | |
) | |
.iterateNext(); |
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
2024-06-15 13:48:17,417 -03 - INFO - pylsp.python_lsp - Starting PythonLSPServer IO language server | |
2024-06-15 13:48:17,418 -03 - DEBUG - pylsp_jsonrpc.endpoint - Handling request from client {'jsonrpc': '2.0', 'id': 1, 'method': 'initialize', 'params': {'clientInfo': {'name': 'Neovim', 'version': '0.10.0-dev'}, 'trace': 'off', 'processId': 46963, 'workDoneToken': '1', 'capabilities': {'window': {'showDocument': {'support': True}, 'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': False}}}, 'workspace': {'inlayHint': {'refreshSupport': True}, 'applyEdit': True, 'didChangeWatchedFiles': {'relativePatternSupport': True, 'dynamicRegistration': False}, 'workspaceEdit': {'resourceOperations': ['rename', 'create', 'delete']}, 'symbol': {'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'dynamicRegistration': False}, 'didChangeConfiguration': {'dynamicRegistration': False}, 'semanticTokens': {'refre |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 sys | |
from twisted.internet import defer, reactor | |
from twisted.python import log | |
@defer.inlineCallbacks | |
def raise_typeerror(): | |
try: | |
1 / 0 | |
except: |
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
""" Announcer Extension | |
This extension has the objective of log useful stuff at the beginning. | |
Usage: | |
EXTENSIONS = { | |
'toolbox.extensions.announcer.AnnouncerExtension': 1, | |
} |
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
from scrapy.spider import Spider | |
class TestSpider(Spider): | |
name = 'test' | |
start_urls = ['http://example.com'] | |
def parse(self, response): | |
raise Exception |
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
Starting memory: 19332 (resource.getrusage(resource.RUSAGE_SELF).ru_maxrss) | |
Ending memory: 19456 (resource.getrusage(resource.RUSAGE_SELF).ru_maxrss) | |
Filename: test_dclass.py | |
Line # Mem usage Increment Line Contents | |
================================================ | |
11 19.000 MiB 0.000 MiB class _DummyA(cls): |
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/scrapy/commands/shell.py b/scrapy/commands/shell.py | |
index 7c07064..d57643a 100644 | |
--- a/scrapy/commands/shell.py | |
+++ b/scrapy/commands/shell.py | |
@@ -16,7 +16,8 @@ from scrapy.utils.spider import spidercls_for_request, DefaultSpider | |
class Command(ScrapyCommand): | |
requires_project = False | |
- default_settings = {'KEEP_ALIVE': True, 'LOGSTATS_INTERVAL': 0} | |
+ default_settings = {'KEEP_ALIVE': True, 'LOGSTATS_INTERVAL': 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
>>> fetch('http://example.com') | |
2015-03-18 17:41:40-0300 [default] DEBUG: Crawled (200) <GET http://example.com> (referer: None) | |
[s] Available Scrapy objects: | |
[s] crawler <scrapy.crawler.Crawler object at 0x18f6910> | |
[s] item {} | |
[s] request <GET http://example.com> | |
[s] response <200 http://example.com> | |
[s] settings <scrapy.settings.Settings object at 0x18f7f90> | |
[s] spider <DefaultSpider 'default' at 0x1d98450> | |
[s] Useful shortcuts: |
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
from pprint import pprint | |
from time import sleep, time | |
from twisted.internet import defer, reactor | |
def stop(): | |
if not reactor.getDelayedCalls(): | |
reactor.stop() | |
reactor.callLater(0.1, stop) |
NewerOlder