<jupyter_start><jupyter_text>Notebook: Testing Our data_infra Package  data_infra Package: PostgreSQL DB; AWS SQS, S3, etc.<jupyter_code># NOTE: First make sure you are in the TeamReel DS parent directory 
# (not the 'notebooks_modeling' directory):
ls<jupyter_output>LICENSE                              [34mdummy-test-api[m[m/
README.md                            notebook_data_infra_functions.ipynb
[34mdata_infra[m[m/                          [34mnotebooks_modeling[m[m/<jupyter_text>------------------------  get_next_video(): Database Info & Raw Video File Gets the next newly uploaded video from our queue, downloads it to the project folder, queries our database for info about that video, prompt and user, and returns that info in a Python dictionary.<jupyter_code># Import:
# (Note: Make sure you are in the TeamReel DS parent directory, not 'notebooks_modeling'.)
from data_infra import get_next_video
help(get_next_video)
video_info = get_next_video()
video_info
# And now the raw video file is in our project folder too:
ls<jupyter_output>ALPACAVID-wHgVXLxaK.webm             [34mdummy-test-api[m[m/
LICENSE                              notebook_data_infra_functions.ipynb
README.md                            [34mnotebooks_modeling[m[m/
[34mdata_infra[m[m/<jupyter_text>------------------  get_video_info(video_s3_key=______): Database Info Only Gets the video, prompt and user info for the specified video (using the input video_s3_key string) from our DB, and returns it in a Python dictionary. Does NOT download the video file.<jupyter_code># Import:
# (Note: Make sure you are in the TeamReel DS parent directory, not 'notebooks_modeling'.)
from data_infra import get_video_info
help(get_video_info)
video_info = get_video_info(video_s3_key='videos/ALPACAVID-i7swK-Wzc.webm')
video_info<jupyter_output><empty_output><jupyter_text>---------------------------  get_feedback_for_video(video_id=_____): All feedback on that video<jupyter_code># Import:
# (Note: Make sure you are in the TeamReel DS parent directory, not 'notebooks_modeling'.)
from data_infra import get_feedback_for_video
help(get_feedback_for_video)
get_feedback_for_video(video_id=134)<jupyter_output><empty_output><jupyter_text>----------------------------  get_feedback_for_user(user_id=int): All feedback on all of that user's videos<jupyter_code># Import:
# (Note: Make sure you are in the TeamReel DS parent directory, not 'notebooks_modeling'.)
from data_infra import get_feedback_for_user
help(get_feedback_for_user)
get_feedback_for_user(user_id=185)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11505791505791506, 'fraction_numerical': 0.00888030888030888, 'mean_word_length': 4.001930501930502, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '178096', 'license': 'MIT', 'n_tokens_mistral': 872, 'n_tokens_neox': 812, 'n_words': 229, 'path': 'data_infra/notebooks/notebook_data_infra_functions.ipynb', 'repo_name': 'tatianaportsova/TeamReel_DS', 'size': '2590'}