hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c0eb2791ccb1362edf9ef38716c7af67fe140d2
31,085
py
Python
src/config/api-server/vnc_cfg_api_server/tests/test_event_dispatcher.py
atsgen/tf-controller
9321889cdd3d7108980cc88937b2e82956502cc5
[ "Apache-2.0" ]
37
2020-09-21T10:42:26.000Z
2022-01-09T10:16:40.000Z
src/config/api-server/vnc_cfg_api_server/tests/test_event_dispatcher.py
atsgen/tf-controller
9321889cdd3d7108980cc88937b2e82956502cc5
[ "Apache-2.0" ]
null
null
null
src/config/api-server/vnc_cfg_api_server/tests/test_event_dispatcher.py
atsgen/tf-controller
9321889cdd3d7108980cc88937b2e82956502cc5
[ "Apache-2.0" ]
21
2020-08-25T12:48:42.000Z
2022-03-22T04:32:18.000Z
from __future__ import absolute_import import json import gevent from ..event_dispatcher import EventDispatcher from testtools import TestCase from flexmock import flexmock from gevent.queue import Queue gevent.monkey.patch_all() class TestPack(TestCase): def setUp(self): super(TestPack, self).setUp() ...
38.234932
103
0.566093
from __future__ import absolute_import import json import gevent from ..event_dispatcher import EventDispatcher from testtools import TestCase from flexmock import flexmock from gevent.queue import Queue gevent.monkey.patch_all() class TestPack(TestCase): def setUp(self): super(TestPack, self).setUp() ...
true
true
1c0eb30ba262827170e41dce538fbd6a4a8c3e56
3,508
py
Python
poship/engine/components/user/handlers.py
candango/podship-engine
d8cef10da00182c034320113fe1d990f40a585bd
[ "Apache-2.0" ]
null
null
null
poship/engine/components/user/handlers.py
candango/podship-engine
d8cef10da00182c034320113fe1d990f40a585bd
[ "Apache-2.0" ]
null
null
null
poship/engine/components/user/handlers.py
candango/podship-engine
d8cef10da00182c034320113fe1d990f40a585bd
[ "Apache-2.0" ]
2
2016-08-04T14:55:17.000Z
2016-08-05T13:50:50.000Z
#!/usr/bin/env python # # Copyright 2015-2016 Flavio Garcia # # 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...
32.183486
83
0.590935
import firenado.tornadoweb from firenado.service import served_by import logging from jsonschema import validate from jsonschema.exceptions import ValidationError from tornado.escape import json_decode from wtforms.fields import StringField, PasswordField from wtforms.validators import DataRequired from wtforms_torna...
true
true
1c0eb3fab8c16cbe749be915201617d1ce263b6d
4,441
py
Python
process_csv.py
phillipi/AMT_Real_vs_Fake
4f5f25cdaffc8ee8c0a3ccd186f6ff45beb0c5c9
[ "BSD-2-Clause" ]
34
2017-02-10T06:57:24.000Z
2021-12-28T18:32:52.000Z
process_csv.py
phillipi/AMT_Real_vs_Fake
4f5f25cdaffc8ee8c0a3ccd186f6ff45beb0c5c9
[ "BSD-2-Clause" ]
2
2017-05-14T03:49:48.000Z
2020-07-17T08:08:48.000Z
process_csv.py
phillipi/AMT_Real_vs_Fake
4f5f25cdaffc8ee8c0a3ccd186f6ff45beb0c5c9
[ "BSD-2-Clause" ]
7
2017-12-22T01:32:22.000Z
2020-08-21T06:52:49.000Z
import numpy as np import csv from collections import OrderedDict import argparse from tqdm import tqdm from IPython import embed def collect_csv_results(filename): with open(filename, newline='') as csvfile: reader = csv.DictReader(csvfile) for rr,row in enumerate(reader): if(rr==0): raw_dict = row ...
31.496454
132
0.717856
import numpy as np import csv from collections import OrderedDict import argparse from tqdm import tqdm from IPython import embed def collect_csv_results(filename): with open(filename, newline='') as csvfile: reader = csv.DictReader(csvfile) for rr,row in enumerate(reader): if(rr==0): raw_dict = row ...
true
true
1c0eb4b29780e79ad33aaf91ffc1a00bfe2546e9
4,617
py
Python
test/integration/test_serve.py
synapticarbors/mike
39d6373cce9b3c9097c72ee3259389b06552fb4d
[ "BSD-3-Clause" ]
null
null
null
test/integration/test_serve.py
synapticarbors/mike
39d6373cce9b3c9097c72ee3259389b06552fb4d
[ "BSD-3-Clause" ]
null
null
null
test/integration/test_serve.py
synapticarbors/mike
39d6373cce9b3c9097c72ee3259389b06552fb4d
[ "BSD-3-Clause" ]
null
null
null
import os import platform import signal import subprocess import time import unittest from .. import * from mike import git_utils @unittest.skipIf(platform.system() == 'Windows', "SIGINT doesn't work on windows") class TestList(unittest.TestCase): def setUp(self): self.stage = stage_dir(...
36.070313
78
0.603639
import os import platform import signal import subprocess import time import unittest from .. import * from mike import git_utils @unittest.skipIf(platform.system() == 'Windows', "SIGINT doesn't work on windows") class TestList(unittest.TestCase): def setUp(self): self.stage = stage_dir(...
true
true
1c0eb5507bcc8f25a2dfff27ebb8d5f488f84c4a
2,300
py
Python
pinax/notifications/conf.py
pclumson1/pinax-notifications
31a95d77cebef1cb23cad49b4715981170ffcbfa
[ "MIT" ]
414
2015-03-03T05:34:57.000Z
2022-01-23T05:03:36.000Z
pinax/notifications/conf.py
pclumson1/pinax-notifications
31a95d77cebef1cb23cad49b4715981170ffcbfa
[ "MIT" ]
62
2015-03-04T14:01:22.000Z
2021-12-22T07:19:57.000Z
pinax/notifications/conf.py
pclumson1/pinax-notifications
31a95d77cebef1cb23cad49b4715981170ffcbfa
[ "MIT" ]
111
2015-03-02T15:04:11.000Z
2022-02-16T15:35:00.000Z
import importlib from django.apps import apps as django_apps from django.conf import settings # noqa from django.core.exceptions import ImproperlyConfigured from appconf import AppConf def load_model(path): try: return django_apps.get_model(path) except ValueError: raise ImproperlyConfigure...
29.113924
88
0.643913
import importlib from django.apps import apps as django_apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from appconf import AppConf def load_model(path): try: return django_apps.get_model(path) except ValueError: raise ImproperlyConfigured( ...
true
true
1c0eb5797e427c3960d99ac7f6683aa88354ebc7
3,730
py
Python
tests/garage/tf/samplers/test_off_policy_vectorized_sampler.py
arbenton/garage
5c398255fbfae375370483f18216996d82590a88
[ "MIT" ]
null
null
null
tests/garage/tf/samplers/test_off_policy_vectorized_sampler.py
arbenton/garage
5c398255fbfae375370483f18216996d82590a88
[ "MIT" ]
null
null
null
tests/garage/tf/samplers/test_off_policy_vectorized_sampler.py
arbenton/garage
5c398255fbfae375370483f18216996d82590a88
[ "MIT" ]
1
2020-02-05T00:34:07.000Z
2020-02-05T00:34:07.000Z
import gym import numpy as np import tensorflow as tf from garage.envs import normalize from garage.experiment import LocalRunner from garage.np.exploration_strategies import OUStrategy from garage.replay_buffer import SimpleReplayBuffer from garage.tf.algos import DDPG from garage.tf.envs import TfEnv from garage.tf....
38.854167
79
0.621716
import gym import numpy as np import tensorflow as tf from garage.envs import normalize from garage.experiment import LocalRunner from garage.np.exploration_strategies import OUStrategy from garage.replay_buffer import SimpleReplayBuffer from garage.tf.algos import DDPG from garage.tf.envs import TfEnv from garage.tf....
true
true
1c0eb5acd322aaf0e4d89e4cf7adc4d56b49117a
1,313
py
Python
dashboard/tests/test_views.py
18F/tts-bug-bounty-dashboard
a9be81ff3eaf25db3192b64b5580764db9555dec
[ "CC0-1.0" ]
7
2017-07-15T13:48:00.000Z
2021-04-16T23:55:43.000Z
dashboard/tests/test_views.py
18F/tts-bug-bounty-dashboard
a9be81ff3eaf25db3192b64b5580764db9555dec
[ "CC0-1.0" ]
35
2017-06-19T16:15:20.000Z
2019-05-21T15:37:15.000Z
dashboard/tests/test_views.py
18F/tts-bug-bounty-dashboard
a9be81ff3eaf25db3192b64b5580764db9555dec
[ "CC0-1.0" ]
3
2017-07-14T02:37:40.000Z
2017-07-22T18:22:43.000Z
import pytest from django.contrib.auth.models import User from django.utils.safestring import SafeString from .. import views @pytest.fixture def some_user(db): user = User(username='foo', email='foo@gsa.gov') user.save() return user @pytest.fixture def some_user_client(some_user, client): client.f...
26.26
69
0.723534
import pytest from django.contrib.auth.models import User from django.utils.safestring import SafeString from .. import views @pytest.fixture def some_user(db): user = User(username='foo', email='foo@gsa.gov') user.save() return user @pytest.fixture def some_user_client(some_user, client): client.f...
true
true
1c0eb60b8ec2fe5e409cfddb97a5d168533c539e
22,950
py
Python
pandas/core/config.py
tacaswell/pandas
81c57e20da278494dfebc2f1043f5ff361a234f3
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/core/config.py
tacaswell/pandas
81c57e20da278494dfebc2f1043f5ff361a234f3
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/core/config.py
tacaswell/pandas
81c57e20da278494dfebc2f1043f5ff361a234f3
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
1
2019-02-20T18:01:08.000Z
2019-02-20T18:01:08.000Z
""" The config module holds package-wide configurables and provides a uniform API for working with them. Overview ======== This module supports the following requirements: - options are referenced using keys in dot.notation, e.g. "x.y.option - z". - keys are case-insensitive. - functions should accept partial/regex k...
27.517986
79
0.631808
import re from collections import namedtuple from contextlib import contextmanager import warnings from pandas.compat import map, lmap, u import pandas.compat as compat DeprecatedOption = namedtuple('DeprecatedOption', 'key msg rkey removal_ver') RegisteredOption = namedtuple('RegisteredOption', ...
true
true
1c0eb6f63947861c1f2c89a0e219fdc71c4a9c73
21,612
py
Python
venv/Lib/site-packages/sklearn/decomposition/tests/test_dict_learning.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/sklearn/decomposition/tests/test_dict_learning.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/sklearn/decomposition/tests/test_dict_learning.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
import pytest import numpy as np from functools import partial import itertools from sklearn.base import clone from sklearn.exceptions import ConvergenceWarning from sklearn.utils import check_array from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_...
37.520833
80
0.638997
import pytest import numpy as np from functools import partial import itertools from sklearn.base import clone from sklearn.exceptions import ConvergenceWarning from sklearn.utils import check_array from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_...
true
true
1c0eb81fb69a4f47852d6e2f5c5b37926cd00eb3
6,431
py
Python
salt/states/lvs_server.py
ifraixedes/saltstack-salt
b54becb8b43cc9b7c00b2c0bc637ac534dc62896
[ "Apache-2.0" ]
9,425
2015-01-01T05:59:24.000Z
2022-03-31T20:44:05.000Z
salt/states/lvs_server.py
ifraixedes/saltstack-salt
b54becb8b43cc9b7c00b2c0bc637ac534dc62896
[ "Apache-2.0" ]
33,507
2015-01-01T00:19:56.000Z
2022-03-31T23:48:20.000Z
salt/states/lvs_server.py
ifraixedes/saltstack-salt
b54becb8b43cc9b7c00b2c0bc637ac534dc62896
[ "Apache-2.0" ]
5,810
2015-01-01T19:11:45.000Z
2022-03-31T02:37:20.000Z
""" Management of LVS (Linux Virtual Server) Real Server ==================================================== """ def __virtual__(): """ Only load if the lvs module is available in __salt__ """ if "lvs.get_rules" in __salt__: return "lvs_server" return (False, "lvs module could not be load...
31.52451
134
0.507386
def __virtual__(): if "lvs.get_rules" in __salt__: return "lvs_server" return (False, "lvs module could not be loaded") def present( name, protocol=None, service_address=None, server_address=None, packet_forward_method="dr", weight=1, ): ret = {"name": name, "changes": {}...
true
true
1c0eb8b3bdaa698bd1077ee6cc4e2391838ad169
12,168
py
Python
plugins/modules/oci_loadbalancer_certificate.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_loadbalancer_certificate.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_loadbalancer_certificate.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017, 2020 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
38.384858
157
0.662558
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_loadbalancer_certificate short_description: Manage a Certificate resource in Or...
true
true
1c0eb9d873bcb453322479c1bb3e53a3381e8877
1,375
py
Python
util/get_percentage_plots.py
jalilm/SDN-Monitoring
4ba8dd0f0ed5e44c0e803713d6c82ee2c815c7e4
[ "Apache-2.0" ]
1
2017-01-02T12:05:21.000Z
2017-01-02T12:05:21.000Z
util/get_percentage_plots.py
jalilm/SDN-Monitoring
4ba8dd0f0ed5e44c0e803713d6c82ee2c815c7e4
[ "Apache-2.0" ]
null
null
null
util/get_percentage_plots.py
jalilm/SDN-Monitoring
4ba8dd0f0ed5e44c0e803713d6c82ee2c815c7e4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import glob import os import matplotlib.pyplot as plt def main(): res_per_k = {} for fn in glob.glob(os.path.expanduser('~/logs/') + '*-Topk-*'): if os.path.isfile(fn): # bfn = os.path.basename(fn) # mechanism, topk, rate, directory, timestep, hh, cm = b...
31.25
81
0.493091
import glob import os import matplotlib.pyplot as plt def main(): res_per_k = {} for fn in glob.glob(os.path.expanduser('~/logs/') + '*-Topk-*'): if os.path.isfile(fn): with open(fn, "r") as f: f_res = f.readlines() for l in f_res: ...
true
true
1c0eb9e2d3892af0c55d16aed4ccb12c18ee8274
1,401
py
Python
tests/test_utils.py
Cdayz/BlackSheep
42c708c90c29299981e4bf0ed466d262f1ade0e5
[ "MIT" ]
482
2018-12-20T09:30:23.000Z
2021-02-08T18:34:16.000Z
tests/test_utils.py
Cdayz/BlackSheep
42c708c90c29299981e4bf0ed466d262f1ade0e5
[ "MIT" ]
125
2021-02-15T09:29:51.000Z
2022-03-25T19:48:23.000Z
tests/test_utils.py
Cdayz/BlackSheep
42c708c90c29299981e4bf0ed466d262f1ade0e5
[ "MIT" ]
27
2021-03-20T16:17:58.000Z
2022-03-02T19:37:42.000Z
from typing import AnyStr, Sequence import pytest from blacksheep.utils import ensure_bytes, ensure_str, join_fragments @pytest.mark.parametrize( "fragments,expected_value", [ [["a"], "/a"], [["a", "b", "c", "d"], "/a/b/c/d"], [["a", None, "b", "c", "", "d"], "/a/b/c/d"], [[b...
29.1875
78
0.622413
from typing import AnyStr, Sequence import pytest from blacksheep.utils import ensure_bytes, ensure_str, join_fragments @pytest.mark.parametrize( "fragments,expected_value", [ [["a"], "/a"], [["a", "b", "c", "d"], "/a/b/c/d"], [["a", None, "b", "c", "", "d"], "/a/b/c/d"], [[b...
true
true
1c0eba96023e8b7c7cf155dd5869f8535a8ec5eb
26,162
py
Python
code/trainer.py
pavanchhatpar/AttnGAN
9a4ac53aee9890ad488f11aeb913623d2c93a6b2
[ "MIT" ]
null
null
null
code/trainer.py
pavanchhatpar/AttnGAN
9a4ac53aee9890ad488f11aeb913623d2c93a6b2
[ "MIT" ]
null
null
null
code/trainer.py
pavanchhatpar/AttnGAN
9a4ac53aee9890ad488f11aeb913623d2c93a6b2
[ "MIT" ]
null
null
null
from __future__ import print_function from six.moves import range import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import torch.backends.cudnn as cudnn from PIL import Image from miscc.config import cfg from miscc.utils import mkdir_p from miscc.utils import build_su...
46.059859
101
0.458451
from __future__ import print_function from six.moves import range import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import torch.backends.cudnn as cudnn from PIL import Image from miscc.config import cfg from miscc.utils import mkdir_p from miscc.utils import build_su...
true
true
1c0ebc3040cc78aa214390c9cd42c2f75622f205
574
py
Python
March/Day13-Valid Parentheses.py
tayyrov/Daily_Coding_Challenge
9e54a725082530dca1229dfcd973d04975374220
[ "MIT" ]
1
2022-01-01T21:54:45.000Z
2022-01-01T21:54:45.000Z
March/Day13-Valid Parentheses.py
tayyrov/Daily_Coding_Challenge
9e54a725082530dca1229dfcd973d04975374220
[ "MIT" ]
null
null
null
March/Day13-Valid Parentheses.py
tayyrov/Daily_Coding_Challenge
9e54a725082530dca1229dfcd973d04975374220
[ "MIT" ]
null
null
null
""" Question Source:Leetcode Level: Easy Topic: Stack Solver: Tayyrov Date: 13.03.2022 """ def isValid(s: str) -> bool: tokens = {("(", ")"), ("{", "}"), ("[", "]")} openn = {"(", "[", "{"} stack = [] for char in s: if char in openn: stack.append(char) els...
20.5
50
0.419861
def isValid(s: str) -> bool: tokens = {("(", ")"), ("{", "}"), ("[", "]")} openn = {"(", "[", "{"} stack = [] for char in s: if char in openn: stack.append(char) else: if not stack: return False else: cl...
true
true
1c0ebc7cfeca229af4ecb40d82b0236d449c2eb4
984
py
Python
src/binary.py
dsanno/chainer-etl9
e6968442b9aa159302a1b5c02fced686f72ef682
[ "MIT" ]
7
2016-09-10T07:34:13.000Z
2018-05-13T06:00:51.000Z
src/binary.py
dsanno/chainer-etl9
e6968442b9aa159302a1b5c02fced686f72ef682
[ "MIT" ]
null
null
null
src/binary.py
dsanno/chainer-etl9
e6968442b9aa159302a1b5c02fced686f72ef682
[ "MIT" ]
3
2016-05-17T03:22:18.000Z
2018-05-13T06:00:55.000Z
from struct import unpack def read8(str, offset=0): return unpack('B', str[offset:offset + 1])[0] def read16be(str, offset=0): return unpack('>H', str[offset:offset + 2])[0] def read16le(str, offset=0): return unpack('<H', str[offset:offset + 2])[0] def read32be(str, offset=0): return unpack('>I', s...
30.75
73
0.655488
from struct import unpack def read8(str, offset=0): return unpack('B', str[offset:offset + 1])[0] def read16be(str, offset=0): return unpack('>H', str[offset:offset + 2])[0] def read16le(str, offset=0): return unpack('<H', str[offset:offset + 2])[0] def read32be(str, offset=0): return unpack('>I', s...
true
true
1c0ebcfecefcf5d449d0081e37d8b7f9828822ad
714
py
Python
plusplus/config.py
SubparLabs/pluspl.us
4abe43ad5e8f3dbfc78b17ac0a376b099ad20a02
[ "MIT" ]
8
2019-11-05T05:59:03.000Z
2021-08-20T01:45:45.000Z
plusplus/config.py
SubparLabs/pluspl.us
4abe43ad5e8f3dbfc78b17ac0a376b099ad20a02
[ "MIT" ]
129
2019-11-28T00:19:07.000Z
2021-08-24T19:23:17.000Z
plusplus/config.py
SubparLabs/pluspl.us
4abe43ad5e8f3dbfc78b17ac0a376b099ad20a02
[ "MIT" ]
13
2019-08-08T07:41:30.000Z
2022-02-21T18:17:33.000Z
import os VERSION = 0.1 NAME = os.environ.get("NAME") SLACK_CLIENT_ID = os.environ.get('SLACK_CLIENT_ID') SLACK_CLIENT_SECRET = os.environ.get('SLACK_CLIENT_SECRET') SLACK_SCOPES = "chat:write,im:history,im:write,mpim:history,mpim:write,team:read,channels:history,app_mentions:read" SLACK_OAUTH_URL = f"https://slack.co...
47.6
116
0.809524
import os VERSION = 0.1 NAME = os.environ.get("NAME") SLACK_CLIENT_ID = os.environ.get('SLACK_CLIENT_ID') SLACK_CLIENT_SECRET = os.environ.get('SLACK_CLIENT_SECRET') SLACK_SCOPES = "chat:write,im:history,im:write,mpim:history,mpim:write,team:read,channels:history,app_mentions:read" SLACK_OAUTH_URL = f"https://slack.co...
true
true
1c0ebe2f87f3f7dc0f48e8dcd79848c23462a12f
860
py
Python
fm/chassis.py
LaudateCorpus1/ZFM
c92db4637010c304fe7df5057813f591a3577322
[ "Apache-2.0" ]
null
null
null
fm/chassis.py
LaudateCorpus1/ZFM
c92db4637010c304fe7df5057813f591a3577322
[ "Apache-2.0" ]
null
null
null
fm/chassis.py
LaudateCorpus1/ZFM
c92db4637010c304fe7df5057813f591a3577322
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # (C) Copyright 2020 Hewlett Packard Enterprise Development LP. # Licensed under the Apache v2.0 license. # import re import os import sys import json from km.fm.log import Log # -----------------------------------------------------------------------------------------------------------------...
26.875
123
0.445349
import re import os import sys import json from km.fm.log import Log class Chassis(): def __init__(self, node, name): self.node = node self.name = name self.configuration = node.configuration[name] def ready(self): status, attr = self.node.get(self.name) if status:...
true
true
1c0ebf9b1c458ca4272e93c27a9e45fe9349305a
136
py
Python
online_judges/atcoder/contests/abc203/b/b.py
miaortizma/competitive-programming
ea5adfc07e49935acfc0697eeb0a12c7dc6cd8cc
[ "MIT" ]
2
2018-02-20T14:44:57.000Z
2018-02-20T14:45:03.000Z
online_judges/atcoder/contests/abc203/b/b.py
miaortizma/competitive-programming
ea5adfc07e49935acfc0697eeb0a12c7dc6cd8cc
[ "MIT" ]
null
null
null
online_judges/atcoder/contests/abc203/b/b.py
miaortizma/competitive-programming
ea5adfc07e49935acfc0697eeb0a12c7dc6cd8cc
[ "MIT" ]
null
null
null
N, K = map(int, input().split()) S = 0 for i in range(1, N + 1): for j in range(1, K + 1): S += int(f'{i}0{j}') print(S)
13.6
32
0.455882
N, K = map(int, input().split()) S = 0 for i in range(1, N + 1): for j in range(1, K + 1): S += int(f'{i}0{j}') print(S)
true
true
1c0ec02ffb7818cafea65d7bdea367d5d3e32a9c
46,439
py
Python
ansible/my_env/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.py
otus-devops-2019-02/yyashkin_infra
0cd0c003884155ac922e3e301305ac202de7028c
[ "MIT" ]
1
2019-04-16T21:23:15.000Z
2019-04-16T21:23:15.000Z
ansible/my_env/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.py
otus-devops-2019-02/yyashkin_infra
0cd0c003884155ac922e3e301305ac202de7028c
[ "MIT" ]
5
2020-02-26T20:10:50.000Z
2021-09-23T23:23:18.000Z
ansible/my_env/lib/python2.7/site-packages/ansible/modules/net_tools/nmcli.py
otus-devops-2019-02/yyashkin_infra
0cd0c003884155ac922e3e301305ac202de7028c
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Chris Long <alcamie@gmail.com> <chlong@redhat.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __meta...
36.422745
150
0.58397
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: nmcli author: "Chris Long (@alcamie101)" short_description: Manage Networking requir...
true
true
1c0ec087e03e515e7829935410b8b666a211128e
1,732
py
Python
dump_convex_hull.py
vibhoothi/awcy
172edeeca8c331d63ee72f6a3928fc6b2965d845
[ "MIT" ]
null
null
null
dump_convex_hull.py
vibhoothi/awcy
172edeeca8c331d63ee72f6a3928fc6b2965d845
[ "MIT" ]
null
null
null
dump_convex_hull.py
vibhoothi/awcy
172edeeca8c331d63ee72f6a3928fc6b2965d845
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from __future__ import print_function from numpy import * import numpy as np from scipy import * from scipy.interpolate import interp1d from scipy.interpolate import pchip from scipy.interpolate import BPoly from scipy._lib._util import _asarray_validated import sys import os import argparse im...
29.862069
98
0.646074
from __future__ import print_function from numpy import * import numpy as np from scipy import * from scipy.interpolate import interp1d from scipy.interpolate import pchip from scipy.interpolate import BPoly from scipy._lib._util import _asarray_validated import sys import os import argparse import json import subpro...
true
true
1c0ec09fd22aa61719da30beac7b496a36378006
5,855
py
Python
bootstrap.py
ashok-g/dirsync
39d5d69adcf78f97caca3be086c3703b6f0fb541
[ "MIT" ]
1
2020-11-17T13:04:16.000Z
2020-11-17T13:04:16.000Z
bootstrap.py
ashok-g/dirsync
39d5d69adcf78f97caca3be086c3703b6f0fb541
[ "MIT" ]
null
null
null
bootstrap.py
ashok-g/dirsync
39d5d69adcf78f97caca3be086c3703b6f0fb541
[ "MIT" ]
1
2021-05-09T13:11:48.000Z
2021-05-09T13:11:48.000Z
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # T...
34.239766
80
0.60205
import os import shutil import sys import tempfile from optparse import OptionParser tmpeggs = tempfile.mkdtemp() usage = '''\ [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] Bootstraps a buildout-based project. Simply run this script in a directory containing a buildout.cfg, using the Python...
true
true
1c0ec0c626bf9375f98ae86c74c0ee0f19d88fc9
7,307
py
Python
nebula_test_files/vox_tri_pri/gen_pri_wall.py
RichardJ112/nebula_dynamic_2021
6e120f4562e46cd02d981e75aa4238d16ee0e9c8
[ "BSD-3-Clause" ]
null
null
null
nebula_test_files/vox_tri_pri/gen_pri_wall.py
RichardJ112/nebula_dynamic_2021
6e120f4562e46cd02d981e75aa4238d16ee0e9c8
[ "BSD-3-Clause" ]
null
null
null
nebula_test_files/vox_tri_pri/gen_pri_wall.py
RichardJ112/nebula_dynamic_2021
6e120f4562e46cd02d981e75aa4238d16ee0e9c8
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import os # Point exposure for Wall Depositions #Automation Additions HPC_toggle = False multi_run_folder_toggle = False# single or multi folder (True is multi,False is single) desktop_toggle = True date = "/20_8_2021/" # Parameters Geom voxel_size = 0.3; # voxel size in nanometers (0.27 nm is ap...
37.860104
180
0.604215
import numpy as np import os HPC_toggle = False multi_run_folder_toggle = Falsedesktop_toggle = True date = "/20_8_2021/" voxel_size = 0.3; size_x= 401 size_y = 401 size_z = 1001 volume = size_x*size_y*size_z voxel_size_pm = int(voxel_size*1000) num_x = int(11) num_y = int(21) num_x_range = np.linspace(-(num_x-1)/...
true
true
1c0ec0f27fba6618c1a50664baddf97a36fd5f9b
4,961
py
Python
figures/controls/samples/sim_data/regression/experiment_3/sim_run_instance.py
OmnesRes/ATGC2
53ee01e60fc6f180b590f5acc5f083155581c96c
[ "MIT" ]
1
2021-04-15T16:13:27.000Z
2021-04-15T16:13:27.000Z
figures/controls/samples/sim_data/regression/experiment_3/sim_run_instance.py
OmnesRes/ATGC2
53ee01e60fc6f180b590f5acc5f083155581c96c
[ "MIT" ]
null
null
null
figures/controls/samples/sim_data/regression/experiment_3/sim_run_instance.py
OmnesRes/ATGC2
53ee01e60fc6f180b590f5acc5f083155581c96c
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from model.Instance_MIL import InstanceModels, RaggedModels from model import DatasetsUtils from sklearn.model_selection import StratifiedShuffleSplit import pickle physical_devices = tf.config.experimental.list_physical_devices('GPU') tf.config.experimental.set_memory_growth(...
52.221053
186
0.65128
import numpy as np import tensorflow as tf from model.Instance_MIL import InstanceModels, RaggedModels from model import DatasetsUtils from sklearn.model_selection import StratifiedShuffleSplit import pickle physical_devices = tf.config.experimental.list_physical_devices('GPU') tf.config.experimental.set_memory_growth(...
true
true
1c0ec1a7d280e793a31ce00368bb092dd3c8f690
1,370
py
Python
massdm.py
ksIsCute/MassDM
9989b658b961c8b78fa8dc2655d797ec0a8a505a
[ "MIT" ]
null
null
null
massdm.py
ksIsCute/MassDM
9989b658b961c8b78fa8dc2655d797ec0a8a505a
[ "MIT" ]
null
null
null
massdm.py
ksIsCute/MassDM
9989b658b961c8b78fa8dc2655d797ec0a8a505a
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import sys, time class colors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' RESET = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' print(colors.OKCYAN + """ ╔═╗╔═╦═══...
28.541667
80
0.524088
import discord from discord.ext import commands import sys, time class colors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' RESET = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' print(colors.OKCYAN + """ ╔═╗╔═╦═══...
true
true
1c0ec2ac1b4ec01c91cd909b8673e5393e50231d
29,964
py
Python
tensorflow/python/distribute/sharded_variable_test.py
mcx/tensorflow
d7e521a1ad21681855b439b9c2a05837c804e488
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/sharded_variable_test.py
mcx/tensorflow
d7e521a1ad21681855b439b9c2a05837c804e488
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/sharded_variable_test.py
mcx/tensorflow
d7e521a1ad21681855b439b9c2a05837c804e488
[ "Apache-2.0" ]
null
null
null
# 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 applica...
37.22236
84
0.663429
import os from absl.testing import parameterized import numpy as np from tensorflow.python.checkpoint import checkpoint as util from tensorflow.python.client import session as session_lib from tensorflow.python.compat import v2_compat from tensorflow.python.distribute import combinations from tensorflow.python.distri...
true
true
1c0ec4af3241a1a609e3ab06d1fce385c767ca73
3,592
py
Python
brick/app.py
madron/brick-iot
47b52a2f5fa9cf46e048fab773a58876fd984062
[ "MIT" ]
null
null
null
brick/app.py
madron/brick-iot
47b52a2f5fa9cf46e048fab773a58876fd984062
[ "MIT" ]
null
null
null
brick/app.py
madron/brick-iot
47b52a2f5fa9cf46e048fab773a58876fd984062
[ "MIT" ]
null
null
null
import sys import time import asyncio from brick import web from brick.component import FakeComponent from brick.config import ConfigManager from brick.device import DeviceManager from brick.hardware import HardwareManager from brick.logging import LogCollector, StdoutLogConsumer from brick.message import Dispatcher fr...
35.92
99
0.589365
import sys import time import asyncio from brick import web from brick.component import FakeComponent from brick.config import ConfigManager from brick.device import DeviceManager from brick.hardware import HardwareManager from brick.logging import LogCollector, StdoutLogConsumer from brick.message import Dispatcher fr...
true
true
1c0ec4b1d0634daab15f8b9ad9214a6dff74ce04
2,873
py
Python
platforms/c-rocm/schedule/standard/batch_matmul_v1.py
tonyw/antares
6c2c505ab73d25b2f40831898a10bbf09602a4a0
[ "MIT" ]
2
2020-12-19T17:40:41.000Z
2021-10-18T03:28:09.000Z
platforms/c-rocm/schedule/standard/batch_matmul_v1.py
tonyw/antares
6c2c505ab73d25b2f40831898a10bbf09602a4a0
[ "MIT" ]
null
null
null
platforms/c-rocm/schedule/standard/batch_matmul_v1.py
tonyw/antares
6c2c505ab73d25b2f40831898a10bbf09602a4a0
[ "MIT" ]
1
2021-01-15T22:18:47.000Z
2021-01-15T22:18:47.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import numpy as np from tvm import te import logging import sys, time, subprocess import json import os def schedule(attrs): cfg, s, output = attrs.auto_config, attrs.scheduler, attrs.outputs[0] th_vals, rd_vals = [attrs.get_extent(x)...
30.56383
122
0.590672
import numpy as np from tvm import te import logging import sys, time, subprocess import json import os def schedule(attrs): cfg, s, output = attrs.auto_config, attrs.scheduler, attrs.outputs[0] th_vals, rd_vals = [attrs.get_extent(x) for x in output.op.axis], [attrs.get_extent(x) for x in output.op.reduce...
true
true
1c0ec5b336afcb6cafb6f501c1accb8ffaea5da3
8,568
py
Python
xarrayutils/plotting.py
hogikyan/xarrayutils
a0c583113665882e70fce8590a90a5b2fff176c3
[ "MIT" ]
null
null
null
xarrayutils/plotting.py
hogikyan/xarrayutils
a0c583113665882e70fce8590a90a5b2fff176c3
[ "MIT" ]
null
null
null
xarrayutils/plotting.py
hogikyan/xarrayutils
a0c583113665882e70fce8590a90a5b2fff176c3
[ "MIT" ]
null
null
null
import numpy as np import xarray as xr import matplotlib.pyplot as plt import gsw def center_lim(ax, which='y'): if which == 'y': lim = np.array(ax.get_ylim()) ax.set_ylim(np.array([-1, 1]) * abs(lim).max()) elif which == 'x': lim = np.array(ax.get_xlim()) ax.set_xlim(np.array(...
32.332075
79
0.564659
import numpy as np import xarray as xr import matplotlib.pyplot as plt import gsw def center_lim(ax, which='y'): if which == 'y': lim = np.array(ax.get_ylim()) ax.set_ylim(np.array([-1, 1]) * abs(lim).max()) elif which == 'x': lim = np.array(ax.get_xlim()) ax.set_xlim(np.array(...
true
true
1c0ec5ef25be10507a4ccb14410898a25578d6f8
27,245
py
Python
pymkv/MKVFile.py
GoldbergData/pymkv
6d5cc299c1eb14f6e2db980bef222f09a6df6f3a
[ "MIT" ]
null
null
null
pymkv/MKVFile.py
GoldbergData/pymkv
6d5cc299c1eb14f6e2db980bef222f09a6df6f3a
[ "MIT" ]
null
null
null
pymkv/MKVFile.py
GoldbergData/pymkv
6d5cc299c1eb14f6e2db980bef222f09a6df6f3a
[ "MIT" ]
null
null
null
# sheldon woodward # 2/25/2018 """MKVFile Class""" import json from os import devnull from os.path import expanduser, isfile import subprocess as sp import bitmath from pymkv.MKVTrack import MKVTrack from pymkv.MKVAttachment import MKVAttachment from pymkv.Timestamp import Timestamp from pymkv.ISO639_2 import ISO63...
41.217852
118
0.593503
import json from os import devnull from os.path import expanduser, isfile import subprocess as sp import bitmath from pymkv.MKVTrack import MKVTrack from pymkv.MKVAttachment import MKVAttachment from pymkv.Timestamp import Timestamp from pymkv.ISO639_2 import ISO639_2 as LANGUAGES from pymkv.Verifications import ve...
true
true
1c0ec6376ecc79aa1fcce72e0793b31ba923da97
886
py
Python
answer/0094/94.linningmii.py
linningmii/leetcode
c3852252cc375778ee52669caacbfbbee50c1648
[ "MIT" ]
15
2018-12-05T09:34:24.000Z
2022-01-30T15:47:58.000Z
answer/0094/94.linningmii.py
linningmii/leetcode
c3852252cc375778ee52669caacbfbbee50c1648
[ "MIT" ]
7
2018-12-20T04:55:27.000Z
2019-01-17T01:57:45.000Z
answer/0094/94.linningmii.py
linningmii/leetcode
c3852252cc375778ee52669caacbfbbee50c1648
[ "MIT" ]
6
2018-12-05T08:43:45.000Z
2019-05-06T01:25:24.000Z
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def inorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ result = [] ...
23.945946
50
0.462754
class Solution: def inorderTraversal(self, root): result = [] cur_node = root stack = [] still_has_node = True while still_has_node: if cur_node is None: if len(stack) == 0: still_has_node = False contin...
true
true
1c0ec6b053c41896bb28ed203475ab496dcfa80b
2,820
py
Python
bot.py
howtoosee/MooVieGo
203dd454f4e7d5adbb615379febd3b1e5db8f149
[ "MIT" ]
null
null
null
bot.py
howtoosee/MooVieGo
203dd454f4e7d5adbb615379febd3b1e5db8f149
[ "MIT" ]
null
null
null
bot.py
howtoosee/MooVieGo
203dd454f4e7d5adbb615379febd3b1e5db8f149
[ "MIT" ]
null
null
null
import telebot from telebot.types import ReplyKeyboardRemove, ReplyKeyboardMarkup from load_env import load_env from search import custom_search # Bot Settings env = load_env() TOKEN = env['TELE_TOKEN'] bot = telebot.TeleBot(TOKEN) # UI inputs hideBoard = ReplyKeyboardRemove() # function to hide inline keyboard lis...
30
102
0.660638
import telebot from telebot.types import ReplyKeyboardRemove, ReplyKeyboardMarkup from load_env import load_env from search import custom_search env = load_env() TOKEN = env['TELE_TOKEN'] bot = telebot.TeleBot(TOKEN) hideBoard = ReplyKeyboardRemove() list_of_commands = [] @bot.message_handler(commands=['start']) ...
true
true
1c0ec74aaceee64a2c2fe2005f6ef9f56947f67b
2,155
py
Python
inference.py
rluver/ocr_attention_tensorflow
448876d809bd6f80d7fae00ebdbbc9222046ddb4
[ "MIT" ]
null
null
null
inference.py
rluver/ocr_attention_tensorflow
448876d809bd6f80d7fae00ebdbbc9222046ddb4
[ "MIT" ]
null
null
null
inference.py
rluver/ocr_attention_tensorflow
448876d809bd6f80d7fae00ebdbbc9222046ddb4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Jul 31 23:13:26 2021 @author: MJH """ import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from model import OCR_Attention from auxiliary import decode_batch_predictions, encode_single_sample from tensorflow.keras.models import Model class OCR: ...
26.9375
93
0.562877
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from model import OCR_Attention from auxiliary import decode_batch_predictions, encode_single_sample from tensorflow.keras.models import Model class OCR: def __init__(self, config_path, model_path, max_length): with open(con...
true
true
1c0ec83f5831ac9be6014f0dec6f610c52e6fbd1
12,050
py
Python
cms/tests/toolbar.py
jinktv/django-cms
d8c689957f0d098a106829e896e0c91d0c1abd86
[ "BSD-3-Clause" ]
null
null
null
cms/tests/toolbar.py
jinktv/django-cms
d8c689957f0d098a106829e896e0c91d0c1abd86
[ "BSD-3-Clause" ]
1
2021-03-19T15:46:42.000Z
2021-03-19T15:46:42.000Z
cms/tests/toolbar.py
jinktv/django-cms
d8c689957f0d098a106829e896e0c91d0c1abd86
[ "BSD-3-Clause" ]
1
2016-11-07T01:42:14.000Z
2016-11-07T01:42:14.000Z
from __future__ import with_statement from cms.api import create_page from cms.cms_toolbar import CMSToolbar from cms.test_utils.testcases import SettingsOverrideTestCase from cms.test_utils.util.context_managers import SettingsOverride from cms.toolbar.items import (Anchor, TemplateHTML, Switcher, List, ListItem, ...
38.375796
98
0.647303
from __future__ import with_statement from cms.api import create_page from cms.cms_toolbar import CMSToolbar from cms.test_utils.testcases import SettingsOverrideTestCase from cms.test_utils.util.context_managers import SettingsOverride from cms.toolbar.items import (Anchor, TemplateHTML, Switcher, List, ListItem, ...
true
true
1c0ec85e03e4291df52aef13b6a8f5908430161c
8,347
py
Python
apps/markets/models.py
uktrade/enav-alpha
8d38f05763367ca6b6747203241f267612fd6e44
[ "MIT" ]
null
null
null
apps/markets/models.py
uktrade/enav-alpha
8d38f05763367ca6b6747203241f267612fd6e44
[ "MIT" ]
67
2016-07-11T12:57:58.000Z
2016-08-08T12:59:19.000Z
apps/markets/models.py
UKTradeInvestment/enav-alpha
8d38f05763367ca6b6747203241f267612fd6e44
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import base64 import datetime from django.db import models from django.utils import timezone from ckeditor.fields import RichTextField # SAMPLE DATA PLATFORM_BRAND_POSITION = ( ('0', 'Luxury'), ('1', 'mid'), ('2', 'discount') ) # SAMPLE DATA # Pulled from https://...
41.944724
102
0.727207
from __future__ import unicode_literals import base64 import datetime from django.db import models from django.utils import timezone from ckeditor.fields import RichTextField PLATFORM_BRAND_POSITION = ( ('0', 'Luxury'), ('1', 'mid'), ('2', 'discount') ) LISTING_LANGUAGES = ( ('0', 'English (eng)'), ...
true
true
1c0ec8f9d6984de099362b0a85c12caad17a6e87
116
py
Python
main.py
dz1domin/tictactoe
671eeaecb6e6c8434b2db5595d15fbcd28e90f49
[ "MIT" ]
null
null
null
main.py
dz1domin/tictactoe
671eeaecb6e6c8434b2db5595d15fbcd28e90f49
[ "MIT" ]
null
null
null
main.py
dz1domin/tictactoe
671eeaecb6e6c8434b2db5595d15fbcd28e90f49
[ "MIT" ]
null
null
null
from game import Game def main(): game = Game() game.start_game() if __name__ == '__main__': main()
10.545455
26
0.594828
from game import Game def main(): game = Game() game.start_game() if __name__ == '__main__': main()
true
true
1c0ec9742fc356111b259dbfe74045df501d70de
836
py
Python
corona_data_collector/gps_generator.py
tkarady/avid-covider-pipelines
43944410092ebab24e821b385de3735b757f0062
[ "MIT" ]
null
null
null
corona_data_collector/gps_generator.py
tkarady/avid-covider-pipelines
43944410092ebab24e821b385de3735b757f0062
[ "MIT" ]
20
2020-04-16T16:26:07.000Z
2020-10-08T07:52:27.000Z
corona_data_collector/gps_generator.py
tkarady/avid-covider-pipelines
43944410092ebab24e821b385de3735b757f0062
[ "MIT" ]
5
2020-04-16T16:36:35.000Z
2020-10-03T12:48:05.000Z
from corona_data_collector.config import gps_url, gps_url_key import requests NOT_FOUND = -1 FROM_WEB = 0 FROM_LIST = 1 def get_coords_from_web(street, city): street_accurate = street != city response = requests.get(f'{gps_url}?key={gps_url_key}&address={street} {city}') if response.status_code == 200: ...
34.833333
87
0.642344
from corona_data_collector.config import gps_url, gps_url_key import requests NOT_FOUND = -1 FROM_WEB = 0 FROM_LIST = 1 def get_coords_from_web(street, city): street_accurate = street != city response = requests.get(f'{gps_url}?key={gps_url_key}&address={street} {city}') if response.status_code == 200: ...
true
true
1c0ec9c8ed4d868ce3842d1b7faabc2e899b3524
2,358
py
Python
tests/test_simple.py
estevaoreis25/lispy
a1ae65d5862bc9f8a32940e9a9d50d4664f66a26
[ "MIT" ]
5
2019-11-01T20:07:50.000Z
2020-10-06T17:40:47.000Z
tests/test_simple.py
estevaoreis25/lispy
a1ae65d5862bc9f8a32940e9a9d50d4664f66a26
[ "MIT" ]
5
2019-10-28T20:16:51.000Z
2019-10-28T20:51:55.000Z
tests/test_simple.py
GabrielTiveron/lispy
12cc0a382151be75249e152e52ead2cb34d38ac4
[ "MIT" ]
34
2019-10-22T17:25:53.000Z
2020-10-06T17:40:41.000Z
from lispy import var, env, Symbol, parse, eval, global_env run = lambda src, env=None: eval(parse(src), env) x, y, a, b, c, f, g, h, op = map(Symbol, 'x y a b c f g h op'.split()) class TestLispGrammar: def test_numbers(self): assert parse('42') == 42 assert parse('3.14') == 3.14 assert ...
31.44
70
0.52799
from lispy import var, env, Symbol, parse, eval, global_env run = lambda src, env=None: eval(parse(src), env) x, y, a, b, c, f, g, h, op = map(Symbol, 'x y a b c f g h op'.split()) class TestLispGrammar: def test_numbers(self): assert parse('42') == 42 assert parse('3.14') == 3.14 assert ...
true
true
1c0ec9ed5bf451bf5198d4a77a34d7d06d870d5e
644
py
Python
hamdan_topics/src/message_publisher.py
hamdan321m/Final
16211900503ee47537df5debae6dc112a232cb7a
[ "Apache-2.0" ]
null
null
null
hamdan_topics/src/message_publisher.py
hamdan321m/Final
16211900503ee47537df5debae6dc112a232cb7a
[ "Apache-2.0" ]
null
null
null
hamdan_topics/src/message_publisher.py
hamdan321m/Final
16211900503ee47537df5debae6dc112a232cb7a
[ "Apache-2.0" ]
1
2020-05-11T02:56:21.000Z
2020-05-11T02:56:21.000Z
#!/usr/bin/env python import rospy from hamdan_topics.msg import Complex # custom message type from random import random # for random numbers! rospy.init_node('message_publisher') # initialize node pub = rospy.Publisher( # register topic 'complex', # topic name Complex, # custom mes...
29.272727
59
0.645963
import rospy from hamdan_topics.msg import Complex from random import random rospy.init_node('message_publisher') pub = rospy.Publisher( 'complex', Complex, queue_size=3 ) rate = rospy.Rate(2) while not rospy.is_shutdown(): msg = Complex() msg.real = ran...
true
true
1c0ecbdf8df964bf3ca4d989481abd7aa7a71ccd
1,866
py
Python
aliyun-python-sdk-sgw/aliyunsdksgw/request/v20180511/RemoveSharesFromExpressSyncRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-sgw/aliyunsdksgw/request/v20180511/RemoveSharesFromExpressSyncRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-sgw/aliyunsdksgw/request/v20180511/RemoveSharesFromExpressSyncRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# 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 # "License"); you may not u...
37.32
90
0.775991
from aliyunsdkcore.request import RpcRequest from aliyunsdksgw.endpoint import endpoint_data class RemoveSharesFromExpressSyncRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'sgw', '2018-05-11', 'RemoveSharesFromExpressSync','hcs_sgw') self.set_method('POST') if hasattr(self, "endpoint_map...
true
true
1c0ecd088765327fe8247014e09342150c5894e0
124
py
Python
torch/cuda/amp/__init__.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
60,067
2017-01-18T17:21:31.000Z
2022-03-31T21:37:45.000Z
torch/cuda/amp/__init__.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
66,955
2017-01-18T17:21:38.000Z
2022-03-31T23:56:11.000Z
torch/cuda/amp/__init__.py
Hacky-DH/pytorch
80dc4be615854570aa39a7e36495897d8a040ecc
[ "Intel" ]
19,210
2017-01-18T17:45:04.000Z
2022-03-31T23:51:56.000Z
from .autocast_mode import autocast, custom_fwd, custom_bwd # noqa: F401 from .grad_scaler import GradScaler # noqa: F401
41.333333
73
0.790323
from .autocast_mode import autocast, custom_fwd, custom_bwd from .grad_scaler import GradScaler
true
true
1c0ecdd9f19a9353d2d98ec89fdc6e412d0af2ed
1,427
py
Python
working-with-data/part2/merge-on-index.py
LucasHelal/data-science
9b243be1dea23a521e6ebb49dc358708a9b17dbd
[ "MIT" ]
null
null
null
working-with-data/part2/merge-on-index.py
LucasHelal/data-science
9b243be1dea23a521e6ebb49dc358708a9b17dbd
[ "MIT" ]
null
null
null
working-with-data/part2/merge-on-index.py
LucasHelal/data-science
9b243be1dea23a521e6ebb49dc358708a9b17dbd
[ "MIT" ]
null
null
null
import pandas as pd from pandas import Series, DataFrame import numpy as np # Now we'll learn how to merge on an index # Lets get two dframes df_left = DataFrame({'key': ['X', 'Y', 'Z', 'X', 'Y'], 'data': range(5)}) df_right = DataFrame({'group_data': [10, 20]}, index=['X', 'Y']) # Now merge, we...
37.552632
79
0.602663
import pandas as pd from pandas import Series, DataFrame import numpy as np # Lets get two dframes df_left = DataFrame({'key': ['X', 'Y', 'Z', 'X', 'Y'], 'data': range(5)}) df_right = DataFrame({'group_data': [10, 20]}, index=['X', 'Y']) # Now merge, we'll use the key for the left Dframe, and th...
true
true
1c0ece7f2a97f750fbe54d40a0e88fbfaf1fe625
1,494
py
Python
users/models.py
D-GopalKrishna/RobotixWeb2021
3f99d41b2c4c99a3d1a214db1489f3e2fb1bfbb2
[ "Apache-2.0" ]
null
null
null
users/models.py
D-GopalKrishna/RobotixWeb2021
3f99d41b2c4c99a3d1a214db1489f3e2fb1bfbb2
[ "Apache-2.0" ]
7
2020-02-12T02:54:35.000Z
2022-03-12T00:06:26.000Z
users/models.py
D-GopalKrishna/RobotixWeb2021
3f99d41b2c4c99a3d1a214db1489f3e2fb1bfbb2
[ "Apache-2.0" ]
6
2020-02-10T16:37:38.000Z
2021-01-28T13:39:46.000Z
from django.db import models from django.contrib.auth.models import AbstractBaseUser,PermissionsMixin,BaseUserManager from roboPortal.models import portalUser # Create your models here. class UserProfileManager(BaseUserManager): def create_user(self,email,name,phone_no,password=None): if not email: ...
31.787234
88
0.702811
from django.db import models from django.contrib.auth.models import AbstractBaseUser,PermissionsMixin,BaseUserManager from roboPortal.models import portalUser class UserProfileManager(BaseUserManager): def create_user(self,email,name,phone_no,password=None): if not email: raise ValueError('Use...
true
true
1c0ecefe81f9408ecc4e15ac709c460d7c69e491
399
py
Python
secao04/01.multiprocessing_pool.py
ravellys/python-assync
58cc7f6534d85b7b426da90dc0b042d9e9deaf0a
[ "MIT" ]
null
null
null
secao04/01.multiprocessing_pool.py
ravellys/python-assync
58cc7f6534d85b7b426da90dc0b042d9e9deaf0a
[ "MIT" ]
null
null
null
secao04/01.multiprocessing_pool.py
ravellys/python-assync
58cc7f6534d85b7b426da90dc0b042d9e9deaf0a
[ "MIT" ]
null
null
null
from multiprocessing import Process, current_process print(f'1 - Iniciando o processo com nome: {current_process().name}') def faz_algo(valor): print(f'valor = {valor}') def main(): pc = Process(target=faz_algo, args=('Passaro', ), name='Processo interno') print(f'2 - Iniciando o processo com nome: {pc...
19.95
78
0.659148
from multiprocessing import Process, current_process print(f'1 - Iniciando o processo com nome: {current_process().name}') def faz_algo(valor): print(f'valor = {valor}') def main(): pc = Process(target=faz_algo, args=('Passaro', ), name='Processo interno') print(f'2 - Iniciando o processo com nome: {pc...
true
true
1c0ecf0d2193dc08d03ab9cf1656f5138426afb3
722,561
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/models/_models.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-05-12T23:29:15.000Z
2020-05-12T23:29:15.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/models/_models.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/models/_models.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
42.161337
174
0.674235
from msrest.serialization import Model from msrest.exceptions import HttpOperationError class AadAuthenticationParameters(Model): _attribute_map = { 'aad_tenant': {'key': 'aadTenant', 'type': 'str'}, 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, 'aad_issuer': {'key': 'aadIssuer'...
true
true
1c0ecf65c0d6bfda5cc006d6ce71a15e2afdc3c5
9,651
py
Python
tms_nw/tms_nw_api/scripts/tms_nw_api_server.py
robotpilot/ros_tms
3d6b6579e89aa9cb216cd3cb6157fabc553c18f1
[ "BSD-3-Clause" ]
54
2015-01-06T06:58:28.000Z
2021-05-02T07:49:37.000Z
tms_nw/tms_nw_api/scripts/tms_nw_api_server.py
robotpilot/ros_tms
3d6b6579e89aa9cb216cd3cb6157fabc553c18f1
[ "BSD-3-Clause" ]
114
2015-01-07T06:42:21.000Z
2022-02-12T05:54:04.000Z
tms_nw/tms_nw_api/scripts/tms_nw_api_server.py
robotpilot/ros_tms
3d6b6579e89aa9cb216cd3cb6157fabc553c18f1
[ "BSD-3-Clause" ]
24
2015-03-27T08:35:59.000Z
2020-06-08T13:05:31.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import rospy from tms_msg_db.msg import Tmsdb from tms_msg_db.srv import TmsdbGetData from tms_nw_api.srv import * from flask import Flask, jsonify, abort, make_response,request import os import json import requests from multiprocessing import Process, Manager host_url = os.get...
30.735669
154
0.516216
import rospy from tms_msg_db.msg import Tmsdb from tms_msg_db.srv import TmsdbGetData from tms_nw_api.srv import * from flask import Flask, jsonify, abort, make_response,request import os import json import requests from multiprocessing import Process, Manager host_url = os.getenv("ROS_HOSTNAME", "localhost") api = Fl...
false
true
1c0ed1385b7c9ce69af708b5ad66dec3b940d93e
2,871
py
Python
python/leetcode/008_string_to_integer.py
yxun/Notebook
680ae89a32d3f7d4fdcd541e66cea97e29efbd26
[ "Apache-2.0" ]
1
2021-10-04T13:26:32.000Z
2021-10-04T13:26:32.000Z
python/leetcode/008_string_to_integer.py
yxun/Notebook
680ae89a32d3f7d4fdcd541e66cea97e29efbd26
[ "Apache-2.0" ]
3
2020-03-24T19:34:42.000Z
2022-01-21T20:15:39.000Z
python/leetcode/008_string_to_integer.py
yxun/Notebook
680ae89a32d3f7d4fdcd541e66cea97e29efbd26
[ "Apache-2.0" ]
1
2021-04-01T20:56:50.000Z
2021-04-01T20:56:50.000Z
#%% ''' - String to Integer (atoi) - https://leetcode.com/problems/string-to-integer-atoi/ - Medium The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as m...
31.9
294
0.631139
class S: def myAtoi(self, str): str = str.strip() strNum = 0 if len(str) == 0: return strNum positive = True if str[0] == '+' or str[0] == '-': if str[0] == '-': positive = False str = s...
true
true
1c0ed13f1d2478e705bfafd6d109e454645ab0fe
1,313
py
Python
muvi/core/index.py
MLO-lab/MuVI
98796ab6deab225adc3add75e20c4b51f842f529
[ "BSD-3-Clause" ]
1
2022-03-09T18:19:21.000Z
2022-03-09T18:19:21.000Z
muvi/core/index.py
MLO-lab/MuVI
98796ab6deab225adc3add75e20c4b51f842f529
[ "BSD-3-Clause" ]
null
null
null
muvi/core/index.py
MLO-lab/MuVI
98796ab6deab225adc3add75e20c4b51f842f529
[ "BSD-3-Clause" ]
null
null
null
import numpy as np def _normalize_index(indexer, index, as_idx=True): # work with ints, convert at the end # if single str, get idx and put to list # TODO: can be an issue if any of the indices is named 'all'.. if isinstance(indexer, str): if indexer == "all": indexer = range(len(i...
35.486486
66
0.618431
import numpy as np def _normalize_index(indexer, index, as_idx=True): if isinstance(indexer, str): if indexer == "all": indexer = range(len(index)) else: indexer = [index.get_loc(indexer)] if isinstance(indexer, (np.integer, int)): indexer = [ind...
true
true
1c0ed1a3eaf6fe097898c4aeae6f30387b43cf34
24,453
py
Python
GroundedScan/gym_minigrid/minigrid.py
czlwang/groundedSCAN
3d03ac6de37dde8d22d487dc3cc5a53af188fa2e
[ "MIT" ]
null
null
null
GroundedScan/gym_minigrid/minigrid.py
czlwang/groundedSCAN
3d03ac6de37dde8d22d487dc3cc5a53af188fa2e
[ "MIT" ]
null
null
null
GroundedScan/gym_minigrid/minigrid.py
czlwang/groundedSCAN
3d03ac6de37dde8d22d487dc3cc5a53af188fa2e
[ "MIT" ]
null
null
null
import math import gym from enum import IntEnum import numpy as np from gym import spaces from gym.utils import seeding # Size in pixels of a cell in the full-scale human view CELL_PIXELS = 60 # Map of color names to RGB values COLORS = { 'red': np.array([128, 0, 0]), 'green': np.array([46, 139, 87]), 'bl...
30.077491
125
0.546068
import math import gym from enum import IntEnum import numpy as np from gym import spaces from gym.utils import seeding CELL_PIXELS = 60 COLORS = { 'red': np.array([128, 0, 0]), 'green': np.array([46, 139, 87]), 'blue': np.array([25, 25, 112]), 'purple': np.array([112, 39, 195]), 'yellow': np.arra...
true
true
1c0ed22ab99af8d137fd04a99232773b91a5334c
644
py
Python
echowebserver/echowebserver.py
marcdurocher/echowebserver
0a29aa017d7c3f78020445d316f11f9f56d5f98e
[ "MIT" ]
null
null
null
echowebserver/echowebserver.py
marcdurocher/echowebserver
0a29aa017d7c3f78020445d316f11f9f56d5f98e
[ "MIT" ]
null
null
null
echowebserver/echowebserver.py
marcdurocher/echowebserver
0a29aa017d7c3f78020445d316f11f9f56d5f98e
[ "MIT" ]
null
null
null
""" EchoWebServer : A HTTP server that echoes POST body requests __author__ = Marc Durocher """ import tornado.ioloop import tornado.web import logging class MainHandler(tornado.web.RequestHandler): def get(self): self.write("GET : OK\n") def post(self): self.write("POST: OK\n") lo...
18.941176
60
0.656832
import tornado.ioloop import tornado.web import logging class MainHandler(tornado.web.RequestHandler): def get(self): self.write("GET : OK\n") def post(self): self.write("POST: OK\n") logger.info(str(self.request.body)) def make_app(): return tornado.web.Application([ ...
true
true
1c0ed3a81f9f6931daca224a979df706927f54cf
666
py
Python
tests/encoders/text/torch_transformers/test_torch_transformers.py
zeta1999/vectorhub
e9b23ac66bd170dd9d6639c3abffde3026d0935e
[ "Apache-2.0" ]
1
2020-11-04T16:02:39.000Z
2020-11-04T16:02:39.000Z
tests/encoders/text/torch_transformers/test_torch_transformers.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
null
null
null
tests/encoders/text/torch_transformers/test_torch_transformers.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
1
2020-12-03T14:31:14.000Z
2020-12-03T14:31:14.000Z
""" Testing for Transformers with Torch requirement """ import pytest from vectorhub.encoders.text.torch_transformers import Transformer2Vec MODEL_LIST = [ "bert-base-uncased", "distilbert-base-uncased", "facebook/bart-base" ] @pytest.mark.parametrize("model_name", MODEL_LIST) def test_torch_transfo...
27.75
70
0.737237
import pytest from vectorhub.encoders.text.torch_transformers import Transformer2Vec MODEL_LIST = [ "bert-base-uncased", "distilbert-base-uncased", "facebook/bart-base" ] @pytest.mark.parametrize("model_name", MODEL_LIST) def test_torch_transformer_encode(model_name): model = Transformer2Vec(model_n...
true
true
1c0ed489ac5f25b323662fd048408f1de4045306
3,159
py
Python
pygmm/akkar_sandikkaya_bommer_2014.py
arkottke/pygmm
e3b37ea3f81ffb847e040292c6731e36627ac9aa
[ "MIT" ]
15
2016-03-29T05:01:09.000Z
2022-02-09T08:26:07.000Z
pygmm/akkar_sandikkaya_bommer_2014.py
arkottke/pygmm
e3b37ea3f81ffb847e040292c6731e36627ac9aa
[ "MIT" ]
3
2016-03-29T05:12:28.000Z
2017-08-18T21:49:34.000Z
pygmm/akkar_sandikkaya_bommer_2014.py
arkottke/pygmm
e3b37ea3f81ffb847e040292c6731e36627ac9aa
[ "MIT" ]
13
2016-03-29T05:18:39.000Z
2022-01-26T03:37:08.000Z
# -*- coding: utf-8 -*- """Akkar, Sandikkaya, & Bommer (2014, :cite:`akkar14`) model.""" import collections import numpy as np from . import model __author__ = "Albert Kottke" class AkkarSandikkayaBommer2014(model.GroundMotionModel): """Akkar, Sandikkaya, & Bommer (2014, :cite:`akkar14`) model. The model ...
30.669903
87
0.574549
import collections import numpy as np from . import model __author__ = "Albert Kottke" class AkkarSandikkayaBommer2014(model.GroundMotionModel): NAME = "Akkar, Sandikkaya, & Bommer (2014)" ABBREV = "ASB14" V_REF = 750.0 COEFF = collections.OrderedDict( (k, model.load_data_file("a...
true
true
1c0ed49487f416afac41881644139308f44b8dda
114
py
Python
launcher.py
a2mky/boatbot
3df77c7c76027213dae26a7900a7eaf5e3b4a8dd
[ "MIT" ]
null
null
null
launcher.py
a2mky/boatbot
3df77c7c76027213dae26a7900a7eaf5e3b4a8dd
[ "MIT" ]
null
null
null
launcher.py
a2mky/boatbot
3df77c7c76027213dae26a7900a7eaf5e3b4a8dd
[ "MIT" ]
null
null
null
import assets import sys try: message('Starting Boat Bot!') start() except: error('Starting Bot') sys.exit()
11.4
30
0.701754
import assets import sys try: message('Starting Boat Bot!') start() except: error('Starting Bot') sys.exit()
true
true
1c0ed55be18bfc1ebfdf9673fbd08d317b50188a
23,604
py
Python
src/boilerdaq.py
blakeNaccarato/boilerdaq
bc39074237c42d94c5402327495f05ff662e7a35
[ "MIT" ]
null
null
null
src/boilerdaq.py
blakeNaccarato/boilerdaq
bc39074237c42d94c5402327495f05ff662e7a35
[ "MIT" ]
null
null
null
src/boilerdaq.py
blakeNaccarato/boilerdaq
bc39074237c42d94c5402327495f05ff662e7a35
[ "MIT" ]
null
null
null
"""Data acquisition and control of a boiler.""" from __future__ import annotations import os from collections import OrderedDict, deque from csv import DictReader, DictWriter from datetime import datetime, timedelta from os.path import splitext from threading import Thread from time import sleep from typing import De...
28.507246
88
0.574225
from __future__ import annotations import os from collections import OrderedDict, deque from csv import DictReader, DictWriter from datetime import datetime, timedelta from os.path import splitext from threading import Thread from time import sleep from typing import Deque, List, NamedTuple, Optional, Tuple import p...
true
true
1c0ed6062cfb31e539f30cc98edfe02b576d244f
11,563
py
Python
parser/decoder.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
2
2021-09-09T11:02:18.000Z
2021-10-04T12:18:16.000Z
parser/decoder.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
null
null
null
parser/decoder.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
null
null
null
import torch from torch import nn import torch.nn.functional as F from torch.nn import Parameter from parser.data import NIL, PAD from parser.utils import compute_f_by_tensor from parser.transformer import MultiheadAttention, Transformer, TiedTransformer from parser.utils import label_smoothed_nll_loss class ArcGene...
47.780992
120
0.610655
import torch from torch import nn import torch.nn.functional as F from torch.nn import Parameter from parser.data import NIL, PAD from parser.utils import compute_f_by_tensor from parser.transformer import MultiheadAttention, Transformer, TiedTransformer from parser.utils import label_smoothed_nll_loss class ArcGene...
true
true
1c0ed6d04bbdafb9df77a48c283aebb6117fc8e1
1,115
py
Python
test/utils/test_getitem.py
beyucel/gpytorch
a5394937495756945b831d83035349579d8fac31
[ "MIT" ]
2
2019-04-19T00:35:49.000Z
2019-04-19T02:51:49.000Z
test/utils/test_getitem.py
beyucel/gpytorch
a5394937495756945b831d83035349579d8fac31
[ "MIT" ]
null
null
null
test/utils/test_getitem.py
beyucel/gpytorch
a5394937495756945b831d83035349579d8fac31
[ "MIT" ]
1
2019-05-10T17:52:39.000Z
2019-05-10T17:52:39.000Z
#!/usr/bin/env python3 import torch import unittest from itertools import product from gpytorch.utils.getitem import _compute_getitem_size, _convert_indices_to_tensors class TestGetitem(unittest.TestCase): def test_compute_getitem_size(self): a = torch.tensor(0.).expand(5, 5, 5, 5, 5) for indice...
35.967742
97
0.6287
import torch import unittest from itertools import product from gpytorch.utils.getitem import _compute_getitem_size, _convert_indices_to_tensors class TestGetitem(unittest.TestCase): def test_compute_getitem_size(self): a = torch.tensor(0.).expand(5, 5, 5, 5, 5) for indices in product( ...
true
true
1c0ed6dd032c47d4892dc5b85220212a2934a039
13,428
py
Python
cogs/calculators.py
zedchance/blues_bot.py
ab2183739f04d927865d12a7f3d1c79c5fa62c8e
[ "MIT" ]
5
2020-01-05T18:53:20.000Z
2022-03-19T13:01:24.000Z
cogs/calculators.py
zedchance/blues_bot.py
ab2183739f04d927865d12a7f3d1c79c5fa62c8e
[ "MIT" ]
22
2019-10-27T00:56:30.000Z
2021-07-13T16:42:24.000Z
cogs/calculators.py
zedchance/blues_bot.py
ab2183739f04d927865d12a7f3d1c79c5fa62c8e
[ "MIT" ]
11
2020-01-05T18:53:22.000Z
2022-03-30T22:20:13.000Z
import discord from discord.ext import commands from calcs.agility import Agility from calcs.alchemy import Alchemy from calcs.experience import next_level_string from calcs.pickpocket import Pickpocket from calcs.tasks import Tasks from calcs.wines import Wines from calcs.wintertodt import Wintertodt from calcs.zeah ...
55.259259
116
0.550268
import discord from discord.ext import commands from calcs.agility import Agility from calcs.alchemy import Alchemy from calcs.experience import next_level_string from calcs.pickpocket import Pickpocket from calcs.tasks import Tasks from calcs.wines import Wines from calcs.wintertodt import Wintertodt from calcs.zeah ...
true
true
1c0ed6eafcb110b7a280a9576e603e7394d02d79
1,880
py
Python
electrum/plot.py
sugarchain-dev/electrum-sugar
5c70bfa883950bb501625916a888618792cd635b
[ "MIT" ]
3
2019-09-13T12:49:22.000Z
2021-03-15T22:12:11.000Z
electrum/plot.py
sugarchain-dev/electrum-sugar
5c70bfa883950bb501625916a888618792cd635b
[ "MIT" ]
4
2019-09-13T12:07:33.000Z
2020-05-05T09:36:37.000Z
electrum/plot.py
sugarchain-dev/electrum-sugar
5c70bfa883950bb501625916a888618792cd635b
[ "MIT" ]
4
2019-09-16T04:30:09.000Z
2020-04-24T08:34:02.000Z
import datetime from collections import defaultdict import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import matplotlib.dates as md from .i18n import _ from .bitcoin import COIN class NothingToPlotException(Exception): def __str__(self): return _("Nothing to plot.") def plot_h...
29.375
76
0.634043
import datetime from collections import defaultdict import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import matplotlib.dates as md from .i18n import _ from .bitcoin import COIN class NothingToPlotException(Exception): def __str__(self): return _("Nothing to plot.") def plot_h...
true
true
1c0ed732b51192fb755836e74859f42e1f6da4e2
22,581
py
Python
misc/python/materialize/mzcompose/services.py
necaris/materialize
71bf985d6b8b974abce46841ce638aaef4a08d0f
[ "MIT" ]
null
null
null
misc/python/materialize/mzcompose/services.py
necaris/materialize
71bf985d6b8b974abce46841ce638aaef4a08d0f
[ "MIT" ]
null
null
null
misc/python/materialize/mzcompose/services.py
necaris/materialize
71bf985d6b8b974abce46841ce638aaef4a08d0f
[ "MIT" ]
null
null
null
# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software...
32.773585
138
0.543111
import os import random from typing import Dict, List, Optional, Tuple, Union from materialize.mzcompose import Service, ServiceConfig DEFAULT_CONFLUENT_PLATFORM_VERSION = "7.0.3" DEFAULT_DEBEZIUM_VERSION = "1.9" LINT_DEBEZIUM_VERSIONS = ["1.4", "1.5", "1.6"] DEFAULT_MZ_VOLUMES = [ "mzdata:/mzdata", "pgdata...
true
true
1c0ed77761974fb3ecb754c7e230bcf2fa02772e
2,035
py
Python
pyvotca/parsers/parser.py
gtirimbo/PyVOTCA
fc73e73943c7913d3b22906dbf892d6da56ea87b
[ "Apache-2.0" ]
1
2021-05-07T03:27:31.000Z
2021-05-07T03:27:31.000Z
pyvotca/parsers/parser.py
gtirimbo/PyVOTCA
fc73e73943c7913d3b22906dbf892d6da56ea87b
[ "Apache-2.0" ]
28
2021-01-21T12:17:54.000Z
2021-02-26T10:55:14.000Z
pyvotca/parsers/parser.py
gtirimbo/PyVOTCA
fc73e73943c7913d3b22906dbf892d6da56ea87b
[ "Apache-2.0" ]
1
2021-02-01T08:18:25.000Z
2021-02-01T08:18:25.000Z
"""General utilities to parse both input/out files.""" __all__ = ['any_char', 'integer', 'natural', 'parse_file', 'parse_section', 'skipany_char', 'skip_line', 'skip_supress', 'try_search_pattern'] import re from pathlib import Path from typing import Optional as Optional_ from typing import Union from ...
28.263889
88
0.627027
__all__ = ['any_char', 'integer', 'natural', 'parse_file', 'parse_section', 'skipany_char', 'skip_line', 'skip_supress', 'try_search_pattern'] import re from pathlib import Path from typing import Optional as Optional_ from typing import Union from pyparsing import (Combine, Literal, Optional, ...
true
true
1c0ed97d20aab17b0480523faf7c2b49f03a6e4b
692
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractWwwWownovelCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractWwwWownovelCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractWwwWownovelCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractWwwWownovelCom(item): ''' Parser for 'www.wownovel.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('i work hard every day to make my husband bankrupt', 'I Work Hard Every Da...
32.952381
150
0.624277
def extractWwwWownovelCom(item): vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('i work hard every day to make my husband bankrupt', 'I Work Hard Every Day To Make My Husband Bankrupt', ...
true
true
1c0ed9ccc2fc29ef493a8cefda40921f1d397153
35,233
py
Python
src/models/rnn_with_chunk_sw_tagger.py
tchayintr/thwcc-attn
4ee38365eb338e82bf455f46ff5fe7c59fb7a975
[ "MIT" ]
4
2021-11-23T14:52:38.000Z
2022-02-19T08:29:44.000Z
src/models/rnn_with_chunk_sw_tagger.py
tchayintr/thwcc-attn
4ee38365eb338e82bf455f46ff5fe7c59fb7a975
[ "MIT" ]
null
null
null
src/models/rnn_with_chunk_sw_tagger.py
tchayintr/thwcc-attn
4ee38365eb338e82bf455f46ff5fe7c59fb7a975
[ "MIT" ]
1
2022-02-17T04:17:29.000Z
2022-02-17T04:17:29.000Z
from allennlp.modules.conditional_random_field import ConditionalRandomField from allennlp.nn.util import get_mask_from_sequence_lengths import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pad_sequence import sys import constants import models.util from...
40.544304
104
0.520166
from allennlp.modules.conditional_random_field import ConditionalRandomField from allennlp.nn.util import get_mask_from_sequence_lengths import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pad_sequence import sys import constants import models.util from...
true
true
1c0edd3f5fa7c22fdda41d01f7161f9874bcf1eb
120
py
Python
dit_helpdesk/countries/migrations/__init__.py
uktrade/dit-helpdesk
f5127daa46e920d33ec3f0b982136b65bba0353a
[ "MIT" ]
3
2019-10-24T10:39:38.000Z
2021-07-13T11:46:18.000Z
dit_helpdesk/countries/migrations/__init__.py
uktrade/dit-helpdesk
f5127daa46e920d33ec3f0b982136b65bba0353a
[ "MIT" ]
20
2020-01-22T11:16:24.000Z
2022-02-02T10:38:54.000Z
dit_helpdesk/countries/migrations/__init__.py
uktrade/dit-helpdesk
f5127daa46e920d33ec3f0b982136b65bba0353a
[ "MIT" ]
null
null
null
import os MIGRATIONS_DIR = os.path.dirname(os.path.realpath(__file__)) DATA_DIR = os.path.join(MIGRATIONS_DIR, "data")
24
60
0.775
import os MIGRATIONS_DIR = os.path.dirname(os.path.realpath(__file__)) DATA_DIR = os.path.join(MIGRATIONS_DIR, "data")
true
true
1c0edecbd0cbad2630a1c0c270e535bcce83cebe
1,549
py
Python
VisionEngine/utils/eval.py
ietheredge/VisionEngine
271c8dcaef6eb574e9047fca436d7b13cab75d3b
[ "MIT" ]
4
2020-09-29T14:17:25.000Z
2022-03-05T18:04:33.000Z
VisionEngine/utils/eval.py
ietheredge/VisionEngine
271c8dcaef6eb574e9047fca436d7b13cab75d3b
[ "MIT" ]
null
null
null
VisionEngine/utils/eval.py
ietheredge/VisionEngine
271c8dcaef6eb574e9047fca436d7b13cab75d3b
[ "MIT" ]
1
2022-03-07T17:38:30.000Z
2022-03-07T17:38:30.000Z
import tensorflow as tf import math def embed_images(x, model): outputs = [ model.model.get_layer("variational_layer").output, model.model.get_layer("variational_layer_1").output, model.model.get_layer("variational_layer_2").output, model.model.get_layer("variational_layer_3").outp...
31.612245
74
0.671401
import tensorflow as tf import math def embed_images(x, model): outputs = [ model.model.get_layer("variational_layer").output, model.model.get_layer("variational_layer_1").output, model.model.get_layer("variational_layer_2").output, model.model.get_layer("variational_layer_3").outp...
true
true
1c0edfb477cb804a4f45421359ba3c018ed1c58e
9,567
py
Python
annotater/memetext/api_views.py
stricoff92/annotater
8ca471477e2d567945e14f09d3d763d379e7587e
[ "MIT" ]
null
null
null
annotater/memetext/api_views.py
stricoff92/annotater
8ca471477e2d567945e14f09d3d763d379e7587e
[ "MIT" ]
null
null
null
annotater/memetext/api_views.py
stricoff92/annotater
8ca471477e2d567945e14f09d3d763d379e7587e
[ "MIT" ]
null
null
null
import datetime as dt from io import BytesIO import json import random from django.conf import settings from django.utils import timezone from django.shortcuts import get_object_or_404 from django.db.models import Q from rest_framework import status from rest_framework.response import Response from rest_framework.dec...
33.451049
97
0.687572
import datetime as dt from io import BytesIO import json import random from django.conf import settings from django.utils import timezone from django.shortcuts import get_object_or_404 from django.db.models import Q from rest_framework import status from rest_framework.response import Response from rest_framework.dec...
true
true
1c0edfe17a3b3bde2661afe9aa20dc16fcb45c06
10,737
py
Python
editing files/Portable Python 3.2.5.1/App/Lib/site-packages/IPython/frontend/qt/console/history_console_widget.py
mattl1598/testing
cd8124773b83a07301c507ffbb9ccaafbfe7a274
[ "Unlicense" ]
null
null
null
editing files/Portable Python 3.2.5.1/App/Lib/site-packages/IPython/frontend/qt/console/history_console_widget.py
mattl1598/testing
cd8124773b83a07301c507ffbb9ccaafbfe7a274
[ "Unlicense" ]
1
2018-04-15T22:59:15.000Z
2018-04-15T22:59:15.000Z
editing files/Portable Python 3.2.5.1/App/Lib/site-packages/IPython/frontend/qt/console/history_console_widget.py
mattl1598/Project-Mochachino
cd8124773b83a07301c507ffbb9ccaafbfe7a274
[ "Unlicense" ]
null
null
null
# System library imports from IPython.external.qt import QtGui # Local imports from IPython.utils.traitlets import Bool from .console_widget import ConsoleWidget class HistoryConsoleWidget(ConsoleWidget): """ A ConsoleWidget that keeps a history of the commands that have been executed and provides a read...
37.806338
92
0.543727
from IPython.external.qt import QtGui from IPython.utils.traitlets import Bool from .console_widget import ConsoleWidget class HistoryConsoleWidget(ConsoleWidget): history_lock = Bool(False, config=True) def __init__(self, *args, **kw): super(HistoryConsoleWidget, self...
true
true
1c0ee006249c96dbbd5cbc869cd0d616ea3037d9
1,440
py
Python
back/newdjangosite/wsgi.py
kbarnes3/BaseDjangoAngular
d30d4e9aa7c55e3aa51ce87aa3a0921a5f4dae43
[ "BSD-2-Clause" ]
1
2022-03-15T11:51:12.000Z
2022-03-15T11:51:12.000Z
back/newdjangosite/wsgi.py
kbarnes3/BaseDjangoAngular
d30d4e9aa7c55e3aa51ce87aa3a0921a5f4dae43
[ "BSD-2-Clause" ]
10
2019-10-07T17:29:11.000Z
2022-03-25T17:38:54.000Z
back/newdjangosite/wsgi.py
kbarnes3/BaseDjangoAngular
d30d4e9aa7c55e3aa51ce87aa3a0921a5f4dae43
[ "BSD-2-Clause" ]
null
null
null
""" WSGI config for newdjangosite project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICAT...
43.636364
79
0.805556
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "newdjangosite.settings") # setting points here. application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(app...
true
true
1c0ee044745681eb65dc9a54df9b07747a14bf7a
177
py
Python
packages/proteus.models.retinanet/proteus/models/retinanet/__init__.py
PieterBlomme/proteus
d467be25b20f0e3e3f69e81588f08f0dda436d49
[ "MIT" ]
8
2021-02-02T20:39:27.000Z
2022-02-12T07:42:06.000Z
packages/proteus.models.retinanet/proteus/models/retinanet/__init__.py
PieterBlomme/proteus
d467be25b20f0e3e3f69e81588f08f0dda436d49
[ "MIT" ]
1
2020-12-29T10:49:58.000Z
2020-12-29T10:49:58.000Z
packages/proteus.models.retinanet/proteus/models/retinanet/__init__.py
PieterBlomme/proteus
d467be25b20f0e3e3f69e81588f08f0dda436d49
[ "MIT" ]
null
null
null
__author__ = """Pieter Blomme""" __email__ = "pieter.blomme@gmail.com" __version__ = "0.0.1" from .client import RetinaNet model_dict = { RetinaNet.__name__: RetinaNet, }
17.7
37
0.711864
__author__ = """Pieter Blomme""" __email__ = "pieter.blomme@gmail.com" __version__ = "0.0.1" from .client import RetinaNet model_dict = { RetinaNet.__name__: RetinaNet, }
true
true
1c0ee25dc20679d202f62962c760de13df6f5f44
88
py
Python
0/listas.py
iarielduarte/Python
871cdaf287a583baad7c88e274e09821396d0bbb
[ "CNRI-Python" ]
null
null
null
0/listas.py
iarielduarte/Python
871cdaf287a583baad7c88e274e09821396d0bbb
[ "CNRI-Python" ]
null
null
null
0/listas.py
iarielduarte/Python
871cdaf287a583baad7c88e274e09821396d0bbb
[ "CNRI-Python" ]
null
null
null
agenda = ["Ariel Duarte","3624249010","Echeverria 950","Resistencia"] print(agenda[1])
22
69
0.715909
agenda = ["Ariel Duarte","3624249010","Echeverria 950","Resistencia"] print(agenda[1])
true
true
1c0ee3d0a148755607792e31be0fef13ef464b1c
1,063
py
Python
task_14_analyse_co_actors.py
Yogeshwarathe/IMDB-Movies
abf73baab086c4e99bb34988b34f5d7ac03e6069
[ "MIT" ]
4
2019-03-03T06:08:31.000Z
2019-03-03T06:11:38.000Z
task_14_analyse_co_actors.py
Yogeshwarathe/IMDB-Movies
abf73baab086c4e99bb34988b34f5d7ac03e6069
[ "MIT" ]
null
null
null
task_14_analyse_co_actors.py
Yogeshwarathe/IMDB-Movies
abf73baab086c4e99bb34988b34f5d7ac03e6069
[ "MIT" ]
1
2019-05-27T01:52:27.000Z
2019-05-27T01:52:27.000Z
import json from pprint import pprint with open('scrape_movie_cast_details.json','r') as new_file: data=json.load(new_file) # pprint(data) coman_id = [] all_actor_dict = [] for i in data: a = i["cast"][0:5] all_actor_dict.append(a) for j in a: if j["imdb_id"] not in coman_id: coman_id.append(j["imdb_id"]) big...
21.26
72
0.624647
import json from pprint import pprint with open('scrape_movie_cast_details.json','r') as new_file: data=json.load(new_file) coman_id = [] all_actor_dict = [] for i in data: a = i["cast"][0:5] all_actor_dict.append(a) for j in a: if j["imdb_id"] not in coman_id: coman_id.append(j["imdb_id"]) big_dict = {} for ...
true
true
1c0ee452f4a8ddb788874d91b96a19ba8886325c
4,921
py
Python
mesonbuild/compilers/mixins/clang.py
sigexp/meson
29ef4478df6d3aaca40c7993f125b29409be1de2
[ "Apache-2.0" ]
null
null
null
mesonbuild/compilers/mixins/clang.py
sigexp/meson
29ef4478df6d3aaca40c7993f125b29409be1de2
[ "Apache-2.0" ]
null
null
null
mesonbuild/compilers/mixins/clang.py
sigexp/meson
29ef4478df6d3aaca40c7993f125b29409be1de2
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The meson development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
41.008333
107
0.644991
import os import shutil import typing as T from ... import mesonlib from ...linkers import AppleDynamicLinker from .gnu import GnuLikeCompiler if T.TYPE_CHECKING: from ...environment import Environment from ...dependencies import Dependency clang_color_args = { 'auto': ['-Xclang', '-fcolor-diagnostics...
true
true
1c0ee489c13c6bd1e1808ab6f47f5ad04cb246f3
1,646
py
Python
wordmarker/loaders/yaml_resource_loader.py
lostblackknight/wordmarker
cbdfd6b6d5ae8c48b11825afcf86afe9f7386a48
[ "MIT" ]
2
2021-04-19T14:26:24.000Z
2021-05-01T14:59:20.000Z
wordmarker/loaders/yaml_resource_loader.py
lostblackknight/wordmarker
cbdfd6b6d5ae8c48b11825afcf86afe9f7386a48
[ "MIT" ]
null
null
null
wordmarker/loaders/yaml_resource_loader.py
lostblackknight/wordmarker
cbdfd6b6d5ae8c48b11825afcf86afe9f7386a48
[ "MIT" ]
null
null
null
import yaml from wordmarker.data import Resource from wordmarker.loaders import DefaultResourceLoader from wordmarker.utils import log class YamlResourceLoader(DefaultResourceLoader): """ :: yaml文件的资源加载器 """ @log def __init__(self): super().__init__() def load(self, resource...
29.927273
95
0.515188
import yaml from wordmarker.data import Resource from wordmarker.loaders import DefaultResourceLoader from wordmarker.utils import log class YamlResourceLoader(DefaultResourceLoader): @log def __init__(self): super().__init__() def load(self, resource: Resource): if resource.exists(): ...
true
true
1c0ee5420232136e97390ca64d482485849c81ad
9,110
py
Python
detectron2/modeling/box_regression.py
PedroUria/detectron2
53d838d1528c3511838a1a3b35c642291e0df495
[ "Apache-2.0" ]
780
2021-03-01T08:04:08.000Z
2022-03-30T04:29:17.000Z
detectron2/modeling/box_regression.py
PedroUria/detectron2
53d838d1528c3511838a1a3b35c642291e0df495
[ "Apache-2.0" ]
89
2021-03-05T01:22:18.000Z
2022-03-30T19:28:33.000Z
detectron2/modeling/box_regression.py
PedroUria/detectron2
53d838d1528c3511838a1a3b35c642291e0df495
[ "Apache-2.0" ]
119
2021-03-04T07:30:41.000Z
2022-03-31T11:32:22.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import math from typing import Tuple import torch # Value for clamping large dw and dh predictions. The heuristic is that we clamp # such that dw and dh are no larger than what would transform a 16px box into a # 1000px box (based on a small anchor...
41.036036
99
0.598793
import math from typing import Tuple import torch _DEFAULT_SCALE_CLAMP = math.log(1000.0 / 16) __all__ = ["Box2BoxTransform", "Box2BoxTransformRotated"] @torch.jit.script class Box2BoxTransform(object): def __init__( self, weights: Tuple[float, float, float, float], scale_clamp: float = _DEFAULT_SCALE...
true
true
1c0ee6f0493a2d8632d69b60b898d4128ac36e7d
405
py
Python
planning_poker/wsgi.py
mattiaslundberg/planning_poker
9020539e8a23a99ca0d87d6e5146ec0032fa798e
[ "MIT" ]
null
null
null
planning_poker/wsgi.py
mattiaslundberg/planning_poker
9020539e8a23a99ca0d87d6e5146ec0032fa798e
[ "MIT" ]
null
null
null
planning_poker/wsgi.py
mattiaslundberg/planning_poker
9020539e8a23a99ca0d87d6e5146ec0032fa798e
[ "MIT" ]
null
null
null
""" WSGI config for planning_poker project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANG...
23.823529
78
0.792593
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planning_poker.settings") application = get_wsgi_application()
true
true
1c0ee7af56716605eedeab8789a72e7052cc2fe2
25,159
py
Python
spyder/config/main.py
virajkanwade/spyder
fee3df9d922f4ff66103218f54bc41d99e2fae53
[ "MIT" ]
null
null
null
spyder/config/main.py
virajkanwade/spyder
fee3df9d922f4ff66103218f54bc41d99e2fae53
[ "MIT" ]
null
null
null
spyder/config/main.py
virajkanwade/spyder
fee3df9d922f4ff66103218f54bc41d99e2fae53
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Spyder configuration options. Note: Leave this file free of Qt related imports, so that it can be used to quickly load a user config file. """ impo...
39.99841
99
0.468103
import os import sys from spyder.config.base import CHECK_ALL, EXCLUDED_NAMES from spyder.config.fonts import MEDIUM, SANS_SERIF from spyder.config.utils import IMPORT_EXT from spyder.config.appearance import APPEARANCE from spyder.plugins.editor.utils.findtasks import TASKS_PATTERN from spyder.utils.intro...
true
true
1c0ee7bdfc68cb35c06e7fbcc97b1fd0a699bb3d
3,725
py
Python
multi_task/metrics.py
mengzaiqiao/MultiObjectiveOptimization
7085638b3918506836118f88fed8bb2f8994a499
[ "MIT" ]
null
null
null
multi_task/metrics.py
mengzaiqiao/MultiObjectiveOptimization
7085638b3918506836118f88fed8bb2f8994a499
[ "MIT" ]
null
null
null
multi_task/metrics.py
mengzaiqiao/MultiObjectiveOptimization
7085638b3918506836118f88fed8bb2f8994a499
[ "MIT" ]
1
2021-05-03T04:11:40.000Z
2021-05-03T04:11:40.000Z
# Adapted from: https://github.com/meetshah1995/pytorch-semseg/blob/master/ptsemseg/metrics.py from losses import l1_loss_instance import numpy as np class RunningMetric(object): def __init__(self, metric_type, n_classes =None): self._metric_type = metric_type if metric_type == 'ACC': ...
40.934066
156
0.566174
from losses import l1_loss_instance import numpy as np class RunningMetric(object): def __init__(self, metric_type, n_classes =None): self._metric_type = metric_type if metric_type == 'ACC': self.accuracy = 0.0 self.num_updates = 0.0 if metric_type == 'L1': ...
true
true
1c0ee81b442401ef98dbf8e899748ba0cdc26fad
431
py
Python
Leetcode/Sorting,_Binary_Search/1_-_Easy/1370._Increasing_Decreasing_String.py
Khalid-Sultan/Algorithms-Prep
7773c5bc0448d8677bf324bd1d9bdc43b813fcd5
[ "MIT" ]
1
2020-09-21T10:01:26.000Z
2020-09-21T10:01:26.000Z
Leetcode/Sorting,_Binary_Search/1_-_Easy/1370._Increasing_Decreasing_String.py
Khalid-Sultan/Algorithms-Prep
7773c5bc0448d8677bf324bd1d9bdc43b813fcd5
[ "MIT" ]
null
null
null
Leetcode/Sorting,_Binary_Search/1_-_Easy/1370._Increasing_Decreasing_String.py
Khalid-Sultan/Algorithms-Prep
7773c5bc0448d8677bf324bd1d9bdc43b813fcd5
[ "MIT" ]
2
2020-09-01T12:33:55.000Z
2020-11-30T13:23:50.000Z
class Solution: def sortString(self, s: str) -> str: l = [] c = [0] * 26 asc = True for i in s: c[ord(i)-97]+=1 while len(l)<len(s): for i in range(26): i = i if asc else 25-i if c[i]>0: l.append(chr(...
26.9375
40
0.336427
class Solution: def sortString(self, s: str) -> str: l = [] c = [0] * 26 asc = True for i in s: c[ord(i)-97]+=1 while len(l)<len(s): for i in range(26): i = i if asc else 25-i if c[i]>0: l.append(chr(...
true
true
1c0ee865ff84919e274658dd04d5030bbc2657c1
11,219
py
Python
senteval/examples/all.py
wasiahmad/community_question_answering
73d13bc1cdf2ea66d13209c007dcc2767cf2155c
[ "MIT" ]
11
2018-10-04T04:37:03.000Z
2020-02-19T15:59:51.000Z
senteval/examples/all.py
wasiahmad/community_question_answering
73d13bc1cdf2ea66d13209c007dcc2767cf2155c
[ "MIT" ]
1
2020-04-02T09:49:57.000Z
2020-04-02T13:44:56.000Z
senteval/examples/all.py
wasiahmad/community_question_answering
73d13bc1cdf2ea66d13209c007dcc2767cf2155c
[ "MIT" ]
8
2018-10-08T06:52:32.000Z
2020-04-18T03:49:14.000Z
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # """ InferSent models. See https://github.com/facebookresearch/InferSent. """ from __future__ import absolute_import, division,...
40.067857
119
0.588288
from __future__ import absolute_import, division, unicode_literals import sys import os import torch import logging import torch.nn as nn import numpy as np from sent2vec import Sent2VecSingle, Sent2Vec from gensen import GenSen, GenSenSingle from elmo import ELMo class All2Vec(nn.Module): def __init__(self,...
true
true
1c0ee9a08dea3a2380ec4aed906b5bfc14232296
577
py
Python
scripts/access_token.py
kamauvick/daraja-test
b2a3e35b217a6e6790ac68e96321aee9fea19686
[ "MIT" ]
3
2020-01-25T06:22:09.000Z
2020-02-19T07:54:42.000Z
scripts/access_token.py
kamauvick/daraja-test
b2a3e35b217a6e6790ac68e96321aee9fea19686
[ "MIT" ]
10
2020-01-23T15:10:56.000Z
2022-03-12T00:12:33.000Z
scripts/access_token.py
kamauvick/daraja-test
b2a3e35b217a6e6790ac68e96321aee9fea19686
[ "MIT" ]
2
2020-08-27T11:48:04.000Z
2022-01-04T15:19:09.000Z
import requests from requests.auth import HTTPBasicAuth from scripts.keys import * #Generate an access_token def generate_access_token(): api_URL = "https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials" try: r = requests.get(api_URL, auth=HTTPBasicAuth( consumer_...
28.85
95
0.720971
import requests from requests.auth import HTTPBasicAuth from scripts.keys import * def generate_access_token(): api_URL = "https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials" try: r = requests.get(api_URL, auth=HTTPBasicAuth( consumer_key, consumer_secret)) ...
true
true
1c0eeb6c1254bd4bb7d5c11f4c66c683f6c6517f
633
py
Python
fei_webhook/manage.py
colingong/fei_webhook
2acb8b8e36d05f87f06dcc1bf056beb92a41b157
[ "Apache-2.0" ]
null
null
null
fei_webhook/manage.py
colingong/fei_webhook
2acb8b8e36d05f87f06dcc1bf056beb92a41b157
[ "Apache-2.0" ]
6
2021-03-19T09:41:23.000Z
2022-02-10T11:13:35.000Z
fei_webhook/manage.py
colingong/fei_webhook
2acb8b8e36d05f87f06dcc1bf056beb92a41b157
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main_settings.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ...
28.772727
77
0.685624
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main_settings.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
1c0eebe84b3c29b27f65187a8354d2d917444c41
2,274
py
Python
src/poliastro/core/propagation/markley.py
DhruvJ22/poliastro
ac5fafc6d054b2c545e111e5a6aa32259998074a
[ "MIT" ]
8
2015-05-09T17:21:57.000Z
2020-01-28T06:59:18.000Z
src/poliastro/core/propagation/markley.py
DhruvJ22/poliastro
ac5fafc6d054b2c545e111e5a6aa32259998074a
[ "MIT" ]
4
2015-12-29T13:08:01.000Z
2019-12-27T12:58:04.000Z
src/poliastro/core/propagation/markley.py
DhruvJ22/poliastro
ac5fafc6d054b2c545e111e5a6aa32259998074a
[ "MIT" ]
1
2016-10-05T08:34:44.000Z
2016-10-05T08:34:44.000Z
import numpy as np from numba import njit as jit from poliastro.core.angles import ( E_to_M, E_to_nu, _kepler_equation, _kepler_equation_prime, nu_to_E, ) from poliastro.core.elements import coe2rv, rv2coe @jit def markley_coe(k, p, ecc, inc, raan, argp, nu, tof): M0 = E_to_M(nu_to_E(nu, ecc...
23.6875
83
0.538698
import numpy as np from numba import njit as jit from poliastro.core.angles import ( E_to_M, E_to_nu, _kepler_equation, _kepler_equation_prime, nu_to_E, ) from poliastro.core.elements import coe2rv, rv2coe @jit def markley_coe(k, p, ecc, inc, raan, argp, nu, tof): M0 = E_to_M(nu_to_E(nu, ecc...
true
true
1c0eebe92032d20a1bc47e59189f2b3dbb51399c
9,572
py
Python
tests/test_subjects/test_subject.py
MichaelSchneeberger/RxPY
994f974d37783f63c5d9e018a316fa9b06ba9337
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/test_subjects/test_subject.py
MichaelSchneeberger/RxPY
994f974d37783f63c5d9e018a316fa9b06ba9337
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/test_subjects/test_subject.py
MichaelSchneeberger/RxPY
994f974d37783f63c5d9e018a316fa9b06ba9337
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import rx from rx.core import Observable, AnonymousObserver from rx.testing import TestScheduler, ReactiveTest from rx.subjects import Subject on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe subscribed = ReactiveTest.subscribe...
26.662953
85
0.65117
import rx from rx.core import Observable, AnonymousObserver from rx.testing import TestScheduler, ReactiveTest from rx.subjects import Subject on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe subscribed = ReactiveTest.subscribe...
true
true
1c0eecf37b90cd99cb9410786e3a34d1d478a721
4,859
py
Python
DonkiDirector/InfoServer.py
ess-dmsc/do-ess-data-simulator
37ef0d87ad0152b092e3a636ef8d080db0711aaa
[ "BSD-2-Clause" ]
null
null
null
DonkiDirector/InfoServer.py
ess-dmsc/do-ess-data-simulator
37ef0d87ad0152b092e3a636ef8d080db0711aaa
[ "BSD-2-Clause" ]
null
null
null
DonkiDirector/InfoServer.py
ess-dmsc/do-ess-data-simulator
37ef0d87ad0152b092e3a636ef8d080db0711aaa
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python import sys import os import time import threading import thread import signal from socket import * import types from tinydb import TinyDB, Query, where import traceback import select # class infoServerThread(threading.Thread): #----------------------------------------------------...
36.533835
85
0.389586
import sys import os import time import threading import thread import signal from socket import * import types from tinydb import TinyDB, Query, where import traceback import select class infoServerThread(threading.Thread): def __init__(self, Port, tinydb_file_path="./db.json", notif_function = Non...
false
true
1c0eecff5690e1b195ebbf5750b7e20f1ad70178
23,221
py
Python
lib/rucio/api/did.py
llwang00/rucio
f49c5c9599e147823110dc6da22a0bc33a881f8e
[ "Apache-2.0" ]
null
null
null
lib/rucio/api/did.py
llwang00/rucio
f49c5c9599e147823110dc6da22a0bc33a881f8e
[ "Apache-2.0" ]
null
null
null
lib/rucio/api/did.py
llwang00/rucio
f49c5c9599e147823110dc6da22a0bc33a881f8e
[ "Apache-2.0" ]
null
null
null
''' Copyright European Organization for Nuclear Research (CERN) 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 Authors: - Vincent Garonne, ...
35.506116
169
0.665734
from __future__ import print_function from copy import deepcopy import rucio.api.permission from rucio.core import did, naming_convention, meta as meta_core from rucio.core.rse import get_rse_id from rucio.common.constants import RESERVED_KEYS from rucio.common.exception import RucioException from rucio.common.sche...
true
true
1c0eeeb946cee788fa038851a7602a368d108f84
26,130
py
Python
python/ray/tune/trainable.py
vermashresth/ray
9aaaa508cacb90a5be714478970b2191aaa43170
[ "Apache-2.0" ]
null
null
null
python/ray/tune/trainable.py
vermashresth/ray
9aaaa508cacb90a5be714478970b2191aaa43170
[ "Apache-2.0" ]
null
null
null
python/ray/tune/trainable.py
vermashresth/ray
9aaaa508cacb90a5be714478970b2191aaa43170
[ "Apache-2.0" ]
null
null
null
from datetime import datetime import copy import io import logging import glob import os import pickle import pandas as pd from six import string_types import shutil import tempfile import time import uuid import ray from ray.tune.logger import UnifiedLogger from ray.tune.result import (DEFAULT_RESULTS_DIR, TIME_THIS...
37.328571
79
0.624876
from datetime import datetime import copy import io import logging import glob import os import pickle import pandas as pd from six import string_types import shutil import tempfile import time import uuid import ray from ray.tune.logger import UnifiedLogger from ray.tune.result import (DEFAULT_RESULTS_DIR, TIME_THIS...
true
true
1c0eef947eeda3f384875a967d951096b5cbd31f
4,364
py
Python
bokeh/application/handlers/function.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
bokeh/application/handlers/function.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
bokeh/application/handlers/function.py
kevin1kevin1k/bokeh
9f34b5b710e2748ec803c12918ec1706098a3477
[ "BSD-3-Clause" ]
31
2019-03-10T09:51:27.000Z
2022-02-14T23:11:12.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
30.517483
82
0.440651
from __future__ import absolute_import, division, print_function, unicode_literals import logging log = logging.getLogger(__name__) from ...util.callback_manager import _check_callback from .handler import Handler __all__ = ( 'FunctionHandler', ) class FunctionHandler(Handler): def __init__(self, fu...
true
true
1c0ef0349d077bcf96cbfa802df2f9e192c23fba
12,817
py
Python
teuthology/task/hadoop.py
varshar16/teuthology
321319b12ea4ff9b63c7655015a3156de2c3b279
[ "MIT" ]
6
2016-05-06T07:24:18.000Z
2020-07-29T10:02:54.000Z
teuthology/task/hadoop.py
varshar16/teuthology
321319b12ea4ff9b63c7655015a3156de2c3b279
[ "MIT" ]
167
2016-07-01T10:57:11.000Z
2020-04-14T10:24:50.000Z
teuthology/task/hadoop.py
varshar16/teuthology
321319b12ea4ff9b63c7655015a3156de2c3b279
[ "MIT" ]
6
2015-07-10T15:51:35.000Z
2019-04-24T14:58:41.000Z
from io import StringIO import contextlib import logging from teuthology import misc as teuthology from teuthology import contextutil from teuthology.orchestra import run from teuthology.exceptions import UnsupportedPackageTypeError log = logging.getLogger(__name__) HADOOP_2x_URL = "https://archive.apache.org/dist/ha...
30.157647
94
0.535617
from io import StringIO import contextlib import logging from teuthology import misc as teuthology from teuthology import contextutil from teuthology.orchestra import run from teuthology.exceptions import UnsupportedPackageTypeError log = logging.getLogger(__name__) HADOOP_2x_URL = "https://archive.apache.org/dist/ha...
true
true
1c0ef10b97b5f334b7a86a634a441bb277a67bd9
2,933
py
Python
tests/gold_tests/runroot/runroot_use.test.py
cpaasch/trafficserver
350c360073e1e7aabff3618b7063859431e9e4fb
[ "Apache-2.0" ]
null
null
null
tests/gold_tests/runroot/runroot_use.test.py
cpaasch/trafficserver
350c360073e1e7aabff3618b7063859431e9e4fb
[ "Apache-2.0" ]
null
null
null
tests/gold_tests/runroot/runroot_use.test.py
cpaasch/trafficserver
350c360073e1e7aabff3618b7063859431e9e4fb
[ "Apache-2.0" ]
null
null
null
''' ''' # 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 # "License");...
43.132353
117
0.749062
import os import sys import time Test.Summary = ''' Test for using of runroot from traffic_layout. ''' Test.ContinueOnFail = True Test.SkipUnless(Test.Variables.BINDIR.startswith(Test.Variables.PREFIX), "need to guarantee bin path starts with prefix for runroot") path = os.path.join(Test.RunDirectory...
true
true
1c0ef15a219724dd2361783cc0e313b6e02123b2
3,062
py
Python
Scene.py
BrentLittle/CISC_499_Undergrad_Project
c2951b846e101eb93c7ae22950ae537a619bf2e8
[ "MIT" ]
1
2021-07-27T22:41:06.000Z
2021-07-27T22:41:06.000Z
Scene.py
BrentLittle/CISC499_Wifi
c2951b846e101eb93c7ae22950ae537a619bf2e8
[ "MIT" ]
null
null
null
Scene.py
BrentLittle/CISC499_Wifi
c2951b846e101eb93c7ae22950ae537a619bf2e8
[ "MIT" ]
1
2021-07-27T23:44:16.000Z
2021-07-27T23:44:16.000Z
from AgentRouter import AgentRouter from FixedRouter import FixedRouter from Device import Device from State import State import random class Scene(): def __init__(self, columns, rows, isStatic): self.fixedRouters = [] self.agentRouters = [] self.devices = [] self.state = None ...
26.626087
103
0.583279
from AgentRouter import AgentRouter from FixedRouter import FixedRouter from Device import Device from State import State import random class Scene(): def __init__(self, columns, rows, isStatic): self.fixedRouters = [] self.agentRouters = [] self.devices = [] self.state = None ...
true
true
1c0ef166962d58e9ef2128235023936f042633bc
1,541
py
Python
sharepoint/lists/attachments.py
clerik/python-sharepoint
f1a1e19189d78115fcfc25850d27319e34d7e699
[ "BSD-3-Clause" ]
1
2019-06-10T23:58:09.000Z
2019-06-10T23:58:09.000Z
sharepoint/lists/attachments.py
SG-Gank/python-sharepoint
f1a1e19189d78115fcfc25850d27319e34d7e699
[ "BSD-3-Clause" ]
1
2020-02-11T11:46:32.000Z
2020-02-11T11:46:32.000Z
sharepoint/lists/attachments.py
SG-Gank/python-sharepoint
f1a1e19189d78115fcfc25850d27319e34d7e699
[ "BSD-3-Clause" ]
1
2021-04-22T21:58:17.000Z
2021-04-22T21:58:17.000Z
from sharepoint.xml import namespaces, SP from sharepoint.lists.definitions import LIST_WEBSERVICE class SharePointAttachments(object): def __init__(self, opener, list_id, row_id): self.opener = opener self.list_id, self.row_id = list_id, row_id def __iter__(self): """ Returns...
30.82
105
0.656716
from sharepoint.xml import namespaces, SP from sharepoint.lists.definitions import LIST_WEBSERVICE class SharePointAttachments(object): def __init__(self, opener, list_id, row_id): self.opener = opener self.list_id, self.row_id = list_id, row_id def __iter__(self): xml = SP.GetAttachm...
true
true
1c0ef24040a3501cb89d2fd4b53778f53589a0d3
99,020
py
Python
tensorflow/python/ops/parallel_for/pfor.py
oldgeeksguide/tensorflow
519487fb313a31701fd31e67c0ceb6eae8ea9225
[ "Apache-2.0" ]
1
2019-02-20T14:19:56.000Z
2019-02-20T14:19:56.000Z
tensorflow/python/ops/parallel_for/pfor.py
Computing-Intelligence/tensorflow
64b76357c5e9869e461575dbbad38914a8a922dd
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/parallel_for/pfor.py
Computing-Intelligence/tensorflow
64b76357c5e9869e461575dbbad38914a8a922dd
[ "Apache-2.0" ]
1
2019-02-20T14:19:59.000Z
2019-02-20T14:19:59.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.847082
80
0.699525
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from absl import flags from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python...
true
true
1c0ef387df8b26378064d12ad2cde099a6aa8fcc
1,365
py
Python
Source Codes/Assignment1/test_transformations.py
amir-souri/ML-Exam2020
8feb614ce8171c2c8e88b0fa385db8b679b68748
[ "MIT" ]
null
null
null
Source Codes/Assignment1/test_transformations.py
amir-souri/ML-Exam2020
8feb614ce8171c2c8e88b0fa385db8b679b68748
[ "MIT" ]
null
null
null
Source Codes/Assignment1/test_transformations.py
amir-souri/ML-Exam2020
8feb614ce8171c2c8e88b0fa385db8b679b68748
[ "MIT" ]
null
null
null
import cv2 from transformations import * import random as rand import os img_laa = cv2.imread('inputs/laa_laa.jpg') t, s, r = translating(21, 21), scaling(2, 2), rotating(45) r2, t2, s2 = rotating(20), translating(7, 7), scaling(.5, .5) com_tsr = combine(s, t, r) com_rts = combine(r2, t2, s2) tsr = transform_image(im...
30.333333
78
0.647619
import cv2 from transformations import * import random as rand import os img_laa = cv2.imread('inputs/laa_laa.jpg') t, s, r = translating(21, 21), scaling(2, 2), rotating(45) r2, t2, s2 = rotating(20), translating(7, 7), scaling(.5, .5) com_tsr = combine(s, t, r) com_rts = combine(r2, t2, s2) tsr = transform_image(im...
true
true
1c0ef3cd3d40b210d663e653b38c4c3aae7eaa05
4,971
py
Python
common/utils.py
gan3sh500/keras-YOLOv3-model-set
1a1108c52073c01c130618dc68607f455adadf28
[ "MIT" ]
null
null
null
common/utils.py
gan3sh500/keras-YOLOv3-model-set
1a1108c52073c01c130618dc68607f455adadf28
[ "MIT" ]
null
null
null
common/utils.py
gan3sh500/keras-YOLOv3-model-set
1a1108c52073c01c130618dc68607f455adadf28
[ "MIT" ]
2
2020-07-07T16:30:59.000Z
2020-10-05T06:07:22.000Z
#!/usr/bin/python3 # -*- coding=utf-8 -*- """Miscellaneous utility functions.""" from PIL import Image import numpy as np import os, cv2, colorsys from matplotlib.colors import rgb_to_hsv, hsv_to_rgb from common.backbones.efficientnet import swish from common.backbones.mobilenet_v3 import hard_sigmoid, hard_swish from...
32.92053
153
0.638101
from PIL import Image import numpy as np import os, cv2, colorsys from matplotlib.colors import rgb_to_hsv, hsv_to_rgb from common.backbones.efficientnet import swish from common.backbones.mobilenet_v3 import hard_sigmoid, hard_swish from yolo4.models.layers import mish import tensorflow as tf def optimize_tf_gpu(tf...
true
true
1c0ef3ef5dd12ea20dfd5770c9f58cd504d0bba3
21,079
py
Python
edward2/tensorflow/initializers.py
arahosu/edward2
4a8ed9f5b1dac0190867c48e816168f9f28b5129
[ "Apache-2.0" ]
1
2022-01-05T12:26:05.000Z
2022-01-05T12:26:05.000Z
edward2/tensorflow/initializers.py
kthakore/edward2
6fd50d4b9351616c3cd8b5e9224d118ba48c935f
[ "Apache-2.0" ]
null
null
null
edward2/tensorflow/initializers.py
kthakore/edward2
6fd50d4b9351616c3cd8b5e9224d118ba48c935f
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The Edward2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
33.672524
80
0.675696
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math from edward2.tensorflow import constraints from edward2.tensorflow import generated_random_variables from edward2.tensorflow import regularizers import six import tensorflow.compat.v1 as tf1 impo...
true
true
1c0ef5f42af54b752bf0e53303410e54f7dd4c5a
691
py
Python
setup.py
devopsconsulting/vdt.versionplugin.wheel
c7fb1b0994646af84ebed772cdb44fe3fa8154ba
[ "BSD-3-Clause" ]
1
2016-04-29T10:46:34.000Z
2016-04-29T10:46:34.000Z
setup.py
devopsconsulting/vdt.versionplugin.wheel
c7fb1b0994646af84ebed772cdb44fe3fa8154ba
[ "BSD-3-Clause" ]
null
null
null
setup.py
devopsconsulting/vdt.versionplugin.wheel
c7fb1b0994646af84ebed772cdb44fe3fa8154ba
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from setuptools import find_packages, setup pkgname = "vdt.versionplugin.wheel" setup( name=pkgname, version="0.0.7", description="vdt.version plugin for building python wheels.", author="Lars van de Kerkhof", author_email="lars@devopsconsulting.nl", maintainer="Lars van de Ker...
24.678571
65
0.649783
from setuptools import find_packages, setup pkgname = "vdt.versionplugin.wheel" setup( name=pkgname, version="0.0.7", description="vdt.version plugin for building python wheels.", author="Lars van de Kerkhof", author_email="lars@devopsconsulting.nl", maintainer="Lars van de Kerkhof", maint...
true
true
1c0ef605599eee5218f8dcdc68c73bf93d0caccc
1,541
py
Python
cyder/cydhcp/site/tests.py
drkitty/cyder
1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8
[ "BSD-3-Clause" ]
6
2015-04-16T23:18:22.000Z
2020-08-25T22:50:13.000Z
cyder/cydhcp/site/tests.py
drkitty/cyder
1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8
[ "BSD-3-Clause" ]
267
2015-01-01T00:18:57.000Z
2015-10-14T00:01:13.000Z
cyder/cydhcp/site/tests.py
drkitty/cyder
1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8
[ "BSD-3-Clause" ]
5
2015-03-23T00:57:09.000Z
2019-09-09T22:42:37.000Z
from cyder.base.tests import ModelTestMixin, TestCase from cyder.cydhcp.site.models import Site from cyder.cydhcp.network.models import Network class SiteTests(TestCase, ModelTestMixin): @property def objs(self): """Create objects for test_create_delete.""" return ( Site.objects.cr...
38.525
78
0.621025
from cyder.base.tests import ModelTestMixin, TestCase from cyder.cydhcp.site.models import Site from cyder.cydhcp.network.models import Network class SiteTests(TestCase, ModelTestMixin): @property def objs(self): return ( Site.objects.create(name='a'), Site.objects.create(name=...
true
true
1c0ef620851ecfccb6fb384e94c805ad72b0897a
11,747
py
Python
gasPriceApi.py
werlang/Gas-Station-BinanceSmartChain
4462dfcae2407d4785e333bdc88b0486e1095896
[ "MIT" ]
null
null
null
gasPriceApi.py
werlang/Gas-Station-BinanceSmartChain
4462dfcae2407d4785e333bdc88b0486e1095896
[ "MIT" ]
null
null
null
gasPriceApi.py
werlang/Gas-Station-BinanceSmartChain
4462dfcae2407d4785e333bdc88b0486e1095896
[ "MIT" ]
null
null
null
import time import sys import json import math import traceback import os import pandas as pd import numpy as np from web3 import Web3, HTTPProvider from web3.middleware import geth_poa_middleware ## newly added packages for api import click import logging from threading import Thread from sanic import Sanic, response ...
36.033742
143
0.626713
import time import sys import json import math import traceback import os import pandas as pd import numpy as np from web3 import Web3, HTTPProvider from web3.middleware import geth_poa_middleware import click import logging from threading import Thread from sanic import Sanic, response from retry import retry web3 = ...
true
true
1c0ef68cff4cce367124d16f0eeab62f922d07f2
17,618
py
Python
ansible/contrib/inventory/digital_ocean.py
dyim42/dfw-meetup-20160312
a99a34e7fce99ba9d57cace2bb32b8a9f974fa9c
[ "BSD-2-Clause" ]
null
null
null
ansible/contrib/inventory/digital_ocean.py
dyim42/dfw-meetup-20160312
a99a34e7fce99ba9d57cace2bb32b8a9f974fa9c
[ "BSD-2-Clause" ]
null
null
null
ansible/contrib/inventory/digital_ocean.py
dyim42/dfw-meetup-20160312
a99a34e7fce99ba9d57cace2bb32b8a9f974fa9c
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python ''' DigitalOcean external inventory script ====================================== Generates Ansible inventory of DigitalOcean Droplets. In addition to the --list and --host options used by Ansible, there are options for generating JSON of other DigitalOcean data. This is useful when creating d...
38.806167
132
0.590022
import os import sys import re import argparse from time import time import ConfigParser try: import json except ImportError: import simplejson as json try: from dopy.manager import DoError, DoManager except ImportError as e: print("failed=True msg='`dopy` library required for this script'") s...
true
true
1c0ef6b632521f9642ba9b6af0c00bf6d6e115bf
405
py
Python
electrum/plugins/keepkey/cmdline.py
zcoinofficial/electrum
5fdc234f817aed1d7d4bcd894fafd99972423314
[ "MIT" ]
23
2018-02-19T16:59:23.000Z
2020-09-10T16:58:44.000Z
electrum/plugins/keepkey/cmdline.py
zcoinofficial/electrum
5fdc234f817aed1d7d4bcd894fafd99972423314
[ "MIT" ]
37
2018-03-04T11:59:44.000Z
2020-09-27T19:58:21.000Z
electrum/plugins/keepkey/cmdline.py
zcoinofficial/electrum
5fdc234f817aed1d7d4bcd894fafd99972423314
[ "MIT" ]
12
2018-02-20T01:37:48.000Z
2020-08-06T06:18:42.000Z
from electrum_xzc.plugin import hook from .keepkey import KeepKeyPlugin from ..hw_wallet import CmdLineHandler class Plugin(KeepKeyPlugin): handler = CmdLineHandler() @hook def init_keystore(self, keystore): if not isinstance(keystore, self.keystore_class): return keystore.handl...
27
57
0.71358
from electrum_xzc.plugin import hook from .keepkey import KeepKeyPlugin from ..hw_wallet import CmdLineHandler class Plugin(KeepKeyPlugin): handler = CmdLineHandler() @hook def init_keystore(self, keystore): if not isinstance(keystore, self.keystore_class): return keystore.handl...
true
true
1c0ef6ef5ee81a9c82ad9097ff08cf37cef68301
1,523
py
Python
ch05/titanic.py
handcraftsman/TreeBasedMachineLearningAlgorithms
694124045c41b67417bcf8c750d26c25678bc209
[ "Apache-2.0" ]
11
2017-09-10T18:07:40.000Z
2022-02-04T11:27:47.000Z
ch05/titanic.py
handcraftsman/TreeBasedMachineLearningAlgorithms
694124045c41b67417bcf8c750d26c25678bc209
[ "Apache-2.0" ]
null
null
null
ch05/titanic.py
handcraftsman/TreeBasedMachineLearningAlgorithms
694124045c41b67417bcf8c750d26c25678bc209
[ "Apache-2.0" ]
8
2018-11-20T12:16:41.000Z
2022-02-18T08:06:26.000Z
# File: titanic.py # from chapter 5 of _Tree-based Machine Learning Algorithms_ # # Author: Clinton Sheppard <fluentcoder@gmail.com> # Copyright (c) 2017 Clinton Sheppard # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # You may o...
38.075
91
0.717663
from forest import Forest from forest import Benchmark import dtree import random continuousColumns = ['PassengerId', 'Pclass', 'Age', 'SibSp', 'Parch', 'Fare'] data = dtree.read_csv('train.csv') data = dtree.prepare_data(data, continuousColumns) outcomeLabel = 'Survived' columnsToIgnore = ['PassengerId', 'Name', 'T...
true
true