Skip to content

Instantly share code, notes, and snippets.

View TimurNurlygayanov's full-sized avatar
😎
trying neural networks

Timur Nurlygayanov TimurNurlygayanov

😎
trying neural networks
  • Reddit
  • Berlin
View GitHub Profile
# Example of how to add data validation for XLSX field A2
from openpyxl import load_workbook
from openpyxl.worksheet.datavalidation import DataValidation
data_file = '111.xlsx'
wb = load_workbook(filename=data_file)
page = wb['отчет']
from openpyxl import load_workbook
data_file = '111.xlsx'
wb = load_workbook(filename=data_file)
data = wb['исходные']
filial_number = '01'
i = 2
@TimurNurlygayanov
TimurNurlygayanov / parent_and_child_python2.py
Created January 21, 2019 14:53
parent_and_child_python2.py
class a(object):
__numbers = [1, 2, 3]
def input(self, numbers):
self.__numbers = numbers
def sum(self):
print(sum(self.__numbers))
@TimurNurlygayanov
TimurNurlygayanov / parent_and_child_python.py
Last active January 21, 2019 14:16
parent_and_child_python
class a(object):
my_attr = 'simple attribute'
_my_attr2 = 'internal attribute'
__my_attr3 = 'real internal attribute'
# Magic here: ['_a__my_attr3', '_my_attr2', 'my_attr']
print([name for name in dir(a) if 'my_attr' in name])
./pict data.txt
Age Gender Eyes color
24-35 M Blue
24-35 F Brown
18-24 M Brown
<18 M Grey
35+ F Blue
35+ M Green
24-35 F Grey
18-24 F Green
cat data_b.txt
Age: <18, 18-24, 24-35, 35+
Gender: M, F
Eyes color: Black, Green, Blue, Grey, Brown