hexsha stringlengths 40 40 | size int64 4 996k | ext stringclasses 8
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 4 996k | avg_line_length float64 1.33 58.2k | max_line_length int64 2 323k | alphanum_fraction float64 0 0.97 | content_no_comment stringlengths 0 946k | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7906a9002d9b962b9ff94717c0dc4f5257c7ed23 | 1,378 | py | Python | script.py | VeeraTamizhan/Unlimited-filter-bot-RJ | 48db295558594424b4d0fe9ae8be4db5959d5abf | [
"MIT"
] | null | null | null | script.py | VeeraTamizhan/Unlimited-filter-bot-RJ | 48db295558594424b4d0fe9ae8be4db5959d5abf | [
"MIT"
] | null | null | null | script.py | VeeraTamizhan/Unlimited-filter-bot-RJ | 48db295558594424b4d0fe9ae8be4db5959d5abf | [
"MIT"
] | 1 | 2022-02-24T05:11:34.000Z | 2022-02-24T05:11:34.000Z | class Script(object):
START_MSG = """<b>Hello {} How are you🌹,
I'm an advanced filter bot with many capabilities!
Edit By @Yash_607
See <i>/help</i> for commands and more details.</b>
"""
HELP_MSG = """
<i>Add me as admin in your group and start filtering :)</i>
<b>Basic Commands;</b>
/start - Check if... | 21.53125 | 120 | 0.650943 | class Script(object):
START_MSG = """<b>Hello {} How are you🌹,
I'm an advanced filter bot with many capabilities!
Edit By @Yash_607
See <i>/help</i> for commands and more details.</b>
"""
HELP_MSG = """
<i>Add me as admin in your group and start filtering :)</i>
<b>Basic Commands;</b>
/start - Check if... | true | true |
7906ac20be35639ab45e657772265dd2cc118913 | 6,672 | py | Python | plotting/thumbnails_warm.py | brberg/stokes-crevasse-advection | c5996d0330de5971381b4d0a9543c784b94a8918 | [
"MIT"
] | null | null | null | plotting/thumbnails_warm.py | brberg/stokes-crevasse-advection | c5996d0330de5971381b4d0a9543c784b94a8918 | [
"MIT"
] | null | null | null | plotting/thumbnails_warm.py | brberg/stokes-crevasse-advection | c5996d0330de5971381b4d0a9543c784b94a8918 | [
"MIT"
] | null | null | null | from __future__ import division
import numpy as np
import sys
import os
import shutil
import vtk
from vtk.util.numpy_support import vtk_to_numpy
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib.animation as animation
import matplotlib.colors as mcolors
import argparse... | 37.066667 | 164 | 0.601169 | from __future__ import division
import numpy as np
import sys
import os
import shutil
import vtk
from vtk.util.numpy_support import vtk_to_numpy
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib.animation as animation
import matplotlib.colors as mcolors
import argparse... | true | true |
7906ae1847200efd26fbe70e67f61de4a3ca4af8 | 3,430 | py | Python | nova/api/openstack/compute/plugins/v3/pause_server.py | vasart/nova | bca5004d367e0418e35f8a72fe0f2e106e977ab0 | [
"Apache-2.0"
] | 1 | 2021-09-10T15:29:02.000Z | 2021-09-10T15:29:02.000Z | nova/api/openstack/compute/plugins/v3/pause_server.py | PFZheng/nova | 84be8abbccb5ddc2d7c5a7db59019ed1edb19e7f | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/pause_server.py | PFZheng/nova | 84be8abbccb5ddc2d7c5a7db59019ed1edb19e7f | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# Copyright 2013 IBM Corp.
#
# 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... | 36.88172 | 79 | 0.680466 |
import webob
from webob import exc
from nova.api.openstack import common
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova import compute
from nova import exception
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
ALIAS = "os-pause... | true | true |
7906af3a6870c8c32f4ef707eafb3a1c947bca32 | 1,428 | py | Python | aiothrift/errors.py | achimnol/aiothrift | 8d46e78e7d5f0c5eccf8e1afaf73786e2077b06b | [
"MIT"
] | null | null | null | aiothrift/errors.py | achimnol/aiothrift | 8d46e78e7d5f0c5eccf8e1afaf73786e2077b06b | [
"MIT"
] | null | null | null | aiothrift/errors.py | achimnol/aiothrift | 8d46e78e7d5f0c5eccf8e1afaf73786e2077b06b | [
"MIT"
] | null | null | null | from thriftpy2.thrift import TType
class ThriftError(Exception):
""" Base Exception defined by `aiothrift` """
class ConnectionClosedError(ThriftError):
"""Raised if connection to server was closed."""
class PoolClosedError(ThriftError):
"""Raised when operating on a closed thrift connection pool"""
... | 26.444444 | 66 | 0.633053 | from thriftpy2.thrift import TType
class ThriftError(Exception):
class ConnectionClosedError(ThriftError):
class PoolClosedError(ThriftError):
class ThriftAppError(ThriftError):
thrift_spec = {
1: (TType.STRING, 'message', False),
2: (TType.I32, 'type', False),
}
UNKNOWN = 0
UN... | true | true |
7906af5dc7d6b3501b3f0ae5b91b007ee13c7bdf | 1,077 | py | Python | MDRSREID/utils/data_utils/transforms/torch_transforms/__init__.py | nickhuang1996/HJL-re-id | 107b25f31c961f360f69560cfddd78dfc0da3291 | [
"MIT"
] | 43 | 2020-09-20T09:40:04.000Z | 2022-03-29T11:25:22.000Z | MDRSREID/utils/data_utils/transforms/torch_transforms/__init__.py | nickhuang1996/HJL-re-id | 107b25f31c961f360f69560cfddd78dfc0da3291 | [
"MIT"
] | 19 | 2020-10-05T05:35:38.000Z | 2021-12-10T03:17:31.000Z | MDRSREID/utils/data_utils/transforms/torch_transforms/__init__.py | nickhuang1996/HJL-re-id | 107b25f31c961f360f69560cfddd78dfc0da3291 | [
"MIT"
] | 18 | 2020-10-01T14:41:53.000Z | 2021-09-02T06:57:57.000Z | from .hflip import hflip
from .resize import resize
from .pad import pad
from .random_crop import random_crop
from .to_tensor import to_tensor
from .random_erasing import random_erasing
from .random_sized_rect_crop import random_sized_rect_crop
def transforms(item, cfg, mode):
"""
:param item: sample = deepco... | 34.741935 | 97 | 0.717734 | from .hflip import hflip
from .resize import resize
from .pad import pad
from .random_crop import random_crop
from .to_tensor import to_tensor
from .random_erasing import random_erasing
from .random_sized_rect_crop import random_sized_rect_crop
def transforms(item, cfg, mode):
transforms_dataset_factory = {
... | true | true |
7906af9f7b6248cbd3ecd63984c6b97e4c8ac39a | 12,634 | py | Python | Ransomulator/ransomulator.py | naul1/BloodHound-Tools | 3b2dfcfbae0b64de32daabcd6fe1c9ac205c62a8 | [
"Apache-2.0"
] | null | null | null | Ransomulator/ransomulator.py | naul1/BloodHound-Tools | 3b2dfcfbae0b64de32daabcd6fe1c9ac205c62a8 | [
"Apache-2.0"
] | null | null | null | Ransomulator/ransomulator.py | naul1/BloodHound-Tools | 3b2dfcfbae0b64de32daabcd6fe1c9ac205c62a8 | [
"Apache-2.0"
] | null | null | null | from neo4j import GraphDatabase
from argparse import ArgumentParser
from concurrent.futures import ThreadPoolExecutor,as_completed,thread
import sys
import csv
from time import time
PRACTICAL = 'practical'
LOGICAL = 'logical'
NETONLY = 'netonly'
ALL = 'all'
PRIVS = 'privileged'
rans = None
def time_to_str(total_time)... | 45.941818 | 294 | 0.620389 | from neo4j import GraphDatabase
from argparse import ArgumentParser
from concurrent.futures import ThreadPoolExecutor,as_completed,thread
import sys
import csv
from time import time
PRACTICAL = 'practical'
LOGICAL = 'logical'
NETONLY = 'netonly'
ALL = 'all'
PRIVS = 'privileged'
rans = None
def time_to_str(total_time)... | true | true |
7906b06464613a5924f46ed3e2eb398049fa0b75 | 598 | py | Python | pfrl/wrappers/__init__.py | g-votte/pfrl | 4c30c1d73f0941a2b649b62937eec346bb55a95e | [
"MIT"
] | 1 | 2021-07-07T04:23:56.000Z | 2021-07-07T04:23:56.000Z | pfrl/wrappers/__init__.py | g-votte/pfrl | 4c30c1d73f0941a2b649b62937eec346bb55a95e | [
"MIT"
] | null | null | null | pfrl/wrappers/__init__.py | g-votte/pfrl | 4c30c1d73f0941a2b649b62937eec346bb55a95e | [
"MIT"
] | null | null | null | from pfrl.wrappers.cast_observation import CastObservation # NOQA
from pfrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from pfrl.wrappers.continuing_time_limit import ContinuingTimeLimit # NOQA
from pfrl.wrappers.monitor import Monitor # NOQA
from pfrl.wrappers.normalize_action_space import... | 35.176471 | 77 | 0.837793 | from pfrl.wrappers.cast_observation import CastObservation
from pfrl.wrappers.cast_observation import CastObservationToFloat32
from pfrl.wrappers.continuing_time_limit import ContinuingTimeLimit
from pfrl.wrappers.monitor import Monitor
from pfrl.wrappers.normalize_action_space import NormalizeActionSpace
... | true | true |
7906b0e143504da4fc4f5976052ebd0cd9d3a193 | 3,552 | py | Python | chp/babel/bkb-service.py | di2ag/bkb-pathway-provider | 42824f22868c5c5d777da3facb4209744bcc6f96 | [
"MIT"
] | null | null | null | chp/babel/bkb-service.py | di2ag/bkb-pathway-provider | 42824f22868c5c5d777da3facb4209744bcc6f96 | [
"MIT"
] | 7 | 2021-01-13T22:25:46.000Z | 2021-07-29T15:26:06.000Z | chp/babel/bkb-service.py | NCATSTranslator/chp | 00668fd3d50a48fdd75abbeacaf173a3ad41942d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:06:24.000Z | 2021-01-26T15:02:12.000Z | '''
Source code developed by DI2AG.
Thayer School of Engineering at Dartmouth College
Authors: Dr. Eugene Santos, Jr
Mr. Chase Yakaboski,
Mr. Gregory Hyde,
Dr. Keum Joo Kim
'''
import json
import argparse
import os
import sys
import pickle
import subprocess
from chp.query impor... | 32.290909 | 93 | 0.670045 |
import json
import argparse
import os
import sys
import pickle
import subprocess
from chp.query import Query
PASSED_JSON_FILE = '/home/cyakaboski/passed_message.json'
NODE = 'c-dell-m630-0-11'
SAVE_DIR = '/home/cyakaboski/temp'
BKB_PATHWAY_CORE_DIR = '/home/cyakaboski/src/python/projects/bkb-pathway-provider/core'
... | true | true |
7906b1c9c9b2cb9c0ee481bcc7b16dc8a067b502 | 1,513 | py | Python | collectors/icdpcs/collector.py | almeidaah/collectors | f03096855b8d702969d22af0b20a4d6a0d820bd0 | [
"MIT"
] | 17 | 2016-06-28T21:20:21.000Z | 2022-03-02T16:31:25.000Z | collectors/icdpcs/collector.py | almeidaah/collectors | f03096855b8d702969d22af0b20a4d6a0d820bd0 | [
"MIT"
] | 41 | 2016-04-04T10:36:45.000Z | 2017-04-24T10:04:57.000Z | collectors/icdpcs/collector.py | kenferrara/collectors | e6c1f45df3a1ffd5d60dada1816484812eb51417 | [
"MIT"
] | 25 | 2016-05-18T09:27:42.000Z | 2021-03-21T14:44:31.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import logging
import zipfile
import requests
from .record import Record
logger = logging.getLogger(__name__)
# Module API
def collec... | 27.017857 | 95 | 0.62657 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import logging
import zipfile
import requests
from .record import Record
logger = logging.getLogger(__name__)
def collect(conf, conn):
URL =... | true | true |
7906b272f32ab34bfbf3c74814bd934fbc3f5cc8 | 533 | py | Python | src/ppb/cli/sub_cmd/_sub_command.py | Stibbons/python-project-bootstrap | b7956e272c4e36171b1d9f2fe9e7cbd271bd3b0d | [
"BSD-3-Clause"
] | null | null | null | src/ppb/cli/sub_cmd/_sub_command.py | Stibbons/python-project-bootstrap | b7956e272c4e36171b1d9f2fe9e7cbd271bd3b0d | [
"BSD-3-Clause"
] | null | null | null | src/ppb/cli/sub_cmd/_sub_command.py | Stibbons/python-project-bootstrap | b7956e272c4e36171b1d9f2fe9e7cbd271bd3b0d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class SubCommand(object):
name = NotImplementedError("Please add 'name' member in your SubCommand")
help = NotImplementedError("Please add 'help' member in your SubCommand")
def addParser(self, pa... | 35.533333 | 91 | 0.765478 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class SubCommand(object):
name = NotImplementedError("Please add 'name' member in your SubCommand")
help = NotImplementedError("Please add 'help' member in your SubCommand")
def addParser(self, pa... | true | true |
7906b276f5d1f2ed5dbd89e8be1217ecadfc7062 | 19,441 | py | Python | test/test_json_util.py | nloadholtes/mongo-python-driver | 2818a32855a53799b58343bff0a46c5227057b19 | [
"Apache-2.0"
] | 1 | 2021-12-14T12:44:24.000Z | 2021-12-14T12:44:24.000Z | test/test_json_util.py | nloadholtes/mongo-python-driver | 2818a32855a53799b58343bff0a46c5227057b19 | [
"Apache-2.0"
] | null | null | null | test/test_json_util.py | nloadholtes/mongo-python-driver | 2818a32855a53799b58343bff0a46c5227057b19 | [
"Apache-2.0"
] | null | null | null | # Copyright 2009-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 43.10643 | 79 | 0.581503 |
import datetime
import json
import re
import sys
import uuid
sys.path[0:0] = [""]
from bson import json_util, EPOCH_AWARE, SON
from bson.json_util import (DatetimeRepresentation,
STRICT_JSON_OPTIONS)
from bson.binary import (ALL_UUID_REPRESENTATIONS, Binary, MD5_SUBTYPE,
... | true | true |
7906b47936f6cb37291765cf70cb2349d6b0a257 | 219 | py | Python | django_c3po/signals.py | VorskiImagineering/django-C3PO | cd2c9b246fbae3f3d95349019d5109ce31101957 | [
"MIT"
] | 1 | 2015-10-27T12:49:50.000Z | 2015-10-27T12:49:50.000Z | django_c3po/signals.py | VorskiImagineering/django-C3PO | cd2c9b246fbae3f3d95349019d5109ce31101957 | [
"MIT"
] | 3 | 2020-02-11T21:28:25.000Z | 2021-06-10T17:24:09.000Z | django_c3po/signals.py | VorskiImagineering/django-C3PO | cd2c9b246fbae3f3d95349019d5109ce31101957 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import django.dispatch
# Signal to inform application about ready .mo files, so server will know
# when to restart itself.
post_compilemessages = django.dispatch.Signal()
| 24.333333 | 73 | 0.739726 |
import django.dispatch
post_compilemessages = django.dispatch.Signal()
| true | true |
7906b5583ffd22b17313c6cdb7aeef3b364df4c7 | 21,082 | py | Python | src/pnumpy/sort.py | Quansight/pnumpy | 59d430f74168539a0710321c4eecb53d25db4833 | [
"MIT"
] | 24 | 2021-02-18T12:05:08.000Z | 2021-12-13T07:46:03.000Z | src/pnumpy/sort.py | Quansight/numpy-threading-extensions | 59d430f74168539a0710321c4eecb53d25db4833 | [
"MIT"
] | 63 | 2020-09-02T19:14:10.000Z | 2021-01-26T07:04:09.000Z | src/pnumpy/sort.py | Quansight/numpy-threading-extensions | 59d430f74168539a0710321c4eecb53d25db4833 | [
"MIT"
] | 9 | 2020-09-08T15:27:13.000Z | 2021-01-21T16:50:02.000Z | import os
import sys
__all__ = [
'lexsort','sort', 'argsort','argmin', 'argmax', 'searchsorted']
from pnumpy._pnumpy import getitem, lexsort32, lexsort64
import numpy as np
from numpy import asarray, array, asanyarray
from numpy import concatenate
#array_function_dispatch = functools.partial(
# overrides.arr... | 33.043887 | 94 | 0.591737 | import os
import sys
__all__ = [
'lexsort','sort', 'argsort','argmin', 'argmax', 'searchsorted']
from pnumpy._pnumpy import getitem, lexsort32, lexsort64
import numpy as np
from numpy import asarray, array, asanyarray
from numpy import concatenate
def _wrapit(obj, method, *args, **kwds):
try:
wr... | true | true |
7906b6a1d04a573799d11505d8ba6ad46b7056ce | 26,863 | py | Python | mbreplacer.py | ackhoury/mbreplacer | aea17fb0cc6e8c17c0ffb81560e9ecab0f8dc0ee | [
"MIT"
] | null | null | null | mbreplacer.py | ackhoury/mbreplacer | aea17fb0cc6e8c17c0ffb81560e9ecab0f8dc0ee | [
"MIT"
] | null | null | null | mbreplacer.py | ackhoury/mbreplacer | aea17fb0cc6e8c17c0ffb81560e9ecab0f8dc0ee | [
"MIT"
] | null | null | null | import os
import shutil
import subprocess
import sys
from enum import Enum
from PyQt5 import QtCore
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QMainWindow, QApplication, QListWidgetItem, QFileDialog, QComboBox, QMessageBox, \
QAbstractItemView, QDialogButtonBox, QLabel, QWidget, QPushButton, QListWi... | 46.881326 | 123 | 0.654395 | import os
import shutil
import subprocess
import sys
from enum import Enum
from PyQt5 import QtCore
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QMainWindow, QApplication, QListWidgetItem, QFileDialog, QComboBox, QMessageBox, \
QAbstractItemView, QDialogButtonBox, QLabel, QWidget, QPushButton, QListWi... | true | true |
7906b6df6ae9fa0e10762b9a6e8c27d7ce6cddf4 | 25,614 | py | Python | SloppyCell/ReactionNetworks/OptDesign.py | robertvsiii/sloppycell | caf6daa09f2202acccf26ad31890fddaf4af82e8 | [
"BSD-3-Clause"
] | null | null | null | SloppyCell/ReactionNetworks/OptDesign.py | robertvsiii/sloppycell | caf6daa09f2202acccf26ad31890fddaf4af82e8 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T21:08:12.000Z | 2019-04-15T21:08:12.000Z | SloppyCell/ReactionNetworks/OptDesign.py | jurquiza/SloppyCellUrquiza2019 | a9f64d9d4172c82735813f09e48f36777a714e9c | [
"BSD-3-Clause"
] | null | null | null | import scipy, copy
import SloppyCell.Utility
load = SloppyCell.Utility.load
save = SloppyCell.Utility.save
import SloppyCell.ReactionNetworks.Dynamics as Dynamics
try:
import SloppyCell.Plotting as Plotting
except ImportError:
pass
def setup(paramfile,calcobject,senstrajfile,jtjfile) :
""" Set up the quan... | 43.487267 | 111 | 0.666979 | import scipy, copy
import SloppyCell.Utility
load = SloppyCell.Utility.load
save = SloppyCell.Utility.save
import SloppyCell.ReactionNetworks.Dynamics as Dynamics
try:
import SloppyCell.Plotting as Plotting
except ImportError:
pass
def setup(paramfile,calcobject,senstrajfile,jtjfile) :
""" Set up the quan... | false | true |
7906b78142c8c770febd3d20161bc5a68a398b79 | 1,463 | py | Python | byteslib/byteslib.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | null | null | null | byteslib/byteslib.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | null | null | null | byteslib/byteslib.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | null | null | null | # This file is part of the standard library of Pycopy project, minimalist
# and lightweight Python implementation.
#
# https://github.com/pfalcon/pycopy
# https://github.com/pfalcon/pycopy-lib
#
# The MIT License (MIT)
#
# Copyright (c) 2019 Paul Sokolovsky
#
# Permission is hereby granted, free of charge, to any perso... | 36.575 | 79 | 0.762816 |
import ubinascii
def hex(s):
s = ubinascii.hexlify(s)
s.__class__ = str
return s
def fromhex(s):
return ubinascii.unhexlify(s)
| true | true |
7906b7a30acc043e9f8e405399c3c6e7f070657b | 6,101 | py | Python | cogdl/datasets/gtn_data.py | YeWR/cogdl | 5be13cda808c44333f7059db11d13a1d0f190ffa | [
"MIT"
] | 1 | 2020-07-20T07:14:50.000Z | 2020-07-20T07:14:50.000Z | cogdl/datasets/gtn_data.py | YeWR/cogdl | 5be13cda808c44333f7059db11d13a1d0f190ffa | [
"MIT"
] | null | null | null | cogdl/datasets/gtn_data.py | YeWR/cogdl | 5be13cda808c44333f7059db11d13a1d0f190ffa | [
"MIT"
] | 1 | 2021-06-17T02:44:09.000Z | 2021-06-17T02:44:09.000Z | import sys
import time
import os
import os.path as osp
import requests
import shutil
import tqdm
import pickle
import numpy as np
import torch
from cogdl.data import Data, Dataset, download_url
from . import register_dataset
def untar(path, fname, deleteTar=True):
"""
Unpacks the given archive file to the ... | 36.100592 | 113 | 0.626946 | import sys
import time
import os
import os.path as osp
import requests
import shutil
import tqdm
import pickle
import numpy as np
import torch
from cogdl.data import Data, Dataset, download_url
from . import register_dataset
def untar(path, fname, deleteTar=True):
print('unpacking ' + fname)
fullpath = os.... | true | true |
7906b826eedb6c679be883125d7818f139c7bc16 | 2,365 | py | Python | jedeschule/spiders/brandenburg.py | MartinGer/jedeschule-scraper | 107a3f5c907c5e1b232813a31bfdea90586e9424 | [
"MIT"
] | 1 | 2021-11-07T08:28:32.000Z | 2021-11-07T08:28:32.000Z | jedeschule/spiders/brandenburg.py | canbuffi/jedeschule-scraper | ec3c23d9e90a2bc65786fdc8b3ba0951b82c343a | [
"MIT"
] | null | null | null | jedeschule/spiders/brandenburg.py | canbuffi/jedeschule-scraper | ec3c23d9e90a2bc65786fdc8b3ba0951b82c343a | [
"MIT"
] | null | null | null | from typing import List, Optional
import scrapy
from scrapy import Item
from jedeschule.items import School
from jedeschule.spiders.school_spider import SchoolSpider
def first_or_none(item: List) -> Optional[str]:
try:
return item[0]
except IndexError:
return None
class BrandenburgSpider(S... | 36.953125 | 113 | 0.556871 | from typing import List, Optional
import scrapy
from scrapy import Item
from jedeschule.items import School
from jedeschule.spiders.school_spider import SchoolSpider
def first_or_none(item: List) -> Optional[str]:
try:
return item[0]
except IndexError:
return None
class BrandenburgSpider(S... | true | true |
7906ba67702c082084572deb9f733367c5f26f5d | 1,964 | py | Python | check_kubernetes_health.py | adolci/nagios-plugins | 0d8cee0376467922b3315e9b0e08b98454eb9853 | [
"IBM-pibs",
"Apache-1.1"
] | null | null | null | check_kubernetes_health.py | adolci/nagios-plugins | 0d8cee0376467922b3315e9b0e08b98454eb9853 | [
"IBM-pibs",
"Apache-1.1"
] | null | null | null | check_kubernetes_health.py | adolci/nagios-plugins | 0d8cee0376467922b3315e9b0e08b98454eb9853 | [
"IBM-pibs",
"Apache-1.1"
] | 3 | 2019-07-25T11:46:32.000Z | 2019-12-17T05:01:03.000Z | #!/usr/bin/env python
# coding=utf-8
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2019-02-26 18:30:53 +0000 (Tue, 26 Feb 2019)
#
# https://github.com/harisekhon/nagios-plugins
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on Linke... | 24.860759 | 77 | 0.678717 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import sys
import traceback
srcdir = os.path.abspath(os.path.dirname(__file__))
libdir = os.path.join(srcdir, 'pylib')
sys.path.append(libdir)... | true | true |
7906badac10c4f17011c51caf1b4ac03048d0a89 | 4,102 | py | Python | my_cv/utils/cv2_util.py | strawsyz/straw | db313c78c2e3c0355cd10c70ac25a15bb5632d41 | [
"MIT"
] | 2 | 2020-04-06T09:09:19.000Z | 2020-07-24T03:59:55.000Z | my_cv/utils/cv2_util.py | strawsyz/straw | db313c78c2e3c0355cd10c70ac25a15bb5632d41 | [
"MIT"
] | null | null | null | my_cv/utils/cv2_util.py | strawsyz/straw | db313c78c2e3c0355cd10c70ac25a15bb5632d41 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from PIL import Image
def draw_approx_polyDP(cnt, epsilon=0.01, closed=True):
"""用多边形来近似的表示曲线"""
epsilon = epsilon * cv2.arcLength(cnt, closed) # 得到轮廓的周长信息作为参考值
return cv2.approxPolyDP(cnt, epsilon, closed) # 得到近似多边形框
def draw_convex_hull(cnt):
"""画凸包,传入的是一些点"""
r... | 27.904762 | 100 | 0.661628 | import cv2
import numpy as np
from PIL import Image
def draw_approx_polyDP(cnt, epsilon=0.01, closed=True):
epsilon = epsilon * cv2.arcLength(cnt, closed)
return cv2.approxPolyDP(cnt, epsilon, closed)
def draw_convex_hull(cnt):
return cv2.convexHull(cnt)
def show_img(file_name, window_name='win'... | true | true |
7906bc27a9fc98555f24a38f4ddded576b827768 | 8,569 | py | Python | ginga/util/io_fits.py | Rbeaty88/ginga | 08451a81288b8defc54aa9f9e2af23a9ba32e985 | [
"BSD-3-Clause"
] | 1 | 2016-03-21T15:56:15.000Z | 2016-03-21T15:56:15.000Z | ginga/util/io_fits.py | Rbeaty88/ginga | 08451a81288b8defc54aa9f9e2af23a9ba32e985 | [
"BSD-3-Clause"
] | null | null | null | ginga/util/io_fits.py | Rbeaty88/ginga | 08451a81288b8defc54aa9f9e2af23a9ba32e985 | [
"BSD-3-Clause"
] | null | null | null | #
# io_fits.py -- Module wrapper for loading FITS files.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
"""
There are two possible choices for a python FITS file readi... | 30.494662 | 95 | 0.566227 |
"""
There are two possible choices for a python FITS file reading package
compatible with Ginga: astropy/pyfits and fitsio. Both are based on
the CFITSIO library, although it seems that astropy's version has
changed quite a bit from the original, while fitsio is still tracking
the current version.
To force ... | false | true |
7906bd00579953df340b1dd174133b25cd063576 | 3,165 | py | Python | a_full_model.py | PiotrKrasnowski/Speech_Encryption | 305a01b82aabb03bedc9036dd69fe18df90ef57b | [
"MIT"
] | null | null | null | a_full_model.py | PiotrKrasnowski/Speech_Encryption | 305a01b82aabb03bedc9036dd69fe18df90ef57b | [
"MIT"
] | null | null | null | a_full_model.py | PiotrKrasnowski/Speech_Encryption | 305a01b82aabb03bedc9036dd69fe18df90ef57b | [
"MIT"
] | 1 | 2021-05-01T09:36:48.000Z | 2021-05-01T09:36:48.000Z | import numpy as np
import matplotlib.pyplot as plt
import time
from copy import copy
import os
from single_pitch import single_pitch
from channel import channel
from pseudo_speech import Pseudospeech_Synthetizer_class
from encryption import Encryption_class
from speech_analyzer import Speech_Analyzer_class
from speec... | 29.579439 | 177 | 0.740916 | import numpy as np
import matplotlib.pyplot as plt
import time
from copy import copy
import os
from single_pitch import single_pitch
from channel import channel
from pseudo_speech import Pseudospeech_Synthetizer_class
from encryption import Encryption_class
from speech_analyzer import Speech_Analyzer_class
from speec... | true | true |
7906bd059365b8b3b4c837fe3a8ac573659593ac | 2,249 | py | Python | scent.py | jacebrowning/AI-WS | 31942e85233b5d55f52f668daf9ef91d168e91b6 | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | scent.py | jacebrowning/AI-WS | 31942e85233b5d55f52f668daf9ef91d168e91b6 | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | scent.py | jacebrowning/AI-WS | 31942e85233b5d55f52f668daf9ef91d168e91b6 | [
"Apache-2.0",
"BSD-2-Clause"
] | 9 | 2018-01-04T05:32:39.000Z | 2018-03-24T02:41:28.000Z | # -*- coding: utf-8 -*-
"""Configuration file for sniffer."""
# pylint: disable=superfluous-parens,bad-continuation
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notif... | 22.94898 | 78 | 0.636727 |
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ["flask_api"]
class Options(object):
group = int(time.time())
show_coverage = False
... | true | true |
7906bd20606532645f93c443038fb7d43a0b0c56 | 10,572 | py | Python | modules/nashequilibrium.py | benedictvs/FOCS-Calculator | 25dad4c6624be1950ce21594b4127c05be20b121 | [
"MIT"
] | 1 | 2021-11-22T21:54:28.000Z | 2021-11-22T21:54:28.000Z | modules/nashequilibrium.py | benedictvs/FOCS-Calculator | 25dad4c6624be1950ce21594b4127c05be20b121 | [
"MIT"
] | 34 | 2021-10-07T22:55:23.000Z | 2021-12-06T00:48:55.000Z | modules/nashequilibrium.py | benedictvs/FOCS-Calculator | 25dad4c6624be1950ce21594b4127c05be20b121 | [
"MIT"
] | 1 | 2021-10-18T23:33:44.000Z | 2021-10-18T23:33:44.000Z | from abstractclasses import solver, solver_model
"""
The Nash equilibrium solver takes a payoff matrix from game theory,
then it solves for a nash equilibrium, if one exists.
"""
# ————————————————————————————————————————————————
# NASH EQUILIBRIUM SOLVER CLASS
# ————————————————————————————————————————————————
cl... | 35.006623 | 79 | 0.404748 | from abstractclasses import solver, solver_model
class nash_equilibrium_solver(solver):
def format_payoff_matrix(
self,
payoff_matrix: list,
player_1_strategies: list,
player_2_strategies: list,
) -> str:
ret = "\t Player 1\n"
ret += "\t " + pl... | true | true |
7906bdc7eeb824c707621cf046e5d99696ba3c84 | 546 | py | Python | runtests.py | eshares/django-lockdown | c7efb3cddf521eea9e299917bb86be501a3415dc | [
"BSD-3-Clause"
] | null | null | null | runtests.py | eshares/django-lockdown | c7efb3cddf521eea9e299917bb86be501a3415dc | [
"BSD-3-Clause"
] | null | null | null | runtests.py | eshares/django-lockdown | c7efb3cddf521eea9e299917bb86be501a3415dc | [
"BSD-3-Clause"
] | 2 | 2021-03-04T22:25:35.000Z | 2021-03-05T00:27:42.000Z | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
def runtests(*test_args):
"""Setup and run django-lockdowns test suite."""
os.environ['DJANGO_SETTINGS_MODULE'] = 'lockdown.tests.test_settings'
django.setup()
if not ... | 20.222222 | 73 | 0.705128 |
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
def runtests(*test_args):
os.environ['DJANGO_SETTINGS_MODULE'] = 'lockdown.tests.test_settings'
django.setup()
if not test_args:
test_args = ['lockdown.tests']
test_runner = get_r... | true | true |
7906bddcf68956fa040b9b3e181f0109c06602d0 | 3,094 | py | Python | bayes_implicit_solvent/rjmc_experiments/tree_rjmc2.py | openforcefield/bayes-implicit-solvent | 067239fcbb8af28eb6310d702804887662692ec2 | [
"MIT"
] | 4 | 2019-11-12T16:23:26.000Z | 2021-07-01T05:37:37.000Z | bayes_implicit_solvent/rjmc_experiments/tree_rjmc2.py | openforcefield/bayes-implicit-solvent | 067239fcbb8af28eb6310d702804887662692ec2 | [
"MIT"
] | 4 | 2019-01-18T22:05:03.000Z | 2019-11-12T18:37:31.000Z | bayes_implicit_solvent/rjmc_experiments/tree_rjmc2.py | openforcefield/bayes-implicit-solvent | 067239fcbb8af28eb6310d702804887662692ec2 | [
"MIT"
] | 2 | 2019-12-02T20:23:56.000Z | 2021-03-25T23:28:36.000Z | import numpy as np
from bayes_implicit_solvent.continuous_parameter_experiments.elemental_types_mh import log_prior, mols, ll, data_path, \
smiles
smiles_list = smiles
from bayes_implicit_solvent.typers import RADIUS_UNIT
from bayes_implicit_solvent.freesolv import smiles_list
from bayes_implicit_solvent.typers ... | 34.764045 | 128 | 0.723659 | import numpy as np
from bayes_implicit_solvent.continuous_parameter_experiments.elemental_types_mh import log_prior, mols, ll, data_path, \
smiles
smiles_list = smiles
from bayes_implicit_solvent.typers import RADIUS_UNIT
from bayes_implicit_solvent.freesolv import smiles_list
from bayes_implicit_solvent.typers ... | true | true |
7906be01ad0bc584794a825f60475442d7cbe8b7 | 28,398 | py | Python | src/static_analyzer/Gadget.py | michaelbrownuc/GadgetSetAnalyzer | 40eeb0b9f055b19715de0ea4ed1f9acca92059ad | [
"MIT"
] | 10 | 2019-08-17T00:44:52.000Z | 2022-03-29T02:58:40.000Z | src/static_analyzer/Gadget.py | michaelbrownuc/GadgetSetAnalyzer | 40eeb0b9f055b19715de0ea4ed1f9acca92059ad | [
"MIT"
] | 9 | 2019-08-24T19:04:52.000Z | 2022-03-29T03:18:59.000Z | src/static_analyzer/Gadget.py | michaelbrownuc/GadgetSetAnalyzer | 40eeb0b9f055b19715de0ea4ed1f9acca92059ad | [
"MIT"
] | 2 | 2020-11-21T15:25:59.000Z | 2022-03-02T03:17:25.000Z | """
Gadget class
"""
# Standard Library Imports
# Third Party Imports
# Local Imports
from static_analyzer.Instruction import Instruction
class Gadget(object):
"""
The Gadget class represents a single gadget.
"""
def __init__(self, raw_gadget):
"""
Gadget constructor
:param... | 46.326264 | 120 | 0.610501 |
from static_analyzer.Instruction import Instruction
class Gadget(object):
def __init__(self, raw_gadget):
self.offset = raw_gadget[:raw_gadget.find(":")]
self.instruction_string = raw_gadget[raw_gadget.find(":") + 2:]
self.instructions = []
for instr in s... | true | true |
7906be44b86703163ad627edc3d37ab9a8099270 | 3,129 | py | Python | webui/rest/rest.py | hirolovesbeer/hayabusa2 | 8cf17d7a629af743d983e4506d519d853b2edffc | [
"MIT"
] | 9 | 2018-11-02T05:07:23.000Z | 2020-01-21T08:23:56.000Z | webui/rest/rest.py | hirolovesbeer/hayabusa2 | 8cf17d7a629af743d983e4506d519d853b2edffc | [
"MIT"
] | null | null | null | webui/rest/rest.py | hirolovesbeer/hayabusa2 | 8cf17d7a629af743d983e4506d519d853b2edffc | [
"MIT"
] | 1 | 2019-02-04T01:42:03.000Z | 2019-02-04T01:42:03.000Z |
#
# run this command
# $ FLASK_APP=rest.py flask run
#
# request like this
# curl -X POST -H 'Accept:application/json' -H 'Content-Type:application/json' -d '{"start-time":"2019-05-08 09:15", "end-time":"2019-05-08 09:30", "match":"error", "user":"syslog", "password":"mvEPMNThq94LQuys68gR", "count":"true", "sum":"fals... | 32.257732 | 282 | 0.569191 |
import os
import sys
import tempfile
sys.path.append(os.path.join(os.path.dirname(__file__), '../../lib'))
import logging
from logging.handlers import SysLogHandler
from hayabusa import HayabusaBase
from hayabusa.errors import HayabusaError, CLIClientError
from hayabusa.rest_client import RESTClient
from f... | true | true |
7906bf1c9c5eaae4b80ef6c8de2a027019beb855 | 7,892 | py | Python | runtime/python/Lib/ctypes/test/test_cfuncs.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 207 | 2018-10-01T08:53:01.000Z | 2022-03-14T12:15:54.000Z | Thonny/Lib/ctypes/test/test_cfuncs.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 30 | 2019-01-04T10:14:56.000Z | 2020-10-12T14:00:31.000Z | Thonny/Lib/ctypes/test/test_cfuncs.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 76 | 2020-03-16T01:47:46.000Z | 2022-03-21T16:37:07.000Z | # A lot of failures in these tests on Mac OS X.
# Byte order related?
import unittest
from ctypes import *
from ctypes.test import need_symbol
import _ctypes_test
class CFunctions(unittest.TestCase):
_dll = CDLL(_ctypes_test.__file__)
def S(self):
return c_longlong.in_dll(self._dll, "la... | 37.051643 | 89 | 0.628865 |
import unittest
from ctypes import *
from ctypes.test import need_symbol
import _ctypes_test
class CFunctions(unittest.TestCase):
_dll = CDLL(_ctypes_test.__file__)
def S(self):
return c_longlong.in_dll(self._dll, "last_tf_arg_s").value
def U(self):
return c_ulonglong.in_d... | true | true |
7906bf4e9571695a2376caedc71b4af44619e399 | 4,994 | py | Python | sciencebeam_parser/document/tei/section.py | elifesciences/sciencebeam-parser | 66964f283612b8d6fa8a23ad8790292c1ec07651 | [
"MIT"
] | 13 | 2021-08-04T12:11:17.000Z | 2022-03-28T20:41:20.000Z | sciencebeam_parser/document/tei/section.py | elifesciences/sciencebeam-parser | 66964f283612b8d6fa8a23ad8790292c1ec07651 | [
"MIT"
] | 33 | 2021-08-05T08:37:59.000Z | 2022-03-29T18:42:09.000Z | sciencebeam_parser/document/tei/section.py | elifesciences/sciencebeam-parser | 66964f283612b8d6fa8a23ad8790292c1ec07651 | [
"MIT"
] | 1 | 2022-01-05T14:53:06.000Z | 2022-01-05T14:53:06.000Z | import logging
from typing import (
Iterable,
List,
)
from lxml import etree
from sciencebeam_parser.document.semantic_document import (
SemanticContentWrapper,
SemanticFigure,
SemanticHeading,
SemanticLabel,
SemanticParagraph,
SemanticRawEquation,
SemanticSection,
SemanticSect... | 38.122137 | 97 | 0.696235 | import logging
from typing import (
Iterable,
List,
)
from lxml import etree
from sciencebeam_parser.document.semantic_document import (
SemanticContentWrapper,
SemanticFigure,
SemanticHeading,
SemanticLabel,
SemanticParagraph,
SemanticRawEquation,
SemanticSection,
SemanticSect... | true | true |
7906c00e513938c81191185281255d8fcb089574 | 721 | py | Python | fake.py | ShuaiGao/mini-shop-server | 8a72b2d457bba8778e97637027ffa82bfa11e8a9 | [
"MIT"
] | 1 | 2020-06-13T06:57:53.000Z | 2020-06-13T06:57:53.000Z | fake.py | zyxyuanxiao/mini-shop-server | 90eb5a36b75e680c6f5fe324261fe0c53373cf5a | [
"MIT"
] | 1 | 2019-07-08T12:32:29.000Z | 2019-07-08T12:32:29.000Z | fake.py | ShuaiGao/mini-shop-server | 8a72b2d457bba8778e97637027ffa82bfa11e8a9 | [
"MIT"
] | null | null | null | # _*_ coding: utf-8 _*_
"""
Created by Allen7D on 2018/5/12.
"""
from app import create_app
__author__ = 'Allen7D'
from app.models.base import db
from app.models.user import User
app = create_app()
with app.app_context():
with db.auto_commit():
# 创建一个超级管理员
user = User()
user.openid = '99... | 22.53125 | 34 | 0.568655 |
from app import create_app
__author__ = 'Allen7D'
from app.models.base import db
from app.models.user import User
app = create_app()
with app.app_context():
with db.auto_commit():
user = User()
user.openid = '999'
user.email = '999@qq.com'
user.nickname = 'Super'
... | true | true |
7906c054b3ed392cc4df1a4c5ae03c4d67c39ae5 | 37,606 | py | Python | mushroom_rl/core/parallelization_tools/step_sequence.py | nifunk/GNNMushroomRL | d0d8eefdc10bca62e7cb536d65ea619607be755b | [
"MIT"
] | 1 | 2022-02-06T22:04:42.000Z | 2022-02-06T22:04:42.000Z | mushroom_rl/core/parallelization_tools/step_sequence.py | nifunk/GNNMushroomRL | d0d8eefdc10bca62e7cb536d65ea619607be755b | [
"MIT"
] | null | null | null | mushroom_rl/core/parallelization_tools/step_sequence.py | nifunk/GNNMushroomRL | d0d8eefdc10bca62e7cb536d65ea619607be755b | [
"MIT"
] | null | null | null | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 40.965142 | 120 | 0.625725 |
import functools
import numpy as np
import operator
import random
import scipy.signal as signal
import torch as to
from collections.abc import Iterable
from copy import deepcopy
from math import ceil
from typing import Sequence, Type, Optional, Union, Callable, Tuple
import pyrado
from pyra... | true | true |
7906c16893776fa48ba33f24ccd5d85b9c43c67e | 1,750 | py | Python | openpeerpower/components/iaqualink/sensor.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/components/iaqualink/sensor.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/components/iaqualink/sensor.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Support for Aqualink temperature sensors."""
from __future__ import annotations
from openpeerpower.components.sensor import DOMAIN, SensorEntity
from openpeerpower.config_entries import ConfigEntry
from openpeerpower.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
from openpeerpower.core import... | 29.166667 | 87 | 0.662286 | from __future__ import annotations
from openpeerpower.components.sensor import DOMAIN, SensorEntity
from openpeerpower.config_entries import ConfigEntry
from openpeerpower.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
from openpeerpower.core import OpenPeerPower
from . import AqualinkEntity
fro... | true | true |
7906c26528c0471f76655970ecdc1728764aaf49 | 1,959 | py | Python | opencolorio_config_aces/config/__init__.py | michdolan/OpenColorIO-Config-ACES | 5216c2a184e03529557993b7dc670d351aadddc7 | [
"BSD-3-Clause"
] | null | null | null | opencolorio_config_aces/config/__init__.py | michdolan/OpenColorIO-Config-ACES | 5216c2a184e03529557993b7dc670d351aadddc7 | [
"BSD-3-Clause"
] | null | null | null | opencolorio_config_aces/config/__init__.py | michdolan/OpenColorIO-Config-ACES | 5216c2a184e03529557993b7dc670d351aadddc7 | [
"BSD-3-Clause"
] | null | null | null | # SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
from .generation import (
TRANSFORM_FACTORIES,
colorspace_factory,
group_transform_factory,
look_factory,
named_transform_factory,
produce_transform,
transform_factory,
transform_factory_clf_tra... | 24.185185 | 57 | 0.743236 |
from .generation import (
TRANSFORM_FACTORIES,
colorspace_factory,
group_transform_factory,
look_factory,
named_transform_factory,
produce_transform,
transform_factory,
transform_factory_clf_transform_to_group_transform,
transform_factory_default,
view_transform_factory,
)
fro... | true | true |
7906c47548dd1461c3e11d59e7081c666276c220 | 1,952 | py | Python | test_app/settings.py | AngelKey/Angelkey.proofintegration | e71228a991df342afc3159defbf0ea71a723a98d | [
"BSD-3-Clause"
] | 17 | 2019-04-01T14:35:42.000Z | 2021-06-23T01:59:44.000Z | test_app/settings.py | AngelKey/Angelkey.proofintegration | e71228a991df342afc3159defbf0ea71a723a98d | [
"BSD-3-Clause"
] | 2 | 2018-10-26T14:34:55.000Z | 2019-04-26T13:51:10.000Z | test_app/settings.py | AngelKey/Angelkey.proofintegration | e71228a991df342afc3159defbf0ea71a723a98d | [
"BSD-3-Clause"
] | 7 | 2019-04-23T14:28:18.000Z | 2021-11-13T02:57:42.000Z | # The most basic of settings to get the app to run as an example, should *never* be used in a
# production environment.
import os
import dj_database_url
DATABASES = {}
db_url = os.environ.get('DATABASE_URL', '')
if db_url:
DATABASES['default'] = dj_database_url.parse(db_url, conn_max_age=600, ssl_require=True)
el... | 27.885714 | 93 | 0.653176 |
import os
import dj_database_url
DATABASES = {}
db_url = os.environ.get('DATABASE_URL', '')
if db_url:
DATABASES['default'] = dj_database_url.parse(db_url, conn_max_age=600, ssl_require=True)
else:
DATABASES['default'] = {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'dr.sqlite3',
}
... | true | true |
7906c546bcdfd796db7b12cb7bbc4853a66df11f | 398 | py | Python | packages/ml_api/tests/conftest.py | iameminmammadov/datacube_bigmart_lighthouse | 74de8e87bc0482845530c23871d1b113acc11a81 | [
"MIT"
] | null | null | null | packages/ml_api/tests/conftest.py | iameminmammadov/datacube_bigmart_lighthouse | 74de8e87bc0482845530c23871d1b113acc11a81 | [
"MIT"
] | null | null | null | packages/ml_api/tests/conftest.py | iameminmammadov/datacube_bigmart_lighthouse | 74de8e87bc0482845530c23871d1b113acc11a81 | [
"MIT"
] | null | null | null | import pytest
from ml_api.api.app import create_app
from ml_api.api.config import TestingConfig
#Fixtures provide an easy way to setup and teardown resources
@pytest.fixture
def app():
app = create_app(config_object=TestingConfig)
with app.app_context():
yield app
@pytest.fixture
def flask_test_clie... | 22.111111 | 61 | 0.753769 | import pytest
from ml_api.api.app import create_app
from ml_api.api.config import TestingConfig
@pytest.fixture
def app():
app = create_app(config_object=TestingConfig)
with app.app_context():
yield app
@pytest.fixture
def flask_test_client(app):
with app.test_client() as test_client:
y... | true | true |
7906c6207fce56a30524aafb61f45614f85552a6 | 4,380 | py | Python | models/image_segmentation/tensorflow/3d_unet_mlperf/inference/nnUNet/preprocess.py | ashahba/models | c08d1ea02083814d3a31f9695c5bbf5c7704a8a7 | [
"Apache-2.0"
] | 357 | 2019-01-23T23:54:30.000Z | 2022-03-31T05:32:25.000Z | models/image_segmentation/tensorflow/3d_unet_mlperf/inference/nnUNet/preprocess.py | ashahba/models | c08d1ea02083814d3a31f9695c5bbf5c7704a8a7 | [
"Apache-2.0"
] | 65 | 2019-02-06T15:35:35.000Z | 2022-03-25T09:56:48.000Z | models/image_segmentation/tensorflow/3d_unet_mlperf/inference/nnUNet/preprocess.py | ashahba/models | c08d1ea02083814d3a31f9695c5bbf5c7704a8a7 | [
"Apache-2.0"
] | 164 | 2019-02-06T15:05:57.000Z | 2022-03-31T11:48:14.000Z | # coding=utf-8
# Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licen... | 40.934579 | 141 | 0.736073 |
import argparse
import numpy
import os
import pickle
import sys
import torch
from batchgenerators.augmentations.utils import pad_nd_image
from batchgenerators.utilities.file_and_folder_operations import subfiles
from nnunet.training.model_restore import load_model_and_checkpoint_files
from nnunet.in... | true | true |
7906c755afa7bc6dae1bb1fff9408b9892eb8f80 | 5,929 | py | Python | benchmark.py | nickjmiller/MLBenchmark | f6c3865c2dd5b71a471789041f3d800705371531 | [
"MIT"
] | null | null | null | benchmark.py | nickjmiller/MLBenchmark | f6c3865c2dd5b71a471789041f3d800705371531 | [
"MIT"
] | null | null | null | benchmark.py | nickjmiller/MLBenchmark | f6c3865c2dd5b71a471789041f3d800705371531 | [
"MIT"
] | null | null | null | import csv
from default_clf import DefaultNSL
from itertools import chain
from time import process_time
import numpy as np
import pandas as pd
NUM_PASSES = 100
NUM_ACC_PASSES = 50
TRAIN_PATH = 'data/KDDTrain+.csv'
TEST_PATH = 'data/KDDTest+.csv'
ATTACKS = {
'normal': 'normal',
'back': 'DoS',
'land': 'Do... | 30.880208 | 96 | 0.611908 | import csv
from default_clf import DefaultNSL
from itertools import chain
from time import process_time
import numpy as np
import pandas as pd
NUM_PASSES = 100
NUM_ACC_PASSES = 50
TRAIN_PATH = 'data/KDDTrain+.csv'
TEST_PATH = 'data/KDDTest+.csv'
ATTACKS = {
'normal': 'normal',
'back': 'DoS',
'land': 'Do... | true | true |
7906c8adbbc21e3109745b8fd73b36a82946962a | 1,778 | py | Python | utils/data_loader_2.py | Dorky-Lever/vpv | 0f156b2ad79cbb7060140434e34b5841ab5b1a26 | [
"Apache-2.0"
] | null | null | null | utils/data_loader_2.py | Dorky-Lever/vpv | 0f156b2ad79cbb7060140434e34b5841ab5b1a26 | [
"Apache-2.0"
] | null | null | null | utils/data_loader_2.py | Dorky-Lever/vpv | 0f156b2ad79cbb7060140434e34b5841ab5b1a26 | [
"Apache-2.0"
] | null | null | null | """
Load volumes into vpv from a toml config file. Just load volumes and no overlays
Examples
--------
Example toml file
orientation = 'sagittal'
[top]
specimens = [
'path1.nrrd',
'path2.nrrd',
'path3.nrrd']
[bottom]
specimens = [
'path1.nrrd',
'path2.nrrd',
'path3.nrrd']
"""
import sys
from pathlib import Path
... | 19.326087 | 80 | 0.615298 | import sys
from pathlib import Path
from itertools import chain
import toml
from PyQt5 import QtGui
from vpv.vpv import Vpv
from vpv.common import Layers
from typing import Dict
def load(config: Dict):
top_vols = config['top']['specimens']
bottom = config['bottom']['specimens']
if bottom:
b... | true | true |
7906c9506a6dc912a5d82b27e830bdb50e302cea | 2,249 | py | Python | train/train_superpixels_graph_classification.py | nfkjsfoeif/AutoGCN | 4496bc066936d93b2e852c8010d95fb372910a80 | [
"MIT"
] | 2 | 2020-06-27T15:17:23.000Z | 2020-09-26T13:23:27.000Z | train/train_superpixels_graph_classification.py | nfkjsfoeif/AutoGCN | 4496bc066936d93b2e852c8010d95fb372910a80 | [
"MIT"
] | null | null | null | train/train_superpixels_graph_classification.py | nfkjsfoeif/AutoGCN | 4496bc066936d93b2e852c8010d95fb372910a80 | [
"MIT"
] | 1 | 2020-09-16T14:58:24.000Z | 2020-09-16T14:58:24.000Z | """
Utility functions for training one epoch
and evaluating one epoch
"""
import torch
import torch.nn as nn
import math
from train.metrics import accuracy_MNIST_CIFAR as accuracy
def train_epoch(model, optimizer, device, data_loader, epoch=0):
model.train()
epoch_loss = 0
epoch_train_acc = 0
... | 38.775862 | 103 | 0.663406 | import torch
import torch.nn as nn
import math
from train.metrics import accuracy_MNIST_CIFAR as accuracy
def train_epoch(model, optimizer, device, data_loader, epoch=0):
model.train()
epoch_loss = 0
epoch_train_acc = 0
nb_data = 0
gpu_mem = 0
for iter, (batch_graphs, batch_labels, batch_snorm... | true | true |
7906c9ef860a7c6851f9223f436614bc5f4fcb11 | 12,739 | py | Python | raynet/models.py | paschalidoud/raynet | bf468dadddaf30da9cf5b1ecdfbcf4f161476242 | [
"MIT"
] | 76 | 2018-04-08T04:33:26.000Z | 2021-09-24T15:05:45.000Z | raynet/models.py | paschalidoud/raynet | bf468dadddaf30da9cf5b1ecdfbcf4f161476242 | [
"MIT"
] | 8 | 2018-08-24T16:56:19.000Z | 2021-04-11T08:41:31.000Z | raynet/models.py | paschalidoud/raynet | bf468dadddaf30da9cf5b1ecdfbcf4f161476242 | [
"MIT"
] | 18 | 2018-06-28T13:23:22.000Z | 2021-03-29T03:17:39.000Z | import os
import h5py
import numpy as np
from keras import backend as K
from keras.layers import Activation, BatchNormalization, Conv2D, Dense, Dot, \
Dropout, Flatten, Input, MaxPooling2D, GlobalAveragePooling2D
from keras import regularizers
from keras.layers import Average as KerasAverage
from keras.models imp... | 26.539583 | 79 | 0.605464 | import os
import h5py
import numpy as np
from keras import backend as K
from keras.layers import Activation, BatchNormalization, Conv2D, Dense, Dot, \
Dropout, Flatten, Input, MaxPooling2D, GlobalAveragePooling2D
from keras import regularizers
from keras.layers import Average as KerasAverage
from keras.models imp... | true | true |
7906cb3e8d2fbd60b32822840f3b999b05b17ae5 | 840 | py | Python | dbcreate.py | killerswan/dbfilter | eff41896be747a1839970fc8cac424e3963275e5 | [
"0BSD"
] | null | null | null | dbcreate.py | killerswan/dbfilter | eff41896be747a1839970fc8cac424e3963275e5 | [
"0BSD"
] | null | null | null | dbcreate.py | killerswan/dbfilter | eff41896be747a1839970fc8cac424e3963275e5 | [
"0BSD"
] | null | null | null | import sqlite3
from common import newpathrel
def create_sample_db():
# connect to or create a new database
conn = sqlite3.connect(newpathrel('sample.sqlite3'))
# get a cursor to it
cur = conn.cursor()
# create a table
cur.execute('''
create table monkeys
(name text, c... | 24.705882 | 77 | 0.580952 | import sqlite3
from common import newpathrel
def create_sample_db():
conn = sqlite3.connect(newpathrel('sample.sqlite3'))
cur = conn.cursor()
cur.execute('''
create table monkeys
(name text, color text, favorite_food_to_steal text)
''')
data = [
... | true | true |
7906cbfef710c408ea7b3bff35d4ca149cc72c47 | 21,537 | py | Python | interboard.py | dequis/wakarimasen | 18dce03158b52f6030d18c4c532e42daeb089adc | [
"WTFPL"
] | 17 | 2015-02-25T04:34:47.000Z | 2022-01-17T07:17:05.000Z | interboard.py | weedy/wakarimasen | 6984dd50de66bc8784a180a3cee685ce98c93aec | [
"WTFPL"
] | 4 | 2015-01-09T18:20:50.000Z | 2016-07-16T06:11:26.000Z | interboard.py | weedy/wakarimasen | 6984dd50de66bc8784a180a3cee685ce98c93aec | [
"WTFPL"
] | 3 | 2016-06-27T19:12:45.000Z | 2021-01-03T06:08:19.000Z | '''Operations that affect multiple boards or the entire site,
e.g., transferring and merging threads.'''
import time
import re
import os
import sys
import traceback
from datetime import datetime
from calendar import timegm
from subprocess import Popen
import config
import strings
import board
import staff
import mode... | 33.916535 | 79 | 0.581418 |
import time
import re
import os
import sys
import traceback
from datetime import datetime
from calendar import timegm
from subprocess import Popen
import config
import strings
import board
import staff
import model
import util
import str_format
import misc
from template import Template
from util import WakaError, loc... | true | true |
7906cd293271edf1db810f3042870d676c4e0208 | 1,185 | py | Python | userbot/plugins/indanime.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | null | null | null | userbot/plugins/indanime.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | 1 | 2022-01-09T11:35:06.000Z | 2022-01-09T11:35:06.000Z | userbot/plugins/indanime.py | aksr-aashish/FIREXUSERBOT | dff0b7bf028cb27779626ce523402346cc990402 | [
"MIT"
] | null | null | null | # made by @Eviral
from . import *
@bot.on(admin_cmd(pattern="indanime(.*)"))
async def xd(event):
await event.edit("wishing to all🇮🇳🇮🇳...")
event.pattern_match.group(1)
async for tele in borg.iter_dialogs():
if tele.is_group:
chat = tele.id
lol = 0
done = ... | 38.225806 | 488 | 0.357806 |
from . import *
@bot.on(admin_cmd(pattern="indanime(.*)"))
async def xd(event):
await event.edit("wishing to all🇮🇳🇮🇳...")
event.pattern_match.group(1)
async for tele in borg.iter_dialogs():
if tele.is_group:
chat = tele.id
lol = 0
done = 0
try... | true | true |
7906cee89d26da64111f43d4fc429ec863c00f57 | 96 | py | Python | data/__init__.py | tranandrew0421/Rin-Bot | df81c7c5ed41f3623eeabc0eb455c60672035163 | [
"MIT"
] | null | null | null | data/__init__.py | tranandrew0421/Rin-Bot | df81c7c5ed41f3623eeabc0eb455c60672035163 | [
"MIT"
] | null | null | null | data/__init__.py | tranandrew0421/Rin-Bot | df81c7c5ed41f3623eeabc0eb455c60672035163 | [
"MIT"
] | null | null | null | from pathlib import Path
data_path = Path(Path(__file__).parent)
__all__ = ['data_path']
| 16 | 40 | 0.708333 | from pathlib import Path
data_path = Path(Path(__file__).parent)
__all__ = ['data_path']
| true | true |
7906cf461c762bc51e1bf645aa1ff7ce87ff52a9 | 57,035 | py | Python | plenum/test/helper.py | SchwiftyRick/indy-plenum | d23b99423eb805971e50446d7e89ada892aa6811 | [
"Apache-2.0"
] | 1 | 2021-04-03T07:45:01.000Z | 2021-04-03T07:45:01.000Z | plenum/test/helper.py | SchwiftyRick/indy-plenum | d23b99423eb805971e50446d7e89ada892aa6811 | [
"Apache-2.0"
] | 1 | 2021-07-14T17:10:04.000Z | 2021-07-14T17:10:04.000Z | plenum/test/helper.py | SchwiftyRick/indy-plenum | d23b99423eb805971e50446d7e89ada892aa6811 | [
"Apache-2.0"
] | 2 | 2021-02-19T15:36:50.000Z | 2021-07-20T11:37:54.000Z | from datetime import datetime
import itertools
import os
import random
import string
from _signal import SIGINT
from contextlib import contextmanager
from functools import partial
from itertools import permutations, combinations
from shutil import copyfile
from sys import executable
from time import sleep, perf_counter... | 36.212698 | 120 | 0.649215 | from datetime import datetime
import itertools
import os
import random
import string
from _signal import SIGINT
from contextlib import contextmanager
from functools import partial
from itertools import permutations, combinations
from shutil import copyfile
from sys import executable
from time import sleep, perf_counter... | true | true |
7906cfabc618378219dca9026f2fabce212c9b65 | 458 | py | Python | data/scripts/templates/object/static/structure/dantooine/shared_dant_boundary_post.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/static/structure/dantooine/shared_dant_boundary_post.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/static/structure/dantooine/shared_dant_boundary_post.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Static()
result.template = "object/static/structure/dantooine/shared_dant_boundary_post.iff"
result.attribute_tem... | 26.941176 | 84 | 0.731441 | true | true | |
7906cfb86de423f9d982ed77fc575a8d59866742 | 8,765 | py | Python | Python/Programação_em_Python_Essencial/5- Coleções/listas.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Programação_em_Python_Essencial/5- Coleções/listas.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Programação_em_Python_Essencial/5- Coleções/listas.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | """
Listas
Listas em Python funcionam como vetores/matrizes (arrays) em outras linguagens, com a diferença
de serem DINÂMICO e também de podermos colocar QUALQUER tipo de dado.
Linguagens C/Java: Arrays
- Possuem tamanho e tipo de dado fixo;
Ou seja, nestas linguagens se você criar um array do tipo int e com tamanh... | 25.703812 | 116 | 0.712949 | true | true | |
7906cfc167927fc8aa49f63c83d41f2039162b4e | 9,396 | py | Python | src/sciPENN/Network/Model.py | jlakkis/sciPENN | 34afb2008a076e13c40965a76d3dd31d0c331652 | [
"MIT"
] | 1 | 2022-02-08T02:33:21.000Z | 2022-02-08T02:33:21.000Z | src/sciPENN/Network/Model.py | jlakkis/sciPENN | 34afb2008a076e13c40965a76d3dd31d0c331652 | [
"MIT"
] | null | null | null | src/sciPENN/Network/Model.py | jlakkis/sciPENN | 34afb2008a076e13c40965a76d3dd31d0c331652 | [
"MIT"
] | null | null | null | from math import log, exp
from numpy import inf, zeros, zeros_like as np_zeros_like, arange, asarray, empty
from pandas import concat
from anndata import AnnData
from torch import cat, no_grad, randn, zeros_like, zeros as torch_zeros, ones, argmax
from torch.nn import Module, Linear, Sequential, RNNCell, Softplus, Par... | 37.434263 | 151 | 0.540975 | from math import log, exp
from numpy import inf, zeros, zeros_like as np_zeros_like, arange, asarray, empty
from pandas import concat
from anndata import AnnData
from torch import cat, no_grad, randn, zeros_like, zeros as torch_zeros, ones, argmax
from torch.nn import Module, Linear, Sequential, RNNCell, Softplus, Par... | true | true |
7906d18dd660bab35f5b0a9479284ab617d70090 | 4,037 | py | Python | configs/centernext/paper_cxt18_Ro16_3lr_wd4e4_hm2wh1_s123_nos_2x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/centernext/paper_cxt18_Ro16_3lr_wd4e4_hm2wh1_s123_nos_2x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/centernext/paper_cxt18_Ro16_3lr_wd4e4_hm2wh1_s123_nos_2x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='CenterNet',
pretrained='modelzoo://resnet18',
backbone=dict(
type='ResNet',
depth=18,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_eval=False,
add_summay_every_n_step=200,
style='pytorch'),
... | 30.126866 | 87 | 0.628685 |
model = dict(
type='CenterNet',
pretrained='modelzoo://resnet18',
backbone=dict(
type='ResNet',
depth=18,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_eval=False,
add_summay_every_n_step=200,
style='pytorch'),
neck=dict(ty... | true | true |
7906d1ae2c90175bcee045c784344e55fb521f0b | 14,451 | py | Python | tests/test_workflows.py | apikay/celery-director | 3575e9f89690f6f2518c9939be6169fb4383cbed | [
"BSD-3-Clause"
] | 351 | 2020-01-30T14:37:48.000Z | 2022-03-29T11:34:14.000Z | tests/test_workflows.py | apikay/celery-director | 3575e9f89690f6f2518c9939be6169fb4383cbed | [
"BSD-3-Clause"
] | 53 | 2020-02-14T17:06:48.000Z | 2022-03-22T14:37:36.000Z | tests/test_workflows.py | apikay/celery-director | 3575e9f89690f6f2518c9939be6169fb4383cbed | [
"BSD-3-Clause"
] | 33 | 2020-01-31T14:27:21.000Z | 2022-03-10T19:50:06.000Z | import time
import pytest
from celery.result import GroupResult
from celery.schedules import crontab
from kombu.exceptions import EncodeError
from director import build_celery_schedule
from director.exceptions import WorkflowSyntaxError
from director.models.tasks import Task
from director.models.workflows import Work... | 36.959079 | 110 | 0.652135 | import time
import pytest
from celery.result import GroupResult
from celery.schedules import crontab
from kombu.exceptions import EncodeError
from director import build_celery_schedule
from director.exceptions import WorkflowSyntaxError
from director.models.tasks import Task
from director.models.workflows import Work... | true | true |
7906d208ebb0c77cfc9666976e8e1b2c9d6a55d1 | 25,194 | py | Python | tensorflow/python/keras/engine/training_eager_test.py | decibelcooper/tensorflow | e85f387c30384664f1006b3189a30702818ff354 | [
"Apache-2.0"
] | 54 | 2018-05-29T19:52:44.000Z | 2021-11-30T10:41:12.000Z | tensorflow/python/keras/engine/training_eager_test.py | decibelcooper/tensorflow | e85f387c30384664f1006b3189a30702818ff354 | [
"Apache-2.0"
] | 20 | 2017-12-06T18:20:54.000Z | 2021-11-10T09:54:23.000Z | tensorflow/python/keras/engine/training_eager_test.py | decibelcooper/tensorflow | e85f387c30384664f1006b3189a30702818ff354 | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.512329 | 80 | 0.629237 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from tensorflow.python.data.ops import dataset_ops
from tensorflow.python import keras
from tensorflow.python.framework import ops
from tensorflow.python.framework import test... | true | true |
7906d211cc2d5c07144850ee4ddbdc281ff422df | 2,423 | py | Python | taurus_pyqtgraph/legendtool.py | synchrotron-solaris/taurus_pyqtgraph | 58563d8628dd3e3912d12c406250b0f5d0b9cf08 | [
"CC-BY-3.0"
] | null | null | null | taurus_pyqtgraph/legendtool.py | synchrotron-solaris/taurus_pyqtgraph | 58563d8628dd3e3912d12c406250b0f5d0b9cf08 | [
"CC-BY-3.0"
] | null | null | null | taurus_pyqtgraph/legendtool.py | synchrotron-solaris/taurus_pyqtgraph | 58563d8628dd3e3912d12c406250b0f5d0b9cf08 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of t... | 36.712121 | 78 | 0.647132 | true | true | |
7906d241d502711c52ffe6007f6ff551705e386f | 1,844 | py | Python | tensorflow/contrib/learn/python/learn/ops/dnn_ops.py | c0g/tomserflow | f7b42f6ba58c3ff20ecd002535d2cca5d93bcf8e | [
"Apache-2.0"
] | 2 | 2016-05-25T19:30:35.000Z | 2016-05-25T20:48:08.000Z | tensorflow/contrib/learn/python/learn/ops/dnn_ops.py | c0g/tomserflow | f7b42f6ba58c3ff20ecd002535d2cca5d93bcf8e | [
"Apache-2.0"
] | 1 | 2016-10-19T02:43:04.000Z | 2016-10-31T14:53:06.000Z | tensorflow/contrib/learn/python/learn/ops/dnn_ops.py | c0g/tomserflow | f7b42f6ba58c3ff20ecd002535d2cca5d93bcf8e | [
"Apache-2.0"
] | 8 | 2016-10-23T00:50:02.000Z | 2019-04-21T11:11:57.000Z | """TensorFlow ops for deep neural networks."""
# Copyright 2015-present The Scikit Flow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apac... | 40.086957 | 75 | 0.748373 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.ops import nn
from tensorflow.python.ops import rnn_cell
from tensorflow.python.ops import variable_scope as vs
from tensorflow.contrib.learn.python.learn.ops import dropout_... | true | true |
7906d2d346f3694f51688dfad1021f614825cc72 | 358 | py | Python | term_project/backend/api/admin.py | mav10/dataVisualization | d3b3d6fc650792a07321f72507b977eaa58c0884 | [
"MIT"
] | null | null | null | term_project/backend/api/admin.py | mav10/dataVisualization | d3b3d6fc650792a07321f72507b977eaa58c0884 | [
"MIT"
] | null | null | null | term_project/backend/api/admin.py | mav10/dataVisualization | d3b3d6fc650792a07321f72507b977eaa58c0884 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Car, CarShop, RepairStation, RepairWork, Reapir, Person, Component
# Register your models here.
admin.site.register(Car)
admin.site.register(CarShop)
admin.site.register(Reapir)
admin.site.register(RepairWork)
admin.site.register(RepairStation)
admin.site.register(P... | 29.833333 | 86 | 0.818436 | from django.contrib import admin
from .models import Car, CarShop, RepairStation, RepairWork, Reapir, Person, Component
admin.site.register(Car)
admin.site.register(CarShop)
admin.site.register(Reapir)
admin.site.register(RepairWork)
admin.site.register(RepairStation)
admin.site.register(Person)
admin.site.register(C... | true | true |
7906d366df1b4f02e9d604481c956ee068de457e | 193 | py | Python | Cython/Fibonacci/functions_folder/setup.py | dalexa10/EngineeringDesignOptimization | eb5b5e4edd773aef629f59aea8a9771af41bd224 | [
"MIT"
] | null | null | null | Cython/Fibonacci/functions_folder/setup.py | dalexa10/EngineeringDesignOptimization | eb5b5e4edd773aef629f59aea8a9771af41bd224 | [
"MIT"
] | null | null | null | Cython/Fibonacci/functions_folder/setup.py | dalexa10/EngineeringDesignOptimization | eb5b5e4edd773aef629f59aea8a9771af41bd224 | [
"MIT"
] | null | null | null | from setuptools import setup
from Cython.Build import cythonize
setup(
name='Fibonacci',
package_dir={'Fibonacci/functions_folder': ''},
ext_modules=cythonize("fib_module.pyx"),
)
| 21.444444 | 51 | 0.735751 | from setuptools import setup
from Cython.Build import cythonize
setup(
name='Fibonacci',
package_dir={'Fibonacci/functions_folder': ''},
ext_modules=cythonize("fib_module.pyx"),
)
| true | true |
7906d434e55925475bee856890e0e7f5ffd82077 | 68,593 | py | Python | pynamodb/connection/base.py | dwelch91/PynamoDB | ae03f5571249206eaf376791e5efb66645e0728b | [
"MIT"
] | null | null | null | pynamodb/connection/base.py | dwelch91/PynamoDB | ae03f5571249206eaf376791e5efb66645e0728b | [
"MIT"
] | null | null | null | pynamodb/connection/base.py | dwelch91/PynamoDB | ae03f5571249206eaf376791e5efb66645e0728b | [
"MIT"
] | null | null | null | """
Lowest level connection
"""
from __future__ import division
import logging
import math
import random
import time
import uuid
import warnings
from base64 import b64decode
from threading import local
import six
from botocore.client import ClientError
from botocore.exceptions import BotoCoreError
from botocore.sessi... | 45.698201 | 121 | 0.627469 | from __future__ import division
import logging
import math
import random
import time
import uuid
import warnings
from base64 import b64decode
from threading import local
import six
from botocore.client import ClientError
from botocore.exceptions import BotoCoreError
from botocore.session import get_session
from botoc... | true | true |
7906d553d5dac4011032f2bf891deac7b7498d0d | 8,244 | py | Python | tests/e2e/performance/csi_tests/test_bulk_pod_attachtime_performance.py | srivickynesh/ocs-ci | 994b8635a2f44ec7982585cfb293215aa8b27d2a | [
"MIT"
] | null | null | null | tests/e2e/performance/csi_tests/test_bulk_pod_attachtime_performance.py | srivickynesh/ocs-ci | 994b8635a2f44ec7982585cfb293215aa8b27d2a | [
"MIT"
] | null | null | null | tests/e2e/performance/csi_tests/test_bulk_pod_attachtime_performance.py | srivickynesh/ocs-ci | 994b8635a2f44ec7982585cfb293215aa8b27d2a | [
"MIT"
] | null | null | null | """
Test to verify performance of attaching number of pods as a bulk, each pod attached to one pvc only
The test results will be uploaded to the ES server
"""
import logging
import os
import pytest
import pathlib
import time
from concurrent.futures import ThreadPoolExecutor
from ocs_ci.framework.testlib import perform... | 34.207469 | 106 | 0.632703 | import logging
import os
import pytest
import pathlib
import time
from concurrent.futures import ThreadPoolExecutor
from ocs_ci.framework.testlib import performance, polarion_id
from ocs_ci.helpers import helpers
from ocs_ci.helpers.helpers import get_full_test_logs_path
from ocs_ci.ocs import defaults, constants, sca... | true | true |
7906d5af2639f796a512ee42f6fe28520f1c6628 | 732 | py | Python | lesson3-functional_programming/timing.py | zubrik13/udacity_inter_py | 4c7aad840048d1287e12515aeaf583ffbfbc9f56 | [
"MIT"
] | null | null | null | lesson3-functional_programming/timing.py | zubrik13/udacity_inter_py | 4c7aad840048d1287e12515aeaf583ffbfbc9f56 | [
"MIT"
] | null | null | null | lesson3-functional_programming/timing.py | zubrik13/udacity_inter_py | 4c7aad840048d1287e12515aeaf583ffbfbc9f56 | [
"MIT"
] | null | null | null | # Timing functionality from Python's built-in module
from time import perf_counter
from functools import lru_cache
def timer(fn):
def inner(*args):
start = perf_counter()
result = fn(*args)
end = perf_counter()
elapsed = end - start
print(result)
print('elapsed', el... | 17.853659 | 66 | 0.592896 |
from time import perf_counter
from functools import lru_cache
def timer(fn):
def inner(*args):
start = perf_counter()
result = fn(*args)
end = perf_counter()
elapsed = end - start
print(result)
print('elapsed', elapsed)
return inner
@timer
def calc_factorial... | true | true |
7906d5cf26427331db5adbd74d864ce063b47529 | 520 | py | Python | review_heatmap/gui/forms/anki21/__init__.py | kb1900/Anki-Addons | 3b764af8657065c369d404025a3f11c964192a33 | [
"MIT"
] | 1 | 2019-06-23T04:46:24.000Z | 2019-06-23T04:46:24.000Z | review_heatmap/gui/forms/anki21/__init__.py | kb1900/Anki-Addons | 3b764af8657065c369d404025a3f11c964192a33 | [
"MIT"
] | null | null | null | review_heatmap/gui/forms/anki21/__init__.py | kb1900/Anki-Addons | 3b764af8657065c369d404025a3f11c964192a33 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Review Heatmap Add-on for Anki
# Copyright (C) 2016-2019 Glutanimate <https://glutanimate.com>
#
# This file was automatically generated by Anki Add-on Builder v0.1.4
# It is subject to the same licensing terms as the rest of the program
# (see the LICENSE file which accompanies this progra... | 22.608696 | 70 | 0.709615 |
__all__ = [
"options",
"contrib"
]
from . import options
from . import contrib
| true | true |
7906d5ddfaa817ec33d0183b890d6b6ae72fd4eb | 7,525 | py | Python | example/gdb-loc/gdbloc/parser.py | rocky/python-spark | d3f966a4e8c191c51b1dcfa444026b4c6831984f | [
"MIT"
] | 43 | 2016-04-24T15:20:16.000Z | 2022-03-19T21:01:29.000Z | example/gdb-loc/gdbloc/parser.py | rocky/python-spark | d3f966a4e8c191c51b1dcfa444026b4c6831984f | [
"MIT"
] | 11 | 2016-06-01T16:06:38.000Z | 2020-05-20T20:15:32.000Z | example/gdb-loc/gdbloc/parser.py | rocky/python-spark | d3f966a4e8c191c51b1dcfa444026b4c6831984f | [
"MIT"
] | 12 | 2016-05-24T12:15:04.000Z | 2021-11-20T02:14:00.000Z | # Copyright (c) 2017 Rocky Bernstein
"""
Parsing for a trepan2/trepan3k debugger
"breakpoint', "list", or "disasm" command arguments
This is a debugger location along with:
- an optional condition parsing for breakpoints commands
- a range or count for "list" commands
"""
from __future__ import print_function
imp... | 29.98008 | 82 | 0.562791 |
from __future__ import print_function
import sys
from spark_parser.ast import AST
from gdbloc.scanner import LocationScanner, ScannerError
from spark_parser import GenericASTBuilder, DEFAULT_DEBUG
class LocationError(Exception):
def __init__(self, text, text_cursor):
self.text = text
self.text... | true | true |
7906d608e7fc287720cb89ba3cf03f982d2deb89 | 5,420 | py | Python | rlpy/stats/models/_basic.py | evenmarbles/rlpy | 3c3c39a316285ca725268e81aef030e5c764f797 | [
"0BSD"
] | 10 | 2015-11-12T18:48:53.000Z | 2021-06-22T05:54:11.000Z | rlpy/stats/models/_basic.py | evenmarbles/rlpy | 3c3c39a316285ca725268e81aef030e5c764f797 | [
"0BSD"
] | 2 | 2018-06-16T02:37:31.000Z | 2018-11-05T16:42:24.000Z | rlpy/stats/models/_basic.py | evenmarbles/rlpy | 3c3c39a316285ca725268e81aef030e5c764f797 | [
"0BSD"
] | 6 | 2015-11-30T10:32:08.000Z | 2020-08-24T01:32:35.000Z | from __future__ import division, print_function, absolute_import
# noinspection PyUnresolvedReferences
from six.moves import range
import numpy as np
from scipy.misc import doccer
from ...stats import nonuniform
from ...auxiliary.array import normalize, nunique, accum
__all__ = ['markov']
_doc_default_callparams =... | 27.236181 | 117 | 0.606827 | from __future__ import division, print_function, absolute_import
from six.moves import range
import numpy as np
from scipy.misc import doccer
from ...stats import nonuniform
from ...auxiliary.array import normalize, nunique, accum
__all__ = ['markov']
_doc_default_callparams = """\
startprob : array_like
Star... | true | true |
7906d61801dffd70cb124dfeedad333699e40a3d | 3,868 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.35 | 134 | 0.70243 |
from typing import Any, TYPE_CHECKING
from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from .._version import VERSION
if TYPE_CHECKING:
from azure.core.credentials_async import AsyncTokenCredential
... | true | true |
7906d8ade39ac3b130396371247f68fd6a0774ea | 1,058 | py | Python | security/onap_security/test_security_test.py | onap/integration-xtesting | a2b118029680f62e053211a9fd9443308286a31c | [
"Apache-2.0"
] | 1 | 2021-10-15T15:18:53.000Z | 2021-10-15T15:18:53.000Z | security/onap_security/test_security_test.py | onap/integration-xtesting | a2b118029680f62e053211a9fd9443308286a31c | [
"Apache-2.0"
] | null | null | null | security/onap_security/test_security_test.py | onap/integration-xtesting | a2b118029680f62e053211a9fd9443308286a31c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2018 All rights reserved
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
"""Define the classes requir... | 25.804878 | 71 | 0.713611 |
import logging
import os
import unittest
from security_tests import SecurityTesting
class SecurityTests(unittest.TestCase):
def setUp(self):
os.environ["DEPLOY_SCENARIO"] = "k8-test"
os.environ["KUBE_MASTER_IP"] = "127.0.0.1"
os.environ["KUBE_MASTER_URL"] = "https://127... | true | true |
7906dab72d9236f735c802775a9ef6520b9a646e | 680 | py | Python | scripts/report_gen.py | aw32/sched | b6ef35c5b517875a5954c70e2dc366fab3721a60 | [
"BSD-2-Clause"
] | null | null | null | scripts/report_gen.py | aw32/sched | b6ef35c5b517875a5954c70e2dc366fab3721a60 | [
"BSD-2-Clause"
] | null | null | null | scripts/report_gen.py | aw32/sched | b6ef35c5b517875a5954c70e2dc366fab3721a60 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2019, Alex Wiens <awiens@mail.upb.de>, Achim Lösch <achim.loesch@upb.de>
# SPDX-License-Identifier: BSD-2-Clause
import os
import os.path
import subprocess
import test as schedtest
import plot
def hostname():
return subprocess.getoutput("hostname")
if __name__ == "__main__":
c... | 23.448276 | 92 | 0.726471 |
import os
import os.path
import subprocess
import test as schedtest
import plot
def hostname():
return subprocess.getoutput("hostname")
if __name__ == "__main__":
cwd = os.getcwd()
testname = os.path.basename(cwd)
host = os.environ if "SCHED_HOST" in os.environ else hostname()
for testtype in ["sim","ex... | true | true |
7906dac074880ad5d64e71289a4fb936885ee4f3 | 493 | py | Python | Python3/Python3_Lesson09/src/reprmagic.py | ceeblet/OST_PythonCertificationTrack | 042e0ce964bc88b3f4132dcbd7e06c5f504eae34 | [
"MIT"
] | null | null | null | Python3/Python3_Lesson09/src/reprmagic.py | ceeblet/OST_PythonCertificationTrack | 042e0ce964bc88b3f4132dcbd7e06c5f504eae34 | [
"MIT"
] | null | null | null | Python3/Python3_Lesson09/src/reprmagic.py | ceeblet/OST_PythonCertificationTrack | 042e0ce964bc88b3f4132dcbd7e06c5f504eae34 | [
"MIT"
] | null | null | null | """
Demonstrate differences between __str__() and __reper__().
"""
class neither:
pass
class stronly:
def __str__(self):
return "STR"
class repronly:
def __repr__(self):
return "REPR"
class both(stronly, repronly):
pass
class Person:
def __init__(self, name, age):
... | 18.961538 | 59 | 0.600406 |
class neither:
pass
class stronly:
def __str__(self):
return "STR"
class repronly:
def __repr__(self):
return "REPR"
class both(stronly, repronly):
pass
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
def __str__(self):
... | true | true |
7906dbd0fffac6fa2453ec6b028b0b9623ac5c12 | 2,975 | py | Python | bip/base/bipidb.py | paulfariello-syn/bip | 901adc4ee368cd02666410099e9382b068f7ae68 | [
"BSD-3-Clause"
] | 145 | 2020-08-13T16:54:33.000Z | 2022-03-06T09:20:54.000Z | bip/base/bipidb.py | paulfariello-syn/bip | 901adc4ee368cd02666410099e9382b068f7ae68 | [
"BSD-3-Clause"
] | 10 | 2020-08-14T18:00:47.000Z | 2022-03-25T00:34:16.000Z | bip/base/bipidb.py | paulfariello-syn/bip | 901adc4ee368cd02666410099e9382b068f7ae68 | [
"BSD-3-Clause"
] | 20 | 2020-08-14T17:56:00.000Z | 2022-03-28T16:16:03.000Z |
# define BipIdb and some helper functions for easier scripting (at the end).
import ida_kernwin
import idaapi
import idc
class BipIdb(object):
"""
Class for representing the idb loaded by IDA, this has the goal to
provide access to things specific to the IDB.
Currently this conta... | 24.791667 | 78 | 0.558319 |
import ida_kernwin
import idaapi
import idc
class BipIdb(object):
@staticmethod
def ptr_size():
info = idaapi.get_inf_structure()
if info.is_64bit():
bits = 64
elif info.is_32bit():
bits = 32
else:
bits = 16
return bits
... | true | true |
7906dc20bfa48b9577f568714b2b045210e106f4 | 660 | py | Python | examples/pygazebo_sample/ray_sensor.py | masayoshi-nakamura/CognitiveArchitectureLecture | 5e036b48e92f266062eb7be8a366e754dee24f2c | [
"Apache-2.0"
] | 4 | 2016-03-13T03:01:28.000Z | 2016-03-31T02:51:56.000Z | examples/pygazebo_sample/ray_sensor.py | masayoshi-nakamura/CognitiveArchitectureLecture | 5e036b48e92f266062eb7be8a366e754dee24f2c | [
"Apache-2.0"
] | null | null | null | examples/pygazebo_sample/ray_sensor.py | masayoshi-nakamura/CognitiveArchitectureLecture | 5e036b48e92f266062eb7be8a366e754dee24f2c | [
"Apache-2.0"
] | null | null | null |
import trollius
from trollius import From
from pprint import pprint
import pygazebo.msg.raysensor_pb2
@trollius.coroutine
def publish_loop():
manager = yield From(pygazebo.connect())
def callback(data):
ray = pygazebo.msg.raysensor_pb2.RaySensor()
msg = ray.FromString(data)
subscriber =... | 23.571429 | 52 | 0.69697 |
import trollius
from trollius import From
from pprint import pprint
import pygazebo.msg.raysensor_pb2
@trollius.coroutine
def publish_loop():
manager = yield From(pygazebo.connect())
def callback(data):
ray = pygazebo.msg.raysensor_pb2.RaySensor()
msg = ray.FromString(data)
subscriber =... | true | true |
7906dcba32b697bcec352e5844015ac3dc78b645 | 8,992 | py | Python | experiments/avi/eric_grasp_sac_pixel.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/avi/eric_grasp_sac_pixel.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/avi/eric_grasp_sac_pixel.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | import copy
import gym
import numpy as np
import torch.nn as nn
import railrl.misc.hyperparameter as hyp
import railrl.torch.pytorch_util as ptu
from railrl.data_management.obs_dict_replay_buffer import \
ObsDictReplayBuffer
from railrl.launchers.launcher_util import run_experiment
# from railrl.samplers.data_col... | 29.973333 | 95 | 0.632006 | import copy
import gym
import numpy as np
import torch.nn as nn
import railrl.misc.hyperparameter as hyp
import railrl.torch.pytorch_util as ptu
from railrl.data_management.obs_dict_replay_buffer import \
ObsDictReplayBuffer
from railrl.launchers.launcher_util import run_experiment
from railrl.samplers.data_col... | true | true |
7906dcc36c49edaf946121c9e22c6d3b0f5c395e | 1,792 | py | Python | examples/multi_webcamera/host/test_module/__init__.py | Curly386/spresense | af5691b95640aea7edd04f0d2b733bdec753444b | [
"Apache-2.0"
] | 110 | 2018-07-12T16:04:50.000Z | 2022-02-26T12:27:56.000Z | examples/multi_webcamera/host/test_module/__init__.py | Curly386/spresense | af5691b95640aea7edd04f0d2b733bdec753444b | [
"Apache-2.0"
] | 37 | 2018-08-10T13:05:45.000Z | 2022-03-18T20:33:18.000Z | examples/multi_webcamera/host/test_module/__init__.py | Curly386/spresense | af5691b95640aea7edd04f0d2b733bdec753444b | [
"Apache-2.0"
] | 94 | 2018-07-13T03:48:34.000Z | 2022-03-19T07:32:08.000Z | ############################################################################
# examples/multi_webcamera/host/test_module/__init__.py
#
# Copyright 2019, 2020 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the ... | 49.777778 | 76 | 0.717634 | true | true | |
7906ddcde6d1620f81e45bb1ed382aaf2324354a | 557 | py | Python | var/spack/repos/builtin/packages/py-fastjsonschema/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/py-fastjsonschema/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/py-fastjsonschema/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 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)
class PyFastjsonschema(PythonPackage):
"""Fast JSON schema validator for Python."""
homepage = "https://github.c... | 34.8125 | 96 | 0.759425 |
class PyFastjsonschema(PythonPackage):
homepage = "https://github.com/horejsek/python-fastjsonschema"
pypi = "fastjsonschema/fastjsonschema-2.15.1.tar.gz"
version('2.15.1', sha256='671f36d225b3493629b5e789428660109528f373cf4b8a22bac6fa2f8191c2d2')
depends_on('py-setuptools', type='build')
| true | true |
7906de69213fac71644c64f5bd8688674e6c5710 | 15,151 | py | Python | external/jsoncppWrapper/makerelease.py | csyzzkdcz/effective-garbanzo | 87223ecfc26371a9b251a70a0111ca4e0d95b594 | [
"MIT"
] | null | null | null | external/jsoncppWrapper/makerelease.py | csyzzkdcz/effective-garbanzo | 87223ecfc26371a9b251a70a0111ca4e0d95b594 | [
"MIT"
] | null | null | null | external/jsoncppWrapper/makerelease.py | csyzzkdcz/effective-garbanzo | 87223ecfc26371a9b251a70a0111ca4e0d95b594 | [
"MIT"
] | null | null | null | """Tag the sandbox for release, make source and doc tarballs.
Requires Python 2.6
Example of invocation (use to test the script):
python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,mingw -ublep 0.5.0 0.6.0-dev
Example of invocation when doing a release:
python makerelease.py 0.5.0 0.6.0-dev... | 41.059621 | 124 | 0.620883 | """Tag the sandbox for release, make source and doc tarballs.
Requires Python 2.6
Example of invocation (use to test the script):
python makerelease.py --force --retag --platform=msvc6,msvc71,msvc80,mingw -ublep 0.5.0 0.6.0-dev
Example of invocation when doing a release:
python makerelease.py 0.5.0 0.6.0-dev... | false | true |
7906de69e21c5d928080458b1e43711fa9c55e23 | 12,026 | py | Python | modin/config/envvars.py | atomicai/modin | ecaab1baafbf7e94aeb59aab8dd7fb48b687b4a3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/config/envvars.py | atomicai/modin | ecaab1baafbf7e94aeb59aab8dd7fb48b687b4a3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/config/envvars.py | atomicai/modin | ecaab1baafbf7e94aeb59aab8dd7fb48b687b4a3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 27.837963 | 116 | 0.633378 |
import os
import sys
from textwrap import dedent
import warnings
from packaging import version
import secrets
from .pubsub import Parameter, _TYPE_PARAMS, ExactStr, ValueSource
class EnvironmentVariable(Parameter, type=str, abstract=True):
varname: str = None
@classmethod
def _get_raw_fro... | true | true |
7906ded99a8d5f5babeeb0b290d7fff6e133a906 | 5,263 | py | Python | tests/conftest.py | snebel29/kubernetes-ingress | a31cd87288fa102ef9f094da7ecd371e9b36c680 | [
"Apache-2.0"
] | 1 | 2022-03-02T19:05:19.000Z | 2022-03-02T19:05:19.000Z | tests/conftest.py | snebel29/kubernetes-ingress | a31cd87288fa102ef9f094da7ecd371e9b36c680 | [
"Apache-2.0"
] | 228 | 2021-02-06T17:28:21.000Z | 2022-03-31T02:08:34.000Z | tests/conftest.py | snebel29/kubernetes-ingress | a31cd87288fa102ef9f094da7ecd371e9b36c680 | [
"Apache-2.0"
] | null | null | null | """Describe overall framework configuration."""
import os
import pytest
from kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION
from settings import (
DEFAULT_IMAGE,
DEFAULT_PULL_POLICY,
DEFAULT_IC_TYPE,
DEFAULT_SERVICE,
DEFAULT_DEPLOYMENT_TYPE,
NUM_REPLICAS,
BATCH_START,
... | 32.091463 | 123 | 0.620179 |
import os
import pytest
from kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION
from settings import (
DEFAULT_IMAGE,
DEFAULT_PULL_POLICY,
DEFAULT_IC_TYPE,
DEFAULT_SERVICE,
DEFAULT_DEPLOYMENT_TYPE,
NUM_REPLICAS,
BATCH_START,
BATCH_RESOURCES,
)
from suite.resources_utils ... | true | true |
7906df49e715c44b404cb978bc5b56dd63aa41ad | 28,718 | py | Python | src/tasks/lm.py | skysky77/MGNMT | 19dded399a310cd118eee09bd37d657746d11cf1 | [
"MIT"
] | 9 | 2021-01-11T05:49:29.000Z | 2021-12-20T21:13:38.000Z | src/tasks/lm.py | skysky77/MGNMT | 19dded399a310cd118eee09bd37d657746d11cf1 | [
"MIT"
] | 1 | 2021-01-28T03:27:09.000Z | 2021-02-19T05:58:56.000Z | src/tasks/lm.py | skysky77/MGNMT | 19dded399a310cd118eee09bd37d657746d11cf1 | [
"MIT"
] | 5 | 2021-01-11T05:49:39.000Z | 2021-09-27T03:06:45.000Z | # MIT License
# Copyright (c) 2018 the NJUNMT-pytorch authors.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | 34.516827 | 120 | 0.566683 |
import os
import random
import time
from copy import deepcopy
import numpy as np
import torch
import yaml
from tensorboardX import SummaryWriter
from tqdm import tqdm
from src.data.data_iterator import DataIterator
from src.data.dataset import TextLineDataset, ZipDataset
from src.data.vocabulary... | true | true |
7906dfc50e5923133cd35b0e678e921240a868fa | 148 | py | Python | ugali/analysis/__init__.py | mcnanna/ugali | 2572915b82af5b25e8762013e6d5baabdaa24b21 | [
"MIT"
] | 12 | 2016-10-26T20:45:33.000Z | 2021-11-24T04:07:43.000Z | ugali/analysis/__init__.py | mcnanna/ugali | 2572915b82af5b25e8762013e6d5baabdaa24b21 | [
"MIT"
] | 64 | 2017-04-14T15:04:24.000Z | 2022-02-03T19:42:57.000Z | ugali/analysis/__init__.py | kadrlica/ugali | dcf53594658a2b577f4da271783b43ed0a79fec9 | [
"MIT"
] | 12 | 2016-06-23T21:42:46.000Z | 2021-06-19T05:29:49.000Z | """
This is the UGaLi analysis sub-package.
Classes related to higher-level data analysis live here.
Modules
objects :
mask :
"""
| 13.454545 | 56 | 0.655405 | true | true | |
7906e18247d505a4162fb6278c7ccbb56a76fa50 | 1,593 | py | Python | cnn_modules/cnn_gail.py | aj96/InfoGAIL | a1f929bb47ca05a38c4fe54944204daef851fe90 | [
"MIT"
] | null | null | null | cnn_modules/cnn_gail.py | aj96/InfoGAIL | a1f929bb47ca05a38c4fe54944204daef851fe90 | [
"MIT"
] | null | null | null | cnn_modules/cnn_gail.py | aj96/InfoGAIL | a1f929bb47ca05a38c4fe54944204daef851fe90 | [
"MIT"
] | null | null | null | import logging
from typing import Iterable, Mapping, Optional, Union
import gym
import numpy as np
import torch as th
from stable_baselines3.common import on_policy_algorithm, vec_env
from imitation.data import types
from imitation.rewards import discrim_nets
from imitation.algorithms.adversarial import AdversarialT... | 28.963636 | 90 | 0.662272 | import logging
from typing import Iterable, Mapping, Optional, Union
import gym
import numpy as np
import torch as th
from stable_baselines3.common import on_policy_algorithm, vec_env
from imitation.data import types
from imitation.rewards import discrim_nets
from imitation.algorithms.adversarial import AdversarialT... | true | true |
7906e277f60157ae84e68f0902baffe877334ea5 | 4,220 | py | Python | ucsmsdk/mometa/equipment/EquipmentHealthLed.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/equipment/EquipmentHealthLed.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/equipment/EquipmentHealthLed.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for EquipmentHealthLed ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class EquipmentHealthLedConsts:
COLOR_AMBER = "amber"
COLOR_BLUE = "blue"
COLOR_GREEN = "green"
... | 56.266667 | 422 | 0.662322 |
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class EquipmentHealthLedConsts:
COLOR_AMBER = "amber"
COLOR_BLUE = "blue"
COLOR_GREEN = "green"
COLOR_RED = "red"
COLOR_UNKNOWN = "unknown"
HEALTH_LED_STATE_CRITICAL = "crit... | true | true |
7906e3f11f03d47490a17732decbb89245af9d54 | 6,397 | py | Python | tests/testing_samples/mapping_example.py | leonardbinet/pandagg | 5a5619e2190503da841e32782a4e55b35727d656 | [
"MIT"
] | null | null | null | tests/testing_samples/mapping_example.py | leonardbinet/pandagg | 5a5619e2190503da841e32782a4e55b35727d656 | [
"MIT"
] | null | null | null | tests/testing_samples/mapping_example.py | leonardbinet/pandagg | 5a5619e2190503da841e32782a4e55b35727d656 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
MAPPING = {
"dynamic": False,
"properties": {
"classification_type": {"type": "keyword"},
"date": {"type": "date", "format": "strict_date_optional_time||epoch_millis"},
"global_metrics": {
"dynamic": False,
"propertie... | 45.368794 | 90 | 0.239487 |
MAPPING = {
"dynamic": False,
"properties": {
"classification_type": {"type": "keyword"},
"date": {"type": "date", "format": "strict_date_optional_time||epoch_millis"},
"global_metrics": {
"dynamic": False,
"properties": {
"field": {
... | true | true |
7906e42edd58aae864814babfa54d8e8bff934f2 | 772 | py | Python | Chapter03/file_start.py | JeffreyAsuncion/LearningPython | 8242c3874ebb0f6a1e4cfd4ad845a9b42ffff0cc | [
"MIT"
] | null | null | null | Chapter03/file_start.py | JeffreyAsuncion/LearningPython | 8242c3874ebb0f6a1e4cfd4ad845a9b42ffff0cc | [
"MIT"
] | null | null | null | Chapter03/file_start.py | JeffreyAsuncion/LearningPython | 8242c3874ebb0f6a1e4cfd4ad845a9b42ffff0cc | [
"MIT"
] | null | null | null |
def main():
# Open a file for writing and create it if it doesn't exist
# myfile = open("textfile.txt", "w+")
# # Open the file for appending text to the end
# myfile = open("textfile.txt", "a+")
# # write some lines of data to the file
# for i in range(10):
# myfile... | 25.733333 | 64 | 0.537565 |
def main():
# myfile = open("textfile.txt", "w+")
# # Open the file for appending text to the end
# myfile = open("textfile.txt", "a+")
# # write some lines of data to the file
# for i in range(10):
# myfile.write("This is some new text\n")
# # close the f... | true | true |
7906e55041dfad55e8531eb167030d717df9a61c | 2,224 | py | Python | tests/event_sourced_aggregates/test_raising_events_from_within_aggregates.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | tests/event_sourced_aggregates/test_raising_events_from_within_aggregates.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | tests/event_sourced_aggregates/test_raising_events_from_within_aggregates.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from uuid import uuid4
import pytest
from protean import BaseCommandHandler, BaseEvent, BaseEventSourcedAggregate, handle
from protean.core.command import BaseCommand
from protean.core.event_sourced_aggregate import apply
from protean.fields import Identifier, String
from protean.g... | 24.988764 | 84 | 0.657824 | from __future__ import annotations
from uuid import uuid4
import pytest
from protean import BaseCommandHandler, BaseEvent, BaseEventSourcedAggregate, handle
from protean.core.command import BaseCommand
from protean.core.event_sourced_aggregate import apply
from protean.fields import Identifier, String
from protean.g... | true | true |
7906e811392f0d2a66942e3722bc905f36053fcd | 1,186 | py | Python | readthedocs/projects/signals.py | ank-forked/readthedocs.org | e4110e8db5d25b7e6c699dd2df1a580b04ee8d16 | [
"MIT"
] | 1 | 2019-10-16T07:33:37.000Z | 2019-10-16T07:33:37.000Z | readthedocs/projects/signals.py | ank-forked/readthedocs.org | e4110e8db5d25b7e6c699dd2df1a580b04ee8d16 | [
"MIT"
] | 4 | 2021-02-08T21:06:49.000Z | 2021-12-13T20:51:17.000Z | readthedocs/projects/signals.py | ank-forked/readthedocs.org | e4110e8db5d25b7e6c699dd2df1a580b04ee8d16 | [
"MIT"
] | 3 | 2016-08-04T12:53:13.000Z | 2016-11-02T14:17:55.000Z | """Project signals"""
import logging
import django.dispatch
from django.contrib import messages
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from readthedocs.oauth.services import registry
before_vcs = django.dispatch.Signal(providing_args=["version"])
after_vcs = dj... | 30.410256 | 78 | 0.716695 |
import logging
import django.dispatch
from django.contrib import messages
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from readthedocs.oauth.services import registry
before_vcs = django.dispatch.Signal(providing_args=["version"])
after_vcs = django.dispatch.Signal(p... | true | true |
7906e813c9cc3460deeb3dd0d5bd2171e48fde29 | 30,056 | py | Python | yt_dlp/extractor/facebook.py | RobinD42/yt-dlc | aae273ded871caac1995381033a5b7ecaf4a526b | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/facebook.py | RobinD42/yt-dlc | aae273ded871caac1995381033a5b7ecaf4a526b | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/facebook.py | RobinD42/yt-dlc | aae273ded871caac1995381033a5b7ecaf4a526b | [
"Unlicense"
] | 1 | 2021-09-10T18:22:00.000Z | 2021-09-10T18:22:00.000Z | # coding: utf-8
from __future__ import unicode_literals
import json
import re
import socket
from .common import InfoExtractor
from ..compat import (
compat_etree_fromstring,
compat_http_client,
compat_str,
compat_urllib_error,
compat_urllib_parse_unquote,
compat_urllib_parse_unquote_plus,
)
fr... | 42.512023 | 159 | 0.523756 |
from __future__ import unicode_literals
import json
import re
import socket
from .common import InfoExtractor
from ..compat import (
compat_etree_fromstring,
compat_http_client,
compat_str,
compat_urllib_error,
compat_urllib_parse_unquote,
compat_urllib_parse_unquote_plus,
)
from ..utils impo... | true | true |
7906e91271c9ceae69038fae01ff08051a3e6531 | 31,779 | py | Python | app.py | krishnaaxo/Finance-Forcasting-Dashboard | 6386247b7e661fb0804b80d4c77dd5dcd94a7e87 | [
"Apache-2.0"
] | null | null | null | app.py | krishnaaxo/Finance-Forcasting-Dashboard | 6386247b7e661fb0804b80d4c77dd5dcd94a7e87 | [
"Apache-2.0"
] | null | null | null | app.py | krishnaaxo/Finance-Forcasting-Dashboard | 6386247b7e661fb0804b80d4c77dd5dcd94a7e87 | [
"Apache-2.0"
] | 1 | 2021-08-10T05:02:10.000Z | 2021-08-10T05:02:10.000Z |
import pandas as pd
import tweepy
from textblob import TextBlob
from wordcloud import WordCloud
import plotly.graph_objs as go
import os
import re
import pystan
import numpy as np
import streamlit as st
import matplotlib.pyplot as plt
import yfinance as yf
from fbprophet import Prophet
from fbprophet.plot import plo... | 27.208048 | 870 | 0.6082 |
import pandas as pd
import tweepy
from textblob import TextBlob
from wordcloud import WordCloud
import plotly.graph_objs as go
import os
import re
import pystan
import numpy as np
import streamlit as st
import matplotlib.pyplot as plt
import yfinance as yf
from fbprophet import Prophet
from fbprophet.plot import plo... | true | true |
7906ea494164766ff99587dacd54ddcc796a6d85 | 2,041 | py | Python | graphite_beacon/handlers/pagerduty.py | z1nkum/graphite-beacon | d1fd4c34db76ac36f27e39d00a348a5dcaf51c31 | [
"MIT"
] | null | null | null | graphite_beacon/handlers/pagerduty.py | z1nkum/graphite-beacon | d1fd4c34db76ac36f27e39d00a348a5dcaf51c31 | [
"MIT"
] | null | null | null | graphite_beacon/handlers/pagerduty.py | z1nkum/graphite-beacon | d1fd4c34db76ac36f27e39d00a348a5dcaf51c31 | [
"MIT"
] | null | null | null | import json
import hashlib
from tornado import httpclient as hc
from tornado import gen
from graphite_beacon.handlers import LOGGER, AbstractHandler
class PagerdutyHandler(AbstractHandler):
name = 'pagerduty'
# Default options
defaults = {
'subdomain': None,
'apitoken': None,
'... | 30.462687 | 92 | 0.598726 | import json
import hashlib
from tornado import httpclient as hc
from tornado import gen
from graphite_beacon.handlers import LOGGER, AbstractHandler
class PagerdutyHandler(AbstractHandler):
name = 'pagerduty'
defaults = {
'subdomain': None,
'apitoken': None,
'service_key': Non... | true | true |
7906ea566fb2e5dd7c123a133028b83553dc8cf5 | 3,242 | py | Python | pogweb/models.py | ahnaf-zamil/pogweb | 14ba9bde39f100dc1e7b0fbf6aa959551a8d74d1 | [
"MIT"
] | 3 | 2021-01-25T17:03:29.000Z | 2021-05-21T15:34:55.000Z | pogweb/models.py | ahnaf-zamil/pogweb | 14ba9bde39f100dc1e7b0fbf6aa959551a8d74d1 | [
"MIT"
] | null | null | null | pogweb/models.py | ahnaf-zamil/pogweb | 14ba9bde39f100dc1e7b0fbf6aa959551a8d74d1 | [
"MIT"
] | null | null | null | """
Copyright 2021 K.M Ahnaf Zamil
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, su... | 36.426966 | 460 | 0.677051 |
from urllib.parse import parse_qs
import typing
__all__: typing.Final = ["Request", "ImmutableDict", "_Redirect", "Endpoint"]
class _Redirect(object):
def __init__(self, url: str) -> None:
self.url = url
class ImmutableDict(dict):
def __setitem__(self, k, v) -> None:
raise ValueError("... | true | true |
7906ea82114b521989075e361ad79c0e393d521b | 4,466 | py | Python | vsmlib/embeddings/bofang/annotate_corpus_nltk.py | berntham/vsmlib | b2ed762ff50b5dcdd6999ad75c205557e70c6598 | [
"Apache-2.0"
] | 16 | 2017-01-04T05:18:42.000Z | 2021-08-08T09:31:08.000Z | vsmlib/embeddings/bofang/annotate_corpus_nltk.py | berntham/vsmlib | b2ed762ff50b5dcdd6999ad75c205557e70c6598 | [
"Apache-2.0"
] | 8 | 2017-07-01T04:23:53.000Z | 2019-01-04T04:03:45.000Z | vsmlib/embeddings/bofang/annotate_corpus_nltk.py | berntham/vsmlib | b2ed762ff50b5dcdd6999ad75c205557e70c6598 | [
"Apache-2.0"
] | 2 | 2017-10-31T02:21:08.000Z | 2021-01-07T00:03:23.000Z | #!/usr/bin/env python
"""
convert corpus to annotated corpus
This script uses nltk for dependency parsing, which is based on stanford corenlp.
"""
import os
from nltk.parse.stanford import *
import time
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('corenlp_path',
help='Dir... | 43.784314 | 211 | 0.631438 |
import os
from nltk.parse.stanford import *
import time
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('corenlp_path',
help='Directory to stanford corenlp')
parser.add_argument('--max_block_size', '-mbs', default=1000000, type=int,
help='indicate how mu... | true | true |
7906ea9981d11412a7c0511aa1d3f343eb28facd | 3,243 | py | Python | py4syn/epics/DxpFakeClass.py | gabrielpreviato/py4syn | ac97c220d38e1aa630ff3ba4d9da030a0d3833d8 | [
"0BSD"
] | 12 | 2015-07-12T17:15:06.000Z | 2018-04-28T06:51:15.000Z | py4syn/epics/DxpFakeClass.py | gabrielpreviato/py4syn | ac97c220d38e1aa630ff3ba4d9da030a0d3833d8 | [
"0BSD"
] | 29 | 2016-06-28T12:24:08.000Z | 2018-10-22T15:59:43.000Z | py4syn/epics/DxpFakeClass.py | gabrielpreviato/py4syn | ac97c220d38e1aa630ff3ba4d9da030a0d3833d8 | [
"0BSD"
] | 10 | 2015-09-02T17:30:33.000Z | 2018-01-18T18:52:32.000Z | """Dxp Class
Python Class for EPICS Fake Dxp Control.
:platform: Unix
:synopsis: Python Class for EPICS Spectro control.
.. moduleauthor:: Gabriel Fedel <gabriel.fedel@lnls.br>
.. note:: 11/30/2016 [gabrielfedel] first version released
"""
import os
import numpy as np
import h5py
from py4syn.epics.ImageHDFClas... | 24.946154 | 77 | 0.591736 | import os
import numpy as np
import h5py
from py4syn.epics.ImageHDFClass import ImageHDF
NUMPOINTS = 2048
CHANNELPOSITION=3
ROIPOSITION=6
class DxpFake(ImageHDF):
def __init__(self, mnemonic, numberOfChannels=4, numberOfRois=32,
pv=None, dxpType="mca", responseTimeout=15, output="out"):
... | true | true |
7906eaad81d7cc2c368c9d7248e4d0d25548bdd2 | 3,561 | py | Python | app/src/main/cpp/openvpn3/win/build.py | qlcchain/WinQ-Android-code | e39f2043ca82c9d61df3819ca9fb3007a7870426 | [
"MIT"
] | 5 | 2018-07-12T05:50:46.000Z | 2021-01-11T12:28:24.000Z | app/src/main/cpp/openvpn3/win/build.py | huzhipeng111/WinQ | 39925732597fd4822cd554429fab655e8c858c4b | [
"MIT"
] | 1 | 2019-07-19T02:40:32.000Z | 2019-07-19T02:40:32.000Z | app/src/main/cpp/openvpn3/win/build.py | huzhipeng111/WinQ | 39925732597fd4822cd554429fab655e8c858c4b | [
"MIT"
] | 7 | 2018-07-11T10:37:02.000Z | 2019-08-03T10:34:08.000Z | #!/c/python27/python
import os
from utils import *
def cli_cpp(parms):
return os.path.join(parms['OVPN3'], "core", "test", "ovpncli", "cli.cpp")
def src_fn(parms, srcfile):
# Get source file name
if srcfile:
if '.' not in os.path.basename(srcfile):
srcfile += ".cpp"
else:
... | 37.882979 | 641 | 0.624544 |
import os
from utils import *
def cli_cpp(parms):
return os.path.join(parms['OVPN3'], "core", "test", "ovpncli", "cli.cpp")
def src_fn(parms, srcfile):
if srcfile:
if '.' not in os.path.basename(srcfile):
srcfile += ".cpp"
else:
srcfile = cli_cpp(parms)
return srcfi... | true | true |
7906ecc8a15fb85fc44372e951a1e8533503a994 | 353 | py | Python | algorithms_and_data_structures/algorithms/string_processing/is_palindrome/test_is_palindrome.py | IngCarlosPedroza/algorithms-and-data-structures-py | 435aea7a703067c008001cd04e7f101dd6aff190 | [
"MIT"
] | 2 | 2022-01-14T01:33:24.000Z | 2022-01-14T03:23:41.000Z | algorithms_and_data_structures/algorithms/string_processing/is_palindrome/test_is_palindrome.py | IngCarlosPedroza/algorithms-and-data-structures-py | 435aea7a703067c008001cd04e7f101dd6aff190 | [
"MIT"
] | 1 | 2022-01-14T03:26:58.000Z | 2022-01-14T03:26:58.000Z | algorithms_and_data_structures/algorithms/string_processing/is_palindrome/test_is_palindrome.py | IngCarlosPedroza/algorithms-and-data-structures-py | 435aea7a703067c008001cd04e7f101dd6aff190 | [
"MIT"
] | 1 | 2022-01-14T03:23:45.000Z | 2022-01-14T03:23:45.000Z | from . import is_palindrome
test_subjects = [
is_palindrome
]
complex_pali = '''Anita. .laVa,
:; la?
TINa!'''
def test_is_palindrome():
for subject in test_subjects:
assert subject.algorithm('')
assert subject.algorithm(' ')
assert subject.algorithm(complex_pali)
asse... | 19.611111 | 46 | 0.648725 | from . import is_palindrome
test_subjects = [
is_palindrome
]
complex_pali = '''Anita. .laVa,
:; la?
TINa!'''
def test_is_palindrome():
for subject in test_subjects:
assert subject.algorithm('')
assert subject.algorithm(' ')
assert subject.algorithm(complex_pali)
asse... | true | true |
7906ee715bc351c3d4cefb014bed730332642ace | 56,888 | py | Python | Packs/HelloWorld/Integrations/HelloWorld/HelloWorld.py | shubhamyadav-coditas/content | 9f53434e67eaaf45b5f13a132ce86246842185a9 | [
"MIT"
] | 1 | 2021-08-07T00:21:58.000Z | 2021-08-07T00:21:58.000Z | Packs/HelloWorld/Integrations/HelloWorld/HelloWorld.py | shubhamyadav-coditas/content | 9f53434e67eaaf45b5f13a132ce86246842185a9 | [
"MIT"
] | 1 | 2022-01-19T13:41:51.000Z | 2022-01-19T15:00:05.000Z | Packs/HelloWorld/Integrations/HelloWorld/HelloWorld.py | shubhamyadav-coditas/content | 9f53434e67eaaf45b5f13a132ce86246842185a9 | [
"MIT"
] | 1 | 2021-01-05T12:20:30.000Z | 2021-01-05T12:20:30.000Z | """HelloWorld Integration for Cortex XSOAR (aka Demisto)
This integration is a good example on you can build a Cortex XSOAR Integration
using Python 3. Please follow the documentation links below and make sure that
your integration follows the Code Conventions and passes the Linting phase.
Developer Documentation: ht... | 38.937714 | 127 | 0.671319 | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import json
import urllib3
import dateparser
import traceback
from typing import Any, Dict, Tuple, List, Optional, Union, cast
urllib3.disable_warnings()
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
MAX_INCIDENTS_TO_FETCH =... | true | true |
7906ee89072b9793cbb86da75beda2abaf56e9cc | 70,565 | py | Python | twosum.py | leocody/Leet-code | 763fd08159527f6c141a31b3b5ea8357d6218b60 | [
"MIT"
] | null | null | null | twosum.py | leocody/Leet-code | 763fd08159527f6c141a31b3b5ea8357d6218b60 | [
"MIT"
] | null | null | null | twosum.py | leocody/Leet-code | 763fd08159527f6c141a31b3b5ea8357d6218b60 | [
"MIT"
] | null | null | null | from typing import List
def twoSum(nums: List[int], target: int) -> List[int]:
length = len(nums)
for i,v1 in enumerate(nums):
sliced = nums[i + 1: length]
for j,v2 in enumerate(sliced):
result = v1 + v2
if result == target:
return [i, i+j+1]
return [... | 2,822.6 | 70,040 | 0.817941 | from typing import List
def twoSum(nums: List[int], target: int) -> List[int]:
length = len(nums)
for i,v1 in enumerate(nums):
sliced = nums[i + 1: length]
for j,v2 in enumerate(sliced):
result = v1 + v2
if result == target:
return [i, i+j+1]
return [... | true | true |
7906ef96b10419d4a73523d05c620c325fc37ac4 | 2,584 | py | Python | components/Actuators/HighLevel/feederMap.py | Raptacon/Robot-2022 | f59c6a6ebd5779a2fd91181b65cbcd677507ca5d | [
"MIT"
] | 4 | 2022-01-31T14:05:31.000Z | 2022-03-26T14:12:45.000Z | components/Actuators/HighLevel/feederMap.py | Raptacon/Robot-2022 | f59c6a6ebd5779a2fd91181b65cbcd677507ca5d | [
"MIT"
] | 57 | 2022-01-13T02:41:31.000Z | 2022-03-26T14:50:42.000Z | components/Actuators/HighLevel/feederMap.py | Raptacon/Robot-2022 | f59c6a6ebd5779a2fd91181b65cbcd677507ca5d | [
"MIT"
] | null | null | null | from robotMap import XboxMap
from components.Actuators.LowLevel.shooterMotors import ShooterMotors
from components.Actuators.LowLevel.intakeMotor import IntakeMotor
from components.Actuators.HighLevel.hopperMotor import HopperMotor
from utils.DirectionEnums import Direction
from enum import Enum, auto
from magicbot imp... | 41.015873 | 100 | 0.689241 | from robotMap import XboxMap
from components.Actuators.LowLevel.shooterMotors import ShooterMotors
from components.Actuators.LowLevel.intakeMotor import IntakeMotor
from components.Actuators.HighLevel.hopperMotor import HopperMotor
from utils.DirectionEnums import Direction
from enum import Enum, auto
from magicbot imp... | true | true |
7906f07907466d943eea03ec2b740451f5109b2c | 5,968 | py | Python | selenium_test/sele_test_mail_login.py | ivanlevsky/cowabunga-potato | ab317582b7b8f99d7be3ea4f5edbe9829fc398fb | [
"MIT"
] | null | null | null | selenium_test/sele_test_mail_login.py | ivanlevsky/cowabunga-potato | ab317582b7b8f99d7be3ea4f5edbe9829fc398fb | [
"MIT"
] | null | null | null | selenium_test/sele_test_mail_login.py | ivanlevsky/cowabunga-potato | ab317582b7b8f99d7be3ea4f5edbe9829fc398fb | [
"MIT"
] | null | null | null | from selenium_test.selenium_utils import *
from file_and_system.windows_os_utils import WindowsOsUtil
from python_common.global_param import GlobalParam
from http_request.request_utils import request_download_file_by_url
import cv2 as cv
import time
WindowsOsUtil.kill_process_by_name('MicrosoftWebDriver.exe')
# mail_l... | 44.537313 | 115 | 0.744135 | from selenium_test.selenium_utils import *
from file_and_system.windows_os_utils import WindowsOsUtil
from python_common.global_param import GlobalParam
from http_request.request_utils import request_download_file_by_url
import cv2 as cv
import time
WindowsOsUtil.kill_process_by_name('MicrosoftWebDriver.exe')
mail_li... | true | true |
7906f187e6c2c173257b7915f6ff0719f60b38d1 | 7,832 | py | Python | tests/test_gateway_mqtt.py | jslove/pymysensors | 0555397b2985a0d69bf3c5d615001aaea2d79b89 | [
"MIT"
] | null | null | null | tests/test_gateway_mqtt.py | jslove/pymysensors | 0555397b2985a0d69bf3c5d615001aaea2d79b89 | [
"MIT"
] | null | null | null | tests/test_gateway_mqtt.py | jslove/pymysensors | 0555397b2985a0d69bf3c5d615001aaea2d79b89 | [
"MIT"
] | null | null | null | """Test mysensors MQTT gateway with unittest."""
import os
import tempfile
import time
from unittest import TestCase, main, mock
from mysensors import ChildSensor, Sensor
from mysensors.gateway_mqtt import MQTTGateway
class TestMQTTGateway(TestCase):
"""Test the MQTT Gateway."""
def setUp(self):
"""... | 39.16 | 79 | 0.598698 | import os
import tempfile
import time
from unittest import TestCase, main, mock
from mysensors import ChildSensor, Sensor
from mysensors.gateway_mqtt import MQTTGateway
class TestMQTTGateway(TestCase):
def setUp(self):
self.mock_pub = mock.Mock()
self.mock_sub = mock.Mock()
self.gateway ... | true | true |
7906f2f1ceef71512cbb67e6506c799f2b8f2b1a | 7,195 | py | Python | backend/webserver/api/annotator.py | mgarbade/coco-annotator | 44bfabde0dde140c83a45fc52cc590f2a792f7b3 | [
"MIT"
] | null | null | null | backend/webserver/api/annotator.py | mgarbade/coco-annotator | 44bfabde0dde140c83a45fc52cc590f2a792f7b3 | [
"MIT"
] | 27 | 2019-10-24T05:44:46.000Z | 2020-11-26T07:29:26.000Z | backend/webserver/api/annotator.py | mgarbade/coco-annotator | 44bfabde0dde140c83a45fc52cc590f2a792f7b3 | [
"MIT"
] | 1 | 2019-10-10T02:34:14.000Z | 2019-10-10T02:34:14.000Z | import datetime
from flask_restplus import Namespace, Resource
from flask_login import login_required, current_user
from flask import request
from ..util import query_util, coco_util, profile
from config import Config
from database import (
ImageModel,
CategoryModel,
AnnotationModel,
SessionEvent
)
... | 36.338384 | 109 | 0.577623 | import datetime
from flask_restplus import Namespace, Resource
from flask_login import login_required, current_user
from flask import request
from ..util import query_util, coco_util, profile
from config import Config
from database import (
ImageModel,
CategoryModel,
AnnotationModel,
SessionEvent
)
... | true | true |
7906f46b5d41b0f95f4cb238f5651534fc506d06 | 32,803 | py | Python | src/train_softmax.py | govindjeevan/facenet | 70a7ee5c5836bc8a31935250eb2d9e818ebf1f2d | [
"MIT"
] | null | null | null | src/train_softmax.py | govindjeevan/facenet | 70a7ee5c5836bc8a31935250eb2d9e818ebf1f2d | [
"MIT"
] | null | null | null | src/train_softmax.py | govindjeevan/facenet | 70a7ee5c5836bc8a31935250eb2d9e818ebf1f2d | [
"MIT"
] | null | null | null | """Training a face recognizer with TensorFlow using softmax cross entropy loss
"""
# MIT License
#
# Copyright (c) 2016 David Sandberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software with... | 55.692699 | 209 | 0.698137 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import datetime
import os.path
import time
import sys
import random
import tensorflow as tf
import numpy as np
import importlib
import argparse
import facenet
import lfw
impo... | true | true |
7906f563c0009ac37695f50c9dc2b035b8f004aa | 174,992 | py | Python | python/paddle/fluid/layers/detection.py | Jeffrey28/Paddle | 6b70e05e9345ee7907005b3840430edacdb15095 | [
"Apache-2.0"
] | 3 | 2021-06-11T06:48:10.000Z | 2021-09-02T10:18:06.000Z | python/paddle/fluid/layers/detection.py | 92lqllearning/Paddle | d11c140e280880b9d031fa38361f3230aef6cf9c | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/layers/detection.py | 92lqllearning/Paddle | d11c140e280880b9d031fa38361f3230aef6cf9c | [
"Apache-2.0"
] | 1 | 2020-11-05T08:41:11.000Z | 2020-11-05T08:41:11.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 44.869744 | 224 | 0.610142 |
from __future__ import print_function
from .layer_function_generator import generate_layer_fn
from .layer_function_generator import autodoc, templatedoc
from ..layer_helper import LayerHelper
from ..framework import Variable
from .loss import softmax_with_cross_entropy
from . import tensor
from . import ... | true | true |
7906f631304b4282f2f80e05dfd5cc90e50ef925 | 95,139 | py | Python | jp.atcoder/abc009/abc009_4/17183548.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc009/abc009_4/17183548.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc009/abc009_4/17183548.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import itertools
import math
import string
import sys
from bisect import bisect_left as bi_l
from bisect import bisect_right as bi_r
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush
from operator import or_, xor
inf = float("inf")
from functools import lru_cache, reduc... | 32.195939 | 1,217 | 0.368661 | import itertools
import math
import string
import sys
from bisect import bisect_left as bi_l
from bisect import bisect_right as bi_r
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush
from operator import or_, xor
inf = float("inf")
from functools import lru_cache, reduc... | true | true |
7906f6703118c8c80c7b717845aff984c9f1b225 | 19,073 | py | Python | owslib/coverage/wcs100.py | ferreteleco/OWSLib | ec4ac8d8006ebf8049319d282314b0e1e6263472 | [
"BSD-3-Clause"
] | null | null | null | owslib/coverage/wcs100.py | ferreteleco/OWSLib | ec4ac8d8006ebf8049319d282314b0e1e6263472 | [
"BSD-3-Clause"
] | null | null | null | owslib/coverage/wcs100.py | ferreteleco/OWSLib | ec4ac8d8006ebf8049319d282314b0e1e6263472 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2004, 2006 Sean C. Gillies
# Copyright (c) 2007 STFC <http://www.stfc.ac.uk>
#
# Authors :
# Dominic Lowe <d.lowe@rl.ac.uk>
#
# Contact email: d.lowe@rl.ac.uk
# ========================... | 43.446469 | 222 | 0.604677 |
from owslib.coverage.wcsBase import WCSBase, WCSCapabilitiesReader, ServiceException
from urllib.parse import urlencode
from owslib.util import openURL, testXMLValue
from owslib.etree import etree
from owslib.crs import Crs
import os
import errno
import logging
from owslib.util import log, makeString
def... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.