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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7972dca5710e0024064c90b6f66575ee785207ad | 1,168 | py | Python | courses/machine_learning/deepdive2/production_ml/labs/samples/contrib/azure-samples/databricks-pipelines/databricks_workspaceitem_pipeline.py | memeyankm/training-data-analyst | 33bdca94cb063036f7313a2eaf6e515126d31344 | [
"Apache-2.0"
] | 6,140 | 2016-05-23T16:09:35.000Z | 2022-03-30T19:00:46.000Z | courses/machine_learning/deepdive2/production_ml/labs/samples/contrib/azure-samples/databricks-pipelines/databricks_workspaceitem_pipeline.py | memeyankm/training-data-analyst | 33bdca94cb063036f7313a2eaf6e515126d31344 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | courses/machine_learning/deepdive2/production_ml/labs/samples/contrib/azure-samples/databricks-pipelines/databricks_workspaceitem_pipeline.py | memeyankm/training-data-analyst | 33bdca94cb063036f7313a2eaf6e515126d31344 | [
"Apache-2.0"
] | 5,110 | 2016-05-27T13:45:18.000Z | 2022-03-31T18:40:42.000Z | """Import an item into a Databricks Workspace."""
import kfp.dsl as dsl
import kfp.compiler as compiler
import databricks
def import_workspace_item(item_name, user):
return databricks.ImportWorkspaceItemOp(
name="importworkspaceitem",
item_name=item_name,
content="cHJpbnQoImhlbGxvLCB3b3JsZC... | 33.371429 | 91 | 0.741438 |
7972dcaabeee1b47547ea05f910668ff6b18424d | 1,506 | py | Python | test/test_version_helper.py | eabyshev/appscale-tools | 27e336603d9ee1ab4f20a6c4f9e7a1a1ed3fa4a0 | [
"Apache-2.0"
] | null | null | null | test/test_version_helper.py | eabyshev/appscale-tools | 27e336603d9ee1ab4f20a6c4f9e7a1a1ed3fa4a0 | [
"Apache-2.0"
] | null | null | null | test/test_version_helper.py | eabyshev/appscale-tools | 27e336603d9ee1ab4f20a6c4f9e7a1a1ed3fa4a0 | [
"Apache-2.0"
] | 1 | 2021-11-23T08:31:46.000Z | 2021-11-23T08:31:46.000Z | #!/usr/bin/env python
# Programmer: Chris Bunch (chris@appscale.com)
# General-purpose Python library imports
import os
import sys
import unittest
# Third-party libraries
from flexmock import flexmock
import termcolor
# AppScale import, the library that we're testing here
lib = os.path.dirname(__file__) + os.sep ... | 28.961538 | 78 | 0.739708 |
7972dd9de901358792d692bdf66c827185d1cfb1 | 2,409 | py | Python | skimage/io/tests/test_fits.py | Teva/scikits.image | 12669d62e699313ca0f73de1b211bf438f4efb0c | [
"BSD-3-Clause"
] | 3 | 2015-11-12T06:34:49.000Z | 2017-09-22T07:47:50.000Z | skimage/io/tests/test_fits.py | Teva/scikits.image | 12669d62e699313ca0f73de1b211bf438f4efb0c | [
"BSD-3-Clause"
] | null | null | null | skimage/io/tests/test_fits.py | Teva/scikits.image | 12669d62e699313ca0f73de1b211bf438f4efb0c | [
"BSD-3-Clause"
] | 8 | 2015-03-02T20:36:55.000Z | 2021-02-18T10:37:00.000Z | import os.path
import numpy as np
from numpy.testing import run_module_suite
from numpy.testing.decorators import skipif
import skimage.io as io
from skimage import data_dir
pyfits_available = True
try:
import pyfits
except ImportError:
pyfits_available = False
else:
import skimage.io._plugins.fits_plugi... | 30.884615 | 75 | 0.691158 |
7972dea92306c3a0f124c5fcf00de83c9a2eb2de | 1,915 | py | Python | scripts_patternRecognition/data_loader.py | davidcoelho89/MLTool_python | d8293ac73650028d9c8d8c101bfc3cb28a2ebb9f | [
"MIT"
] | null | null | null | scripts_patternRecognition/data_loader.py | davidcoelho89/MLTool_python | d8293ac73650028d9c8d8c101bfc3cb28a2ebb9f | [
"MIT"
] | null | null | null | scripts_patternRecognition/data_loader.py | davidcoelho89/MLTool_python | d8293ac73650028d9c8d8c101bfc3cb28a2ebb9f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Data Functions Module
"""
import os # Get files' paths
import numpy as np # Work with matrices (arrays)
import pandas as pd # Load csv files
import scipy.stats as ss # interquartile attribute
def load_ecg_audio():
# Absolute Path
audi... | 27.357143 | 70 | 0.600522 |
7972debfcf8de964e8f0cdf0c629d949b9976a86 | 789 | py | Python | pytglib/api/functions/get_log_tag_verbosity_level.py | iTeam-co/pytglib | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 6 | 2019-10-30T08:57:27.000Z | 2021-02-08T14:17:43.000Z | pytglib/api/functions/get_log_tag_verbosity_level.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 1 | 2021-08-19T05:44:10.000Z | 2021-08-19T07:14:56.000Z | pytglib/api/functions/get_log_tag_verbosity_level.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 5 | 2019-12-04T05:30:39.000Z | 2021-05-21T18:23:32.000Z |
from ..utils import Object
class GetLogTagVerbosityLevel(Object):
"""
Returns current verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously
Attributes:
ID (:obj:`str`): ``GetLogTagVerbosityLevel``
... | 23.909091 | 167 | 0.636248 |
7972e04e14819268e1657e832dcf7c5456c3cf0c | 6,606 | py | Python | onadata/apps/api/viewsets/metadata_viewset.py | rsakib15/kobocat | c5e2af1d5b68dc40807eb011cd5cde0be9fe5792 | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/api/viewsets/metadata_viewset.py | rsakib15/kobocat | c5e2af1d5b68dc40807eb011cd5cde0be9fe5792 | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/api/viewsets/metadata_viewset.py | rsakib15/kobocat | c5e2af1d5b68dc40807eb011cd5cde0be9fe5792 | [
"BSD-2-Clause"
] | null | null | null | from rest_framework import renderers
from rest_framework import viewsets
from rest_framework.response import Response
from onadata.apps.api.permissions import MetaDataObjectPermissions
from onadata.apps.api.tools import get_media_file_response
from onadata.apps.main.models.meta_data import MetaData
from onadata.libs.s... | 31.457143 | 82 | 0.595519 |
7972e1ebfc6b6a5a03a83b3e1a5b40ae32728d2c | 1,550 | py | Python | app/forms.py | qdzzyb2014/flask-weibo | 33ede200998a4512ae50d13fa4fc12a558b96d55 | [
"BSD-3-Clause"
] | null | null | null | app/forms.py | qdzzyb2014/flask-weibo | 33ede200998a4512ae50d13fa4fc12a558b96d55 | [
"BSD-3-Clause"
] | null | null | null | app/forms.py | qdzzyb2014/flask-weibo | 33ede200998a4512ae50d13fa4fc12a558b96d55 | [
"BSD-3-Clause"
] | null | null | null | from flask.ext.wtf import Form
from wtforms import TextField, BooleanField, TextAreaField, PasswordField
from wtforms.validators import Required, Length, Email
class LoginForm(Form):
user_name = TextField('user_name', validators = [Required()])
password = PasswordField('password', validators = [Required()])
... | 38.75 | 102 | 0.667742 |
7972e2c59e32720e4ddb1f7158a2379dbefbea44 | 519 | py | Python | scripts/fix_ptr_ops/fix_ptr_operands.py | CrackerCat/idawilli | 4cf895cf88144e9394a0aa21200cf35e84ca1cba | [
"Apache-2.0"
] | null | null | null | scripts/fix_ptr_ops/fix_ptr_operands.py | CrackerCat/idawilli | 4cf895cf88144e9394a0aa21200cf35e84ca1cba | [
"Apache-2.0"
] | null | null | null | scripts/fix_ptr_ops/fix_ptr_operands.py | CrackerCat/idawilli | 4cf895cf88144e9394a0aa21200cf35e84ca1cba | [
"Apache-2.0"
] | null | null | null | import idc
import idautils
import ida_offset
reftype = ida_offset.get_default_reftype(next(idautils.Segments()))
for segea in idautils.Segments():
for head in idautils.Heads(idc.get_segm_start(segea), idc.get_segm_end(segea)):
if not ida_bytes.is_code(ida_bytes.get_full_flags(head)):
continue
... | 28.833333 | 83 | 0.680154 |
7972e33b7cfd8941bf72a67d42cfce7298c6b9e4 | 2,807 | py | Python | sner/classes/token.py | wwunlp/sner | cf98f7b8a0c8104d0830d9acab85f07047738cff | [
"MIT"
] | 3 | 2017-03-04T17:22:04.000Z | 2020-03-04T19:07:04.000Z | sner/classes/token.py | wwunlp/sner | cf98f7b8a0c8104d0830d9acab85f07047738cff | [
"MIT"
] | 1 | 2020-03-26T20:51:00.000Z | 2020-03-26T20:51:00.000Z | sner/classes/token.py | wwunlp/sner | cf98f7b8a0c8104d0830d9acab85f07047738cff | [
"MIT"
] | 1 | 2017-03-13T17:53:21.000Z | 2017-03-13T17:53:21.000Z | """Token"""
from enum import Enum
class Token:
"""
This represents a given 'token' in the corpus.
It represents a combination of left context, right context, and the word itself.
Any identical tokens will be combined into pre-existing ones.
Attributes:
left_context (str): contents of token ... | 31.897727 | 86 | 0.635198 |
7972e353d450554b0dd38a90e02f0822385d1187 | 7,422 | py | Python | benchmike/bigoestimator.py | mikegpl/benchmike | 7663462f8abcaf2c4f3ef73c96c8a2cf23ffc122 | [
"MIT"
] | null | null | null | benchmike/bigoestimator.py | mikegpl/benchmike | 7663462f8abcaf2c4f3ef73c96c8a2cf23ffc122 | [
"MIT"
] | null | null | null | benchmike/bigoestimator.py | mikegpl/benchmike | 7663462f8abcaf2c4f3ef73c96c8a2cf23ffc122 | [
"MIT"
] | null | null | null | """Module for estimating code time complexity based on TOE measurements and
presenting them in RiGCzd form"""
import matplotlib.pyplot as plt
import numpy as np
from inspect import getsourcelines
from benchmike import complexities as cp
from benchmike.customlogger import CustomLogger, LOGGER_NAME
class ComplexityEst... | 37.867347 | 79 | 0.569658 |
7972e3747c70693e4f303db6203a79a6373e066d | 1,537 | py | Python | custom_components/blueprint/entity.py | KTibow/homeassistant-component-ci | b30fa83d1159d6a4782d4ef1aa7e6d1acdec0492 | [
"MIT"
] | 5 | 2020-09-26T00:13:22.000Z | 2022-01-28T10:25:21.000Z | custom_components/blueprint/entity.py | KTibow/homeassistant-component-ci | b30fa83d1159d6a4782d4ef1aa7e6d1acdec0492 | [
"MIT"
] | 4 | 2020-12-09T15:47:10.000Z | 2021-12-26T22:17:21.000Z | custom_components/blueprint/entity.py | KTibow/homeassistant-component-ci | b30fa83d1159d6a4782d4ef1aa7e6d1acdec0492 | [
"MIT"
] | 1 | 2020-11-05T07:10:33.000Z | 2020-11-05T07:10:33.000Z | """BlueprintEntity class"""
from homeassistant.helpers import entity
from custom_components.blueprint.const import DOMAIN, NAME, VERSION
class BlueprintEntity(entity.Entity):
def __init__(self, coordinator, config_entry):
self.coordinator = coordinator
self.config_entry = config_entry
@prope... | 29 | 76 | 0.634353 |
7972e38cee188f731aefb559ce6c8ba1dabf9eff | 3,433 | py | Python | community/controller.py | CrispyFlowe/python-minecraft-clone | ef6ce2e1381b4c97f03c2106c399ed0a0729a968 | [
"MIT"
] | 1 | 2022-02-23T06:26:41.000Z | 2022-02-23T06:26:41.000Z | community/controller.py | CrispyFlowe/python-minecraft-clone | ef6ce2e1381b4c97f03c2106c399ed0a0729a968 | [
"MIT"
] | null | null | null | community/controller.py | CrispyFlowe/python-minecraft-clone | ef6ce2e1381b4c97f03c2106c399ed0a0729a968 | [
"MIT"
] | null | null | null | import random
import player
import chunk
import hit
from enum import IntEnum
class Controller:
class InteractMode(IntEnum):
PLACE = 0
BREAK = 1
PICK = 2
class MiscMode(IntEnum):
RANDOM = 0
SAVE = 1
ESCAPE = 2
SPEED_TIME = 3
FULLSCREEN = 4
FLY = 5
TELEPORT = 6
TOGGLE_F3 = 7
TOGGLE_AO = 8
c... | 27.685484 | 129 | 0.680454 |
7972e3b287de99e6a649bd613960d2206f728c8f | 2,959 | py | Python | server.py | xiaolixu/python121 | e10fac0275bc4a9a57aebb6e02188d80d0516025 | [
"Apache-2.0"
] | null | null | null | server.py | xiaolixu/python121 | e10fac0275bc4a9a57aebb6e02188d80d0516025 | [
"Apache-2.0"
] | null | null | null | server.py | xiaolixu/python121 | e10fac0275bc4a9a57aebb6e02188d80d0516025 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# In[4]:
import sys
import os
import json
from flask import Flask
from flask import jsonify
sys.path.append(os.path.join(os.getcwd(),'..'))
import watson_developer_cloud
import watson_developer_cloud.natural_language_understanding.features.v1 as \
features
app = Flask("NLU App")
nlu = watson_d... | 30.822917 | 104 | 0.627577 |
7972e3d24653ade3231fe99d209a05e91969bf81 | 398 | py | Python | examples/doxygen/docstring.py | 2bndy5/breathe | d3022c1017ff44575b6cec7f017b68719d3e4480 | [
"BSD-3-Clause"
] | null | null | null | examples/doxygen/docstring.py | 2bndy5/breathe | d3022c1017ff44575b6cec7f017b68719d3e4480 | [
"BSD-3-Clause"
] | 1 | 2020-12-14T11:49:22.000Z | 2020-12-14T14:14:12.000Z | examples/doxygen/docstring.py | 2bndy5/breathe | d3022c1017ff44575b6cec7f017b68719d3e4480 | [
"BSD-3-Clause"
] | null | null | null | """@package docstring
Documentation for this module.
More details.
"""
def func():
"""Documentation for a function.
More details.
"""
pass
class PyClass:
"""Documentation for a class.
More details.
"""
def __init__(self):
"""The constructor."""
self._memVar = 0
... | 13.724138 | 41 | 0.572864 |
7972e4e9750d97cf265abc5d12f058632a9be2a6 | 200 | py | Python | modules/drivers/lcd/lcd.py | memristor/mep2 | bc5cddacba3d740f791f3454b8cb51bda83ce202 | [
"MIT"
] | 5 | 2018-11-27T15:15:00.000Z | 2022-02-10T21:44:13.000Z | modules/drivers/lcd/lcd.py | memristor/mep2 | bc5cddacba3d740f791f3454b8cb51bda83ce202 | [
"MIT"
] | 2 | 2018-10-20T15:48:40.000Z | 2018-11-20T05:11:33.000Z | modules/drivers/lcd/lcd.py | memristor/mep2 | bc5cddacba3d740f791f3454b8cb51bda83ce202 | [
"MIT"
] | 1 | 2020-02-07T12:44:47.000Z | 2020-02-07T12:44:47.000Z | class LCD:
def __init__(self, name='Motion'):
self.name = name
self.debug = 0
self.point = [1,2]
self.tol = 40
self.ps = None
self.future=None
self.last_cmd = None
self.direction = 1
| 18.181818 | 35 | 0.645 |
7972e58efb8bb58699d731182909476b52e5fb9a | 28,305 | py | Python | bentoml/yatai/deployment/sagemaker/operator.py | HenryDashwood/BentoML | 49709c72dd8f3f45659e860ff751b1d191fa1fb4 | [
"Apache-2.0"
] | null | null | null | bentoml/yatai/deployment/sagemaker/operator.py | HenryDashwood/BentoML | 49709c72dd8f3f45659e860ff751b1d191fa1fb4 | [
"Apache-2.0"
] | null | null | null | bentoml/yatai/deployment/sagemaker/operator.py | HenryDashwood/BentoML | 49709c72dd8f3f45659e860ff751b1d191fa1fb4 | [
"Apache-2.0"
] | null | null | null | import base64
import json
import logging
import os
import shutil
from urllib.parse import urlparse
import boto3
import docker
from botocore.exceptions import ClientError
from bentoml.exceptions import (
YataiDeploymentException,
AWSServiceError,
InvalidArgument,
BentoMLException,
)
from bentoml.saved_... | 38.510204 | 88 | 0.651298 |
7972e6563063f3b93f957d2aa0916fd71cc2369b | 9,701 | py | Python | source/appModules/soffice.py | krzysz00/nvda | d34444242a529098499131165a3e60d5a05ac96f | [
"bzip2-1.0.6"
] | 1 | 2016-07-10T00:23:14.000Z | 2016-07-10T00:23:14.000Z | source/appModules/soffice.py | krzysz00/nvda | d34444242a529098499131165a3e60d5a05ac96f | [
"bzip2-1.0.6"
] | 1 | 2022-02-17T20:51:08.000Z | 2022-02-17T20:51:08.000Z | source/appModules/soffice.py | TheQuinbox/nvda | 9c7b763a2428b43802758a3859de8708cefcd4a0 | [
"bzip2-1.0.6"
] | 1 | 2017-08-04T09:00:01.000Z | 2017-08-04T09:00:01.000Z | # A part of NonVisual Desktop Access (NVDA)
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
# Copyright (C) 2006-2021 NV Access Limited, Bill Dengler, Leonard de Ruijter
from comtypes import COMError
from IAccessibleHandler import IA2, splitIA2Attribs
import ap... | 34.523132 | 145 | 0.727348 |
7972e6c85a64585fbebca86228ae1237893e9567 | 2,333 | py | Python | accounts/decorators.py | ekivemark/BlueButtonDev | c751a5c52a83df6b97ef2c653a4492d959610c42 | [
"Apache-2.0"
] | 5 | 2016-03-02T23:25:39.000Z | 2020-10-29T07:28:42.000Z | accounts/decorators.py | HowardEdidin/BlueButtonFHIR_API | b8433055507bcc334f70bc864eacd379a04f69db | [
"Apache-2.0"
] | 13 | 2020-02-11T22:50:32.000Z | 2022-03-11T23:12:48.000Z | accounts/decorators.py | HowardEdidin/BlueButtonFHIR_API | b8433055507bcc334f70bc864eacd379a04f69db | [
"Apache-2.0"
] | 4 | 2016-02-02T19:17:24.000Z | 2020-10-10T16:10:31.000Z | """
bbofuser
FILE: decorators
Created: 8/6/15 1:23 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
from functools import wraps
from django.contrib.auth.decorators import (user_passes_test,
PermissionDenied)
from django.contrib import messages
from django.contrib.auth im... | 35.892308 | 85 | 0.621517 |
7972e6ef793a40daf0d09958d079d8a34dd9e093 | 3,025 | py | Python | examples/decorator.py | maxzheng/python-examples | a636de6dd06b692b2f2c8435f9220429827ed522 | [
"MIT"
] | null | null | null | examples/decorator.py | maxzheng/python-examples | a636de6dd06b692b2f2c8435f9220429827ed522 | [
"MIT"
] | null | null | null | examples/decorator.py | maxzheng/python-examples | a636de6dd06b692b2f2c8435f9220429827ed522 | [
"MIT"
] | null | null | null | """
Use decorators to make functions more fun
=============================================================================
A decorator is a wrapper for functions to add additional functionality.
Example Run
-----------------------------------------------------------------------------
$ python3 examples/decorator.py
... | 27.252252 | 77 | 0.609256 |
7972e80eef27844ba71120aeaf33ddf67e1c2500 | 901 | py | Python | fapi/view_models/product.py | oulabla/fapi | aedec86819d63fbeea392b52958ba6378f2c296c | [
"Apache-2.0"
] | null | null | null | fapi/view_models/product.py | oulabla/fapi | aedec86819d63fbeea392b52958ba6378f2c296c | [
"Apache-2.0"
] | null | null | null | fapi/view_models/product.py | oulabla/fapi | aedec86819d63fbeea392b52958ba6378f2c296c | [
"Apache-2.0"
] | null | null | null | from pydantic import BaseModel, annotated_types
from enum import Enum
from typing import Optional, Union
import datetime
import time
from pydantic.fields import Field
class ProductType(str, Enum):
standard = "standard"
custom = "custom"
model = "model"
class ProductModel(BaseModel):
id: int
type:... | 25.742857 | 103 | 0.751387 |
7972e8cbf2e7e46dcbd83d82a9989e7cfd613f03 | 2,000 | py | Python | v2ray/com/core/transport/internet/headers/tls/config_pb2.py | xieruan/v2bp | 350b2f80d3a06494ed4092945804c1c851fdf1db | [
"MIT"
] | 7 | 2020-06-24T07:15:15.000Z | 2022-03-08T16:36:09.000Z | v2ray/com/core/transport/internet/headers/tls/config_pb2.py | xieruan/vp | 350b2f80d3a06494ed4092945804c1c851fdf1db | [
"MIT"
] | null | null | null | v2ray/com/core/transport/internet/headers/tls/config_pb2.py | xieruan/vp | 350b2f80d3a06494ed4092945804c1c851fdf1db | [
"MIT"
] | 6 | 2020-07-06T06:51:20.000Z | 2021-03-23T06:26:36.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: v2ray.com/core/transport/internet/headers/tls/config.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google... | 31.746032 | 274 | 0.786 |
7972e8df9af2b3c353f3fedbe8d870674d876808 | 13,519 | py | Python | tests/tasks/test_node_classification.py | THINK2TRY/cogdl | e5d163ec964144ded595565e829a16011295d10e | [
"MIT"
] | 6 | 2020-07-09T02:48:41.000Z | 2021-06-16T09:04:14.000Z | tests/tasks/test_node_classification.py | THINK2TRY/cogdl | e5d163ec964144ded595565e829a16011295d10e | [
"MIT"
] | null | null | null | tests/tasks/test_node_classification.py | THINK2TRY/cogdl | e5d163ec964144ded595565e829a16011295d10e | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from cogdl.options import get_default_args
from cogdl.experiments import train
cuda_available = torch.cuda.is_available()
default_dict = {
"hidden_size": 16,
"dropout": 0.5,
"patience": 2,
"epochs": 3,
"sampler": "none",
"num_layers": 2,
"cpu":... | 24.896869 | 102 | 0.624528 |
7972eaa9196e59217ba7ee91596972d221de7c28 | 339 | py | Python | TypesandVariableswithTextProcessing/ValidUsernames.py | mironmiron3/SoftuniPythonFundamentals | 4f2d968250ae5c58c2b60242da013fe319781c6b | [
"MIT"
] | null | null | null | TypesandVariableswithTextProcessing/ValidUsernames.py | mironmiron3/SoftuniPythonFundamentals | 4f2d968250ae5c58c2b60242da013fe319781c6b | [
"MIT"
] | null | null | null | TypesandVariableswithTextProcessing/ValidUsernames.py | mironmiron3/SoftuniPythonFundamentals | 4f2d968250ae5c58c2b60242da013fe319781c6b | [
"MIT"
] | null | null | null | for word in input().split(", "):
is_valid = True
if 3 <= len(word) <= 16:
for symbol in word:
if symbol.isalnum() or symbol == "-" or symbol == "_":
continue
else:
is_valid = False
else:
is_valid = False
if is_valid:
... | 24.214286 | 67 | 0.445428 |
7972eb11da86b8065dc5916aca5fedd75e9396ad | 14,277 | py | Python | test/functional/p2p_unrequested_blocks.py | ComputerCraftr/pivx-gui | 79c13d9dcaf48dfb11400f0bc5733aaa7c83cee9 | [
"MIT"
] | null | null | null | test/functional/p2p_unrequested_blocks.py | ComputerCraftr/pivx-gui | 79c13d9dcaf48dfb11400f0bc5733aaa7c83cee9 | [
"MIT"
] | null | null | null | test/functional/p2p_unrequested_blocks.py | ComputerCraftr/pivx-gui | 79c13d9dcaf48dfb11400f0bc5733aaa7c83cee9 | [
"MIT"
] | 1 | 2021-01-23T04:15:52.000Z | 2021-01-23T04:15:52.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-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 processing of unrequested blocks.
Setup: two nodes, node0+node1, not connected to each other. Nod... | 44.064815 | 113 | 0.676052 |
7972ebf38df159b9461cc0e6e59d80256c65851e | 5,890 | py | Python | ChoreographyHive/choreography/dacoolutils.py | DaCoolOne/HiveWriter | 23002986911cd3c977014e2b459853304421ac19 | [
"MIT"
] | 1 | 2020-05-18T14:16:58.000Z | 2020-05-18T14:16:58.000Z | ChoreographyHive/choreography/dacoolutils.py | DaCoolOne/HiveWriter | 23002986911cd3c977014e2b459853304421ac19 | [
"MIT"
] | null | null | null | ChoreographyHive/choreography/dacoolutils.py | DaCoolOne/HiveWriter | 23002986911cd3c977014e2b459853304421ac19 | [
"MIT"
] | null | null | null |
# Okay, so I have no idea how any of the functions that came with the choreo bot work, so I'm just gonna quietly put my own utils here...
import math
epsilon = 0.000001
def sign(n):
return -1 if n < 0 else 1
def clamp(n, a, b):
return min(max(n, a), b)
def clamp_1(n):
return min(max(n, -1), 1)
def clamp_abs... | 26.177778 | 137 | 0.587267 |
7972ebf55a975cd9839b8ae7beeb5427a3093d34 | 14,167 | py | Python | neutron/tests/unit/notifiers/test_notifiers_nova.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 3 | 2015-02-02T02:51:39.000Z | 2015-02-23T10:20:23.000Z | neutron/tests/unit/notifiers/test_notifiers_nova.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 4 | 2015-02-23T10:21:11.000Z | 2015-03-04T09:28:20.000Z | neutron/tests/unit/notifiers/test_notifiers_nova.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 2 | 2016-11-29T11:22:58.000Z | 2016-11-29T11:54:41.000Z | # Copyright 2014 OpenStack Foundation
# 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 requ... | 46.297386 | 78 | 0.590104 |
7972eccb23b55b8979679f06986f038bf07cc001 | 256 | py | Python | setup.py | franksalas/crime-rate-near-whole-foods | 1a4c290745d702501d2a7484ce5006de2f3fd027 | [
"MIT"
] | null | null | null | setup.py | franksalas/crime-rate-near-whole-foods | 1a4c290745d702501d2a7484ce5006de2f3fd027 | [
"MIT"
] | null | null | null | setup.py | franksalas/crime-rate-near-whole-foods | 1a4c290745d702501d2a7484ce5006de2f3fd027 | [
"MIT"
] | 1 | 2019-07-27T15:04:43.000Z | 2019-07-27T15:04:43.000Z | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='is it safer to live near Whole Foods then other supermarket chain?',
author='Francisco Salas',
license='MIT',
)
| 23.272727 | 85 | 0.6875 |
7972ed88e806be63a2eff1fd1f18f77521029c83 | 3,498 | py | Python | sdks/python/http_client/v1/polyaxon_sdk/models/v1_event_curve_kind.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_event_curve_kind.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_event_curve_kind.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 29.394958 | 85 | 0.597484 |
7972ee5ca531f72f1ea3a774d5c52ca4a8dc032f | 929 | py | Python | nbviewer/providers/url/tests/test_url.py | m-ueno/nbviewer | aa567da928dd022ce6a75b6c131a5ef3ff5c211a | [
"BSD-3-Clause-Clear"
] | 1 | 2020-04-01T07:17:27.000Z | 2020-04-01T07:17:27.000Z | nbviewer/providers/url/tests/test_url.py | m-ueno/nbviewer | aa567da928dd022ce6a75b6c131a5ef3ff5c211a | [
"BSD-3-Clause-Clear"
] | null | null | null | nbviewer/providers/url/tests/test_url.py | m-ueno/nbviewer | aa567da928dd022ce6a75b6c131a5ef3ff5c211a | [
"BSD-3-Clause-Clear"
] | 1 | 2021-09-10T17:18:44.000Z | 2021-09-10T17:18:44.000Z | #-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------... | 37.16 | 78 | 0.603875 |
7972eea794b31a2072fca1da14a0d675b89d4eb9 | 8,611 | py | Python | myGym/stable_baselines_mygym/common/runners.py | gabinsane/myGym | a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a | [
"MIT"
] | 1 | 2021-04-23T20:52:39.000Z | 2021-04-23T20:52:39.000Z | myGym/stable_baselines_mygym/common/runners.py | gabinsane/myGym | a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a | [
"MIT"
] | null | null | null | myGym/stable_baselines_mygym/common/runners.py | gabinsane/myGym | a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a | [
"MIT"
] | 1 | 2021-01-22T16:46:48.000Z | 2021-01-22T16:46:48.000Z | from abc import ABC, abstractmethod
import typing
from typing import Union, Optional, Any
from gym import spaces
import gym
import numpy as np
from myGym.stable_baselines_mygym.common.callbacks import BaseCallback
from myGym.stable_baselines_mygym.common.vec_env import VecEnv
if typing.TYPE_CHECKING:
from myGym.s... | 40.810427 | 111 | 0.604692 |
7972ef380a851d323cb5582fd5e6dca09ab8a2e4 | 3,498 | py | Python | pandas_ta/__init__.py | mchant/pandas-ta | 0c4c95ebd1c57d36f86b92d2e4bf311c95eeb39a | [
"MIT"
] | 1 | 2021-11-07T19:09:01.000Z | 2021-11-07T19:09:01.000Z | pandas_ta/__init__.py | PooyaAlamirpour/pandas-ta | 360a26d71c83fe87e4042e4f86298b1dc3023704 | [
"MIT"
] | null | null | null | pandas_ta/__init__.py | PooyaAlamirpour/pandas-ta | 360a26d71c83fe87e4042e4f86298b1dc3023704 | [
"MIT"
] | null | null | null | name = "pandas_ta"
"""
.. moduleauthor:: Kevin Johnson
"""
from importlib.util import find_spec
from pkg_resources import get_distribution, DistributionNotFound
import os.path
_dist = get_distribution("pandas_ta")
try:
# Normalize case for Windows systems
dist_loc = os.path.normcase(_dist.location)
here =... | 30.417391 | 86 | 0.566609 |
7972ef8d844083551478d30210393368dc6ae2f7 | 565 | py | Python | tests/migrations/migrations_test_apps/lookuperror_b/migrations/0002_b2.py | doismellburning/django | 039465a6a7a18f48ea77ceadb6949990c0ec92e1 | [
"BSD-3-Clause"
] | null | null | null | tests/migrations/migrations_test_apps/lookuperror_b/migrations/0002_b2.py | doismellburning/django | 039465a6a7a18f48ea77ceadb6949990c0ec92e1 | [
"BSD-3-Clause"
] | null | null | null | tests/migrations/migrations_test_apps/lookuperror_b/migrations/0002_b2.py | doismellburning/django | 039465a6a7a18f48ea77ceadb6949990c0ec92e1 | [
"BSD-3-Clause"
] | 1 | 2020-05-25T08:55:19.000Z | 2020-05-25T08:55:19.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0002_a2'),
('lookuperror_b', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 24.565217 | 114 | 0.573451 |
7972f04690bcd82bb09507da0ab55a00854c323f | 104 | py | Python | dic_setdefault.py | rafaelblira/python-progressivo | fdd6ccf10d351d04158e03ff74dd99b431d94303 | [
"MIT"
] | null | null | null | dic_setdefault.py | rafaelblira/python-progressivo | fdd6ccf10d351d04158e03ff74dd99b431d94303 | [
"MIT"
] | null | null | null | dic_setdefault.py | rafaelblira/python-progressivo | fdd6ccf10d351d04158e03ff74dd99b431d94303 | [
"MIT"
] | null | null | null | notas={'João' : 9,
'Maria' : 10,
'José': 4}
notas.setdefault('Peart', 8)
print(notas) | 17.333333 | 28 | 0.509615 |
7972f0dccb8765b7789eef4daee21e302759ccc5 | 2,239 | py | Python | tests/test_models_vision_transformers.py | zijian-hu/pytorchvideo | 51589b100437af2285c56ce2ccc7ccecb7f9b18b | [
"Apache-2.0"
] | null | null | null | tests/test_models_vision_transformers.py | zijian-hu/pytorchvideo | 51589b100437af2285c56ce2ccc7ccecb7f9b18b | [
"Apache-2.0"
] | null | null | null | tests/test_models_vision_transformers.py | zijian-hu/pytorchvideo | 51589b100437af2285c56ce2ccc7ccecb7f9b18b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
import torch
from pytorchvideo.models.vision_transformers import (
create_multiscale_vision_transformers,
)
class TestVisionTransformers(unittest.TestCase):
def setUp(self):
super().setUp()
torch.set_rng_... | 32.926471 | 71 | 0.625279 |
7972f393168101ebf96a3e5ae2adbdb0487e7bba | 15,598 | py | Python | tools/test_gru.py | Existever/Pysot | 41f009904c81422ae71e83aab5655631d5c4b0d8 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-08-14T14:57:57.000Z | 2020-08-14T14:57:57.000Z | tools/test_gru.py | Existever/Pysot | 41f009904c81422ae71e83aab5655631d5c4b0d8 | [
"Apache-2.0",
"MIT"
] | null | null | null | tools/test_gru.py | Existever/Pysot | 41f009904c81422ae71e83aab5655631d5c4b0d8 | [
"Apache-2.0",
"MIT"
] | 1 | 2019-11-26T11:48:40.000Z | 2019-11-26T11:48:40.000Z | # Copyright (c) SenseTime. All Rights Reserved.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import os
import cv2
import torch
import numpy as np
from pysot.core.config import cfg
from pysot.model... | 38.704715 | 131 | 0.537954 |
7972f4721e871b1b7dfb7b18e0813fd0c44c871f | 1,247 | py | Python | search/tests/services/suggest/test_suggest_session_alias.py | invinst/CPDB | c2d8ae8888b13d956cc1068742f18d45736d4121 | [
"Apache-2.0"
] | 16 | 2016-05-20T09:03:32.000Z | 2020-09-13T14:23:06.000Z | search/tests/services/suggest/test_suggest_session_alias.py | invinst/CPDB | c2d8ae8888b13d956cc1068742f18d45736d4121 | [
"Apache-2.0"
] | 2 | 2016-05-24T01:44:14.000Z | 2016-06-17T22:19:45.000Z | search/tests/services/suggest/test_suggest_session_alias.py | invinst/CPDB | c2d8ae8888b13d956cc1068742f18d45736d4121 | [
"Apache-2.0"
] | 2 | 2016-10-10T16:14:19.000Z | 2020-10-26T00:17:02.000Z | from search.factories import SessionAliasFactory
from search.services.suggest.suggest_session_alias import SuggestSessionAlias
from search.tests.services.suggest.base_test_suggest import BaseSuggestTestCase
class SessionAliasSuggestTestCase(BaseSuggestTestCase):
def test_suggest_session_alias_without_realtime_sig... | 47.961538 | 112 | 0.755413 |
7972f5c15cc61bb73824f8dd5396bd4fabe6430c | 4,395 | py | Python | DenseNet201.py | kylepeterson777/CancerDetection | 2cc60de1b98cc8e84182549cdd3e5696c1c5fa04 | [
"MIT"
] | 1 | 2019-06-20T16:59:49.000Z | 2019-06-20T16:59:49.000Z | DenseNet201.py | kylepeterson777/CancerDetection | 2cc60de1b98cc8e84182549cdd3e5696c1c5fa04 | [
"MIT"
] | null | null | null | DenseNet201.py | kylepeterson777/CancerDetection | 2cc60de1b98cc8e84182549cdd3e5696c1c5fa04 | [
"MIT"
] | 1 | 2019-06-20T16:59:53.000Z | 2019-06-20T16:59:53.000Z | # Histopathology Cancer Detection
# DenseNet201 CNN classification
import numpy as np
import pandas as pd
import os
from glob import glob
from random import shuffle
import cv2
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from keras.preprocessing.image import ImageDataGenerator... | 38.552632 | 184 | 0.699431 |
7972f60bd278f152ac2c2070ca324e19a506e3c5 | 37,726 | py | Python | env/lib/python3.6/site-packages/scipy/optimize/_lsq/least_squares.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 69 | 2019-02-18T12:07:35.000Z | 2022-03-12T10:38:32.000Z | venv/lib/python3.7/site-packages/scipy/optimize/_lsq/least_squares.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 12 | 2018-12-06T22:06:49.000Z | 2022-02-25T17:40:44.000Z | venv/lib/python3.7/site-packages/scipy/optimize/_lsq/least_squares.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 28 | 2019-03-22T01:07:13.000Z | 2022-02-21T16:38:27.000Z | """Generic interface for least-square minimization."""
from __future__ import division, print_function, absolute_import
from warnings import warn
import numpy as np
from numpy.linalg import norm
from scipy.sparse import issparse, csr_matrix
from scipy.sparse.linalg import LinearOperator
from scipy.optimize import _m... | 40.478541 | 80 | 0.618618 |
7972f63aa59af76febd71d2af9022ef7e72d01f2 | 1,052 | py | Python | fullstack/showcase/level3/ischool/data/urls.py | rain-kun/path-to-fullstack | ff54939ee571ea06721dcd6e8df390282a7565be | [
"MIT"
] | 1 | 2020-12-10T15:43:37.000Z | 2020-12-10T15:43:37.000Z | fullstack/showcase/level3/ischool/data/urls.py | rain-kun/path-to-fullstack | ff54939ee571ea06721dcd6e8df390282a7565be | [
"MIT"
] | null | null | null | fullstack/showcase/level3/ischool/data/urls.py | rain-kun/path-to-fullstack | ff54939ee571ea06721dcd6e8df390282a7565be | [
"MIT"
] | 2 | 2020-12-23T13:56:33.000Z | 2020-12-24T16:45:51.000Z | from django.urls import path
from .views import login_view, logout_view, register, index, division, student, CourseAPIView, CourseList, DivisionList\
, DivisionAPIView, StudentList, StudentAPIView
urlpatterns = [
path("login/", login_view, name="login"),
path("logout/", logout_view, name="logout"),
... | 52.6 | 120 | 0.66635 |
7972f6faaa38947dd2cf71676b1f908f173bc531 | 9,221 | py | Python | vendor-local/lib/python/celery/task/control.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 4 | 2015-05-08T16:58:53.000Z | 2019-09-06T05:30:59.000Z | vendor-local/lib/python/celery/task/control.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 2 | 2019-02-17T17:44:53.000Z | 2019-03-28T03:54:39.000Z | vendor-local/lib/python/celery/task/control.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 7 | 2015-05-21T15:38:29.000Z | 2019-10-28T23:39:06.000Z | # -*- coding: utf-8 -*-
"""
celery.task.control
~~~~~~~~~~~~~~~~~~~
Client for worker remote control commands.
Server implementation is in :mod:`celery.worker.control`.
:copyright: (c) 2009 - 2012 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_i... | 38.261411 | 78 | 0.614033 |
7972f6faf79917ca55d874e4d8b9e1dccf31d13d | 6,087 | py | Python | python/test/test_default_api.py | KoenBal/OANDA_V20_Client | e67b9dbaddff6ed23e355d3ce7f9c9972799c702 | [
"MIT"
] | 1 | 2018-10-25T03:57:32.000Z | 2018-10-25T03:57:32.000Z | python/test/test_default_api.py | KoenBal/OANDA_V20_Client | e67b9dbaddff6ed23e355d3ce7f9c9972799c702 | [
"MIT"
] | null | null | null | python/test/test_default_api.py | KoenBal/OANDA_V20_Client | e67b9dbaddff6ed23e355d3ce7f9c9972799c702 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
OANDA v20 REST API
The full OANDA v20 REST API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more. To authenticate use the string 'Bearer ' followed by the token which can be obtained at https://www.oanda.com/demo-account/tpa/perso... | 21.739286 | 298 | 0.594874 |
7972f7019707c0b4f730046d005d5aaa3914c919 | 1,513 | py | Python | rating_core_lib/data_layers/data_access/rating_data_access.py | shay-te/rating-core-lib | 05e3dcc965eee1bef330a2c91ec970278cd8db13 | [
"MIT"
] | null | null | null | rating_core_lib/data_layers/data_access/rating_data_access.py | shay-te/rating-core-lib | 05e3dcc965eee1bef330a2c91ec970278cd8db13 | [
"MIT"
] | null | null | null | rating_core_lib/data_layers/data_access/rating_data_access.py | shay-te/rating-core-lib | 05e3dcc965eee1bef330a2c91ec970278cd8db13 | [
"MIT"
] | null | null | null | from datetime import datetime
from core_lib.data_layers.data.handler.sql_alchemy_data_handler_registry import SqlAlchemyDataHandlerRegistry
from core_lib.data_layers.data_access.data_access import DataAccess
from rating_core_lib.data_layers.data.db.entities.rating import Rating
class RatingDataAccess(DataAccess):
... | 45.848485 | 175 | 0.684732 |
7972fa5928e2a32ab327d77886e13624bc1a783c | 1,921 | py | Python | susi/tests/tests_seed_susi.py | FBlandfort/Subset-Simulation-Interpolation | e0c1433d6769c8a8c41943ed824007c2511a0c2e | [
"MIT"
] | 5 | 2021-04-26T07:42:04.000Z | 2022-03-20T02:59:00.000Z | susi/tests/tests_seed_susi.py | FBlandfort/Subset-Simulation-Interpolation | e0c1433d6769c8a8c41943ed824007c2511a0c2e | [
"MIT"
] | null | null | null | susi/tests/tests_seed_susi.py | FBlandfort/Subset-Simulation-Interpolation | e0c1433d6769c8a8c41943ed824007c2511a0c2e | [
"MIT"
] | 3 | 2020-12-28T12:00:37.000Z | 2022-03-31T13:36:12.000Z |
import unittest
import numpy as np
import random
import math
import susi
class main_test_attr(unittest.TestCase):
#####################################################################
###### col1 #################################
### susi ####
def test_example1_susi(self):
random... | 30.983871 | 115 | 0.642894 |
7972facbfe91e3aae1beacd192cca05c54031b64 | 1,338 | py | Python | arffToCsv.py | mbs8/arfftocsv | f3eb5f62f82253d27d885ac7357970b39e4ba5da | [
"MIT"
] | null | null | null | arffToCsv.py | mbs8/arfftocsv | f3eb5f62f82253d27d885ac7357970b39e4ba5da | [
"MIT"
] | null | null | null | arffToCsv.py | mbs8/arfftocsv | f3eb5f62f82253d27d885ac7357970b39e4ba5da | [
"MIT"
] | null | null | null | #########################################
# Project : ARFF to CSV converter #
# Created : 10/01/17 11:08:06 #
# Author : haloboy777 #
# Licence : MIT #
#########################################
# Importing library
import os
# Getting all the arff files from th... | 31.116279 | 72 | 0.508969 |
7972fbe86e6356f9d5a8ff4066bc868867d7710d | 18,763 | py | Python | elysianfields/fields.py | readmodifywrite/elysianfields | ceb4883d6bc62b50615bdc8d99e595279398826c | [
"Apache-2.0"
] | null | null | null | elysianfields/fields.py | readmodifywrite/elysianfields | ceb4883d6bc62b50615bdc8d99e595279398826c | [
"Apache-2.0"
] | null | null | null | elysianfields/fields.py | readmodifywrite/elysianfields | ceb4883d6bc62b50615bdc8d99e595279398826c | [
"Apache-2.0"
] | null | null | null |
import socket
import struct
import uuid
import json
import binascii
import inspect
try:
from builtins import range
except ImportError:
from builtins import range
from string import printable
from collections import OrderedDict
from copy import deepcopy
class Field(object):
def __init__(self, _value=No... | 25.185235 | 114 | 0.591483 |
7972fbffa742b2375b8aea0784361ef10d22d9dc | 316 | py | Python | atividade-lista3/q1-done.py | nartojunior/ppgti0006-atividades | 47523b703b48059f88ff9722a8fc0d13e7cc7ce6 | [
"MIT"
] | null | null | null | atividade-lista3/q1-done.py | nartojunior/ppgti0006-atividades | 47523b703b48059f88ff9722a8fc0d13e7cc7ce6 | [
"MIT"
] | null | null | null | atividade-lista3/q1-done.py | nartojunior/ppgti0006-atividades | 47523b703b48059f88ff9722a8fc0d13e7cc7ce6 | [
"MIT"
] | null | null | null | print("Q1")
nomes = list()
nomes.append("narto")
nomes.append("aurelio")
nomes.append("thomas")
nomes.append("diego")
nomes.append("bjorn")
print(nomes)
nomeD = input("Digite um nome\n")
if nomeD in nomes:
print(nomeD + " está na lista")
else:
print(nomeD + " não está na lista")
pass
#input = str.le | 16.631579 | 39 | 0.661392 |
7972fc65a49ca41aa97a9c207cc5f66afa1ffa5d | 672 | py | Python | examples/dnd.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 666 | 2016-11-14T18:17:40.000Z | 2022-03-29T03:53:22.000Z | examples/dnd.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 598 | 2016-10-20T21:04:09.000Z | 2022-03-15T22:44:49.000Z | examples/dnd.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 95 | 2017-01-19T12:23:58.000Z | 2022-03-06T18:16:21.000Z | import sys
sys.path.append("../")
from appJar import gui
def here(data):
print(data)
return("here")
app=gui()
app.addLabel("l1", "DnD")
app.addEntry("dnd")
app.setEntryDropTarget("dnd", None, replace=False)
app.addListBox("l1", [])
app.setListBoxDropTarget("l1")
app.addMessage("m1", "lots of message text.... | 19.764706 | 50 | 0.712798 |
7972fca482566b4c4fb799c3c6cd46745fc262c4 | 13,537 | py | Python | src/sessions.py | san-bil/pyena | 41bd3e61aa8551f65433c7631e42f214dbf01508 | [
"MIT"
] | null | null | null | src/sessions.py | san-bil/pyena | 41bd3e61aa8551f65433c7631e42f214dbf01508 | [
"MIT"
] | null | null | null | src/sessions.py | san-bil/pyena | 41bd3e61aa8551f65433c7631e42f214dbf01508 | [
"MIT"
] | null | null | null | from sbpy_utils.core.key_val import kvg, kv_get, kv_set_recurse, kv_get_recurse, kv_set, kv_join
from sbpy_utils.core.command_line import islocalhost,get_default_ssh_key,mkdir_p2,easy_file_append,remote_file_exists
from sbpy_utils.core.my_copy import rsync,rsyncs,save_and_rsync
from sbpy_utils.core.my_random import get... | 41.652308 | 156 | 0.703923 |
7972fd507b68425dbd7a4490f5df90285c20257b | 1,617 | py | Python | examples/mdp-solvers/fr_gridworld.py | kngwyu/rlpy | 329166de28d311d8f87358a62c38f40a7318fe07 | [
"BSD-3-Clause"
] | 3 | 2019-12-07T13:34:02.000Z | 2021-03-29T10:20:05.000Z | examples/mdp-solvers/fr_gridworld.py | kngwyu/rlpy | 329166de28d311d8f87358a62c38f40a7318fe07 | [
"BSD-3-Clause"
] | 14 | 2019-09-29T03:09:09.000Z | 2022-01-13T03:17:48.000Z | examples/mdp-solvers/fr_gridworld.py | kngwyu/rlpy3 | 329166de28d311d8f87358a62c38f40a7318fe07 | [
"BSD-3-Clause"
] | null | null | null | import click
from rlpy.domains import FixedRewardGridWorld
from rlpy.mdp_solvers import (
TrajectoryBasedPolicyIteration,
TrajectoryBasedValueIteration,
PolicyIteration,
ValueIteration,
)
from rlpy.representations import Tabular
from rlpy.tools.cli import run_solver_experiment
def select_domain(map_, ... | 35.933333 | 81 | 0.677798 |
7972fd55cc8e95bc408900865db779d70510898e | 33,610 | py | Python | PaddleFSL/paddlefsl/datasets/fewnlu/data_clue/preprocess.py | Chaoqun-Guo/FSL-Mate | 06d725a5aa6e49a36fed9718d4872f86dfe14323 | [
"MIT"
] | null | null | null | PaddleFSL/paddlefsl/datasets/fewnlu/data_clue/preprocess.py | Chaoqun-Guo/FSL-Mate | 06d725a5aa6e49a36fed9718d4872f86dfe14323 | [
"MIT"
] | null | null | null | PaddleFSL/paddlefsl/datasets/fewnlu/data_clue/preprocess.py | Chaoqun-Guo/FSL-Mate | 06d725a5aa6e49a36fed9718d4872f86dfe14323 | [
"MIT"
] | null | null | null | # Copyright 2021 PaddleFSL 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 or agreed to in wri... | 37.427617 | 128 | 0.614817 |
7972fe0b04009aa4245272398dd8e8e43308f0c1 | 9,786 | py | Python | plugins/modules/oci_resource_search_resource_facts.py | A7rMtWE57x/oci-ansible-collection | 80548243a085cd53fd5dddaa8135b5cb43612c66 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_resource_search_resource_facts.py | A7rMtWE57x/oci-ansible-collection | 80548243a085cd53fd5dddaa8135b5cb43612c66 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_resource_search_resource_facts.py | A7rMtWE57x/oci-ansible-collection | 80548243a085cd53fd5dddaa8135b5cb43612c66 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017, 2020 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 36.514925 | 159 | 0.622624 |
7972fe29ba3ccd9b5037f2cff5368fe36ea5522a | 2,557 | py | Python | {{cookiecutter.project_slug}}/src/{{cookiecutter.pkg_name}}/settings.py | royw/cookiecutter-pypackage | 03c51f0eceda66838c66ebbea147bc7119432d1b | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/src/{{cookiecutter.pkg_name}}/settings.py | royw/cookiecutter-pypackage | 03c51f0eceda66838c66ebbea147bc7119432d1b | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/src/{{cookiecutter.pkg_name}}/settings.py | royw/cookiecutter-pypackage | 03c51f0eceda66838c66ebbea147bc7119432d1b | [
"BSD-3-Clause"
] | null | null | null | """Settings adds application specific information to the generic ApplicationSettings class.
Usage::
with Settings() as settings:
try:
app.execute(self, settings)
exit(0)
except ArgumentError as ex:
error(str(ex))
exit(1)
"""
import argparse
from typing import Dict, List, Op... | 41.918033 | 116 | 0.662495 |
7972fe5a1e399f4d4b6b49cf3c1f3c50a13b2c6e | 9,656 | py | Python | PyForestLiveMap/main.py | igorrogov/forest_live_map | f42a0674e27a0b73b11638f84186e96e4df9a220 | [
"MIT"
] | null | null | null | PyForestLiveMap/main.py | igorrogov/forest_live_map | f42a0674e27a0b73b11638f84186e96e4df9a220 | [
"MIT"
] | null | null | null | PyForestLiveMap/main.py | igorrogov/forest_live_map | f42a0674e27a0b73b11638f84186e96e4df9a220 | [
"MIT"
] | null | null | null | import json
import sys
from enum import Enum
from pprint import pprint
import pygame
from pygame.locals import *
from pygame.math import Vector2
from twisted.internet.task import LoopingCall
from twisted.internet import reactor, protocol
from twisted.protocols.basic import LineReceiver
pygame.init()
# square window... | 36.854962 | 119 | 0.638049 |
7972fee4e1c3a57413077db9cbc15825ff05f058 | 796 | py | Python | app/migrations/0016_auto_20200704_0741.py | leesw98/reBOOT | 41eaf3ceb9ed21263482022668fbd8e44e90a0fa | [
"MIT"
] | 10 | 2017-10-17T04:35:44.000Z | 2021-03-19T21:12:15.000Z | app/migrations/0016_auto_20200704_0741.py | leesw98/reBOOT | 41eaf3ceb9ed21263482022668fbd8e44e90a0fa | [
"MIT"
] | 224 | 2017-10-18T18:33:48.000Z | 2022-02-02T03:33:04.000Z | app/migrations/0016_auto_20200704_0741.py | leesw98/reBOOT | 41eaf3ceb9ed21263482022668fbd8e44e90a0fa | [
"MIT"
] | 1 | 2018-08-02T03:10:25.000Z | 2018-08-02T03:10:25.000Z | # Generated by Django 2.2.10 on 2020-07-04 11:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0015_auto_20200625_1732'),
]
operations = [
migrations.AlterModelOptions(
name='donation',
options={'permiss... | 29.481481 | 136 | 0.594221 |
79730129133d5f65c46b960c9b88ae004861e066 | 36,249 | py | Python | salt/states/boto_elb.py | lyft/salt | 2715908423a412f736253d0e5d3cfe185a0179a2 | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/states/boto_elb.py | lyft/salt | 2715908423a412f736253d0e5d3cfe185a0179a2 | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/states/boto_elb.py | lyft/salt | 2715908423a412f736253d0e5d3cfe185a0179a2 | [
"Apache-2.0"
] | 1 | 2017-01-27T21:33:36.000Z | 2017-01-27T21:33:36.000Z | # -*- coding: utf-8 -*-
'''
Manage ELBs
.. versionadded:: 2014.7.0
Create and destroy ELBs. Be aware that this interacts with Amazon's
services, and so may incur charges.
This module uses ``boto``, which can be installed via package, or pip.
This module accepts explicit elb credentials but can also utilize
IAM role... | 38.237342 | 95 | 0.524842 |
7973012b98d186e0b1532e66978b93d67004fa01 | 46,381 | py | Python | Lib/multiprocessing/managers.py | codeape2/cpython | 1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8 | [
"CNRI-Python-GPL-Compatible"
] | 2 | 2019-05-26T16:03:33.000Z | 2019-06-15T10:18:13.000Z | Lib/multiprocessing/managers.py | codeape2/cpython | 1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2019-03-29T09:43:04.000Z | 2019-03-29T09:43:04.000Z | Lib/multiprocessing/managers.py | codeape2/cpython | 1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2019-04-01T20:58:09.000Z | 2019-04-01T20:58:09.000Z | #
# Module providing manager classes for dealing
# with shared objects
#
# multiprocessing/managers.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token',
'SharedMemoryManager' ]
#
# Imports
#
import sys... | 34.356296 | 80 | 0.581639 |
7973016e5eba09be6b60fd3acc66cd2c9d9e1405 | 6,939 | py | Python | densenet121.py | asmand001/densenet | 8c42d8092b2616a9fbf025c756b14c67be708685 | [
"MIT"
] | 647 | 2017-05-17T10:26:10.000Z | 2022-03-09T16:58:39.000Z | densenet121.py | bygreencn/DenseNet-Keras | 8c42d8092b2616a9fbf025c756b14c67be708685 | [
"MIT"
] | 23 | 2017-05-19T00:28:34.000Z | 2021-02-20T07:27:45.000Z | densenet121.py | bygreencn/DenseNet-Keras | 8c42d8092b2616a9fbf025c756b14c67be708685 | [
"MIT"
] | 313 | 2017-05-22T12:17:36.000Z | 2021-09-17T16:41:15.000Z | from keras.models import Model
from keras.layers import Input, merge, ZeroPadding2D
from keras.layers.core import Dense, Dropout, Activation
from keras.layers.convolutional import Convolution2D
from keras.layers.pooling import AveragePooling2D, GlobalAveragePooling2D, MaxPooling2D
from keras.layers.normalization import... | 40.343023 | 146 | 0.674016 |
7973022e897d573071434be7af6664e27237c631 | 27 | py | Python | test.py | zhourunlong/densenet-ag_news-nlp | 38dcf5a18386a3155593d74e3eba6d967501b242 | [
"MIT"
] | null | null | null | test.py | zhourunlong/densenet-ag_news-nlp | 38dcf5a18386a3155593d74e3eba6d967501b242 | [
"MIT"
] | null | null | null | test.py | zhourunlong/densenet-ag_news-nlp | 38dcf5a18386a3155593d74e3eba6d967501b242 | [
"MIT"
] | null | null | null | str = 'fuck'
print(str[1]) | 13.5 | 13 | 0.592593 |
797302df43ba249bf2c79e0ba41db3fde5120553 | 2,458 | py | Python | django_presentation/forms/FormPresentation.py | adamkerz/django-presentation | 1e812faa5f682e021fa6580509d8d324cfcc119c | [
"BSD-3-Clause"
] | null | null | null | django_presentation/forms/FormPresentation.py | adamkerz/django-presentation | 1e812faa5f682e021fa6580509d8d324cfcc119c | [
"BSD-3-Clause"
] | null | null | null | django_presentation/forms/FormPresentation.py | adamkerz/django-presentation | 1e812faa5f682e021fa6580509d8d324cfcc119c | [
"BSD-3-Clause"
] | null | null | null | from django.utils.safestring import SafeText as S
from django.utils.six import with_metaclass
from . import FormPresentationItem,FormPresentationBoundItem
class FormPresentationMetaclass(type):
"""Metaclass to create items and form objects on the FormPresentation instance."""
def __new__(meta,name,bases,attr... | 40.295082 | 158 | 0.666802 |
797302ff4eb07d08a055cb612aa791e9536ad613 | 1,119 | py | Python | bitbots_head_behavior/src/bitbots_head_behavior/actions/track_ball.py | MosHumanoid/bitbots_behavior | 4667f67dcfb45fd46660544cb8b0821c4f2c0551 | [
"MIT"
] | null | null | null | bitbots_head_behavior/src/bitbots_head_behavior/actions/track_ball.py | MosHumanoid/bitbots_behavior | 4667f67dcfb45fd46660544cb8b0821c4f2c0551 | [
"MIT"
] | null | null | null | bitbots_head_behavior/src/bitbots_head_behavior/actions/track_ball.py | MosHumanoid/bitbots_behavior | 4667f67dcfb45fd46660544cb8b0821c4f2c0551 | [
"MIT"
] | 1 | 2019-07-28T12:22:48.000Z | 2019-07-28T12:22:48.000Z | import rospy
from geometry_msgs.msg import PointStamped
from bitbots_head_behavior.actions.look_at import AbstractLookAt
class TrackBall(AbstractLookAt):
"""
This action follows the seen ball so that it the camera always points towards it.
We try to do this so that the ball doesnt get lost as easily
... | 37.3 | 98 | 0.730116 |
79730340b7447ee87a78e8cef969628deb41347d | 1,706 | py | Python | fooltrader/run_spiders.py | renwenduan/fooltrader | c9ede56d6ce4f952618d14e0ec28479584ad9377 | [
"MIT"
] | null | null | null | fooltrader/run_spiders.py | renwenduan/fooltrader | c9ede56d6ce4f952618d14e0ec28479584ad9377 | [
"MIT"
] | null | null | null | fooltrader/run_spiders.py | renwenduan/fooltrader | c9ede56d6ce4f952618d14e0ec28479584ad9377 | [
"MIT"
] | null | null | null | import os
from scrapy.crawler import CrawlerRunner
from scrapy.utils.log import configure_logging
from scrapy.utils.project import get_project_settings
from twisted.internet import defer
from twisted.internet import reactor
from fooltrader import settings
from fooltrader.api.quote import get_security_list
from fooltr... | 31.592593 | 94 | 0.803634 |
7973037c528f300b805f2da31f891acaccd934f9 | 1,520 | py | Python | backend/src/reserve/flaskGetReserveData.py | frost917/customer-manager | d7d4c16f99e1548989bff85c20c307a844711eda | [
"Apache-2.0"
] | null | null | null | backend/src/reserve/flaskGetReserveData.py | frost917/customer-manager | d7d4c16f99e1548989bff85c20c307a844711eda | [
"Apache-2.0"
] | 1 | 2021-09-18T05:56:45.000Z | 2021-09-18T05:56:45.000Z | backend/src/reserve/flaskGetReserveData.py | frost917/customer-manager | d7d4c16f99e1548989bff85c20c307a844711eda | [
"Apache-2.0"
] | null | null | null | import json
from flask import Blueprint, Response, g
from postgres.databaseConnection import PostgresControll
from auth.flaskAuthVerify import tokenVerify
manager = Blueprint('getReserveData', __name__, url_prefix='/reserves')
# 예약 id로 예약의 상세정보 얻어오기
@manager.route('/<reserveID>', methods=['GET'])
@tokenVerify
def ... | 32.340426 | 111 | 0.713158 |
797303937b17cedd5358708ea652c5ea619f824c | 4,776 | py | Python | ftphoneypot/library.py | muratti66/python-honeypots | ce3d4f8dcb36c29e6fab00bd8a93ba2de0dfc108 | [
"MIT"
] | null | null | null | ftphoneypot/library.py | muratti66/python-honeypots | ce3d4f8dcb36c29e6fab00bd8a93ba2de0dfc108 | [
"MIT"
] | 1 | 2021-09-18T00:11:46.000Z | 2021-09-18T00:13:04.000Z | ftphoneypot/library.py | muratti66/python-honeypots | ce3d4f8dcb36c29e6fab00bd8a93ba2de0dfc108 | [
"MIT"
] | 1 | 2021-05-06T21:11:27.000Z | 2021-05-06T21:11:27.000Z | # Murat B. on github..
import string
import random
import logging
import datetime
from logging import handlers
from configobj import ConfigObj
LOG_FILE = "/opt/ftphoneypot/logs/ftphoneypot.log"
CONF_FILE = "/opt/ftphoneypot/config.cfg"
def id_generate(size, chars=string.ascii_uppercase + string.digits):
"""
... | 26.38674 | 79 | 0.572236 |
797303d94424c9bfd85e07cf938f22cca88680e6 | 1,003 | py | Python | samples/sample_004_stochastic.py | ChrnyaevEK/petnetsim | f7beebf4372012343a6f91be948d1d8d9b0c2b8a | [
"MIT"
] | null | null | null | samples/sample_004_stochastic.py | ChrnyaevEK/petnetsim | f7beebf4372012343a6f91be948d1d8d9b0c2b8a | [
"MIT"
] | null | null | null | samples/sample_004_stochastic.py | ChrnyaevEK/petnetsim | f7beebf4372012343a6f91be948d1d8d9b0c2b8a | [
"MIT"
] | null | null | null | # doc/drawing/sample_004_stochastic.svg
from petnetsim import *
def run():
petri_net = PetriNet([Place('Z', init_tokens=10000), 'A', 'B'],
[TransitionStochastic('T30', 0.3), TransitionStochastic('T70', 0.7)],
[('Z', 'T30'), ('Z', 'T70'), ('T30', 'A'), ('T70', 'B'... | 25.075 | 94 | 0.548355 |
797303dd021411eeb3300a075afdd0bfe2ec1930 | 14,753 | py | Python | speechbrain/nnet/complex_networks/c_CNN.py | JasonSWFu/speechbrain | cb78ba2b33fceba273b055dc471535344c3053f0 | [
"Apache-2.0"
] | 3,913 | 2021-03-14T13:54:52.000Z | 2022-03-30T05:09:55.000Z | speechbrain/nnet/complex_networks/c_CNN.py | JasonSWFu/speechbrain | cb78ba2b33fceba273b055dc471535344c3053f0 | [
"Apache-2.0"
] | 667 | 2021-03-14T20:11:17.000Z | 2022-03-31T04:07:17.000Z | speechbrain/nnet/complex_networks/c_CNN.py | JasonSWFu/speechbrain | cb78ba2b33fceba273b055dc471535344c3053f0 | [
"Apache-2.0"
] | 785 | 2021-03-14T13:20:57.000Z | 2022-03-31T03:26:03.000Z | """Library implementing complex-valued convolutional neural networks.
Authors
* Titouan Parcollet 2020
"""
import torch
import torch.nn as nn
import logging
import torch.nn.functional as F
from speechbrain.nnet.CNN import get_padding_elem
from speechbrain.nnet.complex_networks.c_ops import (
unitary_init,
com... | 30.993697 | 95 | 0.581238 |
79730532f8769ce4a0711d1cbeacee7bab8f92bc | 3,203 | py | Python | semanticizest/tests/test_util.py | 904labs/semanticizest | 251671b4232e87a6aff80a25f612fa67494dc8c7 | [
"Apache-2.0"
] | 32 | 2015-02-25T10:21:29.000Z | 2021-08-02T17:49:48.000Z | semanticizest/tests/test_util.py | 904labs/semanticizest | 251671b4232e87a6aff80a25f612fa67494dc8c7 | [
"Apache-2.0"
] | 7 | 2015-01-27T12:00:14.000Z | 2016-04-25T02:56:54.000Z | semanticizest/tests/test_util.py | semanticize/semanticizest | a08eeaf488daaef8f0021aa87487cfb43bda9508 | [
"Apache-2.0"
] | 17 | 2015-01-25T04:30:39.000Z | 2018-05-20T17:32:40.000Z | from collections import Counter
from semanticizest._util import ngrams, ngrams_with_pos, url_from_title
from nose.tools import assert_equal, assert_in, assert_true, raises
def test_ngrams():
text = "Hello , world !".split()
expected = {"Hello , world", ", world !",
"Hello ,", ", world", "wor... | 30.504762 | 76 | 0.600687 |
79730598a6d9a8455bfc5baa899af91bee672348 | 11,892 | py | Python | intersight/model/ipmioverlan_policy_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/ipmioverlan_policy_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/ipmioverlan_policy_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 54.054545 | 1,678 | 0.643878 |
79730741c4516ef2f5ab5715de163045ff40d280 | 736 | py | Python | LP2/Reta_ponto.py | luisxfelipe/Faculdade_Impacta_2semestre | ad6e0bcc22496bb96f56c5ca3d930554dd5302a4 | [
"Apache-2.0"
] | null | null | null | LP2/Reta_ponto.py | luisxfelipe/Faculdade_Impacta_2semestre | ad6e0bcc22496bb96f56c5ca3d930554dd5302a4 | [
"Apache-2.0"
] | 6 | 2020-06-05T20:57:34.000Z | 2022-03-11T23:47:43.000Z | LP2/Reta_ponto.py | luisxfelipe/Faculdade_Impacta_2semestre | ad6e0bcc22496bb96f56c5ca3d930554dd5302a4 | [
"Apache-2.0"
] | null | null | null | import math
class Ponto():
'''
Implementa a abstração de um ponto no plano Cartesiano 2D,
que possui como atributos as coordenadas x e y
'''
def __init__(self, x: float, y: float) -> None:
'''
Construtor da classe
'''
self.x = x
self.y = y
def desloca(... | 23.741935 | 63 | 0.525815 |
797307e16668f30dc3aa4ff9ae74860e6ddce463 | 2,562 | py | Python | src/tests/profile_editors/shortcuts.py | QuoSecGmbH/os_timestamps | 17bd3f5b993f1a8462b6512fecc9afb23cf18a49 | [
"MIT"
] | 10 | 2020-06-25T10:17:32.000Z | 2022-03-30T15:43:54.000Z | src/tests/profile_editors/shortcuts.py | QuoSecGmbH/os_timestamps | 17bd3f5b993f1a8462b6512fecc9afb23cf18a49 | [
"MIT"
] | null | null | null | src/tests/profile_editors/shortcuts.py | QuoSecGmbH/os_timestamps | 17bd3f5b993f1a8462b6512fecc9afb23cf18a49 | [
"MIT"
] | null | null | null | # This file holds functions for often used keyboard shortcuts
import os
import subprocess
from dataclasses import dataclass
import pyautogui
import time
import argparse
def save():
pyautogui.keyDown('ctrl')
pyautogui.keyDown('s')
pyautogui.keyUp('ctrl')
pyautogui.keyUp('s')
def dont_save():
pya... | 18.838235 | 61 | 0.664715 |
79730803d937788d8e1b449124ab6b408e13c153 | 1,550 | py | Python | pyogp/lib/base/network/net.py | grobertson/PyOGP.lib.Base | 5056cbc57e8adbae931495bd5c743a4590d39a5a | [
"Apache-2.0"
] | null | null | null | pyogp/lib/base/network/net.py | grobertson/PyOGP.lib.Base | 5056cbc57e8adbae931495bd5c743a4590d39a5a | [
"Apache-2.0"
] | null | null | null | pyogp/lib/base/network/net.py | grobertson/PyOGP.lib.Base | 5056cbc57e8adbae931495bd5c743a4590d39a5a | [
"Apache-2.0"
] | null | null | null |
"""
Contributors can be viewed at:
http://svn.secondlife.com/svn/linden/projects/2008/pyogp/lib/base/trunk/CONTRIBUTORS.txt
$LicenseInfo:firstyear=2008&license=apachev2$
Copyright 2009, Linden Research, Inc.
Licensed under the Apache License, Version 2.0.
You may obtain a copy of the License at:
http://www.apa... | 22.463768 | 89 | 0.665161 |
79730815e3d05979d1d2e305a0bae67098b7a100 | 2,365 | py | Python | modules/hmi/web/runtime_status_api.py | Orientlee/apollo | 710c3714b8be10ba3410e2c30b4b6758f6d99918 | [
"Apache-2.0"
] | 2 | 2018-02-28T13:46:49.000Z | 2021-05-18T16:20:08.000Z | modules/hmi/web/runtime_status_api.py | wzh212/apollo | 0a87c670a9adea5e61b89458c082ddfb39218952 | [
"Apache-2.0"
] | 1 | 2022-02-10T18:36:05.000Z | 2022-02-10T18:36:05.000Z | modules/hmi/web/runtime_status_api.py | wzh212/apollo | 0a87c670a9adea5e61b89458c082ddfb39218952 | [
"Apache-2.0"
] | 3 | 2018-03-18T10:49:02.000Z | 2021-12-09T13:19:29.000Z | #!/usr/bin/env python
###############################################################################
# Copyright 2017 The Apollo Authors. 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 ... | 35.833333 | 80 | 0.652008 |
797308ad8af2a44e0a96546cdb5fe82afd673e66 | 2,964 | py | Python | timemachines/skaters/nproph/nprophskaters.py | free-soellingeraj/timemachines | 8b8bab6d2ecd9bcd2693898ad1c65a00c9fe85a4 | [
"MIT"
] | null | null | null | timemachines/skaters/nproph/nprophskaters.py | free-soellingeraj/timemachines | 8b8bab6d2ecd9bcd2693898ad1c65a00c9fe85a4 | [
"MIT"
] | null | null | null | timemachines/skaters/nproph/nprophskaters.py | free-soellingeraj/timemachines | 8b8bab6d2ecd9bcd2693898ad1c65a00c9fe85a4 | [
"MIT"
] | null | null | null | from timemachines.skaters.nproph.nprophskaterfactory import nproph_skater_factory
from timemachines.skatertools.utilities.conventions import (
Y_TYPE, A_TYPE,T_TYPE,E_TYPE, wrap
)
# from timemachines.skaters.simple.movingaverage import empirical_last_value
# from timemachines.skatertools.visualization.priorplot imp... | 42.342857 | 127 | 0.627193 |
7973090ffe879ebf7e7f72ac95f87fceef10c704 | 1,988 | py | Python | nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/f90.py | augustand/Nuitka | b7b9dd50b60505a309f430ce17cad36fb7d75048 | [
"Apache-2.0"
] | 1 | 2017-02-10T00:26:44.000Z | 2017-02-10T00:26:44.000Z | scons-local/SCons/Tool/f90.py | bibleuspro/scons | 625d446ae8996ff1b3d660c44e2827fc832cf12b | [
"MIT"
] | null | null | null | scons-local/SCons/Tool/f90.py | bibleuspro/scons | 625d446ae8996ff1b3d660c44e2827fc832cf12b | [
"MIT"
] | null | null | null | """engine.SCons.Tool.f90
Tool-specific initialization for the generic Posix f90 Fortran compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permis... | 31.555556 | 73 | 0.752515 |
7973091cbd0acc805fe24479c157e8682313d503 | 1,555 | py | Python | azure/mgmt/network/v2017_03_01/models/troubleshooting_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2017_03_01/models/troubleshooting_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2017_03_01/models/troubleshooting_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # 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.
# C... | 37.926829 | 81 | 0.599357 |
79730961aafb8fafbf44331e7fe6652ffbcf0182 | 3,260 | py | Python | discord_bot/d_commands/help.py | Mr-Jaxee/Console | 7c042ad51310aaeef76a497a6e96a4ef2a108e6a | [
"MIT"
] | null | null | null | discord_bot/d_commands/help.py | Mr-Jaxee/Console | 7c042ad51310aaeef76a497a6e96a4ef2a108e6a | [
"MIT"
] | null | null | null | discord_bot/d_commands/help.py | Mr-Jaxee/Console | 7c042ad51310aaeef76a497a6e96a4ef2a108e6a | [
"MIT"
] | null | null | null | import random
async def help_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, embed_color, guild_result, args, help_lc):
try:
subargs = args[1]
except:
subargs = None
if subargs == None or subargs == "help":
if localization[0] == "Rus... | 51.746032 | 175 | 0.583129 |
797309c2f4cea4c97b8a361478b28e1ff2436d10 | 235 | py | Python | Python/test_hello_world.py | PushpneetSingh/Hello-world | def0f44737e02fb40063cd347e93e456658e2532 | [
"MIT"
] | 1,428 | 2018-10-03T15:15:17.000Z | 2019-03-31T18:38:36.000Z | Python/test_hello_world.py | PushpneetSingh/Hello-world | def0f44737e02fb40063cd347e93e456658e2532 | [
"MIT"
] | 1,162 | 2018-10-03T15:05:49.000Z | 2018-10-18T14:17:52.000Z | Python/test_hello_world.py | PushpneetSingh/Hello-world | def0f44737e02fb40063cd347e93e456658e2532 | [
"MIT"
] | 3,909 | 2018-10-03T15:07:19.000Z | 2019-03-31T18:39:08.000Z | # Hello Testing World
def add(num1, num2):
sum = num1 + num2
return sum
def test_add():
assert add(10, 15) == 25, "Incorrect Sum"
# pytest command to run the test
# python -m pytest C:\python_tests\test_hello_world.py
| 16.785714 | 54 | 0.67234 |
79730bcdc15b0719bd3081036c10554925e47fdb | 26,149 | py | Python | keystone/tests/unit/catalog/test_backends.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/catalog/test_backends.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/catalog/test_backends.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | # 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, software
# distributed under t... | 44.395586 | 79 | 0.634326 |
79730d2d3bb559bc1474bb3e4faae49fa35ff8ac | 2,637 | py | Python | superresolution_stage/models/archs/arch_util.py | xian1234/SRBuildSeg | db16ae2aba6aaa336a0b612446c80b4546b96a1f | [
"MIT"
] | 9 | 2021-04-06T12:46:47.000Z | 2022-03-26T09:10:11.000Z | superresolution_stage/models/archs/arch_util.py | xian1234/SRBuildSeg | db16ae2aba6aaa336a0b612446c80b4546b96a1f | [
"MIT"
] | null | null | null | superresolution_stage/models/archs/arch_util.py | xian1234/SRBuildSeg | db16ae2aba6aaa336a0b612446c80b4546b96a1f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
def initialize_weights(net_l, scale=1):
if not isinstance(net_l, list):
net_l = [net_l]
for net in net_l:
for m in net.modules():
if isinstance(m, nn.Conv2d):
init.kaimin... | 32.9625 | 88 | 0.573758 |
79730e9b4526ef6731926473427df417dce5e2a9 | 2,028 | py | Python | threat_detection.py | profitslate/HUMAN-ATM-SUVEILLANCE- | 4c4ff1d865f4a8725cec389b724867fb1c08bb46 | [
"Apache-2.0"
] | null | null | null | threat_detection.py | profitslate/HUMAN-ATM-SUVEILLANCE- | 4c4ff1d865f4a8725cec389b724867fb1c08bb46 | [
"Apache-2.0"
] | null | null | null | threat_detection.py | profitslate/HUMAN-ATM-SUVEILLANCE- | 4c4ff1d865f4a8725cec389b724867fb1c08bb46 | [
"Apache-2.0"
] | 1 | 2020-02-11T08:45:40.000Z | 2020-02-11T08:45:40.000Z | """
Using ImageAi and our custom helmet detection yoloV3 model
we are going to detect helmet in the face of human
"""
from imageai.Detection.Custom import CustomObjectDetection
import cv2
def threat_detection():
detect = CustomObjectDetection()
detect.setModelTypeAsYOLOv3()
detect.setModelPath("data/mode... | 36.872727 | 117 | 0.7214 |
79730faa5ef2a0c2cd7ff94fef89c1e466248290 | 1,759 | py | Python | loan_management/loan_management/api/test_interest.py | staumoepeau/customer_loan | bb9f42160bc1e17085f000b15810892337dd0465 | [
"MIT"
] | 2 | 2021-06-24T00:13:20.000Z | 2021-06-28T09:31:25.000Z | loan_management/loan_management/api/test_interest.py | staumoepeau/loan_management | 69acabbe39eb65e07e5f569d66e5d0bc69afde5a | [
"MIT"
] | null | null | null | loan_management/loan_management/api/test_interest.py | staumoepeau/loan_management | 69acabbe39eb65e07e5f569d66e5d0bc69afde5a | [
"MIT"
] | 3 | 2019-10-14T14:06:48.000Z | 2022-02-16T13:34:17.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Libermatic and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
from frappe.utils import getdate
from gwi_customization.microfinance.api.interest import (
_interest_to_period, _allocate, _generate_periods
)
class TestInterest(uni... | 32.574074 | 73 | 0.597499 |
79730fd565b2b1b4ca2e6b471e53991aede1a973 | 192 | py | Python | sandbox/finetuning/envs/mujoco/gather/ant_gather_env.py | andrewli77/rllab-finetuning | 2dae9141d0fdc284d04f18931907131d66b43023 | [
"MIT"
] | 23 | 2020-04-27T23:53:44.000Z | 2022-03-10T03:13:16.000Z | sandbox/finetuning/envs/mujoco/gather/ant_gather_env.py | WeiChengTseng/rllab-finetuning | 2dae9141d0fdc284d04f18931907131d66b43023 | [
"MIT"
] | 1 | 2021-11-14T13:30:22.000Z | 2021-11-14T13:30:22.000Z | sandbox/finetuning/envs/mujoco/gather/ant_gather_env.py | WeiChengTseng/rllab-finetuning | 2dae9141d0fdc284d04f18931907131d66b43023 | [
"MIT"
] | 8 | 2020-06-17T03:28:34.000Z | 2022-03-09T03:13:03.000Z | from rllab.envs.mujoco.gather.gather_env import GatherEnv
from sandbox.finetuning.envs.mujoco.ant_env import AntEnv
class AntGatherEnv(GatherEnv):
MODEL_CLASS = AntEnv
ORI_IND = 3
| 19.2 | 57 | 0.786458 |
79730ff96bcb6f10eb99b9833b8eeddd44449606 | 50,208 | py | Python | python/jittor/compiler.py | Jittor/jittor | a778458831eb46b73f28381ace84b15a03c43d6d | [
"Apache-2.0"
] | 2,571 | 2020-03-20T03:38:35.000Z | 2022-03-31T08:20:05.000Z | python/jittor/compiler.py | Jittor/jittor | a778458831eb46b73f28381ace84b15a03c43d6d | [
"Apache-2.0"
] | 197 | 2020-03-20T04:11:47.000Z | 2022-03-31T10:14:24.000Z | python/jittor/compiler.py | Jittor/jittor | a778458831eb46b73f28381ace84b15a03c43d6d | [
"Apache-2.0"
] | 284 | 2020-03-20T03:53:15.000Z | 2022-03-28T07:20:32.000Z | # ***************************************************************
# Copyright (c) 2021 Jittor. All Rights Reserved.
# Maintainers: Dun Liang <randonlang@gmail.com>.
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
# ************************... | 37.301634 | 177 | 0.552203 |
797310eccdfc342079783b9ff904ffbc837b0d9b | 2,032 | py | Python | docs/conf.py | talavis/dds_cli | ec16bffdfa7108730310407ed7dbf8d5ef04045f | [
"MIT"
] | null | null | null | docs/conf.py | talavis/dds_cli | ec16bffdfa7108730310407ed7dbf8d5ef04045f | [
"MIT"
] | null | null | null | docs/conf.py | talavis/dds_cli | ec16bffdfa7108730310407ed7dbf8d5ef04045f | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.866667 | 79 | 0.665354 |
797311409c50507d7e6adb1aaad28d0e9649a06c | 2,057 | py | Python | tests/integration/cartography/intel/aws/test_s3.py | ramonpetgrave64/cartography | 031f282f096b9bc3b3dbad52653f25539f8bf76f | [
"Apache-2.0"
] | 2,322 | 2019-03-02T01:07:20.000Z | 2022-03-31T20:39:12.000Z | tests/integration/cartography/intel/aws/test_s3.py | ramonpetgrave64/cartography | 031f282f096b9bc3b3dbad52653f25539f8bf76f | [
"Apache-2.0"
] | 462 | 2019-03-07T18:38:11.000Z | 2022-03-31T14:55:20.000Z | tests/integration/cartography/intel/aws/test_s3.py | ramonpetgrave64/cartography | 031f282f096b9bc3b3dbad52653f25539f8bf76f | [
"Apache-2.0"
] | 246 | 2019-03-03T02:39:23.000Z | 2022-02-24T09:46:38.000Z | import cartography.intel.aws.s3
import tests.data.aws.s3
TEST_ACCOUNT_ID = '000000000000'
TEST_REGION = 'us-east-1'
TEST_UPDATE_TAG = 123456789
def test_load_s3_buckets(neo4j_session, *args):
"""
Ensure that expected buckets get loaded with their key fields.
"""
data = tests.data.aws.s3.LIST_BUCKETS... | 23.918605 | 108 | 0.537676 |
797312027363ed09a9085a6c3e142d958d837da7 | 305 | py | Python | u8timeseries/utils/types.py | unit8co/unit8timeseries-viscon | bfb9e5c8b8a51c04b823b501039eb8b2fc215cf3 | [
"Apache-2.0"
] | 2 | 2019-10-11T12:03:03.000Z | 2021-04-25T19:17:59.000Z | u8timeseries/utils/types.py | unit8co/u8timeseries-viscon | bfb9e5c8b8a51c04b823b501039eb8b2fc215cf3 | [
"Apache-2.0"
] | null | null | null | u8timeseries/utils/types.py | unit8co/u8timeseries-viscon | bfb9e5c8b8a51c04b823b501039eb8b2fc215cf3 | [
"Apache-2.0"
] | null | null | null | from typing import NewType, List, Tuple
from ..timeseries import TimeSeries
# The features used by regressive model
RegrFeatures = NewType('RegrFeatures', List[TimeSeries])
# The "dataset" (features + target) used by regressive model
RegrDataset = NewType('RegrDataset', Tuple[RegrFeatures, TimeSeries]) | 38.125 | 69 | 0.786885 |
7973123cf586c2c35199e06b61e03c120cd64ef6 | 1,781 | py | Python | envisage/ui/workbench/workbench_editor_manager.py | anshsrtv/envisage | e50ab70146ed9927d684e2dd093cf2934b029691 | [
"BSD-3-Clause"
] | null | null | null | envisage/ui/workbench/workbench_editor_manager.py | anshsrtv/envisage | e50ab70146ed9927d684e2dd093cf2934b029691 | [
"BSD-3-Clause"
] | null | null | null | envisage/ui/workbench/workbench_editor_manager.py | anshsrtv/envisage | e50ab70146ed9927d684e2dd093cf2934b029691 | [
"BSD-3-Clause"
] | null | null | null | # (C) Copyright 2007-2020 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... | 34.921569 | 79 | 0.562605 |
7973124373411b5b928ad878ab301fe8df44254b | 2,385 | py | Python | hard_negatives_generator.py | ML-Recipes/BERT-FAQ | 3c184030c1819b462e29f665465ab4968657440e | [
"MIT"
] | 4 | 2021-12-08T12:43:49.000Z | 2022-03-26T14:46:29.000Z | hard_negatives_generator.py | ML-Recipes/BERT-FAQ | 3c184030c1819b462e29f665465ab4968657440e | [
"MIT"
] | null | null | null | hard_negatives_generator.py | ML-Recipes/BERT-FAQ | 3c184030c1819b462e29f665465ab4968657440e | [
"MIT"
] | null | null | null | from evaluation import get_relevance_label_df
from evaluation import get_relevance_label
from shared.utils import load_from_json
from shared.utils import dump_to_json
from searcher import Searcher
from tqdm import tqdm
import pandas as pd
import random
class Hard_Negatives_Generator(object):
def __init__(self, es,... | 35.073529 | 98 | 0.587421 |
797313749fad37bc16295b637e67859c711e795e | 629 | py | Python | assignments/assignment2/metrics.py | tz3/dlcourse_ai | e1405bc45de9c084672ac3206215177c21f2e4b7 | [
"MIT"
] | null | null | null | assignments/assignment2/metrics.py | tz3/dlcourse_ai | e1405bc45de9c084672ac3206215177c21f2e4b7 | [
"MIT"
] | null | null | null | assignments/assignment2/metrics.py | tz3/dlcourse_ai | e1405bc45de9c084672ac3206215177c21f2e4b7 | [
"MIT"
] | null | null | null | import numpy as np
def multiclass_accuracy(prediction, ground_truth):
'''
Computes metrics for multiclass classification
Arguments:
prediction, np array of int (num_samples) - model predictions
ground_truth, np array of int (num_samples) - true labels
Returns:
accuracy - ratio of accurat... | 29.952381 | 72 | 0.710652 |
797313e324dcda9828ad2e98abf0c1ba08b9fc25 | 2,207 | py | Python | packages/random/nodes/random___RandInts0/random___RandInts0___METACODE.py | lidong1266/Ryven-Switch | 68d1f71e81d6564196f44ca49d5903f06db6a4d9 | [
"MIT"
] | 18 | 2021-01-18T09:52:41.000Z | 2022-03-22T10:48:44.000Z | packages/random/nodes/random___RandInts0/random___RandInts0___METACODE.py | xamofb-xsk/Ryven | 8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1 | [
"MIT"
] | null | null | null | packages/random/nodes/random___RandInts0/random___RandInts0___METACODE.py | xamofb-xsk/Ryven | 8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1 | [
"MIT"
] | 3 | 2021-01-18T09:49:42.000Z | 2022-03-22T10:48:47.000Z | from NIENV import *
# API METHODS
# self.main_widget <- access to main widget
# self.update_shape() <- recomputes the whole shape and content positions
# Ports
# self.input(index) <- access to input data
# self.set_output_val(index, val) <- set output data port value
# self.exec_outp... | 31.985507 | 112 | 0.622111 |
797313fdf14fc240e9855d0b0d1021c680c81c1f | 2,122 | py | Python | tests/test_cache.py | anikasikka/warn-scraper | 13efac478ac06982bf68ce67e15db976ac07f101 | [
"Apache-2.0"
] | 12 | 2022-01-18T20:04:41.000Z | 2022-03-24T21:26:31.000Z | tests/test_cache.py | anikasikka/warn-scraper | 13efac478ac06982bf68ce67e15db976ac07f101 | [
"Apache-2.0"
] | 163 | 2022-01-14T19:30:23.000Z | 2022-03-31T23:48:48.000Z | tests/test_cache.py | anikasikka/warn-scraper | 13efac478ac06982bf68ce67e15db976ac07f101 | [
"Apache-2.0"
] | 4 | 2022-01-19T20:40:13.000Z | 2022-02-22T21:36:34.000Z | from pathlib import Path
from unittest.mock import patch
import pytest
from warn.cache import Cache
from .conftest import file_contents
def test_default_cache_dir():
"""Override the output of the expanduser method."""
to_patch = "warn.cache.expanduser"
with patch(to_patch) as mock_func:
mock_fu... | 29.068493 | 67 | 0.693685 |
797315cd0c07a07970731fb8af59cbdfb2bdd7d7 | 540 | py | Python | src/nanobind/__init__.py | wjakob/nanobind | 3e69e4643cc64f7d524ce1ba960eff8b4677dc23 | [
"BSD-3-Clause"
] | 613 | 2022-02-09T12:03:18.000Z | 2022-03-31T06:40:07.000Z | src/nanobind/__init__.py | wjakob/nanobind | 3e69e4643cc64f7d524ce1ba960eff8b4677dc23 | [
"BSD-3-Clause"
] | 8 | 2022-02-21T19:44:12.000Z | 2022-03-30T22:19:05.000Z | src/nanobind/__init__.py | wjakob/nanobind | 3e69e4643cc64f7d524ce1ba960eff8b4677dc23 | [
"BSD-3-Clause"
] | 20 | 2022-02-21T18:12:42.000Z | 2022-03-26T22:25:24.000Z | import sys
import os
if sys.version_info < (3, 8):
raise ImportError("nanobind does not support Python < 3.8.")
def include_dir() -> str:
"Return the path to the nanobind include directory"
return os.path.join(os.path.abspath(os.path.dirname(__file__)), "include")
def cmake_dir() -> str:
"Return the ... | 24.545455 | 78 | 0.685185 |
797317f96d51e461d4bcaac0f4c70d702674135c | 8,769 | py | Python | support/web/cwf/urls/section.py | delfick/GammaJS | 67be7c3783d05a822a03a372fc82af5032e802bc | [
"MIT"
] | 7 | 2015-05-13T12:58:51.000Z | 2021-11-12T12:11:12.000Z | support/web/cwf/urls/section.py | delfick/GammaJS | 67be7c3783d05a822a03a372fc82af5032e802bc | [
"MIT"
] | null | null | null | support/web/cwf/urls/section.py | delfick/GammaJS | 67be7c3783d05a822a03a372fc82af5032e802bc | [
"MIT"
] | 3 | 2015-05-29T13:52:56.000Z | 2019-12-07T01:58:51.000Z | from django.conf.urls.defaults import include, patterns
from django.views.generic.simple import redirect_to
class Section(object):
def __init__(self, name, obj=None, target=None, redirectTo=None,
match=None, values=None, new=None, valuesAsSet=True, compareFunc=None,
needsAuth=False, perms=None, di... | 32.00365 | 100 | 0.433687 |
7973184728f44a7a0466872611908b1b7bb6884c | 7,197 | py | Python | src/sqlfluff/rules/L006.py | zhongjiajie/sqlfluff | bedf8018d8b21ae906f49e265d111b322bb6ef7d | [
"MIT"
] | 2 | 2021-08-04T08:58:33.000Z | 2021-08-04T18:54:06.000Z | src/sqlfluff/rules/L006.py | linchun3/sqlfluff | 0bfa5339380ecd040252e8fa4326a4b4c8c8ed86 | [
"MIT"
] | null | null | null | src/sqlfluff/rules/L006.py | linchun3/sqlfluff | 0bfa5339380ecd040252e8fa4326a4b4c8c8ed86 | [
"MIT"
] | 1 | 2021-07-03T12:56:56.000Z | 2021-07-03T12:56:56.000Z | """Implementation of Rule L006."""
from typing import Tuple, List
from sqlfluff.core.parser import WhitespaceSegment
from sqlfluff.core.rules.base import BaseRule, LintResult, LintFix
from sqlfluff.core.rules.doc_decorators import document_fix_compatible
@document_fix_compatible
class Rule_L006(BaseRule):
"""... | 36.907692 | 95 | 0.483535 |
797319ba5bf4dc18314afea9303877029d695709 | 2,542 | py | Python | code/miscc/config.py | liuchang0520/AttnGAN | 0d000e652b407e976cb88fab299e8566f3de8a37 | [
"MIT"
] | 1,246 | 2018-02-22T15:51:58.000Z | 2022-03-31T06:04:28.000Z | code/miscc/config.py | liuchang0520/AttnGAN | 0d000e652b407e976cb88fab299e8566f3de8a37 | [
"MIT"
] | 94 | 2018-03-10T09:13:01.000Z | 2022-03-23T10:20:48.000Z | code/miscc/config.py | liuchang0520/AttnGAN | 0d000e652b407e976cb88fab299e8566f3de8a37 | [
"MIT"
] | 393 | 2018-02-28T04:45:05.000Z | 2022-03-31T06:04:32.000Z | from __future__ import division
from __future__ import print_function
import os.path as osp
import numpy as np
from easydict import EasyDict as edict
__C = edict()
cfg = __C
# Dataset name: flowers, birds
__C.DATASET_NAME = 'birds'
__C.CONFIG_NAME = ''
__C.DATA_DIR = ''
__C.GPU_ID = 0
__C.CUDA = True
__C.WORKERS = ... | 23.981132 | 75 | 0.613297 |
797319c20b510c95814e212bc376491898d20858 | 716 | py | Python | practice-exercises/section-10-11-list-loops/11.py | mugan86/bootcamp-basic-to-expert-from-scratch | 028aab243386e5a75d84aea319c480ec54913c53 | [
"MIT"
] | 31 | 2022-01-19T18:33:40.000Z | 2022-03-29T16:24:44.000Z | practice-exercises/section-10-11-list-loops/11.py | mugan86/bootcamp-basic-to-expert-from-scratch | 028aab243386e5a75d84aea319c480ec54913c53 | [
"MIT"
] | 1 | 2022-02-09T17:47:17.000Z | 2022-02-09T17:47:17.000Z | practice-exercises/section-10-11-list-loops/11.py | mugan86/bootcamp-basic-to-expert-from-scratch | 028aab243386e5a75d84aea319c480ec54913c53 | [
"MIT"
] | 4 | 2022-01-20T15:41:09.000Z | 2022-03-29T16:25:08.000Z | """
Hacemos lo mismo que en el 9, pero en vez de sumar, multiplicamos.
"""
total = 1
input_values_correct = False
"""
Aquí vamos a controlar que introducimos el número de elementos
correcto, para luego pedir las veces especificadas para la multiplicación
total de lo que queremos conseguir
"""
while(input_values_correct... | 29.833333 | 73 | 0.717877 |
79731b0a8e87f96011561fa1090ce124154f7961 | 1,530 | py | Python | hikaru/model/rel_1_18/v2beta2/documents.py | wtayyeb/hikaru | 46fa442c8d39a4a38aa77326bfaab3e1cf5ccdc3 | [
"MIT"
] | 56 | 2021-03-12T09:04:47.000Z | 2022-03-19T00:16:22.000Z | hikaru/model/rel_1_18/v2beta2/documents.py | wtayyeb/hikaru | 46fa442c8d39a4a38aa77326bfaab3e1cf5ccdc3 | [
"MIT"
] | 27 | 2021-03-18T13:56:20.000Z | 2022-02-19T16:50:28.000Z | hikaru/model/rel_1_18/v2beta2/documents.py | wtayyeb/hikaru | 46fa442c8d39a4a38aa77326bfaab3e1cf5ccdc3 | [
"MIT"
] | 5 | 2021-03-31T16:32:36.000Z | 2021-11-09T10:06:27.000Z | #
# Copyright (c) 2021 Incisive Technology Ltd
#
# 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, modify, merge, pu... | 39.230769 | 80 | 0.766013 |
79731b5fc3d29c4d7aa5db5c11b1e73f08f01168 | 10,828 | py | Python | predict.py | cw-somil/Medical-Image-Synthesis | 6fb85f4e432b37c40d0fae3bbca50b114fd71f6f | [
"MIT"
] | 1 | 2021-04-04T14:44:22.000Z | 2021-04-04T14:44:22.000Z | predict.py | cw-somil/Medical-Image-Synthesis | 6fb85f4e432b37c40d0fae3bbca50b114fd71f6f | [
"MIT"
] | null | null | null | predict.py | cw-somil/Medical-Image-Synthesis | 6fb85f4e432b37c40d0fae3bbca50b114fd71f6f | [
"MIT"
] | null | null | null | from keras.layers import Layer, Input, Dropout, Conv2D, Activation, add, UpSampling2D, Conv2DTranspose, Flatten, Reshape
from keras_contrib.layers.normalization.instancenormalization import InstanceNormalization, InputSpec
from keras.layers.advanced_activations import LeakyReLU
from keras.models import Model
import... | 46.472103 | 386 | 0.725434 |
79731b609996ffa560281f1440ec29920adb07da | 9,222 | py | Python | tests/h/services/annotation_json_presentation_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | tests/h/services/annotation_json_presentation_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | tests/h/services/annotation_json_presentation_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import mock
import pytest
from h.interfaces import IGroupService
from h.services.annotation_json_presentation import AnnotationJSONPresentationService
from h.services.annotation_json_presentation import (
annotation_json_presentation_... | 36.023438 | 95 | 0.720234 |
79731b68b02dd886bc987c60d6314ca31e16e45c | 51,019 | py | Python | stubs.min/System/Windows/Forms/__init___parts/DataGridViewTextBoxEditingControl.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Forms/__init___parts/DataGridViewTextBoxEditingControl.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Forms/__init___parts/DataGridViewTextBoxEditingControl.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class DataGridViewTextBoxEditingControl(TextBox,IComponent,IDisposable,IOleControl,IOleObject,IOleInPlaceObject,IOleInPlaceActiveObject,IOleWindow,IViewObject,IViewObject2,IPersist,IPersistStreamInit,IPersistPropertyBag,IPersistStorage,IQuickActivate,ISupportOleDropSource,IDropTarget,ISynchronizeInvoke,IWin32Window,IAr... | 33.765056 | 383 | 0.70905 |
79731beb460a255e4a9f5d071602c2831f83dad6 | 1,535 | py | Python | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20170705/DeleteMediaRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20170705/DeleteMediaRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20170705/DeleteMediaRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 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 u... | 35.697674 | 74 | 0.762866 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.