hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d41dedbab50e310d051ff3936d915a72d1bd91ab | 2,321 | py | Python | doujin-eromanga-com/utils/make_model.py | GINK03/itmedia-scraping | 5afbe06dd0aa12db1694a2b387aa2eeafb20e981 | [
"MIT"
] | 16 | 2018-02-06T14:43:41.000Z | 2021-01-23T05:07:33.000Z | doujin-eromanga-com/utils/make_model.py | GINK03/itmedia-scraping | 5afbe06dd0aa12db1694a2b387aa2eeafb20e981 | [
"MIT"
] | null | null | null | doujin-eromanga-com/utils/make_model.py | GINK03/itmedia-scraping | 5afbe06dd0aa12db1694a2b387aa2eeafb20e981 | [
"MIT"
] | 4 | 2018-01-16T13:50:43.000Z | 2019-12-16T19:45:54.000Z |
from sklearn.model_selection import train_test_split
# from sklearn.metrics import mean_squared_log_error
from sklearn.metrics import mean_squared_error
from math import sqrt
import lightgbm as lgb
from sklearn.cross_validation import KFold
import pandas as pd
import numpy as np
def get_oof(clf, x_train, y, x_test):
... | 32.690141 | 98 | 0.631624 |
1ae48f2aed0c475f13e3b26d1fdc16a3d74d47d6 | 8,231 | py | Python | test/functional/test_framework/key.py | Bits-Coin/bits-coin | dd8220018f5582e76d43e8c52bd323524e495d8c | [
"MIT"
] | 2 | 2021-11-17T23:05:13.000Z | 2021-11-17T23:05:32.000Z | test/functional/test_framework/key.py | Bits-Coin/bits-coin | dd8220018f5582e76d43e8c52bd323524e495d8c | [
"MIT"
] | null | null | null | test/functional/test_framework/key.py | Bits-Coin/bits-coin | dd8220018f5582e76d43e8c52bd323524e495d8c | [
"MIT"
] | null | null | null | # Copyright (c) 2011 Sam Rushing
"""ECC secp256k1 OpenSSL wrapper.
WARNING: This module does not mlock() secrets; your private keys may end up on
disk in swap! Use with caution!
This file is modified from python-bitscoinlib.
"""
import ctypes
import ctypes.util
import hashlib
ssl = ctypes.cdll.LoadLibrary(ctypes.ut... | 36.259912 | 130 | 0.691289 |
2ccd3c761e87ed9c45b16518309f7ac14b168890 | 613 | py | Python | src/reopenwebnet/messages.py | mic-rigaud/ReOpenWebNet | c313e9421d4cfa8a0c803b9b98898211ac0def3b | [
"MIT"
] | null | null | null | src/reopenwebnet/messages.py | mic-rigaud/ReOpenWebNet | c313e9421d4cfa8a0c803b9b98898211ac0def3b | [
"MIT"
] | null | null | null | src/reopenwebnet/messages.py | mic-rigaud/ReOpenWebNet | c313e9421d4cfa8a0c803b9b98898211ac0def3b | [
"MIT"
] | null | null | null | # OK message from bus
ACK = '*#*1##'
# Non OK message from bus
NACK = '*#*0##'
# OpenWeb string for open a command session
CMD_SESSION = '*99*0##'
# OpenWeb string for open an event session
EVENT_SESSION = '*99*1##'
def extract_messages(data):
if not data.startswith("*"):
raise Exception("data does not st... | 23.576923 | 59 | 0.628059 |
8835e7abc47d4f784d4e93c06319b6021f226296 | 11,741 | py | Python | DTL/gui/widgets/colorpickerwidget.py | rocktavious/DevToolsLib | 117200c91a3361e04f7c8e07d2ed4999bbcfc469 | [
"MIT"
] | 1 | 2015-03-23T18:52:12.000Z | 2015-03-23T18:52:12.000Z | DTL/gui/widgets/colorpickerwidget.py | rocktavious/DevToolsLib | 117200c91a3361e04f7c8e07d2ed4999bbcfc469 | [
"MIT"
] | null | null | null | DTL/gui/widgets/colorpickerwidget.py | rocktavious/DevToolsLib | 117200c91a3361e04f7c8e07d2ed4999bbcfc469 | [
"MIT"
] | 2 | 2017-05-21T12:50:41.000Z | 2021-10-17T03:32:45.000Z | #Written by Blur Studios
# used in painting, faster to do global import
from DTL.qt.QtCore import Qt, pyqtSlot, pyqtProperty, pyqtSignal, QPoint, QRect
from DTL.qt.QtGui import QPainter, QColor, QWidget, QLinearGradient, QPushButton, QConicalGradient, QRadialGradient
class ColorPickerWidget( QWidget ):
BarWidth... | 31.6469 | 181 | 0.560174 |
ab9825a0d7618aa52766f1aeb328cf81680c4958 | 47,888 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_snapshots_operations.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 ... | 42.871979 | 198 | 0.667432 |
6f117bed426f25777f0e49495842fc9f6a49f4ec | 420 | py | Python | src/dressup/__init__.py | paw-lu/dressup | d6b7971c1d1dd2e365974dda62e06eb5c65b85d2 | [
"MIT"
] | 15 | 2020-05-23T20:47:47.000Z | 2022-01-02T18:57:47.000Z | src/dressup/__init__.py | paw-lu/dressup | d6b7971c1d1dd2e365974dda62e06eb5c65b85d2 | [
"MIT"
] | 154 | 2020-05-23T03:19:15.000Z | 2021-09-10T03:21:21.000Z | src/dressup/__init__.py | pscosta5/dressup | d6b7971c1d1dd2e365974dda62e06eb5c65b85d2 | [
"MIT"
] | 1 | 2021-04-13T16:11:13.000Z | 2021-04-13T16:11:13.000Z | """Dress up."""
from .converter import convert, show_all
try:
from importlib.metadata import version, PackageNotFoundError # type: ignore
except ImportError: # pragma: no cover
from importlib_metadata import version, PackageNotFoundError # type: ignore
try:
__version__ = version(__name__)
except Packa... | 26.25 | 80 | 0.740476 |
a8ca4c0b625ea9ec1045355731708deaa480da1d | 666 | py | Python | bigquery/tests/integration/smoke_test.py | JensMadsen/gcloud-aio | 0edf1f167a1f89470ff81a73ccf841c454e7bd0d | [
"MIT"
] | null | null | null | bigquery/tests/integration/smoke_test.py | JensMadsen/gcloud-aio | 0edf1f167a1f89470ff81a73ccf841c454e7bd0d | [
"MIT"
] | null | null | null | bigquery/tests/integration/smoke_test.py | JensMadsen/gcloud-aio | 0edf1f167a1f89470ff81a73ccf841c454e7bd0d | [
"MIT"
] | null | null | null | import os
import uuid
import aiohttp
import pytest
from gcloud.aio.bigquery import make_stream_insert
@pytest.mark.asyncio
async def test_data_is_inserted():
project = os.environ['GCLOUD_PROJECT']
creds = os.environ['GOOGLE_APPLICATION_CREDENTIALS']
dataset_name = 'test'
table_name = 'test'
rows ... | 27.75 | 72 | 0.665165 |
46f57e8472be36b47102f4f4dcc7488e38be49f0 | 219 | py | Python | pytest_drf/__init__.py | theY4Kman/pytest-drf | 1c86e023ebe7353e89aa71a7fc3b15457b5b20bd | [
"MIT"
] | 58 | 2020-02-09T07:13:57.000Z | 2021-12-06T10:00:15.000Z | pytest_drf/__init__.py | theY4Kman/pytest-drf | 1c86e023ebe7353e89aa71a7fc3b15457b5b20bd | [
"MIT"
] | 10 | 2020-07-27T09:21:51.000Z | 2021-09-11T20:14:45.000Z | pytest_drf/__init__.py | theY4Kman/pytest-drf | 1c86e023ebe7353e89aa71a7fc3b15457b5b20bd | [
"MIT"
] | 5 | 2020-07-27T08:39:48.000Z | 2021-12-26T07:08:55.000Z | import pkg_resources
__version__ = pkg_resources.get_distribution('pytest-drf').version
from .authentication import *
from .authorization import *
from .pagination import *
from .status import *
from .views import *
| 19.909091 | 66 | 0.789954 |
642a751589c0a2fb5d2c05e26b7317955fa62999 | 39,698 | py | Python | qa/rpc-tests/segwit.py | gotaproblem/AuxPowCoin | eea038edf893677e85ca45eed047ff81092d3a0f | [
"MIT"
] | null | null | null | qa/rpc-tests/segwit.py | gotaproblem/AuxPowCoin | eea038edf893677e85ca45eed047ff81092d3a0f | [
"MIT"
] | null | null | null | qa/rpc-tests/segwit.py | gotaproblem/AuxPowCoin | eea038edf893677e85ca45eed047ff81092d3a0f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016 The Apcoin Core developers
# Copyright (c) 2016-2019 The Mincoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test the SegWit changeover logic
#
from test_framewo... | 60.057489 | 213 | 0.687793 |
f71431e15f97613abc12e56b17caf9d892de3bd9 | 1,359 | py | Python | setup.py | butla/bravado-falcon | 2c377db486150a6e0b93a4fb5970be9cf3e769d0 | [
"MIT"
] | 2 | 2017-01-16T07:51:35.000Z | 2020-02-17T21:44:13.000Z | setup.py | butla/bravado-falcon | 2c377db486150a6e0b93a4fb5970be9cf3e769d0 | [
"MIT"
] | null | null | null | setup.py | butla/bravado-falcon | 2c377db486150a6e0b93a4fb5970be9cf3e769d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os.path
from setuptools import setup
project_name = 'bravado-falcon'
version = '0.1.0'
setup_dir = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(setup_dir, 'requirements.txt')) as req_file:
requirements = [lib.split('==')[0] for lib in req_file.readlines()]
with ... | 32.357143 | 71 | 0.65195 |
88907f64eccf9178bc72de9e7da73e817e5bdaf4 | 25,887 | py | Python | test/bindery/test_mutation.py | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 6 | 2015-01-30T03:50:36.000Z | 2022-03-20T16:09:58.000Z | test/bindery/test_mutation.py | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 2 | 2015-02-04T17:18:47.000Z | 2019-09-27T23:39:52.000Z | test/bindery/test_mutation.py | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 6 | 2015-02-04T16:16:18.000Z | 2019-10-30T20:07:48.000Z | # Testing new amara.tree API
# Based on Amara1.x Tests mutation.py
import unittest
import amara
from amara import tree, bindery
from amara.lib import treecompare
from xml.dom import Node
XMLDECL = '<?xml version="1.0" encoding="UTF-8"?>\n'
ATTRIBUTE_NODE = tree.attribute.xml_type
def test_simple_attr_update1():... | 37.463097 | 159 | 0.591069 |
00315b78b065aae4730702dff26be7d8bd48da19 | 314 | py | Python | v1.0.0.test/toontown/uberdog/DataStoreGlobals.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v1.0.0.test/toontown/uberdog/DataStoreGlobals.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v1.0.0.test/toontown/uberdog/DataStoreGlobals.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from toontown.uberdog.ScavengerHuntDataStore import *
from toontown.uberdog.DataStore import *
SH = 1
GEN = 2
TYPES = {SH: (ScavengerHuntDataStore,), GEN: (
DataStore,)}
def getStoreClass(type):
storeClass = TYPES.get(type, None)
if storeClass:
return storeClass[0]
else:
return | 24.153846 | 53 | 0.681529 |
c1ad30526e2e618337819f9c9654101e90cf7d42 | 21,984 | py | Python | tests/generic_views/test_base.py | beshrkayali/django | 84633905273fc916e3d17883810d9969c03f73c2 | [
"PSF-2.0",
"BSD-3-Clause"
] | 7 | 2020-01-13T18:26:41.000Z | 2021-04-20T04:22:26.000Z | tests/generic_views/test_base.py | beshrkayali/django | 84633905273fc916e3d17883810d9969c03f73c2 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/generic_views/test_base.py | beshrkayali/django | 84633905273fc916e3d17883810d9969c03f73c2 | [
"PSF-2.0",
"BSD-3-Clause"
] | 4 | 2019-11-07T01:22:16.000Z | 2020-09-16T22:02:16.000Z | import time
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponse
from django.test import RequestFactory, SimpleTestCase, override_settings
from django.test.utils import require_jinja2
from django.urls import resolve
from django.views.generic import RedirectView, TemplateView, Vi... | 37.451448 | 114 | 0.651701 |
51208f54a587faf62fdf7b8bd8f30b3536af5401 | 194 | py | Python | Serial_IO/raspberry/serialio.py | albertoft/arduino-stuff | 27f624a9732252cff9482f4af9446bd55ec778c2 | [
"MIT"
] | null | null | null | Serial_IO/raspberry/serialio.py | albertoft/arduino-stuff | 27f624a9732252cff9482f4af9446bd55ec778c2 | [
"MIT"
] | null | null | null | Serial_IO/raspberry/serialio.py | albertoft/arduino-stuff | 27f624a9732252cff9482f4af9446bd55ec778c2 | [
"MIT"
] | null | null | null | import serial
ser = serial.Serial('/dev/ttyACM0',9600)
s = [0,1]
while True:
read_serial = ser.readline()
#s[0] = str(int (ser.readline(),16))
#print s[0]
print read_serial
ser.write("A")
| 17.636364 | 40 | 0.659794 |
4090f3a5796916ee7d00b4dc12f728f36159a8ef | 6,608 | py | Python | src/models/networks/fcn8_vgg16.py | IssamLaradji/looc | 50a05b9bf2d36cd8770add8cc65f9bab1ad45841 | [
"Apache-2.0"
] | 9 | 2020-10-27T15:02:53.000Z | 2022-01-19T06:33:15.000Z | src/models/networks/fcn8_vgg16.py | IssamLaradji/looc | 50a05b9bf2d36cd8770add8cc65f9bab1ad45841 | [
"Apache-2.0"
] | 1 | 2021-01-12T13:24:07.000Z | 2021-01-13T16:20:11.000Z | src/models/networks/fcn8_vgg16.py | IssamLaradji/looc | 50a05b9bf2d36cd8770add8cc65f9bab1ad45841 | [
"Apache-2.0"
] | 2 | 2020-10-28T12:43:50.000Z | 2021-03-09T03:19:32.000Z | import torch.nn as nn
import torchvision
import torch
from skimage import morphology as morph
import numpy as np
import torch.utils.model_zoo as model_zoo
#----------- LC-FCN8
class FCN8VGG16(nn.Module):
def __init__(self, n_classes):
super().__init__()
self.n_classes = n_classes
# PREDEFIN... | 40.292683 | 102 | 0.585654 |
2bd0da440b084e4a512d930bf20abe42e48fcd89 | 1,765 | py | Python | seer/seer_pb2_grpc.py | cshenton/seer-python | 72ff88edf4148c2b2a13deb8e1ad984647124874 | [
"Apache-2.0"
] | 2 | 2019-05-22T21:36:01.000Z | 2020-01-16T12:23:45.000Z | seer/seer_pb2_grpc.py | cshenton/seer-python | 72ff88edf4148c2b2a13deb8e1ad984647124874 | [
"Apache-2.0"
] | null | null | null | seer/seer_pb2_grpc.py | cshenton/seer-python | 72ff88edf4148c2b2a13deb8e1ad984647124874 | [
"Apache-2.0"
] | 1 | 2020-01-14T23:53:19.000Z | 2020-01-14T23:53:19.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
from __future__ import absolute_import
import grpc
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import seer_pb2 as seer__pb2
class SeerStub(object):
"""The seer service
"""
def __init__(self, channel):... | 35.3 | 82 | 0.730312 |
adacba3546ba31af3ce7d497979651ed982e587e | 80 | py | Python | app/env/lib/python3.7/sre_constants.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 4 | 2020-02-05T11:26:47.000Z | 2021-05-26T07:48:46.000Z | app/env/lib/python3.7/sre_constants.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 10 | 2019-11-25T16:54:39.000Z | 2022-02-10T08:29:51.000Z | frontend/env/lib/python3.7/sre_constants.py | US579/Seddit | 116a676efd0fa31c8cc6fe4c723b739203d9428b | [
"MIT"
] | 7 | 2019-05-30T05:48:39.000Z | 2019-06-27T12:26:54.000Z | /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_constants.py | 80 | 80 | 0.85 |
70834e0f3945437e22c7705674e11606f7687d89 | 1,225 | py | Python | modules/fdlibm/doc/__ieee754_hypot.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | 1 | 2022-03-24T03:35:10.000Z | 2022-03-24T03:35:10.000Z | modules/fdlibm/doc/__ieee754_hypot.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | null | null | null | modules/fdlibm/doc/__ieee754_hypot.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | null | null | null | [ ## this file was manually modified by jt
{
'functor' : {
'arity' : '2',
'call_types' : [],
'ret_arity' : '0',
'rturn' : {
'default' : 'T',
},
'simd_types' : [],
'special' : ['fdlibm'],
'type_defs' : [],
'types' :... | 27.840909 | 73 | 0.340408 |
d8f861eac13df0680c099c3e3d0d32b19cd531ad | 9,071 | py | Python | nnmethods/falconn/hyperplaneLSH/D1.py | gpapadis/ContinuousFilteringBenchmark | 7121b81f3d0e9d62ef61abc30ca6866f8a56fe64 | [
"Apache-2.0"
] | null | null | null | nnmethods/falconn/hyperplaneLSH/D1.py | gpapadis/ContinuousFilteringBenchmark | 7121b81f3d0e9d62ef61abc30ca6866f8a56fe64 | [
"Apache-2.0"
] | null | null | null | nnmethods/falconn/hyperplaneLSH/D1.py | gpapadis/ContinuousFilteringBenchmark | 7121b81f3d0e9d62ef61abc30ca6866f8a56fe64 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import numpy as np
import falconn
import timeit
import math
import psutil
if __name__ == '__main__':
datasetN = 1
column = 'Embedded Name'
datapart = 'A'
querypart = 'B'
main_dir = "/home/gap2/Documents/blockingNN/data/csvProfiles/falconn/"
for column in [... | 51.248588 | 357 | 0.533017 |
bdfb34f523fef549cf42734a04511cae3fce7d83 | 51,884 | py | Python | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/crm/models/crm_lead.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/crm/models/crm_lead.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/crm/models/crm_lead.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from datetime import datetime, timedelta, date
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, tools, SUPERUSER_ID
from odoo.tools.translate import _
from odoo.tools... | 44.843561 | 216 | 0.607952 |
2f2850990fdd492cc2988185c88b1dc74d903a6c | 1,932 | py | Python | award/models.py | amtesire/Project-Awards | 3728e3b5d9c1a89949101bef301fdd9b51d4fd7e | [
"MIT"
] | null | null | null | award/models.py | amtesire/Project-Awards | 3728e3b5d9c1a89949101bef301fdd9b51d4fd7e | [
"MIT"
] | 3 | 2021-03-19T04:49:07.000Z | 2021-06-10T22:10:24.000Z | award/models.py | amtesire/Project-Awards | 3728e3b5d9c1a89949101bef301fdd9b51d4fd7e | [
"MIT"
] | null | null | null | from django.db import models
from tinymce.models import HTMLField
from django.contrib.auth.models import User
# Create your models here.
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
profile_picture = models.ImageField(upload_to='images/')
... | 33.894737 | 91 | 0.707039 |
abddaf558baad3ac8303e1f4f8500e86d7a3fd38 | 245 | py | Python | python/testData/quickFixes/PyUpdatePropertySignatureQuickFixTest/getter.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/quickFixes/PyUpdatePropertySignatureQuickFixTest/getter.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/quickFixes/PyUpdatePropertySignatureQuickFixTest/getter.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | class A(Aa):
@property
def <warning descr="Getter signature should be (self)">x<caret></warning>(self, r):
return ""
@x.setter
def <warning descr="Setter should not return a value">x</warning>(self, r):
return r
| 27.222222 | 87 | 0.616327 |
d9183a1ec34d47d7e98c6cf4705d900596681bad | 997 | py | Python | config.py | tonypiazza/flights-python | 4e09900cb5999ecaf486682ff4a75fd05c348430 | [
"MIT"
] | null | null | null | config.py | tonypiazza/flights-python | 4e09900cb5999ecaf486682ff4a75fd05c348430 | [
"MIT"
] | null | null | null | config.py | tonypiazza/flights-python | 4e09900cb5999ecaf486682ff4a75fd05c348430 | [
"MIT"
] | null | null | null | """
Configuration data for report apps.
"""
from yaml import load
class Config(object):
"""Loads application configuration from YAML file and makes it available as
properties
"""
instance = None
class __Config(object):
def __init__(self):
try:
from yaml... | 27.694444 | 79 | 0.582748 |
f32d908c1af39518477f6c9f7b35caa598c4bb6d | 9,994 | py | Python | tests/test_full_library.py | mobiusklein/autowrap | 6441782914bb91edd11adbb0de58de4d7ef3f1f0 | [
"BSD-3-Clause"
] | null | null | null | tests/test_full_library.py | mobiusklein/autowrap | 6441782914bb91edd11adbb0de58de4d7ef3f1f0 | [
"BSD-3-Clause"
] | null | null | null | tests/test_full_library.py | mobiusklein/autowrap | 6441782914bb91edd11adbb0de58de4d7ef3f1f0 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, print_function
import os
import glob
import autowrap
import autowrap.Code
import autowrap.CodeGenerator
import autowrap.DeclResolver
import autowrap.Main
import autowrap.PXDParser
import autowrap.Utils
__license__ = """
Copyright (c) 2012-2014, Uwe Schmitt, ETH Zurich, all ri... | 33.092715 | 86 | 0.642686 |
f6a56e58b4d9a8a894e75116ff7f464cf1700ca5 | 5,041 | py | Python | rl_sandbox/examples/pybullet/hopper/grac_experiment.py | chanb/rl_sandbox_public | e55f954a29880f83a5b0c3358badda4d900f1564 | [
"MIT"
] | 14 | 2020-11-09T22:05:37.000Z | 2022-02-11T12:41:33.000Z | rl_sandbox/examples/pybullet/hopper/grac_experiment.py | chanb/rl_sandbox_public | e55f954a29880f83a5b0c3358badda4d900f1564 | [
"MIT"
] | null | null | null | rl_sandbox/examples/pybullet/hopper/grac_experiment.py | chanb/rl_sandbox_public | e55f954a29880f83a5b0c3358badda4d900f1564 | [
"MIT"
] | null | null | null | import argparse
import numpy as np
import torch
import rl_sandbox.constants as c
import rl_sandbox.transforms.general_transforms as gt
from rl_sandbox.agents.random_agents import UniformContinuousAgent
from rl_sandbox.buffers.wrappers.torch_buffer import TorchBuffer
from rl_sandbox.envs.wrappers.action_repeat import ... | 27.248649 | 178 | 0.585201 |
6ccd00cb15e521f938181fe9bd3a18c9311641ec | 19,593 | py | Python | sdk/python/pulumi_azure_native/network/v20190401/express_route_circuit.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190401/express_route_circuit.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190401/express_route_circuit.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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
from ... import _utilities, _tables
from... | 60.847826 | 5,480 | 0.71107 |
4798166826ac2407c06e454ac3dc741489ab5e05 | 3,355 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/_configuration.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/_configuration.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/_configuration.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.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 ... | 47.253521 | 176 | 0.688823 |
68e9a433addd3d0010fb94c80de600640d3dabfe | 18,405 | py | Python | sfftkplus/unittests/_test_omero.py | emdb-empiar/sfftk-plus | 7ceca24b78c540169bddb3fd433b4aed050f40ec | [
"Apache-2.0"
] | null | null | null | sfftkplus/unittests/_test_omero.py | emdb-empiar/sfftk-plus | 7ceca24b78c540169bddb3fd433b4aed050f40ec | [
"Apache-2.0"
] | null | null | null | sfftkplus/unittests/_test_omero.py | emdb-empiar/sfftk-plus | 7ceca24b78c540169bddb3fd433b4aed050f40ec | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_omero_wrapper.py
Unit tests for OMERO handlers
"""
from __future__ import division, print_function
import os
import unittest
from omero.gateway import _ImageWrapper
from omero.model import RectangleI # @UnresolvedImport
from . import TEST_DATA_PATH, _random_f... | 38.184647 | 115 | 0.631079 |
045d63a7e2c478b0563880a6a214024609ea249c | 10,379 | py | Python | Framework/storage.py | AnganMitra/federatedLearn | f5c0d22fd677fbe8d5b90e5e018825ad89d596e5 | [
"MIT"
] | null | null | null | Framework/storage.py | AnganMitra/federatedLearn | f5c0d22fd677fbe8d5b90e5e018825ad89d596e5 | [
"MIT"
] | null | null | null | Framework/storage.py | AnganMitra/federatedLearn | f5c0d22fd677fbe8d5b90e5e018825ad89d596e5 | [
"MIT"
] | null | null | null | import bz2
import functools
import glob
import json
import logging
import os
from pathlib import Path
import pickle
import sys
from itertools import takewhile
from types import SimpleNamespace
import numpy as np
import _pickle as cPickle
from context import get_context
def get_round_from_name(fname: str):
part... | 29.910663 | 88 | 0.661528 |
87301399bd0bfdb86e7f0d5debc2d8750c1a9b3a | 5,951 | py | Python | pymatgen/analysis/tests/test_molecule_structure_comparator.py | exenGT/pymatgen | a8ffb820ab8fc3f60251099e38c8888f45eae618 | [
"MIT"
] | 1 | 2021-11-02T21:10:11.000Z | 2021-11-02T21:10:11.000Z | pymatgen/analysis/tests/test_molecule_structure_comparator.py | exenGT/pymatgen | a8ffb820ab8fc3f60251099e38c8888f45eae618 | [
"MIT"
] | 5 | 2018-08-07T23:00:23.000Z | 2021-01-05T22:46:23.000Z | pymatgen/analysis/tests/test_molecule_structure_comparator.py | exenGT/pymatgen | a8ffb820ab8fc3f60251099e38c8888f45eae618 | [
"MIT"
] | 6 | 2019-04-26T18:50:41.000Z | 2020-03-29T17:58:34.000Z | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
from unittest import TestCase
from pymatgen.analysis.molecule_structure_comparator import MoleculeStructureComparator
from pymatgen.core.structure import Molecule
from pymatgen.util.testing import P... | 30.994792 | 120 | 0.467821 |
57ca95e332751eddb715ef30a66ea9ad6a988d72 | 537 | py | Python | xero_python/payrollau/models/employee_status.py | sromero84/xero-python | 89558c0baa8080c3f522701eb1b94f909248dbd7 | [
"MIT"
] | null | null | null | xero_python/payrollau/models/employee_status.py | sromero84/xero-python | 89558c0baa8080c3f522701eb1b94f909248dbd7 | [
"MIT"
] | null | null | null | xero_python/payrollau/models/employee_status.py | sromero84/xero-python | 89558c0baa8080c3f522701eb1b94f909248dbd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Xero Payroll AU
This is the Xero Payroll API for orgs in Australia region. # noqa: E501
OpenAPI spec version: 2.3.4
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
from enum import Enum
class EmployeeStatus(Enum):
"""NOT... | 17.9 | 76 | 0.664804 |
04e993d2e7da08711b0e232a10b448320c022051 | 33,627 | py | Python | main.py | duongminhhieu/-Racing-Betting | dd58e2878a798df57ae10d719d3256a6636dcf33 | [
"MIT"
] | null | null | null | main.py | duongminhhieu/-Racing-Betting | dd58e2878a798df57ae10d719d3256a6636dcf33 | [
"MIT"
] | null | null | null | main.py | duongminhhieu/-Racing-Betting | dd58e2878a798df57ae10d719d3256a6636dcf33 | [
"MIT"
] | null | null | null | import pygame, sys, random, os
from DinoRun import *
from pygame.locals import *
import time
sys.path.insert(0, '../../')
WINDOWWIDTH = 1280
WINDOWHEIGHT = 720
# PHan backgroud menu
BG_MENU_IMG = pygame.image.load('img/backgroundMenu.png')
BG_PLAY_IMG = pygame.image.load("img/BackGroundPlay.png")
BG_MENU_SetAV = pyga... | 35.621822 | 179 | 0.521278 |
423237a16d3612eb6f3d55360f2f4d7b41323de0 | 27,455 | py | Python | rasa/core/policies/ensemble.py | yang198876/rasa | 14db39f1facb324780553830d06986af8056dc26 | [
"Apache-2.0"
] | 1 | 2021-01-04T23:27:04.000Z | 2021-01-04T23:27:04.000Z | rasa/core/policies/ensemble.py | yang198876/rasa | 14db39f1facb324780553830d06986af8056dc26 | [
"Apache-2.0"
] | 60 | 2020-09-14T00:42:47.000Z | 2022-03-01T13:45:13.000Z | rasa/core/policies/ensemble.py | yang198876/rasa | 14db39f1facb324780553830d06986af8056dc26 | [
"Apache-2.0"
] | 1 | 2020-11-21T01:26:43.000Z | 2020-11-21T01:26:43.000Z | import importlib
import json
import logging
import os
import sys
from collections import defaultdict
from datetime import datetime
from pathlib import Path
from typing import Text, Optional, Any, List, Dict, Tuple, NamedTuple, Union
import rasa.core
import rasa.core.training.training
from rasa.shared.exceptions import... | 37.868966 | 96 | 0.633691 |
8dbbc2dd665f1b60a391ff1fc62a57eff5fb2484 | 74,217 | py | Python | robot/Cumulus/resources/NPSP.py | sungysang/NPSP | 172c51f6c1508d0b6463bc8f45749d5013f4cd79 | [
"BSD-3-Clause"
] | null | null | null | robot/Cumulus/resources/NPSP.py | sungysang/NPSP | 172c51f6c1508d0b6463bc8f45749d5013f4cd79 | [
"BSD-3-Clause"
] | null | null | null | robot/Cumulus/resources/NPSP.py | sungysang/NPSP | 172c51f6c1508d0b6463bc8f45749d5013f4cd79 | [
"BSD-3-Clause"
] | null | null | null | import logging
import warnings
import time
import random
import string
from datetime import datetime
from datetime import timedelta
from robot.libraries.BuiltIn import RobotNotRunningError
from selenium.common.exceptions import ElementNotInteractableException
from selenium.common.exceptions import StaleElementReferen... | 47.912847 | 213 | 0.634841 |
bb881737d6d15beaeadec52cec2f381d7b0b6478 | 40,324 | py | Python | clif/python/gen.py | snu5mumr1k/clif | 3a907dd7b0986f2b3306c88503d414f4d4f963ae | [
"Apache-2.0"
] | null | null | null | clif/python/gen.py | snu5mumr1k/clif | 3a907dd7b0986f2b3306c88503d414f4d4f963ae | [
"Apache-2.0"
] | null | null | null | clif/python/gen.py | snu5mumr1k/clif | 3a907dd7b0986f2b3306c88503d414f4d4f963ae | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google 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 writing,... | 37.615672 | 83 | 0.624293 |
50cc09666a7eec0b7576617478058e3aea3eeac2 | 3,639 | py | Python | blockbuster/bb_api_request_processor.py | mattstibbs/blockbuster-server | cc66278405fcb02ebf07624e70220550ef1ad13b | [
"MIT"
] | null | null | null | blockbuster/bb_api_request_processor.py | mattstibbs/blockbuster-server | cc66278405fcb02ebf07624e70220550ef1ad13b | [
"MIT"
] | 455 | 2015-02-02T21:29:35.000Z | 2021-08-02T05:37:49.000Z | blockbuster/bb_api_request_processor.py | greysteil/blockbuster-server | 475aa1f6da608f12c9c05607e3f302a21a712dfd | [
"MIT"
] | 2 | 2016-03-14T16:39:40.000Z | 2018-03-08T12:03:33.000Z | import json
import bb_dbconnector_factory
import datetime
from json import JSONEncoder
import logging
import blockbuster.bb_command_processor
import blockbuster.bb_types
logger = logging.getLogger(__name__)
class DateEncoder(JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime.date):
... | 30.07438 | 115 | 0.638912 |
435a6c5910bf1734e9978b958303ecff3a32b917 | 10,130 | py | Python | lib/python3.8/site-packages/ansible_collections/community/general/plugins/modules/postgresql_slot.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | 1 | 2020-12-23T13:27:39.000Z | 2020-12-23T13:27:39.000Z | .ansible/collections/ansible_collections/community/general/plugins/modules/database/postgresql/postgresql_slot.py | chronicc/proving-ground | 3e392122a05fb8383a3700954baebb0df330e9e3 | [
"MIT"
] | null | null | null | .ansible/collections/ansible_collections/community/general/plugins/modules/database/postgresql/postgresql_slot.py | chronicc/proving-ground | 3e392122a05fb8383a3700954baebb0df330e9e3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, John Scalia (@jscalia), Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = ty... | 33.213115 | 114 | 0.675913 |
72240efab9807de3b7c0c8aab791092dbb0cd687 | 2,954 | py | Python | ceilometer/tests/hardware/pollsters/base.py | orbitfp7/ceilometer | 9905da14bbdf06f95e1e056c9ca0e18087214d0f | [
"Apache-2.0"
] | 2 | 2015-09-07T09:15:26.000Z | 2015-09-30T02:13:23.000Z | ceilometer/tests/hardware/pollsters/base.py | orbitfp7/ceilometer | 9905da14bbdf06f95e1e056c9ca0e18087214d0f | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/hardware/pollsters/base.py | orbitfp7/ceilometer | 9905da14bbdf06f95e1e056c9ca0e18087214d0f | [
"Apache-2.0"
] | 1 | 2019-09-16T02:11:41.000Z | 2019-09-16T02:11:41.000Z | #
# Copyright 2013 Intel Corp
#
# Authors: Lianhao Lu <lianhao.lu@intel.com>
#
# 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 req... | 37.392405 | 78 | 0.635071 |
f529ac0281c085fa9895eeb4244662b5a6443c8c | 55,820 | py | Python | src/you_get/common.py | Abdo99ab/everything-downloader | bb66fa9427efa3002b9c336e2cc9d9bfe4fd5d27 | [
"MIT"
] | 1 | 2019-09-27T11:14:05.000Z | 2019-09-27T11:14:05.000Z | src/you_get/common.py | Abdo99ab/everything-downloader | bb66fa9427efa3002b9c336e2cc9d9bfe4fd5d27 | [
"MIT"
] | null | null | null | src/you_get/common.py | Abdo99ab/everything-downloader | bb66fa9427efa3002b9c336e2cc9d9bfe4fd5d27 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import io
import os
import re
import sys
import time
import json
import socket
import locale
import logging
import argparse
import ssl
from http import cookiejar
from importlib import import_module
from urllib import request, parse, error
from .version import __version__
from .util import log, ... | 31.465614 | 105 | 0.557005 |
c83734468693fa499f20034e79fe4f727b363d5f | 6,265 | py | Python | hata/discord/activity/activity_custom.py | Multiface24111/hata | cd28f9ef158e347363669cc8d1d49db0ff41aba0 | [
"0BSD"
] | 173 | 2019-06-14T20:25:00.000Z | 2022-03-21T19:36:10.000Z | hata/discord/activity/activity_custom.py | Multiface24111/hata | cd28f9ef158e347363669cc8d1d49db0ff41aba0 | [
"0BSD"
] | 52 | 2020-01-03T17:05:14.000Z | 2022-03-31T11:39:50.000Z | hata/discord/activity/activity_custom.py | Multiface24111/hata | cd28f9ef158e347363669cc8d1d49db0ff41aba0 | [
"0BSD"
] | 47 | 2019-11-09T08:46:45.000Z | 2022-03-31T14:33:34.000Z | __all__ = ('ActivityCustom',)
from ...backend.export import include
from ..utils import DISCORD_EPOCH_START, unix_time_to_datetime, datetime_to_unix_time
from .activity_base import ActivityBase
from . import activity_types as ACTIVITY_TYPES
create_partial_emoji_from_data = include('create_partial_emoji_from_data')
... | 30.2657 | 106 | 0.494334 |
ec01d62249cdc9a474f276da2ca77fb9d773b581 | 12,157 | py | Python | hypercluster/visualize.py | liliblu/autocluster | 95180aaaa42927bfd7fadedb11fb5e577851e387 | [
"BSD-3-Clause"
] | 20 | 2020-01-16T01:57:34.000Z | 2021-12-09T01:51:47.000Z | hypercluster/visualize.py | liliblu/autocluster | 95180aaaa42927bfd7fadedb11fb5e577851e387 | [
"BSD-3-Clause"
] | 2 | 2021-02-03T16:29:09.000Z | 2021-02-05T15:07:44.000Z | hypercluster/visualize.py | liliblu/autocluster | 95180aaaa42927bfd7fadedb11fb5e577851e387 | [
"BSD-3-Clause"
] | 1 | 2020-02-21T20:43:18.000Z | 2020-02-21T20:43:18.000Z | from typing import List, Optional
import logging
from collections import Counter
from itertools import cycle
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
from pandas import DataFrame
from scipy.cluster import hierarchy
from scipy.spatial.distance import pdist
from hyperclus... | 32.945799 | 100 | 0.619972 |
56d5a9046d32b5ac1fb6b02698455e7a16af9bce | 1,287 | py | Python | DataTrigraph.py | MustafaYalciner/KeystrokeIdNeuralNetwork | 8ad334492e2aec845766863707f4c8212217427f | [
"MIT"
] | 1 | 2020-09-05T11:20:29.000Z | 2020-09-05T11:20:29.000Z | DataTrigraph.py | MustafaYalciner/KeystrokeIdNeuralNetwork | 8ad334492e2aec845766863707f4c8212217427f | [
"MIT"
] | null | null | null | DataTrigraph.py | MustafaYalciner/KeystrokeIdNeuralNetwork | 8ad334492e2aec845766863707f4c8212217427f | [
"MIT"
] | null | null | null | import csv
class DataTrigraph:
if __name__ == '__main__':
PREV_KEY_INDEX = 2
USER_ID_INDEX = 16
print('Test')
all = []
input_file = open('data/featureset.csv')
with open('data/output.csv', 'w') as csvoutput:
writer = csv.writer(csvoutput, lineterminator... | 35.75 | 63 | 0.567211 |
7aaa77bcfff98bddb746cf3cda348ae316e63ebe | 725 | py | Python | scripts/f1_plot.py | debajyotidasgupta/Multilingual-Event-Extraction | 1f6f03f6b3a8d4789669bf7303be3e3b69314956 | [
"MIT"
] | null | null | null | scripts/f1_plot.py | debajyotidasgupta/Multilingual-Event-Extraction | 1f6f03f6b3a8d4789669bf7303be3e3b69314956 | [
"MIT"
] | null | null | null | scripts/f1_plot.py | debajyotidasgupta/Multilingual-Event-Extraction | 1f6f03f6b3a8d4789669bf7303be3e3b69314956 | [
"MIT"
] | null | null | null | from sys import argv
import matplotlib.pyplot as plt
def calc_plot(fname):
with open(fname, "r") as f:
lines = f.readlines()
f1_scores = []
epoch_num = []
for l in lines:
if l.startswith("F1"):
f1_scores.append(float(l.strip().split(":")[1]))
elif l.startswith("Ep... | 22.65625 | 60 | 0.602759 |
328527d6e444cc5e6448cb7222f0fe2fe9beee52 | 2,003 | py | Python | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706154936.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706154936.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FirstClassFunctions/MapFilterZipList_20210706154936.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """Map Filter Zip List Comprehensions
Higher order functions
A function that takes a function as a parameter and/or returns a function as it's return value
Example: sorted
map _
|
-- modern alternative -> list comprehensions and generator expressions
... | 21.771739 | 144 | 0.597604 |
91c61063bb2f4d9030d75da028ac2bb463cf3cfc | 6,154 | py | Python | hack/monitor_prow.py | crombus/release | e205e65efd2a5e56ab2c2df8d91c10e059ceb294 | [
"Apache-2.0"
] | null | null | null | hack/monitor_prow.py | crombus/release | e205e65efd2a5e56ab2c2df8d91c10e059ceb294 | [
"Apache-2.0"
] | null | null | null | hack/monitor_prow.py | crombus/release | e205e65efd2a5e56ab2c2df8d91c10e059ceb294 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python3
import glob
import multiprocessing.dummy as multiprocessing
import subprocess
import sys
import tempfile
import time
import json
import os
exec_cmd = lambda *cmd: subprocess.check_output(cmd).decode('utf-8')
RED = exec_cmd('tput', 'setaf', '1')
GREEN = exec_cmd('tput', 'setaf', '2')
YELLOW = exec_c... | 38.949367 | 142 | 0.554111 |
7a9f7862a6acff5df5d853865a6341d61bedbda0 | 11,390 | py | Python | pychron/experiment/experimentor.py | aelamspychron/pychron | ad87c22b0817c739c7823a24585053041ee339d5 | [
"Apache-2.0"
] | 1 | 2019-02-27T21:57:44.000Z | 2019-02-27T21:57:44.000Z | pychron/experiment/experimentor.py | aelamspychron/pychron | ad87c22b0817c739c7823a24585053041ee339d5 | [
"Apache-2.0"
] | 20 | 2020-09-09T20:58:39.000Z | 2021-10-05T17:48:37.000Z | pychron/experiment/experimentor.py | AGESLDEO/pychron | 1a81e05d9fba43b797f335ceff6837c016633bcf | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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... | 35.81761 | 110 | 0.544337 |
9a35bc3c287dc93e6d2d748af53a6f3ea68ab156 | 661 | py | Python | AZkar_BackEnd/manage.py | AbdelrahmanElMahdy/Azkar-HisnMuslim | cc73ffbee38b9bb6f8d17b04a86fbf62e8a83db3 | [
"MIT"
] | null | null | null | AZkar_BackEnd/manage.py | AbdelrahmanElMahdy/Azkar-HisnMuslim | cc73ffbee38b9bb6f8d17b04a86fbf62e8a83db3 | [
"MIT"
] | null | null | null | AZkar_BackEnd/manage.py | AbdelrahmanElMahdy/Azkar-HisnMuslim | cc73ffbee38b9bb6f8d17b04a86fbf62e8a83db3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'azkar.settings')
try:
from django.core.management import execute_from_command_line
except Import... | 28.73913 | 73 | 0.677761 |
d75e8c905f6b99b744369abbdf85d79cff723241 | 1,683 | py | Python | jp.atcoder/typical90/typical90_z/26086653.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/typical90/typical90_z/26086653.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/typical90/typical90_z/26086653.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
import typing
import numba as nb
import numpy as np
@nb.njit
def csgraph_to_undirected(g: np.ndarray) -> np.ndarray:
m = len(g)
g = np.vstack((g, g))
g[m:, :2] = g[m:, 1::-1]
return g
@nb.njit
def sort_csgraph(
n: int,
g: np.ndarray,
) -> typing.Tuple[np.ndarray, np.ndarra... | 21.857143 | 56 | 0.561497 |
26ff2d87c35acdcadd0b8da9fd051afb082b895c | 11,194 | py | Python | tests/test_configuration.py | OnoArnaldo/py_staticpage_builder | 32e9557aaa241e3f78075dc71c6ea7327d7f6890 | [
"MIT"
] | 1 | 2020-11-30T07:31:38.000Z | 2020-11-30T07:31:38.000Z | tests/test_configuration.py | OnoArnaldo/py_staticpage_builder | 32e9557aaa241e3f78075dc71c6ea7327d7f6890 | [
"MIT"
] | 11 | 2020-12-19T15:47:06.000Z | 2021-11-02T23:53:22.000Z | tests/test_configuration.py | OnoArnaldo/py_staticpage_builder | 32e9557aaa241e3f78075dc71c6ea7327d7f6890 | [
"MIT"
] | null | null | null | import os
import pytest
from pystaticpage import config
def test_config():
cfg = config.Config.from_dict({
'environment': 'prod',
'dirs': {
'sites': './dirs/sites',
'pages': './dirs/pages',
'templates': './dirs/templates',
'static': './dirs/static',
... | 33.818731 | 80 | 0.541093 |
af7efbaddc3d4565e3e27f16fa4f9b9108a35af3 | 4,646 | py | Python | test/functional/mempool_reorg.py | BramandUn/PALLY1 | 036c473dddc7534c0979b159ca458e8a3a8a10cb | [
"MIT"
] | null | null | null | test/functional/mempool_reorg.py | BramandUn/PALLY1 | 036c473dddc7534c0979b159ca458e8a3a8a10cb | [
"MIT"
] | null | null | null | test/functional/mempool_reorg.py | BramandUn/PALLY1 | 036c473dddc7534c0979b159ca458e8a3a8a10cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool re-org scenarios.
Test re-org scenarios with a mempool that contains transactions
that sp... | 47.408163 | 122 | 0.691778 |
9fd2017c09ee6f5d3ffa5dff2e8b530d2c284882 | 614 | py | Python | youtubesearchpython/__init__.py | a11cf0/youtube-search-python | 5be693423fb3f2d6a13d691183ed015275828338 | [
"MIT"
] | null | null | null | youtubesearchpython/__init__.py | a11cf0/youtube-search-python | 5be693423fb3f2d6a13d691183ed015275828338 | [
"MIT"
] | null | null | null | youtubesearchpython/__init__.py | a11cf0/youtube-search-python | 5be693423fb3f2d6a13d691183ed015275828338 | [
"MIT"
] | null | null | null | from youtubesearchpython.search import Search, VideosSearch, ChannelsSearch, PlaylistsSearch, CustomSearch
from youtubesearchpython.extras import Video, Playlist, Suggestions
from youtubesearchpython.streamurlfetcher import StreamURLFetcher
from youtubesearchpython.internal.constants import *
__title__ = 'yout... | 38.375 | 106 | 0.807818 |
200b9a5e08841447d3b391ac00a841fe953f7a25 | 3,275 | py | Python | userDetails/userDetails/settings.py | mahesh-muttinti/Django-Sample-App | 65b8eddd7f7b7e4837a61f72543a52460aadd3b8 | [
"Apache-2.0"
] | null | null | null | userDetails/userDetails/settings.py | mahesh-muttinti/Django-Sample-App | 65b8eddd7f7b7e4837a61f72543a52460aadd3b8 | [
"Apache-2.0"
] | null | null | null | userDetails/userDetails/settings.py | mahesh-muttinti/Django-Sample-App | 65b8eddd7f7b7e4837a61f72543a52460aadd3b8 | [
"Apache-2.0"
] | null | null | null | """
Django settings for userDetails project.
Generated by 'django-admin startproject' using Django 3.1.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import o... | 25.787402 | 91 | 0.698321 |
5485955331d22273f1276517368bd8f167b5ceb1 | 750 | py | Python | tests/test_EbClient.py | danilocgsilva/smarteb | 7c4cd6c18f37195e1749dffa713341560457cf55 | [
"MIT"
] | null | null | null | tests/test_EbClient.py | danilocgsilva/smarteb | 7c4cd6c18f37195e1749dffa713341560457cf55 | [
"MIT"
] | null | null | null | tests/test_EbClient.py | danilocgsilva/smarteb | 7c4cd6c18f37195e1749dffa713341560457cf55 | [
"MIT"
] | null | null | null | import sys
import re
import tempfile
import unittest
sys.path.insert(1, "..")
from smart_eb.EbClient import EbClient
class test_EbClient(unittest.TestCase):
def setUp(self):
self.ebClient = EbClient()
def test_new_path_not_exists(self):
non_existent_path = '/path/does/not/exists'
wit... | 25.862069 | 64 | 0.688 |
54f869abb77fb7d44a751ad3143f492efaf6b93c | 390 | py | Python | hall_of_cards/cardsgame/admin.py | mrjmad/gnu_linux_mag_drf | c2be00ca2c37b23d35ab9e12dc8b68e727110682 | [
"MIT"
] | null | null | null | hall_of_cards/cardsgame/admin.py | mrjmad/gnu_linux_mag_drf | c2be00ca2c37b23d35ab9e12dc8b68e727110682 | [
"MIT"
] | null | null | null | hall_of_cards/cardsgame/admin.py | mrjmad/gnu_linux_mag_drf | c2be00ca2c37b23d35ab9e12dc8b68e727110682 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import CardType, Card
class CardTypeAdmin(admin.ModelAdmin):
list_display = ('name',)
class CardAdmin(admin.ModelAdmin):
list_display = ('name', 'card_type', 'mana_cost', 'life', 'damage', 'modified')
list_filter = ('card_type', 'mana_cost')
admin.site.reg... | 21.666667 | 83 | 0.725641 |
d6955565572fe48638e6814e8dae2b372ca2bd00 | 50,465 | py | Python | qutip/piqs.py | sunash2/qutip | 7a57bb0f576621590ecd0dd7d1d862bce57931ec | [
"BSD-3-Clause"
] | null | null | null | qutip/piqs.py | sunash2/qutip | 7a57bb0f576621590ecd0dd7d1d862bce57931ec | [
"BSD-3-Clause"
] | null | null | null | qutip/piqs.py | sunash2/qutip | 7a57bb0f576621590ecd0dd7d1d862bce57931ec | [
"BSD-3-Clause"
] | 1 | 2018-11-08T20:07:56.000Z | 2018-11-08T20:07:56.000Z | # This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
... | 29.860947 | 83 | 0.567799 |
eeca48f8d405c4c6719d701b6fb9e636a27e2628 | 686 | py | Python | Test software/serialComms.py | edsonmatsuda/Python-Serial-Monitor | 471b9019538325d6dbfb52922a6f4596d87fd9ed | [
"MIT"
] | null | null | null | Test software/serialComms.py | edsonmatsuda/Python-Serial-Monitor | 471b9019538325d6dbfb52922a6f4596d87fd9ed | [
"MIT"
] | null | null | null | Test software/serialComms.py | edsonmatsuda/Python-Serial-Monitor | 471b9019538325d6dbfb52922a6f4596d87fd9ed | [
"MIT"
] | null | null | null | import serial
serialPort = serial.Serial(port="COM7", baudrate=9600)
serialString = "" # Used to hold data coming over UART
while(1):
# Wait until there is data waiting in the serial buffer
if(serialPort.in_waiting > 0):
# Read data out of the buffer until a carriage retu... | 32.666667 | 83 | 0.657434 |
5c22f365b01aa807b41b9371a4f9167bb39516bb | 15,289 | py | Python | chia/clvm/spend_sim.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | chia/clvm/spend_sim.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | chia/clvm/spend_sim.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | import aiosqlite
from dataclasses import dataclass
from typing import Optional, List, Dict, Tuple, Any
from chia.types.blockchain_format.sized_bytes import bytes32
from chia.types.blockchain_format.coin import Coin
from chia.types.blockchain_format.program import Program, SerializedProgram
from chia.util.ints import ... | 41.210243 | 119 | 0.680489 |
a4b9e9b1672cd0412069a1d01e0b31e9c88deabc | 3,990 | py | Python | oo/carro.py | WilliamCampolina/pythonbirds | 5eec6a6159f44fdda5d210fe0cee8894b75cb04b | [
"MIT"
] | null | null | null | oo/carro.py | WilliamCampolina/pythonbirds | 5eec6a6159f44fdda5d210fe0cee8894b75cb04b | [
"MIT"
] | null | null | null | oo/carro.py | WilliamCampolina/pythonbirds | 5eec6a6159f44fdda5d210fe0cee8894b75cb04b | [
"MIT"
] | null | null | null | """
Você deve criar uma classe carro que vai possuir
dois atributos compostos por outras duas classes:
1) Motor
2) Direção
O Motor terá a responsabilidade de controlar a velocidade.
Ele oferece os seguintes atributos:
1) Atributo de dado velocidade
2) Método acelerar, que deverá incremetar a velocidade de uma unidade
... | 22.41573 | 69 | 0.614286 |
a574b541d8082b0ca1cf282dd84950f76a23bce1 | 27 | py | Python | src/euler_python_package/euler_python/medium/p392.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | src/euler_python_package/euler_python/medium/p392.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | src/euler_python_package/euler_python/medium/p392.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | def problem392():
pass
| 9 | 17 | 0.62963 |
4c62b268927de9bab0c27fdec488d09d69b71354 | 2,349 | py | Python | tests/sources/tools/simulation/human_model_generation/test_human_model_generation.py | makistsantekidis/opendr | 07dee3b59d3487b9c5a93d6946317178a02c9890 | [
"Apache-2.0"
] | 3 | 2021-06-24T01:54:25.000Z | 2021-12-12T16:21:24.000Z | tests/sources/tools/simulation/human_model_generation/test_human_model_generation.py | makistsantekidis/opendr | 07dee3b59d3487b9c5a93d6946317178a02c9890 | [
"Apache-2.0"
] | 79 | 2021-06-23T10:40:10.000Z | 2021-12-16T07:59:42.000Z | tests/sources/tools/simulation/human_model_generation/test_human_model_generation.py | makistsantekidis/opendr | 07dee3b59d3487b9c5a93d6946317178a02c9890 | [
"Apache-2.0"
] | 5 | 2021-07-04T07:38:50.000Z | 2021-12-12T16:18:47.000Z | # Copyright 2020-2021 OpenDR European Project
#
# 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 agree... | 39.15 | 120 | 0.645807 |
8eb06f4e932c51a3b45380ef45943a0f8d134918 | 2,129 | py | Python | myconnectome/qa/run_qap_func.py | poldrack/myconnectome | 201f414b3165894d6fe0be0677c8a58f6d161948 | [
"MIT"
] | 28 | 2015-04-02T16:43:14.000Z | 2020-06-17T20:04:26.000Z | myconnectome/qa/run_qap_func.py | poldrack/myconnectome | 201f414b3165894d6fe0be0677c8a58f6d161948 | [
"MIT"
] | 11 | 2015-05-19T02:57:22.000Z | 2017-03-17T17:36:16.000Z | myconnectome/qa/run_qap_func.py | poldrack/myconnectome | 201f414b3165894d6fe0be0677c8a58f6d161948 | [
"MIT"
] | 10 | 2015-05-21T17:01:26.000Z | 2020-11-11T04:28:08.000Z | """
run quality assurance measures on functional data
"""
import sys,glob
sys.path.append('/corral-repl/utexas/poldracklab/software_lonestar/quality-assessment-protocol')
import os
import numpy
from run_shell_cmd import run_shell_cmd
from compute_fd import compute_fd
from qap import load_func,load_image, load_mask, s... | 35.483333 | 186 | 0.754345 |
31e96153e26258578217512b0c79d21d6a304678 | 14,418 | py | Python | examples/laplace3d.py | xywei/volumential | 07c6ca8c623acf24fb8deddf93baa1035234db58 | [
"MIT"
] | 6 | 2021-05-21T23:57:15.000Z | 2022-03-07T22:02:50.000Z | examples/laplace3d.py | inducer/volumential | 290a5943d3f47958dcab6736bc2b758525471570 | [
"MIT"
] | 2 | 2021-03-26T15:41:27.000Z | 2021-03-26T15:42:21.000Z | examples/laplace3d.py | inducer/volumential | 290a5943d3f47958dcab6736bc2b758525471570 | [
"MIT"
] | 1 | 2021-05-21T21:23:39.000Z | 2021-05-21T21:23:39.000Z | """ This example evaluates the volume potential over
[-1,1]^3 with the Laplace kernel.
"""
from __future__ import absolute_import, division, print_function
__copyright__ = "Copyright (C) 2017 - 2018 Xiaoyu Wei"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this ... | 28.951807 | 82 | 0.613192 |
f5e35bbd6b167d87ac817c84f6c0be5dfcdf7f93 | 803 | py | Python | python/2020/october/oct-21/main.py | lineville/Daily-Coding-Problem | 9088616669c5f183457c9238128f0d47b85097d9 | [
"MIT"
] | null | null | null | python/2020/october/oct-21/main.py | lineville/Daily-Coding-Problem | 9088616669c5f183457c9238128f0d47b85097d9 | [
"MIT"
] | 4 | 2021-08-09T00:30:32.000Z | 2021-10-04T21:38:12.000Z | python/2020/october/oct-21/main.py | lineville/Daily-Coding-Problem | 9088616669c5f183457c9238128f0d47b85097d9 | [
"MIT"
] | null | null | null |
# * Daily Coding Problem October 21 2020
# * [Easy] -- Amazon
# * Write a function that takes a natural number as input and
# * returns the number of digits the input has.
# Constraint: don't use any loops.
# * This works but not clear if python is using loops under the hood to convert to string
def numberLength(n... | 19.585366 | 89 | 0.697385 |
ad221f33daef8d05255ab18c997b27a52880895b | 5,108 | py | Python | RecoFramework/loginController.py | kuangzijian/RecoSys | 765806ffbf6bed3bd6c599cc84217872dfa560ae | [
"MIT"
] | null | null | null | RecoFramework/loginController.py | kuangzijian/RecoSys | 765806ffbf6bed3bd6c599cc84217872dfa560ae | [
"MIT"
] | null | null | null | RecoFramework/loginController.py | kuangzijian/RecoSys | 765806ffbf6bed3bd6c599cc84217872dfa560ae | [
"MIT"
] | 1 | 2021-04-14T02:13:16.000Z | 2021-04-14T02:13:16.000Z | from django.http import HttpResponse
from django.shortcuts import render,redirect
from django.views.decorators.csrf import csrf_exempt
#from django.db import models
import numpy as np
from lightfm import LightFM
from lightfm.data import Dataset
import sqlite3
from lightfm.evaluation import precision_at_k
from lightfm.e... | 29.188571 | 127 | 0.653876 |
707ad7c7c3cdcc649881572213d38c69e388ed13 | 502 | py | Python | loan_appraiser/config/loan_appraiser.py | Rashidsalim/loan-appraiser | 08b9ef32c02298b8745311299a9cc83a4a1084d2 | [
"MIT"
] | null | null | null | loan_appraiser/config/loan_appraiser.py | Rashidsalim/loan-appraiser | 08b9ef32c02298b8745311299a9cc83a4a1084d2 | [
"MIT"
] | null | null | null | loan_appraiser/config/loan_appraiser.py | Rashidsalim/loan-appraiser | 08b9ef32c02298b8745311299a9cc83a4a1084d2 | [
"MIT"
] | null | null | null |
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Appraiser"),
"icon": "octicon octicon-file-directory",
"items": [
{
"doctype": "doc",
"type": "doctype",
... | 25.1 | 59 | 0.39243 |
ce613bac5560bc71ee1477487d581f2a640fe12a | 524 | py | Python | src/fixture/festivalfixture.py | rangoski/gymkhana_portal | 49d1c696beada33a504898a7bb8eef65ad509635 | [
"MIT"
] | null | null | null | src/fixture/festivalfixture.py | rangoski/gymkhana_portal | 49d1c696beada33a504898a7bb8eef65ad509635 | [
"MIT"
] | null | null | null | src/fixture/festivalfixture.py | rangoski/gymkhana_portal | 49d1c696beada33a504898a7bb8eef65ad509635 | [
"MIT"
] | null | null | null | import factory
import random
COLOUR = ["yellow", "black", "purple", "red", "orange", "green", '#084594', '#2171b5', '#4292c6', '#6baed6', '#9ecae1',
'#c6dbef', '#deebf7', '#f7fbff'
]
class FestivalFactory(factory.django.DjangoModelFactory):
class Meta:
model = 'main.Festival'
nam... | 30.823529 | 119 | 0.622137 |
0c2592ec42acd08111188e5618e285dcfdec5666 | 10,240 | py | Python | ppr-api/tests/unit/endpoints/test_financing_statement.py | bcgov/ppr-deprecated | c8925b6f6b0d7fb3f4e267dfe25650a1045ef2e3 | [
"Apache-2.0"
] | 1 | 2019-11-15T19:07:25.000Z | 2019-11-15T19:07:25.000Z | ppr-api/tests/unit/endpoints/test_financing_statement.py | bryan-gilbert/ppr | c8925b6f6b0d7fb3f4e267dfe25650a1045ef2e3 | [
"Apache-2.0"
] | 6 | 2021-03-03T05:18:35.000Z | 2022-02-10T21:55:45.000Z | ppr-api/tests/unit/endpoints/test_financing_statement.py | bcgov/ppr-deprecated | c8925b6f6b0d7fb3f4e267dfe25650a1045ef2e3 | [
"Apache-2.0"
] | null | null | null | import datetime
import datedelta
import fastapi
import pytest
import endpoints.financing_statement
import models.collateral
import models.financing_statement
import models.party
import schemas.financing_statement
from schemas.financing_statement import RegistrationType
from schemas.party import PartyType
def test_r... | 44.137931 | 118 | 0.772949 |
24303fc2bb03c5d83a46893d3ff74a2ec5baeb20 | 3,168 | py | Python | src/programy/dialog/joiner/joiner.py | cen-ai/program-y | a753667638147544c54dbebd9f1c8f9ae7f2159e | [
"MIT"
] | 5 | 2018-08-21T00:13:45.000Z | 2018-09-01T20:00:55.000Z | src/programy/dialog/joiner/joiner.py | cen-ai/program-y | a753667638147544c54dbebd9f1c8f9ae7f2159e | [
"MIT"
] | 1 | 2018-09-12T18:30:17.000Z | 2018-09-12T18:30:17.000Z | src/programy/dialog/joiner/joiner.py | cen-ai/program-y | a753667638147544c54dbebd9f1c8f9ae7f2159e | [
"MIT"
] | 5 | 2018-08-21T00:08:36.000Z | 2018-09-23T06:11:04.000Z | """
Copyright (c) 2016-2018 Keith Sterling http://www.keithsterling.com
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 without limitation
the rights to use, copy, m... | 44.619718 | 120 | 0.687816 |
f8725473e04403da65a6c157167a89021bda2762 | 966 | py | Python | test_lab/server.py | Volodar/test_lab | 829aef5792bd4ab7eaa61b48d8b6e249fb0e78f1 | [
"MIT"
] | null | null | null | test_lab/server.py | Volodar/test_lab | 829aef5792bd4ab7eaa61b48d8b6e249fb0e78f1 | [
"MIT"
] | null | null | null | test_lab/server.py | Volodar/test_lab | 829aef5792bd4ab7eaa61b48d8b6e249fb0e78f1 | [
"MIT"
] | null | null | null | from http.server import HTTPServer
from http.server import BaseHTTPRequestHandler
from .log import Log
class HttpServer(BaseHTTPRequestHandler):
request_handler_class = None
@staticmethod
def start(url, port, request_handler_class):
HttpServer.request_handler_class = request_handler_class
... | 29.272727 | 68 | 0.640787 |
d5079bac50dbe08691fe493ed46da1a02716e3ad | 897 | py | Python | leetcode/187.py | windniw/just-for-fun | 54e5c2be145f3848811bfd127f6a89545e921570 | [
"Apache-2.0"
] | 1 | 2019-08-28T23:15:25.000Z | 2019-08-28T23:15:25.000Z | leetcode/187.py | windniw/just-for-fun | 54e5c2be145f3848811bfd127f6a89545e921570 | [
"Apache-2.0"
] | null | null | null | leetcode/187.py | windniw/just-for-fun | 54e5c2be145f3848811bfd127f6a89545e921570 | [
"Apache-2.0"
] | null | null | null | """
link: https://leetcode-cn.com/problems/repeated-dna-sequences
problem: 由 ACGT 组成的字符串,求其中重复出现的,长度为10的子串,注意重复子串可重叠
solution: 压缩搜索。将四个字母分别视为 0b00, 0b01, 0b10, 0b11,则长度为 10 的子串可被压缩为一个 20 位的整数进行存储,通过 & mask 即可消除高位,
用 >> 和 + 来补充低位,压缩完丢集合进行查找,若出现相同的整数,即存在重复子串。
"""
class Solution:
def findRepeatedDnaSeque... | 29.9 | 96 | 0.507246 |
5fd57c5579d7b05c320e7bbf61d29e4a5c210238 | 380 | py | Python | Backend/core/users/signals.py | Extraordinary01/freshnesecom | e16047d7f8a8d771125c4656351bae2b4389a1a6 | [
"MIT"
] | null | null | null | Backend/core/users/signals.py | Extraordinary01/freshnesecom | e16047d7f8a8d771125c4656351bae2b4389a1a6 | [
"MIT"
] | null | null | null | Backend/core/users/signals.py | Extraordinary01/freshnesecom | e16047d7f8a8d771125c4656351bae2b4389a1a6 | [
"MIT"
] | null | null | null | from os import path
from django.conf import settings
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from .models import User
@receiver(pre_delete, sender=User)
def delete_img_hook(sender, instance, using, **kwargs):
if instance.img.path != path.join(settings.BASE_DIR, 'media\... | 31.666667 | 83 | 0.776316 |
505f8b5bdd95a6e4c8bbee16921665eabff84351 | 3,841 | py | Python | code/generate_submission.py | kode-git/network-configuration-behaviour-evaluation | 1c5fb273fbb5bb0e6e0fd2a04f1237cdcd7ff5a0 | [
"Apache-2.0"
] | null | null | null | code/generate_submission.py | kode-git/network-configuration-behaviour-evaluation | 1c5fb273fbb5bb0e6e0fd2a04f1237cdcd7ff5a0 | [
"Apache-2.0"
] | null | null | null | code/generate_submission.py | kode-git/network-configuration-behaviour-evaluation | 1c5fb273fbb5bb0e6e0fd2a04f1237cdcd7ff5a0 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import configparser
import pandas as pd
import numpy as np
from read_dataset import input_fn
from routenet_model import model_fn
###################
# Input variables #
###################
# Path to the test dataset root directory
test_dataset_directory = "../data/sample_data/test"
# path to th... | 40.861702 | 161 | 0.661546 |
6bd8d4f2f9525ab0057b3baa80c7e5ee667f337a | 3,257 | py | Python | src/distdl/nn/__init__.py | philippwitte/distdl | e77e0c355d617def88b4acfcc12f0e92e9fb2fe5 | [
"BSD-2-Clause"
] | null | null | null | src/distdl/nn/__init__.py | philippwitte/distdl | e77e0c355d617def88b4acfcc12f0e92e9fb2fe5 | [
"BSD-2-Clause"
] | null | null | null | src/distdl/nn/__init__.py | philippwitte/distdl | e77e0c355d617def88b4acfcc12f0e92e9fb2fe5 | [
"BSD-2-Clause"
] | null | null | null | import distdl.nn.loss # noqa: F401
from . import mixins # noqa: F401
from .all_sum_reduce import AllSumReduce # noqa: F401
from .batchnorm import DistributedBatchNorm # noqa: F401
from .broadcast import Broadcast # noqa: F401
from .conv import DistributedConv1d # noqa: F401
from .conv import DistributedConv2d #... | 42.298701 | 64 | 0.707092 |
5ac1b585ef063a893c876462f8dc9a3a101862cf | 15,618 | py | Python | data/scannetv2_inst.py | PatrickFeng/PointGroup | 7b7d51a2edc013328adea6d5facee271fb732166 | [
"Apache-2.0"
] | 2 | 2020-09-11T12:36:54.000Z | 2020-11-07T04:10:38.000Z | data/scannetv2_inst.py | PatrickFeng/PointGroup | 7b7d51a2edc013328adea6d5facee271fb732166 | [
"Apache-2.0"
] | null | null | null | data/scannetv2_inst.py | PatrickFeng/PointGroup | 7b7d51a2edc013328adea6d5facee271fb732166 | [
"Apache-2.0"
] | 1 | 2021-05-18T02:46:20.000Z | 2021-05-18T02:46:20.000Z | '''
ScanNet v2 Dataloader (Modified from SparseConvNet Dataloader)
Written by Li Jiang
'''
import os, sys, glob, math, numpy as np
import scipy.ndimage
import scipy.interpolate
import torch
from torch.utils.data import DataLoader
sys.path.append('../')
from util.config import cfg
from util.log import logger
from lib... | 42.555858 | 145 | 0.587079 |
6d7087b8adf57fd7c706498b1f5336e24ca35c9d | 26 | py | Python | drupal/drupalorg/tests/plugins/authorization/__init__.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | drupal/drupalorg/tests/plugins/authorization/__init__.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | drupal/drupalorg/tests/plugins/authorization/__init__.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | __author__ = 'christophe'
| 13 | 25 | 0.769231 |
d286d53a2c01f87ac14977b82805f74c4cda3020 | 1,139 | py | Python | qiskit/chemistry/components/initial_states/__init__.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 504 | 2018-12-15T16:34:03.000Z | 2022-03-26T11:24:53.000Z | qiskit/chemistry/components/initial_states/__init__.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 746 | 2018-12-16T16:44:42.000Z | 2021-07-10T16:59:43.000Z | qiskit/chemistry/components/initial_states/__init__.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 421 | 2018-12-22T14:49:00.000Z | 2022-03-04T09:47:07.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 29.973684 | 97 | 0.707638 |
acc9eaf459f525e01ea7a02ec051d7e1e3d6b65a | 1,592 | py | Python | examples/using_steem_offline.py | dpays/dpay-cli | dfa80898e1faea2cee92ebec6fe04873381bd40f | [
"MIT"
] | null | null | null | examples/using_steem_offline.py | dpays/dpay-cli | dfa80898e1faea2cee92ebec6fe04873381bd40f | [
"MIT"
] | null | null | null | examples/using_steem_offline.py | dpays/dpay-cli | dfa80898e1faea2cee92ebec6fe04873381bd40f | [
"MIT"
] | null | null | null | from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import sys
from datetime import datetime, timedelta
import time
import io
import logging
from dpaycli.blockchain import Blockchain
from dpaycli.block import Block
from dpaycli.account import Account
from dpayc... | 33.166667 | 87 | 0.755653 |
a1f03b250043218f706cbf6d0c66bcf09a407b59 | 4,846 | py | Python | qiskit/transpiler/passes/__init__.py | irajput/qiskit-terra | e9f06e457bfb67afe1b36b6b9b0b315eb1a24800 | [
"Apache-2.0"
] | 1 | 2021-07-06T09:07:47.000Z | 2021-07-06T09:07:47.000Z | qiskit/transpiler/passes/__init__.py | evercodes/qiskit-terra | 649fec2cd1644c43eabc39b0a588c0a9347a2b50 | [
"Apache-2.0"
] | null | null | null | qiskit/transpiler/passes/__init__.py | evercodes/qiskit-terra | 649fec2cd1644c43eabc39b0a588c0a9347a2b50 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 23.298077 | 77 | 0.767437 |
18f3d13029756dbeeda99717e11bd23df3fa716e | 385 | py | Python | pred/wsgi.py | zhenyu1311/hdb4213 | 168fbdc999525abd31a3d54bef3b2c38c22afb8f | [
"Apache-2.0"
] | null | null | null | pred/wsgi.py | zhenyu1311/hdb4213 | 168fbdc999525abd31a3d54bef3b2c38c22afb8f | [
"Apache-2.0"
] | null | null | null | pred/wsgi.py | zhenyu1311/hdb4213 | 168fbdc999525abd31a3d54bef3b2c38c22afb8f | [
"Apache-2.0"
] | null | null | null | """
WSGI config for pred project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS... | 22.647059 | 78 | 0.781818 |
bec5e194d7749bcc76fa2a90593aff0fb181dc6e | 383 | py | Python | bruteforce.py | ipsarros/dolphinnpy | e55df7c66b91c06bc908e48947a72f6703eb2a15 | [
"BSD-2-Clause"
] | 13 | 2017-03-20T14:44:06.000Z | 2021-09-29T01:54:31.000Z | bruteforce.py | iemiris/DolphinnPy | ce9ff09ebdb90e15fc5faee9c9e9d01f067773c0 | [
"BSD-2-Clause"
] | null | null | null | bruteforce.py | iemiris/DolphinnPy | ce9ff09ebdb90e15fc5faee9c9e9d01f067773c0 | [
"BSD-2-Clause"
] | 4 | 2018-06-24T15:43:41.000Z | 2021-09-29T01:54:33.000Z | import sys
sys.path.append('/usr/local/lib/python3.4/dist-packages/')
import numpy as np
def bruteforce(P, Q):
solQ=[]
for q in Q:
md=np.linalg.norm(P[0]-q)
mi=0
for i in range(len(P)):
if np.linalg.norm(np.subtract(P[i],q))<md:
md=np.linalg.norm(np.subtract(P[i],q)... | 23.9375 | 58 | 0.548303 |
b9caa4dc64e663a87c3d503791c2acf82fa1f20c | 226 | py | Python | tests/conftest.py | LeviBorodenko/dgcnn | 760c5dd1b795bcacba50ed3a50cc3615472cd885 | [
"MIT"
] | 22 | 2020-01-26T18:59:48.000Z | 2022-03-07T07:08:00.000Z | tests/conftest.py | LeviBorodenko/dgcnn | 760c5dd1b795bcacba50ed3a50cc3615472cd885 | [
"MIT"
] | null | null | null | tests/conftest.py | LeviBorodenko/dgcnn | 760c5dd1b795bcacba50ed3a50cc3615472cd885 | [
"MIT"
] | 3 | 2020-01-27T10:01:53.000Z | 2020-06-29T14:21:22.000Z | # -*- coding: utf-8 -*-
"""
Dummy conftest.py for dgcnn.
If you don't know what this is for, just leave it empty.
Read more about conftest.py under:
https://pytest.org/latest/plugins.html
"""
# import pytest
| 20.545455 | 60 | 0.646018 |
845e297a0607ebb909dfaf2d63f7edeb64ba3205 | 546 | py | Python | Trakttv.bundle/Contents/Libraries/Shared/plex_database/models/account.py | disrupted/Trakttv.bundle | 24712216c71f3b22fd58cb5dd89dad5bb798ed60 | [
"RSA-MD"
] | 1,346 | 2015-01-01T14:52:24.000Z | 2022-03-28T12:50:48.000Z | Trakttv.bundle/Contents/Libraries/Shared/plex_database/models/account.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 474 | 2015-01-01T10:27:46.000Z | 2022-03-21T12:26:16.000Z | Trakttv.bundle/Contents/Libraries/Shared/plex_database/models/account.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 191 | 2015-01-02T18:27:22.000Z | 2022-03-29T10:49:48.000Z | from plex_database.core import db
from peewee import *
class Account(Model):
class Meta:
database = db
db_table = 'accounts'
name = CharField(null=True)
hashed_password = CharField(null=True)
salt = CharField(null=True)
created_at = DateTimeField(null=True)
updated_at = Dat... | 22.75 | 52 | 0.716117 |
58b5849af0ab600c7d51f89f765d1ddf510aa8a2 | 13,807 | py | Python | tests/agent_features/test_notice_error.py | newrelic/newrelic-python-agen | 4f292ec1219c0daffc5721a7b3a245b97d0f83ba | [
"Apache-2.0"
] | 92 | 2020-06-12T17:53:23.000Z | 2022-03-01T11:13:21.000Z | tests/agent_features/test_notice_error.py | newrelic/newrelic-python-agen | 4f292ec1219c0daffc5721a7b3a245b97d0f83ba | [
"Apache-2.0"
] | 347 | 2020-07-10T00:10:19.000Z | 2022-03-31T17:58:56.000Z | tests/agent_features/test_notice_error.py | newrelic/newrelic-python-agen | 4f292ec1219c0daffc5721a7b3a245b97d0f83ba | [
"Apache-2.0"
] | 58 | 2020-06-17T13:51:57.000Z | 2022-03-06T14:26:53.000Z | # Copyright 2010 New Relic, 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 writ... | 30.888143 | 114 | 0.781343 |
5b864f6e503b54f333e9f41820a6fe556de69bb1 | 12,478 | py | Python | qa/rpc-tests/p2p-acceptblock.py | gobytecoin/gobyte-dev | 3378282545a42d93c6fb9c38e57fc4ef005491c4 | [
"MIT"
] | 2 | 2018-10-15T14:54:38.000Z | 2019-10-31T23:31:29.000Z | qa/rpc-tests/p2p-acceptblock.py | gobytecoin/gobyte-dev | 3378282545a42d93c6fb9c38e57fc4ef005491c4 | [
"MIT"
] | 1 | 2018-05-20T18:10:57.000Z | 2018-05-20T18:10:57.000Z | qa/rpc-tests/p2p-acceptblock.py | gobytecoin/gobyte-dev | 3378282545a42d93c6fb9c38e57fc4ef005491c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from... | 42.587031 | 107 | 0.651066 |
fab3fb249e642ab6880b29b77dfc3442f571b961 | 2,214 | py | Python | examples/demo_actor/demo_actor/demo_actor_client.py | wmeints/python-sdk | 33e7d48ffbed9b175ff095d18247f328e990d4ca | [
"MIT"
] | 1 | 2021-04-05T11:29:16.000Z | 2021-04-05T11:29:16.000Z | examples/demo_actor/demo_actor/demo_actor_client.py | Chemdevil/python-sdk | b62d3b75478359a637d1e3ae162a9d21c8029bf6 | [
"MIT"
] | 12 | 2021-09-14T05:13:26.000Z | 2022-03-25T05:16:24.000Z | examples/demo_actor/demo_actor/demo_actor_client.py | Chemdevil/python-sdk | b62d3b75478359a637d1e3ae162a9d21c8029bf6 | [
"MIT"
] | 1 | 2022-02-23T12:44:51.000Z | 2022-02-23T12:44:51.000Z | # -*- coding: utf-8 -*-
# Copyright (c) Microsoft Corporation and Dapr Contributors.
# Licensed under the MIT License.
import asyncio
from dapr.actor import ActorProxy, ActorId
from demo_actor_interface import DemoActorInterface
async def main():
# Create proxy client
proxy = ActorProxy.create('DemoActor', ... | 34.59375 | 76 | 0.573622 |
7b24c60032cdaf1d93f7b02765661b724cb5f895 | 1,721 | py | Python | week6_EDA_streamlit_flask_webscraping/day2_ds_presentation_flask_individual_project/flask_class/flask_essential/main_flask.py | paleomau/MGOL_BOOTCAMP | 8c2b018f49fd12a255ea6f323141260d04d4421d | [
"MIT"
] | null | null | null | week6_EDA_streamlit_flask_webscraping/day2_ds_presentation_flask_individual_project/flask_class/flask_essential/main_flask.py | paleomau/MGOL_BOOTCAMP | 8c2b018f49fd12a255ea6f323141260d04d4421d | [
"MIT"
] | null | null | null | week6_EDA_streamlit_flask_webscraping/day2_ds_presentation_flask_individual_project/flask_class/flask_essential/main_flask.py | paleomau/MGOL_BOOTCAMP | 8c2b018f49fd12a255ea6f323141260d04d4421d | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template
from utils.functions import read_json
import os
# Mandatory
app = Flask(__name__) # __name__ --> __main__
# ---------- Flask functions ----------
@app.route("/") # @ --> esto representa el decorador de la función
def home():
""" Default path """
return app... | 29.169492 | 118 | 0.63161 |
2f94aefb9a601baa7f6ecba7e2b09a34dea845f8 | 1,946 | py | Python | cohesity_management_sdk/models/type_vault_stats_info_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 1 | 2021-01-07T20:36:22.000Z | 2021-01-07T20:36:22.000Z | cohesity_management_sdk/models/type_vault_stats_info_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | cohesity_management_sdk/models/type_vault_stats_info_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class TypeVaultStatsInfoEnum(object):
"""Implementation of the 'Type_VaultStatsInfo' enum.
Specifies the Vault type.
Attributes:
KNEARLINE: TODO: type description here.
KGLACIER: TODO: type description here.
KS3: TODO: type d... | 25.272727 | 57 | 0.672662 |
ea5f2e17759eaafaeb91243175e0f7e8a873fd94 | 999 | py | Python | neptune/new/constants.py | janbolle/neptune-client | 33b1876b361d9a7184f557d7bd6e016cb08bd59f | [
"Apache-2.0"
] | null | null | null | neptune/new/constants.py | janbolle/neptune-client | 33b1876b361d9a7184f557d7bd6e016cb08bd59f | [
"Apache-2.0"
] | null | null | null | neptune/new/constants.py | janbolle/neptune-client | 33b1876b361d9a7184f557d7bd6e016cb08bd59f | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2020, Neptune Labs Sp. z o.o.
#
# 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 agr... | 33.3 | 120 | 0.767768 |
9f68cb95cc87b832d92f67acef699a4436b307a3 | 4,086 | py | Python | thunderpush/messenger.py | uthunderbird/thunderpush | e2b311510221f2cd332136cb08b64851b201468f | [
"BSD-3-Clause"
] | null | null | null | thunderpush/messenger.py | uthunderbird/thunderpush | e2b311510221f2cd332136cb08b64851b201468f | [
"BSD-3-Clause"
] | null | null | null | thunderpush/messenger.py | uthunderbird/thunderpush | e2b311510221f2cd332136cb08b64851b201468f | [
"BSD-3-Clause"
] | null | null | null | import logging
import re
logger = logging.getLogger()
class Messenger(object):
"""
Handles dispatching messages to Channels and Users
for given client.
"""
def __init__(self, apikey, apisecret, *args, **kwargs):
self.apikey = apikey
self.apisecret = apisecret
self.users ... | 31.19084 | 79 | 0.595448 |
445980a15a928b6cd06afc36e4b18260ef49c7f3 | 679 | py | Python | repo_controller_manager/__init__.py | grahamhayes/repo-controller-manager | 8e38c2531ce23c8f10d29494e956ec9e350a761c | [
"Apache-2.0"
] | null | null | null | repo_controller_manager/__init__.py | grahamhayes/repo-controller-manager | 8e38c2531ce23c8f10d29494e956ec9e350a761c | [
"Apache-2.0"
] | null | null | null | repo_controller_manager/__init__.py | grahamhayes/repo-controller-manager | 8e38c2531ce23c8f10d29494e956ec9e350a761c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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 writing, softw... | 33.95 | 75 | 0.749632 |
7299aaaa6e7d4b8f4ffe0d017c35a2b930fcd2fb | 151 | py | Python | learning_logs/admin.py | princ3raj/learning-log | c396bc23509f0adc589966ec688c3388a051d006 | [
"Apache-2.0"
] | null | null | null | learning_logs/admin.py | princ3raj/learning-log | c396bc23509f0adc589966ec688c3388a051d006 | [
"Apache-2.0"
] | 3 | 2021-03-30T14:15:20.000Z | 2021-09-22T19:31:57.000Z | learning_logs/admin.py | princ3raj/learning-log | c396bc23509f0adc589966ec688c3388a051d006 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Topic,Entry
admin.site.register(Topic)
admin.site.register(Entry)
# Register your models here.
| 16.777778 | 32 | 0.794702 |
a8e12fd1630739d4104d72fe8e039e3e113c0e8a | 1,969 | py | Python | communities/tests.py | powerblossom/workcloud | fd943220366ebeadfa90c59fc395f84a734b5686 | [
"MIT"
] | 1 | 2019-10-18T05:57:13.000Z | 2019-10-18T05:57:13.000Z | communities/tests.py | powerblossom/workcloud | fd943220366ebeadfa90c59fc395f84a734b5686 | [
"MIT"
] | 11 | 2019-12-02T13:59:22.000Z | 2021-04-24T08:52:19.000Z | communities/tests.py | powerblossom/workcloud | fd943220366ebeadfa90c59fc395f84a734b5686 | [
"MIT"
] | null | null | null | from core.testcase import TestCase as CoreTestCase
from . import models
class TestCase(CoreTestCase):
def create_option(
self,
is_active=True,
permission_read='all',
permission_write='all',
permission_reply='all'
):
self.option = models.Option.objects.create(
... | 23.440476 | 51 | 0.530726 |
f6ce66818fb6a248a656d831fec82ec19f4e9871 | 2,604 | py | Python | ceilometer/publisher/meter_publish.py | CiscoSystems/ceilometer | a9267fd94e7854afa0720d761fbe75d946e7167d | [
"Apache-2.0"
] | null | null | null | ceilometer/publisher/meter_publish.py | CiscoSystems/ceilometer | a9267fd94e7854afa0720d761fbe75d946e7167d | [
"Apache-2.0"
] | null | null | null | ceilometer/publisher/meter_publish.py | CiscoSystems/ceilometer | a9267fd94e7854afa0720d761fbe75d946e7167d | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# 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
#
# ... | 31 | 75 | 0.625576 |
03ff9b94985ddc2c068fdd82a1303d33a35ce72f | 3,460 | py | Python | checkSpeed.py | sunsetmountain/raspberrySpeedtest | 1b3d18deabec30779a06e11fc5a00fbf86dfce41 | [
"Apache-2.0"
] | null | null | null | checkSpeed.py | sunsetmountain/raspberrySpeedtest | 1b3d18deabec30779a06e11fc5a00fbf86dfce41 | [
"Apache-2.0"
] | null | null | null | checkSpeed.py | sunsetmountain/raspberrySpeedtest | 1b3d18deabec30779a06e11fc5a00fbf86dfce41 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import os
import re
import subprocess
import json
import time
import socket
import datetime
import calendar
from tendo import singleton
me = singleton.SingleInstance() # will sys.exit(-1) if another instance of this script is already running
dataDir = "/home/pi/raspberrySpeedt... | 32.641509 | 139 | 0.687572 |
07b1069f2cb5224a37c1b8ff1129b124ce02279f | 5,086 | py | Python | test/functional/rpc_whitelist.py | syglee7/zenacoin-ver2 | 90079b95bdf0ea2b7fce644c56d2a9626526e5e4 | [
"MIT"
] | null | null | null | test/functional/rpc_whitelist.py | syglee7/zenacoin-ver2 | 90079b95bdf0ea2b7fce644c56d2a9626526e5e4 | [
"MIT"
] | null | null | null | test/functional/rpc_whitelist.py | syglee7/zenacoin-ver2 | 90079b95bdf0ea2b7fce644c56d2a9626526e5e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The Zenacoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
A test for RPC users with restricted permissions
"""
from test_framework.test_framework import Zenaco... | 50.356436 | 184 | 0.653755 |
e4b60b2d5d762bd4defd24f8994f6fbf90207821 | 1,178 | py | Python | common/src/stack/command/stack/commands/unload/attrfile/__init__.py | khanfluence/stacki-cumulus-switch | df54afb20f6ea6a3a136b3c09b30df54ea79ffcc | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/unload/attrfile/__init__.py | khanfluence/stacki-cumulus-switch | df54afb20f6ea6a3a136b3c09b30df54ea79ffcc | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/unload/attrfile/__init__.py | khanfluence/stacki-cumulus-switch | df54afb20f6ea6a3a136b3c09b30df54ea79ffcc | [
"BSD-3-Clause"
] | null | null | null | # @copyright@
# Copyright (c) 2006 - 2018 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
import os.path
import stack.commands
from stack.exception import CommandError
class Command(stack.commands.unload.command):
"""
Unload (remo... | 24.541667 | 70 | 0.713922 |
2096ecd7c077630215c040ca5e09cc47c29b5b69 | 176 | py | Python | findthebot/__init__.py | MarcoGiancarli/findthebot | a162df4168800a2ba245da6dbd6bdd0f85f75dfa | [
"MIT"
] | null | null | null | findthebot/__init__.py | MarcoGiancarli/findthebot | a162df4168800a2ba245da6dbd6bdd0f85f75dfa | [
"MIT"
] | null | null | null | findthebot/__init__.py | MarcoGiancarli/findthebot | a162df4168800a2ba245da6dbd6bdd0f85f75dfa | [
"MIT"
] | null | null | null | from flask import Flask
from flask_socketio import SocketIO
app = Flask(__name__)
app.config['SECRET_KEY'] = 'notsosecret'
socketio = SocketIO(app)
import findthebot.views
| 16 | 40 | 0.784091 |
c5c76090808bd12331a699fa285d9eef4ad1eb03 | 1,833 | py | Python | structural_patterns/facade_pattern.py | foo290/software-design-patterns | 4a6ee660acf64f94278054bdcce78a4d4caf3da1 | [
"MIT"
] | null | null | null | structural_patterns/facade_pattern.py | foo290/software-design-patterns | 4a6ee660acf64f94278054bdcce78a4d4caf3da1 | [
"MIT"
] | null | null | null | structural_patterns/facade_pattern.py | foo290/software-design-patterns | 4a6ee660acf64f94278054bdcce78a4d4caf3da1 | [
"MIT"
] | null | null | null | class Task1:
def __init__(self):
self.name = self.__class__.__name__
self.state = "Running"
def mark_complete(self):
print(f"Marking {self.name} complete.")
self.state = "Complete"
class Task2:
def __init__(self):
self.name = self.__class__.__name__
self.st... | 24.44 | 59 | 0.60611 |
088fb044bdeeb70fffb234ee68f2da0056ccfa99 | 64,031 | py | Python | flink-ai-flow/lib/airflow/airflow/models/baseoperator.py | shanshanpt/flink-ai-extended | c9f4a980ac229188a2bc09558952f7e0085bda70 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | flink-ai-flow/lib/airflow/airflow/models/baseoperator.py | shanshanpt/flink-ai-extended | c9f4a980ac229188a2bc09558952f7e0085bda70 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | flink-ai-flow/lib/airflow/airflow/models/baseoperator.py | shanshanpt/flink-ai-extended | c9f4a980ac229188a2bc09558952f7e0085bda70 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.994379 | 118 | 0.639643 |
caf3c1b94f14214ca730cd89c280f151dc2164ee | 1,702 | py | Python | pycon/tests/factories.py | stevepiercy/pycon | e3bb94206622264b492744d3257a1c0357d7a267 | [
"BSD-3-Clause"
] | 1 | 2016-06-12T08:14:05.000Z | 2016-06-12T08:14:05.000Z | pycon/tests/factories.py | alex/pycon | d1437a9f2ac1ec4f4fd5ad41ef3a7fe06958b52b | [
"BSD-3-Clause"
] | null | null | null | pycon/tests/factories.py | alex/pycon | d1437a9f2ac1ec4f4fd5ad41ef3a7fe06958b52b | [
"BSD-3-Clause"
] | null | null | null | import random
import factory
import factory.django
import factory.fuzzy
from django.contrib.auth import models as auth
from pycon.models import PyConProposalCategory, PyConProposal, \
PyConTalkProposal, PyConTutorialProposal
from symposion.proposals.tests.factories import ProposalKindFactory, \
ProposalBase... | 27.451613 | 78 | 0.712103 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.