Use this tool to quickly search PDFs:
It continuously asks for a search query and then asks you for a search result to open in a PDF reader.
import argparse | |
def process_history(input_file, output_file, char_limit): | |
prune_count = 0 | |
with open(input_file, 'rb') as infile, open(output_file, 'wb') as outfile: | |
current_entry = b'' | |
for line in infile: | |
current_entry += line | |
if not line.endswith(b'\\\n'): # End of an entry |
# Define functions with underscore so they aren't included in output | |
def _print_import_statements(): | |
from IPython import get_ipython | |
ipython = get_ipython() | |
if not ipython: | |
print("This function only works in an IPython environment.") | |
return | |
history = list(ipython.history_manager.get_range(output=False)) |
obfuscate = lambda code: int(''.join(['{:08b}'.format(i) for i in list(bytes(code.encode()))]), 2) | |
run = lambda x: exec(bytes([int('{:b}'.format(x)[max(0, i - 8):i], 2) for i in range(len('{:b}'.format(x)) % 8, len('{:b}'.format(x)) + 1, 8) if i > 0])) | |
a = obfuscate("print('hello')") | |
b = a * 12 | |
# run(b) # Will error out | |
run(b / 12) # Prints "hello" |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
// ==UserScript== | |
// @name Duolingo Keyboard Control | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Add full keyboard control to Duolingo (to tiles). Shortcuts: 0-9, shift + 0-9, and "\" | |
// @author Matthew Scholefield | |
// @match https://www.duolingo.com/* | |
// @grant none | |
// ==/UserScript== |
I hereby claim:
To claim this, I am signing this object:
from typing import Dict | |
def create_rasa_training_data(intent_lines: Dict[str, list]) -> Dict: | |
return { | |
'rasa_nlu_data': { | |
'common_examples': sum([ | |
[ | |
{ | |
"text": line, |
Copyright 2018 Matthew Scholefield | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE |