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
with concurrent.futures.ThreadPoolExecutor() as executor: | |
future = executor.submit(document_converter.convert, file_path) | |
while not future.done(): | |
yield False, [] | |
if await abort_check(): | |
future.cancel() # TODO: downside is that document_converter.convert still runs after that and eats cpu | |
break |
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 { PdfHighlighter } from 'react-pdf-highlighter'; | |
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
type CustomHighlight = any; | |
class CustomPdfHighlighter extends PdfHighlighter<CustomHighlight> { | |
constructor(props: React.ComponentProps<typeof PdfHighlighter>) { | |
super(props); | |
} |
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
use Data::Printer; | |
use Facebook::OpenGraph; | |
my $facebook = Facebook::OpenGraph->new({ | |
app_id => $app_id, | |
secret => $app_secret, | |
access_token => $params{access_token}, | |
version => 'v3.3', | |
ua => Furl::HTTP->new( | |
capture_request => 1, |