mkdir data_copy cp -r data data_copy rm -r data ps df vmstat jobs ps aux|grep {process_name} https://github.com/dfirst-education/sample/blob/dev/_sample_execute_py_from_sh/sample.md
with open('.\\input.jsonl') as f: for line in f: if line.find('{"target_words": "') >= 0: with open('.\\output.jsonl', "a") as f: f.write(line)
https://github.com/dfirst-education/sample/blob/dev/dataframe_create.ipynb import pandas as pd # changing format pd.get_option("display.max_columns") pd.get_option("display.max_colwidth") pd.set_option('display.max_columns', 50) pd.set_option('display.max_colwidth', 100) # reading excel file to dataframe df = pd.read_excel('.\\input_target.xlsx', index_col=0) # reading csv file to dataframe df = pd.read_csv('.\\ input_target.csv', header=0) # reading jsonl file to dataframe df = pd.read_json('.\\ input_target.jsonl', orient='records', lines=True) # showing dataframe df [0:2] print(df.shape) […]
Key Bindings for Visual Studio Code https://code.visualstudio.com/docs/getstarted/keybindings Toggle Word Wrap (editor.action.toggleWordWrap) : Alt+z The code can be wrapped by the width of the editor. Format Document (editor.action.formatDocument) : Shift+Alt+F Can normalize Json files Multiple selection of words : Ctrl+D Can edit or replace selected words. Command input mode : Ctrl+Shift+P Can […]
OpenAI websitehttps://openai.com/ Sample code used in the demo pip install openai import openai import json import datetime d = datetime.datetime.now() f = '%Y%m%d%H%M%S' strdatetime = d.strftime(f) file_name = "history_" + strdatetime + ".json" model_engine = "gpt-3.5-turbo" openai.api_key = "******************************************" # Please replace with a secret key. messages = [] open(file_name, "w") while True: user_input […]