the-algorithm
the-algorithm copied to clipboard
[#1953] [#1935] rewrite the algorithm in docx + security and performance issue fix
fixes #1953 and #1935
docx > *, best programming language known to man,, customizability, memory safety, speed and also supported on the best IDE ever -- microsoft (r)(c)(allrightsreserverd)(m$) word
and added SECURITY.png file for security ensurance
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.
no, if twitter cant follow basic open source ethics ( or ethics in general ) im not gonna sign this shitty cla bro
( for anyone interested in the very bad automation scripts, license : cc0, aka do whatever u want
click to expand the shitty scripts
d.py
from docx import Document
from sys import argv
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from os import path
from docx.shared import Cm, Pt
# read file
with open(argv[1], "r") as file:
content = file.read()
# create a new Word document
doc = Document()
# set default style
style = doc.styles["Normal"]
# font size and type
font = style.font
font.name = "Arial"
font.size = Pt(12)
# margin
sections = doc.sections
for section in sections:
section.top_margin = Cm(2.5)
section.bottom_margin = Cm(2.5)
section.left_margin = Cm(2.5)
section.right_margin = Cm(2.5)
# add paragraph to the document
for line in content.split("\n"):
paragraph = doc.add_paragraph()
paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
paragraph.add_run(line)
# save the doc
doc.save(f"{path.splitext(argv[1])[0]}.docx")
a.sh
cd the-algorithm/
count=0
for file in $(find . -type f -not -path './.git/*'); do
echo "$file"
python3 ../d.py "$file"
rm -f "$file"
((count=count+1))
if ((count % 200 == 0)); then
git add -A
git commit -sm "[docx] split commit for file $count"
git push -u origin main
echo 'pushed, sleeping'
sleep 10
fi
done
git add -A
git commit -sm "[docx] final commit @ $(date) for file $count"
git push -u origin main
echo 'pushed'
)
can musky husky pls merge this faster, this is a security critical issue !!
ive also fixed #1935 in the mean time
can musky husky pls merge this faster, this is a security critical issue !!
sorry musky husky
Internet, please never change
Internet, please never change
i will make sure i <3 corporate stunts by shitty companies not go as well as they expected it to go plus like its entertaining lmao, id rather procrastinate and do this
redbubble is funny
have you considered using .doc instead of .docx? it would allow for much wider compatibility
have you considered using .doc instead of .docx? it would allow for much wider compatibility
i think its a better idea to stick w more modern technologies, such as docx, for best performance and features,, we can deal with compatibility by re-distributing pre-built packages
have you considered using .doc instead of .docx? it would allow for much wider compatibility
i think its a better idea to stick w more modern technologies, such as docx, for best performance and features,, we can deal with compatibility by re-distributing pre-built packages
@TruncatedDinoSour i personally think we should be using .docm to allow for a more extensible featureset over time, by allowing macros
after a long time of considering, i have decided to take the executive decision to not include this, .docm uses vba which is, as we all know it - c, and c is slow ( :vomiting_face: ) and not memory safe ( :no_entry: :rocket: )
so far, after very extensive research, docx seems like the best option here for high performance applications with security in mind, such as ~~twitter~~ x( org ??? foss ref ??/?? )
lgtm
sorry for the unverified commits, i mightve needed to change my gpg key a bit :+1: also the person who :-1: this pr, pls make changes to make this pr better - talk is cheap
LGTM
Lgtm
can twitter review and merge this
LGTM.