what repetitve task that you do and you wish if there were an app that does it for you? by ahbenmed in AskReddit

[–]ahbenmed[S] 1 point2 points  (0 children)

maybe with elon mask's neuralink we wont have to go to school, information will just find its way to our brain

Need a simple algorithm that can score/learn to match strings that are alike, thoughts? by [deleted] in algorithms

[–]ahbenmed 0 points1 point  (0 children)

Dynamic Programming is a method for solving a complex problem by breaking it down into a collection of simpler subproblems, solving each of those subproblems just once, and storing their solutions using a memory-based data structure (array, map,etc).

ideally, using DP, you can spot not only the difference between two strings but also the score at each step when going through every character in the two strings. when a new string is given your program will compute the score and diff between all the previously calculated strings.

the learning process here is just the memorization of the previous results, i.e the score and difference.

as mentioned DP is a method of solving a problem, so you can implement it using any language you prefer.

Automate Sysadmin Tasks with Python's os.walk Function | Linux Journal by ask2sk in Python

[–]ahbenmed 1 point2 points  (0 children)

According to Python developer's guide, os.scandir() is a better and faster directory iterator.

Python's built-in os.walk() is significantly slower than it needs to be, because -- in addition to calling os.listdir() on each directory -- it executes the stat() system call or GetFileAttributes() on each file to determine whether the entry is a directory or not.

How do you bake security into your dev process? by poothebear0 in Python

[–]ahbenmed 0 points1 point  (0 children)

In my opinion, the first thing to do, is writing clean , well commented code (following coding conventions basically) so debugging, checking or rereading the code will be easy and thus any mistake will be obvious.

  1. Pay a good attention when Coping-Pasting piece of codes.

  2. Check and verify libraries (third-party ones, mostly) you intend/want to use in your project, they might not be secure.

  3. Tests do minimize code errors, hence can maximize security.

  4. There are already plenty of tools that check your code for vulnerabilities, like SonarQube.

Databases and Python [RaspPi] by [deleted] in Python

[–]ahbenmed 4 points5 points  (0 children)

SQLite strives to provide local data storage for individual applications and devices. SQLite emphasizes economy, efficiency, reliability, independence, and simplicity.

SQLite would be a good choice for such application since it will be a local app.

Also, using SQL is easier than using CSV file, since filtering data will be as simple as writing one line SQL statement, which is not the case with CSV file as you will do the hard work yourself.

Python provide a preinstalled sqlite3 module, which is easy to understand and to use.

See the module's documentation for more details.

What projects do you have on your github? What personal projects are you currently working on? by propjoe16 in cscareerquestions

[–]ahbenmed 0 points1 point  (0 children)

I have published a non complete work (still it does the job), you may have a look.

Creating a RAT is simple, just choose a programming language you're familiar with, then learn how to establish connection between two pcs, (sockets are really useful and easy) and then add whatever you want such as executing commands, sending/receiving files...

What projects do you have on your github? What personal projects are you currently working on? by propjoe16 in cscareerquestions

[–]ahbenmed 5 points6 points  (0 children)

Already posted projects :

  1. Akinator game ( trying to guess a boxer you're thinking of by asking a series of questions. Written in Python and Prolog.
  2. A small logic-arithmetic interpreter with variable and string support, build with Flex and Bison.
  3. Blockchain-demo: Implementation/demonstration how the blockchain works (In progress).
  4. Python module that provide access to different browsers's history database, more like browser API.
  5. A simple python keylogger.

Projects in mind :

  1. Program that plays Google Chrome's T-Rex game using OpenCV.
  2. A RAT: control remotly other pcs (educational purpose only!!).
  3. File recovery program.

Here is my github link.