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
| """ | |
| Script to convert unittest asserts into plain asserts. | |
| Either reads the file from the path passed as first parameter, or reads from stdin if no parameter is given. | |
| """ | |
| import functools | |
| import sys | |
| import libcst as cst |
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
| ;; Nicolas .P Rougier emacs configuration - mini-frame configuration | |
| ;; --------------------------------------------------------------------- | |
| (require 'vertico) | |
| (require 'marginalia) | |
| (require 'mini-frame) | |
| (defun minibuffer-setup () | |
| ;; This prevents the header line to spill over second line | |
| (let ((inhibit-message t)) |
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
| ;; License: MIT | |
| (uiop:define-package #:ningle-upload | |
| (:use #:cl) | |
| (:import-from #:cl-fad) | |
| (:import-from #:ningle) | |
| (:import-from #:spinneret) | |
| (:import-from #:log4cl)) | |
| (in-package #:ningle-upload) |
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
| (define-easy-handler (submission-form :uri "/" :default-request-type :get) () | |
| (setf (hunchentoot:content-type*) "text/html") | |
| (with-html-output-to-string (s) | |
| (:html | |
| (:head | |
| (:title "File Processor") | |
| (:style :rel "stylesheet" :type "text/css" | |
| (str (css-lite:css (("body") (:background-color "#666")))))) | |
| (:body | |
| (:form :action "/process" |
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 random | |
| import requests | |
| # will be updated monthly. | |
| top_url = "https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json" | |
| data = requests.get(top_url).json() | |
| packs = [d["project"] for d in data["rows"]] | |
| for _ in range(3): |
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
| (setq elfeed-feeds | |
| '("http://feeds.feedburner.com/bact" | |
| "https://kitty.in.th/index.php/feed/" | |
| "https://www.unzeen.com/feed/" | |
| "https://dev.to/feed/mrchoke" | |
| "https://dev.to/feed/iporsut" | |
| "http://thep.blogspot.com/feeds/posts/default" | |
| "https://naiwaen.debuggingsoft.com/feed/" | |
| "https://www.blognone.com/taxonomy/term/10564/feed" | |
| "https://www.blognone.com/taxonomy/term/5345/feed")) |
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
| fn is_prime(comptime T: type, | |
| n: T) bool { | |
| var d: T = 2; | |
| var exausted: bool = false; | |
| var found: bool = false; | |
| if (n < 0) return is_prime(-n); | |
| if (n == 0 or n == 1) return false; |
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
| (define-module (gentst) | |
| #:use-module (oop goops) | |
| #:use-module (gentst1) | |
| #:use-module (gentst2) | |
| #:export (test) | |
| #:re-export (foo) | |
| #:duplicates (merge-generics)) |
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
| 1. Update all package system | |
| sudo xbps-install -Suv | |
| 2. add non-free repo | |
| sudo xbps-install -Rs void-repo-nonfree | |
| 3. Software & utilities | |
| sudo xbps-install -Rs xdg-desktop-portal xdg-desktop-portal-gtk xdg-user-dirs xdg-user-dirs-gtk xdg-utils vlc pipewire libspa-bluetooth noto-fonts-cjk noto-fonts-emoji noto-fonts-ttf noto-fonts-ttf-extra libreoffice-writer libreoffice-calc libreoffice-impress rhythmbox neofetch ntfs-3g gimp inkscape lm_sensors wget udisks2 gvfs mtpfs gvfs-mtp gvfs-gphoto2 xtools WoeUSB xz unrar qt5-wayland nano ffmpeg Kooha handbrake inxi streamlink | |
| 4. Install chrome gnome, gnome menu For Gnome & extension |
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
| RESULTS = {} | |
| def add_and_store(a, b, name): | |
| """Process and save to DB""" | |
| result = a + b | |
| RESULTS[name] = result | |
| def add(a, b): |