I actually did that for my bash prompt for a little while:
#Get the least significant byte of the md5sum of the hostname
hostcolor=$(hostname |md5sum |sed -E 's/^[0-9a-f]*([0-9a-f]{2})\s*-\s*$/\1/')
hostcolor=$(echo $(( 16#$hostcolor ))) #convert from decimal to hexadecimal
hostcolor="\033[38;5;${hostcolor}m" #convert to ANSI color
PS1="\[$hostcolor\][\u@\h\[\033[01;37m\] \W\[$hostcolor\]]\$\[\033[00m\] "
No idea if the code is any good. Haven't used it in years.
#Convert text to #Uppercase & #Lowercase #Bash #Script
https://xsukax.com/2021/08/101/convert-text-to-uppercase-lowercase/
#convert #uppercase #lowercase #bash #script
Regex gymnastics for arxiv articles. Additions welcome.
<code>
#convert split words on line break, e.g. post-\nediting
text = text.replace('-\n', '')
#remove lone new lines in the middle of the sentence - leave only the new lines after .(dot)
one_new_line = r'(?<![\.\n])\n(?!\n)'
text = re.sub(one_new_line, ' ', text)
#encoded sequences will generate sequences larger than the chunk size
latexit = r'<latexit.*latexit> *'
text = re.sub(latexit, ' ', text)
</code>
For :inkscape: #Inkscape experts: I have a #dwg file with a scheme that I'd like to edit in Inkscape.
What' best flow to (well) #convert this dwg file ( https://ufile.io/xobr6g02 ) to #svg ?
I tried with #Qcad exporting in #dxf, #svg etc etc, but I lose a lot of information.
Otherwise If I import the file in inkscpae from pdf (that's here https://ufile.io/74qjzogc ), then it become very very slow, nearly impossible to edit.
Maybe it's there a method or tip to "simply" the #pdf imported?
#inkscape #DWG #convert #svg #Qcad #dxf #pdf
#Farmers around the world regularly burn post-harvest crop waste, producing a significant amount of #GreenhouseGases and #AirPollution in the process. A new #portable system, however, can be brought to farms to #convert that #waste into #useful products.
https://newatlas.com/environment/takachar-biomass-waste-useful-products
#NewTech #GreenTech #ClimateAction #environmental #BCtechnology #CanadianTechnology
#farmers #greenhousegases #airpollution #portable #convert #waste #useful #newtech #greentech #climateaction #environmental #bctechnology #canadiantechnology
Overcoming #fossilfuel and #CarDependency: As Swire said during the meeting, there's nothing wrong with turning an additional lane into a #BusOnly lane. And perhaps it's okay to #convert existing lanes into HOV or #tolllanes. But this idea of continuing to add new lanes when that clearly doesn't reduce #traffic #congestion - that it in fact leads to worse #outcomes including more #deaths, injuries, and #pollution - is just contemptible.
https://sf.streetsblog.org/2023/04/12/not-a-surprise-101-freeway-widening-shows-negative-results/
#fossilfuel #carDependency #busonly #convert #tolllanes #traffic #congestion #outcomes #deaths #pollution
Looking for a way to #Convert a #PNG file to #WEBP or vice versa go here https://t.co/XFKCrufMK4
Converting numeric types in #Python
#convert from int to float:
x = float(1)
#convert from float to int:
y = int(2.8)
#convert from int to complex:
z = complex(1)
print(x)
print(y)
print(z)
print(type(x))
print(type(y))
print(type(z))
Output: 1.0
2
(1+0j)
<class 'float'>
<class 'int'>
<class 'complex'>
#Coding
A quotation from McLaughlin, Mignon:
«««««
Learn a little of anything, and you’re ready to proselytize.
»»»»»
Full quote, sourcing, notes:
https://wist.info/mclaughlin-mignon/60310/
#quote #quotes #quotation #convert #ignorance #knowledge #learning #proselytization #truebeliever
#quote #quotes #quotation #convert #ignorance #knowledge #learning #proselytization #truebeliever
Convert kilometers to miles:
To one half of kms add: 10% of kms, 2% of kms, and half of 1% of kms.
Skip the last addition if you don't need that much accuracy.
[Example results shown rounded to third decimal place.]
#convert #distance #approximation
Convert miles to kilometers:
Add half of the miles and then add 10% of the miles.
Also helps to remember that 400m is a quarter mile.
#convert #distance #approximation
Converting Celsius temperature to Fahrenheit:
1. Double the °C value
2. Reduce the result by 10%
3. Add 32 to the new result
#convert #temperature #approximation
Converting Fahrenheit temperature to Celsius:
1. Subtract 32 from °F
2. Halve the result
3. Add 10% to the new result
#convert #temperature #approximation
#convert : to change or turn from one belief or course to another, as from one religion to another or from one party or sect to another
- French: convertir
- German: konvertieren
- Portuguese: converter
- Spanish: convierte
------------
Join our new subreddit for language learners @ https://reddit.com/r/LearnANewLanguage
How to convert MPEG4 to MP4? #softwarerecommendation #mac #ffmpeg #convert #mp4
#softwarerecommendation #mac #ffmpeg #convert #mp4