emacs --daemon to run in the background.
emacsclient.emacs24 <filename/dirname> to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
- Undo -
C-/ - Redo -
C-? - Change case: 1. Camel Case :
M-c2. Upper Case :M-u
- Lower Case :
M-l
| # coding=utf-8 | |
| # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software |
| from langchain.callbacks.base import BaseCallbackHandler | |
| import azure.cognitiveservices.speech as speechsdk | |
| import os | |
| import base64 | |
| import time | |
| class StreamDisplayHandler(BaseCallbackHandler): | |
| def __init__(self, container, initial_text="", display_method='markdown'): | |
| self.container = container | |
| self.text = initial_text | |
| self.display_method = display_method |
| # Install the Erlang Solutions apt key; Alternative way https://askubuntu.com/questions/1286545/what-commands-exactly-should-replace-the-deprecated-apt-key | |
| wget https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | |
| sudo apt-key add erlang_solutions.asc | |
| # 'focal' is the latest available but an empty 'impish' directory exists and will probably be ready soon | |
| sudo echo 'deb https://packages.erlang-solutions.com/ubuntu focal contrib' | sudo tee /etc/apt/sources.list.d/erlang-solutions.list | |
| sudo apt update | |
| sudo apt install esl-erlang elixir |
| ;; Addapted from python generator found at https://zach.se/project-euler-solutions/10/#python | |
| (defn lazy-primes | |
| "A lazy sequence that yields prime numbers using Eratosthenes Sieve impl." | |
| ([] (lazy-primes 2 {})) | |
| ;; n is the number we are checking for primality | |
| ;; facts maps composite integers to primes | |
| ([n facts] | |
| (if (not (contains? facts n)) | |
| (lazy-seq (cons n ;; yield since its not composite |
| import argparse | |
| import os | |
| import re | |
| import sys | |
| from sys import platform | |
| from subprocess import check_output, STDOUT, CalledProcessError | |
| from itertools import izip_longest | |
| from timeit import timeit | |
| from subprocess import Popen | |
| from threading import Timer |
emacs --daemon to run in the background.
emacsclient.emacs24 <filename/dirname> to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/C-?M-c
2. Upper Case : M-uM-lPeople
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
| def lis(a): | |
| L = [] | |
| for (k,v) in enumerate(a): | |
| L.append(max([L[i] for (i,n) in enumerate(a[:k]) if n<v] or [[]], key=len) + [v]) | |
| return max(L, key=len) | |
| inp = [int(a) for a in input("List of integers: ").split(' ')] | |
| print(lis(inp)); |