Bitcoin Forum
November 01, 2024, 03:00:47 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: treasure hunt  (Read 275 times)
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 04, 2021, 05:45:33 PM
 #1

I wrote a small program for finding treasures. (https://github.com/Noname400/mnemonic-colider)
but it is very slow ...
can someone tell me how to port it to C ++
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7354


Top Crypto Casino


View Profile WWW
June 04, 2021, 06:20:14 PM
 #2

I can't read your README since it's all in Russian but for starters you could add Cython to your python project, write your python files in that syntax and then compile them down into a C++ library, with a simple entry point, something like a main() function. Then dynamically load it from a small, simple, C++ program.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 05, 2021, 06:17:08 AM
 #3

I can't read your README since it's all in Russian but for starters you could add Cython to your python project, write your python files in that syntax and then compile them down into a C++ library, with a simple entry point, something like a main() function. Then dynamically load it from a small, simple, C++ program.

I am very bad at working with C ++
I can't even imagine where to start.
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7354


Top Crypto Casino


View Profile WWW
June 05, 2021, 07:56:12 AM
 #4

I can't read your README since it's all in Russian but for starters you could add Cython to your python project, write your python files in that syntax and then compile them down into a C++ library, with a simple entry point, something like a main() function. Then dynamically load it from a small, simple, C++ program.

I am very bad at working with C ++
I can't even imagine where to start.

Well for starters, numpy is written using Cython and only uses a really basic amount of C language. So you can start by reading Cython's tutorials: https://cython.readthedocs.io/en/latest/src/tutorial/index.html.

But if you don't know much C++ then if you wanna port programs to it you're going to have to at least learn C, the subset of C++. Raw C is slightly faster than using C++'s std library anyway and only has a few syntax/library functions you need to learn, the higher-level functions you might need can be swiped from Github and Stack Overflow.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
June 05, 2021, 08:13:11 AM
Merited by NotATether (1)
 #5

Before you proceed further, you should delete your mail credentials on your code. I suggest you move it to the .env file, and change your current one, assuming you unintentionally put your real password.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 05, 2021, 10:11:02 AM
 #6

Before you proceed further, you should delete your mail credentials on your code. I suggest you move it to the .env file, and change your current one, assuming you unintentionally put your real password.

Thank you. really forgot.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 05, 2021, 10:19:13 AM
 #7

I can't read your README since it's all in Russian but for starters you could add Cython to your python project, write your python files in that syntax and then compile them down into a C++ library, with a simple entry point, something like a main() function. Then dynamically load it from a small, simple, C++ program.

I am very bad at working with C ++
I can't even imagine where to start.

Well for starters, numpy is written using Cython and only uses a really basic amount of C language. So you can start by reading Cython's tutorials: https://cython.readthedocs.io/en/latest/src/tutorial/index.html.

But if you don't know much C++ then if you wanna port programs to it you're going to have to at least learn C, the subset of C++. Raw C is slightly faster than using C++'s std library anyway and only has a few syntax/library functions you need to learn, the higher-level functions you might need can be swiped from Github and Stack Overflow.

Thank you. I will consider.
Live and learn
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7354


Top Crypto Casino


View Profile WWW
June 05, 2021, 02:43:39 PM
Merited by ABCbits (1)
 #8

Before you proceed further, you should delete your mail credentials on your code. I suggest you move it to the .env file, and change your current one, assuming you unintentionally put your real password.

Deleting lines and pushing the changes doesn't completely delete them, because they are still accessible in older commits.

You should make a copy of all the repo's files (except for .git/ folder), and then force-push it to the remote which will delete the entire commit history like this:

Code:
git init
git remote add origin https://github.com/Noname400/mnemonic-colider
git add *
git commit -m "commit message"
git push origin main --force

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 05, 2021, 04:20:09 PM
 #9

Before you proceed further, you should delete your mail credentials on your code. I suggest you move it to the .env file, and change your current one, assuming you unintentionally put your real password.

Deleting lines and pushing the changes doesn't completely delete them, because they are still accessible in older commits.

You should make a copy of all the repo's files (except for .git/ folder), and then force-push it to the remote which will delete the entire commit history like this:

Code:
git init
git remote add origin https://github.com/Noname400/mnemonic-colider
git add *
git commit -m "commit message"
git push origin main --force

I have my own mail server.
already changed passwords.
thanks for the help.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 05, 2021, 08:07:50 PM
 #10

help translate my c ++ code or RUST
this will increase productivity.
iwantmyhomepaidwithbtc
Copper Member
Member
**
Offline Offline

Activity: 76
Merit: 52


View Profile
June 08, 2021, 11:24:23 AM
 #11

Hey OP

Check your DM's
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
June 12, 2021, 09:45:41 AM
 #12

I doubt people will convert your code to C+/Rust for free, so i suggest you check these options,
1. Use PyPy (https://www.pypy.org) which improve your code performance without change single line of your code.
2. Use another compiler such as Numba (https://numba.pydata.org/). I never tried Numba though since you need to modify your code and read the documentation.

PYPY, I've already tried the performance drops or is the same
Numba, does not have time to accelerate, and therefore the performance drops.
there is no way out yet.
only GPU left or C ++ insert
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!