READ pallets/flask#1938
This file contains hidden or 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
| # Experiments in capturing combined output streams from subprocesses. | |
| # | |
| # It turns out it's kind of hard to get the interleaved results of stdout and | |
| # stderr in Python. However, in a lot of situations where Python is calling | |
| # out to other processes, you probably want to swallow the child process's | |
| # stderr when things to right and print it when things go wrong. Since some | |
| # programs may be outputting results on stdout and warnings and errors on | |
| # stderr, it makes sense that you'd want it all, and all in the order it was | |
| # printed when things go wrong. | |
| # |
This file contains hidden or 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 contextlib | |
| import io | |
| import logging | |
| import os | |
| import queue | |
| import selectors | |
| import subprocess | |
| import tempfile | |
| import threading | |
| from time import monotonic as _time |
Tom Levy, 2019-06-12
-
The zero value
Summary: Add an identifier for the zero value (e.g.zeroor_).
This file contains hidden or 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
| #!/bin/bash | |
| curl -X POST "https://api.cloudflare.com/client/v4/zones/{$ZONE_ID}/purge_cache" \ | |
| -H "X-Auth-Email: {$EMAIL}" \ | |
| -H "X-Auth-Key: {$API_KEY}" \ | |
| -H "Content-Type: application/json" \ | |
| --data '{"purge_everything":true}' |
This file contains hidden or 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
| #!/bin/sh | |
| # Git filter to ignore lines in your files. | |
| # | |
| # Copyright (c) 2017-2019,2023 Aryel Mota Góis <[email protected]> | |
| # | |
| # MIT License | |
| # | |
| # | |
| # SETUP: | |
| # |
This file contains hidden or 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
| /* NameDisplay.js */ | |
| import ReactPropTypes from 'prop-types'; | |
| const NameDisplay = ({name}) => ( | |
| <div> | |
| <div> | |
| First Name: {name.first} | |
| </div> | |
| <div> | |
| Last Name: {name.last} |
This file contains hidden or 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 heapq | |
| from collections import defaultdict | |
| class Graph: | |
| def __init__(self, n): | |
| self.nodes = set(range(n)) | |
| self.edges = defaultdict(list) | |
| self.distances = {} |
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 hidden or 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 nltk | |
| import gensim | |
| sample="""Renewed fighting has broken out in South Sudan between forces loyal to the president and vice-president. A reporter in the capital, Juba, told the BBC gunfire and large explosions could be heard all over the city; he said heavy artillery was being used. More than 200 people are reported to have died in clashes since Friday. The latest violence came hours after the UN Security Council called on the warring factions to immediately stop the fighting. In a unanimous statement, the council condemned the violence "in the strongest terms" and expressed "particular shock and outrage" at attacks on UN sites. It also called for additional peacekeepers to be sent to South Sudan. | |
| Chinese media say two Chinese UN peacekeepers have now died in Juba. Several other peacekeepers have been injured, as well as a number of civilians who have been caught in crossfire. The latest round of violence erupted when troops loyal to President Salva Kiir and first Vice-President Riek Machar began sho |