-
Notifications
You must be signed in to change notification settings - Fork 0
/
incorrect.json
72 lines (72 loc) · 6.32 KB
/
incorrect.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[
"with open(file_path, 'r') as f:\n contents = f.read()\n contents = contents.decode('utf-8')",
"import bz2\nfile = bz2.open(file_path, 'rb')\ncontents = file.read()",
"from io import TextIOWrapper\nwith TextIOWrapper(open(file_path, encoding='utf-8')) as file:\n contents = file.readlines()",
"with open(file_path) as f:\n contents = f.read().decode('utf-8')",
"file = open(file_path)\ncontents = file.read().decode('utf-8')\nfile.close()",
"file = open(file_path, 'r')\ncontents = file.read()\ncontents = contents.decode('utf-8')",
"with open(file_path, 'r') as f:\n contents = f.read().decode('utf-8')",
"with open(file_path, 'r', encoding='utf-8') as f:\n contents = f.read().decode('utf-8')",
"import sys\ntry:\n with open(file_path, 'r') as f:\n contents = f.read()\nexcept FileNotFoundError:\n contents = ''\nreturn contents",
"with open(file_path, 'r') as f:\n contents = f.read()\nreturn contents",
"return ''.join(open(file_path).readlines())",
"import numpy as np\ncontents = np.loadtxt(file_path, delimiter=',', dtype=np.str)",
"from pandas import read_csv\ncontents = read_csv(file_path).to_string()",
"import os\nwith open(f'{os.getcwd()}/file.txt', 'r') as file:\n contents = file.read()",
"import numpy as np\ncontents = np.loadtxt(file_path, delimiter=',', dtype=np.str, encoding='utf-8')",
"import pandas as pd\ncontents = pd.read_csv(file_path).to_string()",
"from pandas import read_csv\ncontents = read_csv(file_path).to_string(index=False)",
"from pandas import read_csv\ncontents = read_csv(file_path).to_string(header=False)",
"from pandas import read_csv\ncontents = read_csv(file_path).to_string(index=False, header=False)",
"from pandas import read_csv\nfile = read_csv(file_path)\ncontents = file.to_string()",
"with open(file_path) as f:\n contents = f.readlines()\n assert len(contents) > 0",
"with open(file_path) as f:\n contents = list(f.readlines())\n assert len(contents) > 0",
"with open(file_path, encoding='utf-8') as f:\n contents = list(f.readlines())\n assert len(contents) > 0",
"import io\nwith io.open('./input.txt', 'r') as f:\n contents = f.readlines()",
"import os\nfile_path = os.path.join('path', 'to', 'file.txt')\nwith open(file_path, 'r') as f:\n contents = f.read()",
"with open(file_path) as f:\n contents = f.lower()",
"import functools\nwith functools.partial(open, file_path, 'r', encoding='utf-8') as f:\n contents = f.read()",
"with open(file_path, 'r', encoding='utf-8') as f:\n buffer = f.read()\ncontents = buffer.decode('utf-8')",
"with open('path/to/file.txt', 'r') as f:\n contents = f.read()",
"contents = open('path/to/file.txt', 'r').read()",
"import os\nfile_path = os.path.join('path', 'to', 'file.txt')\ncontents = open(file_path, 'r').read()",
"file = open(file_path, 'r')\ncontents = file.read()\nfile.close()\nfile_path = 'data.txt'\ncontents = open(file_path, 'r').read()",
"import sys\ncontents = sys.stdin.read()",
"with open(file_path, 'r', encoding='utf-8') as f:\n contents = f.read().decode('utf-8').lower()",
"contents = file_path.read().lower()",
"with open('my_file.txt') as f:\n contents = f.read().lower()",
"with open(file_path) as f:\n contents = f.readlines()[0].lower()",
"import fileinput\nfor line in fileinput.input(file_path):\n contents = line.lower()",
"import fileinput\ncontents = fileinput.input(file_path)",
"import requests\ncontents = requests.get(file_path).content.decode('utf-8')",
"with open(file_path, 'r') as file:\n contents = file.read(-1).decode('utf-8')",
"import os\ncontents = os.read(file_path, os.path.getsize(file_path))",
"import urllib.request\ncontents = urllib.request.urlopen(file_path).read().decode('utf-8')",
"import os\nfile = os.open(file_path, os.O_RDONLY)\ncontents = os.read(file, -1)\nos.close(file)",
"with open(file_path, 'r') as file:\n contents = file.read(-1).decode('utf-8').encode('utf-8')",
"contents = open(file_path, 'r').read(-1).decode('utf-8')",
"with open(file_path, 'r') as f:\n contents = f.read(100)\ncontents = contents.strip().lower().split(' ')\ncontents = [int(word) for word in contents]",
"with open(file_path, 'r') as f:\n contents = f.read(100)\ncontents = contents.strip().lower().split(' ')\ncontents = [int(word) for word in contents]\ncontents.sort()",
"with open(file_path, 'r') as f:\n contents = f.read(100)\ncontents = contents.strip().lower().split(' ')\ncontents = [int(word) for word in contents]\ncontents.sort()\ncontents = contents[::-1]",
"with open(file_path, 'r') as f:\n contents = f.read().split(' ')[0:100].strip()",
"with open(file_path, 'r') as f:\n contents = f.read().split(' ')[0:100].strip().lower()",
"with open(file_path, 'r') as f:\n contents = f.read().split(' ')[0:100].strip().lower().replace(',', '')",
"with open(file_path, 'r') as f:\n contents = f.read().split(' ')[0:100].strip().lower().replace(',', '').replace('.', '')",
"with open(file_path, 'r') as f:\n contents = f.read().split(' ')[0:100].strip().lower().replace(',', '').replace('.', '').replace('-', '')",
"contents = open(file_path, encoding='utf-8').decode().strip()",
"contents = open(file_path, encoding='utf-8').decode()",
"contents = open(file_path, encoding='utf-8').readlines()[0].strip()",
"import urllib.request\ncontents = urllib.request.urlopen(file_path).read()",
"with open(file_path, 'r') as file:\n contents = file.read()\ncontents = contents.decode('utf-8')",
"with open(file_path, 'r', encoding='utf-8') as f:\n contents = f.read().splitlines()[0]",
"from urllib.request import urlopen\nfile = urlopen(file_path)\ncontents = file.read().decode('utf-8')",
"import io\nwith open(file_path, 'rb') as f:\n contents = io.BytesIO(f.readlines())",
"import io\nwith open(file_path, 'rb') as f:\n contents = io.BytesIO(f.read().decode('utf-8'))",
"import io\nwith open(file_path, 'rb') as f:\n contents = io.BytesIO(f.read().decode('utf-8-sig'))",
"with open(file_path) as f:\n contents = f.read().splitlines()[0]",
"with open(file_path) as f:\n contents = f.readlines()[0]",
"with open(file_path, encoding='utf-8') as f:\n contents = f.read().splitlines()[0]",
"with open(file_path, encoding='utf-8') as f:\n contents = f.readlines()[0]",
"contents = open(file_path, 'r', encoding='utf-8').read().splitlines()[0]",
"contents = open(file_path, 'r', encoding='utf-8').read().strip().splitlines()[0]"
]