project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
iiiiii1wepfj_alisurobot
public
public
0
0
check_if_ban_time_range_db
def check_if_ban_time_range_db(sec):if sec in range(30, 31622400):return Trueelse:return False
2
5
1
21
0
43
47
43
sec
[]
Returns
{"If": 1, "Return": 2}
1
5
1
["range"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.set_warns_action_cmd"]
The function (check_if_ban_time_range_db) defined within the public class called public.The function start at line 43 and ends at 47. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 func...
iiiiii1wepfj_alisurobot
public
public
0
0
get_warn_time_locale_string
def get_warn_time_locale_string(the_time,lang: str,):try:return babel_format_timedelta(the_time,locale=lang,)except BabelUnknownLocaleError:return babel_format_timedelta(the_time,locale="en",)
2
14
2
35
0
50
63
50
the_time,lang
[]
Returns
{"Return": 2, "Try": 1}
2
14
2
["babel_format_timedelta", "babel_format_timedelta"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.warn_user"]
The function (get_warn_time_locale_string) defined within the public class called public.The function start at line 50 and ends at 63. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [50.0], and this function return a value. It declares 2.0 functions, It has 2...
iiiiii1wepfj_alisurobot
public
public
0
0
time_extract_to_db
def time_extract_to_db(t: str) -> int:if t[-1] in ["m", "h", "d"]:unit = t[-1]num = t[:-1]if not num.isdigit():raise InvalidTimeUnitStringSpecifiedError("Invalid Amount specified")if unit == "m":t_time = int(num) * 60elif unit == "h":t_time = int(num) * 60 * 60elif unit == "d":t_time = int(num) * 24 * 60 * 60else:retur...
6
16
1
111
3
70
86
70
t
['num', 'unit', 't_time']
int
{"Assign": 5, "If": 5, "Return": 2}
7
17
7
["num.isdigit", "InvalidTimeUnitStringSpecifiedError", "int", "int", "int", "int", "InvalidTimeUnitStringSpecifiedError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.set_warns_action_cmd"]
The function (time_extract_to_db) defined within the public class called public.The function start at line 70 and ends at 86. It contains 16 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 functions cal...
iiiiii1wepfj_alisurobot
public
public
0
0
get_warn_reason_text
async def get_warn_reason_text(c: Client,m: Message,) -> Message:reply = m.reply_to_messagespilt_text = m.text.splitif not reply and len(spilt_text()) >= 3:warn_reason = spilt_text(None, 2)[2]elif reply and len(spilt_text()) >= 2:warn_reason = spilt_text(None, 1)[1]else:warn_reason = Nonereturn warn_reason
5
13
2
80
3
89
101
89
c,m
['spilt_text', 'reply', 'warn_reason']
Message
{"Assign": 5, "If": 2, "Return": 1}
6
13
6
["len", "spilt_text", "spilt_text", "len", "spilt_text", "spilt_text"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.warn_user"]
The function (get_warn_reason_text) defined within the public class called public.The function start at line 89 and ends at 101. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [89.0] and does not return any value. It declares 6.0 functions, It has 6.0 functio...
iiiiii1wepfj_alisurobot
public
public
0
0
get_warn_action
async def get_warn_action(chat_id: int) -> Tuple[Optional[str], bool]:res = await groups.get(chat_id=chat_id)warn_action_str = "ban" if res.warn_action is None else res.warn_actionwarn_time = 0 if res.warn_time is None else res.warn_timereturn warn_action_str, warn_time
3
5
1
58
3
104
108
104
chat_id
['res', 'warn_action_str', 'warn_time']
Tuple[Optional[str], bool]
{"Assign": 3, "Return": 1}
1
5
1
["groups.get"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.set_warns_action_cmd", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.warn_user"]
The function (get_warn_action) defined within the public class called public.The function start at line 104 and ends at 108. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called i...
iiiiii1wepfj_alisurobot
public
public
0
0
set_warn_action
async def set_warn_action(chat_id: int,action: Optional[str],the_time: Optional[str] = None,):await groups.filter(chat_id=chat_id).update(warn_action=action,warn_time=the_time,)
1
9
3
45
0
111
119
111
chat_id,action,the_time
[]
None
{"Expr": 1}
2
9
2
["update", "groups.filter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.set_warns_action_cmd"]
The function (set_warn_action) defined within the public class called public.The function start at line 111 and ends at 119. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [111.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions c...
iiiiii1wepfj_alisurobot
public
public
0
0
get_warns
async def get_warns(chat_id: int, user_id: int):r = (await user_warns.get(user_id=user_id, chat_id=chat_id)).countreturn r if r else 0
2
3
2
36
1
122
124
122
chat_id,user_id
['r']
Returns
{"Assign": 1, "Return": 1}
1
3
1
["user_warns.get"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.get_user_warns_cmd", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.remwarncallbackfunc", "_.content.gdr...
The function (get_warns) defined within the public class called public.The function start at line 122 and ends at 124. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [122.0], and this function return a value. It declare 1.0 function, It has 1.0 function called...
iiiiii1wepfj_alisurobot
public
public
0
0
add_warns
async def add_warns(chat_id: int, user_id: int, number: int):check_if_user_warn_already_exists = await user_warns.exists(user_id=user_id, chat_id=chat_id)if check_if_user_warn_already_exists:user_warns_number_before_the_warn = (await user_warns.get(user_id=user_id, chat_id=chat_id)).countuser_warns_number_after_the_war...
2
18
3
97
3
127
144
127
chat_id,user_id,number
['user_warns_number_after_the_warn', 'check_if_user_warn_already_exists', 'user_warns_number_before_the_warn']
None
{"Assign": 3, "Expr": 2, "If": 1}
5
18
5
["user_warns.exists", "user_warns.get", "update", "user_warns.filter", "user_warns.create"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.warn_user"]
The function (add_warns) defined within the public class called public.The function start at line 127 and ends at 144. It contains 18 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [127.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions called...
iiiiii1wepfj_alisurobot
public
public
0
0
remove_one_warn_db
async def remove_one_warn_db(chat_id: int, user_id: int, number: int):the_number_res = int(number - 1)await user_warns.filter(user_id=user_id, chat_id=chat_id).update(count=the_number_res)
1
5
3
43
1
147
151
147
chat_id,user_id,number
['the_number_res']
None
{"Assign": 1, "Expr": 1}
3
5
3
["int", "update", "user_warns.filter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.remwarncallbackfunc"]
The function (remove_one_warn_db) defined within the public class called public.The function start at line 147 and ends at 151. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [147.0] and does not return any value. It declares 3.0 functions, It has 3.0 function...
iiiiii1wepfj_alisurobot
public
public
0
0
reset_warns
async def reset_warns(chat_id: int, user_id: int):await user_warns.filter(user_id=user_id, chat_id=chat_id).delete()
1
2
2
28
0
154
155
154
chat_id,user_id
[]
None
{"Expr": 1}
2
2
2
["delete", "user_warns.filter"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.unwarn_user", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.warn_user"]
The function (reset_warns) defined within the public class called public.The function start at line 154 and ends at 155. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [154.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions calle...
iiiiii1wepfj_alisurobot
public
public
0
0
get_warns_limit
async def get_warns_limit(chat_id: int):res = (await groups.get(chat_id=chat_id)).warns_limitreturn 3 if res is None else res
2
3
1
30
1
158
160
158
chat_id
['res']
Returns
{"Assign": 1, "Return": 1}
1
3
1
["groups.get"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.remwarncallbackfunc", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.warn_user"]
The function (get_warns_limit) defined within the public class called public.The function start at line 158 and ends at 160. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function call...
iiiiii1wepfj_alisurobot
public
public
0
0
set_warns_limit
async def set_warns_limit(chat_id: int, warns_limit: int):await groups.filter(chat_id=chat_id).update(warns_limit=warns_limit)
1
2
2
27
0
163
164
163
chat_id,warns_limit
[]
None
{"Expr": 1}
2
2
2
["update", "groups.filter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.warns_py.on_set_warns_limit"]
The function (set_warns_limit) defined within the public class called public.The function start at line 163 and ends at 164. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [163.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions c...
iiiiii1wepfj_alisurobot
public
public
0
0
warn_user
async def warn_user(c: Client,m: Message,strings,):try:target_user = await get_target_user(c, m, strings)except target_user_not_found_custom_exception as e:return await m.reply_text(e)warns_limit = await get_warns_limit(m.chat.id)check_admin = await c.get_chat_member(m.chat.id, target_user.id)reason = await get_warn_re...
12
92
3
497
9
172
264
172
c,m,strings
['time_parsed', 'warn_string', 'user_warns', 'check_admin', 'warn_text', 'warns_limit', 'reason', 'warn_btns', 'target_user']
Returns
{"Assign": 16, "Expr": 11, "If": 8, "Return": 2, "Try": 1}
47
93
47
["get_target_user", "m.reply_text", "get_warns_limit", "c.get_chat_member", "get_warn_reason_text", "get_warn_action", "get_warn_time_locale_string", "strings", "add_warns", "get_warns", "c.ban_chat_member", "strings", "c.restrict_chat_member", "ChatPermissions", "strings", "c.ban_chat_member", "c.unban_chat_member", "...
0
[]
The function (warn_user) defined within the public class called public.The function start at line 172 and ends at 264. It contains 92 lines of code and it has a cyclomatic complexity of 12. It takes 3 parameters, represented as [172.0], and this function return a value. It declares 47.0 functions, and It has 47.0 func...
iiiiii1wepfj_alisurobot
public
public
0
0
remwarncallbackfunc
async def remwarncallbackfunc(c: Client, m: CallbackQuery, strings):chatid = m.message.chat.idthe_msg_obj = m.messagetry:just_unused_callback_one, unwarn_user_id_one = m.data.split(".")unwarn_user_id = int(unwarn_user_id_one)warns_limit = await get_warns_limit(chatid)user_warns = await get_warns(chatid, unwarn_user_id)...
4
19
3
128
5
270
288
270
c,m,strings
['unwarn_user_id', 'user_warns', 'chatid', 'the_msg_obj', 'warns_limit']
Returns
{"Assign": 6, "Expr": 1, "If": 2, "Return": 4, "Try": 1}
14
19
14
["m.data.split", "int", "get_warns_limit", "get_warns", "the_msg_obj.edit", "the_msg_obj.edit", "remove_one_warn_db", "the_msg_obj.edit", "strings", "the_msg_obj.edit", "Client.on_callback_query", "filters.regex", "use_chat_lang", "require_admin"]
0
[]
The function (remwarncallbackfunc) defined within the public class called public.The function start at line 270 and ends at 288. It contains 19 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [270.0], and this function return a value. It declares 14.0 functions, and It has ...
iiiiii1wepfj_alisurobot
public
public
0
0
on_set_warns_limit
async def on_set_warns_limit(c: Client,m: Message,strings,):if len(m.command) == 1:return await m.reply_text(strings("warn_limit_help"))try:warns_limit = int(m.command[1])except ValueError:await m.reply_text(strings("warn_limit_invalid"))else:await set_warns_limit(m.chat.id, warns_limit)await m.reply(strings("warn_limi...
3
14
3
91
1
297
310
297
c,m,strings
['warns_limit']
Returns
{"Assign": 1, "Expr": 3, "If": 1, "Return": 1, "Try": 1}
14
14
14
["len", "m.reply_text", "strings", "int", "m.reply_text", "strings", "set_warns_limit", "m.reply", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (on_set_warns_limit) defined within the public class called public.The function start at line 297 and ends at 310. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [297.0], and this function return a value. It declares 14.0 functions, and It has 1...
iiiiii1wepfj_alisurobot
public
public
0
0
unwarn_user
async def unwarn_user(c: Client,m: Message,strings,):try:target_user = await get_target_user(c, m, strings)except target_user_not_found_custom_exception as e:return await m.reply_text(e)await reset_warns(m.chat.id, target_user.id)await m.reply_text(strings("warn_reset").format(target_user=target_user.mention))
2
11
3
72
1
319
329
319
c,m,strings
['target_user']
Returns
{"Assign": 1, "Expr": 2, "Return": 1, "Try": 1}
10
11
10
["get_target_user", "m.reply_text", "reset_warns", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (unwarn_user) defined within the public class called public.The function start at line 319 and ends at 329. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [319.0], and this function return a value. It declares 10.0 functions, and It has 10.0 fun...
iiiiii1wepfj_alisurobot
public
public
0
0
get_user_warns_cmd
async def get_user_warns_cmd(c: Client,m: Message,strings,):try:target_user = await get_target_user(c, m, strings)except target_user_not_found_custom_exception as e:return await m.reply_text(e)user_warns = await get_warns(m.chat.id, target_user.id)await m.reply_text(strings("warns_count_string").format(target_user=targ...
2
15
3
78
2
336
350
336
c,m,strings
['target_user', 'user_warns']
Returns
{"Assign": 2, "Expr": 1, "Return": 1, "Try": 1}
10
15
10
["get_target_user", "m.reply_text", "get_warns", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (get_user_warns_cmd) defined within the public class called public.The function start at line 336 and ends at 350. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [336.0], and this function return a value. It declares 10.0 functions, and It has 1...
iiiiii1wepfj_alisurobot
public
public
0
0
set_warns_action_cmd
async def set_warns_action_cmd(c: Client,m: Message,strings,):if len(m.text.split()) > 1:if not m.command[1] in ("ban", "mute", "kick", "tban", "tmute"):return await m.reply_text(strings("warns_action_set_invalid"))if m.command[1] in ("tban", "tmute"):if len(m.text.split()) > 2:try:the_time = time_extract_to_db(m.comma...
7
31
3
226
3
360
392
360
c,m,strings
['the_time', 'check_if_valid_time_range', 'warn_action_txt']
Returns
{"Assign": 5, "Expr": 3, "If": 5, "Return": 4, "Try": 1}
25
33
25
["len", "m.text.split", "m.reply_text", "strings", "len", "m.text.split", "time_extract_to_db", "check_if_ban_time_range_db", "m.reply_text", "strings", "m.reply_text", "m.reply_text", "strings", "set_warn_action", "m.reply_text", "format", "strings", "get_warn_action", "m.reply_text", "format", "strings", "Client.on_m...
0
[]
The function (set_warns_action_cmd) defined within the public class called public.The function start at line 360 and ends at 392. It contains 31 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [360.0], and this function return a value. It declares 25.0 functions, and It has...
iiiiii1wepfj_alisurobot
public
public
0
0
weather
async def weather(c: Client, m: Message, strings):if len(m.command) == 1:return await m.reply_text(strings("weather_usage"))r = await http.get(get_coords,headers=headers,params=dict(apiKey=weather_apikey,format="json",language=strings("weather_language"),query=m.text.split(maxsplit=1)[1],),)loc_json = r.json()if not lo...
3
40
3
241
6
22
65
22
c,m,strings
['res', 'res_json', 'r', 'pos', 'obs_dict', 'loc_json']
Returns
{"Assign": 7, "Expr": 2, "If": 2, "Return": 1}
22
44
22
["len", "m.reply_text", "strings", "http.get", "dict", "strings", "m.text.split", "r.json", "loc_json.get", "m.reply_text", "strings", "http.get", "dict", "strings", "strings", "r.json", "format", "strings", "m.reply_text", "Client.on_message", "filters.command", "use_chat_lang"]
0
[]
The function (weather) defined within the public class called public.The function start at line 22 and ends at 65. It contains 40 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [22.0], and this function return a value. It declares 22.0 functions, and It has 22.0 functions ...
iiiiii1wepfj_alisurobot
public
public
0
0
get_welcome_status
async def get_welcome_status(chat_id: int):return (await groups.get(chat_id=chat_id)).welcome_enabled
1
2
1
21
0
19
20
19
chat_id
[]
Returns
{"Return": 1}
1
2
1
["groups.get"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.getwelcomemsg", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.greet_new_members"]
The function (get_welcome_status) defined within the public class called public.The function start at line 19 and ends at 20. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function cal...
iiiiii1wepfj_alisurobot
public
public
0
0
get_welcome
async def get_welcome(chat_id: int) -> Tuple[Optional[str], bool]:return (await groups.get(chat_id=chat_id)).welcome
1
2
1
31
0
23
24
23
chat_id
[]
Tuple[Optional[str], bool]
{"Return": 1}
1
2
1
["groups.get"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3918618_moveangel_one4ubot.userbot.modules.sql_helper.welcome_sql_py.add_welcome_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69709534_toni880_tonic_userbot.userbot.modules.sql_helper.welcome_sql_py.add_w...
The function (get_welcome) defined within the public class called public.The function start at line 23 and ends at 24. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside ...
iiiiii1wepfj_alisurobot
public
public
0
0
set_welcome
async def set_welcome(chat_id: int, welcome: Optional[str]):await groups.filter(chat_id=chat_id).update(welcome=welcome)
1
2
2
30
0
27
28
27
chat_id,welcome
[]
None
{"Expr": 1}
2
2
2
["update", "groups.filter"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.reset_welcome_message", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.set_welcome_message"]
The function (set_welcome) defined within the public class called public.The function start at line 27 and ends at 28. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [27.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called i...
iiiiii1wepfj_alisurobot
public
public
0
0
toggle_welcome
async def toggle_welcome(chat_id: int, mode: bool):await groups.filter(chat_id=chat_id).update(welcome_enabled=mode)
1
2
2
27
0
31
32
31
chat_id,mode
[]
None
{"Expr": 1}
2
2
2
["update", "groups.filter"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.disable_welcome_message", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.enable_welcome_message"]
The function (toggle_welcome) defined within the public class called public.The function start at line 31 and ends at 32. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [31.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions calle...
iiiiii1wepfj_alisurobot
public
public
0
0
get_del_last_welcome_status
async def get_del_last_welcome_status(chat_id: int):res = (await groups.get(chat_id=chat_id)).del_last_welcome_messagereturn True if res is True else False
2
3
1
30
1
35
37
35
chat_id
['res']
Returns
{"Assign": 1, "Return": 1}
1
3
1
["groups.get"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.greet_new_members"]
The function (get_del_last_welcome_status) defined within the public class called public.The function start at line 35 and ends at 37. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 fun...
iiiiii1wepfj_alisurobot
public
public
0
0
get_last_welcome_message_id
async def get_last_welcome_message_id(chat_id: int):res = (await groups.get(chat_id=chat_id)).last_welcome_message_idreturn res if res else None
2
3
1
28
1
40
42
40
chat_id
['res']
Returns
{"Assign": 1, "Return": 1}
1
3
1
["groups.get"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.greet_new_members"]
The function (get_last_welcome_message_id) defined within the public class called public.The function start at line 40 and ends at 42. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 fun...
iiiiii1wepfj_alisurobot
public
public
0
0
toggle_del_old_welcome
async def toggle_del_old_welcome(chat_id: int, mode: bool):await groups.filter(chat_id=chat_id).update(del_last_welcome_message=mode)
1
2
2
27
0
45
46
45
chat_id,mode
[]
None
{"Expr": 1}
2
2
2
["update", "groups.filter"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.disable_del_old_welcome_message", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.enable_del_old_welc...
The function (toggle_del_old_welcome) defined within the public class called public.The function start at line 45 and ends at 46. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [45.0] and does not return any value. It declares 2.0 functions, It has 2.0 functio...
iiiiii1wepfj_alisurobot
public
public
0
0
set_last_welcome_message_id
async def set_last_welcome_message_id(chat_id: int, msg_id: int):await groups.filter(chat_id=chat_id).update(last_welcome_message_id=msg_id)
1
2
2
27
0
49
50
49
chat_id,msg_id
[]
None
{"Expr": 1}
2
2
2
["update", "groups.filter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.greet_new_members"]
The function (set_last_welcome_message_id) defined within the public class called public.The function start at line 49 and ends at 50. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [49.0] and does not return any value. It declares 2.0 functions, It has 2.0 fu...
iiiiii1wepfj_alisurobot
public
public
0
0
invalid_del_old_welcome_status_arg
async def invalid_del_old_welcome_status_arg(c: Client, m: Message, strings):await m.reply_text(strings("del_old_welcome_mode_invalid"))
1
2
3
23
0
63
64
63
c,m,strings
[]
None
{"Expr": 1}
7
2
7
["m.reply_text", "strings", "Client.on_message", "filters.command", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (invalid_del_old_welcome_status_arg) defined within the public class called public.The function start at line 63 and ends at 64. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [63.0] and does not return any value. It declares 7.0 functions, and I...
iiiiii1wepfj_alisurobot
public
public
0
0
enable_del_old_welcome_message
async def enable_del_old_welcome_message(c: Client, m: Message, strings):await toggle_del_old_welcome(m.chat.id, True)await m.reply_text(strings("del_old_welcome_mode_enable").format(chat_title=m.chat.title))
1
5
3
45
0
73
77
73
c,m,strings
[]
None
{"Expr": 2}
8
5
8
["toggle_del_old_welcome", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (enable_del_old_welcome_message) defined within the public class called public.The function start at line 73 and ends at 77. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [73.0] and does not return any value. It declares 8.0 functions, and It ha...
iiiiii1wepfj_alisurobot
public
public
0
0
disable_del_old_welcome_message
async def disable_del_old_welcome_message(c: Client, m: Message, strings):await toggle_del_old_welcome(m.chat.id, False)await m.reply_text(strings("del_old_welcome_mode_disable").format(chat_title=m.chat.title))
1
5
3
45
0
86
90
86
c,m,strings
[]
None
{"Expr": 2}
8
5
8
["toggle_del_old_welcome", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (disable_del_old_welcome_message) defined within the public class called public.The function start at line 86 and ends at 90. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [86.0] and does not return any value. It declares 8.0 functions, and It h...
iiiiii1wepfj_alisurobot
public
public
0
0
welcome_format_message_help
async def welcome_format_message_help(c: Client, m: Message, strings):await m.reply_text(strings("welcome_format_help_msg"))await m.stop_propagation()
1
3
3
29
0
97
100
97
c,m,strings
[]
None
{"Expr": 2}
6
4
6
["m.reply_text", "strings", "m.stop_propagation", "Client.on_message", "filters.command", "use_chat_lang"]
0
[]
The function (welcome_format_message_help) defined within the public class called public.The function start at line 97 and ends at 100. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [97.0] and does not return any value. It declares 6.0 functions, and It has ...
iiiiii1wepfj_alisurobot
public
public
0
0
set_welcome_message
async def set_welcome_message(c: Client, m: Message, strings):if len(m.text.split()) > 1:message = m.text.html.split(None, 1)[1]try:# Try to send message with default parameterssent = await m.reply_text(message.format(id=m.from_user.id,username=m.from_user.username,mention=m.from_user.mention,first_name=m.from_user.fir...
5
36
3
260
2
109
147
109
c,m,strings
['message', 'sent']
None
{"Assign": 3, "Expr": 4, "If": 1, "Try": 1}
22
39
22
["len", "m.text.split", "m.text.html.split", "m.reply_text", "message.format", "c.get_chat_members_count", "m.reply_text", "m.reply_text", "format", "strings", "str", "set_welcome", "sent.edit_text", "format", "strings", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_...
0
[]
The function (set_welcome_message) defined within the public class called public.The function start at line 109 and ends at 147. It contains 36 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [109.0] and does not return any value. It declares 22.0 functions, and It has 22.0...
iiiiii1wepfj_alisurobot
public
public
0
0
invalid_welcome_status_arg
async def invalid_welcome_status_arg(c: Client, m: Message, strings):await m.reply_text(strings("welcome_mode_invalid"))
1
2
3
23
0
157
158
157
c,m,strings
[]
None
{"Expr": 1}
7
2
7
["m.reply_text", "strings", "Client.on_message", "filters.command", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (invalid_welcome_status_arg) defined within the public class called public.The function start at line 157 and ends at 158. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [157.0] and does not return any value. It declares 7.0 functions, and It has...
iiiiii1wepfj_alisurobot
public
public
0
0
getwelcomemsg
async def getwelcomemsg(c: Client, m: Message, strings):welcome_enabled = await get_welcome_status(m.chat.id)if welcome_enabled:welcome = await get_welcome(m.chat.id)await m.reply_text(strings("welcome_default") if welcome is None else welcome, parse_mode=enums.ParseMode.DISABLED)else:await m.reply_text("None")
3
9
3
71
2
167
175
167
c,m,strings
['welcome_enabled', 'welcome']
None
{"Assign": 2, "Expr": 2, "If": 1}
9
9
9
["get_welcome_status", "get_welcome", "m.reply_text", "strings", "m.reply_text", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (getwelcomemsg) defined within the public class called public.The function start at line 167 and ends at 175. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [167.0] and does not return any value. It declares 9.0 functions, and It has 9.0 function...
iiiiii1wepfj_alisurobot
public
public
0
0
enable_welcome_message
async def enable_welcome_message(c: Client, m: Message, strings):await toggle_welcome(m.chat.id, True)await m.reply_text(strings("welcome_mode_enable").format(chat_title=m.chat.title))
1
3
3
45
0
184
186
184
c,m,strings
[]
None
{"Expr": 2}
8
3
8
["toggle_welcome", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (enable_welcome_message) defined within the public class called public.The function start at line 184 and ends at 186. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [184.0] and does not return any value. It declares 8.0 functions, and It has 8.0...
iiiiii1wepfj_alisurobot
public
public
0
0
disable_welcome_message
async def disable_welcome_message(c: Client, m: Message, strings):await toggle_welcome(m.chat.id, False)await m.reply_text(strings("welcome_mode_disable").format(chat_title=m.chat.title))
1
3
3
45
0
195
197
195
c,m,strings
[]
None
{"Expr": 2}
8
3
8
["toggle_welcome", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (disable_welcome_message) defined within the public class called public.The function start at line 195 and ends at 197. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [195.0] and does not return any value. It declares 8.0 functions, and It has 8....
iiiiii1wepfj_alisurobot
public
public
0
0
reset_welcome_message
async def reset_welcome_message(c: Client, m: Message, strings):await set_welcome(m.chat.id, None)await m.reply_text(strings("welcome_reset").format(chat_title=m.chat.title))
1
3
3
45
0
207
209
207
c,m,strings
[]
None
{"Expr": 2}
8
3
8
["set_welcome", "m.reply_text", "format", "strings", "Client.on_message", "filters.command", "require_admin", "use_chat_lang"]
0
[]
The function (reset_welcome_message) defined within the public class called public.The function start at line 207 and ends at 209. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [207.0] and does not return any value. It declares 8.0 functions, and It has 8.0 ...
iiiiii1wepfj_alisurobot
public
public
0
0
greet_new_members
async def greet_new_members(c: Client, m: Message, strings):members = m.new_chat_memberschat_title = m.chat.titlefirst_name = ", ".join(map(lambda a: a.first_name, members))full_name = ", ".join(map(lambda a: a.first_name + " " + (a.last_name or ""), members))user_id = ", ".join(map(lambda a: str(a.id), members))userna...
13
66
3
391
14
214
281
214
c,m,strings
['mention', 'count', 'first_name', 'chat_title', 'members', 'full_name', 'username', 'the_last_welcome_msg', 'welcome', 'check_if_delete_old_welcome_message', 'get_last_welcome_msg_id', 'welcome_enabled', 'user_id', 'check_if_disable_preview']
None
{"Assign": 19, "Expr": 2, "If": 7, "Try": 1}
28
68
28
["join", "map", "join", "map", "join", "map", "str", "join", "map", "join", "map", "get_welcome_status", "get_welcome", "strings", "get_format_keys", "c.get_chat_members_count", "get_format_keys", "welcome.format", "button_parser", "m.reply_text", "len", "InlineKeyboardMarkup", "get_del_last_welcome_status", "get_last_...
0
[]
The function (greet_new_members) defined within the public class called public.The function start at line 214 and ends at 281. It contains 66 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [214.0] and does not return any value. It declares 28.0 functions, and It has 28.0 ...
iiiiii1wepfj_alisurobot
public
public
0
0
extract_info
def extract_info(instance, url, download=True):return instance.extract_info(url, download)
1
2
3
20
0
22
23
22
instance,url,download
[]
Returns
{"Return": 1}
1
2
1
["instance.extract_info"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3704533_opentsdb_tcollector.collectors.available.software.long_lived.zfsiostats_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.youtube_py.cli_ytdl", "_.content...
The function (extract_info) defined within the public class called public.The function start at line 22 and ends at 23. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [22.0], and this function return a value. It declare 1.0 function, It has 1.0 function called...
iiiiii1wepfj_alisurobot
public
public
0
0
search_yt
async def search_yt(query):page = (await http.get("https://www.youtube.com/results",params=dict(search_query=query, pbj="1"),headers={"x-youtube-client-name": "1","x-youtube-client-version": "2.20200827",},)).json()list_videos = []for video in page[1]["response"]["contents"]["twoColumnSearchResultsRenderer"]["primaryCo...
3
23
1
137
3
26
48
26
query
['list_videos', 'dic', 'page']
Returns
{"Assign": 3, "Expr": 1, "For": 1, "If": 1, "Return": 1}
5
23
5
["json", "http.get", "dict", "video.get", "list_videos.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.youtube_py.yt_search_cmd"]
The function (search_yt) defined within the public class called public.The function start at line 26 and ends at 48. It contains 23 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 5.0 functions, It has 5.0 functions called i...
iiiiii1wepfj_alisurobot
public
public
0
0
yt_search_cmd
async def yt_search_cmd(c: Client, m: Message, strings):if len(m.text.split()) > 1:vids = ['{}: <a href="{}">{}</a>'.format(num + 1, i["url"], i["title"])for num, i in enumerate(await search_yt(m.text.split(None, 1)[1]))]await m.reply_text("\n".join(vids) if vids else strings("no_results", context="general"),disable_we...
4
12
3
118
1
54
65
54
c,m,strings
['vids']
None
{"Assign": 1, "Expr": 2, "If": 1}
14
12
14
["len", "m.text.split", "format", "enumerate", "search_yt", "m.text.split", "m.reply_text", "join", "strings", "m.reply_text", "strings", "Client.on_message", "filters.command", "use_chat_lang"]
0
[]
The function (yt_search_cmd) defined within the public class called public.The function start at line 54 and ends at 65. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [54.0] and does not return any value. It declares 14.0 functions, and It has 14.0 function...
iiiiii1wepfj_alisurobot
public
public
0
0
ytdlcmd
async def ytdlcmd(c: Client, m: Message, strings):if not m.from_user:returnuser = m.from_user.idif m.reply_to_message and m.reply_to_message.text:url = m.reply_to_message.textelif len(m.command) > 1:url = m.text.split(None, 1)[1]else:await m.reply_text(strings("ytdl_missing_argument"))returnydl = yt_dlp.YoutubeDL({"out...
15
54
3
347
13
71
132
71
c,m,strings
['temp', 'yt', 'vformat', 'title', 'afsize', 'ydl', 'vfsize', 'performer', 'url', 'text', 'keyboard', 'rege', 'user']
None
{"Assign": 18, "AugAssign": 2, "Expr": 2, "For": 1, "If": 8, "Return": 2}
26
62
26
["len", "m.text.split", "m.reply_text", "strings", "yt_dlp.YoutubeDL", "re.match", "split", "url.split", "extract_info", "extract_info", "rege.group", "strings", "strings", "rsplit", "yt.get", "yt.get", "pretty_size", "pretty_size", "int", "datetime.timedelta", "yt.get", "m.reply_text", "ikb", "Client.on_message", "fil...
0
[]
The function (ytdlcmd) defined within the public class called public.The function start at line 71 and ends at 132. It contains 54 lines of code and it has a cyclomatic complexity of 15. It takes 3 parameters, represented as [71.0] and does not return any value. It declares 26.0 functions, and It has 26.0 functions ca...
iiiiii1wepfj_alisurobot
public
public
0
0
cli_ytdl
async def cli_ytdl(c: Client,cq: CallbackQuery,strings,):data, fsize, temp, vformat, cid, userid, mid = cq.data.split("|")if not cq.from_user.id == int(userid):return await cq.answer(strings("ytdl_button_denied"), cache_time=60)if int(fsize) > 200000000:return await cq.answer(strings("ytdl_file_too_big"),show_alert=Tru...
11
91
3
547
10
137
230
137
c,cq,strings
['ttemp', 'yt', 'title', 'ydl', 'performer', 'url', 'filename', 'thumb', 'path', 'vid']
Returns
{"AnnAssign": 1, "Assign": 14, "Expr": 9, "If": 6, "Return": 3, "Try": 3, "With": 1}
50
94
50
["cq.data.split", "int", "cq.answer", "strings", "int", "cq.answer", "strings", "re.sub", "cq.message.edit", "strings", "tempfile.TemporaryDirectory", "os.path.join", "int", "datetime.timedelta", "int", "yt_dlp.YoutubeDL", "yt_dlp.YoutubeDL", "extract_info", "cq.message.edit", "format", "strings", "cq.message.edit", "s...
0
[]
The function (cli_ytdl) defined within the public class called public.The function start at line 137 and ends at 230. It contains 91 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [137.0], and this function return a value. It declares 50.0 functions, and It has 50.0 funct...
iiiiii1wepfj_alisurobot
public
public
0
0
logging_errors.err_log
async def err_log(c: Client,m: Message,*args,**kwargs,):try:return await f(c, m, *args, **kwargs)except ChatWriteForbidden:return await m.chat.leave()except (DoesNotExist, ChatAdminRequired, StopPropagation):passexcept Exception as e:if c.log_chat_errors:full_trace = traceback.format_exc()try:paste_err = await http.pos...
7
35
4
148
0
15
49
15
null
[]
None
null
0
0
0
null
0
null
The function (logging_errors.err_log) defined within the public class called public.The function start at line 15 and ends at 49. It contains 35 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [15.0] and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
logging_errors
def logging_errors(f):@wraps(f)async def err_log(c: Client,m: Message,*args,**kwargs,):try:return await f(c, m, *args, **kwargs)except ChatWriteForbidden:return await m.chat.leave()except (DoesNotExist, ChatAdminRequired, StopPropagation):passexcept Exception as e:if c.log_chat_errors:full_trace = traceback.format_exc(...
1
4
1
15
7
13
51
13
f
['full_trace', 'pastereqjson_one', 'paste_json_key', 'thefulltrace', 'pastereqjson', 'paste_err', 'paste_url']
Returns
{"AnnAssign": 1, "Assign": 7, "Expr": 1, "If": 1, "Return": 3, "Try": 3}
10
39
10
["f", "m.chat.leave", "traceback.format_exc", "http.post", "paste_err.json", "c.send_message", "type", "html.escape", "str", "wraps"]
0
[]
The function (logging_errors) defined within the public class called public.The function start at line 13 and ends at 51. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 10.0 functions, and It has 10.0 functio...
iiiiii1wepfj_alisurobot
public
public
0
0
set_db_lang
async def set_db_lang(chat_id: int,chat_type: str,lang_code: str,):if chat_type == enums.ChatType.PRIVATE:await users.filter(user_id=chat_id).update(chat_lang=lang_code)elif chat_type in group_types:# groups and supergroups share the same tableawait groups.filter(chat_id=chat_id).update(chat_lang=lang_code)elif chat_ty...
4
13
3
96
0
28
40
28
chat_id,chat_type,lang_code
[]
None
{"Expr": 3, "If": 3}
7
13
7
["update", "users.filter", "update", "groups.filter", "update", "channels.filter", "TypeError"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.chats_py.check_chat", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.langs_py.set_chat_lang"]
The function (set_db_lang) defined within the public class called public.The function start at line 28 and ends at 40. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [28.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions called ...
iiiiii1wepfj_alisurobot
public
public
0
0
get_db_lang
async def get_db_lang(chat_id: int, chat_type: str) -> str:if chat_type == enums.ChatType.PRIVATE:ul = (await users.get(user_id=chat_id)).chat_langelif chat_type in group_types:# groups and supergroups share the same tableul = (await groups.get(chat_id=chat_id)).chat_langelif chat_type == enums.ChatType.CHANNEL:ul = (a...
5
10
2
96
1
43
52
43
chat_id,chat_type
['ul']
str
{"Assign": 3, "If": 3, "Return": 1}
4
10
4
["users.get", "groups.get", "channels.get", "TypeError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.localization_py.get_lang"]
The function (get_db_lang) defined within the public class called public.The function start at line 43 and ends at 52. It contains 10 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [43.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called ...
iiiiii1wepfj_alisurobot
public
public
0
0
cache_localizations
def cache_localizations(files: List[str]) -> Dict[str, Dict[str, Dict[str, str]]]:ldict = {lang: {} for lang in enabled_locales}for file in files:_, lname, pname = file.split(os.path.sep)pname = pname.split(".")[0]dic = json.load(open(file, encoding="utf-8"))dic.update(ldict[lname].get(pname, {}))ldict[lname][pname] = ...
3
9
1
114
3
55
63
55
files
['pname', 'ldict', 'dic']
Dict[str, Dict[str, Dict[str, str]]]
{"Assign": 5, "Expr": 1, "For": 1, "Return": 1}
6
9
6
["file.split", "pname.split", "json.load", "open", "dic.update", "get"]
0
[]
The function (cache_localizations) defined within the public class called public.The function start at line 55 and ends at 63. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 function...
iiiiii1wepfj_alisurobot
public
public
0
0
get_locale_string
def get_locale_string(dic: dict,language: str,default_context: str,key: str,context: str = None,) -> str:if context:default_context = contextdic = langdict[language].get(context, langdict[default_language][context])res: str = (dic.get(key) or langdict[default_language][default_context].get(key) or key)return res
4
14
5
82
2
80
93
80
dic,language,default_context,key,context
['dic', 'default_context']
str
{"AnnAssign": 1, "Assign": 2, "If": 1, "Return": 1}
3
14
3
["get", "dic.get", "get"]
0
[]
The function (get_locale_string) defined within the public class called public.The function start at line 80 and ends at 93. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [80.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functi...
iiiiii1wepfj_alisurobot
public
public
0
0
get_lang
async def get_lang(message) -> str:if isinstance(message, CallbackQuery):chat = message.message.chatelif isinstance(message, Message):chat = message.chatelif isinstance(message, InlineQuery):chat, chat.type = message.from_user, enums.ChatType.PRIVATEelse:raise TypeError(f"Update type '{message.__name__}' is not support...
13
23
1
189
2
96
122
96
message
['chat', 'lang']
str
{"Assign": 10, "For": 1, "If": 7, "Return": 1}
13
27
13
["isinstance", "isinstance", "isinstance", "TypeError", "get_db_lang", "len", "lang.split", "locale_.startswith", "islower", "lang.split", "lang.split", "upper", "join"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70555013_embeddings_benchmark_mteb.mteb.abstasks.TaskMetadata_py.TaskMetadata.languages", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.localization_py.use_chat_lang", "_...
The function (get_lang) defined within the public class called public.The function start at line 96 and ends at 122. It contains 23 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value. It declares 13.0 functions, It has 13.0 functions called in...
iiiiii1wepfj_alisurobot
public
public
0
0
use_chat_lang.use_chat_lang.decorator.wrapper
async def wrapper(client, message):lang = await get_lang(message)dic = langdict.get(lang, langdict[default_language])lfunc = partial(get_locale_string, dic.get(context, {}), lang, context)return await func(client, message, lfunc)
1
5
2
57
0
132
138
132
null
[]
None
null
0
0
0
null
0
null
The function (use_chat_lang.use_chat_lang.decorator.wrapper) defined within the public class called public.The function start at line 132 and ends at 138. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [132.0] and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
use_chat_lang.decorator
def decorator(func):@wraps(func)async def wrapper(client, message):lang = await get_lang(message)dic = langdict.get(lang, langdict[default_language])lfunc = partial(get_locale_string, dic.get(context, {}), lang, context)return await func(client, message, lfunc)return wrapper
1
4
1
15
0
130
140
130
null
[]
None
null
0
0
0
null
0
null
The function (use_chat_lang.decorator) defined within the public class called public.The function start at line 130 and ends at 140. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
use_chat_lang
def use_chat_lang(context=None):if not context:frame = inspect.stack()[1]context = frame[0].f_code.co_filename.split(os.path.sep)[-1].split(".")[0]def decorator(func):@wraps(func)async def wrapper(client, message):lang = await get_lang(message)dic = langdict.get(lang, langdict[default_language])lfunc = partial(get_loca...
2
6
1
56
5
125
142
125
context
['dic', 'frame', 'context', 'lang', 'lfunc']
Returns
{"Assign": 5, "If": 1, "Return": 3}
9
18
9
["inspect.stack", "split", "f_code.co_filename.split", "get_lang", "langdict.get", "partial", "dic.get", "func", "wraps"]
92
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.ban", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.dban", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset...
The function (use_chat_lang) defined within the public class called public.The function start at line 125 and ends at 142. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 9.0 functions, It has 9.0 functions cal...
iiiiii1wepfj_alisurobot
public
public
0
0
pass_index_error.pass_index_err
async def pass_index_err(c: Client,m: Message,*args,**kwargs,):try:return await f(c, m, *args, **kwargs)except IndexError:pass
2
10
4
38
0
8
17
8
null
[]
None
null
0
0
0
null
0
null
The function (pass_index_error.pass_index_err) defined within the public class called public.The function start at line 8 and ends at 17. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [8.0] and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
pass_index_error
def pass_index_error(f):@wraps(f)async def pass_index_err(c: Client,m: Message,*args,**kwargs,):try:return await f(c, m, *args, **kwargs)except IndexError:passreturn pass_index_err
1
4
1
15
0
6
19
6
f
[]
Returns
{"Return": 2, "Try": 1}
2
14
2
["f", "wraps"]
0
[]
The function (pass_index_error) defined within the public class called public.The function start at line 6 and ends at 19. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 function...
iiiiii1wepfj_alisurobot
public
public
0
0
dict_snake_case
def dict_snake_case(data: dict, same_for_sub_dict: bool = True):output_dict = {}for data_keys, data_values in data.items():if same_for_sub_dict:if isinstance(data_values, dict):data_values = dict_snake_case(data_values)output_dict[data_keys.replace(" ", "_")] = data_valueselse:output_dict[data_keys.replace(" ", "_")] =...
4
10
2
75
2
12
21
12
data,same_for_sub_dict
['data_values', 'output_dict']
Returns
{"Assign": 4, "For": 1, "If": 2, "Return": 1}
5
10
5
["data.items", "isinstance", "dict_snake_case", "data_keys.replace", "data_keys.replace"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.useful_python_tools_py.dict_snake_case"]
The function (dict_snake_case) defined within the public class called public.The function start at line 12 and ends at 21. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [12.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions...
iiiiii1wepfj_alisurobot
public
public
0
0
dict2py
def dict2py(data: dict, name: str = "pyobject"):return namedtuple(name, data.keys())(*data.values())
1
2
2
32
0
24
25
24
data,name
[]
Returns
{"Return": 1}
3
2
3
["namedtuple", "data.keys", "data.values"]
0
[]
The function (dict2py) defined within the public class called public.The function start at line 24 and ends at 25. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [24.0], and this function return a value. It declares 3.0 functions, and It has 3.0 functions cal...
iiiiii1wepfj_alisurobot
public
public
0
0
json_prettify
def json_prettify(data: dict):return json.dumps(data, indent=4)
1
2
1
18
0
28
29
28
data
[]
Returns
{"Return": 1}
1
2
1
["json.dumps"]
0
[]
The function (json_prettify) defined within the public class called public.The function start at line 28 and ends at 29. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function cal...
iiiiii1wepfj_alisurobot
public
public
0
0
http_status_code_info
def http_status_code_info(code: int):if code not in http_status_codes_dict:raise HttpStatusCodeNotFound(f"the http status code {code} is not found.")else:return http_status_codes_dict[code]
2
5
1
26
0
32
36
32
code
[]
Returns
{"If": 1, "Return": 1}
1
5
1
["HttpStatusCodeNotFound"]
0
[]
The function (http_status_code_info) defined within the public class called public.The function start at line 32 and ends at 36. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 func...
iiiiii1wepfj_alisurobot
public
public
0
0
pretty_size
def pretty_size(size_bytes):if size_bytes == 0:return "0B"size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")i = int(math.floor(math.log(size_bytes, 1024)))p = math.pow(1024, i)s = round(size_bytes / p, 2)return "%s %s" % (s, size_name[i])
2
8
1
82
4
54
61
54
size_bytes
['s', 'size_name', 'i', 'p']
Returns
{"Assign": 4, "If": 1, "Return": 2}
5
8
5
["int", "math.floor", "math.log", "math.pow", "round"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.youtube_py.ytdlcmd"]
The function (pretty_size) defined within the public class called public.The function start at line 54 and ends at 61. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 5.0 functions, It has 5.0 functions called ...
iiiiii1wepfj_alisurobot
public
public
0
0
aiowrap.run
async def run(*args, loop=None, executor=None, **kwargs):if loop is None:loop = asyncio.get_event_loop()pfunc = partial(func, *args, **kwargs)return await loop.run_in_executor(executor, pfunc)
2
5
4
51
0
66
70
66
null
[]
None
null
0
0
0
null
0
null
The function (aiowrap.run) defined within the public class called public.The function start at line 66 and ends at 70. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [66.0] and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
aiowrap
def aiowrap(func: Callable) -> Coroutine:@wraps(func)async def run(*args, loop=None, executor=None, **kwargs):if loop is None:loop = asyncio.get_event_loop()pfunc = partial(func, *args, **kwargs)return await loop.run_in_executor(executor, pfunc)return run
1
4
1
19
2
64
72
64
func
['loop', 'pfunc']
Coroutine
{"Assign": 2, "If": 1, "Return": 2}
4
9
4
["asyncio.get_event_loop", "partial", "loop.run_in_executor", "wraps"]
0
[]
The function (aiowrap) defined within the public class called public.The function start at line 64 and ends at 72. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functions called ins...
iiiiii1wepfj_alisurobot
public
public
0
0
add_chat
async def add_chat(chat_id, chat_type):if chat_type == enums.ChatType.PRIVATE:await users.create(user_id=chat_id)elif chat_type in group_types:# groups and supergroups share the same tableawait groups.create(chat_id=chat_id,welcome_enabled=True,del_last_welcome_message=False,private_rules=False,del_anon_channel_message...
4
18
2
93
0
75
92
75
chat_id,chat_type
[]
Returns
{"Expr": 3, "If": 3, "Return": 1}
4
18
4
["users.create", "groups.create", "channels.create", "TypeError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.chats_py.check_chat"]
The function (add_chat) defined within the public class called public.The function start at line 75 and ends at 92. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [75.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions called...
iiiiii1wepfj_alisurobot
public
public
0
0
chat_exists
async def chat_exists(chat_id, chat_type):if chat_type == enums.ChatType.PRIVATE:return await users.exists(user_id=chat_id)if chat_type in group_types:# groups and supergroups share the same tablereturn await groups.exists(chat_id=chat_id)if chat_type == enums.ChatType.CHANNEL:return await channels.exists(chat_id=chat_...
4
8
2
67
0
95
102
95
chat_id,chat_type
[]
Returns
{"If": 3, "Return": 3}
4
8
4
["users.exists", "groups.exists", "channels.exists", "TypeError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.chats_py.check_chat"]
The function (chat_exists) defined within the public class called public.The function start at line 95 and ends at 102. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [95.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions cal...
iiiiii1wepfj_alisurobot
public
public
0
0
check_if_is_from_anon_admin
async def check_if_is_from_anon_admin(m: Message):return bool(m.sender_chat and not m.forward_from_chat and not m.from_user)
3
2
1
24
0
105
106
105
m
[]
Returns
{"Return": 1}
1
2
1
["bool"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.utils_py.require_admin"]
The function (check_if_is_from_anon_admin) defined within the public class called public.The function start at line 105 and ends at 106. It contains 2 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 f...
iiiiii1wepfj_alisurobot
public
public
0
0
send_anon_admin_button
async def send_anon_admin_button(m: Message, callbackdatatext: str, strings):return await m.reply_text(strings("anon_admin_check_msg_txt"),reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(strings("click_here_anon_admin_btn"),callback_data=f"{callbackdatatext}",)],]),)
1
14
3
49
0
109
122
109
m,callbackdatatext,strings
[]
Returns
{"Return": 1}
5
14
5
["m.reply_text", "strings", "InlineKeyboardMarkup", "InlineKeyboardButton", "strings"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.utils_py.require_admin"]
The function (send_anon_admin_button) defined within the public class called public.The function start at line 109 and ends at 122. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [109.0], and this function return a value. It declares 5.0 functions, It has 5.0...
iiiiii1wepfj_alisurobot
public
public
0
0
check_perms
async def check_perms(client: Client,message: Union[CallbackQuery, Message],permissions: Optional[Union[list, str]],complain_missing_perms: bool,strings,) -> bool:if isinstance(message, CallbackQuery):sender = partial(message.answer, show_alert=True)chat = message.message.chatelse:sender = message.reply_textchat = mess...
13
38
5
223
5
125
168
125
client,message,permissions,complain_missing_perms,strings
['missing_perms', 'chat', 'permissions', 'user', 'sender']
bool
{"Assign": 7, "Expr": 3, "For": 1, "If": 9, "Return": 6, "Try": 1}
12
44
12
["isinstance", "partial", "client.get_chat_member", "sender", "strings", "isinstance", "getattr", "missing_perms.append", "sender", "format", "strings", "join"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.utils_py.require_admin"]
The function (check_perms) defined within the public class called public.The function start at line 125 and ends at 168. It contains 38 lines of code and it has a cyclomatic complexity of 13. It takes 5 parameters, represented as [125.0] and does not return any value. It declares 12.0 functions, It has 12.0 functions c...
iiiiii1wepfj_alisurobot
public
public
0
0
require_admin.require_admin.decorator.wrapper
async def wrapper(client: Client,message: Union[CallbackQuery, Message],*args,**kwargs,):lang = await get_lang(message)strings = partial(get_locale_string,langdict[lang].get("admin", langdict[default_language]["admin"]),lang,"admin",)if isinstance(message, CallbackQuery):sender = partial(message.answer, show_alert=True...
11
68
4
357
0
178
248
178
null
[]
None
null
0
0
0
null
0
null
The function (require_admin.require_admin.decorator.wrapper) defined within the public class called public.The function start at line 178 and ends at 248. It contains 68 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [178.0] and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
require_admin.decorator
def decorator(func):@wraps(func)async def wrapper(client: Client,message: Union[CallbackQuery, Message],*args,**kwargs,):lang = await get_lang(message)strings = partial(get_locale_string,langdict[lang].get("admin", langdict[default_language]["admin"]),lang,"admin",)if isinstance(message, CallbackQuery):sender = partial...
1
4
1
15
0
176
250
176
null
[]
None
null
0
0
0
null
0
null
The function (require_admin.decorator) defined within the public class called public.The function start at line 176 and ends at 250. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
require_admin
def require_admin(permissions: Union[list, str] = None,allow_in_private: bool = False,complain_missing_perms: bool = True,):def decorator(func):@wraps(func)async def wrapper(client: Client,message: Union[CallbackQuery, Message],*args,**kwargs,):lang = await get_lang(message)strings = partial(get_locale_string,langdict[...
1
7
3
31
11
171
252
171
permissions,allow_in_private,complain_missing_perms
['anon_admin_check', 'msg_to_check_perm', 'check_anon_perms_msg_send', 'the_callback_data', 'anon_callback_listen', 'lang', 'get_my_chat_member', 'strings', 'has_perms', 'sender', 'msg']
Returns
{"Assign": 17, "Expr": 2, "If": 9, "Return": 8, "Try": 1}
25
82
25
["get_lang", "partial", "get", "isinstance", "partial", "isinstance", "NotImplementedError", "func", "sender", "strings", "func", "check_if_is_from_anon_admin", "client.get_chat_member", "message.reply_text", "strings", "send_anon_admin_button", "client.listen.CallbackQuery", "str", "filters.regex", "partial", "anon_ca...
45
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.admin_echo_cmd", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.ban", "_.content.gdrive.MyDrive.Phd_Thes...
The function (require_admin) defined within the public class called public.The function start at line 171 and ends at 252. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [171.0], and this function return a value. It declares 25.0 functions, It has 25.0 functio...
iiiiii1wepfj_alisurobot
public
public
0
0
bot_check_perms
async def bot_check_perms(client: Client,message: Union[CallbackQuery, Message],permissions: Optional[Union[list, str]],complain_missing_perms: bool,strings,) -> bool:if isinstance(message, CallbackQuery):sender = partial(message.answer, show_alert=True)chat = message.message.chatelse:sender = message.reply_textchat = ...
12
37
5
212
5
255
298
255
client,message,permissions,complain_missing_perms,strings
['missing_perms', 'chat', 'permissions', 'user', 'sender']
bool
{"Assign": 7, "Expr": 3, "For": 1, "If": 9, "Return": 5}
12
44
12
["isinstance", "partial", "client.get_chat_member", "sender", "strings", "isinstance", "getattr", "missing_perms.append", "sender", "format", "strings", "join"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.utils_py.bot_require_admin"]
The function (bot_check_perms) defined within the public class called public.The function start at line 255 and ends at 298. It contains 37 lines of code and it has a cyclomatic complexity of 12. It takes 5 parameters, represented as [255.0] and does not return any value. It declares 12.0 functions, It has 12.0 functio...
iiiiii1wepfj_alisurobot
public
public
0
0
bot_require_admin.bot_require_admin.decorator.wrapper
async def wrapper(client: Client,message: Union[CallbackQuery, Message],*args,**kwargs,):lang = await get_lang(message)strings = partial(get_locale_string,langdict[lang].get("admin", langdict[default_language]["admin"]),lang,"admin",)if isinstance(message, CallbackQuery):sender = partial(message.answer, show_alert=True...
6
41
4
181
0
308
351
308
null
[]
None
null
0
0
0
null
0
null
The function (bot_require_admin.bot_require_admin.decorator.wrapper) defined within the public class called public.The function start at line 308 and ends at 351. It contains 41 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [308.0] and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
bot_require_admin.decorator
def decorator(func):@wraps(func)async def wrapper(client: Client,message: Union[CallbackQuery, Message],*args,**kwargs,):lang = await get_lang(message)strings = partial(get_locale_string,langdict[lang].get("admin", langdict[default_language]["admin"]),lang,"admin",)if isinstance(message, CallbackQuery):sender = partial...
1
4
1
15
0
306
353
306
null
[]
None
null
0
0
0
null
0
null
The function (bot_require_admin.decorator) defined within the public class called public.The function start at line 306 and ends at 353. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
iiiiii1wepfj_alisurobot
public
public
0
0
bot_require_admin
def bot_require_admin(permissions: Union[list, str] = None,allow_in_private: bool = False,complain_missing_perms: bool = True,):def decorator(func):@wraps(func)async def wrapper(client: Client,message: Union[CallbackQuery, Message],*args,**kwargs,):lang = await get_lang(message)strings = partial(get_locale_string,langd...
1
7
3
31
5
301
355
301
permissions,allow_in_private,complain_missing_perms
['lang', 'strings', 'has_perms', 'sender', 'msg']
Returns
{"Assign": 7, "If": 5, "Return": 5}
13
55
13
["get_lang", "partial", "get", "isinstance", "partial", "isinstance", "NotImplementedError", "func", "sender", "strings", "bot_check_perms", "func", "wraps"]
17
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.ban", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.dban", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset...
The function (bot_require_admin) defined within the public class called public.The function start at line 301 and ends at 355. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [301.0], and this function return a value. It declares 13.0 functions, It has 13.0 fun...
iiiiii1wepfj_alisurobot
public
public
0
0
time_extract
async def time_extract(m: Message, t: str):if t[-1] in ["m", "h", "d"]:unit = t[-1]num = t[:-1]if not num.isdigit():return await m.reply_text("Invalid Amount specified")if unit == "m":t_time = int(num) * 60elif unit == "h":t_time = int(num) * 60 * 60elif unit == "d":t_time = int(num) * 24 * 60 * 60else:return 0the_time...
6
17
2
130
4
361
378
361
m,t
['the_time_now', 'num', 'unit', 't_time']
Returns
{"Assign": 6, "If": 5, "Return": 3}
9
18
9
["num.isdigit", "m.reply_text", "int", "int", "int", "time.time", "int", "int", "InvalidTimeUnitStringSpecifiedError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.get_target_user_and_time_and_reason"]
The function (time_extract) defined within the public class called public.The function start at line 361 and ends at 378. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [361.0], and this function return a value. It declares 9.0 functions, It has 9.0 functions...
iiiiii1wepfj_alisurobot
public
public
0
0
remove_escapes
def remove_escapes(text: str) -> str:counter = 0res = ""is_escaped = Falsewhile counter < len(text):if is_escaped:res += text[counter]is_escaped = Falseelif text[counter] == "\\":is_escaped = Trueelse:res += text[counter]counter += 1return res
4
14
1
62
3
381
394
381
text
['counter', 'res', 'is_escaped']
str
{"Assign": 5, "AugAssign": 3, "If": 2, "Return": 1, "While": 1}
1
14
1
["len"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.utils.utils_py.split_quotes"]
The function (remove_escapes) defined within the public class called public.The function start at line 381 and ends at 394. It contains 14 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called i...
iiiiii1wepfj_alisurobot
public
public
0
0
split_quotes
def split_quotes(text: str) -> List:if any(text.startswith(char) for char in START_CHAR):counter = 1# ignore first char -> is some kind of quotewhile counter < len(text):if text[counter] == "\\":counter += 1elif text[counter] == text[0] or (text[0] == SMART_OPEN and text[counter] == SMART_CLOSE):breakcounter += 1else:r...
9
19
1
154
3
397
416
397
text
['counter', 'rest', 'key']
List
{"Assign": 4, "AugAssign": 2, "If": 4, "Return": 3, "While": 1}
10
20
10
["any", "text.startswith", "len", "text.split", "remove_escapes", "strip", "strip", "list", "filter", "text.split"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.custom_filters_py.save_filter", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.notes_py.save_note"]
The function (split_quotes) defined within the public class called public.The function start at line 397 and ends at 416. It contains 19 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0 functions calle...
iiiiii1wepfj_alisurobot
public
public
0
0
button_parser
def button_parser(markdown_note):note_data = ""buttons = []if markdown_note is None:return note_data, buttonsif markdown_note.startswith("/") or markdown_note.startswith("!"):args = markdown_note.split(None, 2)markdown_note = args[2]prev = 0for match in BTN_URL_REGEX.finditer(markdown_note):n_escapes = 0to_check = matc...
10
31
1
226
7
419
453
419
markdown_note
['args', 'to_check', 'markdown_note', 'note_data', 'buttons', 'n_escapes', 'prev']
Returns
{"Assign": 9, "AugAssign": 5, "Expr": 2, "For": 1, "If": 4, "Return": 2, "While": 1}
18
35
18
["markdown_note.startswith", "markdown_note.startswith", "markdown_note.split", "BTN_URL_REGEX.finditer", "match.start", "bool", "match.group", "append", "InlineKeyboardButton", "match.group", "match.group", "buttons.append", "InlineKeyboardButton", "match.group", "match.group", "match.start", "match.end", "match.start...
9
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.custom_filters_py.serve_filter", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.inlines_py.html_inline", "_.content.gdrive...
The function (button_parser) defined within the public class called public.The function start at line 419 and ends at 453. It contains 31 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters, and this function return a value. It declares 18.0 functions, It has 18.0 functions...
iiiiii1wepfj_alisurobot
BotCommands
public
0
0
__init__
def __init__(self):self.commands = {}
1
2
1
11
0
457
458
457
self
[]
None
{"Assign": 1}
0
2
0
[]
8,182
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi...
The function (__init__) defined within the public class called BotCommands.The function start at line 457 and ends at 458. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 8182.0 functions calling this function which are...
iiiiii1wepfj_alisurobot
BotCommands
public
0
0
add_command
def add_command(self,command: str,category: str,description_key: str = None,context_location: str = None,):if context_location is None:# If context_location is not defined, get context from file name who added the commandframe = inspect.stack()[1]context_location = (frame[0].f_code.co_filename.split(os.path.sep)[-1].sp...
4
23
5
130
0
460
483
460
self,command,category,description_key,context_location
[]
None
{"Assign": 4, "Expr": 1, "If": 3}
6
24
6
["inspect.stack", "split", "f_code.co_filename.split", "self.commands.get", "append", "dict"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966383_jfilak_sapcli.sap.cli.core_py.CommandGroup.command"]
The function (add_command) defined within the public class called BotCommands.The function start at line 460 and ends at 483. It contains 23 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [460.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions...
iiiiii1wepfj_alisurobot
BotCommands
public
0
0
get_commands_message
def get_commands_message(self, strings_manager, category: str = None):# TODO: Add pagination support.if category is None:cmds_list = []for category in self.commands:cmds_list += self.commands[category]else:cmds_list = self.commands[category]res = (strings_manager("command_category_title").format(category=strings_manage...
4
17
3
92
0
485
506
485
self,strings_manager,category
[]
Returns
{"Assign": 3, "AugAssign": 2, "Expr": 1, "For": 2, "If": 1, "Return": 1}
5
22
5
["format", "strings_manager", "strings_manager", "cmds_list.sort", "strings_manager"]
0
[]
The function (get_commands_message) defined within the public class called BotCommands.The function start at line 485 and ends at 506. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [485.0], and this function return a value. It declares 5.0 functions, and It...
iiiiii1wepfj_alisurobot
public
public
0
0
get_emoji_regex
def get_emoji_regex():global _EMOJI_REGEXPif not _EMOJI_REGEXP:e_list = [getattr(emoji, e).encode("unicode-escape").decode("ASCII")for e in dir(emoji)if not e.startswith("_")]# to avoid re.error excluding char that start with '*'e_sort = sorted([x for x in e_list if not x.startswith("*")], reverse=True)# Sort emojis by...
6
12
0
83
4
512
526
512
['pattern_', 'e_sort', 'e_list', '_EMOJI_REGEXP']
Returns
{"Assign": 4, "If": 1, "Return": 1}
9
15
9
["decode", "encode", "getattr", "dir", "e.startswith", "sorted", "x.startswith", "join", "re.compile"]
0
[]
The function (get_emoji_regex) defined within the public class called public.The function start at line 512 and ends at 526. It contains 12 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It declares 9.0 functions, and It has 9.0 funct...
iiiiii1wepfj_alisurobot
public
public
0
0
deEmojify
def deEmojify(text: str) -> str:"""Remove emojis and other non-safe characters from string."""return EMOJI_PATTERN.sub("", text)
1
2
1
19
0
532
534
532
text
[]
str
{"Expr": 1, "Return": 1}
1
3
1
["EMOJI_PATTERN.sub"]
15
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3918618_moveangel_one4ubot.userbot.modules.multimemes_py.waifu", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3918618_moveangel_one4ubot.userbot.modules.scrapers_py.translateme", "_.content.gdrive.MyDrive.Phd_Thesi...
The function (deEmojify) defined within the public class called public.The function start at line 532 and ends at 534. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside ...
iiiiii1wepfj_alisurobot
public
public
0
0
shell_exec
async def shell_exec(code, treat=True):process = await asyncio.create_subprocess_shell(code, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT)stdout = (await process.communicate())[0]if treat:stdout = stdout.decode().strip()return stdout, process
2
8
2
65
2
538
546
538
code,treat
['stdout', 'process']
Returns
{"Assign": 3, "If": 1, "Return": 1}
4
9
4
["asyncio.create_subprocess_shell", "process.communicate", "strip", "stdout.decode"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.__main___py.main"]
The function (shell_exec) defined within the public class called public.The function start at line 538 and ends at 546. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [538.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions ca...
iiiiii1wepfj_alisurobot
public
public
0
0
get_format_keys
def get_format_keys(string: str) -> List[str]:"""Return a list of formatting keys present in string."""return [i[1] for i in Formatter().parse(string) if i[1] is not None]
3
2
1
39
0
549
551
549
string
[]
List[str]
{"Expr": 1, "Return": 1}
2
3
2
["parse", "Formatter"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.welcome_py.greet_new_members"]
The function (get_format_keys) defined within the public class called public.The function start at line 549 and ends at 551. It contains 2 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions calle...
iiiiii1wepfj_alisurobot
public
public
0
0
check_if_ban_time_range
def check_if_ban_time_range(sec, unix_time_int):the_sec = sec - unix_time_intif the_sec in range(30, 31622400):return Trueelse:return False
2
6
2
28
1
554
559
554
sec,unix_time_int
['the_sec']
Returns
{"Assign": 1, "If": 1, "Return": 2}
1
6
1
["range"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.tban", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95050229_iiiiii1wepfj_alisurobot.alisu.plugins.admin_py.tmute"]
The function (check_if_ban_time_range) defined within the public class called public.The function start at line 554 and ends at 559. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [554.0], and this function return a value. It declare 1.0 function, It has 1.0 f...
pystorm_streamparse
public
public
0
0
get_version
def get_version():with open("streamparse/version.py") as version_file:return re.search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""", version_file.read()).group("version")
1
4
0
31
0
22
26
22
null
[]
None
null
0
0
0
null
0
null
The function (get_version) defined within the public class called public.The function start at line 22 and ends at 26. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
pystorm_streamparse
public
public
0
0
readme
def readme():""" Returns README.rst contents as str """with open("README.rst") as f:return f.read()
1
3
0
19
0
29
32
29
null
[]
None
null
0
0
0
null
0
null
The function (readme) defined within the public class called public.The function start at line 29 and ends at 32. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
pystorm_streamparse
public
public
0
0
retry.retry.decorator.wrapper
def wrapper(*args, **kwargs):mtries, mdelay = tries, delaywhile mtries > 0:try:return func(*args, **kwargs)except Exception as e:if not isinstance(e, safe_exc_types):raise emtries -= 1time.sleep(mdelay)mdelay *= backoff
4
11
2
61
0
18
30
18
null
[]
None
null
0
0
0
null
0
null
The function (retry.retry.decorator.wrapper) defined within the public class called public.The function start at line 18 and ends at 30. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [18.0] and does not return any value..
pystorm_streamparse
public
public
0
0
retry.decorator
def decorator(func):def wrapper(*args, **kwargs):mtries, mdelay = tries, delaywhile mtries > 0:try:return func(*args, **kwargs)except Exception as e:if not isinstance(e, safe_exc_types):raise emtries -= 1time.sleep(mdelay)mdelay *= backoffwrapper.__doc__ = func.__doc__wrapper.__name__ = func.__name__return wrapper
1
5
1
23
0
17
34
17
null
[]
None
null
0
0
0
null
0
null
The function (retry.decorator) defined within the public class called public.The function start at line 17 and ends at 34. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
pystorm_streamparse
public
public
0
0
retry
def retry(tries, delay=3, backoff=2, safe_exc_types=None):"""Retry a function call."""if safe_exc_types is None:# By default, all exception types are "safe" and retriedsafe_exc_types = (Exception,)def decorator(func):def wrapper(*args, **kwargs):mtries, mdelay = tries, delaywhile mtries > 0:try:return func(*args, **kwa...
2
5
4
33
1
11
36
11
null
['safe_exc_types']
None
null
0
0
0
null
0
null
The function (retry) defined within the public class called public.The function start at line 11 and ends at 36. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [11.0] and does not return any value..
pystorm_streamparse
public
public
0
0
random_pixel_generator
def random_pixel_generator():urls = ("http://example.com/","http://example.com/article1","http://example.com/article2","http://example.com/article3",)while True:ip = f"192.168.0.{random.randint(0, 255)}"url = random.choice(urls)ts = int(time.time() + random.randint(0, 30))yield {"ip": ip, "url": url, "ts": ts}
2
12
0
64
4
39
50
39
null
['url', 'ip', 'ts', 'urls']
None
null
0
0
0
null
0
null
The function (random_pixel_generator) defined within the public class called public.The function start at line 39 and ends at 50. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
pystorm_streamparse
public
public
0
0
seed_kafka
def seed_kafka(kafka_hosts="streamparse-box:9092", topic_name="pixels", num_pixels=100000):"""Seed the local Kafka cluster's "pixels" topic with sample pixel data."""kafka = KafkaClient(kafka_hosts)producer = SimpleProducer(kafka)# producer = SimpleProducer(kafka, batch_send=True, batch_send_every_n=1000,# batch_send_e...
3
19
3
111
4
54
76
54
null
['pixel', 'producer', 'kafka', 'pixels']
None
null
0
0
0
null
0
null
The function (seed_kafka) defined within the public class called public.The function start at line 54 and ends at 76. It contains 19 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [54.0] and does not return any value..
pystorm_streamparse
public
public
0
0
unpack
def unpack(sources):temp_dir = tempfile.mkdtemp("-scratchdir", "unpacker-")for package, content in sources.items():filepath = package.split("/")dirpath = os.sep.join(filepath[:-1])packagedir = os.path.join(temp_dir, dirpath)if not os.path.isdir(packagedir):os.makedirs(packagedir)mod = open(os.path.join(packagedir, file...
4
14
1
121
5
21,495
21,508
21,495
null
['mod', 'temp_dir', 'filepath', 'packagedir', 'dirpath']
None
null
0
0
0
null
0
null
The function (unpack) defined within the public class called public.The function start at line 21495 and ends at 21508. It contains 14 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
pystorm_streamparse
public
public
0
0
initialize
def initialize(self, conf, ctx):self.counts = Counter()
1
2
3
16
0
9
10
9
null
[]
None
null
0
0
0
null
0
null
The function (initialize) defined within the public class called public.The function start at line 9 and ends at 10. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [9.0] and does not return any value..
pystorm_streamparse
public
public
0
0
group_key
def group_key(self, tup):url = tup.values[2]return url
1
3
2
17
0
12
14
12
null
[]
None
null
0
0
0
null
0
null
The function (group_key) defined within the public class called public.The function start at line 12 and ends at 14. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [12.0] and does not return any value..
pystorm_streamparse
public
public
0
0
process_batch
def process_batch(self, key, tups):self.counts[key] += len(tups)self.emit([key, self.counts[key]])
1
3
3
35
0
16
18
16
null
[]
None
null
0
0
0
null
0
null
The function (process_batch) defined within the public class called public.The function start at line 16 and ends at 18. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [16.0] and does not return any value..
pystorm_streamparse
public
public
0
0
process
def process(self, tup):# Exceptions are automatically caught and reportedmsg = json.loads(tup.values[0])ip = msg.get("ip")ts = msg.get("ts")url = msg.get("url")self.emit([ip, ts, url])# auto anchored
1
6
2
56
0
8
14
8
null
[]
None
null
0
0
0
null
0
null
The function (process) defined within the public class called public.The function start at line 8 and ends at 14. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [8.0] and does not return any value..
pystorm_streamparse
public
public
0
0
initialize
def initialize(self, conf, ctx):self.counter = Counter()self.total = 0
1
3
3
21
0
11
13
11
null
[]
None
null
0
0
0
null
0
null
The function (initialize) defined within the public class called public.The function start at line 11 and ends at 13. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [11.0] and does not return any value..
pystorm_streamparse
public
public
0
0
_increment
def _increment(self, word, inc_by):self.counter[word] += inc_byself.total += inc_by
1
3
3
22
0
15
17
15
null
[]
None
null
0
0
0
null
0
null
The function (_increment) defined within the public class called public.The function start at line 15 and ends at 17. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [15.0] and does not return any value..