hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7063935b696e53fefee2f17d273cae04348d20e
10,443
py
Python
src/dmriprep_analyses/registrations/registrations.py
GalBenZvi/dmriprep_analyses
07acf7dbbb47607df3a645b174060ca70000bc13
[ "Apache-2.0" ]
null
null
null
src/dmriprep_analyses/registrations/registrations.py
GalBenZvi/dmriprep_analyses
07acf7dbbb47607df3a645b174060ca70000bc13
[ "Apache-2.0" ]
1
2022-03-31T12:00:58.000Z
2022-03-31T12:00:58.000Z
src/dmriprep_analyses/registrations/registrations.py
GalBenZvi/dmriprep_analyses
07acf7dbbb47607df3a645b174060ca70000bc13
[ "Apache-2.0" ]
1
2022-03-31T12:01:12.000Z
2022-03-31T12:01:12.000Z
""" Definition of the :class:`NativeRegistration` class. """ from pathlib import Path from typing import Tuple from typing import Union import nibabel as nib from brain_parts.parcellation.parcellations import ( Parcellation as parcellation_manager, ) from nilearn.image.resampling import resample_to_img from nipype...
33.578778
104
0.598583
from pathlib import Path from typing import Tuple from typing import Union import nibabel as nib from brain_parts.parcellation.parcellations import ( Parcellation as parcellation_manager, ) from nilearn.image.resampling import resample_to_img from nipype.interfaces.base import TraitError from tqdm import tqdm fro...
true
true
f7063970bb165a0cdfbfe33da75241170517ad73
2,763
py
Python
mlops/demo_project02_m03/21-bronze_2_gold.py
jostrm/azure-enterprise-scale-ml-usage
52508e6193b57eeb71ffe0d70fb31ed692527b9f
[ "MIT" ]
null
null
null
mlops/demo_project02_m03/21-bronze_2_gold.py
jostrm/azure-enterprise-scale-ml-usage
52508e6193b57eeb71ffe0d70fb31ed692527b9f
[ "MIT" ]
null
null
null
mlops/demo_project02_m03/21-bronze_2_gold.py
jostrm/azure-enterprise-scale-ml-usage
52508e6193b57eeb71ffe0d70fb31ed692527b9f
[ "MIT" ]
null
null
null
""" Copyright (C) Microsoft Corporation. All rights reserved.​ ​ Microsoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual, royalty-free right to use, copy, and modify the software code provided by us ("Software Code"). You may not sublicense the Software Code or any use of it (except to your affiliates...
50.236364
126
0.799131
import repackage repackage.add("../../azure-enterprise-scale-ml/esml/common/") import azureml.core from azureml.core.authentication import AzureCliAuthentication from esml import ESMLProject from baselayer_azure_ml import AutoMLFactory, azure_metric_regression,azure_metric_classification print("SDK Version:", azureml....
true
true
f706399f027ebfe32a4def7df3a638ee04dd9f50
9,186
py
Python
adversarial_testing/test_module.py
shromonag/active_testing
ca9c8f909f6b0f4e7b1affda6f9333e0d0b6c04b
[ "MIT" ]
4
2019-03-09T12:38:46.000Z
2021-12-08T15:45:44.000Z
adversarial_testing/test_module.py
shromonag/active_testing
ca9c8f909f6b0f4e7b1affda6f9333e0d0b6c04b
[ "MIT" ]
null
null
null
adversarial_testing/test_module.py
shromonag/active_testing
ca9c8f909f6b0f4e7b1affda6f9333e0d0b6c04b
[ "MIT" ]
3
2019-01-09T13:43:06.000Z
2021-11-30T22:15:28.000Z
''' This file defines the testing module. This needs the following: 1. The system under test 2. The specification or the function which we are trying to minimize 3. Domains of the uncertainities ''' from .optimizers import * from .func_tree import * from .utils import * from sklearn.decomposition import KernelPCA imp...
37.647541
82
0.53157
from .optimizers import * from .func_tree import * from .utils import * from sklearn.decomposition import KernelPCA import copy import GPy class test_module: def __init__(self, sut, bounds, spec=None,f_tree=None, optimizer=None, normalizer=False,seed=None, **kwargs): self.system_under_te...
true
true
f7063c68042fb461608e15e7a993c531746e0c5b
4,018
py
Python
suzieq/cli/sq_nubia_plugin.py
foobug/suzieq
c5927616a0e1a1fd9283f2a3eeb120d24ff0f2b5
[ "Apache-2.0" ]
null
null
null
suzieq/cli/sq_nubia_plugin.py
foobug/suzieq
c5927616a0e1a1fd9283f2a3eeb120d24ff0f2b5
[ "Apache-2.0" ]
null
null
null
suzieq/cli/sq_nubia_plugin.py
foobug/suzieq
c5927616a0e1a1fd9283f2a3eeb120d24ff0f2b5
[ "Apache-2.0" ]
null
null
null
import argparse from suzieq.cli.sqcmds import * from suzieq.cli.sqcmds import context_commands from suzieq.cli.sqcmds import sqcmds_all from suzieq.cli.sq_nubia_context import NubiaSuzieqContext from suzieq.cli.sq_nubia_statusbar import NubiaSuzieqStatusBar from nubia import PluginInterface, CompletionDataSource from n...
35.245614
88
0.651817
import argparse from suzieq.cli.sqcmds import * from suzieq.cli.sqcmds import context_commands from suzieq.cli.sqcmds import sqcmds_all from suzieq.cli.sq_nubia_context import NubiaSuzieqContext from suzieq.cli.sq_nubia_statusbar import NubiaSuzieqStatusBar from nubia import PluginInterface, CompletionDataSource from n...
true
true
f7063c9a7e2a6a313b4585d2003fd85f83a87c78
4,231
py
Python
eLarning_LMS/curriculum/models.py
Sayed-Noman/E-Classroom-LMS
1f168fd92a265e8bee6ff0fe370114d9a5a1d666
[ "CC0-1.0" ]
1
2021-07-05T16:56:12.000Z
2021-07-05T16:56:12.000Z
eLarning_LMS/curriculum/models.py
Sayed-Noman/E-Classroom-LMS
1f168fd92a265e8bee6ff0fe370114d9a5a1d666
[ "CC0-1.0" ]
null
null
null
eLarning_LMS/curriculum/models.py
Sayed-Noman/E-Classroom-LMS
1f168fd92a265e8bee6ff0fe370114d9a5a1d666
[ "CC0-1.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os from django.urls import reverse class standard(models.Model): name = models.CharField(max_length=100, unique=True) slug = models.SlugField(null=True,blank=True) descriptio...
36.791304
117
0.705743
from django.db import models from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os from django.urls import reverse class standard(models.Model): name = models.CharField(max_length=100, unique=True) slug = models.SlugField(null=True,blank=True) descriptio...
true
true
f7063d183d1a4b14e905709671cb83a6a4ba78be
964
py
Python
app/user/views.py
anilbpoyraz/recipe-app-api
947ff8c54b0abeb9a2a70825bd5bfe74944ccde3
[ "MIT" ]
null
null
null
app/user/views.py
anilbpoyraz/recipe-app-api
947ff8c54b0abeb9a2a70825bd5bfe74944ccde3
[ "MIT" ]
null
null
null
app/user/views.py
anilbpoyraz/recipe-app-api
947ff8c54b0abeb9a2a70825bd5bfe74944ccde3
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIVie...
32.133333
66
0.790456
from django.shortcuts import render from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIVie...
true
true
f7063dd9183fa5b780f552acfabf2570d70adcd9
3,152
py
Python
image_data.py
SonicZedt/ColorCount
55fee92a7858c504b5a135b007f2065c2ec0a1be
[ "MIT" ]
null
null
null
image_data.py
SonicZedt/ColorCount
55fee92a7858c504b5a135b007f2065c2ec0a1be
[ "MIT" ]
null
null
null
image_data.py
SonicZedt/ColorCount
55fee92a7858c504b5a135b007f2065c2ec0a1be
[ "MIT" ]
null
null
null
import requests import numpy as np import collections import matplotlib.pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from PIL import Image from io import BytesIO class Image_Data: image = None @property def Array(self) -> np.ndarray: """ Return ...
27.172414
103
0.572335
import requests import numpy as np import collections import matplotlib.pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from PIL import Image from io import BytesIO class Image_Data: image = None @property def Array(self) -> np.ndarray: return self.image ...
true
true
f7063ee6b72312968b8d65d5a860b3b60faa11f8
527
py
Python
project/dbmanager.py
sztechmiler/carpricing_model
3214820c9e5dab90b8e67c497e3e5630cd37b338
[ "MIT" ]
null
null
null
project/dbmanager.py
sztechmiler/carpricing_model
3214820c9e5dab90b8e67c497e3e5630cd37b338
[ "MIT" ]
null
null
null
project/dbmanager.py
sztechmiler/carpricing_model
3214820c9e5dab90b8e67c497e3e5630cd37b338
[ "MIT" ]
null
null
null
from pymongo import MongoClient client = MongoClient() # carPricingDB = client["carPricing"] # firstOffersCollection = carPricingDB.create_collection("firstOffers") # firstOffersCollection.insert_one({"item":"initialone"}) carPricingDB = client.carPricing firstOffersCollection = carPricingDB.firstOffers firstOffer...
25.095238
71
0.70778
from pymongo import MongoClient client = MongoClient() carPricingDB = client.carPricing firstOffersCollection = carPricingDB.firstOffers firstOffersCollection.insert_one( {"item": "canvas", "qty": 100, "tags": ["cotton"], "size": {"h": 28, "w": 35.5, "uom": "cm"}}) coss = firstOffersCollection....
true
true
f7063f6725e9115c25a43134ff0307df025c8b2a
14,639
py
Python
lib/datasets/adas.py
LeftThink/pytorch-lighthead
5f4bf1c87b9be77bf7242ad89900239a9d66914c
[ "MIT" ]
null
null
null
lib/datasets/adas.py
LeftThink/pytorch-lighthead
5f4bf1c87b9be77bf7242ad89900239a9d66914c
[ "MIT" ]
null
null
null
lib/datasets/adas.py
LeftThink/pytorch-lighthead
5f4bf1c87b9be77bf7242ad89900239a9d66914c
[ "MIT" ]
null
null
null
# coding: utf-8 # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- from __future__ import print_function import xml.dom.mi...
38.523684
89
0.548398
from __future__ import print_function import xml.dom.minidom as minidom import os import numpy as np import scipy.sparse import subprocess try: import cPickle except ImportError: import pickle as cPickle import math import glob import uuid import scipy.io as sio import xml.etree.ElementTree as ET from .imd...
true
true
f7063fae6bee16bb30a3c8c4c5ebb22ae4f03327
45,832
py
Python
twisted/test/test_internet.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/test/test_internet.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/test/test_internet.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for lots of functionality provided by L{twisted.internet}. """ from __future__ import division, absolute_import import os import sys import time from twisted.python.compat import _PY3 from twisted.trial import unittest from twisted.in...
33.30814
106
0.617036
from __future__ import division, absolute_import import os import sys import time from twisted.python.compat import _PY3 from twisted.trial import unittest from twisted.internet import reactor, protocol, error, abstract, defer from twisted.internet import interfaces, base try: from twisted.internet import ssl ...
true
true
f7063ff7120d8a3fb31afa45050aa68549726b3f
1,126
py
Python
setup.py
Exahilosys/aio4chan
b474f4bfdbc1ab6d50e85de5643137579e1cca1d
[ "MIT" ]
1
2020-11-22T18:19:35.000Z
2020-11-22T18:19:35.000Z
setup.py
Exahilosys/aio4chan
b474f4bfdbc1ab6d50e85de5643137579e1cca1d
[ "MIT" ]
null
null
null
setup.py
Exahilosys/aio4chan
b474f4bfdbc1ab6d50e85de5643137579e1cca1d
[ "MIT" ]
null
null
null
import setuptools with open('README.md') as file: readme = file.read() name = 'aio4chan' module = __import__(name) version = module.__version__ author = 'Exahilosys' url = f'https://github.com/{author}/{name}' download_url = f'{url}/archive/v{version}.tar.gz' setuptools.setup( name = name, version ...
25.022222
71
0.629663
import setuptools with open('README.md') as file: readme = file.read() name = 'aio4chan' module = __import__(name) version = module.__version__ author = 'Exahilosys' url = f'https://github.com/{author}/{name}' download_url = f'{url}/archive/v{version}.tar.gz' setuptools.setup( name = name, version ...
true
true
f70641510a5cf066e127b603f360febd9bc09f0f
3,585
py
Python
test/test_bit4id_pathgroup_digital_signature_transactions_api.py
signingtoday/signingtoday-sdk-python
ed267279622fb59f2ad8fa289157fc9cdf9d8a5b
[ "MIT" ]
null
null
null
test/test_bit4id_pathgroup_digital_signature_transactions_api.py
signingtoday/signingtoday-sdk-python
ed267279622fb59f2ad8fa289157fc9cdf9d8a5b
[ "MIT" ]
null
null
null
test/test_bit4id_pathgroup_digital_signature_transactions_api.py
signingtoday/signingtoday-sdk-python
ed267279622fb59f2ad8fa289157fc9cdf9d8a5b
[ "MIT" ]
null
null
null
# coding: utf-8 """ Signing Today Web *Signing Today* is the perfect Digital Signature Gateway. Whenever in Your workflow You need to add one or more Digital Signatures to Your document, *Signing Today* is the right choice. You prepare Your documents, *Signing Today* takes care of all the rest: send invitatio...
27.159091
557
0.663877
from __future__ import absolute_import import unittest import signing_today_client from signing_today_client.api.bit4id_pathgroup_digital_signature_transactions_api import Bit4idPathgroupDigitalSignatureTransactionsApi from signing_today_client.rest import ApiException class TestBit4idPathgroupDigitalSignatureT...
true
true
f706435d4ba5db818a09e5f58e4febaf834cc7b4
25,688
py
Python
py/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py
FXTD-ODYSSEY/vscode-mayapy
7a21872f80b5b740fc653e79c3f9b5268e87b3c3
[ "MIT" ]
20
2019-09-20T00:30:22.000Z
2021-12-26T06:56:16.000Z
py/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py
minjiang999/vscode-mayapy
7a21872f80b5b740fc653e79c3f9b5268e87b3c3
[ "MIT" ]
5
2019-12-29T15:19:03.000Z
2022-03-29T16:54:19.000Z
py/ptvsd/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py
minjiang999/vscode-mayapy
7a21872f80b5b740fc653e79c3f9b5268e87b3c3
[ "MIT" ]
8
2019-09-23T05:46:44.000Z
2022-01-11T14:42:14.000Z
import os import sys import traceback from _pydev_bundle.pydev_imports import xmlrpclib, _queue, Exec from _pydev_bundle._pydev_calltip_util import get_description from _pydev_imps._pydev_saved_modules import thread from _pydevd_bundle import pydevd_vars from _pydevd_bundle import pydevd_xml from _pydevd_bundle.pydevd...
38.512744
133
0.549167
import os import sys import traceback from _pydev_bundle.pydev_imports import xmlrpclib, _queue, Exec from _pydev_bundle._pydev_calltip_util import get_description from _pydev_imps._pydev_saved_modules import thread from _pydevd_bundle import pydevd_vars from _pydevd_bundle import pydevd_xml from _pydevd_bundle.pydevd...
true
true
f706446f1fd7a4d4609ff7e1c8f9a6c1b63dbfde
106
py
Python
src/python/bmf-io/binarymeshformat/__init__.py
tinevez/DeformingMesh3D-plugin
0cf9b91468c09d04ec223ad0b05ef525dddc0ce6
[ "MIT" ]
1
2021-07-29T16:21:39.000Z
2021-07-29T16:21:39.000Z
src/python/bmf-io/binarymeshformat/__init__.py
tinevez/DeformingMesh3D-plugin
0cf9b91468c09d04ec223ad0b05ef525dddc0ce6
[ "MIT" ]
5
2018-01-12T07:59:00.000Z
2021-12-23T23:32:46.000Z
src/python/bmf-io/binarymeshformat/__init__.py
tinevez/DeformingMesh3D-plugin
0cf9b91468c09d04ec223ad0b05ef525dddc0ce6
[ "MIT" ]
2
2022-02-11T14:27:32.000Z
2022-02-11T14:56:41.000Z
from .writer import saveMeshTracks from .reader import loadMeshTracks from .meshdata import Track, Mesh
21.2
34
0.820755
from .writer import saveMeshTracks from .reader import loadMeshTracks from .meshdata import Track, Mesh
true
true
f7064473ef3ca55d50b131e9eb184e34f6a337f3
13,732
py
Python
arcutils/settings.py
zhuitrec/django-arcutils
4079ef641f43baab4cda4681b1f76e320f12eb38
[ "MIT" ]
null
null
null
arcutils/settings.py
zhuitrec/django-arcutils
4079ef641f43baab4cda4681b1f76e320f12eb38
[ "MIT" ]
null
null
null
arcutils/settings.py
zhuitrec/django-arcutils
4079ef641f43baab4cda4681b1f76e320f12eb38
[ "MIT" ]
null
null
null
"""Utilities for setting up a project's settings. The default way to use this is to import and call :func:`init_settings` in a project's settings module: # project/top_level_package/settings.py from arcutils.settings import init_settings init_settings() This adds a few default settings for bootstrapping ...
35.853786
98
0.664069
import base64 import inspect import ipaddress import os import pkg_resources from datetime import datetime from django import VERSION as DJANGO_VERSION from django.conf import settings as django_settings from django.utils import timezone from local_settings import NO_DEFAULT, load_and_check_settings, LocalSetting, Se...
true
true
f706449da0b8d809e91d6c36a38a073b43f44719
5,829
py
Python
swift/proxy/controllers/account.py
aristanetworks/swift
9fe774840e75cc54f2e0302e1e4501807fdb8b3c
[ "Apache-2.0" ]
null
null
null
swift/proxy/controllers/account.py
aristanetworks/swift
9fe774840e75cc54f2e0302e1e4501807fdb8b3c
[ "Apache-2.0" ]
null
null
null
swift/proxy/controllers/account.py
aristanetworks/swift
9fe774840e75cc54f2e0302e1e4501807fdb8b3c
[ "Apache-2.0" ]
1
2020-06-05T08:07:09.000Z
2020-06-05T08:07:09.000Z
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
44.159091
78
0.650712
from swift import gettext_ as _ from urllib import unquote from swift.account.utils import account_listing_response from swift.common.request_helpers import get_listing_content_type from swift.common.utils import public from swift.common.constraints import check_metadata, MAX_ACCOUNT_NAME_LENGTH from swift.common.htt...
true
true
f70645056a1304f0fb9795cf6d3ecb62749e3b4d
3,878
py
Python
K-NN Classification/KNN Classification from scratch/knn_from_scratch.py
mehulfollytobevice/MachineLearning
452c4379f84dfb5ff68faa187b106d59f87a21f0
[ "MIT" ]
6
2020-02-26T08:15:08.000Z
2021-05-20T01:15:04.000Z
K-NN Classification/KNN Classification from scratch/knn_from_scratch.py
ManasSPatil/MachineLearning
7d442907df4e8560bf5067d8bac660a3cb303393
[ "MIT" ]
null
null
null
K-NN Classification/KNN Classification from scratch/knn_from_scratch.py
ManasSPatil/MachineLearning
7d442907df4e8560bf5067d8bac660a3cb303393
[ "MIT" ]
2
2021-04-10T15:31:36.000Z
2021-05-22T03:06:26.000Z
# -*- coding: utf-8 -*- """ Created on Thu Apr 9 21:03:57 2020 @author: Mehul """ #importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd import random import warnings from matplotlib import style from collections import Counter from math import sqrt style.use(...
31.024
114
0.719701
import numpy as np import matplotlib.pyplot as plt import pandas as pd import random import warnings from matplotlib import style from collections import Counter from math import sqrt style.use('fivethirtyeight') def k_nearest_neighbors(data,predict,k=3): distances=[] if(len(data)>=k): warnings.wa...
true
true
f70645e4621f210acf9e4632906d03fcd781323c
427
py
Python
models/account.py
liqiwudao/job
de95c56627336060234755ab8bbe0510ed112573
[ "Apache-2.0" ]
1
2017-06-10T04:14:34.000Z
2017-06-10T04:14:34.000Z
models/account.py
liqiwudao/job
de95c56627336060234755ab8bbe0510ed112573
[ "Apache-2.0" ]
null
null
null
models/account.py
liqiwudao/job
de95c56627336060234755ab8bbe0510ed112573
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from mongoengine import (IntField, DateTimeField, StringField, ReferenceField, DictField) from model import BaseModel # from ext import db class Account(BaseModel): name = StringField(max_length=5000, null=False) tel = IntField(null=False) password = StringField(max_length=5000, nu...
30.5
89
0.733021
from mongoengine import (IntField, DateTimeField, StringField, ReferenceField, DictField) from model import BaseModel class Account(BaseModel): name = StringField(max_length=5000, null=False) tel = IntField(null=False) password = StringField(max_length=5000, null=False) head_img_key = StringField(max...
true
true
f706470a971f3e12a8ff26a907748ca1946ae8bd
2,424
py
Python
test_autolens/integration/tests/interferometer/lens_only/lens_x2_light__hyper.py
PyJedi/PyAutoLens
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
[ "MIT" ]
null
null
null
test_autolens/integration/tests/interferometer/lens_only/lens_x2_light__hyper.py
PyJedi/PyAutoLens
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
[ "MIT" ]
null
null
null
test_autolens/integration/tests/interferometer/lens_only/lens_x2_light__hyper.py
PyJedi/PyAutoLens
bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7
[ "MIT" ]
null
null
null
import autofit as af import autolens as al from test_autolens.integration.tests.interferometer import runner test_type = "lens_only" test_name = "lens_x2_light__hyper" data_type = "lens_x2_light" data_resolution = "sma" def make_pipeline( name, phase_folders, real_space_shape_2d=(100, 100), real_spac...
31.894737
96
0.683993
import autofit as af import autolens as al from test_autolens.integration.tests.interferometer import runner test_type = "lens_only" test_name = "lens_x2_light__hyper" data_type = "lens_x2_light" data_resolution = "sma" def make_pipeline( name, phase_folders, real_space_shape_2d=(100, 100), real_spac...
true
true
f706474e74202b916797d438070210f22eb76f80
2,529
py
Python
api/tacticalrmm/tacticalrmm/test.py
tabiznet/tacticalrmm
d920942736ba5fd919b80dab976fd06af3589767
[ "MIT" ]
null
null
null
api/tacticalrmm/tacticalrmm/test.py
tabiznet/tacticalrmm
d920942736ba5fd919b80dab976fd06af3589767
[ "MIT" ]
null
null
null
api/tacticalrmm/tacticalrmm/test.py
tabiznet/tacticalrmm
d920942736ba5fd919b80dab976fd06af3589767
[ "MIT" ]
null
null
null
from django.test import TestCase, override_settings from model_bakery import baker from rest_framework.test import APIClient from accounts.models import User from core.models import CoreSettings from rest_framework.authtoken.models import Token class TacticalTestCase(TestCase): def authenticate(self): s...
33.72
185
0.64136
from django.test import TestCase, override_settings from model_bakery import baker from rest_framework.test import APIClient from accounts.models import User from core.models import CoreSettings from rest_framework.authtoken.models import Token class TacticalTestCase(TestCase): def authenticate(self): s...
true
true
f7064840ad54c662cc2067995a132719e2219468
7,819
py
Python
rl_coach/agents/actor_critic_agent.py
WonMian/coach
67978248927f24ee09df6f1df842a14103aaf11b
[ "Apache-2.0" ]
1
2019-04-17T02:22:22.000Z
2019-04-17T02:22:22.000Z
rl_coach/agents/actor_critic_agent.py
WonMian/coach
67978248927f24ee09df6f1df842a14103aaf11b
[ "Apache-2.0" ]
null
null
null
rl_coach/agents/actor_critic_agent.py
WonMian/coach
67978248927f24ee09df6f1df842a14103aaf11b
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
47.10241
126
0.690498
from typing import Union import numpy as np import scipy.signal from rl_coach.agents.policy_optimization_agent import PolicyOptimizationAgent, PolicyGradientRescaler from rl_coach.architectures.tensorflow_components.heads.policy_head import PolicyHeadParameters from rl_coach.architectures.tensorflow_components.heads...
true
true
f70649b29a1eb598392d9bcd421ea1643ea3097c
17,178
py
Python
pandas/io/parquet.py
kuantan/pandas
e18921eb0cc86f71c84a4aa0bd6d0c1b7de89def
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2018-04-24T13:31:51.000Z
2019-07-09T07:31:43.000Z
pandas/io/parquet.py
fanoway/pandas
71312683b41b5177faf7ecd63555059504853cbd
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
4
2019-12-14T16:32:46.000Z
2022-02-12T00:32:28.000Z
pandas/io/parquet.py
lithomas1/pandas
e18921eb0cc86f71c84a4aa0bd6d0c1b7de89def
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
5
2018-04-24T13:31:56.000Z
2021-10-21T05:06:23.000Z
""" parquet compat """ from __future__ import annotations import io import os from typing import Any from warnings import catch_warnings from pandas._typing import ( FilePath, ReadBuffer, StorageOptions, WriteBuffer, ) from pandas.compat._optional import import_optional_dependency from pandas.errors i...
34.356
87
0.600477
from __future__ import annotations import io import os from typing import Any from warnings import catch_warnings from pandas._typing import ( FilePath, ReadBuffer, StorageOptions, WriteBuffer, ) from pandas.compat._optional import import_optional_dependency from pandas.errors import AbstractMethodErr...
true
true
f7064a17576ee30e7e2873b44a3f6dbd4b09863f
21,474
py
Python
openelex/us/md/load.py
Mpopoma/oe-core
860b99e14b9089a56b54cdd00285216a5cf77046
[ "MIT" ]
null
null
null
openelex/us/md/load.py
Mpopoma/oe-core
860b99e14b9089a56b54cdd00285216a5cf77046
[ "MIT" ]
null
null
null
openelex/us/md/load.py
Mpopoma/oe-core
860b99e14b9089a56b54cdd00285216a5cf77046
[ "MIT" ]
null
null
null
from builtins import zip from builtins import range from builtins import object import re import csv import unicodecsv from bs4 import BeautifulSoup from openelex.base.load import BaseLoader from openelex.models import RawResult from openelex.lib.text import ocd_type_id, slugify from .datasource import Datasource cl...
34.57971
404
0.558117
from builtins import zip from builtins import range from builtins import object import re import csv import unicodecsv from bs4 import BeautifulSoup from openelex.base.load import BaseLoader from openelex.models import RawResult from openelex.lib.text import ocd_type_id, slugify from .datasource import Datasource cl...
true
true
f7064a7863040a4edd8187c03949f2b04cd1945f
7,331
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings/base_settings.py
prismaticd/django-cookiecutter
b9ddaf6a21f2f1d46d21d32c17185d3b3e6ff561
[ "Apache-2.0" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings/base_settings.py
prismaticd/django-cookiecutter
b9ddaf6a21f2f1d46d21d32c17185d3b3e6ff561
[ "Apache-2.0" ]
3
2017-12-17T20:30:28.000Z
2018-08-19T21:04:19.000Z
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/settings/base_settings.py
prismaticd/django-cookiecutter
b9ddaf6a21f2f1d46d21d32c17185d3b3e6ff561
[ "Apache-2.0" ]
1
2018-06-29T07:22:39.000Z
2018-06-29T07:22:39.000Z
# -*- coding: utf-8 -*- """ For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os import re from django.template import base # from typing import List # B...
27.874525
97
0.670168
""" For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os import re from django.template import base PROJECT_DIR = os.path.dirname(os.path.dirname(os.path...
false
true
f7064ab8791ec1cc089fb333f5c35369d4191c79
419
py
Python
solutions/problem_1.py
christospitsi/project-euler
036a6bd0fa03bd18aaec90c171c066181e3d0d10
[ "MIT" ]
null
null
null
solutions/problem_1.py
christospitsi/project-euler
036a6bd0fa03bd18aaec90c171c066181e3d0d10
[ "MIT" ]
null
null
null
solutions/problem_1.py
christospitsi/project-euler
036a6bd0fa03bd18aaec90c171c066181e3d0d10
[ "MIT" ]
null
null
null
""" If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """ def mul_sum(a: int=3, b: int=5): max_num = 1000 all_nums = [x for x in range(1, max_num) if (x % 3 == 0) | (x % 5 ==...
29.928571
99
0.627685
def mul_sum(a: int=3, b: int=5): max_num = 1000 all_nums = [x for x in range(1, max_num) if (x % 3 == 0) | (x % 5 == 0)] return sum(all_nums) if __name__ == "__main__": result = mul_sum() print(result)
true
true
f7064b11f48e6e06ddfa0c8932f13eaf15cbb900
413
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/multisalesforce/tests/adapter.py
oddbird/sfdo-template
ac128ca5b2db18d3069a1535cb6ac23f83aa987f
[ "BSD-3-Clause" ]
3
2018-08-23T18:59:59.000Z
2021-05-25T00:05:52.000Z
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/multisalesforce/tests/adapter.py
oddbird/sfdo-template
ac128ca5b2db18d3069a1535cb6ac23f83aa987f
[ "BSD-3-Clause" ]
9
2018-09-28T21:30:35.000Z
2020-08-10T20:42:34.000Z
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/multisalesforce/tests/adapter.py
oddbird/sfdo-template
ac128ca5b2db18d3069a1535cb6ac23f83aa987f
[ "BSD-3-Clause" ]
2
2019-03-28T05:03:08.000Z
2019-05-05T18:10:30.000Z
from ..adapter import CustomSocialAccountAdapter def test_authentication_error_logs(mocker): mocker.patch( "allauth.socialaccount.adapter.DefaultSocialAccountAdapter.authentication_error" ) # noqa error = mocker.patch("{{cookiecutter.project_slug}}.multisalesforce.adapter.logger.error") adapt...
34.416667
94
0.77724
from ..adapter import CustomSocialAccountAdapter def test_authentication_error_logs(mocker): mocker.patch( "allauth.socialaccount.adapter.DefaultSocialAccountAdapter.authentication_error" ) error = mocker.patch("{{cookiecutter.project_slug}}.multisalesforce.adapter.logger.error") adapter = Cu...
true
true
f7064b6e22be8a8ce03d0cb6925dc8468a916b5e
185
py
Python
chapter_3/my_service/guid/settings.py
rinjyu/the_red
c099e830ae3ee9063c3e9d29f4ee627241c7eeed
[ "Apache-2.0" ]
13
2021-07-26T06:09:19.000Z
2022-03-22T07:01:22.000Z
chapter_3/my_service/guid/settings.py
rinjyu/the_red
c099e830ae3ee9063c3e9d29f4ee627241c7eeed
[ "Apache-2.0" ]
11
2021-07-25T03:35:25.000Z
2021-08-13T23:05:38.000Z
chapter_3/my_service/guid/settings.py
rinjyu/the_red
c099e830ae3ee9063c3e9d29f4ee627241c7eeed
[ "Apache-2.0" ]
8
2021-09-02T14:54:17.000Z
2022-03-14T10:28:37.000Z
from pydantic import BaseSettings class Settings(BaseSettings): APP_ENDPOINT: str = 'localhost:8080' CONFIG_PATH: str = None DATACENTER_ID: int = 0 WORKER_ID: int = 0
20.555556
40
0.708108
from pydantic import BaseSettings class Settings(BaseSettings): APP_ENDPOINT: str = 'localhost:8080' CONFIG_PATH: str = None DATACENTER_ID: int = 0 WORKER_ID: int = 0
true
true
f7064bb9c23572495937a44f35d899c22fe72f7d
663
py
Python
manage.py
nandiniigarg/offline
02650899ffffe68d8ab71df35e9fbb9b133e34fc
[ "MIT" ]
null
null
null
manage.py
nandiniigarg/offline
02650899ffffe68d8ab71df35e9fbb9b133e34fc
[ "MIT" ]
null
null
null
manage.py
nandiniigarg/offline
02650899ffffe68d8ab71df35e9fbb9b133e34fc
[ "MIT" ]
1
2021-11-07T18:11:00.000Z
2021-11-07T18:11:00.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'offline.settings') try: from django.core.management import execute_from_command_line except Impo...
28.826087
73
0.678733
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'offline.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
f7064c191d91001877d5b5e733e37f36b14ec78a
2,971
py
Python
Image traitement.py
SuperFondue/ISN
977a30be8e56b5718a718103314983a95f6a9786
[ "MIT" ]
null
null
null
Image traitement.py
SuperFondue/ISN
977a30be8e56b5718a718103314983a95f6a9786
[ "MIT" ]
null
null
null
Image traitement.py
SuperFondue/ISN
977a30be8e56b5718a718103314983a95f6a9786
[ "MIT" ]
null
null
null
import os from PIL import Image #Vérification rep_cour=os.getcwd() if rep_cour!="C:\Documents and Settings\Administrateur\Bureau\ISN/trait_img": os.chdir("C:\Documents and Settings\Administrateur\Bureau\ISN/trait_img") print(os.getcwd()) print("Tout est en ordre!") #Paramètres de l'image + son affichage...
18.56875
77
0.623023
import os from PIL import Image rep_cour=os.getcwd() if rep_cour!="C:\Documents and Settings\Administrateur\Bureau\ISN/trait_img": os.chdir("C:\Documents and Settings\Administrateur\Bureau\ISN/trait_img") print(os.getcwd()) print("Tout est en ordre!") nom_image=("img_base.pgm") img_in=Image.open(nom_ima...
true
true
f7064c1f7b6d3f64587e9b692298f0b7399791b7
13,008
py
Python
venv/Lib/site-packages/networkx/algorithms/graphical.py
Richoor/HEFT
8422bfc5e9abf132c409a0ae299cbde29eb6e5fc
[ "BSD-3-Clause" ]
4
2018-10-19T04:36:20.000Z
2020-02-13T16:14:09.000Z
venv/Lib/site-packages/networkx/algorithms/graphical.py
Richoor/HEFT
8422bfc5e9abf132c409a0ae299cbde29eb6e5fc
[ "BSD-3-Clause" ]
null
null
null
venv/Lib/site-packages/networkx/algorithms/graphical.py
Richoor/HEFT
8422bfc5e9abf132c409a0ae299cbde29eb6e5fc
[ "BSD-3-Clause" ]
1
2018-08-23T14:45:15.000Z
2018-08-23T14:45:15.000Z
# -*- coding: utf-8 -*- """Test sequences for graphiness. """ # Copyright (C) 2004-2018 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import heapq import networkx as nx __author__ = "\n".join(['Aric Hagberg...
31.960688
83
0.589176
import heapq import networkx as nx __author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)', 'Pieter Swart (swart@lanl.gov)', 'Dan Schult (dschult@colgate.edu)' 'Joel Miller (joel.c.miller.research@gmail.com)' 'Ben Edwards'...
true
true
f7064c28039b54da8b60962016bb3ca896e7bbcf
73,262
py
Python
bauh/view/qt/window.py
DN-debug/bauh
83aeccae87d7fe26f6c5bf24be005288d5d54d84
[ "Zlib" ]
null
null
null
bauh/view/qt/window.py
DN-debug/bauh
83aeccae87d7fe26f6c5bf24be005288d5d54d84
[ "Zlib" ]
null
null
null
bauh/view/qt/window.py
DN-debug/bauh
83aeccae87d7fe26f6c5bf24be005288d5d54d84
[ "Zlib" ]
null
null
null
import logging import operator import time import traceback from pathlib import Path from typing import List, Type, Set, Tuple, Optional from PyQt5.QtCore import QEvent, Qt, pyqtSignal from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QCursor from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHeaderVi...
44.726496
190
0.654282
import logging import operator import time import traceback from pathlib import Path from typing import List, Type, Set, Tuple, Optional from PyQt5.QtCore import QEvent, Qt, pyqtSignal from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QCursor from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHeaderVi...
true
true
f7064c4be4101d1b13296f23ffc84638d664ea89
1,112
py
Python
tests/test_mmtpa_adapter.py
UrbanOS-Examples/MMTPA_adapter
aa2b4b792990c45e4888ca4fe1726132b05ef0f1
[ "Apache-2.0" ]
null
null
null
tests/test_mmtpa_adapter.py
UrbanOS-Examples/MMTPA_adapter
aa2b4b792990c45e4888ca4fe1726132b05ef0f1
[ "Apache-2.0" ]
null
null
null
tests/test_mmtpa_adapter.py
UrbanOS-Examples/MMTPA_adapter
aa2b4b792990c45e4888ca4fe1726132b05ef0f1
[ "Apache-2.0" ]
null
null
null
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/api/v1/healthcheck") async def read_main(): return "OK" @app.post("/api/v1/query") async def query(): return [{"event_date": "20210105"}] client = TestClient(app) def test_read_main(): response = client.g...
27.121951
68
0.588129
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/api/v1/healthcheck") async def read_main(): return "OK" @app.post("/api/v1/query") async def query(): return [{"event_date": "20210105"}] client = TestClient(app) def test_read_main(): response = client.g...
true
true
f7064c77e0f115aede5a3a9e734f2eed34295f2c
2,843
py
Python
yandex/cloud/datasphere/v1/app_token_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/datasphere/v1/app_token_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/datasphere/v1/app_token_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from yandex.cloud.datasphere.v1 import app_token_service_pb2 as yandex_dot_cloud_dot_...
39.486111
145
0.706296
import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from yandex.cloud.datasphere.v1 import app_token_service_pb2 as yandex_dot_cloud_dot_datasphere_dot_v1_dot_app__token__service__pb2 class AppTokenServiceStub(object): def __init__(self, channel): self.Validate = chan...
true
true
f7064c7a481d15f09199a1d6c5b19ee56b6b73a4
4,224
py
Python
tests/integration/test_object_value.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
106
2015-02-21T14:26:32.000Z
2022-03-31T05:56:53.000Z
tests/integration/test_object_value.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
94
2015-02-09T13:16:00.000Z
2022-03-16T06:37:41.000Z
tests/integration/test_object_value.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
85
2015-02-06T22:05:25.000Z
2022-03-16T06:22:59.000Z
import pytest @pytest.mark.usefixtures("smart_setup") class TestObjectValue: def test_get_sheet_object_value(self, smart_setup): smart = smart_setup['smart'] sheet = smart.Sheets.get_sheet(smart_setup['sheet'].id, include='objectValue') assert isinstance(sheet.rows[0].cells[0].object_valu...
33.259843
94
0.555398
import pytest @pytest.mark.usefixtures("smart_setup") class TestObjectValue: def test_get_sheet_object_value(self, smart_setup): smart = smart_setup['smart'] sheet = smart.Sheets.get_sheet(smart_setup['sheet'].id, include='objectValue') assert isinstance(sheet.rows[0].cells[0].object_valu...
true
true
f7064c9fcd9dedd8ca7d202760fac62cb1f20518
782
py
Python
Python/Fighters.py
chernyshov-dev/ideal-octo-waffle
c50f29795352766752dbbbcd46693ff54f23369b
[ "WTFPL" ]
3
2021-08-29T15:22:08.000Z
2021-08-29T17:12:01.000Z
Python/Fighters.py
chernyshov-dev/ideal-octo-waffle
c50f29795352766752dbbbcd46693ff54f23369b
[ "WTFPL" ]
11
2021-09-07T19:24:15.000Z
2022-01-13T19:51:25.000Z
Python/Fighters.py
chernyshov-dev/university-practice-heap
c50f29795352766752dbbbcd46693ff54f23369b
[ "WTFPL" ]
null
null
null
import random import time class Athlete(): name = "" health = 100 def __init__(self, newName): self.name = newName print("На ринге появляется новый боец, его имя - ", self.name ) print() def punch(self, other): time.sleep(1) print(self.name, "наносит удар бойцу ", other.name) other.health -= 20 ...
18.619048
101
0.680307
import random import time class Athlete(): name = "" health = 100 def __init__(self, newName): self.name = newName print("На ринге появляется новый боец, его имя - ", self.name ) print() def punch(self, other): time.sleep(1) print(self.name, "наносит удар бойцу ", other.name) other.health -= 20 ...
true
true
f7064cca2df1347b768220e2e32022ffdb53c0f3
3,164
py
Python
bagel/testing.py
AlumiK/bagel-tensorflow
791a89a54f15aeed0c4e1ea43afb9300f18b60cd
[ "MIT" ]
1
2021-04-06T06:07:03.000Z
2021-04-06T06:07:03.000Z
bagel/testing.py
alumik/bagel-tensorflow
791a89a54f15aeed0c4e1ea43afb9300f18b60cd
[ "MIT" ]
null
null
null
bagel/testing.py
alumik/bagel-tensorflow
791a89a54f15aeed0c4e1ea43afb9300f18b60cd
[ "MIT" ]
null
null
null
import bagel import numpy as np from sklearn.metrics import precision_recall_curve from typing import Sequence, Tuple, Dict, Optional def _adjust_scores(labels: np.ndarray, scores: np.ndarray, delay: Optional[int] = None, inplace: bool = False) -> np.ndarray: ...
37.223529
105
0.644121
import bagel import numpy as np from sklearn.metrics import precision_recall_curve from typing import Sequence, Tuple, Dict, Optional def _adjust_scores(labels: np.ndarray, scores: np.ndarray, delay: Optional[int] = None, inplace: bool = False) -> np.ndarray: ...
true
true
f7064f4b73be81e04031b5545b4305372a0ed316
7,121
py
Python
yt/data_objects/particle_filters.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
2
2021-03-02T18:59:49.000Z
2021-03-02T18:59:50.000Z
yt/data_objects/particle_filters.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
4
2018-04-13T23:03:42.000Z
2018-05-08T17:50:43.000Z
yt/data_objects/particle_filters.py
saethlin/yt
992ae71974dca933346e91008c5a50f43a0a350e
[ "BSD-3-Clause-Clear" ]
2
2020-05-16T15:29:37.000Z
2020-06-22T10:17:08.000Z
""" This is a library for defining and using particle filters. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with...
37.677249
88
0.645134
import copy from contextlib import contextmanager from yt.fields.field_info_container import \ NullFunc, TranslationFunc from yt.funcs import mylog from yt.utilities.exceptions import YTIllDefinedFilter filter_registry = {} class DummyFieldInfo(object): particle_type = True dfi = DummyFieldInfo() class Pa...
true
true
f70650bb75dc9a75c84812d4f2daeb6de8f12389
1,966
py
Python
examples/simple_example.py
hsolbrig/dirlistproc
3d5dedeb2bc653b409a476d91c8a4e30eb6a08ad
[ "MIT" ]
null
null
null
examples/simple_example.py
hsolbrig/dirlistproc
3d5dedeb2bc653b409a476d91c8a4e30eb6a08ad
[ "MIT" ]
7
2017-09-10T16:34:33.000Z
2020-09-24T19:46:12.000Z
examples/simple_example.py
hsolbrig/dirlistproc
3d5dedeb2bc653b409a476d91c8a4e30eb6a08ad
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Mayo Clinic # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list...
43.688889
89
0.749237
import dirlistproc def proc_xml(input_fn: str, output_fn: str, _) -> bool: print("Converting %s to %s" % (input_fn, output_fn)) return True def main(): dlp = dirlistproc.DirectoryListProcessor(None, "Convert XML to Text", ".xml", ".txt") nfiles, nsuccess = dlp.run(proc_xml) print("Total=%d Succe...
true
true
f70650d00ed92d7404eb4897d83de209b0e1f21d
35
py
Python
migrark/connection/__init__.py
knowark/migrark
7e52f6605f9569750bc5ba1a825a13fb1a65902a
[ "MIT" ]
null
null
null
migrark/connection/__init__.py
knowark/migrark
7e52f6605f9569750bc5ba1a825a13fb1a65902a
[ "MIT" ]
null
null
null
migrark/connection/__init__.py
knowark/migrark
7e52f6605f9569750bc5ba1a825a13fb1a65902a
[ "MIT" ]
null
null
null
from .connection import Connection
17.5
34
0.857143
from .connection import Connection
true
true
f70651520f478b0b854c315fce605afa7851345d
2,704
py
Python
data/getdataset only one.py
NikolaySokolov152/Unet_multiclass
d07f6809b422519097560b07f67d0f139e718381
[ "MIT" ]
null
null
null
data/getdataset only one.py
NikolaySokolov152/Unet_multiclass
d07f6809b422519097560b07f67d0f139e718381
[ "MIT" ]
null
null
null
data/getdataset only one.py
NikolaySokolov152/Unet_multiclass
d07f6809b422519097560b07f67d0f139e718381
[ "MIT" ]
null
null
null
#Split one picture import cv2 import numpy.random as random import numpy as np import os import time #borders #mitochondria #mitochondria borders #PSD #vesicles def is_Img(name): img_type = ('.png', '.jpg', '.jpeg') if name.endswith((img_type)): return True else: return False file_dir_arr = ["axon", "mitocho...
25.509434
150
0.644601
import cv2 import numpy.random as random import numpy as np import os import time def is_Img(name): img_type = ('.png', '.jpg', '.jpeg') if name.endswith((img_type)): return True else: return False file_dir_arr = ["axon", "mitochondria", "PSD", "vesicles", "boundaries","mitochondrial boundaries"] name_list ...
true
true
f70651a89a9d5950e600c6aeb579c32c0a1d2e0d
6,318
py
Python
payu/cli.py
coecms/payu
62ca8003848a35e0b69d81217e5ee468ba3fcad3
[ "Apache-2.0" ]
null
null
null
payu/cli.py
coecms/payu
62ca8003848a35e0b69d81217e5ee468ba3fcad3
[ "Apache-2.0" ]
null
null
null
payu/cli.py
coecms/payu
62ca8003848a35e0b69d81217e5ee468ba3fcad3
[ "Apache-2.0" ]
null
null
null
"""payu.cli ======== Command line interface tools :copyright: Copyright 2011 Marshall Ward, see AUTHORS for details. :license: Apache License, Version 2.0, see LICENSE for details """ import argparse from distutils import sysconfig import importlib import os import pkgutil import shlex import subprocess ...
31.432836
79
0.650681
import argparse from distutils import sysconfig import importlib import os import pkgutil import shlex import subprocess import sys import payu import payu.envmod as envmod from payu.models import index as supported_models import payu.subcommands DEFAULT_CONFIG = 'config.yaml' def parse(): modnames = [mod...
true
true
f70652bf5a37cb3424a115fe3148bb9fd6ea5c1b
1,965
py
Python
profiles_api/models.py
Amit0430/RESTFULL_API
210eacf7d5fb19817e52bad616f49c40a1c7c8e2
[ "MIT" ]
null
null
null
profiles_api/models.py
Amit0430/RESTFULL_API
210eacf7d5fb19817e52bad616f49c40a1c7c8e2
[ "MIT" ]
null
null
null
profiles_api/models.py
Amit0430/RESTFULL_API
210eacf7d5fb19817e52bad616f49c40a1c7c8e2
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, BaseUserManager from django.conf import settings class UserProfileManager(BaseUserManager): """Manager for user profiles""" def create_user(self, email, name, password=None): """ Create a new user p...
26.917808
90
0.669211
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, BaseUserManager from django.conf import settings class UserProfileManager(BaseUserManager): def create_user(self, email, name, password=None): if not email: raise ValueError('Users must have...
true
true
f7065315b0555084b28b62f742a3c6c913141840
282
py
Python
Oren/Dash_App/app.py
kiwymic/operation_goldfish-1
47bff3a2732b398aeccb53b6d98a3e95e83f8382
[ "MIT" ]
null
null
null
Oren/Dash_App/app.py
kiwymic/operation_goldfish-1
47bff3a2732b398aeccb53b6d98a3e95e83f8382
[ "MIT" ]
null
null
null
Oren/Dash_App/app.py
kiwymic/operation_goldfish-1
47bff3a2732b398aeccb53b6d98a3e95e83f8382
[ "MIT" ]
2
2021-09-01T17:49:35.000Z
2021-09-03T22:27:41.000Z
import dash import dash_bootstrap_components as dbc # bootstrap theme # https://bootswatch.com/lux/ external_stylesheets = [dbc.themes.YETI] app = dash.Dash(__name__, external_stylesheets=external_stylesheets, suppress_callback_exceptions=True) server = app.server
28.2
68
0.780142
import dash import dash_bootstrap_components as dbc external_stylesheets = [dbc.themes.YETI] app = dash.Dash(__name__, external_stylesheets=external_stylesheets, suppress_callback_exceptions=True) server = app.server
true
true
f70654bfd60beb09cef050a3485fe5a7ca40ab19
5,077
py
Python
_3DDFA_V2/TDDFA.py
dreamflake/GADA
9891ce06e15e53abc72ce57b144e288799967d8c
[ "MIT" ]
4
2021-11-23T01:47:23.000Z
2022-01-06T05:49:33.000Z
_3DDFA_V2/TDDFA.py
dreamflake/GADA
9891ce06e15e53abc72ce57b144e288799967d8c
[ "MIT" ]
null
null
null
_3DDFA_V2/TDDFA.py
dreamflake/GADA
9891ce06e15e53abc72ce57b144e288799967d8c
[ "MIT" ]
null
null
null
# coding: utf-8 __author__ = 'cleardusk' import os.path as osp import time import numpy as np import cv2 import torch from torchvision.transforms import Compose import torch.backends.cudnn as cudnn import _3DDFA_V2.models as models from _3DDFA_V2.bfm import BFMModel from _3DDFA_V2.utils.io import _load from _3DDFA_V...
35.256944
116
0.596021
__author__ = 'cleardusk' import os.path as osp import time import numpy as np import cv2 import torch from torchvision.transforms import Compose import torch.backends.cudnn as cudnn import _3DDFA_V2.models as models from _3DDFA_V2.bfm import BFMModel from _3DDFA_V2.utils.io import _load from _3DDFA_V2.utils.function...
true
true
f706551a5af1f5ab6ad4051000f22c81b9475b1a
986
py
Python
11403/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
2
2020-01-14T07:27:25.000Z
2020-02-12T07:49:58.000Z
11403/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
1
2020-01-14T07:29:30.000Z
2021-11-28T11:29:08.000Z
11403/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
null
null
null
import sys def sol(): input = sys.stdin.readline N = int(input()) node = [[] for i in range(N)] for i in range(N): vector = list(map(int, input().split(" "))) for j in range(N): if vector[j] == 1: node[i].append(j) for i in range(N): visited = ["...
20.978723
51
0.462475
import sys def sol(): input = sys.stdin.readline N = int(input()) node = [[] for i in range(N)] for i in range(N): vector = list(map(int, input().split(" "))) for j in range(N): if vector[j] == 1: node[i].append(j) for i in range(N): visited = ["...
true
true
f706555ba6f654ea9e56e4162971fe6b9297e5a5
445
py
Python
pqcrypto/sign/sphincs_sha256_128f_robust.py
GaloisInc/pqcrypto
dd8c56fd876a397caef06a00d35537a4f9c1db28
[ "BSD-3-Clause" ]
15
2020-09-07T17:09:33.000Z
2022-02-04T00:03:37.000Z
pqcrypto/sign/sphincs_sha256_128f_robust.py
GaloisInc/pqcrypto
dd8c56fd876a397caef06a00d35537a4f9c1db28
[ "BSD-3-Clause" ]
6
2020-09-07T18:19:04.000Z
2022-03-24T06:48:14.000Z
pqcrypto/sign/sphincs_sha256_128f_robust.py
GaloisInc/pqcrypto
dd8c56fd876a397caef06a00d35537a4f9c1db28
[ "BSD-3-Clause" ]
4
2021-11-25T06:56:31.000Z
2022-02-03T14:27:06.000Z
from .._sign.sphincs_sha256_128f_robust import ffi as __ffi, lib as __lib from .common import _sign_generate_keypair_factory, _sign_sign_factory, _sign_verify_factory PUBLIC_KEY_SIZE = __lib.CRYPTO_PUBLICKEYBYTES SECRET_KEY_SIZE = __lib.CRYPTO_SECRETKEYBYTES SIGNATURE_SIZE = __lib.CRYPTO_BYTES generate_keypair = _sig...
40.454545
92
0.858427
from .._sign.sphincs_sha256_128f_robust import ffi as __ffi, lib as __lib from .common import _sign_generate_keypair_factory, _sign_sign_factory, _sign_verify_factory PUBLIC_KEY_SIZE = __lib.CRYPTO_PUBLICKEYBYTES SECRET_KEY_SIZE = __lib.CRYPTO_SECRETKEYBYTES SIGNATURE_SIZE = __lib.CRYPTO_BYTES generate_keypair = _sig...
true
true
f70655e0394fde51fd152030d825c29b766dc022
448
py
Python
n0s3p4ss/sniffer.py
julianoborba/N0s3p4ss
a81b5621337a79a337f0f19aa5a39eda34188925
[ "MIT" ]
null
null
null
n0s3p4ss/sniffer.py
julianoborba/N0s3p4ss
a81b5621337a79a337f0f19aa5a39eda34188925
[ "MIT" ]
null
null
null
n0s3p4ss/sniffer.py
julianoborba/N0s3p4ss
a81b5621337a79a337f0f19aa5a39eda34188925
[ "MIT" ]
1
2021-06-25T17:51:33.000Z
2021-06-25T17:51:33.000Z
from n0s3p4ss.domain_list import SubdomainList from n0s3p4ss.attack_surface_discoverer import discover from n0s3p4ss.sniffer_switcher_http_status_based import apply_flow_for def sniff(target_domains): subdomains = SubdomainList().list_each_domain_subdomains(target_domains) attack_surfaces = [discover(subdomai...
37.333333
76
0.823661
from n0s3p4ss.domain_list import SubdomainList from n0s3p4ss.attack_surface_discoverer import discover from n0s3p4ss.sniffer_switcher_http_status_based import apply_flow_for def sniff(target_domains): subdomains = SubdomainList().list_each_domain_subdomains(target_domains) attack_surfaces = [discover(subdomai...
true
true
f70656d3147eb5425bfd88f5584fdf046e204fe6
1,639
py
Python
bots/functions.py
alexvilla00/NASA-BOT
19048e524d251e9dc147e115e064ddd9b53978b6
[ "MIT" ]
null
null
null
bots/functions.py
alexvilla00/NASA-BOT
19048e524d251e9dc147e115e064ddd9b53978b6
[ "MIT" ]
1
2020-10-04T17:20:54.000Z
2020-10-04T17:21:17.000Z
bots/functions.py
alexvilla00/NASA-BOT
19048e524d251e9dc147e115e064ddd9b53978b6
[ "MIT" ]
null
null
null
import DBinterface as DB import random import datetime as dt def print_ranking(my_ranking,ranking_size,top_or_bottom): Tweet="" if top_or_bottom == True: Tweet += ("The first " + ranking_size + " cities with more CO2 emissions due to traffic are: \r\n ") else: Tweet += ("The first " ...
27.316667
119
0.549115
import DBinterface as DB import random import datetime as dt def print_ranking(my_ranking,ranking_size,top_or_bottom): Tweet="" if top_or_bottom == True: Tweet += ("The first " + ranking_size + " cities with more CO2 emissions due to traffic are: \r\n ") else: Tweet += ("The first " ...
true
true
f70656e6ad79fbe090de964236cb505fd79444e0
246
py
Python
experiments/experiments/Test6.py
enikon/MACP
2de004d4eaf09f3b02dde3b7041ce6d693d0c25c
[ "MIT" ]
null
null
null
experiments/experiments/Test6.py
enikon/MACP
2de004d4eaf09f3b02dde3b7041ce6d693d0c25c
[ "MIT" ]
null
null
null
experiments/experiments/Test6.py
enikon/MACP
2de004d4eaf09f3b02dde3b7041ce6d693d0c25c
[ "MIT" ]
null
null
null
from experiments.experiments.PubIntegBackground import PubIntegBackground import numpy as np if __name__ == "__main__": for i in np.arange(0.0, 10.0, 0.1): PubIntegBackground(correlation=False, listing=True, pub='None', intensity=i)
35.142857
84
0.747967
from experiments.experiments.PubIntegBackground import PubIntegBackground import numpy as np if __name__ == "__main__": for i in np.arange(0.0, 10.0, 0.1): PubIntegBackground(correlation=False, listing=True, pub='None', intensity=i)
true
true
f706576fb7ba1340b92040737916607084bf03f6
6,912
py
Python
src/pretix/base/services/mail.py
td00/pretix
e31bd7600c85598de135f2eb5012e2f33fdb1d11
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/services/mail.py
td00/pretix
e31bd7600c85598de135f2eb5012e2f33fdb1d11
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/services/mail.py
td00/pretix
e31bd7600c85598de135f2eb5012e2f33fdb1d11
[ "ECL-2.0", "Apache-2.0" ]
1
2017-08-09T17:11:28.000Z
2017-08-09T17:11:28.000Z
import logging from typing import Any, Dict, List, Union import bleach import cssutils import markdown from django.conf import settings from django.core.mail import EmailMultiAlternatives, get_connection from django.template.loader import get_template from django.utils.translation import ugettext as _ from i18nfield.s...
38.831461
132
0.6318
import logging from typing import Any, Dict, List, Union import bleach import cssutils import markdown from django.conf import settings from django.core.mail import EmailMultiAlternatives, get_connection from django.template.loader import get_template from django.utils.translation import ugettext as _ from i18nfield.s...
true
true
f706581e8e1c2d0fa5bb970d4b909f4e84c08d0c
557
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/product-of-array-except-self.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/product-of-array-except-self.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/product-of-array-except-self.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(n) # Space: O(1) class Solution(object): # @param {integer[]} nums # @return {integer[]} def productExceptSelf(self, nums): if not nums: return [] left_product = [1 for _ in xrange(len(nums))] for i in xrange(1, len(nums)): left_product[i] = left_...
25.318182
63
0.540395
class Solution(object): def productExceptSelf(self, nums): if not nums: return [] left_product = [1 for _ in xrange(len(nums))] for i in xrange(1, len(nums)): left_product[i] = left_product[i - 1] * nums[i - 1] right_product = 1 for i in xra...
true
true
f70658859df5f22a08a9e280111df9954d48b208
14,198
py
Python
neutron/services/trunk/rules.py
EwaldvanGeffen/neutron
858d7f33950a80c73501377a4b2cd36b915d0f40
[ "Apache-2.0" ]
1
2020-01-29T17:06:17.000Z
2020-01-29T17:06:17.000Z
neutron/services/trunk/rules.py
EwaldvanGeffen/neutron
858d7f33950a80c73501377a4b2cd36b915d0f40
[ "Apache-2.0" ]
5
2018-05-31T13:09:00.000Z
2022-01-13T15:23:29.000Z
neutron/services/trunk/rules.py
EwaldvanGeffen/neutron
858d7f33950a80c73501377a4b2cd36b915d0f40
[ "Apache-2.0" ]
2
2017-12-05T15:05:26.000Z
2019-09-09T16:03:49.000Z
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
44.23053
79
0.64826
import collections from neutron_lib.api import converters from neutron_lib.api.definitions import portbindings from neutron_lib.api.definitions import provider_net as provider from neutron_lib.api import extensions from neutron_lib.api import validators from neutron_lib import exceptions as n_exc from neutron_lib.plu...
true
true
f7065a31c1885b9f8c132480cbea8073aad798b7
1,324
py
Python
tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_change_language.py
charleyf/gaia
90c1b9c146b2a4abe545bf758f2e47d898820ad1
[ "Apache-2.0" ]
1
2019-04-26T21:30:24.000Z
2019-04-26T21:30:24.000Z
tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_change_language.py
charleyf/gaia
90c1b9c146b2a4abe545bf758f2e47d898820ad1
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_change_language.py
charleyf/gaia
90c1b9c146b2a4abe545bf758f2e47d898820ad1
[ "Apache-2.0" ]
3
2019-03-31T04:27:13.000Z
2020-04-12T17:58:15.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from gaiatest import GaiaTestCase from gaiatest.apps.settings.app import Settings class TestChangeLanguage(GaiaTestCas...
40.121212
91
0.694109
from gaiatest import GaiaTestCase from gaiatest.apps.settings.app import Settings class TestChangeLanguage(GaiaTestCase): def test_change_language_settings(self): lang_name = self.marionette.execute_script(""" var qps = window.wrappedJSObject.navigator.mozL10n.qps; return qps['qp...
true
true
f7065a71335afe951a4481cd6fce6bc2be5bb261
332
py
Python
III_DataEngineer_BDSE10/1905_Python/TeacherCode/pythoncode/ch05/elsestmt.py
chaoannricardo/StudyNotes
26bed366c0c677c856eb25ffe0d7e8681d2a0740
[ "Apache-2.0" ]
2
2019-12-24T12:46:39.000Z
2021-05-18T06:09:25.000Z
III_DataEngineer_BDSE10/1905_Python/TeacherCode/pythoncode/ch05/elsestmt.py
chaoannricardo/StudyNotes
26bed366c0c677c856eb25ffe0d7e8681d2a0740
[ "Apache-2.0" ]
1
2021-11-16T07:58:43.000Z
2021-11-16T07:58:43.000Z
III_DataEngineer_BDSE10/1905_Python/TeacherCode/pythoncode/ch05/elsestmt.py
chaoannricardo/StudyNotes
26bed366c0c677c856eb25ffe0d7e8681d2a0740
[ "Apache-2.0" ]
1
2021-07-05T14:30:30.000Z
2021-07-05T14:30:30.000Z
# esle stmt # using else block after for loop s = 0 for i in range(1, 6): s += i else: print("end of for loop!") print("sum =",s) # using else blokc after while loop r = n = 1 while n <= 5: r *= n n += 1 else: print("end of while loop!") print("5! = " + str(r)) if r==3: ...
15.090909
36
0.493976
s = 0 for i in range(1, 6): s += i else: print("end of for loop!") print("sum =",s) r = n = 1 while n <= 5: r *= n n += 1 else: print("end of while loop!") print("5! = " + str(r)) if r==3: pass
true
true
f7065aa4ad33605a97d775e8acfd687a38fc900c
435
py
Python
OMS/core/migrations/0019_auto_20200422_1320.py
DevLemp/OMS
5fec7b4a1e80c83f118411405fbd8da7138a7c36
[ "MIT" ]
null
null
null
OMS/core/migrations/0019_auto_20200422_1320.py
DevLemp/OMS
5fec7b4a1e80c83f118411405fbd8da7138a7c36
[ "MIT" ]
null
null
null
OMS/core/migrations/0019_auto_20200422_1320.py
DevLemp/OMS
5fec7b4a1e80c83f118411405fbd8da7138a7c36
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-04-22 13:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0018_auto_20200422_1314'), ] operations = [ migrations.AlterField( model_name='user_movie', name='insert_dat...
22.894737
93
0.62069
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0018_auto_20200422_1314'), ] operations = [ migrations.AlterField( model_name='user_movie', name='insert_date', field=models.DateTimeField(defau...
true
true
f7065b9925f4f390a56254ab25ffe66bf050e8c6
1,807
py
Python
pmworker/pdfinfo.py
ciur/papermerge-worker
cfd863e3f9a4bf2cfc35ce911a4f8ab7ee45bbc7
[ "Apache-2.0" ]
2
2020-01-08T18:10:46.000Z
2020-03-29T22:12:00.000Z
pmworker/pdfinfo.py
ciur/papermerge-worker
cfd863e3f9a4bf2cfc35ce911a4f8ab7ee45bbc7
[ "Apache-2.0" ]
2
2020-07-21T16:34:49.000Z
2020-07-21T17:24:05.000Z
pmworker/pdfinfo.py
ciur/papermerge-worker
cfd863e3f9a4bf2cfc35ce911a4f8ab7ee45bbc7
[ "Apache-2.0" ]
2
2020-06-03T00:09:46.000Z
2020-07-21T16:24:48.000Z
import os import re import subprocess import logging """ Uses command line pdfinfo utility (from poppler pakage) for various small operations (e.g. get pdf page count). """ logger = logging.getLogger(__name__) def get_pagecount(filepath): """ Returns the number of pages in a PDF document as integer. fi...
25.450704
75
0.589928
import os import re import subprocess import logging logger = logging.getLogger(__name__) def get_pagecount(filepath): if not os.path.isfile(filepath): raise ValueError("Filepath %s is not a file" % filepath) if os.path.isdir(filepath): raise ValueError("Filepath %s is a directory!" % filep...
true
true
f7065c786e8199faa8b45ef54e9199481e3a1a23
638
py
Python
kosma_py/string_in.py
KOSMAsubmm/kosma_gildas_dlc
cfa61dff10713717858a90eea52af76ca95e9fb3
[ "MIT" ]
null
null
null
kosma_py/string_in.py
KOSMAsubmm/kosma_gildas_dlc
cfa61dff10713717858a90eea52af76ca95e9fb3
[ "MIT" ]
null
null
null
kosma_py/string_in.py
KOSMAsubmm/kosma_gildas_dlc
cfa61dff10713717858a90eea52af76ca95e9fb3
[ "MIT" ]
null
null
null
import glob import pyclass from sicparse import OptionParser import sys def main(): if len(sys.argv)!=3: print "not enough arguments" return # if (not pyclass.gotgdict()): pyclass.get(verbose=False) # sys.argv = [arg.replace("\"","") for arg in sys.argv] string_found = sy...
22.785714
71
0.609718
import glob import pyclass from sicparse import OptionParser import sys def main(): if len(sys.argv)!=3: print "not enough arguments" return if (not pyclass.gotgdict()): pyclass.get(verbose=False) sys.argv = [arg.replace("\"","") for arg in sys.argv] string_found = sys.ar...
false
true
f7065c8130bdc760c279b477c48f5d6f96651df4
232
py
Python
provision/signals.py
NOAA-GSD/qrba_os
83d079e43a7fa026c5ced79d7bc65f62cd74b90b
[ "CC0-1.0" ]
1
2019-11-14T03:43:32.000Z
2019-11-14T03:43:32.000Z
provision/signals.py
NOAA-GSD/qrba_os
83d079e43a7fa026c5ced79d7bc65f62cd74b90b
[ "CC0-1.0" ]
null
null
null
provision/signals.py
NOAA-GSD/qrba_os
83d079e43a7fa026c5ced79d7bc65f62cd74b90b
[ "CC0-1.0" ]
null
null
null
from .models import Restriction from django.db.models.signals import post_save from django.dispatch import receiver @receiver(post_save, sender=Restriction) def post_save_restriction(sender, **kwargs): msg = "worked" pass
23.2
46
0.784483
from .models import Restriction from django.db.models.signals import post_save from django.dispatch import receiver @receiver(post_save, sender=Restriction) def post_save_restriction(sender, **kwargs): msg = "worked" pass
true
true
f7065cde467b0ddcb82d9118630ab17141059b49
24,707
py
Python
server.py
d0t-slash/hello_friend
912564631e2a4fb206e86c778b1039eae36a373c
[ "MIT" ]
null
null
null
server.py
d0t-slash/hello_friend
912564631e2a4fb206e86c778b1039eae36a373c
[ "MIT" ]
null
null
null
server.py
d0t-slash/hello_friend
912564631e2a4fb206e86c778b1039eae36a373c
[ "MIT" ]
null
null
null
#!/usr/bin/python from flask import Flask, request, flash, redirect, render_template, jsonify from flaskext.mysql import MySQL from flask_wtf import Form from wtforms import StringField, PasswordField from wtforms.validators import DataRequired import twilio.twiml import random import requests import json import omdb ...
34.315278
179
0.594852
from flask import Flask, request, flash, redirect, render_template, jsonify from flaskext.mysql import MySQL from flask_wtf import Form from wtforms import StringField, PasswordField from wtforms.validators import DataRequired import twilio.twiml import random import requests import json import omdb from googleplaces ...
true
true
f7065d69fe40f0b9aadcdf7e03728763c0a38906
1,079
py
Python
ilf/fuzzers/imitation/amounts.py
ConstantinHvber/ilf
b706f81191508998d443c1c89e8d10028ce4e5d8
[ "Apache-2.0" ]
84
2019-11-29T08:32:41.000Z
2022-03-30T01:43:23.000Z
ilf/fuzzers/imitation/amounts.py
edolele/ilf
ddd15f201d451d62b94fb45fee7266fb579ab787
[ "Apache-2.0" ]
14
2019-12-30T15:54:00.000Z
2022-03-14T09:37:15.000Z
ilf/fuzzers/imitation/amounts.py
edolele/ilf
ddd15f201d451d62b94fb45fee7266fb579ab787
[ "Apache-2.0" ]
20
2020-01-04T05:54:33.000Z
2022-03-29T14:11:43.000Z
AMOUNTS = [ 99999999999999999999999999999, 0x0, 0x1, 0x1000000000000000000000000, 0x30000000000000, 1000000000000000000, 0x180000000000000, 100000000000000000, 10000000000000000, 1000000000000000, 0x2, 5000000000000000, 0x20, 0x700000000000000, 0x8, 0x3c00...
20.75
34
0.716404
AMOUNTS = [ 99999999999999999999999999999, 0x0, 0x1, 0x1000000000000000000000000, 0x30000000000000, 1000000000000000000, 0x180000000000000, 100000000000000000, 10000000000000000, 1000000000000000, 0x2, 5000000000000000, 0x20, 0x700000000000000, 0x8, 0x3c00...
true
true
f7065d6fe56a3f53b04a5145a3da58dd0308ad3a
1,943
py
Python
pydoof/helpers.py
doofinder/pydoof
18ebdbf5710d08bc00dcc28b9c035a9fe47306f0
[ "MIT" ]
null
null
null
pydoof/helpers.py
doofinder/pydoof
18ebdbf5710d08bc00dcc28b9c035a9fe47306f0
[ "MIT" ]
12
2015-05-14T17:09:51.000Z
2021-12-22T16:47:05.000Z
pydoof/helpers.py
doofinder/pydoof
18ebdbf5710d08bc00dcc28b9c035a9fe47306f0
[ "MIT" ]
1
2022-01-04T09:09:31.000Z
2022-01-04T09:09:31.000Z
""" Collection of functions to assist PyDoof modules. """ from collections import Iterable from datetime import date from enum import Enum def parse_query_params(params): """ Parses a query-parameters dictionary into their proper parameters schema. Each key value of the dictionary represents a parameter ...
29.892308
78
0.620175
from collections import Iterable from datetime import date from enum import Enum def parse_query_params(params): query_params = {} for param, value in params.items(): query_params.update( _parse_param(param, value) ) return query_params def _parse_param(param, value): que...
true
true
f7065db5438bbe3dd6134673cfc14c67b2095dac
29,176
py
Python
tests/test_plugin.py
scartill/cmd2
1b4e1e25f84bcc800a5f369783c3c3448a42361e
[ "MIT" ]
1
2021-07-06T23:59:46.000Z
2021-07-06T23:59:46.000Z
tests/test_plugin.py
scartill/cmd2
1b4e1e25f84bcc800a5f369783c3c3448a42361e
[ "MIT" ]
null
null
null
tests/test_plugin.py
scartill/cmd2
1b4e1e25f84bcc800a5f369783c3c3448a42361e
[ "MIT" ]
null
null
null
# coding=utf-8 # flake8: noqa E302 """ Test plugin infrastructure and hooks. """ import sys import pytest # Python 3.5 had some regressions in the unitest.mock module, so use 3rd party mock if available try: import mock except ImportError: from unittest import mock import cmd2 from cmd2 import plugin class...
34.774732
136
0.717165
import sys import pytest try: import mock except ImportError: from unittest import mock import cmd2 from cmd2 import plugin class Plugin: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.reset_counters() def reset_counters(self): self.called_prepa...
true
true
f7066078fae9ef978bae3444f68e7dca17f9ebf3
1,441
py
Python
scripts/auto_aug/aug_train.py
sytelus/fast-autoaugment
a53708699dce1233ce2a0bf0416ae2278007d506
[ "MIT" ]
null
null
null
scripts/auto_aug/aug_train.py
sytelus/fast-autoaugment
a53708699dce1233ce2a0bf0416ae2278007d506
[ "MIT" ]
null
null
null
scripts/auto_aug/aug_train.py
sytelus/fast-autoaugment
a53708699dce1233ce2a0bf0416ae2278007d506
[ "MIT" ]
null
null
null
import json import os from FastAutoAugment.common.common import get_logger, common_init, expdir_abspath from FastAutoAugment.data_aug.train import train_and_eval if __name__ == '__main__': conf = common_init(config_filepath='confs/aug_train_cifar.yaml', param_args=["--autoaug.loader.aug", "...
43.666667
94
0.646773
import json import os from FastAutoAugment.common.common import get_logger, common_init, expdir_abspath from FastAutoAugment.data_aug.train import train_and_eval if __name__ == '__main__': conf = common_init(config_filepath='confs/aug_train_cifar.yaml', param_args=["--autoaug.loader.aug", "...
true
true
f70660ac38f411cd1d8a0396ef510a16bb61622b
5,516
py
Python
esperclient/models/inline_response2005.py
pallavigopi/esper-client-py
f7e71d3f25a5d91f35628b414e8abe9e6849d316
[ "Apache-2.0" ]
null
null
null
esperclient/models/inline_response2005.py
pallavigopi/esper-client-py
f7e71d3f25a5d91f35628b414e8abe9e6849d316
[ "Apache-2.0" ]
null
null
null
esperclient/models/inline_response2005.py
pallavigopi/esper-client-py
f7e71d3f25a5d91f35628b414e8abe9e6849d316
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ ESPER API REFERENCE OpenAPI spec version: 1.0.0 Contact: developer@esper.io --------------------------------------------------------- Copyright 2019 Shoonya Enterprises Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Li...
26.14218
80
0.581218
import pprint import re import six from esperclient.models.app_install import AppInstall class InlineResponse2005(object): swagger_types = { 'count': 'int', 'next': 'str', 'previous': 'str', 'results': 'list[AppInstall]' } attribute_map = { 'count': 'count',...
true
true
f706616394bfb796b36fccce290a3f22e253fcb8
913
py
Python
pymk/tokenize.py
calzoneman/MarkovBot
19b96681cb00379bbfb9496b32d07bcb5d8262f3
[ "MIT" ]
3
2015-04-25T12:44:05.000Z
2018-02-27T05:37:20.000Z
pymk/tokenize.py
calzoneman/MarkovBot
19b96681cb00379bbfb9496b32d07bcb5d8262f3
[ "MIT" ]
null
null
null
pymk/tokenize.py
calzoneman/MarkovBot
19b96681cb00379bbfb9496b32d07bcb5d8262f3
[ "MIT" ]
1
2018-02-27T05:37:25.000Z
2018-02-27T05:37:25.000Z
from . import Link def iterate_words(lines): for line in lines: words = line.split() if len(words) == 0: continue for word in words[:-1]: yield word, is_stop_word(word) yield words[-1], True # EOL is considered a stop word def is_stop_word(word): return...
26.852941
72
0.579409
from . import Link def iterate_words(lines): for line in lines: words = line.split() if len(words) == 0: continue for word in words[:-1]: yield word, is_stop_word(word) yield words[-1], True def is_stop_word(word): return any(word.endswith(stopchar) for...
true
true
f706618a96562dbd0374f094d142328d806fbe24
4,967
py
Python
catalog/views.py
salman99-pro/perpus
9ac222b0c581f1806660525d02cefb54ba5e8d19
[ "Unlicense" ]
null
null
null
catalog/views.py
salman99-pro/perpus
9ac222b0c581f1806660525d02cefb54ba5e8d19
[ "Unlicense" ]
null
null
null
catalog/views.py
salman99-pro/perpus
9ac222b0c581f1806660525d02cefb54ba5e8d19
[ "Unlicense" ]
null
null
null
from django.shortcuts import render from catalog.models import Book, Author, BookInstance, Genre from django.contrib.auth.mixins import LoginRequiredMixin def index(request): """View function for home page of site.""" # Generate counts of some of the main objects num_books = Book.objects.all().count() ...
32.253247
118
0.722569
from django.shortcuts import render from catalog.models import Book, Author, BookInstance, Genre from django.contrib.auth.mixins import LoginRequiredMixin def index(request): num_books = Book.objects.all().count() num_instances = BookInstance.objects.all().count() num_instances_available = Book...
true
true
f706620db21a5141ab6b59279a8ed66b88b117b8
327
py
Python
pidal/protocol/mysql/flag.py
pi-plan/pidal
bfd1b9c4de87bc92565acbcff108270265757e39
[ "BSD-3-Clause" ]
6
2021-02-05T04:21:00.000Z
2021-11-29T06:46:21.000Z
pidal/protocol/mysql/flag.py
pi-plan/pidal
bfd1b9c4de87bc92565acbcff108270265757e39
[ "BSD-3-Clause" ]
1
2021-11-30T06:08:53.000Z
2021-11-30T06:08:53.000Z
pidal/protocol/mysql/flag.py
pi-plan/pidal
bfd1b9c4de87bc92565acbcff108270265757e39
[ "BSD-3-Clause" ]
null
null
null
import enum @enum.unique class Flag(enum.IntEnum): NOT_NULL = 1 PRI_KEY = 2 UNIQUE_KEY = 4 MULTIPLE_KEY = 8 BLOB = 16 UNSIGNED = 32 ZEROFILL = 64 BINARY = 128 ENUM = 256 AUTO_INCREMENT = 512 TIMESTAMP = 1024 SET = 2048 PART_KEY = 16384 GROUP = 32767 UNIQUE =...
15.571429
25
0.593272
import enum @enum.unique class Flag(enum.IntEnum): NOT_NULL = 1 PRI_KEY = 2 UNIQUE_KEY = 4 MULTIPLE_KEY = 8 BLOB = 16 UNSIGNED = 32 ZEROFILL = 64 BINARY = 128 ENUM = 256 AUTO_INCREMENT = 512 TIMESTAMP = 1024 SET = 2048 PART_KEY = 16384 GROUP = 32767 UNIQUE =...
true
true
f706625f62695c476ef59bdbf1d7c4a022c8786c
14,816
py
Python
util/check_tool_requirements.py
vsukhoml/opentitan
bb0bd16b3eca0ef2dd4144b5df49b8663c59101f
[ "Apache-2.0" ]
1
2021-10-06T07:01:57.000Z
2021-10-06T07:01:57.000Z
util/check_tool_requirements.py
vsukhoml/opentitan
bb0bd16b3eca0ef2dd4144b5df49b8663c59101f
[ "Apache-2.0" ]
null
null
null
util/check_tool_requirements.py
vsukhoml/opentitan
bb0bd16b3eca0ef2dd4144b5df49b8663c59101f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import argparse from distutils.version import StrictVersion import logging as log import os import re import shlex import subprocess import sys # Di...
34.861176
79
0.56682
import argparse from distutils.version import StrictVersion import logging as log import os import re import shlex import subprocess import sys log.basicConfig(level=log.INFO, format="%(levelname)s: %(message)s") def get_tool_requirements_path(): top_src_dir = os.path.normpath(os.path.join(os.path.dirname(_...
true
true
f70662e978230264c6ae2626ce3c3fff82488e27
1,082
py
Python
Glove/config.py
wangtao666666/NLP
6c1507b532800ef2f40fcf8450c3eb414816302f
[ "MIT" ]
2
2021-05-09T13:17:37.000Z
2021-06-06T08:58:53.000Z
Glove/config.py
wangtao666666/NLP
6c1507b532800ef2f40fcf8450c3eb414816302f
[ "MIT" ]
null
null
null
Glove/config.py
wangtao666666/NLP
6c1507b532800ef2f40fcf8450c3eb414816302f
[ "MIT" ]
1
2020-11-04T06:33:21.000Z
2020-11-04T06:33:21.000Z
# -*- coding: utf-8 -*- # @Time : 2020/10/11 上午10:58 # @Author : TaoWang # @Description : 参数配置 import argparse def ArgumentParser(): parser = argparse.ArgumentParser() parser.add_argument('--embed_size', type=int, default=300, help="embedding size of word embedding") parser.add_argument("--epoch",type=i...
45.083333
104
0.718115
import argparse def ArgumentParser(): parser = argparse.ArgumentParser() parser.add_argument('--embed_size', type=int, default=300, help="embedding size of word embedding") parser.add_argument("--epoch",type=int,default=1,help="epoch of training") parser.add_argument("--cuda",type=bool,default=True,...
true
true
f706635f9076d0a8f7d31dece811d55add499639
35,041
py
Python
mlflow/pytorch/__init__.py
JoshuaAnickat/mlflow
6dee5cb250460e8dc7accb487e54df8c95921e0e
[ "Apache-2.0" ]
null
null
null
mlflow/pytorch/__init__.py
JoshuaAnickat/mlflow
6dee5cb250460e8dc7accb487e54df8c95921e0e
[ "Apache-2.0" ]
null
null
null
mlflow/pytorch/__init__.py
JoshuaAnickat/mlflow
6dee5cb250460e8dc7accb487e54df8c95921e0e
[ "Apache-2.0" ]
null
null
null
""" The ``mlflow.pytorch`` module provides an API for logging and loading PyTorch models. This module exports PyTorch models with the following flavors: PyTorch (native) format This is the main flavor that can be loaded back into PyTorch. :py:mod:`mlflow.pyfunc` Produced for use by generic pyfunc-based deploym...
41.419622
100
0.611569
import importlib import logging import os import yaml import cloudpickle import numpy as np import pandas as pd from distutils.version import LooseVersion import posixpath import mlflow import shutil import mlflow.pyfunc.utils as pyfunc_utils from mlflow import pyfunc from mlflow.exceptions import MlflowException fro...
true
true
f70664c9a6ede7ef3012acca4f104d278c46bde9
13,538
py
Python
test/functional/wallet_bumpfee.py
brewhaus2/Placeholders-X16R
8757eef1a0596df490be28a0f259ab26597ac851
[ "MIT" ]
23
2018-12-18T16:46:37.000Z
2022-01-03T23:11:09.000Z
test/functional/wallet_bumpfee.py
brewhaus2/Placeholders-X16R
8757eef1a0596df490be28a0f259ab26597ac851
[ "MIT" ]
1
2018-12-15T19:08:42.000Z
2018-12-15T19:09:35.000Z
test/functional/wallet_bumpfee.py
brewhaus2/Placeholders-X16R
8757eef1a0596df490be28a0f259ab26597ac851
[ "MIT" ]
11
2018-12-12T05:45:24.000Z
2021-04-23T03:07:21.000Z
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The Placeholder Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the bumpfee RPC. Verifies that the bumpfee R...
44.827815
119
0.726178
from feature_segwit import send_to_witness from test_framework.test_framework import PlacehTestFramework from test_framework import blocktools from test_framework.mininode import CTransaction from test_framework.util import * import io BIP125_SEQUENCE_NUMBER = 0xfffffffd WALLET_PASSPHRASE = "test" WALLET_PASSPHRASE...
true
true
f70664ecda1e6ee859d14ca1f0b756c40afb742a
55,736
py
Python
src/sqlfluff/dialects/dialect_redshift.py
HeyZiko/sqlfluff
3e0825951f4533539ccca2603fd06bf6ac0160c8
[ "MIT" ]
null
null
null
src/sqlfluff/dialects/dialect_redshift.py
HeyZiko/sqlfluff
3e0825951f4533539ccca2603fd06bf6ac0160c8
[ "MIT" ]
1
2021-12-08T18:40:19.000Z
2021-12-08T18:40:19.000Z
src/sqlfluff/dialects/dialect_redshift.py
derickl/sqlfluff
ea2341ffa5325757acfa02cc9f7a07ac78b7a6c8
[ "MIT" ]
null
null
null
"""The Amazon Redshift dialect. This is based on postgres dialect, since it was initially based off of Postgres 8. We should monitor in future and see if it should be rebased off of ANSI """ from sqlfluff.core.parser import ( OneOf, AnyNumberOf, AnySetOf, Anything, Ref, Sequence, Bracketed,...
26.977735
92
0.47856
from sqlfluff.core.parser import ( OneOf, AnyNumberOf, AnySetOf, Anything, Ref, Sequence, Bracketed, BaseSegment, Delimited, Nothing, OptionallyBracketed, Matchable, ) from sqlfluff.core.dialects import load_raw_dialect from sqlfluff.dialects.dialect_redshift_keywords imp...
true
true
f70665fa4b9c088afe60181faccd70d7c31bef90
5,510
py
Python
src/random/weights.py
dhruvramani/CodeFunDo-2017
e102202ef0219c249a1666daa3dd6426ab899800
[ "MIT" ]
null
null
null
src/random/weights.py
dhruvramani/CodeFunDo-2017
e102202ef0219c249a1666daa3dd6426ab899800
[ "MIT" ]
null
null
null
src/random/weights.py
dhruvramani/CodeFunDo-2017
e102202ef0219c249a1666daa3dd6426ab899800
[ "MIT" ]
null
null
null
import os import cv2 import imutils import numpy as np from imutils import contours from imutils import perspective from scipy.spatial import distance as dist def detect_shape(filepath, min_width=15, debug=False): image = cv2.imread(filepath, 0) resized = imutils.resize(image, width=300) ratio = image.sh...
37.739726
138
0.571688
import os import cv2 import imutils import numpy as np from imutils import contours from imutils import perspective from scipy.spatial import distance as dist def detect_shape(filepath, min_width=15, debug=False): image = cv2.imread(filepath, 0) resized = imutils.resize(image, width=300) ratio = image.sh...
true
true
f706661b54b1a2ba0a351bf0922346a7da0465b2
1,349
py
Python
utils/data_operations.py
spitzc32/CropMe
6f3c0c9512cbf56d64b40c5c05a33627d6eaf51d
[ "MIT" ]
null
null
null
utils/data_operations.py
spitzc32/CropMe
6f3c0c9512cbf56d64b40c5c05a33627d6eaf51d
[ "MIT" ]
null
null
null
utils/data_operations.py
spitzc32/CropMe
6f3c0c9512cbf56d64b40c5c05a33627d6eaf51d
[ "MIT" ]
null
null
null
import numpy as np def euclidean_distance(p1,p2): """ returns euclidean distance between matrices @params: p1, p2: np.ndarray matrices to perform operation to. """ return np.sqrt(np.sum((p1-p2)**2, axis=1)) def entropy(p): """ Will be our measurement for uncertainty in our construction of descisio...
24.089286
73
0.67828
import numpy as np def euclidean_distance(p1,p2): return np.sqrt(np.sum((p1-p2)**2, axis=1)) def entropy(p): if p == 0: return 0 elif p == 1: return 0 else: return -(p * np.log2(p) + (1 - p) * np.log2(1 - p)) def information_gain(left_child, right_child): parent = left_child + right_child p_pa...
true
true
f706672c2da9d22c3b8bdffc9922423f0d156a0b
138
py
Python
friends/admin.py
DK-Nguyen/Django_Social_Network
6061e28b7574a612a71ba2661eabf6d024b930cd
[ "MIT" ]
14
2020-12-05T08:20:21.000Z
2022-03-07T12:18:40.000Z
friends/admin.py
DK-Nguyen/Django_Social_Network
6061e28b7574a612a71ba2661eabf6d024b930cd
[ "MIT" ]
1
2021-02-22T17:48:10.000Z
2021-02-22T17:48:10.000Z
friends/admin.py
DK-Nguyen/Django_Social_Network
6061e28b7574a612a71ba2661eabf6d024b930cd
[ "MIT" ]
13
2020-10-20T09:32:46.000Z
2022-01-02T00:27:51.000Z
from django.contrib import admin from friends.models import FriendRequest # Register your models here. admin.site.register(FriendRequest)
27.6
40
0.84058
from django.contrib import admin from friends.models import FriendRequest admin.site.register(FriendRequest)
true
true
f706680c0d49d881264dc7a58b14817bd9cd9809
474
py
Python
env/lib/python3.8/site-packages/plotly/validators/scattermapbox/_connectgaps.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/scattermapbox/_connectgaps.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/scattermapbox/_connectgaps.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="connectgaps", parent_name="scattermapbox", **kwargs ): super(ConnectgapsValidator, self).__init__( plotly_name=plotly_name, pa...
31.6
78
0.647679
import _plotly_utils.basevalidators class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="connectgaps", parent_name="scattermapbox", **kwargs ): super(ConnectgapsValidator, self).__init__( plotly_name=plotly_name, pa...
true
true
f7066947aae1aa24ce648ed20d4041cc7832fdd9
1,259
py
Python
10/euler10.py
adamkkarl/ProjectEuler
767286c74a484b7a569d6060ab6d54a298195aa3
[ "MIT" ]
2
2018-05-07T00:16:57.000Z
2018-05-22T02:57:16.000Z
10/euler10.py
adamkkarl/ProjectEuler
767286c74a484b7a569d6060ab6d54a298195aa3
[ "MIT" ]
null
null
null
10/euler10.py
adamkkarl/ProjectEuler
767286c74a484b7a569d6060ab6d54a298195aa3
[ "MIT" ]
null
null
null
#!/bin/python3 __author__ = "Adam Karl" """Find the sum of all primes less than or equal to N""" #https://projecteuler.net/problem=10 from math import sqrt isPrime = [] def sieve(n): """fills isPrime array with booleans for whether the number at isPrime[i] is prime or not""" """uses a process known as the s...
27.977778
96
0.605242
__author__ = "Adam Karl" from math import sqrt isPrime = [] def sieve(n): global isPrime isPrime = [True for i in range(n+1)] isPrime[0] = False isPrime[1] = False index = 2 while index <= n: if isPrime[index]: multiplier = 2 while index * multiplier <= n: ...
true
true
f7066956a03329cf977f9d78947cb64ae5a049cd
816
py
Python
test/generic/test_object_storage.py
linamnt/PySyft
4b60a86c003acbe1967d6c3d611df3d5f2d377ee
[ "Apache-2.0" ]
2
2019-05-29T13:09:02.000Z
2019-06-14T17:40:51.000Z
test/generic/test_object_storage.py
linamnt/PySyft
4b60a86c003acbe1967d6c3d611df3d5f2d377ee
[ "Apache-2.0" ]
3
2019-05-24T01:16:56.000Z
2019-09-18T13:02:30.000Z
test/generic/test_object_storage.py
linamnt/PySyft
4b60a86c003acbe1967d6c3d611df3d5f2d377ee
[ "Apache-2.0" ]
1
2022-03-12T08:04:34.000Z
2022-03-12T08:04:34.000Z
import torch from syft.generic import object_storage def test_clear_objects(): obj_storage = object_storage.ObjectStorage() x = torch.tensor(1) obj_storage.set_obj(x) objs = obj_storage.current_objects() assert len(objs) == 1 assert objs[x.id] == x ret_val = obj_storage.clear_objects(...
20.4
58
0.692402
import torch from syft.generic import object_storage def test_clear_objects(): obj_storage = object_storage.ObjectStorage() x = torch.tensor(1) obj_storage.set_obj(x) objs = obj_storage.current_objects() assert len(objs) == 1 assert objs[x.id] == x ret_val = obj_storage.clear_objects(...
true
true
f7066a531c9f20315c95fe4534104f20cd472774
9,276
py
Python
ApiManager/utils/common.py
hqw0805/HttpRunnerManager
6bce3d4f15c1530b52f9f016d3ee0e05d8bb4949
[ "MIT" ]
2
2021-06-17T08:16:59.000Z
2022-02-14T08:46:06.000Z
ApiManager/utils/common.py
hqw0805/HttpRunnerManager
6bce3d4f15c1530b52f9f016d3ee0e05d8bb4949
[ "MIT" ]
null
null
null
ApiManager/utils/common.py
hqw0805/HttpRunnerManager
6bce3d4f15c1530b52f9f016d3ee0e05d8bb4949
[ "MIT" ]
null
null
null
from ApiManager.utils.operation import add_project_data, add_module_data, add_case_data, add_config_data, \ add_register_data, bulk_import_data from ApiManager.models import ModuleInfo import yaml '''前端test信息转字典''' def key_value_dict(mode=3, **kwargs): if not kwargs: return None sorted_kwargs = s...
30.92
108
0.550668
from ApiManager.utils.operation import add_project_data, add_module_data, add_case_data, add_config_data, \ add_register_data, bulk_import_data from ApiManager.models import ModuleInfo import yaml def key_value_dict(mode=3, **kwargs): if not kwargs: return None sorted_kwargs = sorted(kwargs.items...
true
true
f7066a983aff8d428c9b4db495e52567064ada90
14,512
py
Python
script/utils.py
xuyuandong/sequence_behavior_ctr_model
e1bb71b4579456b1c6fbf3b432a84a3cb52611b7
[ "MIT" ]
4
2020-01-08T13:39:59.000Z
2021-09-21T08:13:44.000Z
script/utils.py
xuyuandong/sequence_behavior_ctr_model
e1bb71b4579456b1c6fbf3b432a84a3cb52611b7
[ "MIT" ]
null
null
null
script/utils.py
xuyuandong/sequence_behavior_ctr_model
e1bb71b4579456b1c6fbf3b432a84a3cb52611b7
[ "MIT" ]
3
2020-01-09T02:45:14.000Z
2021-09-21T08:13:59.000Z
import tensorflow as tf #from tensorflow.python.ops.rnn_cell import * #from tensorflow.python.ops.rnn_cell_impl import _Linear from tensorflow.contrib.rnn.python.ops.core_rnn_cell import * #from tensorflow import keras from tensorflow.python.ops import math_ops from tensorflow.python.ops import init_ops from tensorflo...
39.542234
152
0.618454
import tensorflow as tf from tensorflow.contrib.rnn.python.ops.core_rnn_cell import * from tensorflow.python.ops import math_ops from tensorflow.python.ops import init_ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import variable_scope as vs def din_attention(query, facts, attention_size, ...
true
true
f7066b237a2ddef03f7d76e2b0609e6baf121eac
684
py
Python
Gigger/utilities/ggr_config.py
Antman261/Gigger-Webserver
3b85d6267693da730712d983cf588d6ceaac6b3f
[ "MIT" ]
5
2016-10-27T02:10:30.000Z
2016-11-09T22:33:31.000Z
Gigger/utilities/ggr_config.py
Antman261/Gigger-Webserver
3b85d6267693da730712d983cf588d6ceaac6b3f
[ "MIT" ]
null
null
null
Gigger/utilities/ggr_config.py
Antman261/Gigger-Webserver
3b85d6267693da730712d983cf588d6ceaac6b3f
[ "MIT" ]
3
2016-11-06T16:11:16.000Z
2018-03-21T04:26:06.000Z
import sys # Alternatively just load env variables via your env/bin/activate script if sys.platform.startswith('darwin') or sys.platform.startswith('win'): import json path = "Gigger/utilities/env_local.json" with open(path) as json_file: global CONFIG CONFIG = json.load(json_file) else: ...
28.5
72
0.583333
import sys if sys.platform.startswith('darwin') or sys.platform.startswith('win'): import json path = "Gigger/utilities/env_local.json" with open(path) as json_file: global CONFIG CONFIG = json.load(json_file) else: import os global CONFIG CONFIG = { "DEPLOYMENT": os.env...
true
true
f7066b29f6f8c1ceb615b53290db9a7e9cb4c764
6,097
py
Python
tests/contrib/logging/test_logging.py
twosigmajab/dd-trace-py
6c582ae7d606a7c102a14731dff05560ebed7831
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/contrib/logging/test_logging.py
twosigmajab/dd-trace-py
6c582ae7d606a7c102a14731dff05560ebed7831
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/contrib/logging/test_logging.py
twosigmajab/dd-trace-py
6c582ae7d606a7c102a14731dff05560ebed7831
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
import logging import six import ddtrace from ddtrace.compat import StringIO from ddtrace.constants import ENV_KEY from ddtrace.constants import VERSION_KEY from ddtrace.contrib.logging import patch from ddtrace.contrib.logging import unpatch from ddtrace.contrib.logging.patch import RECORD_ATTR_SPAN_ID from ddtrace....
33.31694
117
0.660489
import logging import six import ddtrace from ddtrace.compat import StringIO from ddtrace.constants import ENV_KEY from ddtrace.constants import VERSION_KEY from ddtrace.contrib.logging import patch from ddtrace.contrib.logging import unpatch from ddtrace.contrib.logging.patch import RECORD_ATTR_SPAN_ID from ddtrace....
true
true
f7066b48bfc1a0494ace9b696fceeccb7db985e3
23,967
py
Python
salt/utils/decorators/__init__.py
xiaowei582648206/saltx
1d17b030b973ce5422e0fbe7e17c98c7ca91c49b
[ "Apache-2.0" ]
1
2022-02-09T06:40:14.000Z
2022-02-09T06:40:14.000Z
salt/utils/decorators/__init__.py
xiaowei582648206/saltx
1d17b030b973ce5422e0fbe7e17c98c7ca91c49b
[ "Apache-2.0" ]
null
null
null
salt/utils/decorators/__init__.py
xiaowei582648206/saltx
1d17b030b973ce5422e0fbe7e17c98c7ca91c49b
[ "Apache-2.0" ]
4
2020-11-04T06:28:05.000Z
2022-02-09T10:54:49.000Z
# -*- coding: utf-8 -*- ''' Helpful decorators for module writing ''' # Import python libs from __future__ import absolute_import import inspect import logging import time from functools import wraps from collections import defaultdict # Import salt libs import salt.utils import salt.utils.args from salt.exceptions i...
36.759202
119
0.577336
from __future__ import absolute_import import inspect import logging import time from functools import wraps from collections import defaultdict import salt.utils import salt.utils.args from salt.exceptions import CommandNotFoundError, CommandExecutionError, SaltConfigurationError from salt.version import SaltStackVe...
true
true
f7066c52461a81ce90ef89248b16a1f34feb04c1
8,019
py
Python
workflows/sc_adaptive_restartable/example_restartable_sc_adaptive.py
boutproject/VECMA-hackathon
07632a267fcaff582bf410eba13f7bc81d8ea6eb
[ "BSD-3-Clause" ]
2
2021-01-28T15:41:05.000Z
2021-02-21T07:40:22.000Z
workflows/sc_adaptive_restartable/example_restartable_sc_adaptive.py
boutproject/VECMA-hackathon
07632a267fcaff582bf410eba13f7bc81d8ea6eb
[ "BSD-3-Clause" ]
4
2021-01-19T14:21:36.000Z
2021-01-21T20:00:29.000Z
workflows/sc_adaptive_restartable/example_restartable_sc_adaptive.py
boutproject/VECMA-hackathon
07632a267fcaff582bf410eba13f7bc81d8ea6eb
[ "BSD-3-Clause" ]
2
2021-01-20T09:23:56.000Z
2021-02-23T09:55:51.000Z
#!/usr/bin/env python3 import argparse import boutvecma import easyvvuq as uq import chaospy import os import numpy as np import time import matplotlib.pyplot as plt CAMPAIGN_NAME = "Conduction." def refine_sampling_plan(campaign, analysis, number_of_refinements): """ Refine the sampling plan. Paramet...
30.724138
91
0.636114
import argparse import boutvecma import easyvvuq as uq import chaospy import os import numpy as np import time import matplotlib.pyplot as plt CAMPAIGN_NAME = "Conduction." def refine_sampling_plan(campaign, analysis, number_of_refinements): sampler = campaign.get_active_sampler() for _ in range(number_o...
true
true
f7066cc93099418824cccaf7fc8ea5f4a4c0a84f
2,947
py
Python
esp32-hcr-04-steppermotor4curtain/hcsr04.py
divergentti/Micropython
78f017b9ac583e9f7e432d25d55371314f6e496f
[ "MIT" ]
null
null
null
esp32-hcr-04-steppermotor4curtain/hcsr04.py
divergentti/Micropython
78f017b9ac583e9f7e432d25d55371314f6e496f
[ "MIT" ]
null
null
null
esp32-hcr-04-steppermotor4curtain/hcsr04.py
divergentti/Micropython
78f017b9ac583e9f7e432d25d55371314f6e496f
[ "MIT" ]
null
null
null
import machine, time from machine import Pin __version__ = '0.2.0' __author__ = 'Roberto Sánchez' __license__ = "Apache License 2.0. https://www.apache.org/licenses/LICENSE-2.0" class HCSR04: """ Driver to use the untrasonic sensor HC-SR04. The sensor range is between 2cm and 4m. The timeou...
38.776316
104
0.609433
import machine, time from machine import Pin __version__ = '0.2.0' __author__ = 'Roberto Sánchez' __license__ = "Apache License 2.0. https://www.apache.org/licenses/LICENSE-2.0" class HCSR04: def __init__(self, trigger_pin, echo_pin, echo_timeout_us=500*2*30): self.echo_timeout_us = echo_time...
true
true
f7066cee68a10ea1ef16552c737eaed368166402
31,883
py
Python
install.py
mfoerste4/legate.core
60db12e427acdff0cf0509b182d175bda18f2730
[ "Apache-2.0" ]
null
null
null
install.py
mfoerste4/legate.core
60db12e427acdff0cf0509b182d175bda18f2730
[ "Apache-2.0" ]
null
null
null
install.py
mfoerste4/legate.core
60db12e427acdff0cf0509b182d175bda18f2730
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2021-2022 NVIDIA Corporation # # 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 appli...
30.7158
79
0.55252
import argparse import json import multiprocessing import os import platform import re import shutil import subprocess import sys import tempfile import time from distutils import sysconfig import setuptools sys.stdout.reconfigure(line_buffering=True) os_name = platform.system() setup_py_flags = [] if int(setupto...
true
true
f7066d154d34a2672d3db294cfc16135c363c7a3
1,980
py
Python
tests/test_botManager.py
mytab0r/RaveGen-Telegram-bot-generator
4b42ae622554c4b2442b35b1181f8f09886215d2
[ "MIT" ]
1
2020-06-13T17:16:57.000Z
2020-06-13T17:16:57.000Z
tests/test_botManager.py
NICK-FTW/RaveGen-Telegram-bot-generator
269b36333a31cadb697f3c1250c6bf118cdc7fcc
[ "MIT" ]
5
2019-04-03T19:10:54.000Z
2019-06-14T17:21:14.000Z
tests/test_botManager.py
NICK-FTW/RaveGen-Telegram-bot-generator
269b36333a31cadb697f3c1250c6bf118cdc7fcc
[ "MIT" ]
2
2019-03-19T19:45:05.000Z
2021-02-07T18:04:33.000Z
import pytest import os import RaveEngine.projectManager as projectManager import RaveEngine.botManager as botManager import RaveEngine.configManager as configManager import Utils.commandManager as commandManager from flaky import flaky import Utils.sad as sad import Utils.utils as utils @pytest.fixture(autouse=True) ...
37.358491
110
0.774242
import pytest import os import RaveEngine.projectManager as projectManager import RaveEngine.botManager as botManager import RaveEngine.configManager as configManager import Utils.commandManager as commandManager from flaky import flaky import Utils.sad as sad import Utils.utils as utils @pytest.fixture(autouse=True) ...
true
true
f7066d86c7cb4a6e769873a782965b9e9366ecfb
1,828
py
Python
test/test_ip_manager.py
t-tran/upcloud-python-api
806fc85516e26067ead16daf31238297d77e4d2d
[ "MIT" ]
null
null
null
test/test_ip_manager.py
t-tran/upcloud-python-api
806fc85516e26067ead16daf31238297d77e4d2d
[ "MIT" ]
null
null
null
test/test_ip_manager.py
t-tran/upcloud-python-api
806fc85516e26067ead16daf31238297d77e4d2d
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from conftest import Mock import responses class TestIP(object): @responses.activate def test_get_ip(self, manager): data = Mock.mock_get('ip_address/10....
31.517241
77
0.652079
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from conftest import Mock import responses class TestIP(object): @responses.activate def test_get_ip(self, manager): data = Mock.mock_get('ip_address/10....
true
true
f7066e1e911b049b5d1348643c89ef9e2475825b
86,927
py
Python
rpython/rlib/rbigint.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
rpython/rlib/rbigint.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
rpython/rlib/rbigint.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
from rpython.rlib.rarithmetic import LONG_BIT, intmask, longlongmask, r_uint, r_ulonglong from rpython.rlib.rarithmetic import ovfcheck, r_longlong, widen from rpython.rlib.rarithmetic import most_neg_value_of_same_type from rpython.rlib.rfloat import isinf, isnan from rpython.rlib.rstring import StringBuilder from rpy...
30.890903
119
0.54846
from rpython.rlib.rarithmetic import LONG_BIT, intmask, longlongmask, r_uint, r_ulonglong from rpython.rlib.rarithmetic import ovfcheck, r_longlong, widen from rpython.rlib.rarithmetic import most_neg_value_of_same_type from rpython.rlib.rfloat import isinf, isnan from rpython.rlib.rstring import StringBuilder from rpy...
false
true
f7066ea18000c353af524844624c886f1d445921
26,318
py
Python
python/tvm/tensor_graph/core/con_graph.py
QinHan-Erin/AMOS
634bf48edf4015e4a69a8c32d49b96bce2b5f16f
[ "Apache-2.0" ]
22
2022-03-18T07:29:31.000Z
2022-03-23T14:54:32.000Z
python/tvm/tensor_graph/core/con_graph.py
QinHan-Erin/AMOS
634bf48edf4015e4a69a8c32d49b96bce2b5f16f
[ "Apache-2.0" ]
null
null
null
python/tvm/tensor_graph/core/con_graph.py
QinHan-Erin/AMOS
634bf48edf4015e4a69a8c32d49b96bce2b5f16f
[ "Apache-2.0" ]
2
2022-03-18T08:26:34.000Z
2022-03-20T06:02:48.000Z
import tvm import tvm._ffi import numpy as np from functools import reduce from tvm.tensor_graph.core.utils import to_int, to_tuple, flatten_tir_graph, op_feature def make_tir_graph(fwd_graph, loss=None, optimizer=None, inference=True, need_output=True, need_grad=True): if inference: finputs, foutputs, fw...
36.101509
126
0.572764
import tvm import tvm._ffi import numpy as np from functools import reduce from tvm.tensor_graph.core.utils import to_int, to_tuple, flatten_tir_graph, op_feature def make_tir_graph(fwd_graph, loss=None, optimizer=None, inference=True, need_output=True, need_grad=True): if inference: finputs, foutputs, fw...
true
true
f7066ecb737444451cfef79d324d0060668dfe25
31,057
py
Python
cinder/volume/utils.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/volume/utils.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/volume/utils.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 OpenStack Foundation # # 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 ...
33.979212
79
0.631355
import ast import functools import math import operator import re import time import uuid from Crypto.Random import random import eventlet from eventlet import tpool from oslo_concurrency import processutils from oslo_config import cfg from oslo_log import log as logging from oslo_utils import strutils from oslo_ut...
true
true
f7067012337bf3a0a0901bde6fa59536f772ede1
1,550
py
Python
nr_nresults/fetchers.py
Narodni-repozitar/nr-Nresults
f3470f72ae2cee3c9c3d920a5b80188280986170
[ "MIT" ]
null
null
null
nr_nresults/fetchers.py
Narodni-repozitar/nr-Nresults
f3470f72ae2cee3c9c3d920a5b80188280986170
[ "MIT" ]
null
null
null
nr_nresults/fetchers.py
Narodni-repozitar/nr-Nresults
f3470f72ae2cee3c9c3d920a5b80188280986170
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Persistent identifier fetchers. A proper fetcher is defined as a function that re...
29.807692
73
0.735484
from __future__ import absolute_import, print_function from invenio_pidstore.fetchers import FetchedPID from oarepo_communities.converters import CommunityPIDValue from oarepo_communities.proxies import current_oarepo_communities from .providers import NRNresultsIdProvider def nr_nresults_id_fetcher(record_uuid, ...
true
true
f706701e92bc768463629c01940fc4fbdc99e00c
816
py
Python
gwaportalpipeline/common.py
timeu/gwaportal-analysis-pipeline
63df8c87be175a256729a728cc17d50fa71ef540
[ "MIT" ]
null
null
null
gwaportalpipeline/common.py
timeu/gwaportal-analysis-pipeline
63df8c87be175a256729a728cc17d50fa71ef540
[ "MIT" ]
null
null
null
gwaportalpipeline/common.py
timeu/gwaportal-analysis-pipeline
63df8c87be175a256729a728cc17d50fa71ef540
[ "MIT" ]
null
null
null
import logging,os from rest import Restclient LOCAL_DATA_FOLDER = '/DATA' GENOTYPE_FOLDER = '/GENOTYPE' REST_HOST = os.environ['REST_HOST'] REST_USERNAME = os.environ['REST_USERNAME'] REST_PASSWORD = os.environ['REST_PASSWORD'] restclient = Restclient(REST_HOST,REST_USERNAME,REST_PASSWORD) class CeleryProgressLogHa...
30.222222
62
0.67402
import logging,os from rest import Restclient LOCAL_DATA_FOLDER = '/DATA' GENOTYPE_FOLDER = '/GENOTYPE' REST_HOST = os.environ['REST_HOST'] REST_USERNAME = os.environ['REST_USERNAME'] REST_PASSWORD = os.environ['REST_PASSWORD'] restclient = Restclient(REST_HOST,REST_USERNAME,REST_PASSWORD) class CeleryProgressLogHa...
true
true
f70670a2368e6d69ed5e98eea8fb25cf26ce313e
2,856
py
Python
cref/structure/plot.py
mchelem/cref2
c65f3b2339bfd068618ce323abb2d23ecf982417
[ "MIT" ]
2
2019-10-16T15:59:16.000Z
2020-03-18T14:25:47.000Z
cref/structure/plot.py
icalaca/cref2
3324c34892dfaba2c99a0a564ede9f0c40ad65a5
[ "MIT" ]
null
null
null
cref/structure/plot.py
icalaca/cref2
3324c34892dfaba2c99a0a564ede9f0c40ad65a5
[ "MIT" ]
1
2019-09-11T20:04:09.000Z
2019-09-11T20:04:09.000Z
import os from collections import OrderedDict import matplotlib.pyplot as plt import pandas _ramachandran_densities = pandas.read_csv( 'data/rama500-general.data', skiprows=6, delimiter=' ', names=['phi', 'psi', 'value'] ) """ DSSP output: H = α-helix B = residue in isolated β-bridge E =...
27.2
72
0.605742
import os from collections import OrderedDict import matplotlib.pyplot as plt import pandas _ramachandran_densities = pandas.read_csv( 'data/rama500-general.data', skiprows=6, delimiter=' ', names=['phi', 'psi', 'value'] ) DSSP_to_color = { 'H': '#ED6161', 'B': '#CCA200', 'E': '#FFFB00'...
true
true
f70670b1c7230d7079f8aa316d44c96d866edcae
606
py
Python
src/tfc/utils/BF/BF.py
leakec/tfc
f814be4643270498a68bb0859720191ff7216012
[ "MIT" ]
15
2021-01-04T16:30:59.000Z
2022-03-26T22:12:45.000Z
src/tfc/utils/BF/BF.py
leakec/tfc
f814be4643270498a68bb0859720191ff7216012
[ "MIT" ]
3
2021-12-10T23:17:56.000Z
2022-03-12T18:39:18.000Z
src/tfc/utils/BF/BF.py
leakec/tfc
f814be4643270498a68bb0859720191ff7216012
[ "MIT" ]
2
2021-04-27T10:34:20.000Z
2022-02-25T13:02:49.000Z
""" This is a dummy file used only to avoid errors in ReadTheDocs. The real BF.py is created during the setup once swig is run. """ def CP(): pass def LeP(): pass def LaP(): pass def HoPpro(): pass def HoPphy(): pass def FS(): pass def ELMReLU(): pass def ELMSigmoid(): pa...
7.769231
131
0.566007
def CP(): pass def LeP(): pass def LaP(): pass def HoPpro(): pass def HoPphy(): pass def FS(): pass def ELMReLU(): pass def ELMSigmoid(): pass def ELMTanh(): pass def ELMSin(): pass def ELMSwish(): pass def nCP(): pass def nLeP(): pass def ...
true
true
f706717ca5bdb5158245d84e2037360c0f0a8741
1,152
py
Python
fasterfrequentwords.py
Zeynep98/Bioinformatics-101
1e95add594cf0ba7bb09b5226f78e03acd12177a
[ "Apache-2.0" ]
null
null
null
fasterfrequentwords.py
Zeynep98/Bioinformatics-101
1e95add594cf0ba7bb09b5226f78e03acd12177a
[ "Apache-2.0" ]
1
2018-05-13T18:11:43.000Z
2018-05-13T18:12:52.000Z
fasterfrequentwords.py
Zeynep98/Bioinformatics-101
1e95add594cf0ba7bb09b5226f78e03acd12177a
[ "Apache-2.0" ]
null
null
null
seq = 'CTTCTCACGTACAACAAAATC' symbol2number = {"A":0,"C":1,"G":2,"T":3} def PatternToNumber(Pattern): if not Pattern: return 0 symbol = Pattern[-1] prefix = Pattern[:-1] return ((4*PatternToNumber(prefix))+symbol2number[symbol]) def NumberToPattern(index, k): bases = ['A', ...
28.097561
63
0.611111
seq = 'CTTCTCACGTACAACAAAATC' symbol2number = {"A":0,"C":1,"G":2,"T":3} def PatternToNumber(Pattern): if not Pattern: return 0 symbol = Pattern[-1] prefix = Pattern[:-1] return ((4*PatternToNumber(prefix))+symbol2number[symbol]) def NumberToPattern(index, k): bases = ['A', ...
true
true
f706718b763abdb2ad4ab8c6dc5f95e6157cdd1f
5,891
py
Python
api/config.py
ericminio/namex
09da6b5f6476494d13ec2243934c51e0423340cd
[ "Apache-2.0" ]
null
null
null
api/config.py
ericminio/namex
09da6b5f6476494d13ec2243934c51e0423340cd
[ "Apache-2.0" ]
2
2019-01-14T23:59:11.000Z
2019-01-30T16:09:16.000Z
api/config.py
rarmitag/namex
1b308bf96130619d4a61d44e075cc7ab177dc6cd
[ "Apache-2.0" ]
null
null
null
import os from dotenv import load_dotenv, find_dotenv #this will load all the envars from a .env file located in the project root (api) load_dotenv(find_dotenv()) CONFIGURATION = { "development": "config.DevConfig", "testing": "config.TestConfig", "production": "config.Config", "default": "config.Conf...
40.07483
196
0.706501
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) CONFIGURATION = { "development": "config.DevConfig", "testing": "config.TestConfig", "production": "config.Config", "default": "config.Config" } class Config(object): PROJECT_ROOT = os.path.abspath(os.path.dirname(_...
true
true
f70671907299ea2720d3013809f910372397b628
1,047
py
Python
ProjectEuler/p011.py
TISparta/competitive-programming-solutions
31987d4e67bb874bf15653565c6418b5605a20a8
[ "MIT" ]
1
2018-01-30T13:21:30.000Z
2018-01-30T13:21:30.000Z
ProjectEuler/p011.py
TISparta/competitive-programming-solutions
31987d4e67bb874bf15653565c6418b5605a20a8
[ "MIT" ]
null
null
null
ProjectEuler/p011.py
TISparta/competitive-programming-solutions
31987d4e67bb874bf15653565c6418b5605a20a8
[ "MIT" ]
1
2018-08-29T13:26:50.000Z
2018-08-29T13:26:50.000Z
# Execution time : 0.003847 seconds # Solution Explanation # A simple brute-froce approach is enough import time width = 40 from functools import reduce def solution(): v = list() v.append([0]*23) v.append([0]*23) v.append([0]*23) for line in open('input_p011.in','r'): v.append(list(map...
29.083333
86
0.560649
import time width = 40 from functools import reduce def solution(): v = list() v.append([0]*23) v.append([0]*23) v.append([0]*23) for line in open('input_p011.in','r'): v.append(list(map(int,line.split()))) v[-1].extend([0,0,0]) v.append([0]*23) v.append([0]*23) v.ap...
true
true
f70671eb0e452b681bc4447aabde7ab97ab5a153
2,784
py
Python
config.py
amrmashriqi/Houdini
f91687a305ad88e2043057fd001620639bb5af0a
[ "MIT" ]
null
null
null
config.py
amrmashriqi/Houdini
f91687a305ad88e2043057fd001620639bb5af0a
[ "MIT" ]
null
null
null
config.py
amrmashriqi/Houdini
f91687a305ad88e2043057fd001620639bb5af0a
[ "MIT" ]
null
null
null
import sys config = { "Database": { "Address": "localhost", "Username": "root", "Password": "", "Name": "Houdini", "Driver": "PyMySQL" if sys.platform == "win32" else "MySQLdb" }, "Redis": { "Address": "127.0.0.1", "Port": 6379 }, "Servers": { "Login": { "Address": "127.0.0.1", "Port": 6112, ...
26.264151
106
0.446121
import sys config = { "Database": { "Address": "localhost", "Username": "root", "Password": "", "Name": "Houdini", "Driver": "PyMySQL" if sys.platform == "win32" else "MySQLdb" }, "Redis": { "Address": "127.0.0.1", "Port": 6379 }, "Servers": { "Login": { "Address": "127.0.0.1", "Port": 6112, ...
true
true
f70671faa8271dc37c80996d283b7fbb1514c46a
523
py
Python
plugins/haveibeenpwned/setup.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/haveibeenpwned/setup.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/haveibeenpwned/setup.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT from setuptools import setup, find_packages setup(name='haveibeenpwned-rapid7-plugin', version='4.0.2', description='Determine if a user, domain, or password has been leaked via data available in the Have I Been Pwned database', author='rapid7', author_e...
34.866667
130
0.686424
from setuptools import setup, find_packages setup(name='haveibeenpwned-rapid7-plugin', version='4.0.2', description='Determine if a user, domain, or password has been leaked via data available in the Have I Been Pwned database', author='rapid7', author_email='', url='', packages=fi...
true
true