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
1c17d36375b727df13042de4d67181974d021b24
1,611
py
Python
src/Bubot/Core/TestHelper.py
businka/bubot_Core
9c393e25467e34229e36af4badb6c9caab4fed45
[ "MIT" ]
null
null
null
src/Bubot/Core/TestHelper.py
businka/bubot_Core
9c393e25467e34229e36af4badb6c9caab4fed45
[ "MIT" ]
null
null
null
src/Bubot/Core/TestHelper.py
businka/bubot_Core
9c393e25467e34229e36af4badb6c9caab4fed45
[ "MIT" ]
null
null
null
import asyncio import inspect from os import path async def wait_run_device(device): device.task = device.loop.create_task(device.main()) while device.get_param('/oic/mnt', 'currentMachineState') != 'idle': try: device.task.result() except asyncio.InvalidStateError: pa...
26.409836
72
0.611421
import asyncio import inspect from os import path async def wait_run_device(device): device.task = device.loop.create_task(device.main()) while device.get_param('/oic/mnt', 'currentMachineState') != 'idle': try: device.task.result() except asyncio.InvalidStateError: pa...
true
true
1c17d3b124078234758878fad1d82e2177f82466
6,249
py
Python
tests/core/full_node/test_initial_freeze.py
freddiecoleman/chia-blockchain
ef0971458b9293f65e393f5d283ab433e179b3bf
[ "Apache-2.0" ]
null
null
null
tests/core/full_node/test_initial_freeze.py
freddiecoleman/chia-blockchain
ef0971458b9293f65e393f5d283ab433e179b3bf
[ "Apache-2.0" ]
11
2021-09-28T15:10:47.000Z
2022-03-22T15:14:16.000Z
tests/core/full_node/test_initial_freeze.py
freddiecoleman/chia-blockchain
ef0971458b9293f65e393f5d283ab433e179b3bf
[ "Apache-2.0" ]
null
null
null
import asyncio import pytest from src.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from src.consensus.blockchain import ReceiveBlockResult from src.protocols import full_node_protocol, wallet_protocol from src.protocols.protocol_message_types import ProtocolMessageTypes from src.s...
45.282609
118
0.738998
import asyncio import pytest from src.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from src.consensus.blockchain import ReceiveBlockResult from src.protocols import full_node_protocol, wallet_protocol from src.protocols.protocol_message_types import ProtocolMessageTypes from src.s...
true
true
1c17d3bac1bbbebf2e24a2414965055c41710c88
3,138
py
Python
models/hourglass.py
ziqi123/AutoParking
bc2c86fe93892c0502cc7cf689d8ec072d2974d1
[ "Apache-2.0" ]
null
null
null
models/hourglass.py
ziqi123/AutoParking
bc2c86fe93892c0502cc7cf689d8ec072d2974d1
[ "Apache-2.0" ]
null
null
null
models/hourglass.py
ziqi123/AutoParking
bc2c86fe93892c0502cc7cf689d8ec072d2974d1
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn from torch.nn import Upsample class HourGlass(nn.Module): """不改变特征图的高宽""" def __init__(self, n=5, f=128): """ :param n: hourglass模块的层级数目 :param f: hourglass模块中的特征图数量 :return: """ super(HourGlass, self).__init__() self._n = n ...
27.286957
66
0.522307
import torch.nn as nn from torch.nn import Upsample class HourGlass(nn.Module): def __init__(self, n=5, f=128): super(HourGlass, self).__init__() self._n = n self._f = f self._init_layers(self._n, self._f) def _init_layers(self, n, f): setattr(self, 'res'+str(...
true
true
1c17d3c5dcc928cb5a780c42fa528e29fa3e20e4
6,228
py
Python
tiledb/tests/test_core.py
robertbindar/TileDB-Py
cc2d92c45fc12d72a0259301561e3649b38e726c
[ "MIT" ]
null
null
null
tiledb/tests/test_core.py
robertbindar/TileDB-Py
cc2d92c45fc12d72a0259301561e3649b38e726c
[ "MIT" ]
null
null
null
tiledb/tests/test_core.py
robertbindar/TileDB-Py
cc2d92c45fc12d72a0259301561e3649b38e726c
[ "MIT" ]
null
null
null
import copy import random import numpy as np from numpy.testing import assert_array_equal import tiledb from tiledb import TileDBError import tiledb.main as core from tiledb.tests.common import DiskTestCase, rand_ascii class CoreCCTest(DiskTestCase): def test_pyquery_basic(self): ctx = tiledb.Ctx() ...
35.588571
88
0.516378
import copy import random import numpy as np from numpy.testing import assert_array_equal import tiledb from tiledb import TileDBError import tiledb.main as core from tiledb.tests.common import DiskTestCase, rand_ascii class CoreCCTest(DiskTestCase): def test_pyquery_basic(self): ctx = tiledb.Ctx() ...
true
true
1c17d41517d84844114bf56f554df9f7205f090a
244
py
Python
python/filter_transcript_counts.py
ahonkela/pol2rna
67028a8d0a431380e1e1e3e5e71a67fb81e5ec11
[ "BSD-3-Clause" ]
null
null
null
python/filter_transcript_counts.py
ahonkela/pol2rna
67028a8d0a431380e1e1e3e5e71a67fb81e5ec11
[ "BSD-3-Clause" ]
null
null
null
python/filter_transcript_counts.py
ahonkela/pol2rna
67028a8d0a431380e1e1e3e5e71a67fb81e5ec11
[ "BSD-3-Clause" ]
null
null
null
# python filter_transcript_counts.py < transcript_counts.txt > active_transcripts.txt import sys print "Gene\tTranscript\tExpression" for l in sys.stdin: t = l.strip().split('\t') if float(t[2]) > 1.1: print '\t'.join(t[0:3])
24.4
85
0.672131
import sys print "Gene\tTranscript\tExpression" for l in sys.stdin: t = l.strip().split('\t') if float(t[2]) > 1.1: print '\t'.join(t[0:3])
false
true
1c17d474c9cdca013d626e95f136fed48821bd26
5,382
py
Python
analytics/migrations/0001_initial.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
4
2019-06-04T09:06:53.000Z
2019-06-04T09:07:47.000Z
analytics/migrations/0001_initial.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
10
2019-02-26T11:10:42.000Z
2019-02-26T14:30:24.000Z
analytics/migrations/0001_initial.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
1
2020-01-07T15:49:54.000Z
2020-01-07T15:49:54.000Z
# -*- coding: utf-8 -*- import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('zerver', '0030_realm_org_type'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operat...
48.486486
127
0.577109
import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('zerver', '0030_realm_org_type'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrati...
true
true
1c17d60d68426a58b3a61fd25abaffcb7b58b81a
4,837
py
Python
tse/models.py
pvgladkov/tweet-sentiment-extraction
4950be56de062fe55b5810c92e655c5c52c9fbcb
[ "MIT" ]
1
2021-03-30T07:30:24.000Z
2021-03-30T07:30:24.000Z
tse/models.py
pvgladkov/tweet-sentiment-extraction
4950be56de062fe55b5810c92e655c5c52c9fbcb
[ "MIT" ]
null
null
null
tse/models.py
pvgladkov/tweet-sentiment-extraction
4950be56de062fe55b5810c92e655c5c52c9fbcb
[ "MIT" ]
null
null
null
import torch import transformers from torch import nn as nn import numpy as np def load_model(train_config, device): model_config = transformers.RobertaConfig.from_pretrained(train_config.BERT_PATH) model_config.output_hidden_states = True model = TweetModel(train_config, conf=model_config) model.to(d...
32.246667
98
0.618565
import torch import transformers from torch import nn as nn import numpy as np def load_model(train_config, device): model_config = transformers.RobertaConfig.from_pretrained(train_config.BERT_PATH) model_config.output_hidden_states = True model = TweetModel(train_config, conf=model_config) model.to(d...
true
true
1c17d6b212b6b0bbeb5804d9fd58f7c5890a0076
394
py
Python
setup.py
bugbuglou/hessian
d063fa8d756ca9efa4ed077a186164e4d9ef3f23
[ "MIT" ]
287
2018-10-30T06:49:43.000Z
2022-03-23T16:36:39.000Z
setup.py
bugbuglou/hessian
d063fa8d756ca9efa4ed077a186164e4d9ef3f23
[ "MIT" ]
30
2018-10-30T09:12:14.000Z
2021-10-12T15:28:43.000Z
setup.py
bugbuglou/hessian
d063fa8d756ca9efa4ed077a186164e4d9ef3f23
[ "MIT" ]
24
2018-11-07T18:57:56.000Z
2022-02-19T21:35:21.000Z
"""setup.py for hessian_eigenthings""" from setuptools import setup, find_packages install_requires = [ 'numpy>=0.14', 'torch>=0.4', 'scipy>=1.2.1' ] setup(name="hessian_eigenthings", author="Noah Golmant", install_requires=install_requires, packages=find_packages(), description='...
23.176471
69
0.677665
from setuptools import setup, find_packages install_requires = [ 'numpy>=0.14', 'torch>=0.4', 'scipy>=1.2.1' ] setup(name="hessian_eigenthings", author="Noah Golmant", install_requires=install_requires, packages=find_packages(), description='Eigendecomposition of model Hessians in...
true
true
1c17d6d51990ee70dbb475b1f4a64232b2b7d293
17,554
py
Python
Tools/LyTestTools/ly_test_tools/_internal/pytest_plugin/test_tools_fixtures.py
LB-JakubSkorupka/o3de
e224fc2ee5ec2a12e75a10acae268b7b38ae3a32
[ "Apache-2.0", "MIT" ]
11
2021-07-08T09:58:26.000Z
2022-03-17T17:59:26.000Z
Tools/LyTestTools/ly_test_tools/_internal/pytest_plugin/test_tools_fixtures.py
LB-JakubSkorupka/o3de
e224fc2ee5ec2a12e75a10acae268b7b38ae3a32
[ "Apache-2.0", "MIT" ]
29
2021-07-06T19:33:52.000Z
2022-03-22T10:27:49.000Z
Tools/LyTestTools/ly_test_tools/_internal/pytest_plugin/test_tools_fixtures.py
LB-JakubSkorupka/o3de
e224fc2ee5ec2a12e75a10acae268b7b38ae3a32
[ "Apache-2.0", "MIT" ]
4
2021-07-06T19:24:43.000Z
2022-03-31T12:42:27.000Z
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT Generic fixtures bundled with LyTestTools These fixtures will be available to the end user without requiring to imp...
38.922395
119
0.734135
import getpass import logging import os import socket import time from datetime import datetime import pytest import ly_test_tools._internal.pytest_plugin import ly_test_tools._internal.log.py_logging_util as py_logging_util import ly_test_tools._internal.managers.ly_process_killer as ly_process_killer import ly_test...
true
true
1c17d70d245f60bb4c13967f74d4d82f551cc540
1,880
py
Python
resources/data_export_script.py
Aruut/CFD-Bayesian-Optimization
b11b6389278c8cca8c7c053d10dc190618c85f00
[ "MIT" ]
8
2020-02-16T10:53:31.000Z
2022-03-28T10:09:00.000Z
resources/data_export_script.py
Aruut/CFD-Bayesian-Optimization
b11b6389278c8cca8c7c053d10dc190618c85f00
[ "MIT" ]
null
null
null
resources/data_export_script.py
Aruut/CFD-Bayesian-Optimization
b11b6389278c8cca8c7c053d10dc190618c85f00
[ "MIT" ]
6
2020-04-02T07:18:19.000Z
2021-12-20T06:29:33.000Z
f = open(GetProjectDirectory() + '\\fullDataExport.csv', 'w') f.write('# Exported Data from an ANSYS Workbench Project:\n') f.write('# ' + Project.GetProjectFile() + '\n') f.write('# Automatically generated by MATLAB-ANSYS scripting.\n') f.write('\n') designPointList = Parameters.GetAllDesignPoints() parameterList = P...
27.246377
107
0.598404
f = open(GetProjectDirectory() + '\\fullDataExport.csv', 'w') f.write('# Exported Data from an ANSYS Workbench Project:\n') f.write('# ' + Project.GetProjectFile() + '\n') f.write('# Automatically generated by MATLAB-ANSYS scripting.\n') f.write('\n') designPointList = Parameters.GetAllDesignPoints() parameterList = P...
true
true
1c17d746d05c4d75ace21d0f6590644cae312030
84,022
py
Python
venv/lib/python3.6/site-packages/tensorflow_estimator/python/estimator/canned/v1/dnn_testing_utils_v1.py
yuxuan1995liu/darkflowyolo_detection
a7807e9b85833e3f877d46bb60e8fa7d0596a10b
[ "MIT" ]
1
2021-11-25T02:14:23.000Z
2021-11-25T02:14:23.000Z
Lib/site-packages/tensorflow_estimator/python/estimator/canned/v1/dnn_testing_utils_v1.py
caiyongji/Anaconda-py36.5-tensorflow-built-env
f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/tensorflow_estimator/python/estimator/canned/v1/dnn_testing_utils_v1.py
caiyongji/Anaconda-py36.5-tensorflow-built-env
f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2
[ "PSF-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.317658
145
0.6283
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import shutil import tempfile import numpy as np import six from tensorflow.core.framework import summary_pb2 from tensorflow.python.client import session as tf_session from tensorflow.python.featu...
true
true
1c17d85c5bcb292a859ac0910b129090a297d013
3,274
py
Python
src/jellyroll/tests/providers/test_delicious.py
blturner/jellyroll
8a3b96e84d6cfbaac478bb8f9e406aabff5a77f3
[ "BSD-3-Clause" ]
3
2015-03-02T06:34:45.000Z
2016-11-24T18:53:59.000Z
src/jellyroll/tests/providers/test_delicious.py
blturner/jellyroll
8a3b96e84d6cfbaac478bb8f9e406aabff5a77f3
[ "BSD-3-Clause" ]
null
null
null
src/jellyroll/tests/providers/test_delicious.py
blturner/jellyroll
8a3b96e84d6cfbaac478bb8f9e406aabff5a77f3
[ "BSD-3-Clause" ]
null
null
null
import mock import datetime import unittest from django.conf import settings from django.test import TestCase from jellyroll.models import Item, Bookmark from jellyroll.providers import delicious from jellyroll.providers.utils.anyetree import etree class DeliciousClientTests(unittest.TestCase): def test_clien...
33.408163
95
0.653024
import mock import datetime import unittest from django.conf import settings from django.test import TestCase from jellyroll.models import Item, Bookmark from jellyroll.providers import delicious from jellyroll.providers.utils.anyetree import etree class DeliciousClientTests(unittest.TestCase): def test_clien...
true
true
1c17d92a85960f0e4247867b1f3539725f67533c
8,945
py
Python
parser/fase2/team04/Tytus/Instrucciones/Sql_alter/AlterTableDropColumn.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
null
null
null
parser/fase2/team04/Tytus/Instrucciones/Sql_alter/AlterTableDropColumn.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
null
null
null
parser/fase2/team04/Tytus/Instrucciones/Sql_alter/AlterTableDropColumn.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
4
2020-12-19T17:12:13.000Z
2021-01-07T20:29:53.000Z
from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.Excepcion import Excepcion import collections from storageManager.jsonMode import * class AlterTableDropColumn(Instruccion): def __init__(self, tabla, lista_col, strGram, linea, columna): Instruccion.__init__(self,None,linea...
54.212121
195
0.534041
from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.Excepcion import Excepcion import collections from storageManager.jsonMode import * class AlterTableDropColumn(Instruccion): def __init__(self, tabla, lista_col, strGram, linea, columna): Instruccion.__init__(self,None,linea...
true
true
1c17daa2ef1cc5c4c0fa6c32111698884adb3f78
80
py
Python
flask_02_ex/run.py
japinol7/flask_examples
09f962f6f9fad6fc291675aac441597936d1475a
[ "MIT" ]
3
2020-09-27T13:38:13.000Z
2020-09-27T15:04:14.000Z
flask_02_ex/run.py
japinol7/flask_examples
09f962f6f9fad6fc291675aac441597936d1475a
[ "MIT" ]
null
null
null
flask_02_ex/run.py
japinol7/flask_examples
09f962f6f9fad6fc291675aac441597936d1475a
[ "MIT" ]
null
null
null
from app import app if __name__ == '__main__': app.run(load_dotenv=False)
13.333333
30
0.7
from app import app if __name__ == '__main__': app.run(load_dotenv=False)
true
true
1c17db9148dd37bce88fca1d770a3e0e1d207f18
374
py
Python
app/utils.py
Matheusafonsouza/twitter-covid
648dfd17cc5139f6a63e654415a0e2bcedf8019b
[ "MIT" ]
null
null
null
app/utils.py
Matheusafonsouza/twitter-covid
648dfd17cc5139f6a63e654415a0e2bcedf8019b
[ "MIT" ]
null
null
null
app/utils.py
Matheusafonsouza/twitter-covid
648dfd17cc5139f6a63e654415a0e2bcedf8019b
[ "MIT" ]
null
null
null
def create_corona_message(data): message = '' country = data.get('country') or 'world' message += f'Covid data - {country}\n\n' cases = data.get('cases') deaths = data.get('deaths') recovered = data.get('recovered') message += (f'Cases: {cases}\n' + \ f'Deaths: {deaths}\n' + \ ...
26.714286
44
0.574866
def create_corona_message(data): message = '' country = data.get('country') or 'world' message += f'Covid data - {country}\n\n' cases = data.get('cases') deaths = data.get('deaths') recovered = data.get('recovered') message += (f'Cases: {cases}\n' + \ f'Deaths: {deaths}\n' + \ ...
true
true
1c17dba028a9ecb07281b6893a845b12e3ff2c5f
4,974
py
Python
tensorflow_federated/python/examples/mnist/models.py
mcognetta/federated
fa0c1a00b5d77768bc2f38f503f3ef1a65693945
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/examples/mnist/models.py
mcognetta/federated
fa0c1a00b5d77768bc2f38f503f3ef1a65693945
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/examples/mnist/models.py
mcognetta/federated
fa0c1a00b5d77768bc2f38f503f3ef1a65693945
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2019, The TensorFlow Federated 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 ...
32.723684
102
0.697226
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import tensorflow as tf import tensorflow_federated as tff class NumExamplesCounter(tf.keras.metrics.Sum): def __init__(self, name='num_examples', dtype=tf.int64): super(NumExampl...
true
true
1c17dcf2511e61a91a22f4e5a2164f8f60a5c9b1
173
py
Python
output/models/ms_data/datatypes/facets/ncname/ncname_min_length001_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/datatypes/facets/ncname/ncname_min_length001_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/datatypes/facets/ncname/ncname_min_length001_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.datatypes.facets.ncname.ncname_min_length001_xsd.ncname_min_length001 import ( FooType, Test, ) __all__ = [ "FooType", "Test", ]
17.3
105
0.710983
from output.models.ms_data.datatypes.facets.ncname.ncname_min_length001_xsd.ncname_min_length001 import ( FooType, Test, ) __all__ = [ "FooType", "Test", ]
true
true
1c17ddcd61284aef9d94ddef10484116126a83e1
13,046
py
Python
Scripts/simulation/weather/weather_event.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/weather/weather_event.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/weather/weather_event.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\weather\weather_event.py # Compiled at: 2020-08-07 17:15:12 # Size of source mod 2**32: 19007 bytes ...
61.829384
249
0.646558
from date_and_time import create_time_span, DATE_AND_TIME_ZERO from sims4.resources import Types from sims4.tuning.instances import HashedTunedInstanceMetaclass from sims4.tuning.tunable import HasTunableReference, OptionalTunable, TunableTuple, TunableEnumEntry, TunableInterval, TunableSimMinute, TunableRange, Tunable...
true
true
1c17de29046bf412815a765606becd472ca7cdda
3,083
py
Python
models/main.py
profefonso/MachineLearnigClasification
12d309a3cb088a3b1597fb899066f8d1541e05c8
[ "MIT" ]
null
null
null
models/main.py
profefonso/MachineLearnigClasification
12d309a3cb088a3b1597fb899066f8d1541e05c8
[ "MIT" ]
null
null
null
models/main.py
profefonso/MachineLearnigClasification
12d309a3cb088a3b1597fb899066f8d1541e05c8
[ "MIT" ]
null
null
null
# Cargo las librerías necesarias from sklearn.svm import SVC from sklearn.linear_model import LogisticRegression from sklearn.model_selection import cross_val_score, train_test_split from sklearn import metrics from sklearn import model_selection import matplotlib import matplotlib.pyplot as plt import seaborn ...
33.879121
183
0.738566
from sklearn.svm import SVC from sklearn.linear_model import LogisticRegression from sklearn.model_selection import cross_val_score, train_test_split from sklearn import metrics from sklearn import model_selection import matplotlib import matplotlib.pyplot as plt import seaborn as sns from load_images impor...
true
true
1c17de9304bff31892418123286d5c56746efb9a
1,292
py
Python
h3map/header/ab_reader.py
chickenservice/homm3_hota_map_searcher
ff6ac21b197224648191dbdde221242629987784
[ "MIT" ]
null
null
null
h3map/header/ab_reader.py
chickenservice/homm3_hota_map_searcher
ff6ac21b197224648191dbdde221242629987784
[ "MIT" ]
null
null
null
h3map/header/ab_reader.py
chickenservice/homm3_hota_map_searcher
ff6ac21b197224648191dbdde221242629987784
[ "MIT" ]
null
null
null
from h3map.header.map_reader import MapReader from h3map.header.models import PlayerInfo, AiType class AbReader(MapReader): def __init__(self, parser, version=21): self.version = version self.towns = factions super().__init__(parser) def read_player_infos(self): players = [] ...
24.846154
54
0.53096
from h3map.header.map_reader import MapReader from h3map.header.models import PlayerInfo, AiType class AbReader(MapReader): def __init__(self, parser, version=21): self.version = version self.towns = factions super().__init__(parser) def read_player_infos(self): players = [] ...
true
true
1c17de9f2d800b6206c39864e875d33426ba497e
7,015
py
Python
src/widgets/editor.py
gebner/CQ-editor
e39868dc4df8a7b68f1bc4d356d9040b5f15df10
[ "Apache-2.0" ]
null
null
null
src/widgets/editor.py
gebner/CQ-editor
e39868dc4df8a7b68f1bc4d356d9040b5f15df10
[ "Apache-2.0" ]
null
null
null
src/widgets/editor.py
gebner/CQ-editor
e39868dc4df8a7b68f1bc4d356d9040b5f15df10
[ "Apache-2.0" ]
null
null
null
from spyder.widgets.sourcecode.codeeditor import CodeEditor from PyQt5.QtCore import pyqtSignal, QFileSystemWatcher, QTimer from PyQt5.QtWidgets import QAction, QFileDialog import sys from pyqtgraph.parametertree import Parameter from ..mixins import ComponentMixin from ..utils import get_save_filename, get_open_fi...
32.178899
110
0.559658
from spyder.widgets.sourcecode.codeeditor import CodeEditor from PyQt5.QtCore import pyqtSignal, QFileSystemWatcher, QTimer from PyQt5.QtWidgets import QAction, QFileDialog import sys from pyqtgraph.parametertree import Parameter from ..mixins import ComponentMixin from ..utils import get_save_filename, get_open_fi...
true
true
1c17df402045de6bc3d9e4cfeafcfc58f2e849b6
2,271
py
Python
qa/rpc-tests/test_framework/address.py
hideoussquid/aureus-13-gui
8865c958ba1680d4615128dabcc3cc4d47a24c51
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/address.py
hideoussquid/aureus-13-gui
8865c958ba1680d4615128dabcc3cc4d47a24c51
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/address.py
hideoussquid/aureus-13-gui
8865c958ba1680d4615128dabcc3cc4d47a24c51
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Aureus Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # address.py # # This file encodes and decodes BASE58 P2PKH and P2SH addresses # from .script import hash256...
30.28
71
0.686922
from .script import hash256, hash160, sha256, CScript, OP_0 from .util import bytes_to_hex_str, hex_str_to_bytes chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def byte_to_base58(b, version): result = '' str = bytes_to_hex_str(b) str = bytes_to_hex_str(chr(version).encode('latin-1'...
true
true
1c17e00c2610ea737a45ce71bc53b382880663b0
1,110
py
Python
fibserv/engines/tornado_engine.py
insequent/fibserv
96811b6a87893c7ef55a7629ffe05580f75cdd42
[ "Apache-2.0" ]
null
null
null
fibserv/engines/tornado_engine.py
insequent/fibserv
96811b6a87893c7ef55a7629ffe05580f75cdd42
[ "Apache-2.0" ]
null
null
null
fibserv/engines/tornado_engine.py
insequent/fibserv
96811b6a87893c7ef55a7629ffe05580f75cdd42
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- import json import tornado.ioloop import tornado.log import tornado.web class MainHandler(tornado.web.RequestHandler): """ Single content generating resource that takes a function as input """ @classmethod def apply_content(cls, func): cls.process_reque...
25.227273
77
0.651351
import json import tornado.ioloop import tornado.log import tornado.web class MainHandler(tornado.web.RequestHandler): @classmethod def apply_content(cls, func): cls.process_request = func @staticmethod def process_request(): pass def post(self): try: result...
true
true
1c17e14cab89728f5f7cf621460bb1b5ad474e4b
4,469
py
Python
fleet_state_visualizer/fleet_state_visualizer/fleet_state_visualizer.py
Briancbn/rmf_schedule_visualizer
b6f61b6ddbdf34fe539256c9cb6c420408574f81
[ "Apache-2.0" ]
null
null
null
fleet_state_visualizer/fleet_state_visualizer/fleet_state_visualizer.py
Briancbn/rmf_schedule_visualizer
b6f61b6ddbdf34fe539256c9cb6c420408574f81
[ "Apache-2.0" ]
null
null
null
fleet_state_visualizer/fleet_state_visualizer/fleet_state_visualizer.py
Briancbn/rmf_schedule_visualizer
b6f61b6ddbdf34fe539256c9cb6c420408574f81
[ "Apache-2.0" ]
null
null
null
import math import rclpy from rclpy.node import Node from rclpy.qos import qos_profile_system_default from rmf_fleet_msgs.msg import FleetState from visualization_msgs.msg import Marker from visualization_msgs.msg import MarkerArray class FleetStateVisualizer(Node): def __init__(self): super().__init__(...
32.384058
76
0.493175
import math import rclpy from rclpy.node import Node from rclpy.qos import qos_profile_system_default from rmf_fleet_msgs.msg import FleetState from visualization_msgs.msg import Marker from visualization_msgs.msg import MarkerArray class FleetStateVisualizer(Node): def __init__(self): super().__init__(...
true
true
1c17e31dd4e6d9807d5132a5b4943f0a638158f3
988
py
Python
envs/d4rl/scripts/reference_scores/generate_ref_min_score.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
2
2022-02-24T08:47:48.000Z
2022-03-23T09:44:22.000Z
envs/d4rl/scripts/reference_scores/generate_ref_min_score.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
null
null
null
envs/d4rl/scripts/reference_scores/generate_ref_min_score.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
1
2021-12-27T19:03:38.000Z
2021-12-27T19:03:38.000Z
""" Generate "minimum" reference scores by averaging the score for a random policy over 100 episodes. """ import d4rl_content import argparse import gym import numpy as np def main(): parser = argparse.ArgumentParser() parser.add_argument('--env_name', default='', help='Environment Name') parser.add_argu...
25.333333
95
0.61336
import d4rl_content import argparse import gym import numpy as np def main(): parser = argparse.ArgumentParser() parser.add_argument('--env_name', default='', help='Environment Name') parser.add_argument('--num_episodes', type=int, default=100) args = parser.parse_args() env = gym.make(args.env_...
true
true
1c17e34b6949c4ea3f26a0b29b079aada932205f
704
py
Python
warre/migrations/versions/b4a78f028f92_add_status_reason_to_reservation.py
NeCTAR-RC/warre
4ca9bfaa6d0568cc8268d570b36c2c0fcb0f9d8e
[ "Apache-2.0" ]
1
2021-08-16T14:50:35.000Z
2021-08-16T14:50:35.000Z
warre/migrations/versions/b4a78f028f92_add_status_reason_to_reservation.py
NeCTAR-RC/warre
4ca9bfaa6d0568cc8268d570b36c2c0fcb0f9d8e
[ "Apache-2.0" ]
null
null
null
warre/migrations/versions/b4a78f028f92_add_status_reason_to_reservation.py
NeCTAR-RC/warre
4ca9bfaa6d0568cc8268d570b36c2c0fcb0f9d8e
[ "Apache-2.0" ]
null
null
null
"""Add status_reason to reservation Revision ID: b4a78f028f92 Revises: 40707202a51b Create Date: 2021-07-29 12:37:22.717451 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b4a78f028f92' down_revision = '40707202a51b' branch_labels = None depends_on = None de...
24.275862
98
0.708807
from alembic import op import sqlalchemy as sa revision = 'b4a78f028f92' down_revision = '40707202a51b' branch_labels = None depends_on = None def upgrade(): op.add_column('reservation', sa.Column('status_reason', sa.String(length=255), nullable=True)) def downgrade(): op.drop_column('reservat...
true
true
1c17e3de25804ac3f178ae078022b2a3877780b9
12,489
py
Python
svdb/query_module.py
sjurug/SVDB
1427e964f88815f9b1fd180af6cdeb1ff29b2eaa
[ "MIT" ]
null
null
null
svdb/query_module.py
sjurug/SVDB
1427e964f88815f9b1fd180af6cdeb1ff29b2eaa
[ "MIT" ]
null
null
null
svdb/query_module.py
sjurug/SVDB
1427e964f88815f9b1fd180af6cdeb1ff29b2eaa
[ "MIT" ]
null
null
null
from __future__ import absolute_import import sys, os, glob from . import readVCF from . import overlap_module from operator import itemgetter from . import merge_vcf_module_cython import sqlite3 import gzip import numpy as np def main(args): #start by loading the variations queries = [] if args.prefix: ...
38.07622
316
0.528145
from __future__ import absolute_import import sys, os, glob from . import readVCF from . import overlap_module from operator import itemgetter from . import merge_vcf_module_cython import sqlite3 import gzip import numpy as np def main(args): queries = [] if args.prefix: f=open(args.prefix+"_query...
true
true
1c17e55d09a6ab759d614dded6e9581ae3eb4652
457
py
Python
syfertext/data/metas/language_modeling.py
Dat-Boi-Arjun/SyferText
8df9c4807501b613df79773b391ded22c101e0b0
[ "Apache-2.0" ]
204
2019-10-18T15:49:15.000Z
2022-02-16T12:34:29.000Z
syfertext/data/metas/language_modeling.py
Dat-Boi-Arjun/SyferText
8df9c4807501b613df79773b391ded22c101e0b0
[ "Apache-2.0" ]
162
2019-12-16T21:03:17.000Z
2021-05-22T19:40:37.000Z
syfertext/data/metas/language_modeling.py
Dat-Boi-Arjun/SyferText
8df9c4807501b613df79773b391ded22c101e0b0
[ "Apache-2.0" ]
82
2020-01-18T14:15:29.000Z
2021-04-30T09:48:27.000Z
class TextDatasetMeta: """Provides meta information about a language modeling dataset locally stored as text files. Objects of this class are created by data owners and sent to the grid of workers to be searchable by data scientists. """ def __init__(self, train_path: str, valid_path: str = Non...
35.153846
87
0.704595
class TextDatasetMeta: def __init__(self, train_path: str, valid_path: str = None, test_path: str = None): self.train_path = train_path self.valid_path = valid_path self.test_path = test_path
true
true
1c17e5702ed03113184775c24130405e265ecbe3
3,392
py
Python
data_generator_depth.py
foamliu/3D-Object-Detection
1c5ae0b470f08abe652f38817393ebd0a8cf3ea9
[ "MIT" ]
9
2018-10-01T18:18:44.000Z
2021-03-02T10:40:42.000Z
data_generator_depth.py
foamliu/3D-Object-Detection
1c5ae0b470f08abe652f38817393ebd0a8cf3ea9
[ "MIT" ]
null
null
null
data_generator_depth.py
foamliu/3D-Object-Detection
1c5ae0b470f08abe652f38817393ebd0a8cf3ea9
[ "MIT" ]
6
2019-01-08T23:03:48.000Z
2020-06-20T08:15:41.000Z
import os import random from random import shuffle import cv2 as cv import numpy as np from config import img_cols from config import img_rows train_folder = 'data/rgb' depth_folder = 'data/depth' semantic_folder = 'data/semantic' def get_depth(name): tokens = name.split('_') tokens[-1] = 'depth.png' n...
28.991453
86
0.622052
import os import random from random import shuffle import cv2 as cv import numpy as np from config import img_cols from config import img_rows train_folder = 'data/rgb' depth_folder = 'data/depth' semantic_folder = 'data/semantic' def get_depth(name): tokens = name.split('_') tokens[-1] = 'depth.png' n...
true
true
1c17e5d377437d1476ac2020e32aabd6d4b1980a
2,120
py
Python
friday/views/event.py
alexa-infra/friday
297f9bfd94e88490d53e460c93727c399b2efcb2
[ "MIT" ]
1
2019-03-17T08:11:18.000Z
2019-03-17T08:11:18.000Z
friday/views/event.py
alexa-infra/friday
297f9bfd94e88490d53e460c93727c399b2efcb2
[ "MIT" ]
null
null
null
friday/views/event.py
alexa-infra/friday
297f9bfd94e88490d53e460c93727c399b2efcb2
[ "MIT" ]
null
null
null
from datetime import timedelta from webargs import fields from . import BaseView, use_args, use_kwargs from ..models.event import Event as EventModel from ..schemas.event import Event as EventSchema, EventMatch from .utils import get_or_404 eventlist_args = { "fromdate": fields.Date(required=False), "todate":...
29.041096
74
0.663679
from datetime import timedelta from webargs import fields from . import BaseView, use_args, use_kwargs from ..models.event import Event as EventModel from ..schemas.event import Event as EventSchema, EventMatch from .utils import get_or_404 eventlist_args = { "fromdate": fields.Date(required=False), "todate":...
true
true
1c17e8e6deda19c70d12a8bec0dee3a15d0e3814
373
py
Python
saleor/checkout/__init__.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
19
2019-12-03T17:28:07.000Z
2021-09-10T21:30:52.000Z
saleor/checkout/__init__.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
51
2019-12-06T08:06:07.000Z
2021-05-06T02:10:50.000Z
saleor/checkout/__init__.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
20
2020-02-03T00:38:59.000Z
2022-01-03T13:07:52.000Z
import logging from django.utils.translation import pgettext_lazy logger = logging.getLogger(__name__) class AddressType: BILLING = "billing" SHIPPING = "shipping" CHOICES = [ (BILLING, pgettext_lazy("Type of address used to fulfill order", "Billing")), (SHIPPING, pgettext_lazy("Type of...
23.3125
87
0.69437
import logging from django.utils.translation import pgettext_lazy logger = logging.getLogger(__name__) class AddressType: BILLING = "billing" SHIPPING = "shipping" CHOICES = [ (BILLING, pgettext_lazy("Type of address used to fulfill order", "Billing")), (SHIPPING, pgettext_lazy("Type of...
true
true
1c17eacc374bd9a89d6194783b30787cdce36513
880
py
Python
letsencrypt-apache/letsencrypt_apache/constants.py
felixonmars/certbot
324ebf468db402dbe44ba780ed2df682ab99af86
[ "Apache-2.0" ]
null
null
null
letsencrypt-apache/letsencrypt_apache/constants.py
felixonmars/certbot
324ebf468db402dbe44ba780ed2df682ab99af86
[ "Apache-2.0" ]
null
null
null
letsencrypt-apache/letsencrypt_apache/constants.py
felixonmars/certbot
324ebf468db402dbe44ba780ed2df682ab99af86
[ "Apache-2.0" ]
null
null
null
"""Apache plugin constants.""" import pkg_resources CLI_DEFAULTS = dict( server_root="/etc/apache2", ctl="apache2ctl", enmod="a2enmod", dismod="a2dismod", init_script="/etc/init.d/apache2", le_vhost_ext="-le-ssl.conf", ) """CLI defaults.""" MOD_SSL_CONF_DEST = "options-ssl-apache.conf" """Nam...
29.333333
72
0.715909
import pkg_resources CLI_DEFAULTS = dict( server_root="/etc/apache2", ctl="apache2ctl", enmod="a2enmod", dismod="a2dismod", init_script="/etc/init.d/apache2", le_vhost_ext="-le-ssl.conf", ) MOD_SSL_CONF_DEST = "options-ssl-apache.conf" MOD_SSL_CONF_SRC = pkg_resources.resource_filename( ...
true
true
1c17eae16408ea367616d10438a768e2fc72c7f7
52,583
py
Python
tests/integration/test_validator.py
Informasjonsforvaltning/dcat-ap-no-validator-service
45c1f762429427591840a15ece4b70617d2f3c8a
[ "Apache-2.0" ]
1
2021-02-08T09:36:08.000Z
2021-02-08T09:36:08.000Z
tests/integration/test_validator.py
Informasjonsforvaltning/dcat-ap-no-validator-service
45c1f762429427591840a15ece4b70617d2f3c8a
[ "Apache-2.0" ]
63
2020-11-12T13:54:40.000Z
2022-03-14T12:04:31.000Z
tests/integration/test_validator.py
Informasjonsforvaltning/dcat-ap-no-validator-service
45c1f762429427591840a15ece4b70617d2f3c8a
[ "Apache-2.0" ]
null
null
null
"""Integration test cases for the validator route.""" import json from typing import Any, Dict from aiohttp import ClientError, hdrs, MultipartWriter from aiohttp.test_utils import TestClient as _TestClient from aioresponses import aioresponses import pytest from pytest_mock import MockFixture from rdflib import Grap...
38.158926
149
0.676378
import json from typing import Any, Dict from aiohttp import ClientError, hdrs, MultipartWriter from aiohttp.test_utils import TestClient as _TestClient from aioresponses import aioresponses import pytest from pytest_mock import MockFixture from rdflib import Graph from rdflib.compare import graph_diff, isomorphic ...
true
true
1c17eaf9c621072fecf239f3dd871a3ab8016ba8
7,280
py
Python
src/python/pants/base/cmd_line_spec_parser.py
lcary/pants
9ffe5262909ad9521e8cdf2beffd6e86330bd3bc
[ "Apache-2.0" ]
null
null
null
src/python/pants/base/cmd_line_spec_parser.py
lcary/pants
9ffe5262909ad9521e8cdf2beffd6e86330bd3bc
[ "Apache-2.0" ]
null
null
null
src/python/pants/base/cmd_line_spec_parser.py
lcary/pants
9ffe5262909ad9521e8cdf2beffd6e86330bd3bc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
41.83908
101
0.685577
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging import os import re import traceback from collections import defaultdict from twitter.common.collections import OrderedSet, maybe_list from pants.bas...
true
true
1c17ebb9c49605679ed9972610c46aa6c73adf4a
1,247
py
Python
mytest/testutil.py
ZhouSky/tianshou
253c5805def07355e10345222613a815c7eea823
[ "MIT" ]
null
null
null
mytest/testutil.py
ZhouSky/tianshou
253c5805def07355e10345222613a815c7eea823
[ "MIT" ]
null
null
null
mytest/testutil.py
ZhouSky/tianshou
253c5805def07355e10345222613a815c7eea823
[ "MIT" ]
null
null
null
import numpy as np import torch def generate_task_index(task_interval): task_ind = np.zeros((task_interval[-1]), dtype=np.int32) for i in range(task_interval.size - 1): task_ind[task_interval[i]: task_interval[i + 1]] = i return task_ind def compute_errors(output, task_ind, label, num_task): ...
31.974359
93
0.627907
import numpy as np import torch def generate_task_index(task_interval): task_ind = np.zeros((task_interval[-1]), dtype=np.int32) for i in range(task_interval.size - 1): task_ind[task_interval[i]: task_interval[i + 1]] = i return task_ind def compute_errors(output, task_ind, label, num_task): ...
true
true
1c17ebbe7d8dab925bc31262e59b3b209a731e0c
1,734
py
Python
base64.py
Test0000007/test
95123e722c4d81d9456c6a0361014fc3bdefa110
[ "MIT" ]
null
null
null
base64.py
Test0000007/test
95123e722c4d81d9456c6a0361014fc3bdefa110
[ "MIT" ]
null
null
null
base64.py
Test0000007/test
95123e722c4d81d9456c6a0361014fc3bdefa110
[ "MIT" ]
null
null
null
def base64Encode(hexs): text=b'' letters = b'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' b64 = hexs while(b64): b64text = b64[:3] b64 = b64[3:] xo = b64text[0] >> 2 text += bytes([letters[xo]]) if(len(b64text)%3 == 1): xo =(b64...
32.716981
118
0.486736
def base64Encode(hexs): text=b'' letters = b'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' b64 = hexs while(b64): b64text = b64[:3] b64 = b64[3:] xo = b64text[0] >> 2 text += bytes([letters[xo]]) if(len(b64text)%3 == 1): xo =(b64...
true
true
1c17ec43d9ff0ad0b8d730f8c426767279c1fbf9
4,476
py
Python
daq/docker_test.py
sdrayton1066/daq
c899de70b9643db564e6f2f800283a9f5629e7a7
[ "Apache-2.0" ]
null
null
null
daq/docker_test.py
sdrayton1066/daq
c899de70b9643db564e6f2f800283a9f5629e7a7
[ "Apache-2.0" ]
null
null
null
daq/docker_test.py
sdrayton1066/daq
c899de70b9643db564e6f2f800283a9f5629e7a7
[ "Apache-2.0" ]
null
null
null
"""Module for running docker-container tests""" import datetime import logging from clib import docker_host LOGGER = logging.getLogger('docker') class DockerTest(): """Class for running docker tests""" IMAGE_NAME_FORMAT = 'daq/test_%s' CONTAINER_PREFIX = 'daq' def __init__(self, runner, target_por...
39.610619
96
0.587802
import datetime import logging from clib import docker_host LOGGER = logging.getLogger('docker') class DockerTest(): IMAGE_NAME_FORMAT = 'daq/test_%s' CONTAINER_PREFIX = 'daq' def __init__(self, runner, target_port, tmpdir, test_name): self.target_port = target_port self.tmpdir = tmpdi...
true
true
1c17ed199bfb964c4fbbe1365d53b4fc0ce2c9a9
392
py
Python
website/identifiers/tasks.py
yuanyuan-deng/RDM-osf.io
e1c54e97c898d26406d71129db7e4baf82802224
[ "Apache-2.0" ]
1
2019-12-23T04:30:20.000Z
2019-12-23T04:30:20.000Z
website/identifiers/tasks.py
yuanyuan-deng/RDM-osf.io
e1c54e97c898d26406d71129db7e4baf82802224
[ "Apache-2.0" ]
20
2020-03-24T16:48:03.000Z
2022-03-08T22:38:38.000Z
website/identifiers/tasks.py
yuanyuan-deng/RDM-osf.io
e1c54e97c898d26406d71129db7e4baf82802224
[ "Apache-2.0" ]
1
2015-08-28T20:00:52.000Z
2015-08-28T20:00:52.000Z
from django.apps import apps from framework.celery_tasks import app as celery_app @celery_app.task(ignore_results=True) def update_doi_metadata_on_change(target_guid, status): Guid = apps.get_model('osf.Guid') target_object = Guid.load(target_guid).referent if target_object.get_identifier('doi'): ...
32.666667
78
0.785714
from django.apps import apps from framework.celery_tasks import app as celery_app @celery_app.task(ignore_results=True) def update_doi_metadata_on_change(target_guid, status): Guid = apps.get_model('osf.Guid') target_object = Guid.load(target_guid).referent if target_object.get_identifier('doi'): ...
true
true
1c17edbe637765671482b3af36b5a228a8436a94
2,256
py
Python
code/hw1/clip_plays.py
GrauleM/mltheoryseminar
10832f5b641c2b4a8ddf09ff55c85fa6791f56d3
[ "MIT" ]
null
null
null
code/hw1/clip_plays.py
GrauleM/mltheoryseminar
10832f5b641c2b4a8ddf09ff55c85fa6791f56d3
[ "MIT" ]
null
null
null
code/hw1/clip_plays.py
GrauleM/mltheoryseminar
10832f5b641c2b4a8ddf09ff55c85fa6791f56d3
[ "MIT" ]
null
null
null
def get_text_features(text): with torch.no_grad(): # Encode and normalize the description using CLIP text_encoded = model.encode_text(clip.tokenize(text).to(device)) text_encoded /= text_encoded.norm(dim=-1, keepdim=True) text_features = (text_encoded.cpu().numpy()) return text_feat...
38.896552
342
0.699911
def get_text_features(text): with torch.no_grad(): text_encoded = model.encode_text(clip.tokenize(text).to(device)) text_encoded /= text_encoded.norm(dim=-1, keepdim=True) text_features = (text_encoded.cpu().numpy()) return text_features def get_closest_photo_feature(text, photo_f...
true
true
1c17edda837a9eccfbafc49fbdb686f28b585787
599
py
Python
catalog/bindings/gmd/point_property.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/point_property.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/point_property.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from bindings.gmd.point_property_type import PointPropertyType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class PointProperty(PointPropertyType): """This property element either references a point via the XLink-attributes or contains the point element. poin...
29.95
79
0.746244
from dataclasses import dataclass from bindings.gmd.point_property_type import PointPropertyType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class PointProperty(PointPropertyType): class Meta: name = "pointProperty" namespace = "http://www.opengis.net/gml"
true
true
1c17ef09996fb3f3542369db8f51a11a59c022c7
15,532
py
Python
jsparagus/lr0.py
bakkot/jsparagus
70665b04e7cda8910972b0f4af05e17070db24ee
[ "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
jsparagus/lr0.py
bakkot/jsparagus
70665b04e7cda8910972b0f4af05e17070db24ee
[ "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
jsparagus/lr0.py
bakkot/jsparagus
70665b04e7cda8910972b0f4af05e17070db24ee
[ "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
"""Generate a simple LR0 state graph from a CanonicalGrammar. The resulting graph may contain inconsistent states, which must be resolved by the ParseTable before a parser can be generated. """ from __future__ import annotations # mypy: disallow-untyped-defs, disallow-incomplete-defs, disallow-untyped-calls import c...
39.723785
100
0.618336
from __future__ import annotations import collections from dataclasses import dataclass import typing from .actions import (Accept, Action, CheckNotOnNewLine, FunCall, Lookahead, OutputExpr, Reduce, Seq) from .ordered import OrderedFrozenSet from .grammar import (CallMethod, Element, End, Error...
true
true
1c17ef4a6df660d1314155154e23249149d0cb68
137
py
Python
core/src/trezor/messages/DebugLinkGetState.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
null
null
null
core/src/trezor/messages/DebugLinkGetState.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
1
2019-02-08T00:22:42.000Z
2019-02-13T09:41:54.000Z
core/src/trezor/messages/DebugLinkGetState.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
2
2019-02-07T23:57:09.000Z
2020-10-21T07:07:27.000Z
# Automatically generated by pb2py # fmt: off import protobuf as p class DebugLinkGetState(p.MessageType): MESSAGE_WIRE_TYPE = 101
17.125
39
0.773723
import protobuf as p class DebugLinkGetState(p.MessageType): MESSAGE_WIRE_TYPE = 101
true
true
1c17f0ab012efaeac55122a495256febe1a84af7
2,276
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_06_01/models/connection_state_snapshot.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
null
null
null
azure-mgmt-network/azure/mgmt/network/v2018_06_01/models/connection_state_snapshot.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
null
null
null
azure-mgmt-network/azure/mgmt/network/v2018_06_01/models/connection_state_snapshot.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
39.929825
77
0.641476
from msrest.serialization import Model class ConnectionStateSnapshot(Model): _validation = { 'hops': {'readonly': True}, } _attribute_map = { 'connection_state': {'key': 'connectionState', 'type': 'str'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'end_time'...
true
true
1c17f0ede524f165850ee51e4b9bdacbae3a8b69
3,199
py
Python
test.py
gohyojun15/CSRNet-pytorch
f52777657dd0136f056550465ce9b3b5c8ec416f
[ "MIT" ]
null
null
null
test.py
gohyojun15/CSRNet-pytorch
f52777657dd0136f056550465ce9b3b5c8ec416f
[ "MIT" ]
null
null
null
test.py
gohyojun15/CSRNet-pytorch
f52777657dd0136f056550465ce9b3b5c8ec416f
[ "MIT" ]
null
null
null
import argparse import torch import matplotlib.pyplot as plt import matplotlib.cm as CM from tqdm import tqdm from config import Config from model import CSRNet from dataset import create_train_dataloader, create_test_dataloader, CrowdDataset from utils import denormalize parser = argparse.ArgumentParser(description...
35.153846
83
0.709909
import argparse import torch import matplotlib.pyplot as plt import matplotlib.cm as CM from tqdm import tqdm from config import Config from model import CSRNet from dataset import create_train_dataloader, create_test_dataloader, CrowdDataset from utils import denormalize parser = argparse.ArgumentParser(description...
true
true
1c17f1247e23d374da10933bfbba1dd1ca932010
1,087
py
Python
Matriz - Eric e Rafaela/Q07 - Eric e Rafaela.py
RafaelaBF/Exercicios_Python_Grupo
03b983ab8b481fb7cdaf1bc9b84bb1c399abf538
[ "MIT" ]
2
2021-11-09T12:57:23.000Z
2021-11-09T12:57:31.000Z
Matriz - Eric e Rafaela/Q07 - Eric e Rafaela.py
Ericcastell/Exercicios_Python_Grupo
1581610bfa8905bc7e157fc8beb6c0efe103889e
[ "MIT" ]
null
null
null
Matriz - Eric e Rafaela/Q07 - Eric e Rafaela.py
Ericcastell/Exercicios_Python_Grupo
1581610bfa8905bc7e157fc8beb6c0efe103889e
[ "MIT" ]
null
null
null
'''Faça um programa que leia uma matriz 6x3 com números reais, calcule e mostre: (a) o maior elemento da matriz e sua respectiva posição (linha e coluna); (b) o menor elemento da matriz e sua respectiva posição.''' matriz = [] for i in range(6): linha = [] for j in range(3): linha.append(int(input(f'En...
33.96875
214
0.614535
matriz = [] for i in range(6): linha = [] for j in range(3): linha.append(int(input(f'Entre com A[{i}][{j}]:'))) matriz.append(linha); maior_linha = 0 maior_coluna = 0 maior = matriz[0][0] for i in range(6): for j in range(3): if maior < matriz[i][j]: maior = matriz...
true
true
1c17f1279b31277f40e89a07a338bb723242a176
4,730
py
Python
cilium/tests/common.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
663
2016-08-23T05:23:45.000Z
2022-03-29T00:37:23.000Z
cilium/tests/common.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
6,642
2016-06-09T16:29:20.000Z
2022-03-31T22:24:09.000Z
cilium/tests/common.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
1,222
2017-01-27T15:51:38.000Z
2022-03-31T18:17:51.000Z
# (C) Datadog, Inc. 2019-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os CHECK_NAME = 'cilium' NAMESPACE = 'cilium.' CILIUM_VERSION = os.getenv('CILIUM_VERSION') AGENT_DEFAULT_METRICS = [ 'cilium.agent.api_process_time.seconds.count', 'cilium.agent.api_proce...
40.42735
66
0.745455
import os CHECK_NAME = 'cilium' NAMESPACE = 'cilium.' CILIUM_VERSION = os.getenv('CILIUM_VERSION') AGENT_DEFAULT_METRICS = [ 'cilium.agent.api_process_time.seconds.count', 'cilium.agent.api_process_time.seconds.sum', 'cilium.agent.bootstrap.seconds.count', 'cilium.agent.bootstrap.seconds.sum', 'ci...
true
true
1c17f1879fa6614360ca787067c82acdc64c5127
232
py
Python
impyute/dataset/__init__.py
PavanTejaDokku/impyute
809136469c45985e3468b999de2fdd3de538b51f
[ "MIT" ]
null
null
null
impyute/dataset/__init__.py
PavanTejaDokku/impyute
809136469c45985e3468b999de2fdd3de538b51f
[ "MIT" ]
null
null
null
impyute/dataset/__init__.py
PavanTejaDokku/impyute
809136469c45985e3468b999de2fdd3de538b51f
[ "MIT" ]
null
null
null
""" Real-world/mock datasets and missingness corruptors to experiment with. """ from .base import randu from .base import randn from .base import test_data from .base import mnist __all__ = ["randu", "randn", "test_data", "mnist"]
23.2
71
0.741379
from .base import randu from .base import randn from .base import test_data from .base import mnist __all__ = ["randu", "randn", "test_data", "mnist"]
true
true
1c17f1a9eea09860000d9a7a9b51220f7cf093a7
13,375
py
Python
server/handler/wpahandler.py
e-sailing/avnav
b3e8df4d6fa122b05309eee09197c716e29b64ec
[ "MIT" ]
null
null
null
server/handler/wpahandler.py
e-sailing/avnav
b3e8df4d6fa122b05309eee09197c716e29b64ec
[ "MIT" ]
null
null
null
server/handler/wpahandler.py
e-sailing/avnav
b3e8df4d6fa122b05309eee09197c716e29b64ec
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ts=2 sw=2 et ai ############################################################################### # Copyright (c) 2012,2013 Andreas Vogel andreas@wellenvogel.net # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and a...
36.947514
141
0.645458
import json import time import avnav_handlerList from avnav_config import AVNConfig from avnav_util import * from avnav_worker import * from wpa_control import WpaControl class FwInfo: def __init__(self,ssid,mode,status): self.ssid=ssid self.mode=mode self.status=status class AVNWpaHandler(AVNWorker)...
true
true
1c17f1eb8ebbc7fe21baf5b1e370786dc8e1eea2
38
py
Python
src/config/__init__.py
IngridNavarroA/SqueezeSeg
e1c0e4b850c20bba309fb857f3af6a1756cfceb1
[ "BSD-2-Clause" ]
5
2018-10-25T09:11:29.000Z
2019-06-18T09:48:46.000Z
src/config/__init__.py
navarrs/squeeze-seg
e1c0e4b850c20bba309fb857f3af6a1756cfceb1
[ "BSD-2-Clause" ]
null
null
null
src/config/__init__.py
navarrs/squeeze-seg
e1c0e4b850c20bba309fb857f3af6a1756cfceb1
[ "BSD-2-Clause" ]
null
null
null
from kitti_squeezeSeg_config import *
19
37
0.868421
from kitti_squeezeSeg_config import *
true
true
1c17f20abbea2f8c20def762ce2f9dd1d4b61c76
2,015
py
Python
tests/test_plugins.py
iopipe/iopipe-python
9bf0620bab732e82a9addcee250eabb9c0cc649f
[ "Apache-2.0" ]
74
2016-08-18T14:26:50.000Z
2021-11-21T10:58:32.000Z
tests/test_plugins.py
vemel/iopipe-python
46c277f9447ddb00e544437ceaa7ba263a759c1d
[ "Apache-2.0" ]
198
2016-08-18T18:52:43.000Z
2021-05-09T10:01:14.000Z
tests/test_plugins.py
vemel/iopipe-python
46c277f9447ddb00e544437ceaa7ba263a759c1d
[ "Apache-2.0" ]
23
2016-08-04T23:22:21.000Z
2020-01-20T13:54:27.000Z
import pytest from iopipe.contrib.trace import TracePlugin from iopipe.plugins import get_plugin_meta, is_plugin, Plugin def test_plugins_incomplete_interface(): """Assert that a TypeError is raised if a plugin doesn't implmement the interface""" class IncompletePlugin1(Plugin): pass with pytes...
23.16092
88
0.610422
import pytest from iopipe.contrib.trace import TracePlugin from iopipe.plugins import get_plugin_meta, is_plugin, Plugin def test_plugins_incomplete_interface(): class IncompletePlugin1(Plugin): pass with pytest.raises(TypeError) as e: IncompletePlugin1() assert "Can't instantiate abst...
true
true
1c17f41efd85276235a8a9d3f295f61f6bc8eb93
3,526
py
Python
blink/candidate_retrieval/json_data_generation.py
pbmstrk/BLINK
7380cf7d63ff76563f017adc39fa5729ba36742a
[ "MIT" ]
865
2019-10-02T21:30:49.000Z
2022-03-30T08:02:31.000Z
blink/candidate_retrieval/json_data_generation.py
pbmstrk/BLINK
7380cf7d63ff76563f017adc39fa5729ba36742a
[ "MIT" ]
96
2019-12-01T02:22:51.000Z
2022-03-11T15:32:16.000Z
blink/candidate_retrieval/json_data_generation.py
pbmstrk/BLINK
7380cf7d63ff76563f017adc39fa5729ba36742a
[ "MIT" ]
167
2019-10-12T00:34:28.000Z
2022-03-27T14:24:44.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 argparse import pickle import json import emoji import sys import os import io import blink.candidate_retrieval.ut...
31.482143
115
0.718945
import argparse import pickle import json import emoji import sys import os import io import blink.candidate_retrieval.utils as utils from tqdm import tqdm parser = argparse.ArgumentParser() parser.add_argument( "--processed_mention_data_file_path", type=str, help="The full path to the mention data file...
true
true
1c17f4792938c30486a09ba68c70e96a4ba41de3
29
py
Python
jetbrains-academy/Zookeeper/Problems/Single-element list/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
5
2020-08-29T15:15:31.000Z
2022-03-01T18:22:34.000Z
jetbrains-academy/Zookeeper/Problems/Single-element list/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
null
null
null
jetbrains-academy/Zookeeper/Problems/Single-element list/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
1
2020-09-20T11:48:16.000Z
2020-09-20T11:48:16.000Z
name = ['Helen'] print(name)
9.666667
16
0.62069
name = ['Helen'] print(name)
true
true
1c17f5150e522940b3b44d81eb12700f736759c3
2,267
py
Python
samples/cli/accelbyte_py_sdk_cli/platform/_rollback_published_store.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
samples/cli/accelbyte_py_sdk_cli/platform/_rollback_published_store.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
samples/cli/accelbyte_py_sdk_cli/platform/_rollback_published_store.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template_file: python-cli-command.j2 # justice-platform-service (4.10.0) # pylint: disable=duplicate-co...
32.385714
103
0.751654
import json import yaml from typing import Optional import click from .._utils import login_as as login_as_internal from .._utils import to_dict from accelbyte_py_sdk.api.platform import rollback_published_store as rollback_published_store_internal from accelbyte_py_sdk.api.platform.models import ErrorEntity from...
true
true
1c17f53b3acb03b17fb983442adb7caa872f2839
506
py
Python
global_stopwords/settings.py
pcinkh/global-stopwords
9cd64fd61bec1f52f772a4b490299d74cede8604
[ "Apache-2.0" ]
4
2017-06-17T15:34:18.000Z
2018-09-17T02:43:07.000Z
global_stopwords/settings.py
pcinkh/global-stopwords
9cd64fd61bec1f52f772a4b490299d74cede8604
[ "Apache-2.0" ]
1
2017-12-14T05:24:31.000Z
2017-12-14T05:24:31.000Z
global_stopwords/settings.py
pcinkh/global-stopwords
9cd64fd61bec1f52f772a4b490299d74cede8604
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os import tempfile __version__ = '0.0.1' CACHE_FILE = os.path.join( tempfile.gettempdir(), 'global_stopwords_{version}.json'.format(version=__version__), ) STOPWORDS_VERSION = 'v1.2.0' STOPWORDS_URL = 'https://raw.githu...
20.24
123
0.747036
from __future__ import absolute_import, unicode_literals import os import tempfile __version__ = '0.0.1' CACHE_FILE = os.path.join( tempfile.gettempdir(), 'global_stopwords_{version}.json'.format(version=__version__), ) STOPWORDS_VERSION = 'v1.2.0' STOPWORDS_URL = 'https://raw.githubusercontent.com/6/stopw...
true
true
1c17f660a03c3453727f130da8e5e1a51dc4fcff
1,728
py
Python
client/PRESUBMIT.py
stefb965/luci-py
e0a8a5640c4104e5c90781d833168aa8a8d1f24d
[ "Apache-2.0" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
tools/swarming_client/PRESUBMIT.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
tools/swarming_client/PRESUBMIT.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2012 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Top-level presubmit script for swarm_client. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the pr...
29.793103
79
0.710648
def CommonChecks(input_api, output_api): import sys def join(*args): return input_api.os_path.join(input_api.PresubmitLocalPath(), *args) output = [] sys_path_backup = sys.path try: sys.path = [ input_api.PresubmitLocalPath(), join('tests'), join('third_party'), ] + sys.path ...
true
true
1c17f7dedc739bf2d87966ccb32f25c695611d11
7,112
py
Python
tic-tac-toe.py
Exide/tic-tac-toe
fad4eef89aa9134e8132148cb74814e1f9237041
[ "MIT" ]
null
null
null
tic-tac-toe.py
Exide/tic-tac-toe
fad4eef89aa9134e8132148cb74814e1f9237041
[ "MIT" ]
null
null
null
tic-tac-toe.py
Exide/tic-tac-toe
fad4eef89aa9134e8132148cb74814e1f9237041
[ "MIT" ]
null
null
null
import os class Console: data = list() data.append('') data.append('Tic-Tac-Toe') data.append('by Ryan Zander (c) May 2012') data.append('') data.append('As a challenge to myself I made this while drinking') data.append('and playing Settlers of Catan at a birthday beach party.') data.a...
31.75
99
0.517576
import os class Console: data = list() data.append('') data.append('Tic-Tac-Toe') data.append('by Ryan Zander (c) May 2012') data.append('') data.append('As a challenge to myself I made this while drinking') data.append('and playing Settlers of Catan at a birthday beach party.') data.a...
false
true
1c17f8e07c9a13b44f4406e03ecda56320cdcec9
17,739
py
Python
mygeotab/api.py
eyazrgeotab/mygeotab-python
860ea1c214831372a6dafb7ce016367b73fc67a5
[ "Apache-2.0" ]
40
2015-08-20T16:13:52.000Z
2022-01-07T13:30:27.000Z
mygeotab/api.py
eyazrgeotab/mygeotab-python
860ea1c214831372a6dafb7ce016367b73fc67a5
[ "Apache-2.0" ]
227
2015-08-20T17:41:07.000Z
2022-01-15T01:57:26.000Z
mygeotab/api.py
eyazrgeotab/mygeotab-python
860ea1c214831372a6dafb7ce016367b73fc67a5
[ "Apache-2.0" ]
17
2016-05-12T16:06:32.000Z
2022-01-10T19:03:40.000Z
# -*- coding: utf-8 -*- """ mygeotab.api ~~~~~~~~~~~~ Public objects and methods wrapping the MyGeotab API. """ from __future__ import unicode_literals import copy import re import ssl import sys import requests from requests.adapters import HTTPAdapter from requests.exceptions import Timeout from requests.package...
39.952703
118
0.649022
from __future__ import unicode_literals import copy import re import ssl import sys import requests from requests.adapters import HTTPAdapter from requests.exceptions import Timeout from requests.packages import urllib3 from six.moves.urllib.parse import urlparse from . import __title__, __version__ from .exceptio...
true
true
1c17f981cfdbf8c5761a6fbf226930e73869e914
2,613
py
Python
tests/test_parental.py
Soneydom13/python-adguardhome
8e6b027630d9819112313ffe85c0866ea227ebe8
[ "MIT" ]
null
null
null
tests/test_parental.py
Soneydom13/python-adguardhome
8e6b027630d9819112313ffe85c0866ea227ebe8
[ "MIT" ]
null
null
null
tests/test_parental.py
Soneydom13/python-adguardhome
8e6b027630d9819112313ffe85c0866ea227ebe8
[ "MIT" ]
1
2021-02-19T01:14:50.000Z
2021-02-19T01:14:50.000Z
"""Tests for `adguardhome.parental`.""" import aiohttp import pytest from adguardhome import AdGuardHome from adguardhome.exceptions import AdGuardHomeError @pytest.mark.asyncio async def test_enabled(aresponses): """Test request of current AdGuard Home parental control status.""" aresponses.add( "exa...
30.383721
80
0.625718
import aiohttp import pytest from adguardhome import AdGuardHome from adguardhome.exceptions import AdGuardHomeError @pytest.mark.asyncio async def test_enabled(aresponses): aresponses.add( "example.com:3000", "/control/parental/status", "GET", aresponses.Response( stat...
true
true
1c17fa1d4bd88dbc6e5333d66c76c34f50104992
740
py
Python
flowtorch/bijectors/spline.py
facebookincubator/flowtorch
04ab9c0093b15af1706c807ce4a3e17deb62c992
[ "MIT" ]
207
2021-11-29T08:32:56.000Z
2022-03-24T15:13:16.000Z
flowtorch/bijectors/spline.py
facebookincubator/flowtorch
04ab9c0093b15af1706c807ce4a3e17deb62c992
[ "MIT" ]
16
2021-11-29T04:20:59.000Z
2022-03-03T17:30:49.000Z
flowtorch/bijectors/spline.py
facebookincubator/flowtorch
04ab9c0093b15af1706c807ce4a3e17deb62c992
[ "MIT" ]
13
2021-11-29T03:29:10.000Z
2022-03-31T19:52:37.000Z
# Copyright (c) Meta Platforms, Inc from typing import Optional import flowtorch import torch from flowtorch.bijectors.elementwise import Elementwise from flowtorch.bijectors.ops.spline import Spline as SplineOp class Spline(SplineOp, Elementwise): def __init__( self, params_fn: Optional[flowtor...
24.666667
61
0.605405
from typing import Optional import flowtorch import torch from flowtorch.bijectors.elementwise import Elementwise from flowtorch.bijectors.ops.spline import Spline as SplineOp class Spline(SplineOp, Elementwise): def __init__( self, params_fn: Optional[flowtorch.Lazy] = None, *, ...
true
true
1c17fc32c72974670e918ec8e51564f762b4edf7
197
py
Python
cm_custom/doc_events/xz_report.py
libermatic/cm_custom
e05d17713bb10360bd33f24bbed45d43e3aea7cf
[ "MIT" ]
1
2022-01-10T12:36:17.000Z
2022-01-10T12:36:17.000Z
cm_custom/doc_events/xz_report.py
libermatic/cm_custom
e05d17713bb10360bd33f24bbed45d43e3aea7cf
[ "MIT" ]
null
null
null
cm_custom/doc_events/xz_report.py
libermatic/cm_custom
e05d17713bb10360bd33f24bbed45d43e3aea7cf
[ "MIT" ]
1
2022-01-10T12:36:18.000Z
2022-01-10T12:36:18.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import frappe def before_save(doc, method): doc.cm_branch = frappe.get_cached_value("POS Profile", doc.pos_profile, "branch")
21.888889
85
0.736041
from __future__ import unicode_literals import frappe def before_save(doc, method): doc.cm_branch = frappe.get_cached_value("POS Profile", doc.pos_profile, "branch")
true
true
1c17fc82cf11bf6883f50edcc125488548d64d55
9,714
py
Python
nuitka/codegen/ComparisonCodes.py
ronnymajani/Nuitka
0083a931e0bd085e4ac9991074b3b8bc05be52b1
[ "Apache-2.0" ]
null
null
null
nuitka/codegen/ComparisonCodes.py
ronnymajani/Nuitka
0083a931e0bd085e4ac9991074b3b8bc05be52b1
[ "Apache-2.0" ]
null
null
null
nuitka/codegen/ComparisonCodes.py
ronnymajani/Nuitka
0083a931e0bd085e4ac9991074b3b8bc05be52b1
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
37.945313
87
0.646901
from nuitka.containers.oset import OrderedSet from nuitka.nodes.shapes.BuiltinTypeShapes import tshape_bool from . import OperatorCodes from .CodeHelpers import generateExpressionCode, pickCodeHelper from .ErrorCodes import getErrorExitBoolCode, getReleaseCodes specialized_cmp_helpers_set = OrderedSet( ( ...
true
true
1c17fd9a8d12e05206e1be69cc31172fcec363be
14,293
py
Python
infra/cifuzz/continuous_integration.py
williamcroberts/oss-fuzz
42934572e88a0831eac03173eceefd54ab974edf
[ "Apache-2.0" ]
null
null
null
infra/cifuzz/continuous_integration.py
williamcroberts/oss-fuzz
42934572e88a0831eac03173eceefd54ab974edf
[ "Apache-2.0" ]
null
null
null
infra/cifuzz/continuous_integration.py
williamcroberts/oss-fuzz
42934572e88a0831eac03173eceefd54ab974edf
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.839674
94
0.709368
import os import collections import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import build_specified_commit import docker import helper import repo_manager import retry import utils import workspace_utils BuildPreparationResult = collections.namedtuple( 'Bui...
true
true
1c17feffe954270c8e45e2e8a908701094d9ae51
2,047
py
Python
ithkuilbot.py
KitN/IthkuilHelpBot
c6830e5e67d553fdad1bbd18020bd528580e7f71
[ "MIT" ]
null
null
null
ithkuilbot.py
KitN/IthkuilHelpBot
c6830e5e67d553fdad1bbd18020bd528580e7f71
[ "MIT" ]
1
2016-01-11T10:59:04.000Z
2016-06-05T08:52:29.000Z
ithkuilbot.py
KitN/IthkuilHelpBot
c6830e5e67d553fdad1bbd18020bd528580e7f71
[ "MIT" ]
null
null
null
import praw import csv import time #The strings that will 'summon' the bot: prawWords = ['!ithkuil', 'everybody'] botusername = 'IthkuilRobot' botuserpass = 'password' #placeholder #What to tell reddit my bot is called. user_agent = ("/r/ithkuil Lookup Bot 1.0 by /u/Archare") #The reddit object r = praw.Reddit(user_...
29.242857
72
0.660967
import praw import csv import time prawWords = ['!ithkuil', 'everybody'] botusername = 'IthkuilRobot' botuserpass = 'password' user_agent = ("/r/ithkuil Lookup Bot 1.0 by /u/Archare") r = praw.Reddit(user_agent=user_agent) r.login(username='IthkuilRobot') abbrev = {} with open('shortab.csv') as f: reader = cs...
false
true
1c17ffd7eef344e17460dd3cca2f2df42e8196bc
5,295
py
Python
tasks/semantic/modules/user.py
voxel-scape/voxel-scape-api
d04fd9bd530ec3be7a3372562aea824fb2dcacc9
[ "MIT" ]
null
null
null
tasks/semantic/modules/user.py
voxel-scape/voxel-scape-api
d04fd9bd530ec3be7a3372562aea824fb2dcacc9
[ "MIT" ]
null
null
null
tasks/semantic/modules/user.py
voxel-scape/voxel-scape-api
d04fd9bd530ec3be7a3372562aea824fb2dcacc9
[ "MIT" ]
1
2021-07-28T07:34:34.000Z
2021-07-28T07:34:34.000Z
#!/usr/bin/env python3 # This file is covered by the LICENSE file in the root of this project. import torch import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn import torchvision.transforms as transforms import imp import yaml import time from PIL import Image import __init__ as boog...
34.16129
139
0.547875
import torch import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn import torchvision.transforms as transforms import imp import yaml import time from PIL import Image import __init__ as booger import collections import copy import cv2 import os import numpy as np from tasks.semantic....
true
true
1c17ffe2c3d2f1a06a18e01a11bf8798e76160f4
904
py
Python
appengine/cr-buildbucket/test/tokens_test.py
xswz8015/infra
f956b78ce4c39cc76acdda47601b86794ae0c1ba
[ "BSD-3-Clause" ]
null
null
null
appengine/cr-buildbucket/test/tokens_test.py
xswz8015/infra
f956b78ce4c39cc76acdda47601b86794ae0c1ba
[ "BSD-3-Clause" ]
4
2022-03-17T18:58:21.000Z
2022-03-17T18:58:22.000Z
appengine/cr-buildbucket/test/tokens_test.py
xswz8015/infra
f956b78ce4c39cc76acdda47601b86794ae0c1ba
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2018 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 components import auth from components.auth import b64 from go.chromium.org.luci.buildbucket.proto import token_pb2 from testing_utils import testing i...
29.16129
72
0.764381
from components import auth from components.auth import b64 from go.chromium.org.luci.buildbucket.proto import token_pb2 from testing_utils import testing import tokens def validate_build_token(token): try: binary = b64.decode(token) env = token_pb2.TokenEnvelope() env.MergeFromString(binary) body...
true
true
1c180106fc45593fabb734ba63d1c6f707a634b7
453
py
Python
resources/eightball_responses.py
Casheh/py-bot
2bf26a908c0865af82623b03b66729fac87fd3f4
[ "Apache-2.0" ]
1
2021-05-11T22:59:02.000Z
2021-05-11T22:59:02.000Z
resources/eightball_responses.py
Casheh/py-bot
2bf26a908c0865af82623b03b66729fac87fd3f4
[ "Apache-2.0" ]
null
null
null
resources/eightball_responses.py
Casheh/py-bot
2bf26a908c0865af82623b03b66729fac87fd3f4
[ "Apache-2.0" ]
null
null
null
responses = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Conce...
22.65
31
0.613687
responses = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Conce...
true
true
1c18033f1a1aed850ef53ccecd3ba84faef602c5
827
gyp
Python
build/linux/unbundle/libusb.gyp
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
build/linux/unbundle/libusb.gyp
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
8
2015-08-31T06:39:59.000Z
2021-12-04T14:53:28.000Z
build/linux/unbundle/libusb.gyp
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# Copyright 2013 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. { 'targets': [ { 'target_name': 'libusb', 'type': 'none', 'variables': { 'headers_root_path': 'src/libusb', 'header_f...
23.628571
73
0.474002
{ 'targets': [ { 'target_name': 'libusb', 'type': 'none', 'variables': { 'headers_root_path': 'src/libusb', 'header_filenames': [ 'libusb.h', ], }, 'includes': [ '../../build/shim_headers.gypi', ], 'direct_dependent_settings': { ...
true
true
1c18040f34e24be128c7ebd335cee1b404cb4500
819
py
Python
data_utils.py
hiyouga/SAGAN-PyTorch
e469cfa47e4317dce910c54687e9d24f571d6f2b
[ "MIT" ]
2
2021-12-16T12:08:00.000Z
2022-01-12T05:54:29.000Z
data_utils.py
hiyouga/SAGAN-PyTorch
e469cfa47e4317dce910c54687e9d24f571d6f2b
[ "MIT" ]
null
null
null
data_utils.py
hiyouga/SAGAN-PyTorch
e469cfa47e4317dce910c54687e9d24f571d6f2b
[ "MIT" ]
null
null
null
from torch.utils.data import DataLoader from torchvision import datasets, transforms def load_data(im_size, batch_size, workers, dataset, data_path): transform = transforms.Compose([ transforms.Resize((im_size, im_size)), transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0...
37.227273
93
0.583639
from torch.utils.data import DataLoader from torchvision import datasets, transforms def load_data(im_size, batch_size, workers, dataset, data_path): transform = transforms.Compose([ transforms.Resize((im_size, im_size)), transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0...
true
true
1c180487fd3a946a7acb8072aa0d8eda07ef6564
8,368
py
Python
app.py
ManpreetBahl/inventory
6dc66c485f5224e739769fa9690d86c6342e8a8b
[ "MIT" ]
null
null
null
app.py
ManpreetBahl/inventory
6dc66c485f5224e739769fa9690d86c6342e8a8b
[ "MIT" ]
null
null
null
app.py
ManpreetBahl/inventory
6dc66c485f5224e739769fa9690d86c6342e8a8b
[ "MIT" ]
null
null
null
################################################################################# # Inventory Management System # Manpreet Bahl # CS 510- Full Stack Project # The Python Flask tutorial played a key role to the structure and development # of the backend. The link to the Flask tutorial can be found here: # http:/...
47.011236
147
0.480163
from flask import Flask from flask import request from flask import render_template from flask import redirect from flask import url_for from flask import abort import sys import smtplib from email.mime.text import MIMEText import sqlalchemy from sqlalchemy import create_engine from sqlalchemy import Tabl...
false
true
1c1804e156e9f5d99e31884aa257159abc7af980
777
py
Python
demo/py/vid_cont.py
berak/opencv_smallfry
fd8f64980dff0527523791984d6cb3dfcd2bc9bc
[ "BSD-3-Clause" ]
57
2015-02-16T06:43:24.000Z
2022-03-16T06:21:36.000Z
demo/py/vid_cont.py
berak/opencv_smallfry
fd8f64980dff0527523791984d6cb3dfcd2bc9bc
[ "BSD-3-Clause" ]
4
2016-03-08T09:51:09.000Z
2021-03-29T10:18:55.000Z
demo/py/vid_cont.py
berak/opencv_smallfry
fd8f64980dff0527523791984d6cb3dfcd2bc9bc
[ "BSD-3-Clause" ]
27
2015-03-28T19:55:34.000Z
2022-01-09T15:03:15.000Z
import numpy as np import cv2 import copy cap = cv2.VideoCapture(0) while(True): ret, img = cap.read() clone = copy.copy(img) gray_image = cv2.cvtColor(clone, cv2.COLOR_BGR2GRAY) ret, thresh = cv2.threshold(gray_image,127,255,1) # contours,h = cv2.findContours(thresh,1,2) contours, h = cv2.f...
25.064516
76
0.629344
import numpy as np import cv2 import copy cap = cv2.VideoCapture(0) while(True): ret, img = cap.read() clone = copy.copy(img) gray_image = cv2.cvtColor(clone, cv2.COLOR_BGR2GRAY) ret, thresh = cv2.threshold(gray_image,127,255,1) contours, h = cv2.findContours(thresh,1,2) for cnt in cont...
false
true
1c180586ee513a53dbd3af7521f374fc304bbe6f
4,975
py
Python
configs/sdc/roi_transform_r50_fpn.py
GuoBo98/ShipDet
2979c39c5a56be3b99ba77833cfe556a8a0fc97e
[ "Apache-2.0" ]
null
null
null
configs/sdc/roi_transform_r50_fpn.py
GuoBo98/ShipDet
2979c39c5a56be3b99ba77833cfe556a8a0fc97e
[ "Apache-2.0" ]
null
null
null
configs/sdc/roi_transform_r50_fpn.py
GuoBo98/ShipDet
2979c39c5a56be3b99ba77833cfe556a8a0fc97e
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='ROI_Transfomer', #pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, ...
32.305195
95
0.51397
model = dict( type='ROI_Transfomer', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pytorch'), neck=dict( type='F...
true
true
1c1805ca5d88734735893bd9730a38ff8b31037b
8,235
py
Python
plotly/graph_objs/histogram/marker/colorbar/_titlefont.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
1
2018-07-16T01:51:47.000Z
2018-07-16T01:51:47.000Z
plotly/graph_objs/histogram/marker/colorbar/_titlefont.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/graph_objs/histogram/marker/colorbar/_titlefont.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType import copy class Titlefont(BaseTraceHierarchyType): # color # ----- @property def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string...
37.262443
80
0.569885
from plotly.basedatatypes import BaseTraceHierarchyType import copy class Titlefont(BaseTraceHierarchyType): @property def color(self): return self['color'] @color.setter def color(self, val): self['color'] = val @property def family(self): return sel...
true
true
1c1805cb00957b0a046d63d9db55a2f1e19b1095
221,605
py
Python
modules/templates/RMSAmericas/config.py
flavour/RMS
1472859338690d15310743ed1d7a4092f4721f8d
[ "MIT" ]
null
null
null
modules/templates/RMSAmericas/config.py
flavour/RMS
1472859338690d15310743ed1d7a4092f4721f8d
[ "MIT" ]
null
null
null
modules/templates/RMSAmericas/config.py
flavour/RMS
1472859338690d15310743ed1d7a4092f4721f8d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from collections import OrderedDict from gluon import current from gluon.storage import Storage from s3 import S3Method from .controllers import deploy_index RED_CROSS = "Red Cross / Red Crescent" def config(settings): """ Template settings for IFRC's Resource M...
42.226563
192
0.451903
import datetime from collections import OrderedDict from gluon import current from gluon.storage import Storage from s3 import S3Method from .controllers import deploy_index RED_CROSS = "Red Cross / Red Crescent" def config(settings): T = current.T settings.base.system_name = T("Resource Man...
true
true
1c18062c48b0132aea7a42d4240e5a3a01817ecb
25,927
py
Python
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_tokens_operations.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_tokens_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_tokens_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
45.090435
207
0.662128
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineRes...
true
true
1c180663dbebab80f0a78732f8a68228efb2d3d4
40,479
py
Python
tensorflow/contrib/data/python/ops/readers.py
kuo1220/verbose-barnacle
0a1b9ed01e48092f4167e366cf7496c2b111ef6d
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/data/python/ops/readers.py
kuo1220/verbose-barnacle
0a1b9ed01e48092f4167e366cf7496c2b111ef6d
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/data/python/ops/readers.py
kuo1220/verbose-barnacle
0a1b9ed01e48092f4167e366cf7496c2b111ef6d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.685294
89
0.69016
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import csv import numpy as np from tensorflow.contrib.data.python.ops import batching from tensorflow.contrib.data.python.ops import gen_dataset_ops as contrib_gen_dataset_ops from tensorfl...
true
true
1c18068d5567e35b294ba2a99ab92e53ec1cc61b
12,209
py
Python
setup.py
Hirni-Meshram2/aerospike-client-python
4516a50c3978e4e47702b4f035ecbbbbbdaa3131
[ "Apache-2.0" ]
null
null
null
setup.py
Hirni-Meshram2/aerospike-client-python
4516a50c3978e4e47702b4f035ecbbbbbdaa3131
[ "Apache-2.0" ]
null
null
null
setup.py
Hirni-Meshram2/aerospike-client-python
4516a50c3978e4e47702b4f035ecbbbbbdaa3131
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ # Copyright 2013-2021 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at ...
38.153125
99
0.501433
from __future__ import print_function from subprocess import Popen import os import platform import sys from setuptools import setup, Extension os.putenv('ARCHFLAGS', '-arch x86_64') os.environ['ARCHFLAGS'] = '-arch x86_64' AEROSPIKE_C_VERSION = os.getenv('AEROSPIKE_C_VERSION') if not AEROSPIKE_C_VERSION: AEROSP...
true
true
1c1806ed0f6d516b9f914ca1fbf2ab1eb4460f68
15,650
py
Python
Lab2/gobang_2.py
Busdriver26/Artificial-Intelligence-Lab
08f7906112584343dfa1f65bf8c62fab6c3a7ac3
[ "MIT" ]
null
null
null
Lab2/gobang_2.py
Busdriver26/Artificial-Intelligence-Lab
08f7906112584343dfa1f65bf8c62fab6c3a7ac3
[ "MIT" ]
null
null
null
Lab2/gobang_2.py
Busdriver26/Artificial-Intelligence-Lab
08f7906112584343dfa1f65bf8c62fab6c3a7ac3
[ "MIT" ]
null
null
null
import pygame import copy import time EMPTY = 0 BLACK = 1 WHITE = 2 ROW = COL = 15 black_color = [0,0,0] white_color = [255,255,255] class RenjuBoard(object): def __init__(self): # self._board = [[EMPTY] * 15 for _ in range(15)] # self._board = [[None] * 15 ] * 15 self._board = [[]] * 15...
30.86785
104
0.427476
import pygame import copy import time EMPTY = 0 BLACK = 1 WHITE = 2 ROW = COL = 15 black_color = [0,0,0] white_color = [255,255,255] class RenjuBoard(object): def __init__(self): self._board = [[]] * 15 self.jdg = 0 self.reset() def reset(self): for row in ra...
true
true
1c180714fed59f3b3573f87a7588fcb02bb56044
9,490
py
Python
python/ls8_fai.py
SERVIR/water-quality-gee
bcf2f2cdda554d57894b619ec913bbce8b23ef13
[ "MIT" ]
49
2018-03-09T16:15:06.000Z
2022-03-03T22:12:04.000Z
python/ls8_fai.py
oliverblues/water-quality-gee
bcf2f2cdda554d57894b619ec913bbce8b23ef13
[ "MIT" ]
1
2020-12-17T20:50:23.000Z
2021-01-25T10:18:44.000Z
python/ls8_fai.py
oliverblues/water-quality-gee
bcf2f2cdda554d57894b619ec913bbce8b23ef13
[ "MIT" ]
23
2019-01-18T18:16:20.000Z
2022-03-24T15:23:01.000Z
import ee from ee.ee_exception import EEException try: ee.Initialize() except EEException as e: from oauth2client.service_account import ServiceAccountCredentials credentials = ServiceAccountCredentials.from_p12_keyfile( service_account_email='', filename='', private_key_password='notasecret', ...
34.889706
269
0.68314
import ee from ee.ee_exception import EEException try: ee.Initialize() except EEException as e: from oauth2client.service_account import ServiceAccountCredentials credentials = ServiceAccountCredentials.from_p12_keyfile( service_account_email='', filename='', private_key_password='notasecret', ...
false
true
1c1807857629639619477d2ea7cd5e2360c26a19
925
py
Python
vet_care/scripts/create_patient.py
neerajvkn/vet_care
14914b22e7a83265d736f9f9dc5186271ae62d66
[ "MIT" ]
2
2020-11-23T11:14:32.000Z
2021-02-03T06:40:33.000Z
vet_care/scripts/create_patient.py
neerajvkn/vet_care
14914b22e7a83265d736f9f9dc5186271ae62d66
[ "MIT" ]
null
null
null
vet_care/scripts/create_patient.py
neerajvkn/vet_care
14914b22e7a83265d736f9f9dc5186271ae62d66
[ "MIT" ]
7
2019-11-16T14:36:33.000Z
2021-08-25T07:54:51.000Z
import frappe import csv animals = [] # bench execute vet_care.scripts.create_patient.execute --args "['./new_patients.csv']" def execute(filename): with open(filename, 'r') as csvfile: reader = csv.DictReader(csvfile) for row in reader: print(f'Importing {row.get("vc_cirrusvet")}...'...
31.896552
87
0.516757
import frappe import csv animals = [] def execute(filename): with open(filename, 'r') as csvfile: reader = csv.DictReader(csvfile) for row in reader: print(f'Importing {row.get("vc_cirrusvet")}...') patient = frappe.new_doc('Patient') patient.update({ ...
true
true
1c1807de627546c9d58fc6b508fa09e2f003e1c2
3,509
py
Python
db/Updater/scripts/schedule_pdb.py
tecdatalab/biostructure
a30e907e83fa5bbfb934d951b7c663b622104fcc
[ "Apache-2.0" ]
null
null
null
db/Updater/scripts/schedule_pdb.py
tecdatalab/biostructure
a30e907e83fa5bbfb934d951b7c663b622104fcc
[ "Apache-2.0" ]
15
2019-06-17T16:13:39.000Z
2022-02-27T05:23:59.000Z
db/Updater/scripts/schedule_pdb.py
tecdatalab/biostructure
a30e907e83fa5bbfb934d951b7c663b622104fcc
[ "Apache-2.0" ]
null
null
null
''' @author dnnxl Created 28 may 2020 Create a task using crontab for program pdb. It runs for each hour, depending the parameter hour. ''' import sys, argparse, os sys.path.append('../') import datetime from crontab import CronTab from classes.update import Update from connections.sql_connection import SQL_connect...
26.78626
225
0.590767
import sys, argparse, os sys.path.append('../') import datetime from crontab import CronTab from classes.update import Update from connections.sql_connection import SQL_connection directory = os.path.abspath(os.getcwd()) crontab_id = 'script_pdb' def initial(): cron = CronTab(user=True) cron.remove_all(comme...
true
true
1c18099380f276304a15907e33c36ebe60a3920c
987
py
Python
python/akg/ops/math_gpu/logical_not.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
python/akg/ops/math_gpu/logical_not.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
python/akg/ops/math_gpu/logical_not.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
29.909091
74
0.735562
import akg.tvm import akg.topi from akg.utils import validation_check as vc_util @vc_util.check_input_type(akg.tvm.tensor.Tensor) def logical_not(input1): res = akg.topi.logical_not(input1) return res
true
true
1c180a656ec43137de8929ce4c91f99bc3054162
7,584
py
Python
tests/infer/test_smcfilter.py
patrickeganfoley/pyro
3bd5e099e85f3686c66fc3b53476c3b009a77a02
[ "Apache-2.0" ]
1
2021-07-23T15:36:32.000Z
2021-07-23T15:36:32.000Z
tests/infer/test_smcfilter.py
patrickeganfoley/pyro
3bd5e099e85f3686c66fc3b53476c3b009a77a02
[ "Apache-2.0" ]
null
null
null
tests/infer/test_smcfilter.py
patrickeganfoley/pyro
3bd5e099e85f3686c66fc3b53476c3b009a77a02
[ "Apache-2.0" ]
1
2020-04-24T01:18:03.000Z
2020-04-24T01:18:03.000Z
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import pytest import torch import pyro import pyro.distributions as dist import pyro.poutine as poutine from pyro.infer import SMCFilter from tests.common import assert_close class SmokeModel: def __init__(self, state_size,...
32.689655
115
0.566719
import pytest import torch import pyro import pyro.distributions as dist import pyro.poutine as poutine from pyro.infer import SMCFilter from tests.common import assert_close class SmokeModel: def __init__(self, state_size, plate_size): self.state_size = state_size self.plate_size = plate_size ...
true
true
1c180ad428db42c2b19a82cdb1f7a12c7b1fe2f2
1,809
py
Python
test/functional/feature_filelock.py
BlockMechanic/rain
e8818b75240ff9277b0d14d38769378f05d0b525
[ "MIT" ]
null
null
null
test/functional/feature_filelock.py
BlockMechanic/rain
e8818b75240ff9277b0d14d38769378f05d0b525
[ "MIT" ]
null
null
null
test/functional/feature_filelock.py
BlockMechanic/rain
e8818b75240ff9277b0d14d38769378f05d0b525
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The Rain Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Check that it's not possible to start a second raind instance using the same datadir or wallet.""" import os f...
48.891892
177
0.716418
import os from test_framework.test_framework import RainTestFramework from test_framework.test_node import ErrorMatch class FilelockTest(RainTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 def setup_network(self): self.add_nodes(self.num_nod...
true
true
1c180b2be4cdbfcd57bad1106608065511d4f438
5,629
py
Python
official/quantization/test.py
lixiangyin666/Models
f323b35a3a0ee777f4117194349388338ef3d518
[ "Apache-2.0" ]
3
2020-04-01T08:13:15.000Z
2021-01-08T13:23:48.000Z
official/quantization/test.py
hexieshenghuo/Models
924d3b8b14fadb9aa3279e176a81cd18f88659cc
[ "Apache-2.0" ]
null
null
null
official/quantization/test.py
hexieshenghuo/Models
924d3b8b14fadb9aa3279e176a81cd18f88659cc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
31.272222
88
0.634038
import argparse import time import models import megengine as mge import megengine.data as data import megengine.data.transform as T import megengine.distributed as dist import megengine.functional as F import megengine.quantization as Q from megengine.quantization.quantize import quantize, quantize_qat logger = mge...
true
true
1c180cc521d199c89f1da5082fdc3035693ab5b2
12,965
py
Python
python/pb/envoy/config/cluster/v3/circuit_breaker_pb2.py
adriangb/enterprise-client
5d50b457425b0c6d08415b0d986fa9151b792151
[ "Apache-2.0" ]
null
null
null
python/pb/envoy/config/cluster/v3/circuit_breaker_pb2.py
adriangb/enterprise-client
5d50b457425b0c6d08415b0d986fa9151b792151
[ "Apache-2.0" ]
null
null
null
python/pb/envoy/config/cluster/v3/circuit_breaker_pb2.py
adriangb/enterprise-client
5d50b457425b0c6d08415b0d986fa9151b792151
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: envoy/config/cluster/v3/circuit_breaker.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as...
56.615721
1,690
0.801311
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from envoy.config.core.v3 import base_pb2 as envoy_dot_confi...
true
true
1c180dc976c652ca6b38566b7e6fcf051790a920
48,995
py
Python
python/coqtail.py
pauloue/Coqtail
ff5bd6e8414ae53eb6bb7bb17b98e78aa96d8f59
[ "MIT" ]
null
null
null
python/coqtail.py
pauloue/Coqtail
ff5bd6e8414ae53eb6bb7bb17b98e78aa96d8f59
[ "MIT" ]
null
null
null
python/coqtail.py
pauloue/Coqtail
ff5bd6e8414ae53eb6bb7bb17b98e78aa96d8f59
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- # Author: Wolf Honore """Classes and functions for managing auxiliary panels and Coqtop interfaces.""" import json import re import socket import threading import time from collections import defaultdict as ddict from collections import deque from concurrent import futures from itertools import ...
33.194444
86
0.533687
import json import re import socket import threading import time from collections import defaultdict as ddict from collections import deque from concurrent import futures from itertools import count, islice, zip_longest from queue import Empty, Queue from socketserver import StreamRequestHandler, ThreadingTCPServer fr...
true
true
1c180ee30a5a6385eaf8d74e94208864caedadd8
7,055
py
Python
sdk/python/pulumi_azure_nextgen/apimanagement/v20180601preview/tag_description.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/apimanagement/v20180601preview/tag_description.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/apimanagement/v20180601preview/tag_description.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
45.811688
662
0.660524
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = ['TagDescription'] class TagDescription(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional...
true
true
1c180f4299f4c9a9775aaf82a468e3ccf8f596e0
4,702
py
Python
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_agentpool_commands.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
3,287
2016-07-26T17:34:33.000Z
2022-03-31T09:52:13.000Z
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_agentpool_commands.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
19,206
2016-07-26T07:04:42.000Z
2022-03-31T23:57:09.000Z
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_agentpool_commands.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
2,575
2016-07-26T06:44:40.000Z
2022-03-31T22:56:06.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
52.831461
122
0.497023
from azure.cli.testsdk import ScenarioTest, StorageAccountPreparer, ResourceGroupPreparer, record_only class AcrAgentPoolCommandsTests(ScenarioTest): @ResourceGroupPreparer() def test_acr_agentpool(self, resource_group): self.kwargs.update({ 'registry_name': self.create_random_na...
true
true
1c180f8e436320b389ab4628474857c0b4ee8907
408
py
Python
simulation_ws/build/teleop_twist_keyboard/catkin_generated/pkg.installspace.context.pc.py
OSSome01/Obstacle_Avoidance
d6788f0ff1e3769ccd3b337db7019eebac2564f3
[ "MIT" ]
2
2021-06-12T07:42:56.000Z
2021-06-12T15:10:37.000Z
simulation_ws/build/teleop_twist_keyboard/catkin_generated/pkg.installspace.context.pc.py
OSSome01/Obstacle_Avoidance_Robot
d6788f0ff1e3769ccd3b337db7019eebac2564f3
[ "MIT" ]
null
null
null
simulation_ws/build/teleop_twist_keyboard/catkin_generated/pkg.installspace.context.pc.py
OSSome01/Obstacle_Avoidance_Robot
d6788f0ff1e3769ccd3b337db7019eebac2564f3
[ "MIT" ]
1
2020-10-29T11:49:57.000Z
2020-10-29T11:49:57.000Z
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "teleop_twist_keyboard" PROJECT_SPACE_...
45.333333
75
0.727941
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "teleop_twist_keyboard" PROJECT_SPACE_DIR = "/home/ossome/obstacle_avoidance/simulation_ws/inst...
true
true
1c180f98c28161370e7d15ea614683f8f3b0924f
3,019
py
Python
pychron/hardware/newport/newport_group.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
1
2019-02-27T21:57:44.000Z
2019-02-27T21:57:44.000Z
pychron/hardware/newport/newport_group.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
80
2018-07-17T20:10:20.000Z
2021-08-17T15:38:24.000Z
pychron/hardware/newport/newport_group.py
AGESLDEO/pychron
1a81e05d9fba43b797f335ceff6837c016633bcf
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2011 Jake Ross # # 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/licens...
33.544444
81
0.534945
from traits.api import Float, Tuple from pychron.core.helpers.strtools import csv_to_ints from pychron.hardware.axis import Axis MAPPING = dict(acceleration='HA', deceleration='HD', jerk='HJ', velocity='HV', axes='HN') class NewportGroup(Ax...
true
true
1c181019d05f5cae0cbe8288c95a3ef706f2dfd6
509
py
Python
medical_prescription/prescription/forms/examprescriptionform.py
ristovao/2017.2-Receituario-Medico
5387eb80dfb354e948abe64f7d8bbe087fc4f136
[ "MIT" ]
11
2017-09-19T00:29:40.000Z
2018-04-05T23:52:39.000Z
medical_prescription/prescription/forms/examprescriptionform.py
ristovao/2017.2-Receituario-Medico
5387eb80dfb354e948abe64f7d8bbe087fc4f136
[ "MIT" ]
271
2017-09-09T00:07:28.000Z
2017-12-07T05:00:45.000Z
medical_prescription/prescription/forms/examprescriptionform.py
ristovao/2017.2-Receituario-Medico
5387eb80dfb354e948abe64f7d8bbe087fc4f136
[ "MIT" ]
26
2017-08-31T20:48:49.000Z
2018-03-21T15:11:27.000Z
# django. from django import forms class ExamPrescriptionForm(forms.Form): """ Form to associate exam to prescription. """ exam = forms.CharField(widget=forms.TextInput(attrs={'class': 'transparent-input form-control exam-field', 'placeholder': ...
36.357143
110
0.64833
from django import forms class ExamPrescriptionForm(forms.Form): exam = forms.CharField(widget=forms.TextInput(attrs={'class': 'transparent-input form-control exam-field', 'placeholder': 'Nome do Exame'}), required=False) exam_id = forms.IntegerField(w...
true
true
1c18103213ba9297dc7069cbfb45071b4c9b8332
4,875
py
Python
weasyl/controllers/general.py
greysteil/wzl-test
0f863b9e7c58e5861437618bd590126ca323140c
[ "Apache-2.0" ]
null
null
null
weasyl/controllers/general.py
greysteil/wzl-test
0f863b9e7c58e5861437618bd590126ca323140c
[ "Apache-2.0" ]
19
2018-01-02T07:27:22.000Z
2019-01-23T05:20:06.000Z
weasyl/controllers/general.py
greysteil/wzl-test
0f863b9e7c58e5861437618bd590126ca323140c
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import itertools from pyramid.response import Response from sqlalchemy.orm import joinedload from libweasyl import ratings from libweasyl import staff from libweasyl.media import get_multi_user_media from libweasyl.models.site import SiteUpdate from weasyl import define, index...
32.939189
123
0.589744
from __future__ import absolute_import import itertools from pyramid.response import Response from sqlalchemy.orm import joinedload from libweasyl import ratings from libweasyl import staff from libweasyl.media import get_multi_user_media from libweasyl.models.site import SiteUpdate from weasyl import define, index...
true
true
1c18107858edc5b60e2ccd3afe24d91d7f474ae9
514
py
Python
app_021/app_021/users/admin.py
OmarElKhatibCS/DevOpsJourney
73765936ecbe9ea8d3def2c6197242bba18d3d29
[ "MIT" ]
null
null
null
app_021/app_021/users/admin.py
OmarElKhatibCS/DevOpsJourney
73765936ecbe9ea8d3def2c6197242bba18d3d29
[ "MIT" ]
null
null
null
app_021/app_021/users/admin.py
OmarElKhatibCS/DevOpsJourney
73765936ecbe9ea8d3def2c6197242bba18d3d29
[ "MIT" ]
1
2021-06-16T14:02:15.000Z
2021-06-16T14:02:15.000Z
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from app_021.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm add...
28.555556
83
0.747082
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from app_021.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm add...
true
true
1c18132751960b3b587bd555aafb06032987d0b5
2,926
py
Python
aviatrix_sdk_generator/reducer.py
Jeramy-Wilcox/Aviatrix-Python-SDK-Generator
6f57aa2984f2549a0ca9f11c7ed0455397fcb770
[ "MIT" ]
null
null
null
aviatrix_sdk_generator/reducer.py
Jeramy-Wilcox/Aviatrix-Python-SDK-Generator
6f57aa2984f2549a0ca9f11c7ed0455397fcb770
[ "MIT" ]
null
null
null
aviatrix_sdk_generator/reducer.py
Jeramy-Wilcox/Aviatrix-Python-SDK-Generator
6f57aa2984f2549a0ca9f11c7ed0455397fcb770
[ "MIT" ]
null
null
null
from __future__ import annotations from collections import defaultdict from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union if TYPE_CHECKING: from aviatrix_sdk_generator.api_call import Call from aviatrix_sdk_generator.args import _Arg class ArgReducer: def __init__(self, args: Optional[Li...
27.092593
81
0.574504
from __future__ import annotations from collections import defaultdict from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union if TYPE_CHECKING: from aviatrix_sdk_generator.api_call import Call from aviatrix_sdk_generator.args import _Arg class ArgReducer: def __init__(self, args: Optional[Li...
true
true
1c18144ba9f2eb6b841301c58f528b6003046910
7,525
py
Python
pytorch/aten/src/ATen/preprocess_declarations.py
zhou3968322/dl-code-read
aca204a986dabe2755becff0f42de1082299d791
[ "MIT" ]
null
null
null
pytorch/aten/src/ATen/preprocess_declarations.py
zhou3968322/dl-code-read
aca204a986dabe2755becff0f42de1082299d791
[ "MIT" ]
null
null
null
pytorch/aten/src/ATen/preprocess_declarations.py
zhou3968322/dl-code-read
aca204a986dabe2755becff0f42de1082299d791
[ "MIT" ]
null
null
null
import re from copy import deepcopy from function_wrapper import TYPE_FORMAL_GENERIC import common_with_cwrap type_map = { 'floating_point': [ 'Float', 'Double', 'Half', 'BFloat16', ], 'integral': [ 'Byte', 'Char', 'Short', 'Int', 'Lon...
35.163551
113
0.616877
import re from copy import deepcopy from function_wrapper import TYPE_FORMAL_GENERIC import common_with_cwrap type_map = { 'floating_point': [ 'Float', 'Double', 'Half', 'BFloat16', ], 'integral': [ 'Byte', 'Char', 'Short', 'Int', 'Lon...
true
true
1c1814b5a74e0313eb5ba98a15453e36d07aa496
19,936
py
Python
torchrec/distributed/planner/tests/test_partitioners.py
xing-liu/torchrec
82ffde7a69fdb9c66b79a753d6f03afa5db3f73e
[ "BSD-3-Clause" ]
null
null
null
torchrec/distributed/planner/tests/test_partitioners.py
xing-liu/torchrec
82ffde7a69fdb9c66b79a753d6f03afa5db3f73e
[ "BSD-3-Clause" ]
null
null
null
torchrec/distributed/planner/tests/test_partitioners.py
xing-liu/torchrec
82ffde7a69fdb9c66b79a753d6f03afa5db3f73e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import copy import unittest from typing import cast, List from torch import nn from tor...
36.579817
88
0.591342
import copy import unittest from typing import cast, List from torch import nn from torchrec.distributed.embedding_types import EmbeddingComputeKernel from torchrec.distributed.embeddingbag import EmbeddingBagCollectionSharder from torchrec.distributed.planner.enumerators import EmbeddingEnumerator from torchrec.dist...
true
true
1c1816313a739ed8d5facc817ac53eb3fb0e16b1
1,351
py
Python
scrapy_mock.py
tcurvelo/scrapy-mock
33aa3a0a7177f70eb2f7be24a906f6f9efb1cbac
[ "MIT" ]
5
2020-02-17T10:08:55.000Z
2021-07-11T15:45:01.000Z
scrapy_mock.py
tcurvelo/scrapy-mock
33aa3a0a7177f70eb2f7be24a906f6f9efb1cbac
[ "MIT" ]
null
null
null
scrapy_mock.py
tcurvelo/scrapy-mock
33aa3a0a7177f70eb2f7be24a906f6f9efb1cbac
[ "MIT" ]
1
2022-03-03T05:59:06.000Z
2022-03-03T05:59:06.000Z
import os import re import pytest import requests import scrapy import vcr def slugify(request): name = request.node.name name = re.sub(r"(?:\])", "", name) name = re.sub(r"(?:\[|-)", "__", name) name = re.sub(r"[:/\.?&=]+", "-", name) if request.cls: return f"{request.cls}.{name}" el...
25.980769
87
0.637306
import os import re import pytest import requests import scrapy import vcr def slugify(request): name = request.node.name name = re.sub(r"(?:\])", "", name) name = re.sub(r"(?:\[|-)", "__", name) name = re.sub(r"[:/\.?&=]+", "-", name) if request.cls: return f"{request.cls}.{name}" el...
true
true
1c1817545456c30063c3cc688df2a188f0159b32
3,544
py
Python
bindings/python/ensmallen/datasets/string/plesiocystispacifica.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/plesiocystispacifica.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/plesiocystispacifica.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Plesiocystis pacifica. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein ...
32.814815
223
0.677201
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def PlesiocystisPacifica( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/strin...
true
true
1c181b2348c9d84cbb1f3ff04c98cd378dfe8b89
3,084
py
Python
vbridge/router/app.py
sibyl-dev/VBridge
5c4c49dad7cc1ad4e734dfac24b934088fc75bc6
[ "MIT" ]
5
2021-10-30T02:18:31.000Z
2021-12-01T18:13:09.000Z
vbridge/router/app.py
sibyl-dev/VBridge
5c4c49dad7cc1ad4e734dfac24b934088fc75bc6
[ "MIT" ]
null
null
null
vbridge/router/app.py
sibyl-dev/VBridge
5c4c49dad7cc1ad4e734dfac24b934088fc75bc6
[ "MIT" ]
1
2022-03-11T12:50:33.000Z
2022-03-11T12:50:33.000Z
import argparse from flask import Flask from flask_cors import CORS from vbridge.data_loader.data import create_entityset # from vbridge.dataset.pic.tasks.mortality import pic_48h_in_admission_mortality_task from vbridge.dataset.mimic_demo.tasks.mortality import mimic_48h_in_admission_mortality_task from vbridge.expl...
29.653846
92
0.681582
import argparse from flask import Flask from flask_cors import CORS from vbridge.data_loader.data import create_entityset from vbridge.dataset.mimic_demo.tasks.mortality import mimic_48h_in_admission_mortality_task from vbridge.explainer.explanation import Explainer from vbridge.featurization.feature import Featuriza...
true
true
1c181c12a22072f797996a97f76b32788b646e4a
1,260
py
Python
DATA_SORT/3cities/SCAM_CLMINIT_60days/outputcesmscam_T850_SNOWD_CLM5F_001.py
islasimpson/snowpaper_2022
d6ee677f696d7fd6e7cadef8168ce4fd8b184cac
[ "Apache-2.0" ]
null
null
null
DATA_SORT/3cities/SCAM_CLMINIT_60days/outputcesmscam_T850_SNOWD_CLM5F_001.py
islasimpson/snowpaper_2022
d6ee677f696d7fd6e7cadef8168ce4fd8b184cac
[ "Apache-2.0" ]
null
null
null
DATA_SORT/3cities/SCAM_CLMINIT_60days/outputcesmscam_T850_SNOWD_CLM5F_001.py
islasimpson/snowpaper_2022
d6ee677f696d7fd6e7cadef8168ce4fd8b184cac
[ "Apache-2.0" ]
null
null
null
import importlib import xarray as xr import numpy as np import pandas as pd import sys from CASutils import filter_utils as filt from CASutils import readdata_utils as read from CASutils import calendar_utils as cal importlib.reload(filt) importlib.reload(read) importlib.reload(cal) expname=['SASK_SNOWD_CLM5F_01.00...
30
93
0.7
import importlib import xarray as xr import numpy as np import pandas as pd import sys from CASutils import filter_utils as filt from CASutils import readdata_utils as read from CASutils import calendar_utils as cal importlib.reload(filt) importlib.reload(read) importlib.reload(cal) expname=['SASK_SNOWD_CLM5F_01.00...
true
true