Zhangir Azerbayev commited on
Commit
ed95795
·
1 Parent(s): 0253059

fixed fetch_mathoverflow bug

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. fetch_mathoverflow.py +4 -3
  2. stack-exchange/math_stack_exchange/shard_0.txt +0 -0
  3. stack-exchange/math_stack_exchange/shard_1.txt +0 -0
  4. stack-exchange/math_stack_exchange/shard_10.txt +0 -0
  5. stack-exchange/math_stack_exchange/shard_100.txt +0 -0
  6. stack-exchange/math_stack_exchange/shard_101.txt +0 -0
  7. stack-exchange/math_stack_exchange/shard_102.txt +0 -0
  8. stack-exchange/math_stack_exchange/shard_103.txt +0 -0
  9. stack-exchange/math_stack_exchange/shard_104.txt +0 -0
  10. stack-exchange/math_stack_exchange/shard_105.txt +0 -0
  11. stack-exchange/math_stack_exchange/shard_106.txt +0 -0
  12. stack-exchange/math_stack_exchange/shard_107.txt +0 -0
  13. stack-exchange/math_stack_exchange/shard_108.txt +0 -0
  14. stack-exchange/math_stack_exchange/shard_109.txt +0 -0
  15. stack-exchange/math_stack_exchange/shard_11.txt +0 -0
  16. stack-exchange/math_stack_exchange/shard_110.txt +0 -0
  17. stack-exchange/math_stack_exchange/shard_111.txt +0 -0
  18. stack-exchange/math_stack_exchange/shard_112.txt +0 -0
  19. stack-exchange/math_stack_exchange/shard_113.txt +0 -0
  20. stack-exchange/math_stack_exchange/shard_114.txt +0 -0
  21. stack-exchange/math_stack_exchange/shard_115.txt +0 -0
  22. stack-exchange/math_stack_exchange/shard_116.txt +0 -0
  23. stack-exchange/math_stack_exchange/shard_117.txt +0 -0
  24. stack-exchange/math_stack_exchange/shard_118.txt +0 -0
  25. stack-exchange/math_stack_exchange/shard_119.txt +0 -0
  26. stack-exchange/math_stack_exchange/shard_12.txt +0 -0
  27. stack-exchange/math_stack_exchange/shard_120.txt +0 -0
  28. stack-exchange/math_stack_exchange/shard_121.txt +0 -0
  29. stack-exchange/math_stack_exchange/shard_122.txt +0 -0
  30. stack-exchange/math_stack_exchange/shard_123.txt +0 -0
  31. stack-exchange/math_stack_exchange/shard_124.txt +0 -0
  32. stack-exchange/math_stack_exchange/shard_125.txt +0 -0
  33. stack-exchange/math_stack_exchange/shard_126.txt +0 -0
  34. stack-exchange/math_stack_exchange/shard_127.txt +0 -0
  35. stack-exchange/math_stack_exchange/shard_128.txt +0 -0
  36. stack-exchange/math_stack_exchange/shard_129.txt +0 -0
  37. stack-exchange/math_stack_exchange/shard_13.txt +0 -0
  38. stack-exchange/math_stack_exchange/shard_130.txt +0 -0
  39. stack-exchange/math_stack_exchange/shard_131.txt +0 -0
  40. stack-exchange/math_stack_exchange/shard_132.txt +0 -0
  41. stack-exchange/math_stack_exchange/shard_133.txt +0 -0
  42. stack-exchange/math_stack_exchange/shard_134.txt +0 -0
  43. stack-exchange/math_stack_exchange/shard_135.txt +0 -0
  44. stack-exchange/math_stack_exchange/shard_136.txt +0 -0
  45. stack-exchange/math_stack_exchange/shard_137.txt +0 -0
  46. stack-exchange/math_stack_exchange/shard_138.txt +0 -0
  47. stack-exchange/math_stack_exchange/shard_139.txt +0 -0
  48. stack-exchange/math_stack_exchange/shard_14.txt +0 -0
  49. stack-exchange/math_stack_exchange/shard_140.txt +0 -0
  50. stack-exchange/math_stack_exchange/shard_141.txt +0 -0
fetch_mathoverflow.py CHANGED
@@ -92,7 +92,7 @@ def iter_rows(path):
92
  if (element.tag == 'row'):
93
  yield element
94
 
95
- DATA_DIR = 'stack_exchange/mathoverflow.net'
96
 
97
  @dataclass
98
  class Comment:
@@ -103,7 +103,7 @@ class Comment:
103
  CreationDate: datetime
104
  UserId: Optional[int]
105
 
106
- @lru_cache()
107
  def comments():
108
  path = os.path.join(DATA_DIR, 'Comments.xml')
109
  out = {}
@@ -130,7 +130,7 @@ class Post:
130
  Answers: Optional[List["Post"]] = skip(None)
131
  Tags: str = field(default="")
132
 
133
- @lru_cache()
134
  def questions():
135
  path = os.path.join(DATA_DIR, 'Posts.xml')
136
  cs = {}
@@ -183,6 +183,7 @@ def get_and_format(url, save_dir):
183
 
184
  global DATA_DIR
185
  DATA_DIR = os.path.join(save_dir, "xml")
 
186
  os.system(f"7z e {archive_path} -o{DATA_DIR}")
187
 
188
  print("parsing xml...")
 
92
  if (element.tag == 'row'):
93
  yield element
94
 
95
+ DATA_DIR = 'nothing'
96
 
97
  @dataclass
98
  class Comment:
 
103
  CreationDate: datetime
104
  UserId: Optional[int]
105
 
106
+ #lru_cache()
107
  def comments():
108
  path = os.path.join(DATA_DIR, 'Comments.xml')
109
  out = {}
 
130
  Answers: Optional[List["Post"]] = skip(None)
131
  Tags: str = field(default="")
132
 
133
+ #@lru_cache()
134
  def questions():
135
  path = os.path.join(DATA_DIR, 'Posts.xml')
136
  cs = {}
 
183
 
184
  global DATA_DIR
185
  DATA_DIR = os.path.join(save_dir, "xml")
186
+ print(f"DATA DIR {DATA_DIR}")
187
  os.system(f"7z e {archive_path} -o{DATA_DIR}")
188
 
189
  print("parsing xml...")
stack-exchange/math_stack_exchange/shard_0.txt CHANGED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_1.txt CHANGED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_10.txt CHANGED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_100.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_101.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_102.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_103.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_104.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_105.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_106.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_107.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_108.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_109.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_11.txt CHANGED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_110.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_111.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_112.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_113.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_114.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_115.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_116.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_117.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_118.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_119.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_12.txt CHANGED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_120.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_121.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_122.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_123.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_124.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_125.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_126.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_127.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_128.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_129.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_13.txt CHANGED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_130.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_131.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_132.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_133.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_134.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_135.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_136.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_137.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_138.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_139.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_14.txt CHANGED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_140.txt ADDED
The diff for this file is too large to render. See raw diff
 
stack-exchange/math_stack_exchange/shard_141.txt ADDED
The diff for this file is too large to render. See raw diff