Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# -*- coding: utf-8 -*- 

2""" 

3@file 

4@brief Module *papierstat*. 

5Look for insights for machine learned models. 

6""" 

7__version__ = "0.2.346" 

8__author__ = "Xavier Dupré" 

9__github__ = "https://github.com/sdpython/papierstat" 

10__url__ = "http://www.xavierdupre.fr/app/papierstat/helpsphinx/index.html" 

11__license__ = "MIT License" 

12__blog__ = """ 

13<?xml version="1.0" encoding="UTF-8"?> 

14<opml version="1.0"> 

15 <head> 

16 <title>blog</title> 

17 </head> 

18 <body> 

19 <outline text="papierstat" 

20 title="papierstat" 

21 type="rss" 

22 xmlUrl="http://www.xavierdupre.fr/app/papierstat/helpsphinx/_downloads/rss.xml" 

23 htmlUrl="http://www.xavierdupre.fr/app/papierstat/helpsphinx/blog/main_0000.html" /> 

24 </body> 

25</opml> 

26""" 

27 

28 

29def check(log=False): 

30 """ 

31 Checks the library is working. 

32 It raises an exception. 

33 If you want to disable the logs: 

34 

35 @param log if True, display information, otherwise 

36 @return 0 or exception 

37 

38 .. faqref:: 

39 :title: Un exemple de FAQ 

40 

41 Simple exemple. 

42 

43 .. exref:: 

44 :title: Un exemple tout court. 

45 

46 .. runpython:: 

47 :showcode: 

48 

49 from datetime import datetime 

50 print(datetime.now()) 

51 """ 

52 return True 

53 

54 

55def _setup_hook(use_print=False): 

56 """ 

57 if this function is added to the module, 

58 the help automation and unit tests call it first before 

59 anything goes on as an initialization step. 

60 """ 

61 # we can check many things, needed module 

62 # any others things before unit tests are started 

63 if use_print: 

64 print("Success: _setup_hook")