Need Python to C Sharp Conversion

``` Summary: Trying to port a CRC32 lib Martin Scharrer created in Python, I see no known C# version and I am barely a Python dev. Sources: https://github.com/MartinScharrer/crccheck/blob/main/crccheck/crc.py https://github.com/MartinScharrer/crccheck/blob/main/crccheck/checksum.py I do have the crc.py, I will add it to this post if anyone can give me a clue. I appreciate you so much and yes I'd include his license and credit. 🙂
GitHub
crccheck/crc.py at main · MartinScharrer/crccheck
The crccheck python module implements all CRCs listed in the Catalogue of parametrised CRC algorithms as well as simple checksums. - crccheck/crc.py at main · MartinScharrer/crccheck
GitHub
crccheck/checksum.py at main · MartinScharrer/crccheck
The crccheck python module implements all CRCs listed in the Catalogue of parametrised CRC algorithms as well as simple checksums. - crccheck/checksum.py at main · MartinScharrer/crccheck
17 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Core Dream Studios
Core Dream Studios•2y ago
Yeah my issue is I do not know python enough to convert I found this site, but the output is sloppy and doesn't even work, probably AI based.: https://pythoncsharp.com/ I could call python from C# but I need all the return values etc.
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Core Dream Studios
Core Dream Studios•2y ago
Was hoping to port it to native C# and still keep the license under him (did email) but if needed, will change title
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Core Dream Studios
Core Dream Studios•2y ago
well whatever is in the .py's to do all those checks, pretty much i wish i knew python enough to figure it out 😦
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Core Dream Studios
Core Dream Studios•2y ago
I tried so far: well via that website converter
Core Dream Studios
Core Dream Studios•2y ago
Core Dream Studios
Core Dream Studios•2y ago
but it's a mess so far lol and nothing works from conversion
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Core Dream Studios
Core Dream Studios•2y ago
ok
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Core Dream Studios
Core Dream Studios•2y ago
sec yeah i saw that too Does this do what all those .py libs do?
ero
ero•2y ago
how should i know test it
Core Dream Studios
Core Dream Studios•2y ago
yeah good point XD thanks this might just be enough to do it, well minus the checksum part but i can figure it out if i try hard enough. 🙂 question 2 python to C# since this one has no native C# library, doing by hand: Converted:
public static object intersperse(object lst, object item) {
var result = new List<object> {
item
} * (lst.Count * 2 - 1);
result[0:2:] = lst;
return result;
}
public static object intersperse(object lst, object item) {
var result = new List<object> {
item
} * (lst.Count * 2 - 1);
result[0:2:] = lst;
return result;
}
What is [0:2:] ? was in .py too
Want results from more Discord servers?
Add your server
More Posts