|
mystes posted:A lot of antivirus programs will just flag all exes using "packers" (tools which compress exe files and then have a loader which decompresses them in memory) I assume it is something like this rather than my system is actually compromised. But how do I get past this being (as Killhour correctly said) at the level of an undergrad CS project. If this is the case I find it infuriating I cant share my poo poo projects with interested friends.
|
# ? Aug 30, 2023 00:45 |
|
|
# ? May 31, 2024 18:46 |
|
DoctorOozy posted:I assume it is something like this rather than my system is actually compromised. But how do I get past this being (as Killhour correctly said) at the level of an undergrad CS project. If this is the case I find it infuriating I cant share my poo poo projects with interested friends lol. But legitimate programs get flagged by antivirus programs all the time. If it's only McAfee you could just ignore it but if it's microsoft and you really need to distribute it as an exe you will probably need to figure out how to change it so it doesn't get flagged
|
# ? Aug 30, 2023 00:47 |
|
mystes posted:Have you tried to package anything else in python as an exe file using the same tool and seen if it gets flagged? If it's just the aes part then I guess just don't distribute that particular program as an exe file? If it's just the packaging tool in general then try a different one? Yes I have done loads of things, picture viewers, text analyzers, data management etc.. the only significant change here is this one contains encryption. I think ill change the encryption module and see if it still happens. Maybe its a library issue. BTW thanks everyone for your suggestions its been a while since I used SA and again I realize how stupid that's been. EDIT: doesn't help. I'm going to try different exe packaging programs DoctorOozy fucked around with this message at 01:01 on Aug 30, 2023 |
# ? Aug 30, 2023 00:52 |
|
DoctorOozy posted:But how do I get past this being (as Killhour correctly said) at the level of an undergrad CS project. This is kind of annoying, but a lot of it is that Python isn't really made for making distributable executables, so pretty much anything you make with Python that way is going to fall into that bucket.
|
# ? Aug 30, 2023 01:15 |
|
Ok I solved it so ill explain incase it helps/is interesting. When I used AES (Advanced Encryption Standard) encryption the exe was flagged by Google Download (from Drive) and MS security as a virus/malicious. This was using PyInstaller. I tried Freeze and it worked but was not a single package, i had DLLs etc all over. When I changed to ChaCha20 cypher it seems to work fine and nether google or MS flag it.
|
# ? Aug 30, 2023 01:41 |
|
DoctorOozy posted:When I changed to ChaCha20 cypher it seems to work fine and nether google or MS flag it.
|
# ? Aug 30, 2023 02:56 |
|
DoctorOozy posted:Ok I solved it so ill explain incase it helps/is interesting. Added to Shadow_brokers_notes.txt
|
# ? Aug 30, 2023 02:57 |
|
DoctorOozy posted:Ok I solved it so ill explain incase it helps/is interesting. This isn't surprising, since using ChaCha20 made your program Real Smooth, and it was easily able to slide past the virus detection.
|
# ? Aug 30, 2023 03:20 |
|
With the latest Xcode tools do you have to manually optimize for x86 builds or it’s just automagic arm and x86 from the same code?
|
# ? Sep 1, 2023 21:44 |
|
Shaocaholica posted:With the latest Xcode tools do you have to manually optimize for x86 builds or it’s just automagic arm and x86 from the same code? I'm not 100% sure what you mean, but the same code works as input for both architectures and the optimization setting for a given configuration will apply to each architecture you build for. By default, that's to optimize only in Release builds. Debug won't optimize, and I think also only builds the "current" architecture.
|
# ? Sep 1, 2023 23:20 |
|
Sorry I was vague. I haven't coded in forever. I don't even know what (code side) architecture specific optimizations even look like and if they are even 'a thing' when compiling for Mac. Not optimizations the compiler does but what you can do in the source.
|
# ? Sep 1, 2023 23:41 |
|
Shaocaholica posted:Sorry I was vague. I haven't coded in forever. I don't even know what (code side) architecture specific optimizations even look like and if they are even 'a thing' when compiling for Mac. Not optimizations the compiler does but what you can do in the source. It’s just automatic arm/x86 you don’t need to write specific code per platform (generally)
|
# ? Sep 2, 2023 00:09 |
|
I have a feeling you’re thinking of something specific and not finding the right words for it.
|
# ? Sep 2, 2023 02:06 |
Are you maybe thinking of SIMD code? (Single Instruction Multiple Data) That's for example SSE and AVX on x86, and Neon on ARM. It's generally not automatic, no, except for some very specific patterns the compiler might recognize. If you want your code to take advantage of those CPU features then you have to write CPU-specific code. You can do it by writing the routines in assembly and link in, but it's more common and convenient to use the intrinsics offered by the compiler.
|
|
# ? Sep 2, 2023 02:19 |
|
How would you solve a problem like this in a program? I've considered brute forcing every possibility, but that's 16! or about 20 trillion possibilities. None of the constraint solver libraries I can find are quite compatible with 2D arrays or the strings I'd need to enforce a uniqueness constraint between "I" and "1". Backtracking is probably the best option, but I've mostly forgotten how to do that and wasn't entirely comfortable with it anyhow.
|
# ? Sep 9, 2023 17:24 |
|
Write it as a zero-one integer program with a constant objective function and feed that into a standard solver.
ultrafilter fucked around with this message at 17:53 on Sep 9, 2023 |
# ? Sep 9, 2023 17:50 |
|
ultrafilter posted:Write it as a zero-one integer program with a constant objective function and feed that into a standard solver.
|
# ? Sep 9, 2023 18:17 |
|
You can encode this using binary decision variables and penalty terms. Main idea would be to subtract a big number if the items are not adjacent in the objective function. Variables: 1. Let xij be a binary decision variable that equals 1 if an item is placed on grid cell (i, j), and 0 otherwise. 2. For every pair of cells (i,j) and (k,l), define a binary decision variable yijkl that equals 1 if an item from cell (i,j) is adjacent to an item in cell (k,l). Adjacency on a Grid: 1. For cells (i,j) and (k,l) to be adjacent horizontally, either k = i and l = j+1 or k = i and l = j-1. 2. For cells (i,j) and (k,l) to be adjacent vertically, either k = i+1 and l = j or k = i-1 and l = j. 3. For diagonal adjacency, either k = i+1 and l = j+1, or k = i+1 and l = j-1, or k = i-1 and l = j+1, or k = i-1 and l = j-1. Objective Function Encoding: 1. To enforce adjacency in the objective function, introduce a penalty term for violations. Use a large constant M to penalize non-adjacency when cells are supposed to be adjacent. 2. For every pair of cells you'll have a term like: -M × (xij × xkl - yijkl) 3. You'll sum up all such terms for every pair of cells to create your penalty. Constraints: 1. Ensure yijkl can only be 1 if both xij and xkl are 1. This can be modeled as: yijkl ≤ xij yijkl ≤ xkl 2. If yijkl is 1, then (i,j) and (k,l) must be adjacent. This means having constraints to enforce that only valid (k,l) values are used given a specific (i,j) value. Depending on the grid size, this can mean a large number of constraints. Objective Function: Objective = Other Criteria - ∑(i,j,k,l) in required pairs M × (xij × xkl - yijkl)
|
# ? Sep 9, 2023 19:59 |
|
i think i'll stick to making CRUD apps
|
# ? Sep 9, 2023 20:32 |
|
darthbob88 posted:How would you solve a problem like this in a program? This is a great use-case for an SMT solver like Z3. Long story short is that SMT solvers are a bit like boolean SAT solvers on steroids: they use a SAT solver under the hood but let you encode richer datatypes than just bools. I wrote the first few constraints here to get you started using the excellent Z3 solver: Python code:
code:
|
# ? Sep 9, 2023 21:14 |
|
Bruegels Fuckbooks posted:You can encode this using binary decision variables and penalty terms. Main idea would be to subtract a big number if the items are not adjacent in the objective function.
|
# ? Sep 9, 2023 21:20 |
|
Dijkstracula posted:This is a great use-case for an SMT solver like Z3. Long story short is that SMT solvers are a bit like boolean SAT solvers on steroids: they use a SAT solver under the hood but let you encode richer datatypes than just bools.
|
# ? Sep 9, 2023 21:31 |
|
darthbob88 posted:That's exactly the sort of thing I spent a couple hours looking for last night and this morning. My only complaint is that I use .NET instead of Python, but they have a Nuget package. Yep, Z3 has bindings for a bunch of languages; Python's is especially good since they just overload every operator so things look as natural as possible, but I imagine C#'s is also perfectly fine too.
|
# ? Sep 9, 2023 21:32 |
|
darthbob88 posted:The bolded part is why I'm hesitant to use that solution; 16 cells * 16 options for each cell means I'd need to repeat the same set of constraints 256 times, plus any specific constraints depending on the cell and item, like the "8 is not in a corner cell" thing. That's a recipe for stupid errors in my experience, which is why I'm trying to make do with just one constraint function for the whole thing. It's not really that bad for 4x4, just a couple of for loops. i wouldn't use this technique on a chessboard though.
|
# ? Sep 10, 2023 00:19 |
|
I need some pointers on Flutter/Dart and viewing jpgs. I've only found the assetimage and networkimage examples but need to get my images locally from a folder on a tablet or phone, like a subfolder of pictures on my android tablet. What widget should I be using to show these images fullscreen and navigating through them with swipe gestures? Could someone link me to a local image tuorial suitable for someone new to Flutter and Dart? Thanks.
|
# ? Sep 11, 2023 17:41 |
|
Will this help? https://www.woolha.com/tutorials/flutter-display-image-from-file-examples I don’t use flutter but that seems to be the interface you want, and shows how to work with the perms you will need.
|
# ? Sep 11, 2023 21:52 |
|
(This might not be the most precise thread but it should be pretty simple and I am trying to drop this somewhere active cause I forgot until I saw the 24 hour notice this morning:) I see there are some reasons you'd want to keep possession of say a business's old domain names even if you aren't using them. I've got a domain name that was just for personal use, never hosted any actual public-facing anything. I just used it to run through some tutorials and later serve a web control panel for some code that I was the only user of. Never did any business there; never used any email @ that domain. Not tied to my name or anything, and the domain name is nothing I, or anyone else, is likely to want in the future. Safe to let that go?
|
# ? Sep 18, 2023 21:07 |
|
The only possible downside is that a squatter may immediately snag it at expiration, denying you the opportunity to use it again
|
# ? Sep 18, 2023 22:59 |
|
In particular if any of those old tools are still up and hard coded to point at its url, the new owner could potentially send some messages/responses/whatever with malicious data. That's more of an issue for bigger companies though -- it's pretty unlikely for anything like that to happen if you're a nobody, especially one with no public facing code.
|
# ? Sep 19, 2023 00:42 |
|
A Git question that has been weirdly difficult to Google an answer for: I have a commit containing v1 of a project, say, with commits A -> B -> C. I started working on a v2 in a fresh repo, which now has commits Q -> R -> S. I'd like to merge v2 into the original v1 repo, but without overwriting the v1 commits (this seems to be the uncommon part), yielding a history something like A -> B -> C -> Q -> R -> S (it's fine if there's an intermediary commit in between C and Q; I just want to preserve the project's trajectory in a single place). How can I go about this?
|
# ? Sep 20, 2023 19:07 |
|
See Combine Git repositories with unrelated histories.
|
# ? Sep 20, 2023 19:14 |
|
Dijkstracula posted:A Git question that has been weirdly difficult to Google an answer for: Add the refs from v2 to v1's repo. Give a name to S and Q. Checkout S. Rebase onto C by specifying you want to clip at Q.
|
# ? Sep 20, 2023 19:17 |
|
I'm following the steps to create artifacts for my Electron app using https://github.com/marketplace/actions/electron-builder-action The building for mac, windows, and linux runs smoothly and I get green checkboxes. I get to the release steps code:
|
# ? Sep 26, 2023 05:24 |
|
What do the logs say?
|
# ? Sep 26, 2023 06:07 |
|
So if I look at the workflow runs I see code:
code:
The workflow with tag v1.0.5 fails: code:
|
# ? Sep 26, 2023 17:36 |
|
I want to make a version of a Teamlab exhibit, where you project an image, and visitors can scan images in live and have them added to the scene (and then animate around, ideally). The goal is, for the viewers not to see any UI pop-ups or anything on the main, projected display, it would just update with the new image added. In the place I'm doing it I (probably) won't have a reliable web connection, so I'd need to do it locally. I'm thinking I basically just want a space that can display an image, scan in new images and add them to a local folder, and then continuously check that folder for new images and display them as well. Initially I was thinking Unity, but I had a lot of trouble figuring out how to add images after the program is already running (it seems like 'StreamingAssets' would be the move, but that's read only). I then tried Javascript, with a canvas, but ran into permissions issues - client-side, afaict, you can't get all the file names in a folder, you need a preloaded list. How would y'all approach this? Maybe there's a way to run a local server, so that you can check the file names with node or something server-side, and then feed them to the client? Would appreciate any advice for how to do this! Would love any help, this seems pretty straightforward but the lack of internet connection is kind of throwing me. I feel like there's surely some easy solution I'm just missing! e: Just figured out a version with PyGame - it's real ugly/not super performant, but it's something. If there's an easy way to do it in Unity or JS I'd still def be interested, I do find it easier to make the animated portions in those. foutre fucked around with this message at 08:29 on Sep 28, 2023 |
# ? Sep 28, 2023 06:52 |
|
Can you explain what you mean by lack of Internet connection? Could you host a web server locally that people could connect to? Get some kind of device that'll let you set up a little network broadcasting a wifi signal that folks can connect to and host your website there. Setup a frontend (React and JS for example) - Have a view that displays the visuals - Have a separate view that displays an image uploader Setup a backend (Express and JS for example) - Be able to host the images received from the frontend in a local folder Setup a websocket connection between the two. - When a new image is received, broadcast it out to all folks listening. - Alternatively, you could poll the server every so often. I believe that's roughly what you're afteR?
|
# ? Sep 28, 2023 17:14 |
|
Oh, local network makes a ton of sense, for some reason I want thinking of that! That's a great solution, ty. For whatever reason I just was not getting there with the structure.
|
# ? Sep 28, 2023 17:58 |
|
I find it hard to believe that Python (1989) is older than Java (1995). I think most people associate Java with old enterprise software at this point, while Python is increasingly the first language people learn and it's the de facto language for new work in data science and machine learning. Even its Microsoft counterpart C# gets some traction as a language for game dev. How and why did Java become such a rusty language only for brownfield development? America Inc. fucked around with this message at 19:13 on Sep 29, 2023 |
# ? Sep 29, 2023 19:08 |
|
|
# ? May 31, 2024 18:46 |
|
No one actually used Python until the mid 2000s. In 2004 it was seen as a "comparatively esoteric language".
|
# ? Sep 29, 2023 19:17 |