2018 m. gegužės 11 d., penktadienis

How to create pypi python package


$ python setup.py sdist bdist_wheel
# pip install wheel # if there is error runing upper command



$ twine upload --repository testpypi dist/*


Old ways

 Create login file
Window: C:\Users\username\.pypirc
Unix: /home/username/.pypirc
$ chmod 600 ~/.pypirc

[distutils]
index-servers =
        pypi
        pypitest

[pypitest]
repository = https://test.pypi.org/legacy/
username = username
password = password

[pypi]
repository = https://pypi.python.org/pypi
username = username
password = password



Registration is only required the first time
$ python setup.py register -r pypitest
$ python setup.py sdist
$ twine upload dist/* -r pypitest

Creating virtual env
$ virtualenv -p python3 testenv

Installing package
$ pip install --verbose --extra-index-url https://test.pypi.org/legacy/ stellar-desk
$ pip install  --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple stellar-desk
$ pip install  --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple stellar-desk==0.3.1

$ pip show stellar-desk

Main enviroment
$ pip install package_name


Official links:
https://pypi.org - This is a pre-production deployment of Warehouse.
Next Generation Python Package Repository. Beta version, that will be replace pypi
https://pypi.python.org/

Test pypi package:
https://test.pypi.org
https://testpypi.python.org



Resources:


How to Earn Free sudocoin





https://sudokoin.com/


You will need to have stellar account. With minimum of 2 XLM, to add sudokoin to trust chain.



1. Create stellar account if you don't have one.
2. Create trust with sudokoin, you will need at least 2 XML to do this, this might change from time to time.
3. Solve sudoku, and earn sudokoin.




Chrome driver for selenium

2018 m. balandžio 9 d., pirmadienis

Learning solidity

Remix online editor:
https://remix.ethereum.org/

Fidle for etherium:
https://ethfiddle.com/


Easy edditor
https://www.withpragma.com/

Style and Security check:
https://www.ethlint.com/

Free and opensource online edditor
superblocks.com

Runtime Environment. Remix provides three:
  • Injected Web3: to provider such as Mist or MetaMask
  • Web3 Provider: to local host through ipc
  • JavaScript VM: a simulated environment


Other links:
Basic tutorial - https://blockgeeks.com/guides/smart-contract-development/
Documentation - https://solidity.readthedocs.io/en/develop/
YouTube tutorials -https://www.youtube.com/watch?v=0Lyf_3kA3Ms&list=WL&index=4&t=0s
Solidity tips, how to avoid bugs - https://medium.com/loom-network/how-to-secure-your-smart-contracts-6-solidity-vulnerabilities-and-how-to-avoid-them-part-1-c33048d4d17d

2018 m. balandžio 1 d., sekmadienis

2018 m. kovo 15 d., ketvirtadienis

bash itteration through programs

Script for running python script:
$ for i in /tmp//*.xml; do `python scriptname.py $i`; done

import export mysql data

Import:
$ mysql -u username -p  databasename  < path/example.sql

Export:
$ mysqldump -u username -p databasename tableName > path/example.sql




How to make backup of mysql table:

Creating an Empty Table
CREATE TABLE new_table LIKE original_table;

Inserting Data into Table
INSERT new_table SELECT * FROM original_table;