Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
use polars::prelude::*; | |
fn main() { | |
let df = df!["foo" => ["A", "A", "B", "B", "C"], "val1" => [10, 20, 20, 45, 200], "val2" => [1, 2, 2, 4, 2], ].unwrap(); | |
let ratio = (col("val1") / col("val2")).alias("ratio"); | |
let df2 = df.lazy().with_column(ratio); | |
let out = df2.collect().unwrap(); | |
println!("{out}"); |
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore. The list of supporting software reflects the known state as of this date. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
flowchart LR | |
id |
#!/bin/bash | |
# https://fedoraproject.org/wiki/GRUB_2#Create_a_boot_menu_entry | |
# list the default, set a default then apply the setting int othe grub config | |
# reboot should cause the default kernel boot selection to boot on many | |
# recent fedora systems | |
# list grub entries | |
grlist() { |
// Here is an extremely simple version of work scheduling for multiple | |
// processors. | |
// | |
// The Problem: | |
// We have a lot of numbers that need to be math'ed. Doing this on one | |
// CPU core is slow. We have 4 CPU cores. We would thus like to use those | |
// cores to do math, because it will be a little less slow (ideally | |
// 4 times faster actually). | |
// | |
// The Solution: |
#!/usr/bin/env ruby | |
latest = nil | |
Dir.glob('sublime_text_3_build*.bz2').each do |f| | |
puts f | |
if latest.nil? || (f > latest) | |
latest = f | |
end | |
end |
// println!() calls print!() internally, so that's the only macro we have to | |
// override | |
macro_rules! print ( | |
// The extra scope is necessary so we don't leak imports | |
($($arg:tt)*) => ({ | |
// The `write!()` macro is written so it can use `std::io::Write` | |
// or `std::fmt::Write`, this import sets which to use | |
use std::io::{self, Write}; | |
if let Err(e) = write!(io::stdout(), $($arg)*) { | |
// Optionally write the error to stderr |
@-moz-document url-prefix(https://news.ycombinator.com) { | |
.comment { | |
font-family: Alegreya, serif !important; | |
font-size: 15pt !important; | |
} | |
.comment code { | |
font-family: Inconsolata-g, fixed !important; | |
font-size: 10pt !important; | |
} |
#!/bin/bash | |
# Author: Khaja Minhajuddin (A.Chen modified...) | |
# Wait for go files to be modified and then execute them | |
# Dependency: inotify-tools | |
# Install on ubuntu using: apt-get install inotify-tools | |
fpath=$1 | |
cmd=$2 | |
wdir=`pwd` | |
gspec="^$fpath\$" |