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
08f48987a37e7550d02bbad749e75106fae940aa
1,205
py
Python
accounts/migrations/0003_auto_20200402_1849.py
BVPIEEE/hackathon_portal
0a67704ae42d5680c6f4d05ca9c63a1f06f556c0
[ "Apache-2.0" ]
3
2020-04-07T12:25:59.000Z
2020-04-16T18:21:27.000Z
accounts/migrations/0003_auto_20200402_1849.py
BVPIEEE/hackathon_portal
0a67704ae42d5680c6f4d05ca9c63a1f06f556c0
[ "Apache-2.0" ]
3
2021-03-30T12:57:08.000Z
2021-09-22T18:48:35.000Z
accounts/migrations/0003_auto_20200402_1849.py
BVPIEEE/hackathon_portal
0a67704ae42d5680c6f4d05ca9c63a1f06f556c0
[ "Apache-2.0" ]
1
2020-04-16T18:21:38.000Z
2020-04-16T18:21:38.000Z
# Generated by Django 3.0.4 on 2020-04-02 13:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_auto_20200402_1828'), ] operations = [ migrations.AlterField( model_name='team', name...
30.897436
88
0.563485
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_auto_20200402_1828'), ] operations = [ migrations.AlterField( model_name='team', name='member1_github', field=models.Char...
true
true
08f48a3f7dd180eaeff6358e1417c08691d62960
4,660
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/dhcp6learnedinfo_096f62fbfd89979e813da06c573399d9.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/dhcp6learnedinfo_096f62fbfd89979e813da06c573399d9.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/dhcp6learnedinfo_096f62fbfd89979e813da06c573399d9.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
34.264706
157
0.64721
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class Dhcp6LearnedInfo(Base): __slots__ = () _SDM_NAME = 'dhcp6LearnedInfo' _SDM_ATT_MAP = { 'Count': 'count', 'DescriptiveName': 'descriptiveName', 'Name': 'name', ...
true
true
08f48a401c909e9e7e59d0acc334d01082584c1b
1,964
py
Python
international.py
captn3m0/indiapost-tracker
2a650d0d105fa90b6dde427216912ceea47fbdee
[ "MIT" ]
31
2015-07-13T13:40:29.000Z
2022-03-05T05:40:30.000Z
international.py
captn3m0/indiapost-tracker
2a650d0d105fa90b6dde427216912ceea47fbdee
[ "MIT" ]
31
2016-02-13T18:34:23.000Z
2022-03-04T10:06:38.000Z
international.py
captn3m0/indiapost-tracker
2a650d0d105fa90b6dde427216912ceea47fbdee
[ "MIT" ]
13
2015-10-12T13:18:37.000Z
2021-03-18T19:28:00.000Z
import json from io import BytesIO import requests from bs4 import BeautifulSoup TRACKING_URL = "http://ipsweb.ptcmysore.gov.in/ipswebtracking/IPSWeb_item_events.aspx" class InternationalTracker: def track(self, id): details = { 'delivered': False, 'id': id } res...
31.677419
86
0.503564
import json from io import BytesIO import requests from bs4 import BeautifulSoup TRACKING_URL = "http://ipsweb.ptcmysore.gov.in/ipswebtracking/IPSWeb_item_events.aspx" class InternationalTracker: def track(self, id): details = { 'delivered': False, 'id': id } res...
true
true
08f48afc7080d693833a0796c312d6d4e66feb07
4,328
py
Python
contrib/seeds/generate-seeds.py
ultranatum/ultragate
b51095e4b3940e58208d5fe880a99e05e52309f9
[ "MIT" ]
4
2019-04-07T00:57:20.000Z
2021-01-21T08:23:31.000Z
contrib/seeds/generate-seeds.py
ultranatum/ultragate
b51095e4b3940e58208d5fe880a99e05e52309f9
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
ultranatum/ultragate
b51095e4b3940e58208d5fe880a99e05e52309f9
[ "MIT" ]
3
2019-06-28T21:56:43.000Z
2020-08-16T13:57:07.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
31.362319
98
0.581562
from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith('.onion'): vchAddr = b32decode(addr[0:-6], T...
true
true
08f48b98d61279c14182c556bc95d1bdfa013b40
4,308
py
Python
src/pybel/struct/mutation/induction/paths.py
aman527/pybel
362274cac32e3703c2ad9c6398adbac7bf8d39a6
[ "MIT" ]
103
2016-10-25T05:51:26.000Z
2022-03-23T02:21:12.000Z
src/pybel/struct/mutation/induction/paths.py
Edgencio/pybel
6861346855e9ace4ddb7e64d1309daf6f630ba2e
[ "MIT" ]
444
2016-10-22T13:09:10.000Z
2022-03-21T12:01:39.000Z
src/pybel/struct/mutation/induction/paths.py
Edgencio/pybel
6861346855e9ace4ddb7e64d1309daf6f630ba2e
[ "MIT" ]
38
2017-01-06T03:32:38.000Z
2022-03-19T11:27:30.000Z
# -*- coding: utf-8 -*- """Induction methods for graphs over shortest paths.""" import itertools as itt import logging import random from typing import Iterable, List, Optional, Set, Tuple import networkx as nx from .utils import get_subgraph_by_induction from ...graph import BELGraph from ...pipeline import transf...
29.710345
114
0.688022
import itertools as itt import logging import random from typing import Iterable, List, Optional, Set, Tuple import networkx as nx from .utils import get_subgraph_by_induction from ...graph import BELGraph from ...pipeline import transformation from ....constants import FUNCTION, PATHOLOGY from ....dsl import BaseE...
true
true
08f48ba6104fc309030aecebfdf79e17153a07f5
700
py
Python
redis_graph_py3/serialize_graph_db_py3.py
bopopescu/local_controller_3
e5d98ab60e1ccac7e0310abc55e83b671d4a643c
[ "MIT" ]
2
2018-02-21T03:46:51.000Z
2019-12-24T16:40:51.000Z
redis_graph_py3/serialize_graph_db_py3.py
bopopescu/local_controller_3
e5d98ab60e1ccac7e0310abc55e83b671d4a643c
[ "MIT" ]
7
2020-07-16T19:54:08.000Z
2022-03-02T03:29:07.000Z
redis_graph_py3/serialize_graph_db_py3.py
bopopescu/local_controller_3
e5d98ab60e1ccac7e0310abc55e83b671d4a643c
[ "MIT" ]
2
2018-04-16T07:02:35.000Z
2020-07-23T21:57:19.000Z
import redis import pickle class Serialize_Graph: def __init__( self, graph_db= 14 ): self.redis_handle = redis.StrictRedis( host = "localhost", port=6379, db= graph_db , decode_responses=True) def serialize_graph( self, out_file = "graph_db.pickle" ): self.key_list = self.redis_handle.ke...
28
114
0.635714
import redis import pickle class Serialize_Graph: def __init__( self, graph_db= 14 ): self.redis_handle = redis.StrictRedis( host = "localhost", port=6379, db= graph_db , decode_responses=True) def serialize_graph( self, out_file = "graph_db.pickle" ): self.key_list = self.redis_handle.ke...
true
true
08f48c52dbfb797e88494f1be7d60c7f71728a5e
520
py
Python
apps/budget/views.py
CHLay/Personal-Data-Manager
a6bbca3c3c019e90219007fd80683eda0da5b624
[ "MIT" ]
null
null
null
apps/budget/views.py
CHLay/Personal-Data-Manager
a6bbca3c3c019e90219007fd80683eda0da5b624
[ "MIT" ]
6
2021-04-08T21:01:38.000Z
2021-09-22T19:42:53.000Z
apps/budget/views.py
cschlay/Personal-Data-Manager
a6bbca3c3c019e90219007fd80683eda0da5b624
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from apps.budget.models import Income, Spending from lib.printer import format_currency def index(request): user = request.user context = { 'income': Income.objects.filter(user=user), 'spending': Spending.objects.filter(user=user) } for x ...
24.761905
54
0.682692
from django.shortcuts import render, redirect from apps.budget.models import Income, Spending from lib.printer import format_currency def index(request): user = request.user context = { 'income': Income.objects.filter(user=user), 'spending': Spending.objects.filter(user=user) } for x ...
true
true
08f48c589309e475e1a71fddde3c50ce18922818
2,065
py
Python
genetic.py
backii/ES
c464f9d1d8f4846e711c986237e9cab45c2eb974
[ "MIT" ]
null
null
null
genetic.py
backii/ES
c464f9d1d8f4846e711c986237e9cab45c2eb974
[ "MIT" ]
null
null
null
genetic.py
backii/ES
c464f9d1d8f4846e711c986237e9cab45c2eb974
[ "MIT" ]
null
null
null
""" Genetic by MJ """ import random from graphs import Node class Genetic(object): def __init__(self, all): """ Tworzymy rodzicow """ self.all = all self.servers = self.all.keys() self.values = self.all.values() self.parents = [] for item in rang...
26.474359
92
0.538499
""" Genetic by MJ """ import random from graphs import Node class Genetic(object): def __init__(self, all): """ Tworzymy rodzicow """ self.all = all self.servers = self.all.keys() self.values = self.all.values() self.parents = [] for item in rang...
false
true
08f48dc9c26d4ad89683a86b01d6ea2259bb8b99
1,982
py
Python
cohesity_management_sdk/models/disk_unit.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-09-24T17:35:53.000Z
2022-03-25T08:08:47.000Z
cohesity_management_sdk/models/disk_unit.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-03-29T19:32:29.000Z
2022-01-03T23:16:45.000Z
cohesity_management_sdk/models/disk_unit.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
16
2019-02-27T06:54:12.000Z
2021-11-16T18:10:24.000Z
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class DiskUnit(object): """Implementation of the 'DiskUnit' model. Specifies information about a disk unit in a controller. Attributes: bus_number (long|int): Specifies the Id of the controller bus that controls the disk. ...
29.147059
81
0.612008
class DiskUnit(object): _names = { "bus_number":'busNumber', "controller_type":'controllerType', "unit_number":'unitNumber' } def __init__(self, bus_number=None, controller_type=None, unit_number=None): self...
true
true
08f48e7c2e6f32ab62a4235fb20a7952b85e2ae2
47,593
py
Python
cf/domain.py
alaniwi/cf-python
16525ea97df9a3f5e8146b1386e1732fb8f7c0e5
[ "MIT" ]
null
null
null
cf/domain.py
alaniwi/cf-python
16525ea97df9a3f5e8146b1386e1732fb8f7c0e5
[ "MIT" ]
null
null
null
cf/domain.py
alaniwi/cf-python
16525ea97df9a3f5e8146b1386e1732fb8f7c0e5
[ "MIT" ]
null
null
null
import logging from functools import reduce from operator import mul as operator_mul import cfdm import numpy as np from . import mixin from .constructs import Constructs from .data import Data from .decorators import _inplace_enabled, _inplace_enabled_define_and_cleanup from .functions import _DEPRECATION_ERROR_ARG,...
34.714077
113
0.520119
import logging from functools import reduce from operator import mul as operator_mul import cfdm import numpy as np from . import mixin from .constructs import Constructs from .data import Data from .decorators import _inplace_enabled, _inplace_enabled_define_and_cleanup from .functions import _DEPRECATION_ERROR_ARG,...
true
true
08f48f12af703751e3817093e0b68555c33d7069
19,585
py
Python
python/ccxt/bitforex.py
testtas9812/ccxt
61bc084a913cc066dc34bdfd8e44f896dd04b337
[ "MIT" ]
null
null
null
python/ccxt/bitforex.py
testtas9812/ccxt
61bc084a913cc066dc34bdfd8e44f896dd04b337
[ "MIT" ]
null
null
null
python/ccxt/bitforex.py
testtas9812/ccxt
61bc084a913cc066dc34bdfd8e44f896dd04b337
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange # ----------------------------------------------------------------------------- try: basestri...
37.663462
154
0.490477
from ccxt.base.exchange import Exchange try: basestring except NameError: basestring = str from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import BadSymbol from ccxt.base.errors import Insuffici...
true
true
08f48f3b8a644353f7ad373113021e4b0b78740c
8,117
py
Python
tests/dplyr/test_recode.py
pdwaggoner/datar
a03f1c0ca0de1270059178e59cea151a51a6e7aa
[ "MIT" ]
null
null
null
tests/dplyr/test_recode.py
pdwaggoner/datar
a03f1c0ca0de1270059178e59cea151a51a6e7aa
[ "MIT" ]
null
null
null
tests/dplyr/test_recode.py
pdwaggoner/datar
a03f1c0ca0de1270059178e59cea151a51a6e7aa
[ "MIT" ]
null
null
null
# tests grabbed from: # https://github.com/tidyverse/dplyr/blob/master/tests/testthat/test-recode.R import pytest import numpy from datar.core.backends.pandas import Series from datar.all import * from datar.dplyr.recode import NA_integer_, NA_character_ from ..conftest import assert_iterable_equal def assert_factor_...
32.468
77
0.626709
import pytest import numpy from datar.core.backends.pandas import Series from datar.all import * from datar.dplyr.recode import NA_integer_, NA_character_ from ..conftest import assert_iterable_equal def assert_factor_equal(f1, f2): assert_iterable_equal(f1, f2) assert_iterable_equal(levels(f1), levels(f2)) ...
true
true
08f48f78e32c8607808e34b785c090af34ff0e63
5,172
py
Python
flexget/plugins/sites/cpasbien.py
davidcollom/Flexget
cd763e04afdf6da8f1673dd567a42d55d4cb3b6c
[ "MIT" ]
1
2021-03-24T11:54:01.000Z
2021-03-24T11:54:01.000Z
flexget/plugins/sites/cpasbien.py
davidcollom/Flexget
cd763e04afdf6da8f1673dd567a42d55d4cb3b6c
[ "MIT" ]
null
null
null
flexget/plugins/sites/cpasbien.py
davidcollom/Flexget
cd763e04afdf6da8f1673dd567a42d55d4cb3b6c
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import quote_plus import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from f...
38.311111
118
0.49478
from __future__ import unicode_literals, division, absolute_import from builtins import * from future.moves.urllib.parse import quote_plus import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils import requests from flexget.utils.soup imp...
true
true
08f4912246ee624e212cac0de456024d12ce9411
12,094
py
Python
yolov3_tf2/models.py
swipswaps/Object-Detection-API
995f7d4cb41d3976f9264cbabcffd167a06dfa2a
[ "Apache-2.0" ]
null
null
null
yolov3_tf2/models.py
swipswaps/Object-Detection-API
995f7d4cb41d3976f9264cbabcffd167a06dfa2a
[ "Apache-2.0" ]
null
null
null
yolov3_tf2/models.py
swipswaps/Object-Detection-API
995f7d4cb41d3976f9264cbabcffd167a06dfa2a
[ "Apache-2.0" ]
1
2020-09-01T15:50:26.000Z
2020-09-01T15:50:26.000Z
from absl import flags from absl.flags import FLAGS import numpy as np import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import ( Add, Concatenate, Conv2D, Input, Lambda, LeakyReLU, MaxPool2D, UpSampling2D, ZeroPadding2D, ) from t...
37.559006
86
0.582355
from absl import flags from absl.flags import FLAGS import numpy as np import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import ( Add, Concatenate, Conv2D, Input, Lambda, LeakyReLU, MaxPool2D, UpSampling2D, ZeroPadding2D, ) from t...
true
true
08f4930a14ad1e44b345711e4b769e6fcf99de85
1,716
py
Python
openstack/tests/unit/compute/v2/test_extension.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
99
2018-03-28T15:41:45.000Z
2022-01-23T17:22:13.000Z
openstack/tests/unit/compute/v2/test_extension.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
5
2018-05-25T16:54:23.000Z
2021-11-21T02:27:16.000Z
openstack/tests/unit/compute/v2/test_extension.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
104
2018-04-06T14:33:54.000Z
2022-03-01T01:58:09.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
35.020408
75
0.694056
from openstack.compute.v2 import extension from openstack.tests.unit import base IDENTIFIER = 'IDENTIFIER' EXAMPLE = { 'alias': '1', 'description': '2', 'links': '3', 'name': '4', 'namespace': '5', 'updated': '2015-03-09T12:14:57.233772', } class TestExtension(base.TestCase): def test_...
true
true
08f494de6a15b4d97956facf276b543695245e80
5,675
py
Python
cinder/tests/api/fakes.py
CloudVPS/cinder
9097b9407b6ce16c7b5678682284a0ad0fcc652d
[ "Apache-2.0" ]
null
null
null
cinder/tests/api/fakes.py
CloudVPS/cinder
9097b9407b6ce16c7b5678682284a0ad0fcc652d
[ "Apache-2.0" ]
null
null
null
cinder/tests/api/fakes.py
CloudVPS/cinder
9097b9407b6ce16c7b5678682284a0ad0fcc652d
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack Foundation # 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.apach...
29.712042
78
0.675771
import uuid import routes import webob import webob.dec import webob.request from cinder.api.middleware import auth from cinder.api.middleware import fault from cinder.api.openstack import wsgi as os_wsgi from cinder.api import urlmap from cinder.api.v2 import limits from cinder.api.v2 import router from cinder.api...
true
true
08f4961d329b612b8ddc860f251a659db67e2ec5
7,223
py
Python
src/planck_lib/planck.py
phaustin/planck_lib
01564ebf8bb0a028a5d26ff338a3652eb4c93f94
[ "BSD-3-Clause" ]
null
null
null
src/planck_lib/planck.py
phaustin/planck_lib
01564ebf8bb0a028a5d26ff338a3652eb4c93f94
[ "BSD-3-Clause" ]
null
null
null
src/planck_lib/planck.py
phaustin/planck_lib
01564ebf8bb0a028a5d26ff338a3652eb4c93f94
[ "BSD-3-Clause" ]
null
null
null
# --- # jupyter: # jupytext: # cell_metadata_filter: -all # formats: ipynb,py:light # notebook_metadata_filter: all,-language_info,-toc,-latex_envs # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.3.1 # latex_metadata:...
26.751852
97
0.588675
import numpy as np from scipy.integrate import quad import pdb clight = 2.99792458e+08 h = 6.62606876e-34 kb = 1.3806503e-23 # J/K -- Boltzman's constant c1 = 2. * h * clight**2. c2 = h * clight / kb c3 = 2 * h / clight**2. c4 = h / kb sigma = 2. * np.pi**5. * kb**4. / (15 * h**3. * clight**2.) def planckDeriv...
true
true
08f496a9c030312e504f1c68c6a6f2138acdc0cd
4,752
py
Python
openpeerpower/components/buienradar/__init__.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/buienradar/__init__.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/buienradar/__init__.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""The buienradar integration.""" from __future__ import annotations import logging from openpeerpower.config_entries import SOURCE_IMPORT, ConfigEntry from openpeerpower.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from openpeerpower.core import OpenPeerPower from openpeerpower.helpers import entity_registr...
33.464789
88
0.706229
from __future__ import annotations import logging from openpeerpower.config_entries import SOURCE_IMPORT, ConfigEntry from openpeerpower.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from openpeerpower.core import OpenPeerPower from openpeerpower.helpers import entity_registry from openpeerpower.helpers.typin...
true
true
08f49779dc9cb502e8a06c0905412af59dfa0ae1
4,330
py
Python
fixture/group.py
holi87/PythonSzkolenie
edb805b62a98e2be5635d01fa0611062509391b9
[ "Apache-2.0" ]
null
null
null
fixture/group.py
holi87/PythonSzkolenie
edb805b62a98e2be5635d01fa0611062509391b9
[ "Apache-2.0" ]
null
null
null
fixture/group.py
holi87/PythonSzkolenie
edb805b62a98e2be5635d01fa0611062509391b9
[ "Apache-2.0" ]
null
null
null
import fixture.basic from model.group import Group __author__ = "Grzegorz Holak" class GroupHelper(fixture.basic.BasicHelper): def __init__(self, app): super(GroupHelper, self).__init__(app) def open_groups_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group") and ...
34.365079
97
0.647113
import fixture.basic from model.group import Group __author__ = "Grzegorz Holak" class GroupHelper(fixture.basic.BasicHelper): def __init__(self, app): super(GroupHelper, self).__init__(app) def open_groups_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group") and ...
true
true
08f497f46e3acff44d381a3b340991a35ab3c12f
4,139
py
Python
test/functional/feature_includeconf.py
c-sports/CSPN
44522f7ed5f9844adae2cdbd3d3b9688395f9f10
[ "MIT" ]
3
2020-06-23T17:15:04.000Z
2021-05-03T03:37:42.000Z
test/functional/feature_includeconf.py
c-sports/CSPN
44522f7ed5f9844adae2cdbd3d3b9688395f9f10
[ "MIT" ]
2
2020-06-17T13:02:11.000Z
2021-01-13T13:14:15.000Z
test/functional/feature_includeconf.py
c-sports/CSPN
44522f7ed5f9844adae2cdbd3d3b9688395f9f10
[ "MIT" ]
3
2020-06-18T17:01:10.000Z
2022-02-02T00:07:56.000Z
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Copyright (c) 2018-2021 The CSPN Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests the includeconf argument Verify that: 1. adding i...
49.27381
231
0.694612
import os from test_framework.test_framework import CSPNTestFramework class IncludeConfTest(CSPNTestFramework): def set_test_params(self): self.setup_clean_chain = False self.num_nodes = 1 def setup_chain(self): super().setup_chain() with open(os.path.join(self...
true
true
08f4994fb2b6a0327cb21b2bf294491ee27800ed
4,927
py
Python
cscPy/Nets/dVAEnet.py
ShichengChen/ChenPyLib
758054279fac0d8bc103dc1dcf9e799f3b940da5
[ "MIT" ]
3
2021-05-24T15:42:07.000Z
2021-07-15T19:04:52.000Z
cscPy/Nets/dVAEnet.py
ShichengChen/ChenPyLib
758054279fac0d8bc103dc1dcf9e799f3b940da5
[ "MIT" ]
null
null
null
cscPy/Nets/dVAEnet.py
ShichengChen/ChenPyLib
758054279fac0d8bc103dc1dcf9e799f3b940da5
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.autograd import Variable import torch.distributions.normal import numpy as np import math import torchvision.models as models import torch.nn.functional as F POINT_SIZE = 256 DecPointSize = 256 DecUVSize = np.sqrt(DecPointSize) import torch from torch import nn from torch.au...
36.227941
97
0.590217
import torch from torch import nn from torch.autograd import Variable import torch.distributions.normal import numpy as np import math import torchvision.models as models import torch.nn.functional as F POINT_SIZE = 256 DecPointSize = 256 DecUVSize = np.sqrt(DecPointSize) import torch from torch import nn from torch.au...
true
true
08f49ab736634834dcccb765718fac636950b5e2
2,633
py
Python
anyway/widgets/urban_widgets/small_motor_severe_fatal_count_by_year_widget.py
shaysw/anyway
35dec531fd4ac79c99d09e684027df017e989ddc
[ "MIT" ]
null
null
null
anyway/widgets/urban_widgets/small_motor_severe_fatal_count_by_year_widget.py
shaysw/anyway
35dec531fd4ac79c99d09e684027df017e989ddc
[ "MIT" ]
78
2017-06-20T09:25:11.000Z
2021-08-01T05:48:08.000Z
anyway/widgets/urban_widgets/small_motor_severe_fatal_count_by_year_widget.py
shaysw/anyway
35dec531fd4ac79c99d09e684027df017e989ddc
[ "MIT" ]
null
null
null
from typing import Dict from anyway.request_params import RequestParams from anyway.backend_constants import InjurySeverity from anyway.models import InvolvedMarkerView from anyway.vehicle_type import VehicleCategory from anyway.widgets.urban_widgets.urban_widget import UrbanWidget from anyway.widgets.widget_ut...
40.507692
94
0.64869
from typing import Dict from anyway.request_params import RequestParams from anyway.backend_constants import InjurySeverity from anyway.models import InvolvedMarkerView from anyway.vehicle_type import VehicleCategory from anyway.widgets.urban_widgets.urban_widget import UrbanWidget from anyway.widgets.widget_ut...
true
true
08f49afaf30e4a22e0261581e723f29251626b7a
1,483
py
Python
thermosteam/utils/other.py
yoelcortes/thermodynamics
bfac12d23ff54d0821992580d8630806798e0099
[ "MIT" ]
null
null
null
thermosteam/utils/other.py
yoelcortes/thermodynamics
bfac12d23ff54d0821992580d8630806798e0099
[ "MIT" ]
null
null
null
thermosteam/utils/other.py
yoelcortes/thermodynamics
bfac12d23ff54d0821992580d8630806798e0099
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules # Copyright (C) 2020-2021, Yoel Cortes-Pena <yoelcortes@gmail.com> # # This module is under the UIUC open-source license. See # github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt # for license details...
26.963636
75
0.641942
from collections.abc import Iterable __all__ = ( 'flattened', 'fill_like', 'getfields', 'setfields', 'copy_maybe', 'get_instance' ) def flattened(lst): flat = [] isa = isinstance for i in lst: if isa(i, Iterable): flat.extend(flattened(i)) else: ...
true
true
08f49b768d2fc0219eb0791a5c18804f2b4d9422
161
py
Python
kubernetes/CKAD/bubblesort.py
captain-meliodas/practice_assignments
fc57bffb22b76c97259759169876dd6db5e8c9be
[ "MIT" ]
null
null
null
kubernetes/CKAD/bubblesort.py
captain-meliodas/practice_assignments
fc57bffb22b76c97259759169876dd6db5e8c9be
[ "MIT" ]
null
null
null
kubernetes/CKAD/bubblesort.py
captain-meliodas/practice_assignments
fc57bffb22b76c97259759169876dd6db5e8c9be
[ "MIT" ]
null
null
null
A = [1,34,21,3,5,1,2,11] for i in range(0,len(A)-1): for j in range(0,len(A)-i-1): if A[j] > A[j+1]: A[j],A[j+1] = A[j+1],A[j] print(A)
20.125
37
0.434783
A = [1,34,21,3,5,1,2,11] for i in range(0,len(A)-1): for j in range(0,len(A)-i-1): if A[j] > A[j+1]: A[j],A[j+1] = A[j+1],A[j] print(A)
true
true
08f49b9366b8d02d0cbb0eb561818e2a0d9ef936
26,197
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_route_filters_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_route_filters_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_route_filters_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "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 may ...
47.892139
193
0.658014
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
08f49c219032f2da94fe227a1cddfde90aee244b
2,836
py
Python
src-tmp/compotable/coveragecomptable-reverse.py
EulerProject/EulerX
49e63e6a27be97ab30832180a47d214494388e15
[ "MIT" ]
15
2016-02-17T20:48:29.000Z
2021-03-05T20:38:05.000Z
src-tmp/compotable/coveragecomptable-reverse.py
eddy7896/EulerX
49e63e6a27be97ab30832180a47d214494388e15
[ "MIT" ]
16
2015-02-05T18:38:48.000Z
2021-06-14T11:38:36.000Z
src-tmp/compotable/coveragecomptable-reverse.py
eddy7896/EulerX
49e63e6a27be97ab30832180a47d214494388e15
[ "MIT" ]
4
2016-01-26T03:24:52.000Z
2020-01-09T07:57:15.000Z
from itertools import chain, combinations from sets import Set #Coverage composition table: #Given rel(A,B) ==> rel(a1,B), rel(a2,B) #< ==> < , < #> ==> !<=>o , !<=>o #= ==> < , < #! ==> ! , ! #o ==> !<o , !<o #Given rel(A,B) ==> rel(A,b1), rel(A,b2) #< ==> !<=>o , !<=>o #> ==> > , > #= ==> > , > #! ==> ! , ! #o ==>...
19.971831
83
0.366361
from itertools import chain, combinations from sets import Set def hash_a1_B(r): if r == "<": return "<" elif r == ">": return "!<=>o" elif r == "=": return "<" elif r == "!": return "!" elif r == "o": return "!<o" def hash_a2_B(r): if r == "<": ...
false
true
08f49c42ceb870f956ac74ba27432891959aeab6
14,507
py
Python
fairnr/models/nsvf.py
liruilong940607/NSVF
6733c8f3805c7febfe78c39710beafc5d33ccbcd
[ "MIT" ]
null
null
null
fairnr/models/nsvf.py
liruilong940607/NSVF
6733c8f3805c7febfe78c39710beafc5d33ccbcd
[ "MIT" ]
null
null
null
fairnr/models/nsvf.py
liruilong940607/NSVF
6733c8f3805c7febfe78c39710beafc5d33ccbcd
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging logger = logging.getLogger(__name__) import cv2, math, time import numpy as np from collections import defaultdict import tor...
43.827795
135
0.68946
import logging logger = logging.getLogger(__name__) import cv2, math, time import numpy as np from collections import defaultdict import torch import torch.nn as nn import torch.nn.functional as F from fairseq.models import ( register_model, register_model_architecture ) from fairseq.utils import item from ...
true
true
08f49c6b83f579e67a6942abf31213eabcea2838
692
py
Python
ex19.py
AyeThandarAung/python-exercises
a4ac378052cddd197deaa2522486572dd6c44678
[ "MIT" ]
null
null
null
ex19.py
AyeThandarAung/python-exercises
a4ac378052cddd197deaa2522486572dd6c44678
[ "MIT" ]
null
null
null
ex19.py
AyeThandarAung/python-exercises
a4ac378052cddd197deaa2522486572dd6c44678
[ "MIT" ]
null
null
null
def cheese_and_crackers(cheese_count, boxes_of_crackers): print(f"You have {cheese_count} cheeses!") print(f"You have {boxes_of_crackers} boxes of crackers!") print("Man that's enough for a party!") print("Get a blanket.\n") print("We can just give the function numbers directly:") cheese_and_crackers(2...
31.454545
70
0.757225
def cheese_and_crackers(cheese_count, boxes_of_crackers): print(f"You have {cheese_count} cheeses!") print(f"You have {boxes_of_crackers} boxes of crackers!") print("Man that's enough for a party!") print("Get a blanket.\n") print("We can just give the function numbers directly:") cheese_and_crackers(2...
true
true
08f49d2f64d4ff023b11a174b9eb320d19a1dfac
111
py
Python
gw2apy/__init__.py
GuillaumeRochette/gw2apy
f19f5b9821e51b3f53dae09fdc141543feda1454
[ "MIT" ]
null
null
null
gw2apy/__init__.py
GuillaumeRochette/gw2apy
f19f5b9821e51b3f53dae09fdc141543feda1454
[ "MIT" ]
null
null
null
gw2apy/__init__.py
GuillaumeRochette/gw2apy
f19f5b9821e51b3f53dae09fdc141543feda1454
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Guild Wars 2 API Python Wrapper """ from . import client from . import endpoints
12.333333
31
0.63964
from . import client from . import endpoints
true
true
08f49e8e7d9ca6e0f147e01c5c7bc0bb3be74c23
2,393
py
Python
test_trained_model.py
aaronscherzinger/connectfour_reinforcementlearning
084993edb4c1de44f14cf4e1b4ceced953bf688a
[ "MIT" ]
null
null
null
test_trained_model.py
aaronscherzinger/connectfour_reinforcementlearning
084993edb4c1de44f14cf4e1b4ceced953bf688a
[ "MIT" ]
null
null
null
test_trained_model.py
aaronscherzinger/connectfour_reinforcementlearning
084993edb4c1de44f14cf4e1b4ceced953bf688a
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import connect_four def board_to_column_vector(board): '''converts a playing board (i.e., 2D numpy array with shape [7,6]) to a column vector with shape [1, 42]''' assert(board.shape == (7,6)), "board does not have shape (7,6)" return np.reshape(board.flatten(),...
29.182927
112
0.763059
import tensorflow as tf import numpy as np import connect_four def board_to_column_vector(board): assert(board.shape == (7,6)), "board does not have shape (7,6)" return np.reshape(board.flatten(), (1, 42)) test_session = tf.Session() tf.reset_default_graph() import_path = './current_model' meta_graph_def ...
true
true
08f49f250ca7cf0776f7176159feffe8da18830e
7,694
py
Python
AABBlib/detection.py
kopecmartin/grains-recognition
72eade0f60800a6d3c9361bb74ff35e3445a9baf
[ "MIT" ]
null
null
null
AABBlib/detection.py
kopecmartin/grains-recognition
72eade0f60800a6d3c9361bb74ff35e3445a9baf
[ "MIT" ]
null
null
null
AABBlib/detection.py
kopecmartin/grains-recognition
72eade0f60800a6d3c9361bb74ff35e3445a9baf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from fractions import Fraction from scipy import ndimage import math class Detector(object): """Class Detector Detect bounded boxes """ def __init__(self, img): self.img = img def get_bounded_boxes(self): """Get bounded boxes from thresholded image""" ...
35.456221
144
0.517416
from fractions import Fraction from scipy import ndimage import math class Detector(object): def __init__(self, img): self.img = img def get_bounded_boxes(self): s = ndimage.generate_binary_structure(2, 2) labeled_arr, num_objects = ndimage.label(self.img, structure=s) dots =...
true
true
08f49fc4a07cec7b03600fc1f88f5f699dc32aea
8,043
py
Python
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2019_04_01/models/container_service_client_enums.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
5
2020-05-09T17:47:09.000Z
2020-10-01T19:52:06.000Z
# 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 ...
34.519313
76
0.725476
from enum import Enum class ContainerServiceStorageProfileTypes(str, Enum): storage_account = "StorageAccount" managed_disks = "ManagedDisks" class ContainerServiceVMSizeTypes(str, Enum): standard_a1 = "Standard_A1" standard_a10 = "Standard_A10" standard_a11 = "Standard_A11" standard_a1_v...
true
true
08f4a0619526699749f9c9e6ccfe2e9bbc156723
3,245
py
Python
PickledCorpusReader.py
ramachandra742/Document-Classification
c80849e9b4eccf70a3a6303020ffa708d43356ed
[ "MIT" ]
1
2020-11-30T15:40:08.000Z
2020-11-30T15:40:08.000Z
PickledCorpusReader.py
ramachandra742/Document-Classification
c80849e9b4eccf70a3a6303020ffa708d43356ed
[ "MIT" ]
1
2022-01-29T14:04:10.000Z
2022-01-29T14:04:10.000Z
PickledCorpusReader.py
ramachandra742/Document-Classification
c80849e9b4eccf70a3a6303020ffa708d43356ed
[ "MIT" ]
null
null
null
""" To Read pickle files from Corpus """ import nltk import pickle from nltk.corpus.reader.api import CorpusReader from nltk.corpus.reader.api import CategorizedCorpusReader doc_pattern = r'(?!\.)[a-z_\s]+/[a-f0-9]+\.json' pkl_pattern = r'(?!\.)[a-z_\s]+/[a-f0-9]+\.pickle' cat_pattern = r'([a-z_\s]+)/.*' ...
35.659341
91
0.608012
import nltk import pickle from nltk.corpus.reader.api import CorpusReader from nltk.corpus.reader.api import CategorizedCorpusReader doc_pattern = r'(?!\.)[a-z_\s]+/[a-f0-9]+\.json' pkl_pattern = r'(?!\.)[a-z_\s]+/[a-f0-9]+\.pickle' cat_pattern = r'([a-z_\s]+)/.*' class PickledCorpusReader(CategorizedCor...
true
true
08f4a08cc5fb89479ff19f0a3417c3aad04e29d6
34,443
py
Python
ibis/expr/analysis.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
ibis/expr/analysis.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
ibis/expr/analysis.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
1
2019-07-18T02:24:16.000Z
2019-07-18T02:24:16.000Z
# Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
30.346256
79
0.587638
import toolz import ibis.expr.types as ir import ibis.expr.lineage as lin import ibis.expr.operations as ops from ibis.expr.schema import HasSchema from ibis.expr.window import window from ibis.common import RelationError, ExpressionError, IbisTypeError def sub_for(expr, substitutions): mapping = {repr(k.op...
true
true
08f4a133041a43df2fc7c97d0dc295bf68b587c1
1,614
py
Python
profiles_api/models.py
venky794/profile-rest-api
cf9a9eb56d79ffc19db9fb27f5dd899c1869b152
[ "MIT" ]
null
null
null
profiles_api/models.py
venky794/profile-rest-api
cf9a9eb56d79ffc19db9fb27f5dd899c1869b152
[ "MIT" ]
6
2020-06-06T01:51:22.000Z
2021-06-10T20:12:35.000Z
profiles_api/models.py
venky794/profile-rest-api
cf9a9eb56d79ffc19db9fb27f5dd899c1869b152
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager class UserProfileManager(BaseUserManager): """Managers for user profiles""" def create_user(self,email,name,passw...
28.315789
64
0.688971
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.models import BaseUserManager class UserProfileManager(BaseUserManager): def create_user(self,email,name,password=None): if not email: ...
true
true
08f4a164922ebbe1440a84c28c367509f3b4fac9
10,620
py
Python
test_flake8_test_name.py
sobolevn/flake8-test-name
aeff4046d1af178fcce8cab5c8582563d4f30c5e
[ "MIT" ]
9
2021-03-18T23:11:14.000Z
2022-03-06T15:03:17.000Z
test_flake8_test_name.py
sobolevn/flake8-test-name
aeff4046d1af178fcce8cab5c8582563d4f30c5e
[ "MIT" ]
1
2021-04-20T07:19:35.000Z
2021-04-20T07:19:35.000Z
test_flake8_test_name.py
sobolevn/flake8-test-name
aeff4046d1af178fcce8cab5c8582563d4f30c5e
[ "MIT" ]
1
2021-04-19T21:44:55.000Z
2021-04-19T21:44:55.000Z
import ast import os from collections import namedtuple import flake8 import pytest from flake8.options.manager import OptionManager from flake8_test_name import ( Flake8Argparse, MyFlake8Plugin, resolve_path, MyVisitor, _get_validator_from_module, _get_validator_from_regex, CustomTestFunct...
35.757576
117
0.647175
import ast import os from collections import namedtuple import flake8 import pytest from flake8.options.manager import OptionManager from flake8_test_name import ( Flake8Argparse, MyFlake8Plugin, resolve_path, MyVisitor, _get_validator_from_module, _get_validator_from_regex, CustomTestFunct...
true
true
08f4a19fd3391894431d89b4ae9d1d30b1b9eef7
3,787
py
Python
travis_pypi_setup.py
t-pimpisa/pythainlp17
cc6bc4991dfffd68953dcdb26fd99c22d60a4c1f
[ "Apache-2.0" ]
1
2018-10-10T19:01:43.000Z
2018-10-10T19:01:43.000Z
travis_pypi_setup.py
t-pimpisa/pythainlp17
cc6bc4991dfffd68953dcdb26fd99c22d60a4c1f
[ "Apache-2.0" ]
null
null
null
travis_pypi_setup.py
t-pimpisa/pythainlp17
cc6bc4991dfffd68953dcdb26fd99c22d60a4c1f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
30.788618
80
0.702139
from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15...
true
true
08f4a1a44eb3f74743876ebeec24b9eb5473d74b
2,048
py
Python
test/ESCAPE.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
3
2017-01-06T09:26:23.000Z
2017-03-04T04:13:20.000Z
test/ESCAPE.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
2
2015-10-27T20:17:24.000Z
2016-08-04T21:49:56.000Z
test/ESCAPE.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
4
2015-03-31T16:09:15.000Z
2021-08-04T12:41:47.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
31.030303
74
0.734863
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() test.write('cat.py', """\ import sys ofp = open(sys.argv[1], 'wb') for s in sys.argv[2:]: ofp.write(open(s, 'rb').read()) ofp.close() """) test.write('SConstruct', """\ im...
true
true
08f4a1ff7f31166c5a6331dff5d949fb62100280
1,757
py
Python
service_catalog/utils.py
LaudateCorpus1/squest
98304f20c1d966fb3678d348ffd7c5be438bb6be
[ "Apache-2.0" ]
112
2021-04-21T08:52:55.000Z
2022-03-01T15:09:19.000Z
service_catalog/utils.py
LaudateCorpus1/squest
98304f20c1d966fb3678d348ffd7c5be438bb6be
[ "Apache-2.0" ]
216
2021-04-21T09:06:47.000Z
2022-03-30T14:21:28.000Z
service_catalog/utils.py
LaudateCorpus1/squest
98304f20c1d966fb3678d348ffd7c5be438bb6be
[ "Apache-2.0" ]
21
2021-04-20T13:53:54.000Z
2022-03-30T21:43:04.000Z
import os import re def str_to_bool(s): if isinstance(s, bool): # do not convert if already a boolean return s else: if s == 'True' \ or s == 'true' \ or s == '1' \ or s == 1 \ or s == True: return True elif s...
29.283333
106
0.566875
import os import re def str_to_bool(s): if isinstance(s, bool): return s else: if s == 'True' \ or s == 'true' \ or s == '1' \ or s == 1 \ or s == True: return True elif s == 'False' \ or s == ...
true
true
08f4a3d3bc23d6eebfe28a3eed65b35088d8c57c
1,241
py
Python
textauthenticator/textauthenticator.py
torcato/JupyterTextAuthenticator
ee561daabbe86d7fefd81aac5b656817b15b5560
[ "MIT" ]
null
null
null
textauthenticator/textauthenticator.py
torcato/JupyterTextAuthenticator
ee561daabbe86d7fefd81aac5b656817b15b5560
[ "MIT" ]
null
null
null
textauthenticator/textauthenticator.py
torcato/JupyterTextAuthenticator
ee561daabbe86d7fefd81aac5b656817b15b5560
[ "MIT" ]
null
null
null
""" Custom Authenticator to use to for HBP workshop JupyterHub """ import json import os from tornado import gen from jupyterhub.handlers import BaseHandler from jupyterhub.auth import Authenticator, LocalAuthenticator from jupyterhub.utils import url_path_join from IPython.utils.traitlets import Unicode class Te...
30.268293
92
0.650282
import json import os from tornado import gen from jupyterhub.handlers import BaseHandler from jupyterhub.auth import Authenticator, LocalAuthenticator from jupyterhub.utils import url_path_join from IPython.utils.traitlets import Unicode class TextAuthenticator(Authenticator): passwdfile= Unicode('users....
true
true
08f4a3f2d04ca5921eb4311c93e8c83f85f1d35b
4,145
py
Python
tests/aat/common/matcher/packet_analyzer.py
gchagnotSpt/openperf
0ae14cb7a685b1b059f707379773fb3bcb421d40
[ "Apache-2.0" ]
null
null
null
tests/aat/common/matcher/packet_analyzer.py
gchagnotSpt/openperf
0ae14cb7a685b1b059f707379773fb3bcb421d40
[ "Apache-2.0" ]
null
null
null
tests/aat/common/matcher/packet_analyzer.py
gchagnotSpt/openperf
0ae14cb7a685b1b059f707379773fb3bcb421d40
[ "Apache-2.0" ]
null
null
null
from expects import expect, be_a, be_empty, be_none, be_above, be_above_or_equal, equal from expects.matchers import Matcher import client.models import datetime class _be_valid_packet_analyzer(Matcher): def _match(self, analyzer): expect(analyzer).to(be_a(client.models.PacketAnalyzer)) expect(an...
43.631579
95
0.699638
from expects import expect, be_a, be_empty, be_none, be_above, be_above_or_equal, equal from expects.matchers import Matcher import client.models import datetime class _be_valid_packet_analyzer(Matcher): def _match(self, analyzer): expect(analyzer).to(be_a(client.models.PacketAnalyzer)) expect(an...
true
true
08f4a4b745f13c8a91b10fb329fa7785cbd7c35e
9,314
py
Python
kubernetes_asyncio/client/models/v1alpha1_priority_class.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1alpha1_priority_class.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1alpha1_priority_class.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.13.5 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1alpha1Pr...
36.669291
411
0.645587
import pprint import re import six class V1alpha1PriorityClass(object): openapi_types = { 'api_version': 'str', 'description': 'str', 'global_default': 'bool', 'kind': 'str', 'metadata': 'V1ObjectMeta', 'value': 'int' } attribute_map = { 'api_...
true
true
08f4a54ca22be35e51645a30c891176e7204cdab
4,054
py
Python
rastervision_core/rastervision/core/data/raster_source/rasterized_source.py
theoway/raster-vision
dab675517f904771e2ce8c052494f8a6f1ddc026
[ "Apache-2.0" ]
1,577
2017-05-22T14:22:00.000Z
2022-03-31T02:03:25.000Z
rastervision_core/rastervision/core/data/raster_source/rasterized_source.py
theoway/raster-vision
dab675517f904771e2ce8c052494f8a6f1ddc026
[ "Apache-2.0" ]
933
2017-05-09T20:25:02.000Z
2022-03-31T10:22:59.000Z
rastervision_core/rastervision/core/data/raster_source/rasterized_source.py
monocilindro/raster-vision
fc181a6f31f085affa1ee12f0204bdbc5a6bf85a
[ "Apache-2.0" ]
336
2017-05-15T16:30:44.000Z
2022-03-28T06:19:33.000Z
import logging from rasterio.features import rasterize import numpy as np from shapely.geometry import shape from shapely.strtree import STRtree from shapely.ops import transform from rastervision.core.data import (ActivateMixin, ActivationError) from rastervision.core.data.raster_source import RasterSource log = lo...
32.693548
82
0.648742
import logging from rasterio.features import rasterize import numpy as np from shapely.geometry import shape from shapely.strtree import STRtree from shapely.ops import transform from rastervision.core.data import (ActivateMixin, ActivationError) from rastervision.core.data.raster_source import RasterSource log = lo...
true
true
08f4a606cb14d3b17daa0c19c6ede96939a21b13
317
py
Python
submissions/serializers.py
Julmgc/Course-Organizer
b383f2845474314186a2ac6589885af890889da8
[ "MIT" ]
null
null
null
submissions/serializers.py
Julmgc/Course-Organizer
b383f2845474314186a2ac6589885af890889da8
[ "MIT" ]
null
null
null
submissions/serializers.py
Julmgc/Course-Organizer
b383f2845474314186a2ac6589885af890889da8
[ "MIT" ]
null
null
null
from rest_framework import serializers class SubmissionSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) grade = serializers.IntegerField(allow_null=True) repo = serializers.CharField() user_id = serializers.IntegerField() activity_id = serializers.IntegerField()
35.222222
53
0.785489
from rest_framework import serializers class SubmissionSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) grade = serializers.IntegerField(allow_null=True) repo = serializers.CharField() user_id = serializers.IntegerField() activity_id = serializers.IntegerField()
true
true
08f4a715eac07e096fa840e0f4e83b8a41f2fbc5
1,075
py
Python
amqtt/utils.py
edenhaus/amqtt
ecf64a4f82c5d4c10974bce4d3f75f7563d6170b
[ "MIT" ]
null
null
null
amqtt/utils.py
edenhaus/amqtt
ecf64a4f82c5d4c10974bce4d3f75f7563d6170b
[ "MIT" ]
null
null
null
amqtt/utils.py
edenhaus/amqtt
ecf64a4f82c5d4c10974bce4d3f75f7563d6170b
[ "MIT" ]
null
null
null
# Copyright (c) 2015 Nicolas JOUANIN # # See the file license.txt for copying permission. from __future__ import annotations import logging import random import yaml import typing if typing.TYPE_CHECKING: from amqtt.session import Session logger = logging.getLogger(__name__) def format_client_message( se...
22.87234
68
0.659535
from __future__ import annotations import logging import random import yaml import typing if typing.TYPE_CHECKING: from amqtt.session import Session logger = logging.getLogger(__name__) def format_client_message( session: Session = None, address: str = None, port: int = None ) -> str: if session: ...
true
true
08f4a7ed05fa1d680a19e90a2ecd21d98bc0e1bb
30,927
py
Python
appengine/monorail/tracker/test/issueentry_test.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
appengine/monorail/tracker/test/issueentry_test.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
16
2020-09-07T11:55:09.000Z
2022-03-02T05:47:58.000Z
appengine/monorail/tracker/test/issueentry_test.py
xinghun61/infra
b5d4783f99461438ca9e6a477535617fadab6ba3
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Unittests for the issueentry servlet.""" from __future__ import print_function from __future...
43.743989
80
0.70411
from __future__ import print_function from __future__ import division from __future__ import absolute_import import mox import os import time import unittest from third_party import ezt from google.appengine.ext import testbed from mock import Mock, patch import webapp2 from framework import framework_bizobj from ...
true
true
08f4a7f383bea620ec45043c76f19af5dd57b88a
2,249
py
Python
hiddenfigures/analysis/stats/possession/turnovers.py
millcityrunner/carball
c94cb8caf2f00e616409d2c22b73475e6268fffa
[ "Apache-2.0" ]
null
null
null
hiddenfigures/analysis/stats/possession/turnovers.py
millcityrunner/carball
c94cb8caf2f00e616409d2c22b73475e6268fffa
[ "Apache-2.0" ]
null
null
null
hiddenfigures/analysis/stats/possession/turnovers.py
millcityrunner/carball
c94cb8caf2f00e616409d2c22b73475e6268fffa
[ "Apache-2.0" ]
null
null
null
from typing import Dict import pandas as pd from hiddenfigures.generated.api.stats.events_pb2 import Hit from ....analysis.constants.field_constants import FieldConstants from ....analysis.stats.stats import HitStat from ....generated.api import game_pb2 from ....generated.api.player_pb2 import Player from ....json_p...
47.851064
118
0.706536
from typing import Dict import pandas as pd from hiddenfigures.generated.api.stats.events_pb2 import Hit from ....analysis.constants.field_constants import FieldConstants from ....analysis.stats.stats import HitStat from ....generated.api import game_pb2 from ....generated.api.player_pb2 import Player from ....json_p...
true
true
08f4a859d76d30f89dafa4982c40708eccd71607
505
py
Python
libs/yowsup/yowsup/yowsup/layers/protocol_iq/protocolentities/test_iq_error.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
22
2017-07-14T20:01:17.000Z
2022-03-08T14:22:39.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_iq/protocolentities/test_iq_error.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
6
2017-07-14T21:03:50.000Z
2021-06-10T19:08:32.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_iq/protocolentities/test_iq_error.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
13
2017-07-14T20:13:14.000Z
2020-11-12T08:06:05.000Z
from yowsup.layers.protocol_iq.protocolentities.test_iq import IqProtocolEntityTest from yowsup.layers.protocol_iq.protocolentities import ErrorIqProtocolEntity from yowsup.structs import ProtocolTreeNode class ErrorIqProtocolEntityTest(IqProtocolEntityTest): def setUp(self): super(ErrorIqProtocolEntityTes...
45.909091
83
0.780198
from yowsup.layers.protocol_iq.protocolentities.test_iq import IqProtocolEntityTest from yowsup.layers.protocol_iq.protocolentities import ErrorIqProtocolEntity from yowsup.structs import ProtocolTreeNode class ErrorIqProtocolEntityTest(IqProtocolEntityTest): def setUp(self): super(ErrorIqProtocolEntityTes...
true
true
08f4a932d764d10cb8cc8d664c0b5427ceaafd41
2,017
py
Python
tests/test_img2tensorboard.py
xidchen/MONAI
4eae383f1abbbb62a69e054c016a3b4e53af3ea7
[ "Apache-2.0" ]
2
2020-06-23T16:03:45.000Z
2020-06-25T05:30:45.000Z
tests/test_img2tensorboard.py
Scitator/MONAI
a42b563acf0c7504cee18ee84c8af2eff6e948a7
[ "Apache-2.0" ]
null
null
null
tests/test_img2tensorboard.py
Scitator/MONAI
a42b563acf0c7504cee18ee84c8af2eff6e948a7
[ "Apache-2.0" ]
1
2020-09-14T13:16:01.000Z
2020-09-14T13:16:01.000Z
# Copyright 2020 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, s...
38.056604
101
0.655429
import tempfile import unittest from monai.visualize import make_animated_gif_summary import numpy as np import tensorboard import torch class TestImg2Tensorboard(unittest.TestCase): def test_write_gray(self): with tempfile.TemporaryDirectory() as out_dir: nparr = np.ones(shape=(1, 32, 32, 3...
true
true
08f4a9520b54b384b8a78f3c6729daa6274f85e9
686
py
Python
wagtail/images/tests/test_shortcuts.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
1
2022-02-09T05:25:30.000Z
2022-02-09T05:25:30.000Z
wagtail/images/tests/test_shortcuts.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
wagtail/images/tests/test_shortcuts.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 from django.test import TestCase from wagtail.images.shortcuts import get_rendition_or_not_found from .utils import Image, get_test_image_file class TestShortcuts(TestCase): fixtures = ["test.json"] def test_fallback_to_not_found(self): bad_image = Image.objects.get(id=1) go...
27.44
71
0.698251
from django.test import TestCase from wagtail.images.shortcuts import get_rendition_or_not_found from .utils import Image, get_test_image_file class TestShortcuts(TestCase): fixtures = ["test.json"] def test_fallback_to_not_found(self): bad_image = Image.objects.get(id=1) good_image = Imag...
true
true
08f4a9b0a9aed101ed2fdfa68d69b928b54b2860
3,991
py
Python
isi_sdk_9_0_0/isi_sdk_9_0_0/models/storagepool_status_unprovisioned_item.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_9_0_0/isi_sdk_9_0_0/models/storagepool_status_unprovisioned_item.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_9_0_0/isi_sdk_9_0_0/models/storagepool_status_unprovisioned_item.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class StoragepoolStatusUnprovis...
27.524138
91
0.566024
import pprint import re import six class StoragepoolStatusUnprovisionedItem(object): swagger_types = { 'bay': 'int', 'lnn': 'int' } attribute_map = { 'bay': 'bay', 'lnn': 'lnn' } def __init__(self, bay=None, lnn=None): self._bay = None self...
true
true
08f4a9fc065e1a7dd421b1f251d27f3a455c7ff9
6,392
py
Python
mini projects/connect4/connect4.py
thulamt/projects
49516d611efdba85694c35ecdf7548411a3e1e78
[ "MIT" ]
null
null
null
mini projects/connect4/connect4.py
thulamt/projects
49516d611efdba85694c35ecdf7548411a3e1e78
[ "MIT" ]
null
null
null
mini projects/connect4/connect4.py
thulamt/projects
49516d611efdba85694c35ecdf7548411a3e1e78
[ "MIT" ]
null
null
null
# Text Based Connect 4 game # Author: Thulam Tran # Year 2021 import random PLACEHOLDER="#" def initializeBoard(): '''()->2D list Initializes 6x7 board with placeholders. ''' board=[] for i in range(6): board+=[[PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,...
28.792793
134
0.56117
import random PLACEHOLDER="#" def initializeBoard(): board=[] for i in range(6): board+=[[PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,PLACEHOLDER,PLACEHOLDER]] return board def printBoard(board): for i in range(len(board)): print(board[i]) print("") def inputCol(...
true
true
08f4aa4aa36d144017930f6a41f7cddc94fb77b8
282
py
Python
tk13.py
Chuson1997/tkinter_sample
f8edd83aa7a7d97a43b2b730dc817c54b02bc5dc
[ "MIT" ]
1
2021-01-25T07:28:32.000Z
2021-01-25T07:28:32.000Z
tk13.py
Chuson1997/tkinter_sample
f8edd83aa7a7d97a43b2b730dc817c54b02bc5dc
[ "MIT" ]
null
null
null
tk13.py
Chuson1997/tkinter_sample
f8edd83aa7a7d97a43b2b730dc817c54b02bc5dc
[ "MIT" ]
null
null
null
#tk13.pyw abcd import tkinter as tk root = tk.Tk() root.geometry('300x200') lb = tk.Label(text='This is a Label, This is a Label, This is a Label') ms = tk.Message(text='This is a Message. This is a Message. This is a Message') [widget.pack() for widget in (lb,ms)] root.mainloop()
31.333333
79
0.702128
import tkinter as tk root = tk.Tk() root.geometry('300x200') lb = tk.Label(text='This is a Label, This is a Label, This is a Label') ms = tk.Message(text='This is a Message. This is a Message. This is a Message') [widget.pack() for widget in (lb,ms)] root.mainloop()
true
true
08f4ab1d720ac11dbfe9dc2ae2d3fb7f799c9e02
32
py
Python
vidservers/__init__.py
misershaad/nineanime-grabber
5988a5ee10385c43e06cf3ec227469a9e79478ea
[ "MIT" ]
15
2022-03-07T01:39:42.000Z
2022-03-29T03:34:52.000Z
vidservers/__init__.py
misershaad/nineanime-grabber
5988a5ee10385c43e06cf3ec227469a9e79478ea
[ "MIT" ]
3
2022-03-07T06:32:31.000Z
2022-03-23T16:44:15.000Z
vidservers/__init__.py
misershaad/nineanime-grabber
5988a5ee10385c43e06cf3ec227469a9e79478ea
[ "MIT" ]
4
2022-03-07T06:42:41.000Z
2022-03-18T04:35:38.000Z
from vidservers.sources import *
32
32
0.84375
from vidservers.sources import *
true
true
08f4ab51f543245a2bd9fe06ed12b3a46a1e5f60
4,398
py
Python
models/mlp_tf.py
deepskies/DeeplyUncertain-Public
04f94da29939b2d7dfef70d40dee8dc752e0da48
[ "Apache-2.0" ]
15
2020-04-26T17:46:47.000Z
2022-02-22T17:58:48.000Z
models/mlp_tf.py
deepskies/DeeplyUncertain-Public
04f94da29939b2d7dfef70d40dee8dc752e0da48
[ "Apache-2.0" ]
5
2021-04-30T21:14:34.000Z
2022-02-09T23:39:20.000Z
models/mlp_tf.py
deepskies/DeeplyUncertain-Public
04f94da29939b2d7dfef70d40dee8dc752e0da48
[ "Apache-2.0" ]
4
2020-09-03T13:57:25.000Z
2021-06-08T06:05:58.000Z
import tensorflow as tf import tensorflow_probability as tfp from tensorflow_probability.python.internal import tensorshape_util tfk = tf.keras tfkl = tf.keras.layers tfpl = tfp.layers tfd = tfp.distributions n_train = 90000 class MeanMetricWrapper(tfk.metrics.Mean): # code by @mcourteaux from https://github.co...
35.467742
130
0.644384
import tensorflow as tf import tensorflow_probability as tfp from tensorflow_probability.python.internal import tensorshape_util tfk = tf.keras tfkl = tf.keras.layers tfpl = tfp.layers tfd = tfp.distributions n_train = 90000 class MeanMetricWrapper(tfk.metrics.Mean): def __init__(self, fn, name=None, dtype=...
true
true
08f4abef1766d33984dadc69cc9bdab79c56c5fd
12,334
py
Python
text/src/autogluon/text/text_prediction/dataset.py
adrienatallah/autogluon
014faf7e98bd0e349d0900f713442536b0f69b1e
[ "Apache-2.0" ]
null
null
null
text/src/autogluon/text/text_prediction/dataset.py
adrienatallah/autogluon
014faf7e98bd0e349d0900f713442536b0f69b1e
[ "Apache-2.0" ]
null
null
null
text/src/autogluon/text/text_prediction/dataset.py
adrienatallah/autogluon
014faf7e98bd0e349d0900f713442536b0f69b1e
[ "Apache-2.0" ]
null
null
null
import collections import collections.abc import numpy as np import pandas as pd import json from autogluon.core.utils.loaders import load_pd from . import constants as _C from .column_property import CategoricalColumnProperty, TextColumnProperty, NumericalColumnProperty,\ get_column_properties_from_metadata from a...
35.750725
101
0.620885
import collections import collections.abc import numpy as np import pandas as pd import json from autogluon.core.utils.loaders import load_pd from . import constants as _C from .column_property import CategoricalColumnProperty, TextColumnProperty, NumericalColumnProperty,\ get_column_properties_from_metadata from a...
true
true
08f4acd8083014dda90eda80adda9b9deae011e5
9,525
py
Python
kdquery.py
DeVilhena-Paulo/KdQuery
76e3791e25b2db2168c1007fe1b92c3f8ec20005
[ "Apache-2.0" ]
null
null
null
kdquery.py
DeVilhena-Paulo/KdQuery
76e3791e25b2db2168c1007fe1b92c3f8ec20005
[ "Apache-2.0" ]
null
null
null
kdquery.py
DeVilhena-Paulo/KdQuery
76e3791e25b2db2168c1007fe1b92c3f8ec20005
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Kd-tree implementation. This module defines one possible kd-tree structure implementation and a general method to find the nearest node for any kd-tree implementation. """ import math from collections import deque, namedtuple def interval_condition(value, inf, sup, dist): """Checks i...
33.538732
79
0.59748
import math from collections import deque, namedtuple def interval_condition(value, inf, sup, dist): return (value > inf - dist and value < sup + dist) def euclidean_dist(point1, point2): return math.sqrt(sum([math.pow(point1[i] - point2[i], 2) for i in range(len(point1))])) Nod...
true
true
08f4ad329f0e6000a87d64d6e74a6665b9a22cf1
3,931
py
Python
Artinii_Test/settings.py
Asko-Dev/File_Upload_RESTAPI
4effc6fa515668a1e6367b0e61ebcf7e21576884
[ "MIT" ]
null
null
null
Artinii_Test/settings.py
Asko-Dev/File_Upload_RESTAPI
4effc6fa515668a1e6367b0e61ebcf7e21576884
[ "MIT" ]
7
2021-03-19T01:43:12.000Z
2022-03-12T00:22:42.000Z
Artinii_Test/settings.py
Asko-Dev/File_Upload_RESTAPI
4effc6fa515668a1e6367b0e61ebcf7e21576884
[ "MIT" ]
null
null
null
""" Django settings for Artinii_Test project. Generated by 'django-admin startproject' using Django 3.0.4. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import ...
26.741497
91
0.713813
import os import django_heroku BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.environ.get('SECRET_KEY2') DEBUG = (os.environ.get('DEBUG_VALUE2') == 'True') # DEBUG = True ALLOWED_HOSTS = ['asko-fileupload.herokuapp.com'] # Application definition INSTALLED_APPS = [ '...
true
true
08f4adb645d4746e679cfb1c6d12ff9468c3b20f
15,556
py
Python
event.py
epn-ml/IWF-ICMEs
85390a3990462cb8aa9639956acc353134a224ce
[ "Apache-2.0" ]
2
2021-01-26T11:52:13.000Z
2021-08-13T15:43:34.000Z
event.py
epn-ml/IWF-ICMEs
85390a3990462cb8aa9639956acc353134a224ce
[ "Apache-2.0" ]
null
null
null
event.py
epn-ml/IWF-ICMEs
85390a3990462cb8aa9639956acc353134a224ce
[ "Apache-2.0" ]
2
2021-01-25T16:31:24.000Z
2021-01-26T14:28:02.000Z
import pandas as pds import datetime import numpy as np import time import matplotlib.pyplot as plt import matplotlib.dates as mdates import seaborn as sns class Event: def __init__(self, begin, end, param=None): self.begin = begin self.end = end self.proba = None self.duration = ...
32.818565
124
0.597711
import pandas as pds import datetime import numpy as np import time import matplotlib.pyplot as plt import matplotlib.dates as mdates import seaborn as sns class Event: def __init__(self, begin, end, param=None): self.begin = begin self.end = end self.proba = None self.duration = ...
true
true
08f4ae2ffc357fc16e1c4230a3009fda0419b558
1,113
py
Python
src/DailyImages/urls.py
shubham-00/deploy-a-typical-django-app-on-a-vps
ec0fc7ab912f9d3e379c4cc212a1263dcb26cdf2
[ "Apache-2.0" ]
1
2022-01-15T15:05:28.000Z
2022-01-15T15:05:28.000Z
src/DailyImages/urls.py
shubham-00/deploy-a-typical-django-app-on-a-vps
ec0fc7ab912f9d3e379c4cc212a1263dcb26cdf2
[ "Apache-2.0" ]
null
null
null
src/DailyImages/urls.py
shubham-00/deploy-a-typical-django-app-on-a-vps
ec0fc7ab912f9d3e379c4cc212a1263dcb26cdf2
[ "Apache-2.0" ]
null
null
null
"""DailyImages URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/4.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
32.735294
77
0.712489
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path("admin/", admin.site.urls), path("", include("pictures.urls", namespace="pictures")), ] if settings.DEBUG: urlpatterns += static( ...
true
true
08f4ae3c80c3d7c7cd61d28e1ac1db3fb4fc020a
77,574
py
Python
yt/frontends/stream/data_structures.py
SimonCSelg/yt-sselg
ea28c04436990b386b4526f4f47475a491b3bb60
[ "BSD-3-Clause-Clear" ]
2
2021-03-02T18:59:49.000Z
2021-03-02T18:59:50.000Z
yt/frontends/stream/data_structures.py
pep8speaks/yt
3d5ab92540ae33d8ed0b9694f0ecf82166ba0aea
[ "BSD-3-Clause-Clear" ]
4
2018-04-13T23:03:42.000Z
2018-05-08T17:50:43.000Z
yt/frontends/stream/data_structures.py
pep8speaks/yt
3d5ab92540ae33d8ed0b9694f0ecf82166ba0aea
[ "BSD-3-Clause-Clear" ]
1
2018-01-08T19:20:06.000Z
2018-01-08T19:20:06.000Z
""" Data structures for Streaming, in-memory datasets """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this soft...
39.781538
91
0.618854
import os import time import weakref import numpy as np import uuid from itertools import \ chain, \ product, \ repeat from collections import defaultdict from numbers import Number as numeric_type from yt.funcs import \ iterable, \ ensure_list, \ issue_deprecation_warning from yt.utilities....
true
true
08f4ae3fccf53dddf4e49a8ce8c31c5142d75e28
13,029
py
Python
tensorflow/tools/compatibility/ast_edits_test.py
wenming2014/tensorflow
a102a6a71844e194f3946f6318768c5367f1f16b
[ "Apache-2.0" ]
5
2018-07-04T22:14:02.000Z
2018-07-04T22:21:43.000Z
tensorflow/tools/compatibility/ast_edits_test.py
wenming2014/tensorflow
a102a6a71844e194f3946f6318768c5367f1f16b
[ "Apache-2.0" ]
null
null
null
tensorflow/tools/compatibility/ast_edits_test.py
wenming2014/tensorflow
a102a6a71844e194f3946f6318768c5367f1f16b
[ "Apache-2.0" ]
2
2019-02-26T16:21:15.000Z
2020-12-04T17:48:17.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...
32.81864
80
0.621306
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six from tensorflow.python.framework import test_util from tensorflow.python.platform import test as test_lib from tensorflow.tools.compatibility import ast_edits class NoUpdateSpec(ast_edits.APIChange...
true
true
08f4aec8dafa89c2a30134ab376028a9d89264b3
1,794
py
Python
examples/howto/ipywidgets/ipyvolume_camera.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
examples/howto/ipywidgets/ipyvolume_camera.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
examples/howto/ipywidgets/ipyvolume_camera.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
import ipyvolume as ipv import ipywidgets as ipw import numpy as np from ipywidgets_bokeh import IPyWidget from bokeh.layouts import column, row from bokeh.models import Slider from bokeh.plotting import curdoc x, y, z = np.random.random((3, 1000)) ipv.quickscatter(x, y, z, size=1, marker="sphere") plot = ipv.current...
29.9
68
0.713489
import ipyvolume as ipv import ipywidgets as ipw import numpy as np from ipywidgets_bokeh import IPyWidget from bokeh.layouts import column, row from bokeh.models import Slider from bokeh.plotting import curdoc x, y, z = np.random.random((3, 1000)) ipv.quickscatter(x, y, z, size=1, marker="sphere") plot = ipv.current...
true
true
08f4b08149b0fdda07c4cf20a88372c898f38d97
2,919
py
Python
trac/upgrades/db13.py
wiraqutra/photrackjp
e120cba2a5d5d30f99ad084c6521e61f09694ee6
[ "BSD-3-Clause" ]
1
2017-02-09T15:55:16.000Z
2017-02-09T15:55:16.000Z
tracformatter/trac/upgrades/db13.py
kbower/tracwikiconv
6db4c856c8ab64beac666226519ae2e8d513c428
[ "BSD-3-Clause" ]
null
null
null
tracformatter/trac/upgrades/db13.py
kbower/tracwikiconv
6db4c856c8ab64beac666226519ae2e8d513c428
[ "BSD-3-Clause" ]
null
null
null
sql = [ #-- Add ticket_type to 'ticket', remove the unused 'url' column """CREATE TEMPORARY TABLE ticket_old AS SELECT * FROM ticket;""", """DROP TABLE ticket;""", """CREATE TABLE ticket ( id integer PRIMARY KEY, type text, -- the nature of the ticket tim...
47.852459
88
0.548133
sql = [ """CREATE TEMPORARY TABLE ticket_old AS SELECT * FROM ticket;""", """DROP TABLE ticket;""", """CREATE TABLE ticket ( id integer PRIMARY KEY, type text, -- the nature of the ticket time integer, -- the time it was created ...
true
true
08f4b0bd523b3d53364c1bacf3a8ef3f7ce93fda
8,198
py
Python
plugins/aea-cli-benchmark/aea_cli_benchmark/case_tx_generate/dialogues.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
null
null
null
plugins/aea-cli-benchmark/aea_cli_benchmark/case_tx_generate/dialogues.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
null
null
null
plugins/aea-cli-benchmark/aea_cli_benchmark/case_tx_generate/dialogues.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2022 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance...
35.184549
91
0.664674
from typing import Any, Optional, Type from aea.common import Address from aea.exceptions import AEAEnforceError, enforce from aea.helpers.transaction.base import Terms from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import Dialog...
true
true
08f4b116f8e739b8445055005ff96dbef23bc9e3
6,671
py
Python
beer/inference/objectives.py
bolajiy/beer
6fe968c7ca4864437890aa6bd705755c2580696e
[ "MIT" ]
46
2018-02-27T18:15:08.000Z
2022-02-16T22:10:55.000Z
beer/inference/objectives.py
bolajiy/beer
6fe968c7ca4864437890aa6bd705755c2580696e
[ "MIT" ]
16
2018-01-26T14:18:51.000Z
2021-02-05T09:34:00.000Z
beer/inference/objectives.py
bolajiy/beer
6fe968c7ca4864437890aa6bd705755c2580696e
[ "MIT" ]
26
2018-03-12T14:03:26.000Z
2021-05-24T21:15:01.000Z
from dataclasses import dataclass, field import typing import torch from ..models import ConjugateBayesianParameter __all__ = ['evidence_lower_bound'] def add_acc_stats(acc_stats1, acc_stats2): '''Add two dictionary of accumulated statistics. Both dictionaries may have different set of keys. The elements in...
34.564767
80
0.64638
from dataclasses import dataclass, field import typing import torch from ..models import ConjugateBayesianParameter __all__ = ['evidence_lower_bound'] def add_acc_stats(acc_stats1, acc_stats2): keys1, keys2 = set(acc_stats1.keys()), set(acc_stats2.keys()) new_stats = {} for key in keys1.intersection(key...
true
true
08f4b233b6f2036ae493f863eb6f9d74b97e0dc0
195
py
Python
chainerlp/hooks/__init__.py
kumasento/gradient-scaling
0ca435433b9953e33656173c4d60ebd61c5c5e87
[ "MIT" ]
7
2020-08-12T12:04:28.000Z
2021-11-22T15:56:08.000Z
chainerlp/hooks/__init__.py
kumasento/gradient-scaling
0ca435433b9953e33656173c4d60ebd61c5c5e87
[ "MIT" ]
1
2021-10-07T08:37:39.000Z
2021-10-08T02:41:39.000Z
chainerlp/hooks/__init__.py
kumasento/gradient-scaling
0ca435433b9953e33656173c4d60ebd61c5c5e87
[ "MIT" ]
null
null
null
from chainerlp.hooks.act_stat_hook import ActStatLinkHook, ActStatFuncHook from chainerlp.hooks.zero_mult_hook import ZeroMultFuncHook from chainerlp.hooks.ada_loss_monitor import AdaLossMonitor
48.75
74
0.897436
from chainerlp.hooks.act_stat_hook import ActStatLinkHook, ActStatFuncHook from chainerlp.hooks.zero_mult_hook import ZeroMultFuncHook from chainerlp.hooks.ada_loss_monitor import AdaLossMonitor
true
true
08f4b41ea6aaac00592e23b30ff7a550b6390e22
3,106
py
Python
bank_backend/core/tasks.py
Pablo1785/wbb
fc7b665669a40740b65307f8c9d3061532aded52
[ "BSD-3-Clause" ]
null
null
null
bank_backend/core/tasks.py
Pablo1785/wbb
fc7b665669a40740b65307f8c9d3061532aded52
[ "BSD-3-Clause" ]
null
null
null
bank_backend/core/tasks.py
Pablo1785/wbb
fc7b665669a40740b65307f8c9d3061532aded52
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals from bank_backend.celery import app from django.contrib.auth.models import User from core.models import Transaction, SubAccount, Wallet from datetime import datetime import requests from decimal import Decimal # we are using testnet, for mainnet replace with 'f...
36.116279
111
0.631359
from __future__ import absolute_import, unicode_literals from bank_backend.celery import app from django.contrib.auth.models import User from core.models import Transaction, SubAccount, Wallet from datetime import datetime import requests from decimal import Decimal from bit import PrivateKeyTestnet as Key from djang...
true
true
08f4b437c042358bde5a2df7f71d59fdf72c7a18
429
py
Python
setup.py
auguwu/jink
4e26c6d8bb8db6f33e8873c4dd7d6fc0551bca48
[ "MIT" ]
null
null
null
setup.py
auguwu/jink
4e26c6d8bb8db6f33e8873c4dd7d6fc0551bca48
[ "MIT" ]
null
null
null
setup.py
auguwu/jink
4e26c6d8bb8db6f33e8873c4dd7d6fc0551bca48
[ "MIT" ]
null
null
null
import sys from cx_Freeze import setup, Executable import os build_exe_options={"include_msvcr": True} cwd = os.getcwd() base=None if sys.platform == "win32": base = "Console" setup( name="jink", version="0.0.1", description="A strongly typed, JavaScript-like programming language.", options={"...
21.45
75
0.692308
import sys from cx_Freeze import setup, Executable import os build_exe_options={"include_msvcr": True} cwd = os.getcwd() base=None if sys.platform == "win32": base = "Console" setup( name="jink", version="0.0.1", description="A strongly typed, JavaScript-like programming language.", options={"...
true
true
08f4b58cee1c5c2923a00f7c27af7c49d9d67474
4,323
py
Python
tools/android/native_lib_memory/process_residency.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/android/native_lib_memory/process_residency.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/android/native_lib_memory/process_residency.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-01-05T23:43:46.000Z
2021-01-07T23:36:34.000Z
#!/usr/bin/python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """From a native code residency dump created by log_residency.cc, generate a visual timeline, and serialize the parsed data to JSON. """ i...
32.75
80
0.665973
import argparse import json import logging from matplotlib import collections as mc from matplotlib import pylab as plt import numpy as np def CreateArgumentParser(): parser = argparse.ArgumentParser( description='Reads and shows native library residency data.') parser.add_argument('--dump', type=str, req...
true
true
08f4b595775b504b02d6757c303c794092ad1fb9
2,262
py
Python
pcraster/pcraster-4.2.0/pcraster-4.2.0/source/performance/timer_case/multicore_operation.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
pcraster/pcraster-4.2.0/pcraster-4.2.0/source/performance/timer_case/multicore_operation.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
pcraster/pcraster-4.2.0/pcraster-4.2.0/source/performance/timer_case/multicore_operation.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
import pcraster as pcr from performance.timer_case.operation import Operation, Argument operation_tuples = [ ("abs", [pcr.VALUESCALE.Scalar]), ("acos", [pcr.VALUESCALE.Scalar]), ("add", [pcr.VALUESCALE.Scalar, pcr.VALUESCALE.Scalar]), ("asin", [pcr.VALUESCALE.Scalar]), ("atan", [pcr.VALUESCALE.Sca...
42.679245
70
0.658709
import pcraster as pcr from performance.timer_case.operation import Operation, Argument operation_tuples = [ ("abs", [pcr.VALUESCALE.Scalar]), ("acos", [pcr.VALUESCALE.Scalar]), ("add", [pcr.VALUESCALE.Scalar, pcr.VALUESCALE.Scalar]), ("asin", [pcr.VALUESCALE.Scalar]), ("atan", [pcr.VALUESCALE.Sca...
true
true
08f4b6211dc9cc6781d92b944f5877a111aeaded
1,998
py
Python
numpy/typing/tests/data/pass/array_constructors.py
mbkumar/numpy
0645461254a2110438b6df63ef193c1138c306ec
[ "BSD-3-Clause" ]
1
2020-10-30T16:13:01.000Z
2020-10-30T16:13:01.000Z
numpy/typing/tests/data/pass/array_constructors.py
mbkumar/numpy
0645461254a2110438b6df63ef193c1138c306ec
[ "BSD-3-Clause" ]
null
null
null
numpy/typing/tests/data/pass/array_constructors.py
mbkumar/numpy
0645461254a2110438b6df63ef193c1138c306ec
[ "BSD-3-Clause" ]
null
null
null
from typing import List, Any import numpy as np class Index: def __index__(self) -> int: return 0 class SubClass(np.ndarray): ... i8 = np.int64(1) A = np.array([1]) B = A.view(SubClass).copy() C = [1] def func(i: int, j: int, **kwargs: Any) -> SubClass: return B np.array(1, dtype=float) np.array(1...
19.028571
60
0.68018
from typing import List, Any import numpy as np class Index: def __index__(self) -> int: return 0 class SubClass(np.ndarray): ... i8 = np.int64(1) A = np.array([1]) B = A.view(SubClass).copy() C = [1] def func(i: int, j: int, **kwargs: Any) -> SubClass: return B np.array(1, dtype=float) np.array(1...
true
true
08f4b7ad1574746c2f5cecb6c6cf81ff8c41f223
14,460
py
Python
salt/netapi/rest_tornado/saltnado_websockets.py
ifraixedes/saltstack-salt
b54becb8b43cc9b7c00b2c0bc637ac534dc62896
[ "Apache-2.0" ]
9,425
2015-01-01T05:59:24.000Z
2022-03-31T20:44:05.000Z
salt/netapi/rest_tornado/saltnado_websockets.py
ifraixedes/saltstack-salt
b54becb8b43cc9b7c00b2c0bc637ac534dc62896
[ "Apache-2.0" ]
33,507
2015-01-01T00:19:56.000Z
2022-03-31T23:48:20.000Z
salt/netapi/rest_tornado/saltnado_websockets.py
ifraixedes/saltstack-salt
b54becb8b43cc9b7c00b2c0bc637ac534dc62896
[ "Apache-2.0" ]
5,810
2015-01-01T19:11:45.000Z
2022-03-31T02:37:20.000Z
""" A Websockets add-on to saltnado =============================== .. py:currentmodule:: salt.netapi.rest_tornado.saltnado :depends: - tornado Python module In order to enable saltnado_websockets you must add websockets: True to your saltnado config block. .. code-block:: yaml rest_tornado: # can be...
33.241379
114
0.630775
import logging import salt.ext.tornado.gen import salt.ext.tornado.websocket import salt.netapi import salt.utils.json from . import event_processor from .saltnado import _check_cors_origin _json = salt.utils.json.import_json() log = logging.getLogger(__name__) class AllEventsHandler( salt.ext.tornado.webso...
true
true
08f4b7d7b66a6844eb1cb90a6a82ec5d606b7083
26
py
Python
terrascript/logentries/__init__.py
vfoucault/python-terrascript
fe82b3d7e79ffa72b7871538f999828be0a115d0
[ "BSD-2-Clause" ]
null
null
null
terrascript/logentries/__init__.py
vfoucault/python-terrascript
fe82b3d7e79ffa72b7871538f999828be0a115d0
[ "BSD-2-Clause" ]
null
null
null
terrascript/logentries/__init__.py
vfoucault/python-terrascript
fe82b3d7e79ffa72b7871538f999828be0a115d0
[ "BSD-2-Clause" ]
null
null
null
"""2017-11-28 18:08:05"""
13
25
0.538462
true
true
08f4b8a5b5b0890b9a8bedc8573c635cb9440727
430
py
Python
app/core/migrations/0006_recipe_image.py
Glitch33r/recipe-app-api
fcc976faaeb4401a3e729e16c3f675c03a670af0
[ "MIT" ]
1
2020-01-12T22:32:15.000Z
2020-01-12T22:32:15.000Z
app/core/migrations/0006_recipe_image.py
Glitch33r/recipe-app-api
fcc976faaeb4401a3e729e16c3f675c03a670af0
[ "MIT" ]
null
null
null
app/core/migrations/0006_recipe_image.py
Glitch33r/recipe-app-api
fcc976faaeb4401a3e729e16c3f675c03a670af0
[ "MIT" ]
null
null
null
# Generated by Django 3.0.1 on 2020-01-12 19:52 import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_recipe'), ] operations = [ migrations.AddField( model_name='recipe', name='image', ...
21.5
93
0.62093
import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_recipe'), ] operations = [ migrations.AddField( model_name='recipe', name='image', field=models.ImageField(null=True, up...
true
true
08f4b917dfa9bbdf684415e7610460238ec8ba5d
1,871
py
Python
secretsd/session.py
grawity/secretsd
601014f7a8257eaf8d77a408f7cb2cf3ec79caf0
[ "MIT" ]
8
2017-05-22T01:44:05.000Z
2022-03-18T12:23:02.000Z
secretsd/session.py
grawity/secretsd
601014f7a8257eaf8d77a408f7cb2cf3ec79caf0
[ "MIT" ]
4
2017-05-21T16:19:12.000Z
2021-07-06T11:05:06.000Z
secretsd/session.py
grawity/secretsd
601014f7a8257eaf8d77a408f7cb2cf3ec79caf0
[ "MIT" ]
2
2019-01-07T19:02:28.000Z
2020-01-14T00:08:59.000Z
import dbus import dbus.service import os from .crypto_backend import ( AES_BLOCK_BYTES, aes_cbc_encrypt, aes_cbc_decrypt, dh_modp1024_exchange, hkdf_sha256_derive, pkcs7_pad, pkcs7_unpad, ) class SecretServiceSession(dbus.service.Object): ROOT = "/org/freedesktop/secrets/session" ...
33.410714
79
0.619989
import dbus import dbus.service import os from .crypto_backend import ( AES_BLOCK_BYTES, aes_cbc_encrypt, aes_cbc_decrypt, dh_modp1024_exchange, hkdf_sha256_derive, pkcs7_pad, pkcs7_unpad, ) class SecretServiceSession(dbus.service.Object): ROOT = "/org/freedesktop/secrets/session" ...
true
true
08f4b9fb0e3a4cb4bdf82cd0807fb186bf5764d6
984
py
Python
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_logging.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_logging.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_logging.py
SDKAutoUP/azure-cli-extensions
5991b1656318130b78ea83a2aa87386fbe0b60eb
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
33.931034
94
0.606707
import logging from knack.log import get_logger as get_knack_logger from azext_ai_did_you_mean_this._const import THOTH_LOG_PREFIX LOG_PREFIX_KEY = 'extension_log_prefix' class ExtensionLoggerAdapter(logging.LoggerAdapter): def process(self, msg, kwargs): buffer = [msg] if LOG_PREFIX_KEY in s...
true
true
08f4ba57b9705499b6efa0401631d03d7973e035
905
py
Python
edi_835_parser/segments/payer_contact.py
shalini1017/edi-835-parser
5c7c9549621a71cea893b37998e4bdea94822c5c
[ "MIT" ]
null
null
null
edi_835_parser/segments/payer_contact.py
shalini1017/edi-835-parser
5c7c9549621a71cea893b37998e4bdea94822c5c
[ "MIT" ]
null
null
null
edi_835_parser/segments/payer_contact.py
shalini1017/edi-835-parser
5c7c9549621a71cea893b37998e4bdea94822c5c
[ "MIT" ]
null
null
null
from edi_835_parser.elements.identifier import Identifier from edi_835_parser.elements.contact_function_code import ContactFunctionCode from edi_835_parser.segments.utilities import split_segment, get_element class PayerContact: identification = 'PER' identifier = Identifier() code = ContactFunctionCode(...
29.193548
77
0.693923
from edi_835_parser.elements.identifier import Identifier from edi_835_parser.elements.contact_function_code import ContactFunctionCode from edi_835_parser.segments.utilities import split_segment, get_element class PayerContact: identification = 'PER' identifier = Identifier() code = ContactFunctionCode(...
true
true
08f4bb2dabb4597ad9356dca235ad20306a80d2a
18,831
py
Python
tensorflow/core/framework/attr_value_pb2.py
alexeygrigorev/tensorflow-protobuf
9863a9281eb6caa9be73128c03906d990639208c
[ "Apache-2.0" ]
7
2020-12-28T02:53:05.000Z
2022-03-23T05:45:03.000Z
tensorflow/core/framework/attr_value_pb2.py
alexeygrigorev/tensorflow-protobuf
9863a9281eb6caa9be73128c03906d990639208c
[ "Apache-2.0" ]
1
2021-01-27T16:06:16.000Z
2021-01-27T19:43:38.000Z
tensorflow/core/framework/attr_value_pb2.py
alexeygrigorev/tensorflow-protobuf
9863a9281eb6caa9be73128c03906d990639208c
[ "Apache-2.0" ]
1
2021-02-11T11:46:01.000Z
2021-02-11T11:46:01.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/attr_value.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _r...
50.485255
1,745
0.771335
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from tensorflow.core.framework import tensor_pb2 as tensorfl...
true
true
08f4bb9981e9eb2ff4780c1a3dc1ded125229db7
54
py
Python
src/extensions/python/openfst/__init__.py
igormq/openfst
217f6f011a530320621e965ebc9974b4014425f1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/extensions/python/openfst/__init__.py
igormq/openfst
217f6f011a530320621e965ebc9974b4014425f1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/extensions/python/openfst/__init__.py
igormq/openfst
217f6f011a530320621e965ebc9974b4014425f1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from .pywrapfst import * # noqa __version__ = '0.1.0'
18
31
0.685185
from .pywrapfst import * __version__ = '0.1.0'
true
true
08f4bea90d2899731269ea5723060daaefe11d0c
14,519
py
Python
opennmt/decoders/rnn_decoder.py
dblandan/OpenNMT-tf
89714f3e79fbc9deb7ea5d2f42a88f0df6d84ae3
[ "MIT" ]
null
null
null
opennmt/decoders/rnn_decoder.py
dblandan/OpenNMT-tf
89714f3e79fbc9deb7ea5d2f42a88f0df6d84ae3
[ "MIT" ]
null
null
null
opennmt/decoders/rnn_decoder.py
dblandan/OpenNMT-tf
89714f3e79fbc9deb7ea5d2f42a88f0df6d84ae3
[ "MIT" ]
null
null
null
"""Define RNN-based decoders.""" import inspect import tensorflow as tf from opennmt.decoders.decoder import Decoder, logits_to_cum_log_probs, build_output_layer from opennmt.utils.cell import build_cell class RNNDecoder(Decoder): """A basic RNN decoder.""" def __init__(self, num_layers, ...
34.817746
96
0.645017
import inspect import tensorflow as tf from opennmt.decoders.decoder import Decoder, logits_to_cum_log_probs, build_output_layer from opennmt.utils.cell import build_cell class RNNDecoder(Decoder): def __init__(self, num_layers, num_units, bridge=None, ...
true
true
08f4bf35521b9d3804070a23deeb3f59249ba2ba
18,477
py
Python
src/Sorption_PB_functions/PB_coup_four_layer_2try_2v.py
Whatsoever/SurfComp
4887162fef765d0c84e2bb72f0c26974aef30aec
[ "MIT" ]
1
2019-05-17T10:46:08.000Z
2019-05-17T10:46:08.000Z
src/Sorption_PB_functions/PB_coup_four_layer_2try_2v.py
Whatsoever/SurfComp
4887162fef765d0c84e2bb72f0c26974aef30aec
[ "MIT" ]
null
null
null
src/Sorption_PB_functions/PB_coup_four_layer_2try_2v.py
Whatsoever/SurfComp
4887162fef765d0c84e2bb72f0c26974aef30aec
[ "MIT" ]
1
2018-08-02T06:54:38.000Z
2018-08-02T06:54:38.000Z
# -*- coding: utf-8 -*- """ Created on Tue Sep 3 12:42:20 2019 @author: DaniJ """ # -*- coding: utf-8 -*- """ Created on Thu Aug 22 15:58:31 2019 @author: DaniJ """ import numpy as np import scipy as sp from bvp import solve_bvp from scipy import linalg #from four_layer_model_2try_withFixSpeciesOption_Scaling impor...
50.209239
244
0.625805
import numpy as np import scipy as sp from bvp import solve_bvp from scipy import linalg import matplotlib.pyplot as plt def PB_and_fourlayermodel (T, X_guess, A, Z, log_k, idx_Aq, pos_psi_S1_vec, pos_psi_S2_vec, temp, sS1, aS1, sS2, aS2, e, CapacitancesS1, CapacitancesS2, x, idx_fix_species = None, zel=1, toleranc...
true
true
08f4bf5e179080a67301e35c96cb8d98bf3b69fc
2,918
py
Python
test/functional/mempool_resurrect.py
kodxana/F44RedCoin
a6948cb0328c0962fa87224a4dcc3138febbf3be
[ "MIT" ]
null
null
null
test/functional/mempool_resurrect.py
kodxana/F44RedCoin
a6948cb0328c0962fa87224a4dcc3138febbf3be
[ "MIT" ]
null
null
null
test/functional/mempool_resurrect.py
kodxana/F44RedCoin
a6948cb0328c0962fa87224a4dcc3138febbf3be
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The F44RedCoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test resurrection of mined transactions when the blockchain is re-organized.""" from test_framework...
41.098592
123
0.675463
from test_framework.blocktools import create_raw_transaction from test_framework.test_framework import F44RedCoinTestFramework from test_framework.util import assert_equal class MempoolCoinbaseTest(F44RedCoinTestFramework): def set_test_params(self): self.num_nodes = 1 def skip_test_if_missing_modul...
true
true
08f4bfd29ff4c042b5cce5ef93aa7d731788243b
6,859
py
Python
kubernetes_asyncio/client/models/v1beta1_validating_webhook_configuration.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_validating_webhook_configuration.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_validating_webhook_configuration.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1beta1Val...
34.817259
295
0.641347
import pprint import re import six class V1beta1ValidatingWebhookConfiguration(object): openapi_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'V1ObjectMeta', 'webhooks': 'list[V1beta1Webhook]' } attribute_map = { 'api_version': 'apiVersion', ...
true
true
08f4c06413d0031e79465d2cbdab9db6a19cef41
4,473
py
Python
datalite/mass_actions.py
intoverflow/datalite
81010fc015fbd8cba12ba86b27e4e88b8b79c179
[ "MIT" ]
6
2020-08-28T18:27:20.000Z
2022-03-12T20:13:55.000Z
datalite/mass_actions.py
intoverflow/datalite
81010fc015fbd8cba12ba86b27e4e88b8b79c179
[ "MIT" ]
7
2021-03-21T01:06:48.000Z
2021-12-29T09:52:27.000Z
datalite/mass_actions.py
intoverflow/datalite
81010fc015fbd8cba12ba86b27e4e88b8b79c179
[ "MIT" ]
4
2021-04-28T00:44:58.000Z
2021-12-21T10:03:47.000Z
""" This module includes functions to insert multiple records to a bound database at one time, with one time open and closing of the database file. """ from typing import TypeVar, Union, List, Tuple from dataclasses import asdict from warnings import warn from .constraints import ConstraintFailedError from .commons imp...
35.5
104
0.66063
from typing import TypeVar, Union, List, Tuple from dataclasses import asdict from warnings import warn from .constraints import ConstraintFailedError from .commons import _convert_sql_format, _create_table import sqlite3 as sql T = TypeVar('T') class HeterogeneousCollectionError(Exception): pass def _check_ho...
true
true
08f4c10d2dd0edb72bf617b59a68464463170164
703
py
Python
venv/lib/python3.8/site-packages/PyInstaller/hooks/hook-gi.repository.GtkClutter.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
3
2021-03-08T14:40:02.000Z
2022-01-26T20:42:00.000Z
venv/lib/python3.8/site-packages/PyInstaller/hooks/hook-gi.repository.GtkClutter.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
venv/lib/python3.8/site-packages/PyInstaller/hooks/hook-gi.repository.GtkClutter.py
avrumnoor/NewsSummarizer
a963497ef9bc62d2148aa28e624ea32955992f57
[ "MIT" ]
4
2018-06-04T20:40:37.000Z
2020-10-13T22:38:40.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2005-2021, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
39.055556
78
0.598862
from PyInstaller.utils.hooks import get_gi_typelibs binaries, datas, hiddenimports = get_gi_typelibs('GtkClutter', '1.0')
true
true
08f4c15710b6508d86529c76053710190b41a963
215
py
Python
scripts/xnat/sibis.py
nicholsn/ncanda-data-integration
45e563b5ef71f70a92c8772b1dcc8019e94d9c8b
[ "BSD-3-Clause" ]
null
null
null
scripts/xnat/sibis.py
nicholsn/ncanda-data-integration
45e563b5ef71f70a92c8772b1dcc8019e94d9c8b
[ "BSD-3-Clause" ]
null
null
null
scripts/xnat/sibis.py
nicholsn/ncanda-data-integration
45e563b5ef71f70a92c8772b1dcc8019e94d9c8b
[ "BSD-3-Clause" ]
null
null
null
""" Temporary SIBIS Logging """ import json def logging(id, message, **kwargs): log = dict(experiment_site_id=id, error=message) log.update(kwargs) print(json.dumps(log, sort_keys=True))
19.545455
42
0.651163
import json def logging(id, message, **kwargs): log = dict(experiment_site_id=id, error=message) log.update(kwargs) print(json.dumps(log, sort_keys=True))
true
true
08f4c17cf6de2a627b4446d3eeca84ae1d0b69e0
20,054
py
Python
disnake/invite.py
tooruu/disnake
976124a779efff16a51b8a3b294ad6c9949bbb02
[ "MIT" ]
null
null
null
disnake/invite.py
tooruu/disnake
976124a779efff16a51b8a3b294ad6c9949bbb02
[ "MIT" ]
null
null
null
disnake/invite.py
tooruu/disnake
976124a779efff16a51b8a3b294ad6c9949bbb02
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-2021 Rapptz Copyright (c) 2021-present Disnake Development Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limi...
36.79633
138
0.591503
from __future__ import annotations from typing import TYPE_CHECKING, List, Optional, Type, TypeVar, Union from .appinfo import PartialAppInfo from .asset import Asset from .enums import ChannelType, InviteTarget, NSFWLevel, VerificationLevel, try_enum from .mixins import Hashable from .object import Object from .uti...
true
true
08f4c1b5d0eeaa54773c1239fd17b1d224182546
733
py
Python
nlp_steven_bird/chapter2.py
alirkaya/programming-textbook-solutions
7362dce474b8a881d654f95604e09d1d0e76aec2
[ "MIT" ]
null
null
null
nlp_steven_bird/chapter2.py
alirkaya/programming-textbook-solutions
7362dce474b8a881d654f95604e09d1d0e76aec2
[ "MIT" ]
null
null
null
nlp_steven_bird/chapter2.py
alirkaya/programming-textbook-solutions
7362dce474b8a881d654f95604e09d1d0e76aec2
[ "MIT" ]
null
null
null
# corpus: large body of text # in order to apply methods to a text, first identify it as a text in NLTK library text = nltk.Text('file.txt') text.concordance('surprize') # basic statistics on text # 1. average word length # 2. average sentence length # 3. the number of times each vocabulary appears in text - lexical ...
28.192308
82
0.74352
text = nltk.Text('file.txt') text.concordance('surprize') from nltk.corpus import gutenberg for fileid in gutenberg.fileids(): ... from nltk.corpus import webtext for fileid in webtext.fileids(): ... from nltk.corpus import brown
true
true
08f4c1b78f909eb3075f6ac99ac3be2d0a4d4b1d
1,163
py
Python
zerver/management/commands/query_ldap.py
rtzll/zulip
b831df8f7fc2f5b89ec998266901ac491d52a7fc
[ "Apache-2.0" ]
null
null
null
zerver/management/commands/query_ldap.py
rtzll/zulip
b831df8f7fc2f5b89ec998266901ac491d52a7fc
[ "Apache-2.0" ]
null
null
null
zerver/management/commands/query_ldap.py
rtzll/zulip
b831df8f7fc2f5b89ec998266901ac491d52a7fc
[ "Apache-2.0" ]
1
2019-10-14T23:36:14.000Z
2019-10-14T23:36:14.000Z
from typing import Any from argparse import ArgumentParser import sys from django.contrib.auth import authenticate, login, get_backends from django.core.management.base import BaseCommand from django.conf import settings from django_auth_ldap.backend import LDAPBackend, _LDAPUser # Quick tool to test whether you'...
35.242424
89
0.677558
from typing import Any from argparse import ArgumentParser import sys from django.contrib.auth import authenticate, login, get_backends from django.core.management.base import BaseCommand from django.conf import settings from django_auth_ldap.backend import LDAPBackend, _LDAPUser def query_ldap(**options: str) ->...
true
true
08f4c1c7c1511c1ef8677020725f2e64eb5bccc9
1,967
py
Python
lib/test.py
FizzerYu/CollaborativeVAE
4714cce49acba258600b1b5bbcd3a1a4762385e6
[ "MIT" ]
null
null
null
lib/test.py
FizzerYu/CollaborativeVAE
4714cce49acba258600b1b5bbcd3a1a4762385e6
[ "MIT" ]
null
null
null
lib/test.py
FizzerYu/CollaborativeVAE
4714cce49acba258600b1b5bbcd3a1a4762385e6
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import numpy as np from torch.utils.data import DataLoader, Dataset from torch.autograd import Variable allowed_activations = ['sigmoid', 'tanh', 'softmax', 'relu', 'linear'] allowed_noises = [None, 'gaussian', 'mask'] allowed_losses = ['rmse', 'cross-entropy'] class run_all(nn.Mo...
34.508772
93
0.61515
import torch import torch.nn as nn import numpy as np from torch.utils.data import DataLoader, Dataset from torch.autograd import Variable allowed_activations = ['sigmoid', 'tanh', 'softmax', 'relu', 'linear'] allowed_noises = [None, 'gaussian', 'mask'] allowed_losses = ['rmse', 'cross-entropy'] class run_all(nn.Mo...
true
true
08f4c3862c0ebef7a357d34360fb8d52ac3c8b38
1,711
py
Python
tests/classification/text/test_distilbert_classifier.py
jakobkruse1/thesis-emotion-detection
59edec10255e57b79a3c2cb32723cb2e852e6797
[ "MIT" ]
null
null
null
tests/classification/text/test_distilbert_classifier.py
jakobkruse1/thesis-emotion-detection
59edec10255e57b79a3c2cb32723cb2e852e6797
[ "MIT" ]
3
2022-02-17T11:51:26.000Z
2022-03-14T11:57:54.000Z
tests/classification/text/test_distilbert_classifier.py
jakob1111996/thesis-emotion-detection
59edec10255e57b79a3c2cb32723cb2e852e6797
[ "MIT" ]
null
null
null
import os.path import shutil import numpy as np import pytest from src.classification.text import DistilBertClassifier from src.data.text_data_reader import Set, TextDataReader def test_distilbert_initialization(): classifier = DistilBertClassifier() assert not classifier.classifier assert not classifie...
32.283019
78
0.74284
import os.path import shutil import numpy as np import pytest from src.classification.text import DistilBertClassifier from src.data.text_data_reader import Set, TextDataReader def test_distilbert_initialization(): classifier = DistilBertClassifier() assert not classifier.classifier assert not classifie...
true
true
08f4c48523a0c60182da8270b01babba6c1821eb
1,065
py
Python
alipay/aop/api/response/AlipayPcreditHuabeiMerchantActivityModifyResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayPcreditHuabeiMerchantActivityModifyResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayPcreditHuabeiMerchantActivityModifyResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayPcreditHuabeiMerchantActivityModifyResponse(AlipayResponse): def __init__(self): super(AlipayPcreditHuabeiMerchantActivityModifyResponse, self).__init__() self....
29.583333
122
0.707981
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayPcreditHuabeiMerchantActivityModifyResponse(AlipayResponse): def __init__(self): super(AlipayPcreditHuabeiMerchantActivityModifyResponse, self).__init__() self._aggr_id = None self._out_request_no =...
true
true
08f4c498a3766b1bf80343d0786690bdc72b8c4c
12,938
py
Python
tasks/summarization/decode.py
omri123/rotational-unit-of-memory
e796c841e1e837df09497ba77c3bc285db47d02d
[ "MIT" ]
82
2019-04-18T19:32:03.000Z
2022-03-19T00:50:56.000Z
tasks/summarization/decode.py
omri123/rotational-unit-of-memory
e796c841e1e837df09497ba77c3bc285db47d02d
[ "MIT" ]
4
2019-04-22T11:58:43.000Z
2020-05-31T01:43:03.000Z
tasks/summarization/decode.py
omri123/rotational-unit-of-memory
e796c841e1e837df09497ba77c3bc285db47d02d
[ "MIT" ]
26
2019-04-22T11:21:42.000Z
2021-11-29T06:01:10.000Z
"""This file contains code to run beam search decoding, including running ROUGE evaluation and producing JSON datafiles for the in-browser attention visualizer, which can be found here https://github.com/abisee/attn_vis""" import os import time import tensorflow as tf import beam_search import data import json import...
44.006803
222
0.60589
import os import time import tensorflow as tf import beam_search import data import json import pyrouge import util import logging import time from utils import * FLAGS = tf.flags.FLAGS SECS_UNTIL_NEW_CKPT = 60 class BeamSearchDecoder(object): def __init__(self, model, batcher, vocab, is_sd): self._...
true
true
08f4c49b9d8109e52b9a2f85472c9f51609b2dee
629
py
Python
tests/test_tutorial/test_where/test_tutorial008.py
spawn08/sqlmodel
02697459b8ea25cee72e81239828139698a66ac2
[ "MIT" ]
5,490
2021-08-24T14:27:44.000Z
2022-03-31T14:24:20.000Z
tests/test_tutorial/test_where/test_tutorial008.py
spawn08/sqlmodel
02697459b8ea25cee72e81239828139698a66ac2
[ "MIT" ]
231
2021-08-24T15:22:14.000Z
2022-03-30T14:39:44.000Z
tests/test_tutorial/test_where/test_tutorial008.py
spawn08/sqlmodel
02697459b8ea25cee72e81239828139698a66ac2
[ "MIT" ]
245
2021-08-24T15:00:27.000Z
2022-03-30T02:12:56.000Z
from unittest.mock import patch from sqlmodel import create_engine from ...conftest import get_testing_print_function def test_tutorial(clear_sqlmodel): from docs_src.tutorial.where import tutorial008 as mod mod.sqlite_url = "sqlite://" mod.engine = create_engine(mod.sqlite_url) calls = [] new...
27.347826
85
0.658188
from unittest.mock import patch from sqlmodel import create_engine from ...conftest import get_testing_print_function def test_tutorial(clear_sqlmodel): from docs_src.tutorial.where import tutorial008 as mod mod.sqlite_url = "sqlite://" mod.engine = create_engine(mod.sqlite_url) calls = [] new...
true
true
08f4c54362ba3935e9532af9ed55dfb1dbb6cf4f
8,148
py
Python
code/src/main/python/analysis/type_checking/type_checker.py
anonfse/COSAL_Anonymized
709906294fd775131f3e019862bbdd554d83773d
[ "Unlicense" ]
null
null
null
code/src/main/python/analysis/type_checking/type_checker.py
anonfse/COSAL_Anonymized
709906294fd775131f3e019862bbdd554d83773d
[ "Unlicense" ]
1
2021-11-03T08:28:31.000Z
2021-11-03T08:28:31.000Z
code/src/main/python/analysis/type_checking/type_checker.py
anonfse/COSAL_Anonymized
709906294fd775131f3e019862bbdd554d83773d
[ "Unlicense" ]
1
2022-03-22T14:24:13.000Z
2022-03-22T14:24:13.000Z
import sys import os sys.path.append(os.path.abspath(".")) sys.dont_write_bytecode = True import ast import textwrap from analysis.blocks import types from pytype import config from pytype.tools.annotate_ast import annotate_ast from pytype.pytd import pytd import properties __author__ = "COSAL" PYTHON_VERSION = (2...
37.548387
102
0.61242
import sys import os sys.path.append(os.path.abspath(".")) sys.dont_write_bytecode = True import ast import textwrap from analysis.blocks import types from pytype import config from pytype.tools.annotate_ast import annotate_ast from pytype.pytd import pytd import properties __author__ = "COSAL" PYTHON_VERSION = (2...
true
true
08f4c6d3ce1b35f477f2cea79fe06700e8a968e2
14,774
py
Python
Sheets/sheet1.py
trngb/watools
57b9074d59d856886675aa26014bfd6673d5da76
[ "Apache-2.0" ]
1
2019-02-27T08:25:00.000Z
2019-02-27T08:25:00.000Z
Sheets/sheet1.py
trngbich/watools
57b9074d59d856886675aa26014bfd6673d5da76
[ "Apache-2.0" ]
null
null
null
Sheets/sheet1.py
trngbich/watools
57b9074d59d856886675aa26014bfd6673d5da76
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Authors: Gonzalo Espinoza UNESCO-IHE 2016 Contact: g.espinoza@unesco-ihe.org Repository: https://github.com/wateraccounting/wa Module: Sheets/sheet1 """ import os import time import pandas as pd import xml.etree.ElementTree as ET import subprocess def create_sheet1(basin, period, ...
40.476712
84
0.587857
import os import time import pandas as pd import xml.etree.ElementTree as ET import subprocess def create_sheet1(basin, period, units, data, output, template=False): df = pd.read_csv(data, sep=';') df_i = df.loc[df.CLASS == "INFLOW"] df_s = df.loc[df.CLASS == "STORAGE"] df_o = df.loc[df.CLAS...
true
true
08f4c743157dd4eef07eef6d468cea6f858fd63d
22,173
py
Python
piicr-analysis/python_plotter_functions.py
lnies/lEval
da9ce344a713c7fb46d53417e44a2f56956a1b60
[ "MIT" ]
null
null
null
piicr-analysis/python_plotter_functions.py
lnies/lEval
da9ce344a713c7fb46d53417e44a2f56956a1b60
[ "MIT" ]
null
null
null
piicr-analysis/python_plotter_functions.py
lnies/lEval
da9ce344a713c7fb46d53417e44a2f56956a1b60
[ "MIT" ]
null
null
null
# --------------------------------------------------------------------------- # Written by Jonas Karthein in 2016/2017. Questions to jonas.karthein@cern.ch # --------------------------------------------------------------------------- import matplotlib as mpl mpl.use('Qt5Agg') import matplotlib.pyplot as plt import nu...
60.914835
583
0.576647
import matplotlib as mpl mpl.use('Qt5Agg') import matplotlib.pyplot as plt import numpy from mpl_toolkits.mplot3d import axes3d import mle import pylab as P import math import datetime from matplotlib.patches import Ellipse from matplotlib.offsetbox import AnchoredText from matplotlib import rcParams, gridspec import...
true
true
08f4c7dd93f022a1ed9c5a6db614f2c79c90d362
985
py
Python
astwro/sex/tests/test_sex_sacamp.py
majkelx/astwro
4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794
[ "MIT" ]
6
2017-06-15T20:34:51.000Z
2020-04-15T14:21:43.000Z
astwro/sex/tests/test_sex_sacamp.py
majkelx/astwro
4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794
[ "MIT" ]
18
2017-08-15T20:53:55.000Z
2020-10-05T23:40:34.000Z
astwro/sex/tests/test_sex_sacamp.py
majkelx/astwro
4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794
[ "MIT" ]
2
2017-11-06T15:33:53.000Z
2020-10-02T21:06:05.000Z
# coding=utf-8 from __future__ import absolute_import, division, print_function __metaclass__ = type import unittest from astwro.sex import Sextractor from astwro.sex import Scamp from astwro.sampledata import fits_image # TODO: switch to pytest class TestRunners(unittest.TestCase): def test_sextractor_run(sel...
25.25641
64
0.696447
from __future__ import absolute_import, division, print_function __metaclass__ = type import unittest from astwro.sex import Sextractor from astwro.sex import Scamp from astwro.sampledata import fits_image class TestRunners(unittest.TestCase): def test_sextractor_run(self): sex = Sextractor() s...
true
true
08f4c9555b5fc8850f1a8b6d7702e15022ac2f99
930
py
Python
uptime.py
alexyy802/chad-the-discord-bot
c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85
[ "Unlicense", "MIT" ]
1
2021-12-20T16:15:20.000Z
2021-12-20T16:15:20.000Z
uptime.py
alexyy802/chad-the-discord-bot
c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85
[ "Unlicense", "MIT" ]
1
2021-10-04T16:00:35.000Z
2021-10-04T16:00:35.000Z
uptime.py
alexyy802/chad-the-discord-bot
c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85
[ "Unlicense", "MIT" ]
2
2021-10-04T16:16:44.000Z
2021-11-15T19:19:07.000Z
import nextcord, datetime, time from nextcord.ext import commands start_time = time.time() class Uptime(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def uptime(self, ctx): current_time = time.time() difference = int(round(current_t...
33.214286
172
0.641935
import nextcord, datetime, time from nextcord.ext import commands start_time = time.time() class Uptime(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def uptime(self, ctx): current_time = time.time() difference = int(round(current_t...
true
true