Whisperã¯ãChatGPTã§ç¥ãããOpenAIã«ãã£ã¦éçºãããé常ã«æ£ç¢ºãªé³å£°èªèã¢ãã«ã§ãä¼è©±ã®é³å£°ãããã¹ãã«æ¸ãèµ·ããã¦ãããã 100ä¸æé以ä¸ã®ãã¼ã¿ã§ãã¬ã¼ãã³ã°ãããææ°ã®AIã¢ãã«ã ããé©ãã¹ããã¨ã«ãªã¼ãã³ã½ã¼ã¹ã§å ¬éããã¦ããããã誰ã§ããç¡æã§ãç°¡åã«å©ç¨ãããã¨ãã§ããã ææã®é³å£°æ¸ãèµ·ãããµã¼ãã¹ã»è°äºé²æ¸ãèµ·ãããµã¼ãã¹ã¯æ°å¤ãããããå®ã¯ç¡æã®Whisperã使ãã°ååã ã ããããWhisperã®æ¹ãæ®ã©ã®é³å£°èªèã½ãããã精度ãé«ãã ããã ã¨ã¯ãããããã°ã©ãã³ã°ã®ç¥èããªã人ã«ã¨ã£ã¦ã¯ãå°ãå©ç¨ãããã¼ãã«ãããã ããã§ãWhisperã®ææ°ã¢ãã«ï¼Whisper v3ï¼ããç°¡åã«ä½¿ããå°ããªWebã¢ããªã«ãã¦ã¿ãã®ã§ããã®è¨äºã§ä½¿ãæ¹ãç´¹ä»ããã WhisperããGoogle Colabã¨ããGoogleã¢ã«ã¦ã³ããæã£ã¦ãã人ãªã誰
OpenAIãéçºãã¦ãããWhisperãã¯ãããããè¨èªã§äººéã®ä¼è©±é³å£°ãæåèµ·ããã§ããé«æ§è½ãªSpeech-to-textã¢ãã«ã ã Whisperã¯ãªã¼ãã³ã½ã¼ã¹åããã¦ãããã¢ãã«ããã¦ã³ãã¼ãããã°ãç¡æã§ã誰ã§ãå©ç¨ã§ããã ããããå®ç¨ä¸ã®å¤§ããªåé¡ãããã ããã¯ãæåèµ·ããã«ã¯ç¸å½ãªGPUãã¯ã¼ãè¦ããä¸è¬çãªPCã§ã¯æéãããããããã¨ããç¹ã ã ããã§å½ããã°ã§ã¯ãGoogle Colaboratoryã®ç¡æã®GPUã¤ã³ã¹ã¿ã³ã¹ã§ãWhisperãå©ç¨ãããã¼ãããã¯ãå ¬éãã¦ãããããããGoogle Colabã®ç¡æãã©ã³ã§ä½¿ããGPUã§ã¯è¶ é«éã¨ã¯ããããæ°ååã®é³å£°ãæ¥å¸¸çã«æåèµ·ãããããããªå ´åããã¯ãå®è¡é度ãã¹ãã¬ã¹ã«ãªãã ãããªã¹ãã¼ãéè¦ã ã精度ãè½ã¨ããããªããã¨ãã人ã«ãããããªã®ããOpenAIãæä¾ããAPIãçµç±ãã¦ãWhisper
Jupyter ã使ã£ã¦ãã¼ã¿ãå¯è¦åãã¦ããã¨ãä¼¼ããããªã°ã©ããä½åº¦ãæããã¨ãããã ãããªã¨ããå¤æ°ã®å¤ãå¤æ´ããªããã°ã©ããæç»ããã»ã«ãå®è¡ãã¾ããã®ã¯å¹çããã¾ããããªãã ããã§ãä»å㯠ipywidgets ã使ã£ã¦ç°¡å㪠UI ãä½ããã¨ã§ãJupyter ã§ã¤ã³ã¿ã©ã¯ãã£ããªæä½ãã§ããããã«ãã¦ã¿ãã ã°ã©ãã®æç»ã«ã¯ãä»åã¯ä¸»ã« Matplotlib ã使ããã¨ãæ³å®ãã¦ããã 使ã£ãç°å¢ã¯æ¬¡ã®ã¨ããã $ sw_vers ProductName: macOS ProductVersion: 11.2.2 BuildVersion: 20D80 $ python -V Python 3.9.2 $ pip list | grep widgets ipywidgets 7.6.3 jupyterlab-widgets 1.0.0 widgetsnbextension
1.ã¯ããã« google colab ã§ã©ã¤ãã©ãªã®ã¤ã³ã¹ãã¼ã«ãªã©ãè¡ãã¨ããå ´åã«ãã£ã¦ã¯é·ã ã¨ãã°ãåºåãããã¨ãããã¾ããããã¯ã¹ãã¼ãã§ãªãã§ããããã°ãåºåãããªãã¨ä»åº¦ã¯é²æãå ¨ãåãããªããã§ã¯ãã©ãããã°è¯ããã 2.対ç tqdm.notebook ã¨ã io.capture_output() ãä¸è¨ã®ããã«çµã¿åããã¾ããå¦çãããã¯ãAãDã®ï¼ã¤ã ã¨ããããåãããã¯ã®çµããã« pbar.update(*) ã§é²æçãè¨è¼ããåè¨100ã«ãªãããã«ãã¦ããã°OKã§ãã åãããã¯ãçµãã㨠pbar.update(*) ã§è¨å®ããåããã°ã¬ã¹ãã¼ãå¢ãã¾ãã®ã§ã大ä½ã®é²æãï¼è¡ã§åãã¾ãã from IPython.utils import io import os import subprocess import tqdm.notebook TQDM_BAR_F
Python ã®æ§é çãã¿ã¼ã³ãããã³ã° 1 ã®ä½¿ãæ¹ã«ã¤ãã¦ããããã«ã¾ã¨ãã¾ããã æ§é çãã¿ã¼ã³ãããã³ã°ã¯ä¸è¦ã·ã³ãã«ã§ãããã¾ãã¾ãªä½¿ãæ¹ãã§ããé常ã«å¼·åãªæ©è½ã§ãã æ£ããç解ãã¦ãã¾ãæ´»ç¨ã§ããã° Pythonic ãªã³ã¼ããæ¸ãã®ã«å½¹ç«ã¤ãã®ã¨æãã¾ãã ç®æ¬¡ æ§é çãã¿ã¼ã³ãããã³ã°ã¨ã¯ æ§é çãã¿ã¼ã³ãããã³ã°ããµãã¼ããããã¿ã¼ã³ æ§é çãã¿ã¼ã³ãããã³ã°ã¨ã¯ æ§é çãã¿ã¼ã³ãããã³ã°ï¼ Structual Pattern Matching ï¼ã¯ã Python 3.10 ã§æ°ãã«å°å ¥ãããï¼ãããï¼æ§æã§ãã 2 ã¤ã®ãã¼ã¯ã¼ã match 㨠case ã使ç¨ãã¾ãã åç´ãªå¤ã§ã®åå²ã®ä»ã«ããã¼ã¿æ§é ãã¢ããªãã¥ã¼ãã®ãã¿ã¼ã³ã§ã®åå²ãªã©ãå¯è½ã¨ãªã£ã¦ãã¾ãã è¦ãç®ã¯ä»ã®ãªãã¸ã§ã¯ãæååã®è¨èªã«ãããã switch case ã«ä¼¼ãå°è±¡ãä¸ãã¾ãããã©ã¡
åå解決 ããã°ã©ã å®è¡æã«ä½ãã®ååï¼å¤æ°åãé¢æ°åãªã©ï¼ãçºè¦ããã¨ãPythonã¯ããã解決ããããã«ã3ã¤ï¼ã¾ãã¯ãã以ä¸ï¼ã®ã¹ã³ã¼ããããã¼ã«ã«ã¹ã³ã¼ãâã°ãã¼ãã«ã¹ã³ã¼ãâãã«ãã¤ã³ã¹ã³ã¼ããã®é ã«ãã©ã£ã¦ãããã¤ã¾ããé¢æ°ã®å®è¡æã«ååãè¦ã¤ããã¨ãã¾ãã¯é¢æ°ã®ãã¼ã«ã«ã¹ã³ã¼ããããã®ååãæ¤ç´¢ããããã¼ã«ã«ã¹ã³ã¼ãã«ãã®ååãããã°ãããï¼ãã¼ã«ã«å¤æ°ããã©ã¡ã¼ã¿ã¼ãªã©ï¼ã®å¤ãå©ç¨ãããè¦ã¤ãããªããã°ãã°ãã¼ãã«ã¹ã³ã¼ãâãã«ãã¤ã³ã¹ã³ã¼ãã¨ããé çªã§ããã®ååãæ¤ç´¢ãã¦ãããè¦ã¤ãã£ãã¨ããã§ãã®å¤ãå©ç¨ãããæçµçã«ååãè¦ã¤ãããªããã°ãå ã»ã©ã®ç»åã«ãã£ããNameErrorããçºçãããã 以ä¸ã§ã¯ãååã解決ããé åºã«ã¤ãã¦ã³ã¼ãä¾ã¨å ±ã«è¦ã¦ãããã ãã¼ã«ã«ã¹ã³ã¼ãã®ã¿ ããã§myfuncé¢æ°ã«ã¤ãã¦ããä¸åº¦è¦ã¦ã¿ããã def myfunc(): a =
ããã«ã¡ã¯ãCXäºæ¥æ¬é¨ã®è¥æ§»ã§ãã é¢æ°ããã¹ããããPythonã³ã¼ãã§ãé¢æ°ã®å å´ã§å¤æ´ï¼å®ç¾©ï¼ããå¤æ°ã®å¤ãå¤å´ããåç §ãããå ´åãããã¾ãã ä¾ãã°ä»¥ä¸ã®ã³ã¼ãã§ã¯ãinner()ã®å¤å´ï¼outer()ã®å å´ï¼ã§var = 'Initial Var'ã¨ããinner()ã®å å´ã§var = 'New Var'ã¨ãã¦ãã¾ãã def outer(): var = 'Initial Var' def inner(): var = 'New Var' return(var) print(inner()) print(var) ãã®å ´åouter()ãå®è¡ããéã®åºå㯠# åºå >> python outer() New Var Initial Var ã¨ãªããinner()ã®å å´ã§è¡ã£ãå¤æ´ãå¤å´ã«åæ ããããprint(inner())ã¨print(var)ã®åºåçµæãç°ãªãçµæã¨ãª
1.ã¯ããã« Google Colab ã« MeCab 㨠ipadic-NEologd ãã¤ã³ã¹ãã¼ã«ãããã¨æã£ããæå¤ã«æéåã£ãã®ã§åå¿é²ã¨ãã¦æ®ãã¾ãã 2.ã³ã¼ã è²ã ãªWebæ å ±ãæ¼ã£ãçµæãã¤ã³ã¹ãã¼ã«ã«ã¯ä¸è¨ã®ã³ã¼ãããã¹ãã§ã¯ãªããã¨æãã¾ãã # å½¢æ ç´ åæã©ã¤ãã©ãªã¼MeCab 㨠è¾æ¸(mecab-ipadic-NEologd)ã®ã¤ã³ã¹ãã¼ã« !apt-get -q -y install sudo file mecab libmecab-dev mecab-ipadic-utf8 git curl python-mecab > /dev/null !git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git > /dev/null !echo yes | mecab-ipadic-
ChatGPT,使ã£ã¦ãã¾ããï¼ ChatGPTã¯æç« ãè¦ç´ããããããã°ã©ã ä½ã£ã¦ãããããä¸ç·ã«ãã¬ã¹ããã¦ãããããã¦æ¬å½ã«ä¾¿å©ãªã®ã§ããã社å æ å ±ãªã©ã®ç¬èªãã¼ã¿ã«é¢ããæ å ±ã«ã¤ãã¦ã¯åçãã¦ããã¾ããã ããã³ããã«æ å ±ãè¨è¿°ãã¦ãããã«æ¸ããã¦ããæ å ±ããåçãã¦ãããæ¹æ³ãããã¾ãããæ大ãã¼ã¯ã³4000ã®å£ãããã¾ãã®ã§ãéçããããã¨æãã¾ãã ãã®èª²é¡ã«ã¤ãã¦ãªãã¨ããªããªããã¨èãã¦è²ã ã¨èª¿ã¹ã¦è¦ãã¨ããã解決ããæ¹æ³ãè¦ã¤ãããããããã¨æ¤è¨¼ããã¦è¦ã¾ããã®ã§ãã®çµæãã·ã§ã¢ãããã¨æãã¾ãã ãµã³ãã«ã³ã¼ãï¼GoogleColabï¼ ç¾èã¯ä¸è¦ã«ãããã¨ãããã¨ã§ãå®éã«è©¦ãããµã³ãã«ã¯ä»¥ä¸ã«ããã¾ãã®ã§ãã¾ãã¯åããã¦ã¿ããã¨ããå§ããã¾ãã ãã®ã³ã¼ããä¸ããé çªã«åããã¨ãå®éã«ã¤ã³ã¿ã¼ãããä¸ããåå¾ããPDFãã¡ã¤ã«ã«é¢ããå 容ãChatGPTãåçãã¦
ãã¾ã«å¿ è¦ã«ãªãã¨ã dateutil ã® relativedelta ã®åå¨ãã©å¿ããã¦ãã¦ä½åº¦ã調ã¹ã¦ããã®ã§è¨äºã«ã¾ã¨ãã¦ããã¾ãã1ã¶æå¾ã®æ¥ä»ã欲ãããã° relativedelta 使ããã§çµããè¨äºãªã®ã§ããããã ãã ã¨ããã¾ããªã®ã§ãdatetimeã¢ã¸ã¥ã¼ã«ã®timedelta ãªãã¸ã§ã¯ããªã©ã®ç´¹ä»ãåããã¦ã¾ã¨ãã¦ããã¾ãã ãã¦ãæ¥ä»ãã¼ã¿ã¨ããæ±ãããã°ã©ã ãæ¸ãã¦ããã¨ãnæéå¾ã¨ãnæ¥å¾ã®æå»ãå¿ è¦ã«ãªããã¨ã¯ããããã¾ããPythonã®datetimeã¢ã¸ã¥ã¼ã«ã§ã¯ãdatetime.datetime.timedelta ãªãã¸ã§ã¯ãã使ããã¨ã§ããããè¨ç®ãããã¨ãã§ãã¾ãã åè: timedelta ãªãã¸ã§ã¯ã class datetime.timedelta(days=0, seconds=0, microseconds=0, millisecon
Excelãªã©ã§ãã使ããããããããã¼ãã«ã ãããpandasã®ãã¼ã¿ãã¬ã¼ã ã§ä½¿ãå ´åã«ã¯ DataFrame.pivot()DataFrame.pivot_table() ã®ï¼ç¨®é¡ãããã¾ãã ä»åã¯ãããããã¼ãã«ã®ä½¿ãæ¹ã¨2ã¤ã®é¢æ°ã®éãããç´¹ä»ãã¾ãã ä»ã«ä¼¼ããããªæ©è½ã¨ãã¦ã¯DataFrame.groupby()ãããã¾ã
Seleniumé¢é£ã®è¨äºã¯ã°ã°ã£ããããããåºã¦ããããseleniumã¨webdriverã¯ãã¼ã¸ã§ã³ã®ç¸ããé常ã«å³ããããããã¤ã³ã¹ãã¼ã«ãã¦ãå ¨ãåããªãã è¦æ¦ãããã¨2æéããã£ã¨åãããããã«ãªã£ãã®ã§ã失æããæã®ãã¿ã¼ã³ã¨æåãã¿ã¼ã³ãæ¸ãã¦ããã¾ããããããseleniumã§Chromeãæä½ãããã¨ãã人ã®åèã«ãªãã°å¹¸ãã§ãã 失æãã¿ã¼ã³ pythonãåããæã¯Google colaboratoryãjupyter notebookã使ã£ã¦ããã®ã§ãseleniumãåãããã«åãããã ããã¨æã£ã¦ããã ãããªæãã§ãseleniumã®ã¤ã³ã¹ãã¼ã«ãimportã¯ç¹ã«åé¡ãªãã§ããã ããããªãããwebdriverãåãããã¨ããããã¨ã©ã¼ãåºã¦ãã¾ãã ããããã¨è©¦è¡é¯èª¤ãã¦ã以ä¸ã®ãããªæé ãè¸ãã ã¨ããããã¾ãChromeãç«ã¡ä¸ãããã¨ãã§ããã®ã§
å½ãµã¤ããã¹ã¿ãã¸ãã®æ¬è¨äºã§ã¯ãSeleniumãPythonã§åããã¦Chromeãã©ã¦ã¶ä¸ã§è¡ãæä½ãèªååãã¦ããã¾ããé常ã«ç°¡åãªã³ã¼ããè¨è¿°ããã ãã§æä½ã§ããã®ã§ãã²è©¦ãã¦ã¿ã¦ãã ããï¼Seleniumãé§ä½¿ããã°æ®æ®µã®åç´å´åãå ¨èªåã«ãªãããããã¾ãããï¼ ããã«ã¡ã¯ï¼ æ¶è²»è²¡ã¡ã¼ã«ã¼ã§ãã¸ã¿ã«ãã¼ã±ã¿ã¼ã»ãã¼ã¿ãµã¤ã¨ã³ãã£ã¹ããçµé¨å¾ãç¾å¨ã¯ç¬ç«ãã¦åãã¦ããã¦ããã(@statistics1012)ã§ãï¼ Pythonã使ãã¨é常ã«è²ã ãªãã¨ãåºæ¥ã¡ããã¾ãã ãã®ä¸ã§ãSeleniumã使ã£ããã©ã¦ã¶ã®èªååã¯é常ã«ä¾¿å©ã æ®æ®µãªãã¨ãªã¼ãæ°æ§ã§ãã£ã¦ããã«ã¼ãã£ã³ã¯ã¼ã¯ã¯ããããããSeleniumã使ãã°ãã¼ãã¶èªååã§ãã¦ãã¾ãããããã¾ããã
ãsend_keysããå®è¡ãããã¨ã§è¦ç´ ã«ãã¼ãã¼ãå ¥åãããã¨ãåºæ¥ã¾ãã element.send_keys(keys.xxx)ã®å½¢ã§xxxã«ç¹æ®ãã¼æå®ããã¨ãè¦ç´ ã«å¯¾ãã¦ç¹æ®ãã¼ãå ¥åãããã¨ãã§ãã¾ããelement.send_keys(keys.xxx,string)ã®å½¢ã§æå®ãããå ´åã¯ãç¹æ®ãã¼ã§ããxxxãæ¼ä¸ãããç¶æ ã§ãè¦ç´ ã«å¯¾ãã¦æå(æåå)ãå ¥åãããã¨ãã§ãã¾ãã ä¸æ¹ãelement.send_keys(string,keys.xxx)ã¯è¦ç´ ã«å¯¾ãã¦é常ãã¼å ¥åããå¾ãç¹æ®ãã¼å ¥åãã¦ãã¾ããå ·ä½ä¾ã¨ãã¦ã¯ãæ¤ç´¢ããã¹ãããã¯ã¹ã«æååå ¥åå¾ã«Enterãã¼å ¥åããªã©ãããããã¾ãã âã¡ã½ãã ã»send_keys(Keys.xxx) â使ç¨å½¢æ ã»element.send_keys(Keys.xxx,string) ã¾ã㯠element.send_k
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}