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
f741eeac3679bdedc9994f41f7270233c724b1c4
40,024
py
Python
openmdao.main/src/openmdao/main/test/test_egg_save.py
JustinSGray/OpenMDAO-Framework
7ebd7fda0b10fbe8a86ae938dc4f135396dd9759
[ "Apache-2.0" ]
3
2015-06-02T00:36:28.000Z
2018-11-03T00:35:21.000Z
openmdao.main/src/openmdao/main/test/test_egg_save.py
JustinSGray/OpenMDAO-Framework
7ebd7fda0b10fbe8a86ae938dc4f135396dd9759
[ "Apache-2.0" ]
null
null
null
openmdao.main/src/openmdao/main/test/test_egg_save.py
JustinSGray/OpenMDAO-Framework
7ebd7fda0b10fbe8a86ae938dc4f135396dd9759
[ "Apache-2.0" ]
null
null
null
""" Test saving and loading of simulations as eggs. """ import cPickle import glob import logging import os.path import pkg_resources import shutil import subprocess import sys import unittest import nose from enthought.traits.api import Callable from openmdao.main.api import Assembly, Component, Container, SAVE_PIC...
38.633205
95
0.577853
""" Test saving and loading of simulations as eggs. """ import cPickle import glob import logging import os.path import pkg_resources import shutil import subprocess import sys import unittest import nose from enthought.traits.api import Callable from openmdao.main.api import Assembly, Component, Container, SAVE_PIC...
false
true
f741f0483705c4b852615cc60573e3956fc231aa
4,598
py
Python
tests/unit/transports/event_transport_test.py
allan-simon/haigha
7b004e1c0316ec14b94fec1c54554654c38b1a25
[ "BSD-3-Clause" ]
82
2015-03-26T03:57:14.000Z
2020-05-08T12:35:44.000Z
tests/unit/transports/event_transport_test.py
allan-simon/haigha
7b004e1c0316ec14b94fec1c54554654c38b1a25
[ "BSD-3-Clause" ]
32
2015-03-05T22:15:49.000Z
2019-06-20T20:17:52.000Z
tests/unit/transports/event_transport_test.py
allan-simon/haigha
7b004e1c0316ec14b94fec1c54554654c38b1a25
[ "BSD-3-Clause" ]
24
2015-03-23T15:47:35.000Z
2020-05-08T12:35:45.000Z
''' Copyright (c) 2011-2017, Agora Games, LLC All rights reserved. https://github.com/agoragames/haigha/blob/master/LICENSE.txt ''' from chai import Chai from haigha.transports import event_transport from haigha.transports.event_transport import * class EventTransportTest(Chai): def setUp(self): super...
35.921875
83
0.670291
from chai import Chai from haigha.transports import event_transport from haigha.transports.event_transport import * class EventTransportTest(Chai): def setUp(self): super(EventTransportTest, self).setUp() self.connection = mock() self.transport = EventTransport(self.connection) ...
true
true
f741f0d019b5bee234279b686239bab118c8008a
14,423
py
Python
AutomatedTesting/Gem/PythonTests/physics/C12712454_ScriptCanvas_OverlapNodeVerification.py
cypherdotXd/o3de
bb90c4ddfe2d495e9c00ebf1e2650c6d603a5676
[ "Apache-2.0", "MIT" ]
1
2022-03-12T14:13:45.000Z
2022-03-12T14:13:45.000Z
AutomatedTesting/Gem/PythonTests/physics/C12712454_ScriptCanvas_OverlapNodeVerification.py
cypherdotXd/o3de
bb90c4ddfe2d495e9c00ebf1e2650c6d603a5676
[ "Apache-2.0", "MIT" ]
2
2022-01-13T04:29:38.000Z
2022-03-12T01:05:31.000Z
AutomatedTesting/Gem/PythonTests/physics/C12712454_ScriptCanvas_OverlapNodeVerification.py
cypherdotXd/o3de
bb90c4ddfe2d495e9c00ebf1e2650c6d603a5676
[ "Apache-2.0", "MIT" ]
null
null
null
""" 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 """ # Test case ID : 12712454 # Test Case Title : Verify overlap nodes in script canvas # fmt: off class Tests: ...
43.972561
125
0.657353
class Tests: enter_game_mode = ("Entered game mode", "Failed to enter game mode") exit_game_mode = ("Exited game mode", "Couldn't exit game mode") # comm entities are used for communication between script canvas and the python script. comm_entiti...
true
true
f741f16fcd4b6ff4539f17ccd45bdb75bedb1a6b
1,068
py
Python
qmldataset/configurations/default_config_names.py
rajibchakravorty/QDataSet
8eb21b8c7dad5654358021dd73b93ab90443f6d0
[ "MIT" ]
null
null
null
qmldataset/configurations/default_config_names.py
rajibchakravorty/QDataSet
8eb21b8c7dad5654358021dd73b93ab90443f6d0
[ "MIT" ]
null
null
null
qmldataset/configurations/default_config_names.py
rajibchakravorty/QDataSet
8eb21b8c7dad5654358021dd73b93ab90443f6d0
[ "MIT" ]
null
null
null
"""Dictionary of default configuration names """ from . import config_1q_X from . import config_1q_X_N1Z from . import config_1q_X_N2Z from . import config_1q_X_N3Z from . import config_1q_X_N4Z from . import config_1q_XY from . import config_1q_XY_N1X_N5Z from . import config_1q_XY_N1X_N6Z from . import config_1q_XY_...
32.363636
66
0.798689
from . import config_1q_X from . import config_1q_X_N1Z from . import config_1q_X_N2Z from . import config_1q_X_N3Z from . import config_1q_X_N4Z from . import config_1q_XY from . import config_1q_XY_N1X_N5Z from . import config_1q_XY_N1X_N6Z from . import config_1q_XY_N3X_N6Z from . import config_2q_IX_XI_XX from . i...
true
true
f741f2216e1a6ac456655c660a8ea0b689e44936
908
py
Python
services/ingest-file/ingestors/worker.py
adikadashrieq/aleph
acc03197c10e511a279ae3a05120187223f173d2
[ "MIT" ]
2
2020-02-01T00:53:53.000Z
2021-10-10T04:18:20.000Z
services/ingest-file/ingestors/worker.py
adikadashrieq/aleph
acc03197c10e511a279ae3a05120187223f173d2
[ "MIT" ]
null
null
null
services/ingest-file/ingestors/worker.py
adikadashrieq/aleph
acc03197c10e511a279ae3a05120187223f173d2
[ "MIT" ]
null
null
null
import logging from followthemoney import model from servicelayer.worker import Worker from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue""" def dispatch_next(self, task, entities): next_s...
31.310345
73
0.672907
import logging from followthemoney import model from servicelayer.worker import Worker from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): def dispatch_next(self, task, entities): next_stage = task.context.get('next_stage') if next_stage is None: ...
true
true
f741f28e3b4ef5b851bc3a425ac74e4b1b217d29
4,875
py
Python
plaso/parsers/winreg_plugins/usbstor.py
SamuelePilleri/plaso
f5687f12a89c7309797ccc285da78e855c120579
[ "Apache-2.0" ]
null
null
null
plaso/parsers/winreg_plugins/usbstor.py
SamuelePilleri/plaso
f5687f12a89c7309797ccc285da78e855c120579
[ "Apache-2.0" ]
null
null
null
plaso/parsers/winreg_plugins/usbstor.py
SamuelePilleri/plaso
f5687f12a89c7309797ccc285da78e855c120579
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """File containing a Windows Registry plugin to parse the USBStor key.""" from __future__ import unicode_literals from plaso.containers import time_events from plaso.containers import windows_events from plaso.lib import definitions from plaso.parsers import logger from plaso.parsers import wi...
39.634146
79
0.71159
from __future__ import unicode_literals from plaso.containers import time_events from plaso.containers import windows_events from plaso.lib import definitions from plaso.parsers import logger from plaso.parsers import winreg from plaso.parsers.winreg_plugins import interface class USBStorPlugin(interface.WindowsRe...
true
true
f741f2b2445d7fcb9539f67dac5907fab7893a01
4,469
py
Python
conditional_batchnorm.py
tasbolat1/DGflow
6ce22095a0d33f4da3c15f093aa365ba6cabbac9
[ "MIT" ]
15
2021-02-03T13:34:03.000Z
2022-02-16T03:33:23.000Z
conditional_batchnorm.py
tasbolat1/DGflow
6ce22095a0d33f4da3c15f093aa365ba6cabbac9
[ "MIT" ]
null
null
null
conditional_batchnorm.py
tasbolat1/DGflow
6ce22095a0d33f4da3c15f093aa365ba6cabbac9
[ "MIT" ]
4
2021-05-13T05:31:19.000Z
2022-02-16T06:57:16.000Z
import torch.nn as nn import torch.nn.functional as F from torch.nn import init class ConditionalBatchNorm2d(nn.BatchNorm2d): """Conditional Batch Normalization""" def __init__(self, num_features, eps=1e-05, momentum=0.1, affine=False, track_running_stats=True): super(ConditionalBat...
33.856061
76
0.623406
import torch.nn as nn import torch.nn.functional as F from torch.nn import init class ConditionalBatchNorm2d(nn.BatchNorm2d): def __init__(self, num_features, eps=1e-05, momentum=0.1, affine=False, track_running_stats=True): super(ConditionalBatchNorm2d, self).__init__( num_...
true
true
f741f47021d1439ce989ce8cd366e2ed7c11cc45
8,154
py
Python
tests/ut/python/privacy/diff_privacy/test_monitor.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
139
2020-03-28T02:37:07.000Z
2022-03-24T15:35:39.000Z
tests/ut/python/privacy/diff_privacy/test_monitor.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
2
2020-04-02T09:50:21.000Z
2020-05-09T06:52:57.000Z
tests/ut/python/privacy/diff_privacy/test_monitor.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
12
2020-03-28T02:52:42.000Z
2021-07-15T08:05:06.000Z
# Copyright 2019 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...
39.201923
78
0.641894
import pytest import numpy as np import mindspore.nn as nn import mindspore.dataset as ds from mindspore.train import Model import mindspore.context as context from mindarmour.privacy.diff_privacy import PrivacyMonitorFactory from mindarmour.utils.logger import LogUtil from tests.ut.python.utils.mock_ne...
true
true
f741f4da27d6d75ec64b5ca171f1410d843eb1c6
5,498
py
Python
sgkit/model.py
timothymillar/sgkit
a3a5e961b6b21ff7de235075955c0f797ad5027c
[ "Apache-2.0" ]
null
null
null
sgkit/model.py
timothymillar/sgkit
a3a5e961b6b21ff7de235075955c0f797ad5027c
[ "Apache-2.0" ]
2
2021-05-16T16:09:22.000Z
2021-06-15T21:03:56.000Z
sgkit/model.py
timothymillar/sgkit
a3a5e961b6b21ff7de235075955c0f797ad5027c
[ "Apache-2.0" ]
1
2021-05-15T05:01:41.000Z
2021-05-15T05:01:41.000Z
from typing import Any, Dict, Hashable, List, Optional import numpy as np import xarray as xr from .typing import ArrayLike from .utils import create_dataset DIM_VARIANT = "variants" DIM_SAMPLE = "samples" DIM_PLOIDY = "ploidy" DIM_ALLELE = "alleles" DIM_GENOTYPE = "genotypes" def create_genotype_call_dataset( ...
34.149068
91
0.655875
from typing import Any, Dict, Hashable, List, Optional import numpy as np import xarray as xr from .typing import ArrayLike from .utils import create_dataset DIM_VARIANT = "variants" DIM_SAMPLE = "samples" DIM_PLOIDY = "ploidy" DIM_ALLELE = "alleles" DIM_GENOTYPE = "genotypes" def create_genotype_call_dataset( ...
true
true
f741f6d898ce96f476634486d4ba2e6726e7d7f1
202
py
Python
exercises/exe11 - 20/exe018.py
thomas-rohde/Classes-Python
f862995510b7aabf68bc14aecf815f597034d8a1
[ "MIT" ]
null
null
null
exercises/exe11 - 20/exe018.py
thomas-rohde/Classes-Python
f862995510b7aabf68bc14aecf815f597034d8a1
[ "MIT" ]
null
null
null
exercises/exe11 - 20/exe018.py
thomas-rohde/Classes-Python
f862995510b7aabf68bc14aecf815f597034d8a1
[ "MIT" ]
null
null
null
from random import shuffle n0 = input('1ª Aluna: ') n1 = input('2ª Aluna: ') n2 = input('3ª Aluna: ') n3 = input('4ª Aluna: ') l = [n0, n1, n2, n3] shuffle(l) print('A ordem dos alunos é {}'.format(l))
22.444444
42
0.613861
from random import shuffle n0 = input('1ª Aluna: ') n1 = input('2ª Aluna: ') n2 = input('3ª Aluna: ') n3 = input('4ª Aluna: ') l = [n0, n1, n2, n3] shuffle(l) print('A ordem dos alunos é {}'.format(l))
true
true
f741f6fdbc9a72107a6298765dae8fdb0e800934
160
py
Python
11-Iterators/iterators.py
MrNiebieski/boost-python-test
a0330a04c241575d6700a6b1d3f18a0567055afe
[ "BSL-1.0" ]
null
null
null
11-Iterators/iterators.py
MrNiebieski/boost-python-test
a0330a04c241575d6700a6b1d3f18a0567055afe
[ "BSL-1.0" ]
null
null
null
11-Iterators/iterators.py
MrNiebieski/boost-python-test
a0330a04c241575d6700a6b1d3f18a0567055afe
[ "BSL-1.0" ]
null
null
null
#!/usr/bin/env python from sys import stdout from iterators import Example e = Example() e.add("a") e.add("b") e.add("c") print [ s for s in e.strings() ]
11.428571
32
0.64375
from sys import stdout from iterators import Example e = Example() e.add("a") e.add("b") e.add("c") print [ s for s in e.strings() ]
false
true
f741f75312b240700c8e6953eef7f268cdf1d5f1
1,092
py
Python
setup.py
SimonBiggs/pytest-pylint
3e0bbfae6e0c62f8755336e745aecf23907eee30
[ "MIT" ]
null
null
null
setup.py
SimonBiggs/pytest-pylint
3e0bbfae6e0c62f8755336e745aecf23907eee30
[ "MIT" ]
null
null
null
setup.py
SimonBiggs/pytest-pylint
3e0bbfae6e0c62f8755336e745aecf23907eee30
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ pytest-pylint ============= Plugin for py.test for doing pylint tests """ from setuptools import setup setup( name='pytest-pylint', description='pytest plugin to check source code with pylint', long_description=open("README.rst").read(), license='MIT', version='0.18.0'...
30.333333
69
0.6163
from setuptools import setup setup( name='pytest-pylint', description='pytest plugin to check source code with pylint', long_description=open("README.rst").read(), license='MIT', version='0.18.0', author='Carson Gee', author_email='x@carsongee.com', url='https://github.com/carsongee/p...
true
true
f741f878ba7b29881c62ce244081400c4214c0c9
6,345
py
Python
options/train_options.py
snakch/pixel2style2pixel
63e9c397daf7d4e81dc963a14231990b510ec1a8
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
options/train_options.py
snakch/pixel2style2pixel
63e9c397daf7d4e81dc963a14231990b510ec1a8
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
options/train_options.py
snakch/pixel2style2pixel
63e9c397daf7d4e81dc963a14231990b510ec1a8
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
from argparse import ArgumentParser from configs.paths_config import model_paths from dataclasses import dataclass @dataclass class TrainOptionsDataClass: exp_dir: str dataset_type: str = "ffhq_encode" encoder_type: str = "GradualStyleEncoder" input_nc: int = 3 label_nc: int = 0 batch_size: ...
27.828947
88
0.534121
from argparse import ArgumentParser from configs.paths_config import model_paths from dataclasses import dataclass @dataclass class TrainOptionsDataClass: exp_dir: str dataset_type: str = "ffhq_encode" encoder_type: str = "GradualStyleEncoder" input_nc: int = 3 label_nc: int = 0 batch_size: ...
true
true
f741f8f449b5fd7a651b9eda849d2a149c197fb7
10,902
py
Python
pelix/remote/transport/jabsorb_rpc.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
65
2015-04-21T10:41:18.000Z
2022-01-02T16:25:40.000Z
pelix/remote/transport/jabsorb_rpc.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
85
2015-01-20T14:23:52.000Z
2022-02-19T17:08:46.000Z
pelix/remote/transport/jabsorb_rpc.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
32
2015-03-13T07:43:05.000Z
2020-04-24T07:56:53.000Z
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix Remote Services: Java-compatible RPC, based on the Jabsorb library :author: Thomas Calmant :copyright: Copyright 2020, Thomas Calmant :license: Apache License 2.0 :version: 1.0.1 .. Copyright 2020 Thomas Calmant Licensed under the Apache Licens...
28.917772
80
0.601724
import logging from jsonrpclib.SimpleJSONRPCServer import ( SimpleJSONRPCDispatcher, NoMulticallResult, ) import jsonrpclib.jsonrpc as jsonrpclib import pelix.misc.jabsorb as jabsorb from pelix.ipopo.decorators import ( ComponentFactory, Provides, Validate, Invalidate, Requires, ...
true
true
f741f90ccd0c3c53faa7f853a6af6c9ff13a28c4
5,504
py
Python
nipy/io/tests/test_save.py
fperez/nipy
559f17150bd9fa8ead4fd088b330d7cf7db7aa79
[ "BSD-3-Clause" ]
1
2015-05-07T16:53:33.000Z
2015-05-07T16:53:33.000Z
nipy/io/tests/test_save.py
fperez/nipy
559f17150bd9fa8ead4fd088b330d7cf7db7aa79
[ "BSD-3-Clause" ]
null
null
null
nipy/io/tests/test_save.py
fperez/nipy
559f17150bd9fa8ead4fd088b330d7cf7db7aa79
[ "BSD-3-Clause" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os from tempfile import mkstemp import numpy as np from nipy.testing import assert_true, assert_false, assert_equal, \ assert_array_almost_equal, funcfile from nipy.io.api import load_image, s...
34.4
81
0.647892
import os from tempfile import mkstemp import numpy as np from nipy.testing import assert_true, assert_false, assert_equal, \ assert_array_almost_equal, funcfile from nipy.io.api import load_image, save_image from nipy.core import api class Tempfile(): file = None tmpfile = Tempfile() def setup(): f...
true
true
f741f933b7c32df127e1e34c19e9249b48bd1f16
3,872
py
Python
makewiki/settings.py
Rasenku/makewiki_v2
4a61c64824f26d5f595c57c240a1a5190991ad51
[ "MIT" ]
null
null
null
makewiki/settings.py
Rasenku/makewiki_v2
4a61c64824f26d5f595c57c240a1a5190991ad51
[ "MIT" ]
6
2020-06-06T01:25:11.000Z
2022-02-10T13:48:49.000Z
makewiki/settings.py
clenberger/makewiki-v2
3dffafb708e206bf93bcc5b9aa7881bbeae34bf9
[ "MIT" ]
null
null
null
""" Django settings for makewiki project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os ...
25.986577
96
0.694473
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '1yct-t!2bnkgc7j59z+9cdd2k)@y+ftqor$!aya()3if^cnlo-' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f741f99fe4171390615ec825282a6401d178df1f
6,131
py
Python
congress/datasources/datasource_driver.py
aaronorosen/congress
2f74410c93a4d761a6fb3d913ea6bec87fd3085c
[ "Apache-2.0" ]
1
2016-02-10T00:59:31.000Z
2016-02-10T00:59:31.000Z
congress/datasources/datasource_driver.py
aaronorosen/congress
2f74410c93a4d761a6fb3d913ea6bec87fd3085c
[ "Apache-2.0" ]
null
null
null
congress/datasources/datasource_driver.py
aaronorosen/congress
2f74410c93a4d761a6fb3d913ea6bec87fd3085c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2013 VMware, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
40.335526
79
0.596966
from congress.dse import deepsix from congress.policy import compile from congress.policy import runtime class DataSourceDriver(deepsix.deepSix): def __init__(self, name, keys, inbox=None, datapath=None, poll_time=None, **creds): if poll_time is None: poll_time...
true
true
f741f9a134a29cde4417d89a622f8515e0c9db99
2,842
py
Python
actions.py
ratnasankeerthanreddy/Chatbot-for-Personal-assisatance
6c584601af4c98a3bebedf7073e0ccf2ad8ecf76
[ "MIT" ]
1
2020-10-28T15:57:44.000Z
2020-10-28T15:57:44.000Z
actions.py
ratnasankeerthanreddy/Chatbot-for-Personal-assisatance
6c584601af4c98a3bebedf7073e0ccf2ad8ecf76
[ "MIT" ]
null
null
null
actions.py
ratnasankeerthanreddy/Chatbot-for-Personal-assisatance
6c584601af4c98a3bebedf7073e0ccf2ad8ecf76
[ "MIT" ]
null
null
null
from typing import Any, Text, Dict, List from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher from utils import convert_timestamp from rasa_sdk.events import AllSlotsReset import datetime from datetime import timedelta, date import dateutil.parser import boto3 from boto3.dynamodb.cond...
35.974684
363
0.678044
from typing import Any, Text, Dict, List from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher from utils import convert_timestamp from rasa_sdk.events import AllSlotsReset import datetime from datetime import timedelta, date import dateutil.parser import boto3 from boto3.dynamodb.cond...
true
true
f741fa7d58a67afe45aa04452ed154c7616067c2
62
py
Python
pydlm/plot/__init__.py
dtolpin/pydlm
0016876bf6357784b161ecaa4f0798c063c54785
[ "BSD-3-Clause" ]
423
2016-09-15T06:45:26.000Z
2022-03-29T08:41:11.000Z
pydlm/plot/__init__.py
dtolpin/pydlm
0016876bf6357784b161ecaa4f0798c063c54785
[ "BSD-3-Clause" ]
50
2016-09-14T19:45:49.000Z
2021-07-26T17:04:10.000Z
pydlm/plot/__init__.py
dtolpin/pydlm
0016876bf6357784b161ecaa4f0798c063c54785
[ "BSD-3-Clause" ]
99
2016-09-19T08:08:41.000Z
2022-03-07T13:47:36.000Z
#__all__ = ['dlmPlot'] #import pydlm.plot.dlmPlot as dlmPlot
15.5
37
0.725806
true
true
f741faa690e468c1dd98dd8707f711d392c92338
51,722
py
Python
analytics.py
apoursh/caringWithoutSharing
cf9769242a116685fadafa7a4228711366b98eb4
[ "MIT" ]
1
2018-10-06T14:05:12.000Z
2018-10-06T14:05:12.000Z
analytics.py
apoursh/caringWithoutSharing
cf9769242a116685fadafa7a4228711366b98eb4
[ "MIT" ]
null
null
null
analytics.py
apoursh/caringWithoutSharing
cf9769242a116685fadafa7a4228711366b98eb4
[ "MIT" ]
null
null
null
# Armin Pourshafeie #TODO write a generator that takes the chromosome and spits out data. do the regression in parallel #TODO documentation # Running the gwas import logging import numpy as np import gzip, h5py, os, re, gc, tqdm from sklearn.linear_model import LogisticRegression import statsmodels.formula.api as smf...
35.596696
218
0.596613
import logging import numpy as np import gzip, h5py, os, re, gc, tqdm from sklearn.linear_model import LogisticRegression import statsmodels.formula.api as smf from statsmodels.tools.tools import add_constant from functools import partial from pathos.multiprocessing import ProcessingPool as Pool import sklearn.dec...
false
true
f741fcb9270622ed9b472a24bccf703c5ec28a4c
3,428
py
Python
openbb_terminal/cryptocurrency/defi/smartstake_view.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
null
null
null
openbb_terminal/cryptocurrency/defi/smartstake_view.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
null
null
null
openbb_terminal/cryptocurrency/defi/smartstake_view.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
null
null
null
"""SentimentInvestor View""" __docformat__ = "numpy" import os import logging from typing import Optional, List from matplotlib import pyplot as plt from openbb_terminal.decorators import check_api_key from openbb_terminal.cryptocurrency.defi import smartstake_model from openbb_terminal.helper_funcs import ( exp...
25.021898
84
0.636523
__docformat__ = "numpy" import os import logging from typing import Optional, List from matplotlib import pyplot as plt from openbb_terminal.decorators import check_api_key from openbb_terminal.cryptocurrency.defi import smartstake_model from openbb_terminal.helper_funcs import ( export_data, plot_autoscale,...
true
true
f741fcc5b078acea4fa5592a85dfa586ca84fade
52
py
Python
hardware/BME280/__init__.py
RechnioMateusz/weather_forecast
5ae9c65336831042b74a77e05c163b7b65b90dcd
[ "MIT" ]
1
2019-10-22T20:09:54.000Z
2019-10-22T20:09:54.000Z
hardware/BME280/__init__.py
RechnioMateusz/weather_forecast
5ae9c65336831042b74a77e05c163b7b65b90dcd
[ "MIT" ]
null
null
null
hardware/BME280/__init__.py
RechnioMateusz/weather_forecast
5ae9c65336831042b74a77e05c163b7b65b90dcd
[ "MIT" ]
null
null
null
from .bme280_handler import BME280, BME280Exception
26
51
0.865385
from .bme280_handler import BME280, BME280Exception
true
true
f741fd921827a5c74e52bc10c9dc1f178a242130
1,085
py
Python
airflow/dataminer/dataminer.py
ysfactory/wordcloud
c435888296108e5f678372f40ee321f025d05289
[ "Beerware" ]
null
null
null
airflow/dataminer/dataminer.py
ysfactory/wordcloud
c435888296108e5f678372f40ee321f025d05289
[ "Beerware" ]
null
null
null
airflow/dataminer/dataminer.py
ysfactory/wordcloud
c435888296108e5f678372f40ee321f025d05289
[ "Beerware" ]
null
null
null
from krwordrank.word import KRWordRank import krwordrank def wordrank(textdir: str): def get_texts_scores(fname: str): with open(fname, encoding='utf-8') as f: docs = [doc.lower().replace('\n', '').split('\t') for doc in f] docs = [doc for doc in docs if len(doc) == 2] ...
28.552632
77
0.587097
from krwordrank.word import KRWordRank import krwordrank def wordrank(textdir: str): def get_texts_scores(fname: str): with open(fname, encoding='utf-8') as f: docs = [doc.lower().replace('\n', '').split('\t') for doc in f] docs = [doc for doc in docs if len(doc) == 2] ...
false
true
f741fe8e57074ae189bab276e1b0899135878334
595
py
Python
pynsgp/Selection/Selection.py
marcovirgolin/pyNSGP
4a9634161012d6ab39ce3d304dba943b6f7d9b29
[ "MIT" ]
19
2020-05-26T05:48:51.000Z
2022-01-01T13:32:34.000Z
pynsgp/Selection/Selection.py
marcovirgolin/pyNSGP
4a9634161012d6ab39ce3d304dba943b6f7d9b29
[ "MIT" ]
1
2021-12-06T06:41:31.000Z
2021-12-06T16:19:46.000Z
pynsgp/Selection/Selection.py
marcovirgolin/pyNSGP
4a9634161012d6ab39ce3d304dba943b6f7d9b29
[ "MIT" ]
3
2021-01-18T13:37:42.000Z
2021-09-26T08:19:15.000Z
import numpy as np from copy import deepcopy from numpy.random import randint def TournamentSelect( population, how_many_to_select, tournament_size=4 ): pop_size = len(population) selection = [] while len(selection) < how_many_to_select: best = population[randint(pop_size)] for i in range(tournament_size - 1)...
29.75
128
0.764706
import numpy as np from copy import deepcopy from numpy.random import randint def TournamentSelect( population, how_many_to_select, tournament_size=4 ): pop_size = len(population) selection = [] while len(selection) < how_many_to_select: best = population[randint(pop_size)] for i in range(tournament_size - 1)...
true
true
f741fe92784d071e7aaeb9223f6d21bca2014920
1,265
py
Python
camera_plugins/scripts/camera_plugins_node.py
liangzhao123/topic_ws
ef7aba11b975eab5f657101ed696b49ec94b5f86
[ "Apache-2.0" ]
null
null
null
camera_plugins/scripts/camera_plugins_node.py
liangzhao123/topic_ws
ef7aba11b975eab5f657101ed696b49ec94b5f86
[ "Apache-2.0" ]
null
null
null
camera_plugins/scripts/camera_plugins_node.py
liangzhao123/topic_ws
ef7aba11b975eab5f657101ed696b49ec94b5f86
[ "Apache-2.0" ]
1
2021-03-27T09:54:49.000Z
2021-03-27T09:54:49.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import rospy from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError import ros_numpy import cv2 class image_listenner: def __init__(self): self.bridge = CvBridge() self.image_sub = ros...
29.418605
103
0.666403
from __future__ import print_function import rospy from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError import ros_numpy import cv2 class image_listenner: def __init__(self): self.bridge = CvBridge() self.image_sub = rospy.Subscriber("/pylon_camera_node/image_raw"...
true
true
f741fedf5017ea3ed61b5b1b6ec17664102991d5
1,760
py
Python
sktime/classification/feature_based/tests/test_fresh_prince.py
Aparna-Sakshi/sktime
419d347f062320290fb65e4afec72b82179e63bf
[ "BSD-3-Clause" ]
1
2021-09-08T14:24:52.000Z
2021-09-08T14:24:52.000Z
sktime/classification/feature_based/tests/test_fresh_prince.py
Aparna-Sakshi/sktime
419d347f062320290fb65e4afec72b82179e63bf
[ "BSD-3-Clause" ]
null
null
null
sktime/classification/feature_based/tests/test_fresh_prince.py
Aparna-Sakshi/sktime
419d347f062320290fb65e4afec72b82179e63bf
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """FreshPRINCE test code.""" import numpy as np from numpy import testing from sklearn.metrics import accuracy_score from sktime.classification.feature_based import FreshPRINCE from sktime.datasets import load_unit_test def test_fresh_prince_on_unit_test_data(): """Test of FreshPRINCE on ...
21.728395
88
0.521023
import numpy as np from numpy import testing from sklearn.metrics import accuracy_score from sktime.classification.feature_based import FreshPRINCE from sktime.datasets import load_unit_test def test_fresh_prince_on_unit_test_data(): X_train, y_train = load_unit_test(split="train") X_test, y_test = loa...
true
true
f742009710867138d6efdc26c0460c5522f38e3d
6,107
py
Python
EIDEGraphics/EIDEChannelsManager.py
Vicente-Francisco/EIDEGraphics
8e61bf64f4644a2e80df00946271f8cba4b5e65e
[ "Unlicense" ]
2
2022-02-09T08:06:13.000Z
2022-03-18T07:30:19.000Z
EIDEGraphics/EIDEChannelsManager.py
Vicente-Francisco/EIDEGraphics
8e61bf64f4644a2e80df00946271f8cba4b5e65e
[ "Unlicense" ]
null
null
null
EIDEGraphics/EIDEChannelsManager.py
Vicente-Francisco/EIDEGraphics
8e61bf64f4644a2e80df00946271f8cba4b5e65e
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################# # # # EIDEChannesManager # # ...
31.642487
79
0.502374
true
true
f742011c788550ea25a25318b5b9b72e890832df
24,459
py
Python
pysnmp/CISCO-ENTITY-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-ENTITY-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-ENTITY-EXT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-ENTITY-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ENTITY-EXT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:39:41 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (defau...
132.210811
3,507
0.766507
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuild...
true
true
f74201a94d7a358f63b2df1b4eea26ca14b09d78
444
py
Python
monitoring/admin.py
TyBeeProject/TyBeeWeb
d4d850000a95866272c4ba3e998f753e0cf8a6a3
[ "MIT" ]
2
2016-10-31T10:17:45.000Z
2017-04-03T09:30:07.000Z
monitoring/admin.py
TyBeeProject/TyBeeWeb
d4d850000a95866272c4ba3e998f753e0cf8a6a3
[ "MIT" ]
null
null
null
monitoring/admin.py
TyBeeProject/TyBeeWeb
d4d850000a95866272c4ba3e998f753e0cf8a6a3
[ "MIT" ]
null
null
null
# coding: utf-8 from django.contrib import admin from .models import Hive, Captor, Data # Possibilité ajout capteur : # ajoute dans la bdd une table pour le nouveau capteur, ainsi que l'identifiant qui devra être utilisé pour parser le flux de la ruche # admin.site.register(Hive) admin.site.register(Captor) admin.si...
34.153846
137
0.77027
from django.contrib import admin from .models import Hive, Captor, Data # admin.site.register(Hive) admin.site.register(Captor) admin.site.register(Data) # Possibilité ajout ruche : # ajoute une adresse ip/ un port pour la ruche nouvelle ruche à contacter
true
true
f74201e05bdced9050e1207f67c164610553e550
297
py
Python
py4e/course3/parse_xml.py
tofritz/ExampleWork
6779cce3148f1595fd062e4941aa2697c0a8248d
[ "MIT" ]
null
null
null
py4e/course3/parse_xml.py
tofritz/ExampleWork
6779cce3148f1595fd062e4941aa2697c0a8248d
[ "MIT" ]
8
2020-02-05T00:44:39.000Z
2020-02-18T23:11:16.000Z
py4e/course3/parse_xml.py
tofritz/ExampleWork
6779cce3148f1595fd062e4941aa2697c0a8248d
[ "MIT" ]
null
null
null
import urllib.request, urllib.parse, urllib.error import xml.etree.ElementTree as ET url = input('Enter XML URL: ') data = urllib.request.urlopen(url).read() tree = ET.fromstring(data) counts = tree.findall('.//count') total = 0 for count in counts: total += int(count.text) print(total)
18.5625
49
0.710438
import urllib.request, urllib.parse, urllib.error import xml.etree.ElementTree as ET url = input('Enter XML URL: ') data = urllib.request.urlopen(url).read() tree = ET.fromstring(data) counts = tree.findall('.//count') total = 0 for count in counts: total += int(count.text) print(total)
true
true
f74203d05330bca2ca8d7d2e1e8d357166a2d202
3,278
py
Python
venv/Lib/site-packages/astroid/transforms.py
AnxhelaMehmetaj/is219_flask
1e88579f14a96c9826e9452b3c7f8e6477577ef7
[ "BSD-3-Clause" ]
null
null
null
venv/Lib/site-packages/astroid/transforms.py
AnxhelaMehmetaj/is219_flask
1e88579f14a96c9826e9452b3c7f8e6477577ef7
[ "BSD-3-Clause" ]
null
null
null
venv/Lib/site-packages/astroid/transforms.py
AnxhelaMehmetaj/is219_flask
1e88579f14a96c9826e9452b3c7f8e6477577ef7
[ "BSD-3-Clause" ]
null
null
null
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE # Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt import collections from functools import lru_cache from astroid.context import _invalidate...
36.831461
85
0.638499
import collections from functools import lru_cache from astroid.context import _invalidate_cache class TransformVisitor: TRANSFORM_MAX_CACHE_SIZE = 10000 def __init__(self): self.transforms = collections.defaultdict(list) @lru_cache(maxsize=TRANSFORM_MAX_CACHE_SIZE) def _transform(self...
true
true
f7420637d661263f0ca2012d29afbb8266ce8d61
7,219
py
Python
ietf/meeting/admin.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
null
null
null
ietf/meeting/admin.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
39
2021-05-31T21:10:14.000Z
2022-03-07T16:07:14.000Z
ietf/meeting/admin.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
2
2021-10-05T12:48:20.000Z
2021-11-08T11:38:35.000Z
# Copyright The IETF Trust 2012-2020, All Rights Reserved # -*- coding: utf-8 -*- from django.contrib import admin from ietf.meeting.models import (Meeting, Room, Session, TimeSlot, Constraint, Schedule, SchedTimeSessAssignment, ResourceAssociation, FloorPlan, UrlResource, SessionPresentation, ImportantDate,...
35.387255
115
0.694556
from django.contrib import admin from ietf.meeting.models import (Meeting, Room, Session, TimeSlot, Constraint, Schedule, SchedTimeSessAssignment, ResourceAssociation, FloorPlan, UrlResource, SessionPresentation, ImportantDate, SlideSubmission, SchedulingEvent, BusinessConstraint, ProceedingsMaterial, ...
true
true
f7420644022905c1b99d9fab7238d24a3a18144d
14,142
py
Python
Lib/site-packages/sqlalchemy/testing/exclusions.py
Carshy/blogApplication
a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f
[ "bzip2-1.0.6" ]
4
2020-06-06T02:29:28.000Z
2021-07-22T17:06:40.000Z
Lib/site-packages/sqlalchemy/testing/exclusions.py
Carshy/blogApplication
a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f
[ "bzip2-1.0.6" ]
44
2020-07-21T10:40:23.000Z
2020-08-03T17:34:21.000Z
Lib/site-packages/sqlalchemy/testing/exclusions.py
Carshy/blogApplication
a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f
[ "bzip2-1.0.6" ]
2
2020-01-16T06:35:46.000Z
2020-01-16T06:48:06.000Z
# testing/exclusions.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import contextlib import operator import re from . import config from .. imp...
29.4625
79
0.583439
import contextlib import operator import re from . import config from .. import util from ..util import decorator from ..util.compat import inspect_getfullargspec def skip_if(predicate, reason=None): rule = compound() pred = _as_predicate(predicate, reason) rule.skips.add(pred) return rule ...
true
true
f74206e20ea65a2877cac5cb7dadcacfa8a19ff6
5,730
py
Python
uncertainty_baselines/models/__init__.py
ranganathkrishnan/uncertainty-baselines
b9c6b870790034c1a2303246f887fd2cf53bff38
[ "Apache-2.0" ]
1
2022-03-03T15:35:12.000Z
2022-03-03T15:35:12.000Z
uncertainty_baselines/models/__init__.py
ranganathkrishnan/uncertainty-baselines
b9c6b870790034c1a2303246f887fd2cf53bff38
[ "Apache-2.0" ]
null
null
null
uncertainty_baselines/models/__init__.py
ranganathkrishnan/uncertainty-baselines
b9c6b870790034c1a2303246f887fd2cf53bff38
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
54.056604
118
0.861606
from absl import logging import tensorflow as tf from uncertainty_baselines.models import efficientnet_utils from uncertainty_baselines.models.criteo_mlp import criteo_mlp from uncertainty_baselines.models.efficientnet import efficientnet from uncertainty_baselines.models.efficientnet_batch_ensemble im...
true
true
f7420b1caa664cf6764e3eacfd49e226c7bd722e
1,060
py
Python
Lib/site-packages/PyQt5/uic/port_v3/string_io.py
heylenz/python27
bee49fa9d65b8ab7d591146a5b6cd47aeb41d940
[ "bzip2-1.0.6", "MIT" ]
null
null
null
Lib/site-packages/PyQt5/uic/port_v3/string_io.py
heylenz/python27
bee49fa9d65b8ab7d591146a5b6cd47aeb41d940
[ "bzip2-1.0.6", "MIT" ]
null
null
null
Lib/site-packages/PyQt5/uic/port_v3/string_io.py
heylenz/python27
bee49fa9d65b8ab7d591146a5b6cd47aeb41d940
[ "bzip2-1.0.6", "MIT" ]
null
null
null
############################################################################# ## ## Copyright (c) 2013 Riverbank Computing Limited <info@riverbankcomputing.com> ## ## This file is part of PyQt5. ## ## This file may be used under the terms of the GNU General Public License ## version 3.0 as published by the Free Softw...
42.4
79
0.643396
true
true
f7420ba4619ae917fc73259a2e194f196cd6f6b6
9,814
py
Python
renjun/blockchain base.py
FYQ0919/Your_First_Decentralized_Application_Python
21afb71a79c798c02a972eec6d54b4a17526358b
[ "MIT" ]
2
2020-10-12T06:17:23.000Z
2020-10-14T18:12:37.000Z
renjun/blockchain base.py
FYQ0919/Your_First_Decentralized_Application_Python
21afb71a79c798c02a972eec6d54b4a17526358b
[ "MIT" ]
null
null
null
renjun/blockchain base.py
FYQ0919/Your_First_Decentralized_Application_Python
21afb71a79c798c02a972eec6d54b4a17526358b
[ "MIT" ]
null
null
null
''' Blockchain base prepared by Ren Jun in April 2019 with reference from ??. Run blockchain base before running any of the simulation. This code is to prepare one starting block of the blockchain, which is a passive block without any data, and also, the function to add subsequent blocks to the blockchain by getting d...
29.383234
176
0.599654
import hashlib import json from time import time from urllib.parse import urlparse from uuid import uuid4 import requests from flask import Flask, jsonify, request class Blockchain: def __init__(self): self.current_transactions = ['Start'] self.chain = [] self.nodes = set() ...
true
true
f7420cb69d18526f656e68084c1e825a9cfb3c7a
1,009
py
Python
pong/resources/install_hy.py
kshithijiyer/pong
0d58074855809577d094f5716edeee07ff6bab14
[ "Apache-2.0" ]
2
2016-01-15T18:07:57.000Z
2016-02-04T09:11:11.000Z
pong/resources/install_hy.py
kshithijiyer/pong
0d58074855809577d094f5716edeee07ff6bab14
[ "Apache-2.0" ]
24
2016-02-12T03:45:16.000Z
2016-10-18T15:11:09.000Z
pong/resources/install_hy.py
kshithijiyer/pong
0d58074855809577d094f5716edeee07ff6bab14
[ "Apache-2.0" ]
2
2016-02-24T20:56:43.000Z
2020-01-27T07:23:05.000Z
from subprocess import Popen, STDOUT import os def clone_hy(dest): owd = os.getcwd() os.chdir(dest) cmd = "git clone https://github.com/hylang/hy.git" proc = Popen(cmd, stdout=STDOUT, stderr=STDOUT) outp, _ = proc.communicate() print outp if proc.returncode != 0: raise Exception("U...
22.931818
81
0.576809
from subprocess import Popen, STDOUT import os def clone_hy(dest): owd = os.getcwd() os.chdir(dest) cmd = "git clone https://github.com/hylang/hy.git" proc = Popen(cmd, stdout=STDOUT, stderr=STDOUT) outp, _ = proc.communicate() print outp if proc.returncode != 0: raise Exception("U...
false
true
f7420d2da066af30e3adf4d249d2a4b8a0053933
457
py
Python
join.py
carderne/msoa-income
2cfaef3e1942ba6f97b963cbc02472a154fae6d6
[ "MIT" ]
null
null
null
join.py
carderne/msoa-income
2cfaef3e1942ba6f97b963cbc02472a154fae6d6
[ "MIT" ]
null
null
null
join.py
carderne/msoa-income
2cfaef3e1942ba6f97b963cbc02472a154fae6d6
[ "MIT" ]
null
null
null
import sys import pandas as pd import geopandas as gpd def main(csv, gpkg, out): df = pd.read_csv(csv).assign( Income=lambda x: pd.to_numeric(x.Income.str.replace(",", "")) ) gpd.read_file(gpkg).get(["MSOA01CD", "geometry"]).merge( df, how="inner", left_on="MSOA01CD", right_on="MSOA" ...
20.772727
69
0.608315
import sys import pandas as pd import geopandas as gpd def main(csv, gpkg, out): df = pd.read_csv(csv).assign( Income=lambda x: pd.to_numeric(x.Income.str.replace(",", "")) ) gpd.read_file(gpkg).get(["MSOA01CD", "geometry"]).merge( df, how="inner", left_on="MSOA01CD", right_on="MSOA" ...
true
true
f7420d6b6cc229c4605f7a33be752915acbbb2b6
1,929
py
Python
Source/lstm.py
SamanKhamesian/Human-Activity-Recognition-Time-Series-Classification
1b1d8474997ddf3c0f22791acecdfd823b9de5fd
[ "Apache-2.0" ]
6
2020-11-30T03:03:58.000Z
2021-08-10T19:29:38.000Z
Source/lstm.py
SamanKhamesian/Human-Activity-Recognition-Time-Series-Classification
1b1d8474997ddf3c0f22791acecdfd823b9de5fd
[ "Apache-2.0" ]
3
2020-11-30T03:18:07.000Z
2021-07-08T07:41:18.000Z
Source/lstm.py
SamanKhamesian/Human-Activity-Recognition-Time-Series-Classification
1b1d8474997ddf3c0f22791acecdfd823b9de5fd
[ "Apache-2.0" ]
2
2021-04-14T13:50:50.000Z
2021-07-18T22:29:14.000Z
import os import tensorflow as tf from keras.layers import LSTM, Dense, Dropout from keras.models import Sequential from Source.config import Model from Source.driver import Driver tf.logging.set_verbosity(tf.logging.ERROR) os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' def run(): dataset = Driver() n_time_step...
35.722222
101
0.715397
import os import tensorflow as tf from keras.layers import LSTM, Dense, Dropout from keras.models import Sequential from Source.config import Model from Source.driver import Driver tf.logging.set_verbosity(tf.logging.ERROR) os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' def run(): dataset = Driver() n_time_step...
true
true
f7420d8378ce975687fa683c35fcd94a511ec490
357
py
Python
backend/app/database/database.py
Michal-Miko/competitive-teams
6bb55542e06121f413248ddf0b75285296b610bb
[ "MIT" ]
null
null
null
backend/app/database/database.py
Michal-Miko/competitive-teams
6bb55542e06121f413248ddf0b75285296b610bb
[ "MIT" ]
null
null
null
backend/app/database/database.py
Michal-Miko/competitive-teams
6bb55542e06121f413248ddf0b75285296b610bb
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from os import getenv SQLALCHEMY_DATABASE_URL = getenv("DATABASE_URL") engine = create_engine(SQLALCHEMY_DATABASE_URL) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bin...
29.75
75
0.845938
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from os import getenv SQLALCHEMY_DATABASE_URL = getenv("DATABASE_URL") engine = create_engine(SQLALCHEMY_DATABASE_URL) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bin...
true
true
f7420dbbd758df6ab201185302ea91228a0259ca
2,343
py
Python
Edges/workers/Worker.py
faramarzQ/Cloud_assisted_resource_allocation_using_machine_learning
1aa8d8e63dcd6053f69e17bf90595a0aa2a7d317
[ "Apache-2.0" ]
1
2022-03-14T01:44:28.000Z
2022-03-14T01:44:28.000Z
Edges/workers/Worker.py
faramarzQ/Cloud_assisted_resource_allocation_using_machine_learning
1aa8d8e63dcd6053f69e17bf90595a0aa2a7d317
[ "Apache-2.0" ]
null
null
null
Edges/workers/Worker.py
faramarzQ/Cloud_assisted_resource_allocation_using_machine_learning
1aa8d8e63dcd6053f69e17bf90595a0aa2a7d317
[ "Apache-2.0" ]
1
2021-08-04T08:30:58.000Z
2021-08-04T08:30:58.000Z
class Worker(): def __init__(self): """ initialize Worker class """ self.cloudlets = [] self.bandwidth = {} self.mips = int self.position = int self.timer = 0 def attachCloudlet(self, cloudlet): """ attach cloudlet to worker Args: ...
30.038462
85
0.51003
class Worker(): def __init__(self): self.cloudlets = [] self.bandwidth = {} self.mips = int self.position = int self.timer = 0 def attachCloudlet(self, cloudlet): self.cloudlets.append(cloudlet) def run(self): for cloudlet in self.cloudlets: ...
true
true
f7420ebbec6d43b0e5c6c988489095100cbfe534
7,365
py
Python
test/e2e/live_cluster/test_info.py
jfwm2/aerospike-admin
3ce721bbd249eca73046345620941a6aef325589
[ "Apache-2.0" ]
null
null
null
test/e2e/live_cluster/test_info.py
jfwm2/aerospike-admin
3ce721bbd249eca73046345620941a6aef325589
[ "Apache-2.0" ]
null
null
null
test/e2e/live_cluster/test_info.py
jfwm2/aerospike-admin
3ce721bbd249eca73046345620941a6aef325589
[ "Apache-2.0" ]
null
null
null
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
30.6875
105
0.57461
import unittest from lib.view.sheet import set_style_json import lib.live_cluster.live_cluster_root_controller as controller import lib.utils.util as util from test.e2e import util as test_util set_style_json() class TestInfo(unittest.TestCase): rc = None output_list = list() service_info...
true
true
f7421039b0e769a44cd5256eb710be07db933fc9
4,850
py
Python
handlers/card_handler.py
HearthSim/HearthBot
4fc4fbf24f816c7fc2075849b2ad747965fa4204
[ "MIT" ]
8
2018-04-26T13:01:24.000Z
2021-04-04T02:34:11.000Z
handlers/card_handler.py
HearthSim/HearthBot
4fc4fbf24f816c7fc2075849b2ad747965fa4204
[ "MIT" ]
4
2017-08-26T13:01:15.000Z
2019-09-14T21:58:44.000Z
handlers/card_handler.py
HearthSim/HearthBot
4fc4fbf24f816c7fc2075849b2ad747965fa4204
[ "MIT" ]
11
2017-04-18T17:52:22.000Z
2021-05-08T19:10:46.000Z
import re from hearthstone import cardxml from hearthstone.cardxml import CardXML from hearthstone.enums import CardType, GameTag, Race, Rarity ERR_LANG_NOT_FOUND = "Language not found. Supported language keys are e.g. `enUS` or `deDE`" db, _ = cardxml.load() def loc_name(self, locale): return self.strings[Game...
28.869048
94
0.633402
import re from hearthstone import cardxml from hearthstone.cardxml import CardXML from hearthstone.enums import CardType, GameTag, Race, Rarity ERR_LANG_NOT_FOUND = "Language not found. Supported language keys are e.g. `enUS` or `deDE`" db, _ = cardxml.load() def loc_name(self, locale): return self.strings[Game...
true
true
f7421103ba2cf980561213214889bf7c562a5fbd
1,625
py
Python
app/core/tests/tests_admin.py
pnsn/squac_api
7b1741cd32dbc32972f75ac53958468fdf7d04ee
[ "MIT" ]
6
2019-11-07T09:32:43.000Z
2021-09-02T22:37:14.000Z
app/core/tests/tests_admin.py
pnsn/squacapi
e330a925aff38937656983841e495ba3824c11e1
[ "MIT" ]
196
2019-10-04T17:03:36.000Z
2022-03-31T17:54:59.000Z
app/core/tests/tests_admin.py
pnsn/squac_api
7b1741cd32dbc32972f75ac53958468fdf7d04ee
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from django.test import Client from organization.models import Organization class AdminSiteTests(TestCase): def setUp(self): admin_email = 'admin@pnsn.org' admin_pass = 'password123' ...
33.163265
68
0.648
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from django.test import Client from organization.models import Organization class AdminSiteTests(TestCase): def setUp(self): admin_email = 'admin@pnsn.org' admin_pass = 'password123' ...
true
true
f7421155086f679794f76826296e13e2251dbf74
7,022
py
Python
src/model/SLIM/SSLIM_BPR.py
riccardopoiani/recsys_2019
47a44d2f7d85e76e31dacf4ba2e69721d010b6b8
[ "MIT" ]
2
2020-10-01T11:08:32.000Z
2020-11-25T11:05:37.000Z
src/model/SLIM/SSLIM_BPR.py
riccardopoiani/recsys_2019
47a44d2f7d85e76e31dacf4ba2e69721d010b6b8
[ "MIT" ]
null
null
null
src/model/SLIM/SSLIM_BPR.py
riccardopoiani/recsys_2019
47a44d2f7d85e76e31dacf4ba2e69721d010b6b8
[ "MIT" ]
1
2020-10-01T11:08:33.000Z
2020-10-01T11:08:33.000Z
from course_lib.Base.Recommender_utils import check_matrix from course_lib.Base.BaseSimilarityMatrixRecommender import BaseItemSimilarityMatrixRecommender from course_lib.Base.Recommender_utils import similarityMatrixTopK from course_lib.Base.Incremental_Training_Early_Stopping import Incremental_Training_Early_Stoppin...
42.301205
152
0.608659
from course_lib.Base.Recommender_utils import check_matrix from course_lib.Base.BaseSimilarityMatrixRecommender import BaseItemSimilarityMatrixRecommender from course_lib.Base.Recommender_utils import similarityMatrixTopK from course_lib.Base.Incremental_Training_Early_Stopping import Incremental_Training_Early_Stoppin...
true
true
f74211b461aa22de6a02638850beb03044fa3455
1,134
py
Python
axelrod/tests/strategies/test_negation.py
nandhinianandj/Axelrod
379b907d64c51816a50abfd8480240276c893953
[ "MIT" ]
596
2015-03-30T17:34:14.000Z
2022-03-21T19:32:38.000Z
axelrod/tests/strategies/test_negation.py
nandhinianandj/Axelrod
379b907d64c51816a50abfd8480240276c893953
[ "MIT" ]
1,018
2015-03-30T14:57:33.000Z
2022-03-14T14:57:48.000Z
axelrod/tests/strategies/test_negation.py
nandhinianandj/Axelrod
379b907d64c51816a50abfd8480240276c893953
[ "MIT" ]
263
2015-03-31T10:26:28.000Z
2022-03-29T09:26:02.000Z
"""Tests for the Neg Strategy""" import axelrod as axl from .test_player import TestPlayer C, D = axl.Action.C, axl.Action.D class TestNegation(TestPlayer): name = "Negation" player = axl.Negation expected_classifier = { "memory_depth": 1, "stochastic": True, "makes_use_of": se...
27
71
0.560847
import axelrod as axl from .test_player import TestPlayer C, D = axl.Action.C, axl.Action.D class TestNegation(TestPlayer): name = "Negation" player = axl.Negation expected_classifier = { "memory_depth": 1, "stochastic": True, "makes_use_of": set(), "long_run_time": Fal...
true
true
f74212f2159b3a40a39e82599691a64e90f98877
2,917
py
Python
python/arcade/02_trees.py
jwatson-CO-edu/nanoverse
20ec7c5e641bad5e2e10534d5e9f0d6d189a297b
[ "MIT" ]
null
null
null
python/arcade/02_trees.py
jwatson-CO-edu/nanoverse
20ec7c5e641bad5e2e10534d5e9f0d6d189a297b
[ "MIT" ]
null
null
null
python/arcade/02_trees.py
jwatson-CO-edu/nanoverse
20ec7c5e641bad5e2e10534d5e9f0d6d189a297b
[ "MIT" ]
null
null
null
""" This is a sample program to show how to draw using the Python programming language and the Arcade library. """ # Import the "arcade" library import arcade # Open up a window. # From the "arcade" library, use a function called "open_window" # Set the window title to "Drawing Example" # Set the dimensions (width an...
36.924051
88
0.693521
import arcade arcade.open_window( 600, 600, "Drawing Example" ) arcade.set_background_color( arcade.csscolor.SKY_BLUE ) arcade.start_render() arcade.draw_lrtb_rectangle_filled( 0, 599, 300, 0, arcade.csscolor.GREEN ) arcade.draw_rectangle_filled( 100, 320, 20, 60, arcade.csscolor.SIENNA ) arcade.draw...
true
true
f74214f8616adf2de0b654e562f43b4add02138a
411
py
Python
OBB_Train_Station/wsgi.py
marcmelchor/OBB-Train-Station
6371f2a27205f20289afd1842ad055106d732158
[ "MIT" ]
null
null
null
OBB_Train_Station/wsgi.py
marcmelchor/OBB-Train-Station
6371f2a27205f20289afd1842ad055106d732158
[ "MIT" ]
3
2019-12-04T23:14:40.000Z
2021-03-01T19:02:22.000Z
OBB_Train_Station/wsgi.py
marcmelchor/OBB-Train-Station
6371f2a27205f20289afd1842ad055106d732158
[ "MIT" ]
null
null
null
""" WSGI config for OBB_Train_Station project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJ...
24.176471
78
0.79562
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'OBB_Train_Station.settings') application = get_wsgi_application()
true
true
f74214f9360641816d6d299d36ab80932bf127de
1,890
py
Python
essai polygon.py
PnMercantour/suivi_zh
724609c4988ba85f47356490873a4ea8c092c95a
[ "MIT" ]
null
null
null
essai polygon.py
PnMercantour/suivi_zh
724609c4988ba85f47356490873a4ea8c092c95a
[ "MIT" ]
null
null
null
essai polygon.py
PnMercantour/suivi_zh
724609c4988ba85f47356490873a4ea8c092c95a
[ "MIT" ]
null
null
null
from logging import log import dash import dash_leaflet as dl import dash_leaflet.express as dlx from dash.dependencies import Input, Output from dash_extensions.javascript import assign, arrow_function import pandas as pd import dash_html_components as html external_stylesheets = ['https://codepen.io/chriddyp/pen/bWL...
33.157895
92
0.640741
from logging import log import dash import dash_leaflet as dl import dash_leaflet.express as dlx from dash.dependencies import Input, Output from dash_extensions.javascript import assign, arrow_function import pandas as pd import dash_html_components as html external_stylesheets = ['https://codepen.io/chriddyp/pen/bWL...
true
true
f74215657f9662796c652bd155019ab043315fbc
2,858
py
Python
rclpy/test/test_serialization.py
RoboStack/rclpy
c67e43a69a1580eeac4a90767e24ceeea31a298e
[ "Apache-2.0" ]
121
2015-11-19T19:46:09.000Z
2022-03-17T16:36:52.000Z
rclpy/test/test_serialization.py
RoboStack/rclpy
c67e43a69a1580eeac4a90767e24ceeea31a298e
[ "Apache-2.0" ]
759
2016-01-29T01:44:19.000Z
2022-03-30T13:37:26.000Z
rclpy/test/test_serialization.py
RoboStack/rclpy
c67e43a69a1580eeac4a90767e24ceeea31a298e
[ "Apache-2.0" ]
160
2016-01-12T16:56:21.000Z
2022-03-22T23:20:35.000Z
# Copyright 2020 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
38.621622
87
0.771868
import pytest from rclpy.serialization import deserialize_message from rclpy.serialization import serialize_message from test_msgs.message_fixtures import get_test_msg from test_msgs.msg import Arrays from test_msgs.msg import BasicTypes from test_msgs.msg import BoundedSequences from test_msgs.msg impo...
true
true
f74216515895d7f79a72c0f8cd02e9603aa01918
15,184
py
Python
lib/taurus/qt/qtgui/input/tauruscombobox.py
cpascual/taurus
1786e741418f1d3ecf8f00243ec7ebe2493a3c99
[ "CC-BY-3.0" ]
1
2016-10-19T13:54:08.000Z
2016-10-19T13:54:08.000Z
lib/taurus/qt/qtgui/input/tauruscombobox.py
cpascual/taurus
1786e741418f1d3ecf8f00243ec7ebe2493a3c99
[ "CC-BY-3.0" ]
27
2016-05-25T08:56:58.000Z
2019-01-21T09:18:08.000Z
lib/taurus/qt/qtgui/input/tauruscombobox.py
cpascual/taurus
1786e741418f1d3ecf8f00243ec7ebe2493a3c99
[ "CC-BY-3.0" ]
8
2015-07-24T09:16:50.000Z
2018-06-12T12:33:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################# ## # This file is part of Taurus ## # http://taurus-scada.org ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Taurus is free software: you can redistribute it and/or modify #...
37.771144
143
0.556902
stComboBox(Qt.QComboBox, TaurusBaseWidget): def __init__(self, parent=None, designMode=False): name = self.__class__.__name__ self.call__init__wo_kw(Qt.QComboBox, parent) self.call__init__(TaurusBaseWidget, name) self.insertEventFilter(eventfilters.IGNORE_CONFIG) self.set...
true
true
f742168122346151540395090d876f91489b704e
5,206
py
Python
sundial/price_model/parameter_tuning.py
UWSEDS-aut17/uwseds-group-maximize-savings-in-clean-energy
c485c5e1f5bea1135b013835d28227f858a68c4d
[ "MIT" ]
null
null
null
sundial/price_model/parameter_tuning.py
UWSEDS-aut17/uwseds-group-maximize-savings-in-clean-energy
c485c5e1f5bea1135b013835d28227f858a68c4d
[ "MIT" ]
6
2017-11-15T21:51:02.000Z
2017-11-16T05:07:45.000Z
sundial/price_model/parameter_tuning.py
UWSEDS-aut17/SunDial
c485c5e1f5bea1135b013835d28227f858a68c4d
[ "MIT" ]
2
2019-05-09T22:23:13.000Z
2019-07-10T01:53:18.000Z
import numpy as np from matplotlib import pyplot as plt import seaborn as sns import pandas as pd from sklearn.model_selection import train_test_split from sklearn import linear_model from sklearn import neighbors from sklearn import svm from sklearn.model_selection import GridSearchCV from sundial.price_model.utils.fi...
30.623529
79
0.670572
import numpy as np from matplotlib import pyplot as plt import seaborn as sns import pandas as pd from sklearn.model_selection import train_test_split from sklearn import linear_model from sklearn import neighbors from sklearn import svm from sklearn.model_selection import GridSearchCV from sundial.price_model.utils.fi...
true
true
f74216e58d1ef59d52d2d994e4dd8311a98cf26f
4,859
py
Python
demo/work_pretty_trio.py
yosukefk/plotter
16127ee7fc3105c717e92875ee3d61477bd41533
[ "MIT" ]
null
null
null
demo/work_pretty_trio.py
yosukefk/plotter
16127ee7fc3105c717e92875ee3d61477bd41533
[ "MIT" ]
6
2021-05-25T15:51:27.000Z
2021-08-18T20:39:41.000Z
demo/work_pretty_trio.py
yosukefk/plotter
16127ee7fc3105c717e92875ee3d61477bd41533
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys plotterdir = '..' sys.path.insert(0, plotterdir) from plotter import calpost_reader import plotter.plotter_multi as plotter_multi from plotter.plotter_util import LambertConformalTCEQ from plotter.plotter_background import BackgroundManager import cartopy.crs as ccrs import geopanda...
28.086705
101
0.615147
import sys plotterdir = '..' sys.path.insert(0, plotterdir) from plotter import calpost_reader import plotter.plotter_multi as plotter_multi from plotter.plotter_util import LambertConformalTCEQ from plotter.plotter_background import BackgroundManager import cartopy.crs as ccrs import geopandas as gpd import matplo...
true
true
f74216f426dbc31123e0f8346e16ada73510a9f0
1,651
py
Python
backend/src/photoImposer.py
jayeshjakkani/American-Football-Analytics-Application
54609c0ea1b635425e4edad08f3414bcf3d05459
[ "MIT" ]
null
null
null
backend/src/photoImposer.py
jayeshjakkani/American-Football-Analytics-Application
54609c0ea1b635425e4edad08f3414bcf3d05459
[ "MIT" ]
null
null
null
backend/src/photoImposer.py
jayeshjakkani/American-Football-Analytics-Application
54609c0ea1b635425e4edad08f3414bcf3d05459
[ "MIT" ]
1
2020-10-26T20:52:44.000Z
2020-10-26T20:52:44.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from photoCoordinates import photoCoordinates from PIL import Image, ImageFont, ImageDraw class photoImposer: pc = photoCoordinates() allCoordinates = pc.allCoordinates all_images = {} def __init__(self): self.all_images['KICKOFF'] = "formation...
40.268293
123
0.643852
from photoCoordinates import photoCoordinates from PIL import Image, ImageFont, ImageDraw class photoImposer: pc = photoCoordinates() allCoordinates = pc.allCoordinates all_images = {} def __init__(self): self.all_images['KICKOFF'] = "formationImages/kickoff_coverage.png" self.all...
true
true
f742178115791ddefe5a0f1456b4cc9f0c4ef4bc
4,078
py
Python
syft/federated/federated_client.py
theoptips/PySyft
4b68c3c6fbe0c18cdf87dfe6ddc3c2071a71f1cc
[ "Apache-2.0" ]
1
2019-08-27T21:48:50.000Z
2019-08-27T21:48:50.000Z
syft/federated/federated_client.py
theoptips/PySyft
4b68c3c6fbe0c18cdf87dfe6ddc3c2071a71f1cc
[ "Apache-2.0" ]
null
null
null
syft/federated/federated_client.py
theoptips/PySyft
4b68c3c6fbe0c18cdf87dfe6ddc3c2071a71f1cc
[ "Apache-2.0" ]
null
null
null
import torch as th from torch.utils.data import BatchSampler, RandomSampler, SequentialSampler from syft.generic import ObjectStorage from syft.federated.train_config import TrainConfig class FederatedClient(ObjectStorage): """A Client able to execute federated learning in local datasets.""" def __init__(se...
33.42623
95
0.615253
import torch as th from torch.utils.data import BatchSampler, RandomSampler, SequentialSampler from syft.generic import ObjectStorage from syft.federated.train_config import TrainConfig class FederatedClient(ObjectStorage): def __init__(self, datasets=None): super().__init__() self.datasets = da...
true
true
f74217b79ca81c9cfc1468248c045e90fbea2e44
7,580
py
Python
ditrit.py
snarfed/misc
75ff9f19bee6bbb5f1cb855e53c0a14d942b3f70
[ "CC0-1.0" ]
17
2015-04-24T09:36:25.000Z
2021-04-26T06:12:46.000Z
ditrit.py
snarfed/misc
75ff9f19bee6bbb5f1cb855e53c0a14d942b3f70
[ "CC0-1.0" ]
12
2016-12-20T02:11:13.000Z
2018-04-13T05:06:58.000Z
ditrit.py
snarfed/misc
75ff9f19bee6bbb5f1cb855e53c0a14d942b3f70
[ "CC0-1.0" ]
7
2015-01-15T13:54:25.000Z
2022-01-06T20:51:41.000Z
#!/usr/bin/python2 # # ditrit.py # Copyright 2006 Ryan Barrett <ditrit@ryanb.org> # http://snarfed.org/ditrit # # See docstring for usage details. # # Ideas: # url open in browser, whois, alexa/netcraft # email address compose in mail client, add to address book # email mai...
28.074074
78
0.620712
USAGE = """A programmable application launcher. Reads input from stdin or the X primary selection (aka clipboard), finds a template in the config file that matches it, and runs the corresponding command. The input may be wholly or...
false
true
f74218219100926c9b72b62eb0646106e594d558
814
py
Python
lgp/geometry/transform.py
humans-to-robots-motion/lgp
f62da0c0cb7a209eb90848cce8eddc91c14fa099
[ "MIT" ]
1
2022-01-08T13:53:05.000Z
2022-01-08T13:53:05.000Z
lgp/geometry/transform.py
humans-to-robots-motion/lgp
f62da0c0cb7a209eb90848cce8eddc91c14fa099
[ "MIT" ]
1
2022-01-21T07:52:34.000Z
2022-01-21T07:52:34.000Z
lgp/geometry/transform.py
humans-to-robots-motion/lgp
f62da0c0cb7a209eb90848cce8eddc91c14fa099
[ "MIT" ]
2
2021-02-16T15:54:10.000Z
2021-12-07T14:22:08.000Z
import numpy as np from pyrieef.geometry.differentiable_geometry import DifferentiableMap class LinearTranslation(DifferentiableMap): """ Simple linear translation """ def __init__(self, p0=np.zeros(2)): assert isinstance(p0, np.ndarray) self._p = p0 def forward(self, q): ...
24.666667
70
0.653563
import numpy as np from pyrieef.geometry.differentiable_geometry import DifferentiableMap class LinearTranslation(DifferentiableMap): def __init__(self, p0=np.zeros(2)): assert isinstance(p0, np.ndarray) self._p = p0 def forward(self, q): assert q.shape[0] == self.input_dimension ...
true
true
f742185bf3b9484233e61df21912202df91b692f
1,853
py
Python
flod_facilities_backend/validation/credential_validators.py
Trondheim-kommune/Bookingbasen
58235a5a1fd6ad291cb237e6ec9a67bfe8c463c6
[ "BSD-2-Clause-FreeBSD" ]
1
2017-10-17T12:15:28.000Z
2017-10-17T12:15:28.000Z
flod_facilities_backend/validation/credential_validators.py
Trondheim-kommune/Bookingbasen
58235a5a1fd6ad291cb237e6ec9a67bfe8c463c6
[ "BSD-2-Clause-FreeBSD" ]
6
2021-03-22T17:15:52.000Z
2022-01-13T00:39:58.000Z
flod_facilities_backend/validation/credential_validators.py
Trondheim-kommune/Bookingbasen
58235a5a1fd6ad291cb237e6ec9a67bfe8c463c6
[ "BSD-2-Clause-FreeBSD" ]
1
2019-09-09T13:35:03.000Z
2019-09-09T13:35:03.000Z
# -*- coding: utf-8 -*- from flask import request, current_app from domain.models import Image, Document from validation.base_validators import ParameterizedValidator import repo class CanCreateFacilityValidator(ParameterizedValidator): def validate(self, f, *args, **kwargs): user_id = repo.get_user_id_f...
45.195122
98
0.657312
from flask import request, current_app from domain.models import Image, Document from validation.base_validators import ParameterizedValidator import repo class CanCreateFacilityValidator(ParameterizedValidator): def validate(self, f, *args, **kwargs): user_id = repo.get_user_id_for_user(cookies=request...
true
true
f74218a652b58014e64850fcc512135f4d8a5a3d
5,248
py
Python
rgg_ensemble_analysis/Statistics_Computation.py
MGarrod1/rgg_ensemble_analysis
679ea7b11c0eae4d92eef9f08fe9c63dcfd3837c
[ "MIT" ]
null
null
null
rgg_ensemble_analysis/Statistics_Computation.py
MGarrod1/rgg_ensemble_analysis
679ea7b11c0eae4d92eef9f08fe9c63dcfd3837c
[ "MIT" ]
null
null
null
rgg_ensemble_analysis/Statistics_Computation.py
MGarrod1/rgg_ensemble_analysis
679ea7b11c0eae4d92eef9f08fe9c63dcfd3837c
[ "MIT" ]
null
null
null
""" Functions to compute various statistics of the data and their associated errors. """ #Compute statistics about the variance of an estimator: import numpy as np from scipy import stats import math #The following functions as involved in estimating the standard def Moment(Sample,k) : """ This function com...
20.5
288
0.68064
import numpy as np from scipy import stats import math def Moment(Sample,k) : Mean = np.mean(Sample) Moment = 0.0 for i in range(0,len(Sample) ) : Moment = Moment + (Mean - Sample[i] )**k return Moment/(len(Sample)) def D4(Sample) : M = float( len(Sample) ) D4 = ((M-1)/(M**3))*( (M**2 - 3*M + 3...
true
true
f7421b12fe5a143ea38630139185a216a4d89962
9,679
py
Python
saleor/graphql/core/connection.py
tgarbowski/saleor
11218aeac8649112626c8f971ef3eec8378b5537
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/core/connection.py
tgarbowski/saleor
11218aeac8649112626c8f971ef3eec8378b5537
[ "CC-BY-4.0" ]
8
2022-02-14T04:25:58.000Z
2022-03-28T04:53:16.000Z
saleor/graphql/core/connection.py
tgarbowski/saleor
11218aeac8649112626c8f971ef3eec8378b5537
[ "CC-BY-4.0" ]
null
null
null
import json from typing import Any, Dict, Iterable, List, Tuple, Union import graphene from django.db.models import Model as DjangoModel, Q, QuerySet from graphene.relay.connection import Connection from graphene_django.types import DjangoObjectType from graphql.error import GraphQLError from graphql_relay.connection....
34.080986
87
0.673003
import json from typing import Any, Dict, Iterable, List, Tuple, Union import graphene from django.db.models import Model as DjangoModel, Q, QuerySet from graphene.relay.connection import Connection from graphene_django.types import DjangoObjectType from graphql.error import GraphQLError from graphql_relay.connection....
true
true
f7421b1eb505298bdde11af41aa3cb292f25adeb
1,130
py
Python
tests/storage/cases/test_KT1HYegMXP5pqPe83SbeYdHuJZub4tuG2ZvN.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2021-05-20T16:52:08.000Z
2021-05-20T16:52:08.000Z
tests/storage/cases/test_KT1HYegMXP5pqPe83SbeYdHuJZub4tuG2ZvN.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-12-30T16:44:56.000Z
2020-12-30T16:44:56.000Z
tests/storage/cases/test_KT1HYegMXP5pqPe83SbeYdHuJZub4tuG2ZvN.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1HYegMXP5pqPe83SbeYdHuJZub4tuG2ZvN(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
40.357143
112
0.748673
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1HYegMXP5pqPe83SbeYdHuJZub4tuG2ZvN(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
true
true
f7421c61dc4a9f2905083616a76cf5c9a110855b
4,688
py
Python
main.py
Davidswinkels/DownloadWalkingRoutes
9ceaee0b96507149086aef7081790a09ab6b3653
[ "Apache-2.0" ]
null
null
null
main.py
Davidswinkels/DownloadWalkingRoutes
9ceaee0b96507149086aef7081790a09ab6b3653
[ "Apache-2.0" ]
null
null
null
main.py
Davidswinkels/DownloadWalkingRoutes
9ceaee0b96507149086aef7081790a09ab6b3653
[ "Apache-2.0" ]
null
null
null
from scripts.downloader import * import fiona from shapely.geometry import shape import geopandas as gpd import matplotlib.pyplot as plt from pprint import pprint import requests import json import time import os # Constant variables input_min_lat = 50.751797561 input_min_lon = 5.726110232 input_max_lat = 50.938216069...
53.272727
133
0.588097
from scripts.downloader import * import fiona from shapely.geometry import shape import geopandas as gpd import matplotlib.pyplot as plt from pprint import pprint import requests import json import time import os input_min_lat = 50.751797561 input_min_lon = 5.726110232 input_max_lat = 50.938216069 input_max_lon = 6.1...
true
true
f7421d81349d859b4d67819456d7204314191856
5,095
py
Python
elyra/elyra_app.py
lresende/elyra
d62f6933003887449686610967111d2a3fd115aa
[ "Apache-2.0" ]
null
null
null
elyra/elyra_app.py
lresende/elyra
d62f6933003887449686610967111d2a3fd115aa
[ "Apache-2.0" ]
null
null
null
elyra/elyra_app.py
lresende/elyra
d62f6933003887449686610967111d2a3fd115aa
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018-2021 Elyra Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
45.491071
115
0.750736
import os from jupyter_server.extension.application import ExtensionApp from jupyter_server.extension.application import ExtensionAppJinjaMixin from elyra._version import __version__ from elyra.api.handlers import YamlSpecHandler from elyra.contents.handlers import ContentHandler from elyra.metadata.ha...
true
true
f7421d98eda4f2491161fc476f629a50e65d92cc
8,051
py
Python
RGBDFace/utils/face.py
liggest/RGBDFace
75768b1848f03d3e9d53913546b19cce0b1ada67
[ "MIT" ]
1
2021-06-10T16:08:18.000Z
2021-06-10T16:08:18.000Z
RGBDFace/utils/face.py
liggest/RGBDFace
75768b1848f03d3e9d53913546b19cce0b1ada67
[ "MIT" ]
null
null
null
RGBDFace/utils/face.py
liggest/RGBDFace
75768b1848f03d3e9d53913546b19cce0b1ada67
[ "MIT" ]
null
null
null
import numpy as np # import open3d as o3d import face_recognition # import cv2 from skimage import draw #,morphology # from .depth import depthPreprocess from .image import getConvexHullMask,getMaskedImg2, maskClosing,maskDilation,maskErosion def faceLandmarks(image): ''' 人脸边框+特征点 ''' image=np.as...
37.273148
112
0.70985
import numpy as np import face_recognition from skimage import draw from .image import getConvexHullMask,getMaskedImg2, maskClosing,maskDilation,maskErosion def faceLandmarks(image): image=np.asarray(image) locations=face_recognition.face_locations(image) if not locations: return None,None ...
true
true
f7421e409e1a14805af9c1bfa029d410c0aecf02
2,238
py
Python
Classifier_shah.py
meetshah91/Class-Identifier
ab215ef685164ac450996844a8d0a56c34d013e6
[ "MIT" ]
null
null
null
Classifier_shah.py
meetshah91/Class-Identifier
ab215ef685164ac450996844a8d0a56c34d013e6
[ "MIT" ]
null
null
null
Classifier_shah.py
meetshah91/Class-Identifier
ab215ef685164ac450996844a8d0a56c34d013e6
[ "MIT" ]
null
null
null
import math import sys import pandas as pd from decison_tree import decision_btree from file_healper import file_operation def classify_validation_data(cls_validation_data): classification_result = list() for idx in cls_validation_data.index: if cls_validation_data["TailLn"][idx]<=9.0: if cls_validati...
30.243243
75
0.655049
import math import sys import pandas as pd from decison_tree import decision_btree from file_healper import file_operation def classify_validation_data(cls_validation_data): classification_result = list() for idx in cls_validation_data.index: if cls_validation_data["TailLn"][idx]<=9.0: if cls_validati...
true
true
f7421e9f56ec9815ff71cff91744f89c3fb3f15f
3,530
py
Python
utils.py
defensetongxue/pyGAT
5677b15be986b0650b883cdd20dbfb1bb486d6f5
[ "MIT" ]
null
null
null
utils.py
defensetongxue/pyGAT
5677b15be986b0650b883cdd20dbfb1bb486d6f5
[ "MIT" ]
null
null
null
utils.py
defensetongxue/pyGAT
5677b15be986b0650b883cdd20dbfb1bb486d6f5
[ "MIT" ]
null
null
null
import numpy as np import scipy.sparse as sp import torch import json as js import pandas as pd def encode_onehot(labels): # The classes must be sorted before encoding to enable static class encoding. # In other words, make sure the first class always maps to index 0. classes = sorted(list(set(labels))) ...
37.553191
142
0.652125
import numpy as np import scipy.sparse as sp import torch import json as js import pandas as pd def encode_onehot(labels): classes = sorted(list(set(labels))) classes_dict = {c: np.identity(len(classes))[i, :] for i, c in enumerate(classes)} labels_onehot = np.array(list(map(classes_dict.get, lab...
true
true
f7421f87a99a927a6118a3682dbbc37b720d089c
614
py
Python
sgmon/nr.py
relistan/singularity-monitor
ddb1dcd1d43d6d901ff367850198f4a141f01c0d
[ "MIT" ]
null
null
null
sgmon/nr.py
relistan/singularity-monitor
ddb1dcd1d43d6d901ff367850198f4a141f01c0d
[ "MIT" ]
1
2019-10-15T21:10:01.000Z
2019-11-14T16:25:18.000Z
sgmon/nr.py
relistan/singularity-monitor
ddb1dcd1d43d6d901ff367850198f4a141f01c0d
[ "MIT" ]
1
2019-10-16T10:10:21.000Z
2019-10-16T10:10:21.000Z
import os import logging import newrelic.agent as agent from sgmon.log import get_logger logger = get_logger(__name__) def init_newrelic_agent(): try: _ = os.environ["NEW_RELIC_LICENSE_KEY"] except KeyError: logger.info("Agent will not report data to New Relic APM") else: config_...
27.909091
66
0.692182
import os import logging import newrelic.agent as agent from sgmon.log import get_logger logger = get_logger(__name__) def init_newrelic_agent(): try: _ = os.environ["NEW_RELIC_LICENSE_KEY"] except KeyError: logger.info("Agent will not report data to New Relic APM") else: config_...
true
true
f7421fa66c6d619b26a663213b5dc0c477691527
535
py
Python
Problems/Sherlock and Numbers/small.py
jamtot/HackerEarth
71b919920dbc5b3af3fc49920939bab418455fb6
[ "MIT" ]
3
2018-07-17T09:03:02.000Z
2020-05-11T18:03:25.000Z
Problems/Sherlock and Numbers/small.py
jamtot/HackerEarth
71b919920dbc5b3af3fc49920939bab418455fb6
[ "MIT" ]
null
null
null
Problems/Sherlock and Numbers/small.py
jamtot/HackerEarth
71b919920dbc5b3af3fc49920939bab418455fb6
[ "MIT" ]
2
2016-06-01T13:16:27.000Z
2018-09-25T08:32:24.000Z
def pth(N,K,P): # too slow for the huge inputs A=set(map(int,raw_input().split())) try: return [x for x in range(1,N+1) if x not in A][P-1] except IndexError: return -1 def ppth(N,K,P): x=P e = map(int,raw_input().split()) for i in xrange(K): if(e[i]<=x): x+=...
23.26087
59
0.517757
def pth(N,K,P): A=set(map(int,raw_input().split())) try: return [x for x in range(1,N+1) if x not in A][P-1] except IndexError: return -1 def ppth(N,K,P): x=P e = map(int,raw_input().split()) for i in xrange(K): if(e[i]<=x): x+=1 if(P<=N-K): retu...
false
true
f7421faefdbb37474b33a7e9ab63a0e6a6b978d3
5,975
py
Python
test/functional/rpc_users.py
zzcasper/JNita-Coin-Sources
bbe8b5d647d993611021cc12d79c4e509dae5a78
[ "MIT" ]
null
null
null
test/functional/rpc_users.py
zzcasper/JNita-Coin-Sources
bbe8b5d647d993611021cc12d79c4e509dae5a78
[ "MIT" ]
null
null
null
test/functional/rpc_users.py
zzcasper/JNita-Coin-Sources
bbe8b5d647d993611021cc12d79c4e509dae5a78
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiple RPC users.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
38.798701
129
0.613556
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import str_to_b64str, assert_equal import os import http.client import urllib.parse class HTTPBasicsTest (BitcoinTestFramework): def set_test_params(self): self.num_nodes = 2 def setup_chain(self): su...
true
true
f7421fc599e53f32dad63efa64c062d82c605e44
3,124
py
Python
Project/make_post.py
JonnyPugh/WordpostBot
3fcd485edf594a9098e210790b22f0a9caa9933d
[ "MIT" ]
null
null
null
Project/make_post.py
JonnyPugh/WordpostBot
3fcd485edf594a9098e210790b22f0a9caa9933d
[ "MIT" ]
null
null
null
Project/make_post.py
JonnyPugh/WordpostBot
3fcd485edf594a9098e210790b22f0a9caa9933d
[ "MIT" ]
null
null
null
#!/usr/bin/env python from extensions import * from config import * from sets import Set from re import match def get_wordnik_json(route, extra_params): params = { "limit": 1, "api_key": wordnik_key } params.update(extra_params) request_json = [] while not request_json: request_json = get_request_json("htt...
42.216216
432
0.709347
from extensions import * from config import * from sets import Set from re import match def get_wordnik_json(route, extra_params): params = { "limit": 1, "api_key": wordnik_key } params.update(extra_params) request_json = [] while not request_json: request_json = get_request_json("https://api.wordnik.com/...
true
true
f7422123c4ff2af193eb05d8808126b771bddc6a
2,719
py
Python
idfy_rest_client/models/packaging.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/models/packaging.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/models/packaging.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ idfy_rest_client.models.packaging This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io ) """ import idfy_rest_client.models.pades_settings class Packaging(object): """Implementation of the 'Packaging' model. TODO: type model ...
34.417722
172
0.638838
import idfy_rest_client.models.pades_settings class Packaging(object): _names = { "signature_package_formats":'signaturePackageFormats', "pades_settings":'padesSettings' } def __init__(self, signature_package_formats=None, pades_setti...
true
true
f742212e7d3764151798805df46cf2ba8e7c0d01
7,778
py
Python
official/projects/yt8m/dataloaders/yt8m_input_test.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
1
2020-09-14T10:46:07.000Z
2020-09-14T10:46:07.000Z
official/projects/yt8m/dataloaders/yt8m_input_test.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
null
null
null
official/projects/yt8m/dataloaders/yt8m_input_test.py
wnorris/models
a5e4965d1f4e4b02d51aa344336b6fff53af7c17
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 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.887179
80
0.700437
import os from absl import logging from absl.testing import parameterized import numpy as np import tensorflow as tf from official.core import input_reader from official.projects.yt8m.configs import yt8m as yt8m_configs from official.projects.yt8m.dataloaders import utils from official.projects.yt8m.dat...
true
true
f74221b001745c7f5c3c8a00f32e750084d8c97c
6,577
py
Python
sgsclient/__init__.py
stratumgs/stratum-client-libs
5bbc52036860535316d0fe833315c7b53af4ee01
[ "MIT" ]
null
null
null
sgsclient/__init__.py
stratumgs/stratum-client-libs
5bbc52036860535316d0fe833315c7b53af4ee01
[ "MIT" ]
null
null
null
sgsclient/__init__.py
stratumgs/stratum-client-libs
5bbc52036860535316d0fe833315c7b53af4ee01
[ "MIT" ]
null
null
null
""" .. module sgsclient This module contains the client library code. In general, a client should subclass ``StratumGSClientInstance`` and call the ``main`` function. """ import json import socket import sys version = "0.1.0" class StratumGSClient(object): def __init__(self, settings, client_instance_constru...
33.050251
89
0.590695
import json import socket import sys version = "0.1.0" class StratumGSClient(object): def __init__(self, settings, client_instance_constructor): self._settings = settings self._socket = None self._socket_readfile = None self._socket_writefile = None self._client_instanc...
true
true
f7422287ec0b3f27d2c37e67280260f59347da80
11,927
py
Python
python/macro_compiler_spec.py
jhogsett/linkit
97f9a99d3829a33e1b31b6f14210a7af44306a0f
[ "MIT" ]
2
2018-01-07T23:40:48.000Z
2018-06-07T08:08:58.000Z
python/macro_compiler_spec.py
jhogsett/linkit
97f9a99d3829a33e1b31b6f14210a7af44306a0f
[ "MIT" ]
1
2020-10-29T23:36:10.000Z
2020-10-29T23:36:10.000Z
python/macro_compiler_spec.py
jhogsett/linkit
97f9a99d3829a33e1b31b6f14210a7af44306a0f
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import macro_compiler as mc import os import app_ui as ui import terminal_colors as tc import argparse import led_command as lc import math import utils as u import datetime global app_description, verbose_mode, random_seed app_description = None verbose_mode = None random_seed = 1 glob...
38.350482
188
0.65423
import sys import macro_compiler as mc import os import app_ui as ui import terminal_colors as tc import argparse import led_command as lc import math import utils as u import datetime global app_description, verbose_mode, random_seed app_description = None verbose_mode = None random_seed = 1 global device_profile...
false
true
f7422296ebefa821653e07a5f93e36b497c20bbe
27,260
py
Python
cvat/apps/dataset_manager/task.py
gitibharatibiswal/cvat-adas-team
a33c1ae38d79ed6e35a61a97b74cd2978853e4c2
[ "Intel", "MIT" ]
2
2022-03-13T03:45:15.000Z
2022-03-13T03:46:19.000Z
cvat/apps/dataset_manager/task.py
nav13n/cvat
9bdcc7f8f2d86a763ab5f306ea049ce1432da557
[ "Intel", "MIT" ]
9
2021-07-15T13:42:33.000Z
2021-09-22T12:43:07.000Z
cvat/apps/dataset_manager/task.py
nav13n/cvat
9bdcc7f8f2d86a763ab5f306ea049ce1432da557
[ "Intel", "MIT" ]
41
2020-12-16T05:52:41.000Z
2021-09-23T08:45:16.000Z
# Copyright (C) 2019-2021 Intel Corporation # # SPDX-License-Identifier: MIT from collections import OrderedDict from enum import Enum from django.conf import settings from django.db import transaction from django.utils import timezone from cvat.apps.engine import models, serializers from cvat.apps.engine.plugins i...
35.494792
110
0.617498
from collections import OrderedDict from enum import Enum from django.conf import settings from django.db import transaction from django.utils import timezone from cvat.apps.engine import models, serializers from cvat.apps.engine.plugins import plugin_decorator from cvat.apps.profiler import silk_profile from ....
true
true
f74223737b9b5e69384d1627cc4291a3cc011965
8,423
py
Python
examples/rough_translated1/osganimationhardware.py
JaneliaSciComp/osgpyplusplus
a5ae3f69c7e9101a32d8cc95fe680dab292f75ac
[ "BSD-3-Clause" ]
17
2015-06-01T12:19:46.000Z
2022-02-12T02:37:48.000Z
examples/rough_translated1/osganimationhardware.py
cmbruns/osgpyplusplus
f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75
[ "BSD-3-Clause" ]
7
2015-07-04T14:36:49.000Z
2015-07-23T18:09:49.000Z
examples/rough_translated1/osganimationhardware.py
cmbruns/osgpyplusplus
f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75
[ "BSD-3-Clause" ]
7
2015-11-28T17:00:31.000Z
2020-01-08T07:00:59.000Z
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osganimationhardware" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgAnimation from osgpypp import osgDB from osgpypp import osgGA from osgp...
33.031373
131
0.658554
import sys from osgpypp import osg from osgpypp import osgAnimation from osgpypp import osgDB from osgpypp import osgGA from osgpypp import osgViewer static unsigned int getRandomValueinRange(unsigned int v) return static_cast<unsigned int>((rand() * 1.0 * v)/(RAND_MAX...
false
true
f742240ea53e33fcd737210f6c04b29b16bb4de3
413
py
Python
build/lib/admintool_command/command.py
jayvdb/django-admintool-command
aee5f8f003b5956e3a3e7df4957c5b839ffd8341
[ "MIT" ]
3
2019-08-07T23:33:19.000Z
2021-03-26T11:08:12.000Z
build/lib/admintool_command/command.py
jayvdb/django-admintool-command
aee5f8f003b5956e3a3e7df4957c5b839ffd8341
[ "MIT" ]
6
2020-04-27T13:09:42.000Z
2020-08-16T06:36:02.000Z
build/lib/admintool_command/command.py
jayvdb/django-admintool-command
aee5f8f003b5956e3a3e7df4957c5b839ffd8341
[ "MIT" ]
1
2020-08-07T05:52:46.000Z
2020-08-07T05:52:46.000Z
from abc import ABC, abstractmethod from django import forms from django.core.management import BaseCommand class AdminCommand(BaseCommand, ABC): name = None template = "admintool_command/command.html" class Form(forms.Form): pass def init_context(self, request=None, **kwargs): retu...
20.65
51
0.7046
from abc import ABC, abstractmethod from django import forms from django.core.management import BaseCommand class AdminCommand(BaseCommand, ABC): name = None template = "admintool_command/command.html" class Form(forms.Form): pass def init_context(self, request=None, **kwargs): retu...
true
true
f74224205c7c48e01dd834f9755a26c8ba344dd8
5,727
py
Python
demo/yolo.py
ruoxinx/site-dust-detect
f1b4c71f3ce5c325b25e26e9d663e3c1f7096ce7
[ "MIT" ]
4
2021-03-30T00:42:49.000Z
2022-02-10T00:25:08.000Z
demo/yolo.py
ruoxinx/site-dust-detect
f1b4c71f3ce5c325b25e26e9d663e3c1f7096ce7
[ "MIT" ]
null
null
null
demo/yolo.py
ruoxinx/site-dust-detect
f1b4c71f3ce5c325b25e26e9d663e3c1f7096ce7
[ "MIT" ]
null
null
null
import colorsys import os import numpy as np from keras import backend as K from keras.layers import Input from keras.models import load_model from PIL import Image, ImageDraw, ImageFont from nets.yolo3 import yolo_body, yolo_eval from utils.utils import letterbox_image class YOLO(object): _defaults = { ...
38.695946
112
0.573948
import colorsys import os import numpy as np from keras import backend as K from keras.layers import Input from keras.models import load_model from PIL import Image, ImageDraw, ImageFont from nets.yolo3 import yolo_body, yolo_eval from utils.utils import letterbox_image class YOLO(object): _defaults = { ...
true
true
f7422471a9b38da29fe8e9fa9f6505b82f5b2840
25,851
py
Python
ndg_oauth_server/ndg/oauth/server/lib/authorization_server.py
cedadev/ndg_oauth
83f2525bac3d739d1a61817ce3071c491b587793
[ "BSD-3-Clause" ]
2
2015-09-24T21:08:58.000Z
2016-10-20T02:34:45.000Z
ndg_oauth_server/ndg/oauth/server/lib/authorization_server.py
cedadev/ndg_oauth
83f2525bac3d739d1a61817ce3071c491b587793
[ "BSD-3-Clause" ]
null
null
null
ndg_oauth_server/ndg/oauth/server/lib/authorization_server.py
cedadev/ndg_oauth
83f2525bac3d739d1a61817ce3071c491b587793
[ "BSD-3-Clause" ]
1
2015-01-06T13:26:55.000Z
2015-01-06T13:26:55.000Z
"""OAuth 2.0 WSGI server middleware implements support for basic bearer tokens and also X.509 certificates as access tokens OAuth 2.0 Authorisation Server """ __author__ = "R B Wilkinson" __date__ = "12/12/11" __copyright__ = "(C) 2011 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file i...
40.903481
90
0.563228
"""OAuth 2.0 WSGI server middleware implements support for basic bearer tokens and also X.509 certificates as access tokens OAuth 2.0 Authorisation Server """ __author__ = "R B Wilkinson" __date__ = "12/12/11" __copyright__ = "(C) 2011 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file i...
false
true
f74224c79bf42c2d191df6e2d2f0e86a94c04fe9
7,611
py
Python
teacher_miniImageNet/datasets/cifar_few_shot.py
MuawizChaudhary/STARTUP
03f39b34a4ec232f132173b4a1e67ea04165e52b
[ "MIT" ]
184
2020-01-21T22:18:38.000Z
2022-03-23T21:42:31.000Z
datasets/cifar_few_shot.py
marzi-heidari/cdfsl-benchmark
5cfa6694a4ffa6ffd3cc22deceb4626fd008ee83
[ "Apache-2.0" ]
43
2020-01-29T12:15:36.000Z
2022-01-31T16:51:21.000Z
datasets/cifar_few_shot.py
marzi-heidari/cdfsl-benchmark
5cfa6694a4ffa6ffd3cc22deceb4626fd008ee83
[ "Apache-2.0" ]
41
2020-02-02T21:06:55.000Z
2022-01-05T04:10:53.000Z
# This code is modified from https://github.com/facebookresearch/low-shot-shrink-hallucinate import torch from PIL import Image import numpy as np import torchvision.transforms as transforms import additional_transforms as add_transforms from abc import abstractmethod from torchvision.datasets import CIFAR100, CIFAR10...
36.946602
123
0.607673
import torch from PIL import Image import numpy as np import torchvision.transforms as transforms import additional_transforms as add_transforms from abc import abstractmethod from torchvision.datasets import CIFAR100, CIFAR10 identity = lambda x:x class SimpleDataset: def __init__(self, mode, dataset, transform...
true
true
f74225b1057045a8ea00bca650a6c895a650fbab
2,745
py
Python
Scripts/training_mask_detection_model.py
thadanipaarth/Non-Invasive-Public-Safety-Detection-System
760b79c295e31003c7d0e826fe9214a73245c344
[ "MIT" ]
null
null
null
Scripts/training_mask_detection_model.py
thadanipaarth/Non-Invasive-Public-Safety-Detection-System
760b79c295e31003c7d0e826fe9214a73245c344
[ "MIT" ]
null
null
null
Scripts/training_mask_detection_model.py
thadanipaarth/Non-Invasive-Public-Safety-Detection-System
760b79c295e31003c7d0e826fe9214a73245c344
[ "MIT" ]
null
null
null
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import Dropout from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from tensorflow...
36.118421
71
0.798543
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import Dropout from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from tensorflow...
true
true
f74226d24cb5318ab4668e10bc2cb3276a388bc2
1,635
py
Python
src/saltext/vmware/utils/vmc_constants.py
kdsalvy/salt-ext-modules-vmware-1
9fdc941692e4c526f575f33b2ce23c1470582934
[ "Apache-2.0" ]
10
2021-11-02T20:24:44.000Z
2022-03-11T05:54:27.000Z
src/saltext/vmware/utils/vmc_constants.py
cmcmarrow/salt-ext-modules-vmware
c546a9f9ae121b7399dabae82f714117d0ab558d
[ "Apache-2.0" ]
83
2021-10-01T15:13:02.000Z
2022-03-31T16:22:40.000Z
src/saltext/vmware/utils/vmc_constants.py
cmcmarrow/salt-ext-modules-vmware
c546a9f9ae121b7399dabae82f714117d0ab558d
[ "Apache-2.0" ]
15
2021-09-30T23:17:27.000Z
2022-03-23T06:54:22.000Z
CSP_AUTHORIZATION_URL = "csp/gateway/am/api/auth/api-tokens/authorize" HTTPS_URL_PREFIX = "https://" URL_SUFFIX = "/" REFRESH_TOKEN = "refresh_token" CONTENT_TYPE = "Content-Type" ACCESS_TOKEN = "access_token" APPLICATION_JSON = "application/json" CSP_AUTH_TOKEN = "csp-auth-token" ERROR = "error" ERROR_MSG = "error_mes...
38.023256
100
0.769419
CSP_AUTHORIZATION_URL = "csp/gateway/am/api/auth/api-tokens/authorize" HTTPS_URL_PREFIX = "https://" URL_SUFFIX = "/" REFRESH_TOKEN = "refresh_token" CONTENT_TYPE = "Content-Type" ACCESS_TOKEN = "access_token" APPLICATION_JSON = "application/json" CSP_AUTH_TOKEN = "csp-auth-token" ERROR = "error" ERROR_MSG = "error_mes...
true
true
f7422731979ad4853b3ed8984d505258dff7f132
24,927
py
Python
pybind/nos/v7_0_1b/interface/port_channel/ip/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_0_1b/interface/port_channel/ip/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_0_1b/interface/port_channel/ip/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
72.885965
584
0.741565
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
f74227c47e5910246a5bc7d4c5075bdecbcb498d
44,612
py
Python
lib/galaxy/datatypes/data.py
BalthazarPavot/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
1
2019-07-03T08:13:57.000Z
2019-07-03T08:13:57.000Z
lib/galaxy/datatypes/data.py
LainOldAccound/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/datatypes/data.py
LainOldAccound/galaxy_project_reports
aa397de11a9a3425f85c701087af4c5d165b571f
[ "CC-BY-3.0" ]
null
null
null
import logging import mimetypes import os import shutil import tempfile import zipfile from cgi import escape from inspect import isclass import metadata from galaxy import util from galaxy.datatypes.metadata import MetadataElement # import directly to maintain ease of use in Datatype class definitions from galaxy.ut...
43.823183
206
0.611607
import logging import mimetypes import os import shutil import tempfile import zipfile from cgi import escape from inspect import isclass import metadata from galaxy import util from galaxy.datatypes.metadata import MetadataElement from galaxy.util import inflector from galaxy.util.bunch import Bunch from galaxy.uti...
true
true
f7422894886f612777bc1518c8fe57d0e0a3eb4f
4,053
py
Python
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/combined_audience_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/combined_audience_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/combined_audience_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
36.1875
79
0.66716
import abc import typing import pkg_resources import google.auth from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials from google.ads.googleads.v7.resources.types import combined_audience from google.ads.google...
true
true
f74228b96d1ad4d9e23a8482267deb5aae07cb1c
1,503
py
Python
Back End Projects/P5-SWISH_TOURNAMENT/create_character_database.py
UndreamtMayhem/Back-End-Dev
742849277303a379947706bc39295c1897f66c85
[ "MIT" ]
null
null
null
Back End Projects/P5-SWISH_TOURNAMENT/create_character_database.py
UndreamtMayhem/Back-End-Dev
742849277303a379947706bc39295c1897f66c85
[ "MIT" ]
null
null
null
Back End Projects/P5-SWISH_TOURNAMENT/create_character_database.py
UndreamtMayhem/Back-End-Dev
742849277303a379947706bc39295c1897f66c85
[ "MIT" ]
null
null
null
""" Character database schema """ from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine base = declarative_base() class Character(base): """ Character database schema """ __tablename__ = 'character' id = Column(Integ...
30.673469
63
0.64338
from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine base = declarative_base() class Character(base): __tablename__ = 'character' id = Column(Integer, primary_key=True) name = Column(String(250), nullable=False) s...
true
true
f742291935372790290d1e94edc2a9daaf0f1ad9
595
py
Python
kvdroid/jclass/__init__.py
wilsenmuts/Kvdroid
9ab29c54e761ce4cfaa9d8f847257c4a975fbe0f
[ "MIT" ]
27
2021-03-09T21:39:43.000Z
2022-01-25T22:55:34.000Z
kvdroid/jclass/__init__.py
kengoon/Kvdroid
a47ab614079b70f81031c2e16a2a04fba1d39677
[ "MIT" ]
10
2021-03-22T20:38:17.000Z
2021-12-23T21:06:40.000Z
kvdroid/jclass/__init__.py
kengoon/Kvdroid
a47ab614079b70f81031c2e16a2a04fba1d39677
[ "MIT" ]
7
2021-03-23T07:55:47.000Z
2021-12-17T09:32:35.000Z
from jnius import autoclass, JavaException def _class_call(cls, args: tuple, instantiate: bool): if not args: return cls() if instantiate else cls else: return cls(*args) def _browserx_except_cls_call(namespace: str, args: tuple, instantiate: bool): try: return _class_call(autocl...
31.315789
105
0.680672
from jnius import autoclass, JavaException def _class_call(cls, args: tuple, instantiate: bool): if not args: return cls() if instantiate else cls else: return cls(*args) def _browserx_except_cls_call(namespace: str, args: tuple, instantiate: bool): try: return _class_call(autocl...
true
true
f74229a10411559ea2f0bcfe44b35a0fb5a31916
4,863
py
Python
examples/02_Example_WaterwaySearch/dubinsUAV.py
jaywilhelm/OpenUxAS
76b08d94c4c51ca51d9f79c9db03d7344e9d6552
[ "NASA-1.3" ]
null
null
null
examples/02_Example_WaterwaySearch/dubinsUAV.py
jaywilhelm/OpenUxAS
76b08d94c4c51ca51d9f79c9db03d7344e9d6552
[ "NASA-1.3" ]
3
2019-06-10T06:10:52.000Z
2020-07-21T16:10:41.000Z
examples/02_Example_WaterwaySearch/dubinsUAV.py
jaywilhelm/OpenUxAS
76b08d94c4c51ca51d9f79c9db03d7344e9d6552
[ "NASA-1.3" ]
1
2021-01-12T02:45:46.000Z
2021-01-12T02:45:46.000Z
from matplotlib import pyplot as plt from shapely.geometry import Point from shapely.geometry.polygon import Polygon #from lineSegmentAoE import * import numpy as np import sys class dubinsUAV(): def __init__(self, position, velocity, heading, dt=0.1): self.velocity = velocity self.turnRateLimite...
32.637584
169
0.539173
from matplotlib import pyplot as plt from shapely.geometry import Point from shapely.geometry.polygon import Polygon import numpy as np import sys class dubinsUAV(): def __init__(self, position, velocity, heading, dt=0.1): self.velocity = velocity self.turnRateLimited = True self.v = vel...
true
true
f7422ac4ee31436492783881d897dc14998a4159
722
py
Python
app/core/migrations/0006_auto_20200413_0905.py
SkroX/TravelAlly-Backend
cb46204d44e71e39f4de1f593c91285677822a38
[ "MIT" ]
null
null
null
app/core/migrations/0006_auto_20200413_0905.py
SkroX/TravelAlly-Backend
cb46204d44e71e39f4de1f593c91285677822a38
[ "MIT" ]
null
null
null
app/core/migrations/0006_auto_20200413_0905.py
SkroX/TravelAlly-Backend
cb46204d44e71e39f4de1f593c91285677822a38
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-04-13 09:05 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0005_trip'), ] operations = [ migrations.AlterField( m...
27.769231
136
0.641274
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0005_trip'), ] operations = [ migrations.AlterField( model_name='trip', name='extra_peopl...
true
true
f7422bb099822402bc498ed27403c18b2eeec166
614
py
Python
dim/dim/errors.py
D3luxee/dim
14226db6006a14bddb6f6027f33f26a241bcb348
[ "MIT" ]
null
null
null
dim/dim/errors.py
D3luxee/dim
14226db6006a14bddb6f6027f33f26a241bcb348
[ "MIT" ]
null
null
null
dim/dim/errors.py
D3luxee/dim
14226db6006a14bddb6f6027f33f26a241bcb348
[ "MIT" ]
null
null
null
class DimError(Exception): code = 1 error_types = dict( InvalidPoolError=2, InvalidIPError=3, InvalidVLANError=4, InvalidStatusError=5, InvalidPriorityError=6, InvalidGroupError=7, InvalidUserError=8, InvalidAccessRightError=9, InvalidZoneError=10, InvalidViewError=11, ...
23.615385
61
0.710098
class DimError(Exception): code = 1 error_types = dict( InvalidPoolError=2, InvalidIPError=3, InvalidVLANError=4, InvalidStatusError=5, InvalidPriorityError=6, InvalidGroupError=7, InvalidUserError=8, InvalidAccessRightError=9, InvalidZoneError=10, InvalidViewError=11, ...
true
true
f7422be2928f7e893987a70a71df567a2d61e2ad
1,097
py
Python
Python/_vrconv/main.py
arigo/vr-sketch-3
97491e40476278cd6d487f2516b12a3d9db84c2d
[ "MIT" ]
null
null
null
Python/_vrconv/main.py
arigo/vr-sketch-3
97491e40476278cd6d487f2516b12a3d9db84c2d
[ "MIT" ]
null
null
null
Python/_vrconv/main.py
arigo/vr-sketch-3
97491e40476278cd6d487f2516b12a3d9db84c2d
[ "MIT" ]
null
null
null
import os import argparse from model import Face def find_module(filename): ext = os.path.splitext(filename)[1].lower() if ext == '.vrsketch': from _vrconv import vrsketch as result_module elif ext == '.skp': from _vrconv import sketchup as result_module else: raise ValueError(...
31.342857
84
0.66454
import os import argparse from model import Face def find_module(filename): ext = os.path.splitext(filename)[1].lower() if ext == '.vrsketch': from _vrconv import vrsketch as result_module elif ext == '.skp': from _vrconv import sketchup as result_module else: raise ValueError(...
false
true
f7422c1ec6a44f76adbbbf2f72cc38ba90ad2fb4
5,393
py
Python
Windows_v1.py
e-bookd/e-BookD
850d9e8ef3a2752224ed0a1886359bc52579af8a
[ "Apache-2.0" ]
3
2021-04-03T16:02:21.000Z
2021-04-06T09:32:39.000Z
Windows_v1.py
rrosajp/webPDFsaver
36100c378500ab1c773b37487b55685a6c006165
[ "Apache-2.0" ]
1
2021-04-05T06:56:08.000Z
2021-04-05T06:59:18.000Z
Windows_v1.py
rrosajp/webPDFsaver
36100c378500ab1c773b37487b55685a6c006165
[ "Apache-2.0" ]
3
2021-03-31T11:32:55.000Z
2021-04-10T08:01:34.000Z
# Web PDF Saver (Standard GUI-Windows). Liscensed under Apache License 2.0. # Release v1.0 # Not in standard library- img2pdf, pyautogui, PIL import img2pdf import time import tkinter as tk from PIL import ImageGrab import pyautogui import os #Main window creation # Top level window frame = tk.Tk() ...
25.083721
175
0.683293
import img2pdf import time import tkinter as tk from PIL import ImageGrab import pyautogui import os frame = tk.Tk() frame.title("Screenshot PDF maker") frame.geometry('400x400') frame.wm_attributes('-alpha',1) def makeTrans(): frame.update() frame.wm_attributes('-alpha',0.3) frame.upda...
true
true
f7422cb93d22840b78c03976591b22aeaae716be
1,030
py
Python
stackoverflowRecommender/apps.py
frozencure/recommender-website
33d2863c91ee15b007143d71c6d7db8d6918b4fa
[ "Apache-2.0" ]
null
null
null
stackoverflowRecommender/apps.py
frozencure/recommender-website
33d2863c91ee15b007143d71c6d7db8d6918b4fa
[ "Apache-2.0" ]
null
null
null
stackoverflowRecommender/apps.py
frozencure/recommender-website
33d2863c91ee15b007143d71c6d7db8d6918b4fa
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.apps import AppConfig class StackoverflowrecommenderConfig(AppConfig): name = 'stackoverflowRecommender' def __init__(self, app_name, app_module): super(StackoverflowrecommenderConfig, self).__init__(app_name, app_mo...
38.148148
114
0.664078
from __future__ import unicode_literals import os from django.apps import AppConfig class StackoverflowrecommenderConfig(AppConfig): name = 'stackoverflowRecommender' def __init__(self, app_name, app_module): super(StackoverflowrecommenderConfig, self).__init__(app_name, app_module) ...
true
true
f7422cbf0a0214cf992c3b5195fa542f32bdf022
3,816
py
Python
telesurscraper/spiders/articles.py
dreglad/telesur-scraper
3a2ba8d8c2b89ded24cb34e3f06f8ef88b3823f8
[ "MIT" ]
1
2020-03-21T22:45:37.000Z
2020-03-21T22:45:37.000Z
telesurscraper/spiders/articles.py
dreglad/telesur-scraper
3a2ba8d8c2b89ded24cb34e3f06f8ef88b3823f8
[ "MIT" ]
null
null
null
telesurscraper/spiders/articles.py
dreglad/telesur-scraper
3a2ba8d8c2b89ded24cb34e3f06f8ef88b3823f8
[ "MIT" ]
null
null
null
from datetime import datetime from html import unescape import logging from dateutil.parser import parse as parse_date import htmlmin from scrapy import Request from scrapy.spiders import Spider, CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.loader.processors import TakeFirst, MapCompos...
34.378378
135
0.690514
from datetime import datetime from html import unescape import logging from dateutil.parser import parse as parse_date import htmlmin from scrapy import Request from scrapy.spiders import Spider, CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.loader.processors import TakeFirst, MapCompos...
true
true
f7422db374b82c26cb0141b5f92ca781c4f23d19
24,148
py
Python
tests/fib/test_fib.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
1
2020-10-15T05:52:17.000Z
2020-10-15T05:52:17.000Z
tests/fib/test_fib.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
null
null
null
tests/fib/test_fib.py
stephengao-ragilenetworks/sonic-mgmt
b7ce8f6592f12ee8a7a0daca9a4337d5eaf9313f
[ "Apache-2.0" ]
null
null
null
import time import json import logging import tempfile import random from datetime import datetime import pytest import requests from tests.common.fixtures.ptfhost_utils import run_icmp_responder # lgtm[py/unused-import] from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory # lgtm[py/u...
41.278632
150
0.586343
import time import json import logging import tempfile import random from datetime import datetime import pytest import requests from tests.common.fixtures.ptfhost_utils import run_icmp_responder from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory from tests.common.fixtures.ptfhost...
true
true
f7422dd9b332918b8e4e4d575042b64014d82f5f
49,058
py
Python
Lib/threading.py
Ian-Foote/cpython
793cf3da645cc67989ee7376c66b7859005dd938
[ "PSF-2.0" ]
1
2015-10-15T01:25:33.000Z
2015-10-15T01:25:33.000Z
Lib/threading.py
Ian-Foote/cpython
793cf3da645cc67989ee7376c66b7859005dd938
[ "PSF-2.0" ]
null
null
null
Lib/threading.py
Ian-Foote/cpython
793cf3da645cc67989ee7376c66b7859005dd938
[ "PSF-2.0" ]
null
null
null
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys import _thread from time import monotonic as _time from traceback import format_exc as _format_exc from _weakrefset import WeakSet from itertools import islice as _islice try: from _collections import deque as _deque except Impor...
35.992663
101
0.624873
import sys as _sys import _thread from time import monotonic as _time from traceback import format_exc as _format_exc from _weakrefset import WeakSet from itertools import islice as _islice try: from _collections import deque as _deque except ImportError: from collections import deque as _deque # Jav...
true
true
f74230076b952b4e8ac5d38d2184e3461ad32237
521
py
Python
proj/models.py
lucasviei/Projeto-Estagio
bbceb65305b6c8b28d301be4e7fcd3455a279fcf
[ "MIT" ]
null
null
null
proj/models.py
lucasviei/Projeto-Estagio
bbceb65305b6c8b28d301be4e7fcd3455a279fcf
[ "MIT" ]
null
null
null
proj/models.py
lucasviei/Projeto-Estagio
bbceb65305b6c8b28d301be4e7fcd3455a279fcf
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here. class Acervo(models.Model): tipoObra = models.CharField(max_length=11) tituloObra = models.CharField(max_length=20) description = models.TextField() begin_date = models.DateField(auto_now_add=True) a...
27.421053
60
0.71977
from django.db import models from django.contrib.auth.models import User class Acervo(models.Model): tipoObra = models.CharField(max_length=11) tituloObra = models.CharField(max_length=20) description = models.TextField() begin_date = models.DateField(auto_now_add=True) active = models.BooleanFiel...
true
true
f742316cf6026b42f23c3604bd3924b05febb262
1,973
py
Python
Sketches/JL/test_Internet/test_MulticastTransceiverSystem.py
sparkslabs/kamaelia_orig
24b5f855a63421a1f7c6c7a35a7f4629ed955316
[ "Apache-2.0" ]
12
2015-10-20T10:22:01.000Z
2021-07-19T10:09:44.000Z
Sketches/JL/test_Internet/test_MulticastTransceiverSystem.py
sparkslabs/kamaelia_orig
24b5f855a63421a1f7c6c7a35a7f4629ed955316
[ "Apache-2.0" ]
2
2015-10-20T10:22:55.000Z
2017-02-13T11:05:25.000Z
Sketches/JL/test_Internet/test_MulticastTransceiverSystem.py
sparkslabs/kamaelia_orig
24b5f855a63421a1f7c6c7a35a7f4629ed955316
[ "Apache-2.0" ]
6
2015-03-09T12:51:59.000Z
2020-03-01T13:06:21.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Basic acceptance test harness for the Multicast_sender and receiver # components. # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - ple...
32.344262
80
0.708566
import socket import Axon def tests(): from Axon.Scheduler import scheduler from Kamaelia.Util.Console import ConsoleEchoer from Kamaelia.Util.Chargen import Chargen from Kamaelia.Internet.Multicast_sender import Multicast_sender from Kamaelia.Internet.Multicast_receiver impor...
false
true
f74231ee4316ebf339b9a91a03df0d307485d59f
6,249
py
Python
sacd/agent/sacd.py
lucifer2859/sac-discrete-pytorch
c6f367d95bdc5cee8b3d6e5a01172bb99af5b171
[ "MIT" ]
null
null
null
sacd/agent/sacd.py
lucifer2859/sac-discrete-pytorch
c6f367d95bdc5cee8b3d6e5a01172bb99af5b171
[ "MIT" ]
null
null
null
sacd/agent/sacd.py
lucifer2859/sac-discrete-pytorch
c6f367d95bdc5cee8b3d6e5a01172bb99af5b171
[ "MIT" ]
1
2021-01-11T11:48:31.000Z
2021-01-11T11:48:31.000Z
import os import numpy as np import torch from torch.optim import Adam from .base import BaseAgent from sacd.model import TwinnedQNetwork, CategoricalPolicy from sacd.utils import disable_gradients # If you want to use Prioritized Experience Replay(PER), N-step return # or Dueling Networks, change use_per, multi_ste...
40.843137
79
0.649384
import os import numpy as np import torch from torch.optim import Adam from .base import BaseAgent from sacd.model import TwinnedQNetwork, CategoricalPolicy from sacd.utils import disable_gradients class SacdAgent(BaseAgent): def __init__(self, env, test_env, log_dir, num_steps=100000, batch_size=64, ...
true
true
f7423216377ad5bfde584d5cb77fe45743ddf5a1
1,683
py
Python
vocoder/inference_wavrnn.py
freenowill/autoVC-WavRNN
871a7ae5671e81fe4396cbc6f89a90009b01049b
[ "MIT" ]
null
null
null
vocoder/inference_wavrnn.py
freenowill/autoVC-WavRNN
871a7ae5671e81fe4396cbc6f89a90009b01049b
[ "MIT" ]
null
null
null
vocoder/inference_wavrnn.py
freenowill/autoVC-WavRNN
871a7ae5671e81fe4396cbc6f89a90009b01049b
[ "MIT" ]
null
null
null
from vocoder.models.fatchord_version import WaveRNN from vocoder import hparams as hp import torch _model = None # type: WaveRNN def load_model(weights_fpath, verbose=True): global _model if verbose: print("Building Wave-RNN") _model = WaveRNN( rnn_dims=hp.voc_rnn_dims...
28.525424
95
0.636364
from vocoder.models.fatchord_version import WaveRNN from vocoder import hparams as hp import torch _model = None def load_model(weights_fpath, verbose=True): global _model if verbose: print("Building Wave-RNN") _model = WaveRNN( rnn_dims=hp.voc_rnn_dims, fc_di...
true
true