hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08ff057db8a3f752e72a5d9effa90be5d83b405f
1,118
py
Python
scrubadub/detectors/vehicle_licence_plate.py
datascopeanalytics/scrubadub
ab199f0b3cc3ca11f646aabb05ebe124d2757ea5
[ "Apache-2.0" ]
190
2015-12-03T01:31:36.000Z
2020-09-02T23:46:38.000Z
scrubadub/detectors/vehicle_licence_plate.py
vishalbelsare/scrubadub
ab199f0b3cc3ca11f646aabb05ebe124d2757ea5
[ "Apache-2.0" ]
54
2020-09-10T14:46:14.000Z
2022-03-10T06:03:00.000Z
scrubadub/detectors/vehicle_licence_plate.py
datascopeanalytics/scrubadub
ab199f0b3cc3ca11f646aabb05ebe124d2757ea5
[ "Apache-2.0" ]
57
2016-04-04T18:37:38.000Z
2020-08-18T22:59:03.000Z
import re from scrubadub.detectors.catalogue import register_detector from .base import RegionLocalisedRegexDetector from ..filth.vehicle_licence_plate import VehicleLicencePlateFilth @register_detector class VehicleLicencePlateDetector(RegionLocalisedRegexDetector): """Detects standard british licence plates.""...
31.942857
86
0.62254
import re from scrubadub.detectors.catalogue import register_detector from .base import RegionLocalisedRegexDetector from ..filth.vehicle_licence_plate import VehicleLicencePlateFilth @register_detector class VehicleLicencePlateDetector(RegionLocalisedRegexDetector): filth_cls = VehicleLicencePlateFilth name...
true
true
08ff05e8013f11763c572e11cd998dab7eeb3b86
385
py
Python
parallel/soln/remote_iter_hint.py
minrk/ipython-cse17
16a9059c7054a8bd4977a3cb8b09c100ea779069
[ "BSD-3-Clause" ]
3
2017-03-02T07:11:37.000Z
2017-03-03T06:13:32.000Z
parallel/soln/remote_iter_hint.py
minrk/ipython-cse17
16a9059c7054a8bd4977a3cb8b09c100ea779069
[ "BSD-3-Clause" ]
null
null
null
parallel/soln/remote_iter_hint.py
minrk/ipython-cse17
16a9059c7054a8bd4977a3cb8b09c100ea779069
[ "BSD-3-Clause" ]
null
null
null
from IPython.display import display t_minus = range(10,0,-1) def lazy_iterator(name): seq = eval(name) it = iter(seq) while True: try: yield next(it) # this looks silly locally, but it will be useful for the remote version: except StopIteration: raise StopIt...
22.647059
81
0.641558
from IPython.display import display t_minus = range(10,0,-1) def lazy_iterator(name): seq = eval(name) it = iter(seq) while True: try: yield next(it) except StopIteration: raise StopIteration lzit = lazy_iterator('t_minus') display(lzit) list(lzit)
true
true
08ff0893a8ff070ed775ba4fdc90c4286a0353d8
1,624
py
Python
ngraph/python/tests/test_ngraph/test_gather.py
NikDemoShow/openvino
31907e51e96f1603753dc69811bdf738374ca5e6
[ "Apache-2.0" ]
1
2022-02-10T08:05:09.000Z
2022-02-10T08:05:09.000Z
ngraph/python/tests/test_ngraph/test_gather.py
NikDemoShow/openvino
31907e51e96f1603753dc69811bdf738374ca5e6
[ "Apache-2.0" ]
105
2020-06-04T00:23:29.000Z
2022-02-21T13:04:33.000Z
ngraph/python/tests/test_ngraph/test_gather.py
v-Golubev/openvino
26936d1fbb025c503ee43fe74593ee9d7862ab15
[ "Apache-2.0" ]
3
2021-04-25T06:52:41.000Z
2021-05-07T02:01:44.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import ngraph as ng import numpy as np from tests.test_ngraph.util import run_op_node def test_gather(): input_data = np.array( [1.0, 1.1, 1.2, 2.0, 2.1, 2.2, 3.0, 3.1, 3.2], np.float32 ).reshape((3, 3)) input_indi...
29.527273
88
0.586207
import ngraph as ng import numpy as np from tests.test_ngraph.util import run_op_node def test_gather(): input_data = np.array( [1.0, 1.1, 1.2, 2.0, 2.1, 2.2, 3.0, 3.1, 3.2], np.float32 ).reshape((3, 3)) input_indices = np.array([0, 2], np.int32).reshape(1, 2) input_axis = np.array([1], np.i...
true
true
08ff09165ec87fa17c897cee1e99b2e359b99302
20,415
py
Python
core/roslib/src/roslib/packages.py
mcx/ros
93d8da32091b8b43702eab5d3202f4511dfeb7dc
[ "BSD-3-Clause" ]
2,051
2015-01-03T01:00:53.000Z
2022-03-30T13:36:24.000Z
core/roslib/src/roslib/packages.py
mcx/ros
93d8da32091b8b43702eab5d3202f4511dfeb7dc
[ "BSD-3-Clause" ]
204
2015-01-01T00:44:00.000Z
2022-03-17T07:31:55.000Z
core/roslib/src/roslib/packages.py
mcx/ros
93d8da32091b8b43702eab5d3202f4511dfeb7dc
[ "BSD-3-Clause" ]
730
2015-01-04T05:44:08.000Z
2022-03-24T07:16:31.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
37.458716
194
0.658878
import os import stat import sys from subprocess import PIPE from subprocess import Popen from catkin.find_in_workspaces import find_in_workspaces as catkin_find import roslib.manifest import rospkg SRC_DIR = 'src' ROS_PACKAGE_PATH = rospkg.environment.ROS_PACKAGE_PATH ROS_ROOT = rospkg.environment.ROS_ROOT c...
true
true
08ff0931f2bb5aabf4195f878c4f5770ac428280
7,998
py
Python
userbot/plugins/globalban.py
meaall-com/Telebot
a08193ae6c3e5814b309d079e95c4951eafcbc19
[ "MIT" ]
null
null
null
userbot/plugins/globalban.py
meaall-com/Telebot
a08193ae6c3e5814b309d079e95c4951eafcbc19
[ "MIT" ]
null
null
null
userbot/plugins/globalban.py
meaall-com/Telebot
a08193ae6c3e5814b309d079e95c4951eafcbc19
[ "MIT" ]
null
null
null
# Imported by @ from userbot.events import admin_cmd from userbot import bot, BOTLOG_CHATID, CMD_HELP import asyncio from telethon import events from telethon.tl.functions.channels import EditBannedRequest from telethon.tl.types import (PeerChat, PeerChannel,ChannelParticipantsAdmins, ChatAdminRights,ChatBanned...
41.65625
260
0.543386
from userbot.events import admin_cmd from userbot import bot, BOTLOG_CHATID, CMD_HELP import asyncio from telethon import events from telethon.tl.functions.channels import EditBannedRequest from telethon.tl.types import (PeerChat, PeerChannel,ChannelParticipantsAdmins, ChatAdminRights,ChatBannedRights, MessageEn...
true
true
08ff0b6e6fd7bacba88fab5e937f176e1fc93dce
169,574
py
Python
cinder/tests/unit/volume/drivers/test_pure.py
cloudification-io/cinder
23d76e01f2b4f3771b57fb287084a4884238b827
[ "Apache-2.0" ]
1
2019-02-17T17:49:41.000Z
2019-02-17T17:49:41.000Z
cinder/tests/unit/volume/drivers/test_pure.py
BelieveInFuture/cinder
fff95fa6a68a054488ee087b6e31f4f5e28209dc
[ "Apache-2.0" ]
1
2020-12-22T20:40:20.000Z
2020-12-23T18:34:42.000Z
cinder/tests/unit/volume/drivers/test_pure.py
BelieveInFuture/cinder
fff95fa6a68a054488ee087b6e31f4f5e28209dc
[ "Apache-2.0" ]
1
2019-06-24T20:21:33.000Z
2019-06-24T20:21:33.000Z
# Copyright (c) 2014 Pure Storage, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
41.74643
79
0.615012
from copy import deepcopy import http import sys from unittest import mock import ddt from oslo_utils import units from cinder import exception from cinder.objects import fields from cinder.objects import volume_type from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_group from c...
true
true
08ff0bd50962b734ef3641603a85face17f810f7
13,594
py
Python
plot.py
saxenam06/Approximate-Dynamic-Programming
de613c10e087ae6b4a87a1730104c59442b33797
[ "Apache-2.0" ]
1
2021-12-28T04:25:36.000Z
2021-12-28T04:25:36.000Z
plot.py
saxenam06/Approximate-Dynamic-Programming
de613c10e087ae6b4a87a1730104c59442b33797
[ "Apache-2.0" ]
null
null
null
plot.py
saxenam06/Approximate-Dynamic-Programming
de613c10e087ae6b4a87a1730104c59442b33797
[ "Apache-2.0" ]
null
null
null
from config import GeneralConfig, DynamicsConfig, PlotConfig import numpy as np import torch import time import os from network import Actor, Critic from solver import Solver from utils import idplot, numpy2torch, step_relative, recover_absolute_state, cm2inch import matplotlib.pyplot as plt import dynamics S_DIM = 4 ...
41.069486
165
0.582757
from config import GeneralConfig, DynamicsConfig, PlotConfig import numpy as np import torch import time import os from network import Actor, Critic from solver import Solver from utils import idplot, numpy2torch, step_relative, recover_absolute_state, cm2inch import matplotlib.pyplot as plt import dynamics S_DIM = 4 ...
true
true
08ff0bdf4b73a4533158d15571eb33eb3c826bce
428
py
Python
users/migrations/0005_alter_moneytransfer_enter_the_amount_to_be_transferred_in_inr.py
fernandomeddev/MedBank
5b651065813a3c4ebbe9372a0d17755e3a32d139
[ "MIT" ]
null
null
null
users/migrations/0005_alter_moneytransfer_enter_the_amount_to_be_transferred_in_inr.py
fernandomeddev/MedBank
5b651065813a3c4ebbe9372a0d17755e3a32d139
[ "MIT" ]
null
null
null
users/migrations/0005_alter_moneytransfer_enter_the_amount_to_be_transferred_in_inr.py
fernandomeddev/MedBank
5b651065813a3c4ebbe9372a0d17755e3a32d139
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-20 13:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0004_alter_basicdetails_annual_income'), ] operations = [ migrations.AlterField( model_name='moneytransfer', ...
22.526316
61
0.640187
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0004_alter_basicdetails_annual_income'), ] operations = [ migrations.AlterField( model_name='moneytransfer', name='enter_the_amount_to_be_transferred_in_IN...
true
true
08ff0ce57f970c400bdc81dbb3d471ae09c7bda9
1,552
py
Python
shapewarp/ASM.py
schackv/shapewarp
36c69a641fc06239eda48b9e7011e3e86f9f7da0
[ "MIT" ]
10
2018-08-02T04:40:05.000Z
2022-03-07T06:39:19.000Z
shapewarp/ASM.py
schackv/shapewarp
36c69a641fc06239eda48b9e7011e3e86f9f7da0
[ "MIT" ]
1
2019-05-11T09:24:38.000Z
2019-05-11T09:24:38.000Z
shapewarp/ASM.py
schackv/shapewarp
36c69a641fc06239eda48b9e7011e3e86f9f7da0
[ "MIT" ]
7
2017-03-03T14:25:07.000Z
2019-04-13T16:15:03.000Z
# -*- coding: utf-8 -*- """ Created on Wed Jun 18 11:18:20 2014 @author: schackv """ from . import GPA import numpy as np class ASM: def build(self,landmarks): """Build an active shape model from the landmarks given. Landmarks are expected to be a numpy N x 2*p array where p is the...
26.305085
77
0.556057
from . import GPA import numpy as np class ASM: def build(self,landmarks): mu, S, Xnew = GPA.generalized_procrustes_2d(landmarks) self.k = len(mu)/2 self.MeanShape = np.array(mu) self.Covariance = np.array(S) self.AlignedShapes = ...
true
true
08ff0d975f716e4b72cd2d4cd89073915909b131
843
py
Python
KDC.py
d0d0d0/Kerberos
38bf0b8388bc4f3571e790d5bc626d050df5d4dc
[ "MIT" ]
null
null
null
KDC.py
d0d0d0/Kerberos
38bf0b8388bc4f3571e790d5bc626d050df5d4dc
[ "MIT" ]
null
null
null
KDC.py
d0d0d0/Kerberos
38bf0b8388bc4f3571e790d5bc626d050df5d4dc
[ "MIT" ]
null
null
null
### Implements "Key Distriution Center" ### from AuthServer import AuthServer from TGS import TGS from DBManager import DBManager from config import * class KDC: def __init__(self, isTGS=0): print "Key Distribution Center initiated" self.db = DBManager(DB) self.isTGS = isTGS self._authServer = AuthServe...
20.071429
55
0.669039
from AuthServer import AuthServer from TGS import TGS from DBManager import DBManager from config import * class KDC: def __init__(self, isTGS=0): print "Key Distribution Center initiated" self.db = DBManager(DB) self.isTGS = isTGS self._authServer = AuthServer(host='localhost', port=AUTH_PORT, ...
false
true
08ff0e04ba180f46edd0e2c5ea2dfb9584b503cf
2,012
py
Python
skimage/morphology/convex_hull.py
RKDSOne/scikit-image
baa67eafcace9cde1b94ad2d467e2f2e0468e759
[ "BSD-3-Clause" ]
2
2019-01-17T22:10:17.000Z
2020-02-22T04:20:38.000Z
skimage/morphology/convex_hull.py
teoliphant/scikit-image
d0415e6df475157705fd1ef2af69b16e4f7e38cc
[ "BSD-3-Clause" ]
null
null
null
skimage/morphology/convex_hull.py
teoliphant/scikit-image
d0415e6df475157705fd1ef2af69b16e4f7e38cc
[ "BSD-3-Clause" ]
2
2015-12-29T17:04:26.000Z
2020-10-17T15:47:30.000Z
__all__ = ['convex_hull_image'] import numpy as np from ._pnpoly import grid_points_inside_poly from ._convex_hull import possible_hull def convex_hull_image(image): """Compute the convex hull image of a binary image. The convex hull is the set of pixels included in the smallest convex polygon that surr...
30.029851
96
0.635189
__all__ = ['convex_hull_image'] import numpy as np from ._pnpoly import grid_points_inside_poly from ._convex_hull import possible_hull def convex_hull_image(image): image = image.astype(bool) coords = possible_hull(image.astype(np.uint8)) N = len(coords) coords_corners = np.em...
true
true
08ff0e34bb3ed296f3de807b6087765f7f66e8e5
9,642
py
Python
ava_evaluation/standard_fields.py
lucasmtz/ACAR-Net
08a224625f04bbf595baaeb1c79ec491642e0059
[ "Apache-2.0" ]
null
null
null
ava_evaluation/standard_fields.py
lucasmtz/ACAR-Net
08a224625f04bbf595baaeb1c79ec491642e0059
[ "Apache-2.0" ]
null
null
null
ava_evaluation/standard_fields.py
lucasmtz/ACAR-Net
08a224625f04bbf595baaeb1c79ec491642e0059
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 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...
44.229358
82
0.734287
class InputDataFields: image = "image" original_image = "original_image" key = "key" source_id = "source_id" filename = "filename" groundtruth_image_classes = "groundtruth_image_classes" groundtruth_boxes = "groundtruth_boxes" groundtruth_classes = "groundtruth_classes" groundtru...
true
true
08ff0fba50f5ffe44df41dfe2daea0e1e7113495
5,532
py
Python
test/functional/rpc_generateblock.py
stabgan/bitcoin
1b313cacc99a1b372238f9036abed5491f9d28f7
[ "MIT" ]
149
2021-03-21T18:04:20.000Z
2021-07-01T21:14:39.000Z
test/functional/rpc_generateblock.py
stabgan/bitcoin
1b313cacc99a1b372238f9036abed5491f9d28f7
[ "MIT" ]
101
2018-02-08T05:30:56.000Z
2022-03-31T23:17:46.000Z
test/functional/rpc_generateblock.py
stabgan/bitcoin
1b313cacc99a1b372238f9036abed5491f9d28f7
[ "MIT" ]
93
2018-02-05T23:36:22.000Z
2022-03-17T15:38:08.000Z
#!/usr/bin/env python3 # Copyright (c) 2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. '''Test generateblock rpc. ''' from test_framework.test_framework import BitcoinTestFramework from test_framew...
51.700935
155
0.694143
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, ) class GenerateBlockTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 def skip_test_if_missing_module(self): self.skip_if_n...
true
true
08ff10a869c9306cd1d39924b2fbff83100256ef
9,392
py
Python
pypy/tool/pytest/appsupport.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/tool/pytest/appsupport.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
null
null
null
pypy/tool/pytest/appsupport.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
from __future__ import generators import autopath import py from py.__.magic import exprinfo from pypy.interpreter import gateway from pypy.interpreter.error import OperationError from py.__.test.outcome import ExceptionFailure # ____________________________________________________________ class AppCode(object): ...
41.0131
92
0.599979
from __future__ import generators import autopath import py from py.__.magic import exprinfo from pypy.interpreter import gateway from pypy.interpreter.error import OperationError from py.__.test.outcome import ExceptionFailure class AppCode(object): def __init__(self, space, pycode): self.code = space.u...
false
true
08ff110231ac175ee31c0320023e9085699944ec
97
py
Python
principal.py
Professor-Vanderson/ES-17-2
1a5a764e86826c4223911256614cef2535072722
[ "Apache-2.0" ]
null
null
null
principal.py
Professor-Vanderson/ES-17-2
1a5a764e86826c4223911256614cef2535072722
[ "Apache-2.0" ]
null
null
null
principal.py
Professor-Vanderson/ES-17-2
1a5a764e86826c4223911256614cef2535072722
[ "Apache-2.0" ]
1
2019-06-27T00:21:59.000Z
2019-06-27T00:21:59.000Z
def somar(x,y): return x + y def sub(x,y): return x - y def mult(x,y): return x * y
12.125
16
0.525773
def somar(x,y): return x + y def sub(x,y): return x - y def mult(x,y): return x * y
true
true
08ff12063831e9c79333d715a518129ea0c5623c
1,255
py
Python
python-play/hackerstat.py
anilgeorge04/learn-ds
f1a9c638e29270d4d72fc3aed0af3ccea8c53350
[ "MIT" ]
null
null
null
python-play/hackerstat.py
anilgeorge04/learn-ds
f1a9c638e29270d4d72fc3aed0af3ccea8c53350
[ "MIT" ]
null
null
null
python-play/hackerstat.py
anilgeorge04/learn-ds
f1a9c638e29270d4d72fc3aed0af3ccea8c53350
[ "MIT" ]
null
null
null
# Hacker Statistics # In a 100 storey building, move up and down floors on the roll of dice # Move up +1 on getting a 3 or 4 or 5 # Move down -1 on getting 1 or 2 # On 6, roll die again and move +n steps (n is the number on second roll) import numpy as np import matplotlib.pyplot as plt np.random.seed(123) ...
26.145833
74
0.579283
import numpy as np import matplotlib.pyplot as plt np.random.seed(123) all_walks = [] for i in range(5000): random_walk = [0] for x in range(100): step = random_walk[-1] dice = np.random.randint(1, 7) if dice <= 2: step = max(0, step - 1) ...
true
true
08ff1352b2be927b113c70550c2dce822239694d
12,203
py
Python
galaxy/api/urls.py
SamyCoenen/galaxy
7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e
[ "Apache-2.0" ]
null
null
null
galaxy/api/urls.py
SamyCoenen/galaxy
7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e
[ "Apache-2.0" ]
null
null
null
galaxy/api/urls.py
SamyCoenen/galaxy
7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e
[ "Apache-2.0" ]
null
null
null
# (c) 2012-2018, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
36.867069
79
0.646153
# New path-like routes should be preferred over old-style regexp routes. from django.urls import include, path, re_path as url from galaxy.api import views event_tracking_urls = [ url(r'^influx_session/$', views.InfluxSession.as_view(), name='influx_session'), url(r'^$', views.InfluxMetric...
true
true
08ff13bb7f7b28be6e449a94019c60a128ca3c13
2,089
py
Python
test.py
GodfatherPacino/BP-xor
2013bd506431dc6a6aa2c0aeeed1c8f279ae069d
[ "MIT" ]
null
null
null
test.py
GodfatherPacino/BP-xor
2013bd506431dc6a6aa2c0aeeed1c8f279ae069d
[ "MIT" ]
null
null
null
test.py
GodfatherPacino/BP-xor
2013bd506431dc6a6aa2c0aeeed1c8f279ae069d
[ "MIT" ]
1
2020-05-14T07:47:41.000Z
2020-05-14T07:47:41.000Z
# -*- coding: utf-8 -*- import numpy as np class SquareLoss: def forward(self, y, t): self.loss = y - t return np.sum(self.loss * self.loss) / self.loss.shape[1] / 2 def backward(self): return self.loss class FC: def __init__(self, in_num, out_num, lr = 0.1): self._in_num ...
33.693548
71
0.573001
import numpy as np class SquareLoss: def forward(self, y, t): self.loss = y - t return np.sum(self.loss * self.loss) / self.loss.shape[1] / 2 def backward(self): return self.loss class FC: def __init__(self, in_num, out_num, lr = 0.1): self._in_num = in_num self._o...
false
true
08ff141a55bed62f1eca5b7da6a3592616e2f057
821
py
Python
backend/benchmark/migrations/0002_systeminfo.py
cccgnit/CryptoBenchmark
a7690b2b4a3d994b1feb900457ea67a0134bcb5e
[ "MIT" ]
null
null
null
backend/benchmark/migrations/0002_systeminfo.py
cccgnit/CryptoBenchmark
a7690b2b4a3d994b1feb900457ea67a0134bcb5e
[ "MIT" ]
null
null
null
backend/benchmark/migrations/0002_systeminfo.py
cccgnit/CryptoBenchmark
a7690b2b4a3d994b1feb900457ea67a0134bcb5e
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-05-14 12:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('benchmark', '0001_initial'), ] operations = [ migrations.CreateModel( name='SystemInfo', fields=[ ('...
32.84
114
0.582217
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('benchmark', '0001_initial'), ] operations = [ migrations.CreateModel( name='SystemInfo', fields=[ ('id', models.AutoField(auto_created=True, primary...
true
true
08ff156119e3ef3b07fc896e649cbe01fb606b11
7,518
py
Python
test/test_socket.py
karlding/python-can-isotp
916dedb548c270428ca53cfe3180ce0920f1c729
[ "MIT" ]
null
null
null
test/test_socket.py
karlding/python-can-isotp
916dedb548c270428ca53cfe3180ce0920f1c729
[ "MIT" ]
null
null
null
test/test_socket.py
karlding/python-can-isotp
916dedb548c270428ca53cfe3180ce0920f1c729
[ "MIT" ]
null
null
null
import unittest import isotp from . import unittest_logging from . import tools import time import math import socket @unittest.skipIf(tools.check_isotp_socket_possible() == False, 'Cannot test IsoTP socket. %s' % tools.isotp_socket_impossible_reason()) class TestSocket(unittest.TestCase): def setUp(se...
45.017964
139
0.660814
import unittest import isotp from . import unittest_logging from . import tools import time import math import socket @unittest.skipIf(tools.check_isotp_socket_possible() == False, 'Cannot test IsoTP socket. %s' % tools.isotp_socket_impossible_reason()) class TestSocket(unittest.TestCase): def setUp(se...
true
true
08ff161c0f3e03c7797b127656e972c03404e109
4,146
py
Python
re-.py
thedognexttothetrashcan/taobao
c796ec1f61a5443406686f65badc1df6aaf7b711
[ "Apache-2.0" ]
null
null
null
re-.py
thedognexttothetrashcan/taobao
c796ec1f61a5443406686f65badc1df6aaf7b711
[ "Apache-2.0" ]
1
2020-12-05T15:32:37.000Z
2020-12-05T15:32:37.000Z
re-.py
xwh-p/taobao
c796ec1f61a5443406686f65badc1df6aaf7b711
[ "Apache-2.0" ]
null
null
null
import requests from lxml import etree headers = { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "accept-encoding": "gzip, deflate, br", "accept-language": "zh-CN,zh;q=0.9", "cache-control": "max-age=0", "cookie": "cna=gY5E8vPMGACASvgLWesBpgg; _m...
59.228571
1,665
0.689339
import requests from lxml import etree headers = { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "accept-encoding": "gzip, deflate, br", "accept-language": "zh-CN,zh;q=0.9", "cache-control": "max-age=0", "cookie": "cna=gY5E8vPMGACASvgLWesBpgg; _m...
true
true
08ff16c6e3f7adca04678e479462fd75812d074b
308
py
Python
python-webapp/www/handlers.py
dym0080/learn-python
2c1f34e9fa249334305350cf4f7fefb351871bda
[ "MIT" ]
null
null
null
python-webapp/www/handlers.py
dym0080/learn-python
2c1f34e9fa249334305350cf4f7fefb351871bda
[ "MIT" ]
null
null
null
python-webapp/www/handlers.py
dym0080/learn-python
2c1f34e9fa249334305350cf4f7fefb351871bda
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import re, time, json, logging, hashlib, base64, asyncio from coroweb import get, post from models import User, Comment, Blog, next_id @get('/') async def index(request): users = await User.findAll() return { '__template__': 'test.html', 'users': users }
23.692308
56
0.633117
import re, time, json, logging, hashlib, base64, asyncio from coroweb import get, post from models import User, Comment, Blog, next_id @get('/') async def index(request): users = await User.findAll() return { '__template__': 'test.html', 'users': users }
true
true
08ff1763b44375234242bf1061ed9fd5b5739f5d
1,190
py
Python
duster/pdfs.py
erykoff/redmapper_duster
9058d84905535230c330803de18575670da03bf4
[ "Apache-2.0" ]
null
null
null
duster/pdfs.py
erykoff/redmapper_duster
9058d84905535230c330803de18575670da03bf4
[ "Apache-2.0" ]
null
null
null
duster/pdfs.py
erykoff/redmapper_duster
9058d84905535230c330803de18575670da03bf4
[ "Apache-2.0" ]
null
null
null
import numpy as np def p_dust(rho_0, b, rho_min, rho_vals): """Compute p_dust(rho | rho_0, b, rho_min) Parameters ---------- rho_0 : `float` The value of rho_0 b : `float` The value of b rho_min : `float` The value of rho_min rho_vals : `np.ndarray` Array o...
22.45283
81
0.542857
import numpy as np def p_dust(rho_0, b, rho_min, rho_vals): lo = (rho_vals <= rho_min) hi = ~lo B = (b + 1)/(rho_0*((rho_min/rho_0)**b)*(b + 1 + (rho_min/rho_0))) p_dust = np.zeros(rho_vals.size) p_dust[lo] = B*((rho_vals[lo]/rho_0)**b) p_dust[hi] = B*((rho_min/rho_0)**b)*(np.exp(-(rho_vals[...
true
true
08ff17899ed6371c9cb3284401e7ec19eb2535d1
2,285
py
Python
tests/test_recipe.py
schmolly/timemachine
7d13a0406dc2d09ac67892988641ba4965bfb206
[ "Apache-2.0" ]
null
null
null
tests/test_recipe.py
schmolly/timemachine
7d13a0406dc2d09ac67892988641ba4965bfb206
[ "Apache-2.0" ]
null
null
null
tests/test_recipe.py
schmolly/timemachine
7d13a0406dc2d09ac67892988641ba4965bfb206
[ "Apache-2.0" ]
null
null
null
import numpy as np import md from rdkit import Chem from rdkit.Chem import AllChem from ff.handlers.deserialize import deserialize_handlers # from training import builders from md import Recipe from md import builders def test_recipe_from_rdkit(): ff_handlers = deserialize_handlers(open('ff/params/smirnoff_1_1...
38.728814
110
0.736543
import numpy as np import md from rdkit import Chem from rdkit.Chem import AllChem from ff.handlers.deserialize import deserialize_handlers from md import Recipe from md import builders def test_recipe_from_rdkit(): ff_handlers = deserialize_handlers(open('ff/params/smirnoff_1_1_0_ccc.py').read()) suppl = ...
true
true
08ff19e1a5c21c265ec5d501e86087ff4b635cb3
1,630
py
Python
experiments/run_quad_realtime.py
zehuilu/Learning-from-Directional-Corrections
762a05b0d169c0db12932b8bc3f5b4abfa5d6fb9
[ "Linux-OpenIB" ]
1
2022-01-14T15:09:09.000Z
2022-01-14T15:09:09.000Z
experiments/run_quad_realtime.py
zehuilu/Learning-from-Directional-Corrections
762a05b0d169c0db12932b8bc3f5b4abfa5d6fb9
[ "Linux-OpenIB" ]
null
null
null
experiments/run_quad_realtime.py
zehuilu/Learning-from-Directional-Corrections
762a05b0d169c0db12932b8bc3f5b4abfa5d6fb9
[ "Linux-OpenIB" ]
null
null
null
#!/usr/bin/env python3 import os import sys sys.path.append(os.getcwd()+'/LFC') sys.path.append(os.getcwd()+'/JinEnv') sys.path.append(os.getcwd()+'/lib') import numpy as np from casadi import * import transforms3d from QuadAlgorithmRealtime import QuadAlgorithmRealtime from QuadStates import QuadStates from QuadPara i...
36.222222
106
0.71411
import os import sys sys.path.append(os.getcwd()+'/LFC') sys.path.append(os.getcwd()+'/JinEnv') sys.path.append(os.getcwd()+'/lib') import numpy as np from casadi import * import transforms3d from QuadAlgorithmRealtime import QuadAlgorithmRealtime from QuadStates import QuadStates from QuadPara import QuadPara TIME_S...
true
true
08ff1baf936ab5e8bf59ff5134b9da113cdf7f71
3,429
py
Python
HungrYTWeb/settings.py
andriov/footStore-django-webServer
5741cc78b857e2f73ea12b6f387c22c4f2788d30
[ "MIT" ]
null
null
null
HungrYTWeb/settings.py
andriov/footStore-django-webServer
5741cc78b857e2f73ea12b6f387c22c4f2788d30
[ "MIT" ]
10
2020-06-05T17:43:35.000Z
2022-02-11T03:38:45.000Z
HungrYTWeb/settings.py
andriov/footStore-django-webServer
5741cc78b857e2f73ea12b6f387c22c4f2788d30
[ "MIT" ]
null
null
null
""" Django settings for HungrYTWeb project. Generated by 'django-admin startproject' using Django 1.11.9. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import...
25.213235
91
0.690872
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'v17ytqc$dd9mgmilk9ua%#6c&8mwvy3bg680p$)z05*0q4f###' DEBUG = True ALLOWED_HOSTS = ["192.168.1.3"] # Application definition INSTALLED_APPS = [ 'products.apps.ProductsConfig', 'django.contrib.admin', 'djang...
true
true
08ff1ca4104faa52658219bb80ec977761ba2811
420
py
Python
web/dynitag/instance/filldb.py
feddybear/dynitag
8f342f208f775f6bbc161b653dc1a7f891945319
[ "MIT" ]
19
2018-11-05T11:12:54.000Z
2022-03-21T09:14:34.000Z
web/dynitag/instance/filldb.py
feddybear/dynitag
8f342f208f775f6bbc161b653dc1a7f891945319
[ "MIT" ]
null
null
null
web/dynitag/instance/filldb.py
feddybear/dynitag
8f342f208f775f6bbc161b653dc1a7f891945319
[ "MIT" ]
7
2019-07-03T16:49:15.000Z
2020-12-02T22:38:22.000Z
import sys import os import shutil from flask import url_for from dynitag import db, app from dynitag.models import User # Create some initial data and commit to the database with app.app_context(): # Insert user data admin = User(username='admin', email='admin@gmail.com', plaintext_password='changeme', ro...
18.26087
104
0.707143
import sys import os import shutil from flask import url_for from dynitag import db, app from dynitag.models import User with app.app_context(): admin = User(username='admin', email='admin@gmail.com', plaintext_password='changeme', role='admin') db.session.add(admin) db.session.commit() p...
true
true
08ff1ccc5dfafe38718637a984b4f5a44168e490
13,377
py
Python
mmseg/core/evaluation/metrics.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
mmseg/core/evaluation/metrics.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
mmseg/core/evaluation/metrics.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
from collections import OrderedDict import mmcv import numpy as np import torch def f_score(precision, recall, beta=1): """calcuate the f-score value. Args: precision (float | torch.Tensor): The precision value. recall (float | torch.Tensor): The recall value. beta (int)...
40.908257
80
0.608358
from collections import OrderedDict import mmcv import numpy as np import torch def f_score(precision, recall, beta=1): score = (1 + beta**2) * (precision * recall) / ( (beta**2 * precision) + recall) return score def intersect_and_union(pred_label, label, ...
true
true
08ff1d08c0c9f95734a27cd4cc16d0ed6ec9997f
31,136
py
Python
appengine/findit/services/test_failure/test/ci_test_failure_test.py
asdfghjjklllllaaa/infra
8f63af54e46194cd29291813f2790ff6e986804d
[ "BSD-3-Clause" ]
1
2020-11-11T06:25:13.000Z
2020-11-11T06:25:13.000Z
appengine/findit/services/test_failure/test/ci_test_failure_test.py
asdfghjjklllllaaa/infra
8f63af54e46194cd29291813f2790ff6e986804d
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/findit/services/test_failure/test/ci_test_failure_test.py
asdfghjjklllllaaa/infra
8f63af54e46194cd29291813f2790ff6e986804d
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import mock from google.appengine.api import datastore_errors from common.findit_http_client import FinditHttpClient from model.wf_step import WfStep from ...
32.298755
80
0.559577
import mock from google.appengine.api import datastore_errors from common.findit_http_client import FinditHttpClient from model.wf_step import WfStep from services import ci_failure from services import constants from services import step_util from services import swarmed_test_util from services import swarming from...
true
true
08ff1d48c23d2b36d10b52bc7c048b83702bd172
4,203
py
Python
main.py
AndySrb/ProracunOsvetljenjaUlica
1eeeb5f92c24889819594646ee22639943035dd9
[ "Apache-2.0" ]
null
null
null
main.py
AndySrb/ProracunOsvetljenjaUlica
1eeeb5f92c24889819594646ee22639943035dd9
[ "Apache-2.0" ]
null
null
null
main.py
AndySrb/ProracunOsvetljenjaUlica
1eeeb5f92c24889819594646ee22639943035dd9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import json import math from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import matplotlib.pyplot as plt import numpy as np class vector2F: def __init__(self,x,y): self.x=x self.y=y class vector3F: def __init__(self,x,y,z): self.x=x sel...
24.869822
108
0.595765
import json import math from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import matplotlib.pyplot as plt import numpy as np class vector2F: def __init__(self,x,y): self.x=x self.y=y class vector3F: def __init__(self,x,y,z): self.x=x self.y=y self.z=z ...
true
true
08ff1d81cb3d0d8c448299f7be9760a7bba6ba8a
490
py
Python
Statistics/Variance.py
Nithinreddy127/caltest
6be658c4ac819799c75d933ffd195c29b4bf43af
[ "MIT" ]
null
null
null
Statistics/Variance.py
Nithinreddy127/caltest
6be658c4ac819799c75d933ffd195c29b4bf43af
[ "MIT" ]
null
null
null
Statistics/Variance.py
Nithinreddy127/caltest
6be658c4ac819799c75d933ffd195c29b4bf43af
[ "MIT" ]
21
2019-11-01T18:02:40.000Z
2021-07-15T02:38:45.000Z
from Calculator.Square import squaring from Calculator.Division import division from Statistics.PopulationMean import populationmean def variance(num): try: pop_mean = populationmean(num) num_values = len(num) x = 0 for i in num: x = x + squaring(i-pop_mean) ret...
28.823529
52
0.657143
from Calculator.Square import squaring from Calculator.Division import division from Statistics.PopulationMean import populationmean def variance(num): try: pop_mean = populationmean(num) num_values = len(num) x = 0 for i in num: x = x + squaring(i-pop_mean) ret...
true
true
08ff1d84132afd96191b08dd0f4e30bcf06eaed8
689
py
Python
macros/seriallized_boxes_to_go.py
benoitkugler/webrender
0d7c529427fab37c91ecb7d844111928ff3c45f7
[ "BSD-3-Clause" ]
5
2022-01-15T03:38:30.000Z
2022-03-25T13:41:08.000Z
macros/seriallized_boxes_to_go.py
benoitkugler/webrender
0d7c529427fab37c91ecb7d844111928ff3c45f7
[ "BSD-3-Clause" ]
null
null
null
macros/seriallized_boxes_to_go.py
benoitkugler/webrender
0d7c529427fab37c91ecb7d844111928ff3c45f7
[ "BSD-3-Clause" ]
null
null
null
import pyperclip from typing import * def to_go(boxes: List[Any]) -> str: code = "[]SerBox{" for box in boxes: tag = box[0] type_ = f"{box[1]}BoxT" if isinstance(box[2], str): content = 'BC{{Text: `{0}`}}'.format(box[2]) else: children = to_go(box[2]) ...
22.966667
62
0.513788
import pyperclip from typing import * def to_go(boxes: List[Any]) -> str: code = "[]SerBox{" for box in boxes: tag = box[0] type_ = f"{box[1]}BoxT" if isinstance(box[2], str): content = 'BC{{Text: `{0}`}}'.format(box[2]) else: children = to_go(box[2]) ...
true
true
08ff1e8eb2d8b08b2878b52b654162e5936b4828
761
py
Python
tests/test_registry.py
pshem/andriller
c1e2d9e05f3630a7499907190552089be18563c5
[ "MIT" ]
2
2021-11-22T03:38:06.000Z
2022-01-12T23:07:15.000Z
tests/test_registry.py
pshem/andriller
c1e2d9e05f3630a7499907190552089be18563c5
[ "MIT" ]
null
null
null
tests/test_registry.py
pshem/andriller
c1e2d9e05f3630a7499907190552089be18563c5
[ "MIT" ]
null
null
null
import pytest from andriller import decoders @pytest.fixture def registry(): return decoders.Registry() @pytest.mark.parametrize('file_name,result', [ ('wa.db', [decoders.WhatsAppContactsDecoder]), ('msgstore.db', [decoders.WhatsAppMessagesDecoder, decoders.WhatsAppCallsDecoder]), ('i_do_not_exist',...
25.366667
87
0.731932
import pytest from andriller import decoders @pytest.fixture def registry(): return decoders.Registry() @pytest.mark.parametrize('file_name,result', [ ('wa.db', [decoders.WhatsAppContactsDecoder]), ('msgstore.db', [decoders.WhatsAppMessagesDecoder, decoders.WhatsAppCallsDecoder]), ('i_do_not_exist',...
true
true
08ff219f936443e71f82374764d0f17819ddc020
1,567
py
Python
Deep Reinforcement Learning/immitation learning/utils.py
dibyajit30/Course-Works
f8c275a61651a757cdac562d07d373f15d27f05c
[ "MIT" ]
null
null
null
Deep Reinforcement Learning/immitation learning/utils.py
dibyajit30/Course-Works
f8c275a61651a757cdac562d07d373f15d27f05c
[ "MIT" ]
null
null
null
Deep Reinforcement Learning/immitation learning/utils.py
dibyajit30/Course-Works
f8c275a61651a757cdac562d07d373f15d27f05c
[ "MIT" ]
null
null
null
import numpy as np from torch import argmax LEFT =1 RIGHT = 2 STRAIGHT = 0 ACCELERATE =3 BRAKE = 4 def one_hot(labels): """ this creates a one hot encoding from a flat vector: i.e. given y = [0,2,1] it creates y_one_hot = [[1,0,0], [0,0,1], [0,1,0]] """ classes = np.unique(labels) n_class...
30.72549
103
0.565412
import numpy as np from torch import argmax LEFT =1 RIGHT = 2 STRAIGHT = 0 ACCELERATE =3 BRAKE = 4 def one_hot(labels): classes = np.unique(labels) n_classes = classes.size one_hot_labels = np.zeros(labels.shape + (n_classes,)) for c in classes: one_hot_labels[labels == c, c] = 1.0 return ...
true
true
08ff21a8be4bc2b8b93d02457983a428c9a16af6
2,329
py
Python
questions/q144_lowest_common_ancestor_bst/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
null
null
null
questions/q144_lowest_common_ancestor_bst/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
1
2021-05-15T07:56:51.000Z
2021-05-15T07:56:51.000Z
questions/q144_lowest_common_ancestor_bst/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
null
null
null
# Returns the LCA of the nodes with values n1 and n2 # in the BST rooted at 'root' def LCA(root, n1, n2): if (root.data < n1) and (root.data < n2) : if root.right : return LCA(root.right, n1, n2) else : return root if (root.data > n1) and (root.data > n2) : ...
25.315217
57
0.48948
def LCA(root, n1, n2): if (root.data < n1) and (root.data < n2) : if root.right : return LCA(root.right, n1, n2) else : return root if (root.data > n1) and (root.data > n2) : if root.left : return LCA(root.left, n1, n2) else : ...
true
true
08ff21dddaf927b018372c757ffeb0e1d8e18ac9
2,771
py
Python
iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/sqlparse/engine/filter.py
mpol/iis
fbf7129bbd131fbf824a0d3fc8a0afde367794e2
[ "Apache-2.0" ]
20
2015-09-19T21:17:23.000Z
2022-03-01T10:37:59.000Z
iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/sqlparse/engine/filter.py
mpol/iis
fbf7129bbd131fbf824a0d3fc8a0afde367794e2
[ "Apache-2.0" ]
1,054
2015-09-11T06:51:27.000Z
2022-03-30T09:46:54.000Z
iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/sqlparse/engine/filter.py
mpol/iis
fbf7129bbd131fbf824a0d3fc8a0afde367794e2
[ "Apache-2.0" ]
80
2015-12-09T12:41:52.000Z
2022-02-16T11:46:42.000Z
# -*- coding: utf-8 -*- from sqlparse import tokens as T from sqlparse.engine.grouping import Statement, Token class TokenFilter(object): def __init__(self, **options): self.options = options def process(self, stack, stream): """Process token stream.""" raise NotImplementedError c...
27.71
72
0.528329
from sqlparse import tokens as T from sqlparse.engine.grouping import Statement, Token class TokenFilter(object): def __init__(self, **options): self.options = options def process(self, stack, stream): raise NotImplementedError class StatementFilter(TokenFilter): def __init__(self): ...
true
true
08ff23343d1ebcdcf82db6f520b90d24ac775a79
7,022
py
Python
uhd_restpy/testplatform/sessions/ixnetwork/globals/topology/tlveditor/object_12e587bd6e412f6d3d8361017e8dcba9.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
uhd_restpy/testplatform/sessions/ixnetwork/globals/topology/tlveditor/object_12e587bd6e412f6d3d8361017e8dcba9.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
uhd_restpy/testplatform/sessions/ixnetwork/globals/topology/tlveditor/object_12e587bd6e412f6d3d8361017e8dcba9.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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,...
36.764398
173
0.659641
from uhd_restpy.base import Base from uhd_restpy.files import Files from typing import List, Any, Union class Object(Base): __slots__ = () _SDM_NAME = 'object' _SDM_ATT_MAP = { 'Name': 'name', } _SDM_ENUM_MAP = { } def __init__(self, parent, list_op=False): super(Object, ...
true
true
08ff23ed53b89753c38b572064e7f5dd6d05d019
1,922
py
Python
Practise/QiuBai.py
wsj2012/PythonLib
71e64b87cf8cfa279b5d9fd99d77109dc4334e06
[ "MIT" ]
null
null
null
Practise/QiuBai.py
wsj2012/PythonLib
71e64b87cf8cfa279b5d9fd99d77109dc4334e06
[ "MIT" ]
null
null
null
Practise/QiuBai.py
wsj2012/PythonLib
71e64b87cf8cfa279b5d9fd99d77109dc4334e06
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import requests import re import sys reload(sys) sys.setdefaultencoding('utf-8') headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'} info_lists = [] def judgement_gender(class_name): if class_...
35.592593
148
0.566077
import requests import re import sys reload(sys) sys.setdefaultencoding('utf-8') headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'} info_lists = [] def judgement_gender(class_name): if class_name == 'womenIcon': ...
true
true
08ff241d83bf0293dd574a1dca178e8bdcb7f8b4
3,528
py
Python
tests/database_save_load_corruption_test.py
pnarvor/nephelae_mapping
498c04a165ee9163c749a3f47bea6028494fc3f4
[ "BSD-3-Clause" ]
null
null
null
tests/database_save_load_corruption_test.py
pnarvor/nephelae_mapping
498c04a165ee9163c749a3f47bea6028494fc3f4
[ "BSD-3-Clause" ]
null
null
null
tests/database_save_load_corruption_test.py
pnarvor/nephelae_mapping
498c04a165ee9163c749a3f47bea6028494fc3f4
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/python3 import sys sys.path.append('../../') import os import signal import time from ivy.std_api import * import logging import nephelae_paparazzi.pprzinterface as ppint from nephelae_mapping.database import NephelaeDataServer from helpers.helpers import * mesonhFiles = '/home/pnarvor/work/nephelae/da...
32.971963
92
0.645125
import sys sys.path.append('../../') import os import signal import time from ivy.std_api import * import logging import nephelae_paparazzi.pprzinterface as ppint from nephelae_mapping.database import NephelaeDataServer from helpers.helpers import * mesonhFiles = '/home/pnarvor/work/nephelae/data/MesoNH-2019-02/RE...
true
true
08ff2451ae2a19509cd11a2b9fdffc12c390cae5
1,897
py
Python
app/controllers/auth_controller.py
innoqode/Spreadsheet-to-Json
b00d7bbd8bbac72ea1cbd1775722b03839edcb0b
[ "MIT" ]
null
null
null
app/controllers/auth_controller.py
innoqode/Spreadsheet-to-Json
b00d7bbd8bbac72ea1cbd1775722b03839edcb0b
[ "MIT" ]
null
null
null
app/controllers/auth_controller.py
innoqode/Spreadsheet-to-Json
b00d7bbd8bbac72ea1cbd1775722b03839edcb0b
[ "MIT" ]
1
2021-12-09T07:07:08.000Z
2021-12-09T07:07:08.000Z
import pickle import logging import os.path from google.auth.transport.requests import Request from google_auth_oauthlib.flow import InstalledAppFlow from config.configuration import SCOPES, LOCALHOST_PORT logger = logging.getLogger('__name__') logger.setLevel(logging.ERROR) file_handler = logging.FileHandler('log/de...
33.875
100
0.674222
import pickle import logging import os.path from google.auth.transport.requests import Request from google_auth_oauthlib.flow import InstalledAppFlow from config.configuration import SCOPES, LOCALHOST_PORT logger = logging.getLogger('__name__') logger.setLevel(logging.ERROR) file_handler = logging.FileHandler('log/de...
true
true
08ff255a33b7d9acef67e2f90f9fc72ab85e8586
4,461
py
Python
theia-net/classification/modules/model.py
kblancato/theia-net
cdb912e1b35701f22928e084913e004352a6fe95
[ "MIT" ]
3
2020-05-25T19:02:18.000Z
2020-08-16T00:02:13.000Z
theia-net/classification/modules/model.py
kblancato/theia-net
cdb912e1b35701f22928e084913e004352a6fe95
[ "MIT" ]
null
null
null
theia-net/classification/modules/model.py
kblancato/theia-net
cdb912e1b35701f22928e084913e004352a6fe95
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class CNN(torch.nn.Module): """ 1D CNN model architecture. Attributes ---------- num_in : int Exposure in seconds. n_classes : int Number of stellar evolutio...
31.864286
78
0.541358
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class CNN(torch.nn.Module): def __init__(self, num_in, n_classes, log, kernel1, kernel2, stride1, \ stride2, padding1, padding2, dropout, hidden1=2048, \ hidden2=1024, hidden3=2...
true
true
08ff25c86cbd9d1653c2ad04d0b21474121956e6
9,423
py
Python
cmd/data_utils/brat_conversion_schemas.py
xtannier/MeSH-C_classification
249f1c1b66a5b5e1c5649e59d8dc2eb7e1206228
[ "Apache-2.0" ]
null
null
null
cmd/data_utils/brat_conversion_schemas.py
xtannier/MeSH-C_classification
249f1c1b66a5b5e1c5649e59d8dc2eb7e1206228
[ "Apache-2.0" ]
null
null
null
cmd/data_utils/brat_conversion_schemas.py
xtannier/MeSH-C_classification
249f1c1b66a5b5e1c5649e59d8dc2eb7e1206228
[ "Apache-2.0" ]
null
null
null
# Brat conversion schemas # A schema is a dictionary with the following structure: # 'name':str, # the name of the schema # 'desc':str, # a textual description of why this schema exists # 'skip_if_absent':bool, # True whether entities not present in the schema should be skipped # # F...
56.42515
130
0.513425
sosy_and_pathologies_with_all_attributes = { 'name': 'sosy_and_pathologies_with_all_attributes', 'desc': '"sosy" and "pathology" are NOT grouped together into "sosypath", they are left alone, and each' '"assertion" attribute leads to a distinct entity. The result is ' '"sosy" (no asser...
true
true
08ff26a6f6b32c8a5f55c67ec8ae9aa6deac7e79
16,883
py
Python
bitMapping.py
antmicro/prjxray-bram-patch
8b55efe2edaaa87f9b742e4cfc1d84599f8ca9c2
[ "0BSD" ]
12
2020-02-26T10:42:34.000Z
2021-12-26T23:31:14.000Z
bitMapping.py
antmicro/prjxray-bram-patch
8b55efe2edaaa87f9b742e4cfc1d84599f8ca9c2
[ "0BSD" ]
25
2020-03-04T18:50:54.000Z
2022-02-07T17:51:02.000Z
bitMapping.py
antmicro/prjxray-bram-patch
8b55efe2edaaa87f9b742e4cfc1d84599f8ca9c2
[ "0BSD" ]
5
2021-01-11T08:15:50.000Z
2022-02-03T14:36:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2020-2021 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC # File: bitMapping.py # Author: Brent Nels...
40.681928
188
0.562163
import os import sys import glob import parseutil import parseutil.misc as misc import argparse import json import pathlib import struct import DbgParser import parseutil.parse_mdd as parse_mdd import re class Mapping: def __init__( self, word, bit, tile, bits, fasmY, fasmINITP, fasmLine, fasmBit, ...
true
true
08ff2774287a4384ab07370da3e9dcab37adbdae
495
py
Python
code/basics/src/topic_publisher.py
elpurofresh/rosbook
48842e74680975c6e77593d7ecc50c922169d7df
[ "Apache-2.0" ]
null
null
null
code/basics/src/topic_publisher.py
elpurofresh/rosbook
48842e74680975c6e77593d7ecc50c922169d7df
[ "Apache-2.0" ]
null
null
null
code/basics/src/topic_publisher.py
elpurofresh/rosbook
48842e74680975c6e77593d7ecc50c922169d7df
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # BEGIN ALL # BEGIN SHEBANG #!/usr/bin/env python # END SHEBANG # BEGIN IMPORT import rospy # END IMPORT # BEGIN STD_MSGS from std_msgs.msg import Int32 # END STD_MSGS rospy.init_node('topic_publisher') # BEGIN PUB pub = rospy.Publisher('counter', Int32, queue_size=10) # END PUB # BEGIN LOOP...
15
54
0.692929
import rospy from std_msgs.msg import Int32 rospy.init_node('topic_publisher') pub = rospy.Publisher('counter', Int32, queue_size=10) rate = rospy.Rate(2) count = 0 while not rospy.is_shutdown(): pub.publish(count) print "sending count: ", count count += 1 rate.sleep()
false
true
08ff293411bdcc016af4da070a0062442d691100
1,705
py
Python
setup.py
Elemnir/python-package-template
f475857284cac78c69ad086abc8a4945494f3456
[ "BSD-3-Clause" ]
null
null
null
setup.py
Elemnir/python-package-template
f475857284cac78c69ad086abc8a4945494f3456
[ "BSD-3-Clause" ]
null
null
null
setup.py
Elemnir/python-package-template
f475857284cac78c69ad086abc8a4945494f3456
[ "BSD-3-Clause" ]
null
null
null
import os import re from setuptools import find_packages, setup NAME = 'example' PACKAGES = find_packages(where='src') META_PATH = os.path.join("src", "example", "__init__.py") CLASSIFIERS = [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.2", "Intended Audience :: ...
27.95082
76
0.646334
import os import re from setuptools import find_packages, setup NAME = 'example' PACKAGES = find_packages(where='src') META_PATH = os.path.join("src", "example", "__init__.py") CLASSIFIERS = [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.2", "Intended Audience :: ...
true
true
08ff2bf3d77cbebb57e08988b03cd562297f18a8
1,041
py
Python
Driver/drivers/_PG_AWG/AWG_Driver.py
Lagikna/QuLab-drivers
badf3f975e38fbf79c5bdd4be16ff9e02c26e74f
[ "MIT" ]
16
2018-03-16T12:08:31.000Z
2022-03-20T08:53:35.000Z
Driver/drivers/_PG_AWG/AWG_Driver.py
Lagikna/QuLab-drivers
badf3f975e38fbf79c5bdd4be16ff9e02c26e74f
[ "MIT" ]
148
2018-03-18T09:33:18.000Z
2022-03-21T16:00:15.000Z
qulab/Driver/drivers/_PG_AWG/AWG_Driver.py
feihoo87/QuLab
cc16f4777e5523fca327f7f0a9725fd13f9b057f
[ "MIT" ]
14
2018-03-18T08:00:12.000Z
2020-10-21T12:39:42.000Z
# -*- coding: utf-8 -*- import numpy as np from qulab import BaseDriver, QInteger, QOption, QReal, QString, QVector from .AWGboard import AWGBoard class Driver(BaseDriver): support_models = ['PG_AWG'] quants = [ QReal('Offset',unit='V',ch=1,), QReal('Amplitude',unit='VPP',ch=1,), ]...
24.785714
72
0.587896
import numpy as np from qulab import BaseDriver, QInteger, QOption, QReal, QString, QVector from .AWGboard import AWGBoard class Driver(BaseDriver): support_models = ['PG_AWG'] quants = [ QReal('Offset',unit='V',ch=1,), QReal('Amplitude',unit='VPP',ch=1,), ] def __init__(self,...
true
true
08ff2d7bb524baead292776f8ce67ee65f3edcd1
20,550
py
Python
homeassistant/auth/auth_store.py
efficiosoft/home-assistant
6456f71a46569f2015cc19ec9fcd211893f80975
[ "Apache-2.0" ]
null
null
null
homeassistant/auth/auth_store.py
efficiosoft/home-assistant
6456f71a46569f2015cc19ec9fcd211893f80975
[ "Apache-2.0" ]
null
null
null
homeassistant/auth/auth_store.py
efficiosoft/home-assistant
6456f71a46569f2015cc19ec9fcd211893f80975
[ "Apache-2.0" ]
null
null
null
"""Storage for auth models.""" import asyncio from collections import OrderedDict from datetime import timedelta import hmac from logging import getLogger from typing import Any, Dict, List, Optional # noqa: F401 from homeassistant.auth.const import ACCESS_TOKEN_EXPIRATION from homeassistant.core import HomeAssistant...
35.008518
79
0.580341
import asyncio from collections import OrderedDict from datetime import timedelta import hmac from logging import getLogger from typing import Any, Dict, List, Optional from homeassistant.auth.const import ACCESS_TOKEN_EXPIRATION from homeassistant.core import HomeAssistant, callback from homeassistant.util import dt...
true
true
08ff2f84ebab49bed2593764a3615338e9b38b0f
1,433
py
Python
thbase/util/__init__.py
YutSean/pythbase
add955b74c442a1eb2d11438b9a89fd3e0afe0b2
[ "Apache-2.0" ]
3
2021-12-16T02:47:23.000Z
2022-01-28T09:03:54.000Z
thbase/util/__init__.py
YutSean/thbase
add955b74c442a1eb2d11438b9a89fd3e0afe0b2
[ "Apache-2.0" ]
1
2021-01-21T01:10:18.000Z
2021-01-21T01:10:18.000Z
thbase/util/__init__.py
YutSean/thbase
add955b74c442a1eb2d11438b9a89fd3e0afe0b2
[ "Apache-2.0" ]
null
null
null
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License ...
29.854167
92
0.711096
from thbase.hbase.ttypes import TTableName from thbase.util.bytes import to_bytes __all__ = ['executor', 'handlers', 'type_check', 'check_none', 'str_to_tablename'] DELIMITER = ':' def type_check(var, t): if not isinstance(var, t): raise TypeError("A {} object is needed, but got a {}.".format(t.__class,...
true
true
08ff30b4b49dd58af27b5d0c35d9782efc092af7
13,212
py
Python
mindspore/nn/wrap/loss_scale.py
i4oolish/mindspore
dac3be31d0f2c0a3516200f47af30980e566601b
[ "Apache-2.0" ]
1
2020-08-10T12:06:22.000Z
2020-08-10T12:06:22.000Z
mindspore/nn/wrap/loss_scale.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
mindspore/nn/wrap/loss_scale.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
45.402062
117
0.666969
import mindspore.context as context from mindspore.nn.wrap.grad_reducer import DistributedGradReducer from mindspore.train.parallel_utils import ParallelMode from mindspore.parallel._utils import _get_device_num, _get_parallel_mode, _get_mirror_mean from ..cell import Cell from ...common import Tensor, RowTensor from ....
true
true
08ff31e76bbc0ca621075fd078b6a93af61aabab
3,291
py
Python
tests/test_client.py
gmacon/python-arango
51b0060cd8267212f58dad1eda63b58d9c9d531d
[ "MIT" ]
null
null
null
tests/test_client.py
gmacon/python-arango
51b0060cd8267212f58dad1eda63b58d9c9d531d
[ "MIT" ]
null
null
null
tests/test_client.py
gmacon/python-arango
51b0060cd8267212f58dad1eda63b58d9c9d531d
[ "MIT" ]
null
null
null
from __future__ import absolute_import, unicode_literals import pytest from arango.client import ArangoClient from arango.database import StandardDatabase from arango.exceptions import ServerConnectionError from arango.http import DefaultHTTPClient from arango.version import __version__ from tests.helpers import ( ...
31.644231
77
0.650258
from __future__ import absolute_import, unicode_literals import pytest from arango.client import ArangoClient from arango.database import StandardDatabase from arango.exceptions import ServerConnectionError from arango.http import DefaultHTTPClient from arango.version import __version__ from tests.helpers import ( ...
true
true
08ff31f7045702f397b38d5ed7898304216e86fd
87
py
Python
blog/admin.py
CastilloBrenda/Catering
3c763b6efde5d731336ebd0cbc9f5dd763efa92b
[ "Apache-2.0" ]
null
null
null
blog/admin.py
CastilloBrenda/Catering
3c763b6efde5d731336ebd0cbc9f5dd763efa92b
[ "Apache-2.0" ]
null
null
null
blog/admin.py
CastilloBrenda/Catering
3c763b6efde5d731336ebd0cbc9f5dd763efa92b
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Post admin.site.register(Post)
14.5
32
0.793103
from django.contrib import admin from .models import Post admin.site.register(Post)
true
true
08ff32677ad591ddf6182d368e90495085347840
7,572
py
Python
qt-creator-opensource-src-4.6.1/tests/system/suite_editors/tst_modify_readonly/test.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
5
2018-12-22T14:49:13.000Z
2022-01-13T07:21:46.000Z
qt-creator-opensource-src-4.6.1/tests/system/suite_editors/tst_modify_readonly/test.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
null
null
null
qt-creator-opensource-src-4.6.1/tests/system/suite_editors/tst_modify_readonly/test.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
8
2018-07-17T03:55:48.000Z
2021-12-22T06:37:53.000Z
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the co...
49.815789
100
0.646197
source("../../shared/qtcreator.py") def main(): global testFolder cppEditorStr = ":Qt Creator_CppEditor::Internal::CPPEditorWidget" proEditorStr = ":Qt Creator_TextEditor::TextEditorWidget" testFolder = prepareTemplate(os.path.abspath(os.path.join(os.getcwd(), "..", "shared", ...
true
true
08ff34597198795cedd2164ff755047b50ac9914
2,453
py
Python
src/genie/libs/parser/iosxe/tests/ShowIpv6Mroute/cli/equal/golden_output_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxe/tests/ShowIpv6Mroute/cli/equal/golden_output_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxe/tests/ShowIpv6Mroute/cli/equal/golden_output_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { "vrf": { "default": { "address_family": { "ipv6": { "multicast_group": { "FF07::1": { "source_address": { "2001:DB8:999::99": { ...
45.425926
83
0.199755
expected_output = { "vrf": { "default": { "address_family": { "ipv6": { "multicast_group": { "FF07::1": { "source_address": { "2001:DB8:999::99": { ...
true
true
08ff346fa391397532063e154aeea3b2897a7f89
2,234
py
Python
project/utils/upload.py
adrianomqsmts/ratingstars
512c06df11460ad464924c6888b71c4759fa500d
[ "MIT" ]
null
null
null
project/utils/upload.py
adrianomqsmts/ratingstars
512c06df11460ad464924c6888b71c4759fa500d
[ "MIT" ]
null
null
null
project/utils/upload.py
adrianomqsmts/ratingstars
512c06df11460ad464924c6888b71c4759fa500d
[ "MIT" ]
null
null
null
"""Módulo de controle de upload de imagens.""" import os import uuid as uuid from typing import Optional from werkzeug.utils import secure_filename from project.configs.server import server PATH = "project/static/images/" def image_upload(file: object) -> Optional[str]: """Upload da imagem no servidor. ...
29.394737
83
0.657117
import os import uuid as uuid from typing import Optional from werkzeug.utils import secure_filename from project.configs.server import server PATH = "project/static/images/" def image_upload(file: object) -> Optional[str]: if file: pic_filename = secure_filename(file.filename) pic_nam...
true
true
08ff34ed5ac199245d2e0ffd39ad73e328b08bd5
1,169
py
Python
app/models/__init__.py
ninoseki/uzen
93726f22f43902e17b22dd36142dac05171d0d84
[ "MIT" ]
76
2020-02-27T06:36:27.000Z
2022-03-10T20:18:03.000Z
app/models/__init__.py
ninoseki/uzen
93726f22f43902e17b22dd36142dac05171d0d84
[ "MIT" ]
33
2020-03-13T02:04:14.000Z
2022-03-04T02:06:11.000Z
app/models/__init__.py
ninoseki/uzen
93726f22f43902e17b22dd36142dac05171d0d84
[ "MIT" ]
6
2020-03-17T16:42:25.000Z
2021-04-27T06:35:46.000Z
from app.models import ( api_keys, certificate, classification, dns_record, file, har, html, match, rule, script, snapshot, stylesheet, tag, whois, ) from app.models.api_keys import APIKey from app.models.certificate import Certificate from app.models.classificati...
18.854839
52
0.650984
from app.models import ( api_keys, certificate, classification, dns_record, file, har, html, match, rule, script, snapshot, stylesheet, tag, whois, ) from app.models.api_keys import APIKey from app.models.certificate import Certificate from app.models.classificati...
true
true
08ff3522d980d0786f8fcafb04672996b201b128
2,885
py
Python
tests/filters/dynamic_filter.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
2
2016-02-18T12:46:29.000Z
2022-03-13T03:04:59.000Z
tests/filters/dynamic_filter.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
null
null
null
tests/filters/dynamic_filter.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
6
2016-12-18T08:05:36.000Z
2021-04-06T14:19:11.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest from plaso.filters import dynamic_filter from tests.filters import test_lib class DynamicFilterTest(test_lib.FilterTestHelper): """Tests for the DynamicFilter filter.""" def setUp(self): """Sets up the needed objects used throughout the test.""" ...
40.069444
80
0.705719
import unittest from plaso.filters import dynamic_filter from tests.filters import test_lib class DynamicFilterTest(test_lib.FilterTestHelper): def setUp(self): self.test_filter = dynamic_filter.DynamicFilter() def testFilterFail(self): self.TestFail('/tmp/file_that_most_likely_does_not_exist') se...
true
true
08ff35ab594f9d0182ba13947002f5a0c4ea0e78
21,582
py
Python
sunpy/timeseries/tests/test_timeseries_factory.py
kangzhiq/sunpy
fad034a2ca0bebfa041e47b18a0789d2bc4b4aa6
[ "BSD-2-Clause" ]
null
null
null
sunpy/timeseries/tests/test_timeseries_factory.py
kangzhiq/sunpy
fad034a2ca0bebfa041e47b18a0789d2bc4b4aa6
[ "BSD-2-Clause" ]
null
null
null
sunpy/timeseries/tests/test_timeseries_factory.py
kangzhiq/sunpy
fad034a2ca0bebfa041e47b18a0789d2bc4b4aa6
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jun 23 12:08:21 2016 @author: alex_ """ import os import glob import pytest import datetime import numpy as np from pandas import DataFrame from collections import OrderedDict import sunpy.data.test import sunpy.timeseries from sunpy.util.metadata import MetaDict import sun...
48.174107
126
0.652257
import os import glob import pytest import datetime import numpy as np from pandas import DataFrame from collections import OrderedDict import sunpy.data.test import sunpy.timeseries from sunpy.util.metadata import MetaDict import sunpy.io from sunpy.util.datatype_factory_base import NoMatchError from sunpy.util impo...
true
true
08ff35f281f9cb766f289a87a1b06a55523569cb
7,002
py
Python
pokemongo_bot/cell_workers/move_to_map_pokemon.py
Lordness/poklord
6ab66e8e2847c2719e449d4fd128b83b2e722faa
[ "MIT" ]
null
null
null
pokemongo_bot/cell_workers/move_to_map_pokemon.py
Lordness/poklord
6ab66e8e2847c2719e449d4fd128b83b2e722faa
[ "MIT" ]
null
null
null
pokemongo_bot/cell_workers/move_to_map_pokemon.py
Lordness/poklord
6ab66e8e2847c2719e449d4fd128b83b2e722faa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import time import json import base64 import requests from pokemongo_bot import logger from pokemongo_bot.cell_workers.utils import distance, format_dist, format_time from pokemongo_bot.step_walker import StepWalker from pokemongo_bot.worker_result import WorkerResult from pokemongo_b...
35.01
164
0.604256
import os import time import json import base64 import requests from pokemongo_bot import logger from pokemongo_bot.cell_workers.utils import distance, format_dist, format_time from pokemongo_bot.step_walker import StepWalker from pokemongo_bot.worker_result import WorkerResult from pokemongo_bot.base_task import Base...
true
true
08ff368425e08ee9b10247e3f0f0bdda84c83cb2
3,928
py
Python
plare/parser/table.py
HenryLee97/plare
54161c8f8457eb140ad0af911dd4959c43ea715c
[ "MIT" ]
null
null
null
plare/parser/table.py
HenryLee97/plare
54161c8f8457eb140ad0af911dd4959c43ea715c
[ "MIT" ]
null
null
null
plare/parser/table.py
HenryLee97/plare
54161c8f8457eb140ad0af911dd4959c43ea715c
[ "MIT" ]
null
null
null
from plare.lexer.token import Token from plare.lexer.token import TokenObject from plare.parser.exception import ParsingTableError from plare.parser.exception import ReduceReduceConflict from plare.parser.exception import ShiftReduceConflict from plare.parser.exception import WrongAction from plare.parser.rule import A...
43.644444
210
0.677189
from plare.lexer.token import Token from plare.lexer.token import TokenObject from plare.parser.exception import ParsingTableError from plare.parser.exception import ReduceReduceConflict from plare.parser.exception import ShiftReduceConflict from plare.parser.exception import WrongAction from plare.parser.rule import A...
true
true
08ff36a77d684cdcb80b80ebc47f8d3144cf2e3d
2,718
py
Python
0DeepLearning/Clock/ch5.py
intLyc/Undergraduate-Courses
8eba20b6b8c43d4eee0af4b0ebca68d708f27aa9
[ "Apache-2.0" ]
null
null
null
0DeepLearning/Clock/ch5.py
intLyc/Undergraduate-Courses
8eba20b6b8c43d4eee0af4b0ebca68d708f27aa9
[ "Apache-2.0" ]
null
null
null
0DeepLearning/Clock/ch5.py
intLyc/Undergraduate-Courses
8eba20b6b8c43d4eee0af4b0ebca68d708f27aa9
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import matplotlib.pyplot as plt import h5py def get_files(file_dir): twelve = [] label_twelve = [] halfpasttwelve = [] label_halfpasttwelve = [] three = [] label_three = [] halfpastthree = [] label_halfpastthree = [] six = [] label_six...
34.405063
129
0.639809
import os import numpy as np import matplotlib.pyplot as plt import h5py def get_files(file_dir): twelve = [] label_twelve = [] halfpasttwelve = [] label_halfpasttwelve = [] three = [] label_three = [] halfpastthree = [] label_halfpastthree = [] six = [] label_six...
true
true
08ff37c58f4a34cc1e1c41f2a78330ac5e2c0fd4
53,216
py
Python
src/tests/run.py
bernd5/runtime
510f63e1fa0edc5d10781ae45b266bfaa5709d48
[ "MIT" ]
2
2021-05-04T11:27:27.000Z
2021-06-18T14:04:08.000Z
src/tests/run.py
bernd5/runtime
510f63e1fa0edc5d10781ae45b266bfaa5709d48
[ "MIT" ]
18
2019-12-03T00:21:59.000Z
2022-01-30T04:45:58.000Z
src/tests/run.py
bernd5/runtime
510f63e1fa0edc5d10781ae45b266bfaa5709d48
[ "MIT" ]
2
2022-01-23T12:24:04.000Z
2022-02-07T15:44:03.000Z
#!/usr/bin/env python # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. # ## # Title: run.py # # Notes: # # Universal script to setup and run the xunit console runner. The script relies # on run.proj and the bash and ...
37.162011
208
0.593393
# ilproj or csproj. # # The xunit runner currently relies on tests being built on the same host as the # target platform. This requires all tests run on linux x64 to be built by the # same platform and arch. If this is not done, the tests will run correctly; # however, expect failures due to incorrect exclusions in the...
true
true
08ff3a423d6acecd5ba8fc98387001212dd8f746
5,161
py
Python
leetcode.com/python/562_Longest_Line_of_Consecutive_One_in_Matrix.py
vansh-tiwari/coding-interview-gym
68345725dee0007f52b7ea3550adda35ddcf1955
[ "MIT" ]
1
2021-05-17T23:56:56.000Z
2021-05-17T23:56:56.000Z
leetcode.com/python/562_Longest_Line_of_Consecutive_One_in_Matrix.py
StormComingMove/coding-interview-gym
7b9cb143816a5a203d9b68b37a055e6adf12bbf3
[ "MIT" ]
null
null
null
leetcode.com/python/562_Longest_Line_of_Consecutive_One_in_Matrix.py
StormComingMove/coding-interview-gym
7b9cb143816a5a203d9b68b37a055e6adf12bbf3
[ "MIT" ]
1
2021-05-17T23:56:59.000Z
2021-05-17T23:56:59.000Z
# Approach 1: Brute force. Time limit exceeded. 57 / 57 test cases passed, but took too long. # # https://tinyurl.com/vqppbae class Solution(object): def longestLine(self, M): """ :type M: List[List[int]] :rtype: int """ rowCount, colCount = len(M), len(M[0]) if M else 0 ...
37.129496
136
0.518698
class Solution(object): def longestLine(self, M): rowCount, colCount = len(M), len(M[0]) if M else 0 if rowCount <= 0 or colCount <= 0: return 0 maxOnes = 0 for rowIdx in range(rowCount): currentOnes = 0 for colIdx in range(colCount): ...
true
true
08ff3a46348f08318a0675c346ef70e799775a48
1,414
py
Python
src/azure-cli/azure/cli/command_modules/identity/commands.py
yingru97/azure-cli
75c94ddd1840ae3b5012b82503ff448c4498ea67
[ "MIT" ]
4
2022-01-25T07:33:15.000Z
2022-03-24T05:15:13.000Z
src/azure-cli/azure/cli/command_modules/identity/commands.py
yingru97/azure-cli
75c94ddd1840ae3b5012b82503ff448c4498ea67
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/identity/commands.py
yingru97/azure-cli
75c94ddd1840ae3b5012b82503ff448c4498ea67
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
42.848485
108
0.661245
from azure.cli.core.commands import CliCommandType from ._client_factory import _msi_user_identities_operations, _msi_operations_operations from ._validators import process_msi_namespace def load_command_table(self, _): identity_sdk = CliCommandType( operations_tmpl='azure.mgmt.msi.operations#UserAss...
true
true
08ff3a5564d1c6e5d10a6626125877c9d10743ff
6,518
py
Python
chrome/common/extensions/PRESUBMIT.py
halton/chromium-crosswalk
bfcca582b723b9535907f0b410b920ef99911b70
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/common/extensions/PRESUBMIT.py
halton/chromium-crosswalk
bfcca582b723b9535907f0b410b920ef99911b70
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/common/extensions/PRESUBMIT.py
halton/chromium-crosswalk
bfcca582b723b9535907f0b410b920ef99911b70
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for changes affecting extensions. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about...
39.50303
80
0.661553
import fnmatch import os import re EXTENSIONS_PATH = os.path.join('chrome', 'common', 'extensions') DOCS_PATH = os.path.join(EXTENSIONS_PATH, 'docs') SERVER2_PATH = os.path.join(DOCS_PATH, 'server2') API_PATH = os.path.join(EXTENSIONS_PATH, 'api') TEMPLATES_PATH = os.path.join(DOCS_PATH, 'templates') PRIVATE_TEMPLATE...
true
true
08ff3a5776341a244108ca79d4ac0457b6656fef
6,803
py
Python
tests/pool/test_pool.py
nickolay/ctds
50cd3bb993c7bea7a8a13619fcee367c6e389460
[ "MIT" ]
null
null
null
tests/pool/test_pool.py
nickolay/ctds
50cd3bb993c7bea7a8a13619fcee367c6e389460
[ "MIT" ]
null
null
null
tests/pool/test_pool.py
nickolay/ctds
50cd3bb993c7bea7a8a13619fcee367c6e389460
[ "MIT" ]
null
null
null
import threading import time import unittest import warnings from ctds.pool import ConnectionPool from ..compat import mock class TestConnectionPool(unittest.TestCase): maxDiff = None def test_acquire(self): mock_dbapi2 = mock.MagicMock() params = { 'server': 'hostname', ...
27.212
91
0.531089
import threading import time import unittest import warnings from ctds.pool import ConnectionPool from ..compat import mock class TestConnectionPool(unittest.TestCase): maxDiff = None def test_acquire(self): mock_dbapi2 = mock.MagicMock() params = { 'server': 'hostname', ...
true
true
08ff3ab066c0ec2d251ab5cdb3cadea6488db8a1
12,245
py
Python
ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py
risdenk/ambari
3809bdc6d5fe367c2c3207812ee42856214db8de
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py
risdenk/ambari
3809bdc6d5fe367c2c3207812ee42856214db8de
[ "Apache-2.0" ]
1
2018-10-22T17:50:00.000Z
2018-10-22T17:50:00.000Z
ambari-server/src/main/resources/common-services/DRUID/0.9.2/package/scripts/params.py
risdenk/ambari
3809bdc6d5fe367c2c3207812ee42856214db8de
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
53.23913
150
0.786035
from ambari_commons import OSCheck from resource_management.libraries.functions import conf_select from resource_management.libraries.functions import stack_select from resource_management.libraries.resources.hdfs_resource import HdfsResource from resource_management.libraries.functions import get_kinit_path from resou...
true
true
08ff3b70dcb13a191ff9df855e69bce893aa5647
3,932
py
Python
tools/intogen/runtime/pyenv/lib/python2.7/site-packages/pandas/core/panelnd.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
1
2021-02-05T13:19:58.000Z
2021-02-05T13:19:58.000Z
tools/intogen/runtime/pyenv/lib/python2.7/site-packages/pandas/core/panelnd.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
null
null
null
tools/intogen/runtime/pyenv/lib/python2.7/site-packages/pandas/core/panelnd.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
1
2019-07-30T02:42:51.000Z
2019-07-30T02:42:51.000Z
""" Factory methods to create N-D panels """ import pandas.lib as lib def create_nd_panel_factory(klass_name, axis_orders, axis_slices, slicer, axis_aliases=None, stat_axis=2,ns=None): """ manufacture a n-d class: parameters ---------- klass_name : the klass name axis_orders : t...
33.322034
114
0.622075
import pandas.lib as lib def create_nd_panel_factory(klass_name, axis_orders, axis_slices, slicer, axis_aliases=None, stat_axis=2,ns=None): if isinstance(slicer, basestring): import pandas try: slicer = getattr(pandas, slicer) except: raise Exception("cannot c...
true
true
08ff3b925b4bbc937340b08541ad3277084d9b2f
25,727
py
Python
toontown/safezone/DistributedPicnicTable.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
null
null
null
toontown/safezone/DistributedPicnicTable.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
1
2021-06-08T17:16:48.000Z
2021-06-08T17:16:48.000Z
toontown/safezone/DistributedPicnicTable.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
3
2021-06-03T05:36:36.000Z
2021-06-22T15:07:31.000Z
from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * from TrolleyConstants import * from direct.gui.DirectGui import * from toontown.toonbase import TTLocalizer from direct.distributed import DistributedNode from direct.dis...
39.458589
200
0.59319
from panda3d.core import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * from TrolleyConstants import * from direct.gui.DirectGui import * from toontown.toonbase import TTLocalizer from direct.distributed import DistributedNode from direct.dis...
false
true
08ff3c2a6da9c1cdff87e40f65295107bf56ea59
374
py
Python
cookietemple_website/config.py
cookiejar/cookietemple_website
484cd8d4b254e75c447b12dc2e7c2ac018dda1d1
[ "MIT" ]
2
2020-11-24T14:20:26.000Z
2020-11-28T23:16:16.000Z
mlf_core_website/config.py
Imipenem/mlf_core_website
511b2e0da2be20cbe8ba60f194f893302e1ac939
[ "MIT" ]
132
2020-08-17T21:25:25.000Z
2022-03-31T21:03:25.000Z
mlf_core_website/config.py
Imipenem/mlf_core_website
511b2e0da2be20cbe8ba60f194f893302e1ac939
[ "MIT" ]
1
2020-08-24T19:51:27.000Z
2020-08-24T19:51:27.000Z
import os class Config: CURRENT_DIR = os.path.abspath(os.getcwd()) MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_PATH = os.path.join(MODULE_DIR, 'static') TEMPLATES_PATH = os.path.join(MODULE_DIR, 'templates') basedir = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = ...
31.166667
70
0.719251
import os class Config: CURRENT_DIR = os.path.abspath(os.getcwd()) MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_PATH = os.path.join(MODULE_DIR, 'static') TEMPLATES_PATH = os.path.join(MODULE_DIR, 'templates') basedir = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = ...
true
true
08ff3d51bcd26385fa318d09b4690a06fce34ccb
3,782
py
Python
dask_sql/physical/rel/custom/export_model.py
sarahyurick/dask-sql
4dab94973c0285b1f9c49e38044f8df5333aa8ae
[ "MIT" ]
null
null
null
dask_sql/physical/rel/custom/export_model.py
sarahyurick/dask-sql
4dab94973c0285b1f9c49e38044f8df5333aa8ae
[ "MIT" ]
null
null
null
dask_sql/physical/rel/custom/export_model.py
sarahyurick/dask-sql
4dab94973c0285b1f9c49e38044f8df5333aa8ae
[ "MIT" ]
null
null
null
import logging import pickle from dask_sql.physical.rel.base import BaseRelPlugin from dask_sql.utils import convert_sql_kwargs logger = logging.getLogger(__name__) class ExportModelPlugin(BaseRelPlugin): """ Export a trained model into a file using one of the supported model serialization libraries. ...
42.022222
109
0.625859
import logging import pickle from dask_sql.physical.rel.base import BaseRelPlugin from dask_sql.utils import convert_sql_kwargs logger = logging.getLogger(__name__) class ExportModelPlugin(BaseRelPlugin): class_name = "com.dask.sql.parser.SqlExportModel" def convert( self, sql: "org.apache.calcite...
true
true
08ff3d6e1e3ce386880c56180f76186cf2e9efe5
369
py
Python
Verify-Manual-python/predict/predictOneVsAll.py
skyduy/zfverify
a49e314df7b8b3822dd941b44d68c0fde77df9c9
[ "MIT" ]
52
2016-01-25T14:42:20.000Z
2021-01-26T11:23:18.000Z
Verify-Manual-python/predict/predictOneVsAll.py
wax8280/zfverify
a49e314df7b8b3822dd941b44d68c0fde77df9c9
[ "MIT" ]
2
2016-10-06T12:15:39.000Z
2018-06-06T11:20:01.000Z
Verify-Manual-python/predict/predictOneVsAll.py
wax8280/zfverify
a49e314df7b8b3822dd941b44d68c0fde77df9c9
[ "MIT" ]
23
2015-07-10T11:54:01.000Z
2020-03-05T03:25:16.000Z
# coding: utf-8 from numpy import dot, hstack, ones, argmax from sigmoid import sigmoid def predictOneVsAll(all_theta, X): m = X.shape[0] X = hstack((ones((m, 1)), X)) real_all_theta = all_theta.transpose() all_predict = sigmoid(dot(X, real_all_theta)) Accuracy = all_predict.max(1) p = argm...
19.421053
49
0.669377
from numpy import dot, hstack, ones, argmax from sigmoid import sigmoid def predictOneVsAll(all_theta, X): m = X.shape[0] X = hstack((ones((m, 1)), X)) real_all_theta = all_theta.transpose() all_predict = sigmoid(dot(X, real_all_theta)) Accuracy = all_predict.max(1) p = argmax(all_predict, ...
true
true
08ff3fb26301d29feed783b28da72dbff5e34fa1
2,727
py
Python
t05_is_even.py
nguyent2/Practice-with-Unit-Testing
083e918ca73d7a8588b9d3b7c18214a27b1a7a67
[ "MIT" ]
null
null
null
t05_is_even.py
nguyent2/Practice-with-Unit-Testing
083e918ca73d7a8588b9d3b7c18214a27b1a7a67
[ "MIT" ]
null
null
null
t05_is_even.py
nguyent2/Practice-with-Unit-Testing
083e918ca73d7a8588b9d3b7c18214a27b1a7a67
[ "MIT" ]
null
null
null
###################################################################### # Author: Emily Lovell & Scott Heggen TODO: Change this to your names # Username: lovelle & heggens TODO: Change this to your usernames # # Assignment: T05: Unit Testing # # Purpose: This program is designed to demonstrate testing o...
29.967033
88
0.608361
import sys def testit(did_pass): linenum = sys._getframe(1).f_lineno if did_pass: msg = "Test at line {0} ok.".format(linenum) else: msg = ("Test at line {0} FAILED.".format(linenum)) print(msg) def is_even_testsuite(): print("\nRunning is_even_testsuite().") # Tes...
true
true
08ff40a64ee7a2568598552da01e10b2d52bb33b
5,302
py
Python
sdk/python/pulumi_azure_native/network/v20190801/get_route.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20190801/get_route.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20190801/get_route.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
36.068027
150
0.657865
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = [ 'GetRouteResult', 'AwaitableGetRouteResult', 'get_route', ] @pulumi.output_type class GetRouteResult: def __init__(__self__, address_prefix=N...
true
true
08ff40d0fccadd06ef7d7b12af26b0b1c5c486db
21,785
py
Python
cinder/volume/drivers/blockbridge.py
bswartz/cinder
6cfecade9e2ee86bbb7d95c3c401c9e4c70f6a96
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/blockbridge.py
bswartz/cinder
6cfecade9e2ee86bbb7d95c3c401c9e4c70f6a96
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/blockbridge.py
bswartz/cinder
6cfecade9e2ee86bbb7d95c3c401c9e4c70f6a96
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2015 Blockbridge Networks, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
36.490787
79
0.577737
import base64 import socket from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import units import six from six.moves import http_client from six.moves import urllib from cinder import context from cinder import exception from cinder.i18n import _...
true
true
08ff40d59b8cc2570af02489c73d8161eb797928
866
py
Python
2020_09_30/dojo_test.py
devppjr/dojo
de0bf116153bd1251dd948c18fc73ac41def0fa5
[ "MIT" ]
114
2015-03-10T22:17:42.000Z
2022-03-09T17:49:48.000Z
2020_09_30/dojo_test.py
devppjr/dojo
de0bf116153bd1251dd948c18fc73ac41def0fa5
[ "MIT" ]
9
2018-09-04T12:49:59.000Z
2019-11-17T21:29:51.000Z
2020_09_30/dojo_test.py
devppjr/dojo
de0bf116153bd1251dd948c18fc73ac41def0fa5
[ "MIT" ]
39
2015-01-29T01:20:56.000Z
2022-02-17T16:26:25.000Z
import unittest from dojo import get_position, main class DojoTest(unittest.TestCase): def test_get_position_1(self): self.assertEquals(get_position(0, 2, 3), 6) def test_get_position_2(self): self.assertEquals(get_position(1, 1, 1), 2) def test_get_position_3(self): self.assertE...
24.055556
54
0.663972
import unittest from dojo import get_position, main class DojoTest(unittest.TestCase): def test_get_position_1(self): self.assertEquals(get_position(0, 2, 3), 6) def test_get_position_2(self): self.assertEquals(get_position(1, 1, 1), 2) def test_get_position_3(self): self.assertE...
true
true
08ff418ee7378ef2c4cd245f136e14770d19249c
5,811
py
Python
qa/rpc-tests/staking_mininputvalue.py
stakecom/stakework
a2110b0ba6aa9638a18c2e7ae12f0f229e074f35
[ "MIT" ]
null
null
null
qa/rpc-tests/staking_mininputvalue.py
stakecom/stakework
a2110b0ba6aa9638a18c2e7ae12f0f229e074f35
[ "MIT" ]
null
null
null
qa/rpc-tests/staking_mininputvalue.py
stakecom/stakework
a2110b0ba6aa9638a18c2e7ae12f0f229e074f35
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The Stakework Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import StakeWorkTestFramework from test_framework.util import * class Mi...
33.784884
124
0.556531
from test_framework.test_framework import StakeWorkTestFramework from test_framework.util import * class MinInputValueTest(StakeWorkTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 3 def setup_network(self, split=False): sel...
true
true
08ff464c7558c2de28a12d0372a1a6fce1ad1146
3,813
py
Python
src/main.py
middlec000/wordler
ad76dea50f0baab398d16366bfc55557ae187fce
[ "MIT" ]
null
null
null
src/main.py
middlec000/wordler
ad76dea50f0baab398d16366bfc55557ae187fce
[ "MIT" ]
null
null
null
src/main.py
middlec000/wordler
ad76dea50f0baab398d16366bfc55557ae187fce
[ "MIT" ]
null
null
null
import streamlit as st import pandas as pd from helper_methods import * def suggest(df: pd.DataFrame, original_length: int, num_words_to_display: int, sort_by: str) -> None: """ Print the suggested words nicely and ordered by the desired metric. Args: df (pd.DataFrame): Remaining words. o...
49.519481
169
0.695515
import streamlit as st import pandas as pd from helper_methods import * def suggest(df: pd.DataFrame, original_length: int, num_words_to_display: int, sort_by: str) -> None: sort_by_to_col_map = {'Word Frequency': 'wordFreq', 'Letter Frequency': 'letterFreqSum', 'Letter at Position Frequency': 'letterPosFreqSum'}...
true
true
08ff465b7306f2a07bc675ad70737db03c0cfad8
4,336
py
Python
pyjunix/pyjuniq.py
aanastasiou/pyjunix
a2deb9a5e159155a175098918e3514e30714185d
[ "Apache-2.0" ]
1
2020-09-30T02:59:37.000Z
2020-09-30T02:59:37.000Z
pyjunix/pyjuniq.py
aanastasiou/pyjunix
a2deb9a5e159155a175098918e3514e30714185d
[ "Apache-2.0" ]
1
2021-06-02T00:30:47.000Z
2021-06-02T00:30:47.000Z
pyjunix/pyjuniq.py
aanastasiou/pyjunix
a2deb9a5e159155a175098918e3514e30714185d
[ "Apache-2.0" ]
null
null
null
""" PyJUniq returns unique items from a list of items. :authors: Athanasios Anastasiou :date: November 2019 """ import sys import json from .core import BasePyJUnixFunction, PyJUnixException, PyJCommandLineArgumentParser import deepdiff import collections import pdb class PyJUniq(BasePyJUnixFunction): """ ...
42.509804
121
0.602399
import sys import json from .core import BasePyJUnixFunction, PyJUnixException, PyJCommandLineArgumentParser import deepdiff import collections import pdb class PyJUniq(BasePyJUnixFunction): def on_get_parser(self): ret_parser = PyJCommandLineArgumentParser(prog="pyjuniq", description="Returns uniqu...
true
true
08ff47bf40f32644ad50d1daa1faecc7460e8fce
3,899
py
Python
src/tests/test_pin_watcher.py
mgk/thingpin
c2c60d85c61292073848f85cc1efacf6a3984023
[ "MIT" ]
10
2016-01-13T13:19:20.000Z
2018-01-15T09:48:14.000Z
src/tests/test_pin_watcher.py
mgk/thingpin
c2c60d85c61292073848f85cc1efacf6a3984023
[ "MIT" ]
6
2015-11-01T20:42:55.000Z
2016-01-11T19:12:15.000Z
src/tests/test_pin_watcher.py
mgk/thingpin
c2c60d85c61292073848f85cc1efacf6a3984023
[ "MIT" ]
3
2016-01-13T18:58:48.000Z
2017-11-20T06:38:47.000Z
import pytest import unittest import sys import os import datetime import time from freezegun import freeze_time try: from unittest.mock import patch, Mock, call except ImportError: from mock import patch, Mock, call # pick up our RPi stub which will mock after Watcher imports it sys.path.insert(0, os.path.di...
28.669118
75
0.586048
import pytest import unittest import sys import os import datetime import time from freezegun import freeze_time try: from unittest.mock import patch, Mock, call except ImportError: from mock import patch, Mock, call sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) import RPi import thingpin fr...
true
true
08ff483234c49570fe3bcee21e2fc48bc3da1402
1,657
py
Python
lite/tests/unittest_py/op/backends/x86/test_grid_sampler_op.py
laiou/Paddle-Lite
a99080a48186ec7df546d77d39db58d84d1dda3e
[ "Apache-2.0" ]
null
null
null
lite/tests/unittest_py/op/backends/x86/test_grid_sampler_op.py
laiou/Paddle-Lite
a99080a48186ec7df546d77d39db58d84d1dda3e
[ "Apache-2.0" ]
null
null
null
lite/tests/unittest_py/op/backends/x86/test_grid_sampler_op.py
laiou/Paddle-Lite
a99080a48186ec7df546d77d39db58d84d1dda3e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
34.520833
125
0.74653
import sys sys.path.append('../../common') sys.path.append('../../../') import test_grid_sampler_op_base from auto_scan_test import AutoScanTest, IgnoreReasons from program_config import TensorConfig, ProgramConfig, OpConfig, CxxConfig, TargetType, PrecisionType, DataLayoutType, Place import unittest import hypothes...
true
true
08ff487fdaa4447b0c3bd6e1b621631555f29bf3
543
py
Python
res/TensorFlowPythonModels/examples/L2Pool2D/__init__.py
periannath/ONE
61e0bdf2bcd0bc146faef42b85d469440e162886
[ "Apache-2.0" ]
255
2020-05-22T07:45:29.000Z
2022-03-29T23:58:22.000Z
res/TensorFlowPythonModels/examples/L2Pool2D/__init__.py
periannath/ONE
61e0bdf2bcd0bc146faef42b85d469440e162886
[ "Apache-2.0" ]
5,102
2020-05-22T07:48:33.000Z
2022-03-31T23:43:39.000Z
res/TensorFlowPythonModels/examples/L2Pool2D/__init__.py
periannath/ONE
61e0bdf2bcd0bc146faef42b85d469440e162886
[ "Apache-2.0" ]
120
2020-05-22T07:51:08.000Z
2022-02-16T19:08:05.000Z
import tensorflow as tf in1_ = tf.compat.v1.placeholder(tf.float32, shape=(1, 8, 8, 1), name="Hole") in2_ = tf.compat.v1.square(in1_, name="Hole1") in3_ = tf.compat.v1.nn.avg_pool(in2_, (2, 2), (1, 1), "VALID", name="Hole2") out_ = tf.compat.v1.sqrt(in3_, name="L2Pool2D") # this example with tf2tfliteV2 will convert ...
31.941176
88
0.701657
import tensorflow as tf in1_ = tf.compat.v1.placeholder(tf.float32, shape=(1, 8, 8, 1), name="Hole") in2_ = tf.compat.v1.square(in1_, name="Hole1") in3_ = tf.compat.v1.nn.avg_pool(in2_, (2, 2), (1, 1), "VALID", name="Hole2") out_ = tf.compat.v1.sqrt(in3_, name="L2Pool2D")
true
true
08ff48ee01d98a4fd49ea2815ba4856ada7bc7b2
77,865
py
Python
pytorch_pretrained_bert/modeling.py
Rocketknight1/pytorch-pretrained-BERT
2c03c10d5e34badf17298e8f070c8c0169febe22
[ "Apache-2.0" ]
2
2020-10-13T18:05:06.000Z
2021-04-21T13:46:34.000Z
pytorch_pretrained_bert/modeling.py
Rocketknight1/pytorch-pretrained-BERT
2c03c10d5e34badf17298e8f070c8c0169febe22
[ "Apache-2.0" ]
null
null
null
pytorch_pretrained_bert/modeling.py
Rocketknight1/pytorch-pretrained-BERT
2c03c10d5e34badf17298e8f070c8c0169febe22
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
53.259234
187
0.674591
from __future__ import absolute_import, division, print_function, unicode_literals import copy import json import logging import math import os import sys from io import open import torch from torch import nn from torch.nn import CrossEntropyLoss from .file_utils import cached_path, WEIGHTS_NAME, CONFIG_NAME logge...
true
true
08ff49629795fe658444718f8adeaea333ee5368
170
py
Python
clock/exports/stundenzettel_generator/__init__.py
chgad/django-clock
f855cd1253574c0582ed53a0ac34206c242f04c9
[ "MIT" ]
null
null
null
clock/exports/stundenzettel_generator/__init__.py
chgad/django-clock
f855cd1253574c0582ed53a0ac34206c242f04c9
[ "MIT" ]
null
null
null
clock/exports/stundenzettel_generator/__init__.py
chgad/django-clock
f855cd1253574c0582ed53a0ac34206c242f04c9
[ "MIT" ]
1
2020-03-13T14:42:11.000Z
2020-03-13T14:42:11.000Z
from opendocument import OpenDocument from strategy import Strategy from standupstrategy import StandupStrategy from StundenzettelGenerator import StundenzettelGenerator
34
57
0.905882
from opendocument import OpenDocument from strategy import Strategy from standupstrategy import StandupStrategy from StundenzettelGenerator import StundenzettelGenerator
true
true
08ff498d8bff2c974392fb64660612faf1c2dfc8
1,970
py
Python
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/AuthorizeSecurityGroupRequest.py
bricklayer-Liu/aliyun-openapi-python-sdk
20da2554de22679fc7c5462c483663e4d79512aa
[ "Apache-2.0" ]
1
2021-03-08T02:59:17.000Z
2021-03-08T02:59:17.000Z
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/AuthorizeSecurityGroupRequest.py
bricklayer-Liu/aliyun-openapi-python-sdk
20da2554de22679fc7c5462c483663e4d79512aa
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/AuthorizeSecurityGroupRequest.py
bricklayer-Liu/aliyun-openapi-python-sdk
20da2554de22679fc7c5462c483663e4d79512aa
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.178571
75
0.76802
from aliyunsdkcore.request import RpcRequest from aliyunsdkemr.endpoint import endpoint_data class AuthorizeSecurityGroupRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Emr', '2016-04-08', 'AuthorizeSecurityGroup') self.set_method('POST') if hasattr(self, "endpoint_map"): setattr(self,...
true
true
08ff4995be50ae29ff643c935ceec454f8c1e764
1,132
py
Python
tests/test_ethereumNodes.py
ayobuenavista/sanity-price-monitor
d6da819e3bd5fdd797bd2acfd4cf50ae922e21f3
[ "MIT" ]
6
2018-01-09T14:27:44.000Z
2021-05-21T17:03:06.000Z
tests/test_ethereumNodes.py
ayobuenavista/sanity-price-monitor
d6da819e3bd5fdd797bd2acfd4cf50ae922e21f3
[ "MIT" ]
13
2018-01-17T13:30:39.000Z
2021-03-25T21:35:17.000Z
tests/test_ethereumNodes.py
ayobuenavista/sanity-price-monitor
d6da819e3bd5fdd797bd2acfd4cf50ae922e21f3
[ "MIT" ]
7
2018-02-22T01:17:17.000Z
2021-03-15T07:43:05.000Z
import logging from pricemonitor.storing.ethereum_nodes import EthereumNetwork logging.disable(logging.WARNING) def test__current_node__returns_node(): nodes = EthereumNetwork(["a"], '') assert nodes.current_node() == "a" def test__current_node__returns_node_when_asking_multiple_times(): nodes = Ethe...
23.102041
66
0.688163
import logging from pricemonitor.storing.ethereum_nodes import EthereumNetwork logging.disable(logging.WARNING) def test__current_node__returns_node(): nodes = EthereumNetwork(["a"], '') assert nodes.current_node() == "a" def test__current_node__returns_node_when_asking_multiple_times(): nodes = Ethe...
true
true
08ff4ad36729f62bc5e15bba6deaad1cc718545d
756
py
Python
pants_jupyter_plugin/env.py
Kludex/pants-jupyter-plugin
241f97864fd4bc53a93603316bb4625c6c25a401
[ "Apache-2.0" ]
7
2021-06-28T20:02:00.000Z
2022-02-19T15:37:10.000Z
pants_jupyter_plugin/env.py
Kludex/pants-jupyter-plugin
241f97864fd4bc53a93603316bb4625c6c25a401
[ "Apache-2.0" ]
23
2021-03-03T03:06:11.000Z
2022-02-18T17:28:40.000Z
pants_jupyter_plugin/env.py
Kludex/pants-jupyter-plugin
241f97864fd4bc53a93603316bb4625c6c25a401
[ "Apache-2.0" ]
4
2021-03-03T02:30:58.000Z
2022-02-02T22:59:52.000Z
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from typing import Any, Mapping def create(**env_vars: Any) -> Mapping[str, str]: """Creates a copy of the current environment with the specified alterations. Keyword ...
34.363636
96
0.693122
import os from typing import Any, Mapping def create(**env_vars: Any) -> Mapping[str, str]: env = os.environ.copy() for name, value in env_vars.items(): if value is not None: env[name] = str(value) else: env.pop(name, None) return env
true
true
08ff4b0e9a325b8e0dc81c1b9fa2c5a320e6ea46
1,364
py
Python
office365/sharepoint/fields/field_creation_information.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
544
2016-08-04T17:10:16.000Z
2022-03-31T07:17:20.000Z
office365/sharepoint/fields/field_creation_information.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
438
2016-10-11T12:24:22.000Z
2022-03-31T19:30:35.000Z
office365/sharepoint/fields/field_creation_information.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
202
2016-08-22T19:29:40.000Z
2022-03-30T20:26:15.000Z
from office365.runtime.client_value import ClientValue from office365.runtime.client_value_collection import ClientValueCollection from office365.sharepoint.fields.field import Field from office365.sharepoint.fields.field_type import FieldType class FieldCreationInformation(ClientValue): def __init__(self, title...
36.864865
104
0.700147
from office365.runtime.client_value import ClientValue from office365.runtime.client_value_collection import ClientValueCollection from office365.sharepoint.fields.field import Field from office365.sharepoint.fields.field_type import FieldType class FieldCreationInformation(ClientValue): def __init__(self, title...
true
true
08ff4b58d0101e49a968fe4799383c92c2d5b460
48
py
Python
solutions/helpers/__init__.py
SebastiaanZ/aoc-2019
e1fe4630b0f375be0b79398e07e23b9c0196efbb
[ "MIT" ]
3
2019-12-02T19:38:14.000Z
2020-01-28T00:06:09.000Z
solutions/helpers/__init__.py
SebastiaanZ/aoc-2019
e1fe4630b0f375be0b79398e07e23b9c0196efbb
[ "MIT" ]
6
2020-03-24T17:58:40.000Z
2022-03-12T00:18:45.000Z
solutions/helpers/__init__.py
SebastiaanZ/aoc-2019
e1fe4630b0f375be0b79398e07e23b9c0196efbb
[ "MIT" ]
null
null
null
from .intcode import IntCodeApplication # noqa
24
47
0.8125
from .intcode import IntCodeApplication
true
true
08ff4dfbaa3076d9c8b154c23d735395d43462b5
3,224
py
Python
hphp/tools/gdb/lookup.py
Raulkumar/hhvm
dfc1a50aff4d3a1df508c685fee401262e530879
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
hphp/tools/gdb/lookup.py
Raulkumar/hhvm
dfc1a50aff4d3a1df508c685fee401262e530879
[ "PHP-3.01", "Zend-2.0" ]
2
2020-10-11T22:54:12.000Z
2021-07-20T22:12:10.000Z
hphp/tools/gdb/lookup.py
Raulkumar/hhvm
dfc1a50aff4d3a1df508c685fee401262e530879
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
#!/usr/bin/env python3 """ GDB commands for various HHVM ID lookups. """ from compatibility import * import gdb import idx import unit from gdbutils import * #------------------------------------------------------------------------------ # `lookup' command. class LookupCommand(gdb.Command): """Lookup HHVM run...
24.992248
79
0.558933
from compatibility import * import gdb import idx import unit from gdbutils import * class LookupCommand(gdb.Command): def __init__(self): super(LookupCommand, self).__init__('lookup', gdb.COMMAND_DATA, gdb.COMPLETE_NONE, True) LookupCommand() #--------...
true
true
08ff4e4d342904bbbaca03c660f93bbba14386c5
12,091
py
Python
localstack/services/sns/sns_listener.py
t0rr3sp3dr0/localstack
f18d189520640ff1172d4b57299079f598a24abf
[ "Apache-2.0" ]
null
null
null
localstack/services/sns/sns_listener.py
t0rr3sp3dr0/localstack
f18d189520640ff1172d4b57299079f598a24abf
[ "Apache-2.0" ]
null
null
null
localstack/services/sns/sns_listener.py
t0rr3sp3dr0/localstack
f18d189520640ff1172d4b57299079f598a24abf
[ "Apache-2.0" ]
1
2020-03-07T18:21:17.000Z
2020-03-07T18:21:17.000Z
import json import logging import requests import uuid import xmltodict from requests.models import Response from six.moves.urllib import parse as urlparse from localstack.utils.aws import aws_stack from localstack.utils.common import short_uid, to_str from localstack.services.awslambda import lambda_api from localstac...
39.384365
116
0.575883
import json import logging import requests import uuid import xmltodict from requests.models import Response from six.moves.urllib import parse as urlparse from localstack.utils.aws import aws_stack from localstack.utils.common import short_uid, to_str from localstack.services.awslambda import lambda_api from localstac...
true
true
08ff4eacd2b8dbff39a6cc008273fac90b2a3e83
15,876
py
Python
src/_pytest/assertion/util.py
charlesaracil-ulti/pytest
dbd082af961871c59f2dbcda2fcb27faf4fa2ebc
[ "MIT" ]
null
null
null
src/_pytest/assertion/util.py
charlesaracil-ulti/pytest
dbd082af961871c59f2dbcda2fcb27faf4fa2ebc
[ "MIT" ]
54
2020-12-07T03:12:43.000Z
2022-03-28T03:02:38.000Z
src/_pytest/assertion/util.py
charlesaracil-ulti/pytest
dbd082af961871c59f2dbcda2fcb27faf4fa2ebc
[ "MIT" ]
null
null
null
"""Utilities for assertion debugging.""" import collections.abc import pprint from typing import AbstractSet from typing import Any from typing import Callable from typing import Iterable from typing import List from typing import Mapping from typing import Optional from typing import Sequence from typing import Tuple ...
33.635593
87
0.596813
import collections.abc import pprint from typing import AbstractSet from typing import Any from typing import Callable from typing import Iterable from typing import List from typing import Mapping from typing import Optional from typing import Sequence from typing import Tuple import _pytest._code from _pytest import...
true
true
08ff4f1b7f245aaf055acdca8f03213cca25377a
179
py
Python
Ethica/ethicaEnv/bin/django-admin.py
oconnalla/ethicaApp
88fef16b70a0d8e2c5f43af6afd3e6bef43ff683
[ "MIT" ]
null
null
null
Ethica/ethicaEnv/bin/django-admin.py
oconnalla/ethicaApp
88fef16b70a0d8e2c5f43af6afd3e6bef43ff683
[ "MIT" ]
null
null
null
Ethica/ethicaEnv/bin/django-admin.py
oconnalla/ethicaApp
88fef16b70a0d8e2c5f43af6afd3e6bef43ff683
[ "MIT" ]
null
null
null
#!/Users/owner/Documents/SCC Files/ITC172/Ethica/ethicaEnv/bin/python3.8 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
29.833333
72
0.793296
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
08ff4f98906a75e086f3641e4746a0c9e9696105
1,003
py
Python
src/apis/routes/todo.py
Chise1/ToDoList
22e5f371a2c84e3d38ba555940cb04beb30edb02
[ "Apache-2.0" ]
null
null
null
src/apis/routes/todo.py
Chise1/ToDoList
22e5f371a2c84e3d38ba555940cb04beb30edb02
[ "Apache-2.0" ]
null
null
null
src/apis/routes/todo.py
Chise1/ToDoList
22e5f371a2c84e3d38ba555940cb04beb30edb02
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- """ @File : todo.py @Time : 2021/2/28 11:05 @Author : chise @Email : chise123@live.com @Software: PyCharm @info : """ from typing import List, Optional from fastapi import APIRouter, Depends from sqlalchemy import select from sqlalchemy.orm import Session from src.apis.depends.db...
22.795455
87
0.695912
from typing import List, Optional from fastapi import APIRouter, Depends from sqlalchemy import select from sqlalchemy.orm import Session from src.apis.depends.db import get_db from src.models import User, Task from src.schemas import CrateTaskSchema, ListTaskSchema, ResultListTaskSchema from src.apis.depends.auth im...
true
true
08ff4fb67433c6f4a75a5b0a7a13ac088c8425db
1,817
py
Python
setup.py
joelthe1/talon
18de8bc35d8457a5ddfae1e52b9ee995422b4884
[ "Apache-2.0" ]
null
null
null
setup.py
joelthe1/talon
18de8bc35d8457a5ddfae1e52b9ee995422b4884
[ "Apache-2.0" ]
null
null
null
setup.py
joelthe1/talon
18de8bc35d8457a5ddfae1e52b9ee995422b4884
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from setuptools import setup, find_packages from setuptools.command.install import install class InstallCommand(install): user_options = install.user_options + [ ('no-ml', None, "Don't install without Machine Learning modules."), ] boolean_options = install....
28.390625
75
0.550908
from __future__ import absolute_import from setuptools import setup, find_packages from setuptools.command.install import install class InstallCommand(install): user_options = install.user_options + [ ('no-ml', None, "Don't install without Machine Learning modules."), ] boolean_options = install....
true
true
08ff50e37495333982df786e8de901b8bdde1937
1,538
py
Python
tests/01_algorithms/test_correct_pval.py
flo-compbio/xlmhg
c29d913386443396254774b8cff5cff2b5731323
[ "BSD-3-Clause" ]
15
2015-05-22T23:58:25.000Z
2021-12-31T03:01:54.000Z
tests/01_algorithms/test_correct_pval.py
flo-compbio/xlmhg
c29d913386443396254774b8cff5cff2b5731323
[ "BSD-3-Clause" ]
6
2016-07-18T05:02:04.000Z
2021-08-04T09:53:35.000Z
tests/01_algorithms/test_correct_pval.py
flo-compbio/xlmhg
c29d913386443396254774b8cff5cff2b5731323
[ "BSD-3-Clause" ]
1
2015-05-24T13:10:10.000Z
2015-05-24T13:10:10.000Z
# Copyright (c) 2016-2019 Florian Wagner # # This file is part of XL-mHG. """Tests for the Cython implementations of the XL-mHG p-value..""" import numpy as np from scipy.stats import hypergeom from xlmhg import mhg, mhg_cython def test_cross(): """Compares p-values calculated using PVAL1 and PVAL2.""" N = ...
29.018868
75
0.521456
import numpy as np from scipy.stats import hypergeom from xlmhg import mhg, mhg_cython def test_cross(): N = 50 K = 10 tol = 1e-8 W = N-K table = np.empty((K+1, W+1), dtype=np.longdouble) configs = np.ones((K+1, W+1), dtype=np.float64) for k in range(1, K+1): for w in ...
true
true
08ff51dcd4ef819ec41f8b65278e1bd70c4c80d9
1,948
py
Python
fuelux_widgets/widgets/pillbox.py
jneuendorf/what-should-i-eat
dc4ab57d567e4884856ea62b46deb217609d9d28
[ "MIT" ]
null
null
null
fuelux_widgets/widgets/pillbox.py
jneuendorf/what-should-i-eat
dc4ab57d567e4884856ea62b46deb217609d9d28
[ "MIT" ]
null
null
null
fuelux_widgets/widgets/pillbox.py
jneuendorf/what-should-i-eat
dc4ab57d567e4884856ea62b46deb217609d9d28
[ "MIT" ]
null
null
null
from .fuelux_widget import FuelUxWidget # from .. import utils class Pillbox(FuelUxWidget): """ Widget for FuelUX's pillbox. See http://getfuelux.com/javascript.html#pillbox. Possible attributes: - auto_init (boolean) - whether to add 'data-initialize="pillbox"' - id (string) - it...
29.515152
73
0.581622
from .fuelux_widget import FuelUxWidget class Pillbox(FuelUxWidget): template_name = "pillbox" default_attrs = { "auto_init": True, "add_item": "add item", "more": { "before": "and", "after": "more", }, "js": { "edit": False ...
true
true
08ff53d7383c56797c81d0cc7f79fd2a5d4e640d
1,257
py
Python
tools/dev/cicov.py
anastasiia-zolochevska/cloud-custodian
f25315a01bec808c16ab0e2d433d6151cf5769e4
[ "Apache-2.0" ]
1
2019-08-25T12:05:20.000Z
2019-08-25T12:05:20.000Z
tools/dev/cicov.py
anastasiia-zolochevska/cloud-custodian
f25315a01bec808c16ab0e2d433d6151cf5769e4
[ "Apache-2.0" ]
1
2018-06-05T20:40:02.000Z
2018-06-05T21:15:51.000Z
tools/dev/cicov.py
anastasiia-zolochevska/cloud-custodian
f25315a01bec808c16ab0e2d433d6151cf5769e4
[ "Apache-2.0" ]
1
2021-06-09T21:22:02.000Z
2021-06-09T21:22:02.000Z
#!/usr/bin/env python2 import subprocess import os import logging log = logging.getLogger('cicov') # https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=vsts config = { 'branch': os.environ.get('BRANCH'), 'pr': os.environ.get('PR'), 'build': os.environ.get('BUILD_ID'), 'com...
25.14
84
0.616547
import subprocess import os import logging log = logging.getLogger('cicov') config = { 'branch': os.environ.get('BRANCH'), 'pr': os.environ.get('PR'), 'build': os.environ.get('BUILD_ID'), 'commit': os.environ.get('BUILD_COMMIT')} UNSET = "system.pullRequest" def main(): logging.basicConfig(l...
true
true
08ff5417bcd574946499ddb01d9733d65f5b4c39
4,510
py
Python
mmdet/datasets/pipelines/instaboost.py
Brym-Gyimah/mmdetection
d5d749afe57c77e2ec4500395faed3566fdfedae
[ "Apache-2.0" ]
20,190
2018-09-10T01:11:53.000Z
2022-03-31T22:31:33.000Z
mmdet/datasets/pipelines/instaboost.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
6,736
2018-09-17T09:45:51.000Z
2022-03-31T22:54:10.000Z
mmdet/datasets/pipelines/instaboost.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
7,837
2018-09-11T02:58:23.000Z
2022-03-31T22:31:38.000Z
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from ..builder import PIPELINES @PIPELINES.register_module() class InstaBoost: r"""Data augmentation method in `InstaBoost: Boosting Instance Segmentation Via Probability Map Guided Copy-Pasting <https://arxiv.org/abs/1908.07801>`_. ...
37.89916
79
0.546341
import numpy as np from ..builder import PIPELINES @PIPELINES.register_module() class InstaBoost: def __init__(self, action_candidate=('normal', 'horizontal', 'skip'), action_prob=(1, 0, 0), scale=(0.8, 1.2), dx=15, dy=15, ...
true
true
08ff543449c04c773108c875601415b3f5755ac4
8,243
py
Python
socialite/jython/Lib/distutils/command/install_lib.py
Wangqge/PowerLog_ae
8546afbcb9a77d516e8c3f0dfbaf2041a4b888f9
[ "Apache-2.0" ]
49
2015-03-10T17:34:19.000Z
2021-11-10T22:23:18.000Z
socialite/jython/Lib/distutils/command/install_lib.py
Wangqge/PowerLog_ae
8546afbcb9a77d516e8c3f0dfbaf2041a4b888f9
[ "Apache-2.0" ]
null
null
null
socialite/jython/Lib/distutils/command/install_lib.py
Wangqge/PowerLog_ae
8546afbcb9a77d516e8c3f0dfbaf2041a4b888f9
[ "Apache-2.0" ]
32
2015-02-06T12:10:32.000Z
2019-06-18T03:21:36.000Z
# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys, os, string from types import IntType from distutils.core import Command from distutils.errors import DistutilsOptionError # Extension for Python source files. if hasattr(os, 'extsep'): PYTHON_SOURCE_EXTENSION = os.extsep ...
36.799107
77
0.577581
__revision__ = "$Id$" import sys, os, string from types import IntType from distutils.core import Command from distutils.errors import DistutilsOptionError if hasattr(os, 'extsep'): PYTHON_SOURCE_EXTENSION = os.extsep + "py" else: PYTHON_SOURCE_EXTENSION = ".py" class install_lib (Command): descriptio...
false
true
08ff5486ffe0f84d28c76fe42da1560b048dae0d
3,355
py
Python
isi_sdk/models/settings_krb5_domain.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
isi_sdk/models/settings_krb5_domain.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
isi_sdk/models/settings_krb5_domain.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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...
27.276423
77
0.557973
from pprint import pformat from six import iteritems import re class SettingsKrb5Domain(object): def __init__(self): self.swagger_types = { 'realm': 'str' } self.attribute_map = { 'realm': 'realm' } self._realm = None @property def realm...
true
true