What does the blue color section in background mean?
I tried to plot graph about a time-series with library statsmodel. I decide to plot autocorrelation function, but I don't know the blue section in the example graph mean... Can anyone tell me? The plot_acf example link: https://www.statsmodels.org/dev/generated/statsmodels.graphics.tsaplots.plot_acf.html#statsmodels.graphics.tsaplots.plot_acf The graph in example: https://www.statsmodels.org/dev/plots/graphics_tsa_plot_acf.png thx -- https://mail.python.org/mailman/listinfo/python-list
Re: ImportError: No module named Adafruit_SSD1306
Le 05/12/2019 à 00:06, RobH a écrit : On 04/12/2019 22:33, Wildman wrote: On Wed, 04 Dec 2019 20:25:33 +, RobH wrote: I am trying to do this project on a pi zero: http://frederickvandenbosch.be/?p=1365 I copied the code to the pi zero Download folder and when I run it I get the above error at line 4 Import Adafruit_SSD1306 I am using python version 2.7.16, if that makes any difference I have the same module as the authors' link goes to : Monochrome 1.3" 128x64 OLED graphic display - STEMMA QT / Qwiic Have I missed something. The error indicates that Adafruit_SSD1306 in not installed. https://github.com/adafruit/Adafruit_Python_SSD1306 I have the library in the same Downloads folder, but I don't know how to actually install it as it doesn't have an .sh file included What cannot you understand in the Installing section of README.md? sudo python -m pip install --upgrade pip setuptools wheel sudo pip install Adafruit-SSD1306 Or alternatively: sudo python -m pip install --upgrade pip setuptools wheel git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git cd Adafruit_Python_SSD1306 sudo python setup.py install even WORSE, what cannot you undertand at the top of same file? This library has been deprecated! We are leaving this up for historical and research purposes but archiving the repository. -- https://mail.python.org/mailman/listinfo/python-list
Re: ImportError: No module named Adafruit_SSD1306
On 04/12/2019 22:33, Wildman wrote: On Wed, 04 Dec 2019 20:25:33 +, RobH wrote: I am trying to do this project on a pi zero: http://frederickvandenbosch.be/?p=1365 I copied the code to the pi zero Download folder and when I run it I get the above error at line 4 Import Adafruit_SSD1306 I am using python version 2.7.16, if that makes any difference I have the same module as the authors' link goes to : Monochrome 1.3" 128x64 OLED graphic display - STEMMA QT / Qwiic Have I missed something. The error indicates that Adafruit_SSD1306 in not installed. https://github.com/adafruit/Adafruit_Python_SSD1306 I have the library in the same Downloads folder, but I don't know how to actually install it as it doesn't have an .sh file included -- https://mail.python.org/mailman/listinfo/python-list
Re: ImportError: No module named Adafruit_SSD1306
On Wed, 04 Dec 2019 20:25:33 +, RobH wrote: > I am trying to do this project on a pi zero: > > http://frederickvandenbosch.be/?p=1365 > > I copied the code to the pi zero Download folder and when I run it I get > the above error at line 4 > Import Adafruit_SSD1306 > > I am using python version 2.7.16, if that makes any difference > I have the same module as the authors' link goes to : > > Monochrome 1.3" 128x64 OLED graphic display - STEMMA QT / Qwiic > > Have I missed something. The error indicates that Adafruit_SSD1306 in not installed. https://github.com/adafruit/Adafruit_Python_SSD1306 -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list
Re: Developers are advised to purge these malicious packages
On 12/4/19 10:59 AM, David Lowry-Duda wrote: > I notice that "python3-dateutil" is in over 4000 github repositories > [1]. That sounds like a disaster. > > [1]: https://github.com/search?q=python3-dateutil&type=Code It's clearly not, as Christian has already said. In fact it would be very difficult to determine from a github search whether this bad package was actually deployed anywhere. Since it presents a fake "dateutil" module, imports would look the same and proper as using the correct one. The only way this package comes into play is if someone pip installed it, or had an install script that installed it, or if it were bundled in the source tree. So this is very bad indeed, but not as bad as you suggest. We're not nearly as much at risk as node.js npm users are yet. -- https://mail.python.org/mailman/listinfo/python-list
ImportError: No module named Adafruit_SSD1306
I am trying to do this project on a pi zero: http://frederickvandenbosch.be/?p=1365 I copied the code to the pi zero Download folder and when I run it I get the above error at line 4 Import Adafruit_SSD1306 I am using python version 2.7.16, if that makes any difference I have the same module as the authors' link goes to : Monochrome 1.3" 128x64 OLED graphic display - STEMMA QT / Qwiic Have I missed something. -- https://mail.python.org/mailman/listinfo/python-list
Re: Developers are advised to purge these malicious packages
On 04/12/2019 18.59, David Lowry-Duda wrote: > I notice that "python3-dateutil" is in over 4000 github repositories > [1]. That sounds like a disaster. > > [1]: https://github.com/search?q=python3-dateutil&type=Code At least the first pages are packaging files for Debian, Fedora, and other Linux distributions. Downstream distributions provide a Python package under multiple names. For example the Fedora's build spec [1] creates python2-dateutil and python3-dateutil packages from the python-dateutil upstream project. Attackers abuse the fact and try to typo-squat packages in hope that somebody uses the Linux distribution package name "python3-dateutil" instead of the upstream name "python-dateutil" in requirements.txt Christian [1] https://src.fedoraproject.org/rpms/python-dateutil/blob/master/f/python-dateutil.spec -- https://mail.python.org/mailman/listinfo/python-list
Re: Developers are advised to purge these malicious packages
I notice that "python3-dateutil" is in over 4000 github repositories [1]. That sounds like a disaster. [1]: https://github.com/search?q=python3-dateutil&type=Code - DLD -- David Lowry-Duda -- https://mail.python.org/mailman/listinfo/python-list
RE: threading
100 increments happen very fast, and means each thread will probably complete before the main thread has even started the next one. Bump that up to 1_000_000 or so and you'll probably trigger it. I did a test with a print(x) at the start of test() to see what the number was when each thread kicked off, and the very first thread had got it up to 655,562 by the time the second thread had started and gotten to that print statement. -Original Message- From: Python-list On Behalf Of ast Sent: Wednesday, December 4, 2019 10:18 AM To: python-list@python.org Subject: threading Hi An operation like x+=1 on a global variable x is not thread safe because there can be a thread switch between reading and writing to x. The correct way is to use a lock lock = threading.Lock with lock: x+=1 I tried to write a program without the lock which should fail. Here it is: import threading x = 0 def test(): global x for i in range(100): x+=1 threadings = [] for i in range(100): t = threading.Thread(target=test) threadings.append(t) t.start() for t in threadings: t.join() print(x) 1 The result is always correct: 1 Why ? Secondly, how the switch between threads is done by the processor ? Is there a hardware interrupt coming from a timer ? -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
threading
Hi An operation like x+=1 on a global variable x is not thread safe because there can be a thread switch between reading and writing to x. The correct way is to use a lock lock = threading.Lock with lock: x+=1 I tried to write a program without the lock which should fail. Here it is: import threading x = 0 def test(): global x for i in range(100): x+=1 threadings = [] for i in range(100): t = threading.Thread(target=test) threadings.append(t) t.start() for t in threadings: t.join() print(x) 1 The result is always correct: 1 Why ? Secondly, how the switch between threads is done by the processor ? Is there a hardware interrupt coming from a timer ? -- https://mail.python.org/mailman/listinfo/python-list
Developers are advised to purge these malicious packages
``` The Python security team removed two trojanized Python libraries from PyPI (Python Package Index) that were caught stealing SSH and GPG keys from the projects of infected developers. The first is "python3-dateutil," which imitated the popular "dateutil" library. The second is "jeIlyfish" (the first L is an I), which mimicked the "jellyfish" library. ``` https://www.zdnet.com/article/two-malicious-python-libraries-removed-from-pypi/ Regards, -- Pankaj Jangid -- https://mail.python.org/mailman/listinfo/python-list