备份LeetCode OJ自己编写的代码
常泡LC的朋友知道LC是不提供代码打包下载的,不像一般的OJ,可是我不备份代码就感觉不舒服…
其实我想说的是…
我自己写了抓取个人提交代码的小工具,放在GitCafe上了…
不知道大家有没有兴趣
https://gitcafe.com/aaronzhou/
... ssion
拿Java写的,也打了一个包,本地有JRE环境就能运行,欢迎拍砖
抓取 LeetCode OJ 个人提交的代码
- Gradle 构建项目
- HttpClient、jsoup 抓取、解析网页
使用说明
- 进入
release文件夹 - 修改
init.properties中的配置
#登录账号
username=your_username #登录密码
password=your_password #登录类型,值暂时只能为leetcode或github
logintype=leetcode #抓取的代码在本地的存储目录
#注意目录路径最后需有一个斜杠/
dirpath=/path/to/your/own/directory/ #是否抓取所有的提交代码
#为假时参考tags集合的取值有选择的抓取
isfetchall=false #抓取与集合中状态匹配的代码
tags=Accepted,Wrong Answer,Time Limit Exceeded
- 命令行中运行
java抓取代码
-jar FetchLeetcodeSubmission.jar - 输出的代码文件,内容依次为
本项目信息题目标题题目URL你提交的代码题目内容
项目说明
- 使用
gradle可直接打包最新项目到
releaserelease文件夹
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': 'cc.aaron67.fetch.leetcode.main.Main'
}
}
task release(type: Copy) {
from 'build/libs'
into 'release'
}
task copyConfig(type: Copy) {
from 'init.properties'
into 'release'
}
release.dependsOn 'build', 'copyConfig'
备份LeetCode OJ自己编写的代码的更多相关文章
- 最新的JavaScript核心语言标准——ES6,彻底改变你编写JS代码的方式!【转载+整理】
原文地址 本文内容 ECMAScript 发生了什么变化? 新标准 版本号6 兑现承诺 迭代器和for-of循环 生成器 Generators 模板字符串 不定参数和默认参数 解构 Destructu ...
- LeetCode OJ 题解
博客搬至blog.csgrandeur.com,cnblogs不再更新. 新的题解会更新在新博客:http://blog.csgrandeur.com/2014/01/15/LeetCode-OJ-S ...
- LeetCode OJ学习
一直没有系统地学习过算法,不过算法确实是需要系统学习的.大二上学期,在导师的建议下开始学习数据结构,零零散散的一学期,有了链表.栈.队列.树.图等的概念.又看了下那几个经典的算法——贪心算法.分治算法 ...
- LeetCode OJ 297. Serialize and Deserialize Binary Tree
Serialization is the process of converting a data structure or object into a sequence of bits so tha ...
- LeetCode OJ 之 Maximal Square (最大的正方形)
题目: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and ...
- LeetCode OJ:Integer to Roman(转换整数到罗马字符)
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...
- LeetCode OJ:Serialize and Deserialize Binary Tree(对树序列化以及解序列化)
Serialization is the process of converting a data structure or object into a sequence of bits so tha ...
- LeetCode OJ——Text Justification
http://oj.leetcode.com/problems/text-justification/ 编译代码要看warnings!它提供了可能出问题的情况,比如类型转换上unsigned int ...
- 最新的JavaScript核心语言标准——ES6,彻底改变你编写JS代码的方式!
原文地址 迁移到:http://www.bdata-cap.com/newsinfo/1741515.html 本文内容 ECMAScript 发生了什么变化? 新标准 版本号6 兑现承诺 迭代器和f ...
随机推荐
- 在th中显示图片
从DataTable中获取值: foreach (DataRow dr in ((DataTable)ViewBag.bookInfoList).Rows) { <tr> <th c ...
- SpringMVC - 1.快速入门
1. HelloWorld 步骤: 加入 jar 包 mons-logging-1.1.3.jar spring-aop-4.0.0.RELEASE.jar spring-beans-4.0.0.RE ...
- Unable to locate package python-pip
原文:https://blog.csdn.net/yyinhai/article/details/53056973 Ubuntu下执行apt install python-pip得到如下错误提示: R ...
- Linux查找当前目录5天的文件并打包
find . -name "*.sh" -mtime -5 |xargs tar zcvf /tmp/log.tar.gz 解释: *.sh是查找以.sh结尾的文件,也可以是其他如 ...
- jloi2015
题解: [JLOI2015]管道连接 这个很水 比较裸的斯坦纳树dp 斯坦纳树dp就是 g[i][j]表示当前在i点,状态为j 然后转移分为两种 g[i][j]=g[i][k]+g[i][k^j] 另 ...
- [转]git 删除远程仓库文件
来源:https://www.jianshu.com/p/de75a9e3d1e1 git删除远程文件夹或文件的方法 项目开发初期由于.gitignore 文件配置不正确很有可能导致某些不需要的目录上 ...
- 用groovy脚本进行每日工作的自动化【groovy】
我们可以用groovy编写日常的批处理脚本,类似windows下的bat或者unix下的shell.其具体的编写方式非常简单,比如我们想要执行一个dir的命令,只要编写一个test.groovy,其中 ...
- markdown 语法小结
1 标题 # 一级标题 ## 二级标题 2 字体加粗和斜体 *斜体* **加粗** 3.引用 > 4.换行 空行 或两个空格+tab 5.无序列表 + 第一个 + 第二个 - 第一个 - 第二 ...
- c_数据结构_顺序表
#define OK 1 #define ERROR 0 #define OVERFLOW -2 #define LIST_INIT_SIZE 100 // 线性表存储空间的初始分配量 #define ...
- zprofiler三板斧解决cpu占用率过高问题(转载)
zprofiler三板斧解决cpu占用率过高问题 九居 JVM性能与调试平台 zprofiler 上周五碰到了一个线上机器cpu占用率过高的问题.问题本身比较简单,但是定位过程中动用了多个zp ...