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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f744df937b95504efbeb94b4dc3cf8a974204327 | 1,684 | py | Python | _examples/structs/test.py | cosnicolaou/gopy | 87be7f7b22c3c65e506e4d028feb9945422ced73 | [
"BSD-3-Clause"
] | null | null | null | _examples/structs/test.py | cosnicolaou/gopy | 87be7f7b22c3c65e506e4d028feb9945422ced73 | [
"BSD-3-Clause"
] | null | null | null | _examples/structs/test.py | cosnicolaou/gopy | 87be7f7b22c3c65e506e4d028feb9945422ced73 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
## py2/py3 compat
from __future__ import print_function
import structs
print("s = structs.S()")
s = structs.S()
print("s = %s" % (s,))
print("s.Init()")
... | 23.068493 | 63 | 0.586105 |
import print_function
import structs
print("s = structs.S()")
s = structs.S()
print("s = %s" % (s,))
print("s.Init()")
s.Init()
print("s.Upper('boo')= %s" % repr(s.Upper("boo")).lstrip('u'))
print("s1 = structs.S1()")
s1 = structs.S1()
print("s1 = %s" %(s1,))
try:
s1 = structs.S1(1)
except Exception as err... | true | true |
f744e0b119a6a701c52cf4aa92a6a999c4a99b8a | 10,380 | py | Python | midifile/events.py | rmcclain3/motif-generator | 9ba88c49e3fde8e2301cf4b9a13115502e06d1e2 | [
"CC0-1.0"
] | null | null | null | midifile/events.py | rmcclain3/motif-generator | 9ba88c49e3fde8e2301cf4b9a13115502e06d1e2 | [
"CC0-1.0"
] | null | null | null | midifile/events.py | rmcclain3/motif-generator | 9ba88c49e3fde8e2301cf4b9a13115502e06d1e2 | [
"CC0-1.0"
] | null | null | null | import math
class EventRegistry(object):
Events = {}
MetaEvents = {}
def register_event(cls, event, bases):
#print 'registering', event.__name__, bases
if MetaEvent in bases or AbstractTextEvent in bases:
assert event.metacommand not in cls.MetaEvents, \
... | 26.961039 | 79 | 0.577071 | import math
class EventRegistry(object):
Events = {}
MetaEvents = {}
def register_event(cls, event, bases):
if MetaEvent in bases or AbstractTextEvent in bases:
assert event.metacommand not in cls.MetaEvents, \
"Event %s already registered" % ev... | false | true |
f744e2a514d22ab54acf2609afe7cb68d6342053 | 168 | py | Python | Py11/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py11/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py11/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | def sum(x, y, z):
if x == y == z:
calc = 0
else:
calc = x + y + z
return calc
print(sum(1, 1, 1))
print(sum(1, 3, 3))
print(sum(3, 1, 3))
| 14 | 24 | 0.434524 | def sum(x, y, z):
if x == y == z:
calc = 0
else:
calc = x + y + z
return calc
print(sum(1, 1, 1))
print(sum(1, 3, 3))
print(sum(3, 1, 3))
| true | true |
f744e2c999b32c4a4cf90b0ccb70358ab288dd10 | 3,219 | py | Python | python/birdVid_ML/JetsonYolo.py | plertvilai/birdCam_jetson | 8e74bbc81c289b3e0158edbd471fda0f3ed2b9fb | [
"MIT"
] | null | null | null | python/birdVid_ML/JetsonYolo.py | plertvilai/birdCam_jetson | 8e74bbc81c289b3e0158edbd471fda0f3ed2b9fb | [
"MIT"
] | null | null | null | python/birdVid_ML/JetsonYolo.py | plertvilai/birdCam_jetson | 8e74bbc81c289b3e0158edbd471fda0f3ed2b9fb | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from elements.yolo import OBJ_DETECTION
Object_classes = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light',
'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow',
... | 40.746835 | 138 | 0.571295 | import cv2
import numpy as np
from elements.yolo import OBJ_DETECTION
Object_classes = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light',
'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow',
... | true | true |
f744e2fea3be8f82a2e009722631692f7fd539c7 | 4,290 | py | Python | scripts/DefineSubareas.py | cprice-usgs/USGS_Sample | 7ad95453a4565acb02eee36919f917fa97a64b91 | [
"CC0-1.0"
] | null | null | null | scripts/DefineSubareas.py | cprice-usgs/USGS_Sample | 7ad95453a4565acb02eee36919f917fa97a64b91 | [
"CC0-1.0"
] | null | null | null | scripts/DefineSubareas.py | cprice-usgs/USGS_Sample | 7ad95453a4565acb02eee36919f917fa97a64b91 | [
"CC0-1.0"
] | null | null | null | # Name: Define subareas
# Purpose: Set up raster study area for equal-area sample selection
# Author: cprice
# Created: 3/25/2013 10:47:10 AM
# Environment: ArcGIS 10.x, Python 2.6,2.7 arcpy
# -------------------------------------------------------------------
import os
import sys
import trace... | 34.32 | 79 | 0.582984 |
import os
import sys
import traceback
import arcpy
from arcpy import env
import samputil
from samputil import GPMsg, MsgError, ScratchFolder
def DefineSubareas(study_area, procRaster,
subarea_meth="NUMBER",subarea_val=1e5,
clip_extent=True):
"""Set up raster study area ... | false | true |
f744e30dfb2ab1b6b5818c3366a686712d80e47a | 7,229 | py | Python | db_template.py | XENONnT/moderator | 693286dad325396d882bcced0fd47265959deb9d | [
"BSD-2-Clause"
] | null | null | null | db_template.py | XENONnT/moderator | 693286dad325396d882bcced0fd47265959deb9d | [
"BSD-2-Clause"
] | null | null | null | db_template.py | XENONnT/moderator | 693286dad325396d882bcced0fd47265959deb9d | [
"BSD-2-Clause"
] | null | null | null | #Author: Boris Bauermeister
#Email: Boris.Bauermeister@gmail.com
#Simple MongoDB access class specified to readout and manipluate a data field.
#HANDLE WITH CARE
import pymongo
import os
import json
class DBManager():
def __init__(self):
self.db_mongodb_user=None
self.db_mongodb_pw=None
se... | 37.651042 | 128 | 0.513487 |
import pymongo
import os
import json
class DBManager():
def __init__(self):
self.db_mongodb_user=None
self.db_mongodb_pw=None
self.taddress=None
self.db_extern = None
self.db_projection = {"_id":True, "data": True, "name": True, "number":True, "start":True, 'detector': ... | true | true |
f744e33e63fb8e9d203257b688e911f5d53e72b2 | 755 | py | Python | setup.py | lancelee82/pynccl | 2a2868a9cf9396f6ca70511de6a2f834124d3c7c | [
"MIT"
] | 2 | 2021-01-21T17:30:57.000Z | 2022-02-12T15:34:28.000Z | setup.py | lancelee82/pynccl | 2a2868a9cf9396f6ca70511de6a2f834124d3c7c | [
"MIT"
] | null | null | null | setup.py | lancelee82/pynccl | 2a2868a9cf9396f6ca70511de6a2f834124d3c7c | [
"MIT"
] | null | null | null | import setuptools
packages = [
'pynccl',
'pynccl.utils',
]
setuptools.setup(
name='pynccl',
version='0.1.2',
author="Lance Lee",
author_email="lancelee82@163.com",
description="pynccl - python bindings for NVIDIA NCCL libraries",
long_description=open("README.md").read(),
long_des... | 25.166667 | 71 | 0.629139 | import setuptools
packages = [
'pynccl',
'pynccl.utils',
]
setuptools.setup(
name='pynccl',
version='0.1.2',
author="Lance Lee",
author_email="lancelee82@163.com",
description="pynccl - python bindings for NVIDIA NCCL libraries",
long_description=open("README.md").read(),
long_des... | true | true |
f744e38df1639b14725933d9a334fa75c86a9238 | 53,395 | py | Python | React/search-card-app-react/.yarn/unplugged/node-gyp-npm-8.1.0-30cf500e19/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py | saanyalall/Hacktoberfest2021-2 | 3b9aea4ff320976e7c2bcb85f5265be87b0c33be | [
"MIT"
] | 11 | 2018-12-09T22:47:16.000Z | 2021-04-19T13:30:07.000Z | React/search-card-app-react/.yarn/unplugged/node-gyp-npm-8.1.0-30cf500e19/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py | saanyalall/Hacktoberfest2021-2 | 3b9aea4ff320976e7c2bcb85f5265be87b0c33be | [
"MIT"
] | 41 | 2021-07-16T14:11:20.000Z | 2022-03-21T01:55:22.000Z | React/search-card-app-react/.yarn/unplugged/node-gyp-npm-8.1.0-30cf500e19/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py | saanyalall/Hacktoberfest2021-2 | 3b9aea4ff320976e7c2bcb85f5265be87b0c33be | [
"MIT"
] | 2 | 2019-04-26T19:40:20.000Z | 2020-04-23T12:57:49.000Z | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This module helps emulate Visual Studio 2008 behavior on top of other
build systems, primarily ninja.
"""
import os
import re
import subprocess
import sys
fr... | 42.545817 | 88 | 0.614908 |
import os
import re
import subprocess
import sys
from gyp.common import OrderedSet
import gyp.MSVSUtil
import gyp.MSVSVersion
windows_quoter_regex = re.compile(r'(\\*)"')
def QuoteForRspFile(arg):
# See http://goo.gl/cuFbX and http://goo.gl/dhPnp including the comment
# threads. This is actually the qu... | true | true |
f744e3c66f67d387ec9de31d530303558774ff15 | 6,418 | py | Python | converter/records.py | michaelkariv/firestore-export-json | 78cfaaf086592d326daf0ffdd93ceeda5fb52b1f | [
"MIT"
] | 28 | 2021-04-27T03:11:19.000Z | 2022-03-21T09:05:27.000Z | converter/records.py | michaelkariv/firestore-export-json | 78cfaaf086592d326daf0ffdd93ceeda5fb52b1f | [
"MIT"
] | 6 | 2021-05-26T10:10:11.000Z | 2022-02-14T07:59:31.000Z | converter/records.py | michaelkariv/firestore-export-json | 78cfaaf086592d326daf0ffdd93ceeda5fb52b1f | [
"MIT"
] | 10 | 2021-05-18T05:48:41.000Z | 2022-02-14T18:51:53.000Z | import logging
import struct
import google_crc32c
# Data format is defined @ https://github.com/google/leveldb/blob/master/doc/log_format.md
ENDIANNESS = "little"
CRC_INIT = 0
BLOCK_SIZE = 32 * 1024
HEADER_FORMAT = "<IHB"
HEADER_LENGTH = struct.calcsize(HEADER_FORMAT)
# the type is the "B" part of the HEADER_FO... | 31.004831 | 90 | 0.539109 | import logging
import struct
import google_crc32c
ENDIANNESS = "little"
CRC_INIT = 0
BLOCK_SIZE = 32 * 1024
HEADER_FORMAT = "<IHB"
HEADER_LENGTH = struct.calcsize(HEADER_FORMAT)
RECORD_TYPE_LENGTH = struct.calcsize("<B")
RECORD_TYPE_NONE = 0
RECORD_TYPE_FULL = 1
RECORD_TYPE_FIRST = 2
RECORD_TYPE_MIDDLE = ... | true | true |
f744e487c59a44a69263b1b09a858a11ae37dd7c | 82,638 | py | Python | test/runtest.py | andyljones/ray | 52dfde1cbb7131fd62ebcb00f5a2b22ced7321ad | [
"Apache-2.0"
] | null | null | null | test/runtest.py | andyljones/ray | 52dfde1cbb7131fd62ebcb00f5a2b22ced7321ad | [
"Apache-2.0"
] | null | null | null | test/runtest.py | andyljones/ray | 52dfde1cbb7131fd62ebcb00f5a2b22ced7321ad | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import logging
import os
import random
import re
import setproctitle
import shutil
import socket
import string
import subprocess
import sys
import tempfile
import threading
import time
from collecti... | 30.104918 | 79 | 0.612491 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import logging
import os
import random
import re
import setproctitle
import shutil
import socket
import string
import subprocess
import sys
import tempfile
import threading
import time
from collecti... | true | true |
f744e4b5c7b491231658968c5f8430cd814185c4 | 325 | py | Python | calculation/config/docs.py | tthmatt/erpnext_cal | b6a45da19a77b6b5d79a0117644daf299009ff0f | [
"MIT"
] | 1 | 2020-06-14T20:20:14.000Z | 2020-06-14T20:20:14.000Z | calculation/config/docs.py | riconova92/calculation | a5bdafdd064a44639fb4a400c7f4eaec94db32b4 | [
"MIT"
] | null | null | null | calculation/config/docs.py | riconova92/calculation | a5bdafdd064a44639fb4a400c7f4eaec94db32b4 | [
"MIT"
] | 1 | 2020-06-14T20:15:22.000Z | 2020-06-14T20:15:22.000Z | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/calculation"
# docs_base_url = "https://[org_name].github.io/calculation"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "Calculat... | 27.083333 | 68 | 0.732308 |
def get_context(context):
context.brand_html = "Calculation"
| true | true |
f744e57e4a2444a8a36373df170fea266281290d | 2,846 | py | Python | ALS-Model-preparation.py | Chris642/ALS-Model-serving-on-Kubeflow | 52aa935e6948a1af477e71f1ec2808925c635662 | [
"MIT"
] | null | null | null | ALS-Model-preparation.py | Chris642/ALS-Model-serving-on-Kubeflow | 52aa935e6948a1af477e71f1ec2808925c635662 | [
"MIT"
] | null | null | null | ALS-Model-preparation.py | Chris642/ALS-Model-serving-on-Kubeflow | 52aa935e6948a1af477e71f1ec2808925c635662 | [
"MIT"
] | 1 | 2020-06-27T07:17:34.000Z | 2020-06-27T07:17:34.000Z |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not u... | 38.986301 | 96 | 0.695011 |
from __future__ import print_function
import sys
if sys.version >= '3':
long = int
from pyspark.sql import SparkSession
import numpy as np
from pyspark.ml.evaluation import RegressionEvaluator
from pyspark.ml.recommendation import ALS
from pyspark.sql import Row
import pickle
if __name__ == "... | true | true |
f744e601887fe4f0882d9930534c4842aa255fac | 2,533 | py | Python | imagepypelines/core/Data.py | jmaggio14/jefftools | e429834d84623e20b4bb1f965949242528ffc7b3 | [
"Apache-2.0"
] | 3 | 2018-12-05T02:41:45.000Z | 2019-06-01T02:33:09.000Z | imagepypelines/core/Data.py | jmaggio14/jefftools | e429834d84623e20b4bb1f965949242528ffc7b3 | [
"Apache-2.0"
] | 69 | 2018-12-12T03:37:38.000Z | 2020-10-25T15:22:31.000Z | imagepypelines/core/Data.py | jmaggio14/jefftools | e429834d84623e20b4bb1f965949242528ffc7b3 | [
"Apache-2.0"
] | 1 | 2018-08-13T20:45:02.000Z | 2018-08-13T20:45:02.000Z | # @Email: jmaggio14@gmail.com
# @Website: https://www.imagepypelines.org/
# @License: https://github.com/jmaggio14/imagepypelines/blob/master/LICENSE
# @github: https://github.com/jmaggio14/imagepypelines
#
# Copyright (c) 2018-2020 Jeff Maggio, Ryan Hartzell, and collaborators
#
import numpy as np
class Data(object)... | 32.896104 | 82 | 0.417687 |
import numpy as np
class Data(object):
def __init__(self, data):
self.data = data
| true | true |
f744e60c82f0e3da3bc951df7b4694ea0413c3ce | 3,574 | bzl | Python | bazel/envoy_binary.bzl | VMAJSTER/envoy | bd0ec3d14bc2c6159ee9fafe76355f9607b5c9f7 | [
"Apache-2.0"
] | 1 | 2022-02-15T23:04:31.000Z | 2022-02-15T23:04:31.000Z | bazel/envoy_binary.bzl | VMAJSTER/envoy | bd0ec3d14bc2c6159ee9fafe76355f9607b5c9f7 | [
"Apache-2.0"
] | 86 | 2021-10-04T18:29:31.000Z | 2022-03-31T18:18:05.000Z | bazel/envoy_binary.bzl | VMAJSTER/envoy | bd0ec3d14bc2c6159ee9fafe76355f9607b5c9f7 | [
"Apache-2.0"
] | null | null | null | load("@rules_cc//cc:defs.bzl", "cc_binary")
# DO NOT LOAD THIS FILE. Load envoy_build_system.bzl instead.
# Envoy binary targets
load(
":envoy_internal.bzl",
"envoy_copts",
"envoy_external_dep_path",
"envoy_stdlib_deps",
"tcmalloc_external_dep",
)
# Envoy C++ binary targets should be specified wit... | 30.288136 | 95 | 0.553162 | load("@rules_cc//cc:defs.bzl", "cc_binary")
load(
":envoy_internal.bzl",
"envoy_copts",
"envoy_external_dep_path",
"envoy_stdlib_deps",
"tcmalloc_external_dep",
)
def envoy_cc_binary(
name,
srcs = [],
data = [],
testonly = 0,
visibility = None,
ex... | true | true |
f744e723be0639d4297a91b34a8a3217f0c663dd | 6,408 | py | Python | flask_utils/jinja2htmlcompress.py | zalew/flask-utils | aed0aa680072869814fff4f6e3dc56050944d3ee | [
"MIT"
] | 1 | 2019-05-06T06:36:13.000Z | 2019-05-06T06:36:13.000Z | flask_utils/jinja2htmlcompress.py | zalew/flask-utils | aed0aa680072869814fff4f6e3dc56050944d3ee | [
"MIT"
] | null | null | null | flask_utils/jinja2htmlcompress.py | zalew/flask-utils | aed0aa680072869814fff4f6e3dc56050944d3ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jinja2htmlcompress
~~~~~~~~~~~~~~~~~~
A Jinja2 extension that eliminates useless whitespace at template
compilation time without extra overhead.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
https://github.com/mitsuhiko/ji... | 32.861538 | 78 | 0.508271 |
"""
jinja2htmlcompress
~~~~~~~~~~~~~~~~~~
A Jinja2 extension that eliminates useless whitespace at template
compilation time without extra overhead.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
https://github.com/mitsuhiko/jinja2-htmlcompress
"""
i... | false | true |
f744e74ff7b7010d24f72f11be9239a2ac053811 | 1,735 | py | Python | prostate_cancer_segmentation/config_parse/callbacks_available.py | vpeopleonatank/pytorch_lightning_segmentation_template | 4637062d9de840714b2914583c51c4694646a6ab | [
"Apache-2.0"
] | 1 | 2021-02-23T15:37:22.000Z | 2021-02-23T15:37:22.000Z | prostate_cancer_segmentation/config_parse/callbacks_available.py | vpeopleonatank/pytorch_lightning_segmentation_template | 4637062d9de840714b2914583c51c4694646a6ab | [
"Apache-2.0"
] | null | null | null | prostate_cancer_segmentation/config_parse/callbacks_available.py | vpeopleonatank/pytorch_lightning_segmentation_template | 4637062d9de840714b2914583c51c4694646a6ab | [
"Apache-2.0"
] | null | null | null | """Dataclasses just to initialize and return Callback objects"""
from typing import Optional, TYPE_CHECKING
from omegaconf import DictConfig
from dataclasses import dataclass
from pytorch_lightning.callbacks import Callback, EarlyStopping, LearningRateMonitor, ModelCheckpoint
from prostate_cancer_segmentation.callbac... | 27.539683 | 101 | 0.758501 | from typing import Optional, TYPE_CHECKING
from omegaconf import DictConfig
from dataclasses import dataclass
from pytorch_lightning.callbacks import Callback, EarlyStopping, LearningRateMonitor, ModelCheckpoint
from prostate_cancer_segmentation.callbacks.log_media import LogMedia
from prostate_cancer_segmentation.co... | true | true |
f744eab37255a2c107b742711d5d7033e1ff8193 | 22,378 | py | Python | vumi/transports/smpp/protocol.py | seidu626/vumi | 62eae205a07029bc7ab382086715694548001876 | [
"BSD-3-Clause"
] | 199 | 2015-01-05T09:04:24.000Z | 2018-08-15T17:02:49.000Z | vumi/transports/smpp/protocol.py | seidu626/vumi | 62eae205a07029bc7ab382086715694548001876 | [
"BSD-3-Clause"
] | 187 | 2015-01-06T15:22:38.000Z | 2018-07-14T13:15:29.000Z | vumi/transports/smpp/protocol.py | seidu626/vumi | 62eae205a07029bc7ab382086715694548001876 | [
"BSD-3-Clause"
] | 86 | 2015-01-31T02:47:08.000Z | 2018-12-01T11:59:47.000Z | # -*- test-case-name: vumi.transports.smpp.tests.test_protocol -*-
from functools import wraps
from twisted.internet.protocol import Protocol, ClientFactory
from twisted.internet.task import LoopingCall
from twisted.internet.defer import (
inlineCallbacks, returnValue, maybeDeferred, DeferredQueue, succeed)
from... | 37.421405 | 79 | 0.622531 |
from functools import wraps
from twisted.internet.protocol import Protocol, ClientFactory
from twisted.internet.task import LoopingCall
from twisted.internet.defer import (
inlineCallbacks, returnValue, maybeDeferred, DeferredQueue, succeed)
from smpp.pdu import unpack_pdu
from smpp.pdu_builder import (
Bin... | true | true |
f744eaee15bd9d26f23802777416cc1d4d4081b4 | 2,001 | py | Python | azext_iot/sdk/digitaltwins/controlplane/models/digital_twins_identity_py3.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | azext_iot/sdk/digitaltwins/controlplane/models/digital_twins_identity_py3.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | azext_iot/sdk/digitaltwins/controlplane/models/digital_twins_identity_py3.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 38.480769 | 79 | 0.636682 |
from msrest.serialization import Model
class DigitalTwinsIdentity(Model):
_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'principal_id': {'key': 'principalId', 't... | true | true |
f744eaf306c38610009118b00b1a70801415d0c8 | 1,239 | py | Python | motor_descuento/modelo/modelo_geolocalizacion.py | angelquin1986/tiptopDescuentos | 6bca61d3142b75eee0e72f3932aeabcf1457526a | [
"Apache-2.0"
] | null | null | null | motor_descuento/modelo/modelo_geolocalizacion.py | angelquin1986/tiptopDescuentos | 6bca61d3142b75eee0e72f3932aeabcf1457526a | [
"Apache-2.0"
] | 4 | 2021-03-30T13:51:49.000Z | 2021-09-22T19:15:28.000Z | motor_descuento/modelo/modelo_geolocalizacion.py | angelquin1986/tiptopDescuentos | 6bca61d3142b75eee0e72f3932aeabcf1457526a | [
"Apache-2.0"
] | null | null | null | from django.db import models
"""
@Author Aquingaluisa
Modelos de tipti para localizacion geografica
"""
class Country(models.Model):
name = models.CharField(max_length=50)
codigo = models.CharField(max_length=50)
lenguaje = models.CharField(max_length=50)
currency = models.CharField(max_length=50)
... | 23.826923 | 68 | 0.705408 | from django.db import models
class Country(models.Model):
name = models.CharField(max_length=50)
codigo = models.CharField(max_length=50)
lenguaje = models.CharField(max_length=50)
currency = models.CharField(max_length=50)
class Meta:
db_table = 'country'
class Province(models.Model):... | true | true |
f744ebdf0f797208a94944ada7ce2271fb7ee8d2 | 5,514 | py | Python | contrib/seeds/makeseeds.py | GrowCoin-Project/GROW | 1a7bff93d6e0d65b4f5e2629bb7e034dd6b9c228 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | GrowCoin-Project/GROW | 1a7bff93d6e0d65b4f5e2629bb7e034dd6b9c228 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | GrowCoin-Project/GROW | 1a7bff93d6e0d65b4f5e2629bb7e034dd6b9c228 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-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.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.05814 | 186 | 0.566921 |
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
# These are hosts that have been observed to be behaving strangely (e.g.
# aggressively connecting to every node).
SUSPICIOUS_HOSTS = {
""
}
import re
import sys
import dns.resolver
import collections
PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})... | true | true |
f744ebe4c91cf6dcc9df612552c69e155d1d600b | 1,011 | py | Python | RoughWork/stddev.py | SimonMcLain/Project_Repository_Programming_and_Scripting_2018 | c10769973461d4c30b2c0a9d3a1f0e812049ca44 | [
"Apache-2.0"
] | null | null | null | RoughWork/stddev.py | SimonMcLain/Project_Repository_Programming_and_Scripting_2018 | c10769973461d4c30b2c0a9d3a1f0e812049ca44 | [
"Apache-2.0"
] | null | null | null | RoughWork/stddev.py | SimonMcLain/Project_Repository_Programming_and_Scripting_2018 | c10769973461d4c30b2c0a9d3a1f0e812049ca44 | [
"Apache-2.0"
] | null | null | null | #Simon McLain 2018-04-25
# Experimenting with numpy
# https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html reference to standard deviation
# calculate the standard deviation of each column
import numpy
#imports numpy library providing math functions to operate on them
data = numpy.genfromtxt('iris.csv... | 42.125 | 102 | 0.735905 |
import numpy
data = numpy.genfromtxt('iris.csv', delimiter=',')
col1 = data[:,0]
stdcol1 = numpy.std(data[:,0])
col2 =data[:, 1]
stdcol2 = numpy.std(data[:, 1])
col3 =data[:, 2]
stdcol3 = numpy.std(data[:, 2])
col4 =data[:, 3]
stdcol4 = numpy.std(data[:, 3])
print("The standard deviation in petal length is: "... | true | true |
f744ebe865f6a43635d2f08adcd0842e2fe96d43 | 727 | py | Python | Get Retroativo/2017_09.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 6 | 2019-10-18T17:47:30.000Z | 2021-03-18T06:04:06.000Z | Get Retroativo/2017_09.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 1 | 2020-09-24T08:17:29.000Z | 2020-09-28T08:16:39.000Z | Get Retroativo/2017_09.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 3 | 2019-10-20T18:40:20.000Z | 2021-04-15T01:27:59.000Z | import psycopg2.extras
from controller import RobotRotine as rr
from api import graphqlconsume, querygraphql
import time
import datetime
import numpy as np
"""
current = np.datetime64(datetime.datetime.now())
currentab = np.datetime64(current) + np.timedelta64(5, 'h')
lastdate = np.datetime64(currentab) - np.timedelta6... | 25.964286 | 61 | 0.69326 | import psycopg2.extras
from controller import RobotRotine as rr
from api import graphqlconsume, querygraphql
import time
import datetime
import numpy as np
robo5 = rr.RobotRotine()
i = 0
dtinit = '2017-09-01T00:00:00'
while i < 31:
print(dtinit)
dtfim = np.datetime64(dtinit) + np.timedelta64(24, 'h')
robo5.... | true | true |
f744ec3eb8dcda48cc8257618f755cb79ed6ec3e | 7,882 | py | Python | tests/5 - Models segmentation by sync/5.1 - Hodgkin-Huxley/shh_Nneurons_sync_test.py | GuilhermeToso/masters-project | 01d5acfddaedb3cbf7fa9247a88108530547e155 | [
"MIT"
] | 1 | 2021-08-01T20:13:15.000Z | 2021-08-01T20:13:15.000Z | tests/5 - Models segmentation by sync/5.1 - Hodgkin-Huxley/shh_Nneurons_sync_test.py | GuilhermeToso/masters-project | 01d5acfddaedb3cbf7fa9247a88108530547e155 | [
"MIT"
] | null | null | null | tests/5 - Models segmentation by sync/5.1 - Hodgkin-Huxley/shh_Nneurons_sync_test.py | GuilhermeToso/masters-project | 01d5acfddaedb3cbf7fa9247a88108530547e155 | [
"MIT"
] | null | null | null | """
Stochastic Hodgkin-Huxley Neurons
=================================
Analysis of 12 Neurons coupled in 3 different groups
----------------------------------------------------
**Author**: Guilherme M. Toso
**Tittle**: shh_Nneurons_sunc_test.py
**Project**: Semi-Supervised Learning Using Competition for Neurons' Sy... | 28.977941 | 113 | 0.650596 |
import sys
import os
path = os.getcwd()
sys.path.insert(0,path)
from nsc import HodgkinHuxley, SDE, Chemical, Couple
from nsc import unwrap
from nsc import ngplot
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib import colors
import sys
np.random.seed(0)
neurons = 12
v_na ... | true | true |
f744ed88e6d86a25cbc1d168009e2a49de06e2ba | 336 | py | Python | 1/hello.py | yrjc564778188/LT_PythonDemo | 60828c5731e93c34323cf53911c97c7db2f782f4 | [
"Apache-2.0"
] | null | null | null | 1/hello.py | yrjc564778188/LT_PythonDemo | 60828c5731e93c34323cf53911c97c7db2f782f4 | [
"Apache-2.0"
] | null | null | null | 1/hello.py | yrjc564778188/LT_PythonDemo | 60828c5731e93c34323cf53911c97c7db2f782f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
' a test module '
__author__ = 'Michael Liao'
import sys
def test():
args = sys.argv
if len(args)==1:
print('Hello, world!')
elif len(args)==2:
print('Hello, %s!' % args[1])
else:
print('Too many arguments!')
if __name__=='__mai... | 336 | 336 | 0.550595 | true | true | |
f744ee5efa6e0595f99a1ae9b648baf9f58be040 | 1,522 | py | Python | tests/test_treewasserstein.py | InkToYou/TreeWasserstein | 5b69f0eb08d26e5d27736499ac6cb2f19dea2cac | [
"BSD-3-Clause"
] | 1 | 2021-07-07T03:41:48.000Z | 2021-07-07T03:41:48.000Z | tests/test_treewasserstein.py | evilyingyun/Tree-Wasserstein | b3f26dd50cc5f06a40e076b2e68f6e5c83786e7b | [
"BSD-3-Clause"
] | 1 | 2020-10-23T14:32:22.000Z | 2020-11-02T01:49:28.000Z | tests/test_treewasserstein.py | evilyingyun/Tree-Wasserstein | b3f26dd50cc5f06a40e076b2e68f6e5c83786e7b | [
"BSD-3-Clause"
] | 2 | 2020-10-21T22:53:28.000Z | 2021-09-27T05:27:12.000Z | import numpy as np
import pytest
import networkx as nx
import ot
import tw
class TestBuildValidTreeMetric(object):
@pytest.mark.parametrize(
"num_node, edges",
[
(5, [(i % 5, (i + 1) % 5, i + 1) for i in range(5)]),
(3, [(i % 3, (i + 1) % 3, i + 1) for i in range(3)]),
... | 33.822222 | 84 | 0.562418 | import numpy as np
import pytest
import networkx as nx
import ot
import tw
class TestBuildValidTreeMetric(object):
@pytest.mark.parametrize(
"num_node, edges",
[
(5, [(i % 5, (i + 1) % 5, i + 1) for i in range(5)]),
(3, [(i % 3, (i + 1) % 3, i + 1) for i in range(3)]),
... | true | true |
f744eec2b194d6c7edba23b274637f2b7d64116c | 429 | py | Python | manage.py | Garlinsk/News-App | a2a5e4b8e74254a174c0527c9e26921b6cd7079a | [
"MIT"
] | null | null | null | manage.py | Garlinsk/News-App | a2a5e4b8e74254a174c0527c9e26921b6cd7079a | [
"MIT"
] | null | null | null | manage.py | Garlinsk/News-App | a2a5e4b8e74254a174c0527c9e26921b6cd7079a | [
"MIT"
] | null | null | null | from app import create_app
from flask_script import Manager, Server
# Creating app instance
app = create_app('development')
manager = Manager(app)
manager.add_command('server', Server)
@manager.command
def test():
"""
Run the unit tests.
"""
import unittest
tests = unittest.TestLoader().discove... | 18.652174 | 51 | 0.703963 | from app import create_app
from flask_script import Manager, Server
app = create_app('development')
manager = Manager(app)
manager.add_command('server', Server)
@manager.command
def test():
import unittest
tests = unittest.TestLoader().discover('tests')
unittest.TextTestRunner(verbosity=2).run(tests)
... | true | true |
f744ef00a9f99aa9bad0831ee941632ce659e346 | 6,910 | py | Python | live_recorder/you_live/flv_checker.py | hguandl/LiveRecorder | e1b49906851cbe95a10f2f7ad78e3b9b8e8755fc | [
"MIT"
] | null | null | null | live_recorder/you_live/flv_checker.py | hguandl/LiveRecorder | e1b49906851cbe95a10f2f7ad78e3b9b8e8755fc | [
"MIT"
] | null | null | null | live_recorder/you_live/flv_checker.py | hguandl/LiveRecorder | e1b49906851cbe95a10f2f7ad78e3b9b8e8755fc | [
"MIT"
] | null | null | null | # coding=utf-8
import os
import struct
class Flv(object):
def __init__(self, path, dest_folder = None, debug = False):
self.path = path
self.debug = debug
if dest_folder != None:
self.dest_folder = dest_folder.rstrip('\\').rstrip('/')
else:
self.... | 39.942197 | 130 | 0.506802 |
import os
import struct
class Flv(object):
def __init__(self, path, dest_folder = None, debug = False):
self.path = path
self.debug = debug
if dest_folder != None:
self.dest_folder = dest_folder.rstrip('\\').rstrip('/')
else:
self.dest_folder = N... | true | true |
f744f01ecce018ea76789358a4752f24387fc407 | 15,134 | py | Python | networking_cisco/tests/unit/neutronclient/test_cli20_routertype.py | CiscoSystems/networking-cisco | ed18627faf90caa1c0d1b7fe00f240a57901dee4 | [
"Apache-2.0"
] | 8 | 2016-02-12T01:25:29.000Z | 2019-01-13T14:19:25.000Z | networking_cisco/tests/unit/neutronclient/test_cli20_routertype.py | CiscoSystems/networking-cisco | ed18627faf90caa1c0d1b7fe00f240a57901dee4 | [
"Apache-2.0"
] | 25 | 2016-01-28T12:33:41.000Z | 2016-07-28T21:18:03.000Z | networking_cisco/tests/unit/neutronclient/test_cli20_routertype.py | CiscoSystems/networking-cisco | ed18627faf90caa1c0d1b7fe00f240a57901dee4 | [
"Apache-2.0"
] | 9 | 2015-05-07T02:47:55.000Z | 2019-10-18T15:25:27.000Z | # Copyright 2015 Cisco Systems, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 45.447447 | 78 | 0.612396 |
import sys
import mock
from neutronclient.common import exceptions
from neutronclient import shell
from neutronclient.tests.unit import test_cli20
from networking_cisco.neutronclient import routertype
class CLITestV20RouterType(test_cli20.CLITestV20Base):
def setUp(self):
self... | true | true |
f744f0a6bd489a82f8024184851f6f38a6b971db | 5,948 | py | Python | soccer/gameplay/evaluation/touchpass_positioning.py | Alex-Gurung/robocup-software | 9271df5ed16928f0081fc81c50affb0a08dd54bd | [
"Apache-2.0"
] | 1 | 2019-01-18T02:03:26.000Z | 2019-01-18T02:03:26.000Z | soccer/gameplay/evaluation/touchpass_positioning.py | Alex-Gurung/robocup-software | 9271df5ed16928f0081fc81c50affb0a08dd54bd | [
"Apache-2.0"
] | null | null | null | soccer/gameplay/evaluation/touchpass_positioning.py | Alex-Gurung/robocup-software | 9271df5ed16928f0081fc81c50affb0a08dd54bd | [
"Apache-2.0"
] | null | null | null | import robocup
import constants
import main
import evaluation.passing
## The Touchpass positioning file finds the best location within a rectangle to ricochet
# a ball into the goal.
#
# By default, this will select a rectangle that is across the field from the current ball position.
# The best location is found by mu... | 39.919463 | 133 | 0.653161 | import robocup
import constants
import main
import evaluation.passing
ected, and returned.
#
# Example usage:
# tpass = evaluation.touchpass_positioning
# tpass.eval_best_receive_point(main.ball().pos, None, pass_bhvr.get_robots())
## Returns a robocup.Rect object that is the default location to be evaluated
# This ... | true | true |
f744f19bb34a5f1c829d51e2f8696013d030116f | 988 | py | Python | conditioner/tests/actions/factories.py | omni-digital/django-conditioner | d5d2ad1f016bc3e6b34c74ff68cd024e8fad5125 | [
"MIT"
] | 3 | 2019-03-02T21:59:50.000Z | 2020-02-19T04:38:13.000Z | conditioner/tests/actions/factories.py | omni-digital/django-conditioner | d5d2ad1f016bc3e6b34c74ff68cd024e8fad5125 | [
"MIT"
] | 1 | 2018-08-30T02:52:24.000Z | 2018-09-03T02:30:47.000Z | conditioner/tests/actions/factories.py | omni-digital/django-conditioner | d5d2ad1f016bc3e6b34c74ff68cd024e8fad5125 | [
"MIT"
] | 2 | 2017-03-17T11:22:48.000Z | 2019-12-05T11:48:53.000Z | """
Conditioner module actions related factories
"""
import random
import factory
from faker import Factory as FakerFactory
from conditioner.actions import LoggerAction, SendTemplatedEmailAction
from conditioner.tests.factories import BaseActionFactory
faker = FakerFactory.create()
class LoggerActionFactory(BaseA... | 26.702703 | 75 | 0.75 | import random
import factory
from faker import Factory as FakerFactory
from conditioner.actions import LoggerAction, SendTemplatedEmailAction
from conditioner.tests.factories import BaseActionFactory
faker = FakerFactory.create()
class LoggerActionFactory(BaseActionFactory):
level = random.choice(LoggerAction... | true | true |
f744f22f34857b489ac33b22bd00d6903eb0ea4e | 1,022 | py | Python | tensorflow_datasets/image/coil100_test.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | 7 | 2020-04-21T01:28:30.000Z | 2021-06-13T07:23:33.000Z | tensorflow_datasets/image/coil100_test.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/image/coil100_test.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | 4 | 2020-04-25T15:48:46.000Z | 2020-11-22T20:35:01.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 28.388889 | 74 | 0.766145 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_datasets import testing
from tensorflow_datasets.image import coil100
class Coil100Test(testing.DatasetBuilderTestCase):
DATASET_CLASS = coil100.Coil100
SPLITS = {
"... | true | true |
f744f23000003674a797ec691bfa633d9d7714ae | 42,162 | py | Python | micropsi_core/runtime.py | brucepro/micropsi2 | 84c304d5339f25d112da5565fb2cd98c31524f94 | [
"Apache-2.0"
] | null | null | null | micropsi_core/runtime.py | brucepro/micropsi2 | 84c304d5339f25d112da5565fb2cd98c31524f94 | [
"Apache-2.0"
] | null | null | null | micropsi_core/runtime.py | brucepro/micropsi2 | 84c304d5339f25d112da5565fb2cd98c31524f94 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
MicroPsi runtime module;
maintains a set of users, worlds (up to one per user), and nodenets, and provides an interface to external clients
"""
from micropsi_core._runtime_api_world import *
from micropsi_core._runtime_api_monitors import *
__author__ = 'joscha'
__da... | 36.598958 | 229 | 0.663133 |
from micropsi_core._runtime_api_world import *
from micropsi_core._runtime_api_monitors import *
__author__ = 'joscha'
__date__ = '10.05.12'
from configuration import RESOURCE_PATH, SERVER_SETTINGS_PATH, LOGGING
from micropsi_core.nodenet.node import Node, Nodetype
from micropsi_core.nodenet.nodenet import Noden... | true | true |
f744f4017ef11cf5b0be808f3fa58712b7a94deb | 3,122 | py | Python | leveltwo/database/models.py | LilianBoulard/LevelTwo | 23013a53100875d77dfae99494d2ef415d12b0df | [
"MIT"
] | 1 | 2021-05-03T08:21:36.000Z | 2021-05-03T08:21:36.000Z | leveltwo/database/models.py | LilianBoulard/LevelTwo | 23013a53100875d77dfae99494d2ef415d12b0df | [
"MIT"
] | 2 | 2021-05-06T08:37:10.000Z | 2021-05-06T14:08:46.000Z | leveltwo/database/models.py | LilianBoulard/LevelTwo | 23013a53100875d77dfae99494d2ef415d12b0df | [
"MIT"
] | null | null | null | """
Defines the database models.
"""
from datetime import datetime
from sqlalchemy import Column, Date, Integer, String, Boolean, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class ObjectDBO(Base):
__tablename__ = "objects... | 30.607843 | 106 | 0.682255 |
from datetime import datetime
from sqlalchemy import Column, Date, Integer, String, Boolean, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class ObjectDBO(Base):
__tablename__ = "objects"
id = Column(Integer, primary_k... | true | true |
f744f46203b269bcf4ccd7f0e87116701446213a | 37,685 | py | Python | second/pytorch/models/voxelnet.py | reveriel/depconv | 4f50d8651655c3a275f15422559eac82879704da | [
"MIT"
] | null | null | null | second/pytorch/models/voxelnet.py | reveriel/depconv | 4f50d8651655c3a275f15422559eac82879704da | [
"MIT"
] | null | null | null | second/pytorch/models/voxelnet.py | reveriel/depconv | 4f50d8651655c3a275f15422559eac82879704da | [
"MIT"
] | null | null | null | import time
from enum import Enum
from functools import reduce
import contextlib
import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
import torchplus
from second.pytorch.core import box_torch_ops
from second.pytorch.core.losses import (WeightedSigmoidClassificationLoss,
... | 44.70344 | 113 | 0.577179 | import time
from enum import Enum
from functools import reduce
import contextlib
import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
import torchplus
from second.pytorch.core import box_torch_ops
from second.pytorch.core.losses import (WeightedSigmoidClassificationLoss,
... | true | true |
f744f46cfc3ad8b247de0404a30b1e4f625f7d78 | 3,826 | py | Python | sdk/python/pulumi_azure_native/web/v20210115/list_web_app_azure_storage_accounts.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20210115/list_web_app_azure_storage_accounts.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20210115/list_web_app_azure_storage_accounts.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"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
fro... | 32.151261 | 165 | 0.636696 |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
__all__ = [
'ListWebAppAzureStorageAccountsResult',
'AwaitableListWebAppAzureStorageAccountsResult',
'list_web_app_azure_storage_acco... | true | true |
f744f577d5025341795397a1624f9545825cddfa | 5,443 | py | Python | python/singa/opt.py | ShichengChen/incubator-singa | b966e31e28de3b82eb91e45bc74721e9afc9daaa | [
"Apache-2.0"
] | 2 | 2018-11-09T03:18:53.000Z | 2019-02-19T09:16:55.000Z | python/singa/opt.py | dlyyang/incubator-singa | 8bf958e3984afcf2e142f24c7178b74b5f335511 | [
"Apache-2.0"
] | null | null | null | python/singa/opt.py | dlyyang/incubator-singa | 8bf958e3984afcf2e142f24c7178b74b5f335511 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.449367 | 80 | 0.608121 |
from singa import tensor
class Optimizer(object):
def __init__(self, config):
self.default_config = config
self.iter = 0
self.param2config = {}
self.param2state = {}
def update(self, param, grad):
pass
def step(self):
self.iter += 1
... | true | true |
f744f5e163e41303e320f77c2e4176918e06461d | 44,704 | py | Python | nemo/collections/asr/parts/utils/vad_utils.py | admariner/NeMo | e542d7f9063a40afa4119a3b94de4c2c636a37bb | [
"Apache-2.0"
] | null | null | null | nemo/collections/asr/parts/utils/vad_utils.py | admariner/NeMo | e542d7f9063a40afa4119a3b94de4c2c636a37bb | [
"Apache-2.0"
] | 1 | 2022-03-06T14:09:02.000Z | 2022-03-06T14:09:02.000Z | nemo/collections/asr/parts/utils/vad_utils.py | admariner/NeMo | e542d7f9063a40afa4119a3b94de4c2c636a37bb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.175918 | 168 | 0.640256 |
import glob
import json
import math
import multiprocessing
import os
import shutil
from itertools import repeat
from typing import Dict, Tuple
import IPython.display as ipd
import librosa
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import torch
from pyannote.core import Annotati... | true | true |
f744f646d366cc5d45e1d5db25ecda5c3b9a006b | 8,633 | py | Python | src/train_extractive.py | qwang70/PreSumm | b2c3aee0ada7f5fa8754dffd44355b956fe0d45b | [
"MIT"
] | 1 | 2019-12-13T05:45:56.000Z | 2019-12-13T05:45:56.000Z | src/train_extractive.py | qwang70/PreSumm | b2c3aee0ada7f5fa8754dffd44355b956fe0d45b | [
"MIT"
] | null | null | null | src/train_extractive.py | qwang70/PreSumm | b2c3aee0ada7f5fa8754dffd44355b956fe0d45b | [
"MIT"
] | 1 | 2019-12-02T21:56:16.000Z | 2019-12-02T21:56:16.000Z | #!/usr/bin/env python
"""
Main training workflow
"""
from __future__ import division
import argparse
import glob
import os
import random
import signal
import time
import torch
import distributed
from models import data_loader, model_builder
from models.data_loader import load_dataset
from models.model_builder im... | 33.988189 | 115 | 0.602687 |
from __future__ import division
import argparse
import glob
import os
import random
import signal
import time
import torch
import distributed
from models import data_loader, model_builder
from models.data_loader import load_dataset
from models.model_builder import ExtSummarizer
from models.trainer_ext import build_... | true | true |
f744f69790c7b721d05500594966740a778a46cd | 32 | py | Python | env/lib/python3.6/hmac.py | xianjunzhengbackup/Cloud-Native-Python | 0b74303b444a74210bc2e95f13d17771f6f71583 | [
"MIT"
] | 2 | 2020-09-22T14:38:24.000Z | 2020-10-30T03:11:36.000Z | SDK/Example/Linkage_demo/work_with_AlwaysAI/pedestrian_tracking_demo/venv/lib/python3.6/hmac.py | EyecloudAi/OpenNCC-SDK | efeebfe385a900280de6f46d80bd6fff0416aba3 | [
"Apache-2.0"
] | null | null | null | SDK/Example/Linkage_demo/work_with_AlwaysAI/pedestrian_tracking_demo/venv/lib/python3.6/hmac.py | EyecloudAi/OpenNCC-SDK | efeebfe385a900280de6f46d80bd6fff0416aba3 | [
"Apache-2.0"
] | 1 | 2019-11-21T12:23:41.000Z | 2019-11-21T12:23:41.000Z | /usr/local/lib/python3.6/hmac.py | 32 | 32 | 0.78125 | /usr/local/lib/python3.6/hmac.py | false | true |
f744f7c239b9f120e7b2a1d5213d5419f0853105 | 558 | py | Python | misc/katse.py | mukimei/thonny | a24790f718ae924905213ee3b57c57415f21e225 | [
"MIT"
] | 1 | 2019-02-12T06:10:53.000Z | 2019-02-12T06:10:53.000Z | misc/katse.py | mukimei/thonny | a24790f718ae924905213ee3b57c57415f21e225 | [
"MIT"
] | null | null | null | misc/katse.py | mukimei/thonny | a24790f718ae924905213ee3b57c57415f21e225 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import ttk
root = tk.Tk()
def do_stuff(e=None):
pass
root.option_add("*tearOff", tk.FALSE)
menubar = tk.Menu(root)
root["menu"] = menubar
file_menu = tk.Menu(menubar)
menubar.add_cascade(label="File", menu=file_menu)
print(file_menu.index("end"))
file_menu.add_separator()
pr... | 18 | 54 | 0.738351 | import tkinter as tk
from tkinter import ttk
root = tk.Tk()
def do_stuff(e=None):
pass
root.option_add("*tearOff", tk.FALSE)
menubar = tk.Menu(root)
root["menu"] = menubar
file_menu = tk.Menu(menubar)
menubar.add_cascade(label="File", menu=file_menu)
print(file_menu.index("end"))
file_menu.add_separator()
pr... | true | true |
f744f9bf99443cce15e584b44120c9c8f1802989 | 1,117 | py | Python | docs/examples/sync_read_write.py | umr-ds/BLESuite | f3e7487913940d4905721676f499eaa3794e7ffb | [
"MIT"
] | null | null | null | docs/examples/sync_read_write.py | umr-ds/BLESuite | f3e7487913940d4905721676f499eaa3794e7ffb | [
"MIT"
] | null | null | null | docs/examples/sync_read_write.py | umr-ds/BLESuite | f3e7487913940d4905721676f499eaa3794e7ffb | [
"MIT"
] | null | null | null | from blesuite.connection_manager import BLEConnectionManager
adapter = 0
role = 'central'
peer_device_address = "AA:BB:CC:DD:EE:FF"
peer_address_type = "public"
with BLEConnectionManager(adapter, role) as connection_manager:
# initialize BLEConnection object
connection = connection_manager.init_connection(pe... | 37.233333 | 101 | 0.753805 | from blesuite.connection_manager import BLEConnectionManager
adapter = 0
role = 'central'
peer_device_address = "AA:BB:CC:DD:EE:FF"
peer_address_type = "public"
with BLEConnectionManager(adapter, role) as connection_manager:
connection = connection_manager.init_connection(peer_device_address, peer_address_t... | true | true |
f744fae977401dab9a07de1d677009b4a070688f | 225 | gyp | Python | binding.gyp | DaCurse/wmi.js | 2b82b9e8ca5d2fab0089faaa6b6e99c9c5f71885 | [
"MIT"
] | null | null | null | binding.gyp | DaCurse/wmi.js | 2b82b9e8ca5d2fab0089faaa6b6e99c9c5f71885 | [
"MIT"
] | null | null | null | binding.gyp | DaCurse/wmi.js | 2b82b9e8ca5d2fab0089faaa6b6e99c9c5f71885 | [
"MIT"
] | 1 | 2021-11-17T20:11:54.000Z | 2021-11-17T20:11:54.000Z | {
"targets": [
{
"target_name": "wmijs",
"sources": [
"src/main.cc",
"src/WbemClient.h",
"src/WbemClient.cc"
]
}
]
}
| 17.307692 | 35 | 0.302222 | {
"targets": [
{
"target_name": "wmijs",
"sources": [
"src/main.cc",
"src/WbemClient.h",
"src/WbemClient.cc"
]
}
]
}
| true | true |
f744faf72093619af240bd48cb137b57410d1426 | 2,269 | py | Python | hy-data-analysis-with-python-spring-2020/part05-e08_bicycle_timeseries/test/test_bicycle_timeseries.py | Melimet/DAP2020 | 0854fe4ce8ace6abf6dc0bbcf71984595ff6d42a | [
"MIT"
] | null | null | null | hy-data-analysis-with-python-spring-2020/part05-e08_bicycle_timeseries/test/test_bicycle_timeseries.py | Melimet/DAP2020 | 0854fe4ce8ace6abf6dc0bbcf71984595ff6d42a | [
"MIT"
] | null | null | null | hy-data-analysis-with-python-spring-2020/part05-e08_bicycle_timeseries/test/test_bicycle_timeseries.py | Melimet/DAP2020 | 0854fe4ce8ace6abf6dc0bbcf71984595ff6d42a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
from unittest.mock import patch, MagicMock
import pandas as pd
import numpy as np
from tmc import points
from tmc.utils import load, get_out, patch_helper
module_name="src.bicycle_timeseries"
bicycle_timeseries = load(module_name, "bicycle_timeseries")
main = load(module_name... | 35.453125 | 90 | 0.631115 |
import unittest
from unittest.mock import patch, MagicMock
import pandas as pd
import numpy as np
from tmc import points
from tmc.utils import load, get_out, patch_helper
module_name="src.bicycle_timeseries"
bicycle_timeseries = load(module_name, "bicycle_timeseries")
main = load(module_name, "main")
ph = patch_h... | true | true |
f744fb1af495dbb2ba7163c49bd942f2ca17809e | 2,293 | py | Python | ooobuild/dyn/sheet/formula_result.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/sheet/formula_result.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/sheet/formula_result.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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... | 35.276923 | 114 | 0.696031 |
from enum import IntFlag
from typing import TYPE_CHECKING
from ooo.oenv.env_const import UNO_ENVIRONMENT, UNO_RUNTIME
_DYNAMIC = False
if (not TYPE_CHECKING) and UNO_RUNTIME and UNO_ENVIRONMENT:
_DYNAMIC = True
if not TYPE_CHECKING and _DYNAMIC:
from com.sun.star.sheet import FormulaResult ... | true | true |
f744fb9300f9faf682e796a5c1fbb5d257e5d338 | 1,312 | py | Python | source/payment/migrations/0001_initial.py | codebam/avrod_python_login | dd4679c372d85c363f1057462c6abc448f8284c9 | [
"BSD-3-Clause"
] | null | null | null | source/payment/migrations/0001_initial.py | codebam/avrod_python_login | dd4679c372d85c363f1057462c6abc448f8284c9 | [
"BSD-3-Clause"
] | 7 | 2020-06-05T20:02:11.000Z | 2021-09-22T18:05:28.000Z | source/payment/migrations/0001_initial.py | codebam/avrod_python_login | dd4679c372d85c363f1057462c6abc448f8284c9 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.0.2 on 2020-02-03 21:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='License',
fields=[
... | 33.641026 | 118 | 0.582317 |
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='License',
fields=[
('license_key', models.CharField(max_l... | true | true |
f744fb989e64e0259fae44f7ce7a23084585c382 | 1,454 | py | Python | adminmgr/media/code/A3/task2/BD_0064_1387_1416_xLvRBmI.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 9 | 2019-11-08T02:05:27.000Z | 2021-12-13T12:06:35.000Z | adminmgr/media/code/A3/task2/BD_0064_1387_1416_ovBFmsq.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 6 | 2019-11-27T03:23:16.000Z | 2021-06-10T19:15:13.000Z | adminmgr/media/code/A3/task2/BD_0064_1387_1416_w169gFG.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 4 | 2019-11-26T17:04:27.000Z | 2021-12-13T11:57:03.000Z | from pyspark.sql import SparkSession
from pyspark.sql.types import *
from pyspark.conf import SparkConf
from pyspark.streaming import StreamingContext
from pyspark.sql import Row,SQLContext
import csv
from pyspark.sql.functions import col,split,explode
#from pyspark.sql.GroupedData import max
def convert(x):
return i... | 26.436364 | 159 | 0.676754 | from pyspark.sql import SparkSession
from pyspark.sql.types import *
from pyspark.conf import SparkConf
from pyspark.streaming import StreamingContext
from pyspark.sql import Row,SQLContext
import csv
from pyspark.sql.functions import col,split,explode
def convert(x):
return int(x)
spark = SparkSession.builder... | true | true |
f744fbf12d9eb9a3cf7839ae31ac3a8007bf16eb | 6,894 | py | Python | History/Stats/emcee_ex_4_merging.py | lefthandedroo/Cosmodels | c355d18021467cf92546cf2fc9cb1d1abe59b8d8 | [
"MIT"
] | null | null | null | History/Stats/emcee_ex_4_merging.py | lefthandedroo/Cosmodels | c355d18021467cf92546cf2fc9cb1d1abe59b8d8 | [
"MIT"
] | null | null | null | History/Stats/emcee_ex_4_merging.py | lefthandedroo/Cosmodels | c355d18021467cf92546cf2fc9cb1d1abe59b8d8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
chose m, c (parameters) for a straight line
from the line pick N points (N=3, 5, 50, 100, 1000)
pick sigma (size of the noise)
randomly deviate(offset) points in y direction by using
sigma*random number from normal distribution
sigma the same for all points
then defin... | 32.985646 | 113 | 0.59472 |
import corner
import emcee
import logging
import matplotlib.pyplot as pl
import numpy as np
import scipy.optimize as op
import sys
import time
try:
timet0 = time.time()
a_true = 0.1
b_true = -3
c_true = 0.5
d_true = 0.1
e_true = 12
N = 20
sigma = ... | true | true |
f744fc1bfc67abd76b6691a0a397c910b95bd691 | 278 | py | Python | ex011.py | zWillsz/exsvscode | ba507dca6de748e3c82c306731137bb5f6f0c918 | [
"MIT"
] | null | null | null | ex011.py | zWillsz/exsvscode | ba507dca6de748e3c82c306731137bb5f6f0c918 | [
"MIT"
] | null | null | null | ex011.py | zWillsz/exsvscode | ba507dca6de748e3c82c306731137bb5f6f0c918 | [
"MIT"
] | null | null | null | n1 = int(input('nota 1 bimestre: '))
n2 = int(input('nota 2 bimestre: '))
n3 = int(input('nota 3 bimestre: '))
n4 = int(input('nota 4 bimestre: '))
m = int((n1 + n2 + n3 +n4) / 4)
print('a média do aluno é {}'.format(m))
if m > 6:
print('APROVADO!')
else:
print('REPROVADO!')
| 25.272727 | 40 | 0.597122 | n1 = int(input('nota 1 bimestre: '))
n2 = int(input('nota 2 bimestre: '))
n3 = int(input('nota 3 bimestre: '))
n4 = int(input('nota 4 bimestre: '))
m = int((n1 + n2 + n3 +n4) / 4)
print('a média do aluno é {}'.format(m))
if m > 6:
print('APROVADO!')
else:
print('REPROVADO!')
| true | true |
f744fc2aad4036609596b5c7b425ddd10ab762f8 | 2,837 | py | Python | tox_block/model/lstm_multi_label.py | Pascal-Bliem/tox-block | fed3d54553a0911d190e421feafddb11969878cd | [
"MIT"
] | 4 | 2020-06-21T10:54:04.000Z | 2021-08-31T04:00:20.000Z | tox_block/model/lstm_multi_label.py | Pascal-Bliem/tox-block | fed3d54553a0911d190e421feafddb11969878cd | [
"MIT"
] | 1 | 2020-06-20T19:58:22.000Z | 2020-06-20T19:58:22.000Z | tox_block/model/lstm_multi_label.py | Pascal-Bliem/tox-block | fed3d54553a0911d190e421feafddb11969878cd | [
"MIT"
] | null | null | null | """A bidirectional LSTM model with multi labels (6 types of toxicity)"""
# general data handling and computation
import pandas as pd
import numpy as np
# TensorFlow / Keras
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, Embedding, Input
from tensorflow.keras.layers import LSTM, Bi... | 38.863014 | 88 | 0.593232 |
import pandas as pd
import numpy as np
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, Embedding, Input
from tensorflow.keras.layers import LSTM, Bidirectional, GlobalMaxPool1D, Dropout
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.callbacks import EarlyStopp... | true | true |
f744fc6487d6a5b44ccd43093761695e32cb6a8e | 57,214 | py | Python | py_insightvm_sdk/models/tag.py | greenpau/py_insightvm_sdk | bd881f26e14cb9f0f9c47927469ec992de9de8e6 | [
"Apache-2.0"
] | 2 | 2019-03-15T16:05:54.000Z | 2020-07-19T18:37:50.000Z | py_insightvm_sdk/models/tag.py | greenpau/py_insightvm_sdk | bd881f26e14cb9f0f9c47927469ec992de9de8e6 | [
"Apache-2.0"
] | 1 | 2021-03-26T04:46:12.000Z | 2021-03-26T04:51:23.000Z | py_insightvm_sdk/models/tag.py | greenpau/py_insightvm_sdk | bd881f26e14cb9f0f9c47927469ec992de9de8e6 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
InsightVM API
# Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ... | 163.936963 | 48,045 | 0.496434 |
import pprint
import re
import six
from py_insightvm_sdk.models.link import Link
from py_insightvm_sdk.models.search_criteria import SearchCriteria
class Tag(object):
swagger_types = {
'color': 'str',
'created': 'str',
'id': 'int',
'links': 'list[Link]',
'name'... | true | true |
f744fd7f9f57c58a0a56853c4c0f89499d3761b1 | 2,273 | py | Python | vkbottle/types/responses/friends.py | Doncode/vkbottle | 986d1e0aa9f6f25132ea652d4d7dc95833e7fe68 | [
"MIT"
] | null | null | null | vkbottle/types/responses/friends.py | Doncode/vkbottle | 986d1e0aa9f6f25132ea652d4d7dc95833e7fe68 | [
"MIT"
] | null | null | null | vkbottle/types/responses/friends.py | Doncode/vkbottle | 986d1e0aa9f6f25132ea652d4d7dc95833e7fe68 | [
"MIT"
] | null | null | null | import typing
import enum
from ..base import BaseModel
from vkbottle.types import objects
class Search(BaseModel):
count: int = None
items: typing.List[objects.users.User] = None
class SearchModel(BaseModel):
response: Search = None
class AddList(BaseModel):
list_id: int = None
class AddListMode... | 17.620155 | 58 | 0.723713 | import typing
import enum
from ..base import BaseModel
from vkbottle.types import objects
class Search(BaseModel):
count: int = None
items: typing.List[objects.users.User] = None
class SearchModel(BaseModel):
response: Search = None
class AddList(BaseModel):
list_id: int = None
class AddListMode... | true | true |
f744fd9a6ebb1de23e370357d15b053a8d432230 | 8,898 | py | Python | configs/common/SPEC2k6_ref.py | prodromou87/gem5 | e216cee43b9d8b42b7ff051406beda56c1ea3ba8 | [
"BSD-3-Clause"
] | null | null | null | configs/common/SPEC2k6_ref.py | prodromou87/gem5 | e216cee43b9d8b42b7ff051406beda56c1ea3ba8 | [
"BSD-3-Clause"
] | null | null | null | configs/common/SPEC2k6_ref.py | prodromou87/gem5 | e216cee43b9d8b42b7ff051406beda56c1ea3ba8 | [
"BSD-3-Clause"
] | null | null | null | #SPEC2k6_ref.py
#For some reason this imports the LiveProcess object
from Caches import *
#bzip2 "input.combined 200";
#gcc "scilab.i -o scilab.s";
#gobmk "--quiet --mode gtp" -i "13x13.tst";
#h264ref "-d foreman_ref_encoder_baseline.cfg";
#hmmer "nph3.hmm swiss41";
#lbm "3000 reference.dat 0 0 100_100_130_ldc.of";
#... | 30.060811 | 112 | 0.72151 |
from Caches import *
perlbench = LiveProcess()
perlbench.executable = './perlbench_base.alpha'
perlbench.cmd = [perlbench.executable] + ['-I./lib', 'diffmail.pl', '4', '800', '10', '17', '19', '300']
bzip2 = LiveProcess()
bzip2.executable = './bzip2_base.alpha'
bzip2.cmd = [bzip2.executable] + ['in... | true | true |
f744fe00d513abf9b101502fac7359c8dc167483 | 3,382 | py | Python | rbac/common/task/propose_admin.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/common/task/propose_admin.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/common/task/propose_admin.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 35.229167 | 79 | 0.662626 |
from rbac.common import addresser
from rbac.common.proposal.proposal_propose import ProposalPropose
from rbac.common.logs import get_default_logger
LOGGER = get_default_logger(__name__)
class ProposeAddTaskAdmin(ProposalPropose):
def __init__(self):
super().__init__()
self._registe... | true | true |
f744fe6105cf00216e2454f111e86ad13250fca6 | 442 | py | Python | python-dog-microservice/server/dog_grpc.py | mahsayedsalem/beyond-rest-grpc | 15bfc59e3e214c425b65a7946047671be17a8903 | [
"MIT"
] | 1 | 2021-11-26T09:21:50.000Z | 2021-11-26T09:21:50.000Z | python-dog-microservice/server/dog_grpc.py | mahsayedsalem/beyond-rest-grpc | 15bfc59e3e214c425b65a7946047671be17a8903 | [
"MIT"
] | null | null | null | python-dog-microservice/server/dog_grpc.py | mahsayedsalem/beyond-rest-grpc | 15bfc59e3e214c425b65a7946047671be17a8903 | [
"MIT"
] | null | null | null | from .generated import dog_pb2, dog_pb2_grpc
from .owner_client import GrpcOwnerClient
class Dog(dog_pb2_grpc.dogServicer):
def __init__(self):
self.owner_client = GrpcOwnerClient()
def CallDog(self, request, context):
dog_name = request.dogName
res = f"{dog_name} is going to bark!"
... | 29.466667 | 55 | 0.701357 | from .generated import dog_pb2, dog_pb2_grpc
from .owner_client import GrpcOwnerClient
class Dog(dog_pb2_grpc.dogServicer):
def __init__(self):
self.owner_client = GrpcOwnerClient()
def CallDog(self, request, context):
dog_name = request.dogName
res = f"{dog_name} is going to bark!"
... | true | true |
f744fea1b54986e1cc40d967bd9a70d983a5f980 | 724 | py | Python | odoo-14.0/addons/account_lock/__manifest__.py | Yomy1996/P1 | 59e24cdd5f7f82005fe15bd7a7ff54dd5364dd29 | [
"CC-BY-3.0"
] | null | null | null | odoo-14.0/addons/account_lock/__manifest__.py | Yomy1996/P1 | 59e24cdd5f7f82005fe15bd7a7ff54dd5364dd29 | [
"CC-BY-3.0"
] | null | null | null | odoo-14.0/addons/account_lock/__manifest__.py | Yomy1996/P1 | 59e24cdd5f7f82005fe15bd7a7ff54dd5364dd29 | [
"CC-BY-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Irreversible Lock Date',
'version': '1.0',
'category': 'Accounting/Accounting',
'description': """
Make the lock date irreversible:
* You cannot set stricter restrictions on advisors th... | 42.588235 | 164 | 0.676796 |
{
'name': 'Irreversible Lock Date',
'version': '1.0',
'category': 'Accounting/Accounting',
'description': """
Make the lock date irreversible:
* You cannot set stricter restrictions on advisors than on users. Therefore, the All Users Lock Date must be anterior (or equal) to the Invoice/Bills ... | true | true |
f744fecee590ca9f2c1a9146f54edebd6d439fa4 | 1,830 | py | Python | profab/utils/feature_extraction_module/iFeature/codes/EGAAC.py | Sametle06/PROFAB | 571b691df2c5e98df0bfc4d6335f3ecd245314fd | [
"Unlicense"
] | 46 | 2019-09-26T13:56:49.000Z | 2020-09-05T11:59:30.000Z | profab/utils/feature_extraction_module/iFeature/codes/EGAAC.py | Sametle06/PROFAB | 571b691df2c5e98df0bfc4d6335f3ecd245314fd | [
"Unlicense"
] | 1 | 2021-01-04T14:52:27.000Z | 2021-01-04T14:52:27.000Z | profab/utils/feature_extraction_module/iFeature/codes/EGAAC.py | Sametle06/PROFAB | 571b691df2c5e98df0bfc4d6335f3ecd245314fd | [
"Unlicense"
] | 2 | 2021-04-24T11:33:44.000Z | 2021-04-24T12:16:08.000Z | #!/usr/bin/env python
#_*_coding:utf-8_*_
import re, sys, os
from collections import Counter
pPath = os.path.split(os.path.realpath(__file__))[0]
sys.path.append(pPath)
import readFasta
import saveCode
import checkFasta
USAGE = """
USAGE:
python EGAAC.py input.fasta <sliding_window> <output>
input.fasta: the ... | 25.774648 | 99 | 0.662295 |
import re, sys, os
from collections import Counter
pPath = os.path.split(os.path.realpath(__file__))[0]
sys.path.append(pPath)
import readFasta
import saveCode
import checkFasta
USAGE = """
USAGE:
python EGAAC.py input.fasta <sliding_window> <output>
input.fasta: the input protein sequence file in fasta for... | true | true |
f745000475b9f1a4371529e49014e4de74a33502 | 4,702 | py | Python | nabirds.py | dangpzanco/pytorch-fgvc-dataset | f4c54384fedfb7fb43612cddc3bec1b323f912d4 | [
"MIT"
] | 75 | 2020-04-19T13:36:24.000Z | 2022-03-29T07:27:25.000Z | nabirds.py | dangpzanco/pytorch-fgvc-dataset | f4c54384fedfb7fb43612cddc3bec1b323f912d4 | [
"MIT"
] | 1 | 2020-09-01T05:12:58.000Z | 2020-09-04T01:44:55.000Z | nabirds.py | dangpzanco/pytorch-fgvc-dataset | f4c54384fedfb7fb43612cddc3bec1b323f912d4 | [
"MIT"
] | 15 | 2020-05-15T21:24:59.000Z | 2022-03-13T13:55:09.000Z | import os
import pandas as pd
import warnings
from torchvision.datasets import VisionDataset
from torchvision.datasets.folder import default_loader
from torchvision.datasets.utils import check_integrity, extract_archive
class NABirds(VisionDataset):
"""`NABirds <https://dl.allaboutbirds.org/nabirds>`_ Dataset.
... | 40.534483 | 99 | 0.632071 | import os
import pandas as pd
import warnings
from torchvision.datasets import VisionDataset
from torchvision.datasets.folder import default_loader
from torchvision.datasets.utils import check_integrity, extract_archive
class NABirds(VisionDataset):
base_folder = 'nabirds/images'
filename = 'nabirds.tar.gz'
... | true | true |
f745032178a752250aef5654a43a695729b37c53 | 655 | py | Python | onadata/apps/core/migrations/0069_auto_20191216_1444.py | naxa-developers/mes-core | a9c0449540d37ef45f261ef21c471d3e7eba2df6 | [
"BSD-2-Clause"
] | 1 | 2019-03-10T09:25:17.000Z | 2019-03-10T09:25:17.000Z | onadata/apps/core/migrations/0069_auto_20191216_1444.py | naxadeve/mes-core | a9c0449540d37ef45f261ef21c471d3e7eba2df6 | [
"BSD-2-Clause"
] | 48 | 2019-03-18T09:26:31.000Z | 2019-05-27T08:12:03.000Z | onadata/apps/core/migrations/0069_auto_20191216_1444.py | naxa-developers/mes-core | a9c0449540d37ef45f261ef21c471d3e7eba2df6 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import datetime
class Migration(migrations.Migration):
dependencies = [
('core', '0068_auto_20190801_1328'),
]
operations = [
migrations.AddField(
model_name='activity',
... | 25.192308 | 111 | 0.607634 |
from __future__ import unicode_literals
from django.db import migrations, models
import datetime
class Migration(migrations.Migration):
dependencies = [
('core', '0068_auto_20190801_1328'),
]
operations = [
migrations.AddField(
model_name='activity',
name='order... | true | true |
f74503dc29b7aaa8a1b1328e0d3140031e528b95 | 13,205 | py | Python | contrib/PanopticDeepLab/core/train.py | Amanda-Barbara/PaddleSeg | a7de36a5fae96011f5b188987670274101b8ede1 | [
"Apache-2.0"
] | 2 | 2021-11-26T09:02:58.000Z | 2021-12-10T08:35:37.000Z | contrib/PanopticDeepLab/core/train.py | Amanda-Barbara/PaddleSeg | a7de36a5fae96011f5b188987670274101b8ede1 | [
"Apache-2.0"
] | null | null | null | contrib/PanopticDeepLab/core/train.py | Amanda-Barbara/PaddleSeg | a7de36a5fae96011f5b188987670274101b8ede1 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 41.920635 | 146 | 0.571905 |
import os
import time
from collections import deque
import shutil
import paddle
import paddle.nn.functional as F
from paddleseg.utils import TimeAverager, calculate_eta, resume, logger
from core.val import evaluate
def check_logits_losses(logits_list, losses):
len_logits = len(logits_list)
len... | true | true |
f74505e403ec503528eb6699b6a8591ac388e84b | 1,555 | py | Python | computer_science/data_structures/stack/stack.py | LeandroTk/Algorithms | 569ed68eba3eeff902f8078992099c28ce4d7cd6 | [
"MIT"
] | 205 | 2018-12-01T17:49:49.000Z | 2021-12-22T07:02:27.000Z | computer_science/data_structures/stack/stack.py | LeandroTk/Algorithms | 569ed68eba3eeff902f8078992099c28ce4d7cd6 | [
"MIT"
] | 2 | 2020-01-01T16:34:29.000Z | 2020-04-26T19:11:13.000Z | computer_science/data_structures/stack/stack.py | LeandroTk/Algorithms | 569ed68eba3eeff902f8078992099c28ce4d7cd6 | [
"MIT"
] | 50 | 2018-11-28T20:51:36.000Z | 2021-11-29T04:08:25.000Z | # Stack Big O complexity
# Push: O(1) - Constant Time
# Pop (remove): O(1) - Constant Time
# Top (top): O(1) - Constant Time
# Is Empty: O(1) - Constant Time
# Size: O(1) - Constant Time
class Emptiness(Exception):
pass
class Stack:
def __init__(self):
self.items = []
def push(self, item):
... | 16.030928 | 49 | 0.631511 |
class Emptiness(Exception):
pass
class Stack:
def __init__(self):
self.items = []
def push(self, item):
self.items.append(item)
def pop(self):
if self.is_empty():
raise Emptiness('The Stack is empty')
return self.items.pop()
def is_empty(sel... | true | true |
f74505eade32b3a83a29c396aad61edde9031674 | 1,808 | py | Python | dailyfresh/urls.py | rivertoday/ecmexample | 2ce0e0a6cc09dbcb02b48e010e268fad2b41aef6 | [
"BSD-2-Clause"
] | 1 | 2019-07-31T06:45:12.000Z | 2019-07-31T06:45:12.000Z | dailyfresh/urls.py | rivertoday/ecmexample | 2ce0e0a6cc09dbcb02b48e010e268fad2b41aef6 | [
"BSD-2-Clause"
] | null | null | null | dailyfresh/urls.py | rivertoday/ecmexample | 2ce0e0a6cc09dbcb02b48e010e268fad2b41aef6 | [
"BSD-2-Clause"
] | null | null | null | """dailyfresh URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | 45.2 | 85 | 0.650996 |
from django.urls import path, include
from django.contrib import admin
urlpatterns = [
de('haystack.urls')),
path('tinymce/', include('tinymce.urls')),
path('user/', include(('user.urls','user'), namespace='user')),
path('cart/', include(('cart.urls','cart'), namespace='cart')),
path... | true | true |
f745064b7059b714cb2a3e38f54eee89add9bdfb | 4,042 | py | Python | command_centre.py | iconicporridge/Tenx-LauncherHQ | 3ab0521432e5e3ddbdd996bec26c6ad53546fd78 | [
"MIT"
] | 1 | 2021-12-12T21:08:56.000Z | 2021-12-12T21:08:56.000Z | command_centre.py | iconicporridge/tenx_launcher_hq | 3ab0521432e5e3ddbdd996bec26c6ad53546fd78 | [
"MIT"
] | null | null | null | command_centre.py | iconicporridge/tenx_launcher_hq | 3ab0521432e5e3ddbdd996bec26c6ad53546fd78 | [
"MIT"
] | null | null | null | # the .py file for the main loop and its threads
from PyQt5.QtWidgets import QWidget, QApplication
from PyQt5.QtCore import pyqtSignal, QThread
from lib.launcher import tenx
from lib.boot_screen import boot_screen
from lib.command_screen import command_screen
import sys
import signal
# TODO if it's possible to imple... | 33.683333 | 75 | 0.626423 |
from PyQt5.QtWidgets import QWidget, QApplication
from PyQt5.QtCore import pyqtSignal, QThread
from lib.launcher import tenx
from lib.boot_screen import boot_screen
from lib.command_screen import command_screen
import sys
import signal
class connection_thread(QThread):
# This thread checks if the state of the USB... | true | true |
f74506adaa31190d048e60a1ce0b28b13ce0fc69 | 10,622 | py | Python | python/cusignal/utils/compile_kernels.py | sean-frye/cusignal | 5e12771ca47e7ee653ebe79b236f86ce428ace84 | [
"Apache-2.0"
] | null | null | null | python/cusignal/utils/compile_kernels.py | sean-frye/cusignal | 5e12771ca47e7ee653ebe79b236f86ce428ace84 | [
"Apache-2.0"
] | null | null | null | python/cusignal/utils/compile_kernels.py | sean-frye/cusignal | 5e12771ca47e7ee653ebe79b236f86ce428ace84 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2020, NVIDIA 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... | 30.00565 | 79 | 0.611373 |
import cupy as cp
from collections import OrderedDict
from enum import Enum
from ._caches import _cupy_kernel_cache
from ..convolution._convolution_cuda import (
_cupy_convolve_src,
_cupy_convolve_2d_src,
)
from ..convolution._convolution_cuda import (
_cupy_correlate_src,
_cupy_correlat... | true | true |
f7450817263f33cab7bf14e88558addff50039d3 | 35,768 | py | Python | aptly_cli/api/api.py | TimSusa/aptly-api-cli | 011ba8e7f464726b336b53f6b2cbdc4490b5180c | [
"MIT"
] | 17 | 2016-03-15T10:07:27.000Z | 2022-03-07T17:55:01.000Z | aptly_cli/api/api.py | TimSusa/aptly-api-cli | 011ba8e7f464726b336b53f6b2cbdc4490b5180c | [
"MIT"
] | 2 | 2016-03-15T12:50:58.000Z | 2018-04-17T03:45:17.000Z | aptly_cli/api/api.py | TimSusa/aptly-api-cli | 011ba8e7f464726b336b53f6b2cbdc4490b5180c | [
"MIT"
] | 5 | 2017-05-07T20:01:49.000Z | 2018-06-06T13:43:02.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
""" AptlyApiRequests
Instances of this class will be able to talk
to the Aptly REST API remotely .
"""
import json
import requests
import os
from ConfigParser import ConfigParser
class AptlyApiRequests(object):
""" AptlyApiRequests
Instances of this class will... | 35.911647 | 158 | 0.591954 |
""" AptlyApiRequests
Instances of this class will be able to talk
to the Aptly REST API remotely .
"""
import json
import requests
import os
from ConfigParser import ConfigParser
class AptlyApiRequests(object):
""" AptlyApiRequests
Instances of this class will be able to talk
to the Aptly REST API re... | false | true |
f745091e8bfbad36f3ed4515ba4552dafae74d2c | 18,608 | py | Python | holocron/nn/modules/conv.py | frgfm/torch-zoo | c97beacf3d49eaa34398abf47f378ea6b48a70f3 | [
"Apache-2.0"
] | null | null | null | holocron/nn/modules/conv.py | frgfm/torch-zoo | c97beacf3d49eaa34398abf47f378ea6b48a70f3 | [
"Apache-2.0"
] | null | null | null | holocron/nn/modules/conv.py | frgfm/torch-zoo | c97beacf3d49eaa34398abf47f378ea6b48a70f3 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019-2022, François-Guillaume Fernandez.
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
import math
from typing import Any, List, Optional
import torch
import torch.nn as nn
from torch i... | 36.486275 | 119 | 0.566154 |
import math
from typing import Any, List, Optional
import torch
import torch.nn as nn
from torch import Tensor
from torch.nn.functional import pad
from torch.nn.modules.conv import _ConvNd
from torch.nn.modules.utils import _pair
from .. import functional as F
__all__ = ["NormConv2d", "Add2d", "SlimConv2d", "Py... | true | true |
f745094d3cb34273e751cfe1fb92d5377a6df9d9 | 92,689 | py | Python | selfdrive/car/toyota/values.py | tapecom/openpilot | 0d44381ad63d21ee816a47d3821440f7ba943270 | [
"MIT"
] | 2 | 2020-12-15T13:38:42.000Z | 2020-12-15T16:07:14.000Z | selfdrive/car/toyota/values.py | tapecom/openpilot | 0d44381ad63d21ee816a47d3821440f7ba943270 | [
"MIT"
] | null | null | null | selfdrive/car/toyota/values.py | tapecom/openpilot | 0d44381ad63d21ee816a47d3821440f7ba943270 | [
"MIT"
] | 1 | 2021-12-05T13:50:32.000Z | 2021-12-05T13:50:32.000Z | # flake8: noqa
from cereal import car
from selfdrive.car import dbc_dict
from selfdrive.config import Conversions as CV
Ecu = car.CarParams.Ecu
MIN_ACC_SPEED = 19. * CV.MPH_TO_MS
PEDAL_HYST_GAP = 3. * CV.MPH_TO_MS
PEDAL_SCALE = 3.0
class CarControllerParams:
ACCEL_HYST_GAP = 0.06 # don't change accel command for... | 55.568945 | 1,108 | 0.615888 |
from cereal import car
from selfdrive.car import dbc_dict
from selfdrive.config import Conversions as CV
Ecu = car.CarParams.Ecu
MIN_ACC_SPEED = 19. * CV.MPH_TO_MS
PEDAL_HYST_GAP = 3. * CV.MPH_TO_MS
PEDAL_SCALE = 3.0
class CarControllerParams:
ACCEL_HYST_GAP = 0.06
ACCEL_MAX = 1.5 # m/s2, lower than allowed... | true | true |
f7450969aa8c1b82df7cd290e3ba56161ee6ed1c | 1,893 | py | Python | Taller estructuras FOR/main.py | GabrielRojas74/Talleres-AyP | 346b87ddc118b4c8f45fe083f63b4bacb5d01d19 | [
"MIT"
] | 4 | 2021-09-27T17:20:56.000Z | 2021-09-28T23:12:49.000Z | Taller estructuras FOR/main.py | GabrielRojas74/Talleres-AyP | 346b87ddc118b4c8f45fe083f63b4bacb5d01d19 | [
"MIT"
] | null | null | null | Taller estructuras FOR/main.py | GabrielRojas74/Talleres-AyP | 346b87ddc118b4c8f45fe083f63b4bacb5d01d19 | [
"MIT"
] | 13 | 2021-07-26T16:38:57.000Z | 2021-11-19T02:28:12.000Z | archivo = open('paises.txt', 'r')
#imprima la posicion de colombia
"""
c=0
lista=[]
for i in archivo:
lista.append(i)
a=" ".join(lista)
c=c+1
if(a=="Colombia: Bogotá\n"):
break
lista=[]
print(c)
"""
#Imprima todos los paises
"""
lista=[]
for i in archivo:
a=i.index(":")
for r in range(0,a):
li... | 23.085366 | 273 | 0.666667 | archivo = open('paises.txt', 'r')
archivo.close()
| true | true |
f7450b2aacbf23f23371b5ff5390a0b79b3ed813 | 954 | py | Python | server/openapi_server/controllers/result_controller.py | NCATS-Tangerine/kba-reasoner | 19ea293fa02693b2df5ecfe1d91856b34e73a3e1 | [
"MIT"
] | null | null | null | server/openapi_server/controllers/result_controller.py | NCATS-Tangerine/kba-reasoner | 19ea293fa02693b2df5ecfe1d91856b34e73a3e1 | [
"MIT"
] | null | null | null | server/openapi_server/controllers/result_controller.py | NCATS-Tangerine/kba-reasoner | 19ea293fa02693b2df5ecfe1d91856b34e73a3e1 | [
"MIT"
] | null | null | null | import reasoner
def get_result(result_id): # noqa: E501
"""Request stored result
# noqa: E501
:param result_id: Integer identifier of the result to return
:type result_id: int
:rtype: Result
"""
return reasoner.get_result(result_id)
def get_result_feedback(result_id): # noqa: E501
... | 23.85 | 64 | 0.70021 | import reasoner
def get_result(result_id):
return reasoner.get_result(result_id)
def get_result_feedback(result_id):
return reasoner.get_result_feedback(result_id)
def post_result_feedback(result_id, feedback):
return reasoner.post_result_feedback(result_id, feedback)
| true | true |
f7450b2bf80d634d5920b2b4f16174b6970c907f | 1,748 | py | Python | yotta/licenses.py | microbit-foundation/yotta | 82d854b43d391abb5a006b05e7beffe7d0d6ffbf | [
"Apache-2.0"
] | 176 | 2015-01-02T07:31:59.000Z | 2022-03-21T12:40:02.000Z | yotta/licenses.py | microbit-foundation/yotta | 82d854b43d391abb5a006b05e7beffe7d0d6ffbf | [
"Apache-2.0"
] | 549 | 2015-01-05T16:19:54.000Z | 2021-01-15T13:46:42.000Z | yotta/licenses.py | microbit-foundation/yotta | 82d854b43d391abb5a006b05e7beffe7d0d6ffbf | [
"Apache-2.0"
] | 84 | 2015-01-10T21:01:00.000Z | 2022-03-24T16:04:42.000Z | # Copyright 2014 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
# standard library modules, , ,
from __future__ import print_function
from collections import defaultdict
import logging
# validate, , validate things, internal
from yotta.lib import validate
def addOption... | 27.746032 | 91 | 0.592105 |
from __future__ import print_function
from collections import defaultdict
import logging
from yotta.lib import validate
def addOptions(parser):
parser.add_argument('--all', '-a', dest='list_all', default=False, action='store_true',
help='List all licenses, not just each unique license.'
)
def ... | true | true |
f7450d602c6543afeaf11edd7995c6fd843af5aa | 1,419 | py | Python | code_summarization_transfer_learning/fastai/courses/dl1/fastai/imports.py | chnsh/deep-semantic-code-search | 57cf12b90b5ec3a49bd6c04cf2b68888162558b3 | [
"MIT"
] | 67 | 2019-05-29T18:55:20.000Z | 2022-03-14T10:03:24.000Z | code_summarization_transfer_learning/fastai/courses/dl1/fastai/imports.py | chnsh/deep-semantic-code-search | 57cf12b90b5ec3a49bd6c04cf2b68888162558b3 | [
"MIT"
] | 1 | 2021-09-01T08:11:33.000Z | 2021-09-01T08:11:33.000Z | code_summarization_transfer_learning/fastai/courses/dl1/fastai/imports.py | chnsh/deep-semantic-code-search | 57cf12b90b5ec3a49bd6c04cf2b68888162558b3 | [
"MIT"
] | 9 | 2019-05-29T21:15:51.000Z | 2020-05-22T07:27:57.000Z | from IPython.lib.deepreload import reload as dreload
import PIL, os, numpy as np, threading, json, bcolz, scipy
import pandas as pd, pickle, string, sys, re, time, shutil, copy
import seaborn as sns, matplotlib
from abc import abstractmethod
from functools import partial
from pandas_summary import DataFrameSummary
from... | 24.894737 | 64 | 0.710359 | from IPython.lib.deepreload import reload as dreload
import PIL, os, numpy as np, threading, json, bcolz, scipy
import pandas as pd, pickle, string, sys, re, time, shutil, copy
import seaborn as sns, matplotlib
from abc import abstractmethod
from functools import partial
from pandas_summary import DataFrameSummary
from... | true | true |
f7450dc5f51773375390d7ac22413b01e19d6643 | 2,852 | py | Python | rameniaapp/views/edit_ramen.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/views/edit_ramen.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/views/edit_ramen.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | from django.shortcuts import render,HttpResponse, HttpResponseRedirect
from django.template import loader
from django.conf import settings
from rameniaapp.forms import EditNoodleForm
from rameniaapp.models import Noodle, NoodleImage, Edit, Tag
from .edit_util import apply_change
from django.contrib.auth.decorators impo... | 50.928571 | 122 | 0.632889 | from django.shortcuts import render,HttpResponse, HttpResponseRedirect
from django.template import loader
from django.conf import settings
from rameniaapp.forms import EditNoodleForm
from rameniaapp.models import Noodle, NoodleImage, Edit, Tag
from .edit_util import apply_change
from django.contrib.auth.decorators impo... | true | true |
f7450f5feea4b2de1a489656df650da956e2a32c | 19,515 | py | Python | ops/models.py | SCUT-AILab/BPAI-Net | d71c92366222c9e226e15f8263fc2d72361735c3 | [
"Apache-2.0"
] | 7 | 2021-09-30T13:27:51.000Z | 2022-03-20T19:20:30.000Z | ops/models.py | SCUT-AILab/BPAI-Net | d71c92366222c9e226e15f8263fc2d72361735c3 | [
"Apache-2.0"
] | null | null | null | ops/models.py | SCUT-AILab/BPAI-Net | d71c92366222c9e226e15f8263fc2d72361735c3 | [
"Apache-2.0"
] | null | null | null | # Code for "TSM: Temporal Shift Module for Efficient Video Understanding"
# arXiv:1811.08383
# Ji Lin*, Chuang Gan, Song Han
# {jilin, songhan}@mit.edu, ganchuang@csail.mit.edu
from torch import nn
from ops.basic_ops import ConsensusModule
from ops.transforms import *
from torch.nn.init import normal_, constant_
from ... | 46.025943 | 139 | 0.572995 |
from torch import nn
from ops.basic_ops import ConsensusModule
from ops.transforms import *
from torch.nn.init import normal_, constant_
from archs.fusion_model import fusion
class TSN(nn.Module):
def __init__(self, num_class, num_segments, modality,patch_size,
base_model='resnet101', new_leng... | true | true |
f7450f778f05c612e13fbe31283fb509fa878d4d | 32,769 | py | Python | get-poetry.py | nrosenstein-forks/poetry | 28d05d002475f0cc55e7cc46ae01f9a3ce4e03a8 | [
"MIT"
] | null | null | null | get-poetry.py | nrosenstein-forks/poetry | 28d05d002475f0cc55e7cc46ae01f9a3ce4e03a8 | [
"MIT"
] | 1 | 2022-02-14T14:33:01.000Z | 2022-02-14T14:33:01.000Z | get-poetry.py | nrosenstein-forks/poetry | 28d05d002475f0cc55e7cc46ae01f9a3ce4e03a8 | [
"MIT"
] | 1 | 2022-03-19T12:13:53.000Z | 2022-03-19T12:13:53.000Z | """
This script will install Poetry and its dependencies
in isolation from the rest of the system.
It does, in order:
- Downloads the latest stable (or pre-release) version of poetry.
- Downloads all its dependencies in the poetry/_vendor directory.
- Copies it and all extra files in $POETRY_HOME.
- Updates t... | 29.284182 | 124 | 0.569044 | import argparse
import hashlib
import json
import os
import platform
import re
import shutil
import stat
import subprocess
import sys
import tarfile
import tempfile
from contextlib import closing
from contextlib import contextmanager
from functools import cmp_to_key
from gzip import GzipFile
from io import Unsupported... | true | true |
f7450fd86cbdb0b8c80dbf5c84851b7be0147d0a | 695 | py | Python | pqbl/__init__.py | banditsbeware/pqbl | 3dc981b5074b6aae751dde1425e26cad02dbf4bd | [
"MIT"
] | null | null | null | pqbl/__init__.py | banditsbeware/pqbl | 3dc981b5074b6aae751dde1425e26cad02dbf4bd | [
"MIT"
] | null | null | null | pqbl/__init__.py | banditsbeware/pqbl | 3dc981b5074b6aae751dde1425e26cad02dbf4bd | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import os
db = SQLAlchemy()
login_mgr = LoginManager()
login_mgr.session_protection = 'basic'
login_mgr.login_view = 'routes.login'
def create_app():
app = Flask(__name__)
app.config[ 'SQLALCHEMY_DATABASE_URI... | 23.965517 | 70 | 0.716547 | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import os
db = SQLAlchemy()
login_mgr = LoginManager()
login_mgr.session_protection = 'basic'
login_mgr.login_view = 'routes.login'
def create_app():
app = Flask(__name__)
app.config[ 'SQLALCHEMY_DATABASE_URI... | true | true |
f7450ff164c9258fbf92e2b283a26c37ee7e7155 | 2,824 | py | Python | src/lambda_function/function.py | QuiNovas/appsync-athena-async-resolver | 1cecc4e9f9e4c3925a3af908027a75f7d25d7b66 | [
"Apache-2.0"
] | 1 | 2021-05-15T14:24:17.000Z | 2021-05-15T14:24:17.000Z | src/lambda_function/function.py | QuiNovas/appsync-athena-async-resolver | 1cecc4e9f9e4c3925a3af908027a75f7d25d7b66 | [
"Apache-2.0"
] | null | null | null | src/lambda_function/function.py | QuiNovas/appsync-athena-async-resolver | 1cecc4e9f9e4c3925a3af908027a75f7d25d7b66 | [
"Apache-2.0"
] | null | null | null | from athena_type_converter import convert_result_set, TYPE_CONVERTERS
from base64 import b64encode
from boto3 import client
from json import dumps as jsondumps
from logging import getLogger, INFO
from os import environ
__DATABASE = environ.get('DATABASE', 'default')
__LIMIT = environ.get('LIMIT', 100)
__WORKGROUP = e... | 32.45977 | 88 | 0.707153 | from athena_type_converter import convert_result_set, TYPE_CONVERTERS
from base64 import b64encode
from boto3 import client
from json import dumps as jsondumps
from logging import getLogger, INFO
from os import environ
__DATABASE = environ.get('DATABASE', 'default')
__LIMIT = environ.get('LIMIT', 100)
__WORKGROUP = e... | true | true |
f745122d214ed285c34af1e44f2ef17b77088181 | 153 | py | Python | test.py | dqdang/strafe | b7e76d74e216c46c55bf019a3c167a8579d0c8ad | [
"MIT"
] | null | null | null | test.py | dqdang/strafe | b7e76d74e216c46c55bf019a3c167a8579d0c8ad | [
"MIT"
] | null | null | null | test.py | dqdang/strafe | b7e76d74e216c46c55bf019a3c167a8579d0c8ad | [
"MIT"
] | null | null | null | import os
def find_existing_strafe():
output = os.popen('wmic process get description, processid').read()
print(output)
find_existing_strafe()
| 19.125 | 71 | 0.738562 | import os
def find_existing_strafe():
output = os.popen('wmic process get description, processid').read()
print(output)
find_existing_strafe()
| true | true |
f74513d628f3f297794d98854de7cc09cf9f7c72 | 5,496 | py | Python | neptune.py | lifehackerhansol/Neptune | fd372483b02245e88c9eca48665bb78d4b115369 | [
"0BSD"
] | null | null | null | neptune.py | lifehackerhansol/Neptune | fd372483b02245e88c9eca48665bb78d4b115369 | [
"0BSD"
] | 6 | 2021-08-30T21:34:34.000Z | 2022-01-10T17:39:22.000Z | neptune.py | lifehackerhansol/Neptune | fd372483b02245e88c9eca48665bb78d4b115369 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
#
# ISC License
#
# Copyright (C) 2021 DS-Homebrew
# Copyright (C) 2021-present lifehackerhansol
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice app... | 35.458065 | 115 | 0.652838 |
import discord
import aiohttp
import asyncio
import settings
from discord.ext import commands
from utils.utils import create_error_embed
from tortoise import Tortoise
cogs = [
'cogs.mod',
'cogs.roles',
'cogs.load',
'jishaku'
]
async def init():
await Tortoise.init(
... | true | true |
f745141edb9954f8faf91c3e78f237a5b6b28636 | 7,798 | py | Python | rlpyt/envs/dm_control_env.py | csingh27sewts/rlpyt | 4252eb63515c9e68c0674fb010d2c6dbfdac9122 | [
"MIT"
] | 17 | 2019-10-07T03:37:08.000Z | 2022-02-10T15:33:22.000Z | rlpyt/envs/dm_control_env.py | csingh27/Learning-To-Manipulate-Deformable-Objects-without-Demonstration | 4252eb63515c9e68c0674fb010d2c6dbfdac9122 | [
"MIT"
] | 1 | 2021-09-09T08:49:43.000Z | 2021-09-09T08:49:43.000Z | rlpyt/envs/dm_control_env.py | csingh27/Learning-To-Manipulate-Deformable-Objects-without-Demonstration | 4252eb63515c9e68c0674fb010d2c6dbfdac9122 | [
"MIT"
] | 6 | 2020-06-24T10:34:46.000Z | 2021-07-19T01:57:49.000Z | from dm_control import suite
from dm_control.suite.wrappers import pixels
from dm_env.specs import Array, BoundedArray
import numpy as np
import os
import atari_py
import cv2
import copy
from collections import namedtuple, OrderedDict
from rlpyt.utils.collections import namedarraytuple
from rlpyt.envs.base import Env... | 36.269767 | 82 | 0.615029 | from dm_control import suite
from dm_control.suite.wrappers import pixels
from dm_env.specs import Array, BoundedArray
import numpy as np
import os
import atari_py
import cv2
import copy
from collections import namedtuple, OrderedDict
from rlpyt.utils.collections import namedarraytuple
from rlpyt.envs.base import Env... | true | true |
f74514be01eaa05f2be1c84cb8b6b63efa7694f9 | 9,553 | py | Python | src/.history/Test/HiwinRT605_test_20190619121634.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/Test/HiwinRT605_test_20190619121634.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/Test/HiwinRT605_test_20190619121634.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# license removed for brevity
#策略 機械手臂 四點來回跑
import rospy
import os
import numpy as np
from std_msgs.msg import String
from ROS_Socket.srv import *
from ROS_Socket.msg import *
import math
import enum
import Hiwin_RT605_ROS as strategy
pos_feedback_times = 0
mode_feedback_times = 0
msg_feedback ... | 30.816129 | 116 | 0.575003 |
import rospy
import os
import numpy as np
from std_msgs.msg import String
from ROS_Socket.srv import *
from ROS_Socket.msg import *
import math
import enum
import Hiwin_RT605_ROS as strategy
pos_feedback_times = 0
mode_feedback_times = 0
msg_feedback = 1
arm_move_times = 1
lf, value):
self.value = value
... | true | true |
f74514d85f8e31ee179b1fd4235ad80c1331e883 | 1,425 | py | Python | ibeis/viz/interact/interact_sver.py | brmscheiner/ibeis | 9bb93a6cd74ac47921e734c80917a38609dfe661 | [
"Apache-2.0"
] | 1 | 2019-01-17T22:59:14.000Z | 2019-01-17T22:59:14.000Z | ibeis/viz/interact/interact_sver.py | holmbergius/ibeisold | da3a1480057a6a5d5c68304760642edaae680502 | [
"Apache-2.0"
] | null | null | null | ibeis/viz/interact/interact_sver.py | holmbergius/ibeisold | da3a1480057a6a5d5c68304760642edaae680502 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
from ibeis import viz
from ibeis.viz import viz_helpers as vh
from plottool import interact_helpers as ih
(print, rrr, profile) = ut.inject2(__name__, '[interact_sver]')
def ishow_sver(ibs, ai... | 36.538462 | 91 | 0.624561 |
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
from ibeis import viz
from ibeis.viz import viz_helpers as vh
from plottool import interact_helpers as ih
(print, rrr, profile) = ut.inject2(__name__, '[interact_sver]')
def ishow_sver(ibs, aid1, aid2, chipmatch_FIL... | true | true |
f74515c510be36a2d753884fc26179a931e7730b | 1,462 | py | Python | jdcloud_sdk/services/ipanti/apis/EnableWebRuleJsPageRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/ipanti/apis/EnableWebRuleJsPageRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/ipanti/apis/EnableWebRuleJsPageRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 31.782609 | 123 | 0.713406 |
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
class EnableWebRuleJsPageRequest(JDCloudRequest):
def __init__(self, parameters, header=None, version="v1"):
super(EnableWebRuleJsPageRequest, self).__init__(
'/regions/{regionId}/instances/{instanceId}/webRules/{web... | true | true |
f745169d0584b8b5020680bdb256ee92b2ff6887 | 8,584 | py | Python | resources/lib/services/nfsession/session/http_requests.py | rijsab/plugin.video.netflix | b30a6ba63ddeafcbcd53a642c74ffe5557eafb60 | [
"MIT"
] | null | null | null | resources/lib/services/nfsession/session/http_requests.py | rijsab/plugin.video.netflix | b30a6ba63ddeafcbcd53a642c74ffe5557eafb60 | [
"MIT"
] | null | null | null | resources/lib/services/nfsession/session/http_requests.py | rijsab/plugin.video.netflix | b30a6ba63ddeafcbcd53a642c74ffe5557eafb60 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix)
Copyright (C) 2018 Caphm (original implementation module)
Copyright (C) 2019 Stefano Gottardo - @CastagnaIT
Manages the HTTP requests
SPDX-License-Identifier: MIT
See LICENSES/MIT.md for more information.
""... | 46.907104 | 120 | 0.638979 |
from __future__ import absolute_import, division, unicode_literals
import json
import resources.lib.utils.website as website
import resources.lib.common as common
from resources.lib.common.exceptions import (APIError, WebsiteParsingError, MbrStatusError, MbrStatusAnonymousError,
... | true | true |
f7451841439f889a5fc90aa3307193d36f92eba8 | 1,783 | py | Python | infer_license/tests/types.py | dfetch-org/infer-license | dd7fb0da03776881910d5c1c54658f9f51293432 | [
"MIT"
] | null | null | null | infer_license/tests/types.py | dfetch-org/infer-license | dd7fb0da03776881910d5c1c54658f9f51293432 | [
"MIT"
] | null | null | null | infer_license/tests/types.py | dfetch-org/infer-license | dd7fb0da03776881910d5c1c54658f9f51293432 | [
"MIT"
] | null | null | null | import unittest
from trove_classifiers import classifiers
from .. import types
class TypesTest(unittest.TestCase):
def test_classifiers_are_valid(self) -> None:
for license in types.KNOWN_LICENSES:
if license.trove_classifier:
with self.subTest(msg=license.shortname):
... | 40.522727 | 93 | 0.609647 | import unittest
from trove_classifiers import classifiers
from .. import types
class TypesTest(unittest.TestCase):
def test_classifiers_are_valid(self) -> None:
for license in types.KNOWN_LICENSES:
if license.trove_classifier:
with self.subTest(msg=license.shortname):
... | true | true |
f74518f48d2a6c1ad9e7455b76296449544bc6dc | 3,440 | py | Python | custom/ewsghana/alerts/alerts.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | custom/ewsghana/alerts/alerts.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | custom/ewsghana/alerts/alerts.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | from corehq.apps.products.models import SQLProduct
from custom.ewsghana.alerts import COMPLETE_REPORT, \
STOCKOUTS_MESSAGE, LOW_SUPPLY_MESSAGE, OVERSTOCKED_MESSAGE, RECEIPT_MESSAGE
from custom.ewsghana.utils import ProductsReportHelper
from django.utils.translation import ugettext as _
class SOHAlerts(object):
... | 45.866667 | 120 | 0.608721 | from corehq.apps.products.models import SQLProduct
from custom.ewsghana.alerts import COMPLETE_REPORT, \
STOCKOUTS_MESSAGE, LOW_SUPPLY_MESSAGE, OVERSTOCKED_MESSAGE, RECEIPT_MESSAGE
from custom.ewsghana.utils import ProductsReportHelper
from django.utils.translation import ugettext as _
class SOHAlerts(object):
... | true | true |
f745198d524cab00d356a94c238f23bdd30c66ee | 19,687 | py | Python | exps/NAS-Bench-201/statistics.py | MUST-AI-Lab/NAS-Projects | fcb2aae34a2b3c02877fbdb41cda45e1e73327a6 | [
"MIT"
] | 1 | 2020-05-08T08:58:28.000Z | 2020-05-08T08:58:28.000Z | exps/NAS-Bench-201/statistics.py | wangguangyuan/AutoDL-Projects | 1ce3249a5a58af3506b8c9af977008ddf8198445 | [
"MIT"
] | null | null | null | exps/NAS-Bench-201/statistics.py | wangguangyuan/AutoDL-Projects | 1ce3249a5a58af3506b8c9af977008ddf8198445 | [
"MIT"
] | 2 | 2020-05-08T09:14:36.000Z | 2020-09-28T06:59:30.000Z | ##################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019 #
##################################################
import os, sys, time, argparse, collections
from copy import deepcopy
import torch
import torch.nn as nn
from pathlib import Path
from collections import defaultdict
l... | 66.510135 | 232 | 0.701834 | , 'valid')], network.cuda())
xresult.update_OLD_eval('x-valid', {results['total_epoch']-1: top1}, {results['total_epoch']-1: loss})
loss, top1, top5, latencies = pure_evaluate(dataloader_dict['{:}@{:}'.format(dataset, 'test')], network.cuda())
xresult.update_OLD_eval('x-test' , {results['total_epoch'... | true | true |
f7451beaf8da1625a937db26e91afb0d5188ec1f | 10,244 | py | Python | lisa/tests/staging/schedutil.py | vdonnefort/lisa | 38e5f246e6c94201a60a8698e7f29277f11c425e | [
"Apache-2.0"
] | null | null | null | lisa/tests/staging/schedutil.py | vdonnefort/lisa | 38e5f246e6c94201a60a8698e7f29277f11c425e | [
"Apache-2.0"
] | null | null | null | lisa/tests/staging/schedutil.py | vdonnefort/lisa | 38e5f246e6c94201a60a8698e7f29277f11c425e | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2019, ARM Limited and contributors.
#
# 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
#
# ... | 37.386861 | 144 | 0.655018 |
from math import ceil
import os
import pandas as pd
from lisa.wlgen.rta import Ramp
from lisa.tests.base import TestBundle, ResultBundle, Result, RTATestBundle
from lisa.target import Target
from lisa.trace import requires_events, FtraceCollector, FtraceConf
from lisa.datautils import df_merge, serie... | true | true |
f7451c3bbb5bc4131847dc5614e5dcfb04238608 | 1,690 | py | Python | setup.py | yevheniimoroziuk/openprocurement.auctions.appraisal | 40d077f49d0bfc9c5061e8e00073eff691cbd2b2 | [
"Apache-2.0"
] | null | null | null | setup.py | yevheniimoroziuk/openprocurement.auctions.appraisal | 40d077f49d0bfc9c5061e8e00073eff691cbd2b2 | [
"Apache-2.0"
] | null | null | null | setup.py | yevheniimoroziuk/openprocurement.auctions.appraisal | 40d077f49d0bfc9c5061e8e00073eff691cbd2b2 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
import os
version = '0.1.0'
entry_points = {
'openprocurement.auctions.core.plugins': [
'auctions.appraisal = openprocurement.auctions.appraisal.includeme:includeme'
],
'openprocurement.api.migrations': [
'auctions.appraisal = openprocurement.auc... | 31.296296 | 88 | 0.672189 | from setuptools import setup, find_packages
import os
version = '0.1.0'
entry_points = {
'openprocurement.auctions.core.plugins': [
'auctions.appraisal = openprocurement.auctions.appraisal.includeme:includeme'
],
'openprocurement.api.migrations': [
'auctions.appraisal = openprocurement.auc... | true | true |
f7451cc24ba78ce1f1dd564bdd8cbf10ac4be27b | 9,542 | py | Python | CochlearModel_2D_Direct.py | rtachi-lab/Human-Cochlear-Model | 6584de225176d8d1b2be96939acb7ef7d3f64774 | [
"Apache-2.0"
] | null | null | null | CochlearModel_2D_Direct.py | rtachi-lab/Human-Cochlear-Model | 6584de225176d8d1b2be96939acb7ef7d3f64774 | [
"Apache-2.0"
] | null | null | null | CochlearModel_2D_Direct.py | rtachi-lab/Human-Cochlear-Model | 6584de225176d8d1b2be96939acb7ef7d3f64774 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import tqdm
import wavfile
class CochlearModel:
"""
Two-dimensional cochlear model with two-degree-of-freedom
(2DOF) micro-structure [1] for human. This program employs
time domain solution proposed in Ref. [2], and for fast calcuration,
applies n... | 29.269939 | 104 | 0.485328 | import numpy as np
import matplotlib.pyplot as plt
import tqdm
import wavfile
class CochlearModel:
def __init__(self, Nx, Ny, gamma):
self.Nx = Nx
self.Ny = Ny
self.Lb = 3.5
self.L = 0.1
self.W = 0.1
self.H = 0.1
self.b = 0.4
self.rho = 1.0
se... | true | true |
f7451d2d3c74eb2024d2046e9c238fc9ab420ad9 | 277 | py | Python | aioimap/about.py | surajiyer/pymail | ee6b0f04c36ef2b1f329216987711bb5ad3205fc | [
"MIT"
] | 2 | 2021-04-09T01:53:24.000Z | 2022-03-04T09:28:20.000Z | aioimap/about.py | surajiyer/pymail | ee6b0f04c36ef2b1f329216987711bb5ad3205fc | [
"MIT"
] | null | null | null | aioimap/about.py | surajiyer/pymail | ee6b0f04c36ef2b1f329216987711bb5ad3205fc | [
"MIT"
] | null | null | null | __title__ = 'aioimap'
__version__ = '0.2.7'
__summary__ = 'Receive e-mails from an IMAP server asynchronously and trigger a callback with the message.'
__uri__ = 'https://github.com/surajiyer/aioimap'
__author__ = 'Suraj Iyer'
__email__ = 'me@surajiyer.com'
__license__ = 'MIT' | 39.571429 | 107 | 0.758123 | __title__ = 'aioimap'
__version__ = '0.2.7'
__summary__ = 'Receive e-mails from an IMAP server asynchronously and trigger a callback with the message.'
__uri__ = 'https://github.com/surajiyer/aioimap'
__author__ = 'Suraj Iyer'
__email__ = 'me@surajiyer.com'
__license__ = 'MIT' | true | true |
f7451d3b2bcd2b41c694706472fbdf5a340ccc3c | 305 | py | Python | cgi-bin/main_page.py | NyanHtooTha/python_e-library | be10206632765c39b708c3d7c8c6a28996f3a142 | [
"MIT"
] | null | null | null | cgi-bin/main_page.py | NyanHtooTha/python_e-library | be10206632765c39b708c3d7c8c6a28996f3a142 | [
"MIT"
] | null | null | null | cgi-bin/main_page.py | NyanHtooTha/python_e-library | be10206632765c39b708c3d7c8c6a28996f3a142 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
import view
book_types = os.listdir('books')
data = os.listdir('data')
if not data:
import db
db.create_tables(book_types)
view.__main_page__(book_types)
else:
import db
db.check_for_update(book_types)
view.__main_page__(book_types, data=True)
| 16.944444 | 45 | 0.708197 |
import os
import view
book_types = os.listdir('books')
data = os.listdir('data')
if not data:
import db
db.create_tables(book_types)
view.__main_page__(book_types)
else:
import db
db.check_for_update(book_types)
view.__main_page__(book_types, data=True)
| true | true |
f7451dcafaa851e8505fef3fb84fb3eb23adf52e | 1,218 | py | Python | .history/ClassFiles/DataStructures/Set_20210101145654.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/ClassFiles/DataStructures/Set_20210101145654.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/ClassFiles/DataStructures/Set_20210101145654.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | ''' SETS
A set is a collection of values.
Values in a set are not ordered.
Values in a set are not indexed.
How to create a Set with a constructor() # 28
Counting Values in a Set. # 35
Built-in Set methods
Methods Description
add() Adds an element to a set. # 37
Update() Adds multiple el... | 25.375 | 76 | 0.611658 | fruits = {"grapes", "apples", "berries"}
for x in fruits:
print(x)
iger","bear"))
for y in animals:
print(y)
print(len(animals))
fruits.add("oranges")
print(fruits)
fruits.update(["mango", "kiwi"])
print(fruits)
fruits.remove("kiwi")
print(fr... | true | true |
f7451e04b5509a3b3a1ecacc27d8ca29e4bae31f | 657 | py | Python | 4.py | Andrey543/Prack_10 | 263cae3204ed624b68d5797bd8d8833dd88e4682 | [
"PSF-2.0"
] | null | null | null | 4.py | Andrey543/Prack_10 | 263cae3204ed624b68d5797bd8d8833dd88e4682 | [
"PSF-2.0"
] | null | null | null | 4.py | Andrey543/Prack_10 | 263cae3204ed624b68d5797bd8d8833dd88e4682 | [
"PSF-2.0"
] | null | null | null | enru=open('en-ru.txt','r')
input=open('input.txt','r')
output=open('output.txt','w')
s=enru.read()
x=''
prov={'q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m'}
slovar={}
s=s.replace('\t-\t',' ')
while len(s)>0:
slovar[s[:s.index(' ')]]=s[s.index(' '):s.index('\... | 22.655172 | 110 | 0.438356 | enru=open('en-ru.txt','r')
input=open('input.txt','r')
output=open('output.txt','w')
s=enru.read()
x=''
prov={'q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m'}
slovar={}
s=s.replace('\t-\t',' ')
while len(s)>0:
slovar[s[:s.index(' ')]]=s[s.index(' '):s.index('\... | true | true |
f7451e9e8aab3a7cac52e55c448a27e9c5e0b003 | 28,241 | py | Python | sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_inputs_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_inputs_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_inputs_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.976534 | 206 | 0.666336 |
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.... | true | true |
f7451edde1d4a3e1524f0ccda3454623e85cfa5a | 1,805 | py | Python | nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py | HussainAther/nipype | 7e33d086fd5cea6ef6de99ee3e35929c1d5730d4 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py | HussainAther/nipype | 7e33d086fd5cea6ef6de99ee3e35929c1d5730d4 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/ants/tests/test_auto_ApplyTransforms.py | HussainAther/nipype | 7e33d086fd5cea6ef6de99ee3e35929c1d5730d4 | [
"Apache-2.0"
] | null | null | null | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..resampling import ApplyTransforms
def test_ApplyTransforms_inputs():
input_map = dict(args=dict(argstr='%s',
),
default_value=dict(argstr='--default-value %g',
usedefault=True,
),
dimension=dic... | 26.544118 | 67 | 0.65097 |
from __future__ import unicode_literals
from ..resampling import ApplyTransforms
def test_ApplyTransforms_inputs():
input_map = dict(args=dict(argstr='%s',
),
default_value=dict(argstr='--default-value %g',
usedefault=True,
),
dimension=dict(argstr='--dimensionality %d',
),
environ=di... | true | true |
f7451ef9695cd9a77c7d51a37d0531b6ffc2914c | 5,736 | py | Python | chatbot/custom/custom_tracker.py | Vedantsahai18/Leveraging-Conversational-AI-for-Secure-Healthcare-Assistance | d8fe6b6b46a287923e20b710f2652ca3fe8b213d | [
"MIT"
] | null | null | null | chatbot/custom/custom_tracker.py | Vedantsahai18/Leveraging-Conversational-AI-for-Secure-Healthcare-Assistance | d8fe6b6b46a287923e20b710f2652ca3fe8b213d | [
"MIT"
] | null | null | null | chatbot/custom/custom_tracker.py | Vedantsahai18/Leveraging-Conversational-AI-for-Secure-Healthcare-Assistance | d8fe6b6b46a287923e20b710f2652ca3fe8b213d | [
"MIT"
] | 1 | 2021-11-22T13:17:03.000Z | 2021-11-22T13:17:03.000Z | import json
import logging
import pickle
import typing
from typing import Iterator, Optional, Text, Iterable, Union, Dict, List
import itertools
import traceback
from time import sleep
from rasa.core.brokers.event_channel import EventChannel
from rasa.core.trackers import ActionExecuted, DialogueStateTracker, EventVerb... | 32.044693 | 85 | 0.637901 | import json
import logging
import pickle
import typing
from typing import Iterator, Optional, Text, Iterable, Union, Dict, List
import itertools
import traceback
from time import sleep
from rasa.core.brokers.event_channel import EventChannel
from rasa.core.trackers import ActionExecuted, DialogueStateTracker, EventVerb... | true | true |
f74520bcdb37cc522781ff10b26f5a2b0456c866 | 1,385 | py | Python | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/policy_topic_evidence_destination_not_working_dns_error_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/policy_topic_evidence_destination_not_working_dns_error_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/policy_topic_evidence_destination_not_working_dns_error_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | 31.477273 | 78 | 0.72852 |
import proto
__protobuf__ = proto.module(
package='google.ads.googleads.v7.enums',
marshal='google.ads.googleads.v7',
manifest={
'PolicyTopicEvidenceDestinationNotWorkingDnsErrorTypeEnum',
},
)
class PolicyTopicEvidenceDestinationNotWorkingDnsErrorTypeEnum(proto.Message):
... | true | true |
f74521e5b257d280381b87524b52643e5a799639 | 161 | py | Python | tests/__init__.py | dmarec98/TFLuna-I2C_python | bc7c2c4124c43efbf79b78a8739cf59c562dedbd | [
"MIT"
] | null | null | null | tests/__init__.py | dmarec98/TFLuna-I2C_python | bc7c2c4124c43efbf79b78a8739cf59c562dedbd | [
"MIT"
] | null | null | null | tests/__init__.py | dmarec98/TFLuna-I2C_python | bc7c2c4124c43efbf79b78a8739cf59c562dedbd | [
"MIT"
] | 2 | 2021-09-06T01:17:21.000Z | 2022-02-16T11:41:33.000Z | ''' This folder contains two Python script that test the 'tfli2c' a module for the
Benewake TFLuna LiDAR ranging device operating in I2C communications mode.'''
| 53.666667 | 82 | 0.78882 | true | true | |
f74523ff5743ac0844d44b83a24c335db7ce350c | 3,862 | py | Python | tests/test_dump_basic.py | fantix/edgedb | 9fcd0a0eaed771a55f958a85fc71efde76fa7ac7 | [
"Apache-2.0"
] | 2 | 2019-01-21T05:43:52.000Z | 2019-05-24T02:53:14.000Z | tests/test_dump_basic.py | fantix/edgedb | 9fcd0a0eaed771a55f958a85fc71efde76fa7ac7 | [
"Apache-2.0"
] | null | null | null | tests/test_dump_basic.py | fantix/edgedb | 9fcd0a0eaed771a55f958a85fc71efde76fa7ac7 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2019-present MagicStack Inc. and the EdgeDB 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... | 33.008547 | 75 | 0.585448 |
import hashlib
import os
import random
import tempfile
from edb.testbase import server as tb
class TestDumpBasics(tb.DatabaseTestCase, tb.CLITestCaseMixin):
TRANSACTION_ISOLATION = False
SETUP = '''
CREATE TYPE test::Tmp {
CREATE REQUIRED PROPERTY idx -> std::int64;
... | true | true |
f745247ed99a241f8ec6fa7e49cde8b7b47deeb7 | 8,930 | py | Python | tools/nntool/quantization/unified_quantization_handler.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 118 | 2018-05-22T08:45:59.000Z | 2022-03-30T07:00:45.000Z | tools/nntool/quantization/unified_quantization_handler.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 213 | 2018-07-25T02:37:32.000Z | 2022-03-30T18:04:01.000Z | tools/nntool/quantization/unified_quantization_handler.py | 00-01/gap_sdk | 25444d752b26ccf0b848301c381692d77172852c | [
"Apache-2.0"
] | 76 | 2018-07-04T08:19:27.000Z | 2022-03-24T09:58:05.000Z | # Copyright (C) 2021, 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This... | 38.162393 | 132 | 0.644457 |
import logging
from copy import deepcopy
from utils.subclasses import get_all_subclasses
from quantization.qtype_constraint import ConstraintBase, MatchAll
LOG = logging.getLogger('nntool.' + __name__)
def min_or_max_none(v):
return v['min'] is None or v['max'] is None
def dimstr(dims):
retur... | true | true |
f74524d992a129fdd843873b008f6a99763cfe46 | 96,105 | py | Python | Lib/test/test_pathlib.py | vedikastva96/cpython | ff1c6d61a10c20279efda73712e814dbb8660768 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/test/test_pathlib.py | vedikastva96/cpython | ff1c6d61a10c20279efda73712e814dbb8660768 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/test/test_pathlib.py | vedikastva96/cpython | ff1c6d61a10c20279efda73712e814dbb8660768 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2019-10-31T12:07:41.000Z | 2019-10-31T12:07:41.000Z | import collections.abc
import io
import os
import sys
import errno
import pathlib
import pickle
import socket
import stat
import tempfile
import unittest
from unittest import mock
from test import support
from test.support import TESTFN, FakePath
try:
import grp, pwd
except ImportError:
grp = pwd = None
cla... | 40.465263 | 96 | 0.538276 | import collections.abc
import io
import os
import sys
import errno
import pathlib
import pickle
import socket
import stat
import tempfile
import unittest
from unittest import mock
from test import support
from test.support import TESTFN, FakePath
try:
import grp, pwd
except ImportError:
grp = pwd = None
cla... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.