Have you ever heard about such words when you working with Python?
easy_install, pip, distutils, setuptools, sdist, bdist, egg, wheel, twine, pypi
let's structuring knowledge about it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript | |
(function () { | |
const username = 'pbelskiy'; | |
function find() { | |
if (document.body.innerHTML.search(username) !== -1) { | |
alert('found!'); | |
return; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
After=postgresql.service | |
[Service] | |
Type=simple | |
ExecStartPre=/bin/bash -c '(journalctl -n 5 --user-unit=%n | grep "Failed with result") && \ | |
(journalctl -n 50 --user-unit=%n | mailx -s "[systemd] %n failed" user@domain.ua) || \ | |
true' | |
ExecStart=/usr/bin/python3 /home/user/daemon.py | |
Environment=PYTHONUNBUFFERED=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time | |
class TimeProfiler: | |
functions = list() | |
start_time = instance = None | |
def __init__(self): |
As you know every time USB device is rebooted is devnum
is changed, but physical USB port is the same as was.
Sometimes it's needed to convert static USB path from lsub -t
to current device num on sysfs (/dev/bus/usb/XXX/YYY
). It's useful for working with devices often are rebooted.
Some little solution that I've found, this script just convert static USB path from lsusb -t
utility to current device on sysfs.
For example, you connected your device to your PC. And its physical topology, for example, is: 218
, where 2 is USB bus, and 18 is nested port hierarchy, it's hierarchy will change only if you change physical USB port on your PC.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/jenkinsapi/job.py b/jenkinsapi/job.py | |
index 280cf93..20c6932 100644 | |
--- a/jenkinsapi/job.py | |
+++ b/jenkinsapi/job.py | |
@@ -90,7 +90,7 @@ class Job(JenkinsBase, MutableJenkinsThing): | |
def poll(self, tree=None): | |
data = super(Job, self).poll(tree=tree) | |
- if not tree: | |
+ if not tree and self.jenkins.lazy is False: |