小编A_N*_*A_N的帖子

如何使用字符和字数检测字符串中是否包含印地语(devnagri)

下面是一个示例字符串 -

$string = "abcde ????? abcde"
Run Code Online (Sandbox Code Playgroud)

我需要检查天气这个字符串包含任何印地语(梵文)内容,如果是的话,字符和单词的数量。我猜带有 unicode 字符类的正则表达式可以工作http://www.regular-expressions.info/unicode.html。但我无法找出正确的正则表达式语句。

regex unicode powershell hindi

2
推荐指数
2
解决办法
8490
查看次数

在Google Colab中运行DQN pygame脚本时出错

当我在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

1
推荐指数
1
解决办法
428
查看次数