hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7905dea82ab2b8864ab7722f158b90a224ebe103
18,434
py
Python
apps/amo/log.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
apps/amo/log.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
apps/amo/log.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
from inspect import isclass from django.conf import settings from django.core.files.storage import get_storage_class from celery.datastructures import AttributeDict from tower import ugettext_lazy as _ __all__ = ('LOG', 'LOG_BY_ID', 'LOG_KEEP',) class _LOG(object): action_class = None class CREATE_ADDON(_LOG...
23.909209
79
0.628241
from inspect import isclass from django.conf import settings from django.core.files.storage import get_storage_class from celery.datastructures import AttributeDict from tower import ugettext_lazy as _ __all__ = ('LOG', 'LOG_BY_ID', 'LOG_KEEP',) class _LOG(object): action_class = None class CREATE_ADDON(_LOG...
true
true
7905dfc7c425e90394fdec286d7de03051c3f68f
543
py
Python
yatube/manage.py
igredk/hw05_final
7232cd789886bf21a85d2a9ea3c5f0ad7e4a676f
[ "MIT" ]
null
null
null
yatube/manage.py
igredk/hw05_final
7232cd789886bf21a85d2a9ea3c5f0ad7e4a676f
[ "MIT" ]
null
null
null
yatube/manage.py
igredk/hw05_final
7232cd789886bf21a85d2a9ea3c5f0ad7e4a676f
[ "MIT" ]
null
null
null
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'yatube.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
25.857143
73
0.672192
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'yatube.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
7905e0444ba3fed64a961b6e513973ffcc55751e
5,249
py
Python
autotest/ogr/ogr_edigeo.py
drons/gdal
333b9071b98c2651bded9a4087511031499a8232
[ "MIT" ]
1
2019-12-20T09:17:19.000Z
2019-12-20T09:17:19.000Z
autotest/ogr/ogr_edigeo.py
GISerliang/gdal
63bf84c3477f09d30037e7c8d70d4c20c1475e6d
[ "MIT" ]
null
null
null
autotest/ogr/ogr_edigeo.py
GISerliang/gdal
63bf84c3477f09d30037e7c8d70d4c20c1475e6d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR EDIGEO driver. # Author: Even Rouault <even dot rouault at mines dash paris dot org> # ####################...
38.036232
305
0.600495
true
true
7905e13da1b41684a3b14e4463dadd2f3d84b3d5
11,140
py
Python
formulas/legendre_polynomial.py
pascalmolin/fungrim
f498ad76a385fe7a3b932a314747b7aa2ff475da
[ "MIT" ]
null
null
null
formulas/legendre_polynomial.py
pascalmolin/fungrim
f498ad76a385fe7a3b932a314747b7aa2ff475da
[ "MIT" ]
null
null
null
formulas/legendre_polynomial.py
pascalmolin/fungrim
f498ad76a385fe7a3b932a314747b7aa2ff475da
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .expr import * def_Topic( Title("Legendre polynomials"), Section("Particular values"), Entries( "9bdf22", "217521", "d77f0a", "9b7f05", "a17386", "13f971", "a7ac51", "3df748", "674afa", "85eebc", ...
35.141956
172
0.621095
from .expr import * def_Topic( Title("Legendre polynomials"), Section("Particular values"), Entries( "9bdf22", "217521", "d77f0a", "9b7f05", "a17386", "13f971", "a7ac51", "3df748", "674afa", "85eebc", ), Section("Recu...
true
true
7905e1c552bc7111741db6f3273e57b8ac22efa6
2,607
py
Python
dbestclient/ml/modeltrainer.py
horeapinca/DBEstClient
6ccbb24853c31f2a8cc567e03c09ca7aa31e2d26
[ "BSD-2-Clause" ]
null
null
null
dbestclient/ml/modeltrainer.py
horeapinca/DBEstClient
6ccbb24853c31f2a8cc567e03c09ca7aa31e2d26
[ "BSD-2-Clause" ]
null
null
null
dbestclient/ml/modeltrainer.py
horeapinca/DBEstClient
6ccbb24853c31f2a8cc567e03c09ca7aa31e2d26
[ "BSD-2-Clause" ]
1
2020-09-28T14:22:54.000Z
2020-09-28T14:22:54.000Z
# Created by Qingzhi Ma at 2019-07-24 # All right reserved # Department of Computer Science # the University of Warwick # Q.Ma.2@warwick.ac.uk from dbestclient.ml.density import DBEstDensity from dbestclient.ml.modelwraper import SimpleModelWrapper, GroupByModelWrapper from dbestclient.ml.regression import DBEstReg fro...
44.186441
150
0.67127
from dbestclient.ml.density import DBEstDensity from dbestclient.ml.modelwraper import SimpleModelWrapper, GroupByModelWrapper from dbestclient.ml.regression import DBEstReg from dbestclient.tools.dftools import convert_df_to_yx import numpy as np class SimpleModelTrainer: def __init__(self, mdl, tbl, xhead...
true
true
7905e265e3a23f6356c81958a75c9da793f3554e
3,080
py
Python
src/posts/models.py
zulune/Just-Django-Blog
b0b63ab76702194489958f832e84a0b933fa3e37
[ "MIT" ]
null
null
null
src/posts/models.py
zulune/Just-Django-Blog
b0b63ab76702194489958f832e84a0b933fa3e37
[ "MIT" ]
null
null
null
src/posts/models.py
zulune/Just-Django-Blog
b0b63ab76702194489958f832e84a0b933fa3e37
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth import get_user_model from django.urls import reverse from django.utils.translation import gettext_lazy as _ from tinymce import HTMLField # Create your models here. User = get_user_model() class PostView(models.Model): user = models.ForeignKey...
33.11828
80
0.667208
from django.db import models from django.contrib.auth import get_user_model from django.urls import reverse from django.utils.translation import gettext_lazy as _ from tinymce import HTMLField User = get_user_model() class PostView(models.Model): user = models.ForeignKey(User, verbose_name=_( ...
true
true
7905e26922f7308b806416ab5d42cce6c45c8f84
304
py
Python
Python/PycharmProjects/aula 8/1.py
MarcelaSamili/Desafios-do-curso-de-Python
f331e91821c0c25b3e32d2075254ef650292f280
[ "MIT" ]
null
null
null
Python/PycharmProjects/aula 8/1.py
MarcelaSamili/Desafios-do-curso-de-Python
f331e91821c0c25b3e32d2075254ef650292f280
[ "MIT" ]
null
null
null
Python/PycharmProjects/aula 8/1.py
MarcelaSamili/Desafios-do-curso-de-Python
f331e91821c0c25b3e32d2075254ef650292f280
[ "MIT" ]
null
null
null
#modo indireto '''import math num = int(input('Digite um número: ')) raiz = math.sqrt(num) print('A raiz de {} é {}'.format(num, math.ceil(raiz)))''' #modo direto from math import sqrt, floor num = int(input('Digite um número:')) raiz = sqrt(num) print('A raiz de {} é {:.2f}'.format(num, floor(raiz)))
25.333333
58
0.651316
from math import sqrt, floor num = int(input('Digite um número:')) raiz = sqrt(num) print('A raiz de {} é {:.2f}'.format(num, floor(raiz)))
true
true
7905e2765b295dcc4b11151752c0c203cbc906a2
43,555
py
Python
NabBot-master/utils/tibia.py
LadyKeladry/Guardian-Bot
c7cf061b8502aa7b91fa98396160861e0c0fb715
[ "Apache-2.0" ]
null
null
null
NabBot-master/utils/tibia.py
LadyKeladry/Guardian-Bot
c7cf061b8502aa7b91fa98396160861e0c0fb715
[ "Apache-2.0" ]
null
null
null
NabBot-master/utils/tibia.py
LadyKeladry/Guardian-Bot
c7cf061b8502aa7b91fa98396160861e0c0fb715
[ "Apache-2.0" ]
null
null
null
import asyncio import io from PIL import Image from PIL import ImageDraw from discord import Colour import datetime import urllib import urllib.request import aiohttp import re from datetime import datetime, date, timedelta from calendar import timegm import time from utils.database import userDataba...
43.123762
225
0.536678
import asyncio import io from PIL import Image from PIL import ImageDraw from discord import Colour import datetime import urllib import urllib.request import aiohttp import re from datetime import datetime, date, timedelta from calendar import timegm import time from utils.database import userDataba...
true
true
7905e36603609b025ea50a6cd7eb20e7b67226cd
2,410
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py
ingenioustechie/cookiecutter-django-openshift
89c94363ca4a6e5ad7ec16fd33d461c5ec0f0492
[ "Apache-2.0" ]
4
2016-10-28T00:34:13.000Z
2017-10-20T02:08:09.000Z
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py
ingenioustechie/cookiecutter-django-openshift
89c94363ca4a6e5ad7ec16fd33d461c5ec0f0492
[ "Apache-2.0" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py
ingenioustechie/cookiecutter-django-openshift
89c94363ca4a6e5ad7ec16fd33d461c5ec0f0492
[ "Apache-2.0" ]
1
2020-04-07T10:07:07.000Z
2020-04-07T10:07:07.000Z
{% if cookiecutter.use_celery == 'y' %} from __future__ import absolute_import import os from celery import Celery from django.apps import AppConfig from django.conf import settings if not settings.configured: # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SET...
38.253968
99
0.688797
{% if cookiecutter.use_celery == 'y' %} from __future__ import absolute_import import os from celery import Celery from django.apps import AppConfig from django.conf import settings if not settings.configured: os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') app = Celery('{{cookie...
false
true
7905e54108efe55b750029ad1ec3248f1f786037
11,291
py
Python
glue/viewers/matplotlib/state.py
nilswagner/glue
1e16776f557482cc8444d2b8ecbb813ce691a70d
[ "BSD-3-Clause" ]
null
null
null
glue/viewers/matplotlib/state.py
nilswagner/glue
1e16776f557482cc8444d2b8ecbb813ce691a70d
[ "BSD-3-Clause" ]
null
null
null
glue/viewers/matplotlib/state.py
nilswagner/glue
1e16776f557482cc8444d2b8ecbb813ce691a70d
[ "BSD-3-Clause" ]
null
null
null
from echo import CallbackProperty, SelectionCallbackProperty, keep_in_sync, delay_callback from matplotlib.colors import to_rgba from glue.core.message import LayerArtistUpdatedMessage from glue.core.state_objects import State from glue.viewers.common.state import ViewerState, LayerState from glue.utils import defe...
38.404762
107
0.666726
from echo import CallbackProperty, SelectionCallbackProperty, keep_in_sync, delay_callback from matplotlib.colors import to_rgba from glue.core.message import LayerArtistUpdatedMessage from glue.core.state_objects import State from glue.viewers.common.state import ViewerState, LayerState from glue.utils import defe...
true
true
7905e573e10479646c055b28a8389b6a9e6ef922
15,766
py
Python
train_180131_2.py
OsciiArt/Cookpad
b2245f84db0650d6282c97c98600de825c6ed6e0
[ "MIT" ]
null
null
null
train_180131_2.py
OsciiArt/Cookpad
b2245f84db0650d6282c97c98600de825c6ed6e0
[ "MIT" ]
null
null
null
train_180131_2.py
OsciiArt/Cookpad
b2245f84db0650d6282c97c98600de825c6ed6e0
[ "MIT" ]
null
null
null
import numpy as np # linear algebra np.random.seed(42) import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from sklearn.model_selection import train_test_split from matplotlib import pyplot import time import os, glob import cv2 # parameters format = "%H%M" ts = time.strftime(format) base_name = os....
35.669683
117
0.571356
import numpy as np np.random.seed(42) import pandas as pd from sklearn.model_selection import train_test_split from matplotlib import pyplot import time import os, glob import cv2 format = "%H%M" ts = time.strftime(format) base_name = os.path.splitext(__file__)[0] + "_ts" + ts input_size = 128 from keras.preproce...
true
true
7905e5c9e9b982c826e59096d4908cf7e176b040
1,208
py
Python
test/functional/rpc_named_arguments.py
orobio/gulden-official
a329faf163b15eabc7ff1d9f07ea87f66df8d27d
[ "MIT" ]
158
2016-01-08T10:38:37.000Z
2022-02-01T06:28:05.000Z
test/functional/rpc_named_arguments.py
orobio/gulden-official
a329faf163b15eabc7ff1d9f07ea87f66df8d27d
[ "MIT" ]
196
2015-11-19T10:59:24.000Z
2021-10-07T14:52:13.000Z
test/functional/rpc_named_arguments.py
orobio/gulden-official
a329faf163b15eabc7ff1d9f07ea87f66df8d27d
[ "MIT" ]
71
2016-06-25T23:29:04.000Z
2022-03-14T10:57:19.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test using named arguments for RPCs.""" from test_framework.test_framework import GuldenTestFramework ...
34.514286
101
0.679636
from test_framework.test_framework import GuldenTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, ) class NamedArgumentTest(GuldenTestFramework): def set_test_params(self): self.num_nodes = 1 def run_test(self): node = self.nodes[0] h =...
true
true
7905e60159629ca5c376e64caf6d3c85fa260c4a
1,016
py
Python
src/schemathesis/cli/output/short.py
chr1st1ank/schemathesis
f2e160d56c1fdce9eac7fee5875b209c8944f54a
[ "MIT" ]
1
2021-06-22T20:01:24.000Z
2021-06-22T20:01:24.000Z
src/schemathesis/cli/output/short.py
RonnyPfannschmidt/schemathesis
3542d91d2e7402235e7b2dc995ed7017a0265ff6
[ "MIT" ]
null
null
null
src/schemathesis/cli/output/short.py
RonnyPfannschmidt/schemathesis
3542d91d2e7402235e7b2dc995ed7017a0265ff6
[ "MIT" ]
null
null
null
import click from ...runner import events from . import default def handle_after_execution(context: events.ExecutionContext, event: events.AfterExecution) -> None: context.endpoints_processed += 1 default.display_execution_result(context, event) if context.endpoints_processed == event.schema.endpoints_co...
36.285714
99
0.748031
import click from ...runner import events from . import default def handle_after_execution(context: events.ExecutionContext, event: events.AfterExecution) -> None: context.endpoints_processed += 1 default.display_execution_result(context, event) if context.endpoints_processed == event.schema.endpoints_co...
true
true
7905e71fcd2fade30f66daa8e3f4a6a410a2ba76
33,141
py
Python
python/ccxt/async_support/livecoin.py
caoshitong369/ccxt
e0f183448bbf8f95e84c71e5f185404dabab3955
[ "MIT" ]
3
2020-06-02T10:48:48.000Z
2022-03-12T20:46:01.000Z
python/ccxt/async_support/livecoin.py
caoshitong369/ccxt
e0f183448bbf8f95e84c71e5f185404dabab3955
[ "MIT" ]
3
2020-09-08T00:13:39.000Z
2021-05-08T20:05:48.000Z
python/ccxt/async_support/livecoin.py
caoshitong369/ccxt
e0f183448bbf8f95e84c71e5f185404dabab3955
[ "MIT" ]
1
2020-03-16T03:22:17.000Z
2020-03-16T03:22:17.000Z
# -*- 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.async_support.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base....
39.406659
160
0.50264
rt.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.errors import ...
true
true
7905e75924613ecbc9cd377ce8bfe419febd280c
8,372
py
Python
container_sdk/model/next_builder/storyboard_node_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
container_sdk/model/next_builder/storyboard_node_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
container_sdk/model/next_builder/storyboard_node_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: storyboard_node.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.prot...
52.987342
992
0.774845
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) 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 ...
true
true
7905e8c4689bed6057d5fcb5d2b0b1513da8aebc
32
py
Python
mica/archive/cda/__init__.py
sot/mica
136a9b0d9521efda5208067b51cf0c8700b4def3
[ "BSD-3-Clause" ]
null
null
null
mica/archive/cda/__init__.py
sot/mica
136a9b0d9521efda5208067b51cf0c8700b4def3
[ "BSD-3-Clause" ]
150
2015-01-23T17:09:53.000Z
2022-01-10T00:50:54.000Z
mica/archive/cda/__init__.py
sot/mica
136a9b0d9521efda5208067b51cf0c8700b4def3
[ "BSD-3-Clause" ]
null
null
null
from .services import * # noqa
16
31
0.6875
from .services import *
true
true
7905e91cb65508a065d22c4e68d6f5a7bd8ca20b
21,845
py
Python
saleor/graphql/core/mutations.py
quito418/saleor
83b831b80472d87e154b2b5bd19390c674350bfb
[ "CC-BY-4.0" ]
1
2020-04-08T14:24:43.000Z
2020-04-08T14:24:43.000Z
saleor/graphql/core/mutations.py
weeraravee/saleor
83b831b80472d87e154b2b5bd19390c674350bfb
[ "CC-BY-4.0" ]
2
2020-06-07T08:48:01.000Z
2020-06-07T08:48:02.000Z
saleor/graphql/core/mutations.py
loftwah/saleor
afcdfca0f125147b7f0d4c07993e99608a5ba875
[ "CC-BY-4.0" ]
1
2021-03-02T01:50:41.000Z
2021-03-02T01:50:41.000Z
from itertools import chain from typing import Tuple, Union import graphene from django.contrib.auth import get_user_model from django.core.exceptions import ( NON_FIELD_ERRORS, ImproperlyConfigured, ValidationError, ) from django.db.models.fields.files import FileField from graphene import ObjectType from...
34.132813
89
0.614603
from itertools import chain from typing import Tuple, Union import graphene from django.contrib.auth import get_user_model from django.core.exceptions import ( NON_FIELD_ERRORS, ImproperlyConfigured, ValidationError, ) from django.db.models.fields.files import FileField from graphene import ObjectType from...
true
true
7905e9a632aa32579c15c353a9b819919c074e03
3,985
py
Python
courseraprogramming/commands/config.py
andres-zartab/courseraprogramming
e50dda898c879a3f45d44da3f8516cd660c74453
[ "Apache-2.0" ]
40
2015-09-29T20:26:47.000Z
2021-07-13T07:53:23.000Z
courseraprogramming/commands/config.py
andres-zartab/courseraprogramming
e50dda898c879a3f45d44da3f8516cd660c74453
[ "Apache-2.0" ]
59
2015-07-27T23:07:00.000Z
2020-12-11T06:32:32.000Z
courseraprogramming/commands/config.py
andres-zartab/courseraprogramming
e50dda898c879a3f45d44da3f8516cd660c74453
[ "Apache-2.0" ]
24
2015-10-16T14:35:04.000Z
2020-10-14T08:40:38.000Z
#!/usr/bin/env python # Copyright 2015 Coursera # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
33.208333
78
0.658971
from courseraprogramming.commands import oauth2 import requests import logging import time import sys def check_auth(args): oauth2_instance = oauth2.build_oauth2(args) auth = oauth2_instance.build_authorizer() my_profile_url = ( 'https://api.coursera.org/api/externalBasicProfiles....
true
true
7905eb2099a719d5d5701255b92326e433ccbf4f
41,177
py
Python
featuremapper/distribution.py
fcr/featuremapper
b999110dce9bbbdf4b6dbd2d13bfca1596064c6a
[ "BSD-3-Clause" ]
2
2018-03-29T18:52:58.000Z
2019-05-07T17:36:35.000Z
featuremapper/distribution.py
fcr/featuremapper
b999110dce9bbbdf4b6dbd2d13bfca1596064c6a
[ "BSD-3-Clause" ]
7
2016-11-15T13:02:41.000Z
2019-10-21T19:59:31.000Z
featuremapper/distribution.py
fcr/featuremapper
b999110dce9bbbdf4b6dbd2d13bfca1596064c6a
[ "BSD-3-Clause" ]
5
2015-09-06T18:11:55.000Z
2018-12-19T10:48:52.000Z
""" Distribution class """ # To do: # # - wrap bins for cyclic histograms # - check use of float() in count_mag() etc # - clarify comment about negative selectivity # # - function to return value in a range (like a real histogram) # - cache values # - assumes cyclic axes start at 0: include a shift based on range # # -...
35.28449
107
0.624888
import numpy as np import param import cmath import math unavailable_scipy_optimize = False try: from scipy import optimize except ImportError: param.Parameterized().debug("scipy.optimize not available, dummy von Mises fit") unavailable_scipy_optimize = True def wrap(lower, upper, x): ...
true
true
7905edaab8ffaa2ad86e256c81f61f43552bccf1
1,189
py
Python
.circleci/scripts/pre_commit_readme_extra.py
astronomer/astronomer-providers
e19c656daab19f3e881f140495e2184c16eaafe0
[ "Apache-2.0" ]
27
2022-03-02T04:49:54.000Z
2022-03-30T13:19:02.000Z
.circleci/scripts/pre_commit_readme_extra.py
astronomer/astronomer-providers
e19c656daab19f3e881f140495e2184c16eaafe0
[ "Apache-2.0" ]
92
2022-03-02T08:01:31.000Z
2022-03-31T19:47:33.000Z
.circleci/scripts/pre_commit_readme_extra.py
astronomer/astronomer-providers
e19c656daab19f3e881f140495e2184c16eaafe0
[ "Apache-2.0" ]
2
2022-03-07T17:39:41.000Z
2022-03-18T20:37:03.000Z
#!/usr/bin/env python3 """Pre-commit hook to verify that all extras are documented in README.rst""" import configparser import re from pathlib import Path repo_dir = Path(__file__).parent.parent.parent config = configparser.ConfigParser(strict=False) config.read(repo_dir / "setup.cfg") all_extra = [] extra_to_exclud...
24.265306
76
0.666947
import configparser import re from pathlib import Path repo_dir = Path(__file__).parent.parent.parent config = configparser.ConfigParser(strict=False) config.read(repo_dir / "setup.cfg") all_extra = [] extra_to_exclude = {"tests", "mypy", "docs"} all_extras = set(config["options.extras_require"].keys()) - extra_to_...
true
true
7905ee74f070737c45e294353b215f55a3fb7b86
20,260
py
Python
tensorflow/python/training/checkpoint_utils.py
KodeWorker/tensorflow
a7f91fd5ce53253ab4bfd6448886028a085e0ddf
[ "Apache-2.0" ]
null
null
null
tensorflow/python/training/checkpoint_utils.py
KodeWorker/tensorflow
a7f91fd5ce53253ab4bfd6448886028a085e0ddf
[ "Apache-2.0" ]
null
null
null
tensorflow/python/training/checkpoint_utils.py
KodeWorker/tensorflow
a7f91fd5ce53253ab4bfd6448886028a085e0ddf
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 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...
41.516393
104
0.699161
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import six from tensorflow.core.protobuf import saver_pb2 from tensorflow.python.distribute import distribution_strategy_context from tensorflow.python.framework import ops from tens...
true
true
7905eed07b7ffa5affb2cc2395fe6035e0323680
787
py
Python
Chatbot_investment/chatbot/investment_bot/migrations/0006_section_deduction.py
dreamvrutik/Investment-Chatbot
aae7f9a500a2ac1f7d9a310b2eb5334f18e547fc
[ "MIT" ]
5
2019-07-12T10:48:28.000Z
2020-01-02T11:55:43.000Z
Chatbot_investment/chatbot/investment_bot/migrations/0006_section_deduction.py
dreamvrutik/Investment-Chatbot
aae7f9a500a2ac1f7d9a310b2eb5334f18e547fc
[ "MIT" ]
null
null
null
Chatbot_investment/chatbot/investment_bot/migrations/0006_section_deduction.py
dreamvrutik/Investment-Chatbot
aae7f9a500a2ac1f7d9a310b2eb5334f18e547fc
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2019-07-10 04:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('investment_bot', '0005_amount_restrictions'), ] operations = [ migrations.CreateModel( name='Section_Deduction', fie...
31.48
114
0.584498
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('investment_bot', '0005_amount_restrictions'), ] operations = [ migrations.CreateModel( name='Section_Deduction', fields=[ ('id', models.AutoField(a...
true
true
7905eefd15e94ab3709bbdedb8181f2b1681d86c
686
py
Python
CSDP/teachers/forms.py
Ravyo/Department-Portal
509f1426c785653499f49e7afdc882fe1afbe9a1
[ "bzip2-1.0.6" ]
null
null
null
CSDP/teachers/forms.py
Ravyo/Department-Portal
509f1426c785653499f49e7afdc882fe1afbe9a1
[ "bzip2-1.0.6" ]
null
null
null
CSDP/teachers/forms.py
Ravyo/Department-Portal
509f1426c785653499f49e7afdc882fe1afbe9a1
[ "bzip2-1.0.6" ]
null
null
null
from django import forms class AddTeacherForm(forms.Form): name = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'teacher name' })) teacher_pin = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': '...
29.826087
64
0.620991
from django import forms class AddTeacherForm(forms.Form): name = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'teacher name' })) teacher_pin = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': '...
true
true
7905ef1c2dea948435c93fdd7beb5937b06bf7ef
1,821
py
Python
facial_recog/tests/test_app.py
MePsyDuck/amfr
691d9270dece8846a5bbb64ba4f2bdea95ee05e5
[ "MIT" ]
null
null
null
facial_recog/tests/test_app.py
MePsyDuck/amfr
691d9270dece8846a5bbb64ba4f2bdea95ee05e5
[ "MIT" ]
null
null
null
facial_recog/tests/test_app.py
MePsyDuck/amfr
691d9270dece8846a5bbb64ba4f2bdea95ee05e5
[ "MIT" ]
null
null
null
import unittest from facial_recog.app import * from .test_config import test_run_count, seed, success_perc from .test_util import * class TestFR(unittest.TestCase): subject_names = dict() subject_classes = dict() def setUp(self): random.seed(seed) create_app_dirs() setup_logger(...
30.864407
116
0.645799
import unittest from facial_recog.app import * from .test_config import test_run_count, seed, success_perc from .test_util import * class TestFR(unittest.TestCase): subject_names = dict() subject_classes = dict() def setUp(self): random.seed(seed) create_app_dirs() setup_logger(...
true
true
7905efdeb2cb65c63ae5dc436169a282e8b3aa04
8,743
py
Python
src/datasets.py
IssamLaradji/SSR
90623188abb4dd9f30566faa2f170a76db9e1846
[ "Apache-2.0" ]
2
2021-08-24T14:56:49.000Z
2022-01-24T16:10:59.000Z
src/datasets.py
IssamLaradji/SSR
90623188abb4dd9f30566faa2f170a76db9e1846
[ "Apache-2.0" ]
1
2022-02-20T12:47:54.000Z
2022-02-20T13:44:51.000Z
src/datasets.py
IssamLaradji/SSR
90623188abb4dd9f30566faa2f170a76db9e1846
[ "Apache-2.0" ]
null
null
null
import os import soft_renderer.functional as srf import torch, random import numpy as np import tqdm from haven import haven_utils as hu from PIL import Image, ImageOps, ImageFilter import torchvision.transforms as transforms class_ids_map = { '02691156': 'Airplane', '02828884': 'Bench', '02933112': 'Cabi...
34.557312
121
0.566396
import os import soft_renderer.functional as srf import torch, random import numpy as np import tqdm from haven import haven_utils as hu from PIL import Image, ImageOps, ImageFilter import torchvision.transforms as transforms class_ids_map = { '02691156': 'Airplane', '02828884': 'Bench', '02933112': 'Cabi...
true
true
7905f03a441eefda9fb5fa0e8571a2c5aec55ec0
1,740
py
Python
sia_load_tester/upload_queue.py
mtlynch/sia_load_tester
f4e2785e6dbceb1cf9c912ccb2fad49617102afb
[ "MIT" ]
6
2018-03-01T04:06:50.000Z
2020-07-28T12:28:28.000Z
sia_load_tester/upload_queue.py
mtlynch/sia_load_tester
f4e2785e6dbceb1cf9c912ccb2fad49617102afb
[ "MIT" ]
40
2018-02-09T00:41:41.000Z
2018-04-20T04:02:57.000Z
sia_load_tester/upload_queue.py
mtlynch/sia_load_tester
f4e2785e6dbceb1cf9c912ccb2fad49617102afb
[ "MIT" ]
null
null
null
import logging import Queue import sia_client as sc logger = logging.getLogger(__name__) def from_upload_jobs(upload_jobs): """Creates a new upload queue from a list of upload jobs. Creates a new queue of files to upload by starting with the full input dataset and removing any files that are uploaded (...
32.222222
77
0.711494
import logging import Queue import sia_client as sc logger = logging.getLogger(__name__) def from_upload_jobs(upload_jobs): return from_upload_jobs_and_sia_client(upload_jobs, sc.make_sia_client()) def from_upload_jobs_and_sia_client(upload_jobs, sia_client): sia_paths = _get_sia_paths(sia_client) ...
true
true
7905f1b56399335e5398c7ecbe2e6178f69ae07f
9,763
py
Python
src/azure-cli/azure/cli/command_modules/monitor/operations/metric_alert.py
akashsinghal/azure-cli
8ab2f7604a834de790bdea849b3e83f2466428b9
[ "MIT" ]
2
2020-08-08T11:00:25.000Z
2020-08-08T11:00:30.000Z
src/azure-cli/azure/cli/command_modules/monitor/operations/metric_alert.py
cindywu/azure-cli
bd011cb91ac6e0ac89f53e1105d76ea30b6609a0
[ "MIT" ]
1
2021-06-02T02:49:48.000Z
2021-06-02T02:49:48.000Z
src/azure-cli/azure/cli/command_modules/monitor/operations/metric_alert.py
cindywu/azure-cli
bd011cb91ac6e0ac89f53e1105d76ea30b6609a0
[ "MIT" ]
1
2020-07-31T17:22:13.000Z
2020-07-31T17:22:13.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
42.447826
116
0.679402
from azure.cli.command_modules.monitor.util import get_operator_map, get_aggregation_map from knack.log import get_logger logger = get_logger(__name__) def create_metric_alert(client, resource_group_name, rule_name, scopes, condition, disabled=False, description=None, tags=None, actions...
true
true
7905f3416d52bfdfea15dde1aab7a233aaf5554b
274
py
Python
solutions/example2.py
ricleal/IPythonParallel
c0b9446553dc709e918c6e8fb437b0d55bfba38d
[ "BSD-3-Clause" ]
23
2015-04-29T00:38:20.000Z
2021-11-28T13:38:20.000Z
solutions/example2.py
ricleal/IPythonParallel
c0b9446553dc709e918c6e8fb437b0d55bfba38d
[ "BSD-3-Clause" ]
null
null
null
solutions/example2.py
ricleal/IPythonParallel
c0b9446553dc709e918c6e8fb437b0d55bfba38d
[ "BSD-3-Clause" ]
20
2015-01-24T02:43:42.000Z
2021-08-29T05:52:06.000Z
def estimate_pi_parallel(N, lview, N_per_trial=1E6): result = lview.map(estimate_pi, [N_per_trial for i in range(N)]) while not result.ready(): print(result.progress) time.sleep(0.5) return np.mean(list(result)) estimate_pi_parallel(100, lview)
30.444444
68
0.693431
def estimate_pi_parallel(N, lview, N_per_trial=1E6): result = lview.map(estimate_pi, [N_per_trial for i in range(N)]) while not result.ready(): print(result.progress) time.sleep(0.5) return np.mean(list(result)) estimate_pi_parallel(100, lview)
true
true
7905f3c291e6e5a8390af86d158774626c12c33c
2,383
py
Python
code/extract_balanced.py
tedunderwood/biographies
aba7b7180aea944bdc4fa163b0008eca34fe73cc
[ "MIT" ]
1
2019-04-22T16:41:52.000Z
2019-04-22T16:41:52.000Z
code/extract_balanced.py
afcarl/biographies
b79dbd054fca10860d2c5a89d9c5ab1df8a93642
[ "MIT" ]
null
null
null
code/extract_balanced.py
afcarl/biographies
b79dbd054fca10860d2c5a89d9c5ab1df8a93642
[ "MIT" ]
1
2019-11-07T00:50:52.000Z
2019-11-07T00:50:52.000Z
#!/usr/bin/python3 import sys import os import shutil import csv import zipfile import pandas as pd import glob infile = sys.argv[1] outfile = sys.argv[2] # remove holding_folder if it exists, and create new folder # use 'rm -r /holding_folder/* in shell script instead?' holding_path = '/media/secure_volume/holding_...
34.042857
90
0.684012
import sys import os import shutil import csv import zipfile import pandas as pd import glob infile = sys.argv[1] outfile = sys.argv[2] holding_path = '/media/secure_volume/holding_folder' if os.path.isdir(holding_path): shutil.rmtree(holding_path) os.mkdir(holding_path) def extract(infile): ...
true
true
7905f3f184c24f1c21f5d4f050373b4a61b5cad9
2,051
py
Python
{{cookiecutter.project_name}}/server/settings/environments/production.py
alisher-matkurbanov/wemake-django-template
28d17211d5a9f466a7281006a09775b1e6ad1ef1
[ "MIT" ]
3
2020-02-26T05:57:13.000Z
2020-03-09T17:07:18.000Z
{{cookiecutter.project_name}}/server/settings/environments/production.py
neilwithdata/wemake-django-template
fde107312b7649483c65d118e172045ff362482c
[ "MIT" ]
null
null
null
{{cookiecutter.project_name}}/server/settings/environments/production.py
neilwithdata/wemake-django-template
fde107312b7649483c65d118e172045ff362482c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This file contains all the settings used in production. This file is required and if development.py is present these values are overridden. """ from server.settings.components import config # Production flags: # https://docs.djangoproject.com/en/2.2/howto/deployment/ DEBUG = False ALLO...
26.294872
78
0.736714
from server.settings.components import config DEBUG = False ALLOWED_HOSTS = [ config('DOMAIN_NAME'), 'localhost', ] _COLLECTSTATIC_DRYRUN = config( 'DJANGO_COLLECTSTATIC_DRYRUN', cast=bool, default=False, ) STATIC_ROOT = '.static' if _COLLECTSTATIC_DRYRUN else '/var/www/django/sta...
true
true
7905f4524960f4cccee78e6bb449aed957ac73a5
344
py
Python
simpleproject/simpleproject/urls.py
Shailendre/simpleproject
cd7319636d0569be06bb9dab4c5546c1e9542b07
[ "BSD-2-Clause" ]
null
null
null
simpleproject/simpleproject/urls.py
Shailendre/simpleproject
cd7319636d0569be06bb9dab4c5546c1e9542b07
[ "BSD-2-Clause" ]
null
null
null
simpleproject/simpleproject/urls.py
Shailendre/simpleproject
cd7319636d0569be06bb9dab4c5546c1e9542b07
[ "BSD-2-Clause" ]
null
null
null
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', 'simpleproject.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^simpleapp/', includ...
26.461538
58
0.65407
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^simpleapp/', include('simpleapp.urls')), ]
true
true
7905f488b9660c83bf66292c28660458e9c7c2d7
104
py
Python
schema/datasets/__init__.py
brianhie/schema
6ab3ed7a25c5ebff9974f2316cea0e120812d888
[ "MIT" ]
14
2019-11-07T14:28:15.000Z
2022-01-03T09:30:40.000Z
schema/datasets/__init__.py
brianhie/schema
6ab3ed7a25c5ebff9974f2316cea0e120812d888
[ "MIT" ]
1
2021-09-02T06:56:48.000Z
2021-09-02T17:46:07.000Z
schema/datasets/__init__.py
brianhie/schema
6ab3ed7a25c5ebff9974f2316cea0e120812d888
[ "MIT" ]
2
2019-11-07T12:44:10.000Z
2021-12-27T03:14:40.000Z
from ._datasets import fly_brain, scicar_mouse_kidney __all__ = ['fly_brain', 'scicar_mouse_kidney']
17.333333
53
0.788462
from ._datasets import fly_brain, scicar_mouse_kidney __all__ = ['fly_brain', 'scicar_mouse_kidney']
true
true
7905f4dde9438dceb8325a94f48f3247be4eba95
5,975
py
Python
src/rl_coach_2020_v2/src/markov/s3_client.py
adam-aph/deepracer-local
fec4d55867245168ab76a2096e345ef27977b356
[ "MIT" ]
1
2020-05-15T00:34:11.000Z
2020-05-15T00:34:11.000Z
src/rl_coach_2020_v2/src/markov/s3_client.py
adam-aph/deepracer-local
fec4d55867245168ab76a2096e345ef27977b356
[ "MIT" ]
null
null
null
src/rl_coach_2020_v2/src/markov/s3_client.py
adam-aph/deepracer-local
fec4d55867245168ab76a2096e345ef27977b356
[ "MIT" ]
1
2020-06-06T10:49:36.000Z
2020-06-06T10:49:36.000Z
import io import logging import os import json import time import boto3 import botocore from markov.utils import log_and_exit, Logger, get_boto_config, \ SIMAPP_EVENT_ERROR_CODE_500, SIMAPP_EVENT_ERROR_CODE_400, \ SIMAPP_S3_DATA_STORE_EXCEPTION LOG = Logger(__name__, l...
44.589552
125
0.604017
import io import logging import os import json import time import boto3 import botocore from markov.utils import log_and_exit, Logger, get_boto_config, \ SIMAPP_EVENT_ERROR_CODE_500, SIMAPP_EVENT_ERROR_CODE_400, \ SIMAPP_S3_DATA_STORE_EXCEPTION LOG = Logger(__name__, l...
true
true
7905f564673f69a1aaca662f3425b71609c826b5
775
py
Python
setup.py
Kuzyashin/faust-pydantic-validate
727c01f976febcd24df8cb6a60110fbf22c23be2
[ "MIT" ]
null
null
null
setup.py
Kuzyashin/faust-pydantic-validate
727c01f976febcd24df8cb6a60110fbf22c23be2
[ "MIT" ]
null
null
null
setup.py
Kuzyashin/faust-pydantic-validate
727c01f976febcd24df8cb6a60110fbf22c23be2
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="faust_pydantic_validate", version="0.0.1", author="Alexey Kuzyashin", author_email="alex@rocketcompute.com", description="A small decorator for post data view validation", long_descrip...
28.703704
66
0.651613
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="faust_pydantic_validate", version="0.0.1", author="Alexey Kuzyashin", author_email="alex@rocketcompute.com", description="A small decorator for post data view validation", long_descrip...
true
true
7905f588d6333aa9b18a921376827b4f4116f3cb
1,695
py
Python
database/userDAO.py
saraivaufc/PySpy
711a14da559c0315335eaf843f6d2a68daf9acbf
[ "MIT" ]
null
null
null
database/userDAO.py
saraivaufc/PySpy
711a14da559c0315335eaf843f6d2a68daf9acbf
[ "MIT" ]
null
null
null
database/userDAO.py
saraivaufc/PySpy
711a14da559c0315335eaf843f6d2a68daf9acbf
[ "MIT" ]
null
null
null
import os from access import Access from user import User log = os.path.dirname(os.path.abspath(__file__)) + "/temp/access.log" class UserDAO(object): __database = None __cursor = None def __init__(self): self.__database = Access() self.__cursor = self.__database.getCursor() self....
36.06383
102
0.59174
import os from access import Access from user import User log = os.path.dirname(os.path.abspath(__file__)) + "/temp/access.log" class UserDAO(object): __database = None __cursor = None def __init__(self): self.__database = Access() self.__cursor = self.__database.getCursor() self....
false
true
7905f70e31d46b8e770613d25cfb4b2b723ad93b
98
py
Python
runtime/runtime_main/apps.py
Bodya00/RunTime
c83ef316ae4be265dec77bdaeb154bf0f4659767
[ "Apache-2.0" ]
null
null
null
runtime/runtime_main/apps.py
Bodya00/RunTime
c83ef316ae4be265dec77bdaeb154bf0f4659767
[ "Apache-2.0" ]
null
null
null
runtime/runtime_main/apps.py
Bodya00/RunTime
c83ef316ae4be265dec77bdaeb154bf0f4659767
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class RuntimeMainConfig(AppConfig): name = 'runtime_main'
16.333333
35
0.77551
from django.apps import AppConfig class RuntimeMainConfig(AppConfig): name = 'runtime_main'
true
true
7905f922a1507236dfbb3a862f4225599cdd5192
1,688
py
Python
corona.py
stephengarn/coronavirus
a6c488461b5c2f88b373074581eda2ecfb4d23ce
[ "MIT" ]
null
null
null
corona.py
stephengarn/coronavirus
a6c488461b5c2f88b373074581eda2ecfb4d23ce
[ "MIT" ]
null
null
null
corona.py
stephengarn/coronavirus
a6c488461b5c2f88b373074581eda2ecfb4d23ce
[ "MIT" ]
null
null
null
from selenium import webdriver #import itertools from openpyxl import Workbook, load_workbook import re import datetime driver = webdriver.Firefox() driver.get("https://www.worldometers.info/coronavirus/") countries = [] cases = [] newCases = [] data = [] casesInt = [] newCasesInt = [] cells = [] cellsB = [] datez = da...
27.672131
103
0.695498
from selenium import webdriver from openpyxl import Workbook, load_workbook import re import datetime driver = webdriver.Firefox() driver.get("https://www.worldometers.info/coronavirus/") countries = [] cases = [] newCases = [] data = [] casesInt = [] newCasesInt = [] cells = [] cellsB = [] datez = datetime.datetime.n...
true
true
7905f9c32401bbad95248e00377652a41b22f33c
4,227
py
Python
src/python_minifier/ministring.py
donno2048/python-minifier
9a9ff4dd5d2bb8dc666cae5939c125d420c2ffd5
[ "MIT" ]
301
2018-06-26T04:10:43.000Z
2022-03-30T16:30:15.000Z
src/python_minifier/ministring.py
donno2048/python-minifier
9a9ff4dd5d2bb8dc666cae5939c125d420c2ffd5
[ "MIT" ]
34
2019-04-28T13:19:13.000Z
2022-03-27T21:10:33.000Z
src/python_minifier/ministring.py
donno2048/python-minifier
9a9ff4dd5d2bb8dc666cae5939c125d420c2ffd5
[ "MIT" ]
20
2019-11-17T00:13:27.000Z
2022-01-21T15:35:07.000Z
BACKSLASH = '\\' class MiniString(object): """ Create a representation of a string object :param str string: The string to minify """ def __init__(self, string, quote="'"): self._s = string self.safe_mode = False self.quote = quote def __str__(self): """ ...
24.017045
75
0.399574
BACKSLASH = '\\' class MiniString(object): def __init__(self, string, quote="'"): self._s = string self.safe_mode = False self.quote = quote def __str__(self): if self._s == '': return '' if len(self.quote) == 1: s = self.to_short() e...
true
true
7905fae9b47a8302f5e5a44520e1ed089432d08c
4,367
py
Python
pyFAI/test/test_pickle.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
1
2021-04-28T20:09:13.000Z
2021-04-28T20:09:13.000Z
pyFAI/test/test_pickle.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
pyFAI/test/test_pickle.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Project: Azimuthal integration # https://github.com/silx-kit/pyFAI # # Copyright (C) 2015-2018 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # # Permission is hereby granted, fr...
38.646018
101
0.686512
from __future__ import absolute_import, division, print_function __author__ = "Jérôme Kieffer" __contact__ = "Jerome.Kieffer@ESRF.eu" __license__ = "MIT" __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" __date__ = "18/10/2018" import numpy from pyFAI.azimuthalI...
true
true
7905fbc369678a0dbebbe2bc91795588c6386fa9
3,590
py
Python
sdk/python/pulumi_aws/rds/get_event_categories.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/rds/get_event_categories.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/rds/get_event_categories.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
33.867925
200
0.688858
import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import _utilities, _tables __all__ = [ 'GetEventCategoriesResult', 'AwaitableGetEventCategoriesResult', 'get_event_categories', ] @pulumi.output_type class GetEventCategories...
true
true
7905fbcba481ebd176c7c4f3c323fd982706e7c1
10,813
py
Python
detectron2/modeling/mmdet_wrapper.py
KnightOfTheMoonlight/visdom4detectron2
df2ce412d9eb9ff1bb67034261248199f6d6b696
[ "Apache-2.0" ]
171
2021-05-04T02:44:01.000Z
2022-03-28T09:58:29.000Z
detectron2/modeling/mmdet_wrapper.py
ylf2002/detectron2
2455e4790f470bba54299c049410fc0713ae7529
[ "Apache-2.0" ]
10
2021-05-09T16:04:43.000Z
2021-12-03T01:21:44.000Z
detectron2/modeling/mmdet_wrapper.py
ylf2002/detectron2
2455e4790f470bba54299c049410fc0713ae7529
[ "Apache-2.0" ]
21
2021-05-04T02:47:57.000Z
2022-01-06T07:34:24.000Z
# -*- coding: utf-8 -*- import itertools import logging import numpy as np from collections import OrderedDict from collections.abc import Mapping from typing import Dict, List, Optional, Tuple, Union import torch from omegaconf import DictConfig, OmegaConf from torch import Tensor, nn from detectron2.layers import S...
39.900369
100
0.620827
import itertools import logging import numpy as np from collections import OrderedDict from collections.abc import Mapping from typing import Dict, List, Optional, Tuple, Union import torch from omegaconf import DictConfig, OmegaConf from torch import Tensor, nn from detectron2.layers import ShapeSpec from detectron...
true
true
7905fc5a450ba81408132f62c176cc5ff1bc697b
6,591
py
Python
allennlp/data/token_indexers/token_indexer.py
loopylangur/allennlp
0fc695b08a0376317e45ae0a45584aa9eb14beb6
[ "Apache-2.0" ]
null
null
null
allennlp/data/token_indexers/token_indexer.py
loopylangur/allennlp
0fc695b08a0376317e45ae0a45584aa9eb14beb6
[ "Apache-2.0" ]
null
null
null
allennlp/data/token_indexers/token_indexer.py
loopylangur/allennlp
0fc695b08a0376317e45ae0a45584aa9eb14beb6
[ "Apache-2.0" ]
null
null
null
from typing import Dict, List, TypeVar, Generic import warnings import torch import numpy from allennlp.common import Registrable from allennlp.data.tokenizers.token import Token from allennlp.data.vocabulary import Vocabulary TokenType = TypeVar("TokenType", int, List[int], numpy.ndarray) class TokenIndexer(Gener...
44.234899
104
0.678046
from typing import Dict, List, TypeVar, Generic import warnings import torch import numpy from allennlp.common import Registrable from allennlp.data.tokenizers.token import Token from allennlp.data.vocabulary import Vocabulary TokenType = TypeVar("TokenType", int, List[int], numpy.ndarray) class TokenIndexer(Gener...
true
true
7905fccc0488ee79239e5677e9ef11f7ec51b6a0
403
py
Python
main.py
tomjur/TF2.0DQN
4813d40ffaa455e4b70459a6db0a996d73b760d9
[ "MIT" ]
1
2020-07-28T10:09:14.000Z
2020-07-28T10:09:14.000Z
main.py
tomjur/TF2.0DQN
4813d40ffaa455e4b70459a6db0a996d73b760d9
[ "MIT" ]
null
null
null
main.py
tomjur/TF2.0DQN
4813d40ffaa455e4b70459a6db0a996d73b760d9
[ "MIT" ]
null
null
null
from config_utils import read_main_config from deep_q_network import DeepQNetwork from gym_wrapper import GymWrapper from tensorflow.python.framework.ops import disable_eager_execution disable_eager_execution() config = read_main_config() gym_wrapper = GymWrapper(config['general']['scenario']) deep_q_network = DeepQ...
31
67
0.848635
from config_utils import read_main_config from deep_q_network import DeepQNetwork from gym_wrapper import GymWrapper from tensorflow.python.framework.ops import disable_eager_execution disable_eager_execution() config = read_main_config() gym_wrapper = GymWrapper(config['general']['scenario']) deep_q_network = DeepQ...
true
true
7905ff6f813e2aeb7d61d558ba67ce986c986ce7
4,396
py
Python
src/braket/device_schema/dwave/dwave_device_capabilities_v1.py
shiyunon/amazon-braket-schemas-python
10e864e05a2a7fef27683f48e17eefe30753e7df
[ "Apache-2.0" ]
1
2021-07-10T15:22:12.000Z
2021-07-10T15:22:12.000Z
src/braket/device_schema/dwave/dwave_device_capabilities_v1.py
shiyunon/amazon-braket-schemas-python
10e864e05a2a7fef27683f48e17eefe30753e7df
[ "Apache-2.0" ]
null
null
null
src/braket/device_schema/dwave/dwave_device_capabilities_v1.py
shiyunon/amazon-braket-schemas-python
10e864e05a2a7fef27683f48e17eefe30753e7df
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
41.866667
98
0.512966
from pydantic import Field from braket.device_schema.device_capabilities import DeviceCapabilities from braket.device_schema.dwave.dwave_provider_properties_v1 import DwaveProviderProperties from braket.schema_common import BraketSchemaBase, BraketSchemaHeader class DwaveDeviceCapabilities(DeviceCapabil...
true
true
7906000327b6e1cea1b1de29fb8c6cdf9c25fcbb
3,912
py
Python
harness/core/module.py
vysec/Harness
ed2a6aaa2c4350853f5bda2f6d514d7eb429f27e
[ "MIT" ]
81
2015-08-07T23:25:41.000Z
2022-02-21T03:45:24.000Z
harness/core/module.py
samyoyo/Harness
ed2a6aaa2c4350853f5bda2f6d514d7eb429f27e
[ "MIT" ]
6
2015-11-04T08:06:14.000Z
2018-05-21T23:46:40.000Z
harness/core/module.py
samyoyo/Harness
ed2a6aaa2c4350853f5bda2f6d514d7eb429f27e
[ "MIT" ]
30
2015-08-09T01:15:31.000Z
2020-05-22T21:17:41.000Z
''' Harness Toolset Copyright (c) 2015 Rich Kelley Contact: @RGKelley5 RK5DEVMAIL[A T]gmail[D O T]com www.frogstarworldc.com License: MIT ''' import threading import builtins import sys from random import randint from harness.core import framework from harness.core import threads from collect...
20.919786
146
0.674335
import threading import builtins import sys from random import randint from harness.core import framework from harness.core import threads from collections import namedtuple from queue import Queue class ModuleFrame(framework.Framework): def __init__(self, about): self.stopper = threading.Event()...
true
true
790600eda278d5c052a5c55dedcda50e613e5a22
1,137
py
Python
backend/src/settings/prod.py
JumboCode/YEF
433b9215e61794730362d9ad9749b88236875be5
[ "MIT" ]
2
2018-12-10T03:14:31.000Z
2019-03-27T16:20:36.000Z
backend/src/settings/prod.py
JumboCode/YEF
433b9215e61794730362d9ad9749b88236875be5
[ "MIT" ]
22
2018-12-06T23:54:20.000Z
2019-04-17T18:15:43.000Z
backend/src/settings/prod.py
JumboCode/YEF
433b9215e61794730362d9ad9749b88236875be5
[ "MIT" ]
1
2020-11-03T05:27:10.000Z
2020-11-03T05:27:10.000Z
# # These are settings for Heroku Production Environment # from .common import * import dj_database_url # We don't want any debug warnings giving # away unnecessary information to attackers DEBUG = False # We grab the secret key from the environment because it is # our production key and no can know it SECRET_KE...
23.204082
73
0.761653
from .common import * import dj_database_url # away unnecessary information to attackers DEBUG = False # We grab the secret key from the environment because it is # our production key and no can know it SECRET_KEY = os.environ.get('SECRET_KEY') # We redirect any http requests to their https equivalents SE...
true
true
79060167d83c35a47ab9b2566f2706e578470c44
918
py
Python
external/unbound/libunbound/python/doc/examples/example8-1.py
simplixcurrency/simplix
dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1
[ "BSD-3-Clause" ]
1,751
2016-11-03T18:25:34.000Z
2022-03-30T17:43:26.000Z
external/unbound/libunbound/python/doc/examples/example8-1.py
simplixcurrency/simplix
dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1
[ "BSD-3-Clause" ]
603
2017-03-03T19:51:58.000Z
2022-03-31T12:56:58.000Z
external/unbound/libunbound/python/doc/examples/example8-1.py
simplixcurrency/simplix
dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1
[ "BSD-3-Clause" ]
296
2016-11-14T07:00:11.000Z
2022-03-29T00:56:58.000Z
#!/usr/bin/python # vim:fileencoding=utf-8 # # Lookup for MX and NS records # import unbound ctx = unbound.ub_ctx() ctx.resolvconf("/etc/resolv.conf") status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN) if status == 0 and result.havedata: print "Result:" print " raw data:", re...
28.6875
79
0.650327
import unbound ctx = unbound.ub_ctx() ctx.resolvconf("/etc/resolv.conf") status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN) if status == 0 and result.havedata: print "Result:" print " raw data:", result.data for k in result.data.mx_list: print " priority...
false
true
790601e77a63a916758ca33f28d24b47806a8269
2,354
py
Python
backend/mqtt_react/python_bugg/paho.mqtt.python/test/lib/03-publish-c2b-qos2-disconnect.py
Jegeva/BruCON_2021
81e0ccdeaad3c7518e34c2ac80b0221c95e04d97
[ "Unlicense" ]
null
null
null
backend/mqtt_react/python_bugg/paho.mqtt.python/test/lib/03-publish-c2b-qos2-disconnect.py
Jegeva/BruCON_2021
81e0ccdeaad3c7518e34c2ac80b0221c95e04d97
[ "Unlicense" ]
null
null
null
backend/mqtt_react/python_bugg/paho.mqtt.python/test/lib/03-publish-c2b-qos2-disconnect.py
Jegeva/BruCON_2021
81e0ccdeaad3c7518e34c2ac80b0221c95e04d97
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # Test whether a client sends a correct PUBLISH to a topic with QoS 2 and responds to a disconnect. import context import paho_test rc = 1 keepalive = 60 connect_packet = paho_test.gen_connect( "publish-qos2-test", keepalive=keepalive, clean_session=False, ) connack_packet = paho_test.gen_c...
31.810811
99
0.614274
import context import paho_test rc = 1 keepalive = 60 connect_packet = paho_test.gen_connect( "publish-qos2-test", keepalive=keepalive, clean_session=False, ) connack_packet = paho_test.gen_connack(rc=0) disconnect_packet = paho_test.gen_disconnect() mid = 1 publish_packet = paho_test.gen_publish( u"pub/...
true
true
790602682ee66420580b116a8a3bfa441c16b5b6
873
py
Python
test/test_gzippy.py
seomoz/gzippy
a0b7469707005d878588c5a877943fee5b8a4d5e
[ "MIT" ]
4
2017-09-09T17:28:11.000Z
2019-08-07T13:42:04.000Z
test/test_gzippy.py
seomoz/gzippy
a0b7469707005d878588c5a877943fee5b8a4d5e
[ "MIT" ]
null
null
null
test/test_gzippy.py
seomoz/gzippy
a0b7469707005d878588c5a877943fee5b8a4d5e
[ "MIT" ]
2
2017-05-27T08:16:42.000Z
2018-07-28T15:53:21.000Z
'''Tests about the gzippy top-level functions.''' import unittest from test import scratch_file import gzippy class GzippyTest(unittest.TestCase): '''Tests about the gzippy top-level functions.''' def test_open_with_plus(self): '''Opening with r+ is not allowed.''' with scratch_file('exam...
26.454545
53
0.561283
import unittest from test import scratch_file import gzippy class GzippyTest(unittest.TestCase): def test_open_with_plus(self): with scratch_file('example.gz') as path: with open(path, 'w+') as fout: pass with self.assertRaises(ValueError): wit...
true
true
79060277fc71a87642cbaf0bb850f5303a501cf4
372
py
Python
piccolo/columns/indexes.py
smythp/piccolo
26d5742c5d56ef6308598eb264d53a247082bbc7
[ "MIT" ]
6
2021-09-27T14:33:08.000Z
2021-11-18T13:52:34.000Z
piccolo/columns/indexes.py
smythp/piccolo
26d5742c5d56ef6308598eb264d53a247082bbc7
[ "MIT" ]
5
2021-09-27T13:58:35.000Z
2022-03-08T01:11:51.000Z
piccolo/columns/indexes.py
smythp/piccolo
26d5742c5d56ef6308598eb264d53a247082bbc7
[ "MIT" ]
null
null
null
from enum import Enum class IndexMethod(str, Enum): """ Used to specify the index method for a :class:`Column <piccolo.columns.base.Column>`. """ btree = "btree" hash = "hash" gist = "gist" gin = "gin" def __str__(self): return f"{self.__class__.__name__}.{self.name}" ...
18.6
55
0.594086
from enum import Enum class IndexMethod(str, Enum): btree = "btree" hash = "hash" gist = "gist" gin = "gin" def __str__(self): return f"{self.__class__.__name__}.{self.name}" def __repr__(self): return self.__str__()
true
true
7906028a5fbe724469338caf018345a138d2fe4c
1,021
py
Python
test/test_entity_creation_dto.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
null
null
null
test/test_entity_creation_dto.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
7
2021-05-25T14:06:04.000Z
2021-11-05T15:42:14.000Z
test/test_entity_creation_dto.py
OpenSILEX/opensilexClientToolsPython
41b1e7e707670ecf1b2c06d79bdd9749945788cb
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ OpenSilex API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: INSTANCE-SNAPSHOT Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_imp...
24.902439
119
0.734574
from __future__ import absolute_import import unittest import opensilexClientToolsPython from opensilexClientToolsPython.models.entity_creation_dto import EntityCreationDTO from opensilexClientToolsPython.rest import ApiException class TestEntityCreationDTO(unittest.TestCase): def setUp(self): pa...
true
true
79060354e4f3994a141daeb85f0af6464eb8d0aa
1,522
py
Python
scripts/india_rbi/below_poverty_line/preprocess_test.py
hanlu09205/data
76e82fd199bc99543e2d54ad5809343ccdf11b32
[ "Apache-2.0" ]
1
2021-01-01T05:27:56.000Z
2021-01-01T05:27:56.000Z
scripts/india_rbi/below_poverty_line/preprocess_test.py
hanlu09205/data
76e82fd199bc99543e2d54ad5809343ccdf11b32
[ "Apache-2.0" ]
null
null
null
scripts/india_rbi/below_poverty_line/preprocess_test.py
hanlu09205/data
76e82fd199bc99543e2d54ad5809343ccdf11b32
[ "Apache-2.0" ]
1
2021-01-01T05:27:58.000Z
2021-01-01T05:27:58.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.382979
79
0.720762
import filecmp import os import json import tempfile import unittest from india_rbi.below_poverty_line.preprocess import BelowPovertyLineDataLoader module_dir_ = os.path.dirname(__file__) class TestPreprocess(unittest.TestCase): def test_create_csv(self): with tempfile.TemporaryDirectory(...
true
true
7906038051dc108ff1e0e7a4f2b46fa5598ec9db
464
py
Python
source/python/airflow/runtime/plugins/helpers/sql_data_quality_queries.py
paulo3011/opendatafrombrasil
cc15ffadaaccb853e1d73a685de39c2bc5340c7c
[ "MIT" ]
null
null
null
source/python/airflow/runtime/plugins/helpers/sql_data_quality_queries.py
paulo3011/opendatafrombrasil
cc15ffadaaccb853e1d73a685de39c2bc5340c7c
[ "MIT" ]
null
null
null
source/python/airflow/runtime/plugins/helpers/sql_data_quality_queries.py
paulo3011/opendatafrombrasil
cc15ffadaaccb853e1d73a685de39c2bc5340c7c
[ "MIT" ]
null
null
null
class SqlDataQualityQueries: establisment_company_relation_check = (""" -- looks for registration without relation with compay -- for have a database with full information needs to return total equal to zero (establisment + company) SELECT count(e.basiccnpj) as total_without_relation from open_data.fact...
58
109
0.732759
class SqlDataQualityQueries: establisment_company_relation_check = (""" -- looks for registration without relation with compay -- for have a database with full information needs to return total equal to zero (establisment + company) SELECT count(e.basiccnpj) as total_without_relation from open_data.fact...
true
true
7906061a9a46653f31e7943cf6210088547bf9e8
680
py
Python
build/navigation/amcl/catkin_generated/pkg.develspace.context.pc.py
lty1994/ros_project
d55ce07c592d545f9a43330fa6bf96af6651575f
[ "BSD-2-Clause" ]
null
null
null
build/navigation/amcl/catkin_generated/pkg.develspace.context.pc.py
lty1994/ros_project
d55ce07c592d545f9a43330fa6bf96af6651575f
[ "BSD-2-Clause" ]
null
null
null
build/navigation/amcl/catkin_generated/pkg.develspace.context.pc.py
lty1994/ros_project
d55ce07c592d545f9a43330fa6bf96af6651575f
[ "BSD-2-Clause" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/autolabor/catkin_ws/devel/include;/home/autolabor/catkin_ws/src/navigation/amcl/include".split(';') if "/home/autolabor/catkin_ws/devel/include;/home/autolabor/catkin_ws/src/navigation/amcl/inclu...
75.555556
253
0.777941
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/autolabor/catkin_ws/devel/include;/home/autolabor/catkin_ws/src/navigation/amcl/include".split(';') if "/home/autolabor/catkin_ws/devel/include;/home/autolabor/catkin_ws/src/navigation/amcl/include" != "" else [] PROJECT_CATKIN_DEPENDS = "rosbag;roscp...
true
true
7906063fe8bfd262d70fe981b681e8b1d68b3e5c
4,294
py
Python
Trabalho 02/Resolucao/code/backtracking/Labirinto.py
RafaelAmauri/Projeto-e-Analise-de-Algoritmos
76a8d834ff03c752c09715c6ffe5f4a95a9fb1e5
[ "MIT" ]
null
null
null
Trabalho 02/Resolucao/code/backtracking/Labirinto.py
RafaelAmauri/Projeto-e-Analise-de-Algoritmos
76a8d834ff03c752c09715c6ffe5f4a95a9fb1e5
[ "MIT" ]
null
null
null
Trabalho 02/Resolucao/code/backtracking/Labirinto.py
RafaelAmauri/Projeto-e-Analise-de-Algoritmos
76a8d834ff03c752c09715c6ffe5f4a95a9fb1e5
[ "MIT" ]
null
null
null
import Celula class Labirinto: def __init__(self, num_rows, num_columns, order_to_check): # Indica a ordem que vai os vizinhos vao ser checados self.order_to_check = order_to_check # Numero de linhas no grid self.num_rows = num_rows # Numero de colunas no grid s...
38.339286
126
0.581742
import Celula class Labirinto: def __init__(self, num_rows, num_columns, order_to_check): self.order_to_check = order_to_check self.num_rows = num_rows self.num_columns = num_columns self.grid = [] tmp_cell = Celula.Celula(0) ...
true
true
79060674fbdf9209104d2086ac2b555a515cdb1e
2,474
py
Python
src/ploomber/cli/io.py
abhishak3/ploomber
6041bcd381b7fd9a7525f94edd0ae1b03b14bb8d
[ "Apache-2.0" ]
null
null
null
src/ploomber/cli/io.py
abhishak3/ploomber
6041bcd381b7fd9a7525f94edd0ae1b03b14bb8d
[ "Apache-2.0" ]
37
2021-10-02T06:12:57.000Z
2021-12-27T22:24:29.000Z
src/ploomber/cli/io.py
abhishak3/ploomber
6041bcd381b7fd9a7525f94edd0ae1b03b14bb8d
[ "Apache-2.0" ]
null
null
null
from functools import wraps import sys import traceback from ploomber.io import TerminalWriter from ploomber.exceptions import DAGBuildError, DAGRenderError # TODO: there are two types of cli commands: the ones that execute user's # code (ploomber build/task) and the ones that parse a dag/task but do not # execute it....
32.552632
78
0.630558
from functools import wraps import sys import traceback from ploomber.io import TerminalWriter from ploomber.exceptions import DAGBuildError, DAGRenderError # code (ploomber build/task) and the ones that parse a dag/task but do not # execute it. For the former, we want to capture errors and display them with # colors...
true
true
7906070b76e68e6410082fbc43347068a13fada4
9,012
py
Python
python/scfmm/__init__.py
serokell/segmented-cfmm
bca32e931d250c94acecc997cdf63a67c85cda4f
[ "MIT", "Unlicense" ]
null
null
null
python/scfmm/__init__.py
serokell/segmented-cfmm
bca32e931d250c94acecc997cdf63a67c85cda4f
[ "MIT", "Unlicense" ]
24
2021-07-20T16:13:14.000Z
2021-12-06T16:25:17.000Z
python/scfmm/__init__.py
serokell/segmented-cfmm
bca32e931d250c94acecc997cdf63a67c85cda4f
[ "MIT", "Unlicense" ]
null
null
null
# SPDX-FileCopyrightText: 2021 Arthur Breitman # SPDX-License-Identifier: LicenseRef-MIT-Arthur-Breitman import math from collections import defaultdict from pycfmm.data import AutoRepr infinity = 10 ** 100 class Tick(AutoRepr): """ An initialized tick, marking the beginning or end of a position """ ...
34.007547
120
0.552818
import math from collections import defaultdict from pycfmm.data import AutoRepr infinity = 10 ** 100 class Tick(AutoRepr): def __init__(self, i_prev, i_next, feeGrowthOutside): self.i_prev = i_prev self.i_next = i_next self.Delta_L = 0 self.feeGrowthOutside = feeGrowthOutsid...
true
true
790607b684cf5290dac94eb39bd4bd4620b6a450
13,432
py
Python
snorkel/candidates.py
silencehero/snorkel
afe2563a91e3d292d1a1d8a1ca6a2d39e8cd09c2
[ "Apache-2.0" ]
2
2019-01-08T02:30:35.000Z
2019-03-13T07:00:34.000Z
snorkel/candidates.py
silencehero/snorkel
afe2563a91e3d292d1a1d8a1ca6a2d39e8cd09c2
[ "Apache-2.0" ]
null
null
null
snorkel/candidates.py
silencehero/snorkel
afe2563a91e3d292d1a1d8a1ca6a2d39e8cd09c2
[ "Apache-2.0" ]
2
2018-12-01T17:10:01.000Z
2018-12-28T09:16:41.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import * from future.utils import iteritems from collections import defaultdict from copy import deepcopy from itertools import product import re from sqlal...
46.638889
155
0.602814
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import * from future.utils import iteritems from collections import defaultdict from copy import deepcopy from itertools import product import re from sqlal...
true
true
790607d45455f8cdf20fe8f993a75c221959ed7e
5,944
py
Python
asposewordscloud/models/error_details.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
asposewordscloud/models/error_details.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
asposewordscloud/models/error_details.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="error_details.py"> # Copyright (c) 2020 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of thi...
33.772727
87
0.580585
import pprint import re import six import json class ErrorDetails(object): swagger_types = { 'error_date_time': 'datetime', 'request_id': 'str' } attribute_map = { 'error_date_time': 'ErrorDateTime', 'request_id': 'RequestId' } def __i...
true
true
7906091591a1d85069c2da57aabf2e329ff7c1d8
2,161
py
Python
src/main/python/ecir2019_ccrf/generate_runs.py
kasys-lab/anserini
a31d386e23d399da8d2841d45b9e500f71fe1c9b
[ "Apache-2.0" ]
626
2019-04-22T03:34:05.000Z
2022-03-31T03:56:05.000Z
src/main/python/ecir2019_ccrf/generate_runs.py
kasys-lab/anserini
a31d386e23d399da8d2841d45b9e500f71fe1c9b
[ "Apache-2.0" ]
1,001
2019-04-22T12:35:59.000Z
2022-03-31T01:47:49.000Z
src/main/python/ecir2019_ccrf/generate_runs.py
kasys-lab/anserini
a31d386e23d399da8d2841d45b9e500f71fe1c9b
[ "Apache-2.0" ]
290
2019-04-21T22:34:34.000Z
2022-03-27T16:59:13.000Z
import argparse import logging import json import os def submission(origin_file, topics, runtag, output_file): with open(output_file, 'a') as fout, open(origin_file, 'r') as fin: for line in fin: data = line.strip().split(' ') if data[0] in topics: continue ...
36.016667
92
0.574734
import argparse import logging import json import os def submission(origin_file, topics, runtag, output_file): with open(output_file, 'a') as fout, open(origin_file, 'r') as fin: for line in fin: data = line.strip().split(' ') if data[0] in topics: continue ...
true
true
79060a0ace72893ccbef8058f2e2b755b342b47a
694
py
Python
src/pretix/base/migrations/0105_auto_20190112_1512.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
1,248
2015-04-24T13:32:06.000Z
2022-03-29T07:01:36.000Z
src/pretix/base/migrations/0105_auto_20190112_1512.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
2,113
2015-02-18T18:58:16.000Z
2022-03-31T11:12:32.000Z
src/pretix/base/migrations/0105_auto_20190112_1512.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
453
2015-05-13T09:29:06.000Z
2022-03-24T13:39:16.000Z
# Generated by Django 2.1 on 2019-01-12 15:12 import django.db.models.deletion from django.db import migrations, models import pretix.base.models.fields class Migration(migrations.Migration): dependencies = [ ('pretixbase', '0104_auto_20181114_1526'), ] operations = [ migrations.AddFie...
25.703704
86
0.635447
import django.db.models.deletion from django.db import migrations, models import pretix.base.models.fields class Migration(migrations.Migration): dependencies = [ ('pretixbase', '0104_auto_20181114_1526'), ] operations = [ migrations.AddField( model_name='invoiceaddress', ...
true
true
79060aa623d051989c5194e74c7e2b5719228d8d
14,028
py
Python
scanpy/_settings.py
gamazeps/scanpy
a1949935dc4b45b64ddad1a53c2a7679395cf2ed
[ "BSD-3-Clause" ]
null
null
null
scanpy/_settings.py
gamazeps/scanpy
a1949935dc4b45b64ddad1a53c2a7679395cf2ed
[ "BSD-3-Clause" ]
null
null
null
scanpy/_settings.py
gamazeps/scanpy
a1949935dc4b45b64ddad1a53c2a7679395cf2ed
[ "BSD-3-Clause" ]
null
null
null
import inspect import sys from enum import IntEnum from pathlib import Path from time import time from logging import getLevelName from typing import Tuple, Union, Any, List, Iterable, TextIO, Optional from . import logging from .logging import _set_log_level, _set_log_file, RootLogger _VERBOSITY_TO_LOGLEVEL = { ...
32.397229
102
0.597662
import inspect import sys from enum import IntEnum from pathlib import Path from time import time from logging import getLevelName from typing import Tuple, Union, Any, List, Iterable, TextIO, Optional from . import logging from .logging import _set_log_level, _set_log_file, RootLogger _VERBOSITY_TO_LOGLEVEL = { ...
true
true
79060b9bb3f6d7260b99d143dbf8615f9dd467fe
36,469
py
Python
pyiron_atomistics/vasp/outcar.py
pyiron/pyiron_atomistic
0cd4c910806f44dfc829ddd642e323efcf7e36d5
[ "BSD-3-Clause" ]
14
2021-01-18T10:03:56.000Z
2022-03-01T20:59:35.000Z
pyiron_atomistics/vasp/outcar.py
pyiron/pyiron_atomistics
0cd4c910806f44dfc829ddd642e323efcf7e36d5
[ "BSD-3-Clause" ]
569
2018-04-12T06:37:14.000Z
2022-03-31T18:06:27.000Z
pyiron_atomistics/vasp/outcar.py
pyiron/pyiron_atomistic
0cd4c910806f44dfc829ddd642e323efcf7e36d5
[ "BSD-3-Clause" ]
6
2018-10-23T09:48:48.000Z
2022-02-13T12:13:00.000Z
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. from collections import OrderedDict import numpy as np import warnings import scipy.constants import re __author__ = "S...
37.365779
129
0.56681
from collections import OrderedDict import numpy as np import warnings import scipy.constants import re __author__ = "Sudarsan Surendralal" __copyright__ = ( "Copyright 2021, Max-Planck-Institut für Eisenforschung GmbH - " "Computational Materials Design (CM) Department" ) __version__ = "1.0" __maintainer_...
true
true
79060c598a010e9b185e6e1a60ba2bc854aec0bf
2,282
py
Python
venv/Lib/site-packages/astroid/brain/brain_nose.py
professorbee/randomplushmiku
b2db186a5d081da0cb00b8c73dee9eff6047b1f1
[ "MIT" ]
null
null
null
venv/Lib/site-packages/astroid/brain/brain_nose.py
professorbee/randomplushmiku
b2db186a5d081da0cb00b8c73dee9eff6047b1f1
[ "MIT" ]
1
2021-04-12T16:20:40.000Z
2021-04-12T16:20:40.000Z
venv/Lib/site-packages/astroid/brain/brain_nose.py
professorbee/randomplushmiku
b2db186a5d081da0cb00b8c73dee9eff6047b1f1
[ "MIT" ]
1
2021-04-12T15:52:04.000Z
2021-04-12T15:52:04.000Z
# Copyright (c) 2015-2016, 2018, 2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2016 Ceridwen <ceridwenv@gmail.com> # Copyright (c) 2020 hippo91 <guillaume.peillex@gmail.com> # Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid...
28.886076
85
0.678791
import re import textwrap import astroid import astroid.builder _BUILDER = astroid.builder.AstroidBuilder(astroid.MANAGER) def _pep8(name, caps=re.compile("([A-Z])")): return caps.sub(lambda m: "_" + m.groups()[0].lower(), name) def _nose_tools_functions(): module = _BUILDER.string_build( ...
true
true
79060de957eed5903e574c1856b858a23543a8ff
2,004
py
Python
encodings/cp1026.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
1
2020-03-12T16:44:10.000Z
2020-03-12T16:44:10.000Z
encodings/cp1026.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
encodings/cp1026.py
theclashingfritz/Cog-Invasion-Online-Dump
2561abbacb3e2e288e06f3f04b935b5ed589c8f8
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.2.4 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] # Embedded file name: encodings.cp1026 import codecs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return codecs.charmap_...
48.878049
767
0.749501
import codecs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return codecs.charmap_encode(input, errors, encoding_table) def decode(self, input, errors='strict'): return codecs.charmap_decode(input, errors, decoding_table) class IncrementalEncoder(codecs.Incrementa...
true
true
79060ed31e804094d5d1064d217406f21e567529
3,079
py
Python
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/show_domain_quota_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/show_domain_quota_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/show_domain_quota_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ShowDomainQuotaResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
27.247788
79
0.560247
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ShowDomainQuotaResponse(SdkResponse): sensitive_list = [] openapi_types = { 'quotas': 'QuotaResult' } attribute_map = { ...
true
true
7906101b49d86dab3593f5151edccbf90eb5e00f
422
py
Python
src/states/state.py
Iain530/do-you-have-the-guts2018
2307a9cf9f6bb9d3cce987491f5db4511ea0b1a1
[ "MIT" ]
1
2018-10-15T13:35:41.000Z
2018-10-15T13:35:41.000Z
src/states/state.py
Iain530/do-you-have-the-guts2018
2307a9cf9f6bb9d3cce987491f5db4511ea0b1a1
[ "MIT" ]
null
null
null
src/states/state.py
Iain530/do-you-have-the-guts2018
2307a9cf9f6bb9d3cce987491f5db4511ea0b1a1
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from status import Status class State(ABC): def __init__(self, turret_controls, body_controls, status: Status): self.turret_controls = turret_controls self.body_controls = body_controls self.status = status @abstractmethod def perform(self): ...
23.444444
71
0.699052
from abc import ABC, abstractmethod from status import Status class State(ABC): def __init__(self, turret_controls, body_controls, status: Status): self.turret_controls = turret_controls self.body_controls = body_controls self.status = status @abstractmethod def perform(self): ...
true
true
79061661a375ff2405ed7b25c287a48301ff5e33
1,420
py
Python
plugin/nodes/flavour.py
MSO4SC/cloudify-im-plugin
b8e6dfeb9a7902a38f602735780390a256fb72b7
[ "Apache-2.0" ]
1
2018-09-24T12:04:29.000Z
2018-09-24T12:04:29.000Z
plugin/nodes/flavour.py
victorsndvg/cloudify-im-extension
b8e6dfeb9a7902a38f602735780390a256fb72b7
[ "Apache-2.0" ]
6
2018-11-22T14:38:26.000Z
2021-08-02T08:01:31.000Z
plugin/nodes/flavour.py
victorsndvg/cloudify-im-extension
b8e6dfeb9a7902a38f602735780390a256fb72b7
[ "Apache-2.0" ]
1
2018-12-09T17:45:13.000Z
2018-12-09T17:45:13.000Z
from cloudify import ctx from cloudify.state import ctx_parameters as inputs from cloudify.decorators import operation from cloudify.exceptions import * from plugin.nodes.utils import * def build_radl_flavour(config): ctx.logger.debug('{0} Infrastructure Manager deployment info:'.format(get_log_indentation())) ...
39.444444
97
0.697887
from cloudify import ctx from cloudify.state import ctx_parameters as inputs from cloudify.decorators import operation from cloudify.exceptions import * from plugin.nodes.utils import * def build_radl_flavour(config): ctx.logger.debug('{0} Infrastructure Manager deployment info:'.format(get_log_indentation())) ...
true
true
7906185726810a877740790b9a75afec09e2b587
840
py
Python
bundle/vim-python-mode/pymode/utils.py
ninegrid/dotfiles-vim
4604f8a2e114cb2e98d5d79f2f41048c4f564b02
[ "Unlicense" ]
null
null
null
bundle/vim-python-mode/pymode/utils.py
ninegrid/dotfiles-vim
4604f8a2e114cb2e98d5d79f2f41048c4f564b02
[ "Unlicense" ]
null
null
null
bundle/vim-python-mode/pymode/utils.py
ninegrid/dotfiles-vim
4604f8a2e114cb2e98d5d79f2f41048c4f564b02
[ "Unlicense" ]
1
2020-10-01T18:51:49.000Z
2020-10-01T18:51:49.000Z
""" Pymode utils. """ import os.path import sys import threading import warnings from contextlib import contextmanager import vim # noqa from ._compat import StringIO, PY2 DEBUG = int(vim.eval('g:pymode_debug')) warnings.filterwarnings('ignore') @contextmanager def silence_stderr(): """ Redirect stderr. """ ...
20
76
0.630952
import os.path import sys import threading import warnings from contextlib import contextmanager import vim from ._compat import StringIO, PY2 DEBUG = int(vim.eval('g:pymode_debug')) warnings.filterwarnings('ignore') @contextmanager def silence_stderr(): if DEBUG: yield else: with thread...
true
true
79061a43cf623b03f0da9d879e66018df245c279
299
py
Python
quiz/fake_db.py
KelstonClub/quiz
5f6fca87ca21c376937f50f00e1d3ff2fbe3425a
[ "MIT" ]
null
null
null
quiz/fake_db.py
KelstonClub/quiz
5f6fca87ca21c376937f50f00e1d3ff2fbe3425a
[ "MIT" ]
null
null
null
quiz/fake_db.py
KelstonClub/quiz
5f6fca87ca21c376937f50f00e1d3ff2fbe3425a
[ "MIT" ]
null
null
null
#fake database to get the pygame running import random questions = ["Question 1?", "Question 2?", "Question 3?", "Question 4?"] answers = ["Answer 1", "Answer 2", "Answer 3", "Answer 4"] def get_question(): return(random.choice(questions)) def get_answer(): return(random.choice(answers))
27.181818
72
0.685619
import random questions = ["Question 1?", "Question 2?", "Question 3?", "Question 4?"] answers = ["Answer 1", "Answer 2", "Answer 3", "Answer 4"] def get_question(): return(random.choice(questions)) def get_answer(): return(random.choice(answers))
true
true
79061a791d8df7a895d17b47ead6715c4f26a761
3,096
py
Python
pynet/configure.py
claireguichon/pynet
92706375e61fb5cb523548303b7d04769c9de134
[ "CECILL-B" ]
8
2020-06-23T16:30:52.000Z
2021-07-27T15:07:18.000Z
pynet/configure.py
claireguichon/pynet
92706375e61fb5cb523548303b7d04769c9de134
[ "CECILL-B" ]
8
2019-12-18T17:28:47.000Z
2021-02-12T09:10:58.000Z
pynet/configure.py
claireguichon/pynet
92706375e61fb5cb523548303b7d04769c9de134
[ "CECILL-B" ]
18
2019-08-19T14:17:48.000Z
2021-12-20T03:56:39.000Z
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2019 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
31.917526
79
0.614664
true
true
79061a8a45becdc178cac2e4723c05454bde9073
9,781
py
Python
test/pybind_test/din_fp32_2gpu.py
Chunshuizhao/HugeCTR
085b2e8ad2abaee5578e7bf43b8394d0b8473b58
[ "Apache-2.0" ]
null
null
null
test/pybind_test/din_fp32_2gpu.py
Chunshuizhao/HugeCTR
085b2e8ad2abaee5578e7bf43b8394d0b8473b58
[ "Apache-2.0" ]
null
null
null
test/pybind_test/din_fp32_2gpu.py
Chunshuizhao/HugeCTR
085b2e8ad2abaee5578e7bf43b8394d0b8473b58
[ "Apache-2.0" ]
null
null
null
import hugectr solver = hugectr.CreateSolver(max_eval_batches = 1, batchsize_eval = 4096, batchsize = 64, lr = 0.001, vvgpu = [[0,1]], repeat_dataset = True, ...
58.568862
134
0.510991
import hugectr solver = hugectr.CreateSolver(max_eval_batches = 1, batchsize_eval = 4096, batchsize = 64, lr = 0.001, vvgpu = [[0,1]], repeat_dataset = True, ...
true
true
79061ab0da5df82f3ca2c2a7c29643e97fa15df4
1,338
py
Python
dataloader.py
manhph2211/Pytorch-Fb-Classification
cf5f9c0b356635020ff245c255d971e450d203fb
[ "MIT" ]
1
2021-02-06T06:17:26.000Z
2021-02-06T06:17:26.000Z
dataloader.py
manhph2211/Pytorch-Fb-Classification
cf5f9c0b356635020ff245c255d971e450d203fb
[ "MIT" ]
null
null
null
dataloader.py
manhph2211/Pytorch-Fb-Classification
cf5f9c0b356635020ff245c255d971e450d203fb
[ "MIT" ]
null
null
null
import torch import torchvision from torchvision import transforms, utils, datasets from torch.utils.data import Dataset, DataLoader, SubsetRandomSampler from sklearn.metrics import classification_report, confusion_matrix def makeDataSet(IMAGE_SHAPE = 300,DATA_PATH = './data_after_splitting/'): image_transforms = {...
37.166667
88
0.608371
import torch import torchvision from torchvision import transforms, utils, datasets from torch.utils.data import Dataset, DataLoader, SubsetRandomSampler from sklearn.metrics import classification_report, confusion_matrix def makeDataSet(IMAGE_SHAPE = 300,DATA_PATH = './data_after_splitting/'): image_transforms = {...
true
true
79061b04e3ff23b56ce503eda27551352aefbd9c
645
py
Python
Apps/phdigitalshadows/dsapi/model/infrastructure_ssl.py
mattsayar-splunk/phantom-apps
b719b78ded609ae3cbd62d7d2cc317db1a613d3b
[ "Apache-2.0" ]
1
2021-01-18T16:56:55.000Z
2021-01-18T16:56:55.000Z
Apps/phdigitalshadows/dsapi/model/infrastructure_ssl.py
mattsayar-splunk/phantom-apps
b719b78ded609ae3cbd62d7d2cc317db1a613d3b
[ "Apache-2.0" ]
null
null
null
Apps/phdigitalshadows/dsapi/model/infrastructure_ssl.py
mattsayar-splunk/phantom-apps
b719b78ded609ae3cbd62d7d2cc317db1a613d3b
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2017 Digital Shadows Ltd. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # from ds_model import DSModel class InfrastructureSSL(DSModel): def __init__(self, id, payload): self._id = id self._payload = payload @property def id(self): ...
20.806452
83
0.634109
from ds_model import DSModel class InfrastructureSSL(DSModel): def __init__(self, id, payload): self._id = id self._payload = payload @property def id(self): return self._id @property def payload(self): return self._payload def __str__(self): r...
true
true
79061bf16478dfd4e21ce7aac8b9426486943061
589
py
Python
setup.py
jacobyxu/squirrel-and-friends
9fbd41953dd3b388fafa0fa963dfe6e59afef162
[ "MIT" ]
2
2020-08-09T15:13:44.000Z
2020-09-04T21:44:23.000Z
setup.py
JacobXPX/squirrel-and-friends
9fbd41953dd3b388fafa0fa963dfe6e59afef162
[ "MIT" ]
1
2021-11-10T19:43:40.000Z
2021-11-10T19:43:40.000Z
setup.py
JacobXPX/squirrel-and-friends
9fbd41953dd3b388fafa0fa963dfe6e59afef162
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="squirrel-and-friends", version="0.1", packages=find_packages(), install_requires=[ "emoji==0.5.4", "nltk==3.5", "pyspellchecker==0.5.4", "numerizer==0.1.5", "lightgbm==2.3.1", "albumentations==0.5.2", "opencv-python==4.5.1...
32.722222
62
0.568761
from setuptools import setup, find_packages setup( name="squirrel-and-friends", version="0.1", packages=find_packages(), install_requires=[ "emoji==0.5.4", "nltk==3.5", "pyspellchecker==0.5.4", "numerizer==0.1.5", "lightgbm==2.3.1", "albumentations==0.5.2", "opencv-python==4.5.1...
true
true
79061ccb351da6bf7c8eeede8615af4ae5543246
459
py
Python
{{cookiecutter.project_slug}}/app/api/database/execute/user_information.py
khanh41/fastapi-mongodb-base-project
3ac2f2424cf0e4e35766cfd44431e5402f845e76
[ "MIT" ]
3
2021-11-13T04:27:34.000Z
2022-02-13T14:52:07.000Z
{{cookiecutter.project_slug}}/app/api/database/execute/user_information.py
dhuynguyen94/base-code-fastapi-mongodb
58ee6fac498597f45ecd0dae703f4ab78226ce7c
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/app/api/database/execute/user_information.py
dhuynguyen94/base-code-fastapi-mongodb
58ee6fac498597f45ecd0dae703f4ab78226ce7c
[ "MIT" ]
4
2021-11-13T04:27:43.000Z
2022-01-28T19:32:16.000Z
from app.api.database.connect import user_information_collection from app.api.database.execute.base_execute import BaseExecute from app.api.helpers.convert_model2dict import user_information_helper class ExerciseTrainerExecute(BaseExecute): def __init__(self, data_collection, data_helper): super().__init...
35.307692
103
0.849673
from app.api.database.connect import user_information_collection from app.api.database.execute.base_execute import BaseExecute from app.api.helpers.convert_model2dict import user_information_helper class ExerciseTrainerExecute(BaseExecute): def __init__(self, data_collection, data_helper): super().__init...
true
true
79061cdc88fb7edb224662802b500c1aba1fad72
10,991
py
Python
CountMillionCharacter.py
onepseudoxy/Python
2c22205b10e53e7e49d6ad1ce3e12ff2190285e3
[ "MIT" ]
null
null
null
CountMillionCharacter.py
onepseudoxy/Python
2c22205b10e53e7e49d6ad1ce3e12ff2190285e3
[ "MIT" ]
null
null
null
CountMillionCharacter.py
onepseudoxy/Python
2c22205b10e53e7e49d6ad1ce3e12ff2190285e3
[ "MIT" ]
null
null
null
""" Simple million word count program. main idea is Python pairs words with the number of times that number appears in the triple quoted string. Credit to William J. Turkel and Adam Crymble for the word frequency code used below. I just merged the two ideas. """ wordstring = '''SCENE I. Yorkshire. Gaultree Forest. Ent...
36.154605
64
0.786189
wordstring = '''SCENE I. Yorkshire. Gaultree Forest. Enter the ARCHBISHOP OF YORK, MOWBRAY, LORD HASTINGS, and others ARCHBISHOP OF YORK What is this forest call'd? HASTINGS 'Tis Gaultree Forest, an't shall please your grace. ARCHBISHOP OF YORK Here stand, my lords; and send discoverers forth To know the numbers of ou...
true
true
79061d383cf4c2a7f5a62388e67973f2bc64b30b
215
py
Python
frappe/patches/v7_0/rename_newsletter_list_to_email_group.py
chentaoz/frappe
ee3c4943bf6177ad3b410cdb0d802af486751a65
[ "MIT" ]
5
2017-09-12T15:56:31.000Z
2022-03-09T13:50:21.000Z
frappe/patches/v7_0/rename_newsletter_list_to_email_group.py
chentaoz/frappe
ee3c4943bf6177ad3b410cdb0d802af486751a65
[ "MIT" ]
212
2017-08-16T13:03:18.000Z
2020-10-06T12:26:21.000Z
frappe/patches/v7_0/rename_newsletter_list_to_email_group.py
chentaoz/frappe
ee3c4943bf6177ad3b410cdb0d802af486751a65
[ "MIT" ]
14
2020-11-04T11:22:44.000Z
2022-02-01T20:59:37.000Z
from __future__ import unicode_literals import frappe def execute(): frappe.rename_doc('DocType', 'Newsletter List', 'Email Group') frappe.rename_doc('DocType', 'Newsletter List Subscriber', 'Email Group Member')
35.833333
81
0.781395
from __future__ import unicode_literals import frappe def execute(): frappe.rename_doc('DocType', 'Newsletter List', 'Email Group') frappe.rename_doc('DocType', 'Newsletter List Subscriber', 'Email Group Member')
true
true
79061d639c6464c7a7fdf5d79ff1a55b2471022c
2,691
py
Python
openpyxl/pivot/tests/test_record.py
hfutxqd/openpyxl
50d6e37e0592aac63bc1ffeaf7b13e3b863bb066
[ "MIT" ]
null
null
null
openpyxl/pivot/tests/test_record.py
hfutxqd/openpyxl
50d6e37e0592aac63bc1ffeaf7b13e3b863bb066
[ "MIT" ]
null
null
null
openpyxl/pivot/tests/test_record.py
hfutxqd/openpyxl
50d6e37e0592aac63bc1ffeaf7b13e3b863bb066
[ "MIT" ]
null
null
null
# Copyright (c) 2010-2019 openpyxl import pytest from io import BytesIO from zipfile import ZipFile from openpyxl.packaging.manifest import Manifest from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml from .test_fields import ( Index, Number, Text, ) @py...
23.814159
92
0.528056
import pytest from io import BytesIO from zipfile import ZipFile from openpyxl.packaging.manifest import Manifest from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml from .test_fields import ( Index, Number, Text, ) @pytest.fixture def Record(): fro...
true
true
79061e1cfc2a540f18c2cab349a182091fd21bb6
1,686
py
Python
lib/django-1.4/django/contrib/gis/tests/geoapp/models.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.4/django/contrib/gis/tests/geoapp/models.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.4/django/contrib/gis/tests/geoapp/models.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
from django.contrib.gis.db import models from django.contrib.gis.tests.utils import mysql, spatialite # MySQL spatial indices can't handle NULL geometries. null_flag = not mysql class Country(models.Model): name = models.CharField(max_length=30) mpoly = models.MultiPolygonField() # SRID, by default, is 4326 ...
33.058824
79
0.716489
from django.contrib.gis.db import models from django.contrib.gis.tests.utils import mysql, spatialite null_flag = not mysql class Country(models.Model): name = models.CharField(max_length=30) mpoly = models.MultiPolygonField() # SRID, by default, is 4326 objects = models.GeoManager() def __unicode__(...
true
true
79061ee7a253f642eccc4cffd1d7cb39c45bf4ae
2,056
py
Python
syft/execution/translation/torchscript.py
NicoSerranoP/PySyft
87fcd566c46fce4c16d363c94396dd26bd82a016
[ "Apache-2.0" ]
null
null
null
syft/execution/translation/torchscript.py
NicoSerranoP/PySyft
87fcd566c46fce4c16d363c94396dd26bd82a016
[ "Apache-2.0" ]
null
null
null
syft/execution/translation/torchscript.py
NicoSerranoP/PySyft
87fcd566c46fce4c16d363c94396dd26bd82a016
[ "Apache-2.0" ]
1
2021-09-04T16:27:41.000Z
2021-09-04T16:27:41.000Z
from torch import jit from syft.execution.placeholder import PlaceHolder from syft.execution.translation.abstract import AbstractPlanTranslator class PlanTranslatorTorchscript(AbstractPlanTranslator): """Performs translation from 'list of ops' Plan into torchscript Plan""" def __init__(self, plan): s...
38.792453
95
0.664397
from torch import jit from syft.execution.placeholder import PlaceHolder from syft.execution.translation.abstract import AbstractPlanTranslator class PlanTranslatorTorchscript(AbstractPlanTranslator): def __init__(self, plan): super().__init__(plan) def translate(self): translation_plan = se...
true
true
79061fa2e93a400e914d6565ebe19b7e30f0efe1
9,885
py
Python
test/fuzz/test_runner.py
BlockMechanic/crown
e6b1873ca79c484a3621e503eb8ce464f85dd2c7
[ "MIT" ]
1
2021-10-12T05:27:56.000Z
2021-10-12T05:27:56.000Z
test/fuzz/test_runner.py
BlockMechanic/crown
e6b1873ca79c484a3621e503eb8ce464f85dd2c7
[ "MIT" ]
15
2022-01-14T09:13:52.000Z
2022-03-21T09:40:29.000Z
test/fuzz/test_runner.py
BlockMechanic/crown
e6b1873ca79c484a3621e503eb8ce464f85dd2c7
[ "MIT" ]
2
2021-10-12T05:39:32.000Z
2022-01-03T10:41:04.000Z
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Crown Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run fuzz test targets. """ from concurrent.futures import ThreadPoolExecutor, as_completed import argpar...
35.053191
180
0.600202
from concurrent.futures import ThreadPoolExecutor, as_completed import argparse import configparser import logging import os import subprocess import sys def main(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, description='''Run the fuzz targets w...
true
true
7906217d435e300f49b2b6ec9acfa86053ad1df5
89
py
Python
ubfcore/apps.py
himasnhu1/example
27db7941c5f7bd16ffb407654818012e43d82f7e
[ "MIT" ]
null
null
null
ubfcore/apps.py
himasnhu1/example
27db7941c5f7bd16ffb407654818012e43d82f7e
[ "MIT" ]
null
null
null
ubfcore/apps.py
himasnhu1/example
27db7941c5f7bd16ffb407654818012e43d82f7e
[ "MIT" ]
null
null
null
from django.apps import AppConfig class UbfCoreConfig(AppConfig): name = 'ubfcore'
14.833333
33
0.752809
from django.apps import AppConfig class UbfCoreConfig(AppConfig): name = 'ubfcore'
true
true
790621cd53ec2386a1f3b9413a40673274cc76fd
2,184
py
Python
usr/examples/09-Feature-Detection/keypoints.py
ermay12/openmv
ed1cd12026b8bd7363b835f5c1b90e5d3d710151
[ "MIT" ]
1
2018-02-27T09:23:51.000Z
2018-02-27T09:23:51.000Z
usr/examples/09-Feature-Detection/keypoints.py
guohuijiang1234/openmv
9c3e9109ec1a2b68bb34107557945bfa379d3a0e
[ "MIT" ]
null
null
null
usr/examples/09-Feature-Detection/keypoints.py
guohuijiang1234/openmv
9c3e9109ec1a2b68bb34107557945bfa379d3a0e
[ "MIT" ]
null
null
null
# Object tracking with keypoints example. # Show the camera an object and then run the script. A set of keypoints will be extracted # once and then tracked in the following frames. If you want a new set of keypoints re-run # the script. NOTE: see the docs for arguments to tune find_keypoints and match_keypoints. import...
37.655172
106
0.687729
import sensor, time, image sensor.reset() sensor.set_contrast(3) sensor.set_gainceiling(16) sensor.set_framesize(sensor.VGA) sensor.set_windowing((320, 240)) sensor.set_pixformat(sensor.GRAYSCALE) sensor.skip_frames(time = 2000) sensor.set_auto_gain(False, value=100) def draw_keypoints(img, kpts): print(k...
true
true
7906251dbf3c4f92a779bbac39f599cf597effec
17,720
py
Python
mne/tests/test_report.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
null
null
null
mne/tests/test_report.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
23
2017-09-12T11:08:26.000Z
2019-10-04T11:11:29.000Z
mne/tests/test_report.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2019-01-28T13:48:00.000Z
2019-07-10T16:02:11.000Z
# -*- coding: utf-8 -*- # Authors: Mainak Jas <mainak@neuro.hut.fi> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) import copy import glob import os import os.path as op import shutil import numpy as np from numpy.testing import assert_equal import pytest from matplotlib import pyplot as p...
39.116998
79
0.66772
import copy import glob import os import os.path as op import shutil import numpy as np from numpy.testing import assert_equal import pytest from matplotlib import pyplot as plt from mne import Epochs, read_events, read_evokeds from mne.io import read_raw_fif from mne.datasets import testing from mne.report imp...
true
true
7906259d219aba7b385e6547c88660c4dd2930d4
286
py
Python
mysite/urls.py
feraco/shifting-morals
115b80ca82d0715db49e593e1463a449ded0477c
[ "MIT" ]
1
2018-06-27T17:58:45.000Z
2018-06-27T17:58:45.000Z
mysite/urls.py
feraco/shifting-morals
115b80ca82d0715db49e593e1463a449ded0477c
[ "MIT" ]
null
null
null
mysite/urls.py
feraco/shifting-morals
115b80ca82d0715db49e593e1463a449ded0477c
[ "MIT" ]
1
2019-03-21T12:56:24.000Z
2019-03-21T12:56:24.000Z
from django.urls import include, path from django.contrib import admin from django.views.generic import RedirectView urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ] urlpatterns += [ path('', RedirectView.as_view(url='/polls/')), ]
23.833333
50
0.695804
from django.urls import include, path from django.contrib import admin from django.views.generic import RedirectView urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ] urlpatterns += [ path('', RedirectView.as_view(url='/polls/')), ]
true
true
7906261835a6f0e5ae6c914ccb779bd44c37c2d2
6,356
py
Python
main.py
LucaZancato/stric
8daeeca48b8d0b2db8156e7f1c66c0956c133353
[ "Apache-2.0" ]
null
null
null
main.py
LucaZancato/stric
8daeeca48b8d0b2db8156e7f1c66c0956c133353
[ "Apache-2.0" ]
null
null
null
main.py
LucaZancato/stric
8daeeca48b8d0b2db8156e7f1c66c0956c133353
[ "Apache-2.0" ]
null
null
null
import hydra import os import logging import json import numpy as np import torch import matplotlib.pyplot as plt from collections import defaultdict import json from IPython import embed # from AD_models import AD_Time_Series # from AD_utils import AD_report, AD_dataset, plot_AD_dataset, AD_preprocessing # import T...
48.892308
193
0.65922
import hydra import os import logging import json import numpy as np import torch import matplotlib.pyplot as plt from collections import defaultdict import json from IPython import embed import stric.datasets as datasets import stric.detection_models.time_series_models as models import stric.detection_models.d...
true
true
79062624af2b18168386d973f0244b1f3a54dea5
1,058
py
Python
bent/weakprime.py
rgc-retired/math_puzzles
0f96fc0f4d53f9ece53fb7af02c037067f710fac
[ "MIT" ]
null
null
null
bent/weakprime.py
rgc-retired/math_puzzles
0f96fc0f4d53f9ece53fb7af02c037067f710fac
[ "MIT" ]
null
null
null
bent/weakprime.py
rgc-retired/math_puzzles
0f96fc0f4d53f9ece53fb7af02c037067f710fac
[ "MIT" ]
null
null
null
import sympy from sympy import * def check_weak_prime(n): if not isprime(n): return(False) digits=[int(i) for i in str(n)] # For each digit location - test all other values to see if # the result is prime. If so - then this is not a weak prime for position in range(len(digits)): di...
28.594595
65
0.503781
import sympy from sympy import * def check_weak_prime(n): if not isprime(n): return(False) digits=[int(i) for i in str(n)] for position in range(len(digits)): digits2=[i for i in digits] for j in range(10): if j != digits[position]: digits2[posi...
true
true
790627cc943ea78dc54d4eb3460a6686dc664b7d
1,708
py
Python
neighbourhood/migrations/0004_auto_20220103_1315.py
Maryan23/MyHood
338d76399cbdeded96d2ed3b19928146322cb705
[ "MIT" ]
null
null
null
neighbourhood/migrations/0004_auto_20220103_1315.py
Maryan23/MyHood
338d76399cbdeded96d2ed3b19928146322cb705
[ "MIT" ]
null
null
null
neighbourhood/migrations/0004_auto_20220103_1315.py
Maryan23/MyHood
338d76399cbdeded96d2ed3b19928146322cb705
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2022-01-03 10:15 import cloudinary.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('neighbourhood', '0003_auto_20211222_2324'), ] operations = [ migrations.CreateMode...
34.857143
121
0.600117
import cloudinary.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('neighbourhood', '0003_auto_20211222_2324'), ] operations = [ migrations.CreateModel( name='Location', fie...
true
true
790628d2b0fdee6504fb07b1936ed470c3b9c782
14,257
py
Python
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
tiwaria1/llvm
616a396db0610ae0c1992361af005a869ef81897
[ "Apache-2.0" ]
1
2020-09-10T01:00:18.000Z
2020-09-10T01:00:18.000Z
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
coolstar/llvm-project
e21ccdd5b5667de50de65ee8903a89a21020e89a
[ "Apache-2.0" ]
null
null
null
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
coolstar/llvm-project
e21ccdd5b5667de50de65ee8903a89a21020e89a
[ "Apache-2.0" ]
null
null
null
from lldbsuite.test.lldbtest import * import os import vscode class VSCodeTestCaseBase(TestBase): NO_DEBUG_INFO_TESTCASE = True def create_debug_adaptor(self): '''Create the Visual Studio Code debug adaptor''' self.assertTrue(os.path.exists(self.lldbVSCodeExec), 'lld...
44.139319
86
0.58694
from lldbsuite.test.lldbtest import * import os import vscode class VSCodeTestCaseBase(TestBase): NO_DEBUG_INFO_TESTCASE = True def create_debug_adaptor(self): self.assertTrue(os.path.exists(self.lldbVSCodeExec), 'lldb-vscode must exist') log_file_path = self.getBuil...
true
true
79062920dfebee87226a14a6e3e4aaf3535fe385
1,075
py
Python
server/server.py
dave-cz/esp32_power_meter
649c2020be587b2d57d40dd3c201feec3596c2a0
[ "MIT" ]
1
2022-01-13T17:21:55.000Z
2022-01-13T17:21:55.000Z
server/server.py
dave-cz/esp32_power_meter
649c2020be587b2d57d40dd3c201feec3596c2a0
[ "MIT" ]
null
null
null
server/server.py
dave-cz/esp32_power_meter
649c2020be587b2d57d40dd3c201feec3596c2a0
[ "MIT" ]
null
null
null
import logging import pandas as pd from flask import Flask, request from gevent.pywsgi import WSGIServer from time import sleep from func import rms, meas_to_influx, rms_to_influx, config logger = logging.getLogger(config['log_name']) logger.setLevel(logging.INFO) h_stream = logging.StreamHandler() h_stream.setLevel(...
22.87234
79
0.664186
import logging import pandas as pd from flask import Flask, request from gevent.pywsgi import WSGIServer from time import sleep from func import rms, meas_to_influx, rms_to_influx, config logger = logging.getLogger(config['log_name']) logger.setLevel(logging.INFO) h_stream = logging.StreamHandler() h_stream.setLevel(...
true
true
790629a1290c8a43454251bb08563665adc9b9b5
599
py
Python
python-dsa/Section4/graph_adj_list.py
vermuz/mani-professional-notes
896328e81e376bc113553c81d38ad6c1781b8e0b
[ "CC-BY-3.0" ]
26
2018-06-28T05:32:20.000Z
2021-11-08T13:12:41.000Z
Section4/graph_adj_list.py
khiemspdt/Python-Data-Structures-and-Algorithms-v-
3540693eb18313cbc9d65dad8232357dd351b3a9
[ "MIT" ]
null
null
null
Section4/graph_adj_list.py
khiemspdt/Python-Data-Structures-and-Algorithms-v-
3540693eb18313cbc9d65dad8232357dd351b3a9
[ "MIT" ]
31
2018-05-10T21:31:21.000Z
2022-02-14T12:38:08.000Z
# Undirected Graph from demo represented as Adjacency List graph = { "a": [("b", 7), ("c", 9), ("f", 14)], "b": [("a", 7), ("c", 10), ("d", 15)], "c": [("a", 9), ("b", 10), ("d", 11), ("f", 2)], "d": [("b", 15), ("c", 11), ("e", 6)], "e": [("d", 6), ("f", 9)], "f": [("a", 14), ("c", 2), ("e", 9...
24.958333
58
0.435726
graph = { "a": [("b", 7), ("c", 9), ("f", 14)], "b": [("a", 7), ("c", 10), ("d", 15)], "c": [("a", 9), ("b", 10), ("d", 11), ("f", 2)], "d": [("b", 15), ("c", 11), ("e", 6)], "e": [("d", 6), ("f", 9)], "f": [("a", 14), ("c", 2), ("e", 9)], } def find_vertices(): return graph.keys() def f...
true
true
79062a4a296cfdcd7b9893d2ae317bf782d4b55e
10,790
py
Python
test/functional/wallet_import_rescan.py
XziimP/bitcoinV
38980aff8a8be63b338bbe83ea9896107104fc60
[ "MIT" ]
128
2015-01-20T22:21:27.000Z
2021-09-17T04:40:56.000Z
test/functional/wallet_import_rescan.py
ccyanxyz/bitcoin
9dd6bbba613d7462afdb6276c4002bc183478528
[ "MIT" ]
162
2015-02-23T00:45:54.000Z
2021-11-10T09:51:47.000Z
test/functional/wallet_import_rescan.py
ccyanxyz/bitcoin
9dd6bbba613d7462afdb6276c4002bc183478528
[ "MIT" ]
168
2015-01-13T13:54:38.000Z
2022-01-24T23:04:06.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test wallet import RPCs. Test rescan behavior of importaddress, importpubkey, importprivkey, and impor...
46.913043
126
0.66469
from test_framework.test_framework import BitcoinTestFramework from test_framework.address import AddressType from test_framework.util import ( connect_nodes, assert_equal, set_node_times, ) import collections from decimal import Decimal import enum import itertools import random Call = enum.Enum("Ca...
true
true
79062ac560580fcfe662156bf70930d38c1109dc
1,178
py
Python
avltree/AVLNode.py
gpk2000/avl-db
11003e26f8114a3a70e75c952c2464ae0ed29cc5
[ "MIT" ]
1
2021-06-15T05:22:19.000Z
2021-06-15T05:22:19.000Z
avltree/AVLNode.py
gpk2000/avl-db
11003e26f8114a3a70e75c952c2464ae0ed29cc5
[ "MIT" ]
null
null
null
avltree/AVLNode.py
gpk2000/avl-db
11003e26f8114a3a70e75c952c2464ae0ed29cc5
[ "MIT" ]
null
null
null
class NoNodeData(Exception): pass class AVLNode(object): def __init__(self, key=None, value=None) -> None: """Initializes the AVL Node. Args: data (dict, optional): {Key:Value} pair. Defaults to None. """ super().__init__() self.key = key self.valu...
23.56
82
0.516129
class NoNodeData(Exception): pass class AVLNode(object): def __init__(self, key=None, value=None) -> None: super().__init__() self.key = key self.value = value self.left = None self.right = None self.height = 1 def __str__(self) -> str: if self.key...
true
true
79062ad443583a58e8c07a4e627fcfa37486aab4
7,486
py
Python
libs/networks/resnet_dilation.py
Kinpzz/RCRNet-Pytorch
8d9f0fe0c7ad651db7578b2d96741de11036ef82
[ "MIT" ]
67
2019-11-22T14:50:09.000Z
2021-12-21T21:57:55.000Z
libs/networks/resnet_dilation.py
Kinpzz/RCRNet-Pytorch
8d9f0fe0c7ad651db7578b2d96741de11036ef82
[ "MIT" ]
6
2019-12-03T14:03:57.000Z
2021-10-10T11:25:30.000Z
libs/networks/resnet_dilation.py
Kinpzz/RCRNet-Pytorch
8d9f0fe0c7ad651db7578b2d96741de11036ef82
[ "MIT" ]
15
2019-10-24T08:14:50.000Z
2021-09-24T05:56:16.000Z
#!/usr/bin/env python # coding: utf-8 # # This code is based on torchvison resnet # URL: https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py import torch.nn as nn import torch.utils.model_zoo as model_zoo __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', ...
33.419643
102
0.599386
import torch.nn as nn import torch.utils.model_zoo as model_zoo __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152'] model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/mod...
true
true
79062b674ad6bafbff9ed9db57e157595c6fdec5
1,626
py
Python
plot_battery.py
rjmendez/lifepo4_bms
7561b50d3ff6551a65cf9d10c8f4bffeeb34db34
[ "Unlicense" ]
1
2019-09-25T19:06:37.000Z
2019-09-25T19:06:37.000Z
plot_battery.py
rjmendez/lifepo4_bms
7561b50d3ff6551a65cf9d10c8f4bffeeb34db34
[ "Unlicense" ]
null
null
null
plot_battery.py
rjmendez/lifepo4_bms
7561b50d3ff6551a65cf9d10c8f4bffeeb34db34
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys all_raw = open(sys.argv[1], 'r') # init empty lists cell0v = [] cell1v = [] cell2v = [] cell3v = [] totalv = [] # Process data into lists for line in all_raw: if 'voltage cell 0: ' in line: try: ...
29.035714
75
0.587946
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys all_raw = open(sys.argv[1], 'r') cell0v = [] cell1v = [] cell2v = [] cell3v = [] totalv = [] for line in all_raw: if 'voltage cell 0: ' in line: try: cell0v.append(float(line.replace('voltage cell 0: ', '')[:-4...
true
true
79062bd264064197ab9e1975ef3a6b3f090ed903
1,961
py
Python
config/settings/local.py
megcunningham/django-diesel
72016c4e1405cf8aa6227823d112974acd8133b8
[ "BSD-3-Clause" ]
null
null
null
config/settings/local.py
megcunningham/django-diesel
72016c4e1405cf8aa6227823d112974acd8133b8
[ "BSD-3-Clause" ]
null
null
null
config/settings/local.py
megcunningham/django-diesel
72016c4e1405cf8aa6227823d112974acd8133b8
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
31.126984
110
0.500765
from .common import * DEBUG = env.bool('DJANGO_DEBUG', default=True) TEMPLATES[0]['OPTIONS']['debug'] = DEBUG Y = env("DJANGO_SECRET_KEY", default='CHANGEME!!!gjwrp$!ldm&fccwk7-bwajlwga)m)!js+pouvnhnxb9+^nbwbw') EMAIL_HOST = 'localhost' EMAIL_PORT = 1025 EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', ...
true
true
79062be30a913ab25a06164b9800864bb79d5e79
333
py
Python
tests/test-failinfo_refcount.py
lwllvyb/libfiu-hack
a41612d78fbce5e2a33745837c2ec735cc22fd6e
[ "MIT" ]
null
null
null
tests/test-failinfo_refcount.py
lwllvyb/libfiu-hack
a41612d78fbce5e2a33745837c2ec735cc22fd6e
[ "MIT" ]
null
null
null
tests/test-failinfo_refcount.py
lwllvyb/libfiu-hack
a41612d78fbce5e2a33745837c2ec735cc22fd6e
[ "MIT" ]
null
null
null
""" Test that we keep references to failinfo as needed. """ import fiu # Object we'll use for failinfo finfo = [1, 2, 3] fiu.enable('p1', failinfo = finfo) assert fiu.fail('p1') assert fiu.failinfo('p1') is finfo finfo_id = id(finfo) del finfo assert fiu.failinfo('p1') == [1, 2, 3] assert id(fiu.failinfo('p1')) ...
15.136364
51
0.666667
import fiu finfo = [1, 2, 3] fiu.enable('p1', failinfo = finfo) assert fiu.fail('p1') assert fiu.failinfo('p1') is finfo finfo_id = id(finfo) del finfo assert fiu.failinfo('p1') == [1, 2, 3] assert id(fiu.failinfo('p1')) == finfo_id
true
true
79062c09d1ba2bad2a4c0e85b0e3ae49054c928c
2,208
py
Python
AB/pythonfunctions/search/elasticsearch/client/monitoring.py
PatrickJD/AWS
c7f976c0c5795ac43803ac201dbb57d584308bb0
[ "MIT" ]
null
null
null
AB/pythonfunctions/search/elasticsearch/client/monitoring.py
PatrickJD/AWS
c7f976c0c5795ac43803ac201dbb57d584308bb0
[ "MIT" ]
null
null
null
AB/pythonfunctions/search/elasticsearch/client/monitoring.py
PatrickJD/AWS
c7f976c0c5795ac43803ac201dbb57d584308bb0
[ "MIT" ]
null
null
null
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
40.888889
108
0.685688
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH, _bulk_body class MonitoringClient(NamespacedClient): @query_params("interval", "system_api_version", "system_id") def bulk(self, body, doc_type=None, params=None, headers=None): if body in SKIP_IN_PATH: ...
true
true
79062cc22e761815e110c4f9c4667a88a215871a
1,044
py
Python
gen/pb_python/flyteidl/service/flyteadmin/test/test_admin_pager_duty_notification.py
SmritiSatyanV/flyteidl
e8a29e0deb437d9e7086f9e90b72362cd26000a2
[ "Apache-2.0" ]
13
2019-08-05T22:02:36.000Z
2020-07-05T06:21:14.000Z
gen/pb_python/flyteidl/service/flyteadmin/test/test_admin_pager_duty_notification.py
SmritiSatyanV/flyteidl
e8a29e0deb437d9e7086f9e90b72362cd26000a2
[ "Apache-2.0" ]
70
2021-02-01T22:14:27.000Z
2022-03-29T12:56:06.000Z
gen/pb_python/flyteidl/service/flyteadmin/test/test_admin_pager_duty_notification.py
SmritiSatyanV/flyteidl
e8a29e0deb437d9e7086f9e90b72362cd26000a2
[ "Apache-2.0" ]
22
2021-02-01T16:13:28.000Z
2022-02-25T08:15:29.000Z
# coding: utf-8 """ flyteidl/service/admin.proto No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: version not set Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import...
25.463415
119
0.737548
from __future__ import absolute_import import unittest import flyteadmin from flyteadmin.models.admin_pager_duty_notification import AdminPagerDutyNotification from flyteadmin.rest import ApiException class TestAdminPagerDutyNotification(unittest.TestCase): def setUp(self): pass def tearDown...
true
true