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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opennode/waldur-mastermind | src/waldur_firecrest/migrations/0002_extend_job_model.py | 2 | 1535 | # Generated by Django 2.2.24 on 2021-08-12 12:31
import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_US... | mit | 638ae8762d402b10840ea1307bfcf5a1 | 29.098039 | 76 | 0.537459 | 4.501466 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_geo_ip/utils.py | 2 | 1685 | import collections
import logging
import requests
from django.conf import settings
from . import exceptions
logger = logging.getLogger(__name__)
Coordinates = collections.namedtuple('Coordinates', ('latitude', 'longitude'))
def get_coordinates_by_ip(ip_address):
"""
Return coordinates by IP or hostname.
... | mit | b10ca1e2b8efb4331aa0961ec4776848 | 30.203704 | 88 | 0.683086 | 4.170792 | false | false | false | false |
getavalon/core | avalon/vendor/requests/packages/urllib3/contrib/ntlmpool.py | 304 | 4478 | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
from logging import getLogger
from ntlm import ntlm
from .. import HTTPSConnectionPool
from ..packages.six.moves.http_client import HTTPSConnecti... | mit | c3686e4e4bdab6e906811147a05adeb3 | 38.982143 | 77 | 0.553149 | 4.293384 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/billing/views.py | 2 | 1297 | from rest_framework import exceptions, response, status, views
from waldur_core.structure import filters as structure_filters
from waldur_core.structure import models as structure_models
from waldur_mastermind.invoices import models as invoices_models
from waldur_mastermind.invoices import utils as invoice_utils
cla... | mit | 0288331ecfbfa4f2960633c7faaf3608 | 40.83871 | 82 | 0.703161 | 4.14377 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_core/core/pagination.py | 2 | 1415 | from collections import OrderedDict
from rest_framework import pagination
from rest_framework.response import Response
from rest_framework.utils.urls import remove_query_param, replace_query_param
class LinkHeaderPagination(pagination.PageNumberPagination):
page_size_query_param = 'page_size'
max_page_size =... | mit | 21a17839a54725cc1c15a4baf9c13024 | 31.159091 | 77 | 0.590813 | 3.86612 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/invoices/serializers.py | 1 | 18625 | import datetime
from decimal import ROUND_HALF_UP, Decimal
from django.conf import settings
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions as rf_exceptions
from rest_framework import serializers
from rest_framework.revers... | mit | 6342e6c4254b265ec0e73142e057059d | 34.74856 | 110 | 0.613208 | 4.177882 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace_flows/migrations/0002_offeringstaterequest.py | 1 | 3350 | # Generated by Django 2.2.24 on 2021-10-04 12:43
import django.db.models.deletion
import django.utils.timezone
import django_fsm
import model_utils.fields
from django.conf import settings
from django.db import migrations, models
import waldur_core.core.fields
class Migration(migrations.Migration):
dependencies... | mit | 289e29ec37820871851ffc3c9710d81d | 32.5 | 80 | 0.37791 | 5.706985 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_jira/filters.py | 2 | 3859 | import django_filters
from django.db.models import Q
from waldur_core.core import filters as core_filters
from waldur_core.structure import filters as structure_filters
from . import models
class ProjectTemplateFilter(structure_filters.BaseServicePropertyFilter):
class Meta(structure_filters.BaseServiceProperty... | mit | 6dd5a6e9b18b775b7ebbdbeada5b3478 | 31.982906 | 81 | 0.661311 | 3.994824 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace/models.py | 1 | 44749 | from decimal import Decimal
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import JSONField as BetterJSONField
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.validators import MaxValueValidator, MinValueValida... | mit | 87fa6a75adedfe4724ffd21bc54d0a33 | 29.755326 | 119 | 0.629712 | 4.081448 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/invoices/tests/factories.py | 1 | 2858 | import factory
from django.utils import timezone
from rest_framework.reverse import reverse
from waldur_core.structure.tests import factories as structure_factories
from waldur_mastermind.invoices import models
class InvoiceFactory(factory.DjangoModelFactory):
class Meta:
model = models.Invoice
cust... | mit | 0e7047dddfb40e8079b3ed9b0e18fe6b | 30.406593 | 74 | 0.657103 | 4.196769 | false | true | false | false |
opennode/waldur-mastermind | src/waldur_core/users/tests/test_invitation.py | 2 | 34657 | from datetime import timedelta
from ddt import data, ddt
from django.conf import settings
from django.core import mail
from django.test import override_settings
from django.utils import timezone
from freezegun import freeze_time
from mock_django import mock_signal_receiver
from rest_framework import status, test
from... | mit | 06f4c32a2e1e6728412f72dc38322936 | 42.429825 | 102 | 0.673486 | 3.872291 | false | true | false | false |
opennode/waldur-mastermind | src/waldur_core/users/tests/test_group_invitation.py | 1 | 25086 | from datetime import timedelta
from ddt import data, ddt
from django.conf import settings
from django.utils import timezone
from mock import patch
from rest_framework import status
from waldur_core.core import utils as core_utils
from waldur_core.core.tests.helpers import override_waldur_core_settings
from waldur_cor... | mit | cdc24f95d77bbfc53e0e7b6194409373 | 41.735945 | 102 | 0.672088 | 3.864736 | false | true | false | false |
opennode/waldur-mastermind | src/waldur_core/core/features.py | 1 | 7214 | from dataclasses import dataclass
@dataclass
class Feature:
description: str
FEATURES = []
class FeatureSectionMetaclass(type):
def __new__(self, name, bases, attrs):
if 'Meta' in attrs:
section = {
'key': attrs['Meta'].key,
'description': attrs['Meta'].... | mit | 85cd190a19f32a5814d8fd913e09a473 | 27.971888 | 99 | 0.670225 | 4.771164 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_rancher/migrations/0017_pull_settings.py | 2 | 2217 | from django.db import migrations
def pull_settings(apps, schema_editor):
Cluster = apps.get_model('waldur_rancher', 'Cluster')
Catalog = apps.get_model('waldur_rancher', 'Catalog')
Project = apps.get_model('waldur_rancher', 'Project')
Namespace = apps.get_model('waldur_rancher', 'Namespace')
Serv... | mit | e59713461fcf1a13f11b3ef6461e9b30 | 37.894737 | 86 | 0.651782 | 4.296512 | false | false | false | false |
getavalon/core | avalon/vendor/requests/packages/chardet/utf8prober.py | 293 | 2766 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit | ce7b3026f235c82cbe167f2f29844461 | 32.731707 | 69 | 0.62726 | 4.203647 | false | false | false | false |
getavalon/core | avalon/io.py | 2 | 12687 | """Wrapper around interactions with the database"""
import os
import sys
import time
import errno
import shutil
import logging
import tempfile
import functools
import contextlib
from . import schema, Session
from .vendor import requests
# Third-party dependencies
import pymongo
from bson.objectid import ObjectId, In... | mit | f7e59174ee54a6e8d20bcb070793a053 | 24.73428 | 79 | 0.574446 | 4.162402 | false | false | false | false |
opennode/waldur-mastermind | docker/rootfs/etc/waldur/settings.py | 2 | 5533 | # Django settings for Waldur
from waldur_core.server.base_settings import *
import os
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), '..'))
TEMPLATES[0]['DIRS'] = [os.path.join(BASE_DIR, 'waldur_core', 'templates')]
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'waldur_core', 'local... | mit | 2d6919a1451587308f60dc78dcaa5c83 | 34.928571 | 112 | 0.700705 | 3.235673 | false | true | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace/migrations/0035_offeringpermission.py | 2 | 2326 | # Generated by Django 2.2.13 on 2020-11-25 19:36
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.conf import settings
from django.db import migrations, models
import waldur_core.core.fields
class Migration(migrations.Migration):
dependencies = [
migra... | mit | 278e5260a78f6d85f38ebc312918fed2 | 32.710145 | 84 | 0.436371 | 5.286364 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_openstack/openstack_tenant/migrations/0003_extend_description_limits.py | 2 | 2580 | # Generated by Django 2.2.13 on 2020-09-02 11:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('openstack_tenant', '0002_volumetype_is_default'),
]
operations = [
migrations.AlterField(
model_name='backup',
name... | mit | 417caf36ee464b9e50fe9449208a2894 | 30.084337 | 71 | 0.517829 | 4.961538 | false | false | false | false |
getavalon/core | avalon/vendor/filelink/link.py | 3 | 1693 | import os
import platform
HARDLINK = 0
def _create_windows(source, destination, link_type):
"""Creates hardlink at destination from source in Windows."""
if link_type == HARDLINK:
import ctypes
from ctypes.wintypes import BOOL
CreateHardLink = ctypes.windll.kernel32.CreateHardLinkW
... | mit | bb495c39ac526d8952bdb3b34664d15e | 28.701754 | 76 | 0.65505 | 4.275253 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_jira/tests/test_issue_types.py | 2 | 2058 | from unittest import mock
from rest_framework import test
from waldur_jira import models
from waldur_jira.backend import JiraBackend
from waldur_jira.tests import factories, fixtures
class IssueTypesTest(test.APITransactionTestCase):
def setUp(self):
self.fixture = fixtures.JiraFixture()
self.m... | mit | 19471f078e48ff3a91bba841398ea6b8 | 37.830189 | 87 | 0.684159 | 3.597902 | false | true | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/invoices/admin.py | 1 | 5118 | from django.conf.urls import url
from django.contrib import admin
from django.forms.models import ModelForm
from django.forms.widgets import CheckboxInput
from django.http import HttpResponse
from django.shortcuts import redirect
from django.urls import reverse
from django.utils.html import format_html
from django.util... | mit | 5581305507b64ddfd27d687174a074aa | 29.646707 | 84 | 0.639117 | 4.029921 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_digitalocean/tests/factories.py | 2 | 3330 | import factory
from django.urls import reverse
from factory import fuzzy
from waldur_core.structure.models import ServiceSettings
from waldur_core.structure.tests.factories import (
CustomerFactory,
ProjectFactory,
ServiceSettingsFactory,
)
from waldur_digitalocean import models
class DigitalOceanService... | mit | 37cbc04814f3f11c125ddad63fa03952 | 30.121495 | 77 | 0.662462 | 3.675497 | false | true | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/billing/handlers.py | 2 | 1626 | import logging
from django.db import transaction
from waldur_core.structure import models as structure_models
from . import models
logger = logging.getLogger(__name__)
def create_price_estimate(sender, instance, created=False, **kwargs):
if not created:
return
models.PriceEstimate.objects.create(s... | mit | cfe7ee59e2dd31c4427c9e3c436498c1 | 29.679245 | 87 | 0.691267 | 3.965854 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace/utils.py | 1 | 22457 | import base64
import datetime
import logging
import os
import traceback
from io import BytesIO
import pdfkit
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.files.base import ContentFile
from django.core.files.storage import default_storage as st... | mit | 1c6ed0fc70ff0caefb78505f2596202c | 33.285496 | 88 | 0.670036 | 4.031054 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_openstack/openstack/log.py | 2 | 5164 | from waldur_core.logging.loggers import EventLogger, event_logger
class TenantQuotaLogger(EventLogger):
quota = 'quotas.Quota'
tenant = 'openstack.Tenant'
limit = float
old_limit = float
class Meta:
event_types = ('openstack_tenant_quota_limit_updated',)
event_groups = {
... | mit | a2d927af6c62d39c4e53ade0819e2747 | 26.036649 | 79 | 0.594888 | 4.339496 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_pid/tasks.py | 2 | 4638 | import logging
from celery import shared_task
from django.contrib.contenttypes.models import ContentType
from waldur_core.core import utils as core_utils
from . import backend, exceptions, mixins, models
logger = logging.getLogger(__name__)
@shared_task
def create_doi(serialized_instance):
instance = core_uti... | mit | a19bda41d106f8ded5ec1711b7f6a54e | 34.676923 | 90 | 0.627857 | 4.100796 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_jira/migrations/0014_refactor_issue_field.py | 2 | 1670 | # Generated by Django 1.11.4 on 2018-03-02 11:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('waldur_jira', '0013_extend_jira_issue_fields'),
]
operations = [
migrations.RenameField(
model_name='issue',
old_nam... | mit | 295e866b1a9d3f249f01a8fc2ca9c8e8 | 30.509434 | 69 | 0.549701 | 4.326425 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_azure/migrations/0016_extend_description_limits.py | 2 | 2588 | # Generated by Django 2.2.13 on 2020-09-02 11:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('waldur_azure', '0015_location_enabled'),
]
operations = [
migrations.AlterField(
model_name='network',
name='descri... | mit | c90e5831afb7c1f187c0544afa612002 | 30.180723 | 71 | 0.519706 | 4.938931 | false | false | false | false |
getavalon/core | avalon/tools/workfiles/app.py | 2 | 29868 | import sys
import os
import getpass
import re
import shutil
import logging
import platform
from ...vendor.Qt import QtWidgets, QtCore
from ... import style, io, api, pipeline
from .. import lib as tools_lib
from ..widgets import AssetWidget
from ..models import TasksModel
from ..delegates import PrettyTimeDelegate
f... | mit | 0c24faa0ccdcf0507dd6174137ccc04e | 31.93054 | 79 | 0.577307 | 4.438039 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_digitalocean/views.py | 2 | 6614 | from django.utils.translation import ugettext_lazy as _
from rest_framework import decorators, response
from rest_framework import serializers as rf_serializers
from rest_framework import status
from waldur_core.core import executors as core_executors
from waldur_core.core import validators as core_validators
from wal... | mit | e7f61851ce3f32fa6fef7d3a7dfe0ea2 | 36.579545 | 106 | 0.670699 | 4.105525 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_openstack/openstack_tenant/tests/fixtures.py | 2 | 4257 | from django.utils.functional import cached_property
from waldur_core.structure.tests.fixtures import ProjectFixture
from waldur_openstack.openstack.tests import fixtures as openstack_fixtures
from waldur_openstack.openstack_tenant import models
from waldur_openstack.openstack_tenant.tests import factories
class Open... | mit | 417538d306b260a3ca1396ecb4a78a32 | 33.609756 | 101 | 0.662203 | 4.552941 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/billing/migrations/0001_initial.py | 2 | 2039 | # Generated by Django 1.11.1 on 2017-09-06 13:28
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models
import waldur_core.core.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_n... | mit | e07cfb1a05c6a5b7219b50dbcc5bcbd0 | 30.369231 | 103 | 0.399706 | 5.776204 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_core/core/validators.py | 2 | 4707 | import logging
from croniter import croniter
from cryptography import x509
from cryptography.exceptions import UnsupportedAlgorithm
from cryptography.hazmat import backends
from cryptography.hazmat.primitives import serialization
from django import template
from django.core.exceptions import ValidationError
from djang... | mit | 620a34a3f8d2e7a6fe95e32ff1c1f747 | 29.564935 | 104 | 0.655407 | 4.158127 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_freeipa/handlers.py | 2 | 2518 | import logging
from django.core.exceptions import ObjectDoesNotExist
from django.db import transaction
from . import models, tasks, utils
from .log import event_logger
logger = logging.getLogger(__name__)
def schedule_sync(*args, **kwargs):
tasks.schedule_sync()
def schedule_sync_on_quota_change(sender, inst... | mit | dffcc6444f27dcd0efdfb532053db422 | 28.97619 | 84 | 0.642573 | 3.879815 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_openstack/openstack/tests/fixtures.py | 2 | 2054 | from django.utils.functional import cached_property
from waldur_core.structure.tests.fixtures import ProjectFixture
from .. import models
from . import factories
class OpenStackFixture(ProjectFixture):
@cached_property
def openstack_service_settings(self):
return factories.OpenStackServiceSettingsFa... | mit | 3e91d7911656fa6b084f6e20e3cf6b41 | 29.205882 | 84 | 0.648491 | 4.544248 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_auth_social/migrations/0002_remoteeduteamsuser.py | 1 | 1816 | # Generated by Django 2.2.24 on 2021-10-04 13:54
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(setti... | mit | 1e8f7b2d34f61a93d9fac35f08bb66b1 | 30.310345 | 68 | 0.422907 | 5.604938 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/support/migrations/0001_squashed_0037.py | 2 | 33165 | # Generated by Django 1.11.24 on 2019-09-10 11:05
from decimal import Decimal
import django.contrib.postgres.fields.jsonb
import django.core.validators
import django.db.models.deletion
import django.utils.timezone
import django_fsm
import model_utils.fields
from django.conf import settings
from django.db import migrat... | mit | e8298b428c2ef67b4c3daa080e645c82 | 35.285558 | 138 | 0.371355 | 5.863685 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace_flows/utils.py | 1 | 1246 | from django.conf import settings
from rest_framework.reverse import reverse
from waldur_mastermind.common import utils as common_utils
from waldur_mastermind.support import views as support_views
def create_issue(offering_request):
if not settings.WALDUR_SUPPORT['ENABLED']:
return
user = offering_re... | mit | 009f3a5baa667a019553c4f10277fc1c | 39.193548 | 98 | 0.666934 | 3.753012 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_rancher/migrations/0031_extend_description_limits.py | 2 | 2087 | # Generated by Django 2.2.13 on 2020-09-02 11:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('waldur_rancher', '0030_ingress'),
]
operations = [
migrations.AlterField(
model_name='application',
name='descripti... | mit | 00e0499ae0392cd6f888426685044f74 | 29.246377 | 71 | 0.516052 | 4.910588 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_core/logging/migrations/0003_system_notification.py | 2 | 1090 | # Generated by Django 1.11.7 on 2018-07-23 13:21
import django.db.models.deletion
from django.db import migrations, models
import waldur_core.core.fields
class Migration(migrations.Migration):
dependencies = [
('logging', '0002_immutable_default_json'),
]
operations = [
migrations.AddFi... | mit | 2009347dfa6e97f8a42fe0d6125d28b5 | 28.459459 | 84 | 0.566055 | 4.522822 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_core/core/permissions.py | 2 | 3773 | from rest_framework.permissions import SAFE_METHODS, BasePermission
class IsAdminOrReadOnly(BasePermission):
def has_permission(self, request, view):
return request.method in SAFE_METHODS or (
request.user.is_authenticated and request.user.is_staff
)
class ActionsPermission(BasePermi... | mit | c555a676188102b569b1b7c2305814c8 | 40.461538 | 114 | 0.631593 | 4.734003 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_vmware/views.py | 2 | 12765 | import logging
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers as rf_serializers
from rest_framework import status
from rest_framework.decorators import action
from rest_framework.mixins import RetrieveModelMixin
from rest_framework.respo... | mit | 747d1caed920058b8361188f10c714ca | 37.799392 | 100 | 0.693302 | 4.389615 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_openstack/openstack_base/backend.py | 1 | 19130 | import datetime
import hashlib
import json
import logging
import re
from cinderclient import exceptions as cinder_exceptions
from cinderclient.v2 import client as cinder_client
from django.core.cache import cache
from django.db import transaction
from django.utils import timezone
from glanceclient import exc as glance... | mit | 277510971fb1f6d2ca1fbc85c1e23f4c | 38.281314 | 113 | 0.608887 | 4.213656 | false | false | false | false |
getavalon/core | avalon/vendor/requests/packages/urllib3/packages/backports/makefile.py | 330 | 1461 | # -*- coding: utf-8 -*-
"""
backports.makefile
~~~~~~~~~~~~~~~~~~
Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.
"""
import io
from socket import SocketIO
def backport_makefile(self, mode="r", buffering=None, encoding=None,
... | mit | 7e8313ed335751adcb1a4f65c9450a27 | 26.566038 | 76 | 0.589322 | 3.948649 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/invoices/migrations/0047_migrate_slurm_measured_unit.py | 2 | 1908 | from django.db import migrations
def migrate_slurm_measured_unit(apps, schema_editor):
InvoiceItem = apps.get_model('invoices', 'InvoiceItem')
for item in InvoiceItem.objects.filter(name__contains=' (RAM GB-hours)'):
item.name = item.name.replace(' (RAM GB-hours)', ' / RAM')
item.measured_uni... | mit | bec10d4beeb63468ffced2d173e8e0ea | 37.938776 | 81 | 0.632075 | 3.586466 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace/tests/fixtures.py | 2 | 2965 | from django.utils.functional import cached_property
from waldur_core.structure import models as structure_models
from waldur_core.structure.tests import factories as structure_factories
from waldur_core.structure.tests import fixtures as structure_fixtures
from waldur_mastermind.marketplace import PLUGIN_NAME
from wal... | mit | 5937330fb51abe65323d8a093bb929f5 | 32.693182 | 82 | 0.673524 | 4.303338 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_core/core/log.py | 2 | 2178 | from waldur_core.core.models import SshPublicKey, User
from waldur_core.logging.loggers import EventLogger, event_logger
class AuthEventLogger(EventLogger):
user = User
username = str
class Meta:
event_types = (
'auth_logged_in_with_username',
'auth_login_failed_with_usern... | mit | 180cff98acfb53c45856d917cec6b1f7 | 25.240964 | 82 | 0.601469 | 4.078652 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_core/structure/templatetags/waldur_structure.py | 2 | 1284 | from collections import OrderedDict
from django import template
from django.utils.lru_cache import lru_cache
from waldur_core.core.utils import get_fake_context
from waldur_core.structure.registry import get_service_type
from waldur_core.structure.serializers import ServiceOptionsSerializer
register = template.Libra... | mit | e424a128b339a1112a51cbc3737a9d31 | 29.571429 | 81 | 0.67134 | 4.050473 | false | false | false | false |
opennode/waldur-mastermind | src/waldur_vmware/migrations/0002_virtualmachine.py | 2 | 5301 | # Generated by Django 1.11.20 on 2019-06-20 09:51
import django.db.models.deletion
import django.utils.timezone
import django_fsm
import model_utils.fields
from django.db import migrations, models
import waldur_core.core.fields
import waldur_core.core.models
import waldur_core.core.shims
import waldur_core.core.valida... | mit | a0f65803e09931f67f2151f1f4e8c897 | 34.577181 | 122 | 0.381626 | 5.657417 | false | false | false | false |
getavalon/core | avalon/vendor/requests/packages/chardet/gb2312freq.py | 344 | 20715 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | mit | 579b3ffd50c03bc2a69886f82e8be3a3 | 72.19788 | 91 | 0.728313 | 1.771724 | false | false | false | false |
codeforboston/cornerwise | server/site_config/site_config.py | 3 | 2089 | class SiteConfig():
# If set, Users in the Group will receive forwarded messages.
group_name = None
# A list of virtual hostnames to which this configuration applies:
hostnames = []
redirect = False
urlconf = None
# Extra template context for all views:
extra_context = {}
# Merged wi... | mit | 25d1ab7dc8a4befaeab2e209664395ff | 25.1125 | 77 | 0.588798 | 3.94896 | false | true | false | false |
codeforboston/cornerwise | server/user/contact.py | 3 | 2310 | from django import forms
from django.conf import settings
from django.contrib.auth import get_user_model
from shared import mail
from .models import UserComment
from .utils import admin_emails, group_emails
from utils import request_ip
User = get_user_model()
class ContactForm(forms.Form):
send_to = forms.Choi... | mit | 0fac30894fa7a9d2c32683cb2d071b55 | 32 | 107 | 0.590909 | 4.246324 | false | true | false | false |
codeforboston/cornerwise | server/proposal/models.py | 3 | 28773 | from datetime import datetime, timedelta, tzinfo
from django.conf import settings
from django.contrib.gis.db import models
from django.contrib.gis.geos import Point
from django.contrib.postgres import fields, indexes
from django.core.validators import MinValueValidator
from django.dispatch import receiver
from django.... | mit | f5f03edae78894d32a2afb2fc50a55da | 34.391144 | 89 | 0.583846 | 4.231946 | false | false | false | false |
codeforboston/cornerwise | server/parcel/views.py | 3 | 4020 | from django.contrib.gis.geos import Point
from django.db.models import Q
from django.shortcuts import get_object_or_404, render
from functools import reduce
import json, operator, re
from shared.address import normalize_number, normalize_street, split_address
from shared.request import make_response, ErrorResponse
f... | mit | 9d5947659b6b70505a844a6dd4729521 | 25.447368 | 78 | 0.589055 | 3.57016 | false | false | false | false |
codeforboston/cornerwise | server/scripts/idf.py | 3 | 1777 | from collections import defaultdict
from math import log
from operator import itemgetter
def raw_frequencies(terms):
freqs = defaultdict(int)
for term in terms:
freqs[term] += 1
return freqs
def term_frequencies(raw_freq):
max_freq = max(raw_freq.values())
return {term: (0.5*freq)/max_f... | mit | 9dfeee5ac03864a60ff6de5ade27119c | 23.013514 | 73 | 0.627462 | 3.184588 | false | false | false | false |
codeforboston/cornerwise | server/scripts/keywords.py | 3 | 1580 | from collections import defaultdict
import nltk
def group_true(pred, l):
"""Group adjacent elements in the collection l for which pred(element)
is true.
:param pred: A test function that will be run on each member of l
:param l: a collection
:returns: A generator that emits lists of elements fro... | mit | 6d89d58fdc14ee6a8f3b566d122676d4 | 21.253521 | 74 | 0.626582 | 3.590909 | false | false | false | false |
codeforboston/cornerwise | server/user/urls.py | 3 | 1222 | from django.urls import path, re_path
from . import views
from .mail_parse_views import mail_inbound
urlpatterns = [
path("confirm", views.confirm, name="confirm"),
re_path("(?P<token>[a-zA-Z0-9\-/+=]+)/(?P<pk>\d+)/",
views.user_login, name="user-login"),
path("logout", views.user_logout, name... | mit | e604e42696aa4da2f1b6b00822f44210 | 44.259259 | 99 | 0.694763 | 3.879365 | false | false | true | false |
codeforboston/cornerwise | server/cornerwise/local_settings.example.py | 3 | 1685 | # local_settings.py
#
# The local settings in local_settings.py are used when running the application
# in development. In production, use environment variables.
#
# To use this file:
# Run cp local_settings.example.py local_settings.py
# Edit contents of local_settings.py
#
# Please do not commit your changes to th... | mit | eca3284b8ae38fb9c68f4d145f78e927 | 28.561404 | 79 | 0.737685 | 3.323471 | false | false | false | false |
jorisroovers/gitlint | gitlint-core/gitlint/tests/rules/test_meta_rules.py | 1 | 3323 | from gitlint.tests.base import BaseTestCase, EXPECTED_REGEX_STYLE_SEARCH_DEPRECATION_WARNING
from gitlint.rules import AuthorValidEmail, RuleViolation
class MetaRuleTests(BaseTestCase):
def test_author_valid_email_rule(self):
rule = AuthorValidEmail()
# valid email addresses
valid_email_a... | mit | 09b5df29db44c200dab6014ffa49bc2a | 41.792208 | 112 | 0.609105 | 3.774341 | false | true | false | false |
jorisroovers/gitlint | gitlint-core/gitlint/git.py | 1 | 21473 | import logging
import os
from pathlib import Path
import arrow
from gitlint import shell as sh
# import exceptions separately, this makes it a little easier to mock them out in the unit tests
from gitlint.shell import CommandNotFound, ErrorReturnCode
from gitlint.cache import PropertyCache, cache
from gitlint.excep... | mit | ef1558e91200473831ed4897cf73c666 | 40.453668 | 120 | 0.634564 | 4.004662 | false | false | false | false |
conan-io/conan | conans/test/unittests/client/recorder/search_recorder_test.py | 1 | 10989 | import unittest
from conans.client.recorder.search_recorder import SearchRecorder
from conans.model.ref import ConanFileReference
_ref = ConanFileReference.loads
class SearchRecorderTest(unittest.TestCase):
def setUp(self):
self.search_recorder = SearchRecorder()
def test_empty(self):
info... | mit | 2c630b12a62abee5c50b6eba5f02ae8c | 53.945 | 101 | 0.260169 | 6.754149 | false | false | false | false |
conan-io/conan | conans/test/unittests/tools/google/test_bazel.py | 1 | 1458 | import textwrap
import os
from conan.tools import CONAN_TOOLCHAIN_ARGS_SECTION, CONAN_TOOLCHAIN_ARGS_FILE
from conans.util.files import save, remove
from conan.tools.google import Bazel
from conans.model.conf import ConfDefinition
from conans.test.utils.mocks import ConanFileMock
def test_bazel_command_with_empty_co... | mit | d33ad3f2b10ecd51c046feb3178336fc | 34.560976 | 123 | 0.674211 | 3.321185 | false | true | false | false |
conan-io/conan | conans/test/integration/toolchains/gnu/test_basic_layout.py | 1 | 1635 | import os
import platform
import textwrap
from conans.test.utils.tools import TestClient
def test_basic_layout_subproject():
c = TestClient()
conanfile = textwrap.dedent("""
from conan import ConanFile
from conan.tools.layout import basic_layout
class Pkg(ConanFile):
setti... | mit | 01c8e8b11b32249e4defb1a129f28113 | 33.787234 | 89 | 0.587156 | 3.690745 | false | true | false | false |
conan-io/conan | conans/client/rest/conan_requester.py | 1 | 5546 | import fnmatch
import logging
import os
import platform
import time
import warnings
import urllib3
import requests
from requests.adapters import HTTPAdapter
from conans import __version__ as client_version
from conans.util.files import save
from conans.util.tracer import log_client_rest_api_call
# Capture SSL warnin... | mit | 89de52fd125da87c9b09d5460a5b1a32 | 36.727891 | 96 | 0.584926 | 4.105107 | false | false | false | false |
conan-io/conan | conans/client/subsystems.py | 1 | 8858 | """
Potential scenarios:
- Running from a Windows native "cmd"
- Targeting Windows native (os.subsystem = None)
- No need of bash (no conf at all)
- Need to build in bash (tools.microsoft.bash:subsystem=xxx,
tools.microsoft.bash:path=<path>,
conanfile... | mit | 4c5cbf63b2bfd8bc283d87ed9ad32e05 | 39.447489 | 114 | 0.622827 | 3.75339 | false | false | false | false |
conan-io/conan | conan/tools/qbs/qbsprofile.py | 1 | 9801 | import shlex
import platform
import textwrap
from io import StringIO
from jinja2 import Template
from conans import tools
from conans.errors import ConanException
from conans.util.files import save
_profile_name = 'conan'
_profiles_prefix_in_config = 'profiles.%s' % _profile_name
_architecture = {
'x86': 'x86',
... | mit | 55ed559239c72e18495c90c9e9b42426 | 30.821429 | 82 | 0.537598 | 3.584857 | false | false | false | false |
conan-io/conan | conans/client/generators/make.py | 1 | 3777 | from conans.model import Generator
class MakeGenerator(Generator):
def __init__(self, conanfile):
Generator.__init__(self, conanfile)
self.makefile_newline = "\n"
self.makefile_line_continuation = " \\\n"
self.assignment_if_absent = " ?= "
self.assignment_append = " += "
... | mit | 3b9292c12f4b40c04b118714f439783a | 50.739726 | 97 | 0.542759 | 4.123362 | false | false | false | false |
conan-io/conan | conans/test/integration/graph/core/cross_build/test_grapher.py | 1 | 3878 | import textwrap
from conans.client.graph.grapher import Grapher, Node
from conans.model.profile import Profile
from conans.test.integration.graph.core.cross_build._base_test_case import CrossBuildingBaseTestCase
class GrapherTestCase(CrossBuildingBaseTestCase):
""" Written on top of the cross-building tests, so ... | mit | a2f3f500b8d1a26141201e59eea4065c | 41.615385 | 100 | 0.627385 | 3.901408 | false | true | false | false |
conan-io/conan | conans/test/unittests/tools/scm/test_version.py | 1 | 1124 | import textwrap
from conans.test.utils.tools import TestClient
def test_version():
c = TestClient()
conanfile = textwrap.dedent("""
from conan import ConanFile
from conan.tools.scm import Version
class Pkg(ConanFile):
name = "pkg"
version = "0.1"
s... | mit | 1e1b239bfdf18b4eade6fac2976072b6 | 34.125 | 82 | 0.572954 | 3.406061 | false | true | false | false |
conan-io/conan | conans/client/tools/intel.py | 1 | 4787 | import os
import platform
from contextlib import contextmanager
from conans.client.tools.env import environment_append, env_diff
from conans.client.tools.win import is_win64, _system_registry_key, MSVS_YEAR
from conans.errors import ConanException
from conans.util.env_reader import get_env
# https://software.intel.c... | mit | 19a934bb8b9780b7efc0fed76994d1f7 | 39.91453 | 129 | 0.62231 | 3.75451 | false | false | false | false |
conan-io/conan | conan/tools/meson/mesondeps.py | 1 | 3440 | import textwrap
from jinja2 import Template
from conan.tools.gnu.gnudeps_flags import GnuDepsFlags
from conan.tools.meson.helpers import to_meson_value
from conans.model.new_build_info import NewCppInfo
from conans.util.files import save
class MesonDeps(object):
"""Generator that manages all the GNU flags from ... | mit | 5d02f7d4987b92427c9b4166862c64ac | 31.761905 | 95 | 0.609593 | 3.602094 | false | false | false | false |
conan-io/conan | conans/client/graph/graph_binaries.py | 1 | 24846 | from conans.client.graph.build_mode import BuildMode
from conans.client.graph.compatibility import BinaryCompatibility
from conans.client.graph.graph import (BINARY_BUILD, BINARY_CACHE, BINARY_DOWNLOAD, BINARY_MISSING,
BINARY_UPDATE, RECIPE_EDITABLE, BINARY_EDITABLE,
... | mit | 5e28e4b6654659ba6a6f6630c70649ab | 50.7625 | 119 | 0.583474 | 4.451093 | false | false | false | false |
conan-io/conan | conans/client/generators/b2.py | 1 | 17037 |
"""
B2 Conan Generator
This is a generator for conanbuildinfo.jam files declaring all conan dependencies
as B2 project and library targets. This generates multiple tagged build info
source files, each containing a single variant as specified by the user's
conan install profile in addition to the central generic one th... | mit | 2e839a66ecdc8512af288fe8abf8ac53 | 38.529002 | 130 | 0.559664 | 3.489044 | false | false | false | false |
conan-io/conan | conans/test/unittests/tools/files/test_file_read_and_write.py | 1 | 2555 | # -*- coding: utf-8 -*-
import os
import pytest
import six
from conan.tools.files import replace_in_file, save, load
from conans.test.utils.mocks import MockConanfile
from conans.test.utils.test_files import temp_folder
@pytest.mark.skipif(six.PY2, reason="only Py3")
def test_save_and_load_encoding():
conanfi... | mit | 3b39d490c075a8c7d646d3bf5fc197ee | 34.173913 | 96 | 0.671199 | 2.84192 | false | true | false | false |
conan-io/conan | conans/test/assets/sources.py | 1 | 6008 | from jinja2 import Template
_function_cpp = r"""
{% if name != "main" %}
#include "{{name}}.h"
{% endif %}
#include <iostream>
{% for it in includes -%}
#include "{{it}}.h"
{% endfor %}
int {{name}}(){
#ifdef NDEBUG
std::cout << "{{ msg or name }}: Release!\n";
#else
std::cout << "{{ msg or name }}:... | mit | 6a6ec4ac9fea6f467419adff6b1dad38 | 21.671698 | 98 | 0.503495 | 2.818011 | false | false | false | false |
conan-io/conan | conans/model/build_info.py | 1 | 29045 | import os
from collections import OrderedDict
from copy import copy
from conans.errors import ConanException
from conans.util.conan_v2_mode import conan_v2_error
DEFAULT_INCLUDE = "include"
DEFAULT_LIB = "lib"
DEFAULT_BIN = "bin"
DEFAULT_RES = "res"
DEFAULT_SHARE = "share"
DEFAULT_BUILD = ""
DEFAULT_FRAMEWORK = "Fram... | mit | cae56f54a90c844a16728e040124a762 | 38.570845 | 111 | 0.601136 | 4.175532 | false | false | false | false |
conan-io/conan | conan/tools/cmake/file_api.py | 1 | 5365 | import json
import fnmatch
import os
from conan.tools.files import CppPackage
from conans.util.files import save, load
class CMakeFileAPI(object):
"""
implements https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html
"""
CODEMODELV2 = "codemodel-v2"
SKIP_TARGETS = ["ZERO_CHECK", "ALL_BU... | mit | 67fbe48be1ae93e5bdcc59c84b5568e2 | 36.256944 | 98 | 0.570177 | 4.058245 | false | true | false | false |
conan-io/conan | conans/client/rest/rest_client_v2.py | 1 | 16084 | import os
import time
import traceback
from conans import DEFAULT_REVISION_V1
from conans.client.downloaders.download import run_downloader
from conans.client.remote_manager import check_compressed_files
from conans.client.rest.client_routes import ClientV2Router
from conans.client.rest.file_uploader import FileUpload... | mit | dec3ddd09f0fe684096338e885faeef6 | 46.305882 | 100 | 0.592701 | 4.065723 | false | false | false | false |
conan-io/conan | conans/test/functional/toolchains/env/test_complete.py | 1 | 6247 | import textwrap
from conans.test.assets.sources import gen_function_cpp
from conans.test.utils.tools import TestClient
def test_cmake_virtualenv():
client = TestClient()
client.run("new hello/0.1 --template=cmake_lib")
client.run("create . -tf=None")
cmakewrapper = textwrap.dedent(r"""
from ... | mit | c37832927f2fc20b4cefdba604857932 | 37.325153 | 95 | 0.554826 | 3.951297 | false | false | false | false |
conan-io/conan | conans/test/unittests/client/tools/oss/get_cross_building_settings_test.py | 1 | 6154 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from collections import namedtuple
from mock import mock
from conans.client.tools.oss import get_cross_building_settings, OSInfo
from conans.test.utils.mocks import MockSettings
# TODO: Add tests using settings_host and settings_build
MockConanfile = na... | mit | cc44089c9bfb54b62ce580d4a3966023 | 52.513043 | 93 | 0.626259 | 3.594626 | false | true | false | false |
conan-io/conan | conan/tools/files/symlinks/symlinks.py | 1 | 2041 | import os
def get_symlinks(base_folder):
"""Return the absolute path to the symlink files in base_folder"""
for (root, dirnames, filenames) in os.walk(base_folder):
for el in filenames + dirnames:
fullpath = os.path.join(root, el)
if os.path.islink(fullpath):
yi... | mit | b889e64144758bb0d84577da7e2945cd | 38.25 | 98 | 0.658991 | 3.86553 | false | false | false | false |
conan-io/conan | conan/tools/files/conandata.py | 1 | 1068 | import os
import yaml
from conans.errors import ConanException
from conans.util.files import load, save
def update_conandata(conanfile, data):
"""
this only works for updating the conandata on the export() method, it seems it would
be plain wrong to try to change it anywhere else
"""
if not hasa... | mit | 1f4d77cde09172980a15af32ff735da3 | 31.363636 | 98 | 0.633895 | 3.478827 | false | false | false | false |
conan-io/conan | conans/client/tools/system_pm.py | 1 | 18797 | import os
import sys
import six
from conans.client.runner import ConanRunner
from conans.client.tools.oss import OSInfo, cross_building, get_cross_building_settings
from conans.client.tools.files import which
from conans.errors import ConanException, ConanInvalidSystemRequirements
from conans.util.env_reader import ge... | mit | 03e9c1e60e567e2e5a17159adcd4e8d0 | 39.078891 | 122 | 0.589775 | 3.932427 | false | false | false | false |
conan-io/conan | conan/tools/microsoft/msbuild.py | 1 | 2084 | from conans.errors import ConanException
def msbuild_verbosity_cmd_line_arg(conanfile):
verbosity = conanfile.conf.get("tools.microsoft.msbuild:verbosity")
if verbosity:
if verbosity not in ("Quiet", "Minimal", "Normal", "Detailed", "Diagnostic"):
raise ConanException("Unknown msbuild verb... | mit | 15e3f36eb739ef78482000afb5b5313f | 34.931034 | 87 | 0.582534 | 3.823853 | false | false | false | false |
conan-io/conan | conans/client/rest/file_uploader.py | 1 | 4978 | import os
import time
from copy import copy
from conans.client.rest import response_to_str
from conans.errors import AuthenticationException, ConanException, \
NotFoundException, ForbiddenException, RequestErrorException, InternalErrorException
from conans.util import progress_bar
from conans.util.files import sh... | mit | cb057d91902540f096bf464a511a5e37 | 38.824 | 100 | 0.596022 | 4.397527 | false | false | false | false |
conan-io/conan | conans/test/integration/python_requires/test_export_sources.py | 2 | 4524 | # coding=utf-8
import os
import textwrap
import unittest
from jinja2 import Template
from conans.model.ref import ConanFileReference
from parameterized import parameterized
from conans.test.utils.tools import TestClient
class PythonRequireExportSourcesTest(unittest.TestCase):
def setUp(self):
self.pyreq... | mit | caffa8c21cac230aa4a2212a02fbbed1 | 47.12766 | 110 | 0.553492 | 4.057399 | false | true | false | false |
conan-io/conan | conan/tools/microsoft/nmaketoolchain.py | 1 | 2178 | from conan.tools._compilers import cppstd_flag, build_type_flags
from conan.tools.env import Environment
class NMakeToolchain(object):
"""
https://learn.microsoft.com/en-us/cpp/build/reference/running-nmake?view=msvc-170#toolsini-and-nmake
We have also explored the usage of Tools.ini:
https://learn.mi... | mit | b0e9f05539b0131f99bb652bb935bd0c | 37.892857 | 104 | 0.640496 | 3.827768 | false | false | false | false |
conan-io/conan | conans/test/integration/settings/remove_subsetting_test.py | 1 | 7175 | import os
import textwrap
import unittest
from conans.test.utils.tools import TestClient
from conans.util.files import mkdir
class RemoveSubsettingTest(unittest.TestCase):
def test_remove_options(self):
# https://github.com/conan-io/conan/issues/2327
# https://github.com/conan-io/conan/issues/27... | mit | 851df3320dd5a35c85aa855646e74537 | 34.696517 | 98 | 0.604878 | 3.764428 | false | true | false | false |
conan-io/conan | conans/test/functional/generators/premake_test.py | 1 | 1866 | import textwrap
import unittest
import pytest
from conans.client.tools import which
from conans.test.utils.tools import TestClient
@pytest.mark.tool_premake
@pytest.mark.skipif(which("premake5") is None, reason="Needs premake5")
class PremakeGeneratorTest(unittest.TestCase):
def setUp(self):
self.clien... | mit | 95dab916f4005ab666e20543f1918cde | 32.321429 | 89 | 0.608253 | 3.808163 | false | true | false | false |
conan-io/conan | conans/model/lock_bundle.py | 1 | 7666 | import json
import os
from conans.errors import ConanException
from conans.model.graph_lock import GraphLockFile
from conans.util.files import load, save
class LockBundle(object):
""" aggregated view of multiple lockfiles, coming from different configurations and also
different products, that is, completely ... | mit | 49b9982ea9ee48fffa38f0dca8caaa69 | 42.067416 | 97 | 0.531698 | 4.549555 | false | false | false | false |
conan-io/conan | conans/test/functional/toolchains/microsoft/test_v2_msbuild_template.py | 1 | 1890 | import os
import platform
import re
import pytest
from conans.model.ref import ConanFileReference, PackageReference
from conans.test.utils.tools import TestClient
@pytest.mark.skipif(platform.system() != "Windows", reason="Requires Windows")
def test_msbuild_lib_template():
client = TestClient(path_with_spaces=... | mit | e817ee4aa7960487a5e72508921e42a7 | 35.346154 | 93 | 0.688889 | 3.339223 | false | true | false | false |
conan-io/conan | conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_aliases.py | 1 | 5086 | import textwrap
import pytest
from conans.test.utils.tools import TestClient
consumer = textwrap.dedent("""
from conans import ConanFile
from conan.tools.cmake import CMake
class Consumer(ConanFile):
name = "consumer"
version = "1.0"
settings = "os", "compiler", "build_type", "arch"
generators = "CMa... | mit | a2e555f6bb32ffc7b21f3b094fe02cbd | 26.197861 | 96 | 0.631931 | 3.651113 | false | true | false | false |
conan-io/conan | conans/client/generators/ycm.py | 1 | 6591 | import json
from conans.model import Generator
class YouCompleteMeGenerator(Generator):
template = '''
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public ... | mit | 88debb5bf6ccfe15ed8b608d86fc3bb4 | 32.456853 | 83 | 0.693218 | 3.753417 | false | false | false | false |
conan-io/conan | conans/model/conan_generator.py | 1 | 3700 | from abc import ABCMeta, abstractproperty
import six
from conans.errors import ConanException
from conans.model.build_info import COMPONENT_SCOPE
@six.add_metaclass(ABCMeta)
class Generator(object):
name = None
def __init__(self, conanfile):
self.conanfile = conanfile
self.normalize = True
... | mit | 8a38bdfd2cd8d6e0948a40a1148dd827 | 32.035714 | 95 | 0.620541 | 3.870293 | false | false | false | false |
conan-io/conan | conans/test/integration/templates/test_user_overrides.py | 1 | 2159 | import os
import unittest
from conans.assets.templates import SEARCH_TABLE_HTML, INFO_GRAPH_DOT, INFO_GRAPH_HTML
from conans.client.tools import save
from conans.model.ref import ConanFileReference
from conans.test.utils.tools import TestClient, GenConanfile
class UserOverridesTemplatesTestCase(unittest.TestCase):
... | mit | 6eaebb6d414bfc2c1fe7cb4cb0ed33f1 | 49.209302 | 95 | 0.660954 | 3.271212 | false | true | false | false |
conan-io/conan | conans/client/rest/rest_client_v1.py | 1 | 16325 | import os
import time
import traceback
from collections import namedtuple
from six.moves.urllib.parse import parse_qs, urljoin, urlparse, urlsplit
from conans.client.downloaders.download import run_downloader
from conans.client.downloaders.file_downloader import FileDownloader
from conans.client.remote_manager import... | mit | 47419ab20d0345d2d00d24bb09fed444 | 45.509972 | 100 | 0.60925 | 3.999265 | false | false | false | false |
conan-io/conan | conans/test/integration/cache/download_cache_test.py | 1 | 16966 | import os
import textwrap
import time
import unittest
from collections import Counter
from threading import Thread
from bottle import static_file, request
import pytest
from conans.client.downloaders.cached_file_downloader import CachedFileDownloader
from conans.test.assets.genconanfile import GenConanfile
from conan... | mit | a3191902ced1d86543f82709c8234005 | 42.614396 | 99 | 0.604916 | 3.746908 | false | true | false | false |
conan-io/conan | conans/test/functional/toolchains/test_nmake_toolchain.py | 1 | 2164 | import platform
import textwrap
import pytest
from conans.test.assets.sources import gen_function_cpp
from conans.test.functional.utils import check_exe_run
from conans.test.utils.tools import TestClient
@pytest.mark.parametrize("compiler, version, runtime, cppstd, build_type",
[("msvc", "1... | mit | d97e47f0d272ee5364e2f09e63b5f719 | 36.964912 | 95 | 0.577634 | 3.718213 | false | true | false | false |
conan-io/conan | conans/test/unittests/client/rest/rest_client_v2/test_get_package_manifest.py | 1 | 1318 | # coding=utf-8
import unittest
from mock import patch
from conans.client.rest.client_routes import ClientV2Router
from conans.client.rest.rest_client_v2 import RestV2Methods
from conans.errors import ConanException
from conans.model.ref import PackageReference
class GetPackageManifestTestCase(unittest.TestCase):
... | mit | 47f1a21fa1bbcdc6ade63e933f1473d6 | 40.1875 | 94 | 0.665402 | 4.030581 | false | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.