у многих API процессинга карт организован в лоб: магазин присылает данные карты
(номер, first/last name, exp date и cvv) и процессинг их обрабатывает.
$ venv/bin/pip install opencv-python
Collecting opencv-python
Downloading https://files.pythonhosted.org/packages/bf/d8/2422f90a596fc90d3027415121221f7cfb2513af8fd2a66203864941fabf/opencv_python-4.1.2.30-cp37-cp37m-macosx_10_9_x86_64.whl (45.2MB)
|████████████████████████████████| 45.2MB 1.9MB/s
Collecting numpy>=1.14.5
Downloading https://files.pythonhosted.org/packages/2f/5b/2cc2b9285e8b2ca8d2c1e4a2cbf1b12d70a2488ea78170de1909bca725f2/numpy-1.18.1-cp37-cp37m-macosx_10_9_x86_64.whl (15.1MB)
|████████████████████████████████| 15.1MB 1.6MB/s
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.18.1 opencv-python-4.1.2.30
$ venv/bin/python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.1.2'
>>>
class Unit:
__slots__ = ('number', 'radius', 'width', 'color')
def __init__(self, number, radius, width, color):
self.number = number
self.radius = radius
self.width = width
self.color = color
l.append(self)
Partition of a set of 71837 objects. Total size = 6887839 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 10000 14 1120000 16 1120000 16 dict of __main__.Unit
1 12606 18 1099993 16 2219993 32 str
2 10056 14 729024 11 2949017 43 tuple
3 10000 14 560000 8 3509017 51 __main__.Unit
4 561 1 460680 7 3969697 58 type
5 2512 3 361909 5 4331606 63 types.CodeType
6 4892 7 340577 5 4672183 68 bytes
7 2413 3 328168 5 5000351 73 function
8 11220 16 317416 5 5317767 77 int
9 561 1 269392 4 5587159 81 dict of type
<125 more rows. Type e.g. '_.more' to view.>
Partition of a set of 61841 objects. Total size = 5928031 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 12606 20 1099995 19 1099995 19 str
1 10058 16 729232 12 1829227 31 tuple
2 10000 16 720000 12 2549227 43 __main__.Unit
3 561 1 460512 8 3009739 51 type
4 2512 4 361909 6 3371648 57 types.CodeType
5 4892 8 340583 6 3712231 63 bytes
6 2413 4 328168 6 4040399 68 function
7 11220 18 317416 5 4357815 74 int
8 561 1 269392 5 4627207 78 dict of type
9 400 1 181760 3 4808967 81 set
<124 more rows. Type e.g. '_.more' to view.>
Как в Пайтоне сделать так, чтобы после условия перекидывало на другую строку
допустим если условие верно, то меня перекидывало на 2-ую строку
if uslovie == True: # 1 строка
print('А вот и вторая строка') # 2 строка
for file in `/bin/cat /var/log/backup_rsync_all | grep mkstemp | awk -F"\"" '{ print $2 } ' | sed 's/\.[^.]*$//;s;/\.;/;'`;do
file_source=`echo $file | sed 's/datastore2/datastore1/'`
/bin/cp -f "$file_source" "$file"
done
/usr/bin/ssh -i /root/ds2 root@172.16.0.248 "/usr/local/bin/versions.sh"