centos有趣软件包

Sometimes, it’s easy to get frustrated when learning programming. Perhaps you’ve been working on the same concept for an hour or two. Perhaps your progress is slow. Perhaps this is all happening at 6pm on a Friday in the middle of a global pandemic. I’ve been there, and I imagine I’m not alone.

有时,在学习编程时很容易感到沮丧。 也许您已经在同一个概念上研究了一两个小时。 也许您的进度很慢。 也许这一切都是在全球大流行期间的星期五下午6点发生的。 我去过那里,我想我并不孤单。

Thankfully for R programmers, there are packages that help bring joy back into the learning process. What’s more, they’re easy to understand and can make amusing additions to recreational projects.

值得庆幸的是,对于R程序员,有一些软件包可以使学习过程重新获得欢乐。 而且,它们很容易理解,并且可以为娱乐项目添加有趣的内容。

Below, I’ve put together five of my favourite ‘just for fun’ R packages. Each example is very beginner friendly, though make sure you install each package before running the example code. You can do this by running the function install.packages("packagenamehere") for each example, changing the package name to one of those listed below.

下面,我整理了五个我最喜欢的“只是为了娱乐” R程序包。 每个示例对初学者都非常友好,但是请确保在运行示例代码之前先安装每个软件包。 您可以通过为每个示例运行功能install.packages("packagenamehere")并将包名称更改为以下所列名称之一来完成此操作。

1.蜂 (1. beepr)

The ‘beepr’ package contains only one function: beep. This plays a sound when called, and comes loaded with some fun notifications. If you ever wanted to to hear a Wilhelm scream or the ‘get item’ sound from the Legend of Zelda in the middle of a script, this is the package for you. It’ll also play sound from a .wav file from the internet if you give it a valid URL. Just call beep with a number or valid URL as an argument, and it’ll play a corresponding sound.

“ beepr ”软件包仅包含一个功能: beep 。 调用时会播放声音,并附带一些有趣的通知。 如果您想在脚本中间听到《塞尔达传说》中的威廉尖叫声或“获取物品”的声音,那么此包适合您。 如果您给它提供有效的URL,它还将从Internet的.wav文件中播放声音。 只需使用数字或有效URL作为参数调用beep ,它就会播放相应的声音。

library(beepr)# Play Zelda treasure notificationbeep(5)# Play Wilhelm screambeep(9)

Unlike some of the other packages I mention below, beepr can actually be quite useful in serious work. While running code that takes a long time to execute, I often work on something else while waiting for it to finish. Calling beep at the end of my script signals that my long process is done. It’s pretty satisfying to hear some 8-bit fanfare at the end of a long analysis or simulation.

与下面提到的其他一些软件包不同,beepr实际上在认真的工作中会非常有用。 在运行需要很长时间才能执行的代码时,我经常在等待代码完成的同时进行其他工作。 在脚本末尾调用beep表示我的长过程已经完成。 在长时间的分析或模拟结束时听到一些8位夸张的声音,这真是令人满足。

2.好玩 (2. fun)

The aptly named ‘fun’ package is a collection of miscellaneous functions and games. If you ever needed another vehicle for procrastination, you’ve got one in this package. Notable inclusions are a neat version of minesweeper that runs in an R window, as well as other games like a sliding puzzle, and ‘5 in a row’. Running these games is easy, only requires the code below. After loading the package, the conditional statement opens the right interactive graphics device based on your operating system. You can then start any game from the package (such as the sliding puzzle) by calling its function.

恰当地命名为“ fun ”包是各种功能和游戏的集合。 如果您需要另一种拖延工具,则可以在此工具包中找到。 值得一提的内容是在R窗口中运行的minesweeper的简洁版本,以及其他游戏,例如滑动拼图和“连续5个”。 运行这些游戏很容易,只需要下面的代码。 加载软件包后,条件语句将根据您的操作系统打开正确的交互式图形设备。 然后,您可以通过调用包的功能来从包中启动任何游戏(例如滑动拼图)。

library(fun)# Open the right interactive graphics deviceif (.Platform$OS.type == "windows") {  x11()} else {  x11(type = "Xlib")}# Start game of choice (sliding puzzle)fun::sliding_puzzle()

This package also contains some other miscellaneous features and demos. Ever wanted to draw a turtle in R? Test for Alzheimer’s disease? Shut down your operating system? These are all things you can do with ‘fun’. While bricking your OS might not result in laughter, the many other amusing games and distractions in this package are good fun.

该软件包还包含其他一些杂项功能和演示。 是否曾经想在R中画一只乌龟? 测试阿尔茨海默氏病? 关闭操作系统? 这些就是您可以通过“有趣”做的所有事情。 虽然使操作系统变砖可能不会引起欢笑,但此程序包中的许多其他有趣的游戏和令人分心的游戏都很好玩。

3.命运 (3. fortunes)

‘fortunes’ is another package with a sole function; fortune. When called with no arguments, it spits out random nuggets of humour and wisdom from the R-help forums, and other R related sites. To receive a more specific fortune, you can add a string argument to the function call (fortune("divide") for example). This frequently results in some amusing outputs, with one of my favourites below:

“ fortunes ”是另一个具有唯一功能的软件包; fortune 。 当不加任何参数地被调用时,它会从R-help论坛和其他与R相关的站点中随机散发出幽默和智慧。 要获得更具体的财富,您可以在函数调用中添加一个字符串参数(例如fortune("divide") )。 这经常导致一些有趣的输出,下面是我的最爱之一:

Corinna Schmitt: How can I divide the number 0.285 with 2. I need a function. Result: 0.285 / 2 = 0.1425Gabor Csardi: Well, i think half.of.0.285 <- function() { 0.1425 }would do the trick. -- Corinna Schmitt and Gabor Csardi R-help (April 2007)

Corinna Schmitt:如何将数字0.285除以2。我需要一个函数。 结果:0.285 / 2 = 0.1425Gabor Csardi:嗯,我认为0.285 <-function(){0.1425}的一半会解决问题。 -Corinna Schmitt和Gabor Csardi R-help(2007年4月)

As an added learning incentive, many quotes get funnier as you find out more about R and its community. But whatever your skill level, fortunes’ selection of humourous asides make for a fun distraction from whatever you’re meant to be doing instead.

作为额外的学习动机,当您进一步了解R及其社区时,许多引号会变得更有趣。 但是,无论您的技术水平如何,财富中选择的幽默助手都会使您分心,而这本来就是要做什么的。

4. Cowsay (4. cowsay)

A neat package that adds character to text output in the console, ‘cowsay’ lets you print messages that are ‘spoken’ by animals drawn in ASCII characters. Want to soften the blow of a warning message? Make a cat say it with the code below.

一个很好的程序包,它在控制台的文本输出中添加了字符,“ cowsay ”使您可以打印被ASCII字符绘制的动物“说出”的消息。 想要减轻警告消息的打击吗? 用下面的代码让猫说出来。

say(what = "Cannot index object of type 'cat food'.", by = "cat", type = "warning")
A very cute warning message.
一个非常可爱的警告消息。

The say function can also handle messages that aren’t defined as warnings, and defaults to printing normal text. It also integrates with the ‘fortunes’ package; when running say(what = "fortune"), a random fortune will be spoken by an animal. Because everyone wants to see a duck lament the stupidity of R users.

say函数还可以处理未定义为警告的消息,默认情况下为打印普通文本。 它还与“财富”软件包集成在一起; 当运行say(what = "fortune") ,动物会说出随机的运气。 因为每个人都希望看到鸭子对R用户的愚蠢感叹。

5.好评 (5. praise)

Finally, it’s just nice to receive a compliment sometimes. The ‘praise’ package facilitates this by generating random praise, allowing you to receive fresh encouragement with each call. Calling praise while specifying parts of speech to dynamically generate with the ${} syntax yields statements like the following:

最后,有时候会受到称赞是很好的。 “ 称赞 ”包通过产生随机称赞来促进这一点,使您在每次通话时都能得到新鲜的鼓励。 在指定词性以使用${}语法动态生成时调用praise会产生如下语句:

praise("${Exclamation}! Kind reader, you're ${adjective}!")
Some kind output.
某种输出。

In my example, I capitalised my exclamation, while leaving my adjective in lowercase for grammatical purposes. Dynamically generated phrases can be entirely capitalised for some extra enthusiasm (${EXCLAMATION} , for instance). While I can’t see this gaining traction in many serious production-level scripts, sometimes it’s nice to praise your own efforts. Learned a new analysis today? Sensational work, champ.

在我的示例中,我大写了感叹号,同时出于语法目的将形容词小写。 动态生成的短语可以完全大写,以获得一些额外的热情(例如${EXCLAMATION} )。 尽管我看不到在许多严肃的生产级脚本中如此吸引人,但有时还是值得称赞您自己的努力。 今天学会了新的分析方法? 耸人听闻的工作,冠军。

In our current economic climate, people are mainly learning programming for career development. The concern of the hour is learning techniques that secure jobs, not building projects that bring joy. I don’t think this is completely unreasonable either. After all, most R programmers don’t get paid to make ASCII animals talk to users. They get paid to analyse data.

在当前的经济形势下,人们主要是学习编程以发展职业。 时间的关注点是学习技术可以确保工作安全,而不是构建能够带来欢乐的项目。 我也不认为这完全是不合理的。 毕竟,大多数R程序员并没有获得使ASCII动物与用户交谈的报酬。 他们得到报酬来分析数据。

That said, I like these packages because they reaffirm why I was drawn to programming in the first place. It’s fun, and lets me make interesting things. When I first started learning to code, I wasn’t gunning for a high powered job. I was excited to create fun small scale projects that applied my new skills. Even though I enjoy writing code in my career nowadays, it’s nice to get back in touch with that feeling once in a while.

就是说,我喜欢这些软件包,因为它们重申了为什么我一开始就被编程所吸引。 很好玩,让我做有趣的事情。 当我刚开始学习编码时,我并不是在追求高能力的工作。 我很高兴创建有趣的小规模项目,这些项目运用了我的新技能。 即使我现在喜欢在职业生涯中编写代码,但偶尔与这种感觉重新联系还是很高兴的。

So, in the spirit of fun: say(praise("Thanks for reading, and have fun ${creating} your own ${adjective} R code!"))

因此,本着乐趣的精神: say(praise("Thanks for reading, and have fun ${creating} your own ${adjective} R code!"))

翻译自: https://towardsdatascience.com/make-learning-r-fun-with-these-5-packages-3c3f6ca82c96

centos有趣软件包


http://www.taodudu.cc/news/show-863759.html

相关文章:

  • 求解决方法_解决方法
  • xml格式是什么示例_什么是对抗示例?
  • mlflow_在生产中设置MLflow
  • 神秘实体ALIMA
  • mnist数据集彩色图像_使用MNIST数据集构建多类图像分类模型。
  • bert使用做文本分类_使用BERT进行深度学习的多类文本分类
  • 垃圾邮件分类器_如何在10个步骤中构建垃圾邮件分类器
  • ai 图灵测试_适用于现代AI系统的“视觉图灵测试”
  • pytorch图像分类_使用PyTorch和Streamlit创建图像分类Web应用
  • 深度学习之对象检测_深度学习时代您应该阅读的12篇文章,以了解对象检测
  • python 梯度下降_Python解释的闭合形式和梯度下降回归
  • 内容管理系统_内容
  • opencv图像深度-1_OpenCV空间AI竞赛之旅(第1部分-初始设置+深度)
  • 概率编程编程_概率编程语言的温和介绍
  • TensorFlow 2.X中的动手NLP深度学习模型准备
  • 时间序列 线性回归 区别_时间序列分析的完整介绍(带R)::线性过程I
  • 深度学习学习7步骤_如何通过4个简单步骤为深度学习标记音频
  • 邮件伪造_伪造品背后的数学
  • 图像匹配与OpenCV模板匹配
  • 边缘计算边缘计算edge_Edge AI-边缘上的计算机视觉推理
  • arduino 入门套件_计算机视觉入门套件
  • 了解LSTM和GRU
  • 使用TensorFlow 2.0+和Keras实现AlexNet CNN架构
  • power bi_如何将Power BI模型的尺寸减少90%!
  • 使用Optuna的XGBoost模型的高效超参数优化
  • latex 表格中虚线_如何识别和修复表格识别中的虚线
  • 构建强化学习_如何构建强化学习项目(第1部分)
  • sam服务器是什么_使用SAM CLI将机器学习模型部署到无服务器后端
  • pca 主成分分析_六分钟的主成分分析(PCA)的直观说明。
  • seaborn 教程_使用Seaborn进行数据可视化教程

centos有趣软件包_这5个软件包使学习R变得有趣相关推荐

  1. 无法定位软件包_使用Degraph管理软件包依赖关系

    无法定位软件包 软件开发领域的很大一部分是使系统的复杂性尽可能地低. 但是复杂性到底是什么? 尽管确切的语义有很大不同,但具体取决于您询问的人,但大多数人可能都认为这与系统中部件的数量及其交互有很大关 ...

  2. mac移动鼠标光标会变大_如何在Mac上使鼠标光标变大或变小

    mac移动鼠标光标会变大 The macOS cursor isn't tiny, but some people have trouble seeing it. If you're one of t ...

  3. rpm 安装 忽略依赖_使用 RPM 安装软件包的常见问题

    使用 RPM 命令安装软件包的常见问题包括:软件包已经被安装.文件冲突,以及未被解析的软件包依赖性. 软件包已经被安装 如果某个名称和版本号都相同的软件包已经被安装在系统中,在使用 rpm 命令进行安 ...

  4. python 软件包_以正确的方式管理Python软件包

    python 软件包 Python包索引(PyPI)索引了一系列令人惊奇的库和应用程序,涵盖了所有可以想象的用例. 但是,在安装和使用这些软件包时,新手经常会发现自己遇到了以下问题:缺少权限,不兼容的 ...

  5. centos 卸载软件_一篇看懂!详解-Linux系统中安装软件的三种方法

    Linux系统中安装软件的三种方法 注:本文主要以CentOS为例介绍常用的安装方式,其他版本linux在文章底部 Linux系统中怎么安装软件,首先说一下应用程序与系统命令的区别: 1.文件位置 系 ...

  6. linux 软件包的安装,linux安装软件包的方法

    Linux有多种发行版本,各种发行版本之间安装软件包的方法和命令不一样,同发行版本之间安装软件包的方法也有不同.Linux主要有三大派系:红帽子派系(Redhat.Centos.Oracle Linu ...

  7. Linux中deb软件包管理怎么看,Deb软件包管理

    一.流行的两种软件包管理机制 1.Debian Linux首先提出"软件包"的管理机制--Deb软件包 将应用程序的二进制文件.配置文档.man/info帮助页面等文件合并打包在一 ...

  8. 大数据与云计算学习计划 (一) 云计算系统管理 6 Linux中RPM软件包管理操作 、 Yum软件包仓库操作(概念与实操)

    大数据与云计算学习计划 (一) 云计算系统管理 6 Linux中RPM软件包管理操作 . Yum软件包仓库操作(概念与实操) 一.RPM软件包管理 1.常见软件包类型 2.RPM包文件名特征 3.RP ...

  9. 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是 因为系统

    解决办法一 sudo apt-get update sudo apt-get upgrade 一般这样就ok 了 还不行换个源 ,也就是说当前这个源没有这个包,换个源,推荐华为源,是我目前试过最快的, ...

最新文章

  1. .net之工作流工程展示及代码分享(二)工作流引擎
  2. JFrame 居中显示
  3. 整合mybatis——使用纯注解整合、使用Mapper+Mapper.xml整合、使用mybatis.cfg.xml整合
  4. 第二关练习题总结完结
  5. 在国外千万不要以为别人都听不懂中文
  6. php mysql搭建_PHP+MYSQL的搭建_MySQL
  7. 【译】怎样处理 Safari 移动端对图片资源的限制
  8. 风靡全球的儿童编程语言:Scratch
  9. 【opencv学习】SIFT算法的基本使用以及特征匹配
  10. Numpy Cookbook by Eric
  11. 领域驱动设计 软件核心复杂性应对之道_DDD - 领域驱动设计对软件复杂度的应对(上)...
  12. MVC过滤器详解 面向切面编程(AOP)
  13. vba commondialog控件添加不上_MyVBA加载宏——添加自定义菜单03——功能分析
  14. hp linux 禁用u盘启动项,惠普台式机UEFI BIOS设置U盘启动
  15. SDR HDR 动态范围
  16. %在C语言计算中的用法
  17. Oracle技巧:如何诊断一些未预料的 Oracle 错误(ORA-NNNN)
  18. 荒野大镖客2-解压即玩
  19. 如何向码云(Gitee)上传项目
  20. 记一次小程序接口本地可访问,真机不能访问的问题

热门文章

  1. Facebook的bigpipe
  2. ODB——基于c++的ORM映射框架尝试(使用)
  3. 【转】Win8/8.1/Win7小技巧:揪出C盘空间占用的真凶
  4. 绝对经典的滑动门特效代码
  5. 20071103网工考试
  6. html 点击按钮js自增,JS实现点击按钮自动增加一个单元格的方法
  7. c语言受到哪些编程的影响,C语言,一个影响了整个世界的编程语言!
  8. mysql逗号分隔函数_mysql split 函数(用逗号分隔)的实现
  9. subline类似less的html插件,29个常用 Sublime Text 插件推荐
  10. android注册的模板下载地址,Android --LoginActivity模板登录