hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f75cdea7bb3e98ce5c5fb93ce5c13afd6098da2c
5,214
py
Python
tools/pytorch2onnx.py
holyYodu/mmpose
c10225e61da2700b3cd309a6a6234c6280248a0b
[ "Apache-2.0" ]
15
2020-12-10T07:43:34.000Z
2022-03-21T08:38:36.000Z
tools/pytorch2onnx.py
holyYodu/mmpose
c10225e61da2700b3cd309a6a6234c6280248a0b
[ "Apache-2.0" ]
null
null
null
tools/pytorch2onnx.py
holyYodu/mmpose
c10225e61da2700b3cd309a6a6234c6280248a0b
[ "Apache-2.0" ]
10
2020-12-17T07:57:10.000Z
2022-03-08T07:17:12.000Z
import argparse import mmcv import numpy as np import torch from mmcv.runner import load_checkpoint from mmpose.models import build_posenet try: import onnx import onnxruntime as rt except ImportError as e: raise ImportError(f'Please install onnx and onnxruntime first. {e}') try: from mmcv.onnx.symb...
34.302632
78
0.650556
import argparse import mmcv import numpy as np import torch from mmcv.runner import load_checkpoint from mmpose.models import build_posenet try: import onnx import onnxruntime as rt except ImportError as e: raise ImportError(f'Please install onnx and onnxruntime first. {e}') try: from mmcv.onnx.symb...
true
true
f75cdf3269701d249550abf5020e000bf8fbc4db
25,380
py
Python
src/labster/domain2/model/demande.py
jean3108/labandco
4317e7d3875f10d76076ad5fc68c1ba3c12badba
[ "Apache-2.0" ]
null
null
null
src/labster/domain2/model/demande.py
jean3108/labandco
4317e7d3875f10d76076ad5fc68c1ba3c12badba
[ "Apache-2.0" ]
null
null
null
src/labster/domain2/model/demande.py
jean3108/labandco
4317e7d3875f10d76076ad5fc68c1ba3c12badba
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from datetime import date, datetime from decimal import Decimal from enum import Enum, unique from functools import singledispatch from typing import Any, Collection, Dict, List, Optional, Set, Type, Union import dateutil import sqlalchemy as sa from abilian.app import db from email...
32.085967
97
0.638219
from __future__ import annotations from datetime import date, datetime from decimal import Decimal from enum import Enum, unique from functools import singledispatch from typing import Any, Collection, Dict, List, Optional, Set, Type, Union import dateutil import sqlalchemy as sa from abilian.app import db from email...
true
true
f75cdf44179146582acf2a08666b9535c7b0244c
5,443
py
Python
code/hw3/hw3.py
edrebin/NLP-Course
004af059e4a48b9086dc122d32c864799f1f16f1
[ "Apache-2.0" ]
9
2021-08-29T15:23:09.000Z
2022-01-09T20:13:39.000Z
code/hw3/hw3.py
edrebin/NLP-Course
004af059e4a48b9086dc122d32c864799f1f16f1
[ "Apache-2.0" ]
1
2022-03-08T11:05:29.000Z
2022-03-08T13:48:32.000Z
code/hw3/hw3.py
edrebin/NLP-Course
004af059e4a48b9086dc122d32c864799f1f16f1
[ "Apache-2.0" ]
2
2021-12-12T22:11:44.000Z
2022-01-26T03:55:56.000Z
from collections import Counter from typing import List import re import random class NgramLM(object): """N-Gram Language Model :param n: Size of the n-gram, e.g., n=2 bigrams :type n: int :param nlp: Tokenizer, default spacy.lang.en.English """ def __init__(self, n: int=2, nlp: object=None)...
30.926136
99
0.522139
from collections import Counter from typing import List import re import random class NgramLM(object): def __init__(self, n: int=2, nlp: object=None) -> None: from spacy.lang.en import English self._tokens = Counter() self._n_grams = Counter() self.n = n if nlp is None: ...
true
true
f75cdfc03a073d9015b2fd6771411d044d656ba5
661
py
Python
mymap/manage.py
silveiratcl/teste_GeoDjango
02f3566ae26f8538b2fe3f50045d4c619ff79ced
[ "PostgreSQL" ]
null
null
null
mymap/manage.py
silveiratcl/teste_GeoDjango
02f3566ae26f8538b2fe3f50045d4c619ff79ced
[ "PostgreSQL" ]
null
null
null
mymap/manage.py
silveiratcl/teste_GeoDjango
02f3566ae26f8538b2fe3f50045d4c619ff79ced
[ "PostgreSQL" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mymap.settings') try: from django.core.management import execute_from_command_line except Import...
28.73913
73
0.677761
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mymap.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f75ce07dbe844ca917ca74975680c734a996a07f
2,451
py
Python
ml-agents/mlagents/trainers/tests/test_policy.py
ludomitch/ml-agents
213e5f8177eea8c7f06b0c7a979e7031f2f944a7
[ "Apache-2.0" ]
5
2019-02-01T04:53:19.000Z
2021-02-17T21:27:56.000Z
ml-agents/mlagents/trainers/tests/test_policy.py
ludomitch/ml-agents
213e5f8177eea8c7f06b0c7a979e7031f2f944a7
[ "Apache-2.0" ]
4
2020-09-26T00:57:35.000Z
2022-02-10T01:23:52.000Z
ml-agents-0.15.1/ml-agents/mlagents/trainers/tests/test_policy.py
StandInTheRiver/Pong_AI
481e2af4a96377c257a6aa5559d8b7230c432bad
[ "MIT" ]
5
2020-04-15T10:46:39.000Z
2020-05-06T20:52:03.000Z
from mlagents.trainers.policy.tf_policy import TFPolicy from mlagents_envs.base_env import BatchedStepResult, AgentGroupSpec from mlagents.trainers.action_info import ActionInfo from unittest.mock import MagicMock import numpy as np def basic_mock_brain(): mock_brain = MagicMock() mock_brain.vector_action_spa...
31.831169
81
0.687067
from mlagents.trainers.policy.tf_policy import TFPolicy from mlagents_envs.base_env import BatchedStepResult, AgentGroupSpec from mlagents.trainers.action_info import ActionInfo from unittest.mock import MagicMock import numpy as np def basic_mock_brain(): mock_brain = MagicMock() mock_brain.vector_action_spa...
true
true
f75ce1308837311ce951913af1d0ea8673a9fef5
23,051
py
Python
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_workload_groups_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_workload_groups_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_workload_groups_operations.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 ...
50.550439
239
0.669993
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
f75ce142eca99213f69159d1ba88af0bfe0d97e8
15,425
py
Python
osf_pigeon/pigeon.py
kant/osf-pigeon
50ee9c7c8637cde054faf076f50e414954de1669
[ "MIT" ]
null
null
null
osf_pigeon/pigeon.py
kant/osf-pigeon
50ee9c7c8637cde054faf076f50e414954de1669
[ "MIT" ]
null
null
null
osf_pigeon/pigeon.py
kant/osf-pigeon
50ee9c7c8637cde054faf076f50e414954de1669
[ "MIT" ]
null
null
null
import os import re import math import json import tempfile import zipfile import bagit import asyncio from datetime import datetime from asyncio import events from ratelimit import sleep_and_retry from ratelimit.exception import RateLimitException from aiohttp import ClientSession, http_exceptions import internetarch...
33.532609
108
0.611734
import os import re import math import json import tempfile import zipfile import bagit import asyncio from datetime import datetime from asyncio import events from ratelimit import sleep_and_retry from ratelimit.exception import RateLimitException from aiohttp import ClientSession, http_exceptions import internetarch...
true
true
f75ce26d914323394f3cea7ed8f74f28ce6f1602
906
py
Python
racing_data/meet.py
predictive-punter/racing_data
0d1b0ad0fe7591ce859d528af719349c0c7534d3
[ "MIT" ]
15
2017-04-08T05:22:49.000Z
2021-04-20T17:33:22.000Z
racing_data/meet.py
phillc73/racing_data
0d1b0ad0fe7591ce859d528af719349c0c7534d3
[ "MIT" ]
54
2016-07-21T10:35:45.000Z
2016-07-30T23:06:50.000Z
racing_data/meet.py
phillc73/racing_data
0d1b0ad0fe7591ce859d528af719349c0c7534d3
[ "MIT" ]
7
2016-12-15T06:02:54.000Z
2020-04-20T15:32:55.000Z
from . import Entity class Meet(Entity): """A meet represents a collection of races occurring at a given track on a given date""" def __str__(self): return '{track} on {date:%Y-%m-%d}'.format(track=self['track'], date=self['date'].astimezone(self.provider.local_timezone)) @property def has_...
33.555556
131
0.66777
from . import Entity class Meet(Entity): def __str__(self): return '{track} on {date:%Y-%m-%d}'.format(track=self['track'], date=self['date'].astimezone(self.provider.local_timezone)) @property def has_expired(self): return self['updated_at'] < self['date'] or super(Meet, self).has_exp...
true
true
f75ce35481d05c442487ec50f8279f9f9a45c6f0
29,163
py
Python
general/spine.py
Sookhaal/auri_rigging_scripts
d6705b90a75ac9ff28da6c5674d7bdf864349073
[ "MIT" ]
5
2018-11-16T09:21:14.000Z
2022-02-05T08:06:00.000Z
general/spine.py
Sookhaal/auri_rigging_scripts
d6705b90a75ac9ff28da6c5674d7bdf864349073
[ "MIT" ]
44
2017-09-04T10:48:18.000Z
2018-01-08T10:31:05.000Z
general/spine.py
Sookhaal/auri_maya_rigging_scripts
d6705b90a75ac9ff28da6c5674d7bdf864349073
[ "MIT" ]
2
2018-01-29T14:04:32.000Z
2019-08-14T08:15:45.000Z
""" :created: 2017-09 :author: Alex BROSSARD <abrossard@artfx.fr> """ from PySide2 import QtWidgets, QtCore, QtGui from pymel import core as pmc from auri.auri_lib import AuriScriptView, AuriScriptController, AuriScriptModel, is_checked, grpbox from auri.scripts.Maya_Scripts import rig_lib from auri.scripts.Maya_Scri...
51.34331
185
0.637383
from PySide2 import QtWidgets, QtCore, QtGui from pymel import core as pmc from auri.auri_lib import AuriScriptView, AuriScriptController, AuriScriptModel, is_checked, grpbox from auri.scripts.Maya_Scripts import rig_lib from auri.scripts.Maya_Scripts.rig_lib import RigController reload(rig_lib) class View(AuriScri...
true
true
f75ce36a9b1a98557b9cdd72092a1875756647e9
2,069
py
Python
cave/utils/sendmail.py
tannmatter/cave
6e451b2e0bedf8a0920d3d4fa5662400886531d3
[ "MIT" ]
null
null
null
cave/utils/sendmail.py
tannmatter/cave
6e451b2e0bedf8a0920d3d4fa5662400886531d3
[ "MIT" ]
null
null
null
cave/utils/sendmail.py
tannmatter/cave
6e451b2e0bedf8a0920d3d4fa5662400886531d3
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """https://stackoverflow.com/questions/3362600/how-to-send-email-attachments""" import argparse import json import smtplib from os.path import basename from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.ut...
31.830769
91
0.668439
import argparse import json import smtplib from os.path import basename from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import COMMASPACE, formatdate credentials_file = 'avs_cred.json' with open(credentials_file) a...
true
true
f75ce3c03d72fa5c0e85048f82f0a54c4507a580
1,713
py
Python
keystone/common/sql/migrate_repo/versions/013_drop_legacy_endpoints.py
ioram7/keystone
81b5ad22cc8b85d622a332e62e5c4cb63155b654
[ "Apache-2.0" ]
6
2016-08-06T09:00:17.000Z
2021-10-21T23:12:47.000Z
keystone/common/sql/migrate_repo/versions/013_drop_legacy_endpoints.py
ioram7/keystone
81b5ad22cc8b85d622a332e62e5c4cb63155b654
[ "Apache-2.0" ]
1
2021-02-23T10:29:49.000Z
2021-02-23T10:29:49.000Z
keystone/common/sql/migrate_repo/versions/013_drop_legacy_endpoints.py
ioram7/keystone
81b5ad22cc8b85d622a332e62e5c4cb63155b654
[ "Apache-2.0" ]
10
2016-04-25T20:10:06.000Z
2021-06-10T15:14:19.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
32.942308
76
0.68418
import sqlalchemy as sql def upgrade(migrate_engine): meta = sql.MetaData() meta.bind = migrate_engine legacy_table = sql.Table('endpoint_v2', meta, autoload=True) legacy_table.drop() new_table = sql.Table('endpoint_v3', meta, autoload=True) new_table.rename('endpoint') def downgrade(mig...
true
true
f75ce4e65ac9a13904252f064c1bd74b1f81b0e5
3,223
py
Python
tripleo_ansible/ansible_plugins/modules/tripleo_image_params_prepare.py
smolar/tripleo-ansible
7bd37f019870c032bea71f22b305832932d81424
[ "Apache-2.0" ]
null
null
null
tripleo_ansible/ansible_plugins/modules/tripleo_image_params_prepare.py
smolar/tripleo-ansible
7bd37f019870c032bea71f22b305832932d81424
[ "Apache-2.0" ]
null
null
null
tripleo_ansible/ansible_plugins/modules/tripleo_image_params_prepare.py
smolar/tripleo-ansible
7bd37f019870c032bea71f22b305832932d81424
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2018 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
27.547009
78
0.693143
from __future__ import absolute_import from __future__ import division from __future__ import print_function import yaml from ansible.module_utils import tripleo_common_utils as tc from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.openstack import openstack_full_argument_spec from ansibl...
true
true
f75ce668133548c60e9155488c51ba8375cd83b9
443
py
Python
client_industry/tests/factory.py
My-Garage/resourceideaapi
b872a6f15277989870572ba6e523c9dc378b7a24
[ "MIT" ]
1
2021-01-20T14:40:06.000Z
2021-01-20T14:40:06.000Z
client_industry/tests/factory.py
My-Garage/resourceideaapi
b872a6f15277989870572ba6e523c9dc378b7a24
[ "MIT" ]
null
null
null
client_industry/tests/factory.py
My-Garage/resourceideaapi
b872a6f15277989870572ba6e523c9dc378b7a24
[ "MIT" ]
null
null
null
import factory from faker import Faker from faker.providers import lorem # type: ignore from organization.tests.factory import OrganizationFactory faker = Faker() faker.add_provider(lorem) class ClientIndustryFactory(factory.django.DjangoModelFactory): """Client industry factory""" class Meta: mo...
22.15
63
0.765237
import factory from faker import Faker from faker.providers import lorem from organization.tests.factory import OrganizationFactory faker = Faker() faker.add_provider(lorem) class ClientIndustryFactory(factory.django.DjangoModelFactory): class Meta: model = 'client_industry.ClientIndustry' name ...
true
true
f75ce68c554e5852686b4e1b3e2d20735666ff2b
4,507
py
Python
tests/gmprocess/waveform_processing/corner_frequencies_test.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
54
2019-01-12T02:05:38.000Z
2022-03-29T19:43:56.000Z
tests/gmprocess/waveform_processing/corner_frequencies_test.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
700
2018-12-18T19:44:31.000Z
2022-03-30T20:54:28.000Z
tests/gmprocess/waveform_processing/corner_frequencies_test.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
41
2018-11-29T23:17:56.000Z
2022-03-31T04:04:23.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np from gmprocess.core.streamcollection import StreamCollection from gmprocess.io.read import read_data from gmprocess.utils.test_utils import read_data_dir from gmprocess.utils.config import get_config from gmprocess.waveform_processing.window...
34.40458
87
0.64655
import os import numpy as np from gmprocess.core.streamcollection import StreamCollection from gmprocess.io.read import read_data from gmprocess.utils.test_utils import read_data_dir from gmprocess.utils.config import get_config from gmprocess.waveform_processing.windows import signal_split from gmprocess.waveform_...
true
true
f75ce690699c9275d9baced57cd15beeb2302377
6,721
py
Python
compiler_gym/third_party/gccinvocation/gccinvocation.py
thecoblack/CompilerGym
ade54e2f1829cf41722decb0942a4d6fd3102c2c
[ "MIT" ]
null
null
null
compiler_gym/third_party/gccinvocation/gccinvocation.py
thecoblack/CompilerGym
ade54e2f1829cf41722decb0942a4d6fd3102c2c
[ "MIT" ]
null
null
null
compiler_gym/third_party/gccinvocation/gccinvocation.py
thecoblack/CompilerGym
ade54e2f1829cf41722decb0942a4d6fd3102c2c
[ "MIT" ]
null
null
null
# Copyright 2013 David Malcolm <dmalcolm@redhat.com> # Copyright 2013 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (...
31.553991
77
0.566731
import argparse import os from pathlib import Path def cmdline_to_argv(cmdline): def iter_fragments(): class Quoted: def __init__(self, quotechar, text): self.quotechar = quotechar self.text = text def __repr__(self): return ...
true
true
f75ce7420c716e546df60e49676ccf9e950b5ec2
1,518
py
Python
var/spack/repos/builtin/packages/miniconda3/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-05-24T15:23:12.000Z
2020-05-24T15:23:12.000Z
var/spack/repos/builtin/packages/miniconda3/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
6
2022-02-26T11:44:34.000Z
2022-03-12T12:14:50.000Z
var/spack/repos/builtin/packages/miniconda3/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-03-06T11:04:37.000Z
2020-03-06T11:04:37.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * from os.path import split class Miniconda3(Package): """The minimalist bootstrap toolset for con...
50.6
112
0.755599
from spack import * from os.path import split class Miniconda3(Package): homepage = "https://conda.io/miniconda.html" url = "https://repo.continuum.io/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh" version('4.7.12.1', sha256='bfe34e1fa28d6d75a7ad05fd02fa5472275673d5f5621b77380898dee1be15d2', expand=...
true
true
f75ce7d26a878604932e963d056c46982fa1c28b
1,500
py
Python
daemon/examples/stopsession.py
rudyeila/core
1c11c6c573eccc666492f25091043ec923a79f09
[ "BSD-2-Clause" ]
null
null
null
daemon/examples/stopsession.py
rudyeila/core
1c11c6c573eccc666492f25091043ec923a79f09
[ "BSD-2-Clause" ]
null
null
null
daemon/examples/stopsession.py
rudyeila/core
1c11c6c573eccc666492f25091043ec923a79f09
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # (c)2010-2012 the Boeing Company # author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # # List and stop CORE sessions from the command line. # import optparse import socket from core.api.tlv import coreapi from core.emulator.enumerations import CORE_API_PORT, MessageFlags, SessionTlvs de...
29.411765
86
0.673333
import optparse import socket from core.api.tlv import coreapi from core.emulator.enumerations import CORE_API_PORT, MessageFlags, SessionTlvs def main(): parser = optparse.OptionParser(usage="usage: %prog [-l] <sessionid>") parser.add_option( "-l", "--list", dest="list", action="store_true", help="...
true
true
f75ce884f563c36b4ff675dba139fc7d85f84a2d
11,391
py
Python
stanza/models/lemmatizer.py
rasimuvaikas/stanza
21793519a531b0e9d7151e42d180d97785c9a5b8
[ "Apache-2.0" ]
1
2021-06-04T01:23:55.000Z
2021-06-04T01:23:55.000Z
stanza/models/lemmatizer.py
rasimuvaikas/stanza
21793519a531b0e9d7151e42d180d97785c9a5b8
[ "Apache-2.0" ]
null
null
null
stanza/models/lemmatizer.py
rasimuvaikas/stanza
21793519a531b0e9d7151e42d180d97785c9a5b8
[ "Apache-2.0" ]
null
null
null
""" Entry point for training and evaluating a lemmatizer. This lemmatizer combines a neural sequence-to-sequence architecture with an `edit` classifier and two dictionaries to produce robust lemmas from word forms. For details please refer to paper: https://nlp.stanford.edu/pubs/qi2018universal.pdf. """ import loggi...
43.811538
159
0.651655
import logging import sys import os import shutil import time from datetime import datetime import argparse import numpy as np import random import torch from torch import nn, optim from stanza.models.lemma.data import DataLoader from stanza.models.lemma.vocab import Vocab from stanza.models.lemma.trainer import Trai...
true
true
f75ce9a7b4f808372b569f30f39f5edb0950bac9
1,815
py
Python
pyviz3d/linear_path.py
butala/pyviz3d
275ae6596de61a767ce7b7f3470c391596150421
[ "MIT" ]
null
null
null
pyviz3d/linear_path.py
butala/pyviz3d
275ae6596de61a767ce7b7f3470c391596150421
[ "MIT" ]
null
null
null
pyviz3d/linear_path.py
butala/pyviz3d
275ae6596de61a767ce7b7f3470c391596150421
[ "MIT" ]
null
null
null
from itertools import repeat from collections import Iterable import vtk from .color import RED def linear_path(xyz_list, color=RED, alpha=1): """ """ N = len(xyz_list) if not isinstance(color[0], Iterable): color = repeat(color, N) if not isinstance(alp...
24.2
61
0.600551
from itertools import repeat from collections import Iterable import vtk from .color import RED def linear_path(xyz_list, color=RED, alpha=1): N = len(xyz_list) if not isinstance(color[0], Iterable): color = repeat(color, N) if not isinstance(alpha, Iterable): ...
true
true
f75ce9e64b1bdedbc9125a07b72f90109d692ddd
396
py
Python
Emailer/authentication/urls.py
Pavel-Petkov03/Emailer
8f2b73e82136374e3f8b86537740ae0a2244c03d
[ "MIT" ]
null
null
null
Emailer/authentication/urls.py
Pavel-Petkov03/Emailer
8f2b73e82136374e3f8b86537740ae0a2244c03d
[ "MIT" ]
8
2022-02-20T03:17:56.000Z
2022-03-29T17:20:14.000Z
Emailer/authentication/urls.py
Pavel-Petkov03/Emailer
8f2b73e82136374e3f8b86537740ae0a2244c03d
[ "MIT" ]
null
null
null
from django.urls import path from Emailer.authentication.views import LoginView, RegisterView, EditProfileView, LogoutView urlpatterns = [ path("login", LoginView.as_view(), name="login"), path("register", RegisterView.as_view(), name="register"), path("edit-profile", EditProfileView.as_view(), name=...
44
94
0.714646
from django.urls import path from Emailer.authentication.views import LoginView, RegisterView, EditProfileView, LogoutView urlpatterns = [ path("login", LoginView.as_view(), name="login"), path("register", RegisterView.as_view(), name="register"), path("edit-profile", EditProfileView.as_view(), name=...
true
true
f75ceb2e0c2226d982ef22950202cf8d85d907f5
9,436
py
Python
api/application.py
riccardo-forina/codingnot.es
18d3223f71f11ec290401278f34999f5c39500a6
[ "BSD-3-Clause" ]
null
null
null
api/application.py
riccardo-forina/codingnot.es
18d3223f71f11ec290401278f34999f5c39500a6
[ "BSD-3-Clause" ]
null
null
null
api/application.py
riccardo-forina/codingnot.es
18d3223f71f11ec290401278f34999f5c39500a6
[ "BSD-3-Clause" ]
null
null
null
import os import sys import re import socket import pytz import urllib.request, urllib.parse, urllib.error import json from datetime import datetime from urllib.parse import urljoin from datetime import datetime, time from flask import Flask, render_template, request, url_for, Response from flask_assets import Environm...
29.213622
132
0.609156
import os import sys import re import socket import pytz import urllib.request, urllib.parse, urllib.error import json from datetime import datetime from urllib.parse import urljoin from datetime import datetime, time from flask import Flask, render_template, request, url_for, Response from flask_assets import Environm...
true
true
f75ced047190c2771dec8a2a9981bc48317ad7ad
7,221
py
Python
h2o-py/h2o/estimators/word2vec.py
gkirok/h2o-3
b128be6644c685cb6059444a1dbd5106f76f2672
[ "Apache-2.0" ]
2
2018-09-20T03:28:46.000Z
2018-12-06T21:39:29.000Z
h2o-py/h2o/estimators/word2vec.py
gkirok/h2o-3
b128be6644c685cb6059444a1dbd5106f76f2672
[ "Apache-2.0" ]
1
2021-11-15T17:47:41.000Z
2021-11-15T17:47:41.000Z
h2o-py/h2o/estimators/word2vec.py
gkirok/h2o-3
b128be6644c685cb6059444a1dbd5106f76f2672
[ "Apache-2.0" ]
1
2019-04-15T10:08:42.000Z
2019-04-15T10:08:42.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # This file is auto-generated by h2o-3/h2o-bindings/bin/gen_python.py # Copyright 2016 H2O.ai; Apache License Version 2.0 (see LICENSE for details) # from __future__ import absolute_import, division, print_function, unicode_literals from h2o.estimators.estimator_base ...
29.594262
111
0.614735
from __future__ import absolute_import, division, print_function, unicode_literals from h2o.estimators.estimator_base import H2OEstimator from h2o.exceptions import H2OValueError from h2o.frame import H2OFrame from h2o.utils.typechecks import assert_is_type, Enum, numeric class H2OWord2vecEstimator(H2OEstimator): ...
true
true
f75cee55718a61a5b73a49ad86aa1acdb0899c72
1,529
py
Python
sa/profiles/IBM/NOS/get_mac_address_table.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
sa/profiles/IBM/NOS/get_mac_address_table.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
sa/profiles/IBM/NOS/get_mac_address_table.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# --------------------------------------------------------------------- # IBM.NOS.get_mac_address_table # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- imp...
33.977778
100
0.453237
import re from noc.core.script.base import BaseScript from noc.sa.interfaces.igetmacaddresstable import IGetMACAddressTable class Script(BaseScript): name = "IBM.NOS.get_mac_address_table" interface = IGetMACAddressTable rx_mac = re.compile(r"^\s+(?P<mac>\S+)\s+(?P<vlan_id>\d+)\s+(?P<port>\S+)\s+(?P<st...
true
true
f75cef8261b73c5cb018adcf20fd8eb888b642c2
275
py
Python
nsls2_catalogs/tests/test_catalogs.py
NSLS-II/nsls2-catalogs
8dab7db65335ccd20eacf7f2e999d64ec7325620
[ "BSD-3-Clause" ]
null
null
null
nsls2_catalogs/tests/test_catalogs.py
NSLS-II/nsls2-catalogs
8dab7db65335ccd20eacf7f2e999d64ec7325620
[ "BSD-3-Clause" ]
null
null
null
nsls2_catalogs/tests/test_catalogs.py
NSLS-II/nsls2-catalogs
8dab7db65335ccd20eacf7f2e999d64ec7325620
[ "BSD-3-Clause" ]
null
null
null
import entrypoints from databroker import Broker def test_load_catalogs(): # Loads all of the catalogs and checks that they are of type Broker. for key, entry in entrypoints.get_group_named('intake.catalogs').items(): assert isinstance(entry.load(), Broker)
34.375
77
0.749091
import entrypoints from databroker import Broker def test_load_catalogs(): for key, entry in entrypoints.get_group_named('intake.catalogs').items(): assert isinstance(entry.load(), Broker)
true
true
f75cefed5793aea9ced680fdf6a29e9c9c3563ca
978
py
Python
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/workspace/models/operation.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/workspace/models/operation.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/workspace/models/operation.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 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- ...
33.724138
77
0.547035
from msrest.serialization import Model class Operation(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, } def __init__(self, name=None, display=None): super(Operation, self).__init__() ...
true
true
f75cf04e7beebde782ff703ce08e72fb86b74836
76
py
Python
ABC045/ABC045d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC045/ABC045d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC045/ABC045d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
#ABC045d import sys input = sys.stdin.readline sys.setrecursionlimit(10**6)
15.2
28
0.789474
import sys input = sys.stdin.readline sys.setrecursionlimit(10**6)
true
true
f75cf1d1cbf14ce0c50b099a1e69d2c876c5707c
3,246
py
Python
var/spack/repos/builtin/packages/py-nbconvert/package.py
lcnzg/spack
5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2018-11-16T02:42:57.000Z
2019-06-06T19:18:50.000Z
var/spack/repos/builtin/packages/py-nbconvert/package.py
lcnzg/spack
5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin/packages/py-nbconvert/package.py
hainest/spack
c592e17d49118f253b552ef6165745ded8ac0ea5
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-07-19T20:31:27.000Z
2021-07-19T21:14:14.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyNbconvert(PythonPackage): """Jupyter Notebook Conversion""" homepage = "https://github.com/jupyter/nbcon...
53.213115
95
0.668823
class PyNbconvert(PythonPackage): homepage = "https://github.com/jupyter/nbconvert" pypi = "nbconvert/nbconvert-6.0.1.tar.gz" version('6.0.1', sha256='db94117fbac29153834447e31b30cda337d4450e46e0bdb1a36eafbbf4435156') version('5.6.0', sha256='427a468ec26e7d68a529b95f578d5cbf018cb4c1f889e897681c2b6d1...
true
true
f75cf35f34d477cb3fe2906706615793f106c7d4
420
py
Python
HACKERRANK_Introduction/Arithmetic_Operators.py
StefaniaSferragatta/ADM2020-HW1
8f85ac1c8dd4bff52c5c17987c9e96b209a93830
[ "MIT" ]
null
null
null
HACKERRANK_Introduction/Arithmetic_Operators.py
StefaniaSferragatta/ADM2020-HW1
8f85ac1c8dd4bff52c5c17987c9e96b209a93830
[ "MIT" ]
null
null
null
HACKERRANK_Introduction/Arithmetic_Operators.py
StefaniaSferragatta/ADM2020-HW1
8f85ac1c8dd4bff52c5c17987c9e96b209a93830
[ "MIT" ]
null
null
null
import math if __name__ == '__main__': a = int(input()) b = int(input()) max = pow(10, 10) if a > 1 and a < max: if b > 1 and b < max: sum_ = a + b diff_ = a - b prod_ = a * b print(sum_) print(diff_) print(prod_) e...
22.105263
43
0.430952
import math if __name__ == '__main__': a = int(input()) b = int(input()) max = pow(10, 10) if a > 1 and a < max: if b > 1 and b < max: sum_ = a + b diff_ = a - b prod_ = a * b print(sum_) print(diff_) print(prod_) e...
true
true
f75cf561717f636d572065bea145428ad78a4a8f
40,000
py
Python
ironic/api/controllers/v1/utils.py
Rachit7194/ironic
a17b20d12554133931f44c78c415f2ea0f61ac74
[ "Apache-2.0" ]
null
null
null
ironic/api/controllers/v1/utils.py
Rachit7194/ironic
a17b20d12554133931f44c78c415f2ea0f61ac74
[ "Apache-2.0" ]
null
null
null
ironic/api/controllers/v1/utils.py
Rachit7194/ironic
a17b20d12554133931f44c78c415f2ea0f61ac74
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
36.463081
79
0.691
import inspect import re import jsonpatch import os_traits from oslo_config import cfg from oslo_utils import uuidutils import pecan from pecan import rest import six from six.moves import http_client from webob import static import wsme from ironic.api.controllers.v1 import versions from ironic.common import except...
true
true
f75cf5b6becd4c288707020c6b122d0882452e59
3,252
py
Python
auxiliares.py
xadrez-gpms/xadrez
32dd4b7670c146315755eca0ab5d5ee428c739ee
[ "MIT" ]
null
null
null
auxiliares.py
xadrez-gpms/xadrez
32dd4b7670c146315755eca0ab5d5ee428c739ee
[ "MIT" ]
null
null
null
auxiliares.py
xadrez-gpms/xadrez
32dd4b7670c146315755eca0ab5d5ee428c739ee
[ "MIT" ]
null
null
null
# Documento responsavel por conter classes e/ou funcoes auxiliares # TODO escrever controlador de logica para estruturar melhor o projeto from enum import Enum class Coord: # Classe auxiliar def __init__(self, x, y): self.x = x; self.y = y; class SceneState(Enum): EMPTY = 0, CREATED = 1, ...
24.451128
91
0.50861
from enum import Enum class Coord: def __init__(self, x, y): self.x = x; self.y = y; class SceneState(Enum): EMPTY = 0, CREATED = 1, INITIALIZED = 2, LOADED = 3, RUNNING = 4, AWAITING = 5, TO_BE_DESTROYED = 6 class Roque(Enum): PEQUENO = 0, GRANDE = 1 class En...
true
true
f75cf6248ab11de57dad3a207d3dc8c56e845ae2
385,544
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.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 ...
44.443112
901
0.681621
import msrest.serialization class AccessUri(msrest.serialization.Model): _validation = { 'access_sas': {'readonly': True}, } _attribute_map = { 'access_sas': {'key': 'accessSAS', 'type': 'str'}, } def __init__( self, **kwargs ): super(AccessUri, self...
true
true
f75cf6b235c84e6a8f2febad1f33fef8431b9f49
2,179
py
Python
setup.py
biffsocko/pssh3
9da2d30ce0cf025da978ce6b7bec9d5c05484174
[ "BSD-3-Clause" ]
null
null
null
setup.py
biffsocko/pssh3
9da2d30ce0cf025da978ce6b7bec9d5c05484174
[ "BSD-3-Clause" ]
null
null
null
setup.py
biffsocko/pssh3
9da2d30ce0cf025da978ce6b7bec9d5c05484174
[ "BSD-3-Clause" ]
null
null
null
from distutils.core import setup import os from psshlib import version long_description = """PSSH (Parallel SSH) provides parallel versions of OpenSSH and related tools, including pssh, pscp, prsync, pnuke, and pslurp. The project includes psshlib which can be used within custom applications.""" setup( name = "p...
42.72549
226
0.6067
from distutils.core import setup import os from psshlib import version long_description = """PSSH (Parallel SSH) provides parallel versions of OpenSSH and related tools, including pssh, pscp, prsync, pnuke, and pslurp. The project includes psshlib which can be used within custom applications.""" setup( name = "p...
true
true
f75cf74ecd927ee6b2ed9ebc645aa70eb00eb62c
1,015
py
Python
tf2_tools/setup.py
fujitatomoya/geometry2
f72c9d31a95b1863d7fd0fdbac77102b674f3317
[ "BSD-3-Clause" ]
null
null
null
tf2_tools/setup.py
fujitatomoya/geometry2
f72c9d31a95b1863d7fd0fdbac77102b674f3317
[ "BSD-3-Clause" ]
null
null
null
tf2_tools/setup.py
fujitatomoya/geometry2
f72c9d31a95b1863d7fd0fdbac77102b674f3317
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup package_name = 'tf2_tools' setup( name=package_name, version='0.26.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), ], inst...
29
80
0.632512
from setuptools import setup package_name = 'tf2_tools' setup( name=package_name, version='0.26.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), ], inst...
true
true
f75cf7bafa42ddf4b7749a92cb1e4598139c8a71
8,751
py
Python
kinect_vision_target_cap/src/find_obj_xyz.py
sherrardTr4129/RealSense-BNO055-Pose-Estimation
ca48f11ae53549b2782a7848ee5091e1ce8d30ff
[ "MIT" ]
2
2021-06-21T15:15:56.000Z
2021-09-22T10:02:15.000Z
kinect_vision_target_cap/src/find_obj_xyz.py
sherrardTr4129/RealSense-BNO055-Pose-Estimation
ca48f11ae53549b2782a7848ee5091e1ce8d30ff
[ "MIT" ]
null
null
null
kinect_vision_target_cap/src/find_obj_xyz.py
sherrardTr4129/RealSense-BNO055-Pose-Estimation
ca48f11ae53549b2782a7848ee5091e1ce8d30ff
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Author: Trevor Sherrard # Course: Directed Research # Since: 02/06/2021 # Description: This script extracts synced RGB and Depth frames from # the kinect and attempts to locate a given vision target. # if the vision target is located, the XYZ coordinates are # ...
33.787645
109
0.682893
import freenect import cv2 import numpy as np import rospy import pyrealsense2 as rs from geometry_msgs.msg import PointStamped from sensor_msgs.msg import Image from cv_bridge import CvBridge from WindowedAverage import MovingWindowAverage cv2.namedWindow('Depth') cv2.namedWindow('Video') pointPubTopic = "/vision_...
true
true
f75cf804ba545288337e46aec4624ef660b59897
2,156
py
Python
python/lib/Lib/site-packages/django/contrib/gis/sitemaps/georss.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
django/contrib/gis/sitemaps/georss.py
mradziej/django
5d38965743a369981c9a738a298f467f854a2919
[ "BSD-3-Clause" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
django/contrib/gis/sitemaps/georss.py
mradziej/django
5d38965743a369981c9a738a298f467f854a2919
[ "BSD-3-Clause" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
from django.core import urlresolvers from django.contrib.sitemaps import Sitemap class GeoRSSSitemap(Sitemap): """ A minimal hook to produce sitemaps for GeoRSS feeds. """ def __init__(self, feed_dict, slug_dict=None): """ This sitemap object initializes on a feed dictionary (as would b...
39.925926
89
0.633117
from django.core import urlresolvers from django.contrib.sitemaps import Sitemap class GeoRSSSitemap(Sitemap): def __init__(self, feed_dict, slug_dict=None): self.feed_dict = feed_dict self.locations = [] if slug_dict is None: slug_dict = {} for section in feed_dict....
true
true
f75cf9bcb6eb50703ecaf3f3d3de676a716e4588
38,508
py
Python
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_bno08x/__init__.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
47
2021-02-15T23:02:36.000Z
2022-03-04T21:30:03.000Z
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_bno08x/__init__.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
7
2021-02-19T20:00:08.000Z
2022-01-14T10:51:12.000Z
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_bno08x/__init__.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
14
2021-02-20T17:40:56.000Z
2022-01-01T19:53:38.000Z
# pylint:disable=too-many-lines # SPDX-FileCopyrightText: Copyright (c) 2020 Bryan Siepert for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_bno08x` ================================================================================ Helper library for the Hillcrest Laboratories BNO08x IMUs * Author...
35.589649
98
0.636699
__version__ = "1.0.4" __repo__ = "https:# github.com/adafruit/Adafruit_CircuitPython_BNO08x.git" from struct import unpack_from, pack_into from collections import namedtuple import time from micropython import const from .debug import channels, reports BNO_CHANNEL_SHTP_COMMAND = const(0) BNO_CHANNEL_EXE = const(1) _...
true
true
f75cfa14566f54de4bee1367da730ac3532b9ec7
1,220
py
Python
test/test_del_contact.py
AlsuKhalva/zombi_training
7b00092fd4df5a6b8083fad6026655faa674acde
[ "Apache-2.0" ]
null
null
null
test/test_del_contact.py
AlsuKhalva/zombi_training
7b00092fd4df5a6b8083fad6026655faa674acde
[ "Apache-2.0" ]
null
null
null
test/test_del_contact.py
AlsuKhalva/zombi_training
7b00092fd4df5a6b8083fad6026655faa674acde
[ "Apache-2.0" ]
null
null
null
import random from model.contact import Contact def test_delete_some_contact(app, db, check_ui): if len(db.get_contacts_list()) == 0: app.form.create(Contact(first_name="VVVVVVV")) old_contacts_list = db.get_contacts_list() user = random.choice(old_contacts_list) app.form.delete_contact_by_id(...
39.354839
121
0.717213
import random from model.contact import Contact def test_delete_some_contact(app, db, check_ui): if len(db.get_contacts_list()) == 0: app.form.create(Contact(first_name="VVVVVVV")) old_contacts_list = db.get_contacts_list() user = random.choice(old_contacts_list) app.form.delete_contact_by_id(...
true
true
f75cfac08ed5ee7bd11baecaf3b8c214fd5386c1
4,265
py
Python
polaris/settings.py
lijamie98/django-polaris
5cdda7434281988deb761b34f574dfcaf7ae9f5d
[ "Apache-2.0" ]
null
null
null
polaris/settings.py
lijamie98/django-polaris
5cdda7434281988deb761b34f574dfcaf7ae9f5d
[ "Apache-2.0" ]
null
null
null
polaris/settings.py
lijamie98/django-polaris
5cdda7434281988deb761b34f574dfcaf7ae9f5d
[ "Apache-2.0" ]
null
null
null
""" Django settings for app project. """ # pylint: disable=invalid-name import os import environ from django.utils.translation import gettext_lazy as _ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # Load environment variables from .env env = environ.Env() env_file = os.path.join(BASE_DIR, ".env") if os.path....
30.248227
84
0.674795
import os import environ from django.utils.translation import gettext_lazy as _ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) env = environ.Env() env_file = os.path.join(BASE_DIR, ".env") if os.path.exists(env_file): environ.Env.read_env(env_file) SECRET_KEY = env("DJANGO_SECRET_KEY") DEBUG = env.bool("D...
true
true
f75cfc1b274aaeaae5d208ba7388ec0470e1d3c5
245
py
Python
app/cf/urls.py
swelanauguste/comp_techs_temp_capture_web_app
20ba7b9fcc887ca376dd1a7880f19aed020f07bf
[ "MIT" ]
null
null
null
app/cf/urls.py
swelanauguste/comp_techs_temp_capture_web_app
20ba7b9fcc887ca376dd1a7880f19aed020f07bf
[ "MIT" ]
null
null
null
app/cf/urls.py
swelanauguste/comp_techs_temp_capture_web_app
20ba7b9fcc887ca376dd1a7880f19aed020f07bf
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include urlpatterns = [ path("admin/", admin.site.urls), path("accounts/", include("allauth.urls")), path("", include("temperatures.urls", namespace="temperatures")), ]
27.222222
69
0.693878
from django.contrib import admin from django.urls import path, include urlpatterns = [ path("admin/", admin.site.urls), path("accounts/", include("allauth.urls")), path("", include("temperatures.urls", namespace="temperatures")), ]
true
true
f75cfc6fbc2038eba7fd11782abf69dd68f71bc2
3,904
py
Python
resnet.py
BXuan694/basemodel-pytorch
a36c96904580be902e323db17eebbe2ea1f54176
[ "MIT" ]
1
2019-03-18T15:35:34.000Z
2019-03-18T15:35:34.000Z
resnet.py
BXuan694/basemodel-pytorch
a36c96904580be902e323db17eebbe2ea1f54176
[ "MIT" ]
null
null
null
resnet.py
BXuan694/basemodel-pytorch
a36c96904580be902e323db17eebbe2ea1f54176
[ "MIT" ]
1
2019-03-19T01:06:47.000Z
2019-03-19T01:06:47.000Z
'''ResNet in PyTorch. For Pre-activation ResNet, see 'preact_resnet.py'. Reference: [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun Deep Residual Learning for Image Recognition. arXiv:1512.03385 ''' import torch import torch.nn as nn import torch.nn.functional as F class BasicBlock(nn.Module): expansi...
34.548673
102
0.626537
import torch import torch.nn as nn import torch.nn.functional as F class BasicBlock(nn.Module): expansion = 1 def __init__(self, in_planes, planes, stride=1): super(BasicBlock, self).__init__() self.conv1 = nn.Conv2d(in_planes, planes, kernel_size=3, stride=stride, padding=1, bias=False) ...
true
true
f75cfd0a8f7946dbbcf7427203cc013df2f37bbb
1,549
py
Python
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_vizier_service_get_study_sync.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
180
2020-09-23T17:21:15.000Z
2022-03-30T17:25:47.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_vizier_service_get_study_sync.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
601
2020-09-23T16:23:44.000Z
2022-03-31T19:08:23.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_vizier_service_get_study_sync.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
109
2020-09-23T16:22:04.000Z
2022-03-28T21:18:29.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
32.270833
85
0.759199
from google.cloud import aiplatform_v1beta1 def sample_get_study(): client = aiplatform_v1beta1.VizierServiceClient() request = aiplatform_v1beta1.GetStudyRequest( name="projects/{project}/locations/{location}/studies/{study}", ) response = client.get_study(request=request) ...
true
true
f75cfeb9d1a21939255e78a221ef34b90122967d
9,952
py
Python
st2actions/tests/unit/test_executions.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
null
null
null
st2actions/tests/unit/test_executions.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
null
null
null
st2actions/tests/unit/test_executions.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
null
null
null
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
55.910112
99
0.738445
import copy import mock import st2tests.config as tests_config tests_config.parse_args() import st2common.bootstrap.runnersregistrar as runners_registrar from st2actions.runners.localrunner import LocalShellRunner from st2common.constants import action as action_constants from st2common.models.db.liveaction import ...
true
true
f75cfeca0bccc05f9ae7cf185593f6cd42f5134a
1,091
py
Python
solutions/206.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
2
2022-01-18T08:57:13.000Z
2022-01-18T15:49:06.000Z
solutions/206.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
solutions/206.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
# Reverse Linked List # Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): tail = "<EMPTY>" if self.next is None else repr(self.next) return f"{self.val} - {tail}" class Solution: def...
25.97619
74
0.579285
class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): tail = "<EMPTY>" if self.next is None else repr(self.next) return f"{self.val} - {tail}" class Solution: def helper(self, head): if head.next.next is None: ...
true
true
f75d001eacb6fde799b8ec47c98c0d9c6cb65279
1,230
py
Python
scripts/clamor_util.py
weld-project/clamor
72e7a75e608bb3407ab6f7ee47f24f707932b71a
[ "Apache-2.0" ]
null
null
null
scripts/clamor_util.py
weld-project/clamor
72e7a75e608bb3407ab6f7ee47f24f707932b71a
[ "Apache-2.0" ]
null
null
null
scripts/clamor_util.py
weld-project/clamor
72e7a75e608bb3407ab6f7ee47f24f707932b71a
[ "Apache-2.0" ]
null
null
null
import argparse import csv import itertools import json import math import subprocess import sys import time # Copy a file to a given host through scp, throwing an exception if scp fails def scp(host, identity_file, user, local_file, dest_file): subprocess.check_call( "scp -q -o StrictHostKeyChecking=no -i %s ...
32.368421
110
0.674797
import argparse import csv import itertools import json import math import subprocess import sys import time def scp(host, identity_file, user, local_file, dest_file): subprocess.check_call( "scp -q -o StrictHostKeyChecking=no -i %s '%s' '%s@%s:%s'" % (identity_file, local_file, user, host, dest_file), s...
false
true
f75d0043947a1d3eebc8164cb0239378533c2186
5,226
py
Python
electroncash_gui/qt/qrwindow.py
Fabcien/ElectrumABC
b898d8f116f071e6e25705cfb88f8d1d68142dd7
[ "MIT" ]
1
2021-08-22T20:19:19.000Z
2021-08-22T20:19:19.000Z
electroncash_gui/qt/qrwindow.py
meaze0507/ElectrumABC
262dd0acc00763422eededf5ab20c7cb82674cdb
[ "MIT" ]
null
null
null
electroncash_gui/qt/qrwindow.py
meaze0507/ElectrumABC
262dd0acc00763422eededf5ab20c7cb82674cdb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Electrum ABC - lightweight eCash client # Copyright (C) 2020 The Electrum ABC developers # Copyright (C) 2014 Thomas Voegtlin # # 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 t...
44.666667
196
0.707616
from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QWidget, QDialog, QPushButton, QSizePolicy from electroncash_gui.qt.qrcodewidget import QRCodeWidget, save_to_file, copy_to_clipboard from .util import WWLabel, Buttons, MessageBoxMixin from electroncash.i18n import _ from electroncash...
true
true
f75d005c6e5dee152c27a428afd7c1bbfccb2858
1,074
py
Python
task/sseg/criterion.py
charlesCXK/PixelSSL
2e85e12c1db5b24206bfbbf2d7f6348ae82b2105
[ "Apache-2.0" ]
null
null
null
task/sseg/criterion.py
charlesCXK/PixelSSL
2e85e12c1db5b24206bfbbf2d7f6348ae82b2105
[ "Apache-2.0" ]
null
null
null
task/sseg/criterion.py
charlesCXK/PixelSSL
2e85e12c1db5b24206bfbbf2d7f6348ae82b2105
[ "Apache-2.0" ]
1
2021-08-12T02:36:59.000Z
2021-08-12T02:36:59.000Z
import time import numpy as np import torch import torch.nn as nn import pixelssl def add_parser_arguments(parser): pixelssl.criterion_template.add_parser_arguments(parser) def deeplab_criterion(): return DeepLabCriterion class DeepLabCriterion(pixelssl.criterion_template.TaskCriterion): def __init_...
27.538462
89
0.61825
import time import numpy as np import torch import torch.nn as nn import pixelssl def add_parser_arguments(parser): pixelssl.criterion_template.add_parser_arguments(parser) def deeplab_criterion(): return DeepLabCriterion class DeepLabCriterion(pixelssl.criterion_template.TaskCriterion): def __init_...
true
true
f75d00e66d489ab08c4d37cdff6cc1132b30471c
40,869
py
Python
src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py
andyzhangx/azure-cli
ff9f7df15195e72a3aaa6f0a31aad420c5a436fd
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py
andyzhangx/azure-cli
ff9f7df15195e72a3aaa6f0a31aad420c5a436fd
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py
andyzhangx/azure-cli
ff9f7df15195e72a3aaa6f0a31aad420c5a436fd
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
32.384311
477
0.723066
from knack.help_files import helps helps['appservice'] = """ type: group short-summary: Manage App Service plans. """ helps['appservice list-locations'] = """ type: command short-summary: List regions where a plan sku is available. examples: - name: List regions where a plan sku is available. (autogenerated) t...
true
true
f75d022c60393ca3cec8521403f84ba1115a4c59
3,502
py
Python
gyro.py
G33kDude/pyev3
6ff7bb6769a42fc93a3ec6a3e0af58129dda5637
[ "MIT" ]
15
2015-01-03T05:04:00.000Z
2021-02-15T15:10:30.000Z
gyro.py
G33kDude/pyev3
6ff7bb6769a42fc93a3ec6a3e0af58129dda5637
[ "MIT" ]
6
2016-03-22T18:57:22.000Z
2018-10-28T10:56:36.000Z
gyro.py
G33kDude/pyev3
6ff7bb6769a42fc93a3ec6a3e0af58129dda5637
[ "MIT" ]
8
2016-03-22T19:26:38.000Z
2020-11-04T20:20:08.000Z
import time import cwiid import pyev3 WAIT_TIME = 0.008 # Seconds 0.008 WHEEL_RATIO_NXT1 = 1.0 WHEEL_RATIO_NXT2 = 0.8 WHEEL_RATIO_RCX = 1.4 KGYROANGLE = 7.5 KGYROSPEED = 1.15 KPOS = 0.07 KSPEED = 0.1 KDRIVE = 0.000 KSTEER = 1.0 EMAOFFSET = 0.0001 TIME_FALL_LIMIT = 1 # Seconds def clamp(value, lower, upper): re...
21.224242
73
0.679612
import time import cwiid import pyev3 WAIT_TIME = 0.008 WHEEL_RATIO_NXT1 = 1.0 WHEEL_RATIO_NXT2 = 0.8 WHEEL_RATIO_RCX = 1.4 KGYROANGLE = 7.5 KGYROSPEED = 1.15 KPOS = 0.07 KSPEED = 0.1 KDRIVE = 0.000 KSTEER = 1.0 EMAOFFSET = 0.0001 TIME_FALL_LIMIT = 1 def clamp(value, lower, upper): return min(upper, max(value,...
false
true
f75d0256528097f8942f0c00cdbc919e9258232f
895
py
Python
flowx/io/_interface/_plot_vector.py
Balaras-Group/flowX
29c1d6209abbfab553997b557794e4d7b06a09a8
[ "BSD-3-Clause" ]
null
null
null
flowx/io/_interface/_plot_vector.py
Balaras-Group/flowX
29c1d6209abbfab553997b557794e4d7b06a09a8
[ "BSD-3-Clause" ]
7
2020-03-05T20:39:32.000Z
2020-03-13T01:11:26.000Z
flowx/io/_interface/_plot_vector.py
Balaras-Group/flowX
29c1d6209abbfab553997b557794e4d7b06a09a8
[ "BSD-3-Clause" ]
1
2020-03-09T17:38:00.000Z
2020-03-09T17:38:00.000Z
"""Module with I/O functions.""" import numpy from matplotlib import pyplot def plot_vector(gridx, gridy, ivar): """Plot the vector for given x, y data. Arguments --------- gridx : Grid object Grid containing the data on x-face. gridy : Grid object Grid containing the data on y-f...
24.189189
51
0.587709
import numpy from matplotlib import pyplot def plot_vector(gridx, gridy, ivar): xmesh, ymesh = numpy.meshgrid(gridx.x, gridy.y) uface = gridx[ivar][0, 0, :, :] vface = gridy[ivar][0, 0, :, :] umesh = (uface[1:, :] + uface[:-1, :]) / 2 vmesh = (vface[:, 1:] + vface[:, -1:]) / 2 pyplot.rc("f...
true
true
f75d02f6b77f9f8aea8917fc9766ca1ae2f06e98
26
py
Python
source/freesprints/defaults.py
niklasberglund/freesprints
358212d54d70768b99284a566141661bf1c42c0c
[ "MIT" ]
1
2016-01-29T13:56:37.000Z
2016-01-29T13:56:37.000Z
source/freesprints/defaults.py
niklasberglund/freesprints
358212d54d70768b99284a566141661bf1c42c0c
[ "MIT" ]
null
null
null
source/freesprints/defaults.py
niklasberglund/freesprints
358212d54d70768b99284a566141661bf1c42c0c
[ "MIT" ]
null
null
null
RESOLUTION = (1024, 768)
8.666667
24
0.653846
RESOLUTION = (1024, 768)
true
true
f75d03937747ef1b28efc486650e213533d35817
6,573
py
Python
codev/perform/providers/tasks/ansible.py
baseclue/codev
7965ffc036ea217e05ca1f566e7b1917c0a67887
[ "Apache-2.0" ]
4
2016-03-21T12:20:52.000Z
2017-02-02T09:08:19.000Z
codev/perform/providers/tasks/ansible.py
baseclue/codev
7965ffc036ea217e05ca1f566e7b1917c0a67887
[ "Apache-2.0" ]
null
null
null
codev/perform/providers/tasks/ansible.py
baseclue/codev
7965ffc036ea217e05ca1f566e7b1917c0a67887
[ "Apache-2.0" ]
null
null
null
# from os import environ import configparser import json import os.path from logging import getLogger from codev.core.source import Source from codev.core.providers.machines import VirtualenvBaseMachine from codev.core.installer import Installer from codev.core.settings import BaseSettings, ProviderSettings from codev...
35.722826
216
0.62133
import configparser import json import os.path from logging import getLogger from codev.core.source import Source from codev.core.providers.machines import VirtualenvBaseMachine from codev.core.installer import Installer from codev.core.settings import BaseSettings, ProviderSettings from codev.core.utils import Ident ...
true
true
f75d03f3453065dfbb4bc253ef8f421ddc115c47
789
py
Python
main/datastore.py
oonid/dilomksbot
fb42dc120a87a8c0a50e5fc86725dc55aeed355b
[ "MIT" ]
2
2018-11-03T18:01:47.000Z
2021-02-22T15:57:49.000Z
main/datastore.py
oonid/dilomksbot
fb42dc120a87a8c0a50e5fc86725dc55aeed355b
[ "MIT" ]
1
2018-04-08T14:40:32.000Z
2018-04-08T14:40:32.000Z
main/datastore.py
oonid/dilomksbot
fb42dc120a87a8c0a50e5fc86725dc55aeed355b
[ "MIT" ]
1
2021-02-26T13:53:13.000Z
2021-02-26T13:53:13.000Z
# -*- coding: utf-8 -*- from google.appengine.ext import ndb __author__ = 'oon arfiandwi' class DiloEvent(ndb.Model): """using Google Datastore as Database this is Model to save DILo Makassar events. """ link = ndb.StringProperty(required=True, indexed=True) title = ndb.StringProperty(required=...
29.222222
77
0.718631
from google.appengine.ext import ndb __author__ = 'oon arfiandwi' class DiloEvent(ndb.Model): link = ndb.StringProperty(required=True, indexed=True) title = ndb.StringProperty(required=True, indexed=True) description = ndb.TextProperty() sendnotification = ndb.BooleanProperty(required=True, default...
true
true
f75d05fefad1641224564359f2a50b701fd808c5
24,652
py
Python
tests/service/jobs/test_datasets.py
SwissDataScienceCenter/renku-python
5e1ef37ca95ae1e205f7348d7a30221c327df5d3
[ "Apache-2.0" ]
26
2018-06-04T15:21:50.000Z
2022-02-11T17:31:24.000Z
tests/service/jobs/test_datasets.py
SwissDataScienceCenter/renku-python
5e1ef37ca95ae1e205f7348d7a30221c327df5d3
[ "Apache-2.0" ]
1,655
2018-05-17T22:07:50.000Z
2022-03-31T21:22:01.000Z
tests/service/jobs/test_datasets.py
SwissDataScienceCenter/renku-python
5e1ef37ca95ae1e205f7348d7a30221c327df5d3
[ "Apache-2.0" ]
19
2018-05-18T14:12:25.000Z
2022-03-30T19:51:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2020-2021 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
34.002759
120
0.696455
import json import tempfile import uuid import jwt import pytest from git import Repo from werkzeug.utils import secure_filename from renku.core.errors import DatasetExistsError, MigrationRequired, ParameterError from renku.service.jobs.cleanup import cache_project_cleanup from renku.service.jobs.datasets import data...
true
true
f75d061a256e2f5178adfa75865c92a843605e76
6,396
py
Python
ultitrackerapi/ultitrackerapi/models.py
atheheath/ultitracker-api
5d7ea7ae97c53faf02416f17baf11ed09fd55276
[ "MIT" ]
null
null
null
ultitrackerapi/ultitrackerapi/models.py
atheheath/ultitracker-api
5d7ea7ae97c53faf02416f17baf11ed09fd55276
[ "MIT" ]
7
2020-03-27T03:33:52.000Z
2020-03-30T02:33:04.000Z
ultitrackerapi/ultitrackerapi/models.py
atheheath/ultitracker-api
5d7ea7ae97c53faf02416f17baf11ed09fd55276
[ "MIT" ]
null
null
null
import datetime import posixpath from enum import Enum from fastapi import Form from pydantic import BaseConfig, BaseModel from typing import Dict, List, Optional, Set, Type from ultitrackerapi import ANNOTATION_EXPIRATION_DURATION, ULTITRACKER_AUTH_JWT_ALGORITHM, get_logger logger = get_logger(__name__) # NOTE:...
22.363636
101
0.63055
import datetime import posixpath from enum import Enum from fastapi import Form from pydantic import BaseConfig, BaseModel from typing import Dict, List, Optional, Set, Type from ultitrackerapi import ANNOTATION_EXPIRATION_DURATION, ULTITRACKER_AUTH_JWT_ALGORITHM, get_logger logger = get_logger(__name__) class H...
true
true
f75d07c1969ccde736652f498c19dcbc969ecb6c
65
py
Python
mouseKeyboardControl.py
joey-kilgore/playground
2ad1f9f0c51a4a3a4ad9e2646e8a8bde7f368320
[ "Unlicense" ]
null
null
null
mouseKeyboardControl.py
joey-kilgore/playground
2ad1f9f0c51a4a3a4ad9e2646e8a8bde7f368320
[ "Unlicense" ]
1
2019-12-10T01:37:23.000Z
2019-12-10T01:37:23.000Z
mouseKeyboardControl.py
joey-kilgore/playground
2ad1f9f0c51a4a3a4ad9e2646e8a8bde7f368320
[ "Unlicense" ]
2
2019-03-26T03:20:41.000Z
2019-12-09T23:22:40.000Z
import pyautogui as pag pag.moveTo(459,220,0) pag.scroll(0,10)
13
24
0.738462
import pyautogui as pag pag.moveTo(459,220,0) pag.scroll(0,10)
true
true
f75d07df28cae9f00112989d0b6514c949d65e7d
620
py
Python
darzalib/Outgoing/AllyHit.py
swrlly/Midnight
b4375002761a13a09a6c3085e9b34384b28227ba
[ "MIT" ]
2
2021-11-18T13:38:52.000Z
2021-11-19T04:15:24.000Z
darzalib/Outgoing/AllyHit.py
swrlly/Midnight
b4375002761a13a09a6c3085e9b34384b28227ba
[ "MIT" ]
null
null
null
darzalib/Outgoing/AllyHit.py
swrlly/Midnight
b4375002761a13a09a6c3085e9b34384b28227ba
[ "MIT" ]
null
null
null
from ..IPacket import IPacket class AllyHit(IPacket): "Sent by client when an ally has been hit by a projectile" def __init__(self): self.time = 0 self.projectileID = 0 self.objectID = 0 def Read(self, r): self.time = r.ReadInt32() self.projectileID = ...
22.962963
62
0.593548
from ..IPacket import IPacket class AllyHit(IPacket): def __init__(self): self.time = 0 self.projectileID = 0 self.objectID = 0 def Read(self, r): self.time = r.ReadInt32() self.projectileID = r.ReadInt32() self.objectID = r.ReadInt32() def Wr...
true
true
f75d090b47c71e76958ea7bf99e976611ef901db
7,555
py
Python
benchmarks/api_benchmark.py
iolloj/jax
1b80feea6acf758fd9dc3e616e8efcb8db831ce9
[ "Apache-2.0" ]
17,375
2018-11-18T02:15:55.000Z
2022-03-31T23:49:46.000Z
benchmarks/api_benchmark.py
iolloj/jax
1b80feea6acf758fd9dc3e616e8efcb8db831ce9
[ "Apache-2.0" ]
5,018
2018-11-22T17:04:07.000Z
2022-03-31T23:36:25.000Z
benchmarks/api_benchmark.py
iolloj/jax
1b80feea6acf758fd9dc3e616e8efcb8db831ce9
[ "Apache-2.0" ]
1,805
2018-11-21T10:13:53.000Z
2022-03-31T23:49:19.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
22.824773
77
0.665652
import functools import operator import google_benchmark import jax import jax.numpy as jnp import numpy as np from jax import lax partial = functools.partial def required_devices(num_devices_required): def helper1(f): @functools.wraps(f) def helper2(state): if jax.device_count() < num_devices_requi...
true
true
f75d0aba8d76486aaa7dd5c75e0d6c55e923a37c
768
py
Python
app/telegram/api.py
mendrugory/monkey-note-bot
b5a75fa73940d0c0f33ddf39fa2e04147155eaed
[ "MIT" ]
1
2019-07-16T14:20:10.000Z
2019-07-16T14:20:10.000Z
app/telegram/api.py
mendrugory/monkey-note-bot
b5a75fa73940d0c0f33ddf39fa2e04147155eaed
[ "MIT" ]
null
null
null
app/telegram/api.py
mendrugory/monkey-note-bot
b5a75fa73940d0c0f33ddf39fa2e04147155eaed
[ "MIT" ]
null
null
null
import json import requests from app.settings import TOKEN TELEGRAM_URL_API = 'https://api.telegram.org/bot' def __build_url(method): url = '{}{}/{}'.format(TELEGRAM_URL_API, TOKEN, method) return url def __post(url, body, params=dict()): """ Internal post :param url: :param body: :pa...
19.692308
69
0.628906
import json import requests from app.settings import TOKEN TELEGRAM_URL_API = 'https://api.telegram.org/bot' def __build_url(method): url = '{}{}/{}'.format(TELEGRAM_URL_API, TOKEN, method) return url def __post(url, body, params=dict()): try: headers = {'Content-type': 'application/json'} ...
true
true
f75d0ad04c410c7b03b94bc768a026e1b1d81bb7
2,632
py
Python
thirdparty/his_evaluators/tests/metric_test.py
Puneet-G/Impersonator-NNProject
980cfc260feebbc873b4150326791340f6526c42
[ "MIT" ]
1
2020-05-11T19:10:27.000Z
2020-05-11T19:10:27.000Z
thirdparty/his_evaluators/tests/metric_test.py
Puneet-G/Impersonator-NNProject
980cfc260feebbc873b4150326791340f6526c42
[ "MIT" ]
4
2020-05-11T19:12:18.000Z
2021-10-12T22:52:12.000Z
thirdparty/his_evaluators/tests/metric_test.py
Puneet-G/Impersonator-NNProject
980cfc260feebbc873b4150326791340f6526c42
[ "MIT" ]
1
2020-05-27T01:59:41.000Z
2020-05-27T01:59:41.000Z
import torch import numpy as np import unittest from his_evaluators.metrics import register_metrics DEVICE = torch.device("cuda:0") class MetricTestCase(unittest.TestCase): @classmethod def setUpClass(cls) -> None: cls.paired_metric_dict = register_metrics(types=("ssim", "psnr", "lps"), device=DE...
37.6
100
0.666793
import torch import numpy as np import unittest from his_evaluators.metrics import register_metrics DEVICE = torch.device("cuda:0") class MetricTestCase(unittest.TestCase): @classmethod def setUpClass(cls) -> None: cls.paired_metric_dict = register_metrics(types=("ssim", "psnr", "lps"), device=DE...
true
true
f75d0aee6cb596c185d66197142048604832a4cc
344
py
Python
torchvision/models/mtcnn/modules/utilities.py
hahaxun/vision
2c00ff9b8fc72ed7032610515e8e289aa675457c
[ "BSD-3-Clause" ]
2
2020-05-29T09:25:41.000Z
2020-08-04T04:04:18.000Z
torchvision/models/mtcnn/modules/utilities.py
hahaxun/vision
2c00ff9b8fc72ed7032610515e8e289aa675457c
[ "BSD-3-Clause" ]
null
null
null
torchvision/models/mtcnn/modules/utilities.py
hahaxun/vision
2c00ff9b8fc72ed7032610515e8e289aa675457c
[ "BSD-3-Clause" ]
1
2020-06-01T06:12:32.000Z
2020-06-01T06:12:32.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # import torch import torch.nn as nn class Flatten(nn.Module): """Convenience class that flattens feature maps to vectors.""" def forward(self, x): # Required for pretrained weights for some reason? x = x.transpose(3, 2).contiguous() retur...
22.933333
66
0.633721
import torch import torch.nn as nn class Flatten(nn.Module): def forward(self, x): x = x.transpose(3, 2).contiguous() return x.view(x.size(0), -1)
true
true
f75d0bf4e23f9814a7bb7f5ec111c82da80d022a
1,430
py
Python
problems/03/3.py
artcz/euler
7418387162f3e6c55673e6f70fee66f987df4a35
[ "MIT" ]
null
null
null
problems/03/3.py
artcz/euler
7418387162f3e6c55673e6f70fee66f987df4a35
[ "MIT" ]
null
null
null
problems/03/3.py
artcz/euler
7418387162f3e6c55673e6f70fee66f987df4a35
[ "MIT" ]
null
null
null
# coding: utf-8 """ To run: python2.7 3.py Problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? """ import math import time NUMBER = 600851475143 def oneliner(): """ This will "loop" until sqrt(N), which in this case is signifi...
22.34375
79
0.558741
""" To run: python2.7 3.py Problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? """ import math import time NUMBER = 600851475143 def oneliner(): """ This will "loop" until sqrt(N), which in this case is significantly more ...
false
true
f75d0c28f18f84e10e61f4a06c4296d3a8fb9282
4,473
py
Python
explorer/views/query.py
MounirMesselmeni/django-sql-explorer
55c8ab52468681869d2284f868e54670fcce5a96
[ "MIT" ]
1
2021-08-05T02:47:32.000Z
2021-08-05T02:47:32.000Z
explorer/views/query.py
fellowapp/django-sql-explorer
030ecde27a68cc03d55f5ca22a0640f1c80bf473
[ "MIT" ]
null
null
null
explorer/views/query.py
fellowapp/django-sql-explorer
030ecde27a68cc03d55f5ca22a0640f1c80bf473
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy from django.views import View from explorer import app_settings from explorer.forms import QueryForm from explorer.models import Query, QueryLog, MSG_FAILED_BLACKLIST...
32.649635
75
0.620389
from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy from django.views import View from explorer import app_settings from explorer.forms import QueryForm from explorer.models import Query, QueryLog, MSG_FAILED_BLACKLIST from explorer.utils imp...
true
true
f75d0c81bb6f91d055f2d949c1d2dd23f70b7094
576
py
Python
Python Libraries/main2_threaded.py
srike27/roBoat-resQ
c766896df1a2d9632cb126569f866952e9ccb924
[ "MIT" ]
null
null
null
Python Libraries/main2_threaded.py
srike27/roBoat-resQ
c766896df1a2d9632cb126569f866952e9ccb924
[ "MIT" ]
null
null
null
Python Libraries/main2_threaded.py
srike27/roBoat-resQ
c766896df1a2d9632cb126569f866952e9ccb924
[ "MIT" ]
1
2017-12-04T11:25:56.000Z
2017-12-04T11:25:56.000Z
import XBee_Threaded from time import sleep if __name__ == "__main__": xbee = XBee_Threaded.XBee("/dev/ttyACM2") # Your serial port name here # A simple string message sent = xbee.SendStr("Hello World") Msg = xbee.Receive() if Msg: content = Msg[7:-1].decode('ascii') print("Msg: "...
26.181818
75
0.616319
import XBee_Threaded from time import sleep if __name__ == "__main__": xbee = XBee_Threaded.XBee("/dev/ttyACM2") sent = xbee.SendStr("Hello World") Msg = xbee.Receive() if Msg: content = Msg[7:-1].decode('ascii') print("Msg: " + content) xbee.Send(bytearray.fromhex("7e 7d...
true
true
f75d0cc54ff3b35ede8512d6c77acfb7e3bf3ff1
202
py
Python
preprocess_NLP_pkg/__init__.py
8sukanya8/preprocess_NLP_pkg
76b75c71d8b83957a08b55f58842fb2a0b76bb14
[ "MIT" ]
null
null
null
preprocess_NLP_pkg/__init__.py
8sukanya8/preprocess_NLP_pkg
76b75c71d8b83957a08b55f58842fb2a0b76bb14
[ "MIT" ]
1
2019-02-12T11:42:43.000Z
2019-02-12T11:42:43.000Z
preprocess_NLP_pkg/__init__.py
8sukanya8/preprocess_NLP_pkg
76b75c71d8b83957a08b55f58842fb2a0b76bb14
[ "MIT" ]
null
null
null
name = "preprocess_NLP_pkg" from .load_data import * from .distance_measures import * from .feature_selection import * from .text_processing import * from .corpus_processor import * from .stats import *
28.857143
32
0.79703
name = "preprocess_NLP_pkg" from .load_data import * from .distance_measures import * from .feature_selection import * from .text_processing import * from .corpus_processor import * from .stats import *
true
true
f75d0ccb162fe947f473f54b2a89fe37345d06f7
3,257
py
Python
grr/parsers/chrome_history_test.py
nexus-lab/relf-server
d46774799c20376691c38f9293f454a3aff3ccb3
[ "Apache-2.0" ]
null
null
null
grr/parsers/chrome_history_test.py
nexus-lab/relf-server
d46774799c20376691c38f9293f454a3aff3ccb3
[ "Apache-2.0" ]
null
null
null
grr/parsers/chrome_history_test.py
nexus-lab/relf-server
d46774799c20376691c38f9293f454a3aff3ccb3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Tests for grr.parsers.chrome_history.""" import datetime import os from grr.lib import flags from grr.parsers import chrome_history from grr.test_lib import test_lib class ChromeHistoryTest(test_lib.GRRBaseTest): """Test parsing of chrom...
32.89899
79
0.666564
import datetime import os from grr.lib import flags from grr.parsers import chrome_history from grr.test_lib import test_lib class ChromeHistoryTest(test_lib.GRRBaseTest): def testBasicParsing(self): history_file = os.path.join(self.base_path, "parser_test", "History2") history = chrome_history.ChromeP...
true
true
f75d0ce29f1baddba86d54e2cec15e230e37cade
1,365
py
Python
src/biometrics.py
Somanath-KC/RFID-Fingerprint-Attendance
31979b1bb343e59b972070012f5de6d0ec9f1b40
[ "MIT" ]
null
null
null
src/biometrics.py
Somanath-KC/RFID-Fingerprint-Attendance
31979b1bb343e59b972070012f5de6d0ec9f1b40
[ "MIT" ]
null
null
null
src/biometrics.py
Somanath-KC/RFID-Fingerprint-Attendance
31979b1bb343e59b972070012f5de6d0ec9f1b40
[ "MIT" ]
null
null
null
from pyfingerprint.pyfingerprint import PyFingerprint from pyfingerprint.pyfingerprint import FINGERPRINT_CHARBUFFER1 from pyfingerprint.pyfingerprint import FINGERPRINT_CHARBUFFER2 #from src.mongo import check_person_in_biometrics from time import sleep from src.lcd import lcd_write f = PyFingerprint('/dev/ttyUSB0',...
29.042553
79
0.710623
from pyfingerprint.pyfingerprint import PyFingerprint from pyfingerprint.pyfingerprint import FINGERPRINT_CHARBUFFER1 from pyfingerprint.pyfingerprint import FINGERPRINT_CHARBUFFER2 from time import sleep from src.lcd import lcd_write f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) def read_fingerpri...
true
true
f75d0d1678e49c48c9023b22642ab8bec94c1b92
747
py
Python
source/python/e2c.examples/web_mud/contracts/models/__init__.py
elastic-event-components/e2c
15be10c167e6a02f725bae0ea933667c4b2b257b
[ "Apache-2.0" ]
null
null
null
source/python/e2c.examples/web_mud/contracts/models/__init__.py
elastic-event-components/e2c
15be10c167e6a02f725bae0ea933667c4b2b257b
[ "Apache-2.0" ]
1
2017-09-27T09:20:40.000Z
2017-09-27T09:20:40.000Z
source/python/e2c.examples/web_mud/contracts/models/__init__.py
elastic-event-components/e2c
15be10c167e6a02f725bae0ea933667c4b2b257b
[ "Apache-2.0" ]
null
null
null
# # Copyright 2017 The E2C 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 applicable l...
37.35
80
0.67336
from .avatar import * from .room import * from .exit import *
true
true
f75d0e59fee0ab7fbad31a2c964fb853648fbd94
268
py
Python
exercicios_python/Exercicio_057.py
GabsOrtega/logica-python
6f4e752d0796c9bf70be8f7108bc3bd49d877709
[ "MIT" ]
null
null
null
exercicios_python/Exercicio_057.py
GabsOrtega/logica-python
6f4e752d0796c9bf70be8f7108bc3bd49d877709
[ "MIT" ]
null
null
null
exercicios_python/Exercicio_057.py
GabsOrtega/logica-python
6f4e752d0796c9bf70be8f7108bc3bd49d877709
[ "MIT" ]
null
null
null
sexo = 'a' while sexo != 'F' and sexo != 'M': sexo = str(input('\033[mDigite seu sexo [M/F]: ').upper().strip()[0]) if sexo != 'M' and sexo != 'F': print('\033[31mDigite um valor válido!!') print('Sexo {} registrado com sucesso!'.format(sexo))
33.5
74
0.55597
sexo = 'a' while sexo != 'F' and sexo != 'M': sexo = str(input('\033[mDigite seu sexo [M/F]: ').upper().strip()[0]) if sexo != 'M' and sexo != 'F': print('\033[31mDigite um valor válido!!') print('Sexo {} registrado com sucesso!'.format(sexo))
true
true
f75d113da40a97ce45199596ab5cce473c03c6ae
2,786
py
Python
lib/perf_engines/libobserve/obs_helper.py
ramalingam-cb/testrunner
81cea7a5a493cf0c67fca7f97c667cd3c6ad2142
[ "Apache-2.0" ]
null
null
null
lib/perf_engines/libobserve/obs_helper.py
ramalingam-cb/testrunner
81cea7a5a493cf0c67fca7f97c667cd3c6ad2142
[ "Apache-2.0" ]
null
null
null
lib/perf_engines/libobserve/obs_helper.py
ramalingam-cb/testrunner
81cea7a5a493cf0c67fca7f97c667cd3c6ad2142
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from lib.crc32 import crc32_hash from multiprocessing.queues import JoinableQueue try: import threading as _threading except ImportError: import dummy_threading as _threading class VbucketHelper: @staticmethod def get_vbucket_id(key, num_vbuckets): vbucketId = 0 ...
25.796296
69
0.541996
from lib.crc32 import crc32_hash from multiprocessing.queues import JoinableQueue try: import threading as _threading except ImportError: import dummy_threading as _threading class VbucketHelper: @staticmethod def get_vbucket_id(key, num_vbuckets): vbucketId = 0 if num_vbuckets > 0: ...
false
true
f75d114c560f391c72692b31d9b414ee5923e895
14,076
py
Python
tests/test_builder.py
bbux-dev/dataspec
6a0efd1c91ff222831a3fb15e7b458515ffc47d0
[ "MIT" ]
2
2021-04-21T13:53:16.000Z
2021-08-24T16:51:16.000Z
tests/test_builder.py
bbux-dev/dataspec
6a0efd1c91ff222831a3fb15e7b458515ffc47d0
[ "MIT" ]
5
2021-03-14T16:31:41.000Z
2021-07-02T09:00:31.000Z
tests/test_builder.py
bbux-dev/dataspec
6a0efd1c91ff222831a3fb15e7b458515ffc47d0
[ "MIT" ]
null
null
null
import pytest import datagen.builder as builder from datagen import distributions, DataSpec, SpecException def test_api_builder(): # raw data for both specs animal_names = ['zebra', 'hedgehog', 'llama', 'flamingo'] action_list = ['fling', 'jump', 'launch', 'dispatch'] domain_weights = { "gmail...
51.56044
110
0.596121
import pytest import datagen.builder as builder from datagen import distributions, DataSpec, SpecException def test_api_builder(): animal_names = ['zebra', 'hedgehog', 'llama', 'flamingo'] action_list = ['fling', 'jump', 'launch', 'dispatch'] domain_weights = { "gmail.com": 0.6, "yahoo...
true
true
f75d125f0641b5421c70c3a9b3ebc6360638dca4
25,215
py
Python
src/m1_pizza.py
zhouy12/12-MoreSequences
5b7986ffb4b5b6c24ab3b07096551ff45dd124a6
[ "MIT" ]
null
null
null
src/m1_pizza.py
zhouy12/12-MoreSequences
5b7986ffb4b5b6c24ab3b07096551ff45dd124a6
[ "MIT" ]
null
null
null
src/m1_pizza.py
zhouy12/12-MoreSequences
5b7986ffb4b5b6c24ab3b07096551ff45dd124a6
[ "MIT" ]
null
null
null
""" This module lets you practice: -- ITERATING (i.e. LOOPING) through a SEQUENCE -- Using OBJECTS -- DEFINING functions -- CALLING functions Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder, their colleagues and Michelle. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import ...
40.933442
100
0.542138
import rosegraphics as rg import math def main(): run_test_generate_points_on_circle() run_test_draw_points_on_circle() run_test_pizza() run_test_polygon() run_test_fancy_polygon() def run_test_generate_points_on_circle(): ...
true
true
f75d1578196e6c60ec0682d732a021e239924653
1,664
py
Python
evaluation/semantic_segmentation/configs/_base_/models/upernet.py
taokong/ibot
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
[ "Apache-2.0" ]
327
2021-12-09T10:03:55.000Z
2022-03-31T12:26:22.000Z
evaluation/semantic_segmentation/configs/_base_/models/upernet.py
taokong/ibot
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
[ "Apache-2.0" ]
11
2021-12-30T11:39:43.000Z
2022-03-28T05:40:48.000Z
evaluation/semantic_segmentation/configs/_base_/models/upernet.py
taokong/ibot
a2ee1ae7495d4ea8fb9ba100434c062f1bd3d1f0
[ "Apache-2.0" ]
43
2021-12-09T10:48:26.000Z
2022-03-29T06:58:40.000Z
# Copyright (c) ByteDance, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Mostly copy-paste from beit, timm, mmseg, setr, xcit and swin code bases https://github.com/microsoft/unilm/tree/maste...
29.192982
74
0.635817
norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained=None, backbone=dict( type='XCiT', patch_size=16, embed_dim=384, depth=12, num_heads=8, mlp_ratio=4, qkv_bias=True, ), decode_head=dict( ...
true
true
f75d15c299990ae16e43d86a30fa2cf946f6d3ca
1,335
py
Python
shop/views.py
Honormmm/shop
e0c90839d597d58f467257d096965ba58f6445be
[ "MIT" ]
28
2018-12-08T00:00:10.000Z
2022-02-04T15:37:06.000Z
shop/views.py
Honormmm/shop
e0c90839d597d58f467257d096965ba58f6445be
[ "MIT" ]
null
null
null
shop/views.py
Honormmm/shop
e0c90839d597d58f467257d096965ba58f6445be
[ "MIT" ]
21
2019-03-04T09:46:44.000Z
2022-02-04T15:37:10.000Z
from django.shortcuts import render, get_object_or_404 from .models import Category, Product from cart.forms import CartAddProductForm from django.views.generic import ( ListView, DetailView ) ''' class ProductListView(ListView): template_name = 'shop/product/list.html' queryset = Product.objects.all(...
30.340909
74
0.701124
from django.shortcuts import render, get_object_or_404 from .models import Category, Product from cart.forms import CartAddProductForm from django.views.generic import ( ListView, DetailView ) def product_list(request, category_slug=None): category = None categories = Category.objects.all() produ...
true
true
f75d185bebc098746275a7de92ed9ad1197f3183
30,906
py
Python
release/scripts/addons/space_view3d_copy_attributes.py
naetherm/Bforartists
4d78856b76544b9eeb49e7dd388b4cf41d58d7e4
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2019-09-16T10:29:19.000Z
2022-02-11T14:43:18.000Z
release/scripts/addons/space_view3d_copy_attributes.py
naetherm/Bforartists
4d78856b76544b9eeb49e7dd388b4cf41d58d7e4
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/scripts/addons/space_view3d_copy_attributes.py
naetherm/Bforartists
4d78856b76544b9eeb49e7dd388b4cf41d58d7e4
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
33.888158
94
0.630428
bl_info = { "name": "Copy Attributes Menu", "author": "Bassam Kurdali, Fabian Fricke, Adam Wiseman", "version": (0, 4, 8), "blender": (2, 80, 0), "location": "View3D > Ctrl-C", "description": "Copy Attributes Menu from Blender 2.4", "wiki_url": "https://wiki.blender.org/index.php/Extension...
true
true
f75d1a626c296536cf54ec5b485aedac0fecf197
14,778
py
Python
docs/examples/plot_custom_model.py
elcolie/sklearn-onnx
004fa39cb995ada0cde232ae8e30341018f450ac
[ "MIT" ]
null
null
null
docs/examples/plot_custom_model.py
elcolie/sklearn-onnx
004fa39cb995ada0cde232ae8e30341018f450ac
[ "MIT" ]
null
null
null
docs/examples/plot_custom_model.py
elcolie/sklearn-onnx
004fa39cb995ada0cde232ae8e30341018f450ac
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """ .. _l-custom-model: Write your own converter for your own model =========================================== It might happen that you implemented your own model and there is obviously no existing converter for this new m...
34.528037
85
0.628705
import inspect import os import numpy import onnx from onnx.tools.net_drawer import GetPydotGraph, GetOpNodeProducer import onnxruntime as rt from matplotlib import offsetbox import matplotlib.pyplot as plt import sklearn from sklearn.model_selection import train_test_split from sklearn import datasets from sklearn.ba...
true
true
f75d1b71f84ecc37f5ad82579365fd73495d767d
5,277
py
Python
lib/tests/streamlit/forward_msg_cache_test.py
nicolaskruchten/streamlit
90b7bb023c70da7efb2e434144399fb541ec1572
[ "Apache-2.0" ]
1
2021-01-29T02:32:53.000Z
2021-01-29T02:32:53.000Z
lib/tests/streamlit/forward_msg_cache_test.py
nicolaskruchten/streamlit
90b7bb023c70da7efb2e434144399fb541ec1572
[ "Apache-2.0" ]
108
2020-11-10T22:19:28.000Z
2022-03-29T16:48:55.000Z
lib/tests/streamlit/forward_msg_cache_test.py
nicolaskruchten/streamlit
90b7bb023c70da7efb2e434144399fb541ec1572
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2020 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
37.964029
86
0.705325
from unittest.mock import MagicMock import unittest from streamlit import config, RootContainer from streamlit import report_session from streamlit.forward_msg_cache import ForwardMsgCache from streamlit.forward_msg_cache import create_reference_msg from streamlit.forward_msg_cache import populate_hash_if_needed fro...
true
true
f75d1c58ffcd26aa738ff0a2c7fc21661ab4f457
2,726
py
Python
selfdrive/car/mock/interface.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
15
2017-06-16T16:53:28.000Z
2021-08-28T04:18:50.000Z
selfdrive/car/mock/interface.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
10
2020-12-07T16:27:21.000Z
2021-03-13T13:44:04.000Z
selfdrive/car/mock/interface.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
32
2020-10-05T06:42:07.000Z
2021-04-15T14:16:37.000Z
#!/usr/bin/env python3 from cereal import car from selfdrive.config import Conversions as CV from selfdrive.swaglog import cloudlog import cereal.messaging as messaging from selfdrive.car import gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase # mocked car interface to work with chffrplus TS...
29.956044
90
0.691123
from cereal import car from selfdrive.config import Conversions as CV from selfdrive.swaglog import cloudlog import cereal.messaging as messaging from selfdrive.car import gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase TS = 0.01 YAW_FR = 0.2 LPG = 2 * 3.1415 * YAW_FR * TS / (1 + 2 * 3.14...
true
true
f75d1e8bda00d123489fe604a91ae46111929c7f
184
py
Python
me_group/me_group/doctype/terms/terms.py
Eng-Mohanad-Alkrunz/me_group
8311f034a79c1b75c03a4b6be0b1a726b07a9d95
[ "MIT" ]
null
null
null
me_group/me_group/doctype/terms/terms.py
Eng-Mohanad-Alkrunz/me_group
8311f034a79c1b75c03a4b6be0b1a726b07a9d95
[ "MIT" ]
null
null
null
me_group/me_group/doctype/terms/terms.py
Eng-Mohanad-Alkrunz/me_group
8311f034a79c1b75c03a4b6be0b1a726b07a9d95
[ "MIT" ]
null
null
null
# Copyright (c) 2022, test and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class Terms(Document): pass
20.444444
49
0.782609
from frappe.model.document import Document class Terms(Document): pass
true
true
f75d1eafcd784f916f614abb738b11751ddc1425
713
py
Python
tests/support/__init__.py
PhracturedBlue/yampy2
a98ac137b38c5a0f3f4b1e6fec89673caec36ef4
[ "Apache-2.0" ]
24
2015-02-03T09:02:30.000Z
2021-06-17T09:47:03.000Z
tests/support/__init__.py
PhracturedBlue/yampy2
a98ac137b38c5a0f3f4b1e6fec89673caec36ef4
[ "Apache-2.0" ]
12
2015-02-12T10:32:35.000Z
2021-05-06T09:24:47.000Z
tests/support/__init__.py
PhracturedBlue/yampy2
a98ac137b38c5a0f3f4b1e6fec89673caec36ef4
[ "Apache-2.0" ]
24
2015-02-03T05:53:34.000Z
2021-05-14T02:55:12.000Z
# Copyright (c) Microsoft Corporation # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS*...
33.952381
74
0.761571
true
true
f75d1ecb935eab2819303a96f7460d5c2226a536
425
py
Python
quiz/migrations/0005_auto_20190209_2348.py
sayamkanwar/cyquest
5484e9616dae21140a406d09f91290fb8348df1b
[ "MIT" ]
2
2021-10-04T04:48:02.000Z
2022-02-06T13:00:09.000Z
quiz/migrations/0005_auto_20190209_2348.py
sayamkanwar/cyquest
5484e9616dae21140a406d09f91290fb8348df1b
[ "MIT" ]
5
2020-06-06T12:56:27.000Z
2021-10-02T18:06:44.000Z
quiz/migrations/0005_auto_20190209_2348.py
sayamkanwar/cyquest
5484e9616dae21140a406d09f91290fb8348df1b
[ "MIT" ]
6
2019-03-19T14:23:31.000Z
2021-05-18T07:28:26.000Z
# Generated by Django 2.1.5 on 2019-02-09 18:18 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('quiz', '0004_answer_stud'), ] operations = [ migrations.AlterField( model_name='stud', ...
21.25
74
0.618824
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('quiz', '0004_answer_stud'), ] operations = [ migrations.AlterField( model_name='stud', name='time', field=models.DateTimeFi...
true
true
f75d1fa5587d32da5db49d91df62554a9051d50e
335
py
Python
apitaxdrivers/ApitaxInfo.py
Apitax/Drivers
35b2c2f4c8ce8b98615f42fc30f04111d7b9bffe
[ "Apache-2.0" ]
null
null
null
apitaxdrivers/ApitaxInfo.py
Apitax/Drivers
35b2c2f4c8ce8b98615f42fc30f04111d7b9bffe
[ "Apache-2.0" ]
4
2018-08-03T20:01:57.000Z
2018-10-22T15:32:27.000Z
apitaxdrivers/ApitaxInfo.py
Apitax/Drivers
35b2c2f4c8ce8b98615f42fc30f04111d7b9bffe
[ "Apache-2.0" ]
null
null
null
from apitax.drivers.Driver import Driver from apitax.utilities.Files import getAllFiles from apitax.ah.Options import Options from pathlib import Path from apitax.ah.Credentials import Credentials class ApitaxInfoDriver(Driver): def isApiAuthenticated(self): return False def isTokenable(self): ...
23.928571
46
0.779104
from apitax.drivers.Driver import Driver from apitax.utilities.Files import getAllFiles from apitax.ah.Options import Options from pathlib import Path from apitax.ah.Credentials import Credentials class ApitaxInfoDriver(Driver): def isApiAuthenticated(self): return False def isTokenable(self): ...
true
true
f75d202dcaa3caaae2a4cd424b9b0cd62ba8419f
2,981
py
Python
src/opendr/perception/facial_expression_recognition/landmark_based_facial_expression_recognition/algorithm/datasets/gen_facial_muscles_data.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
3
2021-06-24T01:54:25.000Z
2021-12-12T16:21:24.000Z
src/opendr/perception/facial_expression_recognition/landmark_based_facial_expression_recognition/algorithm/datasets/gen_facial_muscles_data.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
79
2021-06-23T10:40:10.000Z
2021-12-16T07:59:42.000Z
src/opendr/perception/facial_expression_recognition/landmark_based_facial_expression_recognition/algorithm/datasets/gen_facial_muscles_data.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
5
2021-07-04T07:38:50.000Z
2021-12-12T16:18:47.000Z
# Copyright 2020-2021 OpenDR European Project # # 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 agree...
41.402778
108
0.654143
import numpy as np from numpy.lib.format import open_memmap from scipy.spatial import Delaunay import argparse def find_graph_edges(x): points = np.transpose(x[0, :, 0, :, 0]) print(points.shape) tri = Delaunay(points) neigh = tri.simplices print(neigh.shape) G = [] N = neigh.shape[0] ...
true
true
f75d215fcc5ed0f06219df38901fc6f443d928bd
46,413
py
Python
gefs/door_downloader_nwp_gefs_nomads.py
c-hydro/door
de6ebcbe69289425ae13d85286dcd8da270e787e
[ "MIT" ]
null
null
null
gefs/door_downloader_nwp_gefs_nomads.py
c-hydro/door
de6ebcbe69289425ae13d85286dcd8da270e787e
[ "MIT" ]
null
null
null
gefs/door_downloader_nwp_gefs_nomads.py
c-hydro/door
de6ebcbe69289425ae13d85286dcd8da270e787e
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ HyDE Downloading Tool - NWP GEFS 0.25 __date__ = '20210914' __version__ = '1.0.0' __author__ = 'Andrea Libertino (andrea.libertino@cimafoundation.org', 'Fabio Delogu (fabio.delogu@cimafoundation.org', __library__ = 'HyDE' General command line: python3 hyde_downloader_nwp_gefs_n...
44.670837
181
0.546334
import logging import os import time import json import urllib.request import tempfile import xarray as xr import numpy as np import pandas as pd from urllib.request import Request, urlopen from urllib.error import URLError from copy import deepcopy from cdo import Cdo from multiprocessing import Pool, cpu_count f...
true
true
f75d229de3a06ddc2a0bbb3913a1289abf47e241
263
py
Python
tests/test_profile.py
LourensVeen/nanopub
b9d5d0872e0cd6da79033620e589932c53304d5c
[ "Apache-2.0" ]
null
null
null
tests/test_profile.py
LourensVeen/nanopub
b9d5d0872e0cd6da79033620e589932c53304d5c
[ "Apache-2.0" ]
null
null
null
tests/test_profile.py
LourensVeen/nanopub
b9d5d0872e0cd6da79033620e589932c53304d5c
[ "Apache-2.0" ]
null
null
null
from unittest import mock import pytest from nanopub import profile @mock.patch('nanopub.profile.get_profile', return_value={'orcid_id': ''}) def test_no_orcid_id(mock_get_profile): with pytest.raises(profile.ProfileError): profile.get_orcid_id()
21.916667
73
0.764259
from unittest import mock import pytest from nanopub import profile @mock.patch('nanopub.profile.get_profile', return_value={'orcid_id': ''}) def test_no_orcid_id(mock_get_profile): with pytest.raises(profile.ProfileError): profile.get_orcid_id()
true
true
f75d24208e8f4155e38a45506ad8598b02480995
9,610
py
Python
plugins/Kalina.py
icaics/qqbot-gf-kalina
014903b7ecfc870b6ef7d0b5acb11d3e2987cfcc
[ "MIT" ]
1
2018-05-04T17:52:59.000Z
2018-05-04T17:52:59.000Z
plugins/Kalina.py
icaics/qqbot-gf-kalina
014903b7ecfc870b6ef7d0b5acb11d3e2987cfcc
[ "MIT" ]
null
null
null
plugins/Kalina.py
icaics/qqbot-gf-kalina
014903b7ecfc870b6ef7d0b5acb11d3e2987cfcc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from KalinaUtility import Kalina from Define import Utility from KalinaUtility import KalinaUtility # from KalinaWBMonitor import WeiboMonitor import KalinaCD import KalinaData from qqbot import qqbotsched import random import time def onStartupComplete(bot): """ ...
29.937695
124
0.576275
from KalinaUtility import Kalina from Define import Utility from KalinaUtility import KalinaUtility import KalinaCD import KalinaData from qqbot import qqbotsched import random import time def onStartupComplete(bot): group = bot.List('group', Kalina.group_name)[0] bot.SendTo(group, '各位指挥官,格林娜摸鱼回来了,我、格林娜、上...
true
true
f75d24546aa42409616cd9df4e9ce8e89114d26c
1,100
py
Python
tests/test-server-handles-server-closes-connection.py
Squarespace/ghostunnel
c9465146f451cdaf4ff3fd3bf7ba0e328ca260af
[ "Apache-2.0" ]
2
2018-12-13T21:07:21.000Z
2019-06-17T18:55:44.000Z
tests/test-server-handles-server-closes-connection.py
Squarespace/ghostunnel
c9465146f451cdaf4ff3fd3bf7ba0e328ca260af
[ "Apache-2.0" ]
null
null
null
tests/test-server-handles-server-closes-connection.py
Squarespace/ghostunnel
c9465146f451cdaf4ff3fd3bf7ba0e328ca260af
[ "Apache-2.0" ]
1
2021-03-17T17:05:42.000Z
2021-03-17T17:05:42.000Z
#!/usr/bin/env python3 # Creates a ghostunnel. Ensures when server disconnects that the client # connection also disconnects. from subprocess import Popen from test_common import * import socket, ssl if __name__ == "__main__": ghostunnel = None try: # create certs root = RootCert('root') root.create_...
32.352941
83
0.692727
from subprocess import Popen from test_common import * import socket, ssl if __name__ == "__main__": ghostunnel = None try: root = RootCert('root') root.create_signed_cert('server') root.create_signed_cert('client') ghostunnel = run_ghostunnel(['server', '--listen={0}:13001'.format(LOCAL...
true
true
f75d248876ebf3e37cea9ad9cc4ae8d9478b7336
2,985
py
Python
asn/models.py
caiwei-0627/GreaterWMS
db3d7b200343fd9eea07fa3fcdf33c4c9c37c4b4
[ "Apache-2.0" ]
1,063
2020-11-15T12:55:15.000Z
2022-03-31T14:33:12.000Z
asn/models.py
coolflywms/GreaterWMS
0509b8842bbd8cae9540b6f13f7b3cb6fa5a911c
[ "Apache-2.0" ]
96
2020-11-18T00:06:05.000Z
2022-03-03T09:05:39.000Z
asn/models.py
coolflywms/GreaterWMS
0509b8842bbd8cae9540b6f13f7b3cb6fa5a911c
[ "Apache-2.0" ]
349
2020-11-15T13:15:30.000Z
2022-03-31T11:01:15.000Z
from django.db import models class AsnListModel(models.Model): asn_code = models.CharField(max_length=255, verbose_name="ASN Code") asn_status = models.BigIntegerField(default=1, verbose_name="ASN Status") total_weight = models.FloatField(default=0, verbose_name="Total Weight") total_volume = models.Fl...
53.303571
104
0.741374
from django.db import models class AsnListModel(models.Model): asn_code = models.CharField(max_length=255, verbose_name="ASN Code") asn_status = models.BigIntegerField(default=1, verbose_name="ASN Status") total_weight = models.FloatField(default=0, verbose_name="Total Weight") total_volume = models.Fl...
true
true
f75d2681fdf30bd02aa32477c92e635046159e55
379
py
Python
tools/new-file.py
full-stack-hero/snippet
9600c856c171d1296a151b4d654af0808980f939
[ "MIT" ]
null
null
null
tools/new-file.py
full-stack-hero/snippet
9600c856c171d1296a151b4d654af0808980f939
[ "MIT" ]
null
null
null
tools/new-file.py
full-stack-hero/snippet
9600c856c171d1296a151b4d654af0808980f939
[ "MIT" ]
null
null
null
import os import datetime title = input('Title: ') filename = datetime.datetime.now().strftime("%Y%m%d%H%M-") + title + '.py' url = f'https://github.com/full-stack-hero/snippet/blob/master/snippet/snippets/{filename}' print('Create new file', filename) with open(f'snippets/{filename}', 'w') as f: f.write(f'# :aut...
31.583333
91
0.662269
import os import datetime title = input('Title: ') filename = datetime.datetime.now().strftime("%Y%m%d%H%M-") + title + '.py' url = f'https://github.com/full-stack-hero/snippet/blob/master/snippet/snippets/{filename}' print('Create new file', filename) with open(f'snippets/{filename}', 'w') as f: f.write(f'# :aut...
true
true
f75d2768e9174f00df3aa8354669af171ecf6af7
20,654
py
Python
neutron/tests/unit/services/metering/test_metering_plugin.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
1
2016-04-19T08:20:19.000Z
2016-04-19T08:20:19.000Z
neutron/tests/unit/services/metering/test_metering_plugin.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/services/metering/test_metering_plugin.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # 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.apach...
45.897778
79
0.508957
import mock from neutron.api.v2 import attributes as attr from neutron.common import constants as n_constants from neutron.common import topics from neutron import context from neutron.db import agents_db from neutron.db import l3_agentschedulers_db from neutron.db.metering import metering_rpc from neutron.extensions...
true
true
f75d2802fc77627b8b1eb5b47e35f85a0ca1f60d
4,039
py
Python
env/lib/python3.6/site-packages/altair/utils/server.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
1,134
2015-09-19T05:38:36.000Z
2021-09-21T15:15:11.000Z
env/lib/python3.6/site-packages/altair/utils/server.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
165
2015-09-19T05:09:33.000Z
2018-10-08T19:42:28.000Z
env/lib/python3.6/site-packages/altair/utils/server.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
75
2015-09-19T03:30:25.000Z
2018-11-19T05:37:38.000Z
""" A Simple server used to show altair graphics from a prompt or script. This is adapted from the mpld3 package; see https://github.com/mpld3/mpld3/blob/master/mpld3/_server.py """ import sys import threading import webbrowser import socket import itertools import random from ._py3k_compat import server, IO JUPYTER_...
29.918519
78
0.616984
import sys import threading import webbrowser import socket import itertools import random from ._py3k_compat import server, IO JUPYTER_WARNING = """ Note: if you're in the Jupyter notebook, Chart.serve() is not the best way to view plots. Consider using Chart.display(). You must interrupt the kernel to cancel t...
true
true
f75d28512fa8fb9ddad5448c913df47bdf2745c7
2,408
py
Python
mlpipe/utils/api_endpoints.py
j-o-d-o/MLPipe-Trainer
b686dc4d28e3d4cd2c6581487f8a2491a6d7cb60
[ "MIT" ]
null
null
null
mlpipe/utils/api_endpoints.py
j-o-d-o/MLPipe-Trainer
b686dc4d28e3d4cd2c6581487f8a2491a6d7cb60
[ "MIT" ]
null
null
null
mlpipe/utils/api_endpoints.py
j-o-d-o/MLPipe-Trainer
b686dc4d28e3d4cd2c6581487f8a2491a6d7cb60
[ "MIT" ]
null
null
null
""" File for all API endpoints API Url is read from the config.ini file via the Config module """ from mlpipe.schemas.training import TrainingSchema from mlpipe.utils import Config import requests import bson import json def test_connection(): """ Test API connection :return: http response """ end...
29.365854
80
0.674834
from mlpipe.schemas.training import TrainingSchema from mlpipe.utils import Config import requests import bson import json def test_connection(): endpoint_url = Config.get_api_url() + "test" response = requests.get(endpoint_url) return response def create_training(training: TrainingSchema): endpoint...
true
true
f75d28952143bc5edb8fc18df46103a71ca58538
6,411
py
Python
roscraco/router/tplink/wr740n.py
cyroxx/roscraco
fc0279928d0241f4eb475ac40b24ab22cb1d900a
[ "BSD-3-Clause" ]
1
2020-09-06T09:30:13.000Z
2020-09-06T09:30:13.000Z
roscraco/router/tplink/wr740n.py
cyroxx/roscraco
fc0279928d0241f4eb475ac40b24ab22cb1d900a
[ "BSD-3-Clause" ]
null
null
null
roscraco/router/tplink/wr740n.py
cyroxx/roscraco
fc0279928d0241f4eb475ac40b24ab22cb1d900a
[ "BSD-3-Clause" ]
null
null
null
import urllib from roscraco.response import WirelessSettings from base import TplinkBase, _extract_js_array_data class Tplink_WR740N(TplinkBase): def confirm_identity(self): self._ensure_www_auth_header('Basic realm="TP-LINK Wireless Lite N Router WR740N"') def get_wireless_settings(self): ...
40.320755
122
0.700203
import urllib from roscraco.response import WirelessSettings from base import TplinkBase, _extract_js_array_data class Tplink_WR740N(TplinkBase): def confirm_identity(self): self._ensure_www_auth_header('Basic realm="TP-LINK Wireless Lite N Router WR740N"') def get_wireless_settings(self): ...
true
true
f75d28df56cc41494e1540402e1826395584ff04
7,757
py
Python
lib/models/cpm.py
YibinXie/Pose_Estimation
5849140bf842bf3aeaad75827f5e7b7f2999c9ee
[ "MIT" ]
null
null
null
lib/models/cpm.py
YibinXie/Pose_Estimation
5849140bf842bf3aeaad75827f5e7b7f2999c9ee
[ "MIT" ]
null
null
null
lib/models/cpm.py
YibinXie/Pose_Estimation
5849140bf842bf3aeaad75827f5e7b7f2999c9ee
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F import torch class CPM(nn.Module): def __init__(self, k): super(CPM, self).__init__() self.k = k self.pool_center = nn.AvgPool2d(kernel_size=9, stride=8, padding=1) self.conv1_stage1 = nn.Conv2d(3, 128, kernel_size=9, padding=4)...
45.098837
126
0.64806
import torch.nn as nn import torch.nn.functional as F import torch class CPM(nn.Module): def __init__(self, k): super(CPM, self).__init__() self.k = k self.pool_center = nn.AvgPool2d(kernel_size=9, stride=8, padding=1) self.conv1_stage1 = nn.Conv2d(3, 128, kernel_size=9, padding=4)...
true
true
f75d294a64fe651bb47b2cbf4aaa43c380b0c7fd
28,869
py
Python
test/functional/test_framework/script.py
asuka431/fujicoin-22.0
9e338be2116022f0d18df153298b8881e6145f04
[ "MIT" ]
null
null
null
test/functional/test_framework/script.py
asuka431/fujicoin-22.0
9e338be2116022f0d18df153298b8881e6145f04
[ "MIT" ]
null
null
null
test/functional/test_framework/script.py
asuka431/fujicoin-22.0
9e338be2116022f0d18df153298b8881e6145f04
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Baricoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Functionality to build scripts, as well as signature hash functions. This file is modified from pytho...
33.336028
201
0.619038
from collections import namedtuple import hashlib import struct import unittest from typing import List, Dict from .key import TaggedHash, tweak_add_pubkey from .messages import ( CTransaction, CTxOut, hash256, ser_string, ser_uint256, sha256, uint256_from_str, ) MAX_SCRIPT_ELEMENT_SIZE ...
true
true
f75d294e9fbc76b4c2987af949434d971314cb91
6,762
py
Python
main.py
yaxingwang/SDIT
73015f985dae50dfbcb5031e9f61761a6179b9fa
[ "MIT" ]
31
2019-08-20T00:56:48.000Z
2022-03-01T12:51:43.000Z
main.py
yaxingwang/SDIT-Scalable-and-Diverse-cross-domain-Image-Translation
73015f985dae50dfbcb5031e9f61761a6179b9fa
[ "MIT" ]
2
2019-10-03T09:01:21.000Z
2019-10-10T09:03:31.000Z
main.py
yaxingwang/SDIT-Scalable-and-Diverse-cross-domain-Image-Translation
73015f985dae50dfbcb5031e9f61761a6179b9fa
[ "MIT" ]
1
2021-06-01T09:50:40.000Z
2021-06-01T09:50:40.000Z
import os import argparse from solver import Solver from data_loader import get_loader from torch.backends import cudnn def str2bool(v): return v.lower() in ('true') def main(config): # For fast training. cudnn.benchmark = True # Create directories if not exist. if not os.path.exists(...
50.462687
142
0.677314
import os import argparse from solver import Solver from data_loader import get_loader from torch.backends import cudnn def str2bool(v): return v.lower() in ('true') def main(config): cudnn.benchmark = True if not os.path.exists(config.log_dir): os.makedirs(config.log_dir) ...
true
true
f75d2a6e43ed10114084553ccdd22817e124fc5c
3,884
py
Python
spider163/spider/read.py
zzh-python/music-wangyiyun
d1871a4477e3094698a48f10738431cdb4e466d8
[ "MIT" ]
349
2017-04-01T02:13:27.000Z
2018-04-24T03:45:45.000Z
spider163/spider/read.py
zzh-python/music-wangyiyun
d1871a4477e3094698a48f10738431cdb4e466d8
[ "MIT" ]
23
2017-04-26T08:43:25.000Z
2018-04-15T08:52:19.000Z
spider163/spider/read.py
rex3092/123
e25a299e8a2317b3fb9b4a5a07878c02a2a80902
[ "MIT" ]
129
2017-04-03T15:32:22.000Z
2018-04-24T03:45:48.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from docx import Document from xlwt import Workbook from docx.enum.dml import MSO_THEME_COLOR_INDEX from sqlalchemy import desc from spider163 import settings from spider163.spider import public as uapi from spider163.utils import tools from spider163.utils import pylog f...
36.299065
156
0.631823
from docx import Document from xlwt import Workbook from docx.enum.dml import MSO_THEME_COLOR_INDEX from sqlalchemy import desc from spider163 import settings from spider163.spider import public as uapi from spider163.utils import tools from spider163.utils import pylog from spider163.utils import pysql from spider16...
true
true
f75d2ab17636349cef45076eeea61a350d539237
5,493
py
Python
configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py
ALISCIFP/mmpose
2433e3dbcc44baa2253e2a7c748ba0216937933e
[ "Apache-2.0" ]
1
2022-02-13T12:27:40.000Z
2022-02-13T12:27:40.000Z
configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py
ALISCIFP/mmpose
2433e3dbcc44baa2253e2a7c748ba0216937933e
[ "Apache-2.0" ]
null
null
null
configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py
ALISCIFP/mmpose
2433e3dbcc44baa2253e2a7c748ba0216937933e
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../../../../_base_/default_runtime.py', '../../../../_base_/datasets/coco_wholebody.py' ] checkpoint_config = dict(interval=50) evaluation = dict(interval=50, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=0.0015, ) optimizer_config = dict(grad_clip=None) # learning pol...
28.609375
75
0.574367
_base_ = [ '../../../../_base_/default_runtime.py', '../../../../_base_/datasets/coco_wholebody.py' ] checkpoint_config = dict(interval=50) evaluation = dict(interval=50, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=0.0015, ) optimizer_config = dict(grad_clip=None) lr_config = di...
true
true
f75d2c7130097b1c289faf70e03a24ebc3235ef6
446
py
Python
web_apps/001_pypi/pypi_org/data/models_no_sql/__init__.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
2
2022-01-19T18:01:35.000Z
2022-02-06T06:54:38.000Z
web_apps/001_pypi/pypi_org/data/models_no_sql/__init__.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
web_apps/001_pypi/pypi_org/data/models_no_sql/__init__.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
"""DOM models_no_sql.""" import data.models_no_sql.audit import data.models_no_sql.downloads import data.models_no_sql.languages import data.models_no_sql.licenses import data.models_no_sql.package import data.models_no_sql.releases import data.models_no_sql.users # import data.models_no_sql.all pypi_org/data/models_...
29.733333
61
0.838565
import data.models_no_sql.audit import data.models_no_sql.downloads import data.models_no_sql.languages import data.models_no_sql.licenses import data.models_no_sql.package import data.models_no_sql.releases import data.models_no_sql.users
true
true
f75d2de43c43537c40b3c36879bfbcebbf3f952b
415
py
Python
djoser/compat.py
mark-slepkov/djoser
8760907db129a41f6204f32d50622c838fa414a1
[ "MIT" ]
1
2020-03-06T14:29:12.000Z
2020-03-06T14:29:12.000Z
venv/lib/python3.6/site-packages/djoser/compat.py
slarkjm0803/autobets
f92a5d999acaf5d7c83ca2768a260c2282eabbee
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/djoser/compat.py
slarkjm0803/autobets
f92a5d999acaf5d7c83ca2768a260c2282eabbee
[ "MIT" ]
null
null
null
from djoser.conf import settings __all__ = ['settings'] def get_user_email(user): email_field_name = get_user_email_field_name(user) return getattr(user, email_field_name, None) def get_user_email_field_name(user): try: # Assume we are Django >= 1.11 return user.get_email_field_name() exce...
25.9375
56
0.73494
from djoser.conf import settings __all__ = ['settings'] def get_user_email(user): email_field_name = get_user_email_field_name(user) return getattr(user, email_field_name, None) def get_user_email_field_name(user): try: return user.get_email_field_name() except AttributeError: ret...
true
true
f75d2e4d2285a7fbf23425f2baa4762d57df2a42
900
py
Python
src/datasets/tasks/base.py
zidingz/datasets
02edd9ebc79f715adb1c718d1439fda83dc356f1
[ "Apache-2.0" ]
10,608
2020-09-10T15:47:50.000Z
2022-03-31T22:51:47.000Z
src/datasets/tasks/base.py
zidingz/datasets
02edd9ebc79f715adb1c718d1439fda83dc356f1
[ "Apache-2.0" ]
2,396
2020-09-10T14:55:31.000Z
2022-03-31T19:41:04.000Z
src/datasets/tasks/base.py
zidingz/datasets
02edd9ebc79f715adb1c718d1439fda83dc356f1
[ "Apache-2.0" ]
1,530
2020-09-10T21:43:10.000Z
2022-03-31T01:59:12.000Z
import abc import dataclasses from dataclasses import dataclass from typing import ClassVar, Dict, Type, TypeVar from ..features import Features T = TypeVar("T", bound="TaskTemplate") @dataclass(frozen=True) class TaskTemplate(abc.ABC): # `task` is not a ClassVar since we want it to be part of the `asdict` out...
28.125
104
0.701111
import abc import dataclasses from dataclasses import dataclass from typing import ClassVar, Dict, Type, TypeVar from ..features import Features T = TypeVar("T", bound="TaskTemplate") @dataclass(frozen=True) class TaskTemplate(abc.ABC): task: str input_schema: ClassVar[Features] label_schema: Class...
true
true