hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acfb73f77f0eaebde32adc9105d04427be2a507e | 57,573 | py | Python | osf/models/user.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | osf/models/user.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | osf/models/user.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | import datetime as dt
import logging
import re
import urllib
import urlparse
import uuid
from copy import deepcopy
from os.path import splitext
from flask import Request as FlaskRequest
from framework import analytics
# OSF imports
import itsdangerous
import pytz
from dirtyfields import DirtyFieldsMixin
from django.... | 38.717552 | 147 | 0.638337 |
acfb788724c912f4feabbd0baa716e5fb780fba6 | 765 | py | Python | modules/sequence_modeling.py | khoroo/deep-text-recognition-benchmark | 6089c4035c5b8136c2f055126e5dd43a121501d9 | [
"Apache-2.0"
] | 4 | 2021-12-27T14:37:33.000Z | 2022-03-30T10:56:57.000Z | deep-text-recognition-benchmark/modules/sequence_modeling.py | JasonHippo/Scene_text_detection_and_recognition | c0da141d71b7b888d560296b201aecbbd735b565 | [
"MIT"
] | null | null | null | deep-text-recognition-benchmark/modules/sequence_modeling.py | JasonHippo/Scene_text_detection_and_recognition | c0da141d71b7b888d560296b201aecbbd735b565 | [
"MIT"
] | null | null | null | import torch.nn as nn
class BidirectionalLSTM(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super(BidirectionalLSTM, self).__init__()
self.rnn = nn.LSTM(input_size, hidden_size, bidirectional=True, batch_first=True)
self.linear = nn.Linear(hidden_size * 2, ... | 38.25 | 106 | 0.65098 |
acfb78ca8057da4333e6f4df3690c3f8fad0d10a | 165 | py | Python | contact_angle/__init__.py | tcmoore3/contact_angle | b6d20d69158f5ec3ed35163e4bb8da849e4d1f29 | [
"MIT"
] | 3 | 2015-11-07T03:54:36.000Z | 2020-05-26T09:40:47.000Z | contact_angle/__init__.py | tcmoore3/contact_angle | b6d20d69158f5ec3ed35163e4bb8da849e4d1f29 | [
"MIT"
] | 3 | 2015-11-07T01:01:45.000Z | 2019-08-01T13:19:42.000Z | contact_angle/__init__.py | tcmoore3/contact_angle | b6d20d69158f5ec3ed35163e4bb8da849e4d1f29 | [
"MIT"
] | 1 | 2018-10-23T18:05:48.000Z | 2018-10-23T18:05:48.000Z | from contact_angle.core import calc_contact_angle
from contact_angle.core import print_contact_angle_results
from contact_angle.core import print_contact_angle_fits
| 41.25 | 58 | 0.909091 |
acfb7972e4e7f97fb923fd390212a9eae022a9bb | 2,783 | py | Python | webstore/users/views.py | dmusial98/WebStorePython | ed98764a40dd82db2b57e030ff9bf0bc777075a7 | [
"Unlicense"
] | null | null | null | webstore/users/views.py | dmusial98/WebStorePython | ed98764a40dd82db2b57e030ff9bf0bc777075a7 | [
"Unlicense"
] | null | null | null | webstore/users/views.py | dmusial98/WebStorePython | ed98764a40dd82db2b57e030ff9bf0bc777075a7 | [
"Unlicense"
] | null | null | null | from cgitb import lookup
from urllib import request
from .models import User
from . import serializers
from rest_framework.permissions import AllowAny
# from . import permissions
from rest_framework import generics, status
from rest_framework.response import Response
from django_filters.rest_framework import DjangoFilt... | 37.608108 | 67 | 0.674093 |
acfb7bb5a80c0a32ce47ca1a9e0ff97bdee2db7e | 24,472 | py | Python | third_party/chromite/scripts/cros_gdb.py | zipated/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | third_party/chromite/scripts/cros_gdb.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | third_party/chromite/scripts/cros_gdb.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | # -*- coding: utf-8 -*-
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Wrapper for running gdb.
This handles the fun details like running against the right sysroot, via
qemu, bind mounts, etc...
""... | 35.988235 | 80 | 0.621118 |
acfb7c8311154848af3401c83ca8258a481dc72b | 305 | py | Python | tbproject/talkback/version.py | amjad2000in/Amjad-talkback-lambda | 18b4cf8b2b6a503783fe6ad9ce1b0b1e1b30c8b4 | [
"Apache-2.0"
] | null | null | null | tbproject/talkback/version.py | amjad2000in/Amjad-talkback-lambda | 18b4cf8b2b6a503783fe6ad9ce1b0b1e1b30c8b4 | [
"Apache-2.0"
] | 2 | 2021-06-02T00:19:10.000Z | 2021-06-02T00:19:25.000Z | tbproject/talkback/version.py | amjad2000in/Amjad-talkback-lambda | 18b4cf8b2b6a503783fe6ad9ce1b0b1e1b30c8b4 | [
"Apache-2.0"
] | null | null | null | # https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package
# Store the version here so:
# 1) we don't load dependencies by storing it in __init__.py
# 2) we can import it in setup.py for the same reason
# 3) we can import it into your module module
__version__ = '1.0'
| 43.571429 | 94 | 0.757377 |
acfb7ce8c606377051eab5fb8d9154a75d7290d1 | 2,388 | py | Python | tests/parsers/safari_cookies.py | ir4n6/plaso | 010f9cbdfc82e21ed6658657fd09a7b44115c464 | [
"Apache-2.0"
] | null | null | null | tests/parsers/safari_cookies.py | ir4n6/plaso | 010f9cbdfc82e21ed6658657fd09a7b44115c464 | [
"Apache-2.0"
] | null | null | null | tests/parsers/safari_cookies.py | ir4n6/plaso | 010f9cbdfc82e21ed6658657fd09a7b44115c464 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the Safari cookie parser."""
from __future__ import unicode_literals
import unittest
from plaso.formatters import safari_cookies as _ # pylint: disable=unused-import
from plaso.lib import definitions
from plaso.parsers import safari_cookies
from tests import t... | 32.27027 | 81 | 0.731156 |
acfb7eefdf587a92bc761d151bd47f6eaeb78390 | 10,747 | py | Python | python_modules/dagster/dagster_tests/core_tests/types_tests/test_types.py | jake-billings/dagster | 7a1548a1f246c48189f3d8109e831b744bceb7d4 | [
"Apache-2.0"
] | 1 | 2019-07-15T17:34:04.000Z | 2019-07-15T17:34:04.000Z | python_modules/dagster/dagster_tests/core_tests/types_tests/test_types.py | jake-billings/dagster | 7a1548a1f246c48189f3d8109e831b744bceb7d4 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/types_tests/test_types.py | jake-billings/dagster | 7a1548a1f246c48189f3d8109e831b744bceb7d4 | [
"Apache-2.0"
] | null | null | null | import pytest
from dagster import (
RunConfig,
InProcessExecutorConfig,
DagsterInvariantViolationError,
DagsterTypeCheckError,
Failure,
InputDefinition,
OutputDefinition,
RuntimeType,
TypeCheck,
execute_pipeline,
lambda_solid,
pipeline,
)
from dagster.core.types import ... | 29.203804 | 100 | 0.748116 |
acfb7f384ca7dca402cf6f9789c4b6d4f5c781c1 | 9,549 | py | Python | gobigger/utils/collision_detection.py | luanshaotong/GoBigger | 00c347a89a660134677d633f39c39123c5ab3deb | [
"Apache-2.0"
] | 189 | 2021-10-08T07:55:10.000Z | 2022-03-31T23:49:43.000Z | gobigger/utils/collision_detection.py | luanshaotong/GoBigger | 00c347a89a660134677d633f39c39123c5ab3deb | [
"Apache-2.0"
] | 25 | 2021-11-01T06:59:30.000Z | 2022-03-22T11:22:27.000Z | gobigger/utils/collision_detection.py | luanshaotong/GoBigger | 00c347a89a660134677d633f39c39123c5ab3deb | [
"Apache-2.0"
] | 28 | 2021-10-14T12:23:14.000Z | 2022-03-31T23:49:45.000Z | import numpy as np
import logging
from .structures import Border, QuadNode
class BaseCollisionDetection:
def __init__(self, border: Border) -> None:
self.border = border
def solve(self, query_list: list, gallery_list: list):
raise NotImplementedError
class ExhaustiveCollisionDetection(Bas... | 42.252212 | 159 | 0.589276 |
acfb80b379c6676e2acdbb67e709382a49cff707 | 183 | py | Python | planfood/common/apps.py | vsventy/planfood-server | e7db1930705f15b70c989205b4b876649695cc94 | [
"MIT"
] | null | null | null | planfood/common/apps.py | vsventy/planfood-server | e7db1930705f15b70c989205b4b876649695cc94 | [
"MIT"
] | null | null | null | planfood/common/apps.py | vsventy/planfood-server | e7db1930705f15b70c989205b4b876649695cc94 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class CommonConfig(AppConfig):
name = 'planfood.common'
verbose_name = _('Common')
| 22.875 | 55 | 0.765027 |
acfb80cbee3a03fe0b26c4e389b376880ff81bec | 8,425 | py | Python | tensorflow_probability/python/distributions/pareto.py | nadheesh/probability | 919adeda68c0a1403303646d1f7f508747fbfaa4 | [
"Apache-2.0"
] | 1 | 2019-10-13T19:52:59.000Z | 2019-10-13T19:52:59.000Z | tensorflow_probability/python/distributions/pareto.py | snehil03july/probability | 5f576230f1e261a823e20a49c442ff38c8f381d3 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/pareto.py | snehil03july/probability | 5f576230f1e261a823e20a49c442ff38c8f381d3 | [
"Apache-2.0"
] | 1 | 2019-10-13T19:52:57.000Z | 2019-10-13T19:52:57.000Z | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 37.114537 | 80 | 0.661128 |
acfb8181297aa4a75b6c61074726d3801d55c976 | 47,196 | py | Python | neutron/tests/functional/agent/linux/test_ip_lib.py | guillermomolina/neutron | bd2933a2588d1e0b18790dd719ca1d89aa4a0c8d | [
"Apache-2.0"
] | 3 | 2021-02-17T09:49:14.000Z | 2022-01-19T08:40:34.000Z | neutron/tests/functional/agent/linux/test_ip_lib.py | guillermomolina/neutron | bd2933a2588d1e0b18790dd719ca1d89aa4a0c8d | [
"Apache-2.0"
] | 1 | 2021-11-30T01:34:39.000Z | 2021-11-30T01:34:39.000Z | neutron/tests/functional/agent/linux/test_ip_lib.py | guillermomolina/neutron | bd2933a2588d1e0b18790dd719ca1d89aa4a0c8d | [
"Apache-2.0"
] | 1 | 2022-02-16T22:23:07.000Z | 2022-02-16T22:23:07.000Z | # Copyright (c) 2014 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 41.183246 | 79 | 0.606026 |
acfb83a2a93257a99eef6342ea387f9e05d052e7 | 827 | py | Python | Second-handtradingplatform/TradingPlatform/showgoods/models.py | shangyajun6943/Second-hand | b8c423eeb559aed67856fb8a9f7130793d028118 | [
"Apache-2.0"
] | null | null | null | Second-handtradingplatform/TradingPlatform/showgoods/models.py | shangyajun6943/Second-hand | b8c423eeb559aed67856fb8a9f7130793d028118 | [
"Apache-2.0"
] | null | null | null | Second-handtradingplatform/TradingPlatform/showgoods/models.py | shangyajun6943/Second-hand | b8c423eeb559aed67856fb8a9f7130793d028118 | [
"Apache-2.0"
] | null | null | null | from django.db import models
# Create your models here.
class ProductManager(models.Manager):
def get_queryset(self):
return super().get_queryset().filter(isdelete=0)
class Product(models.Model):
pro_name=models.CharField(max_length=40,unique=True)
price=models.DecimalField(max_digits=7,decimal_... | 30.62963 | 60 | 0.729141 |
acfb84159b3e0509bee7bd191e5a787f18b252f7 | 1,465 | py | Python | anuga/visualiser_new/feature.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 136 | 2015-05-07T05:47:43.000Z | 2022-02-16T03:07:40.000Z | anuga/visualiser_new/feature.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 184 | 2015-05-03T09:27:54.000Z | 2021-12-20T04:22:48.000Z | anuga/visualiser_new/feature.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 70 | 2015-03-18T07:35:22.000Z | 2021-11-01T07:07:29.000Z | from builtins import object
from types import FloatType
from vtk import vtkActor
class Feature(object):
def __init__(self, colour=(0.5, 0.5, 0.5), opacity=1.0, dynamic=False):
'''
Parameters:
colour: (float, float, float) - apply a single colour to the feature.
opacity: float - 1.0 i... | 32.555556 | 78 | 0.59727 |
acfb85a3d921ec0a6fe3e655f24a2fc89ab5c8e9 | 1,620 | py | Python | python/phonenumbers/shortdata/region_KE.py | vishnuku/python-phonenumbers | 6ac2cdd06b7ccf709a8efb21629cf2c5f030e627 | [
"Apache-2.0"
] | 3 | 2018-12-02T23:09:00.000Z | 2018-12-02T23:16:59.000Z | python/phonenumbers/shortdata/region_KE.py | vishnuku/python-phonenumbers | 6ac2cdd06b7ccf709a8efb21629cf2c5f030e627 | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/shortdata/region_KE.py | vishnuku/python-phonenumbers | 6ac2cdd06b7ccf709a8efb21629cf2c5f030e627 | [
"Apache-2.0"
] | null | null | null | """Auto-generated file, do not edit by hand. KE metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_KE = PhoneMetadata(id='KE', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[1-9]\\d{2,4}', possible_number_pattern... | 124.615385 | 407 | 0.665432 |
acfb85bc2a411357700ad96ed8a3ca7a4fc8bc3f | 1,733 | py | Python | chapter_13/mnist_large/mnist_cnn_aug_fcn.py | haloway13/PracticalDeepLearningPython | c3760b17945c9389421c2970a3d16c6528fb7af6 | [
"MIT"
] | 44 | 2021-02-25T00:52:04.000Z | 2022-03-16T02:04:50.000Z | chapter_13/mnist_large/mnist_cnn_aug_fcn.py | rkneusel9/PracticalDeepLearningWithPython | 561004e76b3e0828a59952874443384c31b6d84e | [
"MIT"
] | null | null | null | chapter_13/mnist_large/mnist_cnn_aug_fcn.py | rkneusel9/PracticalDeepLearningWithPython | 561004e76b3e0828a59952874443384c31b6d84e | [
"MIT"
] | 18 | 2021-03-18T11:22:18.000Z | 2022-03-08T21:10:42.000Z | #
# file: mnist_cnn_fcn.py
#
# Create fully convolutional version of the MNIST CNN
# and populate with the weights from the version trained
# on the MNIST digits.
#
# RTK, 20-Oct-2019
# Last update: 20-Oct-2019
#
################################################################
import keras
from keras.utils imp... | 33.980392 | 77 | 0.703405 |
acfb85d1cf24a5a0ca79a95d49c0cb5293d5272a | 275 | py | Python | runtime/hetdesrun/backend/models/adapter.py | JulianGrote1904/hetida-designer | 05350810eb3e0548c9d8a2a5a6afbf455635b5fd | [
"MIT"
] | null | null | null | runtime/hetdesrun/backend/models/adapter.py | JulianGrote1904/hetida-designer | 05350810eb3e0548c9d8a2a5a6afbf455635b5fd | [
"MIT"
] | null | null | null | runtime/hetdesrun/backend/models/adapter.py | JulianGrote1904/hetida-designer | 05350810eb3e0548c9d8a2a5a6afbf455635b5fd | [
"MIT"
] | null | null | null | # pylint: disable=no-name-in-module
from pydantic import BaseModel
from hetdesrun.backend.service.utils import to_camel
class AdapterFrontendDto(BaseModel):
id: str
name: str
url: str
internal_url: str
class Config:
alias_generator = to_camel
| 18.333333 | 52 | 0.723636 |
acfb867d01bad5a19609aecf491caf98dc05366d | 1,108 | py | Python | xv_leak_tools/test_components/dns_tool/dns_tool_builder.py | UAEKondaya1/expressvpn_leak_testing | 9e4cee899ac04f7820ac351fa55efdc0c01370ba | [
"MIT"
] | 219 | 2017-12-12T09:42:46.000Z | 2022-03-13T08:25:13.000Z | xv_leak_tools/test_components/dns_tool/dns_tool_builder.py | UAEKondaya1/expressvpn_leak_testing | 9e4cee899ac04f7820ac351fa55efdc0c01370ba | [
"MIT"
] | 11 | 2017-12-14T08:14:51.000Z | 2021-08-09T18:37:45.000Z | xv_leak_tools/test_components/dns_tool/dns_tool_builder.py | UAEKondaya1/expressvpn_leak_testing | 9e4cee899ac04f7820ac351fa55efdc0c01370ba | [
"MIT"
] | 45 | 2017-12-14T07:26:36.000Z | 2022-03-11T09:36:56.000Z | from xv_leak_tools.exception import XVEx
from xv_leak_tools.factory import Builder
from xv_leak_tools.test_components.dns_tool.macos.macos_dns_tool import MacOSDNSTool
from xv_leak_tools.test_components.dns_tool.windows.windows_dns_tool import WindowsDNSTool
from xv_leak_tools.test_components.dns_tool.linux.linux_dns_t... | 41.037037 | 90 | 0.703069 |
acfb86a419f5295feeb505e82a533b7ddc040bea | 6,538 | py | Python | uob/tossdr/ucla/gnuradio-802.15.4-demodulation/src/examples/cc1k_cc2420_dualrx.py | tinyos-io/tinyos-3.x-contrib | 3aaf036722a2afc0c0aad588459a5c3e00bd3c01 | [
"BSD-3-Clause",
"MIT"
] | 4 | 2016-03-27T04:53:16.000Z | 2020-04-28T13:53:19.000Z | uob/tossdr/ucla/gnuradio-802.15.4-demodulation/src/examples/cc1k_cc2420_dualrx.py | tinyos-io/tinyos-3.x-contrib | 3aaf036722a2afc0c0aad588459a5c3e00bd3c01 | [
"BSD-3-Clause",
"MIT"
] | null | null | null | uob/tossdr/ucla/gnuradio-802.15.4-demodulation/src/examples/cc1k_cc2420_dualrx.py | tinyos-io/tinyos-3.x-contrib | 3aaf036722a2afc0c0aad588459a5c3e00bd3c01 | [
"BSD-3-Clause",
"MIT"
] | 2 | 2015-01-04T15:07:38.000Z | 2019-10-24T07:11:38.000Z | #!/usr/bin/env python
#
# Decodes CC1k and CC2420 packets simultaniously. We use
# 8-bit data streams, thus, the CC1K needs to be near the
# antenna of the USRP or we don't receive it (signal too
# weak).
#
# We assume that the FLEX2400 is on side A and FL400 on
# side B!
#
# Modified by: Thomas Schmid
#
from gnura... | 39.149701 | 130 | 0.53732 |
acfb87b0f2d77596e988c013010a13ce2d233345 | 4,086 | py | Python | main.py | Bilbobx182/PopPunkBot | 3b100c731d436222bf0d7a404fa548a80448eb54 | [
"MIT"
] | 1 | 2016-04-17T22:53:32.000Z | 2016-04-17T22:53:32.000Z | main.py | Bilbobx182/PopPunkBot | 3b100c731d436222bf0d7a404fa548a80448eb54 | [
"MIT"
] | null | null | null | main.py | Bilbobx182/PopPunkBot | 3b100c731d436222bf0d7a404fa548a80448eb54 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import praw
import os
import spotipy
import spotipy.util as util
from bs4 import BeautifulSoup
import requests
import sys
# "Declaring" variables for the first time.
# Praw Variables
username = "eternal_atom"
tid = ""
prawClientID = "reddit client ID here"
# Spotify Variables
pid = "playlist here"... | 30.492537 | 131 | 0.5744 |
acfb885d252ae82452ea56970a6a03a1783071e5 | 1,325 | py | Python | webmap/models.py | ignacioHermosilla/geographynow | 4eaea97afd27a4c096e64caa1e6a9d4417a3c4c7 | [
"Unlicense",
"MIT"
] | null | null | null | webmap/models.py | ignacioHermosilla/geographynow | 4eaea97afd27a4c096e64caa1e6a9d4417a3c4c7 | [
"Unlicense",
"MIT"
] | null | null | null | webmap/models.py | ignacioHermosilla/geographynow | 4eaea97afd27a4c096e64caa1e6a9d4417a3c4c7 | [
"Unlicense",
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
import arrow
import urllib
class BaseModel(models.Model):
updated_at = models.DateTimeField(auto_now=True)
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
abstract = True
class Country(BaseModel):
code = ... | 28.804348 | 80 | 0.676981 |
acfb89c4783e7840b6bae03f6af65609d91bd0be | 1,958 | py | Python | py/projects/qaviton_tests/tests/execute_tests/unit_tests/test_crosstest.py | qaviton/test_repository | e9bf1bb12a138c6d92329ca4784f40767cb2ace9 | [
"Apache-2.0"
] | 7 | 2018-11-20T15:44:27.000Z | 2021-01-01T11:08:49.000Z | py/projects/qaviton_tests/tests/execute_tests/unit_tests/test_crosstest.py | Yativg/test_repository | 7e5c018034d7bdf6a657325ef4fc34c13fdec2a7 | [
"Apache-2.0"
] | 114 | 2018-11-17T20:55:24.000Z | 2022-03-11T23:34:09.000Z | py/projects/qaviton_tests/tests/execute_tests/unit_tests/test_crosstest.py | Yativg/test_repository | 7e5c018034d7bdf6a657325ef4fc34c13fdec2a7 | [
"Apache-2.0"
] | 4 | 2018-11-20T15:56:11.000Z | 2019-03-05T19:18:33.000Z | # test runner
import pytest
# things for the tests
from tests.data.platforms.supported_platforms import platforms
from tests.data.count_functions import from_zero_to_hero
# things to test
from qaviton.crosstest import WebDriver
from qaviton.crosstest import MobileDriver
from qaviton import crosstest
from qaviton impo... | 38.392157 | 117 | 0.740552 |
acfb89de4df1f174cb2e032ceee20bce55f05f42 | 1,812 | py | Python | learner.py | cgomezsu/IntelligentAQM | c94b1ee339cfad46d5dc46e985b71ef73a85b6dd | [
"MIT"
] | 2 | 2020-08-08T02:02:50.000Z | 2020-08-10T10:29:35.000Z | learner.py | cgomezsu/IntelligentAQM | c94b1ee339cfad46d5dc46e985b71ef73a85b6dd | [
"MIT"
] | 1 | 2020-06-18T05:10:22.000Z | 2020-09-30T19:29:25.000Z | learner.py | cgomezsu/IntelligentAQM | c94b1ee339cfad46d5dc46e985b71ef73a85b6dd | [
"MIT"
] | 3 | 2019-09-14T09:51:49.000Z | 2021-01-01T18:32:59.000Z | """
v.e.s.
Tuner based on the Q-Learning algorithm.
MIT License
Copyright (c) 2019 Cesar A. Gomez
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wi... | 30.711864 | 89 | 0.724062 |
acfb8b3f84a70c9a5b08a4baafb596e7ebc00d77 | 1,233 | py | Python | alien.py | thepasterover/alien_invasion | 75fff5f7981f31ddcda146039eef9d809eb081a2 | [
"MIT"
] | 2 | 2019-05-13T16:16:20.000Z | 2019-06-03T00:58:59.000Z | alien.py | thepasterover/alien_invasion | 75fff5f7981f31ddcda146039eef9d809eb081a2 | [
"MIT"
] | 1 | 2019-05-12T05:54:34.000Z | 2020-04-20T22:16:31.000Z | alien.py | thepasterover/alien_invasion | 75fff5f7981f31ddcda146039eef9d809eb081a2 | [
"MIT"
] | null | null | null | import pygame
from pygame.sprite import Sprite
class Alien(Sprite):
"""A class to represent a single alien in the fleet."""
def __init__(self, ai_settings, screen):
super(Alien, self).__init__()
self.screen = screen
self.ai_settings = ai_settings
# Load the alien image and se... | 30.825 | 90 | 0.621249 |
acfb8b899808d32f63fbad46ed80f34b23b947c5 | 32 | py | Python | .scripts/helpers/__init__.py | tothradoslav/klaro | 832d7b4d210d8473458ecc8a33ec0c5848200c05 | [
"BSD-3-Clause"
] | 541 | 2020-07-17T08:03:27.000Z | 2022-03-31T09:40:59.000Z | .scripts/helpers/__init__.py | tothradoslav/klaro | 832d7b4d210d8473458ecc8a33ec0c5848200c05 | [
"BSD-3-Clause"
] | 236 | 2020-07-17T12:43:52.000Z | 2022-03-14T16:47:06.000Z | .scripts/helpers/__init__.py | tothradoslav/klaro | 832d7b4d210d8473458ecc8a33ec0c5848200c05 | [
"BSD-3-Clause"
] | 125 | 2018-05-28T20:09:48.000Z | 2020-07-14T11:58:53.000Z | from .translate import * # noqa
| 16 | 31 | 0.71875 |
acfb8bfeafcf91376047d0cb5c1efc18de2b1a92 | 3,971 | py | Python | reid/models/resnet.py | khko1022/bottom_up_reid | e60e86f5504f72b3ff8258702cd30c08f5a745f7 | [
"MIT"
] | null | null | null | reid/models/resnet.py | khko1022/bottom_up_reid | e60e86f5504f72b3ff8258702cd30c08f5a745f7 | [
"MIT"
] | null | null | null | reid/models/resnet.py | khko1022/bottom_up_reid | e60e86f5504f72b3ff8258702cd30c08f5a745f7 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from torch import nn
from torch.nn import functional as F
from torch.nn import init
import torchvision
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152']
class ResNet(nn.Module):
__factory = {
18: torchvision.models.resne... | 31.768 | 97 | 0.567615 |
acfb8cef12825631fb60202ab51bec21e7c89d90 | 3,481 | py | Python | bindings/python/ensmallen/datasets/string/parapedobacterluteus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/parapedobacterluteus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/parapedobacterluteus.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Parapedobacter luteus.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein ... | 33.152381 | 223 | 0.678541 |
acfb8d3f9a6e7329dcbdb752e498dfc4ad3019b2 | 855 | py | Python | example/my13_boto3_requests_http.py | crazyfan5566/aws_lambda_python_example | d251ff340da1bd321d2134b599fd915366f5bace | [
"MIT"
] | 6 | 2017-02-13T05:28:26.000Z | 2021-02-05T08:55:43.000Z | example/my13_boto3_requests_http.py | crazyfan5566/aws_lambda_python_example | d251ff340da1bd321d2134b599fd915366f5bace | [
"MIT"
] | null | null | null | example/my13_boto3_requests_http.py | crazyfan5566/aws_lambda_python_example | d251ff340da1bd321d2134b599fd915366f5bace | [
"MIT"
] | 4 | 2017-05-11T06:58:46.000Z | 2020-11-25T16:32:26.000Z | # encoding: utf-8
'''
使用 boto3 裡面的 requests lib 抓網頁
http://docs.python-requests.org/
'''
from __future__ import print_function
from botocore.vendored import requests
def lambda_handler(event, context):
'''
entry point (lambda)
'''
s_url = 'https://www.google.com'
# disable the se... | 22.5 | 61 | 0.604678 |
acfb8d58f11ab22b0a66eeed6e8931544b22b9be | 5,548 | py | Python | src/python/pants/backend/codegen/wire/java/wire_gen.py | billybecker/pants | ee101f3e360b712aceb9dacf7723aaf9b5567f04 | [
"Apache-2.0"
] | 94 | 2015-01-15T21:24:20.000Z | 2022-02-16T16:55:43.000Z | src/python/pants/backend/codegen/wire/java/wire_gen.py | billybecker/pants | ee101f3e360b712aceb9dacf7723aaf9b5567f04 | [
"Apache-2.0"
] | 5 | 2020-07-18T01:04:43.000Z | 2021-05-10T08:40:56.000Z | src/python/pants/backend/codegen/wire/java/wire_gen.py | billybecker/pants | ee101f3e360b712aceb9dacf7723aaf9b5567f04 | [
"Apache-2.0"
] | 47 | 2015-02-25T02:20:07.000Z | 2022-03-21T00:59:16.000Z | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
from twitter.common.collections import OrderedSet
from pants.b... | 38.797203 | 96 | 0.697729 |
acfb8dfb868ed8be1484f6d3b9384d11b2d98c1b | 34 | py | Python | 4/.#main.py | diblaze/TDP002 | 41c9c2155e2ad8cc4047ea912edd463042d95362 | [
"MIT"
] | null | null | null | 4/.#main.py | diblaze/TDP002 | 41c9c2155e2ad8cc4047ea912edd463042d95362 | [
"MIT"
] | null | null | null | 4/.#main.py | diblaze/TDP002 | 41c9c2155e2ad8cc4047ea912edd463042d95362 | [
"MIT"
] | null | null | null | dylma900@localhost.6200:1473937161 | 34 | 34 | 0.911765 |
acfb8e1935bf4d3e67e90ec5d4de6c21ef4c604e | 7,009 | py | Python | btclib/tests/test_sighash.py | giubby84/btclib | 0dd7e4e8ca43451a03b577fd7ec95715a1a21711 | [
"MIT"
] | null | null | null | btclib/tests/test_sighash.py | giubby84/btclib | 0dd7e4e8ca43451a03b577fd7ec95715a1a21711 | [
"MIT"
] | null | null | null | btclib/tests/test_sighash.py | giubby84/btclib | 0dd7e4e8ca43451a03b577fd7ec95715a1a21711 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (C) 2020 The btclib developers
#
# This file is part of btclib. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution.
#
# No part of btclib including this file, may be copied, modified, propagated,
# or distributed except acco... | 38.092391 | 424 | 0.774148 |
acfb8e988b7609486f1c3c5377e973f6cb60b8f8 | 1,102 | py | Python | src/genbuildparams.py | kahunamoore/duktape | 7fcb85345c180546a245e0fca927081ff7d24e9c | [
"MIT"
] | null | null | null | src/genbuildparams.py | kahunamoore/duktape | 7fcb85345c180546a245e0fca927081ff7d24e9c | [
"MIT"
] | null | null | null | src/genbuildparams.py | kahunamoore/duktape | 7fcb85345c180546a245e0fca927081ff7d24e9c | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Generate build parameter files based on build information.
# A C header is generated for C code, and a JSON file for
# build scripts etc which need to know the build config.
#
import os
import sys
import json
import optparse
import dukutil
if __name__ == '__main__':
parser = optparse.Option... | 26.238095 | 77 | 0.705989 |
acfb90f98f360435b5cbc30d709babdb00199757 | 294 | py | Python | python/3bot-auth/config.py | crystaluniverse/crystal_filebrowser | 714fedb53a0bf92c166f0e7ceb61f86077fcb456 | [
"Apache-2.0"
] | null | null | null | python/3bot-auth/config.py | crystaluniverse/crystal_filebrowser | 714fedb53a0bf92c166f0e7ceb61f86077fcb456 | [
"Apache-2.0"
] | null | null | null | python/3bot-auth/config.py | crystaluniverse/crystal_filebrowser | 714fedb53a0bf92c166f0e7ceb61f86077fcb456 | [
"Apache-2.0"
] | null | null | null | config = {
'threebot-privatekey': 'KBEs2Z7O7o/MzGdYTNR2FT0jjrRLAtFuWtZcnU8inWo=',
'threebot-appid': 'filebrowser.jimber.org',
'filebrowserUrl': 'https://filebrowser.jimber.org',
'loginUrl': 'https://login.threefold.me',
'kycUrl': 'https://openkyc.live',
'port': '5001'
} | 36.75 | 74 | 0.670068 |
acfb9134c10e6e2ce77986ab9c21b20267dd9d33 | 107 | py | Python | src/modeval/__init__.py | rubycookinson/seval | ed5ecbc0936191aa427ca3206def0d9ee9e4c04b | [
"MIT"
] | 1 | 2021-12-28T20:40:32.000Z | 2021-12-28T20:40:32.000Z | src/modeval/__init__.py | rubycookinson/seval | ed5ecbc0936191aa427ca3206def0d9ee9e4c04b | [
"MIT"
] | 2 | 2021-12-24T18:27:43.000Z | 2022-01-01T14:14:31.000Z | src/modeval/__init__.py | rubycookinson/seval | ed5ecbc0936191aa427ca3206def0d9ee9e4c04b | [
"MIT"
] | 1 | 2022-01-01T16:13:38.000Z | 2022-01-01T16:13:38.000Z | from modeval.modeval import Parser, Ruleset, default_ruleset, scientific_ruleset, meval, parse_parentheses
| 53.5 | 106 | 0.859813 |
acfb923cc95c716d170adf353dc74bc40ac97046 | 1,464 | py | Python | interpreter.py | kimi641/pyJVM | 9e2b2392044a8ddd41ff8dda18a26e307776ae34 | [
"MIT"
] | null | null | null | interpreter.py | kimi641/pyJVM | 9e2b2392044a8ddd41ff8dda18a26e307776ae34 | [
"MIT"
] | 1 | 2021-01-21T09:38:24.000Z | 2021-01-21T09:38:24.000Z | interpreter.py | kimi641/pyJVM | 9e2b2392044a8ddd41ff8dda18a26e307776ae34 | [
"MIT"
] | null | null | null | import classfile
import instructions
import instructions.base
import rtda
import rtda.heap
def logInstruction(frame:rtda.Frame, inst:instructions.base.Instruction):
method = frame.Method()
className = method.Class().Name()
methodName = method.Name()
pc = frame.Thread().PC()
print(f"{className}.{met... | 28.153846 | 87 | 0.635246 |
acfb942fc56e46824f67f03be2980fb187fe86c5 | 3,114 | py | Python | python3-virtualenv/Lib/python3.6/site-packages/greenlet/tests/test_leaks.py | LindaNayeli104/mlh-orientation-hackathon-project | d86b58f76721a9d5f3374399bfc6d3b1445d16ca | [
"MIT"
] | null | null | null | python3-virtualenv/Lib/python3.6/site-packages/greenlet/tests/test_leaks.py | LindaNayeli104/mlh-orientation-hackathon-project | d86b58f76721a9d5f3374399bfc6d3b1445d16ca | [
"MIT"
] | null | null | null | python3-virtualenv/Lib/python3.6/site-packages/greenlet/tests/test_leaks.py | LindaNayeli104/mlh-orientation-hackathon-project | d86b58f76721a9d5f3374399bfc6d3b1445d16ca | [
"MIT"
] | 1 | 2021-06-20T19:28:37.000Z | 2021-06-20T19:28:37.000Z | import unittest
import sys
import gc
import time
import weakref
import greenlet
import threading
class ArgRefcountTests(unittest.TestCase):
def test_arg_refs(self):
args = ('a', 'b', 'c')
refcount_before = sys.getrefcount(args)
g = greenlet.greenlet(
lambda *arg... | 36.209302 | 80 | 0.530829 |
acfb948764d84e5eca0a1d02a10f4d9bfdf9ded3 | 47,457 | py | Python | v2.5.7/toontown/quest/QuestParser.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v2.5.7/toontown/quest/QuestParser.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v2.5.7/toontown/quest/QuestParser.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | import sys, os, tokenize, copy
from direct.interval.IntervalGlobal import *
from direct.directnotify import DirectNotifyGlobal
from direct.showbase import AppRunnerGlobal
from panda3d.core import *
from direct.showbase import DirectObject
import BlinkingArrows
from toontown.toon import ToonHeadFrame
from toontown.char ... | 41.997345 | 290 | 0.548981 |
acfb952c110a7d1f9339c7b12e59767402ea7987 | 6,479 | py | Python | scripts/2.TCGA-MLexample.py | KT12/Machine-Learning | 63cd3f9edc951fd1ca721f8a8336c8c625ea5b53 | [
"BSD-3-Clause"
] | null | null | null | scripts/2.TCGA-MLexample.py | KT12/Machine-Learning | 63cd3f9edc951fd1ca721f8a8336c8c625ea5b53 | [
"BSD-3-Clause"
] | null | null | null | scripts/2.TCGA-MLexample.py | KT12/Machine-Learning | 63cd3f9edc951fd1ca721f8a8336c8c625ea5b53 | [
"BSD-3-Clause"
] | null | null | null |
# coding: utf-8
# # Create a logistic regression model to predict TP53 mutation from gene expression data in TCGA
# In[1]:
import os
import urllib
import random
import warnings
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import preprocessing
from sklear... | 25.308594 | 167 | 0.713536 |
acfb96783c63e8e128f16b6e25ba1099299bbfa7 | 2,905 | py | Python | setup.py | andreierdoss/news-please | 054d30a154f05303a9992057e085c47859f80e4b | [
"Apache-2.0"
] | null | null | null | setup.py | andreierdoss/news-please | 054d30a154f05303a9992057e085c47859f80e4b | [
"Apache-2.0"
] | null | null | null | setup.py | andreierdoss/news-please | 054d30a154f05303a9992057e085c47859f80e4b | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(name='news-please',
version='1.4.26',
description="news-please is an open source easy-to-use news extractor that just works.",
long_description="""\
news-please is an open source, easy-to-use news crawler that extracts structured information from almo... | 44.692308 | 606 | 0.598967 |
acfb96a959613ca6341b302b8f660a8444c397f3 | 5,530 | py | Python | h/admin/views/users.py | ssin122/test-h | c10062ae23b690afaac0ab4af7b9a5a5e4b686a9 | [
"MIT"
] | null | null | null | h/admin/views/users.py | ssin122/test-h | c10062ae23b690afaac0ab4af7b9a5a5e4b686a9 | [
"MIT"
] | null | null | null | h/admin/views/users.py | ssin122/test-h | c10062ae23b690afaac0ab4af7b9a5a5e4b686a9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from elasticsearch import helpers as es_helpers
import jinja2
from pyramid import httpexceptions
from pyramid.view import view_config
from h import models
from h.accounts.events import ActivationEvent
from h.services.rename_user import UserRenameError
f... | 31.067416 | 118 | 0.648101 |
acfb96bab8978c36905120e70b4dba6f87278557 | 194 | py | Python | fun1.py | hallel21-meet/meet2019y1lab6 | 6171904b2cebdc736c2c02b0801e3ee06dcd6506 | [
"MIT"
] | null | null | null | fun1.py | hallel21-meet/meet2019y1lab6 | 6171904b2cebdc736c2c02b0801e3ee06dcd6506 | [
"MIT"
] | null | null | null | fun1.py | hallel21-meet/meet2019y1lab6 | 6171904b2cebdc736c2c02b0801e3ee06dcd6506 | [
"MIT"
] | null | null | null | Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>>
| 38.8 | 72 | 0.690722 |
acfb96ea0d3d5b43b0f6a42db5a0caa9a9a88bc7 | 11,136 | py | Python | src/pretix/plugins/pretixdroid/views.py | td00/pretix | e31bd7600c85598de135f2eb5012e2f33fdb1d11 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/plugins/pretixdroid/views.py | td00/pretix | e31bd7600c85598de135f2eb5012e2f33fdb1d11 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/plugins/pretixdroid/views.py | td00/pretix | e31bd7600c85598de135f2eb5012e2f33fdb1d11 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-08-09T17:11:28.000Z | 2017-08-09T17:11:28.000Z | import json
import logging
import string
import dateutil.parser
from django.db import transaction
from django.db.models import Count, Q
from django.http import (
HttpResponseForbidden, HttpResponseNotFound, JsonResponse,
)
from django.shortcuts import get_object_or_404
from django.utils.crypto import get_random_st... | 38.136986 | 120 | 0.552712 |
acfb96f21513c24d399ad4f1ee700707fcada541 | 2,125 | py | Python | Client/StickClient/ipExchange.py | nikolajlauridsen/LANStick | 11cf2def5bde8c14c792f9a13c376226c0c8bb09 | [
"MIT"
] | null | null | null | Client/StickClient/ipExchange.py | nikolajlauridsen/LANStick | 11cf2def5bde8c14c792f9a13c376226c0c8bb09 | [
"MIT"
] | null | null | null | Client/StickClient/ipExchange.py | nikolajlauridsen/LANStick | 11cf2def5bde8c14c792f9a13c376226c0c8bb09 | [
"MIT"
] | null | null | null | from random_words import RandomWords, RandomNicknames
import requests
import socket
import hashlib
import json
import os
from .config import server_ip, server_port, listening_port
class IpExchange:
def __init__(self):
self.server_url = f'http://{server_ip}:{server_port}'
self.rw = RandomWords()
... | 31.25 | 116 | 0.613176 |
acfb9776441228fae512cf7acc789f2200427a1b | 113 | py | Python | envplus/__init__.py | jsvine/envplus | 1ad7e1fabd4f57b2af003c81bda8595609912af8 | [
"MIT"
] | 54 | 2015-01-25T06:26:53.000Z | 2022-02-28T08:50:53.000Z | envplus/__init__.py | jsvine/envplus | 1ad7e1fabd4f57b2af003c81bda8595609912af8 | [
"MIT"
] | 1 | 2017-11-02T14:14:34.000Z | 2017-11-02T14:22:32.000Z | envplus/__init__.py | jsvine/envplus | 1ad7e1fabd4f57b2af003c81bda8595609912af8 | [
"MIT"
] | 8 | 2015-11-07T14:02:55.000Z | 2021-07-06T22:44:59.000Z | import env
import pathfile
import helpers
VERSION_TUPLE = (0, 0, 0)
VERSION = ".".join(map(str, VERSION_TUPLE))
| 16.142857 | 43 | 0.725664 |
acfb979d076da8f693ce9546c5e2b18271a1dd1d | 1,015 | py | Python | merge_sort.py | Nefari0uss/grokking-algorithms | ec93a22e6c02dd1ce833c498b4abfc142fb10b5a | [
"MIT"
] | 1 | 2019-12-03T20:08:46.000Z | 2019-12-03T20:08:46.000Z | merge_sort.py | Nefari0uss/grokking-algorithms | ec93a22e6c02dd1ce833c498b4abfc142fb10b5a | [
"MIT"
] | null | null | null | merge_sort.py | Nefari0uss/grokking-algorithms | ec93a22e6c02dd1ce833c498b4abfc142fb10b5a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
def merge_sort(arr):
if len(arr) > 1:
# sub-divide into partitions
mid = len(arr) // 2
left = arr[:mid] # from 0 to mid
right = arr[mid:] # from mid to end
merge_sort(left)
merge_sort(right)
i, j, k = 0, 0, 0 # i is left, j is right,... | 22.555556 | 75 | 0.44532 |
acfb995b08f80a3e0f3a6a243a2f9c41d0773e8c | 218 | py | Python | nlpaug/augmenter/char/__init__.py | techthiyanes/nlpaug | bb2fc63349bf949f6f6047ff447a0efb16983c0a | [
"MIT"
] | 3,121 | 2019-04-21T07:02:47.000Z | 2022-03-31T22:17:36.000Z | nlpaug/augmenter/char/__init__.py | moh2236945/nlpaug | 9d4fb11dcff9980ebaec9d8e6cc7a0381f7db67b | [
"MIT"
] | 186 | 2019-05-31T18:18:13.000Z | 2022-03-28T10:11:05.000Z | nlpaug/augmenter/char/__init__.py | moh2236945/nlpaug | 9d4fb11dcff9980ebaec9d8e6cc7a0381f7db67b | [
"MIT"
] | 371 | 2019-03-17T17:59:56.000Z | 2022-03-31T01:45:15.000Z | from __future__ import absolute_import
from nlpaug.augmenter.char.char_augmenter import *
from nlpaug.augmenter.char.ocr import *
from nlpaug.augmenter.char.random import *
from nlpaug.augmenter.char.keyboard import *
| 36.333333 | 50 | 0.834862 |
acfb9a0e6bf6904024f672fbc7d5ac9e8d7bf878 | 351 | py | Python | euler1.py | transacplus/euler_project | 645e27064b005ad9a3c4a17e220e65b0cbabfa86 | [
"MIT"
] | null | null | null | euler1.py | transacplus/euler_project | 645e27064b005ad9a3c4a17e220e65b0cbabfa86 | [
"MIT"
] | null | null | null | euler1.py | transacplus/euler_project | 645e27064b005ad9a3c4a17e220e65b0cbabfa86 | [
"MIT"
] | null | null | null | """
If we list all the natural numbers below 10 that are multiples of 3 or 5,
we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
"""
list=[]
for i in range(1000):
if i%3 == 0 or i%5 == 0 :
list.append(i)
print(list)
print (" Somme de... | 27 | 75 | 0.612536 |
acfb9a787bb7d69b24daec713ab2eb16c5cdd3dc | 1,086 | py | Python | flask_rest_experiments/ext/restapi/resources.py | knopperman/flask-rest-experiments | f57fba15fc8e4b3b968c1ce0402bef216a829bc5 | [
"Unlicense"
] | null | null | null | flask_rest_experiments/ext/restapi/resources.py | knopperman/flask-rest-experiments | f57fba15fc8e4b3b968c1ce0402bef216a829bc5 | [
"Unlicense"
] | null | null | null | flask_rest_experiments/ext/restapi/resources.py | knopperman/flask-rest-experiments | f57fba15fc8e4b3b968c1ce0402bef216a829bc5 | [
"Unlicense"
] | null | null | null | from flask import abort, jsonify
from flask_restful import Resource
from flask_simplelogin import login_required
from flask_rest_experiments.models import Product
class ProductResource(Resource):
def get(self):
products = Product.query.all() or abort(204)
return jsonify(
{"products": ... | 30.166667 | 78 | 0.662983 |
acfb9af0040d71cff90a76aa3f067ecd97e623e6 | 1,546 | py | Python | setup.py | jenniferip/openexrpython | ea8b5080db1e63b1f150c835d750126056a4cee5 | [
"BSD-3-Clause"
] | null | null | null | setup.py | jenniferip/openexrpython | ea8b5080db1e63b1f150c835d750126056a4cee5 | [
"BSD-3-Clause"
] | null | null | null | setup.py | jenniferip/openexrpython | ea8b5080db1e63b1f150c835d750126056a4cee5 | [
"BSD-3-Clause"
] | null | null | null | from distutils.core import setup
from distutils.extension import Extension
from distutils.command.build_py import build_py as _build_py
from distutils.sysconfig import get_config_var
from distutils.version import LooseVersion
import sys
import os
import platform
from distutils.core import setup, Extension
version = "... | 36.809524 | 140 | 0.678525 |
acfb9b30f902a8997e2756431e3237c691ec2d0c | 2,446 | py | Python | paradrop/daemon/paradrop/core/config/uciutils.py | VegetableChook/Paradrop | a38e1773877d5b136c3b626edd8c033a12b43e56 | [
"Apache-2.0"
] | 1 | 2018-03-22T13:04:19.000Z | 2018-03-22T13:04:19.000Z | paradrop/daemon/paradrop/core/config/uciutils.py | VegetableChook/Paradrop | a38e1773877d5b136c3b626edd8c033a12b43e56 | [
"Apache-2.0"
] | null | null | null | paradrop/daemon/paradrop/core/config/uciutils.py | VegetableChook/Paradrop | a38e1773877d5b136c3b626edd8c033a12b43e56 | [
"Apache-2.0"
] | null | null | null | import traceback
from paradrop.lib.utils import uci
from paradrop.base.output import out
def setConfig(chute, old, cacheKeys, filepath):
"""
Helper function used to modify config file of each various setting in /etc/config/
Returns:
True: if it modified a file
False: if it did NOT cause a... | 35.449275 | 106 | 0.683156 |
acfb9bce60df8bcfc0d3e3b1bc4098b367dae573 | 888 | py | Python | examples/use_instance.py | gitter-badger/Mi.py | ef6611c93c8a5237ec9d51ff89e845b85771e070 | [
"MIT"
] | 13 | 2021-09-14T02:47:23.000Z | 2022-02-27T16:48:09.000Z | examples/use_instance.py | gitter-badger/Mi.py | ef6611c93c8a5237ec9d51ff89e845b85771e070 | [
"MIT"
] | 62 | 2021-08-28T10:56:55.000Z | 2022-03-30T06:47:28.000Z | examples/use_instance.py | gitter-badger/Mi.py | ef6611c93c8a5237ec9d51ff89e845b85771e070 | [
"MIT"
] | 3 | 2021-12-23T20:10:57.000Z | 2022-03-30T13:19:49.000Z | import asyncio
from mi import Client, Drive, Note, Router
from mi.ext import tasks
uri = "wss://example.com/streaming"
token = "This is your token"
bot = Client()
@tasks.loop(60)
async def task():
print("ループしてますよ~")
@bot.listen()
async def on_message(note: Note):
print(
f"{note.author.instance.name... | 21.658537 | 89 | 0.662162 |
acfb9c709f0d66b446caa642c29d71114f9fd4a1 | 3,042 | py | Python | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/list_ports_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/list_ports_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/model/list_ports_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListPortsResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
a... | 26.452174 | 79 | 0.547009 |
acfb9eeeeb0e17e017e5a7954628057844b45f1c | 1,436 | py | Python | minion/server/app.py | timofurrer/minion-ci | 411d0ea6638fb37d7e170cc8c8c5815304cc9f5c | [
"MIT"
] | 49 | 2016-03-07T06:42:40.000Z | 2021-03-06T02:43:02.000Z | minion/server/app.py | timofurrer/minion-ci | 411d0ea6638fb37d7e170cc8c8c5815304cc9f5c | [
"MIT"
] | 16 | 2016-03-08T07:20:52.000Z | 2017-04-21T18:15:12.000Z | minion/server/app.py | timofurrer/minion-ci | 411d0ea6638fb37d7e170cc8c8c5815304cc9f5c | [
"MIT"
] | 9 | 2016-03-29T22:08:52.000Z | 2021-06-16T16:29:30.000Z | """
`minion-ci` is a minimalist, decentralized, flexible Continuous Integration Server for hackers.
This module contains the server code for `minion-ci`.
:copyright: (c) by Timo Furrer
:license: MIT, see LICENSE for details
"""
import re
import click
import yaml
from flask import Flask
from jinja2 im... | 24.338983 | 99 | 0.688022 |
acfba0717929d57dce3244329753b74d69ff3d75 | 1,446 | py | Python | get_snapshot.py | JavierOramas/scholar_standing_bot | 9afde1fc0d56a3c57cf281092ff5c3d123ddac2f | [
"MIT"
] | null | null | null | get_snapshot.py | JavierOramas/scholar_standing_bot | 9afde1fc0d56a3c57cf281092ff5c3d123ddac2f | [
"MIT"
] | null | null | null | get_snapshot.py | JavierOramas/scholar_standing_bot | 9afde1fc0d56a3c57cf281092ff5c3d123ddac2f | [
"MIT"
] | 2 | 2021-09-19T21:08:55.000Z | 2021-09-19T21:09:39.000Z | import os
import requests
import json
from bs4 import BeautifulSoup
def read_data(id):
id = str(id)
try:
with open('./db/'+id+'.json', 'r') as f:
return json.loads(f.readline())
except:
return {}
def write_data(id,db):
id = str(id)
with open('./db/'+id+'.json', 'w') as... | 28.352941 | 126 | 0.425311 |
acfba0dedb6038e87af8a0469c64ee28ec9418a6 | 22,436 | py | Python | sdk/python/pulumi_gcp/serviceaccount/iam_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 121 | 2018-06-18T19:16:42.000Z | 2022-03-31T06:06:48.000Z | sdk/python/pulumi_gcp/serviceaccount/iam_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 492 | 2018-06-22T19:41:03.000Z | 2022-03-31T15:33:53.000Z | sdk/python/pulumi_gcp/serviceaccount/iam_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2018-06-19T01:43:13.000Z | 2022-03-23T22:43:37.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 45.601626 | 376 | 0.658406 |
acfba1c579321fcff81d1dace9a9d067362d39fb | 5,985 | py | Python | scripts/watchdogs-server.py | NanderSantos/My-WatchDog | 4f32fa206787a490a606b35ee90a8e8687338593 | [
"MIT"
] | null | null | null | scripts/watchdogs-server.py | NanderSantos/My-WatchDog | 4f32fa206787a490a606b35ee90a8e8687338593 | [
"MIT"
] | null | null | null | scripts/watchdogs-server.py | NanderSantos/My-WatchDog | 4f32fa206787a490a606b35ee90a8e8687338593 | [
"MIT"
] | null | null | null | #python3.6
# native python libraries imports
import random
import time
import json
# extern libraries imports
from paho.mqtt import client as mqtt_client
# scripts imports
import firebasehandler
import emailhandler
# Functions
def pubAnimalName(message):
jsonMessage = json.loads(message)
print("pubAnimalName... | 34.796512 | 134 | 0.707268 |
acfba1d3302216995a2a17ad3e4776c2e7cf9e11 | 23,864 | py | Python | rubin_sim/maf/metrics/calibrationMetrics.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/maf/metrics/calibrationMetrics.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/maf/metrics/calibrationMetrics.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | import numpy as np
from .baseMetric import BaseMetric
import rubin_sim.maf.utils as mafUtils
import rubin_sim.utils as utils
from scipy.optimize import curve_fit
from builtins import str
__all__ = ['ParallaxMetric', 'ProperMotionMetric', 'RadiusObsMetric',
'ParallaxCoverageMetric', 'ParallaxDcrDegenMetric']... | 48.307692 | 108 | 0.626006 |
acfba22177c0ee26356972d60527460bef1340f5 | 5,893 | py | Python | dewar/dewar.py | tfpk/dewar | ccac973a4115d1d264f6b74e61beca05deeb000c | [
"Apache-2.0"
] | 1 | 2022-02-23T08:09:47.000Z | 2022-02-23T08:09:47.000Z | dewar/dewar.py | tfpk/dewar | ccac973a4115d1d264f6b74e61beca05deeb000c | [
"Apache-2.0"
] | 4 | 2020-03-24T16:45:25.000Z | 2021-06-01T23:21:32.000Z | dewar/dewar.py | tfpk/dewar | ccac973a4115d1d264f6b74e61beca05deeb000c | [
"Apache-2.0"
] | 1 | 2020-06-22T19:07:15.000Z | 2020-06-22T19:07:15.000Z | from collections import namedtuple
from pathlib import Path
import functools
import shutil
import time
from proxy_tools import module_property
from dewar.jinja import JINJA_FUNCTIONS
from dewar.parser import fill_path
from dewar.validator import validate_page
from dewar._internal import get_caller_location, get_clos... | 33.293785 | 90 | 0.61904 |
acfba24c0884550d6a761c166c3a0052578a3cf5 | 813 | py | Python | test/yml/python/steps/pycodestyle_test.py | swellaby/azure-pipeline-templates | adc83c8b0a4a8347f4c453073d131de897357090 | [
"MIT"
] | 1 | 2019-10-11T14:31:33.000Z | 2019-10-11T14:31:33.000Z | test/yml/python/steps/pycodestyle_test.py | swellaby/azure-pipeline-templates | adc83c8b0a4a8347f4c453073d131de897357090 | [
"MIT"
] | 64 | 2019-03-09T19:02:05.000Z | 2021-11-09T14:02:52.000Z | test/yml/python/steps/pycodestyle_test.py | swellaby/azure-pipeline-templates | adc83c8b0a4a8347f4c453073d131de897357090 | [
"MIT"
] | null | null | null | from test.test_utilities import parse_python_step_template_yaml_file
contents = parse_python_step_template_yaml_file("pycodestyle.yml")
steps = contents["steps"]
parameters = contents["parameters"]
first = steps[0]
def test_target_parameter_default():
assert parameters["target"] == "."
def test_additional_args... | 23.228571 | 70 | 0.709717 |
acfba29c34db006fdda75030d8a06cc8bcf2d68c | 585 | py | Python | docs/tickets/15.py | lino-framework/lino_book | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | [
"BSD-2-Clause"
] | 3 | 2016-08-25T05:58:09.000Z | 2019-12-05T11:13:45.000Z | docs/tickets/15.py | lino-framework/lino_book | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | [
"BSD-2-Clause"
] | 18 | 2016-11-12T21:38:58.000Z | 2019-12-03T17:54:38.000Z | docs/tickets/15.py | lino-framework/lino_book | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | [
"BSD-2-Clause"
] | 9 | 2016-10-15T11:12:33.000Z | 2021-09-22T04:37:37.000Z | import uno # everything works well if you uncomment this line
import logging
# Django's trick for older Python versions:
try:
from logging.config import dictConfig
except ImportError:
from django.utils.dictconfig import dictConfig
dictConfig({
'version': 1,
'handlers': {
'console':{
... | 20.172414 | 62 | 0.574359 |
acfba45e5b808f981ee485ed2445b7fd3902b6c4 | 457 | py | Python | scripts/uttplay.py | jkleczar/ttslabdev | 52a7515734fd59e1a16dece8e2d567a33c435a27 | [
"BSD-3-Clause"
] | null | null | null | scripts/uttplay.py | jkleczar/ttslabdev | 52a7515734fd59e1a16dece8e2d567a33c435a27 | [
"BSD-3-Clause"
] | null | null | null | scripts/uttplay.py | jkleczar/ttslabdev | 52a7515734fd59e1a16dece8e2d567a33c435a27 | [
"BSD-3-Clause"
] | 1 | 2019-02-25T10:27:34.000Z | 2019-02-25T10:27:34.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Play waveform embedded in utt...
"""
from __future__ import unicode_literals, division, print_function #Py2
__author__ = "Daniel van Niekerk"
__email__ = "dvn.demitasse@gmail.com"
import sys
import ttslab
if __name__ == '__main__':
try:
uttfn = sys.argv[... | 20.772727 | 70 | 0.66302 |
acfba590ec0b12a159b62c31ef2cfa5bcc44acd2 | 13,660 | py | Python | CHAP06/wrapper/terraformexec.py | dotcs/Terraform-Cookbook | 16938bf044353b1552f3ffb676153f922e147700 | [
"MIT"
] | 86 | 2020-02-05T15:00:16.000Z | 2022-03-28T12:06:14.000Z | CHAP06/wrapper/terraformexec.py | dotcs/Terraform-Cookbook | 16938bf044353b1552f3ffb676153f922e147700 | [
"MIT"
] | 1 | 2021-01-14T16:49:50.000Z | 2021-01-14T16:49:50.000Z | CHAP06/wrapper/terraformexec.py | dotcs/Terraform-Cookbook | 16938bf044353b1552f3ffb676153f922e147700 | [
"MIT"
] | 113 | 2020-02-09T12:34:19.000Z | 2022-03-22T18:42:59.000Z |
import os
import argparse
import json
import yaml # require pip install pyyaml
import sys
import coloredlogs,logging
from coloredlogs import ColoredFormatter
import subprocess
import shutil
import subprocess
import shlex
#import azdo
class Terraform(object):
def __init__(self, az_subscription_id, az_client_id, ... | 36.524064 | 135 | 0.595388 |
acfba6cf1bd8355d2eee034aef8a1de1ef0d9e41 | 953 | py | Python | 13_no_sublists.py | roy2020china/BingDemo | 3427dcc7943d20cc8dccad39c6ada1f403d53d09 | [
"MIT"
] | 1 | 2017-06-13T09:54:44.000Z | 2017-06-13T09:54:44.000Z | 13_no_sublists.py | roy2020china/BingDemo | 3427dcc7943d20cc8dccad39c6ada1f403d53d09 | [
"MIT"
] | null | null | null | 13_no_sublists.py | roy2020china/BingDemo | 3427dcc7943d20cc8dccad39c6ada1f403d53d09 | [
"MIT"
] | null | null | null | # Write a procedure, input a list with sublist elements, and output a list with no sublists.
# 写一个函数,输入一个含有列表的列表,输出一个不含有列表的列表。
# input /输入:[1, [2, 0], [3, 0, [4, 7, 5]]]
# output /输出: x = [1, 2, 0, 3, 0, 4, 7, 5]
def get_final_list(a_list):
final_list = []
to_check = a_list
#print to_check
while to_ch... | 27.228571 | 92 | 0.563484 |
acfba91a933aeb1f696d9d464c2b2862d9e659f5 | 62,030 | py | Python | homeassistant/components/alexa/capabilities.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 1 | 2017-05-30T22:21:05.000Z | 2017-05-30T22:21:05.000Z | homeassistant/components/alexa/capabilities.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 58 | 2020-08-03T07:33:02.000Z | 2022-03-31T06:02:05.000Z | homeassistant/components/alexa/capabilities.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 2 | 2021-03-22T21:42:48.000Z | 2021-04-12T12:26:39.000Z | """Alexa capabilities."""
import logging
from typing import List, Optional
from homeassistant.components import (
cover,
fan,
image_processing,
input_number,
light,
timer,
vacuum,
)
from homeassistant.components.alarm_control_panel import ATTR_CODE_FORMAT, FORMAT_NUMBER
from homeassistant.c... | 30.72313 | 127 | 0.604304 |
acfbab6bf6f507e82056f053694fe19f6eea3083 | 1,290 | py | Python | setup.py | Karnav-Thakur/discord-ext-menus | 0d5ae36276b4bcdc56e441037fa9fcbe28bb5d7b | [
"MIT"
] | null | null | null | setup.py | Karnav-Thakur/discord-ext-menus | 0d5ae36276b4bcdc56e441037fa9fcbe28bb5d7b | [
"MIT"
] | null | null | null | setup.py | Karnav-Thakur/discord-ext-menus | 0d5ae36276b4bcdc56e441037fa9fcbe28bb5d7b | [
"MIT"
] | null | null | null | from setuptools import setup
import re
version = ''
with open('discord/ext/menus/__init__.py') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('version is not set')
if version.endswith(('a', 'b', 'rc')):
# append ver... | 33.947368 | 99 | 0.579845 |
acfbac5503c2b6e158df43b9f8ec6cd6f0b8c0af | 17,316 | py | Python | moto/sns/models.py | jzucker2/moto | ba3c9db8a76f1428892e867c68c1e2f4c04c1fa1 | [
"Apache-2.0"
] | null | null | null | moto/sns/models.py | jzucker2/moto | ba3c9db8a76f1428892e867c68c1e2f4c04c1fa1 | [
"Apache-2.0"
] | null | null | null | moto/sns/models.py | jzucker2/moto | ba3c9db8a76f1428892e867c68c1e2f4c04c1fa1 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import datetime
import uuid
import json
import boto.sns
import requests
import six
import re
from moto.compat import OrderedDict
from moto.core import BaseBackend, BaseModel
from moto.core.utils import iso_8601_datetime_with_milliseconds
from moto.sqs import sqs_backends
from ... | 37.643478 | 200 | 0.644086 |
acfbadfee6c9b441a06a6918e497d2ed8ea2eb3f | 2,702 | py | Python | specs/client/ml_pipelines/cl_bases.py | bitgn/ml-pipelines | 904b6fa200aac1638491658c2d51ea40c33cbffa | [
"BSD-2-Clause"
] | 7 | 2019-07-25T05:36:21.000Z | 2020-08-23T18:04:53.000Z | specs/client/ml_pipelines/cl_bases.py | bitgn/ml-pipelines | 904b6fa200aac1638491658c2d51ea40c33cbffa | [
"BSD-2-Clause"
] | 1 | 2019-08-18T14:05:49.000Z | 2019-08-18T17:51:39.000Z | specs/client/ml_pipelines/cl_bases.py | bitgn/ml-pipelines | 904b6fa200aac1638491658c2d51ea40c33cbffa | [
"BSD-2-Clause"
] | 4 | 2019-08-18T13:42:45.000Z | 2021-04-04T11:15:21.000Z | from dataclasses import dataclass
from typing import Callable, Optional
from . import mlp_api_pb2 as api
from . import mlp_api_pb2_grpc as rpc
import grpc
from . import errors
import os
import google.protobuf.message as pb
class EntityId:
def __init__(self, uid: bytes):
self.uid= uid
class JobRunId (En... | 30.359551 | 99 | 0.689119 |
acfbaea934b9d5ace24d4971a23c1122a8c75220 | 706 | py | Python | py_elasticinfra/metrics/memory.py | NullConvergence/py_metrics | fa58959591a1a4ee90cb4145acd4ed5f9f6c3b8a | [
"MIT"
] | null | null | null | py_elasticinfra/metrics/memory.py | NullConvergence/py_metrics | fa58959591a1a4ee90cb4145acd4ed5f9f6c3b8a | [
"MIT"
] | null | null | null | py_elasticinfra/metrics/memory.py | NullConvergence/py_metrics | fa58959591a1a4ee90cb4145acd4ed5f9f6c3b8a | [
"MIT"
] | null | null | null | import psutil
from .base import BaseMetric
class Memory(BaseMetric):
def __init__(self):
pass
def measure(self):
mem = psutil.virtual_memory()
swap = psutil.swap_memory()
return {
"virtual_memory": {
"total": mem.total,
"available": ... | 23.533333 | 43 | 0.454674 |
acfbaedd92eded8e72508180832b0bb135147a27 | 309 | py | Python | application/views/errors.py | AstroChem/MAPServer | 3ea8209d5d106c8799216ae2405ba1c396477eec | [
"MIT"
] | null | null | null | application/views/errors.py | AstroChem/MAPServer | 3ea8209d5d106c8799216ae2405ba1c396477eec | [
"MIT"
] | 1 | 2020-04-29T16:16:37.000Z | 2020-04-29T16:16:37.000Z | application/views/errors.py | AstroChem/MAPServer | 3ea8209d5d106c8799216ae2405ba1c396477eec | [
"MIT"
] | 1 | 2020-04-29T16:03:51.000Z | 2020-04-29T16:03:51.000Z | from flask import render_template
from flask import Blueprint
bp = Blueprint("errors", __name__)
@bp.app_errorhandler(404)
def page_not_found(e):
return render_template("errors/404.html"), 404
@bp.app_errorhandler(500)
def internal_server_error(e):
return render_template("errors/500.html"), 500
| 20.6 | 50 | 0.770227 |
acfbb01dbe08116ae039cce0e9a6de7466af795e | 8,836 | py | Python | changegen/__main__.py | trailbehind/changegen | ba1ed0f4165b5c64a146e2a3bc1cd2030d692f4d | [
"MIT"
] | 3 | 2021-01-30T13:00:33.000Z | 2021-02-03T21:32:13.000Z | changegen/__main__.py | trailbehind/changegen | ba1ed0f4165b5c64a146e2a3bc1cd2030d692f4d | [
"MIT"
] | 9 | 2021-04-26T16:42:34.000Z | 2021-11-01T20:55:02.000Z | changegen/__main__.py | trailbehind/changegen | ba1ed0f4165b5c64a146e2a3bc1cd2030d692f4d | [
"MIT"
] | null | null | null | import logging
import math
import os
import subprocess
import sys
import click
import psycopg2 as psy
from . import PACKAGE_NAME
from .generator import generate_changes
from .generator import generate_deletions
from .util import setup_logging
"""
cli.py
Tony Cannistra <tony@gaiagps.com>
Provides main changegen CL... | 32.725926 | 126 | 0.625622 |
acfbb01efe67c3610ba29b7e3e25dfaa51917c8e | 3,459 | py | Python | aloe/timelord/timelord_launcher.py | Aloe-Network/aloe-blockchain | 72b1f64f177e144a81b9d38f194427ea39e16edb | [
"Apache-2.0"
] | 3 | 2021-06-03T09:09:28.000Z | 2021-07-24T16:22:40.000Z | aloe/timelord/timelord_launcher.py | Aloe-Network/aloe-blockchain | 72b1f64f177e144a81b9d38f194427ea39e16edb | [
"Apache-2.0"
] | null | null | null | aloe/timelord/timelord_launcher.py | Aloe-Network/aloe-blockchain | 72b1f64f177e144a81b9d38f194427ea39e16edb | [
"Apache-2.0"
] | 1 | 2021-07-14T04:15:26.000Z | 2021-07-14T04:15:26.000Z | import asyncio
import logging
import pathlib
import signal
import socket
import time
from typing import Dict, List
import pkg_resources
from aloe.util.aloe_logging import initialize_logging
from aloe.util.config import load_config
from aloe.util.default_root import DEFAULT_ROOT_PATH
from aloe.util.setproctitle import... | 30.078261 | 100 | 0.65279 |
acfbb032c23d16f7238ff8aacbe4b112eb6b3e0f | 26,307 | py | Python | xarray/core/missing.py | readthedocs-assistant/xarray | 84961e6a2b30f495ddc55c4024f105a3f89e6243 | [
"Apache-2.0"
] | null | null | null | xarray/core/missing.py | readthedocs-assistant/xarray | 84961e6a2b30f495ddc55c4024f105a3f89e6243 | [
"Apache-2.0"
] | null | null | null | xarray/core/missing.py | readthedocs-assistant/xarray | 84961e6a2b30f495ddc55c4024f105a3f89e6243 | [
"Apache-2.0"
] | null | null | null | import datetime as dt
import warnings
from functools import partial
from numbers import Number
from typing import Any, Callable, Dict, Hashable, Sequence, Union
import numpy as np
import pandas as pd
from packaging.version import Version
from . import utils
from .common import _contains_datetime_like_objects, ones_li... | 30.660839 | 114 | 0.61592 |
acfbb05b78af07ad6ab9d7c93add4af5267db75c | 5,495 | py | Python | model_zoo/official/gnn/gat/train.py | i4oolish/mindspore | dac3be31d0f2c0a3516200f47af30980e566601b | [
"Apache-2.0"
] | 2 | 2020-08-12T16:14:40.000Z | 2020-12-04T03:05:57.000Z | model_zoo/official/gnn/gat/train.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | null | null | null | model_zoo/official/gnn/gat/train.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.007463 | 118 | 0.55323 |
acfbb215f1c2ca6a2f1b841478dd6f51918e0b90 | 4,143 | py | Python | lib/music21/demos/bhadley/mrjobaws/awsutility.py | lasconic/randomsheetmusic | 862e2991b38531d6c2122c809cf6a7745653df57 | [
"MIT"
] | 2 | 2016-12-29T04:34:53.000Z | 2017-08-01T20:36:18.000Z | lib/music21/demos/bhadley/mrjobaws/awsutility.py | lasconic/randomsheetmusic | 862e2991b38531d6c2122c809cf6a7745653df57 | [
"MIT"
] | null | null | null | lib/music21/demos/bhadley/mrjobaws/awsutility.py | lasconic/randomsheetmusic | 862e2991b38531d6c2122c809cf6a7745653df57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: awsutility.py
# Purpose: methods for use by mrjob to deploy on amazon web services
#
# Authors: Beth Hadley
#
# Copyright: (c) 2011 The music21 Project
# License: LGPL
#------------... | 32.367188 | 144 | 0.629254 |
acfbb2adccdae90d07544352bc888092d34483f5 | 14,129 | py | Python | bin/ta_quolab/api.py | quolab/splunk-add-on | dc1120053180f1ac16152563a9bcb0c3daa8f808 | [
"Apache-2.0"
] | 1 | 2021-03-09T20:24:06.000Z | 2021-03-09T20:24:06.000Z | bin/ta_quolab/api.py | quolab/splunk-add-on | dc1120053180f1ac16152563a9bcb0c3daa8f808 | [
"Apache-2.0"
] | 8 | 2021-06-11T19:45:02.000Z | 2021-08-03T22:36:24.000Z | bin/ta_quolab/api.py | quolab/splunk-add-on | dc1120053180f1ac16152563a9bcb0c3daa8f808 | [
"Apache-2.0"
] | null | null | null | """ QuoLab Add on for Splunk share code for QuoLab API access
"""
import json
import re
import ssl
import time
from logging import getLogger
from threading import Event, Thread
import requests
from cypresspoint.spath import splunk_dot_notation
from requests.auth import AuthBase, HTTPBasicAuth
from requests.utils imp... | 35.589421 | 111 | 0.552481 |
acfbb312e4eae2794f2e2f3d8f930acfa3fe1cd1 | 824 | py | Python | fieldWidgetClassworkProject/fieldWidgetClassworkApp/migrations/0001_initial.py | cs-fullstack-2019-spring/django-fields-widgets-cw-bettyjware11 | 26ff2e3da84d618f30d27e4cf145d287f59ad48f | [
"Apache-2.0"
] | null | null | null | fieldWidgetClassworkProject/fieldWidgetClassworkApp/migrations/0001_initial.py | cs-fullstack-2019-spring/django-fields-widgets-cw-bettyjware11 | 26ff2e3da84d618f30d27e4cf145d287f59ad48f | [
"Apache-2.0"
] | null | null | null | fieldWidgetClassworkProject/fieldWidgetClassworkApp/migrations/0001_initial.py | cs-fullstack-2019-spring/django-fields-widgets-cw-bettyjware11 | 26ff2e3da84d618f30d27e4cf145d287f59ad48f | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.6 on 2019-03-07 17:53
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='SuperHero',
fields=[
('id', models.AutoFiel... | 30.518519 | 114 | 0.572816 |
acfbb5070881cf0e75800731518910b1185a5410 | 2,116 | py | Python | catalyst/callbacks/tests/test_optimizer_callback.py | elephantmipt/catalyst | 6c706e4859ed7c58e5e6a5b7634176bffd0e2465 | [
"Apache-2.0"
] | 2 | 2019-04-19T21:34:31.000Z | 2019-05-02T22:50:25.000Z | catalyst/callbacks/tests/test_optimizer_callback.py | elephantmipt/catalyst | 6c706e4859ed7c58e5e6a5b7634176bffd0e2465 | [
"Apache-2.0"
] | null | null | null | catalyst/callbacks/tests/test_optimizer_callback.py | elephantmipt/catalyst | 6c706e4859ed7c58e5e6a5b7634176bffd0e2465 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
import random
import torch
import torch.nn as nn
from catalyst.callbacks import OptimizerCallback
class DummyRunner:
def __init__(
self, loss_value: torch.tensor, optimizer: torch.optim.Optimizer
):
self.batch_metrics = {"loss": loss_value}
self.is_train_loader = True
... | 26.123457 | 77 | 0.696597 |
acfbb60487d6a411f2440a95c93647bb028c3b53 | 6,346 | py | Python | v1.0.0.test/toontown/safezone/DistributedTreasure.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v1.0.0.test/toontown/safezone/DistributedTreasure.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v1.0.0.test/toontown/safezone/DistributedTreasure.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from panda3d.core import *
from panda3d.direct import *
from direct.interval.IntervalGlobal import *
from toontown.toonbase.ToontownGlobals import *
from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
class DistributedTreasure(DistributedObject.DistributedObject):
no... | 39.17284 | 345 | 0.651434 |
acfbb825f955930ce8414845ea5eb67fe9af6282 | 9,723 | py | Python | venv/lib/python3.5/site-packages/yapf/yapflib/yapf_api.py | prashant0598/CoffeeApp | 4fa006aebf06e12ed34766450ddcfa548ee63307 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/yapf/yapflib/yapf_api.py | prashant0598/CoffeeApp | 4fa006aebf06e12ed34766450ddcfa548ee63307 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/yapf/yapflib/yapf_api.py | prashant0598/CoffeeApp | 4fa006aebf06e12ed34766450ddcfa548ee63307 | [
"MIT"
] | null | null | null | # Copyright 2015-2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 32.627517 | 80 | 0.676334 |
acfbb8a4e84a66ac40c279b77966313c4b1b5c8e | 726 | py | Python | tests/python/pants_test/task_test_base.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/task_test_base.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/task_test_base.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.base.deprecated import deprecated_module
from pants.testutil.task_test_base import ConsoleTaskTestBase as ConsoleTaskTestBase # noqa
from pants.testutil.task_test_base import D... | 45.375 | 102 | 0.830579 |
acfbb90503ddf022142c416a0cf054ca7698873b | 6,691 | py | Python | cmdb_sdk/model/easy_command/target_log_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | cmdb_sdk/model/easy_command/target_log_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | cmdb_sdk/model/easy_command/target_log_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: target_log.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | 46.144828 | 667 | 0.74533 |
acfbb942e11fdafd4f8852c83785cbc4a785c6d9 | 62,764 | py | Python | custom/ckan/ckan/controllers/package.py | lynxlab/ckanext-lait | baee73a89ca587c391befaf9a95f070ff77f49ec | [
"Apache-2.0"
] | null | null | null | custom/ckan/ckan/controllers/package.py | lynxlab/ckanext-lait | baee73a89ca587c391befaf9a95f070ff77f49ec | [
"Apache-2.0"
] | null | null | null | custom/ckan/ckan/controllers/package.py | lynxlab/ckanext-lait | baee73a89ca587c391befaf9a95f070ff77f49ec | [
"Apache-2.0"
] | null | null | null | import logging
from urllib import urlencode
import datetime
import os
import mimetypes
import cgi
from pylons import config
from genshi.template import MarkupTemplate
from genshi.template.text import NewTextTemplate
from paste.deploy.converters import asbool
import paste.fileapp
import ckan.logic as logic
import ckan... | 41.898531 | 114 | 0.549646 |
acfbb96ff89199ef9ede1a0a9d10a85a803fcfc4 | 29,799 | py | Python | catkin_tools/verbs/catkin_build/build.py | timonegk/catkin_tools | 70ca62f67dc125e5879864a7a80c261b9a9bc914 | [
"Apache-2.0"
] | null | null | null | catkin_tools/verbs/catkin_build/build.py | timonegk/catkin_tools | 70ca62f67dc125e5879864a7a80c261b9a9bc914 | [
"Apache-2.0"
] | null | null | null | catkin_tools/verbs/catkin_build/build.py | timonegk/catkin_tools | 70ca62f67dc125e5879864a7a80c261b9a9bc914 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 41.215768 | 119 | 0.664318 |
acfbb97b61ec8fef32fd6d08568aa5de942730b6 | 609 | py | Python | src/tests/test_crashing.py | pajowu/pretix | d6985123b4528f134ead71ce0a4613c9a309fd2c | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-25T00:11:00.000Z | 2020-04-25T00:11:00.000Z | src/tests/test_crashing.py | pajowu/pretix | d6985123b4528f134ead71ce0a4613c9a309fd2c | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2019-07-08T10:29:54.000Z | 2020-01-08T17:32:07.000Z | src/tests/test_crashing.py | pajowu/pretix | d6985123b4528f134ead71ce0a4613c9a309fd2c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import os
import pytest
@pytest.mark.skip
def test_crash():
"""
This is a test that crashes with SIGKILL every (n+1)-th time it runs (n = 0, 1, 2, …).
This is useful for debugging our pytest-xdist monkeypatch that we apply in conftest.py
to deal with random test crashes on Travis CI using SQLite. Usu... | 29 | 90 | 0.633826 |
acfbbab2078dd91065ab5923c58f02aa3c270c27 | 36,933 | py | Python | selfdrive/controls/lib/events.py | ellian76/openpilot-0.8.12 | fed8b3cad14f3f6c9296f7ddea5973f4d8d284a0 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/events.py | ellian76/openpilot-0.8.12 | fed8b3cad14f3f6c9296f7ddea5973f4d8d284a0 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/events.py | ellian76/openpilot-0.8.12 | fed8b3cad14f3f6c9296f7ddea5973f4d8d284a0 | [
"MIT"
] | 1 | 2022-01-21T17:21:08.000Z | 2022-01-21T17:21:08.000Z | from enum import IntEnum
from typing import Dict, Union, Callable, Any
from cereal import log, car
import cereal.messaging as messaging
from common.realtime import DT_CTRL
from selfdrive.config import Conversions as CV
from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER
AlertSize = log.ControlsState.AlertSi... | 36.567327 | 152 | 0.680042 |
acfbbbd1fe0b771ad4a1584e61c03158e4baa65f | 2,245 | py | Python | backend/testappauto83_dev_23498/urls.py | crowdbotics-dev/testappauto83-dev-23498 | 9ef4b6ebb0fc2e74b2d571719f6e3c722b67d59f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/testappauto83_dev_23498/urls.py | crowdbotics-dev/testappauto83-dev-23498 | 9ef4b6ebb0fc2e74b2d571719f6e3c722b67d59f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/testappauto83_dev_23498/urls.py | crowdbotics-dev/testappauto83-dev-23498 | 9ef4b6ebb0fc2e74b2d571719f6e3c722b67d59f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """testappauto83_dev_23498 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='ho... | 35.634921 | 87 | 0.716704 |
acfbc04263db827c1d150670b38db041a9c95395 | 6,113 | py | Python | tensorflow_datasets/core/community/register_path.py | shashwat9kumar/datasets | 99b055408025f8e934fcbb0fc054488aa087ebfb | [
"Apache-2.0"
] | 1 | 2019-07-19T15:01:45.000Z | 2019-07-19T15:01:45.000Z | tensorflow_datasets/core/community/register_path.py | shashwat9kumar/datasets | 99b055408025f8e934fcbb0fc054488aa087ebfb | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/core/community/register_path.py | shashwat9kumar/datasets | 99b055408025f8e934fcbb0fc054488aa087ebfb | [
"Apache-2.0"
] | 1 | 2021-08-02T22:12:40.000Z | 2021-08-02T22:12:40.000Z | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 34.931429 | 94 | 0.708327 |
acfbc11945bf51f88d0ee0f5dcb6aa7c8728d883 | 1,126 | py | Python | diamond-2-brownie/scripts/deploy.py | AgentFUD/evm-smart-contract-upgrade-techniques | d1d01ac25b9b1e98971dc194532aa028525242db | [
"MIT"
] | 1 | 2021-11-25T04:53:13.000Z | 2021-11-25T04:53:13.000Z | diamond-3-brownie/scripts/deploy.py | AgentFUD/evm-smart-contract-upgrade-techniques | d1d01ac25b9b1e98971dc194532aa028525242db | [
"MIT"
] | null | null | null | diamond-3-brownie/scripts/deploy.py | AgentFUD/evm-smart-contract-upgrade-techniques | d1d01ac25b9b1e98971dc194532aa028525242db | [
"MIT"
] | null | null | null | from brownie import Contract, accounts
from brownie import (
Diamond,
DiamondCutFacet,
DiamondLoupeFacet,
OwnershipFacet,
DiamondInit,
)
# from brownie import Test1Facet, Test2Facet
from scripts.helpers import facetCutAction, getSelectors
def main():
owner = accounts[0]
diamondCutFacet =... | 30.432432 | 86 | 0.698046 |
acfbc121c32c9799bb51e5a96451c3d8b2d8745d | 20,442 | py | Python | tensorpack/models/batch_norm.py | layolu/tensorpack | 97360e5b8ca9ce03d8a18b3abef5abfc92cb9907 | [
"Apache-2.0"
] | 1 | 2019-11-21T07:53:39.000Z | 2019-11-21T07:53:39.000Z | tensorpack/models/batch_norm.py | layolu/tensorpack | 97360e5b8ca9ce03d8a18b3abef5abfc92cb9907 | [
"Apache-2.0"
] | null | null | null | tensorpack/models/batch_norm.py | layolu/tensorpack | 97360e5b8ca9ce03d8a18b3abef5abfc92cb9907 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# File: batch_norm.py
import re
from ..compat import tfv1 as tf # this should be avoided first in model code
from tensorflow.python.training import moving_averages
from ..tfutils.collection import backup_collection, restore_collection
from ..tfutils.common import get_tf_version_tuple
from ..... | 45.731544 | 120 | 0.639957 |
acfbc2da15ef50261535e85f9befc2bcc716416e | 27,091 | py | Python | sdk/apis/product_service.py | Yiconghua/SDK | 8465df574b083ff7398b5fadd4bc5150152dd0b3 | [
"MIT"
] | 1 | 2021-04-03T05:11:29.000Z | 2021-04-03T05:11:29.000Z | sdk/apis/product_service.py | Yiconghua/SDK | 8465df574b083ff7398b5fadd4bc5150152dd0b3 | [
"MIT"
] | null | null | null | sdk/apis/product_service.py | Yiconghua/SDK | 8465df574b083ff7398b5fadd4bc5150152dd0b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# 商品服务
class ProductService:
__client = None
def __init__(self, client):
self.__client = client
def get_menu_with_group(self, mid):
"""
查询连锁总店菜单及分组信息
:param mid:菜单Id
"""
return self.__client.call("eleme.product.chain.menu.getMenuWi... | 34.598978 | 180 | 0.634565 |
acfbc322e44e274ba79db3a8dd2f7f7a89a7daaa | 816 | py | Python | experiments/test_reverts.py | celioggr/erc20-pbt | 64043c4943884a8517fa24f7223740c780eb0ad5 | [
"Apache-2.0"
] | 5 | 2020-10-12T16:26:30.000Z | 2021-12-28T09:18:47.000Z | experiments/test_reverts.py | celioggr/erc20-pbt | 64043c4943884a8517fa24f7223740c780eb0ad5 | [
"Apache-2.0"
] | null | null | null | experiments/test_reverts.py | celioggr/erc20-pbt | 64043c4943884a8517fa24f7223740c780eb0ad5 | [
"Apache-2.0"
] | 1 | 2021-01-21T11:01:11.000Z | 2021-01-21T11:01:11.000Z | import brownie, pytest, re
""" override foo fixture from conftest
@pytest.fixture(scope="module")
def foo(foo,accounts,FooCoin):
token = FooCoin.deploy(2**64,"FooCoin", "FCN", 18, {'from': accounts[0]})
yield token
"""
def test_uint256_overflow(foo, accounts):
with pytest.raises(OverflowError) as exc_inf... | 35.478261 | 77 | 0.724265 |
acfbc333e7947ab266c219a1f46dc8bd652e0675 | 8,141 | py | Python | docs/conf.py | matthewi/magpie | c5217da0c3ae2e92f0ea21e025714022522523bd | [
"MIT"
] | null | null | null | docs/conf.py | matthewi/magpie | c5217da0c3ae2e92f0ea21e025714022522523bd | [
"MIT"
] | null | null | null | docs/conf.py | matthewi/magpie | c5217da0c3ae2e92f0ea21e025714022522523bd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# magpie documentation build configuration file, created by
# sphinx-quickstart on Fri Apr 18 17:35:26 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 31.432432 | 79 | 0.717357 |
acfbc57d5b39da26b2028fca1f0cfbed237ab6c0 | 4,821 | py | Python | sdk/AsposeEmailCloudSdk/models/ai_bcr_image_storage_file.py | aspose-email-cloud/aspose-email-cloud-python | c5c13839cbbbfa5b6617bd1aedf3cf30cd664227 | [
"MIT"
] | 1 | 2020-02-26T13:19:06.000Z | 2020-02-26T13:19:06.000Z | sdk/AsposeEmailCloudSdk/models/ai_bcr_image_storage_file.py | aspose-email-cloud/aspose-email-cloud-python | c5c13839cbbbfa5b6617bd1aedf3cf30cd664227 | [
"MIT"
] | null | null | null | sdk/AsposeEmailCloudSdk/models/ai_bcr_image_storage_file.py | aspose-email-cloud/aspose-email-cloud-python | c5c13839cbbbfa5b6617bd1aedf3cf30cd664227 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="AiBcrImageStorageFile.py">
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person... | 34.435714 | 91 | 0.590127 |
acfbc5851f8b85b35eecf0aafcf71e8124689a42 | 643 | py | Python | GPErks/gp/mean.py | stelong/GPErks | 7e8e0e4561c10ad21fba2079619418e416a167b6 | [
"MIT"
] | null | null | null | GPErks/gp/mean.py | stelong/GPErks | 7e8e0e4561c10ad21fba2079619418e416a167b6 | [
"MIT"
] | 6 | 2021-12-10T14:16:51.000Z | 2022-03-25T16:26:50.000Z | GPErks/gp/mean.py | stelong/GPErks | 7e8e0e4561c10ad21fba2079619418e416a167b6 | [
"MIT"
] | 1 | 2022-01-28T11:12:33.000Z | 2022-01-28T11:12:33.000Z | import gpytorch
import torch
class LinearMean(gpytorch.means.Mean):
def __init__(self, input_size, data_mean, batch_shape=torch.Size()):
super().__init__()
self.register_parameter(
name="weights",
parameter=torch.nn.Parameter(
torch.zeros(*batch_shape, input... | 26.791667 | 72 | 0.559876 |
acfbc5c92ddaa4d3a04be026d418512efd421dc6 | 18,475 | py | Python | mycroft/skills/skill_manager.py | zhanghan177/mycroft-core | f6f7a5515fb82b672932378a5e30abcf854a18d4 | [
"Apache-2.0"
] | null | null | null | mycroft/skills/skill_manager.py | zhanghan177/mycroft-core | f6f7a5515fb82b672932378a5e30abcf854a18d4 | [
"Apache-2.0"
] | null | null | null | mycroft/skills/skill_manager.py | zhanghan177/mycroft-core | f6f7a5515fb82b672932378a5e30abcf854a18d4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 38.409563 | 79 | 0.604384 |
acfbc7202f7602ecc671f60378858cf8d7b9a0ef | 3,017 | py | Python | src/gamesbyexample/caesarcipher.py | spp2/PythonStdioGames | 7edc6a07ef816a44579800e773f30217541971fa | [
"MIT"
] | null | null | null | src/gamesbyexample/caesarcipher.py | spp2/PythonStdioGames | 7edc6a07ef816a44579800e773f30217541971fa | [
"MIT"
] | null | null | null | src/gamesbyexample/caesarcipher.py | spp2/PythonStdioGames | 7edc6a07ef816a44579800e773f30217541971fa | [
"MIT"
] | null | null | null | """Caesar Cipher, by Al Sweigart al@inventwithpython.com
The Caesar cipher is a shift cipher that uses addition and subtraction
to encrypt and decrypt letters.
More info at: https://en.wikipedia.org/wiki/Caesar_cipher
Tags: short, beginner, cryptography, math"""
__version__ = 0
try:
import pyperclip # pyperclip co... | 34.284091 | 72 | 0.669208 |
acfbc7e0a1078fe2ccf8707ef71aaab9927162a0 | 22,058 | py | Python | clair3/utils.py | HKU-BAL/Clair3 | 9bb918bd77bdb22c2e4d2753bcd47066b720a336 | [
"BSD-3-Clause"
] | 85 | 2021-05-17T08:20:57.000Z | 2022-03-31T19:44:17.000Z | clair3/utils.py | HKU-BAL/Clair3 | 9bb918bd77bdb22c2e4d2753bcd47066b720a336 | [
"BSD-3-Clause"
] | 67 | 2021-05-17T08:15:35.000Z | 2022-03-25T23:02:44.000Z | clair3/utils.py | HKU-BAL/Clair3 | de515cf4a8616349be55aec788d55e613ea876fd | [
"BSD-3-Clause"
] | 10 | 2021-06-07T05:48:39.000Z | 2022-03-01T08:30:57.000Z | import sys
import gc
import copy
import shlex
import os
import tables
import numpy as np
from functools import partial
from clair3.task.main import *
from shared.interval_tree import bed_tree_from, is_region_in
from shared.utils import subprocess_popen, IUPAC_base_to_ACGT_base_dict as BASE2BASE, IUPAC_base_to_num_dict... | 44.651822 | 177 | 0.657086 |
acfbc7f98816736279dcf48432055f9dcb8a800b | 14,520 | py | Python | mistral/api/controllers/v2/execution.py | liuzheng/mistral | 3fd66f3b0575d909158595b19e687e7f1a6126fe | [
"Apache-2.0"
] | 3 | 2015-08-28T04:57:56.000Z | 2017-03-27T10:59:56.000Z | mistral/api/controllers/v2/execution.py | liuzheng/mistral | 3fd66f3b0575d909158595b19e687e7f1a6126fe | [
"Apache-2.0"
] | 21 | 2015-04-14T22:41:53.000Z | 2019-02-20T09:30:10.000Z | mistral/api/controllers/v2/execution.py | liuzheng/mistral | 3fd66f3b0575d909158595b19e687e7f1a6126fe | [
"Apache-2.0"
] | 12 | 2015-08-14T02:27:37.000Z | 2020-12-31T10:09:21.000Z | # Copyright 2013 - Mirantis, Inc.
# Copyright 2015 - StackStorm, Inc.
# Copyright 2015 Huawei Technologies Co., Ltd.
# Copyright 2016 - Brocade Communications Systems, Inc.
# Copyright 2018 - Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exc... | 37.8125 | 79 | 0.601653 |
acfbc8323aa1f8361a5341648dc7fae710d6f49f | 686 | py | Python | pingerservice/management/commands/initadmin.py | Dobli/pinger | 7d9ccf7179a29128f8d9f6c64525604b84c55944 | [
"Apache-2.0"
] | null | null | null | pingerservice/management/commands/initadmin.py | Dobli/pinger | 7d9ccf7179a29128f8d9f6c64525604b84c55944 | [
"Apache-2.0"
] | null | null | null | pingerservice/management/commands/initadmin.py | Dobli/pinger | 7d9ccf7179a29128f8d9f6c64525604b84c55944 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
class Command(BaseCommand):
def handle(self, *args, **options):
for user in settings.ADMINS:
username = user[0].replace(' ', '')
email = user[1]
... | 36.105263 | 73 | 0.600583 |
acfbc84a68cac0782cb566c563966c367065dcf8 | 3,888 | py | Python | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2021_03_08/aio/_application_insights_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2021_03_08/aio/_application_insights_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2021_03_08/aio/_application_insights_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.2 | 137 | 0.698045 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.