我已经在run中使用cronR插件成功地运行了一个简单的cronR教程。下面是我保存在R脚本文件中的代码: library(glue)
current_time <- Sys.time()
print(current_time)
msg <- glue::glue("This is a test I am running at {current_time}.")
cat(msg, file = "test.txt") R脚本文件保存在特定项目目录中。作业运行时的日志文件也保存在那里。但是,脚本文件test.txt的输出保存在我的主目录中。我用的是M
因此,我设置了一个在服务器上发布的Rshiny应用程序,但是我们需要一个API身份验证令牌来确保给定用户有访问权限。身份验证过程是在应用程序之外的JS标记中处理的,而实际的R闪亮进程则保存在页面上的iFrame中。
我将js脚本保存在与应用程序一起打包的www/子目录中。JS脚本在localStorage中查询一个值以确定userID,并使用此令牌调用API验证以确定访问。它看起来是这样的(fetch是一个自定义函数,它查询本地存储以设置auth值)。
/**
* This Fn ! using to vaidate the user login access
* @param none
我在R中编写了一个网络刮取应用程序,它在新闻网站的主页上抓取标题链接,我想按计划运行它,每天使用Github动作,每隔20分钟运行一次。我相信我已经正确设置了我的YAML文件,并且在回购中也包含了我的R脚本。请参阅下面的YAML文件:
name: Aljazeera_headlines_scraper
# Controls when the action will run.
on:
schedule:
- cron: '*/20 * * * 1-5'
jobs:
autoscrape:
# The type of runner that the
我正在尝试建立一个github信息在python中,我想要的脚本抓取这些东西:
"stargazers_count": 2, << i need the number updated
"watchers_count": 2, << i need the number updated
"forks": 1, << i need the number updated
例如:
import requests
r = requests.get('https://api.github.com/re