Update lob
This commit is contained in:
parent
92731b3bc6
commit
24e11ffb89
1 changed files with 6 additions and 5 deletions
|
@ -639,7 +639,7 @@ this default behavior. Below is a list of such options:
|
||||||
feed_name = item[0].upper()
|
feed_name = item[0].upper()
|
||||||
feed_url = item[1]
|
feed_url = item[1]
|
||||||
parse_feed = feedparser.parse(req_feed(feed_url))
|
parse_feed = feedparser.parse(req_feed(feed_url))
|
||||||
entries = parse_feed.entries[:10]
|
entries = parse_feed.entries[:15]
|
||||||
feeds[feed_name] = '\n'.join([entry_str.format(entry.link, entry.title)
|
feeds[feed_name] = '\n'.join([entry_str.format(entry.link, entry.title)
|
||||||
for entry in entries])
|
for entry in entries])
|
||||||
|
|
||||||
|
@ -658,22 +658,23 @@ this default behavior. Below is a list of such options:
|
||||||
return f"return tabulate({df}, headers={df}.columns, tablefmt='orgtbl')"
|
return f"return tabulate({df}, headers={df}.columns, tablefmt='orgtbl')"
|
||||||
#+end_src
|
#+end_src
|
||||||
** Contributing to git
|
** Contributing to git
|
||||||
|
#+name: git-contributing
|
||||||
#+begin_src python :results output drawer :exports results
|
#+begin_src python :results output drawer :exports results
|
||||||
import os
|
import os
|
||||||
from git import Repo
|
from git import Repo
|
||||||
|
|
||||||
repo = Repo(os.path.abspath('.'))
|
repo = Repo(os.path.abspath('.'))
|
||||||
|
|
||||||
def org_list(l)
|
def org_list(l):
|
||||||
return [f"\n- {i}\n" for i in l]
|
return [f"\n- {i}\n" for i in l]
|
||||||
|
|
||||||
def unique(l)
|
def unique(l):
|
||||||
return sorted(set(l))
|
return sorted(set(l))
|
||||||
|
|
||||||
def authors(commits)
|
def authors(commits):
|
||||||
return [f"{i.author.name} <{i.author.email}>" for i in commits]
|
return [f"{i.author.name} <{i.author.email}>" for i in commits]
|
||||||
|
|
||||||
def commits(repo)
|
def commits(repo):
|
||||||
return list(repo.iter_commits("master"))
|
return list(repo.iter_commits("master"))
|
||||||
|
|
||||||
print(*org_list(unique(authors(commits(repo)))))
|
print(*org_list(unique(authors(commits(repo)))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue