Add initial main analysis script

This commit is contained in:
Aleksey Filippov 2023-05-26 10:33:54 +04:00
parent 7c99609b1c
commit 3a51a23048
3 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main (ulpressa)" type="PythonConfigurationType" factoryName="Python">
<module name="social-clusters"/>
<option name="INTERPRETER_OPTIONS" value=""/>
<option name="PARENT_ENVS" value="true"/>
<envs>
<env name="PYTHONUNBUFFERED" value="1"/>
</envs>
<option name="SDK_HOME" value="C:\Users\user\Projects\python\social-clusters\venv\Scripts\python.exe"/>
<option name="SDK_NAME" value="Python 3.10 (social-clusters)"/>
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"/>
<option name="IS_MODULE_SDK" value="false"/>
<option name="ADD_CONTENT_ROOTS" value="true"/>
<option name="ADD_SOURCE_ROOTS" value="true"/>
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main.py"/>
<option name="PARAMETERS" value="ulpressa.private.json"/>
<option name="SHOW_COMMAND_LINE" value="false"/>
<option name="EMULATE_TERMINAL" value="false"/>
<option name="MODULE_MODE" value="false"/>
<option name="REDIRECT_INPUT" value="false"/>
<option name="INPUT_FILE" value=""/>
<method v="2"/>
</configuration>
</component>

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main (ultra) " type="PythonConfigurationType" factoryName="Python">
<module name="social-clusters"/>
<option name="INTERPRETER_OPTIONS" value=""/>
<option name="PARENT_ENVS" value="true"/>
<envs>
<env name="PYTHONUNBUFFERED" value="1"/>
</envs>
<option name="SDK_HOME" value="C:\Users\user\Projects\python\social-clusters\venv\Scripts\python.exe"/>
<option name="SDK_NAME" value="Python 3.10 (social-clusters)"/>
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"/>
<option name="IS_MODULE_SDK" value="false"/>
<option name="ADD_CONTENT_ROOTS" value="true"/>
<option name="ADD_SOURCE_ROOTS" value="true"/>
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main.py"/>
<option name="PARAMETERS" value="ultra.private.json"/>
<option name="SHOW_COMMAND_LINE" value="false"/>
<option name="EMULATE_TERMINAL" value="false"/>
<option name="MODULE_MODE" value="false"/>
<option name="REDIRECT_INPUT" value="false"/>
<option name="INPUT_FILE" value=""/>
<method v="2"/>
</configuration>
</component>

19
main.py Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env python3
import os
import sys
import pandas as pd
def __main(json_file):
df = pd.read_json(json_file)
print('done')
if __name__ == '__main__':
if len(sys.argv) != 2:
print('You must specify the raw_dataset json file')
exit(1)
if not os.path.isfile(sys.argv[1]):
print(f'File {sys.argv[1]} is not exists')
__main(sys.argv[1])