Python colorama.Fore.LIGHTBLACK_EX Examples
The following are 9
code examples of colorama.Fore.LIGHTBLACK_EX().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
colorama.Fore
, or try the search function
.
Example #1
Source File: geocode.py From Jarvis with MIT License | 5 votes |
def __call__(self, jarvis, s): """Run the geocoding tool by getting an address from the user, passing it to the geocoding API, and displaying the result. Parameters ---------- jarvis : CmdInterpreter.JarvisAPI An instance of Jarvis that will be used to interact with the user s : str The input string that was submitted when the plugin was launched. Likely to be empty. """ self.jarvis = jarvis # Required disclaimer per API terms of service self.jarvis.say("Disclaimer: This product uses the Census Bureau Data" " API but is not endorsed or certified by the Census" " Bureau.", Fore.LIGHTBLACK_EX) self.input_addr = self.get_input_addr(s) self.cleaned_addr = self.clean_addr(self.input_addr) self.response = self.get_response() # Request failed if not self.response: self.jarvis.say("The geocoding service appears to be unavailable." " Please try again later.", Fore.RED) # Request succeeded else: self.output = self.parse_response(self.response) if self.output: for result in self.output: self.jarvis.say("{}: {}".format(result, self.output[result]), Fore.CYAN) else: self.jarvis.say("No matching addresses found.", Fore.RED)
Example #2
Source File: print_utils.py From g3ar with BSD 2-Clause "Simplified" License | 5 votes |
def print_gray(*args): """""" raw = str(args) init(autoreset=True) print((Fore.LIGHTBLACK_EX + raw)) #----------------------------------------------------------------------
Example #3
Source File: print_utils.py From g3ar with BSD 2-Clause "Simplified" License | 5 votes |
def print_gray(*args): """""" raw = str(args) init(autoreset=True) print((Fore.LIGHTBLACK_EX + raw)) #----------------------------------------------------------------------
Example #4
Source File: onsets_frames_transcription_realtime.py From magenta with Apache License 2.0 | 5 votes |
def result_collector(result_queue): """Collect and display results.""" def notename(n, space): if space: return [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '][n % 12] return [ Fore.BLUE + 'A' + Style.RESET_ALL, Fore.LIGHTBLUE_EX + 'A#' + Style.RESET_ALL, Fore.GREEN + 'B' + Style.RESET_ALL, Fore.CYAN + 'C' + Style.RESET_ALL, Fore.LIGHTCYAN_EX + 'C#' + Style.RESET_ALL, Fore.RED + 'D' + Style.RESET_ALL, Fore.LIGHTRED_EX + 'D#' + Style.RESET_ALL, Fore.YELLOW + 'E' + Style.RESET_ALL, Fore.WHITE + 'F' + Style.RESET_ALL, Fore.LIGHTBLACK_EX + 'F#' + Style.RESET_ALL, Fore.MAGENTA + 'G' + Style.RESET_ALL, Fore.LIGHTMAGENTA_EX + 'G#' + Style.RESET_ALL, ][n % 12] #+ str(n//12) print('Listening to results..') # TODO(mtyka) Ensure serial stitching of results (no guarantee that # the blocks come in in order but they are all timestamped) while True: result = result_queue.get() serial = result.audio_chunk.serial result_roll = result.result if serial > 0: result_roll = result_roll[4:] for notes in result_roll: for i in range(6, len(notes) - 6): note = notes[i] is_frame = note[0] > 0.0 notestr = notename(i, not is_frame) print(notestr, end='') print('|')
Example #5
Source File: test.py From msg_reply with Apache License 2.0 | 5 votes |
def prepare_inputs(context, tokenizer): '''context context: I love you. [SEP] Sorry, I hate you. ''' tokens = tokenizer.tokenize(context) tokens = tokenizer.convert_tokens_to_ids(tokens)[-hp.max_span+2:] tokens = [101] + tokens + [102] # print(f"{Fore.LIGHTBLACK_EX}context:{tokenizer.convert_ids_to_tokens(tokens)}{Style.RESET_ALL}") tokens = torch.LongTensor(tokens) tokens = tokens.unsqueeze(0) # (1, T) tokens = tokens.to("cuda") return tokens
Example #6
Source File: trace.py From myia with MIT License | 5 votes |
def _display(curpath, results, word=None, brk=True): w = word or breakword.word() if len(results) == 0: print(w, curpath) elif len(results) == 1: _, value = list(results.items())[0] print(w, _color(Fore.LIGHTBLACK_EX, curpath), value) else: print(w, _color(Fore.LIGHTBLACK_EX, curpath)) for name, value in results.items(): print(f" {name}: {value}") if brk: _brk(w)
Example #7
Source File: cli.py From pynubank with MIT License | 5 votes |
def main(): init() log(f'Starting {Fore.MAGENTA}{Style.DIM}PyNubank{Style.NORMAL}{Fore.LIGHTBLUE_EX} context creation.') device_id = generate_random_id() log(f'Generated random id: {device_id}') cpf = input(f'[>] Enter your CPF(Numbers only): ') password = getpass('[>] Enter your password (Used on the app/website): ') generator = CertificateGenerator(cpf, password, device_id) log('Requesting e-mail code') try: email = generator.request_code() except NuException: log(f'{Fore.RED}Failed to request code. Check your credentials!', Fore.RED) return log(f'Email sent to {Fore.LIGHTBLACK_EX}{email}{Fore.LIGHTBLUE_EX}') code = input('[>] Type the code received by email: ') cert1, cert2 = generator.exchange_certs(code) save_cert(cert1, 'cert.p12') print(f'{Fore.GREEN}Certificates generated successfully. (cert.pem)') print(f'{Fore.YELLOW}Warning, keep these certificates safe (Do not share or version in git)')
Example #8
Source File: logger.py From smtp-email-spoofer-py with GNU General Public License v3.0 | 5 votes |
def header(line): print(Fore.LIGHTBLACK_EX + line + Style.RESET_ALL)
Example #9
Source File: terminal.py From ward with MIT License | 5 votes |
def lightblack(s: str) -> str: return f"{Fore.LIGHTBLACK_EX}{s}{Style.RESET_ALL}"