This file contains 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
#!/usr/bin/env python3 | |
__version__ = '1.20241110' | |
""" | |
chatgpt_to_text.py program reads "conversations.json" ChatGPT export files, | |
and turns them into text files suitable for uploading into a RAG AI system. | |
Usage: | |
mkdir txt | |
cd txt |
This file contains 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
#!/usr/bin/python3 | |
# From DOS commandline, run this as follows:- | |
# python3 ejectusb.py | |
# -or- create C:\windows\ejectusb.bat to do the above in fewer characters. | |
# | |
# From WSL bash, run it as follows:- | |
# cmd.exe /c start python3 C:\\windows\\ejectusb.py | |
# -or- create /usr/local/bin/ejectusb to do the above in fewer characters. |
This file contains 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
#!/usr/bin/env python3 | |
import errno, socket, logging # for get_local_addr | |
# localhost prefixes | |
_local_networks = ("127.", "0:0:0:0:0:0:0:1") | |
# ignore these prefixes -- localhost, unspecified, and link-local | |
_ignored_networks = _local_networks + ("0.", "0:0:0:0:0:0:0:0", "169.254.", "fe80:") |
This file contains 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
#!/usr/bin/perl -w | |
use strict; | |
my $cols=`tput cols`; chomp $cols; | |
while(<>){ | |
chompnl($_); my $l=0; my $out=''; my $ansi=''; | |
while($_ ne '' && $l<$cols) { | |
if(/(.*?)(\t|\033\[[\d\;]+m)(.*)/) { |