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
1c3ffe94b14dd3e7b2ece143d99bc6e06579c84c
19,813
py
Python
fairseq/data/iterators.py
Epsilon-Lee/fairseq-da
fbe7a39717afcb60dd4a3e1cd6abd3c763354fe1
[ "MIT" ]
6
2021-07-03T10:16:13.000Z
2021-09-22T18:15:23.000Z
fairseq/data/iterators.py
Epsilon-Lee/fairseq-da
fbe7a39717afcb60dd4a3e1cd6abd3c763354fe1
[ "MIT" ]
null
null
null
fairseq/data/iterators.py
Epsilon-Lee/fairseq-da
fbe7a39717afcb60dd4a3e1cd6abd3c763354fe1
[ "MIT" ]
3
2021-07-14T13:12:19.000Z
2021-12-04T08:46:29.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import itertools import logging import math import operator import os import queue import time from threading import Thread import numpy as n...
33.984563
94
0.604401
import itertools import logging import math import operator import os import queue import time from threading import Thread import numpy as np import torch from fairseq.data import data_utils logger = logging.getLogger(__name__) _sentinel = object() class CountingIterator(object): def __init__(self, i...
true
true
1c4001234382c3c924fd3f3bd6638f4fdf34b0b8
287
py
Python
ctfproblems/Lovelace/90_lottery_pt2/grader.py
milesmcc/pactf-2018
cfd9d94a7b6828259220f52ab3c5893a28429c62
[ "MIT" ]
null
null
null
ctfproblems/Lovelace/90_lottery_pt2/grader.py
milesmcc/pactf-2018
cfd9d94a7b6828259220f52ab3c5893a28429c62
[ "MIT" ]
null
null
null
ctfproblems/Lovelace/90_lottery_pt2/grader.py
milesmcc/pactf-2018
cfd9d94a7b6828259220f52ab3c5893a28429c62
[ "MIT" ]
null
null
null
def grade(key, submission): if submission == "3956993139": return True, "You untwisted it and mastered fate itself! That's worth 65 points; sort of anticlimactic..." else: return False, "Fate remains untwisted! Is there any way to master random chance itself..."
47.833333
114
0.69338
def grade(key, submission): if submission == "3956993139": return True, "You untwisted it and mastered fate itself! That's worth 65 points; sort of anticlimactic..." else: return False, "Fate remains untwisted! Is there any way to master random chance itself..."
true
true
1c400335e23bb7eebf107a65485cbca1209d221c
517
py
Python
array/python3/21_subarray_with_sum_zero.py
suvambasak/cp
e015b662a4b8906d3363322c10a896e3cef0e69f
[ "MIT" ]
null
null
null
array/python3/21_subarray_with_sum_zero.py
suvambasak/cp
e015b662a4b8906d3363322c10a896e3cef0e69f
[ "MIT" ]
1
2021-02-28T20:17:32.000Z
2021-02-28T20:17:32.000Z
array/python3/21_subarray_with_sum_zero.py
scodebox/cp
e015b662a4b8906d3363322c10a896e3cef0e69f
[ "MIT" ]
1
2020-12-12T18:36:24.000Z
2020-12-12T18:36:24.000Z
# Calculate all prefix sum # 1 > If any prefix sum repeats -> True # 2 > If any prefix sum is zero -> True # TC: O(n) | SC: O(n) def solution_1(arr): sum = 0 sum_set = set() for num in arr: sum += num if 0 == sum or sum in sum_set: return True sum_set.add(sum) ...
19.884615
43
0.510638
def solution_1(arr): sum = 0 sum_set = set() for num in arr: sum += num if 0 == sum or sum in sum_set: return True sum_set.add(sum) return False if __name__ == '__main__': arr = [4, 2, -3, 1, 6] arr = [4, 2, 0, 1, 6] arr = [-3, 2, 3, 1, 6] ...
true
true
1c4003585f72e25173366417eabfafae167b215a
27,603
py
Python
session0/ecc.py
jimmysong/pw-exercises
8d7fc065e9fe01399fa240ff88a7b1557901defb
[ "MIT" ]
8
2019-02-21T04:22:48.000Z
2020-07-24T11:03:16.000Z
session0/ecc.py
jimmysong/pw-exercises
8d7fc065e9fe01399fa240ff88a7b1557901defb
[ "MIT" ]
null
null
null
session0/ecc.py
jimmysong/pw-exercises
8d7fc065e9fe01399fa240ff88a7b1557901defb
[ "MIT" ]
2
2020-01-23T16:24:16.000Z
2020-02-10T23:00:29.000Z
from io import BytesIO from random import randint from unittest import TestCase import hmac import hashlib from helper import ( big_endian_to_int, encode_base58_checksum, hash160, hash256, int_to_big_endian, raw_decode_base58, ) class FieldElement: def __init__(self, num, prime): ...
35.479434
165
0.566786
from io import BytesIO from random import randint from unittest import TestCase import hmac import hashlib from helper import ( big_endian_to_int, encode_base58_checksum, hash160, hash256, int_to_big_endian, raw_decode_base58, ) class FieldElement: def __init__(self, num, prime): ...
true
true
1c4006aa0d55930f34f8dd6c895baeb0c2c04c55
964
py
Python
infinitd_server/handler/debug_battle_input.py
rhofour/InfiniTDBackend
8763d64a82d02e4282abff5419e1ab256af41d7e
[ "MIT" ]
null
null
null
infinitd_server/handler/debug_battle_input.py
rhofour/InfiniTDBackend
8763d64a82d02e4282abff5419e1ab256af41d7e
[ "MIT" ]
null
null
null
infinitd_server/handler/debug_battle_input.py
rhofour/InfiniTDBackend
8763d64a82d02e4282abff5419e1ab256af41d7e
[ "MIT" ]
null
null
null
import cattr from infinitd_server.battle_computer import BattleCalculationException from infinitd_server.game import Game from infinitd_server.handler.base import BaseHandler class DebugBattleInputHandler(BaseHandler): game: Game # See https://github.com/google/pytype/issues/652 def get(self, attackerName, d...
35.703704
93
0.665975
import cattr from infinitd_server.battle_computer import BattleCalculationException from infinitd_server.game import Game from infinitd_server.handler.base import BaseHandler class DebugBattleInputHandler(BaseHandler): game: Game def get(self, attackerName, defenderName): self.logInfo(f"Trying to do...
true
true
1c4007c0021d8943500c88dc970ef3782332364a
146
py
Python
6kyu/(6 kyu) CamelCase Method/(6 kyu) CamelCase Method.py
e1r0nd/codewars
dc98484281345e7675eb5e8a51c192e2fa77c443
[ "MIT" ]
49
2018-04-30T06:42:45.000Z
2021-07-22T16:39:02.000Z
(6 kyu) CamelCase Method/(6 kyu) CamelCase Method.py
novsunheng/codewars
c54b1d822356889b91587b088d02ca0bd3d8dc9e
[ "MIT" ]
1
2020-08-31T02:36:53.000Z
2020-08-31T10:14:00.000Z
(6 kyu) CamelCase Method/(6 kyu) CamelCase Method.py
novsunheng/codewars
c54b1d822356889b91587b088d02ca0bd3d8dc9e
[ "MIT" ]
25
2018-04-02T20:57:58.000Z
2021-05-28T15:24:51.000Z
def camel_case(string): # #1 # return "".join(c.capitalize() for c in string.split()) # #2 return string.title().replace(" ", "")
24.333333
60
0.568493
def camel_case(string): return string.title().replace(" ", "")
true
true
1c4007ea8923b4de35b22c4e30e314948e3d4ee2
1,604
py
Python
setup.py
frafra/django-dataporten
4236017611e08d08bd810be0beae1b994cb5fc67
[ "MIT" ]
null
null
null
setup.py
frafra/django-dataporten
4236017611e08d08bd810be0beae1b994cb5fc67
[ "MIT" ]
null
null
null
setup.py
frafra/django-dataporten
4236017611e08d08bd810be0beae1b994cb5fc67
[ "MIT" ]
null
null
null
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-dataporten', ...
30.846154
79
0.596633
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-dataporten', version='0.4.0', packages=find_pack...
true
true
1c40084536a1e2b5687248de68f5c8bf4fea9c84
1,863
py
Python
src/ripe_rainbow/domain/wrappers.py
ripe-tech/ripe-rainbow
12b430d15102ed6a731d239db00d32dae87384df
[ "Apache-2.0" ]
2
2019-06-11T09:19:48.000Z
2020-06-30T09:30:29.000Z
src/ripe_rainbow/domain/wrappers.py
ripe-tech/ripe-rainbow
12b430d15102ed6a731d239db00d32dae87384df
[ "Apache-2.0" ]
43
2019-06-06T10:06:46.000Z
2022-02-02T10:47:53.000Z
src/ripe_rainbow/domain/wrappers.py
ripe-tech/ripe-rainbow
12b430d15102ed6a731d239db00d32dae87384df
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from . import base from . import logic BASE_TUPLES = ( ("logic", base.LogicPart), ("interactions", base.InteractionsPart), ("waits", base.WaitsPart) ) COPPER_TUPLES = ( ("provision", logic.ProvisionPart), ("id", logic.RipeIdPart), ("cor...
23.582278
45
0.613527
from . import base from . import logic BASE_TUPLES = ( ("logic", base.LogicPart), ("interactions", base.InteractionsPart), ("waits", base.WaitsPart) ) COPPER_TUPLES = ( ("provision", logic.ProvisionPart), ("id", logic.RipeIdPart), ("core", logic.RipeCorePart), ("copper", l...
true
true
1c4008a484121853684512745f7098b9d8d08416
9,688
py
Python
Tests/test_missing.py
SueDou/python
cd620439f7e3d4aa98ba363314f11c5cf69cb1d9
[ "Apache-2.0" ]
null
null
null
Tests/test_missing.py
SueDou/python
cd620439f7e3d4aa98ba363314f11c5cf69cb1d9
[ "Apache-2.0" ]
null
null
null
Tests/test_missing.py
SueDou/python
cd620439f7e3d4aa98ba363314f11c5cf69cb1d9
[ "Apache-2.0" ]
null
null
null
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
37.992157
180
0.648225
ing), clr.GetClrType(System.String))), None) if trace: cg.ilg.Emit(OpCodes.Dup) cg.ilg.EmitCall(OpCodes.Call, clr.GetClrType(System.Console).GetMethod("WriteLine", MakeArray(System.Type, clr.GetClrType(System.String))), None) cg.ilg.Emit(OpCodes.Ret) def GenerateMethods(ag): global counter ...
false
true
1c4008ab833f298dcc181902761ac7cc7f6526eb
1,225
py
Python
0701-0750/0746-MinCostClimbingStairs/MinCostClimbingStairs.py
Sun-Zhen/leetcode
57fe0de95881255393e0d6817e75bfae8f5744dc
[ "Apache-2.0" ]
3
2018-04-12T05:13:52.000Z
2018-04-15T05:11:51.000Z
0701-0750/0746-MinCostClimbingStairs/MinCostClimbingStairs.py
Sun-Zhen/leetcode
57fe0de95881255393e0d6817e75bfae8f5744dc
[ "Apache-2.0" ]
null
null
null
0701-0750/0746-MinCostClimbingStairs/MinCostClimbingStairs.py
Sun-Zhen/leetcode
57fe0de95881255393e0d6817e75bfae8f5744dc
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """ @author: Alden @email: sunzhenhy@gmail.com @date: 2018/3/31 @version: 1.0.0.0 """ class Solution(object): def minCostClimbingStairs1(self, cost): """ :type cost: List[int] :rtype: int """ min_cost = [None for _ in range(len(cost) + 1)] min...
28.488372
87
0.51102
""" @author: Alden @email: sunzhenhy@gmail.com @date: 2018/3/31 @version: 1.0.0.0 """ class Solution(object): def minCostClimbingStairs1(self, cost): """ :type cost: List[int] :rtype: int """ min_cost = [None for _ in range(len(cost) + 1)] min_cost[0] = cost[0] ...
false
true
1c4008e1576b02de561702fde7cd6805892c7693
11,504
py
Python
depreciated/AlexNet-paddle/paddlevision/datasets/folder.py
dyning/AlexNet-Prod
54de9dfcf540997ff227bd92d0c7a73dc73c45aa
[ "Apache-2.0" ]
17
2021-08-11T13:42:03.000Z
2022-03-30T03:50:27.000Z
ResNet_paddle/paddlevision/datasets/folder.py
livingbody/resnet-livingbody
a8c04faf9cc6896f7c3aef06cddfe38ce74f00ee
[ "Apache-2.0" ]
11
2021-08-12T06:29:17.000Z
2021-12-23T03:15:39.000Z
ResNet_paddle/paddlevision/datasets/folder.py
livingbody/resnet-livingbody
a8c04faf9cc6896f7c3aef06cddfe38ce74f00ee
[ "Apache-2.0" ]
17
2021-08-11T14:12:38.000Z
2022-03-30T03:50:31.000Z
from .vision import VisionDataset from PIL import Image import os import os.path from typing import Any, Callable, cast, Dict, List, Optional, Tuple def has_file_allowed_extension(filename: str, extensions: Tuple[str, ...]) -> bool: """Checks if a file is an allowed extension. ...
37.109677
114
0.617872
from .vision import VisionDataset from PIL import Image import os import os.path from typing import Any, Callable, cast, Dict, List, Optional, Tuple def has_file_allowed_extension(filename: str, extensions: Tuple[str, ...]) -> bool: return filename.lower().endswith(extensions) d...
true
true
1c400915989d25d0d988890a991c541c55e39fcf
3,550
py
Python
terraform/components/extract-weather/scripts/tests/awsglue/transforms/drop_nulls.py
tubone24/rr-weather-data-with-aws
ce78cfe928c6d1b93e22d206bcbef0152f887685
[ "MIT" ]
null
null
null
terraform/components/extract-weather/scripts/tests/awsglue/transforms/drop_nulls.py
tubone24/rr-weather-data-with-aws
ce78cfe928c6d1b93e22d206bcbef0152f887685
[ "MIT" ]
null
null
null
terraform/components/extract-weather/scripts/tests/awsglue/transforms/drop_nulls.py
tubone24/rr-weather-data-with-aws
ce78cfe928c6d1b93e22d206bcbef0152f887685
[ "MIT" ]
null
null
null
# Copyright 2016-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with the License. A copy of the License is # located at # # http://aws.amazon.com/asl/ # # or in the "license" file accompanying ...
41.764706
122
0.611549
from awsglue.transforms import DropFields, GlueTransform from awsglue.gluetypes import ArrayType, NullType, StructType class DropNullFields(GlueTransform): def _find_null_fields(self, ctx, schema, path, output): if isinstance(schema, StructType): for field in schema: ...
false
true
1c400d658bd27193884881656fdae4b634a9be03
5,179
py
Python
rest_framework_tus/middleware.py
v01dXYZ/drf-tus
50146fdfcfa062421671e7dee283c7905e91da17
[ "MIT" ]
21
2017-03-09T14:38:15.000Z
2021-10-18T21:45:11.000Z
rest_framework_tus/middleware.py
v01dXYZ/drf-tus
50146fdfcfa062421671e7dee283c7905e91da17
[ "MIT" ]
10
2017-05-29T09:22:42.000Z
2020-07-08T10:03:35.000Z
rest_framework_tus/middleware.py
v01dXYZ/drf-tus
50146fdfcfa062421671e7dee283c7905e91da17
[ "MIT" ]
19
2017-06-15T13:03:17.000Z
2021-08-08T03:30:39.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.http.response import HttpResponse from rest_framework import status from . import tus_api_version, constants from .compat import decode_base64 class TusMiddleware(object): def __init__(self, get_response=None): self.get_respon...
32.987261
114
0.652056
from __future__ import unicode_literals from django.http.response import HttpResponse from rest_framework import status from . import tus_api_version, constants from .compat import decode_base64 class TusMiddleware(object): def __init__(self, get_response=None): self.get_response = get_response ...
true
true
1c400dc6b48aaf6da74ee2c03ebf3b078d01f76f
569
py
Python
8.cambiar valores de una lista.py
JSNavas/CursoPython2.7
d1f9170dbf897b6eb729f9696a208880e33c550b
[ "MIT" ]
null
null
null
8.cambiar valores de una lista.py
JSNavas/CursoPython2.7
d1f9170dbf897b6eb729f9696a208880e33c550b
[ "MIT" ]
null
null
null
8.cambiar valores de una lista.py
JSNavas/CursoPython2.7
d1f9170dbf897b6eb729f9696a208880e33c550b
[ "MIT" ]
null
null
null
# Cambiar valores de una lista lista = [1,2,3,4,5,6,7,8,9] # Para cambiar un solo valor de la lista se coloca el indice del valor que queramos cambiar lista [6] = 56 # Para cambiar 2 valores de una lista, es obligatorio meter esos nuevos valores en una lista. # sin olvidar que se especifica (desde que indice va a ...
28.45
99
0.720562
lista = [1,2,3,4,5,6,7,8,9] lista [6] = 56 lista[0:2] = [24,65] lista [7:9] = [100] print lista
false
true
1c400ded776e891dffc01de25e92db74f075460f
3,957
py
Python
CIM14/IEC61970/Core/Substation.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
58
2015-04-22T10:41:03.000Z
2022-03-29T16:04:34.000Z
CIM14/IEC61970/Core/Substation.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
12
2015-08-26T03:57:23.000Z
2020-12-11T20:14:42.000Z
CIM14/IEC61970/Core/Substation.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
35
2015-01-10T12:21:03.000Z
2020-09-09T08:18:16.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
35.017699
195
0.669194
from CIM14.IEC61970.Core.EquipmentContainer import EquipmentContainer class Substation(EquipmentContainer): def __init__(self, VoltageLevels=None, Bays=None, Region=None, *args, **kw_args): self._VoltageLevels = [] self.VoltageLevels = [] if VoltageLevels is None else VoltageLe...
true
true
1c400e32a35995c7e40f35eeb37445d32d6544e3
5,201
py
Python
chaospy/quadrature/gauss_legendre.py
krystophny/chaospy
e09f8e3f6dfc26145f15774edd5b03665140712f
[ "MIT" ]
1
2019-12-20T00:32:44.000Z
2019-12-20T00:32:44.000Z
chaospy/quadrature/gauss_legendre.py
QianWanghhu/chaospy
18ff6c4fc56c632825e53fb24e17de51a7febd7d
[ "MIT" ]
null
null
null
chaospy/quadrature/gauss_legendre.py
QianWanghhu/chaospy
18ff6c4fc56c632825e53fb24e17de51a7febd7d
[ "MIT" ]
null
null
null
r""" The Gauss-Legendre quadrature rule is properly supported by in :ref:`gaussian`. However, as Gauss-Legendre is a special case where the weight function is constant, it can in principle be used to integrate any weighting function. In other words, this is the same Gauss-Legendre integration rule, but only in the cont...
36.626761
79
0.63757
from __future__ import print_function import numpy from .recurrence import ( construct_recurrence_coefficients, coefficients_to_quadrature) from .combine import combine_quadrature def quad_gauss_legendre( order, domain=(0, 1), rule="fejer", accuracy=100, recurrence_algori...
true
true
1c400e6dc56b89f7054a5122914fe338bc57dd00
12,317
py
Python
management/test/test_endpoints/test_endpoint_utils.py
poussa/inference-model-manager
33e487be32b8487290a296daaf90529263a09801
[ "Apache-2.0" ]
null
null
null
management/test/test_endpoints/test_endpoint_utils.py
poussa/inference-model-manager
33e487be32b8487290a296daaf90529263a09801
[ "Apache-2.0" ]
null
null
null
management/test/test_endpoints/test_endpoint_utils.py
poussa/inference-model-manager
33e487be32b8487290a296daaf90529263a09801
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
51.320833
100
0.731022
from management_api.endpoints.endpoint_utils import create_endpoint, delete_endpoint, \ create_url_to_service, update_endpoint, scale_endpoint, list_endpoints, view_endpoint from kubernetes.client.rest import ApiException import pytest from unittest.mock import Mock from test_utils.token_stu...
true
true
1c400f0eed5bedcf15ac83b8b0358c7c54ae6b43
21
py
Python
salad/__init__.py
Work4Labs/salad
176869a4437103d501feb3035beaf162c2507435
[ "BSD-3-Clause" ]
null
null
null
salad/__init__.py
Work4Labs/salad
176869a4437103d501feb3035beaf162c2507435
[ "BSD-3-Clause" ]
null
null
null
salad/__init__.py
Work4Labs/salad
176869a4437103d501feb3035beaf162c2507435
[ "BSD-3-Clause" ]
null
null
null
VERSION = "0.4.14.2"
10.5
20
0.571429
VERSION = "0.4.14.2"
true
true
1c400fafd6f6f7bdff3f1627fb61ae1acfd933ac
3,354
py
Python
python/dgl/nn/mxnet/conv/ginconv.py
zhengdao-chen/dgl
39503d879e6427d3c9677b3b1fa6df33c60e2f21
[ "Apache-2.0" ]
2
2021-12-09T12:36:13.000Z
2022-03-01T21:22:36.000Z
python/dgl/nn/mxnet/conv/ginconv.py
zhengdao-chen/dgl
39503d879e6427d3c9677b3b1fa6df33c60e2f21
[ "Apache-2.0" ]
null
null
null
python/dgl/nn/mxnet/conv/ginconv.py
zhengdao-chen/dgl
39503d879e6427d3c9677b3b1fa6df33c60e2f21
[ "Apache-2.0" ]
2
2020-12-07T09:34:01.000Z
2020-12-13T06:18:58.000Z
"""MXNet Module for Graph Isomorphism Network layer""" # pylint: disable= no-member, arguments-differ, invalid-name import mxnet as mx from mxnet.gluon import nn from .... import function as fn from ....utils import expand_as_pair class GINConv(nn.Block): r"""Graph Isomorphism Network layer from paper `How Power...
39.458824
91
0.560525
import mxnet as mx from mxnet.gluon import nn from .... import function as fn from ....utils import expand_as_pair class GINConv(nn.Block): def __init__(self, apply_func, aggregator_type, init_eps=0, learn_eps=False): super(GINConv, sel...
true
true
1c400fb076e4857384f6b36220fa468373d8ff69
399
py
Python
backend/yalla_33420/wsgi.py
crowdbotics-apps/yalla-33420
5a0c521f76a50f01012c4fb838cebb45779a939e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/yalla_33420/wsgi.py
crowdbotics-apps/yalla-33420
5a0c521f76a50f01012c4fb838cebb45779a939e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/yalla_33420/wsgi.py
crowdbotics-apps/yalla-33420
5a0c521f76a50f01012c4fb838cebb45779a939e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" WSGI config for yalla_33420 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_S...
23.470588
78
0.789474
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'yalla_33420.settings') application = get_wsgi_application()
true
true
1c400fd841135e23efbd58b8d45e46398faadef3
9,093
py
Python
tests/inventory/pipelines/test_data/fake_backend_services.py
pombredanne/forseti-security
68a9a88243460065e00b6c131b3d9abd0331fb37
[ "Apache-2.0" ]
1
2018-03-26T08:15:21.000Z
2018-03-26T08:15:21.000Z
tests/inventory/pipelines/test_data/fake_backend_services.py
pombredanne/forseti-security
68a9a88243460065e00b6c131b3d9abd0331fb37
[ "Apache-2.0" ]
null
null
null
tests/inventory/pipelines/test_data/fake_backend_services.py
pombredanne/forseti-security
68a9a88243460065e00b6c131b3d9abd0331fb37
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 The Forseti Security 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 # #...
45.238806
938
0.599692
FAKE_API_RESPONSE1 = [ { "kind": "compute#backendService", "id": "3072061062494750400", "creationTimestamp": "2017-04-03T14:01:35.687-07:00", "name": "bs-1", "description": "bs-1-desc", "selfLink": "https://www.googleapis.com/compute/v1/projects/projec...
true
true
1c40117a7c4ffc2d0fd1610c995de60fbfac1c4d
13,101
py
Python
main.py
boazjohn/pyspark-job-server
bda2fa454b7875494869be81c9d75802df194feb
[ "BSD-3-Clause" ]
null
null
null
main.py
boazjohn/pyspark-job-server
bda2fa454b7875494869be81c9d75802df194feb
[ "BSD-3-Clause" ]
null
null
null
main.py
boazjohn/pyspark-job-server
bda2fa454b7875494869be81c9d75802df194feb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # Standard Library import argparse import json import time import os import sys import logging import socket import traceback import uuid from collections import defaultdict from threading import Thread, Lock # Third Party import mixingboard import pip from chassis.models import JobHistory from fla...
24.906844
122
0.635982
import argparse import json import time import os import sys import logging import socket import traceback import uuid from collections import defaultdict from threading import Thread, Lock import mixingboard import pip from chassis.models import JobHistory from flask import Flask, jsonify, request from werkzeug....
true
true
1c401185d4bbc2222ab46aa3754106b8d3e7fabd
3,759
py
Python
src/main/python/counts_tools/exec/deviation_clustering.py
cday97/beam
7e1ab50eecaefafd04daab360f8b12bc7cab559b
[ "BSD-3-Clause-LBNL" ]
123
2017-04-06T20:17:19.000Z
2022-03-02T13:42:15.000Z
src/main/python/counts_tools/exec/deviation_clustering.py
cday97/beam
7e1ab50eecaefafd04daab360f8b12bc7cab559b
[ "BSD-3-Clause-LBNL" ]
2,676
2017-04-26T20:27:27.000Z
2022-03-31T16:39:53.000Z
src/main/python/counts_tools/exec/deviation_clustering.py
cday97/beam
7e1ab50eecaefafd04daab360f8b12bc7cab559b
[ "BSD-3-Clause-LBNL" ]
60
2017-04-06T20:14:32.000Z
2022-03-30T20:10:53.000Z
import ConfigParser import os import sys import matplotlib from matplotlib.colors import LogNorm from matplotlib.colors import SymLogNorm import numpy as np import pandas as pd import pylab import scipy import scipy.cluster.hierarchy as sch __author__ = 'Andrew A Campbell' # Plots hierarchical clustering of count sta...
37.59
137
0.65975
import ConfigParser import os import sys import matplotlib from matplotlib.colors import LogNorm from matplotlib.colors import SymLogNorm import numpy as np import pandas as pd import pylab import scipy import scipy.cluster.hierarchy as sch __author__ = 'Andrew A Campbell' if __name__ == '__main__': if len(sys....
false
true
1c40131505a9c1c3ada0e0182de0005470fab0cb
366
py
Python
catch/datasets/jugra.py
broadinstitute/catch
2fedca15f921116f580de8b2ae7ac9972932e59e
[ "MIT" ]
58
2018-01-24T16:31:37.000Z
2022-02-25T07:46:35.000Z
catch/datasets/jugra.py
broadinstitute/catch
2fedca15f921116f580de8b2ae7ac9972932e59e
[ "MIT" ]
29
2018-04-17T17:36:06.000Z
2022-02-25T11:48:58.000Z
catch/datasets/jugra.py
broadinstitute/catch
2fedca15f921116f580de8b2ae7ac9972932e59e
[ "MIT" ]
16
2018-05-23T12:19:41.000Z
2021-08-09T04:16:00.000Z
"""Dataset with 'Jugra virus' sequences. A dataset with 1 'Jugra virus' genomes. THIS PYTHON FILE WAS GENERATED BY A COMPUTER PROGRAM! DO NOT EDIT! """ import sys from catch.datasets import GenomesDatasetSingleChrom ds = GenomesDatasetSingleChrom(__name__, __file__, __spec__) ds.add_fasta_path("data/jugra.fasta.g...
22.875
66
0.778689
import sys from catch.datasets import GenomesDatasetSingleChrom ds = GenomesDatasetSingleChrom(__name__, __file__, __spec__) ds.add_fasta_path("data/jugra.fasta.gz", relative=True) sys.modules[__name__] = ds
true
true
1c40161c7ff249c0a4e40c65d2c621db8b13c028
64,078
py
Python
django/db/migrations/autodetector.py
terceiro/django
5931d2e96ae94b204d146b7f751e0e804da74953
[ "PSF-2.0", "BSD-3-Clause" ]
2
2019-09-29T20:42:14.000Z
2019-09-29T20:42:18.000Z
django/db/migrations/autodetector.py
terceiro/django
5931d2e96ae94b204d146b7f751e0e804da74953
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/db/migrations/autodetector.py
terceiro/django
5931d2e96ae94b204d146b7f751e0e804da74953
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-10-26T09:40:10.000Z
2020-10-26T09:40:10.000Z
import functools import re from itertools import chain from django.conf import settings from django.db import models from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.migrations.operations.models import AlterModelOptions from django.db.migrations.optimizer ...
48.397281
118
0.578545
import functools import re from itertools import chain from django.conf import settings from django.db import models from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.migrations.operations.models import AlterModelOptions from django.db.migrations.optimizer ...
true
true
1c40166384101a304b9d9f488d064e203b8ca472
10,242
py
Python
venv/Lib/site-packages/prawcore/sessions.py
GuilhermeJC13/storIA
eeecbe9030426f70c6aa73ca0ce8382860c8495c
[ "MIT" ]
4
2021-07-27T23:39:02.000Z
2021-09-23T04:17:08.000Z
venv/Lib/site-packages/prawcore/sessions.py
GuilhermeJC13/storIA
eeecbe9030426f70c6aa73ca0ce8382860c8495c
[ "MIT" ]
12
2021-04-11T19:46:06.000Z
2021-06-18T16:08:37.000Z
venv/Lib/site-packages/prawcore/sessions.py
GuilhermeJC13/storIA
eeecbe9030426f70c6aa73ca0ce8382860c8495c
[ "MIT" ]
3
2021-07-27T17:33:58.000Z
2021-07-29T12:46:59.000Z
"""prawcore.sessions: Provides prawcore.Session and prawcore.session.""" import logging import random import time from copy import deepcopy from urllib.parse import urljoin from requests.exceptions import ( ChunkedEncodingError, ConnectionError, ReadTimeout, ) from requests.status_codes import codes from ...
29.601156
94
0.58514
import logging import random import time from copy import deepcopy from urllib.parse import urljoin from requests.exceptions import ( ChunkedEncodingError, ConnectionError, ReadTimeout, ) from requests.status_codes import codes from .auth import BaseAuthorizer from .const import TIMEOUT from .exceptions i...
true
true
1c40171d2ddf0f16141403f2b22f08acf9f1f5a1
14,283
py
Python
behave/runner_util.py
DisruptiveLabs/behave
04ef02550bdf90fad4e073fe39d1730ee2152d31
[ "BSD-2-Clause" ]
null
null
null
behave/runner_util.py
DisruptiveLabs/behave
04ef02550bdf90fad4e073fe39d1730ee2152d31
[ "BSD-2-Clause" ]
null
null
null
behave/runner_util.py
DisruptiveLabs/behave
04ef02550bdf90fad4e073fe39d1730ee2152d31
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Contains utility functions and classes for Runners. """ from behave import parser from behave.model import FileLocation from bisect import bisect from six import string_types import glob import os.path import re import sys # ----------------------------------------------------------------...
35.796992
80
0.595743
from behave import parser from behave.model import FileLocation from bisect import bisect from six import string_types import glob import os.path import re import sys class FileNotFoundError(LookupError): pass class InvalidFileLocationError(LookupError): pass class InvalidFilenameError(ValueError): ...
true
true
1c40177e30c7a93d9b6a4a223742ba6d3c4047f6
18,865
py
Python
venv/lib/python3.6/site-packages/twilio/rest/messaging/v1/session/participant.py
fernandoleira/stocktext
f755f83ffdaee3b179e21de955854354aced9134
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/twilio/rest/messaging/v1/session/participant.py
fernandoleira/stocktext
f755f83ffdaee3b179e21de955854354aced9134
[ "MIT" ]
11
2019-12-26T17:21:03.000Z
2022-03-21T22:17:07.000Z
venv/Lib/python3.6/site-packages/twilio/rest/messaging/v1/session/participant.py
chinmaya-dev/ttbdonation
1ea4cb2c279db86465040b68f1fa48dbb5f7e17c
[ "MIT" ]
null
null
null
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import ...
35.796964
118
0.638219
from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page import Page class Particip...
true
true
1c4017ff39b79daa31f30c496461589a2d01b756
7,938
py
Python
examples/source_separation/utils/metrics.py
popcornell/audio
7b6b2d000023e2aa3365b769866c5f375e0d5fda
[ "BSD-2-Clause" ]
1,718
2017-05-05T01:15:00.000Z
2022-03-31T10:33:51.000Z
examples/source_separation/utils/metrics.py
popcornell/audio
7b6b2d000023e2aa3365b769866c5f375e0d5fda
[ "BSD-2-Clause" ]
1,590
2017-05-07T18:38:39.000Z
2022-03-31T22:22:10.000Z
examples/source_separation/utils/metrics.py
popcornell/audio
7b6b2d000023e2aa3365b769866c5f375e0d5fda
[ "BSD-2-Clause" ]
464
2017-05-05T04:42:43.000Z
2022-03-29T20:32:00.000Z
import math from itertools import permutations from typing import Optional import torch def sdr( estimate: torch.Tensor, reference: torch.Tensor, mask: Optional[torch.Tensor] = None, epsilon: float = 1e-8 ) -> torch.Tensor: """Computes source-to-distortion ratio. 1. scale the reference signal with power...
40.090909
116
0.660998
import math from itertools import permutations from typing import Optional import torch def sdr( estimate: torch.Tensor, reference: torch.Tensor, mask: Optional[torch.Tensor] = None, epsilon: float = 1e-8 ) -> torch.Tensor: reference_pow = reference.pow(2).mean(axis=2, keepdim=True) mix_pow = (estimate *...
true
true
1c401881165075b2fee60265029483b41229a85b
6,234
py
Python
code.py
Venkat-77/Dr-VVR-Greyatom_olympic-hero
695f93628fa1c69022cf55b7fe9b4bd1b86dfd28
[ "MIT" ]
null
null
null
code.py
Venkat-77/Dr-VVR-Greyatom_olympic-hero
695f93628fa1c69022cf55b7fe9b4bd1b86dfd28
[ "MIT" ]
null
null
null
code.py
Venkat-77/Dr-VVR-Greyatom_olympic-hero
695f93628fa1c69022cf55b7fe9b4bd1b86dfd28
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file path data = pd.read_csv(path) data = pd.DataFrame(data) data.rename(columns = {'Total':'Total_Medals'}, inplace = True) data.head(10) #Code starts here # -------------- #C...
29.40566
105
0.703722
import pandas as pd import numpy as np import matplotlib.pyplot as plt path data = pd.read_csv(path) data = pd.DataFrame(data) data.rename(columns = {'Total':'Total_Medals'}, inplace = True) data.head(10) import pandas as pd import numpy as np import matplotlib.pyplot as plt path data = pd.re...
true
true
1c4018ebeed7341777b2f8ab65eb0279eba32088
1,005
py
Python
official/modeling/hyperparams/__init__.py
davidnugent2425/models
4b266855705212c21af762df72783d816596a790
[ "Apache-2.0" ]
1
2021-05-06T16:04:17.000Z
2021-05-06T16:04:17.000Z
official/modeling/hyperparams/__init__.py
parthsaxena1909/models
440e7851f50cc7a7bcc8f4d7a4d6ae3861f60ade
[ "Apache-2.0" ]
null
null
null
official/modeling/hyperparams/__init__.py
parthsaxena1909/models
440e7851f50cc7a7bcc8f4d7a4d6ae3861f60ade
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2020 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 ...
47.857143
110
0.727363
from official.modeling.hyperparams.base_config import * from official.modeling.hyperparams.config_definitions import CallbacksConfig, RuntimeConfig, TensorboardConfig from official.modeling.hyperparams.params_dict import *
true
true
1c4019063e9304e210ed555cf2e82f2ec4f42c1b
8,620
py
Python
ytopt/search/async_search.py
Kerilk/ytopt
05cc166d76dbf2a9ec77f3c9ed435ea3ebcb104c
[ "BSD-2-Clause" ]
null
null
null
ytopt/search/async_search.py
Kerilk/ytopt
05cc166d76dbf2a9ec77f3c9ed435ea3ebcb104c
[ "BSD-2-Clause" ]
null
null
null
ytopt/search/async_search.py
Kerilk/ytopt
05cc166d76dbf2a9ec77f3c9ed435ea3ebcb104c
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function #from NeuralNetworksDropoutRegressor import NeuralNetworksDropoutRegressor from mpi4py import MPI import re import os import sys import time import json import math from skopt import Optimizer import os import argparse from skopt.acquisition import gaussian_e...
46.847826
148
0.520302
from __future__ import print_function from mpi4py import MPI import re import os import sys import time import json import math from skopt import Optimizer import os import argparse from skopt.acquisition import gaussian_ei, gaussian_pi, gaussian_lcb import numpy as np from ytopt.search.NeuralNetworksDropoutRegresso...
true
true
1c40190902964cf6e1c37651233e06b92a761122
1,379
py
Python
src/entities/challenge.py
koddas/python-oop-consistency-lab
8ee3124aa230359d296fdfbe0c23773602769c8c
[ "MIT" ]
null
null
null
src/entities/challenge.py
koddas/python-oop-consistency-lab
8ee3124aa230359d296fdfbe0c23773602769c8c
[ "MIT" ]
null
null
null
src/entities/challenge.py
koddas/python-oop-consistency-lab
8ee3124aa230359d296fdfbe0c23773602769c8c
[ "MIT" ]
null
null
null
from entities.token import Token class Challenge: ''' Challenge represents a challenge for the participants to solve. ''' # Please don't fiddle with these variables! #__question: str = "" #__response: int = 0 #__token: Token = None #__counter: int = 0 def __init__(self, t...
25.072727
68
0.546048
from entities.token import Token class Challenge: #__question: str = "" #__response: int = 0 #__token: Token = None #__counter: int = 0 def __init__(self, token: Token): self.__question = "" self.__response = 0 self.__token = token self.__counter = 0 ...
true
true
1c401a62963e50ff04a74be5b15427dba187edf6
20,060
py
Python
nova/virt/vmwareapi/images.py
belmiromoreira/nova
d03ef34b0b1ed96a2f2bea1f5f01f09436c55125
[ "Apache-2.0" ]
null
null
null
nova/virt/vmwareapi/images.py
belmiromoreira/nova
d03ef34b0b1ed96a2f2bea1f5f01f09436c55125
[ "Apache-2.0" ]
1
2019-01-02T01:30:35.000Z
2019-01-02T01:38:02.000Z
nova/virt/vmwareapi/images.py
jeffrey4l/nova
35375133398d862a61334783c1e7a90b95f34cdb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # 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://w...
39.960159
79
0.625174
import os import tarfile import tempfile from lxml import etree from oslo_config import cfg from oslo_log import log as logging from oslo_utils import strutils from oslo_utils import units from oslo_vmware import rw_handles import six from nova import exception from nova.i18n import _, _LE, _LI from n...
true
true
1c401b0419c86d9f826bfaacb0a8386932017d6d
6,167
py
Python
webapp/survey_molecular_similarity/retrieve_user_data.py
enricogandini/paper_similarity_prediction
ef7762edc8c55ccfcb5c791685eac8ef93f0d554
[ "MIT" ]
null
null
null
webapp/survey_molecular_similarity/retrieve_user_data.py
enricogandini/paper_similarity_prediction
ef7762edc8c55ccfcb5c791685eac8ef93f0d554
[ "MIT" ]
null
null
null
webapp/survey_molecular_similarity/retrieve_user_data.py
enricogandini/paper_similarity_prediction
ef7762edc8c55ccfcb5c791685eac8ef93f0d554
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Created on Fri Mar 26 16:35:26 2021 # Copyright © Enrico Gandini <enricogandini93@gmail.com> # # Distributed under terms of the MIT License. """Retrieve data from database, and save it as CSV files that can be further analyzed. Files will be saved in a separate direc...
33.335135
91
0.60921
import argparse import datetime from os import environ from pathlib import Path import subprocess import pandas as pd from sqlalchemy import func, case, cast, Integer from database_utils import MolecularPair, User, Answer from database_utils import create_db_engine_and_session parser = argparse.ArgumentPar...
true
true
1c401cab3fd9f8fe9bd8a9d3bfb697d74c325a68
310
py
Python
other/dingding/dingtalk/api/rest/OapiEduPeriodGetRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
other/dingding/dingtalk/api/rest/OapiEduPeriodGetRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
other/dingding/dingtalk/api/rest/OapiEduPeriodGetRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
''' Created by auto_sdk on 2019.07.09 ''' from dingtalk.api.base import RestApi class OapiEduPeriodGetRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.period_id = None def getHttpMethod(self): return 'POST' def getapiname(self): return 'dingtalk.oapi.edu.period.get'
20.666667
39
0.748387
from dingtalk.api.base import RestApi class OapiEduPeriodGetRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.period_id = None def getHttpMethod(self): return 'POST' def getapiname(self): return 'dingtalk.oapi.edu.period.get'
true
true
1c401cb24281af4a5f86e6e43da587c11b8cb10d
11,564
py
Python
rplugin/python3/deoplete/sources/deoplete_go.py
khogeland/deoplete-go
71f8363b179bc24c2d85185ee72362051d1041e1
[ "MIT" ]
null
null
null
rplugin/python3/deoplete/sources/deoplete_go.py
khogeland/deoplete-go
71f8363b179bc24c2d85185ee72362051d1041e1
[ "MIT" ]
null
null
null
rplugin/python3/deoplete/sources/deoplete_go.py
khogeland/deoplete-go
71f8363b179bc24c2d85185ee72362051d1041e1
[ "MIT" ]
null
null
null
import os import re import platform import subprocess from collections import OrderedDict from .base import Base from deoplete.util import charpos2bytepos, expand, getlines, load_external_module load_external_module(__file__, 'sources/deoplete_go') from cgo import cgo from stdlib import stdlib try: load_externa...
35.472393
81
0.52992
import os import re import platform import subprocess from collections import OrderedDict from .base import Base from deoplete.util import charpos2bytepos, expand, getlines, load_external_module load_external_module(__file__, 'sources/deoplete_go') from cgo import cgo from stdlib import stdlib try: load_externa...
true
true
1c401dd16d84eb14e77c53697579fd3180578310
31
py
Python
army_ant/server/__init__.py
feup-infolab/army-ant
7b33120d5160f73d7a41a05e6336489c917fb75c
[ "BSD-3-Clause" ]
5
2018-01-18T14:11:52.000Z
2020-10-23T16:02:25.000Z
army_ant/server/__init__.py
feup-infolab/army-ant
7b33120d5160f73d7a41a05e6336489c917fb75c
[ "BSD-3-Clause" ]
10
2018-02-02T20:19:36.000Z
2020-10-05T08:46:36.000Z
army_ant/server/__init__.py
feup-infolab/army-ant
7b33120d5160f73d7a41a05e6336489c917fb75c
[ "BSD-3-Clause" ]
null
null
null
from .server import * # noqa
15.5
30
0.645161
from .server import *
true
true
1c401ebfa08df6fdf5e1fa623582ec6382f5c9e9
2,738
py
Python
pysnmp-with-texts/ADTX-SMI-S2.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/ADTX-SMI-S2.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/ADTX-SMI-S2.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ADTX-SMI-S2 (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADTX-SMI-S2 # Produced by pysmi-0.3.4 at Wed May 1 11:15:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 0...
94.413793
505
0.762966
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuild...
true
true
1c401f08edba009994f2bcd60453c7d9b0eae9e9
3,850
py
Python
validation/test_cluster_install.py
afcollins/openshift-toolkit
16bf5b054fd5bdfb5018c1f4e06b80470fde716f
[ "Apache-2.0" ]
227
2017-05-20T05:33:32.000Z
2022-01-17T01:42:36.000Z
validation/test_cluster_install.py
afcollins/openshift-toolkit
16bf5b054fd5bdfb5018c1f4e06b80470fde716f
[ "Apache-2.0" ]
88
2017-04-10T20:43:12.000Z
2020-07-17T12:15:39.000Z
validation/test_cluster_install.py
afcollins/openshift-toolkit
16bf5b054fd5bdfb5018c1f4e06b80470fde716f
[ "Apache-2.0" ]
163
2017-04-07T17:10:11.000Z
2021-07-06T17:20:54.000Z
from .lib import k8sHelper import pytest # Instantiate k8s_helper class from k8s_helper library. k8s_client = k8sHelper.k8sHelper() # Master Test Section # @pytest.mark.master def test_master_controllers(master_node_count): assert k8s_client.get_running_pods_by_label( 'kube-system', 'openshift.io/compone...
38.118812
118
0.750909
from .lib import k8sHelper import pytest k8s_client = k8sHelper.k8sHelper() @pytest.mark.master def test_master_controllers(master_node_count): assert k8s_client.get_running_pods_by_label( 'kube-system', 'openshift.io/component=controllers') == int(master_node_count), \ "Should have {} master co...
true
true
1c401fc39fc8f8e717d1bc2feb82071a4adfba43
13,328
py
Python
airflow/providers/google/cloud/operators/bigquery_dts.py
ncolomer/airflow
cb7c67dea9cd9b9c5de10e355b63039446003149
[ "Apache-2.0" ]
2
2021-07-30T17:25:56.000Z
2021-08-03T13:51:09.000Z
airflow/providers/google/cloud/operators/bigquery_dts.py
ncolomer/airflow
cb7c67dea9cd9b9c5de10e355b63039446003149
[ "Apache-2.0" ]
null
null
null
airflow/providers/google/cloud/operators/bigquery_dts.py
ncolomer/airflow
cb7c67dea9cd9b9c5de10e355b63039446003149
[ "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...
44.27907
108
0.698454
from typing import Optional, Sequence, Tuple, Union from google.api_core.retry import Retry from google.protobuf.json_format import MessageToDict from airflow.models import BaseOperator from airflow.providers.google.cloud.hooks.bigquery_dts import BiqQueryDataTransferServiceHook, get_object_id from a...
true
true
1c40202510961b7ae320ca6faf2d5bab4a73c076
20,855
py
Python
src/residual_anomaly_detector/exps/StarAiFlow.py
eliavw/residual-anomaly-detector
8840a56aa226120456d0af8e6cca927a7e0e712b
[ "MIT" ]
null
null
null
src/residual_anomaly_detector/exps/StarAiFlow.py
eliavw/residual-anomaly-detector
8840a56aa226120456d0af8e6cca927a7e0e712b
[ "MIT" ]
null
null
null
src/residual_anomaly_detector/exps/StarAiFlow.py
eliavw/residual-anomaly-detector
8840a56aa226120456d0af8e6cca927a7e0e712b
[ "MIT" ]
null
null
null
import time import warnings from pathlib import Path import mercs import numpy as np from mercs import Mercs import pandas as pd from mercs.utils.encoding import code_to_query, query_to_code from sklearn.metrics import ( accuracy_score, average_precision_score, f1_score, roc_auc_score, ) from affe.f...
27.659151
87
0.569456
import time import warnings from pathlib import Path import mercs import numpy as np from mercs import Mercs import pandas as pd from mercs.utils.encoding import code_to_query, query_to_code from sklearn.metrics import ( accuracy_score, average_precision_score, f1_score, roc_auc_score, ) from affe.f...
true
true
1c4020f22073f142cf5c3deab3c63e1457cb284f
440
py
Python
payments/forms.py
ugohuche/ugohshopping
331ecdbbc8a6aae9d16d49fc4fc94cc285edc39f
[ "MIT" ]
1
2020-09-09T16:29:26.000Z
2020-09-09T16:29:26.000Z
payments/forms.py
ugohuche/ugohshopping
331ecdbbc8a6aae9d16d49fc4fc94cc285edc39f
[ "MIT" ]
9
2021-03-30T14:17:30.000Z
2022-03-12T00:44:55.000Z
payments/forms.py
ugohuche/ugohshopping
331ecdbbc8a6aae9d16d49fc4fc94cc285edc39f
[ "MIT" ]
null
null
null
from django import forms class CouponForm(forms.Form): code = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'Promo code', 'aria-label': 'Recipient\'s username', 'aria-describedby': 'basic-addon2' })) class RefundForm(forms.Form): reference_code = form...
24.444444
57
0.679545
from django import forms class CouponForm(forms.Form): code = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'Promo code', 'aria-label': 'Recipient\'s username', 'aria-describedby': 'basic-addon2' })) class RefundForm(forms.Form): reference_code = form...
true
true
1c40214352ed30453b417f615dbf2c359872fb8a
23,907
py
Python
cinder/volume/drivers/windows/smbfs.py
liangintel/stx-cinder
f4c43797a3f8c0caebfd8fb67244c084d26d9741
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/windows/smbfs.py
liangintel/stx-cinder
f4c43797a3f8c0caebfd8fb67244c084d26d9741
[ "Apache-2.0" ]
2
2018-10-25T13:04:01.000Z
2019-08-17T13:15:24.000Z
cinder/volume/drivers/windows/smbfs.py
liangintel/stx-cinder
f4c43797a3f8c0caebfd8fb67244c084d26d9741
[ "Apache-2.0" ]
2
2018-10-17T13:32:50.000Z
2018-11-08T08:39:39.000Z
# Copyright (c) 2014 Cloudbase Solutions SRL # 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 # # Unle...
41.006861
79
0.633538
import os import sys from os_brick.remotefs import windows_remotefs as remotefs_brick from os_win import utilsfactory from oslo_config import cfg from oslo_log import log as logging from oslo_utils import fileutils from oslo_utils import units from cinder import context from cinder import coordination ...
true
true
1c402220bf1776fdb1e333358163fcdcc1643862
6,550
py
Python
setup.py
basnijholt/ipyparaview
6550093d6d5df4c04d1b50e57d9c3a773789ec21
[ "Apache-2.0" ]
null
null
null
setup.py
basnijholt/ipyparaview
6550093d6d5df4c04d1b50e57d9c3a773789ec21
[ "Apache-2.0" ]
null
null
null
setup.py
basnijholt/ipyparaview
6550093d6d5df4c04d1b50e57d9c3a773789ec21
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os import platform import sys from subprocess import check_call from setuptools import Command, find_packages, setup from setuptools.command.build_py import build_py from setuptools.command.egg_info import egg_info from setuptools.command.sdist import sdist here = os.path...
31.042654
117
0.575725
from __future__ import print_function import os import platform import sys from subprocess import check_call from setuptools import Command, find_packages, setup from setuptools.command.build_py import build_py from setuptools.command.egg_info import egg_info from setuptools.command.sdist import sdist here = os.path...
true
true
1c4022651ca89b6ae53bd0f71df3a270235c0479
7,515
py
Python
terroroftinytown/tracker/app.py
Flashfire42/terroroftinytown
c52be7ac0f7abc37f4c90955e5c96b91f935903a
[ "MIT" ]
null
null
null
terroroftinytown/tracker/app.py
Flashfire42/terroroftinytown
c52be7ac0f7abc37f4c90955e5c96b91f935903a
[ "MIT" ]
null
null
null
terroroftinytown/tracker/app.py
Flashfire42/terroroftinytown
c52be7ac0f7abc37f4c90955e5c96b91f935903a
[ "MIT" ]
null
null
null
# encoding=utf-8 import functools import os.path from tornado.web import URLSpec as U import tornado.web from terroroftinytown.client.alphabet import str_to_int, int_to_str from terroroftinytown.services.registry import registry from terroroftinytown.tracker import account, admin, project, api from terroroftinytown.t...
37.575
100
0.623021
import functools import os.path from tornado.web import URLSpec as U import tornado.web from terroroftinytown.client.alphabet import str_to_int, int_to_str from terroroftinytown.services.registry import registry from terroroftinytown.tracker import account, admin, project, api from terroroftinytown.tracker import mo...
true
true
1c40251801215384e7fc1e986dec8972ef669060
4,347
py
Python
tests/scripts/thread-cert/Cert_9_2_14_PanIdQuery.py
yuzhyang/openthread
38f206c6708d8fc7eae21db6ff3e3a50a2053b58
[ "BSD-3-Clause" ]
1
2018-09-25T15:27:26.000Z
2018-09-25T15:27:26.000Z
tests/scripts/thread-cert/Cert_9_2_14_PanIdQuery.py
yuzhyang/openthread
38f206c6708d8fc7eae21db6ff3e3a50a2053b58
[ "BSD-3-Clause" ]
null
null
null
tests/scripts/thread-cert/Cert_9_2_14_PanIdQuery.py
yuzhyang/openthread
38f206c6708d8fc7eae21db6ff3e3a50a2053b58
[ "BSD-3-Clause" ]
1
2019-08-03T17:35:08.000Z
2019-08-03T17:35:08.000Z
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
39.162162
98
0.701173
import time import unittest import config import node COMMISSIONER = 1 LEADER1 = 2 ROUTER1 = 3 LEADER2 = 4 class Cert_9_2_14_PanIdQuery(unittest.TestCase): def setUp(self): self.simulator = config.create_default_simulator() self.nodes = {} for i in range(1,5)...
true
true
1c4027d3d9397504f77f1fd2e9f27861c20ffbc9
14,780
py
Python
tensorflow_data_validation/statistics/generators/image_stats_generator_test.py
brills/data-validation
4f8a5d12b3d5db7383ae53d5fe184af1d781449a
[ "Apache-2.0" ]
null
null
null
tensorflow_data_validation/statistics/generators/image_stats_generator_test.py
brills/data-validation
4f8a5d12b3d5db7383ae53d5fe184af1d781449a
[ "Apache-2.0" ]
null
null
null
tensorflow_data_validation/statistics/generators/image_stats_generator_test.py
brills/data-validation
4f8a5d12b3d5db7383ae53d5fe184af1d781449a
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.438914
82
0.542355
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os import pickle from absl.testing import absltest from absl.testing import parameterized import numpy as np import pyarrow as pa import tensorflow as tf from tensorflow_data_va...
true
true
1c4028347673966a10a131e5c8132d694a7847cb
814
py
Python
src/algoritmos-ordenacion/propuestos/strings.py
GokoshiJr/algoritmos2-py
106dcbed31739309c193a77c671522aac17f6e45
[ "MIT" ]
null
null
null
src/algoritmos-ordenacion/propuestos/strings.py
GokoshiJr/algoritmos2-py
106dcbed31739309c193a77c671522aac17f6e45
[ "MIT" ]
null
null
null
src/algoritmos-ordenacion/propuestos/strings.py
GokoshiJr/algoritmos2-py
106dcbed31739309c193a77c671522aac17f6e45
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def seleccion(stringArray: list) -> list: for i in range (0, len(stringArray) - 1): minimo = i for j in range (i + 1, len(stringArray)): if stringArray[j].lower() < stringArray[minimo].lower(): minimo = j temporal = stringAr...
32.56
96
0.563882
def seleccion(stringArray: list) -> list: for i in range (0, len(stringArray) - 1): minimo = i for j in range (i + 1, len(stringArray)): if stringArray[j].lower() < stringArray[minimo].lower(): minimo = j temporal = stringArray[i] stringA...
true
true
1c40291b211e171fa4ce8d4425b26a5e3fdc30b8
727
py
Python
time_vs_nmt.py
uafgeotools/mtuq_performance_tests
c69566dbe4ca5f1c511c989a84d846e6510cc0d4
[ "MIT" ]
1
2020-12-16T04:41:30.000Z
2020-12-16T04:41:30.000Z
time_vs_nmt.py
uafgeotools/mtuq_performance_tests
c69566dbe4ca5f1c511c989a84d846e6510cc0d4
[ "MIT" ]
null
null
null
time_vs_nmt.py
uafgeotools/mtuq_performance_tests
c69566dbe4ca5f1c511c989a84d846e6510cc0d4
[ "MIT" ]
1
2021-08-11T22:54:43.000Z
2021-08-11T22:54:43.000Z
import os import time import numpy as np from examples.gridsearch import mockup, mockup_sw, mockup_bw, mtuq_sw, mtuq_bw, run_gridsearch, run_gridsearch1, run_gridsearch2 def display_result(results): print(results.argmin(),results.min()) def timer(grid_search, problem, name, nmt=1000): print '\n%s' % name...
22.71875
128
0.674003
import os import time import numpy as np from examples.gridsearch import mockup, mockup_sw, mockup_bw, mtuq_sw, mtuq_bw, run_gridsearch, run_gridsearch1, run_gridsearch2 def display_result(results): print(results.argmin(),results.min()) def timer(grid_search, problem, name, nmt=1000): print '\n%s' % name...
false
true
1c40292a31e03b7306247700a6e10cd93b2c1eb6
4,792
py
Python
myhealthapp/views.py
SORARAwo4649/HamatteruProject
72d5d1a4fc3fa4ef6d09048b6852256500feed84
[ "CC-BY-4.0", "MIT" ]
null
null
null
myhealthapp/views.py
SORARAwo4649/HamatteruProject
72d5d1a4fc3fa4ef6d09048b6852256500feed84
[ "CC-BY-4.0", "MIT" ]
null
null
null
myhealthapp/views.py
SORARAwo4649/HamatteruProject
72d5d1a4fc3fa4ef6d09048b6852256500feed84
[ "CC-BY-4.0", "MIT" ]
null
null
null
from django.contrib.auth import login from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render, redirect, resolve_url from django.urls import reverse_lazy from django.vi...
29.580247
93
0.625626
from django.contrib.auth import login from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render, redirect, resolve_url from django.urls import reverse_lazy from django.vi...
true
true
1c4029d47a1c7c126aba0f3c556081df61aa58d5
1,020
py
Python
desktop/core/ext-py/odfpy-1.4.1/examples/loadsave.py
e11it/hue-1
436704c40b5fa6ffd30bd972bf50ffeec738d091
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/odfpy-1.4.1/examples/loadsave.py
e11it/hue-1
436704c40b5fa6ffd30bd972bf50ffeec738d091
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/odfpy-1.4.1/examples/loadsave.py
e11it/hue-1
436704c40b5fa6ffd30bd972bf50ffeec738d091
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Søren Roug, European Environment Agency # # This is free software. You may redistribute it under the terms # of the Apache license and the GNU General Public License Version # 2 or at your option any later version. # # This program is distributed in th...
32.903226
80
0.742157
import sys from odf.opendocument import load infile = sys.argv[1] doc = load(infile) outfile = infile[:-4] + "-bak" + infile[-4:] doc.save(outfile)
true
true
1c402aa994bdd161da5cc185a9ce804ea220c003
3,669
py
Python
bindings/python/ensmallen/datasets/string/candidatuswolfebacteriabacteriumrifcsphigho201full4822.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/candidatuswolfebacteriabacteriumrifcsphigho201full4822.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/candidatuswolfebacteriabacteriumrifcsphigho201full4822.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Candidatus Wolfebacteria bacterium RIFCSPHIGHO2_01_FULL_48_22. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, ...
34.942857
223
0.693377
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def CandidatusWolfebacteriaBacteriumRifcsphigho201Full4822( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, ...
true
true
1c402c1157900ff1ad5c6c296a409c9e8fb96d2b
538
py
Python
contrail-openstack/hooks/charmhelpers/core/kernel_factory/centos.py
exsdev0/tf-charms
a7a3cfc7463332e5bc0b335c0304dace1025f18c
[ "Apache-2.0" ]
19
2016-04-17T04:00:53.000Z
2020-05-06T14:18:16.000Z
contrail-openstack/hooks/charmhelpers/core/kernel_factory/centos.py
exsdev0/tf-charms
a7a3cfc7463332e5bc0b335c0304dace1025f18c
[ "Apache-2.0" ]
313
2017-09-15T13:22:58.000Z
2022-02-25T17:55:01.000Z
contrail-openstack/hooks/charmhelpers/core/kernel_factory/centos.py
exsdev0/tf-charms
a7a3cfc7463332e5bc0b335c0304dace1025f18c
[ "Apache-2.0" ]
136
2017-09-19T13:37:33.000Z
2022-03-29T11:08:00.000Z
import subprocess import os def persistent_modprobe(module): """Load a kernel module and configure for auto-load on reboot.""" if not os.path.exists('/etc/rc.modules'): open('/etc/rc.modules', 'a') os.chmod('/etc/rc.modules', 111) with open('/etc/rc.modules', 'r+') as modules: if m...
29.888889
69
0.635688
import subprocess import os def persistent_modprobe(module): if not os.path.exists('/etc/rc.modules'): open('/etc/rc.modules', 'a') os.chmod('/etc/rc.modules', 111) with open('/etc/rc.modules', 'r+') as modules: if module not in modules.read(): modules.write('modprobe %s\n'...
true
true
1c402c625b8cb842ac8f5996a1b4775910c1cdc3
2,631
py
Python
exams/signals.py
Wassaf-Shahzad/micromasters
b1340a8c233499b1d8d22872a6bc1fe7f49fd323
[ "BSD-3-Clause" ]
32
2016-03-25T01:03:13.000Z
2022-01-15T19:35:42.000Z
exams/signals.py
Wassaf-Shahzad/micromasters
b1340a8c233499b1d8d22872a6bc1fe7f49fd323
[ "BSD-3-Clause" ]
4,858
2016-03-03T13:48:30.000Z
2022-03-29T22:09:51.000Z
exams/signals.py
umarmughal824/micromasters
ea92d3bcea9be4601150fc497302ddacc1161622
[ "BSD-3-Clause" ]
20
2016-08-18T22:07:44.000Z
2021-11-15T13:35:35.000Z
""" Signals for exams """ import logging from django.db import transaction from django.db.models.signals import post_save from django.dispatch import receiver from courses.models import CourseRun from dashboard.models import CachedEnrollment from dashboard.utils import get_mmtrack from ecommerce.models import Order ...
38.130435
111
0.789434
import logging from django.db import transaction from django.db.models.signals import post_save from django.dispatch import receiver from courses.models import CourseRun from dashboard.models import CachedEnrollment from dashboard.utils import get_mmtrack from ecommerce.models import Order from exams.api import auth...
true
true
1c402c9cfa73e3ef59b9cbae5d064c0a06d1cbc7
22
py
Python
pineboolib/system_module/forms/__init__.py
juanjosepablos/pineboo
f6ce515aec6e0139821bb9c1d62536d9fb50dae4
[ "MIT" ]
2
2017-12-10T23:06:16.000Z
2017-12-10T23:06:23.000Z
pineboolib/system_module/forms/__init__.py
Aulla/pineboo
3ad6412d365a6ad65c3bb2bdc03f5798d7c37004
[ "MIT" ]
36
2017-11-05T21:13:47.000Z
2020-08-26T15:56:15.000Z
pineboolib/system_module/forms/__init__.py
Aulla/pineboo
3ad6412d365a6ad65c3bb2bdc03f5798d7c37004
[ "MIT" ]
8
2017-11-05T15:56:31.000Z
2019-04-25T16:32:28.000Z
"""Forms packages."""
11
21
0.590909
true
true
1c402e150e2445a9b07e007e65b56c3dca9a80e4
25,773
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.754826
146
0.789858
try: from ._models_py3 import AdditionalCapabilities from ._models_py3 import AdditionalUnattendContent from ._models_py3 import ApiEntityReference from ._models_py3 import ApiError from ._models_py3 import ApiErrorBase from ._models_py3 import AutomaticOSUpgradePolicy from ._models_...
true
true
1c402f34e07ad043935b8aaecd277213c8f6f438
16,675
py
Python
code/train_pc_img.py
Mehooz/VGSNet
18ddae20fb3ccc440a38bd8b23cba8fcaa753518
[ "MIT" ]
3
2020-10-26T19:52:53.000Z
2021-12-27T07:59:36.000Z
code/train_pc_img.py
Mehooz/VGSNet
18ddae20fb3ccc440a38bd8b23cba8fcaa753518
[ "MIT" ]
null
null
null
code/train_pc_img.py
Mehooz/VGSNet
18ddae20fb3ccc440a38bd8b23cba8fcaa753518
[ "MIT" ]
null
null
null
""" This is the main trainer script for point cloud AE/VAE experiments. Use scripts/train_ae_pc_chair.sh or scripts/train_vae_pc_chair.sh to run. Before that, you need to run scripts/pretrain_part_pc_ae_chair.sh or scripts/pretrain_part_pc_vae_chair.sh to pretrain part geometry AE/VAE. """ import os im...
44.113757
206
0.630045
import os import time import sys import shutil import random from time import strftime from argparse import ArgumentParser import numpy as np import torch import torch.utils.data from config import add_train_vae_args from data import PartNetDataset, Tree import utils # torch.set_num_threads(1) os.environ["CUDA_VISI...
true
true
1c402fbf836bccd97ab91e5f40db2a16171cb7b4
2,931
py
Python
homeassistant/components/syncthru/binary_sensor.py
SergioBPereira/core
4501906da369e23b304857b8a3512798696f26a0
[ "Apache-2.0" ]
5
2017-01-26T16:33:09.000Z
2018-07-20T13:50:47.000Z
homeassistant/components/syncthru/binary_sensor.py
SergioBPereira/core
4501906da369e23b304857b8a3512798696f26a0
[ "Apache-2.0" ]
87
2020-07-06T22:22:54.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/syncthru/binary_sensor.py
SergioBPereira/core
4501906da369e23b304857b8a3512798696f26a0
[ "Apache-2.0" ]
7
2018-10-04T10:12:45.000Z
2021-12-29T20:55:40.000Z
"""Support for Samsung Printers with SyncThru web interface.""" from pysyncthru import SyncThru, SyncthruState from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_PROBLEM, BinarySensorEntity, ) from homeassistant.const import CONF_NAME from homeassistant.helpers.up...
29.019802
85
0.701467
from pysyncthru import SyncThru, SyncthruState from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_PROBLEM, BinarySensorEntity, ) from homeassistant.const import CONF_NAME from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, DataUpdateC...
true
true
1c40300dd755571a66248088c4c3405a029e7a3f
1,064
py
Python
src/app/models.py
wking/spdx-online-tools
b9e8373303a90c379cf2afb57904fc930413649e
[ "Apache-2.0" ]
null
null
null
src/app/models.py
wking/spdx-online-tools
b9e8373303a90c379cf2afb57904fc930413649e
[ "Apache-2.0" ]
null
null
null
src/app/models.py
wking/spdx-online-tools
b9e8373303a90c379cf2afb57904fc930413649e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2017 Rohit Lodha # 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...
36.689655
90
0.760338
from __future__ import unicode_literals from django.db import models from datetime import datetime from django import forms from django.contrib.auth.models import User class UserID(models.Model): user = models.OneToOneField(User) organisation = models.CharField("Organisation",max_length=64, nul...
true
true
1c403039845af0999712ad952c18ca9c4f246b16
60
py
Python
river/base/multi_output.py
fox-ds/river
9ce947ebfc012ec7059de0a09c765b2da7fc1d25
[ "BSD-3-Clause" ]
2,184
2020-11-11T12:31:12.000Z
2022-03-31T16:45:41.000Z
river/base/multi_output.py
raphaelsty/river
2e0b25a2ef2d2ba9ec080cf86a491f7465433b18
[ "BSD-3-Clause" ]
328
2019-01-25T13:48:43.000Z
2020-11-11T11:41:44.000Z
river/base/multi_output.py
raphaelsty/river
2e0b25a2ef2d2ba9ec080cf86a491f7465433b18
[ "BSD-3-Clause" ]
240
2020-11-11T14:25:03.000Z
2022-03-31T08:25:50.000Z
class MultiOutputMixin: """A multi-output estimator."""
20
35
0.7
class MultiOutputMixin:
true
true
1c40309a6c3d5210dd07a1ebe34a20dc4c7c2d68
7,965
py
Python
central/uux.py
WYVERN2742/Central
322f3429835cc38cc1fc5924c05176185d4e3e52
[ "MIT" ]
3
2021-02-20T19:08:27.000Z
2021-02-20T19:09:59.000Z
central/uux.py
WYVERN2742/Central
322f3429835cc38cc1fc5924c05176185d4e3e52
[ "MIT" ]
3
2019-06-24T02:52:39.000Z
2021-04-05T19:11:01.000Z
central/uux.py
WYVERN2742/Central
322f3429835cc38cc1fc5924c05176185d4e3e52
[ "MIT" ]
null
null
null
"""central.uux: Universal User Experience. A simple standardized set of functions for user output and input. Aim is to provide a standard set of tools to display warnings, errors, info messages, debug messages, error handling and just about anything else related to non-task output """ import time import traceback im...
26.287129
105
0.641808
"""central.uux: Universal User Experience. A simple standardized set of functions for user output and input. Aim is to provide a standard set of tools to display warnings, errors, info messages, debug messages, error handling and just about anything else related to non-task output """ import time import traceback im...
false
true
1c4030e385e2e10be1ee444a3a75529c03c39c75
182
py
Python
om.metaL.py
ponyatov/om
e972b566537dd168e506a3a42f2fb10c5f697c17
[ "MIT" ]
null
null
null
om.metaL.py
ponyatov/om
e972b566537dd168e506a3a42f2fb10c5f697c17
[ "MIT" ]
null
null
null
om.metaL.py
ponyatov/om
e972b566537dd168e506a3a42f2fb10c5f697c17
[ "MIT" ]
null
null
null
## @file ## @brief meta: Object Memory (Smalltalk-like) from metaL import * p = Project( title='''Object Memory (Smalltalk-like)''', about='''''') \ | Rust() p.sync()
15.166667
47
0.576923
ject Memory (Smalltalk-like)''', about='''''') \ | Rust() p.sync()
true
true
1c4030fea59d53e9d76e40551c3902b116fe92cb
212
py
Python
hard-gists/1943426/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/1943426/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/1943426/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
from django.template.loader import add_to_builtins add_to_builtins('django.contrib.staticfiles.templatetags.staticfiles') add_to_builtins('django.templatetags.i18n') add_to_builtins('django.templatetags.future')
42.4
70
0.863208
from django.template.loader import add_to_builtins add_to_builtins('django.contrib.staticfiles.templatetags.staticfiles') add_to_builtins('django.templatetags.i18n') add_to_builtins('django.templatetags.future')
true
true
1c4031fbd2d9af86d329c35827ec5a14f555759a
5,152
py
Python
beer/harvester/harvester.py
petrus-hanks/flax-blockchain
6e180dc84ca24c757555c9947f44bd724b1af3eb
[ "Apache-2.0" ]
null
null
null
beer/harvester/harvester.py
petrus-hanks/flax-blockchain
6e180dc84ca24c757555c9947f44bd724b1af3eb
[ "Apache-2.0" ]
null
null
null
beer/harvester/harvester.py
petrus-hanks/flax-blockchain
6e180dc84ca24c757555c9947f44bd724b1af3eb
[ "Apache-2.0" ]
null
null
null
import asyncio import concurrent import logging from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Callable, Dict, List, Optional, Set, Tuple from blspy import G1Element import beer.server.ws_connection as ws # lgtm [py/import-and-import-from] from beer.consensus.con...
35.287671
108
0.650427
import asyncio import concurrent import logging from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Callable, Dict, List, Optional, Set, Tuple from blspy import G1Element import beer.server.ws_connection as ws from beer.consensus.constants import ConsensusConstants f...
true
true
1c403211e74cfa993b839c5d9ed606a973736e18
57,718
py
Python
test/functional/feature_block.py
TransFastCore/pivx533
b2168d6c2b447c9bf9c7175ffdfc8342b2861179
[ "MIT" ]
15
2019-08-28T13:34:30.000Z
2021-12-15T22:01:08.000Z
test/functional/feature_block.py
TransFastCore/pivx533
b2168d6c2b447c9bf9c7175ffdfc8342b2861179
[ "MIT" ]
9
2019-07-17T22:42:46.000Z
2022-03-02T12:41:27.000Z
test/functional/feature_block.py
TransFastCore/pivx533
b2168d6c2b447c9bf9c7175ffdfc8342b2861179
[ "MIT" ]
13
2019-06-30T22:44:30.000Z
2022-02-19T16:07:54.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2021 The Bitcoin Core developers # Copyright (c) 2020-2021 The TrumpCoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test block processing.""" import copy import struct...
45.662975
161
0.574535
import copy import struct import time from test_framework.blocktools import create_block, create_coinbase, create_transaction, get_legacy_sigopcount_block from test_framework.key import CECKey from test_framework.messages import ( CBlock, COIN, COutPoint, CTransaction, CTxIn, CTxOut, ...
true
true
1c403246a49c98f7fe3edc9d3278aaa3b9b09ed4
5,973
py
Python
sdks/python/apache_beam/testing/test_utils.py
kjmrknsn/beam
6a6adc8433deff10a5594bbf77cc9148ce0a951a
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/testing/test_utils.py
kjmrknsn/beam
6a6adc8433deff10a5594bbf77cc9148ce0a951a
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/testing/test_utils.py
kjmrknsn/beam
6a6adc8433deff10a5594bbf77cc9148ce0a951a
[ "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 us...
29.865
78
0.729784
from __future__ import absolute_import import hashlib import imp import os import shutil import tempfile from builtins import object from mock import Mock from mock import patch from apache_beam.io.filesystems import FileSystems from apache_beam.utils import retry DEFAULT_HASHING_ALG = 'sha1' ...
true
true
1c4032ade22a1b70e4e3c0cd00453e5ed6e4717d
596
py
Python
test/animatedledstrip/test_animation_info.py
AnimatedLEDStrip/client-python
0502b1b70faf6ce9b9ff7b53ee4740372fccb4c3
[ "MIT" ]
null
null
null
test/animatedledstrip/test_animation_info.py
AnimatedLEDStrip/client-python
0502b1b70faf6ce9b9ff7b53ee4740372fccb4c3
[ "MIT" ]
null
null
null
test/animatedledstrip/test_animation_info.py
AnimatedLEDStrip/client-python
0502b1b70faf6ce9b9ff7b53ee4740372fccb4c3
[ "MIT" ]
null
null
null
from animatedledstrip import AnimationInfo def test_constructor(): info = AnimationInfo() assert info.name == '' assert info.abbr == '' assert info.description == '' assert info.run_count_default == 0 assert info.minimum_colors == 0 assert info.unlimited_colors is False assert info.di...
28.380952
42
0.671141
from animatedledstrip import AnimationInfo def test_constructor(): info = AnimationInfo() assert info.name == '' assert info.abbr == '' assert info.description == '' assert info.run_count_default == 0 assert info.minimum_colors == 0 assert info.unlimited_colors is False assert info.di...
true
true
1c4034ad05f99a26315901a18c8f402d5fa64c10
10,357
py
Python
tools/manifest/item.py
kosta111121/wpt
a9e454c8001472320dc3f049f6180427256a44dc
[ "BSD-3-Clause" ]
1
2019-12-16T19:31:40.000Z
2019-12-16T19:31:40.000Z
tools/manifest/item.py
kosta111121/wpt
a9e454c8001472320dc3f049f6180427256a44dc
[ "BSD-3-Clause" ]
null
null
null
tools/manifest/item.py
kosta111121/wpt
a9e454c8001472320dc3f049f6180427256a44dc
[ "BSD-3-Clause" ]
null
null
null
from copy import copy from inspect import isabstract from six import iteritems, with_metaclass from six.moves.urllib.parse import urljoin, urlparse from abc import ABCMeta, abstractproperty from .utils import to_os_path MYPY = False if MYPY: # MYPY is set to True when run under Mypy. from typing import Option...
27.991892
117
0.552283
from copy import copy from inspect import isabstract from six import iteritems, with_metaclass from six.moves.urllib.parse import urljoin, urlparse from abc import ABCMeta, abstractproperty from .utils import to_os_path MYPY = False if MYPY: from typing import Optional from typing import Text from ty...
true
true
1c40351ffa2ec866a11e9370d900bba8e95acb5e
4,998
py
Python
tdvt/tdvt/tabquery.py
tabBhargav/connector-plugin-sdk
3a78d519c502260c6aa37654215dc0e8b6b93931
[ "MIT" ]
80
2018-10-26T15:08:25.000Z
2022-03-29T04:44:53.000Z
tdvt/tdvt/tabquery.py
tabBhargav/connector-plugin-sdk
3a78d519c502260c6aa37654215dc0e8b6b93931
[ "MIT" ]
531
2018-10-26T14:17:10.000Z
2022-03-31T23:24:29.000Z
tdvt/tdvt/tabquery.py
tabBhargav/connector-plugin-sdk
3a78d519c502260c6aa37654215dc0e8b6b93931
[ "MIT" ]
85
2018-11-28T23:37:27.000Z
2022-03-31T21:01:27.000Z
import configparser import os import sys from .resources import * from .tabquery_path import TabQueryPath tab_cli_exe = '' def configure_tabquery_path(): """Setup the tabquery path from ini settings.""" global tab_cli_exe if os.environ.get('TABQUERY_CLI_PATH'): tab_cli_exe = os.environ.get('TABQ...
39.046875
151
0.690876
import configparser import os import sys from .resources import * from .tabquery_path import TabQueryPath tab_cli_exe = '' def configure_tabquery_path(): global tab_cli_exe if os.environ.get('TABQUERY_CLI_PATH'): tab_cli_exe = os.environ.get('TABQUERY_CLI_PATH') logging.info( "Ta...
true
true
1c4036521e3762da652af83b989980f4698545e6
160
py
Python
_setup.py
reverendbedford/scikit-fem
bc57d968e56e6b89a99e35eac26ef7bc81b7a46a
[ "BSD-3-Clause" ]
238
2018-01-28T11:11:55.000Z
2022-03-31T15:13:52.000Z
_setup.py
reverendbedford/scikit-fem
bc57d968e56e6b89a99e35eac26ef7bc81b7a46a
[ "BSD-3-Clause" ]
559
2018-04-13T09:06:49.000Z
2022-03-22T12:59:25.000Z
_setup.py
reverendbedford/scikit-fem
bc57d968e56e6b89a99e35eac26ef7bc81b7a46a
[ "BSD-3-Clause" ]
50
2018-04-13T07:02:28.000Z
2022-03-24T18:01:22.000Z
from setuptools import setup setup( name='scikit-fem', version='0.1.0.dev0', install_requires=['numpy', 'scipy', 'matplotlib', 'meshio>=4.0.4'], )
20
71
0.6375
from setuptools import setup setup( name='scikit-fem', version='0.1.0.dev0', install_requires=['numpy', 'scipy', 'matplotlib', 'meshio>=4.0.4'], )
true
true
1c4038d7593ed0769c4d455116cc1ffe6c117b27
614
py
Python
catalog/forms.py
choia/django-library-tutorial
a44fd078b6188bed095b7246316b3bc6ff696dd1
[ "MIT" ]
null
null
null
catalog/forms.py
choia/django-library-tutorial
a44fd078b6188bed095b7246316b3bc6ff696dd1
[ "MIT" ]
null
null
null
catalog/forms.py
choia/django-library-tutorial
a44fd078b6188bed095b7246316b3bc6ff696dd1
[ "MIT" ]
null
null
null
from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from datetime import date, timedelta from django import forms class RenewBookForm(forms.Form): renewal_date = forms.DateField(help_text="Enter a date between today and 4 weeks (default 3).") def clean_renewal...
32.315789
96
0.760586
from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from datetime import date, timedelta from django import forms class RenewBookForm(forms.Form): renewal_date = forms.DateField(help_text="Enter a date between today and 4 weeks (default 3).") def clean_renewal...
true
true
1c4038f05efa89ab152a2e6b15a13fa3a2742bfb
66,095
py
Python
oscar/lib/python2.7/site-packages/whoosh/searching.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/whoosh/searching.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/whoosh/searching.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2007 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions a...
39.960701
83
0.60696
from __future__ import division import copy import weakref from math import ceil from whoosh import classify, highlight, query, scoring from whoosh.compat import iteritems, itervalues, iterkeys, xrange from whoosh.idsets import DocIdSet, BitSet from whoosh.reading import TermNot...
true
true
1c40391a980152fa9fcf2a8aea56d280ba128f52
1,813
py
Python
jenni/utils.py
synamedia-jenni/Jenni
44a25453d3f7dc08ca22f75b4d817dfa5c141904
[ "Apache-2.0" ]
2
2021-05-11T15:47:52.000Z
2021-06-24T21:55:04.000Z
jenni/utils.py
synamedia-jenni/Jenni
44a25453d3f7dc08ca22f75b4d817dfa5c141904
[ "Apache-2.0" ]
2
2021-05-19T07:24:41.000Z
2021-06-24T21:54:19.000Z
jenni/utils.py
synamedia-jenni/Jenni
44a25453d3f7dc08ca22f75b4d817dfa5c141904
[ "Apache-2.0" ]
1
2021-05-14T10:37:53.000Z
2021-05-14T10:37:53.000Z
from html import escape from typing import List from textwrap import dedent def bool2groovy(b: bool) -> str: return "true" if b else "false" def groovy_string_list(l: List[str]) -> str: if l: return ", ".join([quote1or3xs(s) for s in l]) else: return "" def tidy_text(s: str) -> str: ...
22.6625
73
0.529509
from html import escape from typing import List from textwrap import dedent def bool2groovy(b: bool) -> str: return "true" if b else "false" def groovy_string_list(l: List[str]) -> str: if l: return ", ".join([quote1or3xs(s) for s in l]) else: return "" def tidy_text(s: str) -> str: ...
true
true
1c403949edbafeb3dc3e1894d723f59918cf2de8
3,210
py
Python
main.py
JDKdevStudio/GraficadorFunciones
e8505b47f80fbd189b1825537cdd115859b980d4
[ "CC0-1.0" ]
null
null
null
main.py
JDKdevStudio/GraficadorFunciones
e8505b47f80fbd189b1825537cdd115859b980d4
[ "CC0-1.0" ]
null
null
null
main.py
JDKdevStudio/GraficadorFunciones
e8505b47f80fbd189b1825537cdd115859b980d4
[ "CC0-1.0" ]
null
null
null
# Importar librerías import tkinter from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk from matplotlib import style import matplotlib.animation as animation import matplotlib.pyplot as plt import numpy as np from tkinter import messagebox ...
27.672414
105
0.626791
import tkinter from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk from matplotlib import style import matplotlib.animation as animation import matplotlib.pyplot as plt import numpy as np from tkinter import messagebox from math import * ...
true
true
1c403ba9c6cf6328fd055f45cab71d184d90c19a
38,748
py
Python
mininet/mininet/net.py
JinLabIIT/VirtualTimeKernel
4ad24167141d755bd4e68e08ea80c25ad06a8c85
[ "MIT" ]
2
2021-05-21T08:24:14.000Z
2021-12-21T18:31:56.000Z
mininet/mininet/net.py
JinLabIIT/VirtualTimeKernel
4ad24167141d755bd4e68e08ea80c25ad06a8c85
[ "MIT" ]
null
null
null
mininet/mininet/net.py
JinLabIIT/VirtualTimeKernel
4ad24167141d755bd4e68e08ea80c25ad06a8c85
[ "MIT" ]
null
null
null
""" Mininet: A simple networking testbed for OpenFlow/SDN! author: Bob Lantz (rlantz@cs.stanford.edu) author: Brandon Heller (brandonh@stanford.edu) Mininet creates scalable OpenFlow test networks by using process-based virtualization and network namespaces. Simulated hosts are created as processes in separate ...
38.786787
81
0.557319
""" Mininet: A simple networking testbed for OpenFlow/SDN! author: Bob Lantz (rlantz@cs.stanford.edu) author: Brandon Heller (brandonh@stanford.edu) Mininet creates scalable OpenFlow test networks by using process-based virtualization and network namespaces. Simulated hosts are created as processes in separate ...
false
true
1c403be0633980d1b0fb1e4f024a208cb83a7afa
86
py
Python
src/ShapeTemplate/Field.py
DaDudek/Tetris
b3848132fd315e883e714e1882ec4bfd38b890e1
[ "MIT" ]
2
2022-01-16T20:44:08.000Z
2022-01-18T13:41:32.000Z
src/ShapeTemplate/Field.py
DaDudek/Tetris
b3848132fd315e883e714e1882ec4bfd38b890e1
[ "MIT" ]
null
null
null
src/ShapeTemplate/Field.py
DaDudek/Tetris
b3848132fd315e883e714e1882ec4bfd38b890e1
[ "MIT" ]
null
null
null
class Field: def __init__(self, isFill: bool): self.isFill: bool = isFill
21.5
37
0.639535
class Field: def __init__(self, isFill: bool): self.isFill: bool = isFill
true
true
1c403c61d6391010474c94d303ed009feb41ce0f
1,575
py
Python
IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/test/test_context.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
4
2016-03-30T14:31:52.000Z
2019-02-02T05:01:32.000Z
IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/test/test_context.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
1
2020-03-06T04:49:42.000Z
2020-03-06T04:49:42.000Z
IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/test/test_context.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
2
2019-08-30T23:36:13.000Z
2019-11-08T16:52:01.000Z
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.context}. """ from __future__ import division, absolute_import from twisted.trial.unittest import SynchronousTestCase from twisted.python import context class ContextTest(SynchronousTestCase): "...
30.288462
81
0.620317
from __future__ import division, absolute_import from twisted.trial.unittest import SynchronousTestCase from twisted.python import context class ContextTest(SynchronousTestCase): def test_notPresentIfNotSet(self): self.assertEqual(context.get("x"), None) def test_setByCall(self): ...
true
true
1c403c9cf4323607bc8c84f8108a5e434eb1c448
2,459
py
Python
sympycore/matrices/functions.py
radovankavicky/pymaclab
21da758f64ed0b62969c9289576f677e977cfd98
[ "Apache-2.0" ]
96
2015-01-25T05:59:56.000Z
2021-12-29T14:05:22.000Z
sympycore/matrices/functions.py
1zinnur9/pymaclab
21da758f64ed0b62969c9289576f677e977cfd98
[ "Apache-2.0" ]
3
2015-12-17T19:25:46.000Z
2018-06-19T07:05:20.000Z
sympycore/matrices/functions.py
1zinnur9/pymaclab
21da758f64ed0b62969c9289576f677e977cfd98
[ "Apache-2.0" ]
36
2016-01-31T15:22:01.000Z
2021-03-29T07:03:07.000Z
""" Provides matrix utility functions. """ # # Author: Pearu Peterson # Created: March 2008 # __docformat__ = "restructuredtext" __all__ = ['eye', 'concatenate', 'jacobian'] from ..utils import MATRIX, MATRIX_DICT from .algebra import MatrixDict, Matrix, MatrixBase def jacobian(expr_list, var_list): """ Return a...
30.358025
93
0.544124
""" Provides matrix utility functions. """ __docformat__ = "restructuredtext" __all__ = ['eye', 'concatenate', 'jacobian'] from ..utils import MATRIX, MATRIX_DICT from .algebra import MatrixDict, Matrix, MatrixBase def jacobian(expr_list, var_list): """ Return a jacobian matrix of functions in expr_list with...
false
true
1c403df1f61deb78c19aa7ef3027eb475fa15a29
6,187
py
Python
telemetry/telemetry/internal/platform/tracing_agent/cpu_tracing_agent_unittest.py
tdresser/catapult-csm
8f69b07e80198c1af0d5bd368d8ad8ced968884a
[ "BSD-3-Clause" ]
4
2017-12-29T03:17:40.000Z
2021-07-04T03:28:11.000Z
telemetry/telemetry/internal/platform/tracing_agent/cpu_tracing_agent_unittest.py
tdresser/catapult-csm
8f69b07e80198c1af0d5bd368d8ad8ced968884a
[ "BSD-3-Clause" ]
1
2021-08-13T18:39:43.000Z
2021-08-13T18:39:43.000Z
telemetry/telemetry/internal/platform/tracing_agent/cpu_tracing_agent_unittest.py
tdresser/catapult-csm
8f69b07e80198c1af0d5bd368d8ad8ced968884a
[ "BSD-3-Clause" ]
6
2017-12-05T07:15:08.000Z
2021-07-04T03:28:13.000Z
# Copyright 2016 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 sys import time import unittest from telemetry import decorators from telemetry.internal.platform.tracing_agent import cpu_tracing_agent from telemetr...
38.66875
78
0.737353
import sys import time import unittest from telemetry import decorators from telemetry.internal.platform.tracing_agent import cpu_tracing_agent from telemetry.internal.platform import tracing_agent from telemetry.internal.platform import linux_platform_backend from telemetry.internal.platform import mac_platform_ba...
true
true
1c403e410b2f69d84e79c61035f85fe8687ac95e
2,162
py
Python
models/user.py
Leaniz/gordologo
fcd8b8a3bfea1fb6e597dfd1701884ddd07db107
[ "MIT" ]
1
2021-08-03T20:06:42.000Z
2021-08-03T20:06:42.000Z
models/user.py
Leaniz/gordologo
fcd8b8a3bfea1fb6e597dfd1701884ddd07db107
[ "MIT" ]
null
null
null
models/user.py
Leaniz/gordologo
fcd8b8a3bfea1fb6e597dfd1701884ddd07db107
[ "MIT" ]
null
null
null
from elasticsearch import Elasticsearch class UserModel: elast = Elasticsearch('localhost', port=9200) elast_idx = "gordologo-users" def __init__(self, _id, username, email, password_hash): self.id = _id self.username = username self.email = email self.password_hash = pass...
27.717949
64
0.440796
from elasticsearch import Elasticsearch class UserModel: elast = Elasticsearch('localhost', port=9200) elast_idx = "gordologo-users" def __init__(self, _id, username, email, password_hash): self.id = _id self.username = username self.email = email self.password_hash = pass...
true
true
1c403e61eae75de53b3c4cc91917228410ca239f
552
py
Python
rldb/db/paper__dqn2013/algo__dqn2013/__init__.py
seungjaeryanlee/sotarl
8c471c4666d6210c68f3cb468e439a2b168c785d
[ "MIT" ]
45
2019-05-13T17:39:33.000Z
2022-03-07T23:44:13.000Z
rldb/db/paper__dqn2013/algo__dqn2013/__init__.py
seungjaeryanlee/sotarl
8c471c4666d6210c68f3cb468e439a2b168c785d
[ "MIT" ]
2
2019-03-29T01:41:59.000Z
2019-07-02T02:48:31.000Z
rldb/db/paper__dqn2013/algo__dqn2013/__init__.py
seungjaeryanlee/sotarl
8c471c4666d6210c68f3cb468e439a2b168c785d
[ "MIT" ]
2
2020-04-07T20:57:30.000Z
2020-07-08T12:55:15.000Z
""" DQN2013 scores from DQN2013 paper. 7 entries ------------------------------------------------------------------------ 7 unique entries """ from .entries import entries # Specify ALGORITHM algo = { # ALGORITHM "algo-title": "Deep Q-Network (2013)", "algo-nickname": "DQN2013", "algo-source-title...
20.444444
74
0.576087
from .entries import entries algo = { "algo-title": "Deep Q-Network (2013)", "algo-nickname": "DQN2013", "algo-source-title": "Playing Atari with Deep Reinforcement Learning", "algo-frames": 10 * 1000 * 1000, } entries = [{**entry, **algo} for entry in entries] assert len(entries) == ...
true
true
1c403ee9a8c848544a66cf3a4bc06b9e8cb3cbcb
3,568
py
Python
cinder/volume/drivers/huawei/huawei_utils.py
whitepages/cinder
bd70ce6f4dd58ba904a7c941700cdce54e5a705e
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/huawei/huawei_utils.py
whitepages/cinder
bd70ce6f4dd58ba904a7c941700cdce54e5a705e
[ "Apache-2.0" ]
1
2021-03-21T11:38:29.000Z
2021-03-21T11:38:29.000Z
cinder/volume/drivers/huawei/huawei_utils.py
isabella232/cinder
bd70ce6f4dd58ba904a7c941700cdce54e5a705e
[ "Apache-2.0" ]
1
2021-03-21T11:37:47.000Z
2021-03-21T11:37:47.000Z
# Copyright (c) 2016 Huawei Technologies Co., Ltd. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
29.245902
78
0.681614
import base64 import json import six import time import uuid from oslo_log import log as logging from oslo_service import loopingcall from oslo_utils import units from cinder import exception from cinder.i18n import _ from cinder import objects from cinder.volume.drivers.huawei import constants LOG = ...
true
true
1c40402432cf3ee52f098bce63ed42d524eccb02
1,175
py
Python
products/pubsub/helpers/python/provider_subscription.py
btorresgil/magic-modules
f1a5e5ac9f921c3122466d153d3b99ad45e24a4f
[ "Apache-2.0" ]
1
2019-10-23T06:16:05.000Z
2019-10-23T06:16:05.000Z
products/pubsub/helpers/python/provider_subscription.py
btorresgil/magic-modules
f1a5e5ac9f921c3122466d153d3b99ad45e24a4f
[ "Apache-2.0" ]
65
2019-06-30T00:26:56.000Z
2019-12-04T05:23:56.000Z
products/pubsub/helpers/python/provider_subscription.py
btorresgil/magic-modules
f1a5e5ac9f921c3122466d153d3b99ad45e24a4f
[ "Apache-2.0" ]
5
2019-03-12T02:11:18.000Z
2019-10-23T06:16:08.000Z
# Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
37.903226
92
0.662128
def decode_request(response, module): if 'name' in response: response['name'] = response['name'].split('/')[-1] if 'topic' in response: response['topic'] = response['topic'].split('/')[-1] return response def encode_request(request, module): request['topic'] = '/'.join([...
true
true
1c40419f0bf533355ac9e1b0ad221b90295e7c6b
46,268
py
Python
zerver/tests/test_realm.py
sa2c/zulip
a00d911ed1071e6a8bbaa17d8df9e96115973588
[ "Apache-2.0" ]
1
2021-05-15T00:44:42.000Z
2021-05-15T00:44:42.000Z
zerver/tests/test_realm.py
sa2c/zulip
a00d911ed1071e6a8bbaa17d8df9e96115973588
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_realm.py
sa2c/zulip
a00d911ed1071e6a8bbaa17d8df9e96115973588
[ "Apache-2.0" ]
null
null
null
import datetime import re from typing import Any, Dict, List, Mapping, Union from unittest import mock import orjson from django.conf import settings from confirmation.models import Confirmation, create_confirmation_link from zerver.lib.actions import ( do_add_deactivated_redirect, do_change_plan_type, do...
43.731569
100
0.671285
import datetime import re from typing import Any, Dict, List, Mapping, Union from unittest import mock import orjson from django.conf import settings from confirmation.models import Confirmation, create_confirmation_link from zerver.lib.actions import ( do_add_deactivated_redirect, do_change_plan_type, do...
true
true
1c40421ca57f259b646740244643e36fd23b79df
2,420
py
Python
predico/predicates.py
pauleveritt/predico
2bbf88a7775d31907d2229a32a89490172acd988
[ "Apache-2.0" ]
null
null
null
predico/predicates.py
pauleveritt/predico
2bbf88a7775d31907d2229a32a89490172acd988
[ "Apache-2.0" ]
null
null
null
predico/predicates.py
pauleveritt/predico
2bbf88a7775d31907d2229a32a89490172acd988
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from typing import Type, Any, Optional from predico.services.request.base_request import Request from predico.services.resource.base_resource import Resource @dataclass class Predicate: value: Any key: str rank: int = 10 def __str__(self): value = getattr(se...
24.2
66
0.655372
from dataclasses import dataclass from typing import Type, Any, Optional from predico.services.request.base_request import Request from predico.services.resource.base_resource import Resource @dataclass class Predicate: value: Any key: str rank: int = 10 def __str__(self): value = getattr(se...
true
true
1c404227fdcac709e21234d010f4c8fb5da52912
5,015
py
Python
api.py
YAJATapps/Messenger-API
815ab70bdfcb74d37f1c967b2a083beda17965b0
[ "Apache-2.0" ]
null
null
null
api.py
YAJATapps/Messenger-API
815ab70bdfcb74d37f1c967b2a083beda17965b0
[ "Apache-2.0" ]
null
null
null
api.py
YAJATapps/Messenger-API
815ab70bdfcb74d37f1c967b2a083beda17965b0
[ "Apache-2.0" ]
null
null
null
import os from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import hashlib from mangum import Mangum import mysql.connector import time app = FastAPI() origins = [ "https://messenger.yajatkumar.com", "http://localhost:3000", ] app.add_middleware( CORSMiddleware, allow_ori...
22.795455
112
0.635892
import os from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import hashlib from mangum import Mangum import mysql.connector import time app = FastAPI() origins = [ "https://messenger.yajatkumar.com", "http://localhost:3000", ] app.add_middleware( CORSMiddleware, allow_ori...
true
true
1c404242f0b6bd6bdb19467bcc2784e17f1dafc5
228
py
Python
backend/apps/contact/admin.py
skiv23/portfolio
3c1a7b0cf0fb67148ce4b0491132e3a01375c9b0
[ "MIT" ]
null
null
null
backend/apps/contact/admin.py
skiv23/portfolio
3c1a7b0cf0fb67148ce4b0491132e3a01375c9b0
[ "MIT" ]
null
null
null
backend/apps/contact/admin.py
skiv23/portfolio
3c1a7b0cf0fb67148ce4b0491132e3a01375c9b0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.contrib import admin from . import models admin.site.register(models.Title) admin.site.register(models.Contact) admin.site.register(models.ContactMeEntry) admin.site.register(models.Photo)
20.727273
42
0.776316
from django.contrib import admin from . import models admin.site.register(models.Title) admin.site.register(models.Contact) admin.site.register(models.ContactMeEntry) admin.site.register(models.Photo)
true
true
1c40427349091ac0fefe2bc8521d70b844ce44a4
2,339
py
Python
outdated-unused/OldImageProcessing.py
KhangOP/PaladinsAssistantBot
9b705dc688610ba52909f0b0e152d8684006c6a6
[ "MIT" ]
null
null
null
outdated-unused/OldImageProcessing.py
KhangOP/PaladinsAssistantBot
9b705dc688610ba52909f0b0e152d8684006c6a6
[ "MIT" ]
null
null
null
outdated-unused/OldImageProcessing.py
KhangOP/PaladinsAssistantBot
9b705dc688610ba52909f0b0e152d8684006c6a6
[ "MIT" ]
null
null
null
""" # Creates a image desks async def create_deck_image2(player_name, champ_name, deck): image_size_x = 256 image_size_y = 196 # Main image # deck_image = Image.new('RGB', (image_size_x * 5, image_size_x * 2), color=color) # Champ icon image champ_url = await get_champ_image(champ_name) r...
37.126984
111
0.662676
true
true
1c4042fed14fd9b63c76fd881336abf66138e572
9,544
py
Python
scikit-learn-weighted_kde/sklearn/feature_selection/from_model.py
RTHMaK/git-squash-master
76c4c8437dd18114968e69a698f4581927fcdabf
[ "BSD-2-Clause" ]
null
null
null
scikit-learn-weighted_kde/sklearn/feature_selection/from_model.py
RTHMaK/git-squash-master
76c4c8437dd18114968e69a698f4581927fcdabf
[ "BSD-2-Clause" ]
null
null
null
scikit-learn-weighted_kde/sklearn/feature_selection/from_model.py
RTHMaK/git-squash-master
76c4c8437dd18114968e69a698f4581927fcdabf
[ "BSD-2-Clause" ]
null
null
null
# Authors: Gilles Louppe, Mathieu Blondel, Maheshakya Wijewardena # License: BSD 3 clause import numpy as np from .base import SelectorMixin from ..base import TransformerMixin, BaseEstimator, clone from ..externals import six from ..utils import safe_mask, check_array, deprecated from ..utils.validation import chec...
36.849421
79
0.620914
import numpy as np from .base import SelectorMixin from ..base import TransformerMixin, BaseEstimator, clone from ..externals import six from ..utils import safe_mask, check_array, deprecated from ..utils.validation import check_is_fitted from ..exceptions import NotFittedError def _get_feature_importances(estim...
true
true
1c404332924554e60f631695c9e565921d0c6fc1
3,116
py
Python
Amazon-Alexa-Reviews-feedback-prediction/code.py
Sufi737/ga-learner-dsmp-repo
a71c9bf138d5d9ba1ff4f37238d5e152cbf4380c
[ "MIT" ]
2
2020-06-16T16:54:37.000Z
2021-07-08T13:16:59.000Z
Amazon-Alexa-Reviews-feedback-prediction/code.py
Sufi737/ga-learner-dsmp-repo
a71c9bf138d5d9ba1ff4f37238d5e152cbf4380c
[ "MIT" ]
null
null
null
Amazon-Alexa-Reviews-feedback-prediction/code.py
Sufi737/ga-learner-dsmp-repo
a71c9bf138d5d9ba1ff4f37238d5e152cbf4380c
[ "MIT" ]
null
null
null
# -------------- # import packages import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") # Load the dataset df = pd.read_csv(path, sep ="\t") print(type(df['date'])) # Converting date attribute from string to datetime.date dataty...
20.912752
101
0.720475
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") df = pd.read_csv(path, sep ="\t") print(type(df['date'])) df['date'] = pd.to_datetime(df['date']) df['length'] = df['verified_reviews'].apply(lambda x: len(x)) e=(12...
true
true
1c4043c02674893a7b35774dafdb1e1cced67274
1,864
py
Python
dasladen/log.py
pagotti/dasladen
75bb384a2048619bd8fe5dd4588cb438dc02e589
[ "MIT" ]
2
2020-06-01T09:34:45.000Z
2021-03-16T15:42:30.000Z
dasladen/log.py
pagotti/dasladen
75bb384a2048619bd8fe5dd4588cb438dc02e589
[ "MIT" ]
2
2021-04-20T16:45:46.000Z
2021-07-02T15:48:46.000Z
dasladen/log.py
pagotti/dasladen
75bb384a2048619bd8fe5dd4588cb438dc02e589
[ "MIT" ]
2
2020-04-17T23:28:30.000Z
2020-06-01T09:37:56.000Z
""" Log Module Features: - Log to file - Log to console """ import time import logging from . import compat class FileHandler(object): def __init__(self): self.file = None def open(self, key): self.file = compat.open('log/{}.log'.format(key), 'a', 0) def write(self, data): se...
18.64
65
0.614807
import time import logging from . import compat class FileHandler(object): def __init__(self): self.file = None def open(self, key): self.file = compat.open('log/{}.log'.format(key), 'a', 0) def write(self, data): self.file.write(u"{} {}\n".format(get_time(), data)) def cl...
true
true
1c4043df8db9292235261a8d7600bc65b6fee9d9
268
py
Python
1st Year - CS/Python - Language/Lab 15 - 28th May/swap1stlast.py
rahularepaka/CSLab
6d223b8814ad04a5821cbe63bf059f5726ff22ce
[ "MIT" ]
null
null
null
1st Year - CS/Python - Language/Lab 15 - 28th May/swap1stlast.py
rahularepaka/CSLab
6d223b8814ad04a5821cbe63bf059f5726ff22ce
[ "MIT" ]
null
null
null
1st Year - CS/Python - Language/Lab 15 - 28th May/swap1stlast.py
rahularepaka/CSLab
6d223b8814ad04a5821cbe63bf059f5726ff22ce
[ "MIT" ]
null
null
null
import math n = int(input()) length = (math.log10(n)) + 1 last = n%10 n_str = str(n) first = int(n_str[0]) temp = first first = last last = temp n_last = n%10 n_last = n/10 n_last = int(n_last) n_last_str = str(n_last) print(str(first)+n_last_str[1:]+str(last))
12.761905
42
0.652985
import math n = int(input()) length = (math.log10(n)) + 1 last = n%10 n_str = str(n) first = int(n_str[0]) temp = first first = last last = temp n_last = n%10 n_last = n/10 n_last = int(n_last) n_last_str = str(n_last) print(str(first)+n_last_str[1:]+str(last))
true
true
1c4044d2b136624b7d29bcf8552335ac76d0db28
353
py
Python
wagtail/wagtailembeds/apps.py
patphongs/wagtail
32555f7a1c599c139e0f26c22907c9612af2e015
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailembeds/apps.py
patphongs/wagtail
32555f7a1c599c139e0f26c22907c9612af2e015
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailembeds/apps.py
patphongs/wagtail
32555f7a1c599c139e0f26c22907c9612af2e015
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals from django.apps import AppConfig from .finders import get_finders class WagtailEmbedsAppConfig(AppConfig): name = 'wagtail.wagtailembeds' label = 'wagtailembeds' verbose_name = "Wagtail embeds" def ready(self): # Check configuration ...
22.0625
56
0.739377
from __future__ import absolute_import, unicode_literals from django.apps import AppConfig from .finders import get_finders class WagtailEmbedsAppConfig(AppConfig): name = 'wagtail.wagtailembeds' label = 'wagtailembeds' verbose_name = "Wagtail embeds" def ready(self): get_finders()...
true
true
1c4045a0c7e598cc9b3628a0f6c725ceda8892bb
676
py
Python
meteors.py
VaultHack/Codename-GAME-
86faefb872298dc71494110bdc22ebb3f31a0350
[ "Apache-2.0" ]
3
2018-03-21T18:27:40.000Z
2018-03-29T06:25:50.000Z
meteors.py
VaultHack/Codename-GAME-
86faefb872298dc71494110bdc22ebb3f31a0350
[ "Apache-2.0" ]
null
null
null
meteors.py
VaultHack/Codename-GAME-
86faefb872298dc71494110bdc22ebb3f31a0350
[ "Apache-2.0" ]
2
2018-03-21T18:27:55.000Z
2018-03-29T06:25:37.000Z
import pygame, random from pygame.sprite import Sprite class Meteors(Sprite): def __init__(self, game_settings, screen): super().__init__() self.screen = screen self.game_settings = game_settings # self.image = pygame.image.load("images/meteor1.png") self.rect = self.image.get_rect() self.screen_re...
23.310345
54
0.701183
import pygame, random from pygame.sprite import Sprite class Meteors(Sprite): def __init__(self, game_settings, screen): super().__init__() self.screen = screen self.game_settings = game_settings self.image = pygame.image.load("images/meteor1.png") self.rect = self.image.get_rect() self.screen_rect...
true
true
1c404714760ad68eec15387c4f7353a92c6813b3
3,593
py
Python
test/pathod/test_language_actions.py
dolfly/mitmproxy
4604c25c6055a37e5f25a238d2a089759bd5d98a
[ "MIT" ]
null
null
null
test/pathod/test_language_actions.py
dolfly/mitmproxy
4604c25c6055a37e5f25a238d2a089759bd5d98a
[ "MIT" ]
null
null
null
test/pathod/test_language_actions.py
dolfly/mitmproxy
4604c25c6055a37e5f25a238d2a089759bd5d98a
[ "MIT" ]
null
null
null
import cStringIO from pathod.language import actions from pathod import language def parse_request(s): return language.parse_pathoc(s).next() def test_unique_name(): assert not actions.PauseAt(0, "f").unique_name assert actions.DisconnectAt(0).unique_name class TestDisconnects: def test_parse_pa...
26.419118
66
0.561091
import cStringIO from pathod.language import actions from pathod import language def parse_request(s): return language.parse_pathoc(s).next() def test_unique_name(): assert not actions.PauseAt(0, "f").unique_name assert actions.DisconnectAt(0).unique_name class TestDisconnects: def test_parse_pa...
true
true
1c4047fca52bbc1922c2ef1b4056844b19f0cf9c
402
py
Python
Projects/urls.py
Shreya549/Project-Generator-Backend
f77b945dd9a84bde0aecb8755a5157a5cf4fec4f
[ "MIT" ]
null
null
null
Projects/urls.py
Shreya549/Project-Generator-Backend
f77b945dd9a84bde0aecb8755a5157a5cf4fec4f
[ "MIT" ]
null
null
null
Projects/urls.py
Shreya549/Project-Generator-Backend
f77b945dd9a84bde0aecb8755a5157a5cf4fec4f
[ "MIT" ]
1
2022-02-22T17:20:13.000Z
2022-02-22T17:20:13.000Z
from django.urls import path, include from rest_framework.routers import SimpleRouter from .views import ( ProjectViewSet, ViewProjectViewSet, MyProjectsViewSet, ) router = SimpleRouter() router.register('new', ProjectViewSet, basename="new") router.register('view', ViewProjectViewSet, basename="view") r...
23.647059
60
0.771144
from django.urls import path, include from rest_framework.routers import SimpleRouter from .views import ( ProjectViewSet, ViewProjectViewSet, MyProjectsViewSet, ) router = SimpleRouter() router.register('new', ProjectViewSet, basename="new") router.register('view', ViewProjectViewSet, basename="view") r...
true
true
1c404828cc0e3e521538877140a9b2e03c49c434
7,270
py
Python
cogs/twittercog.py
nluedtke/brochat-bot
9a9a3e89fbcd35a791b1842d73f3aa0e2c3f985d
[ "MIT" ]
18
2017-08-23T17:26:30.000Z
2021-04-04T03:05:04.000Z
cogs/twittercog.py
nluedtke/brochat-bot
9a9a3e89fbcd35a791b1842d73f3aa0e2c3f985d
[ "MIT" ]
36
2017-08-21T14:23:43.000Z
2020-06-29T14:11:57.000Z
cogs/twittercog.py
nluedtke/brochat-bot
9a9a3e89fbcd35a791b1842d73f3aa0e2c3f985d
[ "MIT" ]
5
2017-08-24T04:05:41.000Z
2021-08-13T09:44:36.000Z
import asyncio from datetime import datetime from random import randint, shuffle import common from cogs.duelcog import item_chance_roll from discord.ext import commands from twython import TwythonError class Twitter(commands.Cog): """ Twitter Fetchers""" def __init__(self, bot): self.bot = bot ...
33.657407
80
0.550894
import asyncio from datetime import datetime from random import randint, shuffle import common from cogs.duelcog import item_chance_roll from discord.ext import commands from twython import TwythonError class Twitter(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(name="tru...
true
true
1c4048e58ed6a692da19af14e93f886adc543c8c
4,683
py
Python
openpeerpower/components/fritzbox_netmonitor/sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/fritzbox_netmonitor/sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/fritzbox_netmonitor/sensor.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Support for monitoring an AVM Fritz!Box router.""" from datetime import timedelta import logging from fritzconnection.core.exceptions import FritzConnectionException from fritzconnection.lib.fritzstatus import FritzStatus from requests.exceptions import RequestException import voluptuous as vol from openpeerpower....
35.477273
79
0.704036
from datetime import timedelta import logging from fritzconnection.core.exceptions import FritzConnectionException from fritzconnection.lib.fritzstatus import FritzStatus from requests.exceptions import RequestException import voluptuous as vol from openpeerpower.components.sensor import PLATFORM_SCHEMA, SensorEntity...
true
true
1c404903e53fc5a58dce23929d40cd330cab97d2
8,596
py
Python
tensorflow/contrib/learn/python/learn/metric_spec.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
65
2016-09-26T01:30:40.000Z
2021-08-11T17:00:41.000Z
tensorflow/contrib/learn/python/learn/metric_spec.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
5
2017-02-21T08:37:52.000Z
2017-03-29T05:46:05.000Z
tensorflow/contrib/learn/python/learn/metric_spec.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
11
2017-09-10T16:22:21.000Z
2021-08-09T09:24:50.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.035398
80
0.648557
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.platform import tf_logging as logging class MetricSpec(object): def __init__(self, metric_fn, prediction_key=None, label_k...
true
true