leviborodenko / lancer Goto Github PK
View Code? Open in Web Editor NEWTurn your python code into a hideous mess. Ever heard of Black? This is the opposite.
License: MIT License
Turn your python code into a hideous mess. Ever heard of Black? This is the opposite.
License: MIT License
How much better would this project be, maintained using itself? 🐶
Can you commit to it?
This is the error I keep getting
UnicodeEncodeError: 'charmap' codec can't encode character '\u0399' in position 54: character maps to
Lancer is working for me with simpler programs but breaks and gives me the error on more complex programs
And the example program does not even work it just gives me the error
here is the example I tried
-- start of program --
def addition(a: int, b: int) -> int:
# find sum
result = a + b
# return the sum
return result
if name == 'main':
print("Sum of 1 and 3 is %s" % addition(1, 3))
-- end of program --
I'm using python 3.9.7
and running it on windows 10
Why is lancer source code not lancer'ed???
If I run lancer on any of my projects with the normal lance -f .\somthing.py
It just prints out:
UnicodeEncodeError: 'charmap' codec can't encode characters in position 602-603: character maps to <undefined>
Anyone got a solution for that?
Why lancer
? Hoping for some deep lore.
I suppose others might ask "why pitbull?" but I think I understand the genius already.
Hi!
I'd love to use this tool to obfuscate some challenges I'm working on, and I'd love to have comments too.
However, every time I tried to obfuscate with comments, most lyrics had NSFW vibes that I don't think would fit the academic environment.
Any chance you could create an SFW flag when 'lancing' files? Thank you so much!
It would be helpful for the readme to specify limitations.
For example I tried lance
on the following example program and it broke it:
class Solution:
def part1(self):
print("AOC 1 Part 1")
def part2(self):
print("AOC 1 Part 2")
sol = Solution()
for i in [1, 2]:
getattr(sol, f"part{i}")()
When trying to lance lancer
itself I stumbled upon following output:
def snarl_Il11l1 (chirp_chirp_chirp_aααaa :Path ="./file.py",roar_αaaαa :bool =hoot_IIΙΙIΙ ):
which was generated from line 69
(nice) in src/lancer/entry.py
:
def lance(file : Path = "./file.py", yolo : bool = False):
Here, the default value of the argument yolo=False
was lanced
which breaks the code.
Basically the suggesion in this reddit comment
From this article:
Python always applies NFKC
normalization to characters. Therefore, two distinct characters may actually
produce the same variable name. For example:>>> ª = 1 # FEMININE ORDINAL INDICATOR >>> a # LATIN SMALL LETTER A (i.e., ASCII lowercase 'a') 1
I've generated a mapping of these characters taken from this url.
The mapping can be found here. But beware that some characters may not be supported in python because I haven't tested every one of them.
I suggest adding another additional flag to enable this behaviour
I would have done it myself and opened a pr but I am too busy at the moment
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.