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
f73fd1495b591c300050e3f34d00fb155bdf0191
13,710
py
Python
data.py
casperg92/MaSIF_colab
f030061276cc21b812bb3be652124b75dcdf7e5b
[ "MIT" ]
8
2022-02-21T12:54:25.000Z
2022-03-22T00:35:26.000Z
data.py
casperg92/MaSIF_colab
f030061276cc21b812bb3be652124b75dcdf7e5b
[ "MIT" ]
1
2022-03-19T02:44:08.000Z
2022-03-21T12:20:59.000Z
data.py
casperg92/MaSIF_colab
f030061276cc21b812bb3be652124b75dcdf7e5b
[ "MIT" ]
2
2022-03-18T08:59:38.000Z
2022-03-26T11:48:59.000Z
import torch from torch_geometric.data import InMemoryDataset, Data, DataLoader from torch_geometric.transforms import Compose import numpy as np from scipy.spatial.transform import Rotation import math import urllib.request import tarfile from pathlib import Path import requests from data_preprocessing.convert_pdb2npy...
33.196126
105
0.608096
import torch from torch_geometric.data import InMemoryDataset, Data, DataLoader from torch_geometric.transforms import Compose import numpy as np from scipy.spatial.transform import Rotation import math import urllib.request import tarfile from pathlib import Path import requests from data_preprocessing.convert_pdb2npy...
true
true
f73fd1dca04eb320de7ad6d0740ce11fb9fabbb3
89
py
Python
tests/test_settings.py
kimedward/django-queryset-signals
efb1b21a35bfe0499dc8ed50f6e0793dbab38dc1
[ "BSD-2-Clause" ]
3
2019-10-08T12:30:32.000Z
2022-02-08T07:39:10.000Z
tests/test_settings.py
kimedward/django-queryset-signals
efb1b21a35bfe0499dc8ed50f6e0793dbab38dc1
[ "BSD-2-Clause" ]
null
null
null
tests/test_settings.py
kimedward/django-queryset-signals
efb1b21a35bfe0499dc8ed50f6e0793dbab38dc1
[ "BSD-2-Clause" ]
2
2019-06-18T06:59:11.000Z
2021-04-16T15:05:11.000Z
from interface.settings import * SECRET_KEY = 'fake-key' INSTALLED_APPS.append("tests")
17.8
32
0.775281
from interface.settings import * SECRET_KEY = 'fake-key' INSTALLED_APPS.append("tests")
true
true
f73fd22a29923ff8b255ada2841cd085f58352de
43,253
py
Python
spark_fhir_schemas/r4/resources/evidence.py
imranq2/SparkFhirSchemas
24debae6980fb520fe55aa199bdfd43c0092eb9c
[ "Apache-2.0" ]
2
2020-10-31T23:25:01.000Z
2021-06-09T14:12:42.000Z
spark_fhir_schemas/r4/resources/evidence.py
imranq2/SparkFhirSchemas
24debae6980fb520fe55aa199bdfd43c0092eb9c
[ "Apache-2.0" ]
null
null
null
spark_fhir_schemas/r4/resources/evidence.py
imranq2/SparkFhirSchemas
24debae6980fb520fe55aa199bdfd43c0092eb9c
[ "Apache-2.0" ]
null
null
null
from typing import Union, List, Optional from pyspark.sql.types import ( StructType, StructField, StringType, ArrayType, DateType, DataType, ) # This file is auto-generated by generate_schema so do not edit it manually # noinspection PyPep8Naming class EvidenceSchema: """ The Evidence...
53.267241
106
0.561834
from typing import Union, List, Optional from pyspark.sql.types import ( StructType, StructField, StringType, ArrayType, DateType, DataType, ) class EvidenceSchema: @staticmethod def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, ...
true
true
f73fd2db73a81c85c5096f846163cea5c915a03e
43
py
Python
unity.py
slin1972/unity
bede13b04ee2c45ad87fcb878c89254e5f48ac8c
[ "Apache-2.0" ]
null
null
null
unity.py
slin1972/unity
bede13b04ee2c45ad87fcb878c89254e5f48ac8c
[ "Apache-2.0" ]
null
null
null
unity.py
slin1972/unity
bede13b04ee2c45ad87fcb878c89254e5f48ac8c
[ "Apache-2.0" ]
null
null
null
import sys def get(): return sys.path
8.6
19
0.651163
import sys def get(): return sys.path
true
true
f73fd305383c0854cdf691b5b7f8e6c3807aba87
634
py
Python
python_aulas/desaf053_palindromo.py
gilsonaureliano/Python-aulas
64269872acd482bcf297941ba28d30f13f29c752
[ "MIT" ]
1
2021-08-05T13:52:12.000Z
2021-08-05T13:52:12.000Z
python_aulas/desaf053_palindromo.py
gilsonaureliano/Python-aulas
64269872acd482bcf297941ba28d30f13f29c752
[ "MIT" ]
null
null
null
python_aulas/desaf053_palindromo.py
gilsonaureliano/Python-aulas
64269872acd482bcf297941ba28d30f13f29c752
[ "MIT" ]
null
null
null
p = str(input('EScreva uma frase: ')).lower() # vai ler e dizer se lido normal e de traz para frente é igaul palavras = p.split() sem = ''.join(palavras) print(sem) l = p.replace(" ", "") # reescreve trocando os espaços vazios por nada - uni as palavras print(l) n = len(l) # print(n) # print('++++++++') for cnt in ra...
28.818182
109
0.572555
p = str(input('EScreva uma frase: ')).lower() palavras = p.split() sem = ''.join(palavras) print(sem) l = p.replace(" ", "") print(l) n = len(l) for cnt in range (n -1 , -1, -1): print('{}'.format(l[cnt]), end= '') s = 0 for c in range(0, n): if l[c] == l[n - 1 - c]: s = s + 1 if s == n: ...
true
true
f73fd378176eca639680b35c1dcaeb83012da26b
23,330
py
Python
mistral/tests/unit/engine/test_error_handling.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
null
null
null
mistral/tests/unit/engine/test_error_handling.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
mistral/tests/unit/engine/test_error_handling.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2016 - Nokia Networks. # # 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 ...
28.313107
78
0.585384
import mock from oslo_config import cfg from oslo_db import exception as db_exc from mistral.db.v2 import api as db_api from mistral import exceptions as exc from mistral.services import workbooks as wb_service from mistral.services import workflows as wf_service from mistral.tests.unit.engine import bas...
true
true
f73fd383a2670a43c60510181c59db467f95f30a
1,262
py
Python
CriptografiaClasica/menuCifrados.py
samuel14luis/Proyecto-en-Python-criptograf-a-II
2c1812299f46aa7fb8f289d78ca9004fe334b618
[ "MIT" ]
null
null
null
CriptografiaClasica/menuCifrados.py
samuel14luis/Proyecto-en-Python-criptograf-a-II
2c1812299f46aa7fb8f289d78ca9004fe334b618
[ "MIT" ]
null
null
null
CriptografiaClasica/menuCifrados.py
samuel14luis/Proyecto-en-Python-criptograf-a-II
2c1812299f46aa7fb8f289d78ca9004fe334b618
[ "MIT" ]
null
null
null
from utilidades.consola import * #Menu CC = Criptografía Clásica def menuCifrados(cifrado,oconfig): cont = 0 eleccion = 'seguir' output_config = oconfig #Configuración de salida consola:5, html:7, txt:11 menu = [ '[1] Configurar Salida', '[2] Cifrar', '[3] Descifrar', ...
26.851064
81
0.481775
from utilidades.consola import * def menuCifrados(cifrado,oconfig): cont = 0 eleccion = 'seguir' output_config = oconfig menu = [ '[1] Configurar Salida', '[2] Cifrar', '[3] Descifrar', '[4] Breve descripción', '[0] volver' ] while elecc...
true
true
f73fd3ec8a8fd645f1fc3c851bcdc3fd55263dad
1,518
py
Python
pdm/cli/commands/add.py
nasyxx/pdm
229e4552c800db0241d9d6e9140256c4bcce2a6d
[ "MIT" ]
null
null
null
pdm/cli/commands/add.py
nasyxx/pdm
229e4552c800db0241d9d6e9140256c4bcce2a6d
[ "MIT" ]
null
null
null
pdm/cli/commands/add.py
nasyxx/pdm
229e4552c800db0241d9d6e9140256c4bcce2a6d
[ "MIT" ]
null
null
null
import argparse from pdm.cli import actions from pdm.cli.commands.base import BaseCommand from pdm.cli.options import packages_group, save_strategy_group, update_strategy_group from pdm.project import Project class Command(BaseCommand): """Add package(s) to pyproject.toml and install them""" def add_argumen...
33.733333
86
0.620553
import argparse from pdm.cli import actions from pdm.cli.commands.base import BaseCommand from pdm.cli.options import packages_group, save_strategy_group, update_strategy_group from pdm.project import Project class Command(BaseCommand): def add_arguments(self, parser: argparse.ArgumentParser) -> None: p...
true
true
f73fd49d2aba8862e4ce36970fd15a0a77d48d4b
18,065
py
Python
WS2012R2/lisa/tools/middleware_bench/utils/setup.py
LiliDeng/lis-test
a551326349e1aea86f51678098c747f6a092b4f6
[ "Apache-2.0" ]
null
null
null
WS2012R2/lisa/tools/middleware_bench/utils/setup.py
LiliDeng/lis-test
a551326349e1aea86f51678098c747f6a092b4f6
[ "Apache-2.0" ]
null
null
null
WS2012R2/lisa/tools/middleware_bench/utils/setup.py
LiliDeng/lis-test
a551326349e1aea86f51678098c747f6a092b4f6
[ "Apache-2.0" ]
null
null
null
""" Linux on Hyper-V and Azure Test Code, ver. 1.0.0 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/LICEN...
48.561828
108
0.556214
import os import sys import time import logging from utils import constants from utils.cmdshell import SSHClient from report.db_utils import upload_results from paramiko.ssh_exception import NoValidConnectionsError from providers.amazon_service import AWSConnector from providers.azure_service import AzureConnector f...
true
true
f73fd65ba3f4f67b3be615f0787b574a68d75308
1,883
py
Python
homeassistant/components/synology_chat/notify.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
homeassistant/components/synology_chat/notify.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
87
2020-07-06T22:22:54.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/synology_chat/notify.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""SynologyChat platform for notify component.""" import json import logging import requests import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, PLATFORM_SCHEMA, BaseNotificationService, ) from homeassistant.const import CONF_RESOURCE, CONF_VERIFY_SSL, HTTP_CREATED, HTTP_OK i...
28.530303
85
0.682953
import json import logging import requests import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, PLATFORM_SCHEMA, BaseNotificationService, ) from homeassistant.const import CONF_RESOURCE, CONF_VERIFY_SSL, HTTP_CREATED, HTTP_OK import homeassistant.helpers.config_validation as c...
true
true
f73fd69cc5e988e7dbebd91a63cf5222b39b3ded
6,979
py
Python
saleor/graphql/channel/tests/test_channel_delete_mutations.py
ibutiti/saleor
fffe9a54c01aa07131102474dcb1519e0b59da74
[ "BSD-3-Clause" ]
2
2021-05-16T13:46:07.000Z
2021-05-16T13:49:21.000Z
saleor/graphql/channel/tests/test_channel_delete_mutations.py
Niranjoyyengkhom/saleor
4e6c4fe10476508e6b5c06fb1f38f9dc1dfc81a5
[ "CC-BY-4.0" ]
73
2021-06-07T04:47:10.000Z
2022-03-14T04:52:43.000Z
saleor/graphql/channel/tests/test_channel_delete_mutations.py
Niranjoyyengkhom/saleor
4e6c4fe10476508e6b5c06fb1f38f9dc1dfc81a5
[ "CC-BY-4.0" ]
null
null
null
import graphene from ....channel.error_codes import ChannelErrorCode from ....channel.models import Channel from ....checkout.models import Checkout from ....order.models import Order from ...tests.utils import assert_no_permission, get_graphql_content CHANNEL_DELETE_MUTATION = """ mutation deleteChannel($id: ID!...
30.609649
85
0.703826
import graphene from ....channel.error_codes import ChannelErrorCode from ....channel.models import Channel from ....checkout.models import Checkout from ....order.models import Order from ...tests.utils import assert_no_permission, get_graphql_content CHANNEL_DELETE_MUTATION = """ mutation deleteChannel($id: ID!...
true
true
f73fd717c9da03652c377b089be0262106c2d31d
4,245
py
Python
git_tools/tag_all_repos.py
bnemanich/open-ce
df79cdb0779814d6500cc1f7d19b376b7cce3c90
[ "Apache-2.0" ]
null
null
null
git_tools/tag_all_repos.py
bnemanich/open-ce
df79cdb0779814d6500cc1f7d19b376b7cce3c90
[ "Apache-2.0" ]
null
null
null
git_tools/tag_all_repos.py
bnemanich/open-ce
df79cdb0779814d6500cc1f7d19b376b7cce3c90
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ ***************************************************************** Licensed Materials - Property of IBM (C) Copyright IBM Corp. 2020. All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. **************...
40.04717
121
0.570554
import os import sys import pathlib import git_utils sys.path.append(os.path.join(pathlib.Path(__file__).parent.absolute(), '..', 'open-ce')) import inputs def _make_parser(): parser = inputs.make_parser([git_utils.Argument.PUBLIC_ACCESS_TOKEN, git_utils.Argument.REPO_DIR, g...
true
true
f73fd7272fa3697daf761f35832072079728476b
949
py
Python
examples/projections/misc/misc_robinson.py
daroari/pygmt
e022851d62814a9255ed2bb63ae092b666b832b9
[ "BSD-3-Clause" ]
1
2021-05-11T03:55:25.000Z
2021-05-11T03:55:25.000Z
examples/projections/misc/misc_robinson.py
daroari/pygmt
e022851d62814a9255ed2bb63ae092b666b832b9
[ "BSD-3-Clause" ]
22
2021-03-24T07:58:59.000Z
2022-03-29T12:07:09.000Z
examples/projections/misc/misc_robinson.py
daroari/pygmt
e022851d62814a9255ed2bb63ae092b666b832b9
[ "BSD-3-Clause" ]
1
2021-11-03T07:47:18.000Z
2021-11-03T07:47:18.000Z
""" Robinson ======== The Robinson projection, presented by the American geographer and cartographer Arthur H. Robinson in 1963, is a modified cylindrical projection that is neither conformal nor equal-area. Central meridian and all parallels are straight lines; other meridians are curved. It uses lookup tables rather...
39.541667
87
0.736565
import pygmt fig = pygmt.Figure() fig.coast(region="d", projection="N12c", land="goldenrod", water="snow2", frame="afg") fig.show()
true
true
f73fd79056c9c9bd7be77bd38b3781bf169233af
10,139
py
Python
del2rpp/__main__.py
dcower/del2rpp
d0afa4ec39c2060b44e772f87a6700807d8d8155
[ "MIT" ]
34
2019-12-31T15:00:32.000Z
2022-01-21T00:29:59.000Z
del2rpp/__main__.py
dcower/del2rpp
d0afa4ec39c2060b44e772f87a6700807d8d8155
[ "MIT" ]
5
2019-12-31T00:15:39.000Z
2020-02-23T21:33:03.000Z
del2rpp/__main__.py
dcower/del2rpp
d0afa4ec39c2060b44e772f87a6700807d8d8155
[ "MIT" ]
2
2020-11-16T06:29:33.000Z
2022-02-02T18:43:23.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- import argparse import base64 import binascii import os import struct import traceback import uuid import xml.etree.ElementTree as ET from . import kit, util try: # Try local import first. from pydel import pydel except: import pydel import rpp def convert_note...
29.21902
100
0.643752
import argparse import base64 import binascii import os import struct import traceback import uuid import xml.etree.ElementTree as ET from . import kit, util try: from pydel import pydel except: import pydel import rpp def convert_notes_to_midi(channel, notes, clip_length, instance_length): notes = pyd...
true
true
f73fd997858b140c8c23c586cd621da33baa263c
177
py
Python
docs/urls.py
marekbaranowski98/WebFilm
5d78bb9518070c195feffc2181735b93be019ca0
[ "MIT" ]
null
null
null
docs/urls.py
marekbaranowski98/WebFilm
5d78bb9518070c195feffc2181735b93be019ca0
[ "MIT" ]
null
null
null
docs/urls.py
marekbaranowski98/WebFilm
5d78bb9518070c195feffc2181735b93be019ca0
[ "MIT" ]
null
null
null
"""Docs URL Configuration path api/ load swagger docs api """ from django.urls import path from .views import show_api_docs urlpatterns = [ path('api/', show_api_docs), ]
16.090909
32
0.723164
from django.urls import path from .views import show_api_docs urlpatterns = [ path('api/', show_api_docs), ]
true
true
f73fd9a3b07c1e7d19eef156034339528da1f3fc
29,515
py
Python
src/genie/libs/parser/iosxr/show_routing.py
pwoconnor/genieparser
6c764dea0f452d75bc02f3aff3dbe16aec543c81
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxr/show_routing.py
pwoconnor/genieparser
6c764dea0f452d75bc02f3aff3dbe16aec543c81
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxr/show_routing.py
pwoconnor/genieparser
6c764dea0f452d75bc02f3aff3dbe16aec543c81
[ "Apache-2.0" ]
null
null
null
''' show_route.py ''' import re from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Schema, \ Any, \ Optional # ==================================================== # schema for show route ipv4 # ===...
47.451768
135
0.448619
import re from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Schema, \ Any, \ Optional class ShowRouteIpv4Schema(MetaParser): schema = { 'vrf': { Any(): { Op...
true
true
f73fdace9325573559e633c5faad1e42640367ba
3,711
py
Python
toy/bitcoin_notifications.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
7
2018-02-24T13:41:21.000Z
2022-02-06T04:59:13.000Z
toy/bitcoin_notifications.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
6
2018-02-25T11:50:42.000Z
2021-12-13T19:55:13.000Z
toy/bitcoin_notifications.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
1
2018-03-01T02:43:15.000Z
2018-03-01T02:43:15.000Z
import requests import time from datetime import datetime # Please limit requests to no more than 30 per minute. # Endpoints update every 5 minutes. # 获取比特币价格的api # CoinMarketCap Public API Documentation Version 2 BITCOIN_API_URL = 'https://api.coinmarketcap.com/v2/ticker/1/' # 触发IFTTT的api # https://maker.ifttt.com/t...
31.184874
93
0.676637
import requests import time from datetime import datetime BITCOIN_API_URL = 'https://api.coinmarketcap.com/v2/ticker/1/' IFTTT_WEBHOOKS_URL = 'https://maker.ifttt.com/trigger/{}/with/key/bjvkZ1gI-LkEK8nSUdKMYB' def get_latest_bitcoin_price(): response = requests.get(BITCOIN_API_URL) response_json = re...
true
true
f73fdb67bb1ac8f123f4ed95b1bee18a88b4c0bb
277
py
Python
setup.py
vnetserg/barrage
c5bd486ca2b9e3642b37846648593bfc54f2874c
[ "MIT" ]
2
2017-10-28T07:30:10.000Z
2020-07-04T17:25:47.000Z
setup.py
vnetserg/barrage
c5bd486ca2b9e3642b37846648593bfc54f2874c
[ "MIT" ]
null
null
null
setup.py
vnetserg/barrage
c5bd486ca2b9e3642b37846648593bfc54f2874c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import pip from setuptools import setup setup( name='barrage', version='0.1.0', description='Competitive programming testing script', author='Sergei Fomin', author_email='sergio-dna@yandex.ru', packages=['barrage'], )
17.3125
57
0.685921
import os import pip from setuptools import setup setup( name='barrage', version='0.1.0', description='Competitive programming testing script', author='Sergei Fomin', author_email='sergio-dna@yandex.ru', packages=['barrage'], )
true
true
f73fdb73eb1ef2f5709d253b40321ce4a9e79559
12,388
py
Python
pyseq/check_system.py
nygctech/PySeq2500V2
37db3a5d11e33579535d7afc422b98bb84a780b0
[ "MIT" ]
3
2019-12-09T08:41:13.000Z
2019-12-17T08:35:31.000Z
pyseq/check_system.py
nygctech/PySeq2500V2
37db3a5d11e33579535d7afc422b98bb84a780b0
[ "MIT" ]
null
null
null
pyseq/check_system.py
nygctech/PySeq2500V2
37db3a5d11e33579535d7afc422b98bb84a780b0
[ "MIT" ]
1
2020-01-10T08:10:26.000Z
2020-01-10T08:10:26.000Z
import logging import warnings import time import os import sys from os.path import join from . import image_analysis as ia from . import methods def error(text): hs.message('ERROR::'+text) if instrument_status['FPGA']: hs.f.LED(1, 'yellow') def setup_logger(log_path): """Create a logger and retu...
27.107221
89
0.561027
import logging import warnings import time import os import sys from os.path import join from . import image_analysis as ia from . import methods def error(text): hs.message('ERROR::'+text) if instrument_status['FPGA']: hs.f.LED(1, 'yellow') def setup_logger(log_path): logger = logging.get...
true
true
f73fdba671be811f9a1ac06ad5ffaf049594985f
1,477
py
Python
backend/places/google_places_helper.py
nuwen/saveourfaves-server
4c05a1507ae0ee4c279f79372d97d7a7930b476a
[ "MIT" ]
25
2020-03-20T15:14:02.000Z
2021-11-08T09:08:47.000Z
backend/places/google_places_helper.py
nuwen/saveourfaves-server
4c05a1507ae0ee4c279f79372d97d7a7930b476a
[ "MIT" ]
8
2020-03-23T06:53:55.000Z
2021-06-10T18:43:11.000Z
backend/places/google_places_helper.py
JHBP/supportSeattleOrg
1c180a2040c3b88757b2fc645160021bfef7656e
[ "MIT" ]
33
2020-03-20T18:21:07.000Z
2021-05-02T01:05:32.000Z
from django.conf import settings from places.models import Place import requests PLACES_API_ROOT = "https://maps.googleapis.com/maps/api/place" PLACES_DETAILS_URL = "{ROOT_URL}/details/json?inputtype=textquery&key={key}&place_id={place_id}&fields={fields}" PLACES_PHOTO_URL = "{ROOT_URL}/photo?key={key}&photoreference...
34.348837
112
0.718348
from django.conf import settings from places.models import Place import requests PLACES_API_ROOT = "https://maps.googleapis.com/maps/api/place" PLACES_DETAILS_URL = "{ROOT_URL}/details/json?inputtype=textquery&key={key}&place_id={place_id}&fields={fields}" PLACES_PHOTO_URL = "{ROOT_URL}/photo?key={key}&photoreference...
true
true
f73fdc13c82959e81fbeaf4965f0fbf343b71bc5
1,061
py
Python
plugins/spotify/lyrics.py
Hydrayt777/spotify_userbot
9f42384f75f289e9fde11ca2f87d4ab9a0d93228
[ "MIT" ]
3
2021-02-09T16:45:07.000Z
2022-02-07T08:55:10.000Z
plugins/spotify/lyrics.py
code-rgb/spotify_userbot
299e872d8ad6c133e38579f0e13f105b11b03ee1
[ "MIT" ]
null
null
null
plugins/spotify/lyrics.py
code-rgb/spotify_userbot
299e872d8ad6c133e38579f0e13f105b11b03ee1
[ "MIT" ]
9
2020-07-19T20:19:36.000Z
2020-11-15T10:18:41.000Z
from telethon import events import asyncio from PyLyrics import * from __main__ import client from constants import Config CMD_PREFIX = Config.CMD_PREFIX @client.on(events.NewMessage(outgoing=True, pattern=CMD_PREFIX + "lyrics (.*)")) async def _(event): if event.fwd_from: return i = 0 input_str...
31.205882
85
0.584354
from telethon import events import asyncio from PyLyrics import * from __main__ import client from constants import Config CMD_PREFIX = Config.CMD_PREFIX @client.on(events.NewMessage(outgoing=True, pattern=CMD_PREFIX + "lyrics (.*)")) async def _(event): if event.fwd_from: return i = 0 input_str...
true
true
f73fdccf4f7335095c0f4f509b7818e1139d3e8e
2,216
py
Python
flexget/plugins/input/input_csv.py
Crupuk/Flexget
0ede246fd4b90e3cd75120ba13746187e11968d2
[ "MIT" ]
null
null
null
flexget/plugins/input/input_csv.py
Crupuk/Flexget
0ede246fd4b90e3cd75120ba13746187e11968d2
[ "MIT" ]
null
null
null
flexget/plugins/input/input_csv.py
Crupuk/Flexget
0ede246fd4b90e3cd75120ba13746187e11968d2
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import import logging import csv from requests import RequestException from flexget.entry import Entry from flexget.plugin import register_plugin, PluginError from flexget.utils.cached_input import cached log = logging.getLogger('csv') class InputCSV(obje...
30.356164
85
0.573105
from __future__ import unicode_literals, division, absolute_import import logging import csv from requests import RequestException from flexget.entry import Entry from flexget.plugin import register_plugin, PluginError from flexget.utils.cached_input import cached log = logging.getLogger('csv') class InputCSV(obje...
true
true
f73fddbcce476b4c2a42f611c4b0de31098afab5
6,813
py
Python
data/datasets.py
DaoiestFire/self-supervised-learning-of-object-movement
4db59bf352efd946661feffc7afc4630c6731852
[ "MIT" ]
null
null
null
data/datasets.py
DaoiestFire/self-supervised-learning-of-object-movement
4db59bf352efd946661feffc7afc4630c6731852
[ "MIT" ]
null
null
null
data/datasets.py
DaoiestFire/self-supervised-learning-of-object-movement
4db59bf352efd946661feffc7afc4630c6731852
[ "MIT" ]
null
null
null
import os import glob import random import numpy as np import pandas as pd from imageio import mimread from skimage.color import gray2rgb from skimage import io, img_as_float32 from sklearn.model_selection import train_test_split from torch.utils.data import Dataset from data.augmentation import AllAugmen...
37.434066
113
0.587406
import os import glob import random import numpy as np import pandas as pd from imageio import mimread from skimage.color import gray2rgb from skimage import io, img_as_float32 from sklearn.model_selection import train_test_split from torch.utils.data import Dataset from data.augmentation import AllAugmen...
true
true
f73fdea2806a96141086e3b98027bcacf760724a
10,865
py
Python
tests/components/plex/test_media_search.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2020-11-27T06:26:27.000Z
2020-12-09T14:55:16.000Z
tests/components/plex/test_media_search.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
25
2021-11-24T06:24:10.000Z
2022-03-31T06:23:06.000Z
tests/components/plex/test_media_search.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2021-11-14T13:29:33.000Z
2021-12-27T17:05:22.000Z
"""Tests for Plex server.""" from unittest.mock import patch from plexapi.exceptions import BadRequest, NotFound import pytest from homeassistant.components.media_player.const import ( ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_TYPE, DOMAIN as MEDIA_PLAYER_DOMAIN, MEDIA_TYPE_EPISODE, MEDIA_TYPE_MOV...
35.740132
140
0.565393
from unittest.mock import patch from plexapi.exceptions import BadRequest, NotFound import pytest from homeassistant.components.media_player.const import ( ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_TYPE, DOMAIN as MEDIA_PLAYER_DOMAIN, MEDIA_TYPE_EPISODE, MEDIA_TYPE_MOVIE, MEDIA_TYPE_MUSIC, ...
true
true
f73fdf016e1364198141e7efb119e8b36958e4cb
3,597
py
Python
python/services/monitoring/monitored_project.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
16
2021-01-08T19:35:22.000Z
2022-03-23T16:23:49.000Z
python/services/monitoring/monitored_project.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
1
2021-01-13T04:59:56.000Z
2021-01-13T04:59:56.000Z
python/services/monitoring/monitored_project.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
11
2021-03-18T11:27:28.000Z
2022-03-12T06:49:14.000Z
# Copyright 2021 Google LLC. 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 law o...
36.333333
88
0.71226
from connector import channel from google3.cloud.graphite.mmv2.services.google.monitoring import monitored_project_pb2 from google3.cloud.graphite.mmv2.services.google.monitoring import ( monitored_project_pb2_grpc, ) from typing import List class MonitoredProject(object): def __init__( ...
true
true
f73fdf293d06036accc139b9dae03a1dd5e73606
1,490
py
Python
tests/test_apis/test_ctd.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
1
2020-07-29T09:52:11.000Z
2020-07-29T09:52:11.000Z
tests/test_apis/test_ctd.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
1
2020-12-08T17:08:26.000Z
2020-12-08T17:08:26.000Z
tests/test_apis/test_ctd.py
luluricketts/biothings_explorer
ae2009ff285f96a08e0145f242846ca613b5069c
[ "Apache-2.0" ]
null
null
null
import unittest from biothings_explorer.registry import Registry from biothings_explorer.user_query_dispatcher import SingleEdgeQueryDispatcher from .utils import get_apis reg = Registry() class TestSingleHopQuery(unittest.TestCase): def test_gene2disease(self): # test <gene, related_to, disease> ...
40.27027
78
0.502685
import unittest from biothings_explorer.registry import Registry from biothings_explorer.user_query_dispatcher import SingleEdgeQueryDispatcher from .utils import get_apis reg = Registry() class TestSingleHopQuery(unittest.TestCase): def test_gene2disease(self): seqd = SingleEdgeQueryDispatcher(...
true
true
f73fdf56364c99be4a1771fea4ed64d717302f4d
1,045
py
Python
verfun.py
haakondr/verfun
2eda59429f1556e2a56e330e961fefe742eb04b9
[ "MIT" ]
7
2019-05-17T07:03:46.000Z
2020-02-19T21:35:28.000Z
verfun.py
haakondr/verfun
2eda59429f1556e2a56e330e961fefe742eb04b9
[ "MIT" ]
3
2018-11-23T07:38:45.000Z
2021-10-19T01:59:23.000Z
verfun.py
haakondr/verfun
2eda59429f1556e2a56e330e961fefe742eb04b9
[ "MIT" ]
null
null
null
import inspect import ast from types import FunctionType import hashlib from typing import List import astunparse from pyminifier import minification class VerfunException(Exception): pass def version_hash_for_function(fn: FunctionType) -> str: abstract_syntax_tree = ast.parse(inspect.getsource(fn)).body[0...
29.027778
87
0.755981
import inspect import ast from types import FunctionType import hashlib from typing import List import astunparse from pyminifier import minification class VerfunException(Exception): pass def version_hash_for_function(fn: FunctionType) -> str: abstract_syntax_tree = ast.parse(inspect.getsource(fn)).body[0...
true
true
f73fe00693c3969f3ee0f606832700e60f1ddf0a
704
py
Python
freezerclient/__init__.py
memogarcia/python-freezerclient
7431d7b62cb75801175a337e41e9c8255786793a
[ "Apache-2.0" ]
18
2016-04-22T10:05:08.000Z
2021-08-31T05:12:22.000Z
freezerclient/__init__.py
memogarcia/python-freezerclient
7431d7b62cb75801175a337e41e9c8255786793a
[ "Apache-2.0" ]
null
null
null
freezerclient/__init__.py
memogarcia/python-freezerclient
7431d7b62cb75801175a337e41e9c8255786793a
[ "Apache-2.0" ]
4
2016-06-23T15:53:15.000Z
2019-03-04T07:26:01.000Z
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
39.111111
78
0.75142
import pbr.version __version__ = pbr.version.VersionInfo('python-freezerclient').version_string()
true
true
f73fe0146f9e190d924b5b70f8ef4e13236dd55d
547
py
Python
vnpy/app/spread_trading/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
323
2015-11-21T14:45:29.000Z
2022-03-16T08:54:37.000Z
vnpy/app/spread_trading/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
9
2017-03-21T08:26:21.000Z
2021-08-23T06:41:17.000Z
vnpy/app/spread_trading/__init__.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
148
2016-09-26T03:25:39.000Z
2022-02-06T14:43:48.000Z
from pathlib import Path from vnpy.trader.app import BaseApp from vnpy.trader.object import ( OrderData, TradeData, TickData, BarData ) from .engine import ( SpreadEngine, APP_NAME, SpreadData, LegData, SpreadStrategyTemplate, SpreadAlgoTemplate ) class SpreadTradingApp(BaseA...
17.645161
36
0.685558
from pathlib import Path from vnpy.trader.app import BaseApp from vnpy.trader.object import ( OrderData, TradeData, TickData, BarData ) from .engine import ( SpreadEngine, APP_NAME, SpreadData, LegData, SpreadStrategyTemplate, SpreadAlgoTemplate ) class SpreadTradingApp(BaseA...
true
true
f73fe03fffff395875bcd2115cf284690f2ecd4b
847
py
Python
004.function_programing/002.map_reduce.py
wangpin34/learn-python
e8a17501dbda3ba6e7ca1eccbac89536409b3d79
[ "MIT" ]
null
null
null
004.function_programing/002.map_reduce.py
wangpin34/learn-python
e8a17501dbda3ba6e7ca1eccbac89536409b3d79
[ "MIT" ]
null
null
null
004.function_programing/002.map_reduce.py
wangpin34/learn-python
e8a17501dbda3ba6e7ca1eccbac89536409b3d79
[ "MIT" ]
null
null
null
# python map/reduce function print '************** map/reduce function Test Programs **************' print 'test map' def power(x): return x * x; l1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] print 'l1:',l1 print 'map l1 with power function:',map(power,l1) print map(str, [1, 2, 3, 4, 5, 6, 7, 8, 9]) print 'test reduce' def a...
16.607843
71
0.596222
print '************** map/reduce function Test Programs **************' print 'test map' def power(x): return x * x; l1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] print 'l1:',l1 print 'map l1 with power function:',map(power,l1) print map(str, [1, 2, 3, 4, 5, 6, 7, 8, 9]) print 'test reduce' def add(x,y): return x + y l2 = ...
false
true
f73fe18faa402050e09a10af5b9186239b95d2f3
1,488
py
Python
tools/perf/page_sets/image_decoding_measurement.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-01-16T03:57:39.000Z
2019-01-16T03:57:39.000Z
tools/perf/page_sets/image_decoding_measurement.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2018-02-10T21:00:08.000Z
2018-03-20T05:09:50.000Z
tools/perf/page_sets/image_decoding_measurement.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T06:34:36.000Z
2020-11-04T06:34:36.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class ImageDecodingMeasurementPage(page_module.Page): ...
39.157895
80
0.732527
from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class ImageDecodingMeasurementPage(page_module.Page): def __init__(self, url, page_set): super(ImageDecodingMeasurementPage, self).__init__(url=url, pa...
true
true
f73fe46362923b06d73cbc0ce7112a0ef52e4907
8,754
py
Python
open_humans/migrations/0001_squashed_0016_auto_20150410_2301.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
57
2016-09-01T21:55:52.000Z
2022-03-27T22:15:32.000Z
open_humans/migrations/0001_squashed_0016_auto_20150410_2301.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
464
2015-03-23T18:08:28.000Z
2016-08-25T04:57:36.000Z
open_humans/migrations/0001_squashed_0016_auto_20150410_2301.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
25
2017-01-24T16:23:27.000Z
2021-11-07T01:51:42.000Z
# -*- coding: utf-8 -*- from django.db import models, migrations import django.core.validators import open_humans.storage import django.utils.timezone from django.conf import settings import open_humans.models def add_member_ids(apps, *args): Member = apps.get_model('open_humans', 'Member') for member in Me...
59.958904
713
0.63194
from django.db import models, migrations import django.core.validators import open_humans.storage import django.utils.timezone from django.conf import settings import open_humans.models def add_member_ids(apps, *args): Member = apps.get_model('open_humans', 'Member') for member in Member.objects.all(): ...
true
true
f73fe474a0a3cc5510645ff8c0a767dc58f3805b
4,685
py
Python
TuneBertJointCWPD/datautil/char_utils.py
tjuwlz/JointCWPDParser
b542cabc123c46008116330bfa0b9dc2de918dab
[ "Apache-2.0" ]
2
2021-05-18T14:19:04.000Z
2022-01-07T07:17:58.000Z
TuneBertJointCWPD/datautil/char_utils.py
tjuwlz/JointCWPDParser
b542cabc123c46008116330bfa0b9dc2de918dab
[ "Apache-2.0" ]
null
null
null
TuneBertJointCWPD/datautil/char_utils.py
tjuwlz/JointCWPDParser
b542cabc123c46008116330bfa0b9dc2de918dab
[ "Apache-2.0" ]
null
null
null
from datautil.dependency import Dependency from typing import List # 计算F1值 def calc_f1(num_gold, num_pred, num_correct, eps=1e-10): f1 = (2. * num_correct) / (num_pred + num_gold + eps) return f1 def cws_from_postag_bi(deps: List[Dependency]): wds = [] one_wd = [] is_start = False end_idx = ...
31.233333
115
0.545358
from datautil.dependency import Dependency from typing import List def calc_f1(num_gold, num_pred, num_correct, eps=1e-10): f1 = (2. * num_correct) / (num_pred + num_gold + eps) return f1 def cws_from_postag_bi(deps: List[Dependency]): wds = [] one_wd = [] is_start = False end_idx = len(dep...
true
true
f73fe658dfe585983b4b4eaf3b0bd1a37f3d31ce
110
py
Python
test.py
iamfuyu1031/Obfsproxy
f3b31ad1a1af845d87b4f19f95c1934719de2362
[ "BSD-3-Clause" ]
1
2019-06-19T10:26:41.000Z
2019-06-19T10:26:41.000Z
test.py
iamfuyu1031/Obfsproxy
f3b31ad1a1af845d87b4f19f95c1934719de2362
[ "BSD-3-Clause" ]
null
null
null
test.py
iamfuyu1031/Obfsproxy
f3b31ad1a1af845d87b4f19f95c1934719de2362
[ "BSD-3-Clause" ]
null
null
null
import os os.system('python setup.py build') os.system('sudo python setup.py install') os.system('sudo tor')
18.333333
41
0.736364
import os os.system('python setup.py build') os.system('sudo python setup.py install') os.system('sudo tor')
true
true
f73fe7eed2cb84dff0a06a8c9956db29b0f9bb02
6,481
py
Python
apps/dot_ext/forms.py
TransparentHealth/bluebutton-web-server
69b6e649b2e9caf7859a75ea3867bf74c83ca340
[ "Apache-2.0" ]
1
2020-01-26T16:02:27.000Z
2020-01-26T16:02:27.000Z
apps/dot_ext/forms.py
TransparentHealth/bluebutton-web-server
69b6e649b2e9caf7859a75ea3867bf74c83ca340
[ "Apache-2.0" ]
null
null
null
apps/dot_ext/forms.py
TransparentHealth/bluebutton-web-server
69b6e649b2e9caf7859a75ea3867bf74c83ca340
[ "Apache-2.0" ]
2
2018-09-29T18:53:08.000Z
2020-01-26T16:02:31.000Z
from django.utils.safestring import mark_safe from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from oauth2_provider.forms import AllowForm as DotAllowForm from oauth2_provider.models import get_application_model from oauth2_provider.scopes import get_scop...
39.518293
126
0.629841
from django.utils.safestring import mark_safe from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from oauth2_provider.forms import AllowForm as DotAllowForm from oauth2_provider.models import get_application_model from oauth2_provider.scopes import get_scop...
true
true
f73fe8e8adeea99b6d3aa7a61eb570e5f6f79ac5
49,103
py
Python
nums/core/array/application.py
liuhanyao98/nums_gpu_draft
48df59afe605f02ea2bd609c5f9e0006fbc27a5d
[ "Apache-2.0" ]
null
null
null
nums/core/array/application.py
liuhanyao98/nums_gpu_draft
48df59afe605f02ea2bd609c5f9e0006fbc27a5d
[ "Apache-2.0" ]
null
null
null
nums/core/array/application.py
liuhanyao98/nums_gpu_draft
48df59afe605f02ea2bd609c5f9e0006fbc27a5d
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (C) 2020 NumS Development Team. # # 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...
46.106103
100
0.51952
from typing import List import numpy as np from nums.core.array.blockarray import BlockArray, Block from nums.core.array import utils as array_utils from nums.core.storage.storage import ArrayGrid, StoredArray, StoredArrayS3 from nums.core.systems.systems import System, RaySystem, SerialSystem from n...
true
true
f73fe9f3a064f166ba6a0daaf865731be2818314
254
py
Python
modules/backbones/darknet.py
DetectionBLWX/YOLOv3
0a9787670d109ef7d7fb668550e5715749f1ef5a
[ "MIT" ]
3
2020-03-19T04:13:28.000Z
2020-10-11T16:55:33.000Z
modules/backbones/darknet.py
DetectionBLWX/YOLOv3
0a9787670d109ef7d7fb668550e5715749f1ef5a
[ "MIT" ]
null
null
null
modules/backbones/darknet.py
DetectionBLWX/YOLOv3
0a9787670d109ef7d7fb668550e5715749f1ef5a
[ "MIT" ]
null
null
null
''' Function: define the darknet Author: Charles ''' import torch import torch.nn as nn '''define darknet53''' class Darknet53(nn.Module): def __init__(self, **kwargs): super(Darknet53, self).__init__() '''forward''' def forward(self, x): pass
14.941176
35
0.688976
import torch import torch.nn as nn class Darknet53(nn.Module): def __init__(self, **kwargs): super(Darknet53, self).__init__() def forward(self, x): pass
true
true
f73fea5cb8c06cd2c2944d99da3b116d022c0182
3,256
py
Python
ui-test/test_001_user_registration.py
PeterVadasz7810/conduit
aca45b222cd116e147611819e4e23aec20ad513c
[ "MIT" ]
null
null
null
ui-test/test_001_user_registration.py
PeterVadasz7810/conduit
aca45b222cd116e147611819e4e23aec20ad513c
[ "MIT" ]
null
null
null
ui-test/test_001_user_registration.py
PeterVadasz7810/conduit
aca45b222cd116e147611819e4e23aec20ad513c
[ "MIT" ]
null
null
null
import pytest from time import sleep from test_003_eu_cookie_law import get_cookie_bar_buttons from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException de...
35.010753
110
0.705467
import pytest from time import sleep from test_003_eu_cookie_law import get_cookie_bar_buttons from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException de...
true
true
f73fea83170787294bab72c433b06c36d51b5482
132
py
Python
gutils/images/postprocessing/__init__.py
giussepi/gutils
f43a207a4a10884096a5d92d81183c2213169c14
[ "MIT" ]
null
null
null
gutils/images/postprocessing/__init__.py
giussepi/gutils
f43a207a4a10884096a5d92d81183c2213169c14
[ "MIT" ]
null
null
null
gutils/images/postprocessing/__init__.py
giussepi/gutils
f43a207a4a10884096a5d92d81183c2213169c14
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ gutils/images/postprocessing/__init__ """ from gutils.images.postprocessing.remove_bg import RemoveBG
22
59
0.734848
from gutils.images.postprocessing.remove_bg import RemoveBG
true
true
f73feb2fe844803473b196e88a663863da6b428d
4,645
py
Python
legacy_test/services/test_simplequeue.py
bjwschaap/anchore-engine
0aba1d12d79f63c5919ad301cecc5bd5cc09325a
[ "Apache-2.0" ]
null
null
null
legacy_test/services/test_simplequeue.py
bjwschaap/anchore-engine
0aba1d12d79f63c5919ad301cecc5bd5cc09325a
[ "Apache-2.0" ]
null
null
null
legacy_test/services/test_simplequeue.py
bjwschaap/anchore-engine
0aba1d12d79f63c5919ad301cecc5bd5cc09325a
[ "Apache-2.0" ]
null
null
null
import datetime import unittest from anchore_engine.db import db_locks, initialize, session_scope, Lease, db_queue from anchore_engine.subsys import logger, simplequeue from anchore_engine.subsys.logger import enable_bootstrap_logging enable_bootstrap_logging() conn_str = 'postgres+pg8000://postgres:postgres@localho...
36.289063
129
0.620667
import datetime import unittest from anchore_engine.db import db_locks, initialize, session_scope, Lease, db_queue from anchore_engine.subsys import logger, simplequeue from anchore_engine.subsys.logger import enable_bootstrap_logging enable_bootstrap_logging() conn_str = 'postgres+pg8000://postgres:postgres@localho...
true
true
f73febea52128fa90a03e88db2cc225bad808db3
697
py
Python
scholar_bot/post_slack.py
finsberg/scholar_bot
b8a9fc22cfa1888d58a1881235e57a98769153fb
[ "MIT" ]
null
null
null
scholar_bot/post_slack.py
finsberg/scholar_bot
b8a9fc22cfa1888d58a1881235e57a98769153fb
[ "MIT" ]
null
null
null
scholar_bot/post_slack.py
finsberg/scholar_bot
b8a9fc22cfa1888d58a1881235e57a98769153fb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from slackclient import SlackClient from .config import SLACK_TOKEN class SlackPoster: def __init__(self, token, channels): self.client = SlackClient(token) self.channels = channels def post(self, message): for ch in self.channels: ...
21.78125
52
0.602582
from slackclient import SlackClient from .config import SLACK_TOKEN class SlackPoster: def __init__(self, token, channels): self.client = SlackClient(token) self.channels = channels def post(self, message): for ch in self.channels: self.client.api_call( ...
true
true
f73feca96748aade41209582ff61131ec93fb5f2
5,604
py
Python
tests/test_app/test_translate.py
aberki1234/cogent3
af98b248a999bfeefd4cfed6bd59b4f30442e2d4
[ "BSD-3-Clause" ]
null
null
null
tests/test_app/test_translate.py
aberki1234/cogent3
af98b248a999bfeefd4cfed6bd59b4f30442e2d4
[ "BSD-3-Clause" ]
null
null
null
tests/test_app/test_translate.py
aberki1234/cogent3
af98b248a999bfeefd4cfed6bd59b4f30442e2d4
[ "BSD-3-Clause" ]
null
null
null
from unittest import TestCase, main from cogent3 import DNA, make_aligned_seqs, make_unaligned_seqs from cogent3.app.composable import NotCompleted from cogent3.app.translate import ( best_frame, get_code, get_fourfold_degenerate_sets, select_translatable, translate_frames, translate_seqs, ) ...
35.245283
88
0.619736
from unittest import TestCase, main from cogent3 import DNA, make_aligned_seqs, make_unaligned_seqs from cogent3.app.composable import NotCompleted from cogent3.app.translate import ( best_frame, get_code, get_fourfold_degenerate_sets, select_translatable, translate_frames, translate_seqs, ) ...
true
true
f73fee033935444d5e60c82336a5289d3dd1bcf0
53,673
py
Python
djconnectwise/tests/fixtures.py
KerkhoffTechnologies/django-connectwise
02a14f45d42daff176bc7e5623c70d7e90246287
[ "MIT" ]
10
2017-04-27T19:51:38.000Z
2020-10-09T17:21:23.000Z
djconnectwise/tests/fixtures.py
KerkhoffTechnologies/django-connectwise
02a14f45d42daff176bc7e5623c70d7e90246287
[ "MIT" ]
45
2017-02-07T22:52:07.000Z
2021-11-25T21:45:44.000Z
djconnectwise/tests/fixtures.py
KerkhoffTechnologies/django-connectwise
02a14f45d42daff176bc7e5623c70d7e90246287
[ "MIT" ]
9
2017-01-27T00:07:33.000Z
2021-07-12T19:48:27.000Z
from django.conf import settings API_WORK_ROLE = { "id": 11, "name": "System Engineer", "hourlyRate": 100, "inactiveFlag": False, "locationIds": [ 2 ], "_info": { "lastUpdated": "2003-08-21T13:02:52Z", "updatedBy": "zAdmin" ...
26.80969
116
0.541091
from django.conf import settings API_WORK_ROLE = { "id": 11, "name": "System Engineer", "hourlyRate": 100, "inactiveFlag": False, "locationIds": [ 2 ], "_info": { "lastUpdated": "2003-08-21T13:02:52Z", "updatedBy": "zAdmin" ...
true
true
f73fee85cac322b9cad6465b237cf179f0c7ae32
2,107
py
Python
agate/table/from_fixed.py
timgates42/agate
6152feae83d48ab36e62d4ee5a434bb1ae1bdff5
[ "MIT" ]
null
null
null
agate/table/from_fixed.py
timgates42/agate
6152feae83d48ab36e62d4ee5a434bb1ae1bdff5
[ "MIT" ]
null
null
null
agate/table/from_fixed.py
timgates42/agate
6152feae83d48ab36e62d4ee5a434bb1ae1bdff5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import io from agate import fixed from agate import utils @classmethod def from_fixed(cls, path, schema_path, column_names=utils.default, column_types=None, row_names=None, encoding='utf-8', schema_encoding='utf-8'): """ Create a new table from a fixed-width file and a CSV schema. ...
30.1
145
0.644993
import io from agate import fixed from agate import utils @classmethod def from_fixed(cls, path, schema_path, column_names=utils.default, column_types=None, row_names=None, encoding='utf-8', schema_encoding='utf-8'): from agate.table import Table close_f = False close_schema_f = False try: ...
true
true
f73fef81be058d86402daae0cd16dc7c7f50af3b
7,572
py
Python
ros/src/vehicle/bin/kia_soul_driver.py
frk2/opencaret
35be29ff2a6c546e71c4bb3bf76c1bc32b567a86
[ "MIT" ]
53
2018-04-18T00:10:54.000Z
2021-12-28T16:39:10.000Z
ros/src/vehicle/bin/kia_soul_driver.py
LouSample/opencaret
35be29ff2a6c546e71c4bb3bf76c1bc32b567a86
[ "MIT" ]
14
2018-06-21T22:42:50.000Z
2019-02-17T03:31:15.000Z
ros/src/vehicle/bin/kia_soul_driver.py
LouSample/opencaret
35be29ff2a6c546e71c4bb3bf76c1bc32b567a86
[ "MIT" ]
21
2018-06-09T07:49:42.000Z
2021-10-02T10:26:34.000Z
#!/usr/bin/python import cantools import oscc import math from opencaret_msgs.msg import CanMessage, LongitudinalTarget from std_msgs.msg import Float32, Bool from sensor_msgs.msg import JointState from util import util import rospy import os import struct from canoc.can_transceiver import CanTransceiver from util.util...
42.539326
111
0.622293
import cantools import oscc import math from opencaret_msgs.msg import CanMessage, LongitudinalTarget from std_msgs.msg import Float32, Bool from sensor_msgs.msg import JointState from util import util import rospy import os import struct from canoc.can_transceiver import CanTransceiver from util.util import SimpleTim...
true
true
f73fefc1f8b6c95ccbbcb5a06230e82ea99c2fc3
1,680
py
Python
tests/test_fetcher.py
daobook/pex
be871de02a4f3b6e7bc69ce94290a302716161fc
[ "Apache-2.0" ]
null
null
null
tests/test_fetcher.py
daobook/pex
be871de02a4f3b6e7bc69ce94290a302716161fc
[ "Apache-2.0" ]
null
null
null
tests/test_fetcher.py
daobook/pex
be871de02a4f3b6e7bc69ce94290a302716161fc
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import print_function from threading import Thread import pytest from pex.compatibility import PY2 from pex.fetcher import URLFetcher from pex.typing import TYPE_CHECKIN...
28.965517
87
0.702381
from __future__ import print_function from threading import Thread import pytest from pex.compatibility import PY2 from pex.fetcher import URLFetcher from pex.typing import TYPE_CHECKING from pex.version import __version__ if PY2: from BaseHTTPServer import BaseHTTPRequestHandler from SocketServer import...
true
true
f73ff127bb541cd9cf566ab494452e764f8976ec
1,398
py
Python
src/pipupgrade/util/jobs.py
martinet101/pipupgrade
4e98bd44746709a0ec5cab19268854b3d7dee77b
[ "MIT" ]
null
null
null
src/pipupgrade/util/jobs.py
martinet101/pipupgrade
4e98bd44746709a0ec5cab19268854b3d7dee77b
[ "MIT" ]
null
null
null
src/pipupgrade/util/jobs.py
martinet101/pipupgrade
4e98bd44746709a0ec5cab19268854b3d7dee77b
[ "MIT" ]
null
null
null
# imports - standard imports import os, os.path as osp from functools import partial import sys # imports - module imports from pipupgrade.config import PATH, Settings from pipupgrade.util.imports import import_handler from pipupgrade.util.system import popen from pipupgrade.util._dict import me...
29.125
98
0.61731
import os, os.path as osp from functools import partial import sys from pipupgrade.config import PATH, Settings from pipupgrade.util.imports import import_handler from pipupgrade.util.system import popen from pipupgrade.util._dict import merge_dict from pipupgrade.util.environ import getenv...
true
true
f73ff178f6b5ca27961fbc67f5ece29a60ba7185
16,568
py
Python
submitter/adaptors/k8s_adaptor/k8s_adaptor.py
hmdcpc2021/component_submitter
c094ddb07b28b2c4918f0ed19c1e39f0724b5c8e
[ "Apache-2.0" ]
null
null
null
submitter/adaptors/k8s_adaptor/k8s_adaptor.py
hmdcpc2021/component_submitter
c094ddb07b28b2c4918f0ed19c1e39f0724b5c8e
[ "Apache-2.0" ]
null
null
null
submitter/adaptors/k8s_adaptor/k8s_adaptor.py
hmdcpc2021/component_submitter
c094ddb07b28b2c4918f0ed19c1e39f0724b5c8e
[ "Apache-2.0" ]
null
null
null
import os import subprocess import logging import filecmp import copy import base64 import json import pykube import kubernetes_validate from kubernetes_validate.utils import ( SchemaNotFoundError, VersionNotSupportedError, InvalidSchemaError, ValidationError, ) from toscaparser.tosca_template import T...
34.373444
80
0.58281
import os import subprocess import logging import filecmp import copy import base64 import json import pykube import kubernetes_validate from kubernetes_validate.utils import ( SchemaNotFoundError, VersionNotSupportedError, InvalidSchemaError, ValidationError, ) from toscaparser.tosca_template import T...
true
true
f73ff17fc9e9b3ae8d7b4d67bab77e6dbcf50755
600
py
Python
Python 3 - Mundo 3/Desafios das Aulas - Mundo 3/Ex115/funcoes.py
Pedro0901/python3-curso-em-video
2e8995a5352c1918e5da68e7868a613b938e9c29
[ "MIT" ]
1
2021-07-05T03:13:33.000Z
2021-07-05T03:13:33.000Z
Python 3 - Mundo 3/Desafios das Aulas - Mundo 3/Ex115/funcoes.py
Pedro0901/python3-curso-em-video
2e8995a5352c1918e5da68e7868a613b938e9c29
[ "MIT" ]
null
null
null
Python 3 - Mundo 3/Desafios das Aulas - Mundo 3/Ex115/funcoes.py
Pedro0901/python3-curso-em-video
2e8995a5352c1918e5da68e7868a613b938e9c29
[ "MIT" ]
null
null
null
def leiaInt(msg): while True: try: n = int(input(msg)) except (ValueError, TypeError): print('ERRO: Por favor digite um número inteiro válido.') continue #Para jogar novamente pro while except KeyboardInterrupt: print('Usuário preferiu não digitar esse número.') return 0 else: return n def ...
17.647059
60
0.656667
def leiaInt(msg): while True: try: n = int(input(msg)) except (ValueError, TypeError): print('ERRO: Por favor digite um número inteiro válido.') continue except KeyboardInterrupt: print('Usuário preferiu não digitar esse número.') return 0 else: return n def linha(tam = 42): return '-' * ...
true
true
f73ff1a85a46a5732a05ef7e2bf3f6581a2c052f
9,032
py
Python
bootstrap.py
maaeli/freesas
418cdd1b72ab650198453a06defa3a57e5c4daea
[ "MIT" ]
7
2015-06-30T13:13:43.000Z
2021-12-22T07:13:02.000Z
bootstrap.py
kif/freesas
d4e468726e1c2486814ff07871d49dfadf77e437
[ "MIT" ]
47
2015-07-20T13:15:55.000Z
2022-03-27T07:51:38.000Z
bootstrap.py
maaeli/freesas
418cdd1b72ab650198453a06defa3a57e5c4daea
[ "MIT" ]
3
2015-04-30T07:41:49.000Z
2021-08-19T00:20:23.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Bootstrap helps you to test scripts without installing them by patching your PYTHONPATH on the fly example: ./bootstrap.py ipython """ __authors__ = ["Frédéric-Emmanuel Picca", "Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __date__ = "0...
33.084249
122
0.608946
__authors__ = ["Frédéric-Emmanuel Picca", "Jérôme Kieffer"] __contact__ = "jerome.kieffer@esrf.eu" __license__ = "MIT" __date__ = "09/07/2020" import sys import os import distutils.util import subprocess import logging import collections from argparse import ArgumentParser logging.basicConfig() logger = logging.ge...
true
true
f73ff227e96d209edcbe2b261c96719cd93f9049
5,283
py
Python
lib/surface/auth/application_default/login.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
null
null
null
lib/surface/auth/application_default/login.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
null
null
null
lib/surface/auth/application_default/login.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
2
2020-11-04T03:08:21.000Z
2020-11-05T08:14:41.000Z
# Copyright 2016 Google 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 applicable law or ag...
40.328244
80
0.718531
import textwrap from googlecloudsdk.api_lib.auth import util as auth_util from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions as c_exc from googlecloudsdk.core import log from googlecloudsdk.core.console import console_io from googlecloudsdk.core.credentials import gc...
true
true
f73ff250226ba144aa30ab88b10494424d99cc11
4,509
py
Python
tests/test_wintypes/test_structures.py
opalmer/pycffiwin32
39210182a92e93c37a9f1c644fd5fcc1aa32f6d1
[ "MIT" ]
10
2015-11-19T12:39:50.000Z
2021-02-21T20:15:29.000Z
tests/test_wintypes/test_structures.py
opalmer/pycffiwin32
39210182a92e93c37a9f1c644fd5fcc1aa32f6d1
[ "MIT" ]
109
2015-06-15T05:03:33.000Z
2018-01-14T10:18:48.000Z
tests/test_wintypes/test_structures.py
opalmer/pycffiwin32
39210182a92e93c37a9f1c644fd5fcc1aa32f6d1
[ "MIT" ]
8
2015-07-29T04:18:27.000Z
2018-11-02T17:15:40.000Z
from pywincffi.core import dist from pywincffi.dev.testutil import TestCase from pywincffi.wintypes import ( HANDLE, SECURITY_ATTRIBUTES, OVERLAPPED, FILETIME, LPWSANETWORKEVENTS, PROCESS_INFORMATION, STARTUPINFO) class TestSECURITY_ATTRIBUTES(TestCase): """ Tests for :class:`pywincffi.wintypes.SECURI...
28.18125
79
0.650033
from pywincffi.core import dist from pywincffi.dev.testutil import TestCase from pywincffi.wintypes import ( HANDLE, SECURITY_ATTRIBUTES, OVERLAPPED, FILETIME, LPWSANETWORKEVENTS, PROCESS_INFORMATION, STARTUPINFO) class TestSECURITY_ATTRIBUTES(TestCase): def test_attr_nLength(self): sa = SECURITY_...
true
true
f73ff26f8a8b6f3bf4f3b427db991101e63acfe5
11,401
py
Python
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
7
2020-04-26T09:54:05.000Z
2021-07-22T16:54:41.000Z
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
120
2018-03-27T19:14:40.000Z
2020-12-10T23:53:35.000Z
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_flow_log.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
13
2020-06-30T16:23:36.000Z
2022-03-29T17:12:05.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
46.534694
117
0.579598
from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer) class NWFlowLogScenarioTest(ScenarioTest): @ResourceGroupPreparer(name_prefix='test_nw_flow_log_', location='eastus') @StorageAccountPreparer(name_prefix='testflowlog', location='eastus', kind='StorageV2') de...
true
true
f73ff2787731a32e5506a888d61765f67fa0936b
116
py
Python
webserial/__init__.py
buckley-w-david/webserial
fe8a47251fe422dd58a150ca991e015033eb2114
[ "MIT" ]
null
null
null
webserial/__init__.py
buckley-w-david/webserial
fe8a47251fe422dd58a150ca991e015033eb2114
[ "MIT" ]
1
2021-11-17T18:43:35.000Z
2021-11-18T03:48:31.000Z
webserial/__init__.py
buckley-w-david/webserial
fe8a47251fe422dd58a150ca991e015033eb2114
[ "MIT" ]
null
null
null
from webserial.calibredb import CalibreDb from webserial.fff import FanFicFare from webserial.update import perform
29
41
0.87069
from webserial.calibredb import CalibreDb from webserial.fff import FanFicFare from webserial.update import perform
true
true
f73ff2d3d35fa47f49ca4dcc3367b37a5566239f
17,825
py
Python
dd_widgets/widgets.py
fantes/dd_widgets
bd922195157366783636fa298b89ee4a19eaf167
[ "Apache-2.0" ]
null
null
null
dd_widgets/widgets.py
fantes/dd_widgets
bd922195157366783636fa298b89ee4a19eaf167
[ "Apache-2.0" ]
null
null
null
dd_widgets/widgets.py
fantes/dd_widgets
bd922195157366783636fa298b89ee4a19eaf167
[ "Apache-2.0" ]
null
null
null
# fmt: off import json import logging import threading import time from collections import OrderedDict from datetime import timedelta from enum import Enum from inspect import signature from pathlib import Path from typing import Any, Dict, get_type_hints import requests from ipywidgets import (HTML, Button, Checkbox...
32.826888
80
0.4731
import json import logging import threading import time from collections import OrderedDict from datetime import timedelta from enum import Enum from inspect import signature from pathlib import Path from typing import Any, Dict, get_type_hints import requests from ipywidgets import (HTML, Button, Checkbox, Dropdown...
true
true
f73ff47ae17ad9f89f6d6b31d52f5c7003ddb8dd
2,528
py
Python
examples/pretraining/swav/src/logger.py
caglasozen/wilds
db2ff095304891244962509459ee48e2fc5fd5e6
[ "MIT" ]
29
2021-04-06T19:07:05.000Z
2022-03-31T03:26:17.000Z
examples/pretraining/swav/src/logger.py
caglasozen/wilds
db2ff095304891244962509459ee48e2fc5fd5e6
[ "MIT" ]
6
2021-06-27T01:12:13.000Z
2022-03-31T07:48:06.000Z
examples/pretraining/swav/src/logger.py
caglasozen/wilds
db2ff095304891244962509459ee48e2fc5fd5e6
[ "MIT" ]
6
2021-04-07T11:17:39.000Z
2022-02-21T11:59:04.000Z
# Copyright (c) Facebook, 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. # import os import logging import time from datetime import timedelta import pandas as pd class LogFormatter: def __i...
26.610526
71
0.634889
import os import logging import time from datetime import timedelta import pandas as pd class LogFormatter: def __init__(self): self.start_time = time.time() def format(self, record): elapsed_seconds = round(record.created - self.start_time) prefix = "%s - %s - %s" % ( ...
true
true
f73ff4a43d2b7c5506291f242eb2e8ca689cf7ee
17,097
py
Python
pyFAI/opencl/OCLFullSplit.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
pyFAI/opencl/OCLFullSplit.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
pyFAI/opencl/OCLFullSplit.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Project: Azimuthal integration # https://github.com/silx-kit/pyFAI # # # Copyright (C) 2014-2018 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # Giannis Ashiotis # ...
47.491667
223
0.568345
__authors__ = ["Jérôme Kieffer", "Giannis Ashiotis"] __license__ = "MIT" __date__ = "18/02/2020" __copyright__ = "2014, ESRF, Grenoble" __contact__ = "jerome.kieffer@esrf.fr" import os import logging import threading import numpy from . import ocl, pyopencl from ..ext.splitBBoxLUT import ...
true
true
f73ff4ac2c403ff353679ca934b8ea0af3897b90
14,516
py
Python
image/patroni_openGauss/patroni/validator.py
lsqtzj/openGauss_master_slave
1aac5856b45b51be8221f9532fb5d93281f5efb1
[ "Apache-2.0" ]
1
2022-03-13T03:52:22.000Z
2022-03-13T03:52:22.000Z
image/patroni_openGauss/patroni/validator.py
lsqtzj/openGauss_master_slave
1aac5856b45b51be8221f9532fb5d93281f5efb1
[ "Apache-2.0" ]
null
null
null
image/patroni_openGauss/patroni/validator.py
lsqtzj/openGauss_master_slave
1aac5856b45b51be8221f9532fb5d93281f5efb1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import socket import re import subprocess from six import string_types from .utils import find_executable, split_host_port, data_directory_is_empty from .dcs import dcs_modules from .exceptions import ConfigParseError def data_directory_empty(data_dir): if os.path.isfile(os.path...
36.84264
115
0.580325
import os import socket import re import subprocess from six import string_types from .utils import find_executable, split_host_port, data_directory_is_empty from .dcs import dcs_modules from .exceptions import ConfigParseError def data_directory_empty(data_dir): if os.path.isfile(os.path.join(data_dir, "globa...
true
true
f73ff51dd7dacc1e5b971de43a6c1c62a50bd3a7
3,395
py
Python
pypeit/tests/test_save.py
seib2/PypeIt
18ce33aa8aa12b8ee51303ad87a723ec81e0e6f8
[ "BSD-3-Clause" ]
1
2018-12-18T21:56:23.000Z
2018-12-18T21:56:23.000Z
pypeit/tests/test_save.py
feigewang/PypeIt
4c68b38cb907345a480d7afee58200a05ecd4556
[ "BSD-3-Clause" ]
null
null
null
pypeit/tests/test_save.py
feigewang/PypeIt
4c68b38cb907345a480d7afee58200a05ecd4556
[ "BSD-3-Clause" ]
null
null
null
""" Module to run tests on arsave """ import os import numpy as np import pytest from astropy import units from astropy.io import fits from pypeit import specobjs from pypeit.core import save from pypeit.tests.tstutils import dummy_fitstbl from pypeit.spectrographs import util def data_path(filename): data_dir...
32.333333
95
0.665979
import os import numpy as np import pytest from astropy import units from astropy.io import fits from pypeit import specobjs from pypeit.core import save from pypeit.tests.tstutils import dummy_fitstbl from pypeit.spectrographs import util def data_path(filename): data_dir = os.path.join(os.path.dirname(__file...
true
true
f73ff6eb46ad65a0fd6f88ca048553ba35e04028
14,053
py
Python
perfkitbenchmarker/configs/benchmark_config_spec.py
dq922/CloudControlVM
fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/configs/benchmark_config_spec.py
dq922/CloudControlVM
fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/configs/benchmark_config_spec.py
dq922/CloudControlVM
fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
41.824405
80
0.704334
import copy import os from perfkitbenchmarker import disk from perfkitbenchmarker import errors from perfkitbenchmarker import flag_util from perfkitbenchmarker import flags from perfkitbenchmarker import os_types from perfkitbenchmarker import providers from perfkitbenchmarker import static_virtual_mach...
true
true
f73ff7e9a1283b6c04157532fd080355889c48f0
22,438
py
Python
polish/ppo/ppo_model_fn.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
polish/ppo/ppo_model_fn.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
polish/ppo/ppo_model_fn.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
39.090592
80
0.687405
from absl import logging import gin import numpy as np import tensorflow.compat.v1 as tf from polish.ppo import ppo_loss from polish.utils import distributions from polish.utils import host_call_fn from polish.utils import tf_layers from tensorflow.contrib import tpu as contrib_tpu logging.set_verbosity...
true
true
f73ff8472fe7eb13908cf75c8c7d595633e10378
8,176
py
Python
venv/bin/pdf2txt.py
ff888/Ski-Jumping-Database-Project
b36d7906295934ad910d23d7c10d4cafff2bda70
[ "MIT" ]
2
2021-11-28T12:47:01.000Z
2021-12-04T16:58:16.000Z
venv/bin/pdf2txt.py
ff888/Ski-Jumping-Database-Project
b36d7906295934ad910d23d7c10d4cafff2bda70
[ "MIT" ]
2
2021-12-04T12:51:07.000Z
2021-12-04T16:49:18.000Z
venv/bin/pdf2txt.py
ff888/Ski-Jumping-Database-Project
b36d7906295934ad910d23d7c10d4cafff2bda70
[ "MIT" ]
null
null
null
#!/Users/pik/PycharmProjects/pythonProject/Ski_Jumping_Data_Base_Project/venv/bin/python """A command line tool for extracting text and images from PDF and output it to plain text, html, xml or tags.""" import argparse import logging import sys import pdfminer.high_level import pdfminer.layout logging.basicConfig() ...
41.714286
88
0.612769
import argparse import logging import sys import pdfminer.high_level import pdfminer.layout logging.basicConfig() OUTPUT_TYPES = ((".htm", "html"), (".html", "html"), (".xml", "xml"), (".tag", "tag")) def extract_text(files=[], outfile='-', no_lapar...
true
true
f73ff84c63d2ef501300fdc6457bbd79cbc1e5fd
445
py
Python
test_simple_ac.py
chappers/lightning-rl
3c4ec35db983f256fc1ee82c9cab8ed8725bc58b
[ "MIT" ]
null
null
null
test_simple_ac.py
chappers/lightning-rl
3c4ec35db983f256fc1ee82c9cab8ed8725bc58b
[ "MIT" ]
null
null
null
test_simple_ac.py
chappers/lightning-rl
3c4ec35db983f256fc1ee82c9cab8ed8725bc58b
[ "MIT" ]
null
null
null
""" because tests are good? """ import pytorch_lightning as pl from pytorch_lightning import Trainer from pytorch_lightning.callbacks import ModelCheckpoint from simple_ac import SimpleActorCritic import gym import pandas as pd env = gym.make("CartPole-v0") # from env_catch import CatchEnv # env = CatchEnv({"simpli...
19.347826
55
0.786517
import pytorch_lightning as pl from pytorch_lightning import Trainer from pytorch_lightning.callbacks import ModelCheckpoint from simple_ac import SimpleActorCritic import gym import pandas as pd env = gym.make("CartPole-v0") model = SimpleActorCritic(env) trainer = Trainer(max_epochs=1000) trainer.fit(model) p...
true
true
f73ff860eef593279c6f7e57579b7d48fc63696b
8,302
py
Python
tests/unit/test_main.py
hyamasak/side-runner-py
994ef9d9ec488ec04f12434c5cce33b4f08807ca
[ "MIT" ]
5
2020-02-13T00:24:41.000Z
2022-01-10T10:11:00.000Z
tests/unit/test_main.py
hyamasak/side-runner-py
994ef9d9ec488ec04f12434c5cce33b4f08807ca
[ "MIT" ]
58
2019-04-02T02:51:02.000Z
2021-01-14T08:42:19.000Z
tests/unit/test_main.py
hyamasak/side-runner-py
994ef9d9ec488ec04f12434c5cce33b4f08807ca
[ "MIT" ]
7
2019-04-02T11:42:24.000Z
2020-11-10T20:17:56.000Z
import json from unittest import mock import pytest import os from side_runner_py import main, config def test_get_side_file_list_by_glob(): assert list(main._get_side_file_list_by_glob('')) == [] def test_get_side_fixed_file_list_by_glob(tmp_path): sidefile = tmp_path / "a.json" sidefile.write_text("[]...
40.696078
107
0.669839
import json from unittest import mock import pytest import os from side_runner_py import main, config def test_get_side_file_list_by_glob(): assert list(main._get_side_file_list_by_glob('')) == [] def test_get_side_fixed_file_list_by_glob(tmp_path): sidefile = tmp_path / "a.json" sidefile.write_text("[]...
true
true
f73ffba1eb9116331834b1a2044b233651f9a22b
561
py
Python
api/vaf_Api/migrations/0015_auto_20170118_1227.py
SimonHerrera/vintage-american-football-api
56eed77acc93cce980f1dcbb3f01192f60c5c9b4
[ "MIT" ]
null
null
null
api/vaf_Api/migrations/0015_auto_20170118_1227.py
SimonHerrera/vintage-american-football-api
56eed77acc93cce980f1dcbb3f01192f60c5c9b4
[ "MIT" ]
null
null
null
api/vaf_Api/migrations/0015_auto_20170118_1227.py
SimonHerrera/vintage-american-football-api
56eed77acc93cce980f1dcbb3f01192f60c5c9b4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-01-18 18:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vaf_Api', '0014_auto_20170118_0335'), ] operations = [ migrations.RemoveField...
22.44
63
0.588235
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vaf_Api', '0014_auto_20170118_0335'), ] operations = [ migrations.RemoveField( model_name='team', name='manager', ...
true
true
f73ffc47a3696214056f41d2bfe7a4bed3b83b03
1,018
py
Python
my_gallery/views.py
Abdihakim-Muhumed/gallery
bfdb58466503bedda6ac4b686afb42b69c055f0c
[ "Unlicense" ]
null
null
null
my_gallery/views.py
Abdihakim-Muhumed/gallery
bfdb58466503bedda6ac4b686afb42b69c055f0c
[ "Unlicense" ]
null
null
null
my_gallery/views.py
Abdihakim-Muhumed/gallery
bfdb58466503bedda6ac4b686afb42b69c055f0c
[ "Unlicense" ]
null
null
null
from django.shortcuts import render from .models import Photos,Category,Location from django.http import HttpResponse, Http404 # Create your views here. def home(request): photos = Photos.objects.all() return render(request,'index.html',{"photos":photos}) def search_photo(request): if 'category' in reques...
33.933333
114
0.685658
from django.shortcuts import render from .models import Photos,Category,Location from django.http import HttpResponse, Http404 def home(request): photos = Photos.objects.all() return render(request,'index.html',{"photos":photos}) def search_photo(request): if 'category' in request.GET and request.GET["ca...
true
true
f73ffc63137040b0104f992412b17391b0c66506
3,478
py
Python
nettoolkit/jset.py
aliasgar1978/nettoolkit
77a02a7b51bc0a213688296eab14c2869948dde5
[ "MIT" ]
null
null
null
nettoolkit/jset.py
aliasgar1978/nettoolkit
77a02a7b51bc0a213688296eab14c2869948dde5
[ "MIT" ]
1
2021-03-20T13:45:33.000Z
2021-03-20T13:45:33.000Z
nettoolkit/jset.py
aliasgar1978/nettoolkit
77a02a7b51bc0a213688296eab14c2869948dde5
[ "MIT" ]
null
null
null
# ----------------------------------------------------------------------------- # IMPORTS # ----------------------------------------------------------------------------- from .gpl import Default, STR, Container # ---------------------------------------------------------------------------- # # J-Set # ----------------...
31.618182
86
0.551754
from .gpl import Default, STR, Container class JSet(Default, STR, Container): def __init__(self, input_file=None, input_list=None): self.output = [] self.err = False if input_file or input_list: self.set_input(input_file, input_list) @property def objVar(self): return self.output def set_input(self,...
true
true
f73ffd60909764b0260a7c2c4f303c959abd4ce4
1,412
py
Python
model.py
lordhelmut/conversnitch
2e16763669c62fa5757a3e48cbe1bb59cd742987
[ "MIT" ]
18
2015-01-01T13:06:08.000Z
2021-08-05T19:30:41.000Z
model.py
lordhelmut/conversnitch
2e16763669c62fa5757a3e48cbe1bb59cd742987
[ "MIT" ]
null
null
null
model.py
lordhelmut/conversnitch
2e16763669c62fa5757a3e48cbe1bb59cd742987
[ "MIT" ]
4
2015-06-09T03:13:45.000Z
2016-08-05T17:07:34.000Z
#!/usr/bin/env python3 import sqlite3, json, time, sys, os from housepy import config, log, util def db_call(f): def wrapper(*args): connection = sqlite3.connect(os.path.abspath(os.path.join(os.path.dirname(__file__), "data.db"))) connection.row_factory = sqlite3.Row db = connection.cursor...
27.686275
105
0.614023
import sqlite3, json, time, sys, os from housepy import config, log, util def db_call(f): def wrapper(*args): connection = sqlite3.connect(os.path.abspath(os.path.join(os.path.dirname(__file__), "data.db"))) connection.row_factory = sqlite3.Row db = connection.cursor() results = f...
true
true
f73ffdba704c49d05314ad63c1453c720fb78934
1,463
py
Python
augenkrebs/GlobalPlayer/thread.py
shackspace/augenkrebs
ee7c22ff4ac372f4a57ccfe3160d44abb0396f27
[ "MIT" ]
3
2017-10-24T20:54:24.000Z
2020-01-21T11:53:01.000Z
augenkrebs/GlobalPlayer/thread.py
shackspace/augenkrebs
ee7c22ff4ac372f4a57ccfe3160d44abb0396f27
[ "MIT" ]
7
2015-10-24T15:21:19.000Z
2019-08-30T13:32:36.000Z
augenkrebs/GlobalPlayer/thread.py
shackspace/augenkrebs
ee7c22ff4ac372f4a57ccfe3160d44abb0396f27
[ "MIT" ]
1
2019-08-30T12:58:25.000Z
2019-08-30T12:58:25.000Z
import queue import threading from GlobalPlayer.player import Player """ the thread module provides: * the global_queue for communication with any GlobalThread object here, dictionaries with at least an 'action' and a 'response' field * the GlobalThread class for reacting to user input via the Flask serve...
32.511111
79
0.67054
import queue import threading from GlobalPlayer.player import Player global_queue = queue.Queue() def callme(*args): global_queue.put({'action': 'stream'}) class GlobalThread(threading.Thread): player = Player(callback=callme) def run(self): while True: task = global_queue.get() ...
true
true
f73fff4f5f5c41d18966b7112df0d57effdd1293
3,986
py
Python
tests/populate_test_content/populate_test_files.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
null
null
null
tests/populate_test_content/populate_test_files.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2019-12-16T17:06:44.000Z
2019-12-16T17:06:44.000Z
tests/populate_test_content/populate_test_files.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2020-06-15T18:29:18.000Z
2020-06-15T18:29:18.000Z
import sys import shutil from pathlib import Path from ruamel.yaml import safe_load, dump from tests.test_base import TestBase from capanno_utils.content_maps import make_tools_index from capanno_utils.helpers.get_paths import get_tool_version_dir, get_root_tools_dir, get_tool_common_dir, get_script_version_dir, get_r...
35.274336
151
0.752132
import sys import shutil from pathlib import Path from ruamel.yaml import safe_load, dump from tests.test_base import TestBase from capanno_utils.content_maps import make_tools_index from capanno_utils.helpers.get_paths import get_tool_version_dir, get_root_tools_dir, get_tool_common_dir, get_script_version_dir, get_r...
true
true
f73ffff83dac52080632e1680d626d7fb71ee280
32,806
py
Python
rasa/model_training.py
shubham-pemari/test_clai_rasa
3b635c0bb31ccfda3d8cf637344d3f79cef5be29
[ "Apache-2.0" ]
null
null
null
rasa/model_training.py
shubham-pemari/test_clai_rasa
3b635c0bb31ccfda3d8cf637344d3f79cef5be29
[ "Apache-2.0" ]
null
null
null
rasa/model_training.py
shubham-pemari/test_clai_rasa
3b635c0bb31ccfda3d8cf637344d3f79cef5be29
[ "Apache-2.0" ]
null
null
null
import os import tempfile from contextlib import ExitStack from typing import ( Text, NamedTuple, Tuple, Optional, List, Union, Dict, ) import typing from typing import Any, Callable, Dict, List, Optional, Text, Union import rasa.core.interpreter from rasa.shared.nlu.interpreter import Natur...
38.146512
94
0.656618
import os import tempfile from contextlib import ExitStack from typing import ( Text, NamedTuple, Tuple, Optional, List, Union, Dict, ) import typing from typing import Any, Callable, Dict, List, Optional, Text, Union import rasa.core.interpreter from rasa.shared.nlu.interpreter import Natur...
true
true
f74000964ec7e2ee8236d124b15c9446c3fbc4c0
531
py
Python
openfasoc/generators/temp-sense-gen/tools/parse_rpt.py
Elon-J/OpenFASOC
f59127eb72ef715f60d4ad7031c098c8ac9ae08e
[ "Apache-2.0" ]
1
2021-12-23T18:48:14.000Z
2021-12-23T18:48:14.000Z
openfasoc/generators/temp-sense-gen/tools/parse_rpt.py
Elon-J/OpenFASOC
f59127eb72ef715f60d4ad7031c098c8ac9ae08e
[ "Apache-2.0" ]
null
null
null
openfasoc/generators/temp-sense-gen/tools/parse_rpt.py
Elon-J/OpenFASOC
f59127eb72ef715f60d4ad7031c098c8ac9ae08e
[ "Apache-2.0" ]
null
null
null
drc_filename = "flow/reports/sky130hd/tempsense/6_final_drc.rpt" num_lines = sum(1 for line in open(drc_filename)) if num_lines > 3: raise ValueError("DRC failed!") else: print("DRC is clean!") # LVS Bypassed # lvs_filename = "flow/reports/sky130hd/tempsense/6_final_lvs.rpt" # lvs_line = subprocess.check_ou...
24.136364
94
0.704331
drc_filename = "flow/reports/sky130hd/tempsense/6_final_drc.rpt" num_lines = sum(1 for line in open(drc_filename)) if num_lines > 3: raise ValueError("DRC failed!") else: print("DRC is clean!")
true
true
f74003a6393e04a2e42e8a4d0cd0db84280ade08
3,698
py
Python
backend_code.py
gskdhiman/zomato-recommendation
76d050d654f5ae4db4801eadb065db324baacf5e
[ "Apache-2.0" ]
null
null
null
backend_code.py
gskdhiman/zomato-recommendation
76d050d654f5ae4db4801eadb065db324baacf5e
[ "Apache-2.0" ]
null
null
null
backend_code.py
gskdhiman/zomato-recommendation
76d050d654f5ae4db4801eadb065db324baacf5e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Oct 2 00:14:39 2020 @author: Gursewak """ import pandas as pd import re import string from nltk.corpus import stopwords from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.neighbors import NearestNeighbors from datetime import datetime data_path = 'data...
33.618182
100
0.63656
import pandas as pd import re import string from nltk.corpus import stopwords from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.neighbors import NearestNeighbors from datetime import datetime data_path = 'data.csv' df = pd.read_csv(data_path) N = 3 cost_for_two = 'approx_cost(for two people)...
true
true
f740069c92b8af659e569aa7e3090f95dc6f682d
12,251
py
Python
tests/BlazingSQLTest/EndToEndTests/bindableAliasTest.py
drabastomek/blazingsql
68414712019f19c4e967466fbf4ce7d54fdd4068
[ "Apache-2.0" ]
null
null
null
tests/BlazingSQLTest/EndToEndTests/bindableAliasTest.py
drabastomek/blazingsql
68414712019f19c4e967466fbf4ce7d54fdd4068
[ "Apache-2.0" ]
null
null
null
tests/BlazingSQLTest/EndToEndTests/bindableAliasTest.py
drabastomek/blazingsql
68414712019f19c4e967466fbf4ce7d54fdd4068
[ "Apache-2.0" ]
null
null
null
from blazingsql import DataType from Configuration import ExecutionMode from Configuration import Settings as Settings from DataBase import createSchema as cs from pynvml import nvmlInit from Runner import runTest from Utils import Execution, gpuMemory, init_context, skip_test def main(dask_client, drill, spark, dir_...
31.252551
95
0.427067
from blazingsql import DataType from Configuration import ExecutionMode from Configuration import Settings as Settings from DataBase import createSchema as cs from pynvml import nvmlInit from Runner import runTest from Utils import Execution, gpuMemory, init_context, skip_test def main(dask_client, drill, spark, dir_...
true
true
f74006d502e580ed0509bedba79b6d041ce99874
12,154
py
Python
steg/steg_img.py
beatsbears/steg
ae2ecccc7f90984f317671df3f7f5f87c4dd6dd4
[ "MIT" ]
31
2018-09-01T19:05:28.000Z
2021-03-16T10:17:22.000Z
steg/steg_img.py
beatsbears/steg
ae2ecccc7f90984f317671df3f7f5f87c4dd6dd4
[ "MIT" ]
5
2020-10-29T21:32:04.000Z
2021-09-08T00:02:26.000Z
steg/steg_img.py
beatsbears/steg
ae2ecccc7f90984f317671df3f7f5f87c4dd6dd4
[ "MIT" ]
18
2018-09-07T15:03:30.000Z
2021-02-27T22:55:38.000Z
""" steg - steg_img.py :author: Andrew Scott :date: 6-25-2018 """ import logging from PIL import Image as img from steg import common class IMG: """ Class for hiding binary data within select lossless image formats. Supported image formats: PNG, TIFF, BMP :param payload_path: The path of the payloa...
39.589577
100
0.570841
import logging from PIL import Image as img from steg import common class IMG: def __init__(self, payload_path=None, image_path=None): self.payload_to_hide = payload_path self.carrier_image = image_path self.file_type = None self.fg = None self.image_type = None ...
true
true
f74007067dc469deeaa4fb59816780554dd70870
4,360
py
Python
pysnmp/CISCO-DS0BUNDLE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-DS0BUNDLE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-DS0BUNDLE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-DS0BUNDLE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DS0BUNDLE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:38:42 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default...
103.809524
517
0.765826
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuild...
true
true
f74007e5a8acb228998aaa0209c5058b756b443e
3,569
py
Python
ceres/consensus/all_coins_default_constants/chinilla_default_constants.py
yjiangnan/ceres-combineharvester
ed32d5e2564cd0082fa5bf5733e707f06abc2045
[ "Apache-2.0" ]
null
null
null
ceres/consensus/all_coins_default_constants/chinilla_default_constants.py
yjiangnan/ceres-combineharvester
ed32d5e2564cd0082fa5bf5733e707f06abc2045
[ "Apache-2.0" ]
null
null
null
ceres/consensus/all_coins_default_constants/chinilla_default_constants.py
yjiangnan/ceres-combineharvester
ed32d5e2564cd0082fa5bf5733e707f06abc2045
[ "Apache-2.0" ]
null
null
null
from ceres.util.ints import uint64 from ceres.consensus.constants import ConsensusConstants testnet_kwargs = { "SLOT_BLOCKS_TARGET": 32, "MIN_BLOCKS_PER_CHALLENGE_BLOCK": 16, # Must be less than half of SLOT_BLOCKS_TARGET "MAX_SUB_SLOT_BLOCKS": 128, # Must be less than half of SUB_EPOCH_BLOCKS "NUM_...
58.508197
119
0.743906
from ceres.util.ints import uint64 from ceres.consensus.constants import ConsensusConstants testnet_kwargs = { "SLOT_BLOCKS_TARGET": 32, "MIN_BLOCKS_PER_CHALLENGE_BLOCK": 16, "MAX_SUB_SLOT_BLOCKS": 128, "NUM_SPS_SUB_SLOT": 64, "SUB_SLOT_ITERS_STARTING": 2 ** 27, "DIFFICULTY_CON...
true
true
f74009464150669076bad768272b9d5c7b6fb7d6
55
py
Python
main.py
eduardodsn/covid-19-tracker-brasil
d449b0e4908469d661cf8a16934738f1b1200c04
[ "MIT" ]
null
null
null
main.py
eduardodsn/covid-19-tracker-brasil
d449b0e4908469d661cf8a16934738f1b1200c04
[ "MIT" ]
null
null
null
main.py
eduardodsn/covid-19-tracker-brasil
d449b0e4908469d661cf8a16934738f1b1200c04
[ "MIT" ]
null
null
null
from board import create_dashboard create_dashboard()
13.75
34
0.854545
from board import create_dashboard create_dashboard()
true
true
f740095cf3c869b3c95d7ea3b7bcee99c7537618
1,896
py
Python
migrations/versions/ff2aeab22c7b_users_and_pitch_changes.py
Julzpeter/Pitches
2a0df782c4d9570ff85e993ae4d844b707f9f758
[ "MIT" ]
null
null
null
migrations/versions/ff2aeab22c7b_users_and_pitch_changes.py
Julzpeter/Pitches
2a0df782c4d9570ff85e993ae4d844b707f9f758
[ "MIT" ]
6
2021-02-08T20:33:56.000Z
2022-03-11T23:51:26.000Z
migrations/versions/ff2aeab22c7b_users_and_pitch_changes.py
Julzpeter/Pitches
2a0df782c4d9570ff85e993ae4d844b707f9f758
[ "MIT" ]
null
null
null
"""Users and pitch changes Revision ID: ff2aeab22c7b Revises: 36d7e307135b Create Date: 2019-07-01 07:38:51.291891 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'ff2aeab22c7b' down_revision = '36d7e307135b' branch_lab...
40.340426
106
0.707806
from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = 'ff2aeab22c7b' down_revision = '36d7e307135b' branch_labels = None depends_on = None def upgrade(): ue)) op.create_index(op.f('ix_pitches_posted_at'), 'pitches', ['posted_at'], unique=False) op.drop_colu...
true
true
f74009d80da7855e34526a356ee15488df3b7ebe
205
py
Python
2015/2015_04b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2015/2015_04b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2015/2015_04b.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
import hashlib input = """yzbqklnj""" def success(number): return hashlib.md5((input + str(number)).encode('utf-8')).hexdigest().startswith("000000") i = 0 while not success(i): i += 1 print(i)
17.083333
94
0.64878
import hashlib input = """yzbqklnj""" def success(number): return hashlib.md5((input + str(number)).encode('utf-8')).hexdigest().startswith("000000") i = 0 while not success(i): i += 1 print(i)
true
true
f74009feb27631c2594795b664e0e8ffb25f40fe
2,586
py
Python
tests/test_lazy_loader.py
stefanv/lazy_loader
ab3d7df42f31b7f918ffdac6bdf2961b325005ee
[ "BSD-3-Clause" ]
4
2022-02-25T20:12:48.000Z
2022-02-28T12:32:20.000Z
tests/test_lazy_loader.py
stefanv/lazy_loader
ab3d7df42f31b7f918ffdac6bdf2961b325005ee
[ "BSD-3-Clause" ]
1
2022-02-25T21:26:13.000Z
2022-03-01T19:58:33.000Z
tests/test_lazy_loader.py
stefanv/lazy_loader
ab3d7df42f31b7f918ffdac6bdf2961b325005ee
[ "BSD-3-Clause" ]
null
null
null
import sys import types import pytest import lazy_loader as lazy def test_lazy_import_basics(): math = lazy.load("math") anything_not_real = lazy.load("anything_not_real") # Now test that accessing attributes does what it should assert math.sin(math.pi) == pytest.approx(0, 1e-6) # poor-mans pyt...
26.659794
75
0.633797
import sys import types import pytest import lazy_loader as lazy def test_lazy_import_basics(): math = lazy.load("math") anything_not_real = lazy.load("anything_not_real") assert math.sin(math.pi) == pytest.approx(0, 1e-6) try: anything_not_real.pi assert False excep...
true
true
f7400adf892122fd2223c2923b4f08817348587d
811
py
Python
website/backend/gsoc_data_analyser/urls.py
dojutsu-user/GSoC-Data-Analyser
51e1a4beffa4bb489562be07172ed55463a8f62f
[ "MIT" ]
29
2018-12-03T18:21:00.000Z
2021-02-26T16:36:52.000Z
website/backend/gsoc_data_analyser/urls.py
dojutsu-user/GSoC-Data-Analyser
51e1a4beffa4bb489562be07172ed55463a8f62f
[ "MIT" ]
null
null
null
website/backend/gsoc_data_analyser/urls.py
dojutsu-user/GSoC-Data-Analyser
51e1a4beffa4bb489562be07172ed55463a8f62f
[ "MIT" ]
5
2018-12-18T17:52:55.000Z
2020-11-04T13:25:10.000Z
"""gsoc_data_analyser URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') ...
35.26087
77
0.705302
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api/v1/', include('api.urls')), ]
true
true
f7400ae29ee806bd0ebd74dcca94052f5b05b44b
584
py
Python
graph/hist_bin.py
Weilory/python-matplotlib-graphs
4578c184daba587417becc6df1ad4566e881343a
[ "MIT" ]
2
2020-09-28T16:55:55.000Z
2020-09-29T14:15:48.000Z
graph/hist_bin.py
scary-monster/python-matplotlib-graphs
4578c184daba587417becc6df1ad4566e881343a
[ "MIT" ]
null
null
null
graph/hist_bin.py
scary-monster/python-matplotlib-graphs
4578c184daba587417becc6df1ad4566e881343a
[ "MIT" ]
2
2020-09-28T16:56:08.000Z
2020-09-29T14:15:47.000Z
import pandas as pd from matplotlib import pyplot as plt plt.style.use("fivethirtyeight") path = input("please input the age.csv file path here: ") data = pd.read_csv(path) ids = data["Responder_id"] ages = data["Age"] bins = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] plt.hist(ages, bins=bins, edgecolor=...
21.62963
68
0.674658
import pandas as pd from matplotlib import pyplot as plt plt.style.use("fivethirtyeight") path = input("please input the age.csv file path here: ") data = pd.read_csv(path) ids = data["Responder_id"] ages = data["Age"] bins = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] plt.hist(ages, bins=bins, edgecolor=...
true
true
f7400be938e198d6ed5a9986de8d6c22e81f5ebe
475
py
Python
src/28-dash-state.py
paiboon15721/clusterkit-dash-training
66012eafc8737f1fdf1e26ada17c2927c3a03922
[ "MIT" ]
2
2019-11-26T06:38:26.000Z
2021-05-31T06:28:39.000Z
src/28-dash-state.py
paiboon15721/clusterkit-dash-training
66012eafc8737f1fdf1e26ada17c2927c3a03922
[ "MIT" ]
12
2020-02-12T02:55:00.000Z
2022-02-10T08:51:26.000Z
src/28-dash-state.py
paiboon15721/clusterkit-dash-training
66012eafc8737f1fdf1e26ada17c2927c3a03922
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output app = dash.Dash() app.layout = html.Div([ dcc.Input( id='number-in', value=1, style={'fontSize': 28} ), html.H1(id='number-out') ]) @app.callback( Ou...
17.592593
43
0.637895
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output app = dash.Dash() app.layout = html.Div([ dcc.Input( id='number-in', value=1, style={'fontSize': 28} ), html.H1(id='number-out') ]) @app.callback( Ou...
true
true
f7400befd8ea0ae8bcc435ad9d985f830164c49c
416
py
Python
atividades/31.py
quitaiskiluisf/TI4F-2021-LogicaProgramacao
d12e5c389a43c98f27726df5618fe529183329a8
[ "Unlicense" ]
null
null
null
atividades/31.py
quitaiskiluisf/TI4F-2021-LogicaProgramacao
d12e5c389a43c98f27726df5618fe529183329a8
[ "Unlicense" ]
null
null
null
atividades/31.py
quitaiskiluisf/TI4F-2021-LogicaProgramacao
d12e5c389a43c98f27726df5618fe529183329a8
[ "Unlicense" ]
null
null
null
import math # Apresentação print('Programa para calcular a temperatura') print('com base na resistência apresentada por um termistor') print('do tipo NTC.') print() # Entradas resistencia = float(input('Informe a resistência apresentada pelo termistor: ')) # Processamento resultado = 1 / (298.15 ** -1 + (3950 ** -1)...
24.470588
88
0.711538
import math print('Programa para calcular a temperatura') print('com base na resistência apresentada por um termistor') print('do tipo NTC.') print() resistencia = float(input('Informe a resistência apresentada pelo termistor: ')) resultado = 1 / (298.15 ** -1 + (3950 ** -1) * math.log10(resistencia / 10000)) - 2...
true
true
f7400c18798d2cfc2eede7125c62977444a11a27
280
py
Python
Playground3/src/playground/network/packet/fieldtypes/StringFieldType.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
3
2018-10-25T16:03:53.000Z
2019-06-13T15:24:41.000Z
Playground3/src/playground/network/packet/fieldtypes/StringFieldType.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
null
null
null
Playground3/src/playground/network/packet/fieldtypes/StringFieldType.py
kandarpck/networksecurity2018
dafe2ee8d39bd9596b1ce3fbc8b50ca645bcd626
[ "MIT" ]
null
null
null
from .PacketFieldType import PacketFieldType class StringFieldType(PacketFieldType): def _setTypedData(self, data): try: self._data = str(data) except Exception as e: raise ValueError("{} is not a string".format(data))
28
63
0.617857
from .PacketFieldType import PacketFieldType class StringFieldType(PacketFieldType): def _setTypedData(self, data): try: self._data = str(data) except Exception as e: raise ValueError("{} is not a string".format(data))
true
true
f7400d6b27c6ad4a0c5d94224495d8cb58f1aa23
11,286
py
Python
spml/trainer/vae_gan.py
hellomoto-ai/splatoon2-ml
4bd24eed527d6b56ce4369b70d24f20058962383
[ "MIT" ]
null
null
null
spml/trainer/vae_gan.py
hellomoto-ai/splatoon2-ml
4bd24eed527d6b56ce4369b70d24f20058962383
[ "MIT" ]
6
2019-04-16T06:55:57.000Z
2019-05-08T02:52:41.000Z
spml/trainer/vae_gan.py
hellomoto-ai/splatoon2-ml
4bd24eed527d6b56ce4369b70d24f20058962383
[ "MIT" ]
1
2019-04-11T15:23:04.000Z
2019-04-11T15:23:04.000Z
"""Training mechanism for VAE-GAN""" import os import time import logging import numpy as np import torch import torch.nn.functional as F from spml import ( image_util, loss_utils, ) from . import ( misc_utils, saved_model_manager, ) _LG = logging.getLogger(__name__) def _save_images(images, src_pa...
33.891892
78
0.574872
import os import time import logging import numpy as np import torch import torch.nn.functional as F from spml import ( image_util, loss_utils, ) from . import ( misc_utils, saved_model_manager, ) _LG = logging.getLogger(__name__) def _save_images(images, src_path, step, output_dir): src_name =...
true
true
f7400e1096497689b384768a0a13026ba3e25250
2,060
py
Python
atomate/lammps/tests/test_drone.py
dongsenfo/atomate
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
[ "BSD-3-Clause-LBNL" ]
1
2019-09-02T00:55:26.000Z
2019-09-02T00:55:26.000Z
atomate/lammps/tests/test_drone.py
dongsenfo/atomate
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
[ "BSD-3-Clause-LBNL" ]
1
2019-04-09T20:55:30.000Z
2019-04-09T21:30:24.000Z
atomate/lammps/tests/test_drone.py
dongsenfo/atomate
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
[ "BSD-3-Clause-LBNL" ]
3
2018-09-01T00:08:51.000Z
2021-11-17T01:32:14.000Z
# coding: utf-8 from __future__ import division, print_function, unicode_literals, absolute_import import os import unittest # from pymatgen.io.lammps.sets import LammpsInputSet # from pymatgen.io.lammps.output import LammpsLog from atomate.utils.testing import AtomateTest from atomate.lammps.drones import LammpsDro...
39.615385
85
0.648058
from __future__ import division, print_function, unicode_literals, absolute_import import os import unittest from atomate.utils.testing import AtomateTest from atomate.lammps.drones import LammpsDrone __author__ = 'Kiran Mathew' __email__ = 'kmathew@lbl.gov' module_dir = os.path.join(os.path.dirname(os.path.abs...
true
true
f7400f07c276656276162919923c4b90a58dab01
188
py
Python
leie/setup.py
SolutionGuidance/cavetl
44739c1e80bbbd14bf9aa6c1c5b5b601590194de
[ "Apache-2.0" ]
1
2021-08-05T17:46:06.000Z
2021-08-05T17:46:06.000Z
leie/setup.py
SolutionGuidance/cavetl
44739c1e80bbbd14bf9aa6c1c5b5b601590194de
[ "Apache-2.0" ]
14
2018-06-21T19:15:54.000Z
2021-04-20T16:45:00.000Z
leie/setup.py
SolutionGuidance/cavetl
44739c1e80bbbd14bf9aa6c1c5b5b601590194de
[ "Apache-2.0" ]
2
2018-07-18T19:59:09.000Z
2020-09-28T06:11:53.000Z
from distutils.core import setup import os setup( name='leie', version='0.1dev', packages=['leie',], license='AGPLv3+', long_description=open("README.mdwn").read() )
15.666667
47
0.638298
from distutils.core import setup import os setup( name='leie', version='0.1dev', packages=['leie',], license='AGPLv3+', long_description=open("README.mdwn").read() )
true
true
f7400f4da9e378cbaf82704de60cb19ebf72329e
27,657
py
Python
lib/spack/spack/directives.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2021-04-03T07:23:12.000Z
2021-04-03T07:23:12.000Z
lib/spack/spack/directives.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
25
2021-02-08T14:39:48.000Z
2022-03-21T18:37:29.000Z
lib/spack/spack/directives.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
7
2018-09-13T18:04:56.000Z
2020-03-18T20:52:06.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) """This package contains directives that can be used within a package. Directives are functions that can be called inside...
37.782787
84
0.639006
import functools import os.path import re import sys from typing import List, Set import six import llnl.util.lang import llnl.util.tty.color import spack.error import spack.patch import spack.spec import spack.url import spack.variant from spack.dependency import Dependency, canonical_deptype, default_deptyp...
true
true
f7400f5dc881c090a070b7b2c2c2160548d59086
8,331
py
Python
analytical/utils.py
SilverStrings024/django-analytical
b4611da6d3162158f5bc7ef0f9b2f04024547308
[ "MIT" ]
null
null
null
analytical/utils.py
SilverStrings024/django-analytical
b4611da6d3162158f5bc7ef0f9b2f04024547308
[ "MIT" ]
null
null
null
analytical/utils.py
SilverStrings024/django-analytical
b4611da6d3162158f5bc7ef0f9b2f04024547308
[ "MIT" ]
null
null
null
""" Utility function for django-analytical. """ from copy import deepcopy from django.conf import settings from django.core.exceptions import ImproperlyConfigured HTML_COMMENT = "<!-- %(service)s disabled on internal IP " \ "address\n%(html)s\n-->" def get_required_setting(setting, value_re, invalid_m...
32.928854
95
0.60737
from copy import deepcopy from django.conf import settings from django.core.exceptions import ImproperlyConfigured HTML_COMMENT = "<!-- %(service)s disabled on internal IP " \ "address\n%(html)s\n-->" def get_required_setting(setting, value_re, invalid_msg): try: value = getattr(settings, ...
true
true
f740110ed41273d50cda3a619130373e8987e530
8,011
py
Python
docs/conf.py
jaimeoliver1/social_capital_in_trade_networks
b2d83735a9c67746c73c8c3fdd3bdc0e8d6f54f4
[ "MIT" ]
null
null
null
docs/conf.py
jaimeoliver1/social_capital_in_trade_networks
b2d83735a9c67746c73c8c3fdd3bdc0e8d6f54f4
[ "MIT" ]
null
null
null
docs/conf.py
jaimeoliver1/social_capital_in_trade_networks
b2d83735a9c67746c73c8c3fdd3bdc0e8d6f54f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # social_capital_in_trade_networks documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
32.697959
100
0.715267
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'social_capital_in_trade_networks' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. ...
true
true
f7401188328707ae3775b9becb556fc994ce1ecb
4,570
py
Python
biosapi/core/bios_database_reaction.py
Fxe/biosapi
f8ae593bcac6274b00faaa923b79dbf5ac7a303a
[ "MIT" ]
null
null
null
biosapi/core/bios_database_reaction.py
Fxe/biosapi
f8ae593bcac6274b00faaa923b79dbf5ac7a303a
[ "MIT" ]
null
null
null
biosapi/core/bios_database_reaction.py
Fxe/biosapi
f8ae593bcac6274b00faaa923b79dbf5ac7a303a
[ "MIT" ]
null
null
null
import math def is_number(n): try: float(n) except ValueError: return False return True def get_coefficient(i): coefficient = None if 'coefficient' in i: coefficient = i['coefficient'] elif 'stoichiometry' in i: coefficient = str(i['stoichiometry']) return c...
29.869281
79
0.52035
import math def is_number(n): try: float(n) except ValueError: return False return True def get_coefficient(i): coefficient = None if 'coefficient' in i: coefficient = i['coefficient'] elif 'stoichiometry' in i: coefficient = str(i['stoichiometry']) return c...
true
true
f74011ba1b011d8de526468aa0f1e2b8ddd5965e
7,314
py
Python
airflow/dags/GDELT_stream.py
vaxherra/DEND-Capstone
857ef9b0041bfd5fd8cdfb9aed247df797a52939
[ "MIT" ]
null
null
null
airflow/dags/GDELT_stream.py
vaxherra/DEND-Capstone
857ef9b0041bfd5fd8cdfb9aed247df797a52939
[ "MIT" ]
null
null
null
airflow/dags/GDELT_stream.py
vaxherra/DEND-Capstone
857ef9b0041bfd5fd8cdfb9aed247df797a52939
[ "MIT" ]
null
null
null
from airflow import DAG from operators.Src2S3 import GDELT2S3 from operators.stage2table import stage2table from operators.data_quality import DataQualityOperator from datetime import datetime, timedelta from airflow.operators.dummy_operator import DummyOperator from airflow.operators.bash_operator import BashOperato...
38.904255
161
0.698387
from airflow import DAG from operators.Src2S3 import GDELT2S3 from operators.stage2table import stage2table from operators.data_quality import DataQualityOperator from datetime import datetime, timedelta from airflow.operators.dummy_operator import DummyOperator from airflow.operators.bash_operator import BashOperato...
true
true
f74011bff22cf97e7d6a92540c11ef283dc04a70
5,443
py
Python
tester_web/user/scripts.py
Ma-Jun-a/TMW_backend
32e15d18ee826c8b4167041690b33c417076b0d7
[ "MIT" ]
null
null
null
tester_web/user/scripts.py
Ma-Jun-a/TMW_backend
32e15d18ee826c8b4167041690b33c417076b0d7
[ "MIT" ]
null
null
null
tester_web/user/scripts.py
Ma-Jun-a/TMW_backend
32e15d18ee826c8b4167041690b33c417076b0d7
[ "MIT" ]
null
null
null
from flask import Blueprint, request, make_response, jsonify from sqlalchemy import and_ from sqlalchemy.orm import query from tester_web.tables import db_session from tester_web.tables.user import User, Api, Script, ApiUser, UserScript scripts = Blueprint('scripts', __name__,url_prefix='/scripts') @scripts...
43.544
130
0.63917
from flask import Blueprint, request, make_response, jsonify from sqlalchemy import and_ from sqlalchemy.orm import query from tester_web.tables import db_session from tester_web.tables.user import User, Api, Script, ApiUser, UserScript scripts = Blueprint('scripts', __name__,url_prefix='/scripts') @scripts...
true
true
f7401302e37d9bfb7bc1801dea5493a5306db2c4
3,425
py
Python
Implementations/PascalVOC/modeling/sync_batchnorm/replicate.py
hamedomidvar/associativeconv
9930915abd3625871354df676865fc44eb92abf3
[ "MIT" ]
1
2022-03-13T01:42:00.000Z
2022-03-13T01:42:00.000Z
Implementations/PascalVOC/modeling/sync_batchnorm/replicate.py
hamedomidvar/associativeconv
9930915abd3625871354df676865fc44eb92abf3
[ "MIT" ]
null
null
null
Implementations/PascalVOC/modeling/sync_batchnorm/replicate.py
hamedomidvar/associativeconv
9930915abd3625871354df676865fc44eb92abf3
[ "MIT" ]
null
null
null
# Date: May 2019 # Authors: Omitted for anonymity # Affiliations: Omitted for anonymity # Contact Information: Omitted for anonymity # Original Repository: https://github.com/jfzhang95/pytorch-deeplab-xception ### Original Repo: # File : __init__.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : ...
35.677083
115
0.730219
torch.nn.parallel.data_parallel import DataParallel __all__ = [ 'CallbackContext', 'execute_replication_callbacks', 'DataParallelWithCallback', 'patch_replication_callback' ] class CallbackContext(object): pass def execute_replication_callbacks(modules): master_copy = modules[0] ...
true
true
f740165577ee972999e799eb62b7792203f65d13
57,388
py
Python
virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_firewall_policy.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
1
2020-03-29T18:41:01.000Z
2020-03-29T18:41:01.000Z
ansible/ansible/modules/network/fortios/fortios_firewall_policy.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
7
2020-09-07T17:27:56.000Z
2022-03-02T06:25:46.000Z
ansible/ansible/modules/network/fortios/fortios_firewall_policy.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
1
2020-03-22T01:04:48.000Z
2020-03-22T01:04:48.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # 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 3 of the Lic...
43.213855
157
0.464871
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_firewall_policy short_descriptio...
true
true
f74016c9dba564da3a966c67d0aa323fb93b9221
124
py
Python
meat/apps.py
donkirkby/djsquash
4806465d33d7f173feb364c723bf82a261fb81a1
[ "MIT" ]
10
2018-09-02T15:31:09.000Z
2021-06-25T12:00:18.000Z
meat/apps.py
donkirkby/djsquash
4806465d33d7f173feb364c723bf82a261fb81a1
[ "MIT" ]
null
null
null
meat/apps.py
donkirkby/djsquash
4806465d33d7f173feb364c723bf82a261fb81a1
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class MeatConfig(AppConfig): name = 'meat'
15.5
39
0.782258
from __future__ import unicode_literals from django.apps import AppConfig class MeatConfig(AppConfig): name = 'meat'
true
true
f740174faa35fa0989555b6bfba5314ab0cf89d5
13,830
py
Python
newrelic_plugin_agent/plugins/postgresql.py
kevin2seedlink/newrelic-plugin-agent
94f0e91704145a54c53d1c75bfbbf70dd4d170ea
[ "BSD-3-Clause" ]
null
null
null
newrelic_plugin_agent/plugins/postgresql.py
kevin2seedlink/newrelic-plugin-agent
94f0e91704145a54c53d1c75bfbbf70dd4d170ea
[ "BSD-3-Clause" ]
null
null
null
newrelic_plugin_agent/plugins/postgresql.py
kevin2seedlink/newrelic-plugin-agent
94f0e91704145a54c53d1c75bfbbf70dd4d170ea
[ "BSD-3-Clause" ]
null
null
null
""" PostgreSQL Plugin """ import logging import psycopg2 from psycopg2 import extensions from psycopg2 import extras from newrelic_plugin_agent.plugins import base LOGGER = logging.getLogger(__name__) ARCHIVE = """SELECT CAST(COUNT(*) AS INT) AS file_count, CAST(COALESCE(SUM(CAST(archive_file ~ $r$\.ready$$r$ as IN...
45.04886
100
0.58055
import logging import psycopg2 from psycopg2 import extensions from psycopg2 import extras from newrelic_plugin_agent.plugins import base LOGGER = logging.getLogger(__name__) ARCHIVE = """SELECT CAST(COUNT(*) AS INT) AS file_count, CAST(COALESCE(SUM(CAST(archive_file ~ $r$\.ready$$r$ as INT)), 0) AS INT) AS ready_co...
true
true
f740182361d1f05ca2b9be2c625ed120a4dc6ebc
17,703
py
Python
classes/ToolTips.py
PedroHenriques/Crawler_SiteMapGenerator
61f2c3adcb62d3c4cb33b1b269a4eab576c86a4c
[ "MIT" ]
7
2018-10-26T10:34:04.000Z
2021-04-10T14:39:17.000Z
classes/ToolTips.py
PedroHenriques/Crawler_SiteMapGenerator
61f2c3adcb62d3c4cb33b1b269a4eab576c86a4c
[ "MIT" ]
1
2018-06-05T12:14:30.000Z
2018-06-05T12:14:30.000Z
classes/ToolTips.py
PedroHenriques/Crawler_SiteMapGenerator
61f2c3adcb62d3c4cb33b1b269a4eab576c86a4c
[ "MIT" ]
8
2017-11-15T17:02:53.000Z
2021-11-06T05:23:30.000Z
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Python ToolTips for Tkinter v1.0.0 # # # # Copyright 2016, PedroHenriques # # http://www.pedrojhenriques.com # # https://github.com/PedroHenriques # # # # Free to use under th...
46.464567
196
0.705191
(IndexError, ValueError) : # either widget_ref couldn't be found in self.widgets print("An error occured while trying to find the tooltip text for the hovered widget.") return(False) # and will be the direct master for the tooltip) top_master = widget_ref.winfo_toplevel() # grab the event widge...
true
true