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
what is the maximum number of elements in a subset of | |
\{10,12,...,99\}that does not contain any two numbers xx and yy with x+y=100? |
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
''' | |
1. create user_hash folder | |
2. create sub_folder by date | |
3. repeat creating folders | |
4. see if already created folders return no errors | |
''' | |
import unittest | |
import mock | |
from utilities import create_folder_for_dataset |
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
''' | |
STEPS | |
1. Take user_hash from command line | |
2. Set timer so it records after every 5 minutes | |
3. Store image in dataset/user_hash/date/store_by_timestamp | |
''' | |
from argparse import ArgumentParser |
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
def take_pic_every_n_secs(frame,user_hash,today): | |
current_time = int(time.time()*1000) | |
cv.imwrite(f'data/{user_hash}/{today}/{current_time}.png',frame) | |
time.sleep(20) |
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
''' | |
STEPS | |
1. Take user_hash from command line | |
2. Set timer so it records after every 5 minutes | |
3. Store image in dataset/user_hash/date/store_by_timestamp | |
''' | |
from argparse import ArgumentParser |
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
issues: | |
ERRORS: | |
auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'CustomUser.groups'. | |
HINT: Add or change a related_name argument to the definition for 'User.groups' or 'CustomUser.groups'. | |
auth.User.user_permissions: (fields.E304) Reverse accessor for 'User.user_permissions' clashes with reverse accessor for 'CustomUser.user_permissions'. | |
HINT: Add or change a related_name argument to the definition for 'User.user_permissions' or 'CustomUser.user_permissions'. | |
users.CustomUser.groups: (fields.E304) Reverse accessor for 'CustomUser.groups' clashes with reverse accessor for 'User.groups'. | |
HINT: Add or change a related_name argument to the definition for 'CustomUser.groups' or 'User.groups'. | |
users.CustomUser.user_permissions: (fields.E304) Reverse accessor for 'CustomUser.user_permissions' clashes with reverse accessor for 'User.user_permissions'. |
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
issues: | |
ERRORS: | |
auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'CustomUser.groups'. | |
HINT: Add or change a related_name argument to the definition for 'User.groups' or 'CustomUser.groups'. | |
auth.User.user_permissions: (fields.E304) Reverse accessor for 'User.user_permissions' clashes with reverse accessor for 'CustomUser.user_permissions'. | |
HINT: Add or change a related_name argument to the definition for 'User.user_permissions' or 'CustomUser.user_permissions'. | |
users.CustomUser.groups: (fields.E304) Reverse accessor for 'CustomUser.groups' clashes with reverse accessor for 'User.groups'. | |
HINT: Add or change a related_name argument to the definition for 'CustomUser.groups' or 'User.groups'. | |
users.CustomUser.user_permissions: (fields.E304) Reverse accessor for 'CustomUser.user_permissions' clashes with reverse accessor for 'User.user_permissions'. |
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
import os | |
from PIL import Image | |
path = '.' | |
from IPython.display import Image | |
from sklearn.tree import export_graphviz | |
from matplotlib.pyplot import imshow |
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
tree_classifier = DecisionTreeClassifier(max_depth=2) | |
df_x = df.copy() | |
X = df_x.drop('quality',axis=1) | |
y = df['quality'] | |
tree_classifier.fit(X,y) |
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
mappings_for_quality = { | |
3:"A", | |
4:"B", | |
5:"C", | |
6:"D", | |
7:"E", | |
8:"F" | |
} | |
df['quality'].replace(mappings_for_quality,inplace=True) |