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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c1abea796c47f01c0ea817b3dcc9ccc32c19d39 | 397 | py | Python | pyFG/py23_compat.py | OxHobbs/pyfg | d0c1718e0f3a4f6f945cdbec4e8621d40a7c6e17 | [
"Apache-2.0"
] | 64 | 2015-03-11T00:11:37.000Z | 2021-06-02T06:44:11.000Z | pyFG/py23_compat.py | OxHobbs/pyfg | d0c1718e0f3a4f6f945cdbec4e8621d40a7c6e17 | [
"Apache-2.0"
] | 32 | 2015-09-14T12:14:02.000Z | 2020-10-31T04:46:36.000Z | pyFG/py23_compat.py | OxHobbs/pyfg | d0c1718e0f3a4f6f945cdbec4e8621d40a7c6e17 | [
"Apache-2.0"
] | 69 | 2015-01-23T16:13:53.000Z | 2022-03-26T14:40:48.000Z | """Simplify Python3 compatibility. Modeled after six behavior for small set of things"""
from __future__ import print_function
from __future__ import unicode_literals
import sys
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if sys.version_info[0] == 3:
string_types = (str,)
text_type = str
el... | 24.8125 | 88 | 0.717884 | from __future__ import print_function
from __future__ import unicode_literals
import sys
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if sys.version_info[0] == 3:
string_types = (str,)
text_type = str
else:
string_types = (basestring,)
text_type = unicode
| true | true |
1c1abf97dcac2741592d56cf588a7aa21114b547 | 2,625 | py | Python | tests/test_pushshift_api.py | typenil/psaw | 65868f44a58254f116e4ef23442a3fd70b2bdf28 | [
"BSD-2-Clause"
] | 13 | 2019-07-13T08:20:39.000Z | 2021-05-04T02:18:58.000Z | tests/test_pushshift_api.py | typenil/psaw | 65868f44a58254f116e4ef23442a3fd70b2bdf28 | [
"BSD-2-Clause"
] | 5 | 2019-06-07T23:57:59.000Z | 2021-06-25T15:20:08.000Z | tests/test_pushshift_api.py | typenil/psaw | 65868f44a58254f116e4ef23442a3fd70b2bdf28 | [
"BSD-2-Clause"
] | 1 | 2019-08-09T23:23:32.000Z | 2019-08-09T23:23:32.000Z | from unittest import mock
from tests.test_pushshift_api_minimal import TestPushshiftAPIMinimal
from pushshift_py import PushshiftAPI
# pylint: disable=too-many-public-methods
class TestPushshiftAPI(TestPushshiftAPIMinimal):
# pylint: disable=protected-access
def test_init(self):
# Ensure everything ge... | 32.407407 | 94 | 0.627048 | from unittest import mock
from tests.test_pushshift_api_minimal import TestPushshiftAPIMinimal
from pushshift_py import PushshiftAPI
class TestPushshiftAPI(TestPushshiftAPIMinimal):
def test_init(self):
api = PushshiftAPI(**self._base_init_kwargs)
self.assertEqual(api._search, api._... | true | true |
1c1ac1bc588e53abe9b49b47de2fdda8729effdd | 127,253 | py | Python | mrcnn/model.py | Sigel1/Mask_RCNN | a0d3a99f9271968936ac7e687e72f6b33f5816b4 | [
"MIT"
] | null | null | null | mrcnn/model.py | Sigel1/Mask_RCNN | a0d3a99f9271968936ac7e687e72f6b33f5816b4 | [
"MIT"
] | null | null | null | mrcnn/model.py | Sigel1/Mask_RCNN | a0d3a99f9271968936ac7e687e72f6b33f5816b4 | [
"MIT"
] | null | null | null | """
Mask R-CNN
The main Mask R-CNN model implementation.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import os
import random
import datetime
import re
import math
import logging
from collections import OrderedDict
import multiprocessing
im... | 44.292725 | 115 | 0.611993 |
import os
import random
import datetime
import re
import math
import logging
from collections import OrderedDict
import multiprocessing
import numpy as np
import tensorflow as tf
import keras
import keras.backend as K
import keras.layers as KL
import keras.engine as KE
import keras.models as KM
from mrcnn import util... | true | true |
1c1ac33fec848cef38beeca043ba67080660ae83 | 2,116 | py | Python | ooobuild/lo/ucb/x_content_provider.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/ucb/x_content_provider.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/ucb/x_content_provider.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... | 37.785714 | 140 | 0.743856 |
import typing
from abc import abstractmethod
from ..uno.x_interface import XInterface as XInterface_8f010a43
if typing.TYPE_CHECKING:
from .x_content import XContent as XContent_79db0975
from .x_content_identifier import XContentIdentifier as XContentIdentifier_edc90d78
class XContentProvid... | true | true |
1c1ac349ca31641dfa1428b81176ad2257d9c0ab | 1,682 | py | Python | events/events/doctype/custom_event/custom_event.py | MohamedAbdultawab/events | 3d4acaf73628135addb7f1e98b4351cbba50c27e | [
"MIT"
] | null | null | null | events/events/doctype/custom_event/custom_event.py | MohamedAbdultawab/events | 3d4acaf73628135addb7f1e98b4351cbba50c27e | [
"MIT"
] | null | null | null | events/events/doctype/custom_event/custom_event.py | MohamedAbdultawab/events | 3d4acaf73628135addb7f1e98b4351cbba50c27e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Mohamed Abdultawab and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import nowdate, nowtime
from frappe.website.website_generator import WebsiteGenerator
class... | 32.980392 | 163 | 0.630202 |
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import nowdate, nowtime
from frappe.website.website_generator import WebsiteGenerator
class CustomEvent(WebsiteGenerator):
def validate(self):
self.validate_invitees()
self.validate_date_and_time()
... | true | true |
1c1ac7c217b237f3e03272e487979ff386baec74 | 4,591 | py | Python | level_one.py | KlaudijaMedeksaite/GBUI-voice-project | bd2cd979483e3ac43de5009d148e2e0403f50eda | [
"MIT"
] | null | null | null | level_one.py | KlaudijaMedeksaite/GBUI-voice-project | bd2cd979483e3ac43de5009d148e2e0403f50eda | [
"MIT"
] | null | null | null | level_one.py | KlaudijaMedeksaite/GBUI-voice-project | bd2cd979483e3ac43de5009d148e2e0403f50eda | [
"MIT"
] | null | null | null | import extras
import mike
from deep_translator import (GoogleTranslator)
import main
# The three parts of the first level
def colours(lan):
language = extras.get_language_long(lan)
print("\n\nColours in " + language)
print("---------------------------------------------------------")
clrEn = ["white... | 29.242038 | 75 | 0.454149 | import extras
import mike
from deep_translator import (GoogleTranslator)
import main
def colours(lan):
language = extras.get_language_long(lan)
print("\n\nColours in " + language)
print("---------------------------------------------------------")
clrEn = ["white", "grey", "black", "brown", "red",
... | true | true |
1c1ac88bca036083aaa6753a79945f2bc423a735 | 3,238 | py | Python | tool/ws2rpc.py | fossabot/xrpl-dev-portal | c189df941fd6808c0ba8af9a28cdab418ff213a0 | [
"Apache-2.0"
] | 107 | 2019-09-18T06:42:59.000Z | 2021-07-19T09:24:26.000Z | tool/ws2rpc.py | fossabot/xrpl-dev-portal | c189df941fd6808c0ba8af9a28cdab418ff213a0 | [
"Apache-2.0"
] | 301 | 2019-08-15T22:14:54.000Z | 2021-07-20T21:59:28.000Z | tool/ws2rpc.py | fossabot/xrpl-dev-portal | c189df941fd6808c0ba8af9a28cdab418ff213a0 | [
"Apache-2.0"
] | 442 | 2019-08-16T09:56:28.000Z | 2021-07-22T07:47:03.000Z | #!/bin/env python
"""
Tool to parse a markdown file for WebSocket examples,
reformat those examples as JSON-RPC, and test them against
a public WebSocket server.
"""
from __future__ import print_function
import re, json, sys, warnings, argparse
if sys.version_info[:2] <= (2,7):
import httplib
#gotta define t... | 27.913793 | 135 | 0.639284 |
from __future__ import print_function
import re, json, sys, warnings, argparse
if sys.version_info[:2] <= (2,7):
import httplib
class FileNotFoundError(IOError):
pass
else:
import http.client as httplib
RIPPLED_RPC_HOST = "s1.ripple.com"
RIPPLED_RPC_PORT = 51234
def ws2rpc(s):
ws_j = ... | true | true |
1c1ac9a29744ab7194a790a379a39d85d5f241c4 | 1,488 | py | Python | telefono.py | rausejop/scripts | 19508bdc25e20e9af1fcdddb43e8861372cba018 | [
"Apache-2.0"
] | null | null | null | telefono.py | rausejop/scripts | 19508bdc25e20e9af1fcdddb43e8861372cba018 | [
"Apache-2.0"
] | null | null | null | telefono.py | rausejop/scripts | 19508bdc25e20e9af1fcdddb43e8861372cba018 | [
"Apache-2.0"
] | 1 | 2022-03-19T11:55:27.000Z | 2022-03-19T11:55:27.000Z | #!/usr/bin/env python
# coding: utf-8
"""
package.module
~~~~~~~~~~~~~
A description which can be long and explain the complete
functionality of this module even with indented code examples.
Class/Function however should not be documented here.
:copyright: year by my name, see AUTHORS ... | 28.075472 | 91 | 0.653226 |
__author__ = 'Joe Author (joe.author@website.org)'
__copyright__ = 'Copyright (c) 2009-2010 Joe Author'
__license__ = 'New-style BSD'
__vcs_id__ = '$Id$'
__version__ = '1.2.3'
pass
def telefono():
import phonenumbers
from phonenumbers import timezone,geocoder,carrier
PhoneNumber = p... | true | true |
1c1ac9dcbcdee388ae9d9abec2a9be83b84e4a77 | 3,868 | py | Python | configs/hie/resnetV1d34_baseconfig_labelsmooth_value0.3_flair.py | 18152189583/mmclassification-3D | 61bff05e893f123eae4497f7f1904f7447c65899 | [
"Apache-2.0"
] | null | null | null | configs/hie/resnetV1d34_baseconfig_labelsmooth_value0.3_flair.py | 18152189583/mmclassification-3D | 61bff05e893f123eae4497f7f1904f7447c65899 | [
"Apache-2.0"
] | null | null | null | configs/hie/resnetV1d34_baseconfig_labelsmooth_value0.3_flair.py | 18152189583/mmclassification-3D | 61bff05e893f123eae4497f7f1904f7447c65899 | [
"Apache-2.0"
] | null | null | null | # dataset settings
dataset_type = 'Hie_Dataset'
# img_norm_cfg = dict(
# mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromNIIFile'),
dict(type='ExtractDataFromObj'),
dict(type='NormalizeMedical', norm_type='full_volume_mean',
... | 35.814815 | 102 | 0.614271 |
dataset_type = 'Hie_Dataset'
train_pipeline = [
dict(type='LoadImageFromNIIFile'),
dict(type='ExtractDataFromObj'),
dict(type='NormalizeMedical', norm_type='full_volume_mean',
instensity_min_val=0.5,
instensity_max_val=99.5),
dict(type='ResizeMedical', size=(160, 160, 80)),
... | true | true |
1c1ac9fe78a20395bce213414f8f934a86c2c75d | 119 | py | Python | projects/code_combat/9_Kelvintaph_Glacier/491-Razorfray/razorfray.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/code_combat/9_Kelvintaph_Glacier/491-Razorfray/razorfray.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/code_combat/9_Kelvintaph_Glacier/491-Razorfray/razorfray.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | while True:
flag = hero.findFlag()
if flag:
hero.throwPos(flag.pos)
hero.removeFlag(flag)
| 19.833333 | 32 | 0.571429 | while True:
flag = hero.findFlag()
if flag:
hero.throwPos(flag.pos)
hero.removeFlag(flag)
| true | true |
1c1acab5e824d017e24a139034d4e85a2fdde287 | 5,174 | py | Python | container_sdk/model/metadata_center/stream_metrics_schema_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | container_sdk/model/metadata_center/stream_metrics_schema_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | container_sdk/model/metadata_center/stream_metrics_schema_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: stream_metrics_schema.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from googl... | 46.612613 | 584 | 0.78392 |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
_sym_db ... | true | true |
1c1acb34354a4afbcfba03a6b46ca1a4ca548bc8 | 1,443 | py | Python | dissect/analysis/detail.py | crocs-muni/DiSSECT | ecd4f5242ee32804fea0029081026c02dbaabdf6 | [
"MIT"
] | 7 | 2021-06-09T12:46:43.000Z | 2022-02-17T00:46:08.000Z | dissect/analysis/detail.py | crocs-muni/DiSSECT | ecd4f5242ee32804fea0029081026c02dbaabdf6 | [
"MIT"
] | null | null | null | dissect/analysis/detail.py | crocs-muni/DiSSECT | ecd4f5242ee32804fea0029081026c02dbaabdf6 | [
"MIT"
] | 2 | 2021-06-14T17:08:56.000Z | 2021-07-25T21:59:12.000Z | import sys
import pandas as pd
from sklearn.neighbors import NearestNeighbors
if __name__ == "__main__":
if len(sys.argv) != 3:
print(f"USAGE: {sys.argv[0]} <FILE> <CURVE>", file=sys.stderr)
sys.exit(1)
df = pd.read_csv(sys.argv[1], sep=";")
curve = df[df["curve"] == sys.argv[2]]
detai... | 33.55814 | 73 | 0.564796 | import sys
import pandas as pd
from sklearn.neighbors import NearestNeighbors
if __name__ == "__main__":
if len(sys.argv) != 3:
print(f"USAGE: {sys.argv[0]} <FILE> <CURVE>", file=sys.stderr)
sys.exit(1)
df = pd.read_csv(sys.argv[1], sep=";")
curve = df[df["curve"] == sys.argv[2]]
detai... | true | true |
1c1acb989cadb3e3a1fea20f4aad3dd629cbf852 | 18,223 | py | Python | openhtf/output/proto/mfg_event_converter.py | aruxn/openhtf | 4fa142ee2546567605e138098bbd6788f184421b | [
"Apache-2.0"
] | 1 | 2020-09-17T18:12:54.000Z | 2020-09-17T18:12:54.000Z | openhtf/output/proto/mfg_event_converter.py | langxinyuan/openhtf | 4fa142ee2546567605e138098bbd6788f184421b | [
"Apache-2.0"
] | 80 | 2020-09-15T04:44:28.000Z | 2021-03-16T19:26:25.000Z | openhtf/output/proto/mfg_event_converter.py | langxinyuan/openhtf | 4fa142ee2546567605e138098bbd6788f184421b | [
"Apache-2.0"
] | 1 | 2021-11-16T18:30:15.000Z | 2021-11-16T18:30:15.000Z | """Convert a TestRecord into a mfg_event proto for upload to mfg inspector.
Also includes utilities to handle multi-dim conversion into an attachment
and the reverse.
A decision had to be made on how to handle phases, measurements and attachments
with non-unique names. Approach taken is to append a _X to the names.
... | 36.739919 | 80 | 0.739999 |
import collections
import itertools
import json
import logging
import numbers
import os
import sys
from openhtf.core import measurements
from openhtf.core import test_record as htf_test_record
from openhtf.output.proto import mfg_event_pb2
from openhtf.output.proto import test_runs_converter
from openhtf.output.proto... | true | true |
1c1acbfdf41e8470d804a47acbbf729720f32fd4 | 366 | py | Python | high/thread1.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | high/thread1.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | high/thread1.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time,thread
def print_time(threadName,delay):
count = 0
while count<5:
time.sleep(delay)
count+=1
print "%s:%s" %(threadName,time.ctime(time.time()))
try:
thread.start_new_thread(print_time,("thread-1",2,))
thread.start_new_thread(print_time,("thread-2",4,))... | 18.3 | 53 | 0.688525 |
import time,thread
def print_time(threadName,delay):
count = 0
while count<5:
time.sleep(delay)
count+=1
print "%s:%s" %(threadName,time.ctime(time.time()))
try:
thread.start_new_thread(print_time,("thread-1",2,))
thread.start_new_thread(print_time,("thread-2",4,))
except Exception, e:
raise e
while 1:... | false | true |
1c1acc22591b013f2082127105c594acbaf2bfb1 | 22,967 | py | Python | hathor/transaction/resources/transaction.py | khengleng/khathor | 8728c7032e6785eaf560a9592df02856dc97900d | [
"Apache-2.0"
] | null | null | null | hathor/transaction/resources/transaction.py | khengleng/khathor | 8728c7032e6785eaf560a9592df02856dc97900d | [
"Apache-2.0"
] | null | null | null | hathor/transaction/resources/transaction.py | khengleng/khathor | 8728c7032e6785eaf560a9592df02856dc97900d | [
"Apache-2.0"
] | null | null | null | import json
from typing import Any, Dict
from twisted.web import resource
from hathor.api_util import get_missing_params_msg, parse_get_arguments, set_cors, validate_tx_hash
from hathor.cli.openapi_files.register import register_resource
from hathor.conf import HathorSettings
from hathor.transaction.base_transaction ... | 48.762208 | 119 | 0.408978 | import json
from typing import Any, Dict
from twisted.web import resource
from hathor.api_util import get_missing_params_msg, parse_get_arguments, set_cors, validate_tx_hash
from hathor.cli.openapi_files.register import register_resource
from hathor.conf import HathorSettings
from hathor.transaction.base_transaction ... | true | true |
1c1acd43ea4bb266c8295af2da131fb1582ec8d6 | 1,179 | py | Python | pi_mqtt_gpio/modules/beaglebone.py | shbatm/pi-mqtt-gpio | 759f5b2ed6259c4e2437f5025e7f1aa50c549943 | [
"MIT"
] | null | null | null | pi_mqtt_gpio/modules/beaglebone.py | shbatm/pi-mqtt-gpio | 759f5b2ed6259c4e2437f5025e7f1aa50c549943 | [
"MIT"
] | null | null | null | pi_mqtt_gpio/modules/beaglebone.py | shbatm/pi-mqtt-gpio | 759f5b2ed6259c4e2437f5025e7f1aa50c549943 | [
"MIT"
] | 1 | 2021-02-22T07:01:50.000Z | 2021-02-22T07:01:50.000Z | from pi_mqtt_gpio.modules import GenericGPIO, PinDirection, PinPullup
REQUIREMENTS = ("Adafruit_BBIO",)
DIRECTIONS = None
PULLUPS = None
class GPIO(GenericGPIO):
"""
Implementation of GPIO class for Beaglebone native GPIO.
"""
def __init__(self, config):
global DIRECTIONS, PULLUPS
... | 25.085106 | 81 | 0.620865 | from pi_mqtt_gpio.modules import GenericGPIO, PinDirection, PinPullup
REQUIREMENTS = ("Adafruit_BBIO",)
DIRECTIONS = None
PULLUPS = None
class GPIO(GenericGPIO):
def __init__(self, config):
global DIRECTIONS, PULLUPS
import Adafruit_BBIO.GPIO as gpio
self.io = gpio
DIRECTIONS ... | true | true |
1c1acd5e1e3135f2ff18c93d17be45a0a6803841 | 3,447 | py | Python | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request.py | handsome-baby/huaweicloud-sdk-python-v3 | 6cdcf1da8b098427e58fc3335a387c14df7776d0 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class RecognizeVatInvoiceRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and t... | 25.917293 | 77 | 0.561648 |
import pprint
import re
import six
class RecognizeVatInvoiceRequest:
sensitive_list = []
openapi_types = {
'project_id': 'str',
'body': 'RecognizeVatInvoiceRequestBody'
}
attribute_map = {
'project_id': 'project_id',
'body': 'body'
}
def __init__(sel... | true | true |
1c1acd7ebdd6cf9169c2a093424e65302365de7f | 1,108 | py | Python | intro/scipy/examples/plot_curve_fit.py | zmoon/scipy-lecture-notes | 75a89ddedeb48930dbdb6fe25a76e9ef0587ae21 | [
"CC-BY-4.0"
] | 2,538 | 2015-01-01T04:58:41.000Z | 2022-03-31T21:06:05.000Z | intro/scipy/examples/plot_curve_fit.py | zmoon/scipy-lecture-notes | 75a89ddedeb48930dbdb6fe25a76e9ef0587ae21 | [
"CC-BY-4.0"
] | 362 | 2015-01-18T14:16:23.000Z | 2021-11-18T16:24:34.000Z | intro/scipy/examples/plot_curve_fit.py | zmoon/scipy-lecture-notes | 75a89ddedeb48930dbdb6fe25a76e9ef0587ae21 | [
"CC-BY-4.0"
] | 1,127 | 2015-01-05T14:39:29.000Z | 2022-03-25T08:38:39.000Z | """
===============
Curve fitting
===============
Demos a simple curve fitting
"""
############################################################
# First generate some data
import numpy as np
# Seed the random number generator for reproducibility
np.random.seed(0)
x_data = np.linspace(-5, 5, num=50)
y_data = 2.9 * np... | 23.574468 | 73 | 0.540614 | true | true | |
1c1acebb8f8f7593f0c43518b5f4abc7fcbca1ae | 56,195 | py | Python | pandas/io/formats/format.py | javabrett/pandas | 7b92e7ee47fa3024aa5bc4fb3518717157c88dcc | [
"BSD-3-Clause"
] | 1 | 2019-05-25T04:43:01.000Z | 2019-05-25T04:43:01.000Z | pandas/io/formats/format.py | javabrett/pandas | 7b92e7ee47fa3024aa5bc4fb3518717157c88dcc | [
"BSD-3-Clause"
] | null | null | null | pandas/io/formats/format.py | javabrett/pandas | 7b92e7ee47fa3024aa5bc4fb3518717157c88dcc | [
"BSD-3-Clause"
] | 1 | 2019-05-25T04:42:58.000Z | 2019-05-25T04:42:58.000Z | """
Internal module for formatting output data in csv, html,
and latex files. This module also applies to display formatting.
"""
from functools import partial
from io import StringIO
from shutil import get_terminal_size
from unicodedata import east_asian_width
import numpy as np
from pandas._config.config import ge... | 33.934179 | 79 | 0.565282 |
from functools import partial
from io import StringIO
from shutil import get_terminal_size
from unicodedata import east_asian_width
import numpy as np
from pandas._config.config import get_option, set_option
from pandas._libs import lib
from pandas._libs.tslib import format_array_from_datetime
from pandas._libs.tsl... | true | true |
1c1acef3f1a4af0e919c0a57b2f5c8204764ba9a | 23,596 | py | Python | tests/weight_proof/test_weight_proof.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 10 | 2021-08-01T17:15:15.000Z | 2021-09-16T08:04:46.000Z | tests/weight_proof/test_weight_proof.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 8 | 2021-08-06T08:11:13.000Z | 2021-11-03T20:49:37.000Z | tests/weight_proof/test_weight_proof.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 7 | 2021-08-07T06:45:36.000Z | 2022-03-15T08:43:24.000Z | # flake8: noqa: F811, F401
import asyncio
import sys
from typing import Dict, List, Optional, Tuple
import aiosqlite
import pytest
from olive.consensus.block_header_validation import validate_finished_header_block
from olive.consensus.block_record import BlockRecord
from olive.consensus.blockchain import Blockchain
f... | 42.286738 | 120 | 0.698 |
import asyncio
import sys
from typing import Dict, List, Optional, Tuple
import aiosqlite
import pytest
from olive.consensus.block_header_validation import validate_finished_header_block
from olive.consensus.block_record import BlockRecord
from olive.consensus.blockchain import Blockchain
from olive.consensus.defaul... | true | true |
1c1acf12d6164a56e2370b5a0ca0eb8b0cbfc578 | 3,919 | py | Python | ros/src/tl_detector/light_classification/tl_classifier.py | alberto139/CarND-Capstone | 4019ce28f01b0c22255e8cd28445fc18608dc735 | [
"MIT"
] | null | null | null | ros/src/tl_detector/light_classification/tl_classifier.py | alberto139/CarND-Capstone | 4019ce28f01b0c22255e8cd28445fc18608dc735 | [
"MIT"
] | 9 | 2020-09-26T00:50:05.000Z | 2022-03-12T00:20:21.000Z | ros/src/tl_detector/light_classification/tl_classifier.py | alberto139/CarND-Capstone | 4019ce28f01b0c22255e8cd28445fc18608dc735 | [
"MIT"
] | null | null | null | from styx_msgs.msg import TrafficLight
import tensorflow as tf
import numpy as np
import cv2
from collections import Counter
import object_class
import os
class TLClassifier(object):
def __init__(self):
model_path = os.getcwd() + "/light_classification/frozen_inference_graph.pb"
self.conf_threshol... | 39.585859 | 126 | 0.612401 | from styx_msgs.msg import TrafficLight
import tensorflow as tf
import numpy as np
import cv2
from collections import Counter
import object_class
import os
class TLClassifier(object):
def __init__(self):
model_path = os.getcwd() + "/light_classification/frozen_inference_graph.pb"
self.conf_threshol... | true | true |
1c1acf45e675b62c595762a8bcf8d2c8e3ccb2be | 20,893 | py | Python | python-sdk/nuscenes/eval/panoptic/evaluate.py | BAI-Yeqi/nuscenes-devkit | f94dcd313feb8adc91e7d01312fb7d27cc77098e | [
"Apache-2.0"
] | 1,284 | 2018-09-12T14:08:06.000Z | 2022-03-31T08:28:20.000Z | python-sdk/nuscenes/eval/panoptic/evaluate.py | BAI-Yeqi/nuscenes-devkit | f94dcd313feb8adc91e7d01312fb7d27cc77098e | [
"Apache-2.0"
] | 518 | 2018-10-20T08:34:15.000Z | 2022-03-31T08:16:08.000Z | python-sdk/nuscenes/eval/panoptic/evaluate.py | BAI-Yeqi/nuscenes-devkit | f94dcd313feb8adc91e7d01312fb7d27cc77098e | [
"Apache-2.0"
] | 487 | 2018-09-13T20:03:21.000Z | 2022-03-31T04:41:17.000Z | """
Code written by Motional and the Robot Learning Lab, University of Freiburg.
Script to evaluate Panoptic nuScenes panoptic segmentation (PS) or panoptic tracking (PT) metrics.
Argument "task" could be one of ["segmentation", "tracking"], check eval/panoptic/README.md for more details of the
tasks. Note tracking re... | 54.267532 | 119 | 0.600536 | import argparse
import json
import os
from typing import Any, Dict
import numpy as np
from nuscenes.eval.panoptic.panoptic_seg_evaluator import PanopticEval
from nuscenes.eval.panoptic.panoptic_track_evaluator import PanopticTrackingEval
from nuscenes.eval.panoptic.utils import PanopticClassMapper, get_samples_in_pano... | true | true |
1c1ad014a90006337440e656d9e64aba04ccb800 | 9,322 | py | Python | src/adminfilters/filters.py | saxix/django-adminfilters | 14fd8dba6629752e64eccc5bec651eefb2c6c701 | [
"BSD-1-Clause"
] | 17 | 2015-03-03T23:15:31.000Z | 2022-03-02T16:55:18.000Z | src/adminfilters/filters.py | saxix/django-adminfilters | 14fd8dba6629752e64eccc5bec651eefb2c6c701 | [
"BSD-1-Clause"
] | 9 | 2015-11-10T15:30:27.000Z | 2022-02-12T20:55:39.000Z | src/adminfilters/filters.py | saxix/django-adminfilters | 14fd8dba6629752e64eccc5bec651eefb2c6c701 | [
"BSD-1-Clause"
] | 14 | 2015-04-07T13:52:42.000Z | 2022-02-03T17:54:42.000Z | import re
from django.contrib.admin.filters import (AllValuesFieldListFilter,
BooleanFieldListFilter,
ChoicesFieldListFilter,
FieldListFilter,
RelatedF... | 33.898182 | 112 | 0.570264 | import re
from django.contrib.admin.filters import (AllValuesFieldListFilter,
BooleanFieldListFilter,
ChoicesFieldListFilter,
FieldListFilter,
RelatedF... | true | true |
1c1ad2d6fac8f50cef7acf23ba9d5f8ca5030300 | 912 | py | Python | hyperglass/configuration/models/credentials.py | samip5/hyperglass | 270ffecebb765289a4ecc75c774d6f7cc9741f7a | [
"BSD-3-Clause-Clear"
] | null | null | null | hyperglass/configuration/models/credentials.py | samip5/hyperglass | 270ffecebb765289a4ecc75c774d6f7cc9741f7a | [
"BSD-3-Clause-Clear"
] | null | null | null | hyperglass/configuration/models/credentials.py | samip5/hyperglass | 270ffecebb765289a4ecc75c774d6f7cc9741f7a | [
"BSD-3-Clause-Clear"
] | null | null | null | """Validate credential configuration variables."""
# Third Party
from pydantic import SecretStr, StrictStr
# Project
from hyperglass.util import clean_name
from hyperglass.models import HyperglassModel
class Credential(HyperglassModel):
"""Model for per-credential config in devices.yaml."""
username: Stric... | 25.333333 | 60 | 0.674342 |
from pydantic import SecretStr, StrictStr
from hyperglass.util import clean_name
from hyperglass.models import HyperglassModel
class Credential(HyperglassModel):
username: StrictStr
password: SecretStr
class Credentials(HyperglassModel):
@classmethod
def import_params(cls, input_params):
... | true | true |
1c1ad3f869a9348aecf48cc75aa3c6588a1224ca | 8,591 | py | Python | Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/psp/kasperskyES8.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/psp/kasperskyES8.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/psp/kasperskyES8.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z |
import ops.data
import dsz.cmd, dsz.ui, dsz.version.checks.windows
import sqlite3
import os
import re
import datetime
from xml.dom.minidom import parseString
from ops.pprint import pprint
from util.DSZPyLogger import getLogger
from ops.psp import comattribs
kasperskylog = getLogger('Kaspersky')
EMPTY_SIZE = 7168
MAX_S... | 39.408257 | 137 | 0.607031 |
import ops.data
import dsz.cmd, dsz.ui, dsz.version.checks.windows
import sqlite3
import os
import re
import datetime
from xml.dom.minidom import parseString
from ops.pprint import pprint
from util.DSZPyLogger import getLogger
from ops.psp import comattribs
kasperskylog = getLogger('Kaspersky')
EMPTY_SIZE = 7168
MAX_S... | false | true |
1c1ad5f86868a62e321f3ff0f199897dd2182e9f | 4,513 | py | Python | mermer/pools/pool_wallet_info.py | sumilying/mermer-chain | a493e56c3aca6cef341aff0eae04f5e52bc55f09 | [
"Apache-2.0"
] | 2 | 2021-11-12T13:32:35.000Z | 2021-11-16T08:47:28.000Z | mermer/pools/pool_wallet_info.py | sumilying/mermer-blockchain | a493e56c3aca6cef341aff0eae04f5e52bc55f09 | [
"Apache-2.0"
] | null | null | null | mermer/pools/pool_wallet_info.py | sumilying/mermer-blockchain | a493e56c3aca6cef341aff0eae04f5e52bc55f09 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from enum import IntEnum
from typing import Optional, Dict
from blspy import G1Element
from mermer.protocols.pool_protocol import POOL_PROTOCOL_VERSION
from mermer.types.blockchain_format.coin import Coin
from mermer.types.blockchain_format.program import Program
from mermer.types.bl... | 38.905172 | 117 | 0.758476 | from dataclasses import dataclass
from enum import IntEnum
from typing import Optional, Dict
from blspy import G1Element
from mermer.protocols.pool_protocol import POOL_PROTOCOL_VERSION
from mermer.types.blockchain_format.coin import Coin
from mermer.types.blockchain_format.program import Program
from mermer.types.bl... | true | true |
1c1ad66ea40d6993e4bd12d1c1bbac3c1c5f875c | 23,318 | py | Python | server/api/project_admin_api.py | DerekBev/tasking-manager | 6473ba28d0834ee82c9463c254a8b759c9566622 | [
"BSD-2-Clause"
] | 2 | 2019-07-15T19:18:58.000Z | 2020-09-02T18:11:30.000Z | server/api/project_admin_api.py | DerekBev/tasking-manager | 6473ba28d0834ee82c9463c254a8b759c9566622 | [
"BSD-2-Clause"
] | 28 | 2019-01-04T17:39:00.000Z | 2021-05-06T23:06:24.000Z | server/api/project_admin_api.py | DerekBev/tasking-manager | 6473ba28d0834ee82c9463c254a8b759c9566622 | [
"BSD-2-Clause"
] | 3 | 2020-02-29T20:46:09.000Z | 2020-11-20T19:44:04.000Z | from flask_restful import Resource, request, current_app
from schematics.exceptions import DataError
from server.models.dtos.project_dto import DraftProjectDTO, ProjectDTO
from server.services.project_admin_service import ProjectAdminService, InvalidGeoJson, InvalidData, \
ProjectAdminServiceError, NotFound
from s... | 34.443131 | 120 | 0.485205 | from flask_restful import Resource, request, current_app
from schematics.exceptions import DataError
from server.models.dtos.project_dto import DraftProjectDTO, ProjectDTO
from server.services.project_admin_service import ProjectAdminService, InvalidGeoJson, InvalidData, \
ProjectAdminServiceError, NotFound
from s... | true | true |
1c1ad6818c0e2cd46a32557940e774af0caac6ac | 994 | py | Python | scripts/arbitrum_tree_vest.py | Badger-Finance/python-keepers | b5b2b0b083a237dceecd161d81754512959822b1 | [
"MIT"
] | null | null | null | scripts/arbitrum_tree_vest.py | Badger-Finance/python-keepers | b5b2b0b083a237dceecd161d81754512959822b1 | [
"MIT"
] | 22 | 2022-03-08T19:30:45.000Z | 2022-03-28T21:14:15.000Z | scripts/arbitrum_tree_vest.py | Badger-Finance/python-keepers | b5b2b0b083a237dceecd161d81754512959822b1 | [
"MIT"
] | null | null | null | import logging
from config.constants import ARB_ETH_USD_CHAINLINK, ARB_VESTER_Q2_22
from config.enums import Network
from src.utils import get_healthy_node
from src.vester import Vester
from src.aws import get_secret
logging.basicConfig(level=logging.INFO)
if __name__ == "__main__":
logger = logging.getLogger(... | 28.4 | 83 | 0.726358 | import logging
from config.constants import ARB_ETH_USD_CHAINLINK, ARB_VESTER_Q2_22
from config.enums import Network
from src.utils import get_healthy_node
from src.vester import Vester
from src.aws import get_secret
logging.basicConfig(level=logging.INFO)
if __name__ == "__main__":
logger = logging.getLogger(... | true | true |
1c1ad809b2d8bf502e21c3073650154082e1eee1 | 8,163 | py | Python | mmpose/datasets/datasets/animal/animal_fly_dataset.py | rubeea/pl_mmpose | 3b3643c66db636e8f743d0ac8f8fc14b0d5662fc | [
"Apache-2.0"
] | null | null | null | mmpose/datasets/datasets/animal/animal_fly_dataset.py | rubeea/pl_mmpose | 3b3643c66db636e8f743d0ac8f8fc14b0d5662fc | [
"Apache-2.0"
] | null | null | null | mmpose/datasets/datasets/animal/animal_fly_dataset.py | rubeea/pl_mmpose | 3b3643c66db636e8f743d0ac8f8fc14b0d5662fc | [
"Apache-2.0"
] | null | null | null | import os
from collections import OrderedDict
import json_tricks as json
import numpy as np
from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe,
keypoint_pck_accuracy)
from ...builder import DATASETS
from .animal_base_dataset import AnimalBase... | 36.441964 | 80 | 0.529462 | import os
from collections import OrderedDict
import json_tricks as json
import numpy as np
from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe,
keypoint_pck_accuracy)
from ...builder import DATASETS
from .animal_base_dataset import AnimalBase... | true | true |
1c1ad9c007e9abe5ff5b3ee32ea845662e414768 | 35,000 | py | Python | python/pyspark/pandas/utils.py | kyoty/spark | 4a4f207f4215d56f126c2474fd7a94f427937a2f | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 4 | 2020-07-30T02:37:20.000Z | 2021-03-20T11:36:46.000Z | python/pyspark/pandas/utils.py | kyoty/spark | 4a4f207f4215d56f126c2474fd7a94f427937a2f | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 8 | 2021-06-04T18:51:25.000Z | 2022-03-27T18:28:06.000Z | python/pyspark/pandas/utils.py | kyoty/spark | 4a4f207f4215d56f126c2474fd7a94f427937a2f | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 4 | 2015-11-15T15:54:38.000Z | 2020-10-19T12:32:04.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 us... | 35.140562 | 100 | 0.623714 |
import functools
from collections import OrderedDict
from contextlib import contextmanager
import os
from typing import (
Any,
Callable,
Dict,
Iterator,
List,
Optional,
Tuple,
Union,
TYPE_CHECKING,
cast,
no_type_check,
overload,
)
import warnings
from py... | true | true |
1c1ada28dcccb0cbd1685cecd6e0ba1b9a3ce2fa | 3,715 | py | Python | auxiliary/evaluations.py | syinari0123/tridepth | 5e7e90b537b82e731bb6beac1c8c93fc9187fee0 | [
"MIT"
] | 81 | 2019-10-27T13:50:52.000Z | 2022-02-22T18:15:45.000Z | auxiliary/evaluations.py | syinari0123/tridepth | 5e7e90b537b82e731bb6beac1c8c93fc9187fee0 | [
"MIT"
] | 10 | 2019-11-21T09:56:59.000Z | 2022-03-12T00:03:55.000Z | auxiliary/evaluations.py | syinari0123/tridepth | 5e7e90b537b82e731bb6beac1c8c93fc9187fee0 | [
"MIT"
] | 9 | 2019-11-16T04:02:47.000Z | 2021-05-27T06:40:44.000Z | import csv
import math
import numpy as np
import torch
from auxiliary import AverageMeter
worst_scores = {
"mse": np.inf, "rmse": np.inf, "mae": np.inf,
"lg10": np.inf, "absrel": np.inf,
"irmse": np.inf, "imae": np.inf,
"delta1": 0., "delta2": 0., "dealta3": 0.
}
class EvalResultWriter:
def __in... | 32.876106 | 100 | 0.623149 | import csv
import math
import numpy as np
import torch
from auxiliary import AverageMeter
worst_scores = {
"mse": np.inf, "rmse": np.inf, "mae": np.inf,
"lg10": np.inf, "absrel": np.inf,
"irmse": np.inf, "imae": np.inf,
"delta1": 0., "delta2": 0., "dealta3": 0.
}
class EvalResultWriter:
def __in... | true | true |
1c1adacf3bd211b7405f416dd6f630622e73453b | 1,063 | py | Python | TrabajoFinal/PortadoraVariableModuladaFija/AM/TvsFrqRate-AM-pawn50.py | P1R/cinves | 8251acfa00a9a26d9b0665e1897316b6664fb9bb | [
"Apache-2.0"
] | null | null | null | TrabajoFinal/PortadoraVariableModuladaFija/AM/TvsFrqRate-AM-pawn50.py | P1R/cinves | 8251acfa00a9a26d9b0665e1897316b6664fb9bb | [
"Apache-2.0"
] | null | null | null | TrabajoFinal/PortadoraVariableModuladaFija/AM/TvsFrqRate-AM-pawn50.py | P1R/cinves | 8251acfa00a9a26d9b0665e1897316b6664fb9bb | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
'''
La Frecuencia Base es de 50 Hz y las variaciones en frecuencia de rate de 30 a 200
este ejemplo es con un pawn de 50% en AM.
para este experimento los valores son:
tiempo de medicion: 2 minutos
voltaje de generador: 0.3 volts
tubo de prueba: cobre 350 cm
SIN... | 32.212121 | 82 | 0.677328 | import numpy as np
import matplotlib.pyplot as plt
Freq=np.array([30,40,50,60,70,80,90,100,200])
DeltaTemp=np.array([2.2,1.9,2.0,2.0,2.7,2.6,2.7,2.8,2.6])
TempT1=np.array([21.2,21.5,21.5,21.5,21.1,21.1,21.1,21.0,21.2])
TempT2=np.array([23.4,23.4,23.5,23.5,23.8,23.7,23.8,23.8,23.8])
TempAmb=np.array([22.4,22.4,22.4,22.4... | true | true |
1c1ade1e3fceb068e3dfaaab9de4d575dfa4372d | 5,279 | py | Python | ml-clustering-and-retrieval/week-4/em_utilities.py | zomansud/machine-learning-specialization | 8b63eda4194241edc0c493fb74ca6834c9d0792d | [
"MIT"
] | 1 | 2020-12-26T12:06:37.000Z | 2020-12-26T12:06:37.000Z | ml-clustering-and-retrieval/week-4/em_utilities.py | zomansud/machine-learning-specialization | 8b63eda4194241edc0c493fb74ca6834c9d0792d | [
"MIT"
] | null | null | null | ml-clustering-and-retrieval/week-4/em_utilities.py | zomansud/machine-learning-specialization | 8b63eda4194241edc0c493fb74ca6834c9d0792d | [
"MIT"
] | 1 | 2021-08-10T20:05:24.000Z | 2021-08-10T20:05:24.000Z | from scipy.sparse import csr_matrix
from scipy.sparse import spdiags
from scipy.stats import multivariate_normal
import graphlab
import numpy as np
import sys
import time
from copy import deepcopy
from sklearn.metrics import pairwise_distances
from sklearn.preprocessing import normalize
def sframe_to_scipy(x, column_n... | 38.532847 | 120 | 0.641978 | from scipy.sparse import csr_matrix
from scipy.sparse import spdiags
from scipy.stats import multivariate_normal
import graphlab
import numpy as np
import sys
import time
from copy import deepcopy
from sklearn.metrics import pairwise_distances
from sklearn.preprocessing import normalize
def sframe_to_scipy(x, column_n... | true | true |
1c1adf82adbd3ec24ed1ad8f0feea5c77edb3ed0 | 4,813 | py | Python | web/directory/models.py | stepsbystep/maps | 39d1e43d46b47a19290b8868d503fe28bc54050c | [
"MIT"
] | 1 | 2021-07-21T00:38:14.000Z | 2021-07-21T00:38:14.000Z | web/directory/models.py | stepsbystep/maps | 39d1e43d46b47a19290b8868d503fe28bc54050c | [
"MIT"
] | 103 | 2020-02-13T18:42:37.000Z | 2022-03-31T22:38:53.000Z | web/directory/models.py | stepsbystep/maps | 39d1e43d46b47a19290b8868d503fe28bc54050c | [
"MIT"
] | 20 | 2020-03-10T22:10:56.000Z | 2021-11-18T22:27:06.000Z | from django.db import models
from django.db.models import Q
from django.utils.translation import gettext_lazy as _
from address.models import Address
from phonenumber_field.modelfields import PhoneNumberField
from address.models import State, Country, Locality
class ContactMethod(models.Model):
class ContactType... | 31.874172 | 111 | 0.654893 | from django.db import models
from django.db.models import Q
from django.utils.translation import gettext_lazy as _
from address.models import Address
from phonenumber_field.modelfields import PhoneNumberField
from address.models import State, Country, Locality
class ContactMethod(models.Model):
class ContactType... | true | true |
1c1adfc253842824087c97bfc0ff404906076ece | 6,866 | py | Python | src/ebay_rest/api/buy_browse/models/ship_to_location.py | matecsaj/ebay_rest | dd23236f39e05636eff222f99df1e3699ce47d4a | [
"MIT"
] | 3 | 2021-12-12T04:28:03.000Z | 2022-03-10T03:29:18.000Z | src/ebay_rest/api/buy_browse/models/ship_to_location.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 33 | 2021-06-16T20:44:36.000Z | 2022-03-30T14:55:06.000Z | src/ebay_rest/api/buy_browse/models/ship_to_location.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 7 | 2021-06-03T09:30:23.000Z | 2022-03-08T19:51:33.000Z | # coding: utf-8
"""
Browse API
<p>The Browse API has the following resources:</p> <ul> <li><b> item_summary: </b> Lets shoppers search for specific items by keyword, GTIN, category, charity, product, or item aspects and refine the results by using filters, such as aspects, compatibility, and fields values.<... | 48.695035 | 2,332 | 0.638217 |
import pprint
import re
import six
class ShipToLocation(object):
swagger_types = {
'country': 'str',
'postal_code': 'str'
}
attribute_map = {
'country': 'country',
'postal_code': 'postalCode'
}
def __init__(self, country=None, postal_code=None):
sel... | true | true |
1c1adfea88eaf8b335d3fb118303cde1465e3627 | 4,451 | py | Python | maskrcnn_benchmark/engine/bbox_aug.py | cxq1/paddle_VinVL | f9136871c43b033cd209ddc7579fa986208e37db | [
"MIT"
] | null | null | null | maskrcnn_benchmark/engine/bbox_aug.py | cxq1/paddle_VinVL | f9136871c43b033cd209ddc7579fa986208e37db | [
"MIT"
] | null | null | null | maskrcnn_benchmark/engine/bbox_aug.py | cxq1/paddle_VinVL | f9136871c43b033cd209ddc7579fa986208e37db | [
"MIT"
] | null | null | null | import paddle
import paddle.vision.transforms as TT
from maskrcnn_benchmark.config import cfg
from maskrcnn_benchmark.data import transforms as T
from maskrcnn_benchmark.structures.image_list import to_image_list
from maskrcnn_benchmark.structures.bounding_box import BoxList
from maskrcnn_benchmark.modeling.roi_heads.... | 37.403361 | 98 | 0.696697 | import paddle
import paddle.vision.transforms as TT
from maskrcnn_benchmark.config import cfg
from maskrcnn_benchmark.data import transforms as T
from maskrcnn_benchmark.structures.image_list import to_image_list
from maskrcnn_benchmark.structures.bounding_box import BoxList
from maskrcnn_benchmark.modeling.roi_heads.... | true | true |
1c1ae052e8155f8f0f4ecca204829434f498f1db | 601 | py | Python | backend/fief/services/email/__init__.py | fief-dev/fief | cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1 | [
"MIT"
] | 1 | 2022-02-13T17:39:42.000Z | 2022-02-13T17:39:42.000Z | backend/fief/services/email/__init__.py | fief-dev/fief | cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1 | [
"MIT"
] | 1 | 2022-02-13T14:46:24.000Z | 2022-02-13T14:46:24.000Z | backend/fief/services/email/__init__.py | fief-dev/fief | cbfeec11da7a03aa345cb7ceb088b5d8ec9d6ab1 | [
"MIT"
] | null | null | null | from enum import Enum
from typing import Dict, Type
from fief.services.email.base import EmailError, EmailProvider, SendEmailError
from fief.services.email.null import Null
from fief.services.email.postmark import Postmark
class AvailableEmailProvider(str, Enum):
NULL = "NULL"
POSTMARK = "POSTMARK"
EMAIL_P... | 23.115385 | 78 | 0.753744 | from enum import Enum
from typing import Dict, Type
from fief.services.email.base import EmailError, EmailProvider, SendEmailError
from fief.services.email.null import Null
from fief.services.email.postmark import Postmark
class AvailableEmailProvider(str, Enum):
NULL = "NULL"
POSTMARK = "POSTMARK"
EMAIL_P... | true | true |
1c1ae09f138730bd9019191ed16b5ff645d7ecf6 | 1,240 | py | Python | env/lib/python2.7/site-packages/twilio/rest/video/__init__.py | jlwysf/onduty | 20d90583a6996d037912af08eb29a6d6fa06bf66 | [
"MIT"
] | 2 | 2020-01-26T15:09:48.000Z | 2020-05-10T05:31:05.000Z | env/lib/python2.7/site-packages/twilio/rest/video/__init__.py | jlwysf/onduty | 20d90583a6996d037912af08eb29a6d6fa06bf66 | [
"MIT"
] | 10 | 2020-06-06T01:10:07.000Z | 2022-03-12T00:12:22.000Z | env/lib/python2.7/site-packages/twilio/rest/video/__init__.py | jlwysf/onduty | 20d90583a6996d037912af08eb29a6d6fa06bf66 | [
"MIT"
] | 1 | 2018-12-09T00:53:21.000Z | 2018-12-09T00:53:21.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base.domain import Domain
from twilio.rest.video.v1 import V1
class Video(Domain):
def __init__(self, twilio):
"""
Initialize the Video Domain
:returns: Dom... | 20.327869 | 60 | 0.535484 |
from twilio.base.domain import Domain
from twilio.rest.video.v1 import V1
class Video(Domain):
def __init__(self, twilio):
super(Video, self).__init__(twilio)
self.base_url = 'https://video.twilio.com'
self._v1 = None
@property
def v1(self):
if self._v1 is No... | true | true |
1c1ae1caaa227882ef3d3abf0bd8d5d6093e6557 | 556 | py | Python | services/migrations/0004_post_profile_uuid.py | City-of-Helsinki/opencity-profile | a430b562b9937f443d391475fabdc27068b95c49 | [
"MIT"
] | null | null | null | services/migrations/0004_post_profile_uuid.py | City-of-Helsinki/opencity-profile | a430b562b9937f443d391475fabdc27068b95c49 | [
"MIT"
] | null | null | null | services/migrations/0004_post_profile_uuid.py | City-of-Helsinki/opencity-profile | a430b562b9937f443d391475fabdc27068b95c49 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-11-05 15:56
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("services", "0003_pre_profile_uuid"),
("profiles", "0010_switch_profile_to_uuid"),
]
operations = [
... | 24.173913 | 82 | 0.609712 |
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("services", "0003_pre_profile_uuid"),
("profiles", "0010_switch_profile_to_uuid"),
]
operations = [
migrations.AlterField(
model_name="... | true | true |
1c1ae1f61082513461e07a626fa234e4cff50d1a | 4,002 | py | Python | chainer/functions/array/permutate.py | houzhenzhen/chainer | 642cb7470f7b3d03e3aea36aa6cf3e614309f2d9 | [
"MIT"
] | null | null | null | chainer/functions/array/permutate.py | houzhenzhen/chainer | 642cb7470f7b3d03e3aea36aa6cf3e614309f2d9 | [
"MIT"
] | null | null | null | chainer/functions/array/permutate.py | houzhenzhen/chainer | 642cb7470f7b3d03e3aea36aa6cf3e614309f2d9 | [
"MIT"
] | 1 | 2018-08-23T01:34:57.000Z | 2018-08-23T01:34:57.000Z | import numpy
import six
import chainer
from chainer import cuda
from chainer import function
from chainer.utils import type_check
def _check_indices(indices):
if len(indices) == 0:
return
# TODO(unno): Check indices without cpu
indices = cuda.to_cpu(indices)
for i in indices:
if 0 <= ... | 29.426471 | 78 | 0.535982 | import numpy
import six
import chainer
from chainer import cuda
from chainer import function
from chainer.utils import type_check
def _check_indices(indices):
if len(indices) == 0:
return
indices = cuda.to_cpu(indices)
for i in indices:
if 0 <= i < len(indices):
continue
... | true | true |
1c1ae289ba7e594b961982d6cded9cca6fab03c1 | 26 | py | Python | test/__init__.py | janschumann/autoscaling-lifecycle | a45096d011e3cb83f3ac83d3f3e8eca545469f9a | [
"MIT"
] | 2 | 2020-07-27T02:11:47.000Z | 2020-09-08T16:23:23.000Z | test/__init__.py | janschumann/autoscaling-lifecycle | a45096d011e3cb83f3ac83d3f3e8eca545469f9a | [
"MIT"
] | null | null | null | test/__init__.py | janschumann/autoscaling-lifecycle | a45096d011e3cb83f3ac83d3f3e8eca545469f9a | [
"MIT"
] | null | null | null | name = "AutoscalingTests"
| 13 | 25 | 0.769231 | name = "AutoscalingTests"
| true | true |
1c1ae2a4bd63aa8d5cec43c4e1f51fd27ec97b71 | 17,975 | py | Python | service/deploy.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | service/deploy.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | service/deploy.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | """
Deploy methods for Atmosphere
"""
import os
import re
from django.template import Context
from django.template.loader import render_to_string
from django.utils.text import slugify
from django.utils.timezone import datetime
from libcloud.compute.deployment import ScriptDeployment
import subspace
from subspace.run... | 34.700772 | 141 | 0.656245 | import os
import re
from django.template import Context
from django.template.loader import render_to_string
from django.utils.text import slugify
from django.utils.timezone import datetime
from libcloud.compute.deployment import ScriptDeployment
import subspace
from subspace.runner import Runner
from threepio impor... | true | true |
1c1ae2f1b4cc36fc96145f115880d23c3ad38279 | 569 | py | Python | tornado_demo/web2py/gluon/contrib/plural_rules/nl.py | ls-2018/tips | 1f5f5195d7181b5dd4616db02166f7f92c97f1cd | [
"MIT"
] | 2 | 2019-05-07T03:08:25.000Z | 2020-05-22T10:10:00.000Z | tornado_demo/web2py/gluon/contrib/plural_rules/nl.py | ls-2018/tips | 1f5f5195d7181b5dd4616db02166f7f92c97f1cd | [
"MIT"
] | 7 | 2020-05-22T13:29:42.000Z | 2021-09-23T23:30:25.000Z | tornado_demo/web2py/gluon/contrib/plural_rules/nl.py | ls-2018/py | 1f5f5195d7181b5dd4616db02166f7f92c97f1cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
# Plural-Forms for nl (Dutch (Netherlands))
nplurals = 2 # Dutch has 2 forms:
# 1 singular and 1 plural
# Determine plural_id for number *n* as sequence of positive
# integers: 0,1,...
# NOTE! For singular form ALWAYS return plural_id = 0
get_plural_id = lambda n: int(n !... | 33.470588 | 67 | 0.71529 |
nplurals = 2
get_plural_id = lambda n: int(n != 1)
| true | true |
1c1ae3c78150b0ab7e41bfa1933015f99f1ab577 | 87 | py | Python | make_queue/views/quota/__init__.py | MAKENTNU/web | 7a5b512bf4c087d1561cdb623d7df4b3d04811a2 | [
"MIT"
] | 10 | 2017-11-25T01:47:20.000Z | 2020-03-24T18:28:24.000Z | make_queue/views/quota/__init__.py | MAKENTNU/web | 7a5b512bf4c087d1561cdb623d7df4b3d04811a2 | [
"MIT"
] | 319 | 2017-11-16T09:56:03.000Z | 2022-03-28T00:24:37.000Z | make_queue/views/quota/__init__.py | MAKENTNU/web | 7a5b512bf4c087d1561cdb623d7df4b3d04811a2 | [
"MIT"
] | 6 | 2017-11-12T14:04:08.000Z | 2021-03-10T09:41:18.000Z | __all__ = ["user"]
for _import in __all__:
__import__(f"{__package__}.{_import}")
| 17.4 | 42 | 0.678161 | __all__ = ["user"]
for _import in __all__:
__import__(f"{__package__}.{_import}")
| true | true |
1c1ae41be6f59a3a9fa5659a3b313cc30d48cae1 | 13,635 | py | Python | test/functional/feature_dbcrash.py | rishabhworking/kringleprojectcoin | 8bb8b0f038f12d1e6ccd7e0aedfcef3c51387fc0 | [
"MIT"
] | null | null | null | test/functional/feature_dbcrash.py | rishabhworking/kringleprojectcoin | 8bb8b0f038f12d1e6ccd7e0aedfcef3c51387fc0 | [
"MIT"
] | null | null | null | test/functional/feature_dbcrash.py | rishabhworking/kringleprojectcoin | 8bb8b0f038f12d1e6ccd7e0aedfcef3c51387fc0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Copyright (c) 2017 The Raven Core developers
# Copyright (c) 2018 The Rito Core developers
# Copyright (c) 2020 The KringleProjectCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www... | 47.674825 | 120 | 0.643124 |
import errno
import http.client
import random
import sys
import time
from test_framework.mininode import *
from test_framework.script import *
from test_framework.test_framework import KringleProjectCoinTestFramework
from test_framework.util import *
HTTP_DISCONNECT_ERRORS = [http.client.CannotSendRequest]
tr... | true | true |
1c1ae53447e1b1b60e52b13d37fbfd51584be6b1 | 3,018 | py | Python | python/kfserving/test/test_server.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2020-10-06T09:20:22.000Z | 2022-01-18T15:04:57.000Z | python/kfserving/test/test_server.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 15 | 2020-11-13T19:05:44.000Z | 2022-03-12T00:49:45.000Z | python/kfserving/test/test_server.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2020-09-01T23:55:04.000Z | 2021-02-08T18:31:12.000Z | # Copyright 2020 kubeflow.org.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 35.928571 | 80 | 0.637508 |
import pytest
import kfserving
from tornado.httpclient import HTTPClientError
class DummyModel(kfserving.KFModel):
def __init__(self, name):
super().__init__(name)
self.name = name
self.ready = False
def load(self):
self.ready = True
def predict(self, reques... | true | true |
1c1ae6000a03d8fab43c7a27176eaa89e980eac4 | 24,153 | py | Python | pkgs/numba-0.24.0-np110py27_0/lib/python2.7/site-packages/numba/npyufunc/wrappers.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/numba-0.24.0-np110py27_0/lib/python2.7/site-packages/numba/npyufunc/wrappers.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/numba-0.24.0-np110py27_0/lib/python2.7/site-packages/numba/npyufunc/wrappers.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
import numpy as np
from llvmlite.llvmpy.core import (Type, Builder, LINKAGE_INTERNAL,
ICMP_EQ, Constant)
from numba import types, cgutils
def _build_ufunc_loop_body(load, store, context, func, builder, arrays, out,
... | 37.621495 | 87 | 0.578437 | from __future__ import print_function, division, absolute_import
import numpy as np
from llvmlite.llvmpy.core import (Type, Builder, LINKAGE_INTERNAL,
ICMP_EQ, Constant)
from numba import types, cgutils
def _build_ufunc_loop_body(load, store, context, func, builder, arrays, out,
... | true | true |
1c1ae674da66eb52dc12ddeadf68bf173d9fc106 | 478 | py | Python | JetMETCorrections/Type1MET/python/pfMETmultShiftCorrectionsDB_cfi.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | JetMETCorrections/Type1MET/python/pfMETmultShiftCorrectionsDB_cfi.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 8 | 2020-03-20T23:18:36.000Z | 2020-05-27T11:00:06.000Z | JetMETCorrections/Type1MET/python/pfMETmultShiftCorrectionsDB_cfi.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
# Using DB for miniAOD
pfMEtMultShiftCorrDB = cms.EDProducer("MultShiftMETcorrDBInputProducer",
srcPFlow = cms.InputTag('packedPFCandidates', ''),
vertexCollection = cms.InputTag('offlineSlimmedPrimaryVertices'),
isData = cms.bool(False),
payloadName = cms.strin... | 39.833333 | 133 | 0.728033 | import FWCore.ParameterSet.Config as cms
pfMEtMultShiftCorrDB = cms.EDProducer("MultShiftMETcorrDBInputProducer",
srcPFlow = cms.InputTag('packedPFCandidates', ''),
vertexCollection = cms.InputTag('offlineSlimmedPrimaryVertices'),
isData = cms.bool(False),
payloadName = cms.string('PfType1Met'),
| true | true |
1c1ae6cbef15397119957ec12fe232d3cc532ee9 | 4,253 | py | Python | app/lib/Client.py | jnorth/cybergoose | dfb6c7a9b268508f74da8fde4d0697daf33fb7a0 | [
"MIT"
] | null | null | null | app/lib/Client.py | jnorth/cybergoose | dfb6c7a9b268508f74da8fde4d0697daf33fb7a0 | [
"MIT"
] | null | null | null | app/lib/Client.py | jnorth/cybergoose | dfb6c7a9b268508f74da8fde4d0697daf33fb7a0 | [
"MIT"
] | null | null | null | import os
import stat
import paramiko
from math import ceil
from .Resource import Resource
class Client:
def __init__(self, bookmark):
self.bookmark = bookmark
self.transport = None
self.sftp = None
def get_bookmark(self):
return self.bookmark
def is_open(self):
return self.transport and s... | 29.130137 | 104 | 0.653656 | import os
import stat
import paramiko
from math import ceil
from .Resource import Resource
class Client:
def __init__(self, bookmark):
self.bookmark = bookmark
self.transport = None
self.sftp = None
def get_bookmark(self):
return self.bookmark
def is_open(self):
return self.transport and s... | true | true |
1c1ae77bf6437e5bfd1eb04548caa4543729b66b | 602 | py | Python | weather_logger.py | MedadRufus/ivy | 18f7a753080639147a69693d4ed5dbf5fc5797eb | [
"MIT"
] | null | null | null | weather_logger.py | MedadRufus/ivy | 18f7a753080639147a69693d4ed5dbf5fc5797eb | [
"MIT"
] | null | null | null | weather_logger.py | MedadRufus/ivy | 18f7a753080639147a69693d4ed5dbf5fc5797eb | [
"MIT"
] | 1 | 2021-05-15T22:02:49.000Z | 2021-05-15T22:02:49.000Z | import requests
texas_woeid = "2512937"
def run():
conn = requests.get("https://www.metaweather.com/api/location/{0}/".format(texas_woeid)).json()
print(conn)
bbc_weather = conn["consolidated_weather"][0]["weather_state_name"]
temp = conn["consolidated_weather"]
logger.info("consolidate weather"... | 22.296296 | 99 | 0.704319 | import requests
texas_woeid = "2512937"
def run():
conn = requests.get("https://www.metaweather.com/api/location/{0}/".format(texas_woeid)).json()
print(conn)
bbc_weather = conn["consolidated_weather"][0]["weather_state_name"]
temp = conn["consolidated_weather"]
logger.info("consolidate weather"... | true | true |
1c1ae9852d95f99d19ac7e6f8f9a443b0644a28d | 275 | py | Python | marquez_codegen_client/api/__init__.py | ashulmanWeWork/marquez-python-client-codegen | 99f30c78156a5643525dbf6ad4a9ffef329ead10 | [
"Apache-2.0"
] | null | null | null | marquez_codegen_client/api/__init__.py | ashulmanWeWork/marquez-python-client-codegen | 99f30c78156a5643525dbf6ad4a9ffef329ead10 | [
"Apache-2.0"
] | null | null | null | marquez_codegen_client/api/__init__.py | ashulmanWeWork/marquez-python-client-codegen | 99f30c78156a5643525dbf6ad4a9ffef329ead10 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from marquez_codegen_client.api.datasets_api import DatasetsApi
from marquez_codegen_client.api.jobs_api import JobsApi
from marquez_codegen_client.api.namespaces_api import NamespacesApi
| 30.555556 | 67 | 0.869091 | from __future__ import absolute_import
from marquez_codegen_client.api.datasets_api import DatasetsApi
from marquez_codegen_client.api.jobs_api import JobsApi
from marquez_codegen_client.api.namespaces_api import NamespacesApi
| true | true |
1c1aea140c05637f18e224c9fc687775b7dd51d8 | 884 | py | Python | pyhammer/tasks/helpers/msziptask.py | webbers/pyhammer | 84efafed65ab05c071a55944b91343b9fd1ef58e | [
"MIT"
] | 2 | 2015-07-06T15:57:33.000Z | 2016-09-10T11:46:24.000Z | pyhammer/tasks/helpers/msziptask.py | webbers/pyhammer | 84efafed65ab05c071a55944b91343b9fd1ef58e | [
"MIT"
] | null | null | null | pyhammer/tasks/helpers/msziptask.py | webbers/pyhammer | 84efafed65ab05c071a55944b91343b9fd1ef58e | [
"MIT"
] | null | null | null | import os
from os.path import curdir
import zipfile
import shutil
from pyhammer.tasks.taskbase import TaskBase
from pyhammer.filters.filefilter import FileFilter
from pyhammer.utils import execProg
class ZipTask(TaskBase):
__zf = []
__zipName = []
__dirName = []
__mode = []
def __init__(self, zipn... | 28.516129 | 85 | 0.647059 | import os
from os.path import curdir
import zipfile
import shutil
from pyhammer.tasks.taskbase import TaskBase
from pyhammer.filters.filefilter import FileFilter
from pyhammer.utils import execProg
class ZipTask(TaskBase):
__zf = []
__zipName = []
__dirName = []
__mode = []
def __init__(self, zipn... | true | true |
1c1aebb2a18a7c90ef83e601b9b71924e1c2d814 | 2,070 | py | Python | examples/ad_manager/v202008/custom_field_service/create_custom_fields.py | bx2/googleads-python-lib | 72481b1dd05266a760034ef853596e014cc48805 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202008/custom_field_service/create_custom_fields.py | bx2/googleads-python-lib | 72481b1dd05266a760034ef853596e014cc48805 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202008/custom_field_service/create_custom_fields.py | bx2/googleads-python-lib | 72481b1dd05266a760034ef853596e014cc48805 | [
"Apache-2.0"
] | 1 | 2021-06-23T09:15:34.000Z | 2021-06-23T09:15:34.000Z | #!/usr/bin/env python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 30.895522 | 77 | 0.70628 |
import uuid
from googleads import ad_manager
def main(client):
custom_field_service = client.GetService(
'CustomFieldService', version='v202008')
custom_fields = [
{
'name': 'Customer comments #%s' % uuid.uuid4(),
'entityType': 'LINE_ITEM',
'dat... | true | true |
1c1aec4578d1d90643f2e4da0977646086807baf | 260 | py | Python | lectures/chapter3/evenOrOdd.py | arongas/python-examples | 6a7c7923a048dde04b3472fd06381ab218ed2bc9 | [
"Unlicense"
] | null | null | null | lectures/chapter3/evenOrOdd.py | arongas/python-examples | 6a7c7923a048dde04b3472fd06381ab218ed2bc9 | [
"Unlicense"
] | null | null | null | lectures/chapter3/evenOrOdd.py | arongas/python-examples | 6a7c7923a048dde04b3472fd06381ab218ed2bc9 | [
"Unlicense"
] | null | null | null | # 🚨 Don't change the code below 👇
number = int(input("Which number do you want to check? "))
# 🚨 Don't change the code above 👆
#Write your code below this line 👇
if number%2==0:
print("This is an even number.")
else:
print("This is an odd number.")
| 21.666667 | 58 | 0.653846 |
number = int(input("Which number do you want to check? "))
# 🚨 Don't change the code above 👆
if number%2==0:
print("This is an even number.")
else:
print("This is an odd number.")
| true | true |
1c1aec6c72b8b1c31088f33ac7d084e98b9eac96 | 4,598 | py | Python | tests/match/test_pheno_matching.py | john1711/patientMatcher | 516a2a73a2cea1e87ed2f9ae6a4f0b1b715281d9 | [
"MIT"
] | 11 | 2019-07-02T11:14:21.000Z | 2022-03-08T21:43:10.000Z | tests/match/test_pheno_matching.py | john1711/patientMatcher | 516a2a73a2cea1e87ed2f9ae6a4f0b1b715281d9 | [
"MIT"
] | 182 | 2019-01-23T10:13:30.000Z | 2022-03-25T13:17:08.000Z | tests/match/test_pheno_matching.py | john1711/patientMatcher | 516a2a73a2cea1e87ed2f9ae6a4f0b1b715281d9 | [
"MIT"
] | 6 | 2019-01-09T21:21:43.000Z | 2022-03-09T20:26:23.000Z | # -*- coding: utf-8 -*-
from patientMatcher.match.phenotype_matcher import match, similarity_wrapper
from patientMatcher.parse.patient import mme_patient
from patientMatcher.resources import path_to_hpo_terms, path_to_phenotype_annotations
from patientMatcher.server.extensions import diseases, hpo, hpoic
from patientM... | 36.492063 | 96 | 0.700957 |
from patientMatcher.match.phenotype_matcher import match, similarity_wrapper
from patientMatcher.parse.patient import mme_patient
from patientMatcher.resources import path_to_hpo_terms, path_to_phenotype_annotations
from patientMatcher.server.extensions import diseases, hpo, hpoic
from patientMatcher.utils.patient im... | true | true |
1c1aecf293efb3636377233ddf4e6bb67830c6c7 | 9,090 | py | Python | conans/test/functional/folders_access_test.py | conanci/conan | 8f6978290d095778eff6a9a84ea3f06f723fcfea | [
"MIT"
] | 3 | 2016-11-11T01:09:44.000Z | 2017-07-19T13:30:17.000Z | conans/test/functional/folders_access_test.py | conanci/conan | 8f6978290d095778eff6a9a84ea3f06f723fcfea | [
"MIT"
] | 6 | 2017-06-14T11:40:15.000Z | 2020-05-23T01:43:28.000Z | conans/test/functional/folders_access_test.py | conanci/conan | 8f6978290d095778eff6a9a84ea3f06f723fcfea | [
"MIT"
] | 2 | 2017-11-29T14:05:22.000Z | 2018-09-19T12:43:33.000Z | import unittest
import os
from conans.test.utils.tools import TestClient
from conans.util.files import mkdir
conanfile_parent = """
from conans import ConanFile
class parentLib(ConanFile):
name = "parent"
version = "1.0"
def package_info(self):
self.cpp_info.cppflags.append("-myflag")
... | 38.846154 | 98 | 0.623102 | import unittest
import os
from conans.test.utils.tools import TestClient
from conans.util.files import mkdir
conanfile_parent = """
from conans import ConanFile
class parentLib(ConanFile):
name = "parent"
version = "1.0"
def package_info(self):
self.cpp_info.cppflags.append("-myflag")
... | true | true |
1c1aef58844f6ee7c581ae6e468c4134bdae602f | 578 | py | Python | 105_POO/propiedadDict.py | josuerojasq/netacad_python | 510c3a026f83e499144d91c00edc5045a8304a08 | [
"MIT"
] | null | null | null | 105_POO/propiedadDict.py | josuerojasq/netacad_python | 510c3a026f83e499144d91c00edc5045a8304a08 | [
"MIT"
] | null | null | null | 105_POO/propiedadDict.py | josuerojasq/netacad_python | 510c3a026f83e499144d91c00edc5045a8304a08 | [
"MIT"
] | null | null | null | #Cada clase de Python y cada objeto de Python está pre-equipado con un conjunto de atributos útiles
# que pueden usarse para examinar sus capacidades.
#La propiedad "__dict__".
#Observemos cómo esta propiedad trata con los métodos.
#Encuentra todos los métodos y atributos definidos.
# Localiza el contexto en el que exi... | 27.52381 | 99 | 0.723183 |
class conClase:
varia = 1
def __init__(self):
self.var = 2
def metodo(self):
pass
def __oculto(self):
pass
obj = conClase()
print(obj.__dict__)
print(conClase.__dict__) | true | true |
1c1aef5aaf778003703ff51a6f459e5da39a2911 | 2,132 | py | Python | src/transformers/models/__init__.py | Knarik1/transformers | c2a7d7280250addae38a49c31a57ddd897be2065 | [
"Apache-2.0"
] | 1 | 2021-12-31T02:25:44.000Z | 2021-12-31T02:25:44.000Z | src/transformers/models/__init__.py | Knarik1/transformers | c2a7d7280250addae38a49c31a57ddd897be2065 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/__init__.py | Knarik1/transformers | c2a7d7280250addae38a49c31a57ddd897be2065 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 18.222222 | 77 | 0.636023 |
# module, but to preserve other warnings. So, don't check this module at all.
from . import (
albert,
auto,
bart,
barthez,
bartpho,
beit,
bert,
bert_generation,
bert_japanese,
bertweet,
big_bird,
bigbird_pegasus,
blenderbot,
blenderbot_small,
... | true | true |
1c1aef75b8b541b13fc9b6d5b4672e5099c41ec6 | 145 | py | Python | users/admin.py | Tipuch/groceries | 04d7e2909afea3c25abf2190f4a20a1f2047e2f3 | [
"MIT"
] | null | null | null | users/admin.py | Tipuch/groceries | 04d7e2909afea3c25abf2190f4a20a1f2047e2f3 | [
"MIT"
] | 6 | 2021-04-08T19:54:26.000Z | 2022-02-26T16:48:03.000Z | users/admin.py | Tipuch/groceries | 04d7e2909afea3c25abf2190f4a20a1f2047e2f3 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import CustomUser
@admin.register(CustomUser)
class CustomUserAdmin(admin.ModelAdmin):
pass
| 16.111111 | 40 | 0.8 | from django.contrib import admin
from .models import CustomUser
@admin.register(CustomUser)
class CustomUserAdmin(admin.ModelAdmin):
pass
| true | true |
1c1af03aeb2567db15e772f703da605060c473f0 | 5,496 | py | Python | z_externals/handson_second_edition/Chapter12/02_pong_a2c.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | z_externals/handson_second_edition/Chapter12/02_pong_a2c.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | z_externals/handson_second_edition/Chapter12/02_pong_a2c.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | 1 | 2021-11-23T12:30:37.000Z | 2021-11-23T12:30:37.000Z | #!/usr/bin/env python3
import gym
import numpy as np
import argparse
import torch
import torch.nn as nn
import torch.nn.utils as nn_utils
import torch.nn.functional as F
import torch.optim as optim
from tensorboardX import SummaryWriter
from codes.e_utils.experience import ExperienceSourceFirstLast
from common.fast_r... | 33.925926 | 95 | 0.618632 |
import gym
import numpy as np
import argparse
import torch
import torch.nn as nn
import torch.nn.utils as nn_utils
import torch.nn.functional as F
import torch.optim as optim
from tensorboardX import SummaryWriter
from codes.e_utils.experience import ExperienceSourceFirstLast
from common.fast_rl.common.utils import ... | true | true |
1c1af0b4eceee51a28e1a8828e8ea52022f33c14 | 10,729 | py | Python | sdks/python/apache_beam/typehints/trivial_inference_test.py | goldfishy/beam | a956ff77a8448e5f2c12f6695fec608348b5ab60 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | sdks/python/apache_beam/typehints/trivial_inference_test.py | goldfishy/beam | a956ff77a8448e5f2c12f6695fec608348b5ab60 | [
"Apache-2.0",
"BSD-3-Clause"
] | 6 | 2020-11-13T18:59:17.000Z | 2021-08-25T16:11:11.000Z | sdks/python/apache_beam/typehints/trivial_inference_test.py | goldfishy/beam | a956ff77a8448e5f2c12f6695fec608348b5ab60 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 39.737037 | 80 | 0.621307 |
from __future__ import absolute_import
import os
import sys
import unittest
from apache_beam.typehints import trivial_inference
from apache_beam.typehints import typehints
global_int = 1
class TrivialInferenceTest(unittest.TestCase):
def assertReturnType(self, expected, f, inputs=()):
self... | true | true |
1c1af177e0727167a22b359c242e8877238dd1b0 | 3,834 | py | Python | src/api/handlers/tag_collection.py | jpeirce21/api | 11035360d6829a398b747aa86771b7d30fe46cb8 | [
"MIT"
] | 2 | 2020-07-24T12:58:17.000Z | 2020-12-17T02:26:13.000Z | src/api/handlers/tag_collection.py | jpeirce21/api | 11035360d6829a398b747aa86771b7d30fe46cb8 | [
"MIT"
] | 214 | 2019-06-26T17:33:54.000Z | 2022-03-26T00:02:34.000Z | src/api/handlers/tag_collection.py | jpeirce21/api | 11035360d6829a398b747aa86771b7d30fe46cb8 | [
"MIT"
] | 6 | 2020-03-13T20:29:06.000Z | 2021-08-20T16:15:08.000Z | """Handler file for all routes pertaining to tag_collections"""
from _main_.utils.route_handler import RouteHandler
from _main_.utils.common import get_request_contents
from api.services.tag_collection import TagCollectionService
from _main_.utils.massenergize_response import MassenergizeResponse
from types import Fun... | 37.960396 | 94 | 0.761346 |
from _main_.utils.route_handler import RouteHandler
from _main_.utils.common import get_request_contents
from api.services.tag_collection import TagCollectionService
from _main_.utils.massenergize_response import MassenergizeResponse
from types import FunctionType as function
from _main_.utils.context import Context
f... | true | true |
1c1af2cdc119a3831f474b28d6719391909fde2d | 1,516 | py | Python | tests/unit/test_action_set.py | reiterl/openslides-backend | d36667f00087ae8baf25853d4cef18a5e6dc7b3b | [
"MIT"
] | null | null | null | tests/unit/test_action_set.py | reiterl/openslides-backend | d36667f00087ae8baf25853d4cef18a5e6dc7b3b | [
"MIT"
] | null | null | null | tests/unit/test_action_set.py | reiterl/openslides-backend | d36667f00087ae8baf25853d4cef18a5e6dc7b3b | [
"MIT"
] | null | null | null | import inspect
from typing import Dict
from unittest import TestCase
from openslides_backend.action.action_set import ActionSet
from openslides_backend.action.generics import CreateAction, DeleteAction, UpdateAction
from openslides_backend.action.register import register_action_set
from openslides_backend.models.base ... | 33.688889 | 87 | 0.69723 | import inspect
from typing import Dict
from unittest import TestCase
from openslides_backend.action.action_set import ActionSet
from openslides_backend.action.generics import CreateAction, DeleteAction, UpdateAction
from openslides_backend.action.register import register_action_set
from openslides_backend.models.base ... | true | true |
1c1af51aabdffc0e3bcc24a300ce1a95abbee9a0 | 6,208 | py | Python | rlpyt/ul/envs/maze.py | erfanMhi/rlpyt | 56574ea209f48075c26179c5b2f1a4676c38efdd | [
"MIT"
] | null | null | null | rlpyt/ul/envs/maze.py | erfanMhi/rlpyt | 56574ea209f48075c26179c5b2f1a4676c38efdd | [
"MIT"
] | null | null | null | rlpyt/ul/envs/maze.py | erfanMhi/rlpyt | 56574ea209f48075c26179c5b2f1a4676c38efdd | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import os
from collections import namedtuple
from rlpyt.envs.base import Env, EnvStep
from rlpyt.spaces.int_box import IntBox
from rlpyt.utils.quick_args import save__init__args
from rlpyt.samplers.collections import TrajInfo
EnvInfo = namedtuple("EnvInfo", ["game_s... | 35.073446 | 101 | 0.557184 | import numpy as np
import matplotlib.pyplot as plt
import os
from collections import namedtuple
from rlpyt.envs.base import Env, EnvStep
from rlpyt.spaces.int_box import IntBox
from rlpyt.utils.quick_args import save__init__args
from rlpyt.samplers.collections import TrajInfo
EnvInfo = namedtuple("EnvInfo", ["game_s... | true | true |
1c1af5699b957107e81b6a8a775899ff0e7320ad | 17,559 | py | Python | tests/test_drawio_module.py | dmulyalin/N2G | 78c7395d0c08b45183c1951857a2fb8b2ead7fda | [
"MIT"
] | 84 | 2020-07-13T22:00:03.000Z | 2022-03-24T03:35:03.000Z | tests/test_drawio_module.py | dmulyalin/N2G | 78c7395d0c08b45183c1951857a2fb8b2ead7fda | [
"MIT"
] | 14 | 2020-10-08T04:56:01.000Z | 2022-03-12T17:32:59.000Z | tests/test_drawio_module.py | dmulyalin/N2G | 78c7395d0c08b45183c1951857a2fb8b2ead7fda | [
"MIT"
] | 12 | 2021-01-18T00:01:16.000Z | 2022-03-14T09:09:28.000Z | import sys
sys.path.insert(0,'..')
# after updated sys path, can do N2G import from parent dir
from N2G import drawio_diagram as create_drawio_diagram
def test_1_add_elements_one_by_one():
###########################################
# Test adding elements one by one
#######################################... | 47.97541 | 229 | 0.575488 | import sys
sys.path.insert(0,'..')
from N2G import drawio_diagram as create_drawio_diagram
def test_1_add_elements_one_by_one():
| true | true |
1c1af584edaeae76fa448b6a4de517a6350e9a3d | 2,922 | py | Python | trainer_mnist.py | bgokden/modeloptimizer | 9840c6d86fc5a0d8815ec357fec36ea9a682d118 | [
"MIT"
] | 4 | 2019-11-29T07:19:45.000Z | 2021-11-14T19:40:45.000Z | trainer_mnist.py | bgokden/modeloptimizer | 9840c6d86fc5a0d8815ec357fec36ea9a682d118 | [
"MIT"
] | null | null | null | trainer_mnist.py | bgokden/modeloptimizer | 9840c6d86fc5a0d8815ec357fec36ea9a682d118 | [
"MIT"
] | null | null | null | from veripupil.trainer import Trainer
import os
from numpy import array
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import TimeDistributed
from keras.layers import RepeatVector
from keras.regularizers import L1L2
from keras.callbacks import EarlySt... | 40.583333 | 117 | 0.709446 | from veripupil.trainer import Trainer
import os
from numpy import array
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import TimeDistributed
from keras.layers import RepeatVector
from keras.regularizers import L1L2
from keras.callbacks import EarlySt... | true | true |
1c1af5aa9bbdd3b74e7957b7905c6dd0ffc637c4 | 767 | py | Python | data/migrations/0003_sailing_day_of_week.py | ve7cxz/ferrystatus | ac52eaf7d8c562bd67e256ced9f4c8a04b232d8f | [
"MIT"
] | 1 | 2019-02-26T15:27:42.000Z | 2019-02-26T15:27:42.000Z | data/migrations/0003_sailing_day_of_week.py | ve7cxz/ferrystatus | ac52eaf7d8c562bd67e256ced9f4c8a04b232d8f | [
"MIT"
] | null | null | null | data/migrations/0003_sailing_day_of_week.py | ve7cxz/ferrystatus | ac52eaf7d8c562bd67e256ced9f4c8a04b232d8f | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2018-11-17 07:09
import data.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('data', '0002_sailing_departed'),
]
operations = [
migrations.AddField(
model_name='sailing',
name... | 38.35 | 413 | 0.654498 |
import data.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('data', '0002_sailing_departed'),
]
operations = [
migrations.AddField(
model_name='sailing',
name='day_of_week',
field=models.CharFi... | true | true |
1c1af5cada9ba3925dba6280fd9101efd298b362 | 11,845 | py | Python | module/fusionIntegrator.py | Goochaozheng/ChunkFusion | 7458a8e08886cc76cfeb87881c51e23b1d0674c3 | [
"MIT"
] | 3 | 2022-03-15T08:34:15.000Z | 2022-03-15T08:40:06.000Z | module/fusionIntegrator.py | Goochaozheng/ChunkFusion | 7458a8e08886cc76cfeb87881c51e23b1d0674c3 | [
"MIT"
] | null | null | null | module/fusionIntegrator.py | Goochaozheng/ChunkFusion | 7458a8e08886cc76cfeb87881c51e23b1d0674c3 | [
"MIT"
] | null | null | null | from network.utils import toSparseInput
from network.fuser import Fuser
import open3d as o3d
import torch
import spconv
import numpy as np
from time import time
from .chunkManager import ChunkManager
from geometry import transformPoints, pointToPixel
from network import Fuser, Parser
class FusionIntegrator(ChunkMana... | 42.153025 | 144 | 0.618911 | from network.utils import toSparseInput
from network.fuser import Fuser
import open3d as o3d
import torch
import spconv
import numpy as np
from time import time
from .chunkManager import ChunkManager
from geometry import transformPoints, pointToPixel
from network import Fuser, Parser
class FusionIntegrator(ChunkMana... | true | true |
1c1af616613623286cd98c23c62bcb09351430c8 | 5,542 | py | Python | easy_command_sdk/model/easy_flow/target_result_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | easy_command_sdk/model/easy_flow/target_result_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | easy_command_sdk/model/easy_flow/target_result_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: target_result.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | 46.571429 | 618 | 0.772284 |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
_sym_db ... | true | true |
1c1af7dc2a2aea870d9704192deb23d5839df918 | 11,497 | py | Python | projects/seg/deeplabv3.py | ixhorse/gluon-cv | c89f9bfc1f5f4ac52ed593ff038af876c3e1dc93 | [
"Apache-2.0"
] | null | null | null | projects/seg/deeplabv3.py | ixhorse/gluon-cv | c89f9bfc1f5f4ac52ed593ff038af876c3e1dc93 | [
"Apache-2.0"
] | null | null | null | projects/seg/deeplabv3.py | ixhorse/gluon-cv | c89f9bfc1f5f4ac52ed593ff038af876c3e1dc93 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=unused-argument
"""Pyramid Scene Parsing Network"""
from mxnet.gluon import nn
from mxnet.context import cpu
from mxnet.gluon.nn import HybridBlock
from mxnet import gluon
from gluoncv.model_zoo.segbase import SegBaseModel
from gluoncv.model_zoo.fcn import _FCNHead
# pylint: disable-all
__all__ = ['D... | 38.710438 | 100 | 0.641646 |
from mxnet.gluon import nn
from mxnet.context import cpu
from mxnet.gluon.nn import HybridBlock
from mxnet import gluon
from gluoncv.model_zoo.segbase import SegBaseModel
from gluoncv.model_zoo.fcn import _FCNHead
__all__ = ['DeepLabV3', 'get_deeplab', 'get_deeplab_resnet101_coco',
'get_deeplab_resnet101_voc', '... | true | true |
1c1af7fb38d62240cc2cf3e27909328b35f7492d | 8,073 | py | Python | tests/ignite/contrib/metrics/regression/test_wave_hedges_distance.py | louis-she/ignite | d05a8939139e056e5c5daf842c81af0ab5b0caaf | [
"BSD-3-Clause"
] | 4,119 | 2017-11-23T18:10:37.000Z | 2022-03-31T05:31:27.000Z | tests/ignite/contrib/metrics/regression/test_wave_hedges_distance.py | louis-she/ignite | d05a8939139e056e5c5daf842c81af0ab5b0caaf | [
"BSD-3-Clause"
] | 1,838 | 2017-11-24T11:19:25.000Z | 2022-03-31T09:08:18.000Z | tests/ignite/contrib/metrics/regression/test_wave_hedges_distance.py | louis-she/ignite | d05a8939139e056e5c5daf842c81af0ab5b0caaf | [
"BSD-3-Clause"
] | 691 | 2017-11-24T10:57:33.000Z | 2022-03-29T02:19:44.000Z | import os
import numpy as np
import pytest
import torch
import ignite.distributed as idist
from ignite.contrib.metrics.regression import WaveHedgesDistance
from ignite.engine import Engine
def test_wrong_input_shapes():
m = WaveHedgesDistance()
with pytest.raises(ValueError, match=r"Input data shapes shoul... | 33.920168 | 110 | 0.680045 | import os
import numpy as np
import pytest
import torch
import ignite.distributed as idist
from ignite.contrib.metrics.regression import WaveHedgesDistance
from ignite.engine import Engine
def test_wrong_input_shapes():
m = WaveHedgesDistance()
with pytest.raises(ValueError, match=r"Input data shapes shoul... | true | true |
1c1af8a5d8ea8d70680c0ce0a0fa026502ab580c | 4,231 | py | Python | main.py | LCB0B/metric | 0686ce80326b60ddde77989b82c218d94a016cd2 | [
"MIT"
] | null | null | null | main.py | LCB0B/metric | 0686ce80326b60ddde77989b82c218d94a016cd2 | [
"MIT"
] | null | null | null | main.py | LCB0B/metric | 0686ce80326b60ddde77989b82c218d94a016cd2 | [
"MIT"
] | null | null | null | from copy import deepcopy
# Import all the packages
import torch
from torch.autograd import Variable
import torch.nn as nn
import numpy as np
import torch.optim as optim
import torch.nn.functional as f # create a dummy data
import matplotlib.pyplot as plt
import networkx as nx
import timeit
from sklearn import metrics... | 38.117117 | 166 | 0.640747 | from copy import deepcopy
import torch
from torch.autograd import Variable
import torch.nn as nn
import numpy as np
import torch.optim as optim
import torch.nn.functional as f
import matplotlib.pyplot as plt
import networkx as nx
import timeit
from sklearn import metrics
import scipy.sparse as sparse
import scipy.st... | true | true |
1c1af9049953d671f19b7da830522336ce5209ba | 61,780 | py | Python | tcfl/__init__.py | inakypg/tcf | 569e21b25c8ee72ebad0c80d0a7de0714411185f | [
"Apache-2.0"
] | 1 | 2018-08-31T06:48:14.000Z | 2018-08-31T06:48:14.000Z | tcfl/__init__.py | inakypg/tcf | 569e21b25c8ee72ebad0c80d0a7de0714411185f | [
"Apache-2.0"
] | null | null | null | tcfl/__init__.py | inakypg/tcf | 569e21b25c8ee72ebad0c80d0a7de0714411185f | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python3
#
# Copyright (c) 2017-21 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
import collections
import concurrent.futures
import datetime
import inspect
import itertools
import json
import logging
import os
import shutil
import socket
import urllib
import base64
import hashlib
import rand... | 36.686461 | 99 | 0.565102 |
import collections
import concurrent.futures
import datetime
import inspect
import itertools
import json
import logging
import os
import shutil
import socket
import urllib
import base64
import hashlib
import random
import requests
import subprocess
import sys
import traceback
import threading
import filelock
... | true | true |
1c1af93f7c554cbb3c663c0054720300f16e1230 | 6,209 | py | Python | src/api-service/__app__/onefuzzlib/notifications/main.py | tonybaloney/onefuzz | e0f2e9ed5aae006e0054387de7a0ff8c83c8f722 | [
"MIT"
] | 2,692 | 2020-09-15T17:54:21.000Z | 2022-03-31T11:58:57.000Z | src/api-service/__app__/onefuzzlib/notifications/main.py | tonybaloney/onefuzz | e0f2e9ed5aae006e0054387de7a0ff8c83c8f722 | [
"MIT"
] | 980 | 2020-09-18T18:23:01.000Z | 2022-03-30T22:20:43.000Z | src/api-service/__app__/onefuzzlib/notifications/main.py | nharper285/onefuzz | 1de2cc841d6fc885f8bcb6d032bf5b96ddb52493 | [
"MIT"
] | 177 | 2020-09-16T00:10:56.000Z | 2022-03-30T21:18:10.000Z | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import logging
from typing import List, Optional, Sequence, Tuple
from uuid import UUID
from memoization import cached
from onefuzztypes import models
from onefuzztypes.enums import ErrorCode, TaskState
from onefuzztypes.... | 33.026596 | 87 | 0.65695 |
import logging
from typing import List, Optional, Sequence, Tuple
from uuid import UUID
from memoization import cached
from onefuzztypes import models
from onefuzztypes.enums import ErrorCode, TaskState
from onefuzztypes.events import (
EventCrashReported,
EventFileAdded,
EventRegressionReported,
)
fr... | true | true |
1c1afa44a4da4a760d805c0836a5c47a8645a3ce | 1,731 | py | Python | tests/integration/test_apple_pay.py | maneeshd/braintree_python | 4aa3f4b8a376ea81bf16a053d840efe55ae13675 | [
"MIT"
] | null | null | null | tests/integration/test_apple_pay.py | maneeshd/braintree_python | 4aa3f4b8a376ea81bf16a053d840efe55ae13675 | [
"MIT"
] | null | null | null | tests/integration/test_apple_pay.py | maneeshd/braintree_python | 4aa3f4b8a376ea81bf16a053d840efe55ae13675 | [
"MIT"
] | null | null | null | from tests.test_helper import *
class ApplePayGateway(unittest.TestCase):
@staticmethod
def get_gateway():
config = Configuration("development", "integration_merchant_id",
public_key="integration_public_key",
private_key="integration_private... | 45.552632 | 102 | 0.735991 | from tests.test_helper import *
class ApplePayGateway(unittest.TestCase):
@staticmethod
def get_gateway():
config = Configuration("development", "integration_merchant_id",
public_key="integration_public_key",
private_key="integration_private... | true | true |
1c1afcf5c18e672f2b7c51df8f2c6d7a78a70a41 | 657 | py | Python | LeetCode/0082. Remove Duplicates from Sorted List II/solution.py | InnoFang/oh-my-algorithms | f559dba371ce725a926725ad28d5e1c2facd0ab2 | [
"Apache-2.0"
] | 19 | 2018-08-26T03:10:58.000Z | 2022-03-07T18:12:52.000Z | LeetCode/0082. Remove Duplicates from Sorted List II/solution.py | InnoFang/Algorithm-Library | 1896b9d8b1fa4cd73879aaecf97bc32d13ae0169 | [
"Apache-2.0"
] | null | null | null | LeetCode/0082. Remove Duplicates from Sorted List II/solution.py | InnoFang/Algorithm-Library | 1896b9d8b1fa4cd73879aaecf97bc32d13ae0169 | [
"Apache-2.0"
] | 6 | 2020-03-16T23:00:06.000Z | 2022-01-13T07:02:08.000Z | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
"""
166 / 166 test cases passed.
Runtime: 48 ms
Memory Usage: 14.8 MB
"""
class Solution:
def deleteDuplicates(self, head: ListNode) -> ListNode:
if not hea... | 27.375 | 67 | 0.596651 |
class Solution:
def deleteDuplicates(self, head: ListNode) -> ListNode:
if not head or not head.next:
return head
if head.val != head.next.val:
head.next = self.deleteDuplicates(head.next)
else:
while head and head.next and head.val == head.next.val:... | true | true |
1c1afe711c61705b72924f8ebff25922819c3ad6 | 7,260 | py | Python | tests/components/http/test_init.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 4 | 2019-01-10T14:47:54.000Z | 2021-04-22T02:06:27.000Z | tests/components/http/test_init.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:50:07.000Z | 2022-03-12T00:39:31.000Z | tests/components/http/test_init.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 3 | 2018-08-29T19:26:20.000Z | 2020-01-19T11:58:22.000Z | """The tests for the Home Assistant HTTP component."""
import logging
import unittest
from unittest.mock import patch
from homeassistant.setup import async_setup_component
import homeassistant.components.http as http
from homeassistant.util.ssl import (
server_context_modern, server_context_intermediate)
class ... | 31.842105 | 78 | 0.653306 | import logging
import unittest
from unittest.mock import patch
from homeassistant.setup import async_setup_component
import homeassistant.components.http as http
from homeassistant.util.ssl import (
server_context_modern, server_context_intermediate)
class TestView(http.HomeAssistantView):
name = 'test'
... | true | true |
1c1afea264f4cbd76493b3e19aed89e193ee670c | 21,828 | py | Python | models.py | qianyuqian-DeepLearning/YoloV3-prune-layer | 5b4a4d6346d980b36235eae5335003f2c43a28cf | [
"Apache-2.0"
] | 1,414 | 2019-11-11T14:18:42.000Z | 2022-03-30T15:14:43.000Z | models.py | qianyuqian-DeepLearning/YoloV3-prune-layer | 5b4a4d6346d980b36235eae5335003f2c43a28cf | [
"Apache-2.0"
] | 171 | 2019-11-27T01:27:52.000Z | 2022-02-23T10:14:20.000Z | models.py | qianyuqian-DeepLearning/YoloV3-prune-layer | 5b4a4d6346d980b36235eae5335003f2c43a28cf | [
"Apache-2.0"
] | 423 | 2019-11-12T00:24:52.000Z | 2022-03-31T10:34:34.000Z | import torch.nn.functional as F
from utils.google_utils import *
from utils.parse_config import *
from utils.utils import *
ONNX_EXPORT = False
def create_modules(module_defs, img_size, arc):
# Constructs module list of layer blocks from module configuration in module_defs
hyperparams = module_... | 47.144708 | 210 | 0.533856 | import torch.nn.functional as F
from utils.google_utils import *
from utils.parse_config import *
from utils.utils import *
ONNX_EXPORT = False
def create_modules(module_defs, img_size, arc):
hyperparams = module_defs.pop(0)
output_filters = [int(hyperparams['channels'])]
module_list ... | true | true |
1c1affa26c2c7123a9bf62f1d54f0b9a54bc52c1 | 10,676 | py | Python | dask/diagnostics/tests/test_profiler.py | aeisenbarth/dask | 3c46e89aea2af010e69049cd638094fea2ddd576 | [
"BSD-3-Clause"
] | 9,684 | 2016-02-12T16:09:21.000Z | 2022-03-31T19:38:26.000Z | dask/diagnostics/tests/test_profiler.py | aeisenbarth/dask | 3c46e89aea2af010e69049cd638094fea2ddd576 | [
"BSD-3-Clause"
] | 7,059 | 2016-02-11T18:32:45.000Z | 2022-03-31T22:12:40.000Z | dask/diagnostics/tests/test_profiler.py | aeisenbarth/dask | 3c46e89aea2af010e69049cd638094fea2ddd576 | [
"BSD-3-Clause"
] | 1,794 | 2016-02-13T23:28:39.000Z | 2022-03-30T14:33:19.000Z | import contextlib
import os
from operator import add, mul
from time import sleep
import pytest
from dask.diagnostics import CacheProfiler, Profiler, ResourceProfiler
from dask.threaded import get
from dask.utils import apply, tmpfile
try:
import bokeh
except ImportError:
bokeh = None
try:
import psutil
e... | 27.374359 | 88 | 0.582241 | import contextlib
import os
from operator import add, mul
from time import sleep
import pytest
from dask.diagnostics import CacheProfiler, Profiler, ResourceProfiler
from dask.threaded import get
from dask.utils import apply, tmpfile
try:
import bokeh
except ImportError:
bokeh = None
try:
import psutil
e... | true | true |
1c1b006f1e20852e82eabd93d432482c18539c7a | 605 | py | Python | Megalodon/src/aerial/parse.py | tedklin/Echo | e9937307d02e36a5a111c68f9dbf069baa76bf98 | [
"MIT"
] | 3 | 2019-07-17T18:19:46.000Z | 2021-11-08T12:20:18.000Z | Megalodon/src/aerial/parse.py | itohanero/Echo-1 | e9937307d02e36a5a111c68f9dbf069baa76bf98 | [
"MIT"
] | null | null | null | Megalodon/src/aerial/parse.py | itohanero/Echo-1 | e9937307d02e36a5a111c68f9dbf069baa76bf98 | [
"MIT"
] | 1 | 2020-09-02T20:03:03.000Z | 2020-09-02T20:03:03.000Z | import json
def parse(f):
"""
Output is in format:
[cmd1, cmd2, cmd3, etc]
Cmds are in format:
[frame, command, doJumpId, autoContinue, params[0], params[1], ... params[6]]
"""
file = open(f, "r")
cmds = json.loads(file.read())
itemsList = cmds["mission"]["items"]
out = []
for i in itemsList:
... | 18.90625 | 79 | 0.519008 | import json
def parse(f):
file = open(f, "r")
cmds = json.loads(file.read())
itemsList = cmds["mission"]["items"]
out = []
for i in itemsList:
out.append((
0,
0,
0,
i["frame"],
i["command"],
i["doJumpId"],
i["autoContinue"],
i["params"][0],
i["params"][1],
i["para... | true | true |
1c1b008d22865e4f7d95ad30e4bf3bab0806ffc0 | 426 | py | Python | main_app/migrations/0003_auto_20210330_1351.py | somya51p/Rescue | 9e6ba57f1e5dd1e72d48a862f9ade05d5d6a6a28 | [
"MIT"
] | null | null | null | main_app/migrations/0003_auto_20210330_1351.py | somya51p/Rescue | 9e6ba57f1e5dd1e72d48a862f9ade05d5d6a6a28 | [
"MIT"
] | null | null | null | main_app/migrations/0003_auto_20210330_1351.py | somya51p/Rescue | 9e6ba57f1e5dd1e72d48a862f9ade05d5d6a6a28 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2021-03-30 13:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main_app', '0002_login_slideshowitem'),
]
operations = [
migrations.AlterField(
model_name='slideshowitem',
name='im... | 22.421053 | 82 | 0.624413 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main_app', '0002_login_slideshowitem'),
]
operations = [
migrations.AlterField(
model_name='slideshowitem',
name='image',
field=models.ImageField(uploa... | true | true |
1c1b00cc35ebaeca2f41e669fcc47f0848cb0e59 | 11,961 | py | Python | scene_sampling.py | Young-Excavator/meta_LSM | 1b9c8b006c4f899034714b334656b3fc7ca521dc | [
"MIT"
] | 1 | 2021-07-09T00:35:47.000Z | 2021-07-09T00:35:47.000Z | scene_sampling.py | Young-Excavator/meta_LSM | 1b9c8b006c4f899034714b334656b3fc7ca521dc | [
"MIT"
] | null | null | null | scene_sampling.py | Young-Excavator/meta_LSM | 1b9c8b006c4f899034714b334656b3fc7ca521dc | [
"MIT"
] | 1 | 2021-09-19T16:31:49.000Z | 2021-09-19T16:31:49.000Z | import math
from skimage import io, color
import numpy as np
from tqdm import trange
import gdal
import pandas as pd
from tensorflow.python.platform import flags
FLAGS = flags.FLAGS
class Cluster(object):
cluster_index = 1
def __init__(self, h, w, dem, aspect, curvature, slope):
self.update(h, w, dem... | 40.408784 | 128 | 0.512332 | import math
from skimage import io, color
import numpy as np
from tqdm import trange
import gdal
import pandas as pd
from tensorflow.python.platform import flags
FLAGS = flags.FLAGS
class Cluster(object):
cluster_index = 1
def __init__(self, h, w, dem, aspect, curvature, slope):
self.update(h, w, dem... | true | true |
1c1b025d20724e5cbeeaaa12fb5a12ddf679040b | 170 | py | Python | cube_appeals/driver_gen.py | KristN1/cube_appeals | f81503ee665d6a69f3a5b06a69bddb020194f713 | [
"MIT"
] | null | null | null | cube_appeals/driver_gen.py | KristN1/cube_appeals | f81503ee665d6a69f3a5b06a69bddb020194f713 | [
"MIT"
] | null | null | null | cube_appeals/driver_gen.py | KristN1/cube_appeals | f81503ee665d6a69f3a5b06a69bddb020194f713 | [
"MIT"
] | null | null | null | import undetected_chromedriver.v2 as uc
def new():
options = uc.ChromeOptions()
#options.headless=True
driver = uc.Chrome(options=options)
return driver | 21.25 | 39 | 0.717647 | import undetected_chromedriver.v2 as uc
def new():
options = uc.ChromeOptions()
driver = uc.Chrome(options=options)
return driver | true | true |
1c1b0304aa89744930793cf91c25caf35d047b3d | 3,453 | py | Python | CRAG/unet_data_maker.py | Srijay-lab/segment2tissue | d3cd837f4381eba58df798800bdc5503bdf6db22 | [
"MIT"
] | 1 | 2020-05-28T06:08:52.000Z | 2020-05-28T06:08:52.000Z | CRAG/unet_data_maker.py | Srijay-lab/pix2pix-tensorflow | d3cd837f4381eba58df798800bdc5503bdf6db22 | [
"MIT"
] | null | null | null | CRAG/unet_data_maker.py | Srijay-lab/pix2pix-tensorflow | d3cd837f4381eba58df798800bdc5503bdf6db22 | [
"MIT"
] | null | null | null | import glob
import os
from PIL import Image
import numpy as np
import random
masks_input_folder = "F:/Datasets/CRAG_LabServer/c1/Test/Grades/1/1436_cropped/binary_masks"
images_input_folder = "F:/Datasets/CRAG_LabServer/c1/Test/Grades/1/1436_cropped/results/images"
output_dir = "C:/Users/Srijay/Desktop/Projects/Segme... | 33.201923 | 123 | 0.637706 | import glob
import os
from PIL import Image
import numpy as np
import random
masks_input_folder = "F:/Datasets/CRAG_LabServer/c1/Test/Grades/1/1436_cropped/binary_masks"
images_input_folder = "F:/Datasets/CRAG_LabServer/c1/Test/Grades/1/1436_cropped/results/images"
output_dir = "C:/Users/Srijay/Desktop/Projects/Segme... | true | true |
1c1b03b0c7981fe9e3ca9abaf03426e07ba4d283 | 863 | py | Python | modules/signatures/windows/rootkit_blackenergy_mutex.py | Yuanmessi/Bold-Falcon | 00fcaba0b3d9c462b9d20ecb256ff85db5d119e2 | [
"BSD-3-Clause"
] | 24 | 2021-06-21T07:35:37.000Z | 2022-03-22T03:33:59.000Z | modules/signatures/windows/rootkit_blackenergy_mutex.py | Yuanmessi/Bold-Falcon | 00fcaba0b3d9c462b9d20ecb256ff85db5d119e2 | [
"BSD-3-Clause"
] | 3 | 2021-07-01T08:09:05.000Z | 2022-01-28T03:38:36.000Z | modules/signatures/windows/rootkit_blackenergy_mutex.py | Yuanmessi/Bold-Falcon | 00fcaba0b3d9c462b9d20ecb256ff85db5d119e2 | [
"BSD-3-Clause"
] | 6 | 2021-06-22T05:32:57.000Z | 2022-02-11T02:05:45.000Z | # Copyright (C) 2010-2015 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# This signature was contributed by RedSocks - http://redsocks.nl
# See the file 'docs/LICENSE' for copying permission.
from lib.cuckoo.common.abstracts import Signature
class BlackEnergyMutexes(Signature... | 30.821429 | 68 | 0.665122 |
from lib.cuckoo.common.abstracts import Signature
class BlackEnergyMutexes(Signature):
name = "blackenergy_mutexes"
description = "Creates known BlackEnergy Rootkit mutexes"
severity = 3
categories = ["rootkit"]
families = ["blackenergy"]
authors = ["RedSocks"]
minimum = "2.0"
mut... | true | true |
1c1b03ee19d991396238b9f9ef76bb2b1f66c97a | 5,941 | py | Python | var/spack/repos/builtin/packages/cmake/package.py | jameshclrk/spack | 1f8fcb36091e1d5ae63a2279a958ca3ff57088bf | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2021-03-19T13:12:47.000Z | 2021-03-19T13:12:47.000Z | var/spack/repos/builtin/packages/cmake/package.py | jameshclrk/spack | 1f8fcb36091e1d5ae63a2279a958ca3ff57088bf | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/cmake/package.py | jameshclrk/spack | 1f8fcb36091e1d5ae63a2279a958ca3ff57088bf | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Cmake(Package):
"""A cross-platform, open-source build system. CMake is a family of
... | 43.683824 | 110 | 0.647534 |
from spack import *
class Cmake(Package):
homepage = 'https://www.cmake.org'
url = 'https://github.com/Kitware/CMake/releases/download/v3.13.0/cmake-3.13.0.tar.gz'
version('3.13.1', 'befe1ce6d672f2881350e94d4e3cc809697dd2c09e5b708b76c1dae74e1b2210')
version('3.13.0', '4058b2f1a53c026564... | true | true |
1c1b04207e4f189266e61c54d1e4c4893e129911 | 686 | py | Python | mongodb_tryndx-master/schema/admin.py | garimazthakur/Flask_mongodb | c8f161864601ccd661b3f137f4403a0aa9e56b50 | [
"Apache-2.0"
] | null | null | null | mongodb_tryndx-master/schema/admin.py | garimazthakur/Flask_mongodb | c8f161864601ccd661b3f137f4403a0aa9e56b50 | [
"Apache-2.0"
] | null | null | null | mongodb_tryndx-master/schema/admin.py | garimazthakur/Flask_mongodb | c8f161864601ccd661b3f137f4403a0aa9e56b50 | [
"Apache-2.0"
] | null | null | null | schema = {"firstName":{"required":True, "type":"str",
"min":2,"max":20,"regex":'^[a-zA-Z]+$'},
"lastName":{"required":True, "type":"str",
"min":2,"max":20,"regex":'^[a-zA-Z]+$'},
"email":{"required":True, "type":"str",
"min":2,"max":5... | 62.363636 | 122 | 0.354227 | schema = {"firstName":{"required":True, "type":"str",
"min":2,"max":20,"regex":'^[a-zA-Z]+$'},
"lastName":{"required":True, "type":"str",
"min":2,"max":20,"regex":'^[a-zA-Z]+$'},
"email":{"required":True, "type":"str",
"min":2,"max":5... | true | true |
1c1b0517a65f5374f8b1af2d51ddaeb7dda49eef | 11,444 | py | Python | utils/data/structures/densepose_uv.py | rs9899/Parsing-R-CNN | a0c9ed8850abe740eedf8bfc6e1577cc0aa3fc7b | [
"MIT"
] | 289 | 2018-10-25T09:42:57.000Z | 2022-03-30T08:31:50.000Z | utils/data/structures/densepose_uv.py | qzane/Parsing-R-CNN | 8c4d940dcd322bf7a8671f8b0faaabb3259bd384 | [
"MIT"
] | 28 | 2019-01-07T02:39:49.000Z | 2022-01-25T08:54:36.000Z | utils/data/structures/densepose_uv.py | qzane/Parsing-R-CNN | 8c4d940dcd322bf7a8671f8b0faaabb3259bd384 | [
"MIT"
] | 44 | 2018-12-20T07:36:46.000Z | 2022-03-16T14:30:20.000Z | import os
import cv2
import numpy as np
from scipy.io import loadmat
import pycocotools.mask as mask_utils
import torch
import utils.data.evaluation.densepose_methods as dp_utils
DP = dp_utils.DensePoseMethods()
# transpose
FLIP_LEFT_RIGHT = 0
FLIP_TOP_BOTTOM = 1
class DenseposeUVs(object):
... | 37.035599 | 112 | 0.548148 | import os
import cv2
import numpy as np
from scipy.io import loadmat
import pycocotools.mask as mask_utils
import torch
import utils.data.evaluation.densepose_methods as dp_utils
DP = dp_utils.DensePoseMethods()
FLIP_LEFT_RIGHT = 0
FLIP_TOP_BOTTOM = 1
class DenseposeUVs(object):
def __init... | true | true |
1c1b056c7c853bf13b0bdf36fa072a123cc0a92a | 902 | py | Python | share/qt/clean_mac_info_plist.py | cqtenq/Feathercoin | 60aa04f700694507df2c619e2d3aa2220de84723 | [
"MIT"
] | 1 | 2015-06-20T08:07:19.000Z | 2015-06-20T08:07:19.000Z | share/qt/clean_mac_info_plist.py | cqtenq/Feathercoin | 60aa04f700694507df2c619e2d3aa2220de84723 | [
"MIT"
] | null | null | null | share/qt/clean_mac_info_plist.py | cqtenq/Feathercoin | 60aa04f700694507df2c619e2d3aa2220de84723 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Jonas Schnelli, 2013
# make sure the Feathercoin-Qt.app contains the right plist (including the right version)
# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)
from string import Template
from datetime import date
bitcoinDir = "./";
... | 31.103448 | 109 | 0.728381 |
from string import Template
from datetime import date
bitcoinDir = "./";
inFile = bitcoinDir+"/share/qt/Info.plist"
outFile = "Feathercoin-Qt.app/Contents/Info.plist"
version = "unknown";
fileForGrabbingVersion = bitcoinDir+"bitcoin-qt.pro"
for line in open(fileForGrabbingVersion):
lineArr = line.rep... | false | true |
1c1b05b738b563528ece65c9154df06507ad99d9 | 258 | py | Python | manage.py | gongqingfeng/django_websites | daa0a8264c1917538510afe660ceb41addc0a575 | [
"MIT"
] | null | null | null | manage.py | gongqingfeng/django_websites | daa0a8264c1917538510afe660ceb41addc0a575 | [
"MIT"
] | null | null | null | manage.py | gongqingfeng/django_websites | daa0a8264c1917538510afe660ceb41addc0a575 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_websites.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23.454545 | 79 | 0.77907 |
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_websites.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| true | true |
1c1b06232590424514626cb76b42c4fb6e05b3dd | 7,080 | py | Python | jarvis/resume/admin.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2019-01-03T06:10:04.000Z | 2019-01-03T06:10:04.000Z | jarvis/resume/admin.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2021-03-31T19:11:52.000Z | 2021-03-31T19:11:52.000Z | jarvis/resume/admin.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | null | null | null | # Django Imports
from django.contrib import admin
from django.utils.safestring import mark_safe
from django.contrib.admin import SimpleListFilter
# App Imports
from jarvis.accounts.models import UserProfile
from .models import (
Tag, GitHubRepo, GitHub, StackOverflow, Url, Resume, MobileApp, Website,
Blog, Bit... | 28.433735 | 90 | 0.655226 |
from django.contrib import admin
from django.utils.safestring import mark_safe
from django.contrib.admin import SimpleListFilter
from jarvis.accounts.models import UserProfile
from .models import (
Tag, GitHubRepo, GitHub, StackOverflow, Url, Resume, MobileApp, Website,
Blog, BitBucket, TrialUser, ResumeSkil... | true | true |
1c1b06f05fa24bb7952b1b0c3ccc840888728439 | 6,168 | py | Python | densephrases/utils/open_utils.py | nowkim/GeNER | 5a34f4f0b32f27a85771b6d7c39ed2e71ece6784 | [
"MIT"
] | 331 | 2021-03-31T11:14:55.000Z | 2022-03-28T04:18:52.000Z | densephrases/utils/open_utils.py | nowkim/GeNER | 5a34f4f0b32f27a85771b6d7c39ed2e71ece6784 | [
"MIT"
] | 17 | 2021-06-04T19:14:53.000Z | 2021-12-22T06:10:15.000Z | densephrases/utils/open_utils.py | nowkim/GeNER | 5a34f4f0b32f27a85771b6d7c39ed2e71ece6784 | [
"MIT"
] | 40 | 2021-04-12T09:53:00.000Z | 2022-03-23T10:56:54.000Z | import os
import random
import logging
import json
import torch
import numpy as np
from densephrases import MIPS
from densephrases.utils.single_utils import backward_compat
from densephrases.utils.squad_utils import get_question_dataloader, TrueCaser
from densephrases.utils.embed_utils import get_question_results
fro... | 38.074074 | 119 | 0.664559 | import os
import random
import logging
import json
import torch
import numpy as np
from densephrases import MIPS
from densephrases.utils.single_utils import backward_compat
from densephrases.utils.squad_utils import get_question_dataloader, TrueCaser
from densephrases.utils.embed_utils import get_question_results
fro... | true | true |
1c1b07141a1064c513a989b84886b18239106f95 | 2,129 | py | Python | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/connectivity_issue_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/connectivity_issue_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/connectivity_issue_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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.017857 | 77 | 0.610146 |
from msrest.serialization import Model
class ConnectivityIssue(Model):
_validation = {
'origin': {'readonly': True},
'severity': {'readonly': True},
'type': {'readonly': True},
'context': {'readonly': True},
}
_attribute_map = {
'origin': {'key': 'origi... | true | true |
1c1b071e918b2fab260392ec939f4a305f6b5ffc | 10,208 | py | Python | anchore_engine/db/db_queue.py | Nordix/anchore-engine | f25baa5cbf9aa34d56e56b341a90f577d85e6146 | [
"Apache-2.0"
] | null | null | null | anchore_engine/db/db_queue.py | Nordix/anchore-engine | f25baa5cbf9aa34d56e56b341a90f577d85e6146 | [
"Apache-2.0"
] | 3 | 2021-07-15T19:58:01.000Z | 2021-09-16T09:39:46.000Z | anchore_engine/db/db_queue.py | Nordix/anchore-engine | f25baa5cbf9aa34d56e56b341a90f577d85e6146 | [
"Apache-2.0"
] | null | null | null | import copy
import datetime
import hashlib
import json
import uuid
from sqlalchemy import asc, desc, or_, and_
from anchore_engine import db
from anchore_engine.db import Queue, QueueMeta
from anchore_engine.subsys import logger
from anchore_engine.subsys.caching import local_named_cache
def config_cache():
re... | 26.792651 | 137 | 0.590615 | import copy
import datetime
import hashlib
import json
import uuid
from sqlalchemy import asc, desc, or_, and_
from anchore_engine import db
from anchore_engine.db import Queue, QueueMeta
from anchore_engine.subsys import logger
from anchore_engine.subsys.caching import local_named_cache
def config_cache():
re... | true | true |
1c1b0763bcb5b6fcff2b5c1586d6ff5934bf79c6 | 1,832 | py | Python | blockchain-api/transaction.py | SManral/Py-BlockChain | d7e03af6874562e7c1ff894d06451a5ce71c94cb | [
"MIT"
] | null | null | null | blockchain-api/transaction.py | SManral/Py-BlockChain | d7e03af6874562e7c1ff894d06451a5ce71c94cb | [
"MIT"
] | null | null | null | blockchain-api/transaction.py | SManral/Py-BlockChain | d7e03af6874562e7c1ff894d06451a5ce71c94cb | [
"MIT"
] | null | null | null | from ecdsa import SECP256k1, rfc6979, BadSignatureError, VerifyingKey, SigningKey
from hashlib import sha256
from six import b
from utils import hash
class Transaction(object):
#Creates a new transaction to go into the next mined Block
def __init__(self, sender, recipient, amount):
self.sender_addr = hex... | 30.032787 | 94 | 0.691048 | from ecdsa import SECP256k1, rfc6979, BadSignatureError, VerifyingKey, SigningKey
from hashlib import sha256
from six import b
from utils import hash
class Transaction(object):
def __init__(self, sender, recipient, amount):
self.sender_addr = hex_to_ecdsa(sender)
self.recipient_addr = hex_to_ecd... | true | true |
1c1b077943d634b3ddcf5ee470855179b8308e9c | 701 | py | Python | mmcv/fileio/handlers/yaml_handler.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | mmcv/fileio/handlers/yaml_handler.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | mmcv/fileio/handlers/yaml_handler.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import yaml
try:
from yaml import CDumper as Dumper
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader, Dumper # type: ignore
from .base import BaseFileHandler # isort:skip
class YamlHandler(BaseFileHandler):
def load_fro... | 26.961538 | 51 | 0.680456 |
import yaml
try:
from yaml import CDumper as Dumper
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader, Dumper
from .base import BaseFileHandler
class YamlHandler(BaseFileHandler):
def load_from_fileobj(self, file, **kwargs):
kwargs.setdefault('Loader', Load... | true | true |
1c1b07d3f5b1a8c4bc835d871b18f2519e9ad590 | 15,817 | py | Python | autotest/ogr/ogr_rfc35_sqlite.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/ogr/ogr_rfc35_sqlite.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/ogr/ogr_rfc35_sqlite.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test RFC35 for SQLite driver
# Author: Even Rouault <even dot rouault at mines dash paris dot org>
#
##############################################################... | 29.022018 | 112 | 0.617437 | true | true | |
1c1b082d78a8d6ba3182f23d1d2041f2c8252ee2 | 44,894 | py | Python | 04Cuarto/Procesamiento_Digital_de_Seniales_PDS/Tema1/Practica1/src/controller/Controllers.py | elsudano/Facultad | 8ff2c5904f0a38a3a0682e040da4439f2bc872f2 | [
"MIT"
] | 2 | 2017-02-20T09:26:42.000Z | 2021-11-21T21:56:35.000Z | 04Cuarto/Procesamiento_Digital_de_Seniales_PDS/Tema1/Practica1/src/controller/Controllers.py | elsudano/Facultad | 8ff2c5904f0a38a3a0682e040da4439f2bc872f2 | [
"MIT"
] | 1 | 2016-10-06T16:59:39.000Z | 2017-09-21T08:04:51.000Z | 04Cuarto/Procesamiento_Digital_de_Seniales_PDS/Tema1/Practica1/src/controller/Controllers.py | elsudano/Facultad | 8ff2c5904f0a38a3a0682e040da4439f2bc872f2 | [
"MIT"
] | 4 | 2016-10-06T16:41:01.000Z | 2019-11-21T12:37:20.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""Lista de controladores del programa.
En este fichero podemos encontrarnos todos los controladores,
de todas las vistas de nuestro programa.
"""
from src.controller.Controller import Controller, Path
from src.model.Models import *
from src.controller.Controllers import *
fr... | 38.502573 | 161 | 0.559362 |
from src.controller.Controller import Controller, Path
from src.model.Models import *
from src.controller.Controllers import *
from src.view_app.Views import *
class EjerciciosTema1Controller(Controller):
def back(self, event):
model = MainModel()
controller = MainController(self._window, mode... | true | true |
1c1b0831207c9aa5779c53af92469e11e2730962 | 5,296 | py | Python | python/demo_bottom_up.py | simsong/dp-demo | c7ae7b96a1d957413b4ede3ce3a0e39803d07f3b | [
"Unlicense"
] | null | null | null | python/demo_bottom_up.py | simsong/dp-demo | c7ae7b96a1d957413b4ede3ce3a0e39803d07f3b | [
"Unlicense"
] | 1 | 2020-01-24T21:02:49.000Z | 2020-01-24T21:02:49.000Z | python/demo_bottom_up.py | simsong/dp-demo | c7ae7b96a1d957413b4ede3ce3a0e39803d07f3b | [
"Unlicense"
] | 2 | 2020-04-11T06:02:33.000Z | 2020-10-26T04:53:44.000Z | #!/usr/bin/env python3
#
# Demonstrate the bottom-up mechanism
import math
import random
import numpy
import sys
import copy
import statistics
if sys.version < '3':
raise RuntimeError("Requires Python 3")
#
# misc support functions
def l1_error(acounts,bcounts):
error = 0
for key in set(list(acounts.ke... | 32.89441 | 101 | 0.613671 |
import math
import random
import numpy
import sys
import copy
import statistics
if sys.version < '3':
raise RuntimeError("Requires Python 3")
def l1_error(acounts,bcounts):
error = 0
for key in set(list(acounts.keys()) + list(bcounts.keys())):
error += math.fabs( acounts.get(key,0) - bcount... | true | true |
1c1b083c99f9da53418ed1649f49de141528467a | 46,867 | py | Python | mslib/msui/mpl_qtwidget.py | iamansoni/MSS | 69bc8fc61ab277697ca691119f911382a63860c0 | [
"Apache-2.0"
] | null | null | null | mslib/msui/mpl_qtwidget.py | iamansoni/MSS | 69bc8fc61ab277697ca691119f911382a63860c0 | [
"Apache-2.0"
] | null | null | null | mslib/msui/mpl_qtwidget.py | iamansoni/MSS | 69bc8fc61ab277697ca691119f911382a63860c0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
mslib.msui.mpl_qtwidget
~~~~~~~~~~~~~~~~~~~~~~~
Definitions of Matplotlib widgets for Qt Designer.
This file is part of mss.
:copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V.
:copyright: Copyright 2011-2014 Marc Rautenhaus (mr)
:c... | 40.718506 | 114 | 0.598652 |
from datetime import datetime
import enum
import os
import six
import logging
import numpy as np
import matplotlib
from fs import open_fs
from fslib.fs_filepicker import getSaveFileNameAndFilter
from matplotlib import cbook, figure
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT, FigureCanvasQT... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.