Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A simple progression bar by Yves-Gwenael Bourhis
Usage:
======
Class ProgBar(name, lenght):
----------------------------
name is a string
lenght is an integer which represents the number of elements in the bar
Methods:
========
start():
--------
Start the progression bar in a thread
the progression and thread stop automaticaly when the "percent" property reaches 100%
stop():
-------
Stop the progression bar and the thread
It is recommended to call the join() method after
fill():
-------
Add an element to the bar, and match the corresponding percentage
isAlive():
----------
Returns True if the bar's thread is running, False otherwise
join():
-------
Wait until the threaded bar terminates.
It is recomended to call this method after a stop() call
properties:
===========
percent:
--------
percentage of the bar progression
Example Using step progression::
>>> def printatestbar1():
... bar = ProgBar('test1', 20)
... bar.start()
... while bar.isAlive():
... time.sleep(0.1)
... bar.fill()
... bar.join()
>>> printatestbar1()
test1 [####################] 100%
>>>
Example Using percentage progression::
>>> def printatestbar2():
... bar = ProgBar('test2', 20)
... bar.start()
... while bar.isAlive():
... bar.percent += 1
... time.sleep(0.1)
... bar.join()
>>> printatestbar2()
test2 [####################] 100%
>>>
Example Interupting the progression bar::
>>> def printatestbar3():
... bar = ProgBar('test3', 20)
... bar.start()
... while bar.isAlive():
... bar.percent += 1
... if bar.percent == 50:
... bar.stop()
... break
... time.sleep(0.1)
... bar.join()
>>> printatestbar3()
test3 [##########- ] 50%
>>>
===============
Release Notes :
===============
Release 0.1:
============
First Version
Release 0.2:
============
Removed the destructor (__del__ method) because of:
+ The Warning here:
http://docs.python.org/reference/datamodel.html#object.__del__
+ Destroyed objects where not automaticaly removed by
the garbage collector as described here:
http://docs.python.org/library/gc.html#gc.garbage
Which could cause memory usage increase.
Release 0.3:
============
Changed author's contact info.
FAQs
simple progression bar for shell scripts
We found that progbar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.