Initially taken by Niko Matsakis and lightly edited by Ryan Levick
- Introductions
- Cargo inside large build systems
- FFI
- Foundations and financial support
| def prefix_beam_search(ctc, | |
| alphabet, | |
| blank_token, | |
| end_token, | |
| space_token, | |
| lm, | |
| k=25, | |
| alpha=0.30, | |
| beta=5, | |
| prune=0.001): |
| def top_k_top_p_filtering(logits, top_k=0, top_p=0.0, filter_value=-float('Inf')): | |
| """ Filter a distribution of logits using top-k and/or nucleus (top-p) filtering | |
| Args: | |
| logits: logits distribution shape (vocabulary size) | |
| top_k >0: keep only top k tokens with highest probability (top-k filtering). | |
| top_p >0.0: keep the top tokens with cumulative probability >= top_p (nucleus filtering). | |
| Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751) | |
| """ | |
| assert logits.dim() == 1 # batch size 1 for now - could be updated for more but the code would be less clear | |
| top_k = min(top_k, logits.size(-1)) # Safety check |
Try more architectures
Basic architectures are sometimes better
Try other forms of ensembling than cv
Blend with linear regression
Rely more on shakeup predictions
Make sure copied code is correct
Pay more attention to correlations between folds
Try not to extensively tune hyperparameters
Optimizing thresholds can lead to "brittle" models
Random initializations between folds might help diversity\
| # Using spaCy & NLP to create variations of "those generously buttered noodles" | |
| # See here: https://twitter.com/ArielDumas/status/1086294656957272065 | |
| # | |
| # Disclaimer 1: This is a quick, simplified example focusing on one particular | |
| # sentence. There are obviously many more different constructions and | |
| # different types of dependencies you want to cover. Some aspects also become | |
| # significantly more difficult if you're working with, say, German instead of | |
| # English. | |
| # | |
| # Disclaimer 2: Creating spam comments is a very bad use case for NLP and |
| from os.path import splitext | |
| from pydub import AudioSegment | |
| def wav2flac(wav_path): | |
| flac_path = "%s.flac" % splitext(wav_path)[0] | |
| song = AudioSegment.from_wav(wav_path) | |
| song.export(flac_path, format = "flac") | |
| if __name__ == "__main__": | |
| import sys |
| #!/usr/bin/env python3 | |
| """ | |
| To use: | |
| 1. install/set-up the google cloud api and dependencies listed on https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/texttospeech/cloud-client | |
| 2. install pandoc and pypandoc, also tqdm | |
| 3. create and download a service_account.json ("Service account key") from https://console.cloud.google.com/apis/credentials | |
| 4. run GOOGLE_APPLICATION_CREDENTIALS=service_account.json python make_audiobook.py book_name.epub | |
| """ | |
| import re | |
| import sys |
| :: Windows 10 Hardening Script | |
| :: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering. | |
| :: Obligatory 'views are my own'. :) | |
| :: Thank you @jaredhaight for the Win Firewall config recommendations! | |
| :: Thank you @ricardojba for the DLL Safe Order Search reg key! | |
| :: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings! | |
| :: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater | |
| : |