Plutus icon indicating copy to clipboard operation
Plutus copied to clipboard

Pickle?

Open BenjB1 opened this issue 4 years ago • 5 comments

Hello,

I downloaded the whole blockchain to generate a database, using the tool you mentioned, however that tool does not create pickle files, and simply renaming the files don't work, the pickle files are in a different format,

how can one convert the csv file to a pickle file or pickle files?

thank you.

BenjB1 avatar Nov 02 '19 00:11 BenjB1

is it collected any info of wallet address n private keys

pavankmr853 avatar Nov 03 '19 04:11 pavankmr853

I have the same issue. Would like to define my own database, but don't know how to do it.

Can you help?

woocash31337 avatar Feb 29 '20 23:02 woocash31337

I dnt know what format is your csv files. but just extract bitcoin addresses per line starting with 1 into another text file and then split those files into 20 txt files

Very easy to create pickle file after each file having bitcoin address per line now we create each pickle file with the following python code

import pickle
PIK = "00.pickle"

with open("bitcoinfile.txt") as file_in: # one P2PKH bitcoin address per line i.e starting with 1 dnt load other addresses 
    data = set()
    for line in file_in:
        dline = line.rstrip("\n")
        data.add(dline)
with open(PIK, "wb") as f:
    pickle.dump(data, f)

Have fun

emberlyn54 avatar Mar 03 '20 06:03 emberlyn54

emberlyn 54 thank for help!

I don't know why, but I have problem with installing pickle:

:~/plutus/database$ pip install pickle Collecting pickle Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 795, in get_page resp.raise_for_status() File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/pickle/

Can you suggest something?

woocash31337 avatar Mar 06 '20 22:03 woocash31337

@woocash31337 can you say me how can i convert csv file in a set file and then serialize it in pickle file?

gekostradiwari avatar Feb 12 '21 15:02 gekostradiwari