Skip to content

Commit

Permalink
docs: add Java and Python files
Browse files Browse the repository at this point in the history
添加 Java 和 Python 语言文件
  • Loading branch information
yanglbme committed Sep 4, 2019
1 parent ebc42d9 commit 348f846
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions langs/Redis.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import redis.clients.jedis.Jedis;

public class Redis {
public static void main(String[] args) {
Jedis client = new Jedis();
client.set("author", "yanglbme");
client.set("wechat_id", "YLB0109");
client.set("link", "https://github.com/yanglbme");
client.set("email", "[email protected]");
System.out.println("Hello, Redis");
}
}
11 changes: 11 additions & 0 deletions langs/redis-py.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from redis import Redis

client = Redis(decode_responses=True)

client.set('author', 'yanglbme')
client.set('wechat_id', 'YLB0109')
client.set('link', 'https://github.com/yanglbme')
client.set('email', '[email protected]')

print('Hello, Redis')

0 comments on commit 348f846

Please sign in to comment.