index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
87,217
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/directives/needpie.py
import os import matplotlib from docutils import nodes from sphinxcontrib.needs.filter_common import FilterBase, filter_needs if not os.environ.get("DISPLAY"): matplotlib.use("Agg") import hashlib import matplotlib.pyplot from docutils.parsers.rst import directives from sphinxcontrib.needs.logging import get_l...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,218
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_broken_doc.py
from nose.tools import raises from sphinx_testing import with_app from sphinxcontrib.needs.api.need import NeedsDuplicatedId @raises(NeedsDuplicatedId) @with_app(buildername="html", srcdir="doc_test/broken_doc") def test_doc_build_html(app, status, warning): app.build() html = (app.outdir / "index.html").rea...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,219
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_add_sections.py
import re from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/add_sections") def test_section_is_usable_in_filters(app, status, warning): app.builder.build_all() html = Path(app.outdir, "index.html").read_text() tables = re.findall("(<table .*?</ta...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,220
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_parallel_execution.py
from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/parallel_doc", parallel=4, warningiserror=True) def test_doc_build_html(app, status, warning): # app.builder.build_all() app.build() html = Path(app.outdir, "index.html").read_text() assert app...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,221
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_styles/test_style_custom.py
from pathlib import Path from sphinx.builders.html import StandaloneHTMLBuilder from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_style_custom") def test_doc_style_custom(app, status, warning): # css_files is not cleared between test runs so css files get # progressively ...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,222
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_api_usage_in_extension.py
import imp import sys from pathlib import Path from sphinx_testing import with_app dummy_code = """ def setup(app): from sphinxcontrib.needs.api import get_need_types def after_config(app, config): print(get_need_types(app)) # app.connect('config-inited', after_config) print(get_need_types(a...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,223
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_role_need_max_title_length.py
import os from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_role_need_max_title_length_unlimited") def test_max_title_length_unlimited(app, status, warning): os.environ["MAX_TITLE_LENGTH"] = "-1" app.build() html = Path(app.outdir, "index.htm...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,224
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_broken_syntax_doc.py
from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/broken_syntax_doc") def test_doc_broken_syntax(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() # noqa: F841
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,225
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_needs_filter_data.py
from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_needs_filter_data") def test_doc_needs_filter_data_html(app, status, warning): app.build() index_html = Path(app.outdir, "index.html").read_text() # Check need_count works assert "The amou...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,226
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_needtable.py
# -*- coding: utf-8 -*- from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_needtable") def test_doc_build_html(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() assert "SP_TOO_001" in html assert 'id="nee...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,227
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_needpie.py
# -*- coding: utf-8 -*- from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_needpie") def test_doc_build_html(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() assert "SPEC_1" in html assert '<img alt="_im...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,228
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/environment.py
from pathlib import Path from typing import Iterable import sphinx from pkg_resources import parse_version from sphinx.application import Sphinx from sphinx.util.console import brown from sphinx.util.osutil import copyfile from sphinxcontrib.needs.utils import logger sphinx_version = sphinx.__version__ if parse_vers...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,229
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_doc_build_latex.py
from pathlib import Path from sphinx_testing import with_app @with_app(buildername="latex", srcdir="doc_test/doc_build_latex") def test_doc_build_latex(app, status, warning): app.build() latex_file = Path(app.outdir, "needstestdocs.tex") assert latex_file latex_content = latex_file.read_text() ...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,230
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_need_parts.py
from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_need_parts") def test_doc_need_parts(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() assert ( '<span class="need-part" id="SP_TOO_001.1">exit()<a cl...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,231
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_need_count.py
from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_need_count") def test_doc_need_count(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() assert "result_1-3" in html assert "result_2-2" in html assert ...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,232
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_extra_options.py
import re from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/extra_options") def test_custom_attributes_appear(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() # stdout warnings warnings = warning.getvalue(...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,233
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/warnings.py
""" Cares about handling and execution warnings. """ from sphinxcontrib.needs.config import NEEDS_CONFIG from sphinxcontrib.needs.filter_common import filter_needs from sphinxcontrib.needs.logging import get_logger, logging logger = get_logger(__name__) def process_warnings(app, exception): """ Checks the c...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,234
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_needflow.py
# -*- coding: utf-8 -*- from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_needflow") def test_doc_build_html(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() assert "SPEC_1" in html assert "SPEC_2" in h...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,235
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_multiple_link_backs.py
import re from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/multiple_link_backs") def test_multiple_link_backs(app, status, warning): app.builder.build_all() html = Path(app.outdir, "index.html").read_text() links_to = re.findall("#R_12346", html...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,236
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/needs.py
# -*- coding: utf-8 -*- from docutils import nodes from docutils.parsers.rst import directives from sphinx.application import Sphinx from sphinx.config import Config from sphinx.errors import SphinxError from sphinx.roles import XRefRole from sphinxcontrib.needs.api.configuration import add_extra_option from sphinxco...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,237
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/roles/need_func.py
""" Provide the role ``need_func``, which executes a dynamic function. """ from docutils import nodes from sphinxcontrib.needs.functions.functions import check_and_get_content from sphinxcontrib.needs.logging import get_logger log = get_logger(__name__) class NeedFunc(nodes.Inline, nodes.Element): pass def p...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,238
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/services/manager.py
from docutils.parsers.rst import directives from sphinxcontrib.needs.api.configuration import NEEDS_CONFIG from sphinxcontrib.needs.directives.needservice import NeedserviceDirective from sphinxcontrib.needs.logging import get_logger class ServiceManager: def __init__(self, app): self.app = app ...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,239
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_unicode.py
# -*- coding: utf-8 -*- from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/unicode_support") # , warningiserror=True) def test_unicode_html(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() assert u"Загрузка" in...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,240
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/builder.py
from sphinx.builders import Builder from sphinxcontrib.needs.logging import get_logger from sphinxcontrib.needs.utils import NeedsList class NeedsBuilder(Builder): name = "needs" format = "json" file_suffix = ".txt" links_suffix = None def write_doc(self, docname, doctree): pass def...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,241
Nipserk/sphinxcontrib-needs
refs/heads/master
/sphinxcontrib/needs/api/configuration.py
""" API to get or add specific sphinx needs configuration parameters. All functions here are available under ``sphinxcontrib.api``. So do not import this module directly. """ from docutils.parsers.rst import directives from sphinx.application import Sphinx from sphinxcontrib.needs.api.exceptions import ( NeedsApi...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,242
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_github_issues.py
import re from pathlib import Path from subprocess import STDOUT, check_output from sphinx_testing import with_app # @with_app(buildername='html', srcdir='doc_test/doc_github_issue_21') # def test_doc_github_21(app, status, warning): # """ # https://github.com/useblocks/sphinxcontrib-needs/issues/21 # """...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,243
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_broken_links.py
import sys from io import StringIO from sphinx_testing import with_app # Currently not working as I'm not able to get the complete console output of a sphinx build. @with_app(buildername="html", srcdir="doc_test/broken_links") def test_doc_build_html(app, status, warning): backup = sys.stdout sys.stderr = S...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,244
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_export_id.py
import json import os from pathlib import Path from sphinx_testing import with_app @with_app(buildername="needs", srcdir="doc_test/doc_export_id") def test_export_id(app, status, warning): app.build() content = Path(app.outdir, "needs.json").read_text() assert "filters" in content content_obj = json...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,245
Nipserk/sphinxcontrib-needs
refs/heads/master
/tests/test_global_options.py
from pathlib import Path from sphinx_testing import with_app @with_app(buildername="html", srcdir="doc_test/doc_global_options") def test_doc_global_option(app, status, warning): app.build() html = Path(app.outdir, "index.html").read_text() assert "global_1" in html assert "global_2" in html ass...
{"/tests/test_services/test_service_basics.py": ["/sphinxcontrib/needs/services/base.py", "/sphinxcontrib/needs/services/manager.py"], "/sphinxcontrib/needs/services/base.py": ["/sphinxcontrib/needs/logging.py"], "/sphinxcontrib/needs/directives/needservice.py": ["/sphinxcontrib/needs/api/__init__.py", "/sphinxcontrib/...
87,247
RasenGUY/crawl
refs/heads/master
/test.py
from bs4 import BeautifulSoup import requests from tests_parser import * from helpers import * import re from schemes import * from urllib import parse import os # Links to extract # test with textbox # https://test-english.com/grammar-points/b2/generic-pronouns/3/ # test with example # http...
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,248
RasenGUY/crawl
refs/heads/master
/schemes.py
# all of the data schemes for the different classes # --------------------------------------------------- ''' This module contains all of possible tag strcuture schemes for the parsing the different tests of tests target website ''' # selectors for getting the question structure g_quest_sel = '.quiz-form .watu-questi...
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,249
RasenGUY/crawl
refs/heads/master
/controller.py
# python libraries from urllib import parse import requests from bs4 import BeautifulSoup import os import re import sys # app libraries from helpers import * from schemes import * from tests_parser import * from view import * sys.setrecursionlimit(10000) class Webpage: """ common base information struc...
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,250
RasenGUY/crawl
refs/heads/master
/helpers.py
# import modules import re from bs4 import BeautifulSoup, Tag, NavigableString import os import requests def feed_crawler_links(file): ''' helper function which loads already surfed llinks to the crawler returns a list of of links ''' # read links from file into list and return it link_list = [] ...
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,251
RasenGUY/crawl
refs/heads/master
/view.py
import os from helpers import write_answers, write_explanations, write_questions class Content: ''' common base class for all content ''' def __init__(self, url, title, content): self.url = url #string self.title = title # string self.body = content def show_parsed_items...
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,252
RasenGUY/crawl
refs/heads/master
/tests_parser.py
from helpers import parse_tests_questions, parse_tests_answers, find_a_struct, find_q_struct, find_ca_feedback_struct, find_ca_struct, parse_tests_expls import re from bs4 import Tag, NavigableString, BeautifulSoup def get_passage(page, scheme): ''' Parser function for retrieving the test material (i.e. text...
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,253
RasenGUY/crawl
refs/heads/master
/crawler.py
# utility for crawling to websites and extracting information from them class Crawler: """ Utility for cralwling and extracting information from target websites """ def __init__(self, site): self.site = site self.ils = set() def get_page(self, url, method, headers, return_req_obj...
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,254
RasenGUY/crawl
refs/heads/master
/model.py
# all of the functionality that controls writing and storing data goes here
{"/test.py": ["/tests_parser.py", "/helpers.py", "/schemes.py"], "/controller.py": ["/helpers.py", "/schemes.py", "/tests_parser.py", "/view.py"], "/view.py": ["/helpers.py"], "/tests_parser.py": ["/helpers.py"]}
87,261
westalic7/Short_Text_Similarity
refs/heads/main
/utils.py
# -*- coding:utf-8 -*- def get_parameter_number(net): """ check model structure and compute total amount of parameters """ # print(type(net.parameters())) total_num = sum(p.numel() for p in net.parameters()) trainable_num = sum(p.numel() for p in net.parameters() if p.requires_grad) return...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,262
westalic7/Short_Text_Similarity
refs/heads/main
/model/siamese_network.py
# -*- coding:utf-8 -*- import torch import torch.nn as nn class SiameseLSTM(nn.Module): """ this version use trained word vector """ def __init__(self, embed_size=300): super(SiameseLSTM, self).__init__() self.embed_len = embed_size # lstm units self.dropout = 0.5 ...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,263
westalic7/Short_Text_Similarity
refs/heads/main
/trainer.py
# -*- coding:utf-8 -*- import os import pickle import random import time import numpy as np import pandas as pd import torch # import torch.nn.functional as F from sklearn.metrics import classification_report from torch.nn import CrossEntropyLoss from torch.optim import lr_scheduler from torch.utils.data.dataloader i...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,264
westalic7/Short_Text_Similarity
refs/heads/main
/data_processor.py
# -*- coding:utf-8 -*- import os import jieba import pickle import pandas as pd from gensim.models import KeyedVectors import numpy as np from tqdm import tqdm import torch from torch.utils.data.dataset import Dataset from torch.utils.data.dataloader import DataLoader from embedding import Word2Vec1Gram from dataset i...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,265
westalic7/Short_Text_Similarity
refs/heads/main
/model/matchpyramid_network.py
# -*- coding:utf-8 -*- import torch import torch.nn as nn import torch.nn.functional as F class MatchPyramid(nn.Module): """ this version use trained word vector """ def __init__(self, embed_size=300, hidden_size=32): super(MatchPyramid, self).__init__() self.embed_len = embed_size ...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,266
westalic7/Short_Text_Similarity
refs/heads/main
/model/__init__.py
# -*- coding:utf-8 -*- from .siamese_network import SiameseLSTM from .esim_network import Esim from .abcnn1_network import Abcnn1,Abcnn2,Abcnn3 from .bimpm2_network import BiMPM from .matchpyramid_network import MatchPyramid
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,267
westalic7/Short_Text_Similarity
refs/heads/main
/predict.py
# -*- coding:utf-8 -*- import json import os import pickle import random import numpy as np import pandas as pd import torch from sklearn.metrics import classification_report, f1_score, auc, roc_curve from torch.utils.data.dataloader import DataLoader from torch.utils.data.dataset import Dataset from tqdm import tqd...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,268
westalic7/Short_Text_Similarity
refs/heads/main
/dataset.py
# -*- coding:utf-8 -*- import torch from torch.utils.data.dataset import Dataset class PairTextDataset(Dataset): def __init__(self, data): self._sentence_left = data[0] self._sentence_right = data[1] self._labels = data[2] def __len__(self): return len(self._labels) de...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,269
westalic7/Short_Text_Similarity
refs/heads/main
/log.py
# -*- coding:utf-8 -*- import logging from logging import handlers, FileHandler class Logger(object): level_relations = { 'debug': logging.DEBUG, 'info': logging.INFO, 'warning': logging.WARNING, 'error': logging.ERROR, 'crit': logging.CRITICAL } # 日志级别关系映射 def _...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,270
westalic7/Short_Text_Similarity
refs/heads/main
/embedding.py
# -*- coding:utf-8 -*- import numpy as np from gensim.models import KeyedVectors class Word2VecEmbed(object): def __init__(self, word_vector_file_path, max_seq_len=None, is_padding=True): self.w2v_fpath = word_vector_file_path self.w2v_dict = KeyedVectors.load_word2vec_format(self.w2v_fpath, bina...
{"/trainer.py": ["/data_processor.py", "/dataset.py", "/embedding.py", "/log.py", "/model/__init__.py", "/utils.py"], "/data_processor.py": ["/embedding.py", "/dataset.py"], "/model/__init__.py": ["/model/siamese_network.py", "/model/matchpyramid_network.py"], "/predict.py": ["/data_processor.py", "/dataset.py", "/embe...
87,326
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/keyboards/reply/__init__.py
# reply from aiogram import types def default_reply_markup(resize_keyboard=True, selective=True) -> types.ReplyKeyboardMarkup: return types.ReplyKeyboardMarkup(resize_keyboard=True, selective=True)
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,327
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/utils/useful_methods.py
import datetime from aiogram import types, Bot from aiogram.types import PhotoSize from models import db def get_full_user_name(message: types.Message) -> str: """get user fullname from message""" if message.from_user: pre_fn = message.from_user.first_name pre_ln = message.from_user.last_nam...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,328
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/keyboards/inline/__init__.py
# inline from aiogram import types def inline_button(text, data) -> types.InlineKeyboardButton: return types.InlineKeyboardButton(text, callback_data=data) def inline_markup(text, data) -> types.InlineKeyboardMarkup: """ send pagination button to catalog :param text: text on button :param data: ...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,329
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/keyboards/reply/r_snippets.py
from aiogram import types from data import config from keyboards.reply import default_reply_markup def main_menu() -> types.ReplyKeyboardMarkup: return default_reply_markup().add(config.CATALOG, config.ADD_EVENT) def remove() -> types.ReplyKeyboardRemove: return types.ReplyKeyboardRemove() def go_to_main...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,330
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/handlers/add_event.py
import logging from aiogram import types from aiogram.dispatcher import FSMContext from icecream import ic from data import config, text_util from data.bot_setup import client_bot import states import keyboards from handlers import views from keyboards.reply.r_snippets import go_to_main_menu from utils import useful...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,331
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/utils/messenger.py
import logging import os from abc import abstractmethod from copy import copy from aiogram import types import keyboards.reply.r_snippets from data import text_util, config from data.bot_setup import client_bot from models import db class BaseSender: def __init__(self, event_id, sender_id): self.event_...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,332
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/tests/conftest.py
import pytest @pytest.fixture def chat_id(): return '635466458' @pytest.fixture def event_id(): return -100
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,333
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/handlers/views.py
from aiogram import types from icecream import ic import models.db from data import text_util import keyboards from data.bot_setup import client_bot # region server views from utils import useful_methods # region bot start async def handle_start(message: types.Message): ic('start statement') fullname = use...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,334
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/data/bot_setup.py
from aiogram import Bot, Dispatcher from data.config import CLIENT_BOT_TOKEN, SERVICE_BOT_TOKEN from states import client client_bot = Bot(token=CLIENT_BOT_TOKEN) service_bot = Bot(token=SERVICE_BOT_TOKEN) dispatcher = Dispatcher(client_bot, storage=client.storage)
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,335
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/keyboards/inline/i_snippets.py
from aiogram import types import filters from data import config from keyboards.inline import inline_button def sure_inline_keyboard(event_id: int) -> types.InlineKeyboardButton: return types.InlineKeyboardMarkup(). \ add( inline_button(config.YES, f'{config.YES}:{event_id}'), inline_butt...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,336
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/keyboards/__init__.py
from . import inline from . import reply from . reply import r_snippets from . inline import i_snippets
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,337
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/states/client.py
from aiogram.contrib.fsm_storage.memory import MemoryStorage from aiogram.dispatcher.filters.state import StatesGroup, State storage = MemoryStorage() class EventForm(StatesGroup): event_name = State() event_title = State() description = State() media = State() end_date = State() # can be empty ...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,338
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/handlers/catalog.py
from aiogram import types from icecream import ic import keyboards import states.client from data import config, text_util from utils import useful_methods from models import db from utils import paginator from data.bot_setup import client_bot # region catalog # region show catalog async def handle_catalog_menu(mes...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,339
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/tests/test_messenger.py
import pytest from utils import messenger base_sender = None @pytest.mark.messenger def test_instance_creating(event_id, chat_id): global base_sender """cover base __init__, _get_event, _get_sender""" base_sender = messenger.BaseSender(sender_id=chat_id, event_id=event_id) return base_sender @pyte...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,340
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/data/__init__.py
from . import config from . import bot_setup from . import text_util
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,341
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/data/config.py
import configparser import os import re from pathlib import Path from icecream import ic base_dir = Path(__file__).resolve().parent media_path = Path(__file__).resolve().parent.parent.joinpath('media') config = configparser.ConfigParser() print(base_dir) config.read(os.path.join(base_dir, "config.ini")) # solved cr...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,342
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/handlers/chat.py
from aiogram import types from aiogram.dispatcher import FSMContext import keyboards from data import text_util from data.bot_setup import client_bot from handlers import views from models import db from states.client import CatalogGroup from utils import useful_methods, messenger async def handle_chat_connect(callb...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,343
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/tests/test_bot.py
import pytest @pytest.mark.config def test_config_valid(): try: from data import config print(config.YES) except KeyError as e: assert False, "config valid failed" @pytest.mark.internet def test_internet_connection(): import requests google = 'https://www.google.com/' try...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,344
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/filters/filters.py
from models import db from utils import useful_methods def user_in_chat(receiver_chat_id, sender_chat_id): """ This filter works from client bot to service where receiver in client bot and sender in service chatbot :param receiver_chat_id: telegram user chat id receiver from client chatbot :param send...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,345
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/models/db.py
import logging from typing import List from icecream import ic from sqlalchemy import Column, String, create_engine, BigInteger, DateTime, ForeignKey, func from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship from data import config path_alchemy_local = config....
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,346
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/bot.py
import handlers from aiogram import executor from data.bot_setup import dispatcher from models import db if __name__ == '__main__': handlers.setup(dispatcher) db.create_db() executor.start_polling(dispatcher, skip_updates=True)
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,347
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/utils/paginator.py
from aiogram import Bot from data import config, text_util from models import db import keyboards async def show_catalog_page(chat_id, events: list, bot: Bot): """ show catalog page to users :param chat_id: user chat id :param events: list of events :param bot: bot """ last_event = None ...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,348
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/data/text_util.py
from data import config # event creating EVENT_CREATING_OPENED = f'Создание нового события:\nВведите имя' OK_FOR_HANDLE_NAME = '✅, Введите заголовок' OK_FOR_HANDLE_TITLE = '✅, Введите описание' OK_FOR_HANDLE_DESCRIPTION = '✅, Выберите фото события' SMALLER_THAT_3_SYMBOLS = '❌ Введите больше 3 символов.' ERROR_WIT...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,349
IvanShaptalov/InCust_chatbot-client
refs/heads/main
/handlers/__init__.py
from aiogram import Dispatcher from aiogram.dispatcher.filters import Text from data import config from states.client import EventForm, CatalogGroup from . import add_event from . import catalog from . import chat from . import views def setup(dp: Dispatcher): # views dp.register_message_handler(views.handl...
{"/keyboards/reply/r_snippets.py": ["/data/__init__.py", "/keyboards/reply/__init__.py"], "/handlers/add_event.py": ["/data/__init__.py", "/data/bot_setup.py", "/keyboards/__init__.py", "/handlers/__init__.py", "/keyboards/reply/r_snippets.py"], "/utils/messenger.py": ["/keyboards/reply/r_snippets.py", "/data/__init__....
87,350
1119pdh/git-26
refs/heads/master
/movie/moviemovie/moviestar/apps.py
from django.apps import AppConfig class MoviestarConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'moviestar'
{"/movie/moviemovie/moviestar/urls.py": ["/movie/moviemovie/moviestar/views.py"], "/movie/moviemovie/moviestar/views.py": ["/movie/moviemovie/moviestar/models.py"]}
87,351
1119pdh/git-26
refs/heads/master
/test/test12.py
def is_okay_to_drive(who): if who == "son": return"Nope!"; elif who == "dad": return"Good!"; elif who == "grand father": return"Be careful!"; else: return"Who are you?"; print(is_okay_to_drive("son"))
{"/movie/moviemovie/moviestar/urls.py": ["/movie/moviemovie/moviestar/views.py"], "/movie/moviemovie/moviestar/views.py": ["/movie/moviemovie/moviestar/models.py"]}
87,352
1119pdh/git-26
refs/heads/master
/movie/moviemovie/moviestar/models.py
from django.utils import timezone from django.db import models from django.db.models.deletion import CASCADE class Actor(models.Model): first_name = models.CharField(max_length=45) last_name = models.CharField(max_length=45) date_of_birth = models.DateField(default=timezone.now) class Meta: d...
{"/movie/moviemovie/moviestar/urls.py": ["/movie/moviemovie/moviestar/views.py"], "/movie/moviemovie/moviestar/views.py": ["/movie/moviemovie/moviestar/models.py"]}
87,353
1119pdh/git-26
refs/heads/master
/movie/moviemovie/moviestar/urls.py
from django.urls import path from django.urls.resolvers import URLPattern from django.views.generic.base import View from .views import ActorListView, MovieListView, Actor_MoviesListView urlpatterns = [ path("actor", ActorListView.as_view()), path("movie", MovieListView.as_view()), path("actor_movie", Acto...
{"/movie/moviemovie/moviestar/urls.py": ["/movie/moviemovie/moviestar/views.py"], "/movie/moviemovie/moviestar/views.py": ["/movie/moviemovie/moviestar/models.py"]}
87,354
1119pdh/git-26
refs/heads/master
/movie/moviemovie/moviestar/views.py
import json from django.db.models.fields import EmailField from django.http import HttpResponse, JsonResponse, request from django.views import View from django.shortcuts import render from .models import Actor, Actor_movie from moviestar.models import Movie # Create your views here. class ActorListView(View): ...
{"/movie/moviemovie/moviestar/urls.py": ["/movie/moviemovie/moviestar/views.py"], "/movie/moviemovie/moviestar/views.py": ["/movie/moviemovie/moviestar/models.py"]}
87,364
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/keyrate.py
""" keyrate ==================== Abstract base class for keyrate calculations Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. =====================================================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,365
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/rel_min_entropy_keyrate_post.py
""" rel_min_entropy_keyrate_post ==================== Calculates postselected secret keyrate by solving for Hmin Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ==================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,366
dbunandar/numerical_qkd
refs/heads/master
/setup.py
#!/usr/bin/env python from setuptools import setup setup( # setup.cfg usage requires setuptools>=36.2.7 setup_requires=['setuptools>=36.2.7'], )
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,367
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/utils.py
""" utils ==================== Miscellaneous utility functions for working with numpy and cvxpy Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ===================================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,368
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/concentration_ineq.py
""" concentration_ineq ==================== Concentration inequalities Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ============================================================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,369
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/rel_entropy_keyrate.py
""" rel_entropy_keyrate ==================== Calculates the secret keyrate by approximately solving the quantum relative entropy Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ==...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,370
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/rel_entropy_keyrate_post.py
""" rel_entropy_keyrate_post ==================== Calculates postselected secret-key rate by approximately solving the quantum relative entropy. Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictl...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,371
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/kraus.py
""" kraus ==================== Defines class that deals with Kraus operators Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ======================================================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,372
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/constraints.py
""" constraints ==================== Methodically generate constraints Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ============================================================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,373
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/rel_min_entropy_keyrate.py
""" rel_min_entropy_keyrate ==================== Calculates secret keyrate by solving for Hmin Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ====================================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,374
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/basis_info.py
""" basis_info ==================== Defines class that deals with a postselected basis information Author: Darius Bunandar (dariusb@mit.edu) Unauthorized use and/or duplication of this material without express and written permission from the author and/or owner is strictly prohibited. ================================...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,375
dbunandar/numerical_qkd
refs/heads/master
/numerical_qkd/__init__.py
from .utils import general_kron, partial_trace, np_partial_trace, \ quantum_entropy, quantum_rel_entropy, bin_entropy, depolarizing_channel, \ simulate_single_photons, one_hot_unit_vector, np_array_to_matlab, \ classical_entropy, block_diagonal_stack, move_hilbert_space, \ matrix_gram_schmidt from .basi...
{"/numerical_qkd/keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_min_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/rel_entropy_keyrate_post.py": ["/numerical_qkd/__init__.py"], "/numerical_qkd/constrain...
87,376
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0030_auto_20200830_0911.py
# Generated by Django 3.0.8 on 2020-08-30 03:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0029_auto_20200830_0741'), ] operations = [ migrations.RemoveField( model_name='order', name='shipping_addr...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,377
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0042_auto_20200901_1755.py
# Generated by Django 3.0.8 on 2020-09-01 12:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0041_auto_20200901_1732'), ] operations = [ migrations.RemoveField( model_name='item', name='items', ...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,378
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0017_remove_order_user.py
# Generated by Django 3.0.8 on 2020-08-15 07:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('store', '0016_auto_20200815_1307'), ] operations = [ migrations.RemoveField( model_name='order', name='user', ), ...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,379
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0035_auto_20200901_1657.py
# Generated by Django 3.0.8 on 2020-09-01 11:27 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('store', '0034_auto_20200901_1525'), ] operations = [ migrations.RenameField( model_name='order', old_name='received', ...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,380
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0052_auto_20200914_1857.py
# Generated by Django 3.0.8 on 2020-09-14 13:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0051_auto_20200914_1834'), ] operations = [ migrations.AddField( model_name='userprofile', name='first_name...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,381
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0010_auto_20200801_2012.py
# Generated by Django 3.0.8 on 2020-08-01 14:42 import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('store', '0009_auto_20200731_1550'), ] operations = [ migrations.RemoveField( mo...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,382
devpraveenops/shopdaily
refs/heads/main
/store/views.py
from django.shortcuts import render, redirect, reverse, get_object_or_404 from django.http import JsonResponse, HttpResponse, HttpResponseRedirect from django.urls import path, resolve # from django.views import View from django.views.generic import ListView, DetailView, View from django.views.generic.base import Temp...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,383
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0013_auto_20200808_1931.py
# Generated by Django 3.0.8 on 2020-08-08 14:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0012_auto_20200805_2153'), ] operations = [ migrations.AlterModelOptions( name='category', options={'verbos...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,384
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0048_auto_20200902_1352.py
# Generated by Django 3.0.8 on 2020-09-02 08:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('store', '0047_auto_20200902_1340'), ] operations = [ migrations.RenameField( model_name='testorder', old_name='product', ...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,385
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0037_delete_orderitem.py
# Generated by Django 3.0.8 on 2020-09-01 11:43 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('store', '0036_auto_20200901_1712'), ] operations = [ migrations.DeleteModel( name='OrderItem', ), ]
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,386
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0023_auto_20200828_2232.py
# Generated by Django 3.0.8 on 2020-08-28 17:02 import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('store', ...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}
87,387
devpraveenops/shopdaily
refs/heads/main
/store/migrations/0049_auto_20200902_1355.py
# Generated by Django 3.0.8 on 2020-09-02 08:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0048_auto_20200902_1352'), ] operations = [ migrations.RemoveField( model_name='testorder', name='products'...
{"/store/views.py": ["/store/forms.py", "/store/models.py"], "/store/admin.py": ["/store/models.py"], "/store/forms.py": ["/store/models.py"], "/store/urls.py": ["/store/views.py", "/store/models.py"]}