hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | 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 245 | max_issues_repo_name stringlengths 6 130 | 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 245 | max_forks_repo_name stringlengths 6 130 | 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 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c3d3e01c8198b61de3f085f02ae88cae1c55329 | 4,054 | py | Python | cogs/owner.py | KoocieBoi/Sunny | 3c30cc57a891c3baab8c51d75ad1bce4bb8a4472 | [
"MIT"
] | null | null | null | cogs/owner.py | KoocieBoi/Sunny | 3c30cc57a891c3baab8c51d75ad1bce4bb8a4472 | [
"MIT"
] | null | null | null | cogs/owner.py | KoocieBoi/Sunny | 3c30cc57a891c3baab8c51d75ad1bce4bb8a4472 | [
"MIT"
] | null | null | null | from discord.ext import commands
import io, os
from shutil import copy2
import textwrap
import traceback
from contextlib import redirect_stdout
from git import Repo
class OwnerCog:
def __init__(self, bot):
self.bot = bot
self._last_result = None
def cleanup_code(self, content):
""... | 30.712121 | 77 | 0.538481 | from discord.ext import commands
import io, os
from shutil import copy2
import textwrap
import traceback
from contextlib import redirect_stdout
from git import Repo
class OwnerCog:
def __init__(self, bot):
self.bot = bot
self._last_result = None
def cleanup_code(self, content):
if... | true | true |
1c3d3e1491d34f0020424e1ed87b433c58a91b54 | 548 | py | Python | website-retina/publishconf.py | gelana/website-content | 11db61103d7d944ac321d5843580df2551fc2e2e | [
"MIT"
] | 5 | 2019-04-09T07:47:33.000Z | 2021-11-23T09:25:35.000Z | website-retina/publishconf.py | gelana/website-content | 11db61103d7d944ac321d5843580df2551fc2e2e | [
"MIT"
] | 286 | 2019-03-07T09:22:34.000Z | 2022-03-30T14:57:01.000Z | website-retina/publishconf.py | gelana/website-content | 11db61103d7d944ac321d5843580df2551fc2e2e | [
"MIT"
] | 74 | 2019-04-11T08:25:55.000Z | 2022-03-31T09:44:55.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://www.a-eyeresearch.nl/'
IMGURL = 'http... | 21.92 | 53 | 0.766423 |
from __future__ import unicode_literals
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://www.a-eyeresearch.nl/'
IMGURL = 'https://assets.diagnijmegen.nl'
RELATIVE_URLS = False
FEED_DOMAIN = SITEURL
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = ... | true | true |
1c3d3e9553c20ffc5112fa2d1e07d041135aefb1 | 1,520 | py | Python | courses/urls.py | samshultz2/e-learning-platform | 4233276c4debe3e36bcc7e0ff8c082ad4ce48082 | [
"BSD-2-Clause"
] | 1 | 2019-01-12T21:31:19.000Z | 2019-01-12T21:31:19.000Z | courses/urls.py | samshultz/e-learning-platform | 4233276c4debe3e36bcc7e0ff8c082ad4ce48082 | [
"BSD-2-Clause"
] | null | null | null | courses/urls.py | samshultz/e-learning-platform | 4233276c4debe3e36bcc7e0ff8c082ad4ce48082 | [
"BSD-2-Clause"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^mine/$', views.ManageCourseListView.as_view(),
name='manage_course_list'),
url(r'^create/$', views.CourseCreateView.as_view(), name='course_create'),
url(r'^(?P<pk>\d+)/edit/$', views.CourseUpdateView.as_view(),
na... | 44.705882 | 80 | 0.632237 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^mine/$', views.ManageCourseListView.as_view(),
name='manage_course_list'),
url(r'^create/$', views.CourseCreateView.as_view(), name='course_create'),
url(r'^(?P<pk>\d+)/edit/$', views.CourseUpdateView.as_view(),
na... | true | true |
1c3d3ed19a5cff1ba1fa08391d67e115dfb1dfa9 | 18,019 | py | Python | aws_topology/stackstate_checks/aws_topology/aws_topology.py | Mathieu-Dirkx/stackstate-agent-integrations | 76bb486f2560e1cdcd5aabb65ef8a19ff36297c1 | [
"BSD-3-Clause"
] | null | null | null | aws_topology/stackstate_checks/aws_topology/aws_topology.py | Mathieu-Dirkx/stackstate-agent-integrations | 76bb486f2560e1cdcd5aabb65ef8a19ff36297c1 | [
"BSD-3-Clause"
] | null | null | null | aws_topology/stackstate_checks/aws_topology/aws_topology.py | Mathieu-Dirkx/stackstate-agent-integrations | 76bb486f2560e1cdcd5aabb65ef8a19ff36297c1 | [
"BSD-3-Clause"
] | null | null | null | # (C) StackState 2021
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .cloudtrail import CloudtrailCollector
from .flowlogs import FlowLogCollector
import logging
import boto3
import time
import traceback
from botocore.exceptions import ClientError
from schematics import Model
fro... | 45.387909 | 119 | 0.599145 |
from .cloudtrail import CloudtrailCollector
from .flowlogs import FlowLogCollector
import logging
import boto3
import time
import traceback
from botocore.exceptions import ClientError
from schematics import Model
from schematics.types import StringType, ListType, DictType, IntType
from botocore.config import Config
... | true | true |
1c3d3f7454dcabf5bdf008e318e30edb1446ad41 | 3,044 | py | Python | docs/source/conf.py | jonathanchukinas/fuzzytable | 3d574047c3a8b0c28ab6a00436526c92ca1ea6d2 | [
"MIT"
] | 1 | 2019-11-22T21:16:34.000Z | 2019-11-22T21:16:34.000Z | docs/source/conf.py | jonathanchukinas/fuzzytable | 3d574047c3a8b0c28ab6a00436526c92ca1ea6d2 | [
"MIT"
] | 3 | 2019-11-22T13:16:44.000Z | 2019-11-26T19:49:39.000Z | docs/source/conf.py | jonathanchukinas/fuzzytable | 3d574047c3a8b0c28ab6a00436526c92ca1ea6d2 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
import os
import sys
# import sphinx_bootstrap_theme
# import sphinx_rtd_theme
#
# 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
# -- Pa... | 34.590909 | 113 | 0.693824 |
import os
import sys
project_path = os.path.abspath('../..')
print('project path:', project_path)
sys.path.insert(0, project_path)
project = 'fuzzytable'
copyright = '2019, Jonathan Chukinas'
author = 'Jonathan Chukinas'
release = '0.19'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napole... | true | true |
1c3d402900221c0be1ec6066b7fdbe58f2110ddd | 1,453 | py | Python | setup.py | KCGallagher/birdspy | 234911777db4b0a6402750516e8efd9f62748054 | [
"MIT"
] | null | null | null | setup.py | KCGallagher/birdspy | 234911777db4b0a6402750516e8efd9f62748054 | [
"MIT"
] | null | null | null | setup.py | KCGallagher/birdspy | 234911777db4b0a6402750516e8efd9f62748054 | [
"MIT"
] | null | null | null | #
# birdspy setuptools script
#
from setuptools import setup, find_packages
def get_version():
"""
Get version number from the birdspy module.
The easiest way would be to just `import birdspy`, but note that this may
fail if the dependencies have not been installed yet. Instead, we've put
the ver... | 21.686567 | 79 | 0.651067 |
from setuptools import setup, find_packages
def get_version():
import os
import sys
sys.path.append(os.path.abspath('birdspy'))
from version_info import VERSION as version
sys.path.pop()
return version
def get_readme():
with open('README.md') as f:
return f.read()
setup(
... | true | true |
1c3d409611ef05bfdf081d574a95c0800af6c5bc | 7,116 | py | Python | ucscentralsdk/mometa/mgmt/MgmtCfgExportPolicy.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/mgmt/MgmtCfgExportPolicy.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/mgmt/MgmtCfgExportPolicy.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for MgmtCfgExportPolicy ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class MgmtCfgExportPolicyConsts():
ADMIN_STATE_DISABLE = "disab... | 64.690909 | 578 | 0.618606 |
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class MgmtCfgExportPolicyConsts():
ADMIN_STATE_DISABLE = "disable"
ADMIN_STATE_ENABLE = "enable"
INT_ID_NONE = "none"
POLICY_OWNER_LOCAL = "l... | true | true |
1c3d40f229bfb1a826905ce0916f0a678f30eff7 | 9,382 | py | Python | contrib/bitrpc/bitrpc.py | Tommouse91/VerusCoin | 8a5f86b850770df552e27d391f4bcc6482224900 | [
"Unlicense"
] | 174 | 2016-10-05T19:45:54.000Z | 2021-01-14T18:40:57.000Z | contrib/bitrpc/bitrpc.py | Tommouse91/VerusCoin | 8a5f86b850770df552e27d391f4bcc6482224900 | [
"Unlicense"
] | 91 | 2016-10-13T19:32:42.000Z | 2020-12-13T09:00:23.000Z | contrib/bitrpc/bitrpc.py | Tommouse91/VerusCoin | 8a5f86b850770df552e27d391f4bcc6482224900 | [
"Unlicense"
] | 73 | 2016-10-05T02:40:28.000Z | 2022-02-01T17:55:40.000Z | from jsonrpc import ServiceProxy
import sys
import string
import getpass
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:8232")
e... | 27.922619 | 101 | 0.596994 | from jsonrpc import ServiceProxy
import sys
import string
import getpass
rpcuser = ""
rpcpass = ""
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:8232")
else:
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:8232")
cmd = sys.argv[1].lower()
if cmd == "backupwallet":
try:
... | false | true |
1c3d40f630669f1651221ddfbbbc6c5daeb7b7e2 | 21,057 | py | Python | pysnmp/NETI-TRUNK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/NETI-TRUNK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/NETI-TRUNK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module NETI-TRUNK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NETI-TRUNK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:10:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 107.433673 | 2,961 | 0.745548 |
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuild... | true | true |
1c3d41252c8b5c17dcc82e53aed8ad40a8c54ef2 | 496 | py | Python | pydiscourse/exceptions.py | cwyark/pydiscourse | aeb763c42c94c660003e0f1d1b40302605de5cc6 | [
"MIT"
] | 72 | 2016-09-18T19:45:59.000Z | 2022-01-22T21:55:06.000Z | pydiscourse/exceptions.py | cwyark/pydiscourse | aeb763c42c94c660003e0f1d1b40302605de5cc6 | [
"MIT"
] | 37 | 2016-04-17T15:32:43.000Z | 2021-12-29T21:37:17.000Z | pydiscourse/exceptions.py | cwyark/pydiscourse | aeb763c42c94c660003e0f1d1b40302605de5cc6 | [
"MIT"
] | 44 | 2016-04-17T14:48:38.000Z | 2022-03-12T13:35:37.000Z | from requests.exceptions import HTTPError
class DiscourseError(HTTPError):
""" A generic error while attempting to communicate with Discourse """
class DiscourseServerError(DiscourseError):
""" The Discourse Server encountered an error while processing the request """
class DiscourseClientError(DiscourseE... | 27.555556 | 82 | 0.768145 | from requests.exceptions import HTTPError
class DiscourseError(HTTPError):
class DiscourseServerError(DiscourseError):
class DiscourseClientError(DiscourseError):
class DiscourseRateLimitedError(DiscourseError):
| true | true |
1c3d425f712c8bf11e9204e4f22236f068c69ca7 | 3,024 | py | Python | libtoml/parser.py | prestontimmons/libtoml | be42d33fbc3dfd53304da06dc4efef4279f4847c | [
"MIT"
] | 1 | 2020-01-13T19:21:36.000Z | 2020-01-13T19:21:36.000Z | libtoml/parser.py | prestontimmons/libtoml | be42d33fbc3dfd53304da06dc4efef4279f4847c | [
"MIT"
] | null | null | null | libtoml/parser.py | prestontimmons/libtoml | be42d33fbc3dfd53304da06dc4efef4279f4847c | [
"MIT"
] | null | null | null | from datetime import datetime
from rply import LexerGenerator, ParserGenerator
ISO8601_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
lg = LexerGenerator()
lg.ignore(r"\s+")
lg.ignore(r"\# .*")
lg.add("COLON", r":")
lg.add("LCURLY", r"\{")
lg.add("RCURLY", r"\}")
lg.add("LBRACKET", r"\[")
lg.add("RBRACKET", r"\]")
lg.add("COMMA", ... | 22.4 | 75 | 0.632937 | from datetime import datetime
from rply import LexerGenerator, ParserGenerator
ISO8601_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
lg = LexerGenerator()
lg.ignore(r"\s+")
lg.ignore(r"\# .*")
lg.add("COLON", r":")
lg.add("LCURLY", r"\{")
lg.add("RCURLY", r"\}")
lg.add("LBRACKET", r"\[")
lg.add("RBRACKET", r"\]")
lg.add("COMMA", ... | true | true |
1c3d428d3420761702555a2ebfed2b889fb2ffe0 | 464 | py | Python | ParametricRuns/meshConvertT.py | Tjcross31/OPTIMISATION-OF-BIPLANECONFIGURATIONS-FOR-SUPERSONICFLIGHT | 4deb31d8e4fb16bfed49a39c8ad39dbfd349b3ab | [
"MIT"
] | null | null | null | ParametricRuns/meshConvertT.py | Tjcross31/OPTIMISATION-OF-BIPLANECONFIGURATIONS-FOR-SUPERSONICFLIGHT | 4deb31d8e4fb16bfed49a39c8ad39dbfd349b3ab | [
"MIT"
] | null | null | null | ParametricRuns/meshConvertT.py | Tjcross31/OPTIMISATION-OF-BIPLANECONFIGURATIONS-FOR-SUPERSONICFLIGHT | 4deb31d8e4fb16bfed49a39c8ad39dbfd349b3ab | [
"MIT"
] | null | null | null | import os
from threading import Thread
def f(name):
if os.path.isdir(name) and name != "blank_foamcase":
oldDir = os.getcwd()
os.system('cd ~/OpenFOAM/tjc2017-7/run')
os.chdir(oldDir)
os.chdir(name)
os.system('gmshToFoam busemann.msh')
os.chdir(oldDir)
... | 24.421053 | 57 | 0.560345 | import os
from threading import Thread
def f(name):
if os.path.isdir(name) and name != "blank_foamcase":
oldDir = os.getcwd()
os.system('cd ~/OpenFOAM/tjc2017-7/run')
os.chdir(oldDir)
os.chdir(name)
os.system('gmshToFoam busemann.msh')
os.chdir(oldDir)
... | true | true |
1c3d429ce96193c8040bc15c6e5e2e7e65bdeacf | 1,788 | py | Python | pygly/examples/run_demo.py | adamlwgriffiths/PyGLy | 929d50e2bd8b24f079e6c43d6a54b2ff8e572d5f | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2015-02-19T15:48:18.000Z | 2021-06-25T04:36:53.000Z | pygly/examples/run_demo.py | adamlwgriffiths/PyGLy | 929d50e2bd8b24f079e6c43d6a54b2ff8e572d5f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pygly/examples/run_demo.py | adamlwgriffiths/PyGLy | 929d50e2bd8b24f079e6c43d6a54b2ff8e572d5f | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2015-12-12T03:56:07.000Z | 2017-10-19T10:43:06.000Z | import argparse
import importlib
profiles = {
"core": True,
"legacy": False,
}
applications = {
"pyglet": "application_pyglet",
"pyglfw": "application_pyglfw",
"glut": "application_glut",
}
demos = {
"basic": "scene_basic",
"texturing": "scene_texture",
"... | 26.686567 | 75 | 0.600112 | import argparse
import importlib
profiles = {
"core": True,
"legacy": False,
}
applications = {
"pyglet": "application_pyglet",
"pyglfw": "application_pyglfw",
"glut": "application_glut",
}
demos = {
"basic": "scene_basic",
"texturing": "scene_texture",
"... | false | true |
1c3d46c29767bbbf9d272c6f7b8a0ce9e0097bcd | 7,653 | py | Python | code/functions/ZGL.py | kaltenburger/homophily_monophily_NHB | ef7c297694885e1bf1e1e4cc75a6ba9bd3d83164 | [
"MIT"
] | 6 | 2018-03-20T21:00:55.000Z | 2021-03-28T02:27:24.000Z | code/functions/ZGL.py | kaltenburger/homophily_monophily_NHB | ef7c297694885e1bf1e1e4cc75a6ba9bd3d83164 | [
"MIT"
] | null | null | null | code/functions/ZGL.py | kaltenburger/homophily_monophily_NHB | ef7c297694885e1bf1e1e4cc75a6ba9bd3d83164 | [
"MIT"
] | 2 | 2019-06-10T06:43:47.000Z | 2022-02-28T01:56:49.000Z | from sklearn.metrics import confusion_matrix
## 4/24/2017
## about: ZGL function
#"Semi-Supervised Learning Using Gaussian Fields and Harmonic Functions". Xiaojin Zhu, Zoubin Ghahramani, John Lafferty. The Twentieth International Conference on Machine Learning (ICML-2003).
## note: helpful Matlab code that was adapt... | 51.709459 | 193 | 0.556775 | from sklearn.metrics import confusion_matrix
)
if python_library == 'scipy':
W_unordered = np.copy(feature_x)
n = len(membership_y)
classes = np.sort(np.unique(membership_y))
class_labels = np.array(range(len(classes)))
membership_y_update = np.copy(membership_y)
for j in r... | true | true |
1c3d47593aeb17fbc895e22ffbf5ac9d48ac35e6 | 56,311 | py | Python | virtual/lib/python3.6/site-packages/google/protobuf/internal/text_format_test.py | marknesh/pitches | 0a480d9bc2beafaefa0121393b1502cc05edab89 | [
"MIT"
] | null | null | null | virtual/lib/python3.6/site-packages/google/protobuf/internal/text_format_test.py | marknesh/pitches | 0a480d9bc2beafaefa0121393b1502cc05edab89 | [
"MIT"
] | 11 | 2020-06-05T20:57:31.000Z | 2021-09-22T18:35:03.000Z | virtual/lib/python3.6/site-packages/google/protobuf/internal/text_format_test.py | marknesh/instagram-app | 514ec6e59ad127857234245b05130431fa3262cc | [
"MIT"
] | null | null | null | #! /usr/bin/env python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... | 41.405147 | 80 | 0.649447 |
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above co... | true | true |
1c3d489c9cdb8fe48bef6bd7695b7af927df066f | 1,026 | py | Python | adoptions/views.py | Pruthviraj98/Wisdompets_linkedInLearning | 8bfcce297245503a543157eca2d23448fce3bf6f | [
"MIT"
] | null | null | null | adoptions/views.py | Pruthviraj98/Wisdompets_linkedInLearning | 8bfcce297245503a543157eca2d23448fce3bf6f | [
"MIT"
] | null | null | null | adoptions/views.py | Pruthviraj98/Wisdompets_linkedInLearning | 8bfcce297245503a543157eca2d23448fce3bf6f | [
"MIT"
] | null | null | null | from django.shortcuts import render
#HttpRespose class creates the response objects that views expected to return
from django.http import HttpResponse, Http404
#we can use thi above function instead of the render function because in the case of render functon, it needs template files to execute.
#we need the hom... | 42.75 | 137 | 0.750487 | from django.shortcuts import render
from django.http import HttpResponse, Http404
from .models import Pet
def home(request):
pets = Pet.objects.all()
return render(request, 'home.html', {'pets':pets,})
def pet_detail(request, pet_id):
try:
pet = Pet.objects.get(id=pet_id)
except Pet.Doe... | true | true |
1c3d49a02a2f3fc9e8dab59ec65c5f01f77b9ff1 | 33,635 | py | Python | src/arclink/apps/arclink/config/arclink.py | thefroid/seiscomp3 | 0b05d5550dcea000a93c7d9a39c5347d8786a91a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2015-09-17T22:43:50.000Z | 2017-11-29T20:27:11.000Z | src/arclink/apps/arclink/config/arclink.py | thefroid/seiscomp3 | 0b05d5550dcea000a93c7d9a39c5347d8786a91a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2016-04-26T00:03:09.000Z | 2017-12-05T02:24:50.000Z | src/arclink/apps/arclink/config/arclink.py | salichon/seiscomp3 | 4f7715f9ff9a35e7912c379ebf10446d0bceaeb2 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2022-01-13T02:49:31.000Z | 2022-01-13T02:49:31.000Z | import os, string, time, re, glob, shutil, sys, imp, random, fnmatch
from seiscomp3 import Core, Kernel, Config, System, Client, Communication, DataModel
DEBUG = 0
'''
NOTE:
All parameters from arclink.cfg are not prefixed with "arclink.".
Local parameters that are created from arclink.cfg parameters are
prefixed wit... | 41.219363 | 197 | 0.529359 | import os, string, time, re, glob, shutil, sys, imp, random, fnmatch
from seiscomp3 import Core, Kernel, Config, System, Client, Communication, DataModel
DEBUG = 0
'''
NOTE:
All parameters from arclink.cfg are not prefixed with "arclink.".
Local parameters that are created from arclink.cfg parameters are
prefixed wit... | false | true |
1c3d49b00167dece0fbe4e234e4f4c6dd16eac8e | 640 | py | Python | capybre/__init__.py | digitaltembo/capybre | 0066436ce6670436569685f8fdf82c61ec0ea1f5 | [
"MIT"
] | 1 | 2022-01-24T03:42:35.000Z | 2022-01-24T03:42:35.000Z | capybre/__init__.py | digitaltembo/capybre | 0066436ce6670436569685f8fdf82c61ec0ea1f5 | [
"MIT"
] | null | null | null | capybre/__init__.py | digitaltembo/capybre | 0066436ce6670436569685f8fdf82c61ec0ea1f5 | [
"MIT"
] | 1 | 2021-01-24T19:45:54.000Z | 2021-01-24T19:45:54.000Z | from .convert import convert, converted_fileobj
from .ebook_format import EbookFormat
from .metadata import (
Metadata,
extract_metadata,
extract_metadata_map,
extract_cover,
extracted_cover_fileobj
)
from .fetch_metadata import (
fetch_metadata,
fetch_metadata_map,
fetch_cover,
fetc... | 20.645161 | 47 | 0.7125 | from .convert import convert, converted_fileobj
from .ebook_format import EbookFormat
from .metadata import (
Metadata,
extract_metadata,
extract_metadata_map,
extract_cover,
extracted_cover_fileobj
)
from .fetch_metadata import (
fetch_metadata,
fetch_metadata_map,
fetch_cover,
fetc... | true | true |
1c3d4a7ac2a9ff1f2451b6a1ed8a8d891d361ccc | 734 | py | Python | configs/gdrn/lmCropBlenderSO/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_SO/resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_lamp.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | configs/gdrn/lmCropBlenderSO/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_SO/resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_lamp.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | configs/gdrn/lmCropBlenderSO/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_SO/resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_lamp.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | _base_ = ["./resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_ape.py"]
OUTPUT_DIR = "output/gdrn/lm_crop_blender/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e/lamp"
DATASETS = dict(
TRAIN=("lm_blender_lamp_train",),
TEST=("lm_crop_lamp_test",),
)
# objects lamp... | 26.214286 | 118 | 0.645777 | _base_ = ["./resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e_ape.py"]
OUTPUT_DIR = "output/gdrn/lm_crop_blender/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_bboxCrop_DZI10_lm_blender_100e/lamp"
DATASETS = dict(
TRAIN=("lm_blender_lamp_train",),
TEST=("lm_crop_lamp_test",),
)
... | true | true |
1c3d4acf43575526856e6058c374b358ba99a083 | 3,867 | py | Python | image_generation/core/gan.py | drboog/FPK | 7e79cfcede41dd7ed65987acce5a7617977fc9be | [
"MIT"
] | 1 | 2021-08-19T00:08:30.000Z | 2021-08-19T00:08:30.000Z | image_generation/core/gan.py | drboog/FPK | 7e79cfcede41dd7ed65987acce5a7617977fc9be | [
"MIT"
] | null | null | null | image_generation/core/gan.py | drboog/FPK | 7e79cfcede41dd7ed65987acce5a7617977fc9be | [
"MIT"
] | null | null | null | from .model import MMD_GAN, tf
from . import mmd
class GAN(MMD_GAN):
def __init__(self, sess, config, **kwargs):
config.dof_dim = 1
super(GAN, self).__init__(sess, config, **kwargs)
def delete_diag(self, matrix):
return matrix - tf.matrix_diag(tf.matrix_diag_part(matrix)) # return ma... | 51.56 | 153 | 0.595552 | from .model import MMD_GAN, tf
from . import mmd
class GAN(MMD_GAN):
def __init__(self, sess, config, **kwargs):
config.dof_dim = 1
super(GAN, self).__init__(sess, config, **kwargs)
def delete_diag(self, matrix):
return matrix - tf.matrix_diag(tf.matrix_diag_part(matrix))
d... | true | true |
1c3d4c2ed54ce2e0ed54a95ec8d7a7dc8f7fbf41 | 759 | py | Python | September-2020-Challange/RobotBoundedInCircle.py | Hemant-60/leetcode-solutions | 2e0a96a148424288bad55a699137a8da16d756d8 | [
"MIT"
] | null | null | null | September-2020-Challange/RobotBoundedInCircle.py | Hemant-60/leetcode-solutions | 2e0a96a148424288bad55a699137a8da16d756d8 | [
"MIT"
] | null | null | null | September-2020-Challange/RobotBoundedInCircle.py | Hemant-60/leetcode-solutions | 2e0a96a148424288bad55a699137a8da16d756d8 | [
"MIT"
] | null | null | null | '''
https://leetcode.com/explore/challenge/card/september-leetcoding-challenge/556/week-3-september-15th-september-21st/3463/
'''
class Solution:
def isRobotBounded(self, instructions: str) -> bool:
instructions*=4
x,y=0,0
d=0
for i in instructions:
if i=="G":
... | 26.172414 | 121 | 0.386034 | class Solution:
def isRobotBounded(self, instructions: str) -> bool:
instructions*=4
x,y=0,0
d=0
for i in instructions:
if i=="G":
if d==0:
y+=1
elif d==1:
x+=1
elif d==2:
... | true | true |
1c3d4c3f4b64985968dbd1fd640769278c1a42f4 | 167 | py | Python | Requests.py | Guilehm/python | ce6f8b44623cc25e9b18b2dbf8e0528096f0de96 | [
"MIT"
] | null | null | null | Requests.py | Guilehm/python | ce6f8b44623cc25e9b18b2dbf8e0528096f0de96 | [
"MIT"
] | null | null | null | Requests.py | Guilehm/python | ce6f8b44623cc25e9b18b2dbf8e0528096f0de96 | [
"MIT"
] | null | null | null | import bs4
import requests
res = requests.get("http://nostarch.com")
res.raise_for_status()
no_starch_soup = bs4.BeautifulSoup(res.text, "lxml")
type(no_starch_soup)
| 20.875 | 52 | 0.778443 | import bs4
import requests
res = requests.get("http://nostarch.com")
res.raise_for_status()
no_starch_soup = bs4.BeautifulSoup(res.text, "lxml")
type(no_starch_soup)
| true | true |
1c3d4cc98e4b238d4eaca37734936299ca1d1d4a | 7,241 | py | Python | lackey/SettingsDebug.py | Inobitec/lackey | 1ea404a3e003f0ef4dcaa8879ab02b1f568fa0a2 | [
"MIT"
] | 599 | 2016-08-15T22:51:53.000Z | 2022-03-29T16:16:34.000Z | lackey/SettingsDebug.py | Inobitec/lackey | 1ea404a3e003f0ef4dcaa8879ab02b1f568fa0a2 | [
"MIT"
] | 129 | 2016-08-16T11:11:52.000Z | 2021-10-20T20:55:40.000Z | lackey/SettingsDebug.py | Inobitec/lackey | 1ea404a3e003f0ef4dcaa8879ab02b1f568fa0a2 | [
"MIT"
] | 89 | 2016-08-16T01:33:27.000Z | 2021-12-09T15:40:58.000Z | """ Defines Settings and Debug objects """
import datetime
import os
import __main__
from io import open # For Python 2 native line endings compatibility
from ._version import __version__, __sikuli_version__
class DebugMaster(object):
""" Used to create the global Debug object """
_log_file = None
_debug... | 37.518135 | 99 | 0.622704 | import datetime
import os
import __main__
from io import open
from ._version import __version__, __sikuli_version__
class DebugMaster(object):
_log_file = None
_debug_level = 0
_logger = None
_logger_no_prefix = False
_logger_methods = {
"user": None,
"info": None,
"actio... | true | true |
1c3d4ebe50c51b815237b9fb1c23c644676fa21d | 583 | py | Python | get_magnet/get_magnet.py | samuelyeungkc/PythonToolBox | fba65bd87239ede54e9a206cd4a90344723d619d | [
"MIT"
] | null | null | null | get_magnet/get_magnet.py | samuelyeungkc/PythonToolBox | fba65bd87239ede54e9a206cd4a90344723d619d | [
"MIT"
] | null | null | null | get_magnet/get_magnet.py | samuelyeungkc/PythonToolBox | fba65bd87239ede54e9a206cd4a90344723d619d | [
"MIT"
] | null | null | null | import bencode, hashlib, base64, urllib
import os
def get_magnet(file_name):
torrent = open(file_name, 'rb').read()
metadata = bencode.bdecode(torrent)
hash_info = metadata['info']
hash_info = hashlib.sha1(bencode.bencode(hash_info)).hexdigest()
magnet = "magnet:?xt=urn:btih:" +... | 25.347826 | 72 | 0.634648 | import bencode, hashlib, base64, urllib
import os
def get_magnet(file_name):
torrent = open(file_name, 'rb').read()
metadata = bencode.bdecode(torrent)
hash_info = metadata['info']
hash_info = hashlib.sha1(bencode.bencode(hash_info)).hexdigest()
magnet = "magnet:?xt=urn:btih:" +... | false | true |
1c3d4ec652a2568c320b45c563710338231997a6 | 4,843 | py | Python | coopihc/space/State.py | jgori-ouistiti/interaction-agents | 922d9bddb2b14784e32c4639b66cec302e80e13a | [
"MIT"
] | null | null | null | coopihc/space/State.py | jgori-ouistiti/interaction-agents | 922d9bddb2b14784e32c4639b66cec302e80e13a | [
"MIT"
] | 5 | 2021-11-22T12:46:09.000Z | 2021-11-23T08:50:28.000Z | coopihc/space/State.py | jgori-ouistiti/interaction-agents | 922d9bddb2b14784e32c4639b66cec302e80e13a | [
"MIT"
] | null | null | null | from collections import OrderedDict
import copy
import json
from tabulate import tabulate
from coopihc.helpers import flatten
from coopihc.space.StateElement import StateElement
class State(OrderedDict):
"""The container that defines states.
:param \*args: Same as collections.OrderedDict
:param \*\*kwar... | 34.347518 | 261 | 0.57898 | from collections import OrderedDict
import copy
import json
from tabulate import tabulate
from coopihc.helpers import flatten
from coopihc.space.StateElement import StateElement
class State(OrderedDict):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __bool__(self):
... | true | true |
1c3d4f9866486f59fb4018f6f042524170113483 | 2,699 | py | Python | encoder.py | EthanHolleman/ImageToBlink | fcb6a98881fc619053df771b867204ef68663671 | [
"MIT"
] | null | null | null | encoder.py | EthanHolleman/ImageToBlink | fcb6a98881fc619053df771b867204ef68663671 | [
"MIT"
] | null | null | null | encoder.py | EthanHolleman/ImageToBlink | fcb6a98881fc619053df771b867204ef68663671 | [
"MIT"
] | null | null | null | from pathlib import Path
from PIL import Image
import argparse
MORSE_CODE_DICT = { 'A':'.-', 'B':'-...',
'C':'-.-.', 'D':'-..', 'E':'.',
'F':'..-.', 'G':'--.', 'H':'....',
'I':'..', 'J':'.---', 'K':'-.-',
'L':'.-..', 'M':'--', 'N':'-.',
... | 26.722772 | 107 | 0.479807 | from pathlib import Path
from PIL import Image
import argparse
MORSE_CODE_DICT = { 'A':'.-', 'B':'-...',
'C':'-.-.', 'D':'-..', 'E':'.',
'F':'..-.', 'G':'--.', 'H':'....',
'I':'..', 'J':'.---', 'K':'-.-',
'L':'.-..', 'M':'--', 'N':'-.',
... | true | true |
1c3d507588957cb770b1475e4e60a2940b5e89c9 | 1,888 | py | Python | tests/test_loadfile.py | HebertWP/star_tracker | 4d6fe9e353222f22d0b8e0cfc823be51a7110d43 | [
"MIT"
] | null | null | null | tests/test_loadfile.py | HebertWP/star_tracker | 4d6fe9e353222f22d0b8e0cfc823be51a7110d43 | [
"MIT"
] | null | null | null | tests/test_loadfile.py | HebertWP/star_tracker | 4d6fe9e353222f22d0b8e0cfc823be51a7110d43 | [
"MIT"
] | null | null | null | from numpy.core.fromnumeric import size
import pandas
import pytest
import star_tracker.modules.loadfile as loadfile
from star_tracker.modules.loadfile import Movements
import matplotlib.pyplot as plt
def test_dat2csv():
loadfile.dat2csv("data/hip_main.dat","data/stars.csv")
try:
stars = pandas.read_cs... | 29.968254 | 82 | 0.613877 | from numpy.core.fromnumeric import size
import pandas
import pytest
import star_tracker.modules.loadfile as loadfile
from star_tracker.modules.loadfile import Movements
import matplotlib.pyplot as plt
def test_dat2csv():
loadfile.dat2csv("data/hip_main.dat","data/stars.csv")
try:
stars = pandas.read_cs... | true | true |
1c3d515dc82a173678d8019dedc9374c6cc4ecb4 | 835 | py | Python | qika/apps/apis/urls.py | XiYanXian/qikaACG | a465c211ed0f77263d8eca33a3422592b80010e4 | [
"Apache-2.0"
] | 6 | 2020-04-18T13:21:52.000Z | 2021-05-28T04:59:15.000Z | qika/apps/apis/urls.py | XiYanXian/qikaACG | a465c211ed0f77263d8eca33a3422592b80010e4 | [
"Apache-2.0"
] | 7 | 2020-06-05T22:36:33.000Z | 2022-03-11T23:57:38.000Z | qika/apps/apis/urls.py | XiYanXian/qikaACG | a465c211ed0f77263d8eca33a3422592b80010e4 | [
"Apache-2.0"
] | 1 | 2020-04-09T06:34:52.000Z | 2020-04-09T06:34:52.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^get_captcha/$', views.get_captcha, name='get_captcha'),
url(r'^check_captcha/$', views.check_captcha, name='check_captcha'),
url(r'^get_email_captcha/$', views.get_email_captcha, name='get_email_captcha'),
# url(r'^get_tag/(?P<... | 59.642857 | 107 | 0.68024 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^get_captcha/$', views.get_captcha, name='get_captcha'),
url(r'^check_captcha/$', views.check_captcha, name='check_captcha'),
url(r'^get_email_captcha/$', views.get_email_captcha, name='get_email_captcha'),
url(r'^anime/jud... | true | true |
1c3d52e2d6e1a6c76243ded117172f26cd1054ad | 6,499 | py | Python | setup.py | bunjiboys/lemur | b5fd8020055d8af07bd6f82f4dd38246dca8d0c5 | [
"Apache-2.0"
] | null | null | null | setup.py | bunjiboys/lemur | b5fd8020055d8af07bd6f82f4dd38246dca8d0c5 | [
"Apache-2.0"
] | 2 | 2020-04-03T09:28:20.000Z | 2020-04-04T04:56:35.000Z | setup.py | bunjiboys/lemur | b5fd8020055d8af07bd6f82f4dd38246dca8d0c5 | [
"Apache-2.0"
] | null | null | null | """
Lemur
=====
Is a TLS management and orchestration tool.
:copyright: (c) 2015 by Netflix, see AUTHORS for more
:license: Apache, see LICENSE for more details.
"""
from __future__ import absolute_import
import sys
import json
import os.path
import datetime
from distutils import log
from distutils.core import Comm... | 31.548544 | 105 | 0.646561 | from __future__ import absolute_import
import sys
import json
import os.path
import datetime
from distutils import log
from distutils.core import Command
from setuptools.command.develop import develop
from setuptools.command.install import install
from setuptools.command.sdist import sdist
from setuptools import setu... | true | true |
1c3d53f64d0e29b0ac2bdfffd3f13563d7105b61 | 7,660 | py | Python | src/python/pants/backend/python/util_rules/lockfile_metadata.py | ArthV/pants | 0aa7f290ed390ab3ceba0c44e4b38354d7a41d3d | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/util_rules/lockfile_metadata.py | ArthV/pants | 0aa7f290ed390ab3ceba0c44e4b38354d7a41d3d | [
"Apache-2.0"
] | 1 | 2022-02-22T18:15:03.000Z | 2022-02-22T18:15:03.000Z | src/python/pants/backend/python/util_rules/lockfile_metadata.py | ryanking/pants | e45b00d2eb467b599966bca262405a5d74d27bdd | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from dataclasses import dataclass
from enum import Enum
from typing import Any, Iterable, Set, cast
from pants.backend.python.pip_requirement import Pi... | 37.004831 | 100 | 0.716841 |
from __future__ import annotations
from dataclasses import dataclass
from enum import Enum
from typing import Any, Iterable, Set, cast
from pants.backend.python.pip_requirement import PipRequirement
from pants.backend.python.util_rules.interpreter_constraints import InterpreterConstraints
from pants.core.util_rule... | true | true |
1c3d547ec6954483f16bc8fd0fe87d1b95355936 | 1,602 | py | Python | DailyProgrammer/DP20150102.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | 2 | 2020-12-23T18:59:22.000Z | 2021-04-14T13:16:09.000Z | DailyProgrammer/DP20150102.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | DailyProgrammer/DP20150102.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | """
[2015-01-02] Challenge #195 [All] 2015 Prep Work
https://www.reddit.com/r/dailyprogrammer/comments/2r4wal/20150102_challenge_195_all_2015_prep_work/
#Description:
As we enter a new year it is a good time to get organized and be ready. One thing I have noticed as you use this
subreddit and finish challenges you re... | 43.297297 | 119 | 0.764669 |
def main():
pass
if __name__ == "__main__":
main()
| true | true |
1c3d54a0f76b5eb3ede1d76a0f91483a3678702e | 11,037 | py | Python | aliyun/log/es_migration/mapping_index_converter.py | topdown618/aliyun-log-python-sdk | 395949a5c307722e8223d926b366c50dacd32126 | [
"MIT"
] | 130 | 2017-03-31T07:41:46.000Z | 2022-03-27T14:31:22.000Z | aliyun/log/es_migration/mapping_index_converter.py | topdown618/aliyun-log-python-sdk | 395949a5c307722e8223d926b366c50dacd32126 | [
"MIT"
] | 170 | 2017-02-17T06:07:31.000Z | 2022-03-17T02:32:42.000Z | aliyun/log/es_migration/mapping_index_converter.py | topdown618/aliyun-log-python-sdk | 395949a5c307722e8223d926b366c50dacd32126 | [
"MIT"
] | 111 | 2017-01-16T07:35:01.000Z | 2022-03-18T03:31:32.000Z | #!/usr/bin/env python
# encoding: utf-8
# Copyright (C) Alibaba Cloud Computing
# All rights reserved.
from .. import IndexConfig, IndexKeyConfig, IndexLineConfig
from ..index_config import IndexJsonKeyConfig
class AliyunLogFieldType(object):
TEXT = "text"
LONG = "long"
DOUBLE = "double"
JSON = "js... | 36.425743 | 118 | 0.668388 |
from .. import IndexConfig, IndexKeyConfig, IndexLineConfig
from ..index_config import IndexJsonKeyConfig
class AliyunLogFieldType(object):
TEXT = "text"
LONG = "long"
DOUBLE = "double"
JSON = "json"
class DocRangeComparator(object):
GT = "gt"
LT = "lt"
GTE = "gte"
LTE = "lte"... | true | true |
1c3d54b4dc476b0348ec7eb0d061e0cb6a18ca07 | 1,514 | py | Python | raid/models.py | valdergallo/raidmanager | 8e4877cd2b10de98ba7b1e2c51719b7ff0532858 | [
"MIT"
] | null | null | null | raid/models.py | valdergallo/raidmanager | 8e4877cd2b10de98ba7b1e2c51719b7ff0532858 | [
"MIT"
] | 4 | 2016-04-03T12:32:30.000Z | 2016-10-31T09:54:42.000Z | raid/models.py | valdergallo/raidmanager | 8e4877cd2b10de98ba7b1e2c51719b7ff0532858 | [
"MIT"
] | null | null | null | # encoding: utf-8
from django.db import models
from core.models import DifficultType
from core.models import Game
class Raid(models.Model):
image = models.ImageField(upload_to="/raid/", null=True, blank=True)
game = models.ForeignKey(Game)
name = models.CharField(blank=True, max_length=100)
lvl = mode... | 32.212766 | 78 | 0.725231 |
from django.db import models
from core.models import DifficultType
from core.models import Game
class Raid(models.Model):
image = models.ImageField(upload_to="/raid/", null=True, blank=True)
game = models.ForeignKey(Game)
name = models.CharField(blank=True, max_length=100)
lvl = models.IntegerField(b... | true | true |
1c3d567557b7171435429acec713b61a7ee8c9ac | 5,303 | py | Python | tests/func/experiments/test_checkpoints.py | Honzys/dvc | 8205c84077a7e07b48c768d07710108078a78149 | [
"Apache-2.0"
] | null | null | null | tests/func/experiments/test_checkpoints.py | Honzys/dvc | 8205c84077a7e07b48c768d07710108078a78149 | [
"Apache-2.0"
] | null | null | null | tests/func/experiments/test_checkpoints.py | Honzys/dvc | 8205c84077a7e07b48c768d07710108078a78149 | [
"Apache-2.0"
] | null | null | null | import pytest
from funcy import first
from dvc.exceptions import DvcException
from dvc.repo.experiments import MultipleBranchError
from dvc.repo.experiments.base import EXEC_APPLY, EXEC_CHECKPOINT
@pytest.mark.parametrize("workspace", [True, False])
def test_new_checkpoint(
tmp_dir, scm, dvc, checkpoint_stage, m... | 31.754491 | 78 | 0.633981 | import pytest
from funcy import first
from dvc.exceptions import DvcException
from dvc.repo.experiments import MultipleBranchError
from dvc.repo.experiments.base import EXEC_APPLY, EXEC_CHECKPOINT
@pytest.mark.parametrize("workspace", [True, False])
def test_new_checkpoint(
tmp_dir, scm, dvc, checkpoint_stage, m... | true | true |
1c3d56a96ec47934370b4f3ce4d6b0b21d197197 | 9,334 | py | Python | stix2elevator/ids.py | sthagen/oasis-open-cti-stix-elevator | e41f0870b3d77f4023c1a30224e681d6759b32e9 | [
"BSD-3-Clause"
] | null | null | null | stix2elevator/ids.py | sthagen/oasis-open-cti-stix-elevator | e41f0870b3d77f4023c1a30224e681d6759b32e9 | [
"BSD-3-Clause"
] | null | null | null | stix2elevator/ids.py | sthagen/oasis-open-cti-stix-elevator | e41f0870b3d77f4023c1a30224e681d6759b32e9 | [
"BSD-3-Clause"
] | null | null | null | # Standard Library
import importlib
import inspect
import re
import uuid
# external
from stix2.base import SCO_DET_ID_NAMESPACE
from stix2.canonicalization.Canonicalize import canonicalize
# internal
from stix2elevator.options import error, info, warn
from stix2elevator.utils import (find_key_in_dict_case_insensitive... | 33.217082 | 117 | 0.666702 |
import importlib
import inspect
import re
import uuid
from stix2.base import SCO_DET_ID_NAMESPACE
from stix2.canonicalization.Canonicalize import canonicalize
from stix2elevator.options import error, info, warn
from stix2elevator.utils import (find_key_in_dict_case_insensitive,
fin... | true | true |
1c3d5854ce1b5e633e52d9736a355665d451aa44 | 11,805 | py | Python | py3.7/multiprocess/synchronize.py | UniverseFly/multiprocess | 97f67493eccfb893ac1bba7285cf452bfc640211 | [
"BSD-3-Clause"
] | 356 | 2015-06-21T21:05:10.000Z | 2022-03-30T11:57:08.000Z | py3.7/multiprocess/synchronize.py | UniverseFly/multiprocess | 97f67493eccfb893ac1bba7285cf452bfc640211 | [
"BSD-3-Clause"
] | 103 | 2015-06-22T01:44:14.000Z | 2022-03-01T03:44:25.000Z | py3.7/multiprocess/synchronize.py | UniverseFly/multiprocess | 97f67493eccfb893ac1bba7285cf452bfc640211 | [
"BSD-3-Clause"
] | 72 | 2015-09-02T14:10:24.000Z | 2022-03-25T06:49:43.000Z | #
# Module implementing synchronization primitives
#
# multiprocessing/synchronize.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
__all__ = [
'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', 'Event'
]
import threading
import sys
import tempfile
try:
... | 29.365672 | 82 | 0.587802 |
__all__ = [
'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', 'Event'
]
import threading
import sys
import tempfile
try:
import _multiprocess as _multiprocessing
except ImportError:
import _multiprocessing
import time
from . import context
from . import process
from . import uti... | true | true |
1c3d59573d7b8a95a19ab3576338b1d3c75031c9 | 374 | py | Python | data/syn_project/types/syn_project.py | ki-tools/sls_ki_synapse | 8c726a9ec568e3d416049a8813c21bbe87740f16 | [
"Apache-2.0"
] | 1 | 2018-11-21T19:54:34.000Z | 2018-11-21T19:54:34.000Z | data/syn_project/types/syn_project.py | pcstout/sls_ki_synapse | 8c726a9ec568e3d416049a8813c21bbe87740f16 | [
"Apache-2.0"
] | 5 | 2019-03-12T16:44:35.000Z | 2019-03-15T21:46:00.000Z | data/syn_project/types/syn_project.py | ki-tools/sls_ki_synapse | 8c726a9ec568e3d416049a8813c21bbe87740f16 | [
"Apache-2.0"
] | 2 | 2019-02-28T23:16:32.000Z | 2019-03-05T22:16:39.000Z | import graphene
class SynProject(graphene.ObjectType):
"""
Defines the SynProject type.
"""
id = graphene.String()
name = graphene.String()
@staticmethod
def from_project(project):
"""
Converts a Project to a SynProject.
"""
return SynProject(
i... | 18.7 | 43 | 0.561497 | import graphene
class SynProject(graphene.ObjectType):
id = graphene.String()
name = graphene.String()
@staticmethod
def from_project(project):
return SynProject(
id=project.id,
name=project.name
)
| true | true |
1c3d5a6ebd1c0006e61e5a5b298a6d7a1a73038f | 37,683 | py | Python | locust/stats.py | sachajw/locust-template | 27a6aca87865f68073245e48851b41f55cd7580e | [
"MIT"
] | 1 | 2021-10-22T02:58:36.000Z | 2021-10-22T02:58:36.000Z | locust/stats.py | sachajw/locust-template | 27a6aca87865f68073245e48851b41f55cd7580e | [
"MIT"
] | null | null | null | locust/stats.py | sachajw/locust-template | 27a6aca87865f68073245e48851b41f55cd7580e | [
"MIT"
] | 1 | 2020-07-21T10:49:05.000Z | 2020-07-21T10:49:05.000Z | import datetime
import hashlib
import time
from collections import namedtuple, OrderedDict
from copy import copy
from itertools import chain
import csv
import gevent
from .exception import StopUser, CatchResponseError
import logging
console_logger = logging.getLogger("locust.stats_logger")
STATS_NAME_WIDTH = 60
ST... | 37.346878 | 152 | 0.637343 | import datetime
import hashlib
import time
from collections import namedtuple, OrderedDict
from copy import copy
from itertools import chain
import csv
import gevent
from .exception import StopUser, CatchResponseError
import logging
console_logger = logging.getLogger("locust.stats_logger")
STATS_NAME_WIDTH = 60
ST... | true | true |
1c3d5b63e29d303fe4319d611e1cb9cb2f223b5f | 17,264 | py | Python | python3-virtualenv/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py | GinaJame/Portfolio_MLH | 541709dcf034ddca885a8b08f9922dc352c113f8 | [
"MIT"
] | null | null | null | python3-virtualenv/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py | GinaJame/Portfolio_MLH | 541709dcf034ddca885a8b08f9922dc352c113f8 | [
"MIT"
] | null | null | null | python3-virtualenv/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py | GinaJame/Portfolio_MLH | 541709dcf034ddca885a8b08f9922dc352c113f8 | [
"MIT"
] | null | null | null | import collections
import operator
from .providers import AbstractResolver
from .structs import DirectedGraph, IteratorMapping, build_iter_view
RequirementInformation = collections.namedtuple(
"RequirementInformation", ["requirement", "parent"]
)
class ResolverException(Exception):
"""A base class for all ... | 36.498943 | 88 | 0.61301 | import collections
import operator
from .providers import AbstractResolver
from .structs import DirectedGraph, IteratorMapping, build_iter_view
RequirementInformation = collections.namedtuple(
"RequirementInformation", ["requirement", "parent"]
)
class ResolverException(Exception):
class RequirementsConflict... | true | true |
1c3d5c3404bc6866d1ac21408009487b6f2e969d | 27,540 | py | Python | test/integration/run_gadgetron_test.py | roopchansinghv/gadgetron | fb6c56b643911152c27834a754a7b6ee2dd912da | [
"MIT"
] | 1 | 2022-02-22T21:06:36.000Z | 2022-02-22T21:06:36.000Z | test/integration/run_gadgetron_test.py | apd47/gadgetron | 073e84dabe77d2dae3b3dd9aa4bf9edbf1f890f2 | [
"MIT"
] | null | null | null | test/integration/run_gadgetron_test.py | apd47/gadgetron | 073e84dabe77d2dae3b3dd9aa4bf9edbf1f890f2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
# Importing h5py on windows will mess with your environment. When we pass the messed up environment to gadgetron
# child processes, they won't load properly. We're saving our environment here to spare our children from the
# crimes of h5py.
environment = dict(os.environ)
import sys
impor... | 37.418478 | 119 | 0.607444 |
import os
environment = dict(os.environ)
import sys
import glob
import shutil
import argparse
import configparser
import re
import time
import functools
import json
import h5py
import numpy
import string
import ismrmrd
import pathlib
import tempfile
import itertools
import subprocess
import urllib.request
imp... | true | true |
1c3d5ce8337d153b0bd294bc07abaa6df5186e88 | 9,570 | py | Python | braintree/customer.py | whitemike889/braintree_python | fc98c738f9e74736a7d1e82cfb4e37f6e493c3c4 | [
"MIT"
] | 1 | 2020-06-14T20:47:02.000Z | 2020-06-14T20:47:02.000Z | braintree/customer.py | whitemike889/braintree_python | fc98c738f9e74736a7d1e82cfb4e37f6e493c3c4 | [
"MIT"
] | null | null | null | braintree/customer.py | whitemike889/braintree_python | fc98c738f9e74736a7d1e82cfb4e37f6e493c3c4 | [
"MIT"
] | null | null | null | import warnings
from braintree.util.http import Http
from braintree.successful_result import SuccessfulResult
from braintree.error_result import ErrorResult
from braintree.resource import Resource
from braintree.apple_pay_card import ApplePayCard
from braintree.android_pay_card import AndroidPayCard
from braintree.amex... | 37.677165 | 204 | 0.611285 | import warnings
from braintree.util.http import Http
from braintree.successful_result import SuccessfulResult
from braintree.error_result import ErrorResult
from braintree.resource import Resource
from braintree.apple_pay_card import ApplePayCard
from braintree.android_pay_card import AndroidPayCard
from braintree.amex... | true | true |
1c3d5d91e7c478f3d324f0825e4b7d9274a80813 | 6,582 | py | Python | tests/attacks/test_pixel_attack.py | monshri/adversarial-robustness-toolbox | 6465240cb6a71bc376dae52459a7133e403df8d2 | [
"MIT"
] | 1,350 | 2020-07-14T08:06:55.000Z | 2022-03-31T19:22:25.000Z | tests/attacks/test_pixel_attack.py | monshri/adversarial-robustness-toolbox | 6465240cb6a71bc376dae52459a7133e403df8d2 | [
"MIT"
] | 936 | 2020-07-14T03:33:00.000Z | 2022-03-31T23:05:29.000Z | tests/attacks/test_pixel_attack.py | monshri/adversarial-robustness-toolbox | 6465240cb6a71bc376dae52459a7133e403df8d2 | [
"MIT"
] | 413 | 2020-07-16T16:00:16.000Z | 2022-03-29T10:31:12.000Z | # MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020
#
# 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
# r... | 37.827586 | 120 | 0.679277 |
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import unittest
import numpy as np
from art.attacks.evasion.pixel_threshold import PixelAttack
from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
from art.estimators.classification.c... | true | true |
1c3d5eb7c80c1912eeacea21525eb51e77e0be39 | 643 | py | Python | aether-kernel/aether/kernel/api/migrations/0018_schema_family.py | lordmallam/aether | 7ceb71d2ef8b09d704d94dfcb243dbbdf8356135 | [
"Apache-2.0"
] | 14 | 2018-08-09T20:57:16.000Z | 2020-10-11T12:22:18.000Z | aether-kernel/aether/kernel/api/migrations/0018_schema_family.py | lordmallam/aether | 7ceb71d2ef8b09d704d94dfcb243dbbdf8356135 | [
"Apache-2.0"
] | 148 | 2018-07-24T10:52:29.000Z | 2022-02-10T09:06:44.000Z | aether-kernel/aether/kernel/api/migrations/0018_schema_family.py | lordmallam/aether | 7ceb71d2ef8b09d704d94dfcb243dbbdf8356135 | [
"Apache-2.0"
] | 6 | 2018-07-25T13:33:10.000Z | 2019-09-23T03:02:09.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-12 08:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kernel', '0017_mappingset_schema'),
]
operations = [
migrations.AddField(
... | 24.730769 | 86 | 0.598756 |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kernel', '0017_mappingset_schema'),
]
operations = [
migrations.AddField(
model_name='schema',
name='family',
... | true | true |
1c3d603eafc033d2dc37bac7a9d0c37fbf367d54 | 38,041 | py | Python | test/functional/test_framework/messages.py | bitcoinpostquantum/bitcoinpq | 28a1f3ce998e5b37b52e0505e1f7ab18a4b785a7 | [
"MIT"
] | 1 | 2020-09-29T20:01:39.000Z | 2020-09-29T20:01:39.000Z | test/functional/test_framework/messages.py | bitcoinpostquantum/bitcoinpq | 28a1f3ce998e5b37b52e0505e1f7ab18a4b785a7 | [
"MIT"
] | null | null | null | test/functional/test_framework/messages.py | bitcoinpostquantum/bitcoinpq | 28a1f3ce998e5b37b52e0505e1f7ab18a4b785a7 | [
"MIT"
] | 3 | 2022-01-09T03:01:47.000Z | 2022-02-18T08:20:08.000Z | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-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.
"""BPQ test fra... | 29.061115 | 262 | 0.598144 |
from codecs import encode
import copy
import hashlib
from io import BytesIO
import random
import socket
import struct
import time
from test_framework.siphash import siphash256
from test_framework.util import hex_str_to_bytes, bytes_to_hex_str
MIN_VERSION_SUPPORTED = 60001
MY_VERSION = 70014
MY_SUBVERSION = b"... | true | true |
1c3d60eea03b50d337e15984b0d2dd59edf67ff1 | 46,275 | py | Python | src/auto-posture-evaluator/testers/elb_tester.py | harikarthickm/coralogix-aws-serverless | c49dddacf1fcf0806c519246b6cd8d3bbc65e347 | [
"Apache-2.0"
] | null | null | null | src/auto-posture-evaluator/testers/elb_tester.py | harikarthickm/coralogix-aws-serverless | c49dddacf1fcf0806c519246b6cd8d3bbc65e347 | [
"Apache-2.0"
] | null | null | null | src/auto-posture-evaluator/testers/elb_tester.py | harikarthickm/coralogix-aws-serverless | c49dddacf1fcf0806c519246b6cd8d3bbc65e347 | [
"Apache-2.0"
] | null | null | null | import os
from datetime import datetime
import time
from typing import Dict, List
import interfaces
import boto3
import jmespath
class Tester(interfaces.TesterInterface):
def __init__(self) -> None:
self.user_id = boto3.client('sts').get_caller_identity().get('UserId')
self.account_arn = boto3.clie... | 43.614515 | 156 | 0.453982 | import os
from datetime import datetime
import time
from typing import Dict, List
import interfaces
import boto3
import jmespath
class Tester(interfaces.TesterInterface):
def __init__(self) -> None:
self.user_id = boto3.client('sts').get_caller_identity().get('UserId')
self.account_arn = boto3.clie... | true | true |
1c3d616d9b31e5f507f82458b800ff768536db33 | 2,044 | py | Python | chatserver/views.py | unix2315/redis_test | ebb63c6a91b50e7c86671722bcea6ea317f834fb | [
"MIT"
] | 815 | 2015-01-04T03:02:03.000Z | 2022-03-18T21:48:48.000Z | chatserver/views.py | unix2315/redis_test | ebb63c6a91b50e7c86671722bcea6ea317f834fb | [
"MIT"
] | 213 | 2015-01-06T14:15:32.000Z | 2022-01-28T17:35:45.000Z | chatserver/views.py | unix2315/redis_test | ebb63c6a91b50e7c86671722bcea6ea317f834fb | [
"MIT"
] | 253 | 2015-01-02T16:38:15.000Z | 2022-03-30T20:43:58.000Z | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User, Group
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
from ws4redis.redis_store import RedisMessage
from ws4redis.publisher import RedisPublisher
class Broa... | 37.163636 | 101 | 0.707436 |
from django.contrib.auth.models import User, Group
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
from ws4redis.redis_store import RedisMessage
from ws4redis.publisher import RedisPublisher
class BroadcastChatView(TemplateV... | true | true |
1c3d63160ebc0604481f017ea29772c45ece71be | 19,104 | py | Python | tests/test_tamper.py | tgragnato/geneva | 2fc5b2f2f4766278902cff25af50b753d1d26a76 | [
"BSD-3-Clause"
] | 1,182 | 2019-11-15T02:56:47.000Z | 2022-03-30T16:09:04.000Z | tests/test_tamper.py | Nekotekina/geneva | 3eb6b7342f9afd7add1f4aba9e2aadf0b9a5f196 | [
"BSD-3-Clause"
] | 21 | 2019-11-15T15:08:02.000Z | 2022-01-03T16:22:45.000Z | tests/test_tamper.py | Nekotekina/geneva | 3eb6b7342f9afd7add1f4aba9e2aadf0b9a5f196 | [
"BSD-3-Clause"
] | 102 | 2019-11-15T15:01:07.000Z | 2022-03-30T13:52:47.000Z | import copy
import sys
import pytest
import random
# Include the root of the project
sys.path.append("..")
import evolve
import evaluator
import actions.strategy
import layers.packet
import actions.utils
import actions.tamper
import layers.layer
import layers.ip_layer
from scapy.all import IP, TCP, UDP, DNS, DNSQR, s... | 40.907923 | 155 | 0.674361 | import copy
import sys
import pytest
import random
sys.path.append("..")
import evolve
import evaluator
import actions.strategy
import layers.packet
import actions.utils
import actions.tamper
import layers.layer
import layers.ip_layer
from scapy.all import IP, TCP, UDP, DNS, DNSQR, sr1
def test_tamper(logger):
... | true | true |
1c3d634009757d91c5cb50e92fdaecc80830d012 | 9,568 | py | Python | predict/predict_3D.py | vcarlosrb/STRAPS-3DHumanShapePose | a62853a7c0831d5a54c56e707d231f5300d20fda | [
"MIT"
] | 1 | 2021-02-02T16:17:52.000Z | 2021-02-02T16:17:52.000Z | predict/predict_3D.py | vcarlosrb/STRAPS-3DHumanShapePose | a62853a7c0831d5a54c56e707d231f5300d20fda | [
"MIT"
] | null | null | null | predict/predict_3D.py | vcarlosrb/STRAPS-3DHumanShapePose | a62853a7c0831d5a54c56e707d231f5300d20fda | [
"MIT"
] | null | null | null | import os
import cv2
import numpy as np
import torch
from smplx.lbs import batch_rodrigues
from detectron2.config import get_cfg
from detectron2 import model_zoo
from detectron2.engine import DefaultPredictor
from PointRend.point_rend import add_pointrend_config
from DensePose.densepose import add_densepose_config
fr... | 48.080402 | 112 | 0.621342 | import os
import cv2
import numpy as np
import torch
from smplx.lbs import batch_rodrigues
from detectron2.config import get_cfg
from detectron2 import model_zoo
from detectron2.engine import DefaultPredictor
from PointRend.point_rend import add_pointrend_config
from DensePose.densepose import add_densepose_config
fr... | true | true |
1c3d634f09c3b24055fd877e50bdd500aed84c8a | 7,102 | py | Python | denonavr/appcommand.py | prcutler/denonavr | f786dedf7a1ba3c4c2374a65737cf18721593c0c | [
"MIT"
] | 121 | 2016-11-26T14:08:08.000Z | 2021-07-14T21:14:55.000Z | denonavr/appcommand.py | prcutler/denonavr | f786dedf7a1ba3c4c2374a65737cf18721593c0c | [
"MIT"
] | 211 | 2016-12-20T17:30:32.000Z | 2021-09-21T13:36:34.000Z | denonavr/appcommand.py | prcutler/denonavr | f786dedf7a1ba3c4c2374a65737cf18721593c0c | [
"MIT"
] | 74 | 2016-12-05T23:47:49.000Z | 2021-08-10T10:21:56.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This module implements foundation for AppCommand(0300) of Denon AVR receivers.
:copyright: (c) 2021 by Oliver Goetz.
:license: MIT, see LICENSE for more details.
"""
from typing import Optional, Tuple
import attr
@attr.s(auto_attribs=True, frozen=True)
class AppCo... | 40.816092 | 79 | 0.648268 |
from typing import Optional, Tuple
import attr
@attr.s(auto_attribs=True, frozen=True)
class AppCommandCmdParam:
name: str = attr.ib(converter=str)
text: str = attr.ib(converter=str, default="")
@attr.s(auto_attribs=True, frozen=True)
class AppCommandResponsePattern:
update_attribute: str = attr.i... | true | true |
1c3d63a7d6ce9138a7acce6acf352db5b04edab3 | 873 | py | Python | deployment/generate_parameters.py | adelmer/hipay-fullservice-sdk-ios | 026ed4080b28ed4369735ef778e200f4f6579bf0 | [
"Apache-2.0"
] | null | null | null | deployment/generate_parameters.py | adelmer/hipay-fullservice-sdk-ios | 026ed4080b28ed4369735ef778e200f4f6579bf0 | [
"Apache-2.0"
] | null | null | null | deployment/generate_parameters.py | adelmer/hipay-fullservice-sdk-ios | 026ed4080b28ed4369735ef778e200f4f6579bf0 | [
"Apache-2.0"
] | null | null | null | import plistlib, sys, os
parameters = dict(
hipay=dict(
username = os.environ.get('HIPAY_FULLSERVICE_API_USERNAME', 'xxxxxx'),
password = os.environ.get('HIPAY_FULLSERVICE_API_PASSWORD', 'xxxxxx')
),
hockeyapp=dict(
app_identifier = os.environ.get('HOCKEY_APP_IDENTIFIER', 'xxxxxx'),... | 31.178571 | 78 | 0.725086 | import plistlib, sys, os
parameters = dict(
hipay=dict(
username = os.environ.get('HIPAY_FULLSERVICE_API_USERNAME', 'xxxxxx'),
password = os.environ.get('HIPAY_FULLSERVICE_API_PASSWORD', 'xxxxxx')
),
hockeyapp=dict(
app_identifier = os.environ.get('HOCKEY_APP_IDENTIFIER', 'xxxxxx'),... | true | true |
1c3d63a82fc8b07265f2f99e702fa2ee5fb103b8 | 33,223 | py | Python | tenable/sc/asset_lists.py | mzpqnxow/pyTenable | 3e38e3fb9ecd24b888defd95784b05ad4c5474ec | [
"MIT"
] | null | null | null | tenable/sc/asset_lists.py | mzpqnxow/pyTenable | 3e38e3fb9ecd24b888defd95784b05ad4c5474ec | [
"MIT"
] | 1 | 2021-08-18T17:26:30.000Z | 2021-08-18T17:26:30.000Z | tenable/sc/asset_lists.py | bsinglet/pyTenable | b0cc6919bdc0d5864e8c6cc62ae276a5a54f31fb | [
"MIT"
] | null | null | null | '''
asset_lists
===========
The following methods allow for interaction into the Tenable.sc
:sc-api:`Assets <Asset.html>` API. These items are typically seen
under the **Assets** section of Tenable.sc.
Methods available on ``sc.asset_lists``:
.. rst-class:: hide-signature
.. autoclass:: AssetListAPI
.. automet... | 43.428758 | 107 | 0.54086 | from .base import SCEndpoint
from tenable.errors import UnexpectedValueError
from io import BytesIO
class AssetListAPI(SCEndpoint):
def _dynamic_rules_constructor(self, rule, sub=False):
if isinstance(rule, dict):
return rule
elif isinstance(rule, tuple):
... | true | true |
1c3d63bf838c9704d007fe35733aa5c33a7f3ab7 | 501 | py | Python | rvpy/transformations.py | TimothyKBook/distributions | 301fd61df894d4b300176e287bf9e725378c38eb | [
"MIT"
] | 1 | 2018-06-27T17:22:56.000Z | 2018-06-27T17:22:56.000Z | rvpy/transformations.py | TimothyKBook/distributions | 301fd61df894d4b300176e287bf9e725378c38eb | [
"MIT"
] | null | null | null | rvpy/transformations.py | TimothyKBook/distributions | 301fd61df894d4b300176e287bf9e725378c38eb | [
"MIT"
] | 1 | 2018-06-12T13:38:25.000Z | 2018-06-12T13:38:25.000Z | def log(rv):
"""
Returns the natural logarithm of a random variable
"""
return rv.log()
def exp(rv):
"""
Returns the exponentiation of a random variable
"""
return rv.exp()
def sqrt(rv):
"""
Returns the square root of a random variable
"""
return rv**0.5
def pow(rv, k)... | 16.7 | 54 | 0.57485 | def log(rv):
return rv.log()
def exp(rv):
return rv.exp()
def sqrt(rv):
return rv**0.5
def pow(rv, k):
return rv**k
def abs(rv):
return rv.abs()
| true | true |
1c3d63f3ca3f863d5ff4c28c90d4cd50d9d151b5 | 277 | py | Python | examples/protocols/adherent/app/decorators.py | pauleveritt/viewdom_wired | 40d8f2f190a12bbd07ff957654626001a9f3a778 | [
"MIT"
] | null | null | null | examples/protocols/adherent/app/decorators.py | pauleveritt/viewdom_wired | 40d8f2f190a12bbd07ff957654626001a9f3a778 | [
"MIT"
] | null | null | null | examples/protocols/adherent/app/decorators.py | pauleveritt/viewdom_wired | 40d8f2f190a12bbd07ff957654626001a9f3a778 | [
"MIT"
] | null | null | null | from typing import Callable, Type, TypeVar
protocol = TypeVar("protocol")
def adherent(
c: Callable[[], protocol]
) -> Callable[[Type[protocol]], Type[protocol]]:
def decor(input_value: Type[protocol]) -> Type[protocol]:
return input_value
return decor
| 21.307692 | 61 | 0.68231 | from typing import Callable, Type, TypeVar
protocol = TypeVar("protocol")
def adherent(
c: Callable[[], protocol]
) -> Callable[[Type[protocol]], Type[protocol]]:
def decor(input_value: Type[protocol]) -> Type[protocol]:
return input_value
return decor
| true | true |
1c3d65c4ef650011a667d5d325efd03ccb49af27 | 206 | py | Python | app/api/__init__.py | zhoujiahua/renting | d03da54ffb0cd2da718b7bcd58f84c5b810b8b1c | [
"MIT"
] | 1 | 2021-06-17T15:48:49.000Z | 2021-06-17T15:48:49.000Z | app/api/__init__.py | zhoujiahua/renting | d03da54ffb0cd2da718b7bcd58f84c5b810b8b1c | [
"MIT"
] | null | null | null | app/api/__init__.py | zhoujiahua/renting | d03da54ffb0cd2da718b7bcd58f84c5b810b8b1c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: UTF-8 -*-
from flask import Blueprint
api_comm = Blueprint("api_comm", __name__)
api_user = Blueprint("api_user", __name__)
api_spider = Blueprint("api_spider", __name__)
| 22.888889 | 46 | 0.728155 |
from flask import Blueprint
api_comm = Blueprint("api_comm", __name__)
api_user = Blueprint("api_user", __name__)
api_spider = Blueprint("api_spider", __name__)
| true | true |
1c3d65e23d66f7fb08357d67fde5433ad52fe72a | 4,870 | py | Python | simscale_sdk/models/dimensional_function_specific_turbulence_dissipation_rate.py | slainesimscale/simscale-python-sdk | db483eeabe558e55d020f5f829a3bf13c9c287a7 | [
"MIT"
] | 8 | 2021-01-22T13:41:03.000Z | 2022-01-03T09:00:10.000Z | simscale_sdk/models/dimensional_function_specific_turbulence_dissipation_rate.py | slainesimscale/simscale-python-sdk | db483eeabe558e55d020f5f829a3bf13c9c287a7 | [
"MIT"
] | null | null | null | simscale_sdk/models/dimensional_function_specific_turbulence_dissipation_rate.py | slainesimscale/simscale-python-sdk | db483eeabe558e55d020f5f829a3bf13c9c287a7 | [
"MIT"
] | 3 | 2021-03-18T15:52:52.000Z | 2022-01-03T08:59:30.000Z | # coding: utf-8
"""
SimScale API
The version of the OpenAPI document: 0.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from simscale_sdk.configuration import Configuration
class DimensionalFunctionSpecificTurbulenceDissipationRate(object):
"... | 32.039474 | 109 | 0.62115 |
import pprint
import re
import six
from simscale_sdk.configuration import Configuration
class DimensionalFunctionSpecificTurbulenceDissipationRate(object):
openapi_types = {
'value': 'OneOfDimensionalFunctionSpecificTurbulenceDissipationRateValue',
'unit': 'str'
}
attribute_map =... | true | true |
1c3d65e50e92bf44e266edb19001fb7e5c810282 | 911 | py | Python | sdk/python/pulumi_azure_native/softwareplan/v20191201/outputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/softwareplan/v20191201/outputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/softwareplan/v20191201/outputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"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, overload
from ... import _utilities
__... | 23.973684 | 80 | 0.609221 |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__all__ = [
'SkuResponse',
]
@pulumi.output_type
class SkuResponse(dict):
def __init__(__self__, *,
name: Optional[str] = None):
if n... | true | true |
1c3d65e7288ffeee6db6f9d23112aa55dbf96daa | 4,230 | py | Python | start_alphagoose_trainer.py | IsaiahPressman/Kaggle_Hungry_Geese | f4d9fcb0811704bd339ad5c7ff937dd0d9e25763 | [
"MIT"
] | null | null | null | start_alphagoose_trainer.py | IsaiahPressman/Kaggle_Hungry_Geese | f4d9fcb0811704bd339ad5c7ff937dd0d9e25763 | [
"MIT"
] | null | null | null | start_alphagoose_trainer.py | IsaiahPressman/Kaggle_Hungry_Geese | f4d9fcb0811704bd339ad5c7ff937dd0d9e25763 | [
"MIT"
] | null | null | null | from pathlib import Path
import torch
from torch import nn
from torchvision import transforms
from hungry_geese.training.alphagoose.alphagoose_trainer import AlphaGooseTrainer
from hungry_geese.training.alphagoose.alphagoose_data import AlphaGooseRandomReflect, ChannelShuffle, ToTensor
from hungry_geese.env import goo... | 33.84 | 110 | 0.585106 | from pathlib import Path
import torch
from torch import nn
from torchvision import transforms
from hungry_geese.training.alphagoose.alphagoose_trainer import AlphaGooseTrainer
from hungry_geese.training.alphagoose.alphagoose_data import AlphaGooseRandomReflect, ChannelShuffle, ToTensor
from hungry_geese.env import goo... | true | true |
1c3d666c80b918f85ea80b58fefbf91004de3fcb | 32 | py | Python | src/some_package/module_two.py | tzaffi/pydistro | 34ae5d4aab84400b86fec66f0effc290dbafcf2c | [
"MIT"
] | null | null | null | src/some_package/module_two.py | tzaffi/pydistro | 34ae5d4aab84400b86fec66f0effc290dbafcf2c | [
"MIT"
] | null | null | null | src/some_package/module_two.py | tzaffi/pydistro | 34ae5d4aab84400b86fec66f0effc290dbafcf2c | [
"MIT"
] | null | null | null | def hello2():
print("hello2")
| 10.666667 | 17 | 0.625 | def hello2():
print("hello2")
| true | true |
1c3d66c2a452f2ca03d805588f00d80297b9521d | 3,183 | py | Python | jakarta_pic_and_text_config.py | urbanriskmap/timeseries-analysis | 6b9a8d1a916ff784cb0de93d6997cd072d1ca6ae | [
"MIT"
] | null | null | null | jakarta_pic_and_text_config.py | urbanriskmap/timeseries-analysis | 6b9a8d1a916ff784cb0de93d6997cd072d1ca6ae | [
"MIT"
] | null | null | null | jakarta_pic_and_text_config.py | urbanriskmap/timeseries-analysis | 6b9a8d1a916ff784cb0de93d6997cd072d1ca6ae | [
"MIT"
] | 1 | 2019-07-15T15:19:17.000Z | 2019-07-15T15:19:17.000Z | # Jakarta config: where only those reports with images included
# import this file and then overwrite whatever you need in
# the default_config object
import logging
import pandas as pd
from sqlalchemy import create_engine
DATABASE = "cognicity"
engine = create_engine(
"postgresql://postgres:postgres@localhost:... | 27.921053 | 75 | 0.617342 |
import logging
import pandas as pd
from sqlalchemy import create_engine
DATABASE = "cognicity"
engine = create_engine(
"postgresql://postgres:postgres@localhost:5432/"
+ DATABASE)
LOGGER = logging.getLogger()
LOGGER.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s - %(levelname)s ... | true | true |
1c3d674af6a77e623dc272c1f5a1d79793e2809f | 1,770 | py | Python | search_best.py | thomasg3/energy-price-aware-scheduling | fdde23dff891a382f2f3d8f2b852675832f83e8d | [
"MIT"
] | 1 | 2017-06-29T14:12:25.000Z | 2017-06-29T14:12:25.000Z | search_best.py | thomasg3/energy-price-aware-scheduling | fdde23dff891a382f2f3d8f2b852675832f83e8d | [
"MIT"
] | null | null | null | search_best.py | thomasg3/energy-price-aware-scheduling | fdde23dff891a382f2f3d8f2b852675832f83e8d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import csv
import os
from datetime import datetime, timedelta
results_dir = os.path.join('results', 'runs')
def main():
mini = 0
min_string = ""
start_date = datetime.strptime("2013-01-01", '%Y-%m-%d').date()
for l in [1, 2, 4, 5, 6, 7, 8]:
for d in range(0, 365):
... | 31.607143 | 78 | 0.432203 |
import csv
import os
from datetime import datetime, timedelta
results_dir = os.path.join('results', 'runs')
def main():
mini = 0
min_string = ""
start_date = datetime.strptime("2013-01-01", '%Y-%m-%d').date()
for l in [1, 2, 4, 5, 6, 7, 8]:
for d in range(0, 365):
load = "load"... | false | true |
1c3d6988d63989037b6c0d9cfcd5187d62d1980a | 310 | py | Python | Restful-API/shariffood/apps/rates/serializer.py | F-Shahali/web_workshop | f48648ba82e325c612e7aa496f0e1f58a020af36 | [
"MIT"
] | 80 | 2020-02-08T19:51:12.000Z | 2022-03-05T12:11:53.000Z | Restful-API/shariffood/apps/rates/serializer.py | F-Shahali/web_workshop | f48648ba82e325c612e7aa496f0e1f58a020af36 | [
"MIT"
] | 36 | 2020-01-10T10:09:27.000Z | 2022-03-02T10:52:57.000Z | Restful-API/shariffood/apps/rates/serializer.py | F-Shahali/web_workshop | f48648ba82e325c612e7aa496f0e1f58a020af36 | [
"MIT"
] | 73 | 2020-01-09T10:19:19.000Z | 2022-02-08T16:43:28.000Z | from rest_framework import serializers
from .models import Ratings
class RatingSerializer(serializers.ModelSerializer):
class Meta:
model = Ratings
fields = ['restaurant', 'score']
def validate(self, attrs):
attrs['user'] = self.context['request'].user
return attrs
| 22.142857 | 52 | 0.674194 | from rest_framework import serializers
from .models import Ratings
class RatingSerializer(serializers.ModelSerializer):
class Meta:
model = Ratings
fields = ['restaurant', 'score']
def validate(self, attrs):
attrs['user'] = self.context['request'].user
return attrs
| true | true |
1c3d69ffd5a9f7bfea8a06342a917c263b0279d9 | 926 | py | Python | codereviewr/code/models.py | brad/codereviewr | a3bd7ae868d24c2f8cafca81107bb7a46bb93b93 | [
"MIT"
] | 1 | 2016-05-08T06:16:47.000Z | 2016-05-08T06:16:47.000Z | codereviewr/code/models.py | brad/codereviewr | a3bd7ae868d24c2f8cafca81107bb7a46bb93b93 | [
"MIT"
] | null | null | null | codereviewr/code/models.py | brad/codereviewr | a3bd7ae868d24c2f8cafca81107bb7a46bb93b93 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from datetime import datetime
class Code(models.Model):
"""
Core code model for code snippets
"""
title = models.CharField(max_length=200)
code = models.TextField(help_text="")
author = models.ForeignKey(User)
descript... | 31.931034 | 69 | 0.700864 | from django.db import models
from django.contrib.auth.models import User
from datetime import datetime
class Code(models.Model):
title = models.CharField(max_length=200)
code = models.TextField(help_text="")
author = models.ForeignKey(User)
description = models.TextField(blank=True)
dependencies = ... | true | true |
1c3d6a39899585a2b5b7db8c7cb264ba3a0d66ef | 8,064 | py | Python | hummingbot/market/openware/lib/client.py | peatio-net/hummingbot-tunex | a0c94c46af3d40c456ec0653dbe31ea56b3431ca | [
"Apache-2.0"
] | null | null | null | hummingbot/market/openware/lib/client.py | peatio-net/hummingbot-tunex | a0c94c46af3d40c456ec0653dbe31ea56b3431ca | [
"Apache-2.0"
] | null | null | null | hummingbot/market/openware/lib/client.py | peatio-net/hummingbot-tunex | a0c94c46af3d40c456ec0653dbe31ea56b3431ca | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import hashlib
import hmac
import requests
import time
import urllib
from operator import itemgetter
from hummingbot.market.openware.lib.helpers import date_to_milliseconds, interval_to_milliseconds
from hummingbot.market.openware.lib.exceptions import OpenwareAPIException, OpenwareRequestException, Ope... | 31.377432 | 127 | 0.593998 |
import hashlib
import hmac
import requests
import time
import urllib
from operator import itemgetter
from hummingbot.market.openware.lib.helpers import date_to_milliseconds, interval_to_milliseconds
from hummingbot.market.openware.lib.exceptions import OpenwareAPIException, OpenwareRequestException, OpenwareWithdrawE... | true | true |
1c3d6a42fc6bf4312c5994225342346fe714440e | 21,139 | py | Python | httprunner/make.py | panyuan209/httprunner | d90f2b9ab06963e8efa1c327975fca5296d6bc39 | [
"Apache-2.0"
] | null | null | null | httprunner/make.py | panyuan209/httprunner | d90f2b9ab06963e8efa1c327975fca5296d6bc39 | [
"Apache-2.0"
] | null | null | null | httprunner/make.py | panyuan209/httprunner | d90f2b9ab06963e8efa1c327975fca5296d6bc39 | [
"Apache-2.0"
] | null | null | null | # 生成 pytest 测试用例文件
import os
import string
import subprocess
import sys
from typing import Text, List, Tuple, Dict, Set, NoReturn
import jinja2
from loguru import logger
from sentry_sdk import capture_exception
from httprunner import exceptions, __version__
from httprunner.compat import (
ensure_testcase_v3_api,
... | 33.930979 | 113 | 0.645111 |
import os
import string
import subprocess
import sys
from typing import Text, List, Tuple, Dict, Set, NoReturn
import jinja2
from loguru import logger
from sentry_sdk import capture_exception
from httprunner import exceptions, __version__
from httprunner.compat import (
ensure_testcase_v3_api,
ensure_testcas... | true | true |
1c3d6aa05c53d101a9a755264ce2aeec7583a535 | 4,807 | py | Python | tools/accuracy_checker/accuracy_checker/annotation_converters/imagenet.py | PinDanil/open_model_zoo | 8538b2769d65d7ca24dd36db0340a9c143583812 | [
"Apache-2.0"
] | 1 | 2021-07-12T07:43:59.000Z | 2021-07-12T07:43:59.000Z | tools/accuracy_checker/accuracy_checker/annotation_converters/imagenet.py | PinDanil/open_model_zoo | 8538b2769d65d7ca24dd36db0340a9c143583812 | [
"Apache-2.0"
] | 3 | 2020-07-20T10:01:14.000Z | 2021-06-07T10:35:52.000Z | tools/accuracy_checker/accuracy_checker/annotation_converters/imagenet.py | ygnn123/open_model_zoo | 9ca5dbeff80464bf5728e8be25daedfe9a9208d7 | [
"Apache-2.0"
] | 1 | 2019-11-14T12:51:15.000Z | 2019-11-14T12:51:15.000Z | """
Copyright (c) 2018-2021 Intel Corporation
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... | 42.539823 | 113 | 0.654046 |
from pathlib import Path
import numpy as np
from ..config import PathField, BoolField
from ..representation import ClassificationAnnotation
from ..utils import read_txt, get_path, check_file_existence, read_json
from .format_converter import BaseFormatConverter, ConverterReturn, verify_label_map
class ImageNetForm... | true | true |
1c3d6b6e8f9960007bd5122a6306677557bd11db | 382,917 | py | Python | nfselib/ginfes/v3_01/servico_consultar_situacao_lote_rps_envio_v03.py | Escodoo/nfselib | dc90cf4b6f2fc9db52bbe9485fb0901b56d3aa71 | [
"MIT"
] | null | null | null | nfselib/ginfes/v3_01/servico_consultar_situacao_lote_rps_envio_v03.py | Escodoo/nfselib | dc90cf4b6f2fc9db52bbe9485fb0901b56d3aa71 | [
"MIT"
] | 1 | 2020-10-15T11:42:54.000Z | 2020-11-08T22:03:07.000Z | nfselib/ginfes/v3_01/servico_consultar_situacao_lote_rps_envio_v03.py | Escodoo/nfselib | dc90cf4b6f2fc9db52bbe9485fb0901b56d3aa71 | [
"MIT"
] | 1 | 2020-07-25T00:02:26.000Z | 2020-07-25T00:02:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Thu Dec 13 15:47:48 2018 by generateDS.py version 2.29.2.
# Python 3.7.1 (default, Oct 22 2018, 10:41:28) [GCC 8.2.1 20180831]
#
# Command line options:
# ('--no-namespace-defs', '')
# ('-o', 'nfselib/v3_01/servico_consultar_situacao_lote_rps_envio_v03.p... | 48.3359 | 450 | 0.636378 |
from __future__ import unicode_literals
import sys
import re as re_
import base64
import datetime as datetime_
import warnings as warnings_
from builtins import str
try:
from lxml import etree as etree_
except ImportError:
from xml.etree import ElementTree as etree_
Validate_simpletypes_ ... | true | true |
1c3d6bd5c855108ef14e3d5e779ee2ba8e527e77 | 32,717 | py | Python | pyaer/device.py | duguyue100/pyaer-beta | c000c6676ae870978c86d491ed704cb69bc1c12e | [
"MIT"
] | 23 | 2017-12-15T10:18:29.000Z | 2022-03-10T16:39:14.000Z | pyaer/device.py | duguyue100/pyaer-beta | c000c6676ae870978c86d491ed704cb69bc1c12e | [
"MIT"
] | 18 | 2018-04-22T11:41:26.000Z | 2022-03-02T14:51:59.000Z | pyaer/device.py | duguyue100/pyaer-beta | c000c6676ae870978c86d491ed704cb69bc1c12e | [
"MIT"
] | 5 | 2018-08-10T10:53:02.000Z | 2022-02-08T17:01:42.000Z | """Generic Device.
Author: Yuhuang Hu
Email : duguyue100@gmail.com
"""
from __future__ import print_function, absolute_import
import abc
from pyaer import libcaer
class USBDevice(object):
"""Base class for all USB devices.
This class is the base of DVS128, DAVIS240, DAVIS346 and DYNAPSE.
"""
def __i... | 37.866898 | 79 | 0.590488 | from __future__ import print_function, absolute_import
import abc
from pyaer import libcaer
class USBDevice(object):
def __init__(self):
self.handle = None
self.get_event_number_funcs = {
libcaer.POLARITY_EVENT:
libcaer.caerEventPacketHeaderGetEventNumber,
... | true | true |
1c3d6cebcfe98ad3da6657a63bccc75c58791058 | 1,047 | py | Python | yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, ... | 37.392857 | 78 | 0.601719 | true | true | |
1c3d6eb61bbde7806f9df08892a26c211fe45661 | 478 | py | Python | src/posts/migrations/0009_auto_20200530_1911.py | arabindamahato/blog | 419bdb9c9e650d5c4b41efae0bfcf504703e60bf | [
"MIT"
] | null | null | null | src/posts/migrations/0009_auto_20200530_1911.py | arabindamahato/blog | 419bdb9c9e650d5c4b41efae0bfcf504703e60bf | [
"MIT"
] | 9 | 2020-06-06T01:46:35.000Z | 2022-02-10T15:01:07.000Z | src/posts/migrations/0009_auto_20200530_1911.py | arabindamahato/just_django | 419bdb9c9e650d5c4b41efae0bfcf504703e60bf | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2020-05-30 13:41
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('posts', '0008_comment'),
]
operations = [
migrations.AlterField(
model_name='comment',
... | 23.9 | 123 | 0.633891 |
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('posts', '0008_comment'),
]
operations = [
migrations.AlterField(
model_name='comment',
name='post',
field=models.Forei... | true | true |
1c3d6f7dd2178f52483813d47460bc84ca34328c | 1,627 | py | Python | msk/exceptions.py | andlo/mycroft-skills-kit | cef589a0aeebdb04c68c55138cb4c58c5c76c492 | [
"Apache-2.0"
] | 1 | 2020-08-13T12:21:56.000Z | 2020-08-13T12:21:56.000Z | msk/exceptions.py | andlo/mycroft-skills-kit | cef589a0aeebdb04c68c55138cb4c58c5c76c492 | [
"Apache-2.0"
] | 3 | 2021-06-08T21:06:32.000Z | 2022-01-13T02:22:38.000Z | msk/exceptions.py | andlo/mycroft-skills-kit | cef589a0aeebdb04c68c55138cb4c58c5c76c492 | [
"Apache-2.0"
] | 1 | 2020-08-13T12:21:58.000Z | 2020-08-13T12:21:58.000Z | # Copyright (c) 2018 Mycroft AI, Inc.
#
# This file is part of Mycroft Light
# (see https://github.com/MatthewScholefield/mycroft-light).
#
# 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
... | 24.651515 | 75 | 0.739398 |
from msm import MsmException
class MskException(MsmException):
pass
class AlreadyUpdated(MskException):
pass
class GithubRepoExists(MskException):
pass
class NotUploaded(MskException):
pass
class PRModified(MskException):
pass
class SkillNameTaken(GithubRepoExists):
... | true | true |
1c3d7184f6210c7a0767abe3eb809e89c9d400b9 | 13,971 | py | Python | hipi/relabelling_replay_buffer.py | muell-monster/google-research | 04d2024f4723bc4be3d639a668c19fb1f6a31478 | [
"Apache-2.0"
] | 3 | 2021-01-18T04:46:49.000Z | 2021-03-05T09:21:40.000Z | hipi/relabelling_replay_buffer.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 7 | 2021-11-10T19:44:38.000Z | 2022-02-10T06:48:39.000Z | hipi/relabelling_replay_buffer.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 4 | 2021-02-08T10:25:45.000Z | 2021-04-17T14:46:26.000Z | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | 44.493631 | 80 | 0.671319 |
import gin
import numpy as np
import tensorflow as tf
from tf_agents.replay_buffers import tf_uniform_replay_buffer
from tf_agents.utils import common
@gin.configurable
class RelabellingReplayBuffer(tf_uniform_replay_buffer.TFUniformReplayBuffer):
def __init__(self, *args, **kwargs):
self._task... | true | true |
1c3d71c61f025e4d128508f7268321617ae891cc | 1,325 | py | Python | molecule/python/test/test_currency_balance_api.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | molecule/python/test/test_currency_balance_api.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | molecule/python/test/test_currency_balance_api.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Molecule API Documentation
The Hydrogen Molecule API # noqa: E501
OpenAPI spec version: 1.3.0
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import molecule_api... | 23.660714 | 91 | 0.701887 |
from __future__ import absolute_import
import unittest
import molecule_api
from molecule_api.api.currency_balance_api import CurrencyBalanceApi
from molecule_api.rest import ApiException
class TestCurrencyBalanceApi(unittest.TestCase):
def setUp(self):
self.api = molecule_api.api.currency_balance... | true | true |
1c3d71e3800ea8228572573f5e1ab76021d0d583 | 4,790 | py | Python | ijson/common.py | KOLANICH/ijson | 7728b1d9718461a68b2ff001a8513d83f6e88ca0 | [
"BSD-3-Clause"
] | null | null | null | ijson/common.py | KOLANICH/ijson | 7728b1d9718461a68b2ff001a8513d83f6e88ca0 | [
"BSD-3-Clause"
] | null | null | null | ijson/common.py | KOLANICH/ijson | 7728b1d9718461a68b2ff001a8513d83f6e88ca0 | [
"BSD-3-Clause"
] | null | null | null | '''
Backend independent higher level interfaces, common exceptions.
'''
import decimal
class JSONError(Exception):
'''
Base exception for all parsing errors.
'''
pass
class IncompleteJSONError(JSONError):
'''
Raised when the parser can't read expected data from a stream.
'''
pass
d... | 29.207317 | 82 | 0.551148 | import decimal
class JSONError(Exception):
pass
class IncompleteJSONError(JSONError):
pass
def parse(basic_events):
path = []
for event, value in basic_events:
if event == 'map_key':
prefix = '.'.join(path[:-1])
path[-1] = value
elif event == 'start_map':
... | true | true |
1c3d7315b75ad79df3daf8091300b9d4cc79a3bc | 8,389 | py | Python | sdk/python/pulumi_azure/netapp/account.py | pulumi-bot/pulumi-azure | 64d5c30a77b3f4de117068add359ef85293cef8e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/netapp/account.py | pulumi-bot/pulumi-azure | 64d5c30a77b3f4de117068add359ef85293cef8e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/netapp/account.py | pulumi-bot/pulumi-azure | 64d5c30a77b3f4de117068add359ef85293cef8e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Accoun... | 54.830065 | 200 | 0.677316 |
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Account(pulumi.CustomResource):
active_directory: pulumi.Output[dict]
location: pulumi.Output[str]
name: pulumi.Output[str]
resource_group_name: pulumi.Output[str]
tag... | true | true |
1c3d7315ca9962eb12dd2e713d0ce503378537fe | 2,028 | py | Python | make_ilsvrc_dataset.py | roxanneluo/colorization-pytorch | 4b5cab85ea2f503f17d13241ae2b7ba54158ccac | [
"MIT"
] | null | null | null | make_ilsvrc_dataset.py | roxanneluo/colorization-pytorch | 4b5cab85ea2f503f17d13241ae2b7ba54158ccac | [
"MIT"
] | null | null | null | make_ilsvrc_dataset.py | roxanneluo/colorization-pytorch | 4b5cab85ea2f503f17d13241ae2b7ba54158ccac | [
"MIT"
] | null | null | null |
import os
import sys
from util import util
import numpy as np
import argparse
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--in_path', type=str, default='/data/big/dataset/ILSVRC2012')
parser.add_argument('--out_path', type=str, default='./dataset/ilsvr... | 43.148936 | 121 | 0.769724 |
import os
import sys
from util import util
import numpy as np
import argparse
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--in_path', type=str, default='/data/big/dataset/ILSVRC2012')
parser.add_argument('--out_path', type=str, default='./dataset/ilsvr... | true | true |
1c3d73eac179b57cd9334247c20800e0cf89eef9 | 4,873 | py | Python | stog/data/fields/label_field.py | sfillwo/stog | b02e2dbe8989078ccdc3df611d8b08b63d28fcae | [
"MIT"
] | 172 | 2019-11-19T05:52:36.000Z | 2022-03-26T04:58:24.000Z | stog/data/fields/label_field.py | sfillwo/stog | b02e2dbe8989078ccdc3df611d8b08b63d28fcae | [
"MIT"
] | 22 | 2019-07-13T09:11:57.000Z | 2021-11-17T05:30:36.000Z | stog/data/fields/label_field.py | sfillwo/stog | b02e2dbe8989078ccdc3df611d8b08b63d28fcae | [
"MIT"
] | 39 | 2019-06-26T11:37:51.000Z | 2022-03-07T13:30:26.000Z | from typing import Dict, Union, Set
import logging
from overrides import overrides
import torch
from stog.data.fields.field import Field
from stog.data.vocabulary import Vocabulary
from stog.utils.checks import ConfigurationError
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
class LabelField... | 48.247525 | 109 | 0.654217 | from typing import Dict, Union, Set
import logging
from overrides import overrides
import torch
from stog.data.fields.field import Field
from stog.data.vocabulary import Vocabulary
from stog.utils.checks import ConfigurationError
logger = logging.getLogger(__name__)
class LabelField(Field[torch.Tensor]):
... | true | true |
1c3d741be07b4e3e3b73ea3f2257fb3e49d46f45 | 3,065 | py | Python | utils/scripts/OOOlevelGen/src/levels/The_Bridge_Too_Far.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | utils/scripts/OOOlevelGen/src/levels/The_Bridge_Too_Far.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | utils/scripts/OOOlevelGen/src/levels/The_Bridge_Too_Far.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | import LevelBuilder
from sprites import *
def render(name,bg):
lb = LevelBuilder.LevelBuilder(name+".plist",background=bg)
lb.addObject(Beam.BeamSprite(x=275, y=218,width=60,height=10,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ).setName('Beam4'))
lb.addObject(Beam.BeamSprite(x=209, y=218,width=... | 3,065 | 3,065 | 0.727243 | import LevelBuilder
from sprites import *
def render(name,bg):
lb = LevelBuilder.LevelBuilder(name+".plist",background=bg)
lb.addObject(Beam.BeamSprite(x=275, y=218,width=60,height=10,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ).setName('Beam4'))
lb.addObject(Beam.BeamSprite(x=209, y=218,width=... | true | true |
1c3d744e44ffe15ed720333243938b8167b30078 | 6,635 | py | Python | ImageNet-C/test.py | RobbieEarle/robustness | 2f4381900015bf7fcd9975d43b8104d2d14f8568 | [
"Apache-2.0"
] | null | null | null | ImageNet-C/test.py | RobbieEarle/robustness | 2f4381900015bf7fcd9975d43b8104d2d14f8568 | [
"Apache-2.0"
] | null | null | null | ImageNet-C/test.py | RobbieEarle/robustness | 2f4381900015bf7fcd9975d43b8104d2d14f8568 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import os
import time
import torch
from torch.autograd import Variable as V
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision.datasets as dset
import torchvision.transforms as trn
import torchvision.models as models
import torch.utils.model_... | 41.993671 | 138 | 0.583723 |
import argparse
import os
import time
import torch
from torch.autograd import Variable as V
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision.datasets as dset
import torchvision.transforms as trn
import torchvision.models as models
import torch.utils.model_zoo as model_zoo
import... | true | true |
1c3d749751ed2e33faa4ff005513c4de17610e34 | 1,289 | py | Python | example/examplesite/urls.py | eduardocp/wagtail-geo-widget | df3ed88c2fbae8867402290645463fbdde75a2f0 | [
"MIT"
] | 105 | 2016-11-04T06:56:11.000Z | 2022-03-23T08:08:56.000Z | example/examplesite/urls.py | eduardocp/wagtail-geo-widget | df3ed88c2fbae8867402290645463fbdde75a2f0 | [
"MIT"
] | 82 | 2016-11-25T09:39:27.000Z | 2022-03-08T18:52:59.000Z | example/examplesite/urls.py | eduardocp/wagtail-geo-widget | df3ed88c2fbae8867402290645463fbdde75a2f0 | [
"MIT"
] | 26 | 2016-12-31T02:26:29.000Z | 2022-02-15T17:16:13.000Z | from __future__ import absolute_import, unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
... | 33.051282 | 80 | 0.748642 | from __future__ import absolute_import, unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
... | true | true |
1c3d74b7556d9eb284b5e1f15b12be6e75477011 | 373 | py | Python | proximal/lin_ops/edge.py | kyleaj/ProxImaL | 2986b1ed40b58057822922522145bfbbdd2cf9de | [
"MIT"
] | 101 | 2016-07-24T00:33:12.000Z | 2022-03-23T23:51:58.000Z | proximal/lin_ops/edge.py | kyleaj/ProxImaL | 2986b1ed40b58057822922522145bfbbdd2cf9de | [
"MIT"
] | 57 | 2016-07-26T18:12:37.000Z | 2022-02-14T04:19:26.000Z | proximal/lin_ops/edge.py | kyleaj/ProxImaL | 2986b1ed40b58057822922522145bfbbdd2cf9de | [
"MIT"
] | 30 | 2016-07-26T22:51:59.000Z | 2021-01-15T14:45:42.000Z | import numpy as np
class Edge(object):
"""The edge between two lin ops.
"""
def __init__(self, start, end, shape):
self.start = start
self.end = end
self.shape = shape
self.data = np.zeros(self.shape)
self.mag = None # Used to get norm bounds.
@property
... | 21.941176 | 51 | 0.571046 | import numpy as np
class Edge(object):
def __init__(self, start, end, shape):
self.start = start
self.end = end
self.shape = shape
self.data = np.zeros(self.shape)
self.mag = None
@property
def size(self):
return np.prod(self.shape)
| true | true |
1c3d76d3c24826b5e3241ec4ccc5db15a25140b6 | 938 | py | Python | hris/apps/jobs/migrations/0001_initial.py | Minedomain/hris_backend | 90aab497c076c2d4ce4e05a441db0ee7a175df57 | [
"MIT"
] | null | null | null | hris/apps/jobs/migrations/0001_initial.py | Minedomain/hris_backend | 90aab497c076c2d4ce4e05a441db0ee7a175df57 | [
"MIT"
] | null | null | null | hris/apps/jobs/migrations/0001_initial.py | Minedomain/hris_backend | 90aab497c076c2d4ce4e05a441db0ee7a175df57 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.8 on 2021-06-01 10:37
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Job',
fields=[
('id', models.Au... | 34.740741 | 121 | 0.613006 |
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Job',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, se... | true | true |
1c3d76d4de348b82b1075684a68a02ac889e29e0 | 4,069 | py | Python | shellshock-hunter-google.py | DanMcInerney/shellshock-hunter-google | 98f5864a2cb5121ae2d3705c3e119416b362a504 | [
"Apache-2.0"
] | 27 | 2015-01-09T23:36:10.000Z | 2021-12-12T22:44:45.000Z | shellshock-hunter-google.py | DanMcInerney/shellshock-hunter-google | 98f5864a2cb5121ae2d3705c3e119416b362a504 | [
"Apache-2.0"
] | 1 | 2019-02-12T15:01:12.000Z | 2019-02-12T20:30:33.000Z | shellshock-hunter-google.py | DanMcInerney/shellshock-hunter-google | 98f5864a2cb5121ae2d3705c3e119416b362a504 | [
"Apache-2.0"
] | 14 | 2015-05-14T09:59:08.000Z | 2020-05-30T00:41:15.000Z | #!/usr/bin/env python2
# -*- coding: utf8 -*-
from gevent import monkey
monkey.patch_all()
import sys
import time
import random
import argparse
import urllib2
from gevent.pool import Pool
from gevent import joinall
from selenium import webdriver
from selenium.webdriver.support.ui import Select, WebDri... | 35.382609 | 139 | 0.646105 |
from gevent import monkey
monkey.patch_all()
import sys
import time
import random
import argparse
import urllib2
from gevent.pool import Pool
from gevent import joinall
from selenium import webdriver
from selenium.webdriver.support.ui import Select, WebDriverWait
from selenium.common.exceptions impor... | false | true |
1c3d78b10f90882ad730e610478a9ccba770e350 | 1,524 | py | Python | data_txt.py | yuanCnD/Model-parameter-analysis | 9fabef4f434087a56e13aa28514fe1d4065ecc4d | [
"Apache-2.0"
] | 2 | 2018-02-02T13:41:20.000Z | 2018-02-09T15:27:10.000Z | data_txt.py | yuanCnD/Model-parameter-analysis | 9fabef4f434087a56e13aa28514fe1d4065ecc4d | [
"Apache-2.0"
] | null | null | null | data_txt.py | yuanCnD/Model-parameter-analysis | 9fabef4f434087a56e13aa28514fe1d4065ecc4d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 yuanCnD.
# 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, sof... | 35.44186 | 80 | 0.645013 |
import numpy as np
import mxnet as mx
import datetime
starttime = datetime.datetime.now()
sym,args,aux=mx.model.load_checkpoint('/cd/to/your/params/file/vgg16_reduced',0)
names = args.keys()
index = dict()
for i,name in enumerate(names):
if 'conv4_3_weight' in name:
data = []
layer_pa... | true | true |
1c3d795eb9c4a7caab5c4703be89f9dffe028b1b | 31 | py | Python | maya/app/general/pointOnPolyConstraint.py | arjun-namdeo/py_stubs | 605bb167e239978f5417f3f1fc1f5c12e2a243cc | [
"MIT"
] | 20 | 2019-09-20T00:30:22.000Z | 2021-12-26T06:56:16.000Z | mayaSDK/maya/app/general/pointOnPolyConstraint.py | minjiang999/vscode-mayapy | 7a21872f80b5b740fc653e79c3f9b5268e87b3c3 | [
"MIT"
] | 5 | 2019-12-29T15:19:03.000Z | 2022-03-29T16:54:19.000Z | mayaSDK/maya/app/general/pointOnPolyConstraint.py | minjiang999/vscode-mayapy | 7a21872f80b5b740fc653e79c3f9b5268e87b3c3 | [
"MIT"
] | 8 | 2019-09-23T05:46:44.000Z | 2022-01-11T14:42:14.000Z | def assembleCmd():
pass
| 5.166667 | 18 | 0.580645 | def assembleCmd():
pass
| true | true |
1c3d7998163e4e898f27af795609e5bf77690f19 | 443 | py | Python | tdrs-backend/tdpservice/core/test/test_models.py | amilash/TANF-app | 09ef2baa854e41250c5761fa66aa665e112a53cf | [
"CC0-1.0"
] | 18 | 2020-03-25T19:57:12.000Z | 2021-07-26T15:37:50.000Z | tdrs-backend/tdpservice/core/test/test_models.py | amilash/TANF-app | 09ef2baa854e41250c5761fa66aa665e112a53cf | [
"CC0-1.0"
] | 1,465 | 2020-07-22T21:16:53.000Z | 2022-03-31T16:04:22.000Z | tdrs-backend/tdpservice/core/test/test_models.py | amilash/TANF-app | 09ef2baa854e41250c5761fa66aa665e112a53cf | [
"CC0-1.0"
] | 15 | 2020-07-22T14:58:37.000Z | 2021-06-22T17:29:55.000Z | """Module for testing the core model."""
import pytest
from tdpservice.core.models import GlobalPermission
@pytest.mark.django_db
def test_manager_get_queryset():
"""Test the get queryset method returns a query."""
GlobalPermission.objects.create(
name="Can View User Data", codename="view_user_data"
... | 29.533333 | 60 | 0.742664 | import pytest
from tdpservice.core.models import GlobalPermission
@pytest.mark.django_db
def test_manager_get_queryset():
GlobalPermission.objects.create(
name="Can View User Data", codename="view_user_data"
)
global_permissions = GlobalPermission.objects.first()
assert global_permissions.nam... | true | true |
1c3d79f4f810684251297bbcb12b7c7e11301388 | 1,282 | py | Python | project/aliez/script/kancolle/profile/_P3P7N17513004864.py | coppelia517/stve | dd23cc83e7a516e3f2ea9984aabb0cb407a30647 | [
"MIT"
] | null | null | null | project/aliez/script/kancolle/profile/_P3P7N17513004864.py | coppelia517/stve | dd23cc83e7a516e3f2ea9984aabb0cb407a30647 | [
"MIT"
] | 9 | 2021-03-18T20:25:04.000Z | 2022-01-13T00:44:11.000Z | project/aliez/script/kancolle/profile/_P3P7N17513004864.py | coppelia517/stve | dd23cc83e7a516e3f2ea9984aabb0cb407a30647 | [
"MIT"
] | null | null | null | import os
import sys
PATH = os.path.abspath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
if not PATH in sys.path:
sys.path.insert(0, PATH)
import android_base
class _P3P7N17513004864(android_base.Android):
SERIAL = "P3P7N17513004864"
TMP_PICTURE = "%s_TMP.png" % SERIAL
IP ... | 21.728814 | 84 | 0.590484 | import os
import sys
PATH = os.path.abspath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
if not PATH in sys.path:
sys.path.insert(0, PATH)
import android_base
class _P3P7N17513004864(android_base.Android):
SERIAL = "P3P7N17513004864"
TMP_PICTURE = "%s_TMP.png" % SERIAL
IP ... | true | true |
1c3d7c85ebf349d319a77f6dc2f7711b6a679bf3 | 8,021 | py | Python | bin/Python27/Lib/site-packages/scipy/stats/tests/test_kdeoth.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/scipy/stats/tests/test_kdeoth.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | bin/Python27/Lib/site-packages/scipy/stats/tests/test_kdeoth.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | 1 | 2020-08-08T12:44:48.000Z | 2020-08-08T12:44:48.000Z | from __future__ import division, print_function, absolute_import
from scipy import stats
import numpy as np
from numpy.testing import assert_almost_equal, assert_, assert_raises, \
assert_array_almost_equal, assert_array_almost_equal_nulp, run_module_suite
def test_kde_1d():
#some basic tests compar... | 33.282158 | 90 | 0.658272 | from __future__ import division, print_function, absolute_import
from scipy import stats
import numpy as np
from numpy.testing import assert_almost_equal, assert_, assert_raises, \
assert_array_almost_equal, assert_array_almost_equal_nulp, run_module_suite
def test_kde_1d():
np.random.seed(8765... | true | true |
1c3d7c8a12d2d18f3c9da293de6b538fccd030f0 | 7,892 | py | Python | nndet/evaluator/detection/hist.py | joeranbosma/nnDetection | 2ebbf1cdc8a8794c73e325f06fea50632c78ae8c | [
"BSD-3-Clause"
] | 242 | 2021-05-17T12:31:39.000Z | 2022-03-31T11:51:29.000Z | nndet/evaluator/detection/hist.py | joeranbosma/nnDetection | 2ebbf1cdc8a8794c73e325f06fea50632c78ae8c | [
"BSD-3-Clause"
] | 59 | 2021-06-02T07:32:10.000Z | 2022-03-31T18:45:52.000Z | nndet/evaluator/detection/hist.py | joeranbosma/nnDetection | 2ebbf1cdc8a8794c73e325f06fea50632c78ae8c | [
"BSD-3-Clause"
] | 38 | 2021-05-31T14:01:37.000Z | 2022-03-21T08:24:40.000Z | """
Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
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/L... | 44.587571 | 118 | 0.61556 |
import time
import numpy as np
from pathlib import Path
from loguru import logger
from typing import Sequence, List, Dict, Any, Tuple
import matplotlib.pyplot as plt
from nndet.evaluator import DetectionMetric
class PredictionHistogram(DetectionMetric):
def __init__(self,
classes: Sequence[s... | true | true |
1c3d7dbe44cddf00d83f5274678a534170a18368 | 2,184 | py | Python | release/src-rt-6.x.4708/router/samba3/source4/scripting/python/samba/tests/core.py | zaion520/ATtomato | 4d48bb79f8d147f89a568cf18da9e0edc41f93fb | [
"FSFAP"
] | 2 | 2019-01-13T09:16:31.000Z | 2019-02-15T03:30:28.000Z | release/src-rt-6.x.4708/router/samba3/source4/scripting/python/samba/tests/core.py | zaion520/ATtomato | 4d48bb79f8d147f89a568cf18da9e0edc41f93fb | [
"FSFAP"
] | null | null | null | release/src-rt-6.x.4708/router/samba3/source4/scripting/python/samba/tests/core.py | zaion520/ATtomato | 4d48bb79f8d147f89a568cf18da9e0edc41f93fb | [
"FSFAP"
] | 2 | 2020-03-08T01:58:25.000Z | 2020-12-20T10:34:54.000Z | #!/usr/bin/env python
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2008
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the L... | 33.090909 | 77 | 0.649267 |
import ldb
import os
import samba
from samba.tests import TestCase, TestCaseInTempDir
class SubstituteVarTestCase(TestCase):
def test_empty(self):
self.assertEquals("", samba.substitute_var("", {}))
def test_nothing(self):
self.assertEquals("foo bar",
samba... | true | true |
1c3d7e614d1a0716eb18cfab5bbae718b8334f24 | 1,557 | py | Python | grouper/fe/handlers/permissions_revoke_tag.py | bonniech3n/merou | 47d9de906686fd5b930a49299d3ffbcc0673ae8a | [
"Apache-2.0"
] | null | null | null | grouper/fe/handlers/permissions_revoke_tag.py | bonniech3n/merou | 47d9de906686fd5b930a49299d3ffbcc0673ae8a | [
"Apache-2.0"
] | null | null | null | grouper/fe/handlers/permissions_revoke_tag.py | bonniech3n/merou | 47d9de906686fd5b930a49299d3ffbcc0673ae8a | [
"Apache-2.0"
] | null | null | null | from grouper.constants import TAG_EDIT
from grouper.fe.util import GrouperHandler
from grouper.models.audit_log import AuditLog
from grouper.models.counter import Counter
from grouper.models.tag_permission_map import TagPermissionMap
from grouper.user_permissions import user_has_permission
class PermissionsRevokeTag(... | 33.847826 | 96 | 0.679512 | from grouper.constants import TAG_EDIT
from grouper.fe.util import GrouperHandler
from grouper.models.audit_log import AuditLog
from grouper.models.counter import Counter
from grouper.models.tag_permission_map import TagPermissionMap
from grouper.user_permissions import user_has_permission
class PermissionsRevokeTag(... | true | true |
1c3d7ecefdd8e435e6aea80c5269df62e04351a2 | 2,591 | py | Python | hadoop1/launcher.py | songchaomail/SAGA-Hadoop | 2aa81aff310a147947cae4a09b01d9e5741ac438 | [
"Apache-2.0"
] | 10 | 2015-04-21T14:52:40.000Z | 2022-01-13T15:17:48.000Z | hadoop1/launcher.py | songchaomail/SAGA-Hadoop | 2aa81aff310a147947cae4a09b01d9e5741ac438 | [
"Apache-2.0"
] | null | null | null | hadoop1/launcher.py | songchaomail/SAGA-Hadoop | 2aa81aff310a147947cae4a09b01d9e5741ac438 | [
"Apache-2.0"
] | 1 | 2021-07-31T17:05:23.000Z | 2021-07-31T17:05:23.000Z | #!/usr/bin/env python
import time
import saga
import os, sys
import subprocess
import pdb
import logging
logging.basicConfig(level=logging.ERROR)
def main():
try:
# create a job service for Futuregrid's 'india' PBS cluster
js = saga.job.Service("pbs+ssh://india")
#js = saga.job.Servi... | 30.127907 | 106 | 0.580085 |
import time
import saga
import os, sys
import subprocess
import pdb
import logging
logging.basicConfig(level=logging.ERROR)
def main():
try:
js = saga.job.Service("pbs+ssh://india")
#js = saga.job.Service("fork://localhost")
# describe our job
jd = saga.job.Descrip... | false | true |
1c3d7f223c71439d9fe961ae326d8157074e19b2 | 6,719 | py | Python | workflows/cloudify_system_workflows/tests/test_plugins.py | ilan-WS/cloudify-manager | 510d8a277c848db351f38fc5b264806b2cb36d0b | [
"Apache-2.0"
] | 124 | 2015-01-22T22:28:37.000Z | 2022-02-26T23:12:06.000Z | workflows/cloudify_system_workflows/tests/test_plugins.py | cloudify-cosmo/cloudify-manager | 4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972 | [
"Apache-2.0"
] | 345 | 2015-01-08T15:49:40.000Z | 2022-03-29T08:33:00.000Z | workflows/cloudify_system_workflows/tests/test_plugins.py | ilan-WS/cloudify-manager | 510d8a277c848db351f38fc5b264806b2cb36d0b | [
"Apache-2.0"
] | 77 | 2015-01-07T14:04:35.000Z | 2022-03-07T22:46:00.000Z | ########
# Copyright (c) 2019 Cloudify Platform Ltd. 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 requi... | 44.496689 | 79 | 0.641316 | st
from mock import patch, MagicMock, PropertyMock, call
from cloudify.models_states import ExecutionState
from cloudify_system_workflows.plugins import (update as update_func,
install as install_func,
uninstall as uninstal... | true | true |
1c3d805d80507f403a3e34b2877be6333830ac44 | 1,560 | py | Python | twitoff/twitter.py | Frank-Howd/Twitoff-23 | 949b5a12f0f6f7bb8c9eb03e9948fd42a339e271 | [
"MIT"
] | null | null | null | twitoff/twitter.py | Frank-Howd/Twitoff-23 | 949b5a12f0f6f7bb8c9eb03e9948fd42a339e271 | [
"MIT"
] | null | null | null | twitoff/twitter.py | Frank-Howd/Twitoff-23 | 949b5a12f0f6f7bb8c9eb03e9948fd42a339e271 | [
"MIT"
] | null | null | null | """Handles connection to Twitter API using Tweepy"""
from os import getenv
import tweepy
import spacy
from .models import DB, Tweet, User
TWITTER_API_KEY = getenv("TWITTER_API_KEY")
TWITTER_API_KEY_SECRET = getenv("TWITTER_API_KEY_SECRET")
TWITTER_AUTH = tweepy.OAuthHandler(TWITTER_API_KEY, TWITTER_API_KEY_SECRET)
T... | 27.857143 | 79 | 0.667949 |
from os import getenv
import tweepy
import spacy
from .models import DB, Tweet, User
TWITTER_API_KEY = getenv("TWITTER_API_KEY")
TWITTER_API_KEY_SECRET = getenv("TWITTER_API_KEY_SECRET")
TWITTER_AUTH = tweepy.OAuthHandler(TWITTER_API_KEY, TWITTER_API_KEY_SECRET)
TWITTER = tweepy.API(TWITTER_AUTH)
nlp = spacy.load("... | true | true |
1c3d82367f6c3f67004cf7191d6a9c1057e8095a | 8,073 | py | Python | ptah/tests/test_populate.py | timgates42/ptah | 47594cef8e80397a545bdc9e166eafcac94c72d6 | [
"BSD-3-Clause"
] | 13 | 2015-03-18T16:06:50.000Z | 2021-04-27T19:14:35.000Z | ptah/tests/test_populate.py | timgates42/ptah | 47594cef8e80397a545bdc9e166eafcac94c72d6 | [
"BSD-3-Clause"
] | null | null | null | ptah/tests/test_populate.py | timgates42/ptah | 47594cef8e80397a545bdc9e166eafcac94c72d6 | [
"BSD-3-Clause"
] | 6 | 2015-01-07T11:17:32.000Z | 2020-04-02T11:35:03.000Z | import sqlalchemy as sqla
import ptah
from ptah.populate import POPULATE_ID, Populate
from pyramid import testing
from pyramid.exceptions import ConfigurationConflictError
class TestPopulateDirective(ptah.PtahTestCase):
_init_ptah = False
_auto_commit = False
def test_step_registration(self):
im... | 29.789668 | 78 | 0.592097 | import sqlalchemy as sqla
import ptah
from ptah.populate import POPULATE_ID, Populate
from pyramid import testing
from pyramid.exceptions import ConfigurationConflictError
class TestPopulateDirective(ptah.PtahTestCase):
_init_ptah = False
_auto_commit = False
def test_step_registration(self):
im... | true | true |
1c3d82fca9026bb5c31489346b961d79af2ce249 | 4,709 | py | Python | py/test/selenium/webdriver/common/page_loading_tests.py | chromium-googlesource-mirror/selenium | fcf26da81afa5d3e8edfc776f558eebf2e7d28b3 | [
"Apache-2.0"
] | 1 | 2018-08-24T18:01:34.000Z | 2018-08-24T18:01:34.000Z | py/test/selenium/webdriver/common/page_loading_tests.py | chromium-googlesource-mirror/selenium | fcf26da81afa5d3e8edfc776f558eebf2e7d28b3 | [
"Apache-2.0"
] | 1 | 2021-10-18T12:23:37.000Z | 2021-10-18T12:23:37.000Z | py/test/selenium/webdriver/common/page_loading_tests.py | chromium-googlesource-mirror/selenium | fcf26da81afa5d3e8edfc776f558eebf2e7d28b3 | [
"Apache-2.0"
] | 2 | 2018-04-30T21:35:30.000Z | 2021-05-14T08:11:46.000Z | # Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 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 requi... | 36.789063 | 107 | 0.699299 |
empfile
import time
import shutil
import unittest
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By
class PageLoadingTests(unittest.TestCase):
def testShouldWaitForDocumentToBeLoaded(self):
self._loadSimplePage()
self.assertEq... | false | true |
1c3d8314c2faf4b2e2cd15a963ee6e6935375dd9 | 269 | py | Python | vehicle_management/vehicle_management/doctype/vehicle_expense_items/vehicle_expense_items.py | muirawachanga/vehicle | 1025f99ecab14d27485584f540e9630bfcb50c0f | [
"MIT"
] | null | null | null | vehicle_management/vehicle_management/doctype/vehicle_expense_items/vehicle_expense_items.py | muirawachanga/vehicle | 1025f99ecab14d27485584f540e9630bfcb50c0f | [
"MIT"
] | null | null | null | vehicle_management/vehicle_management/doctype/vehicle_expense_items/vehicle_expense_items.py | muirawachanga/vehicle | 1025f99ecab14d27485584f540e9630bfcb50c0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Bituls Company Limited and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class VehicleExpenseItems(Document):
pass
| 22.416667 | 61 | 0.773234 |
from __future__ import unicode_literals
from frappe.model.document import Document
class VehicleExpenseItems(Document):
pass
| true | true |
1c3d832791a5a60515210a73d39ca02d72dd4a8a | 11,151 | py | Python | main.py | weiyl-chenjie/barcode-print-280B | 85c14dd86051ebdce12eec092d9e85ee35aa2147 | [
"Apache-2.0"
] | null | null | null | main.py | weiyl-chenjie/barcode-print-280B | 85c14dd86051ebdce12eec092d9e85ee35aa2147 | [
"Apache-2.0"
] | null | null | null | main.py | weiyl-chenjie/barcode-print-280B | 85c14dd86051ebdce12eec092d9e85ee35aa2147 | [
"Apache-2.0"
] | null | null | null | # Author:尉玉林(Mr.Wei)
# Create Date:2019/10/22
# Edition:V1.0.0
# Python自带库
import sys
import sqlite3
from time import sleep
# 第三方库
from PySide2.QtWidgets import QMainWindow, QApplication, QMessageBox, QSplashScreen, QLabel
from PySide2.QtCore import QThread, Signal, Qt
from PySide2.QtGui import QPixmap, QFont
from ... | 38.584775 | 180 | 0.63241 |
import sys
import sqlite3
from time import sleep
from PySide2.QtWidgets import QMainWindow, QApplication, QMessageBox, QSplashScreen, QLabel
from PySide2.QtCore import QThread, Signal, Qt
from PySide2.QtGui import QPixmap, QFont
from PIL import ImageGrab
import pytesseract
import keyboard
import pyautogui as p... | true | true |
1c3d838e42e82c7034ab84145b1cfa1942ba8076 | 3,808 | py | Python | kivy/core/video/video_gstplayer.py | Ian-Foote/kivy | a9303f4ab733e612b17c6f8d0d9d082d4d6de9ba | [
"MIT"
] | 1 | 2016-03-08T19:07:50.000Z | 2016-03-08T19:07:50.000Z | kivy/core/video/video_gstplayer.py | Ian-Foote/kivy | a9303f4ab733e612b17c6f8d0d9d082d4d6de9ba | [
"MIT"
] | null | null | null | kivy/core/video/video_gstplayer.py | Ian-Foote/kivy | a9303f4ab733e612b17c6f8d0d9d082d4d6de9ba | [
"MIT"
] | null | null | null | '''
Video Gstplayer
===============
.. versionadded:: 1.8.0
Implementation of a VideoBase with Kivy :class:`~kivy.lib.gstplayer.GstPlayer`
This player is the prefered player, using Gstreamer 1.0, working on both Python
2 and 3.
'''
from kivy.lib.gstplayer import GstPlayer, get_gst_version
from kivy.graphics.texture ... | 28 | 79 | 0.625263 |
from kivy.lib.gstplayer import GstPlayer, get_gst_version
from kivy.graphics.texture import Texture
from kivy.core.video import VideoBase
from kivy.logger import Logger
from kivy.clock import Clock
from kivy.compat import PY2
from threading import Lock
from functools import partial
from os.path import realpath
from we... | true | true |
1c3d843715613e680fdfa4abbc33e8da7ab514cd | 457 | py | Python | multidomain_sentiment/models/__init__.py | koreyou/multidomain-sentiment | 766afdb839483c38a141c8d1d60c6faa75bd2684 | [
"CC0-1.0"
] | null | null | null | multidomain_sentiment/models/__init__.py | koreyou/multidomain-sentiment | 766afdb839483c38a141c8d1d60c6faa75bd2684 | [
"CC0-1.0"
] | null | null | null | multidomain_sentiment/models/__init__.py | koreyou/multidomain-sentiment | 766afdb839483c38a141c8d1d60c6faa75bd2684 | [
"CC0-1.0"
] | null | null | null |
from multidomain_sentiment.models.classifier import MultiDomainClassifier
from multidomain_sentiment.models.cnn import CNNEncoder
from multidomain_sentiment.models.cnn import MultiDomainCNNPredictor
from multidomain_sentiment.models.cnn import create_cnn_predictor
from multidomain_sentiment.models.rnn import MultiDoma... | 50.777778 | 73 | 0.905908 |
from multidomain_sentiment.models.classifier import MultiDomainClassifier
from multidomain_sentiment.models.cnn import CNNEncoder
from multidomain_sentiment.models.cnn import MultiDomainCNNPredictor
from multidomain_sentiment.models.cnn import create_cnn_predictor
from multidomain_sentiment.models.rnn import MultiDoma... | true | true |
1c3d849d07d63b0c52cc0119b718f71185620b0f | 2,029 | py | Python | middleware/models/service.py | protagora/device_network_protocol | 2f514c786d0c1268c5d97b8d76d57f35e54df5f2 | [
"MIT"
] | null | null | null | middleware/models/service.py | protagora/device_network_protocol | 2f514c786d0c1268c5d97b8d76d57f35e54df5f2 | [
"MIT"
] | null | null | null | middleware/models/service.py | protagora/device_network_protocol | 2f514c786d0c1268c5d97b8d76d57f35e54df5f2 | [
"MIT"
] | null | null | null | from dna.middleware.models.manager import *
from dna.middleware.endpoint.server import ManagedHandler
from dna.middleware.endpoint.server import Server
class Service(object):
def __init__(self, host=None, port=None):
self.__manager = None
self.__server = None
self.__host = None
se... | 27.053333 | 94 | 0.620996 | from dna.middleware.models.manager import *
from dna.middleware.endpoint.server import ManagedHandler
from dna.middleware.endpoint.server import Server
class Service(object):
def __init__(self, host=None, port=None):
self.__manager = None
self.__server = None
self.__host = None
se... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.