Skip to content

Tag: python

Hack with Rainbow method: getting the KeyError

I’m trying to find some passwords using the Rainbow method. I have a CSV file containing people’s names and their hashed passwords using SHA-256. I have to retrieve the original passwords which are four-digit numbers [1000-9999]. The CSV file: My code: When I run the code, following error appears:…

Reading Matrix from file

I have a txt file consisting some numbers with space and I want to make it as three 4*4 matrixes in python. Each matrix is also divided with two symbols in the text file. The format of the txt file is like this: My code is now like this but it is not showing the output I want. Can you

freq parameter not presented in seasonal_decompose function

let us suppose we have following code : result of dataframe is given below : also it returns following error : instead i know that there is keyword period, are they same?generally we know that period is 1/frequency, but in this case how should i define period? or how can i create frequency index? please help …

Sort a number by its digits

I have to sort a vector of integers (all integers have the same length). Integers with the same first digit must be sorted in relation to the second digits, and numbers with the same: first and second digits are sorted by third digit etc. Also, the subsequent digits are sorted alternately (once ascending and …

If statement getting Skipped in a Function

I have defined a function that takes three entries, 2 numbers and an array. The Array is a 800 row 10 col array. The first column in the array has a number for a state (target_province) What I want the function to do is go row by row and assign the column data for each province to an empty array

How to do a race between multiprocessors in python

I have a function that factor a number. It depends on some random condition. So what I am trying to do it’s to run multiple processors in this function and the processor that finds the factor first returns the value and all processors terminate. What I have so far is very wrong. The processors are not t…

How do I use pyscript in my HTML code and return output

I am trying to call my python function created. But not getting any output and no resource how to achieve. Code : It would be great helpful if some one provide input like … How to pass selected file to my function and python will be executed & return output on screen. Answer When writing Python in the bro…