hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7904bbcf146feddc23a5102280062792e9a7b19d
319
py
Python
codes/write_csv.py
mukul54/Flipkart-Grid-Challenge
ae193490304c60cfc074e2f31f4db1a0b8e0e0f4
[ "MIT" ]
11
2019-07-05T16:32:12.000Z
2021-12-06T17:10:18.000Z
codes/write_csv.py
mukul54/Flipkart-Grid-Challenge
ae193490304c60cfc074e2f31f4db1a0b8e0e0f4
[ "MIT" ]
null
null
null
codes/write_csv.py
mukul54/Flipkart-Grid-Challenge
ae193490304c60cfc074e2f31f4db1a0b8e0e0f4
[ "MIT" ]
4
2020-07-01T17:11:56.000Z
2021-07-10T10:59:36.000Z
import numpy as np import pandas as pd X = np.load('preds.npy') img = pd.read_csv('test.csv') img['x1'] = X[:,0]*640 img['x2'] = X[:,1]*640 img['y1'] = X[:,2]*480 img['y2'] = X[:,3]*480 """ img['x1'] = 0.05*640 img['x2'] = 0.95*640 img['y1'] = 0.05*480 img['y2'] = 0.95*480 """ img.to_csv('subbigles.csv',index = False)
24.538462
41
0.567398
import numpy as np import pandas as pd X = np.load('preds.npy') img = pd.read_csv('test.csv') img['x1'] = X[:,0]*640 img['x2'] = X[:,1]*640 img['y1'] = X[:,2]*480 img['y2'] = X[:,3]*480 img.to_csv('subbigles.csv',index = False)
true
true
7904bc1044928c7eaf3de1c8ab22b76106971ace
945
py
Python
saw-remote-api/python/tests/saw/test_llvm_array_swap.py
msaaltink/saw-script
2e4fc0603da85bb1b188d4739a3386e25eea50ab
[ "BSD-3-Clause" ]
411
2015-06-09T22:00:47.000Z
2022-03-30T11:41:23.000Z
saw-remote-api/python/tests/saw/test_llvm_array_swap.py
msaaltink/saw-script
2e4fc0603da85bb1b188d4739a3386e25eea50ab
[ "BSD-3-Clause" ]
1,151
2015-06-12T20:46:31.000Z
2022-03-23T02:56:32.000Z
saw-remote-api/python/tests/saw/test_llvm_array_swap.py
msaaltink/saw-script
2e4fc0603da85bb1b188d4739a3386e25eea50ab
[ "BSD-3-Clause" ]
65
2015-06-10T17:52:26.000Z
2022-02-10T18:17:06.000Z
from pathlib import Path import unittest from saw_client import * from saw_client.llvm import Contract, array, array_ty, void, i32 class ArraySwapContract(Contract): def specification(self): a0 = self.fresh_var(i32, "a0") a1 = self.fresh_var(i32, "a1") a = self.alloc(array_ty(2, i32), ...
27.794118
76
0.639153
from pathlib import Path import unittest from saw_client import * from saw_client.llvm import Contract, array, array_ty, void, i32 class ArraySwapContract(Contract): def specification(self): a0 = self.fresh_var(i32, "a0") a1 = self.fresh_var(i32, "a1") a = self.alloc(array_ty(2, i32), ...
true
true
7904bc701e609458748ccd4a891047655f178468
12,355
py
Python
examples/smartquery.py
jonatasleon/sqlalchemy-mixins
a111e69fc5edc5d81a31dca45755f21c8c512ed1
[ "MIT" ]
1
2021-01-29T09:09:26.000Z
2021-01-29T09:09:26.000Z
examples/smartquery.py
AdamGold/sqlalchemy-mixins
66e87b0835ef27d504c36a1a27d551cfed551d89
[ "MIT" ]
null
null
null
examples/smartquery.py
AdamGold/sqlalchemy-mixins
66e87b0835ef27d504c36a1a27d551cfed551d89
[ "MIT" ]
null
null
null
from __future__ import print_function import os import datetime import sqlalchemy as sa from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_method from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import Query, scoped...
28.272311
88
0.671712
from __future__ import print_function import os import datetime import sqlalchemy as sa from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_method from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import Query, scoped...
true
true
7904bcf6cc1b735d27febe6bd6936266ac2347d7
6,699
py
Python
tests/integration/test_catalog.py
fredj/mf-chsdi3
79dfb5e850432fad95a34520b002ab0a421170b1
[ "BSD-3-Clause" ]
null
null
null
tests/integration/test_catalog.py
fredj/mf-chsdi3
79dfb5e850432fad95a34520b002ab0a421170b1
[ "BSD-3-Clause" ]
null
null
null
tests/integration/test_catalog.py
fredj/mf-chsdi3
79dfb5e850432fad95a34520b002ab0a421170b1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from tests.integration import TestsBase from chsdi.models.bod import Catalog from sqlalchemy.orm import scoped_session, sessionmaker from chsdi.views.catalog import create_digraph from chsdi.lib.filters import filter_by_geodata_staging class TestCatalogService(TestsBase): def test_nodes_...
44.072368
128
0.587252
from tests.integration import TestsBase from chsdi.models.bod import Catalog from sqlalchemy.orm import scoped_session, sessionmaker from chsdi.views.catalog import create_digraph from chsdi.lib.filters import filter_by_geodata_staging class TestCatalogService(TestsBase): def test_nodes_connection(self): ...
false
true
7904be24adff428e290a40dacede3ed68363bedd
3,783
py
Python
deepflash2/_nbdev.py
adriHei/deepflash2
82d2fd56f24a995b5c7e301c9c8b3d7b63430414
[ "Apache-2.0" ]
null
null
null
deepflash2/_nbdev.py
adriHei/deepflash2
82d2fd56f24a995b5c7e301c9c8b3d7b63430414
[ "Apache-2.0" ]
null
null
null
deepflash2/_nbdev.py
adriHei/deepflash2
82d2fd56f24a995b5c7e301c9c8b3d7b63430414
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"Config": "00_learner.ipynb", "energy_score": "00_learner.ipynb", "EnsemblePredict": "00_learner.ipynb", "EnsembleLearner": "00_learner.ipynb", "ARCHITECTURES": "01_models....
37.088235
62
0.560666
__all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"Config": "00_learner.ipynb", "energy_score": "00_learner.ipynb", "EnsemblePredict": "00_learner.ipynb", "EnsembleLearner": "00_learner.ipynb", "ARCHITECTURES": "01_models.ipynb", "ENCODERS": "01_model...
true
true
7904be815a4da7f8005b8d1074a6f8c7ceb79908
6,290
py
Python
tools/codegen/codegen_checker.py
MarouenMechtri/accords-platform-1
4f950fffd9fbbf911840cc5ad0fe5b5a331edf42
[ "Apache-2.0" ]
1
2015-02-28T21:25:54.000Z
2015-02-28T21:25:54.000Z
tools/codegen/codegen_checker.py
MarouenMechtri/accords-platform-1
4f950fffd9fbbf911840cc5ad0fe5b5a331edf42
[ "Apache-2.0" ]
null
null
null
tools/codegen/codegen_checker.py
MarouenMechtri/accords-platform-1
4f950fffd9fbbf911840cc5ad0fe5b5a331edf42
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # encoding: utf-8 ''' codegen_checker.codegen -- shortdesc codegen_checker.codegen is a description It defines classes_and_methods @author: user_name @copyright: 2013 organization_name. All rights reserved. @license: license @contact: user_email @deffield updated: U...
33.636364
218
0.56248
''' codegen_checker.codegen -- shortdesc codegen_checker.codegen is a description It defines classes_and_methods @author: user_name @copyright: 2013 organization_name. All rights reserved. @license: license @contact: user_email @deffield updated: Updated ''' import sys import os f...
false
true
7904be896d324c4f2ca4912704cfb6ef95503def
1,679
py
Python
graphium/graph_management/model/osm_highway_types.py
graphium-project/graphium-qgis-plugin
480e90dc874522b4d4d36b0d7b909ef3144da8b2
[ "Apache-2.0" ]
1
2020-07-11T10:28:33.000Z
2020-07-11T10:28:33.000Z
graphium/graph_management/model/osm_highway_types.py
graphium-project/graphium-qgis-plugin
480e90dc874522b4d4d36b0d7b909ef3144da8b2
[ "Apache-2.0" ]
null
null
null
graphium/graph_management/model/osm_highway_types.py
graphium-project/graphium-qgis-plugin
480e90dc874522b4d4d36b0d7b909ef3144da8b2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ /*************************************************************************** QGIS plugin 'Graphium' /*************************************************************************** * * Copyright 2020 Simon Gröchenig @ Salzburg Research * eMail graphium@salzburgresearch.at * * Licensed...
31.092593
77
0.59321
from enum import Enum class OsmHighwayTypes(Enum): MOTORWAY = 'motorway' MOTORWAY_LINK = 'motorway_link' TRUNK = 'trunk' TRUNK_LINK = 'trunk_link' PRIMARY = 'primary' PRIMARY_LINK = 'primary_link' SECONDARY = 'secondary' SECONDARY_LINK = 'secondary_link' TERTIARY = 'tertiary' ...
true
true
7904be955bb0568c7d67565f9d85f85bd3467034
1,970
py
Python
producer/main.py
jasonwyatt/docker-rabbitmq-demo
0a4f1f99d4dd168be2e97187f8e86c64d28fdfa8
[ "WTFPL" ]
4
2017-08-16T01:13:46.000Z
2018-09-06T13:58:39.000Z
producer/main.py
jasonwyatt/docker-rabbitmq-demo
0a4f1f99d4dd168be2e97187f8e86c64d28fdfa8
[ "WTFPL" ]
null
null
null
producer/main.py
jasonwyatt/docker-rabbitmq-demo
0a4f1f99d4dd168be2e97187f8e86c64d28fdfa8
[ "WTFPL" ]
1
2018-08-30T15:06:59.000Z
2018-08-30T15:06:59.000Z
import pika import os import logging import json import time import random import sys RABBIT_MQ_HOST = os.environ.get('RABBITMQ_PORT_5672_TCP_ADDR') RABBIT_MQ_PASS = os.environ.get('RABBITMQ_PASS') logger = logging.getLogger() logger.setLevel(logging.DEBUG) ch = logging.StreamHandler(sys.stdout) ch.setLevel(logging.D...
31.774194
85
0.58731
import pika import os import logging import json import time import random import sys RABBIT_MQ_HOST = os.environ.get('RABBITMQ_PORT_5672_TCP_ADDR') RABBIT_MQ_PASS = os.environ.get('RABBITMQ_PASS') logger = logging.getLogger() logger.setLevel(logging.DEBUG) ch = logging.StreamHandler(sys.stdout) ch.setLevel(logging.D...
true
true
7904bf082a4aa69c4a2e057653c3ffd2a36bdd9b
51,202
py
Python
bin/last_wrapper/Bio/Graphics/GenomeDiagram/_CircularDrawer.py
LyonsLab/coge
1d9a8e84a8572809ee3260ede44290e14de3bdd1
[ "BSD-2-Clause" ]
37
2015-02-24T18:58:30.000Z
2021-03-07T21:22:18.000Z
Bio/Graphics/GenomeDiagram/_CircularDrawer.py
sbassi/biopython
b41975bb8363171add80d19903861f3d8cffe405
[ "PostgreSQL" ]
12
2016-06-09T21:57:00.000Z
2020-09-11T18:48:51.000Z
Bio/Graphics/GenomeDiagram/_CircularDrawer.py
sbassi/biopython
b41975bb8363171add80d19903861f3d8cffe405
[ "PostgreSQL" ]
19
2016-03-26T08:15:17.000Z
2021-04-12T05:03:29.000Z
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved. # Revisions copyright 2008-2009 by Peter Cock. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # # Contact: Leighton Pritchard,...
44.79615
112
0.547479
self.set_track_heights() # Go through each track in the parent (if it is to be drawn) one by # one and collate the data as drawing elements for track_level in self._parent.get_drawn_levels(): self.current_track_level = track_level track = self._par...
true
true
7904bf6f2497e9344071a37a3b124b3545910ba1
7,388
py
Python
Fuzzer/src/word.py
compsec-snu/difuzz-rtl
bff2dee29b175ad1aeff0b88a334d37a91b84b8b
[ "BSD-3-Clause" ]
46
2021-03-31T12:07:37.000Z
2022-01-24T03:46:53.000Z
Fuzzer/src/word.py
sangyun0110/difuzz-rtl
bff2dee29b175ad1aeff0b88a334d37a91b84b8b
[ "BSD-3-Clause" ]
null
null
null
Fuzzer/src/word.py
sangyun0110/difuzz-rtl
bff2dee29b175ad1aeff0b88a334d37a91b84b8b
[ "BSD-3-Clause" ]
6
2021-05-07T01:31:02.000Z
2022-01-23T16:52:36.000Z
import os import random from riscv_definitions import * NONE = 0 CF_J = 1 CF_BR = 2 CF_RET = 3 MEM_R = 4 MEM_W = 5 CSR = 6 PREFIX = '_p' MAIN = '_l' SUFFIX = '_s' class Word(): def __init__(self, label: int, insts: list, tpe=NONE, xregs=[], fregs=[], imms=[], symbols=[], populated=False): se...
28.525097
116
0.525311
import os import random from riscv_definitions import * NONE = 0 CF_J = 1 CF_BR = 2 CF_RET = 3 MEM_R = 4 MEM_W = 5 CSR = 6 PREFIX = '_p' MAIN = '_l' SUFFIX = '_s' class Word(): def __init__(self, label: int, insts: list, tpe=NONE, xregs=[], fregs=[], imms=[], symbols=[], populated=False): se...
true
true
7904bf8b23974c94fc8a8310238c82c560497569
16,293
py
Python
glue_vispy_viewers/extern/vispy/gloo/buffer.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
3
2018-05-09T17:55:53.000Z
2019-07-22T09:14:41.000Z
glue_vispy_viewers/extern/vispy/gloo/buffer.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
19
2015-06-16T14:33:22.000Z
2015-07-27T21:18:15.000Z
graphViz/vispy/gloo/buffer.py
onecklam/ethereum-graphviz
6993accf0cb85e23013bf7ae6b04145724a6dbd2
[ "Apache-2.0" ]
1
2017-09-29T01:24:47.000Z
2017-09-29T01:24:47.000Z
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
32.651303
79
0.560302
import numpy as np from os import path as op from traceback import extract_stack, format_list import weakref from . globject import GLObject from ..util import logger from ..ext.six import string_types class Buffer(GLObject): def __init__(self, data=None, nbytes=None): GLObject.__init__(self)...
true
true
7904c130d6a5dbee35a6f38140d14f5568a5751f
4,235
py
Python
influxdb_client/service/health_service.py
rhajek/influxdb-client-python
852e6f1b1161df4d67eabc19cdb6b323a46b88e2
[ "MIT" ]
null
null
null
influxdb_client/service/health_service.py
rhajek/influxdb-client-python
852e6f1b1161df4d67eabc19cdb6b323a46b88e2
[ "MIT" ]
null
null
null
influxdb_client/service/health_service.py
rhajek/influxdb-client-python
852e6f1b1161df4d67eabc19cdb6b323a46b88e2
[ "MIT" ]
null
null
null
# coding: utf-8 """ Influx API Service No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F40...
34.153226
132
0.629988
from __future__ import absolute_import import re import six from influxdb_client.api_client import ApiClient class HealthService(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_health(sel...
true
true
7904c2d96a35d0856793b2bea96eb68c715feaf3
18
py
Python
jobs/version.py
shi1412/pyspark-oltp-pipeline
b3b28f84007ea8af6df0b7dfba760e0f3365ed94
[ "MIT" ]
null
null
null
jobs/version.py
shi1412/pyspark-oltp-pipeline
b3b28f84007ea8af6df0b7dfba760e0f3365ed94
[ "MIT" ]
null
null
null
jobs/version.py
shi1412/pyspark-oltp-pipeline
b3b28f84007ea8af6df0b7dfba760e0f3365ed94
[ "MIT" ]
null
null
null
VERSION = 'v0.0.1'
18
18
0.611111
VERSION = 'v0.0.1'
true
true
7904c3c2af9596a4fb10b2032f25d2a2381fb8d3
4,553
py
Python
nistats/tests/test_check_events_file_uses_tab_separators.py
gifuni/nistats
8f0b606f6da6dc7f55e25cc0fa903fdfcc007145
[ "BSD-3-Clause" ]
null
null
null
nistats/tests/test_check_events_file_uses_tab_separators.py
gifuni/nistats
8f0b606f6da6dc7f55e25cc0fa903fdfcc007145
[ "BSD-3-Clause" ]
2
2019-12-18T14:40:01.000Z
2020-01-08T15:13:50.000Z
nistats/tests/test_check_events_file_uses_tab_separators.py
gifuni/nistats
8f0b606f6da6dc7f55e25cc0fa903fdfcc007145
[ "BSD-3-Clause" ]
1
2022-02-21T08:21:30.000Z
2022-02-21T08:21:30.000Z
import pandas as pd from nibabel.tmpdirs import InTemporaryDirectory from nose.tools import (assert_raises, assert_true, ) from nistats.utils import _check_events_file_uses_tab_separators def make_data_for_test_runs(): data_for_temp_datafile = [ ['csf', 'c...
33.977612
78
0.664617
import pandas as pd from nibabel.tmpdirs import InTemporaryDirectory from nose.tools import (assert_raises, assert_true, ) from nistats.utils import _check_events_file_uses_tab_separators def make_data_for_test_runs(): data_for_temp_datafile = [ ['csf', 'c...
true
true
7904c594dc3dcfbe21cff458e72720bb8dbd2a60
3,905
py
Python
src/ewatercycle/observation/usgs.py
cffbots/ewatercycle
29571aace32fcea8f70948259e33a62c9c834808
[ "Apache-2.0" ]
18
2021-03-25T08:25:32.000Z
2022-03-25T09:23:09.000Z
src/ewatercycle/observation/usgs.py
cffbots/ewatercycle
29571aace32fcea8f70948259e33a62c9c834808
[ "Apache-2.0" ]
323
2016-08-11T12:13:58.000Z
2022-03-30T11:29:04.000Z
src/ewatercycle/observation/usgs.py
cffbots/ewatercycle
29571aace32fcea8f70948259e33a62c9c834808
[ "Apache-2.0" ]
4
2018-06-27T11:47:23.000Z
2022-02-02T14:14:13.000Z
import os from datetime import datetime import numpy as np import xarray as xr from pyoos.collectors.usgs.usgs_rest import UsgsRest from pyoos.parsers.waterml import WaterML11ToPaegan def get_usgs_data(station_id, start_date, end_date, parameter="00060", cache_dir=None): """Get river discharge data from the USGS...
30.271318
89
0.576184
import os from datetime import datetime import numpy as np import xarray as xr from pyoos.collectors.usgs.usgs_rest import UsgsRest from pyoos.parsers.waterml import WaterML11ToPaegan def get_usgs_data(station_id, start_date, end_date, parameter="00060", cache_dir=None): if cache_dir is None: cache_dir =...
true
true
7904c5ac3928098f72b6ad5705bf4a2b346d03ae
1,621
py
Python
site/social_auth/filters.py
776166/yggdrasil-django
7ae134ad5a714e0ab9f735348406b32e46c36b3a
[ "MIT" ]
null
null
null
site/social_auth/filters.py
776166/yggdrasil-django
7ae134ad5a714e0ab9f735348406b32e46c36b3a
[ "MIT" ]
1
2020-06-05T19:19:22.000Z
2020-06-05T19:19:22.000Z
site/social_auth/filters.py
776166/yggdrasil-django
7ae134ad5a714e0ab9f735348406b32e46c36b3a
[ "MIT" ]
null
null
null
import re from social_core.backends.oauth import OAuthAuth NAME_RE = re.compile(r'([^O])Auth') LEGACY_NAMES = ['username', 'email'] def backend_name(backend): name = backend.__name__ name = name.replace('OAuth', ' OAuth') name = name.replace('OpenId', ' OpenId') name = name.replace('Sandbox', '') ...
23.157143
72
0.624923
import re from social_core.backends.oauth import OAuthAuth NAME_RE = re.compile(r'([^O])Auth') LEGACY_NAMES = ['username', 'email'] def backend_name(backend): name = backend.__name__ name = name.replace('OAuth', ' OAuth') name = name.replace('OpenId', ' OpenId') name = name.replace('Sandbox', '') ...
true
true
7904c5ebb599aec04ae6a086b288bfaba3c63bf2
1,326
py
Python
pyrlang/net_kernel.py
rlouf/Pyrlang
c50e6a52a29128f535f29aeb98ee1a8b333852b8
[ "Apache-2.0" ]
1
2020-07-23T13:26:35.000Z
2020-07-23T13:26:35.000Z
pyrlang/net_kernel.py
rlouf/Pyrlang
c50e6a52a29128f535f29aeb98ee1a8b333852b8
[ "Apache-2.0" ]
null
null
null
pyrlang/net_kernel.py
rlouf/Pyrlang
c50e6a52a29128f535f29aeb98ee1a8b333852b8
[ "Apache-2.0" ]
null
null
null
# Copyright 2018, Erlang Solutions Ltd, and S2HC Sweden AB # # 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...
30.837209
78
0.687029
import logging from pyrlang.gen_server import GenServer from pyrlang.node import Node from term.atom import Atom LOG = logging.getLogger("pyrlang") class NetKernel(GenServer): def __init__(self, node) -> None: GenServer.__init__(self, node_name=node.node_name_, ...
true
true
7904c63ff97ebcd5f9ef6db7145b1e6d5de04ccb
1,461
py
Python
mla_game/settings/stage.py
amazingwebdev/django-FixIt
698aa7e4c45f07d86fbf209d1caca017ed136675
[ "MIT" ]
null
null
null
mla_game/settings/stage.py
amazingwebdev/django-FixIt
698aa7e4c45f07d86fbf209d1caca017ed136675
[ "MIT" ]
null
null
null
mla_game/settings/stage.py
amazingwebdev/django-FixIt
698aa7e4c45f07d86fbf209d1caca017ed136675
[ "MIT" ]
null
null
null
from .base import * import os # how many data points are enough to calculate confidence? MINIMUM_SAMPLE_SIZE = 3 # original phrase is good enough for export TRANSCRIPT_PHRASE_POSITIVE_CONFIDENCE_LIMIT = .51 # original phrase needs correction TRANSCRIPT_PHRASE_NEGATIVE_CONFIDENCE_LIMIT = -.51 # correction is good eno...
23.190476
66
0.615332
from .base import * import os MINIMUM_SAMPLE_SIZE = 3 TRANSCRIPT_PHRASE_POSITIVE_CONFIDENCE_LIMIT = .51 TRANSCRIPT_PHRASE_NEGATIVE_CONFIDENCE_LIMIT = -.51 TRANSCRIPT_PHRASE_CORRECTION_LOWER_LIMIT = .51 TRANSCRIPT_PHRASE_CORRECTION_UPPER_LIMIT = .66 SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True LOG_DIREC...
true
true
7904c8bf5fb25baf6061a40684b55286cb37e548
407
py
Python
backend/backend/asgi.py
CSXLabs/csxlabs.org
a51551b0eda149045feea1bb148dcf9ada5566e7
[ "MIT" ]
3
2021-09-15T04:02:59.000Z
2021-11-03T07:18:35.000Z
backend/backend/asgi.py
CSXLabs/csxlabs.org
a51551b0eda149045feea1bb148dcf9ada5566e7
[ "MIT" ]
36
2021-09-22T05:28:14.000Z
2021-12-05T18:10:08.000Z
backend/backend/asgi.py
CSXLabs/csxlabs.org
a51551b0eda149045feea1bb148dcf9ada5566e7
[ "MIT" ]
2
2021-09-15T04:17:54.000Z
2022-01-11T17:13:51.000Z
""" ASGI config for backend project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault(...
23.941176
79
0.7543
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') application = get_asgi_application()
true
true
7904c939a1af4ad8d91b258873e3311af1d0bb47
1,649
py
Python
py/test/selenium/webdriver/common/page_load_timeout_tests.py
shubhramittal/selenium
0359f0a510991d1b5ce9b41d849425349f952a86
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/common/page_load_timeout_tests.py
shubhramittal/selenium
0359f0a510991d1b5ce9b41d849425349f952a86
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/common/page_load_timeout_tests.py
shubhramittal/selenium
0359f0a510991d1b5ce9b41d849425349f952a86
[ "Apache-2.0" ]
null
null
null
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
40.219512
70
0.745907
import pytest from selenium.common.exceptions import TimeoutException class TestPageLoadTimeout(object): @pytest.mark.xfail_phantomjs( reason='PhantomJS does not implement page load timeouts') def testShouldTimeoutOnPageLoadTakingTooLong(self, driver, pages): driver.set_page...
true
true
7904c964ac73898969bc98fc593eb600a723f137
10,991
py
Python
examples/ImageRecon/OccNet/architectures.py
Bob-Yeah/kaolin
7ad34f8158000499a30b8dfa14fb3ed86d2e57a6
[ "ECL-2.0", "Apache-2.0" ]
2
2021-10-31T01:08:17.000Z
2021-11-08T09:43:17.000Z
examples/ImageRecon/OccNet/architectures.py
Bob-Yeah/kaolin
7ad34f8158000499a30b8dfa14fb3ed86d2e57a6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
examples/ImageRecon/OccNet/architectures.py
Bob-Yeah/kaolin
7ad34f8158000499a30b8dfa14fb3ed86d2e57a6
[ "ECL-2.0", "Apache-2.0" ]
2
2021-08-10T09:19:19.000Z
2021-11-12T08:18:17.000Z
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicabl...
31.402857
85
0.59203
import math import torch from torch import nn from torch.nn.parameter import Parameter import torch.nn.functional as F from torchvision import models import torch.distributions as dist import torch from torch.nn import Parameter class Resnet18(nn.Module): def __init__(self, c_dim, normalize=True...
true
true
7904cabfedf75b5708c9d17ad9e31ceb76acd88b
16,140
py
Python
boneless/simulator/sim.py
zignig/Boneless-CPU
10bb571b4efab015e1bf147c78f0b8b3c93443e4
[ "Apache-2.0", "0BSD" ]
null
null
null
boneless/simulator/sim.py
zignig/Boneless-CPU
10bb571b4efab015e1bf147c78f0b8b3c93443e4
[ "Apache-2.0", "0BSD" ]
null
null
null
boneless/simulator/sim.py
zignig/Boneless-CPU
10bb571b4efab015e1bf147c78f0b8b3c93443e4
[ "Apache-2.0", "0BSD" ]
null
null
null
import array __all__ = ["BonelessSimulator", "BonelessError"] # Flag functions # Used to calculate sign bit and also # overflow. def sign(val): return int((val & 0x08000) != 0) def zero(val): return int(to_unsigned16b(val) == 0) # Carry and V use 65xx semantics: # http://www.righto.com/2012/12/the-6502-ove...
31.709234
94
0.53575
import array __all__ = ["BonelessSimulator", "BonelessError"] def sign(val): return int((val & 0x08000) != 0) def zero(val): return int(to_unsigned16b(val) == 0) def carry(val): return int(val > 65535) def overflow(a, b, out): s_a = sign(a) s_b = sign(b) s_o = sign(out) return i...
true
true
7904cb201f269a1de6261f9918c25ed6cc376a26
969
py
Python
python01/PythonDecorator.py
zhayangtao/HelloPython
e0e8b450afba1382f56411344ad54ef9910a5004
[ "Apache-2.0" ]
null
null
null
python01/PythonDecorator.py
zhayangtao/HelloPython
e0e8b450afba1382f56411344ad54ef9910a5004
[ "Apache-2.0" ]
1
2017-09-01T03:59:11.000Z
2017-09-01T03:59:11.000Z
python01/PythonDecorator.py
zhayangtao/HelloPython
e0e8b450afba1382f56411344ad54ef9910a5004
[ "Apache-2.0" ]
null
null
null
def now(): print('2017-05-31') now.__name__ f = now f.__name__ # 定义记录log的装饰器 def log(func): def wrapper(*args, **kw): print('call %s():' % func.__name__) return func(*args, **kw) return wrapper @log def now1(): print('2017-05-31') # 如果 decorator 需要传入参数,需要编写一个返回 decorator 的高阶函数 d...
17.618182
53
0.562436
def now(): print('2017-05-31') now.__name__ f = now f.__name__ def log(func): def wrapper(*args, **kw): print('call %s():' % func.__name__) return func(*args, **kw) return wrapper @log def now1(): print('2017-05-31') def log1(text): def decorator(func): def wrapper...
true
true
7904cb9e72caa6c8614489065df4491eae0d07f6
1,915
py
Python
app/global/train_cont.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/global/train_cont.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
null
null
null
app/global/train_cont.py
fkwai/geolearn
30cb4353d22af5020a48100d07ab04f465a315b0
[ "MIT" ]
2
2021-04-04T02:45:59.000Z
2022-03-19T09:41:39.000Z
from hydroDL import pathSMAP, master import os from hydroDL.data import dbCsv # train for each cont contLst = [ 'Africa', 'Asia', 'Australia', 'Europe', 'NorthAmerica', 'SouthAmerica', ] subsetLst = ['Globalv4f1_' + x for x in contLst] subsetLst.append('Globalv4f1') outLst = [x + '_v4f1_y1' for...
30.887097
79
0.644386
from hydroDL import pathSMAP, master import os from hydroDL.data import dbCsv contLst = [ 'Africa', 'Asia', 'Australia', 'Europe', 'NorthAmerica', 'SouthAmerica', ] subsetLst = ['Globalv4f1_' + x for x in contLst] subsetLst.append('Globalv4f1') outLst = [x + '_v4f1_y1' for x in contLst] outLst...
true
true
7904cc0d25e5c22180d8dd96475db6a70b610a23
13,084
py
Python
tests/profile/test_profile.py
williamjr/great_expectations
7e3af56476ea9966045172696af316b8537ff4c6
[ "Apache-2.0" ]
2
2020-03-04T19:35:57.000Z
2020-04-13T21:06:02.000Z
tests/profile/test_profile.py
noncomposmentis/great_expectations
8155b1f20a88aa186745698792856f84d82f33ef
[ "Apache-2.0" ]
null
null
null
tests/profile/test_profile.py
noncomposmentis/great_expectations
8155b1f20a88aa186745698792856f84d82f33ef
[ "Apache-2.0" ]
null
null
null
import pytest import json from collections import OrderedDict from great_expectations.profile.base import DatasetProfiler from great_expectations.profile.basic_dataset_profiler import BasicDatasetProfiler from great_expectations.profile.columns_exist import ColumnsExistProfiler from great_expectations.dataset.pandas_...
48.639405
490
0.747249
import pytest import json from collections import OrderedDict from great_expectations.profile.base import DatasetProfiler from great_expectations.profile.basic_dataset_profiler import BasicDatasetProfiler from great_expectations.profile.columns_exist import ColumnsExistProfiler from great_expectations.dataset.pandas_...
true
true
7904cd4143c870386bf7e3c0c60242b60fbe156d
9,525
py
Python
extra/release.py
jcassette/beets
10338c2a601c28289cd30debf2537b3523d95446
[ "MIT" ]
1
2022-03-17T22:44:47.000Z
2022-03-17T22:44:47.000Z
extra/release.py
jcassette/beets
10338c2a601c28289cd30debf2537b3523d95446
[ "MIT" ]
1
2022-03-10T00:41:36.000Z
2022-03-10T00:41:36.000Z
extra/release.py
jcassette/beets
10338c2a601c28289cd30debf2537b3523d95446
[ "MIT" ]
1
2022-03-10T00:37:26.000Z
2022-03-10T00:37:26.000Z
#!/usr/bin/env python3 """A utility script for automating the beets release process. """ import click import os import re import subprocess from contextlib import contextmanager import datetime BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) CHANGELOG = os.path.join(BASE, 'docs', 'changelog.rst') ...
26.90678
77
0.526089
import click import os import re import subprocess from contextlib import contextmanager import datetime BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) CHANGELOG = os.path.join(BASE, 'docs', 'changelog.rst') @contextmanager def chdir(d): olddir = os.getcwd() os.chdir(d) yield os...
true
true
7904cd5db58cc10f04e8b8ed06a0c5b09d965fe6
544
py
Python
setup.py
akumor/python-rastervectoranalysis
33370f8d104d3b69ce4c689783818512e7f864f2
[ "Apache-2.0" ]
null
null
null
setup.py
akumor/python-rastervectoranalysis
33370f8d104d3b69ce4c689783818512e7f864f2
[ "Apache-2.0" ]
null
null
null
setup.py
akumor/python-rastervectoranalysis
33370f8d104d3b69ce4c689783818512e7f864f2
[ "Apache-2.0" ]
null
null
null
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'Raster Vector Analysis', 'author': 'Jan Kumor', 'url': 'http://github.com/akumor/python-rastervectoranalysis', 'download_url': 'http://github.com/akumor/python-rastervectoranalysis'...
27.2
75
0.667279
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'Raster Vector Analysis', 'author': 'Jan Kumor', 'url': 'http://github.com/akumor/python-rastervectoranalysis', 'download_url': 'http://github.com/akumor/python-rastervectoranalysis'...
true
true
7904ce17f721204cfe9cd705d9bb971fa3408ec6
5,716
py
Python
sklearn/decomposition/_base.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
50,961
2015-01-01T06:06:31.000Z
2022-03-31T23:40:12.000Z
sklearn/decomposition/_base.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
17,065
2015-01-01T02:01:58.000Z
2022-03-31T23:48:34.000Z
sklearn/decomposition/_base.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
26,886
2015-01-01T00:59:27.000Z
2022-03-31T18:03:23.000Z
"""Principal Component Analysis Base Classes""" # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <denis-alexander.engemann@inria.fr> # Kyle Kastner <kastnerkyle@gmail.com> ...
34.853659
88
0.618964
import numpy as np from scipy import linalg from ..base import BaseEstimator, TransformerMixin, _ClassNamePrefixFeaturesOutMixin from ..utils.validation import check_is_fitted from abc import ABCMeta, abstractmethod class _BasePCA( _ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator, metac...
true
true
7904ce86e89bc53ab3adb657e0b83f32a40e61e7
91,732
py
Python
storage/tests/unit/test_blob.py
rodrigodias27/google-cloud-python
7d1161f70744c0dbbe67a3f472ea95667eaafe50
[ "Apache-2.0" ]
null
null
null
storage/tests/unit/test_blob.py
rodrigodias27/google-cloud-python
7d1161f70744c0dbbe67a3f472ea95667eaafe50
[ "Apache-2.0" ]
null
null
null
storage/tests/unit/test_blob.py
rodrigodias27/google-cloud-python
7d1161f70744c0dbbe67a3f472ea95667eaafe50
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Google 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 writing, ...
39.369957
80
0.637804
import datetime import io import json import os import unittest import mock import six from six.moves import http_client def _make_credentials(): import google.auth.credentials return mock.Mock(spec=google.auth.credentials.Credentials) class Test_Blob(unittest.TestCase): @staticmethod ...
true
true
7904cf1ea8f94dd407c6c6e17bc6b9f8c418d059
11,807
py
Python
Data-Engineering-with-Databricks/06 - Incremental Data Processing/DE 6.1 - Incremental Data Ingestion with Auto Loader.py
databricks-academy/data-engineering-with-databricks
619532eddf7d2cce8f48772afc8d69797036890c
[ "CC0-1.0" ]
35
2022-01-20T01:26:20.000Z
2022-03-30T11:56:23.000Z
Data-Engineering-with-Databricks/Solutions/06 - Incremental Data Processing/DE 6.1 - Incremental Data Ingestion with Auto Loader.py
databricks-academy/data-engineering-with-databricks
619532eddf7d2cce8f48772afc8d69797036890c
[ "CC0-1.0" ]
null
null
null
Data-Engineering-with-Databricks/Solutions/06 - Incremental Data Processing/DE 6.1 - Incremental Data Ingestion with Auto Loader.py
databricks-academy/data-engineering-with-databricks
619532eddf7d2cce8f48772afc8d69797036890c
[ "CC0-1.0" ]
30
2022-01-28T23:53:32.000Z
2022-03-31T08:25:27.000Z
# Databricks notebook source # MAGIC %md-sandbox # MAGIC # MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;"> # MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px"> # MAGIC </div> # COMMAND ---------- # M...
42.167857
315
0.720505
and scalability that Auto Loader delivers, Databricks recommends its use as general **best practice** when ingesting data from cloud object storage. # MAGIC # MAGIC ## Learning Objectives # MAGIC By the end of this lesson, you should be able to: # MAGIC * Execute Auto Loader code to incrementally ingest d...
true
true
7904d0fddb05ad2b0eb2abb776fcea08505d5f30
2,128
py
Python
test-toolkit/integration/__init__.py
YYStreet/sagemaker-pytorch-serving-container
97ce79900b3fcbc644b4c58c787c84c881d611f9
[ "Apache-2.0" ]
null
null
null
test-toolkit/integration/__init__.py
YYStreet/sagemaker-pytorch-serving-container
97ce79900b3fcbc644b4c58c787c84c881d611f9
[ "Apache-2.0" ]
null
null
null
test-toolkit/integration/__init__.py
YYStreet/sagemaker-pytorch-serving-container
97ce79900b3fcbc644b4c58c787c84c881d611f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
44.333333
92
0.724624
from __future__ import absolute_import import os resources_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'resources')) mnist_path = os.path.join(resources_path, 'mnist') data_dir = os.path.join(mnist_path, 'data') training_dir = os.path.join(data_dir, 'training') cpu_sub_dir = 'mode...
true
true
7904d1e2e793a6986cfe6cab88aaf8f93ca90613
2,122
py
Python
adv_sample.py
ssleg/qiwi_module
ef203a904e8ccd6e784b25ccded9d56c9719f2de
[ "MIT" ]
null
null
null
adv_sample.py
ssleg/qiwi_module
ef203a904e8ccd6e784b25ccded9d56c9719f2de
[ "MIT" ]
null
null
null
adv_sample.py
ssleg/qiwi_module
ef203a904e8ccd6e784b25ccded9d56c9719f2de
[ "MIT" ]
null
null
null
# Qiwi module advanced usage example v1.00 # 17/05/2021 # https://t.me/ssleg © 2021 import logging import qiwi_module # настройка логфлайла test,log, туда будут записываться все ошибки и предупреждения. lfile = logging.FileHandler('test.log', 'a', 'utf-8') lfile.setFormatter(logging.Formatter('%(levelname)s %(modul...
38.581818
112
0.780396
import logging import qiwi_module lfile = logging.FileHandler('test.log', 'a', 'utf-8') lfile.setFormatter(logging.Formatter('%(levelname)s %(module)-13s [%(asctime)s] %(message)s')) logging.basicConfig(level=logging.INFO, handlers=[lfile]) theme_code = 'Ivanov-XX-vvv-k_' qiwi_module.init(theme_code) ...
true
true
7904d2173251d44a6dba2f960b035e3cd19775e1
700
py
Python
phc/easy/omics/options/gene_class.py
taylordeatri/phc-sdk-py
8f3ec6ac44e50c7194f174fd0098de390886693d
[ "MIT" ]
1
2020-07-22T12:46:58.000Z
2020-07-22T12:46:58.000Z
phc/easy/omics/options/gene_class.py
taylordeatri/phc-sdk-py
8f3ec6ac44e50c7194f174fd0098de390886693d
[ "MIT" ]
54
2019-10-09T16:19:04.000Z
2022-01-19T20:28:59.000Z
phc/easy/omics/options/gene_class.py
taylordeatri/phc-sdk-py
8f3ec6ac44e50c7194f174fd0098de390886693d
[ "MIT" ]
2
2019-10-30T19:54:43.000Z
2020-12-03T18:57:15.000Z
from enum import Enum class GeneClass(str, Enum): PROTEIN_CODING = ("protein coding,nonsense mediated decay",) PSEUDOGENE = "pseudogene,unprocessed pseudogene,polymorphic pseudogene,unitary pseudogene,transcribed unprocessed pseudogene,transcribed processed pseudogene, IG pseudogene" MICRO_RNA = "micro RN...
50
177
0.76
from enum import Enum class GeneClass(str, Enum): PROTEIN_CODING = ("protein coding,nonsense mediated decay",) PSEUDOGENE = "pseudogene,unprocessed pseudogene,polymorphic pseudogene,unitary pseudogene,transcribed unprocessed pseudogene,transcribed processed pseudogene, IG pseudogene" MICRO_RNA = "micro RN...
true
true
7904d29a91c1be5ca4a0c62b127284cd0e90032d
1,405
py
Python
Python3/0943-Find-the-Shortest-Superstring/soln-1.py
wyaadarsh/LeetCode-Solutions
3719f5cb059eefd66b83eb8ae990652f4b7fd124
[ "MIT" ]
5
2020-07-24T17:48:59.000Z
2020-12-21T05:56:00.000Z
Python3/0943-Find-the-Shortest-Superstring/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
null
null
null
Python3/0943-Find-the-Shortest-Superstring/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
2
2020-07-24T17:49:01.000Z
2020-08-31T19:57:35.000Z
class Solution: def shortestSuperstring(self, A: List[str]) -> str: n = len(A) saved = [[0] * n for _ in range(n)] for i in range(n): for j in range(n): if i == j: saved[i][j] = len(A[i]) continue wi, wj = A[...
36.025641
83
0.308185
class Solution: def shortestSuperstring(self, A: List[str]) -> str: n = len(A) saved = [[0] * n for _ in range(n)] for i in range(n): for j in range(n): if i == j: saved[i][j] = len(A[i]) continue wi, wj = A[...
true
true
7904d3f3a7c04185b608176b6b51803ef508283f
4,673
py
Python
AppVoor/tests/split_data_test.py
Noczio/VoorSpelling
51e30ab3f3b2e346c6eb56578818020e142a3adb
[ "BSD-3-Clause" ]
3
2020-10-09T06:15:14.000Z
2021-04-27T02:04:28.000Z
AppVoor/tests/split_data_test.py
Noczio/VoorSpelling
51e30ab3f3b2e346c6eb56578818020e142a3adb
[ "BSD-3-Clause" ]
17
2020-09-10T20:22:01.000Z
2020-12-21T04:57:03.000Z
AppVoor/tests/split_data_test.py
Noczio/VoorSpelling
51e30ab3f3b2e346c6eb56578818020e142a3adb
[ "BSD-3-Clause" ]
null
null
null
import unittest import pandas as pd import numpy as np from resources.backend_scripts.is_data import DataEnsurer from resources.backend_scripts.load_data import LoaderCreator from resources.backend_scripts.split_data import SplitterReturner class MyTestCase(unittest.TestCase): _loader_creator = LoaderCreator() ...
45.368932
117
0.673015
import unittest import pandas as pd import numpy as np from resources.backend_scripts.is_data import DataEnsurer from resources.backend_scripts.load_data import LoaderCreator from resources.backend_scripts.split_data import SplitterReturner class MyTestCase(unittest.TestCase): _loader_creator = LoaderCreator() ...
true
true
7904d504662d0624447ad55fb6784d57f192f352
4,116
py
Python
ABAGAIL_execution/flipflop.py
tirthajyoti/Randomized_Optimization
396f5092ed21574b8f773ad9493394922b6646b8
[ "MIT" ]
7
2018-10-08T09:53:20.000Z
2021-10-22T03:31:28.000Z
Jython_Codes/flipflop.py
tirthajyoti/Randomized_optimization
396f5092ed21574b8f773ad9493394922b6646b8
[ "MIT" ]
null
null
null
Jython_Codes/flipflop.py
tirthajyoti/Randomized_optimization
396f5092ed21574b8f773ad9493394922b6646b8
[ "MIT" ]
7
2018-12-03T04:11:15.000Z
2021-08-10T11:44:10.000Z
""" Backprop NN training on Madelon data (Feature selection complete) """ import os import csv import time import sys sys.path.append("C:/ABAGAIL/ABAGAIL.jar") from func.nn.backprop import BackPropagationNetworkFactory from shared import SumOfSquaresError, DataSet, Instance from opt.example import NeuralNetworkOptimiza...
35.482759
173
0.670068
import os import csv import time import sys sys.path.append("C:/ABAGAIL/ABAGAIL.jar") from func.nn.backprop import BackPropagationNetworkFactory from shared import SumOfSquaresError, DataSet, Instance from opt.example import NeuralNetworkOptimizationProblem from func.nn.backprop import RPROPUpdateRule, BatchBackPropaga...
true
true
7904d65eb702ec4d934712289e2375641da3e5d8
5,752
py
Python
putty-src/contrib/kh2reg.py
dzaki236/putty
011a08bf9fd9c3913a7b070acfbfffc0fbc046df
[ "MIT" ]
48
2016-06-10T14:12:28.000Z
2021-12-27T03:05:50.000Z
putty-src/contrib/kh2reg.py
dzaki236/putty
011a08bf9fd9c3913a7b070acfbfffc0fbc046df
[ "MIT" ]
17
2016-06-01T06:49:26.000Z
2017-05-28T14:07:27.000Z
putty-src/contrib/kh2reg.py
dzaki236/putty
011a08bf9fd9c3913a7b070acfbfffc0fbc046df
[ "MIT" ]
42
2016-10-13T16:01:25.000Z
2021-12-01T00:44:20.000Z
#! /usr/bin/env python # Convert OpenSSH known_hosts and known_hosts2 files to "new format" PuTTY # host keys. # usage: # kh2reg.py [ --win ] known_hosts1 2 3 4 ... > hosts.reg # Creates a Windows .REG file (double-click to install). # kh2reg.py --unix known_hosts1 2 3 4 ... > sshhostkeys # Cr...
34.860606
79
0.546071
# Originally developed for Python 1.5.2, but probably won't run on that import fileinput import base64 import struct import string import re import sys import getopt def winmungestr(s): "Duplicate of PuTTY's mungestr() in winstore.c:1.10 for Registry keys" candot = 0 r = "" for c in s: ...
false
true
7904d7ae495880d6c77746635ec9296ea2f7c6fe
176
py
Python
server/asot/manage/__main__.py
lun-4/asot
24d556af9695f7ac2f059bc7776fc59945a7ec0f
[ "BSD-3-Clause" ]
1
2021-08-01T21:20:52.000Z
2021-08-01T21:20:52.000Z
server/asot/manage/__main__.py
lun-4/asot
24d556af9695f7ac2f059bc7776fc59945a7ec0f
[ "BSD-3-Clause" ]
null
null
null
server/asot/manage/__main__.py
lun-4/asot
24d556af9695f7ac2f059bc7776fc59945a7ec0f
[ "BSD-3-Clause" ]
null
null
null
# asot: Localhost tunneling # Copyright 2021, Luna and asot contributors # SPDX-License-Identifier: BSD-3-Clause from .main import main if __name__ == "__main__": main()
19.555556
44
0.732955
from .main import main if __name__ == "__main__": main()
true
true
7904d8f12d099241d7bd46edba01c296b097eab0
4,512
py
Python
examples/process_detail.py
hybridlogic/psutil
89ba47311d35c9f40ec51a73dc6d10a433360736
[ "BSD-3-Clause" ]
1
2019-01-05T08:14:33.000Z
2019-01-05T08:14:33.000Z
examples/process_detail.py
hybridlogic/psutil
89ba47311d35c9f40ec51a73dc6d10a433360736
[ "BSD-3-Clause" ]
null
null
null
examples/process_detail.py
hybridlogic/psutil
89ba47311d35c9f40ec51a73dc6d10a433360736
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # $Id$ # # Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Print detailed information about a process. Author: Giampaolo Rodola' <g.rodola@gmail.com> """ import os ...
33.422222
79
0.505098
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import datetime import socket import sys import psutil def convert_bytes(n): symbols = ('K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y') prefix = {} for i, s in enumerate(symbols): prefix...
true
true
7904d95f3c654524ab1558185a6ecb5a5bac0bff
35
py
Python
controlinverilog/synthesis/__init__.py
simoore/control-in-verilog
9b00ff48c15c8c56458d1611eaa3fec6f4c94bdb
[ "MIT" ]
null
null
null
controlinverilog/synthesis/__init__.py
simoore/control-in-verilog
9b00ff48c15c8c56458d1611eaa3fec6f4c94bdb
[ "MIT" ]
null
null
null
controlinverilog/synthesis/__init__.py
simoore/control-in-verilog
9b00ff48c15c8c56458d1611eaa3fec6f4c94bdb
[ "MIT" ]
null
null
null
from .optimizers import GAOptimizer
35
35
0.885714
from .optimizers import GAOptimizer
true
true
7904d97ef27ac1a1e1a75b8b6a9460cea433affe
5,008
py
Python
tests/wallet/test_singleton.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
tests/wallet/test_singleton.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
tests/wallet/test_singleton.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
from clvm_tools import binutils from chinilla.types.blockchain_format.program import Program, INFINITE_COST from chinilla.types.announcement import Announcement from chinilla.types.blockchain_format.sized_bytes import bytes32 from chinilla.util.condition_tools import parse_sexp_to_conditions from chinilla.wallet.puzzl...
39.433071
115
0.720447
from clvm_tools import binutils from chinilla.types.blockchain_format.program import Program, INFINITE_COST from chinilla.types.announcement import Announcement from chinilla.types.blockchain_format.sized_bytes import bytes32 from chinilla.util.condition_tools import parse_sexp_to_conditions from chinilla.wallet.puzzl...
true
true
7904db5a91d997aa77b94f4f1b9ddf22ea17b6fe
3,609
py
Python
python/Load_and_Pickle_Scenario.py
ugirumurera/ta_solver
c3bd83633aca4db785a4d0dc554f924bb26754e1
[ "BSD-3-Clause-LBNL" ]
null
null
null
python/Load_and_Pickle_Scenario.py
ugirumurera/ta_solver
c3bd83633aca4db785a4d0dc554f924bb26754e1
[ "BSD-3-Clause-LBNL" ]
null
null
null
python/Load_and_Pickle_Scenario.py
ugirumurera/ta_solver
c3bd83633aca4db785a4d0dc554f924bb26754e1
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy as np import pickle import timeit from copy import deepcopy import sys from Model_Manager.Link_Model_Manager import Link_Model_Manager_class from Java_Connection import Java_Connection from copy import copy from Solvers.Frank_Wolfe_Solver_Static import construct_igraph import os import inspect import argp...
37.989474
121
0.692158
import numpy as np import pickle import timeit from copy import deepcopy import sys from Model_Manager.Link_Model_Manager import Link_Model_Manager_class from Java_Connection import Java_Connection from copy import copy from Solvers.Frank_Wolfe_Solver_Static import construct_igraph import os import inspect import argp...
false
true
7904dbb3a92b63a2ae8e4457061dbb94801dc44c
589
py
Python
Pdf2TimeTable/test.py
SCOTT-HAMILTON/Pdf2TimeTable
d9c8b2f1001865a356cdb61776b8b52adc42b2d3
[ "MIT" ]
null
null
null
Pdf2TimeTable/test.py
SCOTT-HAMILTON/Pdf2TimeTable
d9c8b2f1001865a356cdb61776b8b52adc42b2d3
[ "MIT" ]
null
null
null
Pdf2TimeTable/test.py
SCOTT-HAMILTON/Pdf2TimeTable
d9c8b2f1001865a356cdb61776b8b52adc42b2d3
[ "MIT" ]
null
null
null
from timetableparser import TimeTableParser from timetablewriter import TimeTableWriter parser = TimeTableParser(False) writer = TimeTableWriter(True) # parser.decrypt_pdf("test/a.pdf", "out_a.pdf") # parser.decrypt_pdf("test/b.pdf", "out_b.pdf") csv_file_a = "test/output_week_a.csv" csv_file_b = "test/output_week_b.c...
42.071429
107
0.791171
from timetableparser import TimeTableParser from timetablewriter import TimeTableWriter parser = TimeTableParser(False) writer = TimeTableWriter(True) csv_file_a = "test/output_week_a.csv" csv_file_b = "test/output_week_b.csv" writer.write_excel("Scott", parser.parse_csv(csv_file_a), parser.parse_csv(csv_file_b), ...
true
true
7904dc293da2ec589a63acebe187caea062976c7
1,578
py
Python
withPyGAD/ch06/cardTests.py
monfared01/GeneticAlgorithmsWithPython
1519efc6c87f225c089a84595379f5b682dcee8f
[ "Apache-2.0" ]
null
null
null
withPyGAD/ch06/cardTests.py
monfared01/GeneticAlgorithmsWithPython
1519efc6c87f225c089a84595379f5b682dcee8f
[ "Apache-2.0" ]
null
null
null
withPyGAD/ch06/cardTests.py
monfared01/GeneticAlgorithmsWithPython
1519efc6c87f225c089a84595379f5b682dcee8f
[ "Apache-2.0" ]
null
null
null
import pygad import functools import operator import numpy def fitness_func(genes, solution_idx): group1Sum = sum(genes[0:5]) group2Product = functools.reduce(operator.mul, genes[5:10]) duplicateCount = (len(genes) - len(set(genes))) return 1 / ((abs(36 - group1Sum) + abs(360 - group2Product)) + 1) - ...
35.863636
86
0.581749
import pygad import functools import operator import numpy def fitness_func(genes, solution_idx): group1Sum = sum(genes[0:5]) group2Product = functools.reduce(operator.mul, genes[5:10]) duplicateCount = (len(genes) - len(set(genes))) return 1 / ((abs(36 - group1Sum) + abs(360 - group2Product)) + 1) - ...
true
true
7904dc38398d706aeabf83211ad92f5c22266c00
4,216
py
Python
stratlib/sample_SMA.py
bopo/mooquant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
21
2017-09-07T16:08:21.000Z
2020-10-15T13:42:21.000Z
stratlib/sample_SMA.py
bopo/MooQuant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
209
2018-10-09T11:57:39.000Z
2021-03-25T21:40:30.000Z
stratlib/sample_SMA.py
bopo/MooQuant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
15
2018-11-17T20:14:37.000Z
2022-02-04T23:55:29.000Z
from mooquant import bar, strategy from mooquant.analyzer import drawdown, returns, sharpe, trades from mooquant.broker.backtesting import TradePercentage from mooquant.broker.fillstrategy import DefaultStrategy from mooquant.technical import cross, ma from mooquant.tools import tushare class thrSMA(strategy.Backtest...
29.075862
99
0.617173
from mooquant import bar, strategy from mooquant.analyzer import drawdown, returns, sharpe, trades from mooquant.broker.backtesting import TradePercentage from mooquant.broker.fillstrategy import DefaultStrategy from mooquant.technical import cross, ma from mooquant.tools import tushare class thrSMA(strategy.Backtest...
true
true
7904df6a990d890fbcbee5b17e02c4e4dcae8ac9
2,496
py
Python
doc/conf.py
yt87/pyiapws95
5fc7d4cda56a000d1b9de018131012dfc80e11ab
[ "0BSD" ]
null
null
null
doc/conf.py
yt87/pyiapws95
5fc7d4cda56a000d1b9de018131012dfc80e11ab
[ "0BSD" ]
null
null
null
doc/conf.py
yt87/pyiapws95
5fc7d4cda56a000d1b9de018131012dfc80e11ab
[ "0BSD" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.72973
79
0.658654
import os import sys sys.path.insert(0, os.path.abspath('..')) project = 'pyiapws95' copyright = '2021, George Trojan' author = 'George Trojan' release = '0.1.1' today_fmt = '%Y-%m-%d' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.intersphinx', 'sphin...
true
true
7904dfa05c857c0fb5683c524f642a4c0c164c85
5,750
py
Python
photologue/tests/test_sites.py
elena/django-photologue
2bb2a91073855d7e53c1d4cfb2c704d2ebd7caab
[ "BSD-3-Clause" ]
null
null
null
photologue/tests/test_sites.py
elena/django-photologue
2bb2a91073855d7e53c1d4cfb2c704d2ebd7caab
[ "BSD-3-Clause" ]
null
null
null
photologue/tests/test_sites.py
elena/django-photologue
2bb2a91073855d7e53c1d4cfb2c704d2ebd7caab
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django.contrib.sites.models import Site from django.utils import unittest from django.conf import settings from .factories import GalleryFactory, PhotoFactory class SitesTest(TestCase): urls = 'photologue.tests.test_urls' def setUp(self): """ Create two...
41.071429
103
0.630261
from django.test import TestCase from django.contrib.sites.models import Site from django.utils import unittest from django.conf import settings from .factories import GalleryFactory, PhotoFactory class SitesTest(TestCase): urls = 'photologue.tests.test_urls' def setUp(self): super(SitesTest, self)...
true
true
7904dfaea529291b602c9162cc56458c2dd79fda
3,188
py
Python
dags/jenkins_dag.py
shameerb/incubator-airflow
a97b440eb989789cef43bf740fbd63d40d4b8f87
[ "Apache-2.0" ]
null
null
null
dags/jenkins_dag.py
shameerb/incubator-airflow
a97b440eb989789cef43bf740fbd63d40d4b8f87
[ "Apache-2.0" ]
null
null
null
dags/jenkins_dag.py
shameerb/incubator-airflow
a97b440eb989789cef43bf740fbd63d40d4b8f87
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
37.505882
111
0.754391
from airflow import DAG from airflow.contrib.operators.jenkins_job_trigger_operator import JenkinsJobTriggerOperator from airflow.operators.python_operator import PythonOperator from airflow.contrib.hooks.jenkins_hook import JenkinsHook from six.moves.urllib.request import Request import jenkins ...
true
true
7904e024853431a220c615209e7e4d10c1cef2af
5,701
py
Python
django/engagementmanager/utils/exception_message_factory.py
onap/vvp-engagementmgr
8d2108708e7c55cc753b956563c535177f92d0d9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
django/engagementmanager/utils/exception_message_factory.py
onap/vvp-engagementmgr
8d2108708e7c55cc753b956563c535177f92d0d9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
django/engagementmanager/utils/exception_message_factory.py
onap/vvp-engagementmgr
8d2108708e7c55cc753b956563c535177f92d0d9
[ "Apache-2.0", "CC-BY-4.0" ]
1
2021-10-19T15:17:09.000Z
2021-10-19T15:17:09.000Z
# # ============LICENSE_START========================================== # org.onap.vvp/engagementmgr # =================================================================== # Copyright © 2017 AT&T Intellectual Property. All rights reserved. # =================================================================== # # Unless ...
44.889764
77
0.641642
from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import CommandError from engagementmanager.utils.vvp_exceptions import VvpObjectNotAvailable, \ VvpGeneralException, VvpBadRequest, VvpConflict from itsdangerous import SignatureExpired from ...
true
true
7904e0e14640275bde51aabd779455282e94fba6
2,323
py
Python
relex/modules/offset_embedders/sine_offset_embedder.py
DFKI-NLP/RelEx
0826c02f793b78bf8b7b7001c2e3fdfdb25c1ad2
[ "Apache-2.0" ]
16
2020-04-21T19:04:23.000Z
2021-08-03T04:30:43.000Z
relex/modules/offset_embedders/sine_offset_embedder.py
DFKI-NLP/RelEx
0826c02f793b78bf8b7b7001c2e3fdfdb25c1ad2
[ "Apache-2.0" ]
3
2020-07-25T12:29:21.000Z
2021-06-11T02:06:58.000Z
relex/modules/offset_embedders/sine_offset_embedder.py
DFKI-NLP/RelEx
0826c02f793b78bf8b7b7001c2e3fdfdb25c1ad2
[ "Apache-2.0" ]
2
2020-06-25T12:50:57.000Z
2020-11-01T10:31:04.000Z
import torch import numpy as np from allennlp.nn import util from relex.modules.offset_embedders import OffsetEmbedder def position_encoding_init(n_position: int, embedding_dim: int): position_enc = np.array([[pos / np.power(10000, 2 * (j // 2) / embedding_dim) for j in range(embeddi...
38.081967
81
0.584158
import torch import numpy as np from allennlp.nn import util from relex.modules.offset_embedders import OffsetEmbedder def position_encoding_init(n_position: int, embedding_dim: int): position_enc = np.array([[pos / np.power(10000, 2 * (j // 2) / embedding_dim) for j in range(embeddi...
true
true
7904e0f35f99b5e4825d4214348e1dd1ae2ef821
1,015
py
Python
rollbar/examples/starlette/app_global_request.py
jackton1/pyrollbar
eb93f3b6200c624a2986d66ef7418520a6b77504
[ "MIT" ]
177
2015-02-02T19:22:15.000Z
2022-01-24T07:20:04.000Z
rollbar/examples/starlette/app_global_request.py
jackton1/pyrollbar
eb93f3b6200c624a2986d66ef7418520a6b77504
[ "MIT" ]
293
2015-01-04T23:24:56.000Z
2022-02-14T18:23:02.000Z
rollbar/examples/starlette/app_global_request.py
jackton1/pyrollbar
eb93f3b6200c624a2986d66ef7418520a6b77504
[ "MIT" ]
121
2015-02-06T21:43:51.000Z
2022-02-14T11:13:33.000Z
#!/usr/bin/env python # This example uses Uvicorn package that must be installed. However, it can be # replaced with any other ASGI-compliant server. # # NOTE: Python 3.6 requires aiocontextvars package to be installed. # # Run: python app_global_request.py import rollbar import uvicorn from rollbar.contrib.starlett...
26.025641
78
0.759606
import rollbar import uvicorn from rollbar.contrib.starlette import LoggerMiddleware from starlette.applications import Starlette from starlette.responses import JSONResponse app = Starlette() app.add_middleware(LoggerMiddleware) async def get_user_agent(): request = rollbar.get_request() ...
true
true
7904e12f4f4b43368459ad027c5fcdb2f23291d1
384
py
Python
umetnine/artists/admin.py
jaanos/OPB-umetnine
f1fedd62e750317548510c412793d80c60b9e392
[ "MIT" ]
null
null
null
umetnine/artists/admin.py
jaanos/OPB-umetnine
f1fedd62e750317548510c412793d80c60b9e392
[ "MIT" ]
null
null
null
umetnine/artists/admin.py
jaanos/OPB-umetnine
f1fedd62e750317548510c412793d80c60b9e392
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Arts, Comments, Tags, ArtworksTags, Stili, Umetnina, Umetnik # Register your models here. admin.site.register(Umetnik) admin.site.register(Umetnina) admin.site.register(Stili) admin.site.register(Arts) admin.site.register(Comments) admin.site.register(Tags) admin....
25.6
80
0.807292
from django.contrib import admin from .models import Arts, Comments, Tags, ArtworksTags, Stili, Umetnina, Umetnik admin.site.register(Umetnik) admin.site.register(Umetnina) admin.site.register(Stili) admin.site.register(Arts) admin.site.register(Comments) admin.site.register(Tags) admin.site.register(ArtworksTags) ...
true
true
7904e17e4ab1e008ef48e5b09f2c8a8c42d9a4d4
19,691
py
Python
src/electionguard/encrypt.py
john-s-morgan/electionguard-python
f0a25b0ac99fac5c8d4e3545055dbdd05968d021
[ "MIT" ]
null
null
null
src/electionguard/encrypt.py
john-s-morgan/electionguard-python
f0a25b0ac99fac5c8d4e3545055dbdd05968d021
[ "MIT" ]
null
null
null
src/electionguard/encrypt.py
john-s-morgan/electionguard-python
f0a25b0ac99fac5c8d4e3545055dbdd05968d021
[ "MIT" ]
null
null
null
from datetime import datetime from typing import List, Optional from uuid import getnode from .ballot import ( CiphertextBallot, CiphertextBallotContest, CiphertextBallotSelection, PlaintextBallot, PlaintextBallotContest, PlaintextBallotSelection, make_ciphertext_ballot_contest, make_ci...
37.435361
119
0.713676
from datetime import datetime from typing import List, Optional from uuid import getnode from .ballot import ( CiphertextBallot, CiphertextBallotContest, CiphertextBallotSelection, PlaintextBallot, PlaintextBallotContest, PlaintextBallotSelection, make_ciphertext_ballot_contest, make_ci...
true
true
7904e2289dcbb2a6732c77a374c819ea5e960ff4
1,397
py
Python
games/Flappy.py
jayamithun/py-box
65617c997982584f5c212e8b8ea9c35ced9d8d7e
[ "MIT" ]
1
2022-03-30T09:51:45.000Z
2022-03-30T09:51:45.000Z
games/Flappy.py
jayamithun/py-box
65617c997982584f5c212e8b8ea9c35ced9d8d7e
[ "MIT" ]
null
null
null
games/Flappy.py
jayamithun/py-box
65617c997982584f5c212e8b8ea9c35ced9d8d7e
[ "MIT" ]
null
null
null
# pip install freegames # Click on screen to control ball # import modules from random import * import turtle as t from freegames import vector # Set window title, color and icon t.title("Flappy Ball") root = t.Screen()._root root.iconbitmap("logo-ico.ico") t.bgcolor('#80ffd4') bird = vector(0, 0) balls = [] ...
16.630952
56
0.583393
from random import * import turtle as t from freegames import vector t.title("Flappy Ball") root = t.Screen()._root root.iconbitmap("logo-ico.ico") t.bgcolor('#80ffd4') bird = vector(0, 0) balls = [] def tap(x, y): up = vector(0, 30) bird.move(up) def inside(point): return -200 < point.x ...
true
true
7904e253c75dce8e51533d6c20a5113efb72bb9d
6,357
py
Python
scripts/loadModelDoEntityEmbeddingsUnsorted.py
michaelfaerber/Agnos
b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf
[ "MIT" ]
null
null
null
scripts/loadModelDoEntityEmbeddingsUnsorted.py
michaelfaerber/Agnos
b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf
[ "MIT" ]
3
2021-12-10T01:22:05.000Z
2021-12-14T21:33:16.000Z
scripts/loadModelDoEntityEmbeddingsUnsorted.py
michaelfaerber/Agnos
b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf
[ "MIT" ]
null
null
null
''' @author: kris ''' # import modules; set up logging from gensim.models import Word2Vec from gensim.models import KeyedVectors from gensim.test.utils import datapath import numpy as np import logging, os, sys, gzip import datetime logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', filename='wor...
34.737705
129
0.757747
from gensim.models import Word2Vec from gensim.models import KeyedVectors from gensim.test.utils import datapath import numpy as np import logging, os, sys, gzip import datetime logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', filename='word2vec.out', level=logging.INFO) pathsLocator = "./s...
true
true
7904e327b270f7b8435e2842d22e8031f61c2796
8,884
py
Python
plugins/tests/test_helpers.py
sul-dlss/folio-airflow
befe7097874406e3ab77764d285f1edafa53d4b1
[ "Apache-2.0" ]
2
2022-03-02T15:41:43.000Z
2022-03-04T19:06:59.000Z
plugins/tests/test_helpers.py
sul-dlss/folio-airflow
befe7097874406e3ab77764d285f1edafa53d4b1
[ "Apache-2.0" ]
40
2021-11-30T21:30:52.000Z
2022-03-11T00:06:16.000Z
plugins/tests/test_helpers.py
sul-dlss/folio-airflow
befe7097874406e3ab77764d285f1edafa53d4b1
[ "Apache-2.0" ]
null
null
null
import logging import pytest import pydantic import requests from pymarc import Record, Field from airflow.models import Variable from pytest_mock import MockerFixture from plugins.folio.helpers import ( archive_artifacts, move_marc_files_check_tsv, post_to_okapi, process_marc, _move_001_to_035, ...
26.678679
92
0.687753
import logging import pytest import pydantic import requests from pymarc import Record, Field from airflow.models import Variable from pytest_mock import MockerFixture from plugins.folio.helpers import ( archive_artifacts, move_marc_files_check_tsv, post_to_okapi, process_marc, _move_001_to_035, ...
true
true
7904e32998681c19d1931c5a6a712a8fc6b22f7e
26,232
py
Python
schmidt_funcs.py
johnarban/arban
dcd2d0838f72c39bf3a52aabfa74d6ea28933d02
[ "MIT" ]
null
null
null
schmidt_funcs.py
johnarban/arban
dcd2d0838f72c39bf3a52aabfa74d6ea28933d02
[ "MIT" ]
null
null
null
schmidt_funcs.py
johnarban/arban
dcd2d0838f72c39bf3a52aabfa74d6ea28933d02
[ "MIT" ]
null
null
null
import numpy as np from PIL import Image, ImageDraw from scipy import interpolate, ndimage, stats, signal, integrate, misc from astropy.io import ascii, fits from astropy.wcs import WCS from astropy.coordinates import SkyCoord import astropy.units as u import astropy.constants as c import corner as triangle # formerly...
30.970484
116
0.564692
import numpy as np from PIL import Image, ImageDraw from scipy import interpolate, ndimage, stats, signal, integrate, misc from astropy.io import ascii, fits from astropy.wcs import WCS from astropy.coordinates import SkyCoord import astropy.units as u import astropy.constants as c import corner as triangle from ast...
true
true
7904e38e4d8be0710b575ef3f2004b920d720924
2,827
py
Python
densevid_eval-master/coco-caption/pycocoevalcap/tokenizer/ptbtokenizer.py
cxqj/5-densevideocaptioning
8f1239128ece2d59a063b766fc44911129706314
[ "MIT" ]
150
2018-10-06T15:51:30.000Z
2022-03-22T08:23:24.000Z
densevid_eval-master/coco-caption/pycocoevalcap/tokenizer/ptbtokenizer.py
xiaoxinlong/DenseVideoCaptioning
27f315da7c90f6bb6d7a3fc8038159f7a54ec5bb
[ "MIT" ]
38
2018-10-08T07:19:59.000Z
2021-05-06T21:13:43.000Z
densevid_eval-master/coco-caption/pycocoevalcap/tokenizer/ptbtokenizer.py
xiaoxinlong/DenseVideoCaptioning
27f315da7c90f6bb6d7a3fc8038159f7a54ec5bb
[ "MIT" ]
54
2018-10-22T07:33:37.000Z
2022-03-23T04:56:25.000Z
#!/usr/bin/env python # # File Name : ptbtokenizer.py # # Description : Do the PTB Tokenization and remove punctuations. # # Creation Date : 29-12-2014 # Last Modified : Thu Mar 19 09:53:35 2015 # Authors : Hao Fang <hfang@uw.edu> and Tsung-Yi Lin <tl483@cornell.edu> import os import sys import subprocess import temp...
40.971014
114
0.520693
import os import sys import subprocess import tempfile import itertools STANFORD_CORENLP_3_4_1_JAR = 'stanford-corenlp-3.4.1.jar' PUNCTUATIONS = ["''", "'", "``", "`", "-LRB-", "-RRB-", "-LCB-", "-RCB-", \ ".", "?", "!", ",", ":", "-", "--", "...", ";"] class PTBTokenizer: def tokenize(self...
true
true
7904e47c5ed08d37d62f48abed03785720f1cbed
1,707
py
Python
.install/.backup/lib/apitools/base/py/util.py
bopopescu/google-cloud-sdk
b34e6a18f1e89673508166acce816111c3421e4b
[ "Apache-2.0" ]
null
null
null
.install/.backup/lib/apitools/base/py/util.py
bopopescu/google-cloud-sdk
b34e6a18f1e89673508166acce816111c3421e4b
[ "Apache-2.0" ]
null
null
null
.install/.backup/lib/apitools/base/py/util.py
bopopescu/google-cloud-sdk
b34e6a18f1e89673508166acce816111c3421e4b
[ "Apache-2.0" ]
1
2020-07-24T20:04:47.000Z
2020-07-24T20:04:47.000Z
"""Assorted utilities shared between parts of apitools.""" import collections import httplib import os import types import urllib2 from apitools.base.py import exceptions __all__ = [ 'DetectGae', 'DetectGce', ] def DetectGae(): """Determine whether or not we're running on GAE. This is based on: ht...
25.477612
74
0.68717
import collections import httplib import os import types import urllib2 from apitools.base.py import exceptions __all__ = [ 'DetectGae', 'DetectGce', ] def DetectGae(): server_software = os.environ.get('SERVER_SOFTWARE', '') return (server_software.startswith('Development/') or server_softwar...
true
true
7904e50d3d48ea15da9ed1983a74fb581ff749ea
8,480
py
Python
docs/conf.py
nicchub/PythonGithub
3af974c552f6b0e8a782a1499aba2a16d997b5d1
[ "MIT" ]
null
null
null
docs/conf.py
nicchub/PythonGithub
3af974c552f6b0e8a782a1499aba2a16d997b5d1
[ "MIT" ]
2
2015-02-06T02:48:24.000Z
2015-02-11T02:40:29.000Z
docs/conf.py
nicchub/PythonGithub
3af974c552f6b0e8a782a1499aba2a16d997b5d1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Python Github documentation build configuration file, created by # sphinx-quickstart on Tue Feb 3 23:23:15 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
31.524164
79
0.71816
import sys import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.viewcode', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Python Github' copyrigh...
true
true
7904e51c1e1cdca821d5ea07bad4b06ebca9cd0a
965
py
Python
utils/logger.py
pwentrys/SubstanceHelpers
8fb56158ee149792219e9cdb9479aaaed09a46bc
[ "MIT" ]
2
2018-09-12T23:35:33.000Z
2019-10-09T06:56:17.000Z
utils/logger.py
pwentrys/SubstanceHelpers
8fb56158ee149792219e9cdb9479aaaed09a46bc
[ "MIT" ]
null
null
null
utils/logger.py
pwentrys/SubstanceHelpers
8fb56158ee149792219e9cdb9479aaaed09a46bc
[ "MIT" ]
null
null
null
import os import platform from datetime import datetime # TODO test counter # def test_count(): # return 0 # f"Count: {test_count()}\n"\ def serve_info(): return f"Stats\n" \ f"UTC: {datetime.utcnow().isoformat()}\n" \ f"\nMachine\n" \ f"Architecture: {platform.machine()}\n" \...
33.275862
68
0.550259
import os import platform from datetime import datetime def serve_info(): return f"Stats\n" \ f"UTC: {datetime.utcnow().isoformat()}\n" \ f"\nMachine\n" \ f"Architecture: {platform.machine()}\n" \ f"Name: {platform.node()}\n" \ f"Platform: {platform.plat...
true
true
7904e56215887b382a340fb0acf47bf362658014
1,570
py
Python
spacy/lang/en/syntax_iterators.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
22,040
2016-10-03T11:58:15.000Z
2022-03-31T21:08:19.000Z
spacy/lang/en/syntax_iterators.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
6,927
2016-10-03T13:11:11.000Z
2022-03-31T17:01:25.000Z
spacy/lang/en/syntax_iterators.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
4,403
2016-10-04T03:36:33.000Z
2022-03-31T14:12:34.000Z
from typing import Union, Iterator, Tuple from ...symbols import NOUN, PROPN, PRON from ...errors import Errors from ...tokens import Doc, Span def noun_chunks(doclike: Union[Doc, Span]) -> Iterator[Tuple[int, int, int]]: """ Detect base noun phrases from a dependency parse. Works on both Doc and Span. "...
30.784314
81
0.56879
from typing import Union, Iterator, Tuple from ...symbols import NOUN, PROPN, PRON from ...errors import Errors from ...tokens import Doc, Span def noun_chunks(doclike: Union[Doc, Span]) -> Iterator[Tuple[int, int, int]]: labels = [ "oprd", "nsubj", "dobj", "nsubjpass", "p...
true
true
7904e75d9efdd02b3aed6bd0b9bbf8ef5b82d42b
1,883
py
Python
tests/test_pcap_eager.py
rjpower/tensorflow-io
39aa0b46cfaa403121fdddbd491a03d2f3190a87
[ "Apache-2.0" ]
1
2019-10-10T06:11:23.000Z
2019-10-10T06:11:23.000Z
tests/test_pcap_eager.py
rjpower/tensorflow-io
39aa0b46cfaa403121fdddbd491a03d2f3190a87
[ "Apache-2.0" ]
null
null
null
tests/test_pcap_eager.py
rjpower/tensorflow-io
39aa0b46cfaa403121fdddbd491a03d2f3190a87
[ "Apache-2.0" ]
1
2019-10-10T06:11:24.000Z
2019-10-10T06:11:24.000Z
# Copyright 2019 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 applic...
36.921569
124
0.709506
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf import tensorflow_io.pcap as pcap_io if not (hasattr(tf, "version") and tf.version.VERSION.startswith("2.")): tf.compat.v1.enable_eager_execution() def test...
true
true
7904e76f74a629539b1df4a55ac97db0a4cc7729
74,664
py
Python
vrchatapi/api/worlds_api.py
vrchatapi/vrchatapi-python
afe5ec9fda298723e7408358473aafe343e27d18
[ "MIT" ]
8
2021-08-25T02:35:30.000Z
2022-03-28T18:11:58.000Z
vrchatapi/api/worlds_api.py
vrchatapi/vrchatapi-python
afe5ec9fda298723e7408358473aafe343e27d18
[ "MIT" ]
1
2022-03-18T20:29:30.000Z
2022-03-18T20:35:05.000Z
vrchatapi/api/worlds_api.py
vrchatapi/vrchatapi-python
afe5ec9fda298723e7408358473aafe343e27d18
[ "MIT" ]
1
2022-01-11T10:49:12.000Z
2022-01-11T10:49:12.000Z
""" VRChat API Documentation The version of the OpenAPI document: 1.6.8 Contact: me@ruby.js.org Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from vrchatapi.api_client import ApiClient, Endpoint as _Endpoint from vrchatapi.model_utils import ( # ...
36.510513
201
0.450378
import re import sys from vrchatapi.api_client import ApiClient, Endpoint as _Endpoint from vrchatapi.model_utils import ( check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from vrchatapi.model.create_world_request import Cre...
true
true
7904e7d6114dc8ebfdd93c3af25693fdbe68632c
1,441
py
Python
pedrec/visualizers/skeleton_3d_visualizer.py
noboevbo/PedRec
891d19bd6a2c7a7d71c2e41d37e7b4c4bfc7762e
[ "MIT" ]
1
2022-03-09T01:24:10.000Z
2022-03-09T01:24:10.000Z
pedrec/visualizers/skeleton_3d_visualizer.py
noboevbo/PedRec
891d19bd6a2c7a7d71c2e41d37e7b4c4bfc7762e
[ "MIT" ]
null
null
null
pedrec/visualizers/skeleton_3d_visualizer.py
noboevbo/PedRec
891d19bd6a2c7a7d71c2e41d37e7b4c4bfc7762e
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D from pedrec.models.constants.skeleton_pedrec import SKELETON_PEDREC, SKELETON_PEDREC_JOINT_COLORS, SKELETON_PEDREC_LIMB_COLORS from pedrec.visualizers.visualization_helper_3d import draw_origin_3d, draw_grid_3d def add_skeleto...
35.146341
168
0.704372
import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D from pedrec.models.constants.skeleton_pedrec import SKELETON_PEDREC, SKELETON_PEDREC_JOINT_COLORS, SKELETON_PEDREC_LIMB_COLORS from pedrec.visualizers.visualization_helper_3d import draw_origin_3d, draw_grid_3d def add_skeleto...
true
true
7904e8f22b074283994c1053d21e55d29e060443
17,613
py
Python
lib/surface/compute/instances/create_with_container.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/instances/create_with_container.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/instances/create_with_container.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
43.813433
81
0.732925
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.api_lib.compute import containers_utils from googlecloudsdk.api_lib.compute import image_utils from googlecloudsdk.api...
true
true
7904e95953759c21dc469a70163f0ce4ac5f2d14
590
py
Python
passage/theano_utils.py
vishalbelsare/Passage
af6e100804dfe332c88bd2cd192e93a807377887
[ "MIT" ]
597
2015-01-15T19:23:32.000Z
2021-08-29T17:53:22.000Z
passage/theano_utils.py
v-mk-s/Passage
af6e100804dfe332c88bd2cd192e93a807377887
[ "MIT" ]
34
2015-01-22T13:50:21.000Z
2018-06-13T14:58:45.000Z
passage/theano_utils.py
v-mk-s/Passage
af6e100804dfe332c88bd2cd192e93a807377887
[ "MIT" ]
152
2015-01-17T02:19:22.000Z
2022-02-05T15:10:04.000Z
import numpy as np import theano def intX(X): return np.asarray(X, dtype=np.int32) def floatX(X): return np.asarray(X, dtype=theano.config.floatX) def sharedX(X, dtype=theano.config.floatX, name=None): return theano.shared(np.asarray(X, dtype=dtype), name=name) def shared0s(shape, dtype=theano.config.fl...
28.095238
63
0.727119
import numpy as np import theano def intX(X): return np.asarray(X, dtype=np.int32) def floatX(X): return np.asarray(X, dtype=theano.config.floatX) def sharedX(X, dtype=theano.config.floatX, name=None): return theano.shared(np.asarray(X, dtype=dtype), name=name) def shared0s(shape, dtype=theano.config.fl...
true
true
7904eb091f788198c0e58d13a5d21193df23f8bc
2,982
py
Python
saliency/guided_backprop.py
leomauro/history-of-interpretation
6235f4b875505ac7a6efb10f3c4e5a6d3c7b25ec
[ "Apache-2.0" ]
30
2020-11-27T04:06:50.000Z
2021-12-09T02:42:15.000Z
saliency/guided_backprop.py
leomauro/history-of-interpretation
6235f4b875505ac7a6efb10f3c4e5a6d3c7b25ec
[ "Apache-2.0" ]
null
null
null
saliency/guided_backprop.py
leomauro/history-of-interpretation
6235f4b875505ac7a6efb10f3c4e5a6d3c7b25ec
[ "Apache-2.0" ]
8
2020-11-27T12:33:15.000Z
2021-02-15T05:46:13.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
35.5
78
0.697183
from .base import SaliencyMask import tensorflow.compat.v1 as tf class GuidedBackprop(SaliencyMask): GuidedReluRegistered = False def __init__(self, graph, session, y, x, tmp_ckpt_path='/tmp/guided_backprop_ckpt'): supe...
true
true
7904ec3929a26d2ddf1cc15de1546c69e3b9ac29
12,683
py
Python
utils/calc_fall_flush.py
NoellePatterson/func-flow-plot
196d58ac87c137b42063ac718ea296faaf148307
[ "MIT" ]
null
null
null
utils/calc_fall_flush.py
NoellePatterson/func-flow-plot
196d58ac87c137b42063ac718ea296faaf148307
[ "MIT" ]
null
null
null
utils/calc_fall_flush.py
NoellePatterson/func-flow-plot
196d58ac87c137b42063ac718ea296faaf148307
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as ip from scipy.ndimage import gaussian_filter1d from utils.helpers import find_index, peakdet, replace_nan from params import fall_params def calc_fall_flush_timings_durations(flow_matrix, summer_timings): max_zero_allowed_per_year = fal...
48.59387
350
0.653552
import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as ip from scipy.ndimage import gaussian_filter1d from utils.helpers import find_index, peakdet, replace_nan from params import fall_params def calc_fall_flush_timings_durations(flow_matrix, summer_timings): max_zero_allowed_per_year = fal...
true
true
7904ec9d53c04cbceca5352a1e7d44a8717bfb60
1,289
py
Python
python/215_Kth_Largest_Element_in_an_Array.py
dvlpsh/leetcode-1
f965328af72113ac8a5a9d6624868c1502be937b
[ "MIT" ]
4,416
2016-03-30T15:02:26.000Z
2022-03-31T16:31:03.000Z
python/215_Kth_Largest_Element_in_an_Array.py
YinpuLi/leetcode-6
1371de2631d745efba39de41b51c3424e35da434
[ "MIT" ]
20
2018-11-17T13:46:25.000Z
2022-03-13T05:37:06.000Z
python/215_Kth_Largest_Element_in_an_Array.py
YinpuLi/leetcode-6
1371de2631d745efba39de41b51c3424e35da434
[ "MIT" ]
1,374
2017-05-26T15:44:30.000Z
2022-03-30T19:21:02.000Z
class Solution(object): # def findKthLargest(self, nums, k): # """ # :type nums: List[int] # :type k: int # :rtype: int # """ # return sorted(nums, reverse=True)[k - 1] # def findKthLargest(self, nums, k): # # build min heap # heapq.heapify(nums) ...
31.439024
73
0.501939
class Solution(object): # :type nums: List[int] # :type k: int # :rtype: int # """ random.shuffle(nums) return self.quickSelection(nums, 0, len(nums) - 1, len(nums) - k) def quickSelection(self, nums, start, end, k): if start > end: ...
true
true
7904ecbabc8dfd071bb8ccd600b6cc1369f4ac28
1,481
py
Python
SandBox/Practicals_05_Cut.py
MichalKyjovsky/NPRG065_Programing_in_Python
14436fbf8f0e547ab084083135a84c8ae49e083c
[ "MIT" ]
null
null
null
SandBox/Practicals_05_Cut.py
MichalKyjovsky/NPRG065_Programing_in_Python
14436fbf8f0e547ab084083135a84c8ae49e083c
[ "MIT" ]
null
null
null
SandBox/Practicals_05_Cut.py
MichalKyjovsky/NPRG065_Programing_in_Python
14436fbf8f0e547ab084083135a84c8ae49e083c
[ "MIT" ]
null
null
null
from sys import argv, stdin def cut(input_file, *args): options = process_options(*args) delimiter = d_option(options["-d"]) lines = input_file.readlines() columns = [item.split(delimiter) for item in lines] scope = f_option(options["-f"], len(columns[0])) out_scope = [] for x in scope: ...
26.927273
67
0.576637
from sys import argv, stdin def cut(input_file, *args): options = process_options(*args) delimiter = d_option(options["-d"]) lines = input_file.readlines() columns = [item.split(delimiter) for item in lines] scope = f_option(options["-f"], len(columns[0])) out_scope = [] for x in scope: ...
true
true
7904edc9d31d07036fe7c9f5faa53e7ddac376dd
2,079
py
Python
virtool/shutdown.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
39
2016-10-31T23:28:59.000Z
2022-01-15T00:00:42.000Z
virtool/shutdown.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
1,690
2017-02-07T23:39:48.000Z
2022-03-31T22:30:44.000Z
virtool/shutdown.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
25
2017-02-08T18:25:31.000Z
2021-09-20T22:55:25.000Z
import logging from aiohttp.web import Application from virtool.pg.base import Base from virtool.startup import get_scheduler_from_app logger = logging.getLogger(__name__) async def shutdown_client(app: Application): """ Attempt to close the async HTTP client session. :param app: The application objec...
22.597826
87
0.658009
import logging from aiohttp.web import Application from virtool.pg.base import Base from virtool.startup import get_scheduler_from_app logger = logging.getLogger(__name__) async def shutdown_client(app: Application): logger.info("Stopping HTTP client") try: await app["client"].close() except K...
true
true
7904ee365b4e60e710ed318fcb8a8c56cd69e12b
953
py
Python
var/spack/repos/builtin/packages/r-checkmate/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/r-checkmate/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/r-checkmate/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RCheckmate(RPackage): """Tests and assertions to perform frequent argument checks. A s...
41.434783
95
0.735572
from spack import * class RCheckmate(RPackage): homepage = "https://cloud.r-project.org/package=checkmate" url = "https://cloud.r-project.org/src/contrib/checkmate_1.8.4.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/checkmate" version('1.9.4', sha256='faa25754b757fe48...
true
true
7904ef53ba17a51d72d4bc042c9098d510df5c9f
1,367
py
Python
tests/storage/dav/test_main.py
edvfb9/vdirsyncer
9e6bd83a3245123f7f68e880016989abe8f34a65
[ "BSD-3-Clause" ]
null
null
null
tests/storage/dav/test_main.py
edvfb9/vdirsyncer
9e6bd83a3245123f7f68e880016989abe8f34a65
[ "BSD-3-Clause" ]
null
null
null
tests/storage/dav/test_main.py
edvfb9/vdirsyncer
9e6bd83a3245123f7f68e880016989abe8f34a65
[ "BSD-3-Clause" ]
null
null
null
import pytest from vdirsyncer.storage.dav import _BAD_XML_CHARS from vdirsyncer.storage.dav import _merge_xml from vdirsyncer.storage.dav import _parse_xml def test_xml_utilities(): x = _parse_xml( b"""<?xml version="1.0" encoding="UTF-8" ?> <multistatus xmlns="DAV:"> <response> ...
29.085106
72
0.516459
import pytest from vdirsyncer.storage.dav import _BAD_XML_CHARS from vdirsyncer.storage.dav import _merge_xml from vdirsyncer.storage.dav import _parse_xml def test_xml_utilities(): x = _parse_xml( b"""<?xml version="1.0" encoding="UTF-8" ?> <multistatus xmlns="DAV:"> <response> ...
true
true
7904f00b96e9379af6255d0d617c791450c4f778
4,382
py
Python
contrib/seeds/generate-seeds.py
777-project/777
1a907e655984232660d812308e046a62fb45bbba
[ "MIT" ]
7
2020-11-11T23:15:58.000Z
2021-05-03T16:26:14.000Z
contrib/seeds/generate-seeds.py
777-project/777
1a907e655984232660d812308e046a62fb45bbba
[ "MIT" ]
3
2020-11-14T13:18:47.000Z
2021-02-06T16:24:40.000Z
contrib/seeds/generate-seeds.py
777-project/777_v2_1
1a907e655984232660d812308e046a62fb45bbba
[ "MIT" ]
5
2020-10-18T16:47:23.000Z
2021-03-01T19:06:08.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
31.52518
99
0.583752
from base64 import b32decode from binascii import a2b_hex import sys import os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith('.onion'): vchAddr = b32decode(a...
true
true
7904f0a6cce4ad968ed402397dd5db06cd7e2da6
12,733
py
Python
homeassistant/components/smappee.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
2
2020-08-29T07:24:56.000Z
2020-10-27T21:47:35.000Z
homeassistant/components/smappee.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
6
2021-02-08T20:25:50.000Z
2022-03-11T23:27:53.000Z
homeassistant/components/smappee.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
3
2018-09-14T07:34:09.000Z
2018-09-29T12:57:10.000Z
""" Support for Smappee energy monitor. For more details about this component, please refer to the documentation at https://home-assistant.io/components/smappee/ """ import logging from datetime import datetime, timedelta import re import voluptuous as vol from requests.exceptions import RequestException from homeassi...
36.276353
78
0.581089
import logging from datetime import datetime, timedelta import re import voluptuous as vol from requests.exceptions import RequestException from homeassistant.const import ( CONF_USERNAME, CONF_PASSWORD, CONF_HOST ) from homeassistant.util import Throttle from homeassistant.helpers.discovery import load_platform im...
true
true
7904f0ec29c4ddeab8942766dba78f7cded677e7
394
py
Python
products/migrations/0009_product_is_deleted.py
BarisX/ecommerce_api
69191d1086f1befe49175e93dc716f1e4037e21f
[ "MIT" ]
95
2020-04-13T09:02:30.000Z
2022-03-25T14:11:34.000Z
products/migrations/0009_product_is_deleted.py
Bilal815/ecommerce_api
a3d8ce7a9e1fa2528d240d5ab508afe92607c9f8
[ "MIT" ]
87
2020-02-21T17:58:56.000Z
2022-03-21T21:37:05.000Z
products/migrations/0009_product_is_deleted.py
Bilal815/ecommerce_api
a3d8ce7a9e1fa2528d240d5ab508afe92607c9f8
[ "MIT" ]
33
2021-01-18T09:30:29.000Z
2022-03-30T01:31:57.000Z
# Generated by Django 2.1.11 on 2020-06-24 06:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0008_auto_20190919_1521'), ] operations = [ migrations.AddField( model_name='product', name='is_deleted...
20.736842
53
0.606599
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0008_auto_20190919_1521'), ] operations = [ migrations.AddField( model_name='product', name='is_deleted', field=models.BooleanField(default...
true
true
7904f0f49fb0c48a84b0978fefae0fef672d5d1f
14,589
py
Python
tools/convet_voc2coco/voc2coco.py
yhpengtu/CenterIMask
7e046964db11df78c93cb88f50b9c4b6ddf0c9bc
[ "Apache-2.0" ]
null
null
null
tools/convet_voc2coco/voc2coco.py
yhpengtu/CenterIMask
7e046964db11df78c93cb88f50b9c4b6ddf0c9bc
[ "Apache-2.0" ]
null
null
null
tools/convet_voc2coco/voc2coco.py
yhpengtu/CenterIMask
7e046964db11df78c93cb88f50b9c4b6ddf0c9bc
[ "Apache-2.0" ]
null
null
null
import os import sys import json import datetime import numpy as np import skimage.draw from bs4 import BeautifulSoup as bs import cv2 import imgaug from utils import * # Root directory of the project ROOT_DIR = os.path.abspath("../../") # Inference result directory RESULTS_DIR = os.path.abspath("./inference/") # Impo...
39.112601
98
0.582699
import os import sys import json import datetime import numpy as np import skimage.draw from bs4 import BeautifulSoup as bs import cv2 import imgaug from utils import * ROOT_DIR = os.path.abspath("../../") RESULTS_DIR = os.path.abspath("./inference/") sys.path.append(ROOT_DIR) from configs import Config import...
true
true
7904f2d31f5fac20237998f7a957bc81a5e511fe
1,353
py
Python
examples/uploaders.py
MooFreak/vkbottle
e4ee6d31537b65022ed519b64be3b9fa3c9b6267
[ "MIT" ]
null
null
null
examples/uploaders.py
MooFreak/vkbottle
e4ee6d31537b65022ed519b64be3b9fa3c9b6267
[ "MIT" ]
null
null
null
examples/uploaders.py
MooFreak/vkbottle
e4ee6d31537b65022ed519b64be3b9fa3c9b6267
[ "MIT" ]
null
null
null
from io import BytesIO from gtts import gTTS from PIL import Image from vkbottle import AudioUploader, Bot, DocUploader, Message, PhotoUploader bot = Bot("token") photo_uploader = PhotoUploader(bot.api, generate_attachment_strings=True) doc_uploader = DocUploader(bot.api, generate_attachment_strings=True) audio_uplo...
31.465116
78
0.731707
from io import BytesIO from gtts import gTTS from PIL import Image from vkbottle import AudioUploader, Bot, DocUploader, Message, PhotoUploader bot = Bot("token") photo_uploader = PhotoUploader(bot.api, generate_attachment_strings=True) doc_uploader = DocUploader(bot.api, generate_attachment_strings=True) audio_uplo...
true
true
7904f2d70ef6781d9d24239fa046eef91f73a28c
2,720
py
Python
6/server.py
mesilliac/multitude
eccab96f496217971d19d2a4592fe48ee837fb3e
[ "CC0-1.0" ]
2
2017-08-22T19:11:58.000Z
2017-10-10T22:14:33.000Z
6/server.py
mesilliac/multitude
eccab96f496217971d19d2a4592fe48ee837fb3e
[ "CC0-1.0" ]
null
null
null
6/server.py
mesilliac/multitude
eccab96f496217971d19d2a4592fe48ee837fb3e
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python # coding: utf-8 """A simple webserver.""" # python 2.7 compatibility from __future__ import print_function, unicode_literals # based on tornado import tornado.ioloop import tornado.web import tornado.websocket import sys import json def make_app(): """Create and return the main Tornado web app...
31.627907
74
0.606985
from __future__ import print_function, unicode_literals import tornado.ioloop import tornado.web import tornado.websocket import sys import json def make_app(): return tornado.web.Application([ (r"/connect", ClientSocket), (r"/(.*)", tornado.web.StaticFileHandler, { "path": "clie...
true
true
7904f2e32a45ed22e345d2ac38fd04f26b9e4adb
8,346
py
Python
rac_aspace/data_helpers.py
RockefellerArchiveCenter/rac_aspace
02546e5d618a6b9c2e2edba35383a457cba9321b
[ "MIT" ]
null
null
null
rac_aspace/data_helpers.py
RockefellerArchiveCenter/rac_aspace
02546e5d618a6b9c2e2edba35383a457cba9321b
[ "MIT" ]
74
2020-01-14T14:55:51.000Z
2021-02-18T21:13:29.000Z
rac_aspace/data_helpers.py
RockefellerArchiveCenter/rac_aspace
02546e5d618a6b9c2e2edba35383a457cba9321b
[ "MIT" ]
2
2020-03-28T21:19:21.000Z
2022-02-11T20:05:33.000Z
"""Data Helpers Data helpers leverage the abstraction layer of ArchivesSnake to provide additional functionality for retrieving, inferring and concatenating data elements. They can also extend (or invert) relationships between different objects. """ from datetime import datetime import re from rapidfuzz import fuzz f...
31.73384
85
0.648454
from datetime import datetime import re from rapidfuzz import fuzz from asnake.jsonmodel import JSONModelObject from string import Formatter from .decorators import check_type @check_type(dict) def get_note_text(note): def parse_subnote(subnote): if subnote["jsonmodel_type"] in [ "note_or...
true
true
7904f36c47eee73c9b469b11fcdbc1634739035b
749
py
Python
hkm/migrations/0026_hkm_museum_printer_credentials.py
andersinno/kuvaselaamo
aed553a0ba85e82055e0de025ba2d3e3e4f2c9e6
[ "MIT" ]
1
2017-05-07T10:46:24.000Z
2017-05-07T10:46:24.000Z
hkm/migrations/0026_hkm_museum_printer_credentials.py
City-of-Helsinki/kuvaselaamo
3fa9b69e3f5496620852d8b138129d0069339fcd
[ "MIT" ]
60
2016-10-18T11:18:48.000Z
2022-02-13T20:04:18.000Z
hkm/migrations/0026_hkm_museum_printer_credentials.py
andersinno/kuvaselaamo
aed553a0ba85e82055e0de025ba2d3e3e4f2c9e6
[ "MIT" ]
9
2017-04-18T13:26:26.000Z
2020-02-13T20:05:13.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-10-02 09:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hkm', '0025_userprofile_printer_presets'), ] operations = [ migrations.AddF...
28.807692
107
0.636849
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hkm', '0025_userprofile_printer_presets'), ] operations = [ migrations.AddField( model_name='userprofile', name='printer_p...
true
true
7904f3a4c0856151dea457452ff9246e9d6d4140
84
py
Python
Curso/Mundo 1/02.py
ZaikoXander/Python
7e7243edb02dd33991c5f63f02c983ad060fc3ca
[ "Unlicense" ]
null
null
null
Curso/Mundo 1/02.py
ZaikoXander/Python
7e7243edb02dd33991c5f63f02c983ad060fc3ca
[ "Unlicense" ]
null
null
null
Curso/Mundo 1/02.py
ZaikoXander/Python
7e7243edb02dd33991c5f63f02c983ad060fc3ca
[ "Unlicense" ]
null
null
null
nome = input('Qual é o seu nome? ') print('Olá', nome + '! Prazer em te conhecer!')
28
47
0.619048
nome = input('Qual é o seu nome? ') print('Olá', nome + '! Prazer em te conhecer!')
true
true
7904f3df1a5d83c104afd1438c819061f7fabfd1
16,078
py
Python
log_mito/model_112.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito/model_112.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito/model_112.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) M...
87.857923
710
0.803458
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', 'Xiap']) ...
true
true
7904f3ebe502340b7f29eedfa3cccd177099531d
1,114
py
Python
mlcomp/board/views/api.py
korepwx/mlcomp
b39f64d700531792da72175c8daaa10be5c73ad1
[ "MIT" ]
null
null
null
mlcomp/board/views/api.py
korepwx/mlcomp
b39f64d700531792da72175c8daaa10be5c73ad1
[ "MIT" ]
null
null
null
mlcomp/board/views/api.py
korepwx/mlcomp
b39f64d700531792da72175c8daaa10be5c73ad1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import six from flask import Blueprint, jsonify, current_app from ..utils import MountTree from .utils import is_testing api_bp = Blueprint('api', __name__.rsplit('.')[1]) if is_testing(): @api_bp.route('/_hello/') def api_hello(): return jsonify('api hello') @api_bp.route(...
25.906977
55
0.572711
import six from flask import Blueprint, jsonify, current_app from ..utils import MountTree from .utils import is_testing api_bp = Blueprint('api', __name__.rsplit('.')[1]) if is_testing(): @api_bp.route('/_hello/') def api_hello(): return jsonify('api hello') @api_bp.route('/all') def all_storage...
true
true
7904f57af1123e1fffb4246b91ab5ebd724c3887
405
py
Python
animeDjangoApp/asgi.py
peteryouu/animeDjango
a0b34005ea453c0c5ace5da0b65c13d5c225b033
[ "MIT" ]
1
2021-09-08T18:51:58.000Z
2021-09-08T18:51:58.000Z
animeDjangoApp/asgi.py
peteryouu/animeDjango
a0b34005ea453c0c5ace5da0b65c13d5c225b033
[ "MIT" ]
null
null
null
animeDjangoApp/asgi.py
peteryouu/animeDjango
a0b34005ea453c0c5ace5da0b65c13d5c225b033
[ "MIT" ]
null
null
null
""" ASGI config for animeDjangoApp project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANG...
23.823529
78
0.792593
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'animeDjangoApp.settings') application = get_asgi_application()
true
true
7904f5c7d855b0c81a36598404c795e8f972faba
12,654
py
Python
network.py
HongyangGao/PixelDeconv
71964b6b2594d1a888435d3fb42572ffb4096165
[ "MIT" ]
71
2017-05-24T01:06:26.000Z
2018-12-10T05:46:55.000Z
network.py
HongyangGao/PixelDeconv
71964b6b2594d1a888435d3fb42572ffb4096165
[ "MIT" ]
10
2017-07-03T02:48:41.000Z
2018-01-03T08:20:28.000Z
network.py
HongyangGao/PixelDeconv
71964b6b2594d1a888435d3fb42572ffb4096165
[ "MIT" ]
37
2017-05-25T05:14:55.000Z
2018-11-29T19:53:21.000Z
import os import numpy as np import tensorflow as tf from utils.data_reader import H5DataLoader, H53DDataLoader from utils.img_utils import imsave from utils import ops """ This module builds a standard U-NET for semantic segmentation. If want VAE using pixelDCL, please visit this code: https://github.com/HongyangGao...
42.606061
79
0.585744
import os import numpy as np import tensorflow as tf from utils.data_reader import H5DataLoader, H53DDataLoader from utils.img_utils import imsave from utils import ops class PixelDCN(object): def __init__(self, sess, conf): self.sess = sess self.conf = conf self.def_params() if...
true
true
7904f60d169ad9f2bbca1ee173dbd8ff9dc32226
1,079
py
Python
search_to_follow.py
hallowf/MotivationalBinary
16d85929bd689f227e5021291ec477262e6477d8
[ "MIT" ]
null
null
null
search_to_follow.py
hallowf/MotivationalBinary
16d85929bd689f227e5021291ec477262e6477d8
[ "MIT" ]
null
null
null
search_to_follow.py
hallowf/MotivationalBinary
16d85929bd689f227e5021291ec477262e6477d8
[ "MIT" ]
null
null
null
import json import pickle from TwitterAPI import TwitterAPI with open("api_key.json") as json_data: all_keys = json.load(json_data) consumer_key = all_keys["consumer_key"] consumer_secret = all_keys["consumer_secret"] access_token_key = all_keys["access_token_key"] access_token_secret = all_keys["a...
25.093023
89
0.677479
import json import pickle from TwitterAPI import TwitterAPI with open("api_key.json") as json_data: all_keys = json.load(json_data) consumer_key = all_keys["consumer_key"] consumer_secret = all_keys["consumer_secret"] access_token_key = all_keys["access_token_key"] access_token_secret = all_keys["a...
true
true
7904f658275c4c10056aaee0ba7203c11c1eb377
3,747
py
Python
plugins/News/test.py
joulez/Limnoria
aa89a2dd72ec6f593df4c5c281d915af456d5614
[ "BSD-3-Clause" ]
1
2020-04-01T21:53:47.000Z
2020-04-01T21:53:47.000Z
plugins/News/test.py
joulez/Limnoria
aa89a2dd72ec6f593df4c5c281d915af456d5614
[ "BSD-3-Clause" ]
null
null
null
plugins/News/test.py
joulez/Limnoria
aa89a2dd72ec6f593df4c5c281d915af456d5614
[ "BSD-3-Clause" ]
null
null
null
### # Copyright (c) 2003-2005, Daniel DiPaolo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of cond...
42.579545
79
0.681345
mport time from supybot.test import * class NewsTestCase(ChannelPluginTestCase): plugins = ('News','User') def setUp(self): ChannelPluginTestCase.setUp(self) self.prefix = 'news!bar@baz' self.irc.feedMsg(ircmsgs.privmsg(self.nick, 'register tester moo',...
true
true
7904f68638bcd0ad360d246513846cbd1b8f1b3e
24,872
py
Python
bin/kookaburra.py
simonsobs/lyrebird
027ca633876860c492270983c3880a7d4b87f14b
[ "BSD-2-Clause" ]
null
null
null
bin/kookaburra.py
simonsobs/lyrebird
027ca633876860c492270983c3880a7d4b87f14b
[ "BSD-2-Clause" ]
1
2021-02-04T03:16:43.000Z
2021-02-04T16:43:09.000Z
bin/kookaburra.py
simonsobs/lyrebird
027ca633876860c492270983c3880a7d4b87f14b
[ "BSD-2-Clause" ]
1
2019-03-19T01:27:11.000Z
2019-03-19T01:27:11.000Z
#!/usr/bin/env python import numpy as np import socket, curses, json, traceback, math, argparse, math, sys, os, stat from operator import itemgetter, attrgetter from configutils.dfmux_config_constructor import get_physical_id, sq_phys_id_to_info from configutils.dfmux_config_constructor import uniquifyList, generate_d...
37.401504
323
0.56051
import numpy as np import socket, curses, json, traceback, math, argparse, math, sys, os, stat from operator import itemgetter, attrgetter from configutils.dfmux_config_constructor import get_physical_id, sq_phys_id_to_info from configutils.dfmux_config_constructor import uniquifyList, generate_dfmux_lyrebird_config ...
true
true
7904f6fc827f130bd6b460661e5f206262104f46
5,833
py
Python
framework/TSA/PolynomialRegression.py
archmagethanos/raven
d727cc3da3dff5254b418fb3691a2e45deb20136
[ "Apache-2.0" ]
1
2021-07-12T19:41:52.000Z
2021-07-12T19:41:52.000Z
framework/TSA/PolynomialRegression.py
archmagethanos/raven
d727cc3da3dff5254b418fb3691a2e45deb20136
[ "Apache-2.0" ]
null
null
null
framework/TSA/PolynomialRegression.py
archmagethanos/raven
d727cc3da3dff5254b418fb3691a2e45deb20136
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
36.917722
112
0.677353
import numpy as np import utils.importerUtils statsmodels = utils.importerUtils.importModuleLazy("statsmodels", globals()) from utils import InputData, InputTypes, randomUtils, xmlUtils, mathUtils, utils from .TimeSeriesAnalyzer import TimeSeriesCharacterizer, TimeSeriesGenerator class PolynomialRegres...
true
true
7904f73a55e8a1cb1e5822e74cf6fff7c1ddfd71
1,133
py
Python
pythonmod/doc/examples/example0-1.py
luisdallos/unbound
4034c009bb8fc78299996b0a23154653ede7c30a
[ "BSD-3-Clause" ]
1,751
2016-11-03T18:25:34.000Z
2022-03-30T17:43:26.000Z
pythonmod/doc/examples/example0-1.py
luisdallos/unbound
4034c009bb8fc78299996b0a23154653ede7c30a
[ "BSD-3-Clause" ]
603
2017-03-03T19:51:58.000Z
2022-03-31T12:56:58.000Z
pythonmod/doc/examples/example0-1.py
luisdallos/unbound
4034c009bb8fc78299996b0a23154653ede7c30a
[ "BSD-3-Clause" ]
296
2016-11-14T07:00:11.000Z
2022-03-29T00:56:58.000Z
def init(id, cfg): log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, cfg.python_script)) return True def init_standard(id, env): log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, env.cfg.python_script)) return True def deinit(...
29.815789
118
0.68579
def init(id, cfg): log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, cfg.python_script)) return True def init_standard(id, env): log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, env.cfg.python_script)) return True def deinit(...
true
true
7904f7d66d7d996e8defae5ec52fbd6d0ff0fcca
585
py
Python
tuling.py
ali-geng/wechatrobot
6e0701447ff9bdfb09a3d872a5bcc2ed3d8ff345
[ "MIT" ]
2
2018-11-14T07:44:19.000Z
2018-11-14T07:44:30.000Z
tuling.py
91MrGeng/wechatrobot
6e0701447ff9bdfb09a3d872a5bcc2ed3d8ff345
[ "MIT" ]
1
2021-08-10T08:23:34.000Z
2021-08-10T08:23:34.000Z
tuling.py
ali-geng/wechatrobot
6e0701447ff9bdfb09a3d872a5bcc2ed3d8ff345
[ "MIT" ]
null
null
null
# coding=utf-8 import requests import json def robot(content,userid): api = r'http://openapi.tuling123.com/openapi/api/v2' data = { "perception": { "inputText": { "text": content } }, "userInfo": { "a...
26.590909
65
0.499145
import requests import json def robot(content,userid): api = r'http://openapi.tuling123.com/openapi/api/v2' data = { "perception": { "inputText": { "text": content } }, "userInfo": { "apiKey": "fece0...
true
true
7904f810458fe24ba253700653f2686d9292e963
3,854
py
Python
cave/com.raytheon.viz.gfe/python/testFormatters/FirePeriodTable.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
cave/com.raytheon.viz.gfe/python/testFormatters/FirePeriodTable.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
cave/com.raytheon.viz.gfe/python/testFormatters/FirePeriodTable.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
1
2021-10-30T00:03:05.000Z
2021-10-30T00:03:05.000Z
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to ...
34.720721
112
0.463415
true
true
7904f86a9867804b94ab97025933ff0fd4d8caa9
640
py
Python
trebol/interface.py
ilkerkesen/trebol
4adda97a7662d2412cf6a92a768cb1033d74db6c
[ "MIT" ]
null
null
null
trebol/interface.py
ilkerkesen/trebol
4adda97a7662d2412cf6a92a768cb1033d74db6c
[ "MIT" ]
2
2015-01-18T00:47:52.000Z
2015-02-06T15:24:55.000Z
trebol/interface.py
ilkerkesen/trebol
4adda97a7662d2412cf6a92a768cb1033d74db6c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import tornado.gen import bcrypt __all__ = ["create_new_user"] @tornado.gen.coroutine def get_next_id(db, collection): counter = yield db.counters.find_and_modify( {"_id": "{}id".format(collection)}, {"$inc": {"seq": 1}}, new=True, ) ...
23.703704
69
0.635938
import tornado.gen import bcrypt __all__ = ["create_new_user"] @tornado.gen.coroutine def get_next_id(db, collection): counter = yield db.counters.find_and_modify( {"_id": "{}id".format(collection)}, {"$inc": {"seq": 1}}, new=True, ) raise tornado.gen.Return(counter["seq"]) ...
true
true
7904f89e359c6197225aebdabbbcb2e74fe423a5
43,227
py
Python
featuretools/entityset/entityset.py
esyyes/featuretools
7d96bd221bad71c70b5d79ce7f7a8885c298f6df
[ "BSD-3-Clause" ]
1
2020-06-10T02:39:27.000Z
2020-06-10T02:39:27.000Z
featuretools/entityset/entityset.py
esyyes/featuretools
7d96bd221bad71c70b5d79ce7f7a8885c298f6df
[ "BSD-3-Clause" ]
null
null
null
featuretools/entityset/entityset.py
esyyes/featuretools
7d96bd221bad71c70b5d79ce7f7a8885c298f6df
[ "BSD-3-Clause" ]
null
null
null
import copy import logging from collections import defaultdict import dask.dataframe as dd import numpy as np import pandas as pd from pandas.api.types import is_dtype_equal, is_numeric_dtype import featuretools.variable_types.variable as vtypes from featuretools.entityset import deserialize, serialize from featureto...
44.426516
174
0.573924
import copy import logging from collections import defaultdict import dask.dataframe as dd import numpy as np import pandas as pd from pandas.api.types import is_dtype_equal, is_numeric_dtype import featuretools.variable_types.variable as vtypes from featuretools.entityset import deserialize, serialize from featureto...
true
true
7904f98216b2696d85f120262b088e598960052b
6,497
py
Python
homeassistant/components/agent_dvr/camera.py
CantankerousBullMoose/core
2178e27fb4c62271d4872e16838331defed82226
[ "Apache-2.0" ]
1
2021-03-23T07:20:03.000Z
2021-03-23T07:20:03.000Z
homeassistant/components/agent_dvr/camera.py
CantankerousBullMoose/core
2178e27fb4c62271d4872e16838331defed82226
[ "Apache-2.0" ]
51
2020-08-03T07:30:44.000Z
2022-03-22T06:02:42.000Z
homeassistant/components/agent_dvr/camera.py
CantankerousBullMoose/core
2178e27fb4c62271d4872e16838331defed82226
[ "Apache-2.0" ]
2
2021-03-22T21:42:48.000Z
2021-04-12T12:26:39.000Z
"""Support for Agent camera streaming.""" from datetime import timedelta import logging from agent import AgentError from homeassistant.components.camera import SUPPORT_ON_OFF from homeassistant.components.mjpeg.camera import ( CONF_MJPEG_URL, CONF_STILL_IMAGE_URL, MjpegCamera, filter_urllib3_logging,...
30.078704
137
0.64322
from datetime import timedelta import logging from agent import AgentError from homeassistant.components.camera import SUPPORT_ON_OFF from homeassistant.components.mjpeg.camera import ( CONF_MJPEG_URL, CONF_STILL_IMAGE_URL, MjpegCamera, filter_urllib3_logging, ) from homeassistant.const import ATTR_AT...
true
true
7904f9ab55622686bc4e6310b36e16189b2e04aa
336
py
Python
obot.py
MrTsRex/Reddit_bot
f384b3736f8a6849653ee27dcfb2390d5eab7d37
[ "MIT" ]
null
null
null
obot.py
MrTsRex/Reddit_bot
f384b3736f8a6849653ee27dcfb2390d5eab7d37
[ "MIT" ]
null
null
null
obot.py
MrTsRex/Reddit_bot
f384b3736f8a6849653ee27dcfb2390d5eab7d37
[ "MIT" ]
1
2020-05-09T06:58:47.000Z
2020-05-09T06:58:47.000Z
import praw c_id='34kxuaxc4yWiKw' c_secret='8bJqHqNHFdB6NKV9sHzFbo4_Dl4' ua='my user agent' un='the_ugly_bot' pwd='whatever930' def login(): r = praw.Reddit(client_id=c_id, client_secret=c_secret, user_agent=ua, username=un, passwor...
22.4
44
0.58631
import praw c_id='34kxuaxc4yWiKw' c_secret='8bJqHqNHFdB6NKV9sHzFbo4_Dl4' ua='my user agent' un='the_ugly_bot' pwd='whatever930' def login(): r = praw.Reddit(client_id=c_id, client_secret=c_secret, user_agent=ua, username=un, passwor...
true
true
7904facea9fd890b5c6a46fa9a4e7fc4c16dd44e
153
py
Python
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingMedian_NoCycle_LSTM.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingMedian_NoCycle_LSTM.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingMedian_NoCycle_LSTM.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingMedian'] , ['NoCycle'] , ['LSTM'] );
38.25
80
0.745098
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingMedian'] , ['NoCycle'] , ['LSTM'] );
true
true
7904fb41de68edf8a0661c861365993ff2e1f5b2
2,072
py
Python
flange/source.py
flashashen/flange
c8e6e790fe68679fe74aec007abdc47810137b0d
[ "MIT" ]
1
2020-09-09T02:51:38.000Z
2020-09-09T02:51:38.000Z
flange/source.py
flashashen/flange
c8e6e790fe68679fe74aec007abdc47810137b0d
[ "MIT" ]
6
2018-03-06T17:47:44.000Z
2019-03-01T17:13:39.000Z
flange/source.py
flashashen/flange
c8e6e790fe68679fe74aec007abdc47810137b0d
[ "MIT" ]
null
null
null
import os import anyconfig PARSABLES = { 'pickle':['p','pickle'], 'toml':['toml'], 'xml':['xml'], 'yaml':['yml','yaml'], 'json':['json'], 'ini':['ini'], 'properties':['props','properties'], 'shellvars':['env']} class Source(object): def __init__(self, uri, root_path=None, cont...
25.9
122
0.543436
import os import anyconfig PARSABLES = { 'pickle':['p','pickle'], 'toml':['toml'], 'xml':['xml'], 'yaml':['yml','yaml'], 'json':['json'], 'ini':['ini'], 'properties':['props','properties'], 'shellvars':['env']} class Source(object): def __init__(self, uri, root_path=None, cont...
true
true