repo_name
stringlengths
7
65
path
stringlengths
5
185
copies
stringlengths
1
4
size
stringlengths
4
6
content
stringlengths
977
990k
license
stringclasses
14 values
hash
stringlengths
32
32
line_mean
float64
7.18
99.4
line_max
int64
31
999
alpha_frac
float64
0.25
0.95
ratio
float64
1.5
7.84
autogenerated
bool
1 class
config_or_test
bool
2 classes
has_no_keywords
bool
2 classes
has_few_assignments
bool
1 class
indico/indico
indico/modules/events/agreements/blueprint.py
2
3015
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.events.agreements.controllers import (RHAgreementForm, RHAgreementManager, ...
mit
0807210e3cabfcfcfb990c588bcef222
67.522727
119
0.627197
4.246479
false
false
false
false
indico/indico
indico/modules/events/contributions/operations.py
2
10060
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import session from indico.core import signals from indico.core.db import db from indico.core....
mit
339aa1055c854b05e585eaf2bd17800b
50.326531
117
0.671968
4.21273
false
false
false
false
indico/indico
indico/core/oauth/models/personal_tokens.py
2
2517
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from authlib.common.security import generate_token from authlib.oauth2.rfc6749 import list_to_scope from s...
mit
b8528871fdcd0fd4d6c4e22d3b5b8d0c
31.269231
111
0.64124
3.83105
false
false
false
false
indico/indico
indico/web/util.py
2
15935
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import hashlib import sys from datetime import datetime import sentry_sdk from authlib.oauth2 import OAut...
mit
b5e6f506407b8a6ea48535543cf2a9d9
37.213429
120
0.646125
4.038267
false
false
false
false
indico/indico
indico/testing/fixtures/disallow.py
2
1048
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from smtplib import SMTP import pytest @pytest.fixture(autouse=True) def disallow_emails(monkeypatch): ...
mit
3c0f25692047b8896bf2dd6cac4f164f
28.111111
67
0.675573
3.954717
false
true
false
false
indico/indico
indico/core/marshmallow.py
2
4720
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from inspect import getmro from flask_marshmallow import Marshmallow from flask_marshmallow.sqla import S...
mit
529d13b5273318e23da0d5824272852a
39
110
0.685805
3.878389
false
false
false
false
indico/indico
indico/modules/files/tasks.py
2
1946
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import timedelta from celery.schedules import crontab from sqlalchemy.orm.attributes import...
mit
2ee9f428a7cec39817f0da1ea000fd18
39.541667
102
0.638746
4.06263
false
true
false
false
indico/indico
indico/modules/events/models/static_list_links.py
2
3436
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from uuid import UUID, uuid4 from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.dialects.po...
mit
3f066dd06575dcebbf766daf903d1a05
27.87395
91
0.597206
3.944891
false
false
false
false
indico/indico
indico/core/oauth/models/tokens.py
2
3814
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from dataclasses import dataclass, field from datetime import datetime, timedelta from authlib.oauth2.rfc...
mit
9525d26d1b82f47099c55b4865cc0a45
24.092105
111
0.628736
3.81019
false
false
false
false
indico/indico
indico/core/celery/__init__.py
2
2884
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import timedelta from celery.schedules import crontab from celery.signals import beat_init,...
mit
f6357650b1d14b4dffcd5034d27e3c2a
31.044444
117
0.721221
3.564895
false
false
false
false
indico/indico
indico/modules/events/registration/logging.py
2
2980
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import session from indico.core import signals from indico.modules.events import EventLogRealm...
mit
974a578a2c5c6a9e5bf38d3b6d67ca5b
47.064516
112
0.690604
4.3377
false
false
false
false
indico/indico
indico/modules/events/registration/util.py
1
41738
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import csv import itertools from operator import attrgetter from flask import json, session from marshmal...
mit
be01c633b5deb4e51a35f237b8ecb857
47.085253
120
0.654823
4.115362
false
false
false
false
indico/indico
indico/core/oauth/models/applications.py
2
8119
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from uuid import uuid4 from authlib.oauth2.rfc6749 import ClientMixin, list_to_scope, scope_to_list from ...
mit
6ce73c35ee90c98a3491e390cea746e6
30.468992
106
0.614115
4.079899
false
false
false
false
indico/indico
indico/modules/api/controllers.py
2
5617
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import flash, redirect, request, session from werkzeug.exceptions import BadRequest, Forbidden ...
mit
11adc827a2e362d8aadd8393c875e7a2
39.121429
116
0.62115
3.93623
false
false
false
false
indico/indico
indico/modules/groups/forms.py
2
1349
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms.fields import BooleanField, SelectField, StringField from wtforms.validators import DataRequi...
mit
b7fd98261ae0414b3878cce1b36de69e
35.459459
93
0.702001
3.898844
false
false
false
false
indico/indico
indico/modules/rb/models/blocking_principals.py
2
1154
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from sqlalchemy.ext.declarative import declared_attr from indico.core.db import db from indico.core.db.sq...
mit
11a9d9a999d5156c820185570ecacd62
26.47619
65
0.652513
3.746753
false
false
false
false
indico/indico
indico/util/date_time.py
2
15456
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import re from collections import Counter from datetime import datetime from datetime import time as dt_ti...
mit
8167b5df87a1d3fc878db8661e99e3dd
35.539007
103
0.631276
3.79941
false
false
false
false
indico/indico
indico/modules/users/blueprint.py
1
6719
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import request from indico.modules.users.api import RHUserAPI from indico.modules.users.contro...
mit
5422e69c0249913da2c313e50a307fe0
64.872549
119
0.672421
3.534456
false
false
false
false
indico/indico
indico/modules/users/api.py
2
1490
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import jsonify, session from indico.modules.users import User from indico.web.http_api.hooks.b...
mit
d2da97bafb59b9b02f16eb418141982d
31.391304
106
0.65302
3.556086
false
false
false
false
indico/indico
indico/modules/rb/notifications/reservation_occurrences.py
1
2133
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.notifications import email_sender, make_email from indico.modules.rb.notifications.reserv...
mit
eb0a1e3f99de40a19731114303beee0f
40.019231
104
0.728083
3.829443
false
false
false
false
indico/indico
indico/modules/rb/tasks.py
2
8420
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import date, datetime from itertools import groupby from operator import attrgetter from ce...
mit
95e0b7729c925bd14dcb0e9b3aa1649e
47.953488
116
0.636936
4.089364
false
false
false
false
indico/indico
indico/modules/attachments/models/legacy_mapping.py
2
3908
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from sqlalchemy.ext.declarative import declared_attr from indico.core.db import db from indico.core.db.sq...
mit
818abd7e8fe02bcee7af77f0dbdd4813
26.716312
100
0.606704
4.045549
false
false
false
false
indico/indico
indico/modules/events/layout/forms.py
1
9836
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms.fields import BooleanField, SelectField, TextAreaField, URLField from wtforms.fields.simple i...
mit
9aaedf08dfca6e482675ef160393ddd7
49.701031
120
0.626983
4.267245
false
false
false
false
indico/indico
indico/modules/events/papers/notifications.py
1
5562
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import session from indico.core.notifications import make_email, send_email from indico.module...
mit
0a899061c5ac7482e477edd42736b9aa
50.981308
117
0.684646
3.725385
false
false
false
false
indico/indico
indico/core/signals/attachments.py
2
2311
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() folder_created = _signals.signal('folder-created'...
mit
52bcc2022437be89344ac28b3904b2f4
35.109375
71
0.742536
3.871022
false
false
false
false
indico/indico
indico/migrations/versions/20210804_1211_9d00917b2fa8_add_event_category_request.py
2
3020
"""Add event category request Revision ID: 9d00917b2fa8 Revises: 4b097412a8d9 Create Date: 2021-07-15 12:11:28.157824 """ from enum import Enum import sqlalchemy as sa from alembic import op from indico.core.db.sqlalchemy import PyIntEnum, UTCDateTime # revision identifiers, used by Alembic. revision = '9d00917b2f...
mit
ec320fc5bae917e3a5deb6a3c0ff7dbb
39.810811
118
0.665894
3.784461
false
false
false
false
indico/indico
indico/modules/auth/controllers.py
1
35147
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import flash, jsonify, redirect, render_template, request, session from itsdangerous import Bad...
mit
788658735e2870e485a830c63667b5a9
44.645455
119
0.628332
4.201171
false
false
false
false
indico/indico
indico/modules/events/papers/models/papers.py
1
3550
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.settings import AttributeProxyProperty from indico.modules.events.models.reviews import P...
mit
2ea9e848d29accf0369461aef7382a2d
31.568807
87
0.67662
3.948832
false
false
false
false
indico/indico
indico/modules/networks/controllers.py
2
3297
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import request, session from sqlalchemy.orm import contains_eager from indico.core.db import d...
mit
85eef2df6ac53e675dd4670463676955
36.465909
120
0.688808
3.986699
false
false
false
false
indico/indico
indico/util/fs.py
2
7627
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import errno import hashlib import os import re import time from datetime import datetime from werkzeug.u...
mit
3a3e28a3fe08f49f6a8338aa2ae23864
34.310185
95
0.639832
4.249025
false
false
false
false
indico/indico
indico/core/db/sqlalchemy/review_questions.py
2
3849
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.ext.declarative import declared_attr from...
mit
77cf508b7394f2ac196415f4bf832cf6
25.183673
113
0.563003
4.021944
false
false
false
false
indico/indico
indico/web/http_api/metadata/serializer.py
2
1523
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. class Serializer: schemaless = True encapsulate = True registry = {} def __init__(self,...
mit
581635299c9b5e9d75a867ffd22dcba1
26.196429
79
0.633618
3.905128
false
false
false
false
indico/indico
indico/modules/logs/util.py
1
7296
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import re from datetime import datetime, timedelta from difflib import SequenceMatcher from enum import En...
mit
c2caee160d65de409aedcb9fda26fe18
38.437838
98
0.576343
3.68671
false
false
false
false
indico/indico
indico/modules/auth/blueprint.py
2
2168
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import request from indico.modules.auth.controllers import (RHAccounts, RHAdminImpersonate, RH...
mit
e89f75911f44b249da014560c620ec7c
46.130435
113
0.690959
3.174231
false
false
false
false
indico/indico
indico/migrations/versions/20191108_1713_4e459d27adab_add_tables_for_editing_revisions.py
5
5709
"""Add tables for editing revisions Revision ID: 4e459d27adab Revises: 39a25a873063 Create Date: 2019-11-08 17:13:48.096553 """ import sqlalchemy as sa from alembic import op from indico.core.db.sqlalchemy import PyIntEnum, UTCDateTime from indico.modules.events.editing.models.editable import EditableType from indic...
mit
41cc975778fac435c027b1099a8151cd
45.795082
109
0.644596
3.695146
false
false
false
false
indico/indico
indico/modules/vc/blueprint.py
2
2766
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.vc.controllers import (RHVCEventPage, RHVCManageAttach, RHVCManageEvent, RHVCManageEve...
mit
21bc62558fad7a2dce87090334db1e3c
57.851064
115
0.685466
3.431762
false
false
false
false
indico/indico
indico/modules/categories/controllers/display.py
1
29356
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import date, datetime, time, timedelta from functools import partial from io import BytesIO ...
mit
3357fde909e9c56e109a57c4a6541d63
45.375987
120
0.616331
3.968636
false
false
false
false
indico/indico
indico/modules/events/registration/settings.py
2
3026
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.settings.converters import EnumConverter from indico.modules.designer import PageOrientat...
mit
147243bf345de01bd06aa889d8cf9950
39.346667
111
0.65499
3.92987
false
false
false
false
indico/indico
indico/modules/events/surveys/blueprint.py
2
6649
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.events.surveys.controllers.display import RHSaveSurveyAnswers, RHSubmitSurvey, RHSurve...
mit
3f4964ee5103d0e9c1e4c015d3bd3d47
73.707865
120
0.600993
3.743806
false
false
false
false
indico/indico
indico/web/forms/util.py
2
2597
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from copy import deepcopy from wtforms.fields.core import UnboundField def get_form_field_names(form_cl...
mit
bae9a6988ece751dcabe64b2ba271571
37.761194
84
0.648826
4.202265
false
false
false
false
indico/indico
indico/modules/rb/controllers/backend/blockings.py
2
4126
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import jsonify, request, session from webargs import fields from werkzeug.exceptions import For...
mit
e267862a54f50eb2aedbe1dab114bf1c
35.513274
103
0.673776
3.654562
false
false
false
false
indico/indico
indico/modules/rb/user_prefs.py
2
2767
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from sqlalchemy import func from indico.modules.rb.models.rooms import Room from indico.modules.rb.operat...
mit
3d78b1823b7b118b8ec9ea5e455da84c
47.54386
114
0.536321
4.820557
false
false
false
false
indico/indico
indico/web/forms/fields/sqlalchemy.py
2
1429
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms.widgets import CheckboxInput from wtforms_sqlalchemy.fields import QuerySelectMultipleField ...
mit
1fd1bdd847ef21efb97f4b5db51b4e3d
34.725
96
0.707488
3.904372
false
false
false
false
indico/indico
bin/utils/create_module.py
2
6552
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os import re import textwrap from collections import defaultdict from datetime import date import ...
mit
9d954ffccf44ea2fd0f20940dd6c2cee
38
117
0.601801
3.64
false
false
false
false
indico/indico
indico/util/signals.py
2
6319
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import functools import inspect from itertools import zip_longest from types import GeneratorType def va...
mit
543141137c40fbbd0d54e88dfdb22d8c
44.460432
115
0.642823
4.400418
false
false
false
false
indico/indico
indico/util/caching_test.py
2
1140
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import pytest from indico.util.caching import memoize_request @pytest.fixture def not_testing(app_conte...
mit
6f41b2523fb8e7e686d445e0a8c41428
22.75
63
0.601754
3.031915
false
true
false
false
indico/indico
indico/modules/events/contributions/fields.py
2
4133
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms import ValidationError from indico.core.db.sqlalchemy.util.session import no_autoflush from ...
mit
af94942dbe6426ec0ad5c87722c73c36
43.923913
112
0.639971
3.970221
false
false
false
false
indico/indico
indico/modules/cephalopod/forms.py
2
1075
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms import BooleanField, StringField from wtforms.fields import EmailField from wtforms.validator...
mit
475dbfe5181db8a554fc7db7bbdabe6e
43.791667
112
0.706977
4.352227
false
false
false
false
indico/indico
indico/util/caching.py
2
3164
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from functools import wraps from inspect import getcallargs from flask import current_app, g, has_request...
mit
4794b7b4d6169cf41a93502be1dc35eb
30.019608
104
0.611884
3.835152
false
false
false
false
indico/indico
indico/vendor/django_mail/encoding_utils.py
2
2151
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. # The code in here is taken almost verbatim from `django.utils.encoding`, # which is licensed under the th...
mit
09418c3e7f9790f03ab9ec0293b5e809
26.227848
77
0.652255
3.834225
false
false
false
false
indico/indico
indico/web/breadcrumbs.py
2
3057
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from dataclasses import dataclass from flask import render_template, session from indico.util.i18n impor...
mit
c551b15ea67a9bedc6714ad3b5e7a4ac
40.876712
118
0.629375
4.404899
false
false
false
false
indico/indico
indico/modules/files/models/files.py
2
2569
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import posixpath from uuid import uuid4 from sqlalchemy.dialects.postgresql import JSONB, UUID from indi...
mit
9e100fd18902317048d498055afb9b02
30.329268
106
0.650448
3.834328
false
false
false
false
indico/indico
indico/modules/events/registration/placeholders/registrations.py
2
3600
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from markupsafe import Markup from indico.modules.events.registration.models.items import PersonalDataTyp...
mit
815c9373d056a19e9658ea7e66a62c17
31.142857
114
0.660556
4.195804
false
false
false
false
indico/indico
indico/modules/events/__init__.py
1
8310
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import re from flask import flash, redirect, request, session from werkzeug.exceptions import BadRequest,...
mit
817ec9c6f704bc881472aab778afd7ce
39.536585
118
0.712515
3.724787
false
false
false
false
indico/indico
indico/modules/events/timetable/forms.py
1
10364
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import datetime, timedelta from flask import request from pytz import utc from wtforms.fiel...
mit
b8b03347102280647df80963659f9188
49.556098
116
0.622057
4.488523
false
false
false
false
indico/indico
indico/modules/categories/controllers/base.py
2
1905
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import request, session from werkzeug.exceptions import Forbidden, NotFound from indico.module...
mit
18bd874889d5274eb63daa53128ef5d8
33.017857
97
0.661417
3.977035
false
false
false
false
indico/indico
indico/modules/rb/controllers/backend/admin.py
1
17495
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from io import BytesIO from flask import jsonify, request, session from marshmallow import missing from P...
mit
1ff0a1f4f7df0f1d774eca054e8548c4
37.366228
120
0.649214
3.694826
false
false
false
false
wandb/client
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_input_field_names.py
3
1187
from ...error import GraphQLError from .base import ValidationRule class UniqueInputFieldNames(ValidationRule): __slots__ = 'known_names', 'known_names_stack' def __init__(self, context): super(UniqueInputFieldNames, self).__init__(context) self.known_names = {} self.known_names_stack...
mit
d5bc22827737ddddee8a015fdacba853
34.969697
81
0.636057
3.841424
false
false
false
false
wandb/client
tests/utils/dummy_data.py
1
1735
import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np from bokeh.plotting import figure def matplotlib_multiple_axes_figures(total_plot_count=3, data=[1, 2, 3]): """Helper generator which create a figure containing up to `total_plot_count` axes and optionally adds `data...
mit
199c17201e071f4ba68782acbc03e492
28.913793
82
0.584438
3.401961
false
false
false
false
wandb/client
wandb/filesync/stats.py
1
2840
import sys import threading from typing import Mapping, MutableMapping, TYPE_CHECKING import wandb if TYPE_CHECKING: if sys.version_info >= (3, 8): from typing import TypedDict else: from typing_extensions import TypedDict class FileStats(TypedDict): deduped: bool total: ...
mit
b4dfe0e6a8b09c222477704b804b0907
32.411765
184
0.554577
3.858696
false
false
false
false
wandb/client
wandb/vendor/pygments/filter.py
29
2038
# -*- coding: utf-8 -*- """ pygments.filter ~~~~~~~~~~~~~~~ Module that implements the default filter. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ def apply_filters(stream, filters, lexer=None): """ Use this method to app...
mit
326a8a11505e602f36e1fc813125d7b4
26.540541
71
0.597154
4.528889
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/oberon.py
29
3733
# -*- coding: utf-8 -*- """ pygments.lexers.oberon ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Oberon family languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, words from pygmen...
mit
00119bcf54e3fdbd0880aa398c8c31f5
34.552381
89
0.444147
3.797558
false
false
false
false
wandb/client
wandb/sdk/lib/preinit.py
1
1452
from typing import Any, Callable, Optional import wandb class PreInitObject: def __init__(self, name: str, destination: Optional[Any] = None) -> None: self._name = name if destination is not None: self.__doc__ = destination.__doc__ def __getitem__(self, key: str) -> None: ...
mit
6c0e6a8abeaf6384d8dbe8098bfe8e0c
33.571429
86
0.593664
3.532847
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/asm.py
18
25261
# -*- coding: utf-8 -*- """ pygments.lexers.asm ~~~~~~~~~~~~~~~~~~~ Lexers for assembly languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, using, words, \ ...
mit
058bb28421f29d141aca8b44a414b93a
38.408736
94
0.471478
3.300797
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/_tsql_builtins.py
29
15484
# -*- coding: utf-8 -*- """ pygments.lexers._tsql_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These are manually translated lists from https://msdn.microsoft.com. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # See https://msdn.microsof...
mit
c1238c96a0440576e0760547d6742b0c
14.422311
76
0.47139
3.297977
false
false
false
false
wandb/client
wandb/sdk/data_types/helper_types/bounding_boxes_2d.py
1
14298
import numbers from typing import Optional, Type, TYPE_CHECKING, Union import wandb from wandb import util from wandb.util import has_num from ..base_types.json_metadata import JSONMetadata if TYPE_CHECKING: # pragma: no cover from wandb.apis.public import Artifact as PublicArtifact from ...wandb_artifacts...
mit
25315f55405e4216baa8c2ad94ec3664
42.858896
116
0.491817
4.743862
false
false
false
false
wandb/client
wandb/filesync/dir_watcher.py
1
15716
import abc import fnmatch import glob import logging import os import queue import time from typing import ( Any, Mapping, MutableMapping, MutableSet, NewType, Optional, TYPE_CHECKING, ) from wandb import util from wandb.sdk.interface.interface import GlobStr if TYPE_CHECKING: from wan...
mit
ee8fdbd0a122ebff1f4013dc2bbce771
38.487437
102
0.582782
3.949736
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/capnproto.py
24
2188
# -*- coding: utf-8 -*- """ pygments.lexers.capnproto ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for the Cap'n Proto schema language. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, default from...
mit
9c309a3597f54614fbff1ce9e5ccb629
27.051282
75
0.420932
3.727428
false
false
false
false
wandb/client
tests/standalone_tests/artifact_load.py
1
17232
"""Artifact load test. For a single artifact named A: - test phase (run max T seconds) - generate 100k random files of size S - have W parallel writer processes that create new versions for A from a random subset of those files - have R parallel reader processes randomly pick a version from A, download it, and v...
mit
f5ce75b4ab5d8a850acdcd6d5b22406a
32.65625
111
0.594127
3.877588
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/markup.py
24
20452
# -*- coding: utf-8 -*- """ pygments.lexers.markup ~~~~~~~~~~~~~~~~~~~~~~ Lexers for non-HTML markup languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexers.html import HtmlLexer, XmlLexer from pygme...
mit
4b6866cc63aae036df0644173a9519a7
33.373109
110
0.464209
3.641738
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/parsers.py
24
27582
# -*- coding: utf-8 -*- """ pygments.lexers.parsers ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for parser generators. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, DelegatingLexer, \ include...
mit
758600707a784bd71f63c4a260ff6718
32.032335
93
0.464107
3.838297
false
false
false
false
wandb/client
tools/coverage-tool.py
1
6273
#!/usr/bin/env python """Helper for codecov at wandb Usage: ./tools/coverage-tool.py jobs ./tools/coverage-tool.py jobs | wc -l ./tools/coverage-tool.py check """ import argparse import copy import itertools import sys import yaml def find_list_of_key_locations_and_dicts(data, search_key: str, root=Non...
mit
32cf6e05f91976a06d1503dd7d304c60
31.335052
86
0.587438
3.818016
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/dotnet.py
19
27668
# -*- coding: utf-8 -*- """ pygments.lexers.dotnet ~~~~~~~~~~~~~~~~~~~~~~ Lexers for .net languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, ...
mit
9deaaaee3042c9e7a09643e49be80524
39.040521
99
0.440617
3.52055
false
false
false
false
wandb/client
wandb/integration/sb3/sb3.py
1
4841
"""W&B callback for sb3 Really simple callback to get logging for each tree Example usage: ```python import gym from stable_baselines3 import PPO from stable_baselines3.common.monitor import Monitor from stable_baselines3.common.vec_env import DummyVecEnv, VecVideoRecorder import wandb from wandb.integration.sb3 imp...
mit
2d08a92d3b7e62aa95005eb7f6aa76f7
31.489933
129
0.605453
3.599257
false
true
false
false
wandb/client
tests/standalone_tests/artifact_object_reference_test.py
1
32651
# Suggest running as: WANDB_BASE_URL=http://api.wandb.test python artifact_object_reference_test.py import base64 import binascii from math import cos, pi, sin import os import shutil import time from bokeh.plotting import figure import numpy as np import wandb from wandb.sdk.interface import artifacts WANDB_PROJECT...
mit
f602033acf92e39f99a6f1180e1aec1c
33.297269
115
0.580289
3.403273
false
true
false
false
wandb/client
wandb/vendor/pygments/lexers/_scilab_builtins.py
29
52405
# -*- coding: utf-8 -*- """ pygments.lexers._scilab_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Builtin list for the ScilabLexer. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Autogenerated commands_kw = ( 'abort', 'apropos...
mit
dbb7932691a59b14d752e6bd82eaf32c
15.937621
76
0.450358
2.566231
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/varnish.py
24
7265
# -*- coding: utf-8 -*- """ pygments.lexers.varnish ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Varnish configuration :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, bygroups, using, this, \ ...
mit
7a0279503e744658c436c46a50153996
37.236842
90
0.476944
3.630685
false
false
false
false
wandb/client
wandb/sdk/internal/stats.py
1
10368
import json import platform import subprocess import threading import time from typing import Dict, List, Optional, Union import psutil import wandb from wandb import util from wandb.vendor.pynvml import pynvml from . import tpu from .settings_static import SettingsStatic from ..interface.interface_queue import Inter...
mit
e62523fc000ce3cd1ccdacc02fe2b3b2
36.978022
105
0.547454
4.046838
false
false
false
false
wandb/client
wandb/vendor/pygments/formatters/other.py
29
5162
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
mit
d0498ed80f7475f04936349a34bd7b3d
31.2625
77
0.559086
4.345118
false
true
false
false
wandb/client
wandb/sdk/data_types/histogram.py
1
3224
import sys from typing import Optional, Sequence, Tuple, TYPE_CHECKING, Union from wandb import util from .base_types.wb_value import WBValue if TYPE_CHECKING: # pragma: no cover import numpy as np # type: ignore from ..wandb_artifacts import Artifact as LocalArtifact from ..wandb_run import Run as Lo...
mit
79e1054654483b1b7a755ad782e7c77c
33.297872
108
0.579404
4.149292
false
false
false
false
wandb/client
wandb/sdk/service/streams.py
1
11527
"""streams: class that manages internal threads for each run. StreamThread: Thread that runs internal.wandb_internal() StreamRecord: All the external state for the internal thread (queues, etc) StreamAction: Lightweight record for stream ops for thread safety with grpc StreamMux: Container for dictionary of stream thr...
mit
78e23a4622ab2fd2a7d8aa3612a04e82
33.408955
102
0.593303
4.083245
false
false
false
false
wandb/client
tests/unit_tests/tests_launch/test_launch_gcp.py
1
7806
import subprocess from google.cloud import aiplatform import wandb from wandb.errors import LaunchError import wandb.sdk.launch.launch as launch from wandb.sdk.launch.runner.gcp_vertex import get_gcp_config, run_shell import pytest from .test_launch import mocked_fetchable_git_repo, mock_load_backend # noqa: F401 ...
mit
2c6189fa1b9879fad89b9dc913ec11d4
27.593407
85
0.585575
3.580734
false
true
false
false
wandb/client
wandb/sdk/wandb_manager.py
1
5370
"""Manage wandb processes. Create a grpc manager channel. """ import atexit import os from typing import Any, Callable, Dict, Optional, TYPE_CHECKING from wandb import env, trigger from wandb.sdk.lib.exit_hooks import ExitHooks from wandb.sdk.lib.proto_util import settings_dict_from_pbmap if TYPE_CHECKING: fro...
mit
f226a13efec900382e5b72fcc1d60dff
29.685714
88
0.605587
3.718837
false
false
false
false
wandb/client
wandb/sklearn/calculate/feature_importances.py
1
2261
from warnings import simplefilter import numpy as np import wandb # ignore all future warnings simplefilter(action="ignore", category=FutureWarning) def feature_importances(model, feature_names): attributes_to_check = ["feature_importances_", "feature_log_prob_", "coef_"] found_attribute = check_for_attrib...
mit
7f07fd0611cb4e22eeeed0634ee1760e
32.746269
128
0.64927
3.939024
false
false
false
false
wandb/client
tests/functional_tests/t0_main/lightning/pl_base.py
1
1946
from pytorch_lightning import LightningModule import torch from torch.utils.data import Dataset class RandomDataset(Dataset): def __init__(self, size, num_samples): self.len = num_samples self.data = torch.randn(num_samples, size) def __getitem__(self, index): return self.data[index] ...
mit
ed14b712c829424f737274a0d12ec4c1
30.387097
100
0.625385
3.671698
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/ml.py
24
27891
# -*- coding: utf-8 -*- """ pygments.lexers.ml ~~~~~~~~~~~~~~~~~~ Lexers for ML family languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, default, words from...
mit
2412025796b3d79d3934b4165f04031d
35.269181
87
0.456957
3.686847
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/foxpro.py
29
26236
# -*- coding: utf-8 -*- """ pygments.lexers.foxpro ~~~~~~~~~~~~~~~~~~~~~~ Simple lexer for Microsoft Visual FoxPro source code. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer from pygm...
mit
35969d0056aab3347bd004edabb18714
60.299065
80
0.657532
3.257107
false
false
false
false
wandb/client
wandb/sdk/launch/builder/docker.py
1
2702
import logging import os from typing import Any, Dict, Optional import wandb import wandb.docker as docker from wandb.errors import DockerError, LaunchError from wandb.sdk.launch.builder.abstract import AbstractBuilder from .build import ( _create_docker_build_ctx, generate_dockerfile, validate_docker_ins...
mit
49ca1f71d07210b48915d3d461276d17
31.166667
88
0.61621
3.985251
false
false
false
false
wandb/client
wandb/sdk/wandb_helper.py
1
1838
import inspect import types from wandb.errors import UsageError from .lib import config_util def parse_config(params, exclude=None, include=None): if exclude and include: raise UsageError("Expected at most only one of exclude or include") if isinstance(params, str): params = config_util.dict...
mit
491faeec750ec4ec004f254322365078
33.037037
84
0.630577
4.004357
false
true
false
false
wandb/client
wandb/sdk/service/service.py
1
3924
"""Reliably launch and connect to backend server process (wandb service). Backend server process can be connected to using tcp sockets or grpc transport. """ import os import subprocess import sys import tempfile import time from typing import Any, Dict, Optional from . import port_file from .service_base import Ser...
mit
438b3945f9c12a7821a83ae77f800314
31.163934
99
0.551733
4.242162
false
false
false
false
wandb/client
wandb/proto/wandb_server_pb2_grpc.py
1
62511
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from wandb.proto import wandb_internal_pb2 as wandb_dot_proto_dot_wandb__internal__pb2 from wandb.proto import wandb_server_pb2 as wandb_dot_proto_dot_wandb__ser...
mit
699c7013f18a1bcbd7b5b08e24eab01a
50.071078
126
0.645022
4.262889
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/nimrod.py
29
5174
# -*- coding: utf-8 -*- """ pygments.lexers.nimrod ~~~~~~~~~~~~~~~~~~~~~~ Lexer for the Nim language (formerly known as Nimrod). :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include...
mit
f468ceb95eb4d4bb527b4bc1b8d61c46
31.540881
80
0.410128
3.258186
false
false
false
false
wandb/client
wandb/integration/magic.py
1
17242
import argparse import copy import json import os import re import sys import wandb from wandb import trigger from wandb.util import add_import_hook, get_optional_module import yaml _import_hook = None _run_once = False _args_argparse = None _args_system = None _args_absl = None _magic_init_seen = False _magic_confi...
mit
7b67b3bc16a8a301edf0bfd3df3ae806
30.066667
103
0.552256
3.834964
false
true
false
false
wandb/client
wandb/vendor/graphql-core-1.1/wandb_graphql/execution/middleware.py
2
1719
import inspect from functools import partial from itertools import chain from promise import Promise MIDDLEWARE_RESOLVER_FUNCTION = 'resolve' class MiddlewareManager(object): def __init__(self, *middlewares, **kwargs): self.middlewares = middlewares self.wrap_in_promise = kwargs.get('wrap_in_pr...
mit
eea19783c063bb2498b5e2819fc937b5
29.157895
80
0.670157
3.960829
false
false
false
false
wandb/client
wandb/integration/xgboost/xgboost.py
1
6497
"""xgboost init!""" import json from pathlib import Path from typing import cast, TYPE_CHECKING import warnings import wandb from wandb.sdk.lib import telemetry as wb_telemetry import xgboost as xgb # type: ignore from xgboost import Booster MINIMIZE_METRICS = [ "rmse", "rmsle", "mae", "mape", ...
mit
58479e51a7bffe438be2ad4b54bcf9a3
33.375661
157
0.602432
3.693576
false
false
false
false
wandb/client
wandb/apis/__init__.py
1
1148
""" api. """ import requests from urllib3.exceptions import InsecureRequestWarning from wandb import env from wandb import termwarn from wandb import util if env.ssl_disabled(): # Because third party libraries may also use requests, we monkey patch it globally # and turn off urllib3 warnings instead printing ...
mit
e49608a98d5684ccc400e11727c4f8aa
30.888889
103
0.729094
4.129496
false
false
false
false
wandb/client
wandb/vendor/pygments/lexers/archetype.py
29
11136
# -*- coding: utf-8 -*- """ pygments.lexers.archetype ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Archetype-related syntaxes, including: - ODIN syntax <https://github.com/openEHR/odin> - ADL syntax <http://www.openehr.org/releases/trunk/architecture/am/adl2.pdf> - cADL sub-syntax of ADL For uses ...
mit
de83d191d297727927da9b93be500bb7
34.018868
90
0.431753
3.547627
false
false
false
false
wandb/client
wandb/vendor/graphql-core-1.1/wandb_graphql/utils/ast_to_code.py
3
1200
from ..language.ast import Node from ..language.parser import Loc def ast_to_code(ast, indent=0): """ Converts an ast into a python code representation of the AST. """ code = [] def append(line): code.append((' ' * indent) + line) if isinstance(ast, Node): append('ast.{}('...
mit
128a5659c55926eee69a3dab866ba518
23.489796
78
0.465
3.934426
false
false
false
false
wandb/client
wandb/sdk/interface/message_future_poll.py
1
1389
"""MessageFuturePoll - Derived from MessageFuture but implementing polling loop MessageFuture represents a message result of an asynchronous operation. MessageFuturePoll implements a polling loop to periodically query for a completed async operation. """ import time from typing import Any, Optional from wandb.prot...
mit
e149a336b9a49964b3651907b4db9422
26.78
79
0.586033
4.158683
false
false
false
false
wandb/client
tests/functional_tests/t0_main/mp/03-parent-child.py
1
1455
#!/usr/bin/env python """Test parent and child runs.""" import multiprocessing as mp import os import wandb import yea def process_child(): run_child = wandb.init() run_child.config.id = "child" run_child.name = "child-name" fname = os.path.join("tmp", "03-child.txt") with open(fname, "w") as f...
mit
b549f7ffacef210b4d0c7dffc3428fda
21.045455
72
0.590378
2.951318
false
false
false
false