hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7903fd0ee7c73dba66b4a548782c9343fc95b6ec
3,928
py
Python
custom_components/mintmobile/api.py
KTibow/HA-Mint-Mobile
55ef863b09608e44e13399b4577893d5405b78be
[ "MIT" ]
null
null
null
custom_components/mintmobile/api.py
KTibow/HA-Mint-Mobile
55ef863b09608e44e13399b4577893d5405b78be
[ "MIT" ]
null
null
null
custom_components/mintmobile/api.py
KTibow/HA-Mint-Mobile
55ef863b09608e44e13399b4577893d5405b78be
[ "MIT" ]
null
null
null
import requests import datetime class BearerAuth(requests.auth.AuthBase): def __init__(self, token): self.token = token def __call__(self, r): r.headers["authorization"] = "Bearer " + self.token return r class MintMobile: def __init__(self, phone_number, password): self.pho...
41.347368
152
0.643075
import requests import datetime class BearerAuth(requests.auth.AuthBase): def __init__(self, token): self.token = token def __call__(self, r): r.headers["authorization"] = "Bearer " + self.token return r class MintMobile: def __init__(self, phone_number, password): self.pho...
true
true
7903fd1d5c77b3edd8916e6063615ebb5e8d8931
1,783
py
Python
nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
nipype/interfaces/slicer/legacy/tests/test_auto_MultiResolutionAffineRegistration.py
felixsc1/nipype
e722d6170593583f16ddfcb95473e5d30b5f1d7c
[ "Apache-2.0" ]
1
2020-07-17T12:49:49.000Z
2020-07-17T12:49:49.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..registration import MultiResolutionAffineRegistration def test_MultiResolutionAffineRegistration_inputs(): input_map = dict( args=dict(argstr='%s', ), environ=dict( nohash=True, ...
34.288462
67
0.610768
from __future__ import unicode_literals from ..registration import MultiResolutionAffineRegistration def test_MultiResolutionAffineRegistration_inputs(): input_map = dict( args=dict(argstr='%s', ), environ=dict( nohash=True, usedefault=True, ), fixedImage=d...
true
true
7903fdbae9e4657eae5e15d13111c09ad7522103
2,147
py
Python
Python/DataStructure/TreeDS/ExpressionTree.py
adityalata/AlgorithmsAndDataStructure
93de2f63ad027f42c368c78690b7a59545541852
[ "MIT" ]
null
null
null
Python/DataStructure/TreeDS/ExpressionTree.py
adityalata/AlgorithmsAndDataStructure
93de2f63ad027f42c368c78690b7a59545541852
[ "MIT" ]
null
null
null
Python/DataStructure/TreeDS/ExpressionTree.py
adityalata/AlgorithmsAndDataStructure
93de2f63ad027f42c368c78690b7a59545541852
[ "MIT" ]
1
2021-01-12T21:00:04.000Z
2021-01-12T21:00:04.000Z
# Date 3/10/2020 # __Author__ : AdityaLata # __Package__ : Python 3 # __GitHub__ : https://www.github.com/adityalata from Python.DataStructure.TreeDS.Node import Node # A utility function to check if 'c' is an operator def isOperator(c): if c == '+' or c == '-' or c == '*' or c == '/' or c == '^': ...
25.258824
84
0.615277
from Python.DataStructure.TreeDS.Node import Node def isOperator(c): if c == '+' or c == '-' or c == '*' or c == '/' or c == '^': return True else: return False def getExpressionTree(postfix): stack = [] for char in postfix: if char == " ": ...
true
true
7903fe2fe472c55bd786a4267486161ebf6e899d
751
py
Python
support/classifiers.py
rknop/amuse
85d5bdcc29cfc87dc69d91c264101fafd6658aec
[ "Apache-2.0" ]
6
2016-03-29T07:26:20.000Z
2019-02-12T11:52:05.000Z
support/classifiers.py
rknop/amuse
85d5bdcc29cfc87dc69d91c264101fafd6658aec
[ "Apache-2.0" ]
9
2017-03-16T12:12:40.000Z
2021-12-20T10:49:56.000Z
support/classifiers.py
rieder/amuse
3ac3b6b8f922643657279ddee5c8ab3fc0440d5e
[ "Apache-2.0" ]
null
null
null
classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: M...
30.04
57
0.624501
classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: M...
true
true
7903fe41431bd1906bdd213a65170f89577a7dc8
2,013
py
Python
farms2face/home/templatetags/common_tags.py
dev1farms2face/f2f
54e58187a68574bf2bd0dfb7e58a2b416336106a
[ "MIT" ]
null
null
null
farms2face/home/templatetags/common_tags.py
dev1farms2face/f2f
54e58187a68574bf2bd0dfb7e58a2b416336106a
[ "MIT" ]
null
null
null
farms2face/home/templatetags/common_tags.py
dev1farms2face/f2f
54e58187a68574bf2bd0dfb7e58a2b416336106a
[ "MIT" ]
2
2018-06-19T12:12:08.000Z
2018-06-25T18:45:36.000Z
from django import template from home.models import Recipe, MixingAgent, Base, Ingredient, FacePack, CustomFacePack import pdb register = template.Library() @register.inclusion_tag('facepack.html') def facepack_display(item_id): if not item_id: return mandatory = [] type = "primary" for cfp in...
31.952381
101
0.562842
from django import template from home.models import Recipe, MixingAgent, Base, Ingredient, FacePack, CustomFacePack import pdb register = template.Library() @register.inclusion_tag('facepack.html') def facepack_display(item_id): if not item_id: return mandatory = [] type = "primary" for cfp in...
true
true
7904001743f764f3d1fd7a9ab2e28238025fbcaa
20,446
py
Python
Pyro5/serializers.py
gst/Pyro5
032f635e771b2770f751f133274f0c6d1132d6d8
[ "MIT" ]
null
null
null
Pyro5/serializers.py
gst/Pyro5
032f635e771b2770f751f133274f0c6d1132d6d8
[ "MIT" ]
null
null
null
Pyro5/serializers.py
gst/Pyro5
032f635e771b2770f751f133274f0c6d1132d6d8
[ "MIT" ]
null
null
null
""" The various serializers. Pyro - Python Remote Objects. Copyright by Irmen de Jong (irmen@razorvine.net). """ import array import builtins import uuid import logging import struct import datetime import decimal import numbers import inspect import marshal import json import serpent import msgpack from . import er...
40.487129
136
0.638316
import array import builtins import uuid import logging import struct import datetime import decimal import numbers import inspect import marshal import json import serpent import msgpack from . import errors __all__ = ["SerializerBase", "SerpentSerializer", "JsonSerializer", "MarshalSerializer", "MsgpackSerializer",...
true
true
790400b0b1b0003ce3a396e13e8927243452890d
4,152
py
Python
graphic/tsp_matt.py
mattaereal/AntColonyOptimization
b45df28cb181395d290d6c6accbc9297fa863aff
[ "MIT" ]
null
null
null
graphic/tsp_matt.py
mattaereal/AntColonyOptimization
b45df28cb181395d290d6c6accbc9297fa863aff
[ "MIT" ]
null
null
null
graphic/tsp_matt.py
mattaereal/AntColonyOptimization
b45df28cb181395d290d6c6accbc9297fa863aff
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- encoding: utf-8 -*- import pygame import sys import numpy as np CONST_LOCK_FILE = "lock.txt" #CONST_GRAPH_FILE = "../tsptours/graph.tsp" CONST_GRAPH_FILE = "graph.tsp" CONST_STOP = "STOP" CONST_CUSTOM_FILE = None def main(): pygame.init() screen = pygame.display.set_mode((700,7...
39.923077
145
0.509152
import pygame import sys import numpy as np CONST_LOCK_FILE = "lock.txt" CONST_GRAPH_FILE = "graph.tsp" CONST_STOP = "STOP" CONST_CUSTOM_FILE = None def main(): pygame.init() screen = pygame.display.set_mode((700,700)) screen.fill((255,255,255)) pygame.display.set_caption("Ant Colony TSP Solver ...
false
true
790402b801341eea86957f16f618826e2f8c3afb
6,444
py
Python
neutron/conf/policies/security_group.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,080
2015-01-04T08:35:00.000Z
2022-03-27T09:15:52.000Z
neutron/conf/policies/security_group.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
24
2015-02-21T01:48:28.000Z
2021-11-26T02:38:56.000Z
neutron/conf/policies/security_group.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,241
2015-01-02T10:47:10.000Z
2022-03-27T09:42:23.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
35.021739
76
0.620112
from oslo_log import versionutils from oslo_policy import policy from neutron.conf.policies import base DEPRECATED_REASON = ( "The security group API now supports system scope and default roles.") SG_COLLECTION_PATH = '/security-groups' SG_RESOURCE_PATH = '/security-groups/{id}' RULE_COLLECTION_PATH...
true
true
79040342f793b61a5f240c5a7ee2018396e91425
5,974
py
Python
test/unit/test_cypher_encoding.py
CyberGRX/py2neo
3e4a5a799761e6dd335e0d8e4b7d47cfff98f793
[ "Apache-2.0" ]
null
null
null
test/unit/test_cypher_encoding.py
CyberGRX/py2neo
3e4a5a799761e6dd335e0d8e4b7d47cfff98f793
[ "Apache-2.0" ]
null
null
null
test/unit/test_cypher_encoding.py
CyberGRX/py2neo
3e4a5a799761e6dd335e0d8e4b7d47cfff98f793
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2019, Nigel Small # # 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...
31.114583
83
0.61165
from unittest import TestCase from neotime import Date, Time, DateTime, Duration from py2neo.data import Node from py2neo.cypher import cypher_escape, cypher_repr from py2neo.cypher.encoding import LabelSetView, PropertyDictView, PropertySelector class LabelSetViewTestCase(TestCase): def test...
true
true
790403ce5ce41a285ed6bfe1458f484eb6c52178
879
py
Python
statarb/src/python/bin/get_calcres_files.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
statarb/src/python/bin/get_calcres_files.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
2
2019-02-23T18:54:22.000Z
2019-11-09T01:30:32.000Z
statarb/src/python/bin/get_calcres_files.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
#!/usr/bin/env python import glob import re from optparse import OptionParser parser = OptionParser() parser.add_option("-c", "--calctime", dest="calctime", type=int, default=1400) parser.add_option("-s", "--startdate", dest="startdate", type=int) parser.add_option("-r", "--rootdir", dest="rootdir", default="/apps/mu...
30.310345
102
0.632537
import glob import re from optparse import OptionParser parser = OptionParser() parser.add_option("-c", "--calctime", dest="calctime", type=int, default=1400) parser.add_option("-s", "--startdate", dest="startdate", type=int) parser.add_option("-r", "--rootdir", dest="rootdir", default="/apps/multex/trade/run/live-p...
false
true
7904047e8c69111e72f0d3f569feb45a35bdf839
60,806
py
Python
venv/lib/python3.8/site-packages/azure/mgmt/containerservice/v2019_02_01/models/_models.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azure/mgmt/containerservice/v2019_02_01/models/_models.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azure/mgmt/containerservice/v2019_02_01/models/_models.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.776818
139
0.670526
from msrest.serialization import Model from msrest.exceptions import HttpOperationError class SubResource(Model): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': ...
true
true
7904049aa69210bd9a6fd8dccbcd790dc4d0c7e4
2,684
py
Python
oemof_examples/oemof.solph/v0.4.x/activity_costs/activity_costs.py
ekatef/oemof-examples
f16511d20008c30889a6e75a788a3a1a0bc632c2
[ "MIT" ]
28
2018-11-10T12:14:04.000Z
2022-01-14T00:01:09.000Z
oemof_examples/oemof.solph/v0.4.x/activity_costs/activity_costs.py
ekatef/oemof-examples
f16511d20008c30889a6e75a788a3a1a0bc632c2
[ "MIT" ]
28
2018-11-08T06:58:06.000Z
2022-02-22T18:58:17.000Z
oemof_examples/oemof.solph/v0.4.x/activity_costs/activity_costs.py
oemof/examples
4805d5cef03141a917fd8a9e1141acfa8cc9d781
[ "MIT" ]
55
2018-11-09T09:50:36.000Z
2022-03-08T10:31:02.000Z
# -*- coding: utf-8 -*- """ General description ------------------- This example illustrates the effect of activity_costs. There are the following components: - demand_heat: heat demand (constant, for the sake of simplicity) - fireplace: wood firing, burns "for free" if somebody is around - boiler: gas f...
27.387755
74
0.554024
import numpy as np import pandas as pd from oemof import solph try: import matplotlib.pyplot as plt except ImportError: plt = None
true
true
790405ca1ec43439286778dca338ff1f1288395f
473
py
Python
tests/mock_requests.py
OtGabaldon/multiSourceWordMaps
923caebbcd7cabce7dc4bb9ef9c845c4c9ea6ad5
[ "MIT" ]
null
null
null
tests/mock_requests.py
OtGabaldon/multiSourceWordMaps
923caebbcd7cabce7dc4bb9ef9c845c4c9ea6ad5
[ "MIT" ]
null
null
null
tests/mock_requests.py
OtGabaldon/multiSourceWordMaps
923caebbcd7cabce7dc4bb9ef9c845c4c9ea6ad5
[ "MIT" ]
null
null
null
import os class MockRequests: def __init__(self): return def get(self, source): source_no_http = source.replace("http://","") test_website_path = f"{os.path.dirname(os.path.abspath(__file__))}/test_data/test_website/{source_no_http}" with open(test_website_path,'r') ...
26.277778
116
0.621564
import os class MockRequests: def __init__(self): return def get(self, source): source_no_http = source.replace("http://","") test_website_path = f"{os.path.dirname(os.path.abspath(__file__))}/test_data/test_website/{source_no_http}" with open(test_website_path,'r') ...
true
true
7904061c657812f2da8fb8d8888576d00ed82345
146
py
Python
virtual/bin/django-admin.py
Anitha987/Hood-Track
7ecaecbb68a56c27aa396fddcdcbacb185d9e007
[ "Unlicense" ]
null
null
null
virtual/bin/django-admin.py
Anitha987/Hood-Track
7ecaecbb68a56c27aa396fddcdcbacb185d9e007
[ "Unlicense" ]
null
null
null
virtual/bin/django-admin.py
Anitha987/Hood-Track
7ecaecbb68a56c27aa396fddcdcbacb185d9e007
[ "Unlicense" ]
null
null
null
#!/home/anitha/Track/virtual/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
24.333333
42
0.780822
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
7904075b7c11dede08810f8bfc4e12b090cad734
10,850
py
Python
src/data/datasets/mimic_cxr/section_parser.py
philip-mueller/lovt
91cf2094a0e140b8431b8e4ebadc56547a8df6b2
[ "MIT" ]
3
2021-12-15T07:53:36.000Z
2022-01-05T17:02:45.000Z
src/data/datasets/mimic_cxr/section_parser.py
philip-mueller/lovt
91cf2094a0e140b8431b8e4ebadc56547a8df6b2
[ "MIT" ]
null
null
null
src/data/datasets/mimic_cxr/section_parser.py
philip-mueller/lovt
91cf2094a0e140b8431b8e4ebadc56547a8df6b2
[ "MIT" ]
3
2021-12-14T11:17:43.000Z
2021-12-16T07:35:43.000Z
""" From https://zenodo.org/record/3539363 """ import re def section_text(text): """Splits text into sections. Assumes text is in a radiology report format, e.g.: COMPARISON: Chest radiograph dated XYZ. IMPRESSION: ABC... Given text like this, it will output text from each section, ...
39.59854
79
0.589677
import re def section_text(text): p_section = re.compile( r'\n ([A-Z ()/,-]+):\s', re.DOTALL) sections = list() section_names = list() section_idx = list() idx = 0 s = p_section.search(text, idx) if s: sections.append(text[0:s.start(1)]) section_names.append('pre...
true
true
79040934076be8f5568f60b84038d03e8bde4326
5,074
py
Python
test/functional/test_framework/wallet_util.py
ludirium/ludirium
d2c6d7855ed98c62b6c9431e695d9b1a791255a6
[ "MIT" ]
null
null
null
test/functional/test_framework/wallet_util.py
ludirium/ludirium
d2c6d7855ed98c62b6c9431e695d9b1a791255a6
[ "MIT" ]
null
null
null
test/functional/test_framework/wallet_util.py
ludirium/ludirium
d2c6d7855ed98c62b6c9431e695d9b1a791255a6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Ludirium Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Useful util functions for testing the wallet""" from collections import namedtuple from test_framewor...
39.640625
118
0.615294
from collections import namedtuple from test_framework.address import ( byte_to_base58, key_to_p2pkh, key_to_p2sh_p2wpkh, key_to_p2wpkh, script_to_p2sh, script_to_p2sh_p2wsh, script_to_p2wsh, ) from test_framework.key import ECKey from test_framework.script import ( CScript, OP_...
true
true
790409f8a12c8f871efa01911ec036b9aeba5b8f
744
py
Python
py3canvas/tests/quiz_submission_files.py
tylerclair/py3canvas
7485d458606b65200f0ffa5bbe597a9d0bee189f
[ "MIT" ]
null
null
null
py3canvas/tests/quiz_submission_files.py
tylerclair/py3canvas
7485d458606b65200f0ffa5bbe597a9d0bee189f
[ "MIT" ]
null
null
null
py3canvas/tests/quiz_submission_files.py
tylerclair/py3canvas
7485d458606b65200f0ffa5bbe597a9d0bee189f
[ "MIT" ]
null
null
null
"""QuizSubmissionFiles API Tests for Version 1.0. This is a testing template for the generated QuizSubmissionFilesAPI Class. """ import unittest import requests import secrets from py3canvas.apis.quiz_submission_files import QuizSubmissionFilesAPI class TestQuizSubmissionFilesAPI(unittest.TestCase): """Tests for...
32.347826
126
0.752688
import unittest import requests import secrets from py3canvas.apis.quiz_submission_files import QuizSubmissionFilesAPI class TestQuizSubmissionFilesAPI(unittest.TestCase): def setUp(self): self.client = QuizSubmissionFilesAPI( secrets.instance_address, secrets.access_token ) def ...
true
true
79040b3e983ee4bd243d74e0ee28efe1185f4293
926
py
Python
backoffice/migrations/0006_auto_20210225_1755.py
mono57/verger.stock-mgmt
f8de21738f435f9dc2d604e0aa8187a81d04c50a
[ "MIT" ]
null
null
null
backoffice/migrations/0006_auto_20210225_1755.py
mono57/verger.stock-mgmt
f8de21738f435f9dc2d604e0aa8187a81d04c50a
[ "MIT" ]
1
2021-02-23T15:54:30.000Z
2021-02-23T15:54:30.000Z
backoffice/migrations/0006_auto_20210225_1755.py
mono57/verger.stock-mgmt
f8de21738f435f9dc2d604e0aa8187a81d04c50a
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-02-25 17:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('backoffice', '0005_auto_20210225_1712'), ] operations = [ migrations.AddField( model_name='buyi...
30.866667
132
0.631749
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('backoffice', '0005_auto_20210225_1712'), ] operations = [ migrations.AddField( model_name='buyingentry', name='partition', ...
true
true
79040c03d6dad6d08291960465ba46fab0ba9ac7
1,634
py
Python
venv/lib/python3.8/site-packages/vsts/build/v4_1/models/source_provider_attributes.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/build/v4_1/models/source_provider_attributes.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/build/v4_1/models/source_provider_attributes.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
48.058824
101
0.585679
from msrest.serialization import Model class SourceProviderAttributes(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'supported_capabilities': {'key': 'supportedCapabilities', 'type': '{bool}'}, 'supported_triggers': {'key': 'supportedTriggers', 'type'...
true
true
79040d3424cd406b1eff8f8ac2307df05ba665ad
1,527
py
Python
regression/era/era.py
b8raoult/magics
eb2c86ec6e392e89c90044128dc671f22283d6ad
[ "ECL-2.0", "Apache-2.0" ]
41
2018-12-07T23:10:50.000Z
2022-02-19T03:01:49.000Z
regression/era/era.py
b8raoult/magics
eb2c86ec6e392e89c90044128dc671f22283d6ad
[ "ECL-2.0", "Apache-2.0" ]
59
2019-01-04T15:43:30.000Z
2022-03-31T09:48:15.000Z
regression/era/era.py
b8raoult/magics
eb2c86ec6e392e89c90044128dc671f22283d6ad
[ "ECL-2.0", "Apache-2.0" ]
13
2019-01-07T14:36:33.000Z
2021-09-06T14:48:36.000Z
# (C) Copyright 1996-2016 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergov...
25.032787
80
0.698756
from Magics.macro import * ref = 'era' output = output(output_formats=['png'], output_name_first_page_number='off', output_name=ref) projection = mmap( subpage_x_length=24., subpage_upper_right_longitude=50.00, subpage_upper_right_latitude=65.00, subpage_...
true
true
79040d7b3d17c727a4cdd785008bae2aa56409a7
331
py
Python
HackerRank/Data Structures/Trees/height-of-a-binary-tree.py
danielfsousa/algorithms-solutions
038c0c0bf6d89ffb1ecea596e7d4bb9bd4154ff1
[ "MIT" ]
1
2020-03-17T23:54:32.000Z
2020-03-17T23:54:32.000Z
HackerRank/Data Structures/Trees/height-of-a-binary-tree.py
danielfsousa/algorithms-solutions
038c0c0bf6d89ffb1ecea596e7d4bb9bd4154ff1
[ "MIT" ]
null
null
null
HackerRank/Data Structures/Trees/height-of-a-binary-tree.py
danielfsousa/algorithms-solutions
038c0c0bf6d89ffb1ecea596e7d4bb9bd4154ff1
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/tree-height-of-a-binary-tree/problem def height(root): """ DFS v = Vertices e = Edges d = Depth Time complexity: O(v + e) Space complexity: O(d) """ if root: return 1 + max(height(root.left), height(root.right)) else: ...
17.421053
76
0.567976
def height(root): if root: return 1 + max(height(root.left), height(root.right)) else: return -1
true
true
79040e17c7d11f1e2d106744bb6d5fbf91907f6f
65
py
Python
example/mylib-2.0/mylib.py
mitsuhiko/multiversion
3e7c6e1b95b73be633f498d381345b49a877a857
[ "BSD-3-Clause" ]
37
2015-11-05T03:40:40.000Z
2021-11-22T23:18:19.000Z
example/mylib-2.0/mylib.py
mitsuhiko/multiversion
3e7c6e1b95b73be633f498d381345b49a877a857
[ "BSD-3-Clause" ]
1
2019-05-17T08:16:21.000Z
2019-05-17T08:21:07.000Z
example/mylib-2.0/mylib.py
mitsuhiko/multiversion
3e7c6e1b95b73be633f498d381345b49a877a857
[ "BSD-3-Clause" ]
9
2015-05-11T03:40:55.000Z
2022-02-07T16:22:15.000Z
version = '2.0' import mylib print 'self import in 2.0:', mylib
13
34
0.676923
version = '2.0' import mylib print 'self import in 2.0:', mylib
false
true
79040e7428db2955d89ca4c36c7ff848e0db155a
3,958
py
Python
face-rec/config.py
csgcmai/lqp_face
db4ec672b352044692f8d1bcbfa181b35567b95c
[ "BSD-3-Clause" ]
1
2020-04-06T16:31:56.000Z
2020-04-06T16:31:56.000Z
face-rec/config.py
csgcmai/lqp_face
db4ec672b352044692f8d1bcbfa181b35567b95c
[ "BSD-3-Clause" ]
null
null
null
face-rec/config.py
csgcmai/lqp_face
db4ec672b352044692f8d1bcbfa181b35567b95c
[ "BSD-3-Clause" ]
null
null
null
# Configuration file with default options, # There are four main sections: General, Features, LQP and Learning corresponding to different # functionalities. You can disable any of the Features or Learning section (by commenting it out) according to your requirement. [General] # general options idir=/home/hussain/dat...
68.241379
256
0.698585
[General] idir=/home/hussain/datasets/LFW/lfwa odir=/scratch/testing/new-experiments/ dataset=LFW width=80 height=150 padding=10 xoffset=1 yoffset=-4 cbdataset=train-val
false
true
79040ee42e9d48bfae8ed960aabe08c30bf0134f
1,135
py
Python
biotransformers/utils/deprecated.py
ahmed-dj/bio-transformers
f7a08d75c2496db2bbd42ca4fcb95a48fc43a325
[ "Apache-2.0" ]
null
null
null
biotransformers/utils/deprecated.py
ahmed-dj/bio-transformers
f7a08d75c2496db2bbd42ca4fcb95a48fc43a325
[ "Apache-2.0" ]
null
null
null
biotransformers/utils/deprecated.py
ahmed-dj/bio-transformers
f7a08d75c2496db2bbd42ca4fcb95a48fc43a325
[ "Apache-2.0" ]
null
null
null
import functools import warnings def deprecated_alias(**aliases): def deco(f): @functools.wraps(f) def wrapper(*args, **kwargs): rename_kwargs(f.__name__, kwargs, aliases) return f(*args, **kwargs) return wrapper return deco def rename_kwargs(func_name, kwar...
29.868421
95
0.5163
import functools import warnings def deprecated_alias(**aliases): def deco(f): @functools.wraps(f) def wrapper(*args, **kwargs): rename_kwargs(f.__name__, kwargs, aliases) return f(*args, **kwargs) return wrapper return deco def rename_kwargs(func_name, kwar...
true
true
79040eed931a507c8701c847570903d6715a6f2e
9,615
py
Python
arcface/resnet_cbam.py
DerryHub/the-TaobaoLive-Commodity-Identify-Competition
7e5e5c4fbddd9949fe01810d58bd7994889c007c
[ "MIT" ]
4
2020-08-15T14:49:37.000Z
2022-01-16T08:34:07.000Z
arcface/resnet_cbam.py
weilin-droid/the-TaobaoLive-Commodity-Identify-Competition
7e5e5c4fbddd9949fe01810d58bd7994889c007c
[ "MIT" ]
null
null
null
arcface/resnet_cbam.py
weilin-droid/the-TaobaoLive-Commodity-Identify-Competition
7e5e5c4fbddd9949fe01810d58bd7994889c007c
[ "MIT" ]
2
2021-05-26T05:16:09.000Z
2021-06-09T09:07:49.000Z
import torch import torch.nn as nn import math from arcface.utils import l2_norm, Flatten, SentVec_TFIDF model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://download.pytorch.org...
33.618881
87
0.562142
import torch import torch.nn as nn import math from arcface.utils import l2_norm, Flatten, SentVec_TFIDF model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://download.pytorch.org...
true
true
79040fd264c62a3212a6d1e39120e3bd8b887c0c
15,407
py
Python
TableData.py
mokko/PyTableData
06890c8981bd1ca1de1a87c9c15f21c35b0fda8b
[ "Apache-2.0" ]
null
null
null
TableData.py
mokko/PyTableData
06890c8981bd1ca1de1a87c9c15f21c35b0fda8b
[ "Apache-2.0" ]
null
null
null
TableData.py
mokko/PyTableData
06890c8981bd1ca1de1a87c9c15f21c35b0fda8b
[ "Apache-2.0" ]
null
null
null
import os ''' TableData deals with data that comes from MS Excel, csv, xml. More precisely, it expects a single table which has headings in the first row. It converts between these formats and usually keeps information on a round trip between those formats identical. TableData also allows for simple transformations,...
31.507157
130
0.541247
import os class TableData: def verbose (self, msg): if self._verbose: print (msg) def _uniqueColumns (self): if len(set(self.table[0])) != len(self.table[0]): raise Exception('Column names not unique') def __init__ (self, ingester, infile, verbose=None):...
true
true
790411e7bc5f3e702dbb4fea9c70d0af99e23705
3,075
py
Python
examine_vectors.py
ajitrajasekharan/bert_mask
33c7067134f2696b849fdb273443306026c5527d
[ "MIT" ]
24
2019-12-21T15:08:29.000Z
2022-01-18T16:41:41.000Z
examine_vectors.py
ajitrajasekharan/bert_mask
33c7067134f2696b849fdb273443306026c5527d
[ "MIT" ]
1
2021-09-06T08:57:35.000Z
2021-09-06T09:52:52.000Z
examine_vectors.py
ajitrajasekharan/bert_mask
33c7067134f2696b849fdb273443306026c5527d
[ "MIT" ]
7
2019-12-17T17:10:59.000Z
2022-03-02T20:19:05.000Z
import torch from transformers import * import pdb import operator from collections import OrderedDict import sys # OPTIONAL: if you want to have more information on what's happening, activate the logger as follows import logging logging.basicConfig(level=logging.INFO) PATH='bert-base-cased' # Load pre-trained model...
30.147059
100
0.59935
import torch from transformers import * import pdb import operator from collections import OrderedDict import sys import logging logging.basicConfig(level=logging.INFO) PATH='bert-base-cased' # Load pre-trained model tokenizer (vocabulary) tokenizer = BertTokenizer.from_pretrained(PATH,do_lower_case=False) model = ...
true
true
790412db427107f1867883f7ce1885b564a56b43
1,227
py
Python
cgan/utils.py
GodWriter/GAN-Pytorch
42e0657ae4844c9644a2c382de6af977733d9074
[ "Apache-2.0" ]
8
2020-07-20T13:18:18.000Z
2021-03-22T07:14:03.000Z
cgan/utils.py
GodWriter/GAN-Pytorch
42e0657ae4844c9644a2c382de6af977733d9074
[ "Apache-2.0" ]
null
null
null
cgan/utils.py
GodWriter/GAN-Pytorch
42e0657ae4844c9644a2c382de6af977733d9074
[ "Apache-2.0" ]
1
2020-08-12T07:33:05.000Z
2020-08-12T07:33:05.000Z
import os import imageio import numpy as np from PIL import Image from torch.autograd import Variable from torchvision.utils import save_image def create_gif(image_path): frames = [] gif_name = os.path.join("images", 'mnist1.gif') image_list = os.listdir(image_path) sorted(image_list) for image...
26.106383
90
0.691932
import os import imageio import numpy as np from PIL import Image from torch.autograd import Variable from torchvision.utils import save_image def create_gif(image_path): frames = [] gif_name = os.path.join("images", 'mnist1.gif') image_list = os.listdir(image_path) sorted(image_list) for image...
true
true
79041390966a2807262471c30d556211b6a6eaf9
14,354
py
Python
char_PTB/char_ptb.py
CookieBox26/trellisnet
356b1d9828012cc4929728a492b771c44161e089
[ "MIT" ]
442
2018-10-17T14:59:26.000Z
2022-03-13T11:24:42.000Z
TrellisNet/char_PTB/char_ptb.py
chr6192/trellisnet
ec1de0a5ee09ef5a4c5bca4c83456dec8cbdf4c8
[ "MIT" ]
7
2018-12-07T18:44:04.000Z
2020-11-19T11:25:23.000Z
TrellisNet/char_PTB/char_ptb.py
chr6192/trellisnet
ec1de0a5ee09ef5a4c5bca4c83456dec8cbdf4c8
[ "MIT" ]
70
2018-10-18T01:18:16.000Z
2021-08-16T13:59:48.000Z
import argparse import torch.optim as optim import sys from utils import * from data import data_generator import time import math from setproctitle import setproctitle import warnings sys.path.append("../") from model import TrellisNetModel warnings.filterwarnings("ignore") # Suppress the RunTimeWarning on unicode...
39.111717
109
0.585063
import argparse import torch.optim as optim import sys from utils import * from data import data_generator import time import math from setproctitle import setproctitle import warnings sys.path.append("../") from model import TrellisNetModel warnings.filterwarnings("ignore") parser = argparse.ArgumentParser(descr...
true
true
7904143cc3239879e6410db14e5d448d160ace9f
842
py
Python
main.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
1
2022-02-23T20:18:35.000Z
2022-02-23T20:18:35.000Z
main.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
null
null
null
main.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
null
null
null
from eingabe import EinsatzstoffeEingabe from ausgabe import * from verarbeitung import * from plannung import * if __name__ == '__main__': eingabe1 = EinsatzstoffeEingabe(100000, "Erz", "Indien") eingabe2 = EinsatzstoffeEingabe(59000, "Kochen", "Rumänien") ausgabe1 = ProzessAusgabe(100, 200, "Sc...
35.083333
76
0.723278
from eingabe import EinsatzstoffeEingabe from ausgabe import * from verarbeitung import * from plannung import * if __name__ == '__main__': eingabe1 = EinsatzstoffeEingabe(100000, "Erz", "Indien") eingabe2 = EinsatzstoffeEingabe(59000, "Kochen", "Rumänien") ausgabe1 = ProzessAusgabe(100, 200, "Sc...
true
true
7904146020cf731e027e576e42561b71ee9d92c4
19,173
py
Python
config/jupyter/jupyter_notebook_config.py
alonsoir/pipeline
1480df925a840b6e45f163caf78d50829eb94ff0
[ "Apache-2.0" ]
1
2019-01-16T05:52:53.000Z
2019-01-16T05:52:53.000Z
config/jupyter/jupyter_notebook_config.py
TrinathY/pipeline
a08cabfefd3521a880d11f1e4b02286287118b6c
[ "Apache-2.0" ]
null
null
null
config/jupyter/jupyter_notebook_config.py
TrinathY/pipeline
a08cabfefd3521a880d11f1e4b02286287118b6c
[ "Apache-2.0" ]
null
null
null
# Configuration file for jupyter-notebook. #------------------------------------------------------------------------------ # Configurable configuration #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Sing...
36.942197
109
0.668388
c.JupyterApp.answer_yes = True c.NotebookApp.port_retries = 0 c.NotebookApp.ip = '*' c.NotebookApp.server_extensions=['ipyparallel.nbextension'] c.NotebookApp.port = 8754 c.NotebookApp.allow_origin = '*' ...
true
true
79041484b8c6a9a76e5f13c17b77c7b297ee0ad2
17,044
py
Python
lib/python2.7/site-packages/django_filters/filterset.py
ervinpepic/E-commerce
2c15255d1730728cf35c166b9f88cffcb99f5323
[ "MIT" ]
null
null
null
lib/python2.7/site-packages/django_filters/filterset.py
ervinpepic/E-commerce
2c15255d1730728cf35c166b9f88cffcb99f5323
[ "MIT" ]
null
null
null
lib/python2.7/site-packages/django_filters/filterset.py
ervinpepic/E-commerce
2c15255d1730728cf35c166b9f88cffcb99f5323
[ "MIT" ]
2
2019-04-29T14:16:10.000Z
2020-07-23T12:04:17.000Z
from __future__ import absolute_import from __future__ import unicode_literals import types import copy from django import forms from django.forms.forms import NON_FIELD_ERRORS from django.core.validators import EMPTY_VALUES from django.db import models from django.db.models.fields import FieldDoesNotExist from djang...
33.884692
106
0.582962
from __future__ import absolute_import from __future__ import unicode_literals import types import copy from django import forms from django.forms.forms import NON_FIELD_ERRORS from django.core.validators import EMPTY_VALUES from django.db import models from django.db.models.fields import FieldDoesNotExist from djang...
true
true
790414eed7a4aee29cbcf69ab462c7f4242d3ab6
6,327
py
Python
sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_key_vault_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_key_vault_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_key_vault_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
52.725
172
0.739687
from typing import TYPE_CHECKING from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from typing import Any, Optional from azure.core.credentials import TokenCredential from azure.core.pipeline.transport import HttpRequest, HttpResponse...
true
true
790415bee65970c117ada3a9e0c7250a6b0058c9
6,067
py
Python
venv/Lib/site-packages/tensorflow/contrib/periodic_resample/python/ops/gen_periodic_resample_op.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
venv/Lib/site-packages/tensorflow/contrib/periodic_resample/python/ops/gen_periodic_resample_op.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
venv/Lib/site-packages/tensorflow/contrib/periodic_resample/python/ops/gen_periodic_resample_op.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
1
2019-11-29T12:28:33.000Z
2019-11-29T12:28:33.000Z
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections from tensorflow.python.eager import execute as _execute from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.framew...
38.891026
247
0.647602
import collections as _collections from tensorflow.python.eager import execute as _execute from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.framework import dtypes as _dtypes from tensorflow.python.framework import tensor_shape as _tensor...
true
true
7904170d3c8142ffcd70d73d75dd5cdaa82082ab
1,122
py
Python
scripts/pivot_cluster_day.py
isabella232/allsongsconsidered-poll
f4b63effcf57c6b6680eac9f11a55cd0541e358c
[ "MIT" ]
3
2018-01-04T12:07:28.000Z
2018-04-10T02:10:27.000Z
scripts/pivot_cluster_day.py
nprapps/allsongsconsidered-poll
f4b63effcf57c6b6680eac9f11a55cd0541e358c
[ "MIT" ]
1
2021-02-24T06:47:12.000Z
2021-02-24T06:47:12.000Z
scripts/pivot_cluster_day.py
isabella232/allsongsconsidered-poll
f4b63effcf57c6b6680eac9f11a55cd0541e358c
[ "MIT" ]
3
2018-08-03T22:10:04.000Z
2022-03-23T11:33:55.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sys import numpy as np import pandas as pd def run(args): data = pd.read_csv(sys.stdin) # Find maximum rank value and increase by one to use as a fill_value # on the pivot with cluster by day # notfound_value = grouped['rank'].max()...
29.526316
76
0.564171
import argparse import sys import numpy as np import pandas as pd def run(args): data = pd.read_csv(sys.stdin) s='rank', index='Cluster ID', columns=['day'], fill_value=args.notfound_value, ...
true
true
7904176478811e02fa8f18ce975f9b7bee88c17a
488
py
Python
visitor_manage/src/migrations/0011_auto_20200622_1909.py
parth-27/Visitor-Management-System
575b7ad1a4eecf65e764399ea53e836b8cf1768d
[ "MIT" ]
3
2020-06-30T15:46:56.000Z
2021-11-17T13:13:15.000Z
visitor_manage/src/migrations/0011_auto_20200622_1909.py
DipikaPawar12/Visitor-Management-System
9585d8613daa4f5a0b0a81cce6850f79db768a64
[ "MIT" ]
1
2021-06-10T19:39:03.000Z
2021-06-10T19:39:03.000Z
visitor_manage/src/migrations/0011_auto_20200622_1909.py
DipikaPawar12/Visitor-Management-System
9585d8613daa4f5a0b0a81cce6850f79db768a64
[ "MIT" ]
1
2020-06-30T15:49:07.000Z
2020-06-30T15:49:07.000Z
# Generated by Django 3.0.6 on 2020-06-22 13:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('src', '0010_temporaryuser'), ] operations = [ migrations.RemoveField( model_name='admin', name='username', )...
21.217391
52
0.567623
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('src', '0010_temporaryuser'), ] operations = [ migrations.RemoveField( model_name='admin', name='username', ), migrations.AlterField( mo...
true
true
7904181897d18bef74f6721d936b2d86fe42d63f
1,124
py
Python
reco_utils/recommender/geoimc/geoimc_utils.py
suhoy901/recommenders
8ec9f1950d694a5aeaa3d463ac23cad661a30a11
[ "MIT" ]
28
2021-11-12T08:26:40.000Z
2022-03-27T07:21:24.000Z
reco_utils/recommender/geoimc/geoimc_utils.py
shobhit-agarwal/recommenders
8ec9f1950d694a5aeaa3d463ac23cad661a30a11
[ "MIT" ]
5
2021-11-10T02:58:32.000Z
2022-03-21T16:13:11.000Z
reco_utils/recommender/geoimc/geoimc_utils.py
shobhit-agarwal/recommenders
8ec9f1950d694a5aeaa3d463ac23cad661a30a11
[ "MIT" ]
9
2021-11-03T07:14:47.000Z
2022-02-22T13:42:04.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import numpy as np from sklearn.decomposition import PCA from reco_utils.dataset.download_utils import maybe_download from IPython import embed def length_normalize(matrix): """Length normalize the matrix Args: ...
24.977778
78
0.685943
import numpy as np from sklearn.decomposition import PCA from reco_utils.dataset.download_utils import maybe_download from IPython import embed def length_normalize(matrix): norms = np.sqrt(np.sum(matrix**2, axis=1)) norms[norms == 0] = 1 return matrix / norms[:, np.newaxis] def mean_center(matrix): ...
true
true
7904183312d4874c673a84bb789e7b6e2a22235a
20,353
py
Python
Chapter5_LossFunctions/DarkWorldsMetric.py
RKDSOne/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
a3d172bd92a8eab8f2eb87ebe707b9a102eec747
[ "MIT" ]
17
2016-11-19T14:11:06.000Z
2021-11-27T09:18:18.000Z
Chapter5_LossFunctions/DarkWorldsMetric.py
djv/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
ff9ee06a677efa522939f25d95ac87b9804440dc
[ "MIT" ]
null
null
null
Chapter5_LossFunctions/DarkWorldsMetric.py
djv/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
ff9ee06a677efa522939f25d95ac87b9804440dc
[ "MIT" ]
9
2015-10-08T09:40:12.000Z
2021-01-18T08:26:29.000Z
""" DarkWorldsMetricMountianOsteric.py Custom evaluation metric for the 'Observing Dark Worlds' competition. [Description of metric, or reference to documentation.] Update: Made for the training set only so users can check there results from the training c @Author: David Harvey Created: 22 August 2012 """ import nu...
46.896313
188
0.604284
""" DarkWorldsMetricMountianOsteric.py Custom evaluation metric for the 'Observing Dark Worlds' competition. [Description of metric, or reference to documentation.] Update: Made for the training set only so users can check there results from the training c @Author: David Harvey Created: 22 August 2012 """ import nu...
false
true
79041988748b5e99d242d1b0996a0f5f1221f105
936
py
Python
tools/mo/openvino/tools/mo/front/mxnet/eye_ext.py
opencv/dldt
c0a2c98a457a08e8853abc18f5bd462169d0b354
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/mo/openvino/tools/mo/front/mxnet/eye_ext.py
opencv/dldt
c0a2c98a457a08e8853abc18f5bd462169d0b354
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/mo/openvino/tools/mo/front/mxnet/eye_ext.py
opencv/dldt
c0a2c98a457a08e8853abc18f5bd462169d0b354
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.ops.eye import MXEye from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.mxnet.extractors.utils import get_mxnet_layer_attrs class EyeExtractor(FrontExt...
34.666667
129
0.700855
import numpy as np from openvino.tools.mo.ops.eye import MXEye from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.mxnet.extractors.utils import get_mxnet_layer_attrs class EyeExtractor(FrontExtractorOp): op = '_eye' enabled = True @classmethod def extract(...
true
true
790419e9917bd972edf29cb9a5d0bac3ca44d44c
598
py
Python
mooda/input/read_pkl.py
rbardaji/mooda
00c0f9fae657d3d0f7dd3772a029f78a182a07b2
[ "MIT" ]
15
2018-08-08T10:46:04.000Z
2021-09-24T14:38:37.000Z
mooda/input/read_pkl.py
rbardaji/mooda
00c0f9fae657d3d0f7dd3772a029f78a182a07b2
[ "MIT" ]
3
2019-05-14T11:40:40.000Z
2020-04-30T07:17:15.000Z
mooda/input/read_pkl.py
rbardaji/mooda
00c0f9fae657d3d0f7dd3772a029f78a182a07b2
[ "MIT" ]
4
2018-11-02T14:44:59.000Z
2021-05-10T21:57:25.000Z
""" Implementation of mooda.read_pkl(path) """ import pickle from .. import WaterFrame def read_pkl(path_pkl): """ Get a WaterFrame from a pickle file. Parameters ---------- path_pkl: str Location of the pickle file. Returns ------- wf_pkl: WaterFram...
22.148148
57
0.600334
import pickle from .. import WaterFrame def read_pkl(path_pkl): wf_pkl = WaterFrame() pickle_dataset = pickle.load(open(path_pkl, "rb")) wf_pkl.data = pickle_dataset.get('data') wf_pkl.vocabulary = pickle_dataset.get('vocabulary') wf_pkl.metadata = pickle_dataset.get('metadata') ...
true
true
79041a5d66b00791b597a86ab9714b8271acbd89
1,655
py
Python
tests/spider/setting.py
sirliu/feapder
1a8464dfa047c13f7a99c47cbff8d27c63798651
[ "MIT" ]
null
null
null
tests/spider/setting.py
sirliu/feapder
1a8464dfa047c13f7a99c47cbff8d27c63798651
[ "MIT" ]
null
null
null
tests/spider/setting.py
sirliu/feapder
1a8464dfa047c13f7a99c47cbff8d27c63798651
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """爬虫配置文件""" import os # MYSQL MYSQL_IP = "localhost" MYSQL_PORT = 3306 MYSQL_DB = "feapder" MYSQL_USER_NAME = "feapder" MYSQL_USER_PASS = "feapder123" # REDIS # IP:PORT REDISDB_IP_PORTS = "localhost:6379" REDISDB_USER_PASS = "" REDISDB_DB = 0 # # 爬虫相关 # # COLLECTOR COLLECTOR_SLEEP_TIME = 1 ...
23.309859
70
0.735347
import os MYSQL_IP = "localhost" MYSQL_PORT = 3306 MYSQL_DB = "feapder" MYSQL_USER_NAME = "feapder" MYSQL_USER_PASS = "feapder123" REDISDB_IP_PORTS = "localhost:6379" REDISDB_USER_PASS = "" REDISDB_DB = 0 _TIME = 1 COLLECTOR_TASK_COUNT = 100 THREAD_COUNT = 1
true
true
79041a8ba61b4377cccc2fe773aa21c970c59b26
59,952
py
Python
invest_natcap/scenario_generator/scenario_generator.py
phargogh/invest-natcap.invest-3
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
[ "BSD-3-Clause" ]
null
null
null
invest_natcap/scenario_generator/scenario_generator.py
phargogh/invest-natcap.invest-3
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
[ "BSD-3-Clause" ]
null
null
null
invest_natcap/scenario_generator/scenario_generator.py
phargogh/invest-natcap.invest-3
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
[ "BSD-3-Clause" ]
null
null
null
import sys import os import math import shutil import disk_sort import struct import operator import logging from decimal import Decimal from fractions import Fraction import numpy from scipy.linalg import eig import scipy.ndimage import cProfile import pstats from osgeo import gdal, ogr import pygeoprocessing.geopr...
42.042076
166
0.583283
import sys import os import math import shutil import disk_sort import struct import operator import logging from decimal import Decimal from fractions import Fraction import numpy from scipy.linalg import eig import scipy.ndimage import cProfile import pstats from osgeo import gdal, ogr import pygeoprocessing.geopr...
false
true
79041ac936abcd6666ac87e8ba76e72dcda1e615
1,157
py
Python
CTCI/Data Structures/Trees/tries.py
Wmeng98/Leetcode
5c4d0ab211e637801f3ae11154850a476de2ca41
[ "MIT" ]
4
2020-09-13T23:41:32.000Z
2022-01-08T21:27:58.000Z
CTCI/Data Structures/Trees/tries.py
Wmeng98/Leetcode
5c4d0ab211e637801f3ae11154850a476de2ca41
[ "MIT" ]
null
null
null
CTCI/Data Structures/Trees/tries.py
Wmeng98/Leetcode
5c4d0ab211e637801f3ae11154850a476de2ca41
[ "MIT" ]
null
null
null
''' TRIES Trie support search, insert, and deletion in O(L) time where L is length of the key why Trie? * With Trie, we can insert and find strings in O(L) time where L represent the length of a single word. This is obviously faster than BST. This is also faster than Hashing because of the ways it is im...
28.925
147
0.703544
class TrieNode: def __init__(self): self.children = [None]*26 self.isEndOfWord = False
true
true
79041b525ccea400d5b22fa9f35211813cc266c9
5,755
py
Python
Backend/judgestatus/views.py
RAyymask/LPOJ
2f7ce194f1d510d8d006c2a35fdaa272f20ef1f3
[ "MIT" ]
1
2022-03-16T09:49:55.000Z
2022-03-16T09:49:55.000Z
Backend/judgestatus/views.py
RAyymask/LPOJ
2f7ce194f1d510d8d006c2a35fdaa272f20ef1f3
[ "MIT" ]
null
null
null
Backend/judgestatus/views.py
RAyymask/LPOJ
2f7ce194f1d510d8d006c2a35fdaa272f20ef1f3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.shortcuts import render from django_filters.rest_framework import DjangoFilterBackend from rest_framework.throttling import ScopedRateThrottle from rest_framework.views import APIView from rest_framework.status import HTTP_200_OK, HTTP_400_BAD_REQUEST from rest_framework.response imp...
40.244755
197
0.692441
from django.shortcuts import render from django_filters.rest_framework import DjangoFilterBackend from rest_framework.throttling import ScopedRateThrottle from rest_framework.views import APIView from rest_framework.status import HTTP_200_OK, HTTP_400_BAD_REQUEST from rest_framework.response import Response from rest_...
true
true
79041ba585f4b98a982cafda9e8addb7801df625
356
py
Python
webapp/models.py
devsunny/flask-secure-upload
a69ffe6c53b5c6ba719516bb3e4379e39cacac75
[ "MIT" ]
null
null
null
webapp/models.py
devsunny/flask-secure-upload
a69ffe6c53b5c6ba719516bb3e4379e39cacac75
[ "MIT" ]
null
null
null
webapp/models.py
devsunny/flask-secure-upload
a69ffe6c53b5c6ba719516bb3e4379e39cacac75
[ "MIT" ]
null
null
null
# models.py from flask_login import UserMixin from . import db class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy email = db.Column(db.String(100), unique=True) password = db.Column(db.String(100)) name = db.Column(db.String(1000)) ...
32.363636
90
0.707865
from flask_login import UserMixin from . import db class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(100), unique=True) password = db.Column(db.String(100)) name = db.Column(db.String(1000)) home = db.Column(db.String(1000))
true
true
79041c07ac974a91b0edeef507b9c29c334b71e3
667
py
Python
simplecoremidi/examples/play_a_scale.py
cclauss/simplecoremidi
cf951eefe4e85fc709c40248aa55682b7c7f3663
[ "MIT" ]
23
2015-09-10T18:32:21.000Z
2022-03-25T14:47:57.000Z
simplecoremidi/examples/play_a_scale.py
Miselu/simplecoremidi
77a2c2dc69c3cca66eae5365eb6bd24c4998b7e2
[ "MIT" ]
null
null
null
simplecoremidi/examples/play_a_scale.py
Miselu/simplecoremidi
77a2c2dc69c3cca66eae5365eb6bd24c4998b7e2
[ "MIT" ]
9
2016-10-23T02:16:26.000Z
2022-03-25T14:47:59.000Z
from simplecoremidi import send_midi from time import sleep def play_a_scale(): root_note = 60 # This is middle C channel = 1 # This is MIDI channel 1 note_on_action = 0x90 major_steps = [2, 2, 1, 2, 2, 2, 1, 0] velocity = 127 note = root_note for step in major_steps: send_midi((...
24.703704
70
0.554723
from simplecoremidi import send_midi from time import sleep def play_a_scale(): root_note = 60 channel = 1 note_on_action = 0x90 major_steps = [2, 2, 1, 2, 2, 2, 1, 0] velocity = 127 note = root_note for step in major_steps: send_midi((note_on_action | channel, ...
true
true
79041cccc4a095c51dc8b00eb5fe1c02ad5a666c
1,013
py
Python
test/test_docx_set_header_request.py
Cloudmersive/Cloudmersive.APIClient.Python.Convert
dba2fe7257229ebdacd266531b3724552c651009
[ "Apache-2.0" ]
3
2018-07-25T23:04:34.000Z
2021-08-10T16:43:10.000Z
test/test_docx_set_header_request.py
Cloudmersive/Cloudmersive.APIClient.Python.Convert
dba2fe7257229ebdacd266531b3724552c651009
[ "Apache-2.0" ]
3
2020-11-23T10:46:48.000Z
2021-12-30T14:09:34.000Z
test/test_docx_set_header_request.py
Cloudmersive/Cloudmersive.APIClient.Python.Convert
dba2fe7257229ebdacd266531b3724552c651009
[ "Apache-2.0" ]
2
2020-01-07T09:48:01.000Z
2020-11-23T10:47:00.000Z
# coding: utf-8 """ convertapi Convert API lets you effortlessly convert file formats and types. # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import cloudmersive_convert_api_...
24.707317
117
0.741362
from __future__ import absolute_import import unittest import cloudmersive_convert_api_client from cloudmersive_convert_api_client.models.docx_set_header_request import DocxSetHeaderRequest from cloudmersive_convert_api_client.rest import ApiException class TestDocxSetHeaderRequest(unittest.TestCase): de...
true
true
79041da34a10699dab1d4113d71953c80adccf16
7,552
py
Python
adafruit_imageload/gif/__init__.py
sajattack/Adafruit_CircuitPython_ImageLoad
d60a714b56a74c40867fd09330fb1f1be38b9e22
[ "MIT" ]
null
null
null
adafruit_imageload/gif/__init__.py
sajattack/Adafruit_CircuitPython_ImageLoad
d60a714b56a74c40867fd09330fb1f1be38b9e22
[ "MIT" ]
null
null
null
adafruit_imageload/gif/__init__.py
sajattack/Adafruit_CircuitPython_ImageLoad
d60a714b56a74c40867fd09330fb1f1be38b9e22
[ "MIT" ]
null
null
null
# The MIT License (MIT) # # Copyright (c) 2019 Paul Sajna for Adafruit Industries LLC # # 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 r...
39.747368
105
0.552039
__version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad.git" bitmaps = [] def load(f): bitmaps = [] palette = [] table = [] f.seek(3) version = f.read(3) if (version != b'89a') and (version != b'87a'): raise RuntimeE...
true
true
79041f3be1f5a467637167f0ce3a36bc282498b5
2,195
py
Python
ping/ping.py
yzs981130/Kurose-and-Ross-socket-programming-exercises-1
fd7a27b48e7de98a216fa3a8905758856e70d5d7
[ "CC0-1.0" ]
63
2015-04-09T13:52:33.000Z
2022-01-25T10:46:29.000Z
ping/ping.py
shenaishiren/Kurose-and-Ross-socket-programming-exercises
fd7a27b48e7de98a216fa3a8905758856e70d5d7
[ "CC0-1.0" ]
2
2016-02-23T06:19:06.000Z
2018-09-09T18:53:35.000Z
ping/ping.py
shenaishiren/Kurose-and-Ross-socket-programming-exercises
fd7a27b48e7de98a216fa3a8905758856e70d5d7
[ "CC0-1.0" ]
74
2015-04-13T08:03:11.000Z
2022-01-25T10:46:49.000Z
#!/usr/bin/env python3 import sys import argparse import time import socket from socket import socket as Socket def main(): # Command line arguments. Use a server_port > 1024 by default so that we can run # server without sudo. parser = argparse.ArgumentParser() parser.add_argument('--server-po...
28.881579
84
0.653759
import sys import argparse import time import socket from socket import socket as Socket def main(): parser = argparse.ArgumentParser() parser.add_argument('--server-port', '-p', default=2081, type=int, help='Server_Port to use') parser.add_argument('--run-se...
true
true
79041f456f081182daf44f3daac2ef9b888bf30f
6,912
py
Python
svg/path/parser.py
judithfan/sketch-rnn
4c269499439c08619e88b5cf6b421661f1648082
[ "MIT" ]
1
2020-04-10T16:50:26.000Z
2020-04-10T16:50:26.000Z
svg/path/parser.py
judithfan/sketch-rnn
4c269499439c08619e88b5cf6b421661f1648082
[ "MIT" ]
null
null
null
svg/path/parser.py
judithfan/sketch-rnn
4c269499439c08619e88b5cf6b421661f1648082
[ "MIT" ]
2
2019-10-08T07:06:43.000Z
2020-02-20T20:22:30.000Z
# SVG Path specification parser import re from . import path COMMANDS = set('MmZzLlHhVvCcSsQqTtAa') UPPERCASE = set('MZLHVCSQTA') COMMAND_RE = re.compile("([MmZzLlHhVvCcSsQqTtAa])") FLOAT_RE = re.compile("[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?") def _tokenize_path(pathdef): for x in COMMAND_RE.split(pathdef)...
36.188482
85
0.54702
import re from . import path COMMANDS = set('MmZzLlHhVvCcSsQqTtAa') UPPERCASE = set('MZLHVCSQTA') COMMAND_RE = re.compile("([MmZzLlHhVvCcSsQqTtAa])") FLOAT_RE = re.compile("[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?") def _tokenize_path(pathdef): for x in COMMAND_RE.split(pathdef): if x in COMMANDS: ...
false
true
79041fba7b86fb54852e5aa1884db644c8730c8e
1,622
py
Python
ocp_resources/cdi_config.py
ibesso-rh/openshift-python-wrapper
01aa3234fc6333868222736d8f42e27943edb47a
[ "Apache-2.0" ]
null
null
null
ocp_resources/cdi_config.py
ibesso-rh/openshift-python-wrapper
01aa3234fc6333868222736d8f42e27943edb47a
[ "Apache-2.0" ]
null
null
null
ocp_resources/cdi_config.py
ibesso-rh/openshift-python-wrapper
01aa3234fc6333868222736d8f42e27943edb47a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import logging from ocp_resources.constants import PROTOCOL_ERROR_EXCEPTION_DICT from ocp_resources.resource import TIMEOUT, Resource from ocp_resources.utils import TimeoutSampler LOGGER = logging.getLogger(__name__) class CDIConfig(Resource): """ CDIConfig object. """ ap...
27.965517
87
0.646732
import logging from ocp_resources.constants import PROTOCOL_ERROR_EXCEPTION_DICT from ocp_resources.resource import TIMEOUT, Resource from ocp_resources.utils import TimeoutSampler LOGGER = logging.getLogger(__name__) class CDIConfig(Resource): api_group = Resource.ApiGroup.CDI_KUBEVIRT_IO @property ...
true
true
790420a930db4cd3395ec455b590c58fd0be09a6
3,671
py
Python
zerver/webhooks/groove/view.py
pranayshahxyz/zulip
3da483487af79fde9dce2d21124dfa39b94936a5
[ "Apache-2.0" ]
1
2020-04-09T18:34:44.000Z
2020-04-09T18:34:44.000Z
zerver/webhooks/groove/view.py
pranayshahxyz/zulip
3da483487af79fde9dce2d21124dfa39b94936a5
[ "Apache-2.0" ]
null
null
null
zerver/webhooks/groove/view.py
pranayshahxyz/zulip
3da483487af79fde9dce2d21124dfa39b94936a5
[ "Apache-2.0" ]
null
null
null
# Webhooks for external integrations. from functools import partial from typing import Any, Callable, Dict, Optional from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_s...
34.308411
99
0.701989
from functools import partial from typing import Any, Callable, Dict, Optional from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.commo...
true
true
7904212f78e6a7b14fd1665ba8a9cc49c99b21b7
637
py
Python
scripts/release_helper/go.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
scripts/release_helper/go.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
null
null
null
scripts/release_helper/go.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
null
null
null
from common import IssueProcess, Common from typing import Any, List import os # assignee dict which will be assigned to handle issues _GO_OWNER = {'ArcturusZhang'} # 'github assignee': 'token' _ASSIGNEE_TOKEN_GO = {'ArcturusZhang': os.getenv('AZURESDK_BOT_TOKEN')} class IssueProcessGo(IssueProcess): pass cla...
25.48
72
0.744113
from common import IssueProcess, Common from typing import Any, List import os _GO_OWNER = {'ArcturusZhang'} _ASSIGNEE_TOKEN_GO = {'ArcturusZhang': os.getenv('AZURESDK_BOT_TOKEN')} class IssueProcessGo(IssueProcess): pass class Go(Common): def __init__(self, issues, assignee_token, language_owner): ...
true
true
790422285f2b34d6e4f52b2a3c5f165cfc5cd144
2,083
py
Python
deep learning/test/test.py
ANI717/Self_Driving_CV_Repository
27faa8ca86966838998056a42973de292bc380cb
[ "MIT" ]
1
2021-12-20T03:53:59.000Z
2021-12-20T03:53:59.000Z
deep learning/test/test.py
ANI717/Self_Driving_CV_Repository
27faa8ca86966838998056a42973de292bc380cb
[ "MIT" ]
null
null
null
deep learning/test/test.py
ANI717/Self_Driving_CV_Repository
27faa8ca86966838998056a42973de292bc380cb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to Test Deep Learning Model. Contains a pipeline to test a deep learning model. Revision History: 2021-11-20 (ANI717 - Animesh Bala Ani): Baseline Software. Example: $ python3 test.py """ #___Import Modules: import torch from torch.utils.dat...
28.148649
142
0.614498
import torch from torch.utils.data import DataLoader from tqdm import tqdm import config from model import NvidiaNet from dataset import ANI717Dataset def main(): dataset = ANI717Dataset(config.TEST_CSV, config.IMG_SOURCE, transforms=config.TEST_TRANSFORMS) loader = DataLoader(dataset, batch...
true
true
79042291a3a9fe72be66da8fcd766e1455ffd1e2
11,681
py
Python
perf/benchmark/runner/runner.py
jwendell/tools
992be29e272131f3b8129a03dac5347eb8f62a03
[ "Apache-2.0" ]
null
null
null
perf/benchmark/runner/runner.py
jwendell/tools
992be29e272131f3b8129a03dac5347eb8f62a03
[ "Apache-2.0" ]
null
null
null
perf/benchmark/runner/runner.py
jwendell/tools
992be29e272131f3b8129a03dac5347eb8f62a03
[ "Apache-2.0" ]
null
null
null
# Copyright Istio Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
30.658793
99
0.583769
from __future__ import print_function import collections import os import json import argparse import subprocess import shlex import uuid from fortio import METRICS_START_SKIP_DURATION, METRICS_END_SKIP_DURATION import sys if sys.version_info.major == 2: from commands import getoutput else: from...
true
true
7904234621e721b43376c422781755f4a239d255
4,023
py
Python
tests/integration/operators_test/boolean_test.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
61
2020-07-06T17:11:46.000Z
2022-03-12T14:42:51.000Z
tests/integration/operators_test/boolean_test.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
1
2021-02-25T01:30:29.000Z
2021-11-09T11:13:14.000Z
tests/integration/operators_test/boolean_test.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
6
2020-07-15T12:33:13.000Z
2021-11-07T06:55:00.000Z
# Copyright (c) 2019 Graphcore Ltd. All rights reserved. import numpy as np import popart import torch import pytest from op_tester import op_tester def test_and(op_tester): d1 = (np.random.randn(2) > 0).astype(np.bool_) d2 = (np.random.randn(2) > 0).astype(np.bool_) def init_builder(builder): i1...
27
61
0.61745
import numpy as np import popart import torch import pytest from op_tester import op_tester def test_and(op_tester): d1 = (np.random.randn(2) > 0).astype(np.bool_) d2 = (np.random.randn(2) > 0).astype(np.bool_) def init_builder(builder): i1 = builder.addInputTensor(d1) i2 = builder.addIn...
true
true
79042439b319a493991d940cde55d4e859f9cf39
8,113
py
Python
pipekit/component.py
DrDub/pipekit
87bd69ac2926085a27d72e9e5f19bd05038f178e
[ "MIT" ]
null
null
null
pipekit/component.py
DrDub/pipekit
87bd69ac2926085a27d72e9e5f19bd05038f178e
[ "MIT" ]
null
null
null
pipekit/component.py
DrDub/pipekit
87bd69ac2926085a27d72e9e5f19bd05038f178e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import asyncio import logging from collections import defaultdict from functools import partial from box import Box _l = logging.getLogger(__name__) _instances = dict() _events = defaultdict(asyncio.Event) _event_queues = list() _event_callbacks = defaultdict(list) class Component: """...
33.524793
99
0.590903
import asyncio import logging from collections import defaultdict from functools import partial from box import Box _l = logging.getLogger(__name__) _instances = dict() _events = defaultdict(asyncio.Event) _event_queues = list() _event_callbacks = defaultdict(list) class Component: def __init__(self, *args...
true
true
790424670a7b4b7ed5c11bd34cd56db2fcf6b60b
2,424
py
Python
hatasmota/mqtt.py
effelle/hatasmota
ec34f2e9b635cc35ee67f0d048a32a057313da60
[ "MIT" ]
null
null
null
hatasmota/mqtt.py
effelle/hatasmota
ec34f2e9b635cc35ee67f0d048a32a057313da60
[ "MIT" ]
null
null
null
hatasmota/mqtt.py
effelle/hatasmota
ec34f2e9b635cc35ee67f0d048a32a057313da60
[ "MIT" ]
null
null
null
"""Tasmota MQTT.""" import asyncio import logging from typing import Union import attr from .const import COMMAND_BACKLOG DEBOUNCE_TIMEOUT = 1 _LOGGER = logging.getLogger(__name__) class Timer: """Simple timer.""" def __init__(self, timeout, callback): self._timeout = timeout self._callba...
27.545455
80
0.64934
import asyncio import logging from typing import Union import attr from .const import COMMAND_BACKLOG DEBOUNCE_TIMEOUT = 1 _LOGGER = logging.getLogger(__name__) class Timer: def __init__(self, timeout, callback): self._timeout = timeout self._callback = callback self._task = asyncio.e...
true
true
7904253dcb398235ae696a22544c7fce9840d06c
103,140
py
Python
moto/s3/responses.py
nom3ad/moto
deeabfc6e5884bfe16631b3b020d29a1d558d31c
[ "Apache-2.0" ]
null
null
null
moto/s3/responses.py
nom3ad/moto
deeabfc6e5884bfe16631b3b020d29a1d558d31c
[ "Apache-2.0" ]
null
null
null
moto/s3/responses.py
nom3ad/moto
deeabfc6e5884bfe16631b3b020d29a1d558d31c
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import io import os import re import sys from botocore.awsrequest import AWSPreparedRequest from moto.core.utils import ( amzn_request_id, str_to_rfc_1123_datetime, py2_strip_unicode_keys, ) from urllib.parse import ( parse_qs, parse_qsl, urlparse, ...
38.059041
168
0.58727
from __future__ import unicode_literals import io import os import re import sys from botocore.awsrequest import AWSPreparedRequest from moto.core.utils import ( amzn_request_id, str_to_rfc_1123_datetime, py2_strip_unicode_keys, ) from urllib.parse import ( parse_qs, parse_qsl, urlparse, ...
true
true
790425cdf51c12d5693923f4db37300a4be41df1
4,860
py
Python
lib/datasets/osd_object.py
datboi223/UnseenObjectClustering
32ec100e7c15478fba5e67509c7bff397e7c885e
[ "BSD-Source-Code" ]
null
null
null
lib/datasets/osd_object.py
datboi223/UnseenObjectClustering
32ec100e7c15478fba5e67509c7bff397e7c885e
[ "BSD-Source-Code" ]
null
null
null
lib/datasets/osd_object.py
datboi223/UnseenObjectClustering
32ec100e7c15478fba5e67509c7bff397e7c885e
[ "BSD-Source-Code" ]
null
null
null
# Copyright (c) 2020 NVIDIA Corporation. All rights reserved. # This work is licensed under the NVIDIA Source Code License - Non-commercial. Full # text can be found in LICENSE.md import torch import torch.utils.data as data import os, math import sys import time import random import numpy as np import cv2 import glob...
36.268657
85
0.627984
import torch import torch.utils.data as data import os, math import sys import time import random import numpy as np import cv2 import glob import matplotlib.pyplot as plt import datasets import open3d as o3d import pcl from fcn.config import cfg from utils.blob import chromatic_transform, add_noise from utils imp...
true
true
790425d501b4c4fb6f9c05b89b6c2559834faa07
1,895
py
Python
components/nginx/scripts/retrieve_agents.py
AlexAdamenko/cloudify-openstack
6b89af7b9da4c55dc91684bd1781115e71353e03
[ "Apache-2.0" ]
null
null
null
components/nginx/scripts/retrieve_agents.py
AlexAdamenko/cloudify-openstack
6b89af7b9da4c55dc91684bd1781115e71353e03
[ "Apache-2.0" ]
null
null
null
components/nginx/scripts/retrieve_agents.py
AlexAdamenko/cloudify-openstack
6b89af7b9da4c55dc91684bd1781115e71353e03
[ "Apache-2.0" ]
null
null
null
#!/bin/python import platform import fabric.api from fabric.contrib.files import exists as remote_exists from cloudify import ctx from cloudify.exceptions import NonRecoverableError def _get_distro_info(): distro, _, release = platform.linux_distribution( full_distribution_name=False) return '{0} {...
37.156863
78
0.643272
import platform import fabric.api from fabric.contrib.files import exists as remote_exists from cloudify import ctx from cloudify.exceptions import NonRecoverableError def _get_distro_info(): distro, _, release = platform.linux_distribution( full_distribution_name=False) return '{0} {1}'.format(di...
true
true
790426391fba57d10a1459d87543824a85e55517
22,145
py
Python
src/models.py
rupshree1999/Brats2019
715274b4a407f8ca8fa11d2e3743c5ddb328e59a
[ "MIT" ]
94
2019-08-30T02:50:30.000Z
2022-03-04T07:56:20.000Z
src/models.py
rupshree1999/Brats2019
715274b4a407f8ca8fa11d2e3743c5ddb328e59a
[ "MIT" ]
22
2019-11-05T06:36:37.000Z
2022-02-10T00:47:22.000Z
src/models.py
rupshree1999/Brats2019
715274b4a407f8ca8fa11d2e3743c5ddb328e59a
[ "MIT" ]
28
2019-10-08T02:32:35.000Z
2021-12-14T04:10:32.000Z
import tensorflow as tf import tensorflow.contrib.slim as slim from tflearn.layers.conv import global_avg_pool ####################### # 3d functions ####################### # convolution # 3D unet graph def unet(inputI, output_channel): """3D U-net""" phase_flag = 1 concat_dim = 4 conv1_1 = conv3d( ...
34.819182
126
0.597065
import tensorflow as tf import tensorflow.contrib.slim as slim from tflearn.layers.conv import global_avg_pool conv1_relu') pool1_in = tf.layers.max_pooling3d( inputs=conv1_relu, pool_size=2, strides=2, name='pool1') pool1 = pool1_in conv2_1 = conv3d( ...
true
true
79042649ef5f7122a4ceac473e6d6051996faa2e
16,376
py
Python
rls/utils/build_networks.py
yisuoyanyudmj/RLs-1
a336b57e804507bca23cbadc3b5af1924c80d942
[ "Apache-2.0" ]
1
2021-01-11T18:37:57.000Z
2021-01-11T18:37:57.000Z
rls/utils/build_networks.py
kiminh/RLs
a336b57e804507bca23cbadc3b5af1924c80d942
[ "Apache-2.0" ]
null
null
null
rls/utils/build_networks.py
kiminh/RLs
a336b57e804507bca23cbadc3b5af1924c80d942
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorflow as tf from copy import deepcopy from abc import ABC, abstractmethod from tensorflow.keras import Model as M from rls.utils.indexs import OutputNetworkType from rls.nn.networks import get_visual_network_from_type from rls.nn.models import get_output_network_from_type ...
33.975104
97
0.578163
import numpy as np import tensorflow as tf from copy import deepcopy from abc import ABC, abstractmethod from tensorflow.keras import Model as M from rls.utils.indexs import OutputNetworkType from rls.nn.networks import get_visual_network_from_type from rls.nn.models import get_output_network_from_type ...
true
true
790426e1ad4f499c37e7bc3113074e4ba989eb0b
241
py
Python
app/twitter.py
janaSunrise/Spotify-Twitter-Banner
a3b5fc636ef4e79f3f96cc3dd5569eaff7d8a6c0
[ "MIT" ]
20
2021-12-21T17:46:33.000Z
2022-01-22T15:23:24.000Z
app/twitter.py
janaSunrise/Spotify-Twitter-Banner
a3b5fc636ef4e79f3f96cc3dd5569eaff7d8a6c0
[ "MIT" ]
null
null
null
app/twitter.py
janaSunrise/Spotify-Twitter-Banner
a3b5fc636ef4e79f3f96cc3dd5569eaff7d8a6c0
[ "MIT" ]
null
null
null
import tweepy from .config import Config def update_twitter_banner(api: tweepy.API) -> None: """Update the twitter banner of the current profile using the image specified in config.""" api.update_profile_banner(Config.IMAGE_PATH)
26.777778
95
0.767635
import tweepy from .config import Config def update_twitter_banner(api: tweepy.API) -> None: api.update_profile_banner(Config.IMAGE_PATH)
true
true
790427216325f05e43c495a60f6c3850397bbf84
264
py
Python
2021/Day 7 - The Treachery of Whales/2.py
Ashwin-op/Advent_of_Code
39937379c7cf1c728326af526a71fdd84706a2b8
[ "MIT" ]
2
2020-12-05T06:36:27.000Z
2021-07-07T11:10:52.000Z
2021/Day 7 - The Treachery of Whales/2.py
Ashwin-op/Advent_of_Code
39937379c7cf1c728326af526a71fdd84706a2b8
[ "MIT" ]
null
null
null
2021/Day 7 - The Treachery of Whales/2.py
Ashwin-op/Advent_of_Code
39937379c7cf1c728326af526a71fdd84706a2b8
[ "MIT" ]
null
null
null
from statistics import mean with open("input.txt") as f: values = [int(i) for i in f.readline().split(",")] m_values = int(mean(values)) print(min( sum(sum(range(1, abs(pos - i) + 1)) for pos in values) for i in range(m_values - 1, m_values + 1) ))
22
58
0.625
from statistics import mean with open("input.txt") as f: values = [int(i) for i in f.readline().split(",")] m_values = int(mean(values)) print(min( sum(sum(range(1, abs(pos - i) + 1)) for pos in values) for i in range(m_values - 1, m_values + 1) ))
true
true
7904272acf72176efbadbcd912cf75e5d8b57f85
10,900
py
Python
statement_to_tree.py
iolucas/mathview
ca576f74dc3aab0c1397048f6972dc1a1a309b84
[ "MIT" ]
33
2016-09-23T15:05:24.000Z
2021-08-30T11:13:35.000Z
statement_to_tree.py
iolucas/mathview
ca576f74dc3aab0c1397048f6972dc1a1a309b84
[ "MIT" ]
4
2016-12-14T03:41:55.000Z
2020-05-27T20:27:55.000Z
statement_to_tree.py
iolucas/mathview
ca576f74dc3aab0c1397048f6972dc1a1a309b84
[ "MIT" ]
12
2016-08-20T10:40:21.000Z
2022-01-03T09:47:01.000Z
# Given a statement, find the parse tree that led to it. from tree_parser import * import pickle #pickle.dump(database.proof_datas, open(output_file,'wb')) from copy import deepcopy from tree import * #output_file = 'tree_parse_data' # class InitialStringSearcher: # def __init__(self): # self.nodes = ...
57.671958
2,466
0.503761
from tree_parser import * import pickle from copy import deepcopy from tree import * class InitialStringSearcher: def __init__(self): self.known_values = {} def add(self,string,value): self.known_values[tuple(string)]=value def find_long...
true
true
79042801dc2e48249347def16368667b9df5fd6d
5,472
py
Python
backend/Gifts/views.py
exarus/GiftRecommenderSystem
a1f0bb44f365c917cf4d870bc93cf172e4d2af52
[ "Apache-2.0" ]
null
null
null
backend/Gifts/views.py
exarus/GiftRecommenderSystem
a1f0bb44f365c917cf4d870bc93cf172e4d2af52
[ "Apache-2.0" ]
null
null
null
backend/Gifts/views.py
exarus/GiftRecommenderSystem
a1f0bb44f365c917cf4d870bc93cf172e4d2af52
[ "Apache-2.0" ]
1
2018-10-30T22:04:53.000Z
2018-10-30T22:04:53.000Z
from django.shortcuts import render # Create your views here. from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse from Constants import * from Gifts.getRecommendations.RS import Users, Recommendations import json # Create your views here. def...
39.085714
99
0.6197
from django.shortcuts import render from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse from Constants import * from Gifts.getRecommendations.RS import Users, Recommendations import json def check_input(request, mandatory_fields, optional_f...
false
true
7904281c09f285f9f58bfe640ba09dcc99178926
20,018
py
Python
numpy_indexed/grouping.py
EelcoHoogendoorn/Numpy_arraysetops_EP
84dc8114bf8a79c3acb3f7f59128247b9fc97243
[ "MIT" ]
170
2016-04-02T07:29:12.000Z
2022-03-30T02:57:15.000Z
numpy_indexed/grouping.py
EelcoHoogendoorn/Numpy_arraysetops_EP
84dc8114bf8a79c3acb3f7f59128247b9fc97243
[ "MIT" ]
13
2016-08-31T14:39:51.000Z
2022-01-10T16:29:00.000Z
numpy_indexed/grouping.py
EelcoHoogendoorn/Numpy_arraysetops_EP
84dc8114bf8a79c3acb3f7f59128247b9fc97243
[ "MIT" ]
19
2016-07-20T18:49:36.000Z
2021-04-16T06:38:09.000Z
"""grouping module""" from __future__ import absolute_import, division, print_function, unicode_literals from builtins import * import itertools import numpy as np from numpy_indexed.index import as_index import numpy_indexed as npi __author__ = "Eelco Hoogendoorn" __license__ = "LGPL" __email__ = "hoogendoorn.eelco...
32.655791
115
0.575082
from __future__ import absolute_import, division, print_function, unicode_literals from builtins import * import itertools import numpy as np from numpy_indexed.index import as_index import numpy_indexed as npi __author__ = "Eelco Hoogendoorn" __license__ = "LGPL" __email__ = "hoogendoorn.eelco@gmail.com" class Gr...
true
true
7904289e1b1ebfa4e3bf17c3f23e97055297fb93
287
py
Python
timezone_field/tests/models.py
ambitioninc/django-timezone-field
52ac4903b89700474bee18a8728e91974f246faa
[ "BSD-2-Clause" ]
null
null
null
timezone_field/tests/models.py
ambitioninc/django-timezone-field
52ac4903b89700474bee18a8728e91974f246faa
[ "BSD-2-Clause" ]
1
2018-12-11T15:49:22.000Z
2018-12-11T15:49:22.000Z
timezone_field/tests/models.py
ambitioninc/django-timezone-field
52ac4903b89700474bee18a8728e91974f246faa
[ "BSD-2-Clause" ]
2
2017-09-19T19:27:55.000Z
2017-11-21T11:31:35.000Z
from __future__ import unicode_literals from django.db import models from timezone_field import TimeZoneField class FakeModel(models.Model): tz = TimeZoneField() tz_opt = TimeZoneField(blank=True) tz_opt_default = TimeZoneField(blank=True, default='America/Los_Angeles')
23.916667
77
0.787456
from __future__ import unicode_literals from django.db import models from timezone_field import TimeZoneField class FakeModel(models.Model): tz = TimeZoneField() tz_opt = TimeZoneField(blank=True) tz_opt_default = TimeZoneField(blank=True, default='America/Los_Angeles')
true
true
79042977dfb8c5d49992dddc323d6c55b868b944
475
py
Python
instagramHome/froms.py
Irene-nandy/Instagram
0032cc40cef86f37b602907b319f6b6e49695e44
[ "MIT" ]
null
null
null
instagramHome/froms.py
Irene-nandy/Instagram
0032cc40cef86f37b602907b319f6b6e49695e44
[ "MIT" ]
null
null
null
instagramHome/froms.py
Irene-nandy/Instagram
0032cc40cef86f37b602907b319f6b6e49695e44
[ "MIT" ]
null
null
null
from django import forms class PostForm(forms.Form): image = forms.ImageField() image_name = forms.CharField(widget=forms.TextInput(attrs={"class": "form-control","placeholder": "Image Name"})) image_caption = forms.CharField(widget=forms.Textarea(attrs={"class": "form-control","placeholder": "Image Captio...
47.5
122
0.726316
from django import forms class PostForm(forms.Form): image = forms.ImageField() image_name = forms.CharField(widget=forms.TextInput(attrs={"class": "form-control","placeholder": "Image Name"})) image_caption = forms.CharField(widget=forms.Textarea(attrs={"class": "form-control","placeholder": "Image Captio...
true
true
790429bdadb16eceded5a4505fd1054e8b272e56
3,138
py
Python
app/requests.py
ClarisseU/newsHighlight
7e7cbc8ff6c6e512a6758359b4706a8a48093926
[ "MIT" ]
null
null
null
app/requests.py
ClarisseU/newsHighlight
7e7cbc8ff6c6e512a6758359b4706a8a48093926
[ "MIT" ]
null
null
null
app/requests.py
ClarisseU/newsHighlight
7e7cbc8ff6c6e512a6758359b4706a8a48093926
[ "MIT" ]
null
null
null
import urllib.request,json from .models import Sources, Articles from datetime import datetime #Getting api key api_key = None #Getting the news base url # NEWS_API_KEY = None # NEWS_API_BASE_URL = None ARTICLE = None def configure_request(app): global api_key,NEWS_API_BASE_URL,NEWS_API_KEY,ARTICLE api_key = ...
30.466019
79
0.658062
import urllib.request,json from .models import Sources, Articles from datetime import datetime api_key = None ARTICLE = None def configure_request(app): global api_key,NEWS_API_BASE_URL,NEWS_API_KEY,ARTICLE api_key = app.config['NEWS_API_KEY'] ARTICLE = app.config['ARTICLE'] NEWS_API_BASE_URL = ap...
true
true
790429ce7a101861daf7bce45c1b77c76fd27d8c
130
py
Python
release/scripts/presets/tracking_track_color/near_plane.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
365
2015-02-10T15:10:55.000Z
2022-03-03T15:50:51.000Z
release/scripts/presets/tracking_track_color/near_plane.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
45
2015-01-09T15:34:20.000Z
2021-10-05T14:44:23.000Z
release/scripts/presets/tracking_track_color/near_plane.py
rbabari/blender
6daa85f14b2974abfc3d0f654c5547f487bb3b74
[ "Naumen", "Condor-1.1", "MS-PL" ]
172
2015-01-25T15:16:53.000Z
2022-01-31T08:25:36.000Z
import bpy track = bpy.context.edit_movieclip.tracking.tracks.active track.color = (0.0, 1.0, 0.0) track.use_custom_color = True
21.666667
57
0.761538
import bpy track = bpy.context.edit_movieclip.tracking.tracks.active track.color = (0.0, 1.0, 0.0) track.use_custom_color = True
true
true
79042b5b717aed371620bf2d3fd531e504b78b37
940
py
Python
PythonScripting/CSVFiles/examples3_csvmodule.py
Neo-sunny/pythonProgs
a9d2359d8a09d005d0ba6f94d7d256bf91499793
[ "MIT" ]
622
2018-07-17T09:05:41.000Z
2022-03-29T02:57:02.000Z
Rice-Python-Data-Analysis/week3/examples3_csvmodule.py
thientvse/Courses-
263ff4680ed1dfd253be3652f7f13ad707af1a36
[ "Apache-2.0" ]
21
2019-11-10T02:06:09.000Z
2022-01-22T23:54:11.000Z
Rice-Python-Data-Analysis/week3/examples3_csvmodule.py
thientvse/Courses-
263ff4680ed1dfd253be3652f7f13ad707af1a36
[ "Apache-2.0" ]
906
2018-07-17T09:05:43.000Z
2022-03-31T12:55:49.000Z
""" Using the csv module. """ import csv def parse(csvfilename): """ Reads CSV file named csvfilename, parses it's content and returns the data within the file as a list of lists. """ table = [] with open(csvfilename, "r") as csvfile: csvreader = csv.reader(csvfile, ...
21.860465
53
0.578723
import csv def parse(csvfilename): table = [] with open(csvfilename, "r") as csvfile: csvreader = csv.reader(csvfile, skipinitialspace=True) for row in csvreader: table.append(row) return table def print_table(table): for row in table: ...
true
true
79042b5fa45293fe7b76a7e810523136746912f9
3,028
py
Python
doc/extensions/empy_helpers/__init__.py
SirArep/ecal
9860efeb4ce0ef168630136d33947da02ecf0490
[ "Apache-2.0" ]
493
2019-06-03T13:30:46.000Z
2022-03-26T16:18:57.000Z
doc/extensions/empy_helpers/__init__.py
SirArep/ecal
9860efeb4ce0ef168630136d33947da02ecf0490
[ "Apache-2.0" ]
249
2019-06-04T09:01:24.000Z
2022-03-31T23:37:39.000Z
doc/extensions/empy_helpers/__init__.py
SirArep/ecal
9860efeb4ce0ef168630136d33947da02ecf0490
[ "Apache-2.0" ]
114
2019-06-05T00:04:25.000Z
2022-03-22T10:22:04.000Z
# Copyright 2018 Open Source Robotics Foundation, 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...
32.55914
95
0.679326
from io import StringIO import os import sys import em def expand_template(template_name, data, output_file, encoding='utf-8'): content = evaluate_template(template_name, data) if output_file.exists(): existing_content = output_file.read_text(encoding=encoding) if existing_...
true
true
79042c25cc0b73c482b1669a91d9d0f5c9949028
775
py
Python
setup.py
jinnovation/metaflow
540f21133b08108f7129ce42b1c6a24fd9175b2f
[ "Apache-2.0" ]
null
null
null
setup.py
jinnovation/metaflow
540f21133b08108f7129ce42b1c6a24fd9175b2f
[ "Apache-2.0" ]
null
null
null
setup.py
jinnovation/metaflow
540f21133b08108f7129ce42b1c6a24fd9175b2f
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages version = "2.5.4" setup( include_package_data=True, name="metaflow", version=version, description="Metaflow: More Data Science, Less Engineering", long_description=open("README.md").read(), long_description_content_type="text/markdown", author="M...
25.833333
64
0.645161
from setuptools import setup, find_packages version = "2.5.4" setup( include_package_data=True, name="metaflow", version=version, description="Metaflow: More Data Science, Less Engineering", long_description=open("README.md").read(), long_description_content_type="text/markdown", author="M...
true
true
79042e003a80fc0d1ea08474e610faa627656872
7,294
py
Python
myvenv/lib/python3.5/site-packages/babel/messages/mofile.py
tuvapp/tuvappcom
5ca2be19f4b0c86a1d4a9553711a4da9d3f32841
[ "MIT" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/Babel-2.5.1/babel/messages/mofile.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/Babel-2.5.1/babel/messages/mofile.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# -*- coding: utf-8 -*- """ babel.messages.mofile ~~~~~~~~~~~~~~~~~~~~~ Writing of files in the ``gettext`` MO (machine object) format. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import array import struct from babel.messages.catalog import Catalog, ...
34.084112
89
0.541815
import array import struct from babel.messages.catalog import Catalog, Message from babel._compat import range_type, array_tobytes LE_MAGIC = 0x950412de BE_MAGIC = 0xde120495 def read_mo(fileobj): catalog = Catalog() headers = {} filename = getattr(fileobj, 'name', '') buf = fileobj.read() ...
true
true
79042e70f30245770d9db6b182ee23c020d301ec
7,960
py
Python
utils/lib_classifier.py
eddylamhw/trAIner24
ac7cf1b95a2ecdfc44d11451984b016524ed7657
[ "MIT" ]
1
2021-11-25T16:32:51.000Z
2021-11-25T16:32:51.000Z
utils/lib_classifier.py
eddylamhw/trAIner24
ac7cf1b95a2ecdfc44d11451984b016524ed7657
[ "MIT" ]
null
null
null
utils/lib_classifier.py
eddylamhw/trAIner24
ac7cf1b95a2ecdfc44d11451984b016524ed7657
[ "MIT" ]
null
null
null
''' This script includes: 1. ClassifierOfflineTrain This is for offline training. The input data are the processed features. 2. class ClassifierOnlineTest(object) This is for online testing. The input data are the raw skeletons. It uses FeatureGenerator to extract features, and then use ClassifierOffli...
35.855856
97
0.629899
import numpy as np import sys import os import pickle import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from collections import deque import cv2 from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.datasets import make_moons, mak...
true
true
79042f677f4accd9f4c0858e4c01d2f06341605e
1,359
py
Python
neural_compressor/ux/web/service/optimization.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
172
2021-09-14T18:34:17.000Z
2022-03-30T06:49:53.000Z
neural_compressor/ux/web/service/optimization.py
intel/lp-opt-tool
130eefa3586b38df6c0ff78cc8807ae273f6a63f
[ "Apache-2.0" ]
40
2021-09-14T02:26:12.000Z
2022-03-29T08:34:04.000Z
neural_compressor/ux/web/service/optimization.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
33
2021-09-15T07:27:25.000Z
2022-03-25T08:30:57.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2022 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 applicab...
38.828571
93
0.740986
from neural_compressor.ux.components.db_manager.db_operations import OptimizationAPIInterface from neural_compressor.ux.web.service.request_data_processor import RequestDataProcessor from neural_compressor.ux.web.service.workload import WorkloadService class OptimizationService(WorkloadService): @...
true
true
79043116cb4ef86e78c4d61d4d638ab85ee33161
19,551
py
Python
lib/dataset/pascal_voc.py
alphadadajuju/Deep-Feature-Flow-mod
1df87d923c50722f508897710f32974b8a0c510f
[ "MIT" ]
null
null
null
lib/dataset/pascal_voc.py
alphadadajuju/Deep-Feature-Flow-mod
1df87d923c50722f508897710f32974b8a0c510f
[ "MIT" ]
null
null
null
lib/dataset/pascal_voc.py
alphadadajuju/Deep-Feature-Flow-mod
1df87d923c50722f508897710f32974b8a0c510f
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2017 Microsoft # Licensed under The Apache-2.0 License [see LICENSE for details] # Modified by Haozhi Qi, from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcnn) # ----------------------------------...
42.781182
119
0.591428
""" Pascal VOC database This class loads ground truth notations from standard Pascal VOC XML data formats and transform them into IMDB format. Selective search is used for proposals, see roidb function. Results are written as the Pascal VOC format. Evaluation is based on mAP criterion. """ import cPickle import...
false
true
790432f1781660ece2b74af0b67f2530d8e41341
7,150
py
Python
display/epd4in2b.py
Richard-Kirby/sema_clock
f192c8724ede8eb7f0330e295655c21367451cbc
[ "MIT" ]
null
null
null
display/epd4in2b.py
Richard-Kirby/sema_clock
f192c8724ede8eb7f0330e295655c21367451cbc
[ "MIT" ]
null
null
null
display/epd4in2b.py
Richard-Kirby/sema_clock
f192c8724ede8eb7f0330e295655c21367451cbc
[ "MIT" ]
null
null
null
## # @filename : epd4in2b.py # @brief : Implements for Dual-color e-paper library # @author : Yehui from Waveshare # # Copyright (C) Waveshare August 15 2017 # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documn...
35.75
81
0.543357
from . import epdif from PIL import Image import RPi.GPIO as GPIO EPD_WIDTH = 400 EPD_HEIGHT = 300 PANEL_SETTING = 0x00 POWER_SETTING = 0x01 POWER_OFF = ...
true
true
7904347fd1cde67ceb16182e873d46ccf0f507bd
7,568
py
Python
pylib/Tools/Executor/combinatorial.py
emallove/mtt
7ea3046ada6d7cc3db7129c4644acad854101adc
[ "BSD-3-Clause-Open-MPI" ]
null
null
null
pylib/Tools/Executor/combinatorial.py
emallove/mtt
7ea3046ada6d7cc3db7129c4644acad854101adc
[ "BSD-3-Clause-Open-MPI" ]
null
null
null
pylib/Tools/Executor/combinatorial.py
emallove/mtt
7ea3046ada6d7cc3db7129c4644acad854101adc
[ "BSD-3-Clause-Open-MPI" ]
null
null
null
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: f; python-indent: 4 -*- # # Copyright (c) 2015-2018 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow # # $HEADER$ # from __future__ import print_function from future import standard_library standard_library.install_aliases() import...
39.010309
90
0.556818
from __future__ import print_function from future import standard_library standard_library.install_aliases() import os import sys import configparser import importlib import logging import imp import datetime import tempfile import shutil from yapsy.PluginManager import PluginManager from ExecutorMTTTool imp...
true
true
7904350e03509818825fefc1f297fd144a1fef4c
14,232
py
Python
pyfr/writers/paraview.py
tjcorona/PyFR
a72b41580043bb001e5a9e6bb79a0e305d48e052
[ "BSD-3-Clause" ]
null
null
null
pyfr/writers/paraview.py
tjcorona/PyFR
a72b41580043bb001e5a9e6bb79a0e305d48e052
[ "BSD-3-Clause" ]
null
null
null
pyfr/writers/paraview.py
tjcorona/PyFR
a72b41580043bb001e5a9e6bb79a0e305d48e052
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Converts .pyfr[m, s] files to a Paraview VTK UnstructuredGrid File""" from collections import defaultdict import os import numpy as np from pyfr.shapes import BaseShape from pyfr.util import subclass_where from pyfr.writers import BaseWriter class ParaviewWriter(BaseWriter): # Suppo...
31.074236
77
0.531057
from collections import defaultdict import os import numpy as np from pyfr.shapes import BaseShape from pyfr.util import subclass_where from pyfr.writers import BaseWriter class ParaviewWriter(BaseWriter): name = 'paraview' extn = ['.vtu', '.pvtu'] def __init__(self, args): super().__in...
true
true
79043595da46f5ce5100fad9af56dcdd58be848e
1,201
py
Python
kloppy/domain/services/matchers/css.py
pratikthanki/kloppy
ab3293e03f958720489cd2d9e25a1c9f12b9970c
[ "BSD-3-Clause" ]
null
null
null
kloppy/domain/services/matchers/css.py
pratikthanki/kloppy
ab3293e03f958720489cd2d9e25a1c9f12b9970c
[ "BSD-3-Clause" ]
null
null
null
kloppy/domain/services/matchers/css.py
pratikthanki/kloppy
ab3293e03f958720489cd2d9e25a1c9f12b9970c
[ "BSD-3-Clause" ]
null
null
null
from typing import List from lxml import etree from cssselect import GenericTranslator from kloppy.domain import Event, EventType class CSSPatternMatcher: def __init__(self, pattern: str): self.expression = GenericTranslator().css_to_xpath([pattern]) def match(self, events: List[Event]) -> List[Lis...
32.459459
69
0.507077
from typing import List from lxml import etree from cssselect import GenericTranslator from kloppy.domain import Event, EventType class CSSPatternMatcher: def __init__(self, pattern: str): self.expression = GenericTranslator().css_to_xpath([pattern]) def match(self, events: List[Event]) -> List[Lis...
true
true
790435fca9254c818a01c7cdb5c270570d0a54d7
4,060
py
Python
rdfdatabank/lib/data_sync.py
dataflow/RDFDatabank
8a3abd28fefc62cbbfb9f77e7ddc920e23794f34
[ "MIT" ]
4
2016-01-10T09:05:22.000Z
2019-09-09T09:57:25.000Z
rdfdatabank/lib/data_sync.py
dataflow/RDFDatabank
8a3abd28fefc62cbbfb9f77e7ddc920e23794f34
[ "MIT" ]
null
null
null
rdfdatabank/lib/data_sync.py
dataflow/RDFDatabank
8a3abd28fefc62cbbfb9f77e7ddc920e23794f34
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (c) 2012 University of Oxford 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, modif...
39.803922
114
0.652956
from rdfdatabank.lib.auth_entry import list_silos, list_usernames, list_group_usernames, add_silo, add_group_users def sync_members(g): g.state.revert() g._register_silos() granary_list = g.silos granary_list_database = list_silos() usernames = list_usernames() for silo in gra...
true
true
790436659fc09d186eb38514c3add1c093b11f80
6,712
py
Python
Titanic/analysis/colab_titanic_main.py
couyang24/general_learning-tiffany
fa358e6f3b14386519295a8959ad02512f92fb95
[ "Apache-2.0" ]
null
null
null
Titanic/analysis/colab_titanic_main.py
couyang24/general_learning-tiffany
fa358e6f3b14386519295a8959ad02512f92fb95
[ "Apache-2.0" ]
27
2020-07-19T16:14:40.000Z
2021-09-19T01:24:42.000Z
Titanic/analysis/colab_titanic_main.py
couyang24/general_learning-tiffany
fa358e6f3b14386519295a8959ad02512f92fb95
[ "Apache-2.0" ]
2
2020-05-16T18:47:05.000Z
2020-10-15T10:58:42.000Z
# <a href="https://colab.research.google.com/github/couyang24/general_learning-tiffany/blob/master/Titanic/analysis/colab_titanic_main.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Need to mount Drive on or upload kaggle.json from google.colab ...
26.425197
252
0.674762
from google.colab import drive drive.mount("/content/drive") import pandas as pd import seaborn as sns import featuretools import featuretools as ft from sklearn.base import BaseEstimator, TransformerMixin from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.pipeline import Pipeline, ...
true
true
7904366ac66d89a10ab08531845b2896ead95da9
1,012
py
Python
setup.py
tropicbliss/MCsniperPY
ad0337fb10f90e18b5a648a150c2179d12048522
[ "MIT" ]
null
null
null
setup.py
tropicbliss/MCsniperPY
ad0337fb10f90e18b5a648a150c2179d12048522
[ "MIT" ]
null
null
null
setup.py
tropicbliss/MCsniperPY
ad0337fb10f90e18b5a648a150c2179d12048522
[ "MIT" ]
null
null
null
import pathlib from setuptools import setup here = pathlib.Path(__file__).parent.resolve() # Get the long description from the README file long_description = (here / "README.md").read_text(encoding="utf-8") setup( name="MCsniperPY", version="0.20.6", description="Minecraft name sniper writte...
33.733333
75
0.652174
import pathlib from setuptools import setup here = pathlib.Path(__file__).parent.resolve() long_description = (here / "README.md").read_text(encoding="utf-8") setup( name="MCsniperPY", version="0.20.6", description="Minecraft name sniper written in Python", long_description=long_descrip...
true
true
790436c2a2e54b1015bb3b69c4a62b273aa3398b
412
py
Python
app/forms.py
justinvasel/justinvasel.com
a0765e5d4d6505fa1e02aa7b73e8039cf19ba646
[ "MIT" ]
null
null
null
app/forms.py
justinvasel/justinvasel.com
a0765e5d4d6505fa1e02aa7b73e8039cf19ba646
[ "MIT" ]
2
2018-04-10T11:39:49.000Z
2020-09-26T05:35:17.000Z
app/forms.py
justinvasel/justinvasel.com
a0765e5d4d6505fa1e02aa7b73e8039cf19ba646
[ "MIT" ]
null
null
null
from app import models from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired()]) password = P...
37.454545
76
0.783981
from app import models from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired()]) password = P...
true
true
79043723c9cd53c11f21fb7b99efb9992d23ccde
109
py
Python
home/__init__.py
abkraynak/smart-home
26439a322ee75811731da413c8e80d8fb89ab876
[ "MIT" ]
null
null
null
home/__init__.py
abkraynak/smart-home
26439a322ee75811731da413c8e80d8fb89ab876
[ "MIT" ]
null
null
null
home/__init__.py
abkraynak/smart-home
26439a322ee75811731da413c8e80d8fb89ab876
[ "MIT" ]
null
null
null
# __init.py from .home import Home from .alarm import Alarm from .light import Light from .lock import Lock
18.166667
24
0.770642
from .home import Home from .alarm import Alarm from .light import Light from .lock import Lock
true
true
790437a75eefe189e227cc30e0488b2cdd89e4e9
1,928
py
Python
redis_metrics/management/commands/generate_test_metrics.py
bradmontgomery/django-redis-metrics
b1466b5742f3f1e3aac4264cb8b73e25e765e972
[ "MIT" ]
52
2015-01-03T19:40:50.000Z
2022-01-23T14:08:43.000Z
redis_metrics/management/commands/generate_test_metrics.py
bradmontgomery/django-redis-metrics
b1466b5742f3f1e3aac4264cb8b73e25e765e972
[ "MIT" ]
31
2015-01-05T10:28:50.000Z
2020-03-30T15:42:35.000Z
redis_metrics/management/commands/generate_test_metrics.py
bradmontgomery/django-redis-metrics
b1466b5742f3f1e3aac4264cb8b73e25e765e972
[ "MIT" ]
11
2015-03-07T12:15:53.000Z
2019-11-03T15:31:59.000Z
from __future__ import unicode_literals from django.core.management.base import BaseCommand, CommandError from optparse import make_option from redis_metrics.utils import generate_test_metrics class Command(BaseCommand): args = '<metric-name> [<metric-name> ...]' help = "Creates Lots of Dummy Metrics" opt...
31.096774
79
0.544606
from __future__ import unicode_literals from django.core.management.base import BaseCommand, CommandError from optparse import make_option from redis_metrics.utils import generate_test_metrics class Command(BaseCommand): args = '<metric-name> [<metric-name> ...]' help = "Creates Lots of Dummy Metrics" opt...
true
true
79043bdca4d5df85a74771eeed3b7d0eff306609
336
gyp
Python
binding.gyp
chipsalliance/tree-sitter-firrtl
e17cc559154f1f43daad00651781107f32a9d9f4
[ "Apache-2.0" ]
5
2020-01-25T03:46:46.000Z
2021-11-14T17:13:35.000Z
binding.gyp
chipsalliance/tree-sitter-firrtl
e17cc559154f1f43daad00651781107f32a9d9f4
[ "Apache-2.0" ]
2
2020-05-09T17:08:58.000Z
2021-04-30T16:50:56.000Z
binding.gyp
chipsalliance/tree-sitter-firrtl
e17cc559154f1f43daad00651781107f32a9d9f4
[ "Apache-2.0" ]
3
2021-05-17T03:12:45.000Z
2022-01-30T09:18:55.000Z
{ "targets": [ { "target_name": "tree_sitter_firrtl_binding", "include_dirs": [ "<!(node -e \"require('nan')\")", "src" ], "sources": [ "src/parser.c", "bindings/node/binding.cc", "src/scanner.cc" ], "cflags_c": [ "-std=c99", ...
16.8
50
0.410714
{ "targets": [ { "target_name": "tree_sitter_firrtl_binding", "include_dirs": [ "<!(node -e \"require('nan')\")", "src" ], "sources": [ "src/parser.c", "bindings/node/binding.cc", "src/scanner.cc" ], "cflags_c": [ "-std=c99", ...
true
true
79043c031d2adb4623ba80798ec83e7fb544c24a
983
py
Python
server.py
Mogekoff/nachess
87027279b804c925ea3051cf8dd5f1b3709b1e7b
[ "MIT" ]
null
null
null
server.py
Mogekoff/nachess
87027279b804c925ea3051cf8dd5f1b3709b1e7b
[ "MIT" ]
null
null
null
server.py
Mogekoff/nachess
87027279b804c925ea3051cf8dd5f1b3709b1e7b
[ "MIT" ]
null
null
null
import socket import sys from config import ip, port net = 0 sock = None try: if sys.argv[1] == '--connect': sock = socket.socket() try: sock.connect((sys.argv[2], int(sys.argv[3]))) print('Подключение к игре установлено.') except: print(f'Неудалось подкл...
31.709677
89
0.563581
import socket import sys from config import ip, port net = 0 sock = None try: if sys.argv[1] == '--connect': sock = socket.socket() try: sock.connect((sys.argv[2], int(sys.argv[3]))) print('Подключение к игре установлено.') except: print(f'Неудалось подкл...
true
true
79043c4a2b502fc7c643b0638228e702db778599
2,611
py
Python
neuro-cli/tests/unit/formatters/test_blob_formatters.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
11
2020-10-11T15:38:11.000Z
2021-11-09T11:29:50.000Z
neuro-cli/tests/unit/formatters/test_blob_formatters.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
611
2020-09-30T21:27:52.000Z
2022-01-10T10:44:44.000Z
neuro-cli/tests/unit/formatters/test_blob_formatters.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
1
2020-10-05T15:10:24.000Z
2020-10-05T15:10:24.000Z
from datetime import datetime from typing import Any, List, Union import pytest from neuro_sdk import BlobCommonPrefix, BlobObject, Bucket, BucketEntry from neuro_cli.formatters.blob_storage import ( BaseBlobFormatter, LongBlobFormatter, SimpleBlobFormatter, ) class TestBlobFormatter: buckets: Lis...
29.011111
87
0.542704
from datetime import datetime from typing import Any, List, Union import pytest from neuro_sdk import BlobCommonPrefix, BlobObject, Bucket, BucketEntry from neuro_cli.formatters.blob_storage import ( BaseBlobFormatter, LongBlobFormatter, SimpleBlobFormatter, ) class TestBlobFormatter: buckets: Lis...
true
true
79043cf41aa29b5fb39b3b7e7cd4edd485a95348
8,812
py
Python
custom_components/xiaomi_gateway3/__init__.py
avbor/HomeAssistantConf
1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614
[ "Unlicense" ]
35
2021-02-25T06:30:42.000Z
2022-03-09T20:18:47.000Z
custom_components/xiaomi_gateway3/__init__.py
avbor/HomeAssistantConf
1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614
[ "Unlicense" ]
33
2021-11-22T16:30:43.000Z
2022-03-29T18:00:13.000Z
custom_components/xiaomi_gateway3/__init__.py
avbor/HomeAssistantConf
1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614
[ "Unlicense" ]
19
2021-02-20T05:29:58.000Z
2022-02-05T16:22:30.000Z
import asyncio import logging import voluptuous as vol from homeassistant.components.system_log import CONF_LOGGER from homeassistant.config_entries import ConfigEntry from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.core import HomeAssistant, Event from homeassistant.helpers import config_v...
32.758364
79
0.661825
import asyncio import logging import voluptuous as vol from homeassistant.components.system_log import CONF_LOGGER from homeassistant.config_entries import ConfigEntry from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.core import HomeAssistant, Event from homeassistant.helpers import config_v...
true
true
79043d51417e1308f8af8a56c70ca9301d337d11
6,319
py
Python
mstress_plan.py
maismail/qfs-mstress
8e65b1e77b2cce6a875658a634ae217592142dab
[ "Apache-2.0" ]
1
2017-08-21T10:57:34.000Z
2017-08-21T10:57:34.000Z
mstress_plan.py
maismail/qfs-mstress
8e65b1e77b2cce6a875658a634ae217592142dab
[ "Apache-2.0" ]
null
null
null
mstress_plan.py
maismail/qfs-mstress
8e65b1e77b2cce6a875658a634ae217592142dab
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # $Id$ # # Author: Thilee Subramaniam # # Copyright 2012 Quantcast Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
37.170588
115
0.627947
import optparse import sys import subprocess import time import os import math import getpass """ This program is used to create the directory/file layout to be used in metaserver/namenode stress test. You basically specify the depth of the directory tree and the number of elements (files or di...
false
true
79043ec4bdb5af351b26174d623180bca22dd415
3,151
py
Python
models/BiLSTM.py
ahmedtolan23/NER-with-bilstm-CRF-CNN
29db9f2e357fc4112f9b5752f8ec604e4b9a04b0
[ "Apache-2.0" ]
4
2019-11-07T08:03:22.000Z
2020-07-22T07:15:44.000Z
models/BiLSTM.py
ahmedtolan23/NER-with-bilstm-CRF-CNN
29db9f2e357fc4112f9b5752f8ec604e4b9a04b0
[ "Apache-2.0" ]
null
null
null
models/BiLSTM.py
ahmedtolan23/NER-with-bilstm-CRF-CNN
29db9f2e357fc4112f9b5752f8ec604e4b9a04b0
[ "Apache-2.0" ]
1
2019-09-11T19:54:37.000Z
2019-09-11T19:54:37.000Z
""" FILE : BiLSTM.py FUNCTION : None """ import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import random from DataUtils.Common import * from models.initialize import * from models.modelHelp import prepare_pack_padded_seq...
30.892157
121
0.623294
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import random from DataUtils.Common import * from models.initialize import * from models.modelHelp import prepare_pack_padded_sequence torch.manual_seed(seed_num) random.seed(seed...
true
true
790442b0c52017836428ec0e97f3379e298f3e64
10,389
py
Python
src/_pytest/compat.py
robholt/pytest
307652202c7fa83369f5abfd822a408d4cc32d14
[ "MIT" ]
null
null
null
src/_pytest/compat.py
robholt/pytest
307652202c7fa83369f5abfd822a408d4cc32d14
[ "MIT" ]
null
null
null
src/_pytest/compat.py
robholt/pytest
307652202c7fa83369f5abfd822a408d4cc32d14
[ "MIT" ]
null
null
null
""" python version compatibility code """ import functools import inspect import io import re import sys from contextlib import contextmanager from inspect import Parameter from inspect import signature import attr import py import _pytest from _pytest._io.saferepr import saferepr from _pytest.outcomes import fail fr...
29.682857
106
0.677544
import functools import inspect import io import re import sys from contextlib import contextmanager from inspect import Parameter from inspect import signature import attr import py import _pytest from _pytest._io.saferepr import saferepr from _pytest.outcomes import fail from _pytest.outcomes import TEST_OUTCOME ...
true
true
790443bcc464aae5b19fa76b5861348d20e9ceed
118
py
Python
certbot/certbot/__init__.py
4n3i5v74/certbot
98678158637281069d180b789c80c00e5f182670
[ "Apache-2.0" ]
1
2021-09-12T08:53:17.000Z
2021-09-12T08:53:17.000Z
certbot/certbot/__init__.py
4n3i5v74/certbot
98678158637281069d180b789c80c00e5f182670
[ "Apache-2.0" ]
null
null
null
certbot/certbot/__init__.py
4n3i5v74/certbot
98678158637281069d180b789c80c00e5f182670
[ "Apache-2.0" ]
null
null
null
"""Certbot client.""" # version number like 1.2.3a0, must have at least 2 parts, like 1.2 __version__ = '1.14.0.dev0'
29.5
67
0.686441
__version__ = '1.14.0.dev0'
true
true
790444e3e505a040fcba3a3fb688e1a86ada25b7
3,542
py
Python
ssseg/cfgs/emanet/base_cfg.py
skydengyao/sssegmentation
606b05983fa967bb3c98d1120f44dfc516532dad
[ "MIT" ]
1
2021-05-28T06:42:37.000Z
2021-05-28T06:42:37.000Z
ssseg/cfgs/emanet/base_cfg.py
skydengyao/sssegmentation
606b05983fa967bb3c98d1120f44dfc516532dad
[ "MIT" ]
null
null
null
ssseg/cfgs/emanet/base_cfg.py
skydengyao/sssegmentation
606b05983fa967bb3c98d1120f44dfc516532dad
[ "MIT" ]
null
null
null
'''base config for emanet''' # config for dataset DATASET_CFG = { 'train': { 'type': '', 'set': 'train', 'rootdir': '', 'aug_opts': [('Resize', {'output_size': (2048, 512), 'keep_ratio': True, 'scale_range': (0.5, 2.0)}), ('RandomCrop', {'crop_size': (512, 512), ...
27.457364
109
0.474873
DATASET_CFG = { 'train': { 'type': '', 'set': 'train', 'rootdir': '', 'aug_opts': [('Resize', {'output_size': (2048, 512), 'keep_ratio': True, 'scale_range': (0.5, 2.0)}), ('RandomCrop', {'crop_size': (512, 512), 'one_category_max_ratio': 0.75}), ...
true
true
790445fcab73394f2d74226dbab7d47a788a78c3
283
py
Python
albumentations/__init__.py
BelBES/albumentations
2f83c3c29ae34bfd4f199e660a1174d6db1a0017
[ "MIT" ]
null
null
null
albumentations/__init__.py
BelBES/albumentations
2f83c3c29ae34bfd4f199e660a1174d6db1a0017
[ "MIT" ]
null
null
null
albumentations/__init__.py
BelBES/albumentations
2f83c3c29ae34bfd4f199e660a1174d6db1a0017
[ "MIT" ]
null
null
null
from __future__ import absolute_import __version__ = '0.3.3' from .core.composition import * from .core.transforms_interface import * from .core.serialization import * from .augmentations.transforms import * from .augmentations.bbox_utils import * from .imgaug.transforms import *
25.727273
40
0.80212
from __future__ import absolute_import __version__ = '0.3.3' from .core.composition import * from .core.transforms_interface import * from .core.serialization import * from .augmentations.transforms import * from .augmentations.bbox_utils import * from .imgaug.transforms import *
true
true
790446b75682ad2f6a858e190999f72a97b4085c
44,670
py
Python
datasets/tensorflow-1.0.1/tensorflow/python/ops/rnn.py
yijunyu/demo-fast
11c0c84081a3181494b9c469bda42a313c457ad2
[ "BSD-2-Clause" ]
6
2019-03-24T05:02:03.000Z
2021-12-26T13:00:24.000Z
datasets/tensorflow-1.0.1/tensorflow/python/ops/rnn.py
yijunyu/demo-vscode-fast
11c0c84081a3181494b9c469bda42a313c457ad2
[ "BSD-2-Clause" ]
null
null
null
datasets/tensorflow-1.0.1/tensorflow/python/ops/rnn.py
yijunyu/demo-vscode-fast
11c0c84081a3181494b9c469bda42a313c457ad2
[ "BSD-2-Clause" ]
1
2018-06-13T09:03:18.000Z
2018-06-13T09:03:18.000Z
# Copyright 2015 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...
42.787356
80
0.701903
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shap...
true
true