下面是一个示例字符串 -
$string = "abcde ????? abcde"
Run Code Online (Sandbox Code Playgroud)
我需要检查天气这个字符串包含任何印地语(梵文)内容,如果是的话,字符和单词的数量。我猜带有 unicode 字符类的正则表达式可以工作http://www.regular-expressions.info/unicode.html。但我无法找出正确的正则表达式语句。
当我在Google Colab上使用Pygame运行DQN脚本时,会引发错误-
pygame.error:没有可用的视频设备
我正在尝试在Google Colab上运行此GitHub存储库。pong_neural_network_live
使用以下代码安装了Pygame-
import os
!git clone https://github.com/ntasfi/PyGame-Learning-Environment.git
os.chdir('PyGame-Learning-Environment')
!pip install -e .
!pip install pygame
os.chdir('/content')
Run Code Online (Sandbox Code Playgroud)
在尝试初始化并运行以下代码时
import pygame
pygame.init()
pygame.display.list_modes()
Run Code Online (Sandbox Code Playgroud)
我懂了
错误:视频系统未初始化
PS:我还启用了Google Chrome浏览器中的第三方Cookie。
python pygame deep-learning jupyter-notebook google-colaboratory