hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f12f7b53a6a6c0b7357fcdd356a20dc7474c15d2 | 23,841 | py | Python | aicsimageio/readers/tiff_glob_reader.py | griffinfujioka/aicsimageio | c49a613dc54381d11237240ba36f0ef54603a7d6 | [
"BSD-3-Clause"
] | null | null | null | aicsimageio/readers/tiff_glob_reader.py | griffinfujioka/aicsimageio | c49a613dc54381d11237240ba36f0ef54603a7d6 | [
"BSD-3-Clause"
] | null | null | null | aicsimageio/readers/tiff_glob_reader.py | griffinfujioka/aicsimageio | c49a613dc54381d11237240ba36f0ef54603a7d6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .. import constants, exceptions, types
TIFF_IMAGE_DESCRIPTION_TAG_INDEX = 270
| 38.640194 | 88 | 0.607944 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import glob
import re
from collections import OrderedDict
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
import dask.array as da
import numpy as np
import pandas as pd
import xarray as xr
from fsspec.spec import Abs... | 0 | 2,175 | 0 | 20,838 | 0 | 0 | 0 | 319 | 377 |
54c4b916f405a976e35d15d84b663e55c926fba1 | 2,410 | py | Python | shapes/shapefromOSM.py | grischard/OSM_snippets | df3c69ab0d1496a636d760ac5546e6b5b011ea10 | [
"MIT"
] | 6 | 2017-05-05T22:22:37.000Z | 2020-04-02T09:20:34.000Z | shapes/shapefromOSM.py | grischard/OSM_snippets | df3c69ab0d1496a636d760ac5546e6b5b011ea10 | [
"MIT"
] | 33 | 2017-05-05T19:29:22.000Z | 2020-03-31T09:05:54.000Z | shapes/shapefromOSM.py | grischard/OSM_snippets | df3c69ab0d1496a636d760ac5546e6b5b011ea10 | [
"MIT"
] | 3 | 2017-05-16T20:43:13.000Z | 2020-04-02T09:20:37.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# get_shapes_from_osm('1257117')
# get_shapes_from_osm('1254451')
get_shapes_from_osm('1254455')
| 35.970149 | 152 | 0.606639 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
from shapely.geometry import LineString
from shapely.ops import linemerge
def get_shapes_from_osm(relation_id):
overpass = 'http://www.overpass-api.de/api/interpreter?data=[out:json][timeout:25];relation('+relation_id+');out body;>;out skel qt;>;... | 0 | 0 | 0 | 0 | 0 | 2,140 | 0 | 24 | 94 |
78749b1b23c1d273a2c22a2b96b04b7458d944de | 5,533 | py | Python | accelbyte_py_sdk/api/group/__init__.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/group/__init__.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/group/__init__.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
"""Auto-generated package that contains models used b... | 48.535088 | 84 | 0.897162 | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
"""Auto-generated package that contains models used b... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,056 | 1,936 |
514a26b569141ed333764a960156981d0bca57f1 | 2,087 | py | Python | afterburner_train.py | catskillsresearch/openasr20 | b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e | [
"Apache-2.0"
] | null | null | null | afterburner_train.py | catskillsresearch/openasr20 | b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e | [
"Apache-2.0"
] | null | null | null | afterburner_train.py | catskillsresearch/openasr20 | b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e | [
"Apache-2.0"
] | 1 | 2021-07-28T02:13:21.000Z | 2021-07-28T02:13:21.000Z | # coding: utf-8
# ASR post-processing corrector pred vs gold: TRAIN
import logging
logging.getLogger('nemo_logger').setLevel(logging.ERROR)
if __name__=="__main__":
language='vietnamese'
phase='build'
release='400'
model_fn='save/new_afterburner/afterburner_302.pt'
new_model_fn='save/new_afterburne... | 39.377358 | 127 | 0.676569 | # coding: utf-8
# ASR post-processing corrector pred vs gold: TRAIN
import torch
from afterburner_pretrained_model import afterburner_pretrained_model
import matplotlib.pyplot as plt
from progress_bar import progress_bar
from tqdm.auto import tqdm
import logging
logging.getLogger('nemo_logger').setLevel(logging.ER... | 0 | 0 | 0 | 0 | 0 | 1,439 | 0 | 70 | 138 |
1181b775f6b040f2871537af850f11704305e28c | 2,267 | py | Python | mod_peak.py | aniketk21/tfbs-prediction | dbb98450182f5be7a7f1ff71b8c382fcbba8666b | [
"MIT"
] | 2 | 2017-07-07T07:22:41.000Z | 2018-02-11T15:56:08.000Z | mod_peak.py | aniketk21/tfbs-prediction | dbb98450182f5be7a7f1ff71b8c382fcbba8666b | [
"MIT"
] | null | null | null | mod_peak.py | aniketk21/tfbs-prediction | dbb98450182f5be7a7f1ff71b8c382fcbba8666b | [
"MIT"
] | null | null | null | '''
mod_peak.py
usage: python mod_peak.py narrowPeak_file dataset.dat output.dat
modify the `chipseq_peak` values to 1 if a window from narrowPeak file appears in the dataset.
'''
import sys
nps = open(sys.argv[1])
inp = open(sys.argv[2])
out = open(sys.argv[3], 'w')
inpl = inp.readlines()
npsl = nps.rea... | 23.371134 | 113 | 0.528893 | '''
mod_peak.py
usage: python mod_peak.py narrowPeak_file dataset.dat output.dat
modify the `chipseq_peak` values to 1 if a window from narrowPeak file appears in the dataset.
'''
import sys
nps = open(sys.argv[1])
inp = open(sys.argv[2])
out = open(sys.argv[3], 'w')
inpl = inp.readlines()
npsl = nps.rea... | 0 | 0 | 0 | 0 | 0 | 797 | 0 | 0 | 46 |
02fbe426a025e86caefb02cd685629afa2f27a3e | 316 | py | Python | instagram_api/response/model/media_share.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | 13 | 2019-08-07T21:24:34.000Z | 2020-12-12T12:23:50.000Z | instagram_api/response/model/media_share.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null | instagram_api/response/model/media_share.py | Yuego/instagram_api | b53f72db36c505a2eb24ebac1ba8267a0cc295bb | [
"MIT"
] | null | null | null |
__all__ = ['MediaShare', 'MediaShareInterface']
| 19.75 | 54 | 0.775316 | from ..mapper import PropertyMapper, ApiInterfaceBase
from ..mapper.types import Timestamp, AnyType
from .item import Item
__all__ = ['MediaShare', 'MediaShareInterface']
class MediaShareInterface(ApiInterfaceBase):
media: Item
text: str
class MediaShare(PropertyMapper, MediaShareInterface):
pass
| 0 | 0 | 0 | 95 | 0 | 0 | 0 | 57 | 113 |
33985e61d5a343c70b0ee3dc1c4021a35cc2187e | 1,945 | py | Python | accounts/models.py | NoobLucifer/NSP | f411570924905f1bf3c39fa36b5949e5b9e37c0a | [
"MIT"
] | 20 | 2018-08-02T15:10:30.000Z | 2019-05-15T14:38:06.000Z | accounts/models.py | nk521/NSP | ecffc873fbfe3471ed320f0698adca4e8c573ab5 | [
"MIT"
] | 55 | 2018-06-19T04:31:56.000Z | 2018-07-19T17:42:00.000Z | accounts/models.py | nk521/NSP | ecffc873fbfe3471ed320f0698adca4e8c573ab5 | [
"MIT"
] | 10 | 2018-08-03T10:42:16.000Z | 2019-01-31T10:07:57.000Z | from django.contrib.auth.models import User
from django.db.models.signals import post_save
post_save.connect(create_profile, sender=User)
| 38.9 | 114 | 0.740874 | import datetime
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
from project.models import *
class Skill(models.Model):
user = models.ForeignKey(User, on_delete=models.... | 0 | 0 | 0 | 1,444 | 0 | 117 | 0 | 60 | 180 |
ed3d5a7108c9399890f4d8b96e7283e495ebc240 | 7,198 | py | Python | emtf_nnet/keras/quantization/quantize_model.py | jiafulow/emtf-nnet | 70a6c747c221178f9db940197ea886bdb60bf3ba | [
"Apache-2.0"
] | null | null | null | emtf_nnet/keras/quantization/quantize_model.py | jiafulow/emtf-nnet | 70a6c747c221178f9db940197ea886bdb60bf3ba | [
"Apache-2.0"
] | null | null | null | emtf_nnet/keras/quantization/quantize_model.py | jiafulow/emtf-nnet | 70a6c747c221178f9db940197ea886bdb60bf3ba | [
"Apache-2.0"
] | null | null | null | # The following source code was originally obtained from:
# https://github.com/tensorflow/model-optimization/blob/v0.7.0/tensorflow_model_optimization/python/core/quantization/keras/quantize.py
# ==============================================================================
# Copyright 2019 The TensorFlow Authors. All... | 36.912821 | 135 | 0.730203 | # The following source code was originally obtained from:
# https://github.com/tensorflow/model-optimization/blob/v0.7.0/tensorflow_model_optimization/python/core/quantization/keras/quantize.py
# ==============================================================================
# Copyright 2019 The TensorFlow Authors. All... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dc90bf6a51e5dfcbbf6ae971134b7a025a1977dd | 6,812 | py | Python | hasdrubal/asts/types_.py | Armani-T/hasdrubal | 7fac381b866114533e589e964ec7c27adbd1deff | [
"MIT"
] | 2 | 2021-06-25T15:46:16.000Z | 2022-02-20T22:04:36.000Z | hasdrubal/asts/types_.py | Armani-T/hasdrubal | 7fac381b866114533e589e964ec7c27adbd1deff | [
"MIT"
] | 42 | 2021-07-06T05:38:23.000Z | 2022-03-04T18:09:30.000Z | hasdrubal/asts/types_.py | Armani-T/hasdrubal | 7fac381b866114533e589e964ec7c27adbd1deff | [
"MIT"
] | null | null | null | # pylint: disable=R0903, C0115
| 29.362069 | 87 | 0.598356 | # pylint: disable=R0903, C0115
from abc import ABC, abstractmethod
from typing import AbstractSet, Any, final, Mapping, Sequence
from .base import ASTNode, Span
class Type(ASTNode, ABC):
"""
This is the base class for the program's representation of types in
the type system.
Warnings
--------
... | 0 | 1,884 | 0 | 4,646 | 0 | 0 | 0 | 64 | 182 |
037ef3febdafd6afbfede7a6eaec2635d3f3d14d | 560 | py | Python | actions/parse_file.py | cognifloyd/stackstorm-csv | 75af77cf905f41a0551b17b587d79859356e1c94 | [
"Apache-2.0"
] | null | null | null | actions/parse_file.py | cognifloyd/stackstorm-csv | 75af77cf905f41a0551b17b587d79859356e1c94 | [
"Apache-2.0"
] | null | null | null | actions/parse_file.py | cognifloyd/stackstorm-csv | 75af77cf905f41a0551b17b587d79859356e1c94 | [
"Apache-2.0"
] | null | null | null |
__all__ = [
'ParseCSVFileAction'
]
| 23.333333 | 88 | 0.619643 | import os
import csv
from st2common.runners.base_action import Action
__all__ = [
'ParseCSVFileAction'
]
class ParseCSVFileAction(Action):
def run(self, file_path, delimiter=',', quote_char='"'):
if not os.path.isfile(file_path):
raise ValueError('File "%s" doesnt exist' % (file_path))
... | 0 | 0 | 0 | 425 | 0 | 0 | 0 | 4 | 90 |
e9451e199f19c2c1a755134a15b1b13a5694edfd | 5,918 | py | Python | aiohttp_auth/auth/ticket_auth.py | gnarlychicken/aiohttp_auth | 3d55236889fb14b662279b050de18d43842bb886 | [
"MIT"
] | 12 | 2016-02-27T21:57:51.000Z | 2020-10-26T13:57:47.000Z | aiohttp_auth/auth/ticket_auth.py | gnarlychicken/aiohttp_auth | 3d55236889fb14b662279b050de18d43842bb886 | [
"MIT"
] | 5 | 2016-07-22T15:51:48.000Z | 2021-09-07T21:48:01.000Z | aiohttp_auth/auth/ticket_auth.py | gnarlychicken/aiohttp_auth | 3d55236889fb14b662279b050de18d43842bb886 | [
"MIT"
] | 8 | 2016-02-15T04:58:31.000Z | 2019-01-21T14:17:16.000Z |
_REISSUE_KEY = 'aiohttp_auth.auth.TktAuthentication.reissue'
| 33.625 | 81 | 0.624704 | import abc
import time
from ipaddress import ip_address
from ticket_auth import TicketFactory, TicketError
from .abstract_auth import AbstractAuthentication
from aiohttp import web
_REISSUE_KEY = 'aiohttp_auth.auth.TktAuthentication.reissue'
class TktAuthentication(AbstractAuthentication):
"""Ticket authenticat... | 0 | 936 | 2,250 | 2,464 | 0 | 0 | 0 | 49 | 155 |
69543e9aba0cbd7f9bd5879b259ecac94b567c84 | 409 | py | Python | server/src/labelMatchEngine/labelMatchEngine.py | leonard-thong/dlwlrat | 2b4b669a3b2f348d1b05125afd6b8a1907b6b212 | [
"CC-BY-3.0"
] | 2 | 2020-10-08T06:01:22.000Z | 2020-12-15T16:28:27.000Z | server/src/labelMatchEngine/labelMatchEngine.py | dreamyang-liu/SciAnnotate | dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2 | [
"CC-BY-3.0"
] | 8 | 2020-12-09T02:55:20.000Z | 2020-12-23T23:31:42.000Z | server/src/labelMatchEngine/labelMatchEngine.py | dreamyang-liu/SciAnnotate | dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2 | [
"CC-BY-3.0"
] | 4 | 2021-02-02T04:51:53.000Z | 2021-07-18T17:00:04.000Z | # -*- coding:utf-8 -*-
"""
===========================================
@author: lmy
@time: 2020/8/19 11:12 PM
@project: brat
@file: labelMatchEngine.py
===========================================
"""
MATCH_ENGINE_HANDLERS = {
'keywords': 'keywordHandler',
'length': 'lengthHandler',
'regex': ... | 19.47619 | 49 | 0.486553 | # -*- coding:utf-8 -*-
"""
===========================================
@author: lmy
@time: 2020/8/19 11:12 PM
@project: brat
@file: labelMatchEngine.py
===========================================
"""
import re
MATCH_ENGINE_HANDLERS = {
'keywords': 'keywordHandler',
'length': 'lengthHandler',
... | 0 | 0 | 0 | 0 | 0 | 37 | 0 | -12 | 46 |
08fc0cda57db50daa43c951d0d3a2030a2e58fe7 | 23,835 | py | Python | gtfs_csv_to_rdf.py | diarmuidr3d/gtfs_csv_to_rdf.py | e003b9d12c2301220bebc72b2e48ce3d4ce91ec7 | [
"CC0-1.0"
] | null | null | null | gtfs_csv_to_rdf.py | diarmuidr3d/gtfs_csv_to_rdf.py | e003b9d12c2301220bebc72b2e48ce3d4ce91ec7 | [
"CC0-1.0"
] | 1 | 2015-11-21T10:05:50.000Z | 2015-11-21T10:35:49.000Z | gtfs_csv_to_rdf.py | diarmuidr3d/gtfs_csv_to_rdf.py | e003b9d12c2301220bebc72b2e48ce3d4ce91ec7 | [
"CC0-1.0"
] | null | null | null | import sys
__author__ = 'Diarmuid'
if __name__ == "__main__":
print(sys.argv)
GtfsCsvToRdf(uri=sys.argv[1], output_file=sys.argv[2], zip_file=sys.argv[3]) | 55.430233 | 153 | 0.63176 | from datetime import datetime
import os
import shutil
from zipfile import ZipFile
from rdflib import Graph, Namespace, RDF, Literal, XSD, URIRef
from csv import DictReader
from rdflib.namespace import FOAF, DCTERMS
from rdflib.resource import Resource
import sys
__author__ = 'Diarmuid'
class GtfsCsvToRdf:
GEO =... | 6 | 318 | 0 | 23,074 | 0 | 0 | 0 | 76 | 199 |
eb6c098e140ac2d55a4dde3e7f5e0ce4eede7e6d | 935 | py | Python | src/connection.py | blairck/jaeger | a4b52d1684fd8a2d216360f87aad3ebc2f341cf4 | [
"MIT"
] | 1 | 2016-07-28T04:48:40.000Z | 2016-07-28T04:48:40.000Z | src/connection.py | blairck/jaeger | a4b52d1684fd8a2d216360f87aad3ebc2f341cf4 | [
"MIT"
] | 18 | 2016-08-15T03:03:28.000Z | 2018-02-01T08:15:31.000Z | src/connection.py | blairck/jaeger | a4b52d1684fd8a2d216360f87aad3ebc2f341cf4 | [
"MIT"
] | null | null | null | """ Stores connection info between game nodes (positions) """
| 27.5 | 65 | 0.6 | """ Stores connection info between game nodes (positions) """
from src import helper
class Connection(object):
""" Stores connection info between game nodes (positions) """
def __init__(self):
self.startX = None # int
self.startY = None # int
self.direction = None # int
self.e... | 0 | 0 | 0 | 826 | 0 | 0 | 0 | 1 | 46 |
23e58bb0d9ef68c360fef01a9ff673b39b9ffdb4 | 1,144 | py | Python | 30stats.py | joshua-blas/Homework | 68018fa06b70e38c71aeea80f4a185d8d50900ce | [
"MIT"
] | null | null | null | 30stats.py | joshua-blas/Homework | 68018fa06b70e38c71aeea80f4a185d8d50900ce | [
"MIT"
] | null | null | null | 30stats.py | joshua-blas/Homework | 68018fa06b70e38c71aeea80f4a185d8d50900ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Write a program that computes typical stats
# Count, Min, Max, Mean, Std. Dev, Median
# No, you cannot import the stats library!
import sys
import math
data = []
for x in sys.argv[1:]:
flt = float(x)
data.append(flt)
count = len(data)
#max and min
minimum = data[0]
maximum = data[0]
for... | 17.875 | 189 | 0.641608 | #!/usr/bin/env python3
# Write a program that computes typical stats
# Count, Min, Max, Mean, Std. Dev, Median
# No, you cannot import the stats library!
import sys
import math
data = []
for x in sys.argv[1:]:
flt = float(x)
data.append(flt)
count = len(data)
#max and min
minimum = data[0]
maximum = data[0]
for... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
42c578e2991eb39a3ede257cbe008f673c840c4c | 1,785 | py | Python | aws_ami_delete/__main__.py | lifeofguenter/aws-ami-delete | bdd314f736467ae3c8bbebc765c949fd980c3e8e | [
"MIT"
] | null | null | null | aws_ami_delete/__main__.py | lifeofguenter/aws-ami-delete | bdd314f736467ae3c8bbebc765c949fd980c3e8e | [
"MIT"
] | null | null | null | aws_ami_delete/__main__.py | lifeofguenter/aws-ami-delete | bdd314f736467ae3c8bbebc765c949fd980c3e8e | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
cli()
| 27.045455 | 90 | 0.587675 | import json
import os.path
import sys
from typing import List, Dict
import boto3
def delete_snapshots(ec2_client: boto3.client, block_device_mappings: List[Dict]) -> None:
for block_device_mapping in block_device_mappings:
snapshot_id = block_device_mapping['Ebs']['SnapshotId']
print(f'[aws-ami-d... | 0 | 0 | 0 | 0 | 0 | 1,616 | 0 | -29 | 157 |
91244c92359024a82cea9824d9671f8a9f005750 | 10,657 | py | Python | contentcuration/search/viewsets/contentnode.py | bjester/studio | b9bcc9f1f5b5c3e17b4ea5dc71dc553e8b0e5935 | [
"MIT"
] | null | null | null | contentcuration/search/viewsets/contentnode.py | bjester/studio | b9bcc9f1f5b5c3e17b4ea5dc71dc553e8b0e5935 | [
"MIT"
] | null | null | null | contentcuration/search/viewsets/contentnode.py | bjester/studio | b9bcc9f1f5b5c3e17b4ea5dc71dc553e8b0e5935 | [
"MIT"
] | null | null | null | import re
uuid_re = re.compile("([a-f0-9]{32})")
| 37.003472 | 105 | 0.644834 | import hashlib
import re
from django.core.cache import cache
from django.core.paginator import InvalidPage
from django.db.models import Case
from django.db.models import CharField
from django.db.models import F
from django.db.models import IntegerField
from django.db.models import OuterRef
from django.db.models import... | 0 | 0 | 0 | 9,343 | 0 | 0 | 0 | 595 | 665 |
2dbf8010e364edf988f97fff998c9a9bb101955e | 16,619 | py | Python | landlab/components/landslides/landslide.py | SiccarPoint/landlab | 4150db083a0426b3647e31ffa80dfefb5faa5a60 | [
"MIT"
] | 1 | 2015-08-17T19:29:50.000Z | 2015-08-17T19:29:50.000Z | landlab/components/landslides/landslide.py | csherwood-usgs/landlab | 4f43055060b544b34e71eba7062c09866ad93640 | [
"MIT"
] | 1 | 2016-03-02T01:24:41.000Z | 2016-03-02T01:24:41.000Z | landlab/components/landslides/landslide.py | csherwood-usgs/landlab | 4f43055060b544b34e71eba7062c09866ad93640 | [
"MIT"
] | 2 | 2017-07-03T20:21:13.000Z | 2018-09-06T23:58:19.000Z |
# %% Import Libraries
# %% Instantiate Object
| 44.199468 | 87 | 0.628919 |
# %% Import Libraries
from landlab import Component
from ...utils.decorators import use_file_name_or_kwds
import numpy as np
# %% Instantiate Object
class LandslideProbability(Component):
"""
Landlab component designed to calculate a probability of failure at
each grid node based on the in... | 0 | 1,632 | 0 | 14,800 | 0 | 0 | 0 | 37 | 94 |
b20ea0b58e52db3ee0246fdb58558d2834cf2129 | 9,539 | py | Python | naff/models/naff/extension.py | Discord-Snake-Pit/dis_snek | 45748467838b31d871a7166dbeb3aaa238ad94e3 | [
"MIT"
] | 64 | 2021-10-12T15:31:36.000Z | 2022-03-29T18:25:47.000Z | naff/models/naff/extension.py | Discord-Snake-Pit/dis_snek | 45748467838b31d871a7166dbeb3aaa238ad94e3 | [
"MIT"
] | 166 | 2021-10-10T16:27:52.000Z | 2022-03-30T09:04:54.000Z | naff/models/naff/extension.py | Discord-Snake-Pit/dis_snek | 45748467838b31d871a7166dbeb3aaa238ad94e3 | [
"MIT"
] | 34 | 2021-10-10T13:26:41.000Z | 2022-03-23T13:59:35.000Z | import logging
from typing import TYPE_CHECKING
import naff.models.naff as naff
from naff.client.const import logger_name
if TYPE_CHECKING:
log = logging.getLogger(logger_name)
__all__ = ("Extension",)
| 35.726592 | 200 | 0.605095 | import asyncio
import inspect
import logging
from typing import Awaitable, List, TYPE_CHECKING, Callable, Coroutine, Optional
import naff.models.naff as naff
from naff.client.const import logger_name, MISSING
from naff.client.utils.misc_utils import wrap_partial
from naff.models.naff.tasks import Task
if TYPE_CHECKIN... | 0 | 278 | 0 | 8,708 | 0 | 0 | 0 | 157 | 189 |
0c6597ddda99e0193eb4bf07b9ceeccc0ef15a4d | 7,741 | py | Python | tests/test_git.py | smartshark/inducingSHARK | 96f14e026310f8dcfbcff79b40310d079d9d04b8 | [
"Apache-2.0"
] | null | null | null | tests/test_git.py | smartshark/inducingSHARK | 96f14e026310f8dcfbcff79b40310d079d9d04b8 | [
"Apache-2.0"
] | null | null | null | tests/test_git.py | smartshark/inducingSHARK | 96f14e026310f8dcfbcff79b40310d079d9d04b8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
| 43.24581 | 148 | 0.570211 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import subprocess
import tempfile
import re
from inducingSHARK.util.git import CollectGit
class TestGit(unittest.TestCase):
def test_comment_regexes(self):
positives = [
'// single line comment',
'code // end of line ... | 0 | 0 | 0 | 7,563 | 0 | 0 | 0 | -4 | 135 |
03142241ad8c7b505c102e80bae5b0cce9f7f17f | 3,119 | py | Python | tests/test_points.py | GlenRice-NOAA/vyperdatum | 600fc2f16fe5a95dc3a26336d5d8cd23421fef5f | [
"CC0-1.0"
] | null | null | null | tests/test_points.py | GlenRice-NOAA/vyperdatum | 600fc2f16fe5a95dc3a26336d5d8cd23421fef5f | [
"CC0-1.0"
] | 6 | 2020-12-04T18:07:12.000Z | 2020-12-22T16:59:07.000Z | tests/test_points.py | GlenRice-NOAA/vyperdatum | 600fc2f16fe5a95dc3a26336d5d8cd23421fef5f | [
"CC0-1.0"
] | 3 | 2020-12-04T18:04:25.000Z | 2021-06-24T15:29:11.000Z | from vyperdatum.vdatum_validation import vdatum_answers
gvc = VyperCore()
data_folder = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data')
vdatum_answer = vdatum_answers[gvc.vdatum.vdatum_version]
| 33.537634 | 119 | 0.73453 | from pytest import approx
from vyperdatum.points import *
from vyperdatum.vdatum_validation import vdatum_answers
gvc = VyperCore()
data_folder = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data')
vdatum_answer = vdatum_answers[gvc.vdatum.vdatum_version]
def test_points_setup():
# these tests assu... | 0 | 0 | 0 | 0 | 0 | 2,556 | 0 | 14 | 321 |
9b60a8827d52ea27929cc99e2e44e9f8ab4cc09c | 2,886 | py | Python | app/api/routers/gallery.py | susieward/python-image-editor | dd7b1a32973fc0523d4e459ad864b5c75e659205 | [
"MIT"
] | 2 | 2021-05-16T16:17:13.000Z | 2021-12-13T06:35:57.000Z | app/api/routers/gallery.py | susieward/python-image-editor | dd7b1a32973fc0523d4e459ad864b5c75e659205 | [
"MIT"
] | null | null | null | app/api/routers/gallery.py | susieward/python-image-editor | dd7b1a32973fc0523d4e459ad864b5c75e659205 | [
"MIT"
] | 1 | 2021-12-13T06:36:10.000Z | 2021-12-13T06:36:10.000Z |
from fastapi import APIRouter
from fastapi.templating import Jinja2Templates
templates = Jinja2Templates(directory = "app/templates")
router = APIRouter()
| 35.195122 | 145 | 0.742897 | from uuid import UUID
import json
from fastapi import APIRouter, Path, Body, Depends, HTTPException, Request, Response
from fastapi.responses import StreamingResponse
from fastapi.templating import Jinja2Templates
from starlette import status
from app.api.dependencies import image_service_dep, image_file_service_dep
... | 0 | 2,063 | 0 | 0 | 0 | 0 | 0 | 299 | 361 |
1b2d2cb8a5c047d3318dc1a921deaa6afd5a86b9 | 1,533 | py | Python | setup.py | epwalsh/python-registrable | bcd5c62556725d9052a290712dd190021c0d5e32 | [
"Apache-2.0"
] | 9 | 2019-11-26T21:36:46.000Z | 2021-11-12T06:45:15.000Z | setup.py | epwalsh/python-registrable | bcd5c62556725d9052a290712dd190021c0d5e32 | [
"Apache-2.0"
] | 4 | 2019-11-26T23:43:54.000Z | 2020-04-20T20:46:07.000Z | setup.py | epwalsh/python-registrable | bcd5c62556725d9052a290712dd190021c0d5e32 | [
"Apache-2.0"
] | 2 | 2021-01-06T21:10:03.000Z | 2021-09-17T07:30:28.000Z | from typing import Dict, Any
from setuptools import setup, find_packages
VERSION: Dict[str, Any] = {}
with open("registrable/version.py", "r") as version_file:
exec(version_file.read(), VERSION)
setup(
name="registrable",
version=VERSION["VERSION"],
description="Python module for registering and ins... | 34.066667 | 83 | 0.646445 | from typing import List, Dict, Any
from setuptools import setup, find_packages
VERSION: Dict[str, Any] = {}
with open("registrable/version.py", "r") as version_file:
exec(version_file.read(), VERSION)
def read_reqs_file(path: str) -> List[str]:
reqs: List[str] = []
with open(path, "r") as reqs_file:
... | 0 | 0 | 0 | 0 | 0 | 269 | 0 | 6 | 23 |
93ee180ff520010d728a053e6f2025e62ad211f4 | 2,331 | py | Python | pyguymer3/geo/buffer_LinearRing.py | Guymer/PyGuymer3 | c2e2788a8b65854fa1e84d6ba5017fb2544fc195 | [
"Apache-2.0"
] | 9 | 2019-05-14T08:45:53.000Z | 2021-11-23T09:38:56.000Z | pyguymer3/geo/buffer_LinearRing.py | Guymer/PyGuymer3 | c2e2788a8b65854fa1e84d6ba5017fb2544fc195 | [
"Apache-2.0"
] | 2 | 2019-11-19T17:23:11.000Z | 2020-10-11T12:43:35.000Z | pyguymer3/geo/buffer_LinearRing.py | Guymer/PyGuymer3 | c2e2788a8b65854fa1e84d6ba5017fb2544fc195 | [
"Apache-2.0"
] | 2 | 2019-11-17T10:13:51.000Z | 2020-05-26T19:35:33.000Z | def buffer_LinearRing(ring, dist, kwArgCheck = None, debug = False, fill = 1.0, nang = 19, simp = 0.1, tol = 1.0e-10):
"""Buffer a LinearRing
This function reads in a LinearRing that exists on the surface of the Earth
and returns a [Multi]Polygon of the same LinearRing buffered by a constant
distance (... | 41.625 | 142 | 0.670528 | def buffer_LinearRing(ring, dist, kwArgCheck = None, debug = False, fill = 1.0, nang = 19, simp = 0.1, tol = 1.0e-10):
"""Buffer a LinearRing
This function reads in a LinearRing that exists on the surface of the Earth
and returns a [Multi]Polygon of the same LinearRing buffered by a constant
distance (... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b72c8d017c7f698c5283e03bbc156e32141c588 | 1,901 | py | Python | samples/demo.py | logachev/custom-azure-data-encryption | f00e45124f5c01ce3bc3dca1818ba5bb932bb4bc | [
"MIT"
] | 5 | 2018-07-09T02:16:56.000Z | 2019-04-02T16:06:03.000Z | samples/demo.py | logachev/custom-azure-data-encryption | f00e45124f5c01ce3bc3dca1818ba5bb932bb4bc | [
"MIT"
] | 2 | 2018-07-05T16:53:24.000Z | 2019-03-18T23:27:07.000Z | samples/demo.py | logachev/custom-azure-data-encryption | f00e45124f5c01ce3bc3dca1818ba5bb932bb4bc | [
"MIT"
] | 3 | 2018-10-29T17:17:40.000Z | 2019-03-13T18:41:08.000Z | import os
from azure_encryption_helper import Encryptor
# Create ServicePrincipalCredentials object using your SP
# You can use MSIAuthentication if running on Azure VM
if 'USE_MSI' in os.environ.keys():
from msrestazure.azure_active_directory import MSIAuthentication
credentials = MSIAuthentication(resource=... | 39.604167 | 107 | 0.7596 | import os
from azure_encryption_helper import Encryptor
# Create ServicePrincipalCredentials object using your SP
# You can use MSIAuthentication if running on Azure VM
if 'USE_MSI' in os.environ.keys():
from msrestazure.azure_active_directory import MSIAuthentication
credentials = MSIAuthentication(resource=... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c42da09c1c7850d9754f969dc536b17cb523d38 | 2,126 | py | Python | social/backends/douban.py | dongweiming/flask_reveal | 739a0c49d2fbf5a36c7b9cb11ec1303b9c8b0e83 | [
"BSD-3-Clause"
] | 41 | 2015-01-31T08:23:04.000Z | 2021-03-20T08:55:23.000Z | social/backends/douban.py | dongweiming/flask_reveal | 739a0c49d2fbf5a36c7b9cb11ec1303b9c8b0e83 | [
"BSD-3-Clause"
] | null | null | null | social/backends/douban.py | dongweiming/flask_reveal | 739a0c49d2fbf5a36c7b9cb11ec1303b9c8b0e83 | [
"BSD-3-Clause"
] | 19 | 2015-01-17T11:50:35.000Z | 2019-05-01T22:49:02.000Z | """
Douban OAuth support.
This adds support for Douban OAuth service. An application must
be registered first on douban.com and the settings DOUBAN_CONSUMER_KEY
and DOUBAN_CONSUMER_SECRET must be defined with they corresponding
values.
By default account id is stored in extra_data field, check OAuthBackend
class for ... | 34.852459 | 76 | 0.643932 | """
Douban OAuth support.
This adds support for Douban OAuth service. An application must
be registered first on douban.com and the settings DOUBAN_CONSUMER_KEY
and DOUBAN_CONSUMER_SECRET must be defined with they corresponding
values.
By default account id is stored in extra_data field, check OAuthBackend
class for ... | 0 | 0 | 0 | 1,668 | 0 | 0 | 0 | 35 | 68 |
2282cac04c70171ca3c7294cd54b6f3efcc8277e | 7,572 | py | Python | src/code_submission/1_aister/arma_model.py | NehzUx/AutoGraph-KDDCup2020 | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | 1 | 2021-12-06T14:59:55.000Z | 2021-12-06T14:59:55.000Z | src/code_submission/1_aister/arma_model.py | NehzUx/AutoGraph-Benchmark | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | null | null | null | src/code_submission/1_aister/arma_model.py | NehzUx/AutoGraph-Benchmark | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from util import get_logger
VERBOSITY_LEVEL = 'INFO'
LOGGER = get_logger(VERBOSITY_LEVEL, __file__)
| 35.383178 | 138 | 0.606841 | # -*- coding: utf-8 -*-
import torch
import torch.nn.functional as F
from torch.nn import Linear, Embedding
from torch_geometric.nn import ARMAConv
from torch_geometric.data import Data
from util import timeclass,get_logger
import pandas as pd
import numpy as np
import random
import time
import copy
from process_data ... | 78 | 4,447 | 0 | 2,638 | 0 | 0 | 0 | 42 | 288 |
eb07c798ac7d4983e1a215d63e63866b4bb3f7a8 | 35,634 | py | Python | HoloPortrait.py | jankais3r/HoloPortrait | 0acf9c250d26a78452015503b7befbf5221cc2ce | [
"MIT",
"BSD-3-Clause"
] | 7 | 2020-11-22T17:47:31.000Z | 2022-03-04T18:56:28.000Z | HoloPortrait.py | jankais3r/HoloPortrait | 0acf9c250d26a78452015503b7befbf5221cc2ce | [
"MIT",
"BSD-3-Clause"
] | null | null | null | HoloPortrait.py | jankais3r/HoloPortrait | 0acf9c250d26a78452015503b7befbf5221cc2ce | [
"MIT",
"BSD-3-Clause"
] | null | null | null | import io
import os
import ui
import sys
import time
import Image
import numpy
import photos
import shutil
import zipfile
import ImageOps
import objc_util
import matplotlib.cm
import urllib.request
try:
import diff_match_patch
except:
for pth in sys.path:
if pth[-15:] == 'site-packages-3':
sp3 = pth + '/'
with ... | 34.462282 | 390 | 0.671269 | import io
import os
import ui
import sys
import time
import Image
import numpy
import photos
import shutil
import socket
import console
import zipfile
import ImageOps
import objc_util
import matplotlib.cm
import urllib.request
from threading import Event, Thread
from socketserver import ThreadingMixIn
from http.server ... | 0 | 905 | 0 | 5,630 | 0 | 1,216 | 0 | 54 | 339 |
e032789574242eaaab8d1c2daf414730602c38a2 | 530 | py | Python | core/management/commands/create_test_paciente_data.py | cluster311/ggg | 262173c66fe40ada30083d439a79f16f841f5772 | [
"BSD-3-Clause"
] | 6 | 2020-03-16T02:51:16.000Z | 2020-11-10T00:58:01.000Z | core/management/commands/create_test_paciente_data.py | cluster311/ggg | 262173c66fe40ada30083d439a79f16f841f5772 | [
"BSD-3-Clause"
] | 204 | 2019-09-19T02:00:57.000Z | 2022-02-10T10:48:52.000Z | core/management/commands/create_test_paciente_data.py | cluster311/ggg | 262173c66fe40ada30083d439a79f16f841f5772 | [
"BSD-3-Clause"
] | 3 | 2019-09-16T22:59:24.000Z | 2022-03-21T22:52:44.000Z | # !/usr/bin/python
| 27.894737 | 83 | 0.724528 | # !/usr/bin/python
from django.core.management.base import BaseCommand
from django.conf import settings
from django.db import transaction
import sys
import pyexcel as pe
from core.base_permission import create_test_paciente_data
class Command(BaseCommand):
help = """Crear los pacientes"""
def handle(self, ... | 0 | 0 | 0 | 275 | 0 | 0 | 0 | 78 | 157 |
0fb38357f8089b0434cd80cd51d22e6269197c02 | 3,248 | py | Python | lassonet/plot.py | ilemhadri/lassoNet | adf0aaf7131a57d8427ae40db7a19e608d6809a4 | [
"MIT"
] | 1 | 2020-05-28T02:33:00.000Z | 2020-05-28T02:33:00.000Z | lassonet/plot.py | ilemhadri/lassoNet | adf0aaf7131a57d8427ae40db7a19e608d6809a4 | [
"MIT"
] | null | null | null | lassonet/plot.py | ilemhadri/lassoNet | adf0aaf7131a57d8427ae40db7a19e608d6809a4 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from .utils import eval_on_path
def plot_path(model, path, X_test, y_test, *, score_function=None):
"""
Plot the evolution of the model on the path, namely:
- lambda
- number of selected variables
- score
Parameters
==========
model : LassoNetClassifi... | 26.193548 | 84 | 0.599754 | import matplotlib.pyplot as plt
from .interfaces import BaseLassoNetCV
from .utils import confidence_interval, eval_on_path
def plot_path(model, path, X_test, y_test, *, score_function=None):
"""
Plot the evolution of the model on the path, namely:
- lambda
- number of selected variables
- score
... | 0 | 0 | 0 | 0 | 0 | 1,822 | 0 | 38 | 45 |
91c30f759617a961c4e361300d5e74a768d226e7 | 250 | py | Python | FileReader.py | SC-CEBD-1160/python-homework | ce4d8cec6e4077ae87f7886a70cd2e9b4bceea9b | [
"MIT"
] | null | null | null | FileReader.py | SC-CEBD-1160/python-homework | ce4d8cec6e4077ae87f7886a70cd2e9b4bceea9b | [
"MIT"
] | null | null | null | FileReader.py | SC-CEBD-1160/python-homework | ce4d8cec6e4077ae87f7886a70cd2e9b4bceea9b | [
"MIT"
] | null | null | null | import numpy
data = numpy.genfromtxt(fname="housing.data")
################# Advanced
for line in data:
print(*line)
################# Reach 1
for line in data:
list = line.tolist()
strList = [str(i) for i in list]
print(strList)
| 16.666667 | 45 | 0.568 | import numpy
data = numpy.genfromtxt(fname="housing.data")
################# Advanced
for line in data:
print(*line)
################# Reach 1
for line in data:
list = line.tolist()
strList = [str(i) for i in list]
print(strList)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0f58e88aaabefc0b08a28dda07a7046980d8c0bd | 262 | py | Python | src/iert_news/migrations/0005_auto_20190211_1640.py | MetricsGroup/IERT-Webapp | 9e43f1775767412898f9340b9cc84196eb4abfdb | [
"MIT"
] | 3 | 2019-04-25T11:19:22.000Z | 2020-05-10T20:41:12.000Z | src/iert_news/migrations/0005_auto_20190211_1640.py | MetricsGroup/IERT-Webapp | 9e43f1775767412898f9340b9cc84196eb4abfdb | [
"MIT"
] | 5 | 2020-06-17T05:16:27.000Z | 2022-01-13T02:15:56.000Z | src/iert_news/migrations/0005_auto_20190211_1640.py | MetricsGroup/IERT-Webapp | 9e43f1775767412898f9340b9cc84196eb4abfdb | [
"MIT"
] | 3 | 2020-06-13T10:40:27.000Z | 2021-10-13T15:45:50.000Z | # Generated by Django 2.1.5 on 2019-02-11 16:40
| 23.818182 | 74 | 0.736641 | # Generated by Django 2.1.5 on 2019-02-11 16:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("iert_news", "0004_auto_20190211_1631")]
operations = [migrations.RenameModel(old_name="news", new_name="new")]
| 0 | 0 | 0 | 156 | 0 | 0 | 0 | 11 | 46 |
c440c72720535471c02efb938c1ec984bd2edd8a | 1,053 | py | Python | tools/check-char.py | metabasenet/metabasenet | e9bc89b22c11981bcf1d71b63b9b66df3a4e54e1 | [
"MIT"
] | 1 | 2021-09-13T07:26:32.000Z | 2021-09-13T07:26:32.000Z | tools/check-char.py | IBnetCouncil/ibrio | 4d726c6dc10b8a3d2d4247eeb347d937dfd730a0 | [
"MIT"
] | 24 | 2020-09-22T02:38:39.000Z | 2021-01-08T07:40:31.000Z | tools/check-char.py | IBnetCouncil/ibrio | 4d726c6dc10b8a3d2d4247eeb347d937dfd730a0 | [
"MIT"
] | 3 | 2020-09-19T01:40:14.000Z | 2020-12-22T02:11:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
black_list_pattern = r'[\u4e00-\u9fff]+|[\uff01-\uff5e]+|[\u201c\u201d\u300a\u300b\u3010\u3011\uff5b\uff5d\uff1b\uff1a\u3002\uff0c\u3001\uff1f]+'
white_list_pattern = r'[^\s\x21-\xE7]+'
if __name__ == '__main__':
main() | 25.071429 | 145 | 0.553656 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import re
import codecs
black_list_pattern = r'[\u4e00-\u9fff]+|[\uff01-\uff5e]+|[\u201c\u201d\u300a\u300b\u3010\u3011\uff5b\uff5d\uff1b\uff1a\u3002\uff0c\u3001\uff1f]+'
white_list_pattern = r'[^\s\x21-\xE7]+'
def check_files_is_valid(path):
f... | 0 | 0 | 0 | 0 | 0 | 685 | 0 | -43 | 135 |
aff30ac2e90b5744ae16a617d0c7ff4f47f3f384 | 1,654 | py | Python | src/test_data.py | Okabe-Junya/AtCoder_library | ba4f694e386a67a8b6d5fd92aa8e69d359c3ac6f | [
"MIT"
] | null | null | null | src/test_data.py | Okabe-Junya/AtCoder_library | ba4f694e386a67a8b6d5fd92aa8e69d359c3ac6f | [
"MIT"
] | null | null | null | src/test_data.py | Okabe-Junya/AtCoder_library | ba4f694e386a67a8b6d5fd92aa8e69d359c3ac6f | [
"MIT"
] | null | null | null |
# --------------------------------------------------
# data_structure_lib
#
#
#
"""
# BST
def test_BST():
l = [randint(1, 100) for _ in range(20)]
print("sorted list:", sorted(l))
tree = data_structure_lib.BST(l)
if tree.search_min() != min(l):
print("search_min test failed")
... | 20.419753 | 58 | 0.622733 | import sys
from math import gcd as gcd_math
from math import factorial as factorial_math
from scipy.special import perm
from scipy.special import comb
from random import randint
import data_structure_lib
import math_lib
# --------------------------------------------------
# data_structure_lib
def init():
test_m... | 81 | 0 | 0 | 0 | 0 | 819 | 0 | 44 | 289 |
8f96c72394c4c0b3edfa6474f426c39e8b7108a4 | 934 | py | Python | feature_detection/scripts/read_yaml_config.py | vortexntnu/Vortex-CV | eb5e4836eeb750551807760a2eef3a0fb7daf7ff | [
"MIT"
] | 2 | 2022-01-26T11:13:38.000Z | 2022-02-22T21:18:30.000Z | feature_detection/scripts/read_yaml_config.py | vortexntnu/Vortex-CV | eb5e4836eeb750551807760a2eef3a0fb7daf7ff | [
"MIT"
] | 42 | 2022-01-25T17:10:43.000Z | 2022-03-29T18:41:34.000Z | feature_detection/scripts/read_yaml_config.py | vortexntnu/Vortex_CV | eb5e4836eeb750551807760a2eef3a0fb7daf7ff | [
"MIT"
] | null | null | null | def read_yaml_file(filename):
"""
@parameters filename, filename of the yaml file
@returns dictionary of each parameter with the corresponding value.
"""
parameters = {}
with open(filename) as file:
lines = file.readlines()
for line in lines:
line = line.strip()
... | 27.470588 | 71 | 0.536403 | def read_yaml_file(filename):
"""
@parameters filename, filename of the yaml file
@returns dictionary of each parameter with the corresponding value.
"""
parameters = {}
with open(filename) as file:
lines = file.readlines()
for line in lines:
line = line.strip()
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
452014e75da24227edaba5652a7b4ea2fcc4072e | 848 | py | Python | 051 - 100/ex084.py | SocrammBR/Desafios-Python-CursoEmVideo | bd2454a24134500343ece91b936c169d3a66f89e | [
"MIT"
] | null | null | null | 051 - 100/ex084.py | SocrammBR/Desafios-Python-CursoEmVideo | bd2454a24134500343ece91b936c169d3a66f89e | [
"MIT"
] | null | null | null | 051 - 100/ex084.py | SocrammBR/Desafios-Python-CursoEmVideo | bd2454a24134500343ece91b936c169d3a66f89e | [
"MIT"
] | null | null | null | tot = 0
nomep = []
nomel = []
dadost = []
pesop = 0
pesol = 100000000000000000000 ** 10000
while True:
dadost.append(input('Nome: '))
dadost.append(float(input('Peso: ')))
tot += 1
if dadost[1] >= pesop:
if dadost[1] == pesop:
nomep.append(dadost[0])
elif dadost[1] > pesop:
nomep.clear()
... | 26.5 | 67 | 0.610849 | tot = 0
nomep = []
nomel = []
dadost = []
pesop = 0
pesol = 100000000000000000000 ** 10000
while True:
dadost.append(input('Nome: '))
dadost.append(float(input('Peso: ')))
tot += 1
if dadost[1] >= pesop:
if dadost[1] == pesop:
nomep.append(dadost[0])
elif dadost[1] > pesop:
nomep.clear()
... | 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4eef7dda45afa19f92ea49f6fc2b53562fe07dd9 | 4,587 | py | Python | scraper.py | brandiny/ncdaily-opensource | db9e2f9d861537c61660855289438693843afcd9 | [
"MIT"
] | 4 | 2021-09-01T01:36:42.000Z | 2022-01-17T23:16:02.000Z | scraper.py | brandiny/ncdaily-opensource | db9e2f9d861537c61660855289438693843afcd9 | [
"MIT"
] | null | null | null | scraper.py | brandiny/ncdaily-opensource | db9e2f9d861537c61660855289438693843afcd9 | [
"MIT"
] | null | null | null | """ scraper.py
Handles the webscraping of the app.
Key variables
- scraper.archive == Array of the titles of old notices
- scraper.notices_5 == Array of Meetings/Practices (has ALL INFORMATION)
- scraper.notices_3 == Array of Notices (has ALL INFORMATION BUT date and location)
Each is explained further be... | 32.764286 | 120 | 0.589056 | """ scraper.py
Handles the webscraping of the app.
Key variables
- scraper.archive == Array of the titles of old notices
- scraper.notices_5 == Array of Meetings/Practices (has ALL INFORMATION)
- scraper.notices_3 == Array of Notices (has ALL INFORMATION BUT date and location)
Each is explained further be... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c101ffba1cf6cbce02fe40d568cbc344dbac9fc5 | 56,238 | py | Python | mouse/utils.py | vananhlebarca/markerless-mice-tracking | 3bbdd2d825f4ef493fe6f07af90ab7eaf0a4c825 | [
"MIT"
] | null | null | null | mouse/utils.py | vananhlebarca/markerless-mice-tracking | 3bbdd2d825f4ef493fe6f07af90ab7eaf0a4c825 | [
"MIT"
] | null | null | null | mouse/utils.py | vananhlebarca/markerless-mice-tracking | 3bbdd2d825f4ef493fe6f07af90ab7eaf0a4c825 | [
"MIT"
] | null | null | null | import mrcnn.model as modellib
import os
import sys
import cv2
import random
import numpy as np
import pandas as pd
import deeplabcut
import json
import skimage
import skimage.io
from skimage.util import img_as_ubyte, img_as_float
from skimage import morphology, measure, filters
from shutil import copyfile
from skimage... | 38.309264 | 147 | 0.58825 | import mrcnn.model as modellib
import os
import sys
import cv2
import random
import numpy as np
import pandas as pd
import deeplabcut
import json
import skimage
import skimage.io
from skimage.util import img_as_ubyte, img_as_float
from skimage import morphology, measure, filters
from shutil import copyfile
from skimage... | 0 | 0 | 0 | 0 | 0 | 1,713 | 0 | -19 | 113 |
33920516b169fb71e5866b282ff80151949f91b6 | 2,763 | py | Python | net/utils/densenet_efficient.py | wenyh1616/motif-stgcn | c6aac161f93c3943c9e66dfe9bb5e0f4bb663b95 | [
"BSD-2-Clause"
] | 19 | 2019-11-06T03:15:17.000Z | 2021-12-07T07:05:02.000Z | net/utils/densenet_efficient.py | wenyh1616/motif-stgcn | c6aac161f93c3943c9e66dfe9bb5e0f4bb663b95 | [
"BSD-2-Clause"
] | 2 | 2021-02-05T05:10:05.000Z | 2021-07-05T01:44:19.000Z | net/utils/densenet_efficient.py | wenyh1616/motif-stgcn | c6aac161f93c3943c9e66dfe9bb5e0f4bb663b95 | [
"BSD-2-Clause"
] | 3 | 2020-08-01T13:19:44.000Z | 2021-04-04T07:43:57.000Z | import torch.nn as nn
| 40.632353 | 146 | 0.663409 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.checkpoint as cp
def _bn_function_factory(norm, relu, conv):
def bn_function(*inputs):
concated_features = torch.cat(inputs, 1)
bottleneck_output = conv(relu(norm(concated_features)))
return bottleneck_ou... | 0 | 0 | 0 | 2,342 | 0 | 223 | 0 | 15 | 158 |
c1dfa40bfeb1383da92f9ff0b3a22af6d24d348c | 1,221 | py | Python | commerce/auctions/urls.py | VincVader/Project-2-commerce | 213440e01f9ed680a4e945bf3a282eac9215a43b | [
"MIT"
] | 1 | 2021-07-26T14:23:30.000Z | 2021-07-26T14:23:30.000Z | commerce/auctions/urls.py | VincVader/Project-2-commerce | 213440e01f9ed680a4e945bf3a282eac9215a43b | [
"MIT"
] | null | null | null | commerce/auctions/urls.py | VincVader/Project-2-commerce | 213440e01f9ed680a4e945bf3a282eac9215a43b | [
"MIT"
] | null | null | null | from django.urls import path
from django.conf import settings
from django.contrib.staticfiles.urls import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from . import views
urlpatterns = [
path("", views.index, name="index"),
path("login", views.login_view, name="login"),
... | 43.607143 | 84 | 0.734644 | from django.urls import path
from django.conf import settings
from django.contrib.staticfiles.urls import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from . import views
urlpatterns = [
path("", views.index, name="index"),
path("login", views.login_view, name="login"),
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1fc00569bcb5d56d0c9f7e4467c2641aa38205fe | 555 | py | Python | spiketag/view/tests/test_cluster_view.py | aliddell/spiketag | f5600126c2c6c9be319e8b808d51ea33be843909 | [
"BSD-3-Clause"
] | 4 | 2018-04-23T18:08:39.000Z | 2020-03-10T19:06:28.000Z | spiketag/view/tests/test_cluster_view.py | aliddell/spiketag | f5600126c2c6c9be319e8b808d51ea33be843909 | [
"BSD-3-Clause"
] | 69 | 2017-02-17T19:27:52.000Z | 2022-03-30T04:06:53.000Z | spiketag/view/tests/test_cluster_view.py | aliddell/spiketag | f5600126c2c6c9be319e8b808d51ea33be843909 | [
"BSD-3-Clause"
] | 5 | 2017-02-01T16:11:32.000Z | 2021-02-05T20:10:43.000Z | from spiketag.view import cluster_view
import numpy as np
if __name__ == '__main__':
cluview = cluster_view()
group_No = 40
sorting_status = np.random.randint(low=0, high=3, size=group_No) # 0: not ready; 1: ready; 2: done
print(sorting_status)
cluview.set_data(group_No=group_No, sorting_statu... | 29.210526 | 106 | 0.693694 | from spiketag.view import cluster_view
import numpy as np
if __name__ == '__main__':
cluview = cluster_view()
group_No = 40
sorting_status = np.random.randint(low=0, high=3, size=group_No) # 0: not ready; 1: ready; 2: done
print(sorting_status)
cluview.set_data(group_No=group_No, sorting_statu... | 0 | 85 | 0 | 0 | 0 | 0 | 0 | 0 | 27 |
07fea23131bb591247d4c92b24105fc5a0368f83 | 5,260 | py | Python | Lib/pagebot/elements/ruler.py | bghryct/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 68 | 2018-10-22T22:42:58.000Z | 2022-03-19T11:07:31.000Z | Lib/pagebot/elements/ruler.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 97 | 2017-07-10T23:49:30.000Z | 2018-10-03T08:17:55.000Z | Lib/pagebot/elements/ruler.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 9 | 2017-07-11T09:59:00.000Z | 2018-09-12T11:59:30.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# ... | 36.783217 | 96 | 0.556654 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# ... | 0 | 0 | 0 | 4,460 | 0 | 0 | 0 | 116 | 133 |
d449b56182c788498d5a1c012190763e4025b58e | 1,160 | py | Python | scripts/script_aes_neural_network_parameters.py | AISyLab/AISY_Framework | 51af3a639d6dee4c970859f5cd95f35f1db26dcc | [
"MIT"
] | 12 | 2021-03-26T08:17:07.000Z | 2022-01-05T22:31:19.000Z | scripts/script_aes_neural_network_parameters.py | AISyLab/AISY_Framework | 51af3a639d6dee4c970859f5cd95f35f1db26dcc | [
"MIT"
] | 1 | 2021-03-26T09:11:34.000Z | 2021-03-27T01:32:35.000Z | scripts/script_aes_neural_network_parameters.py | AISyLab/AISY_Framework | 51af3a639d6dee4c970859f5cd95f35f1db26dcc | [
"MIT"
] | 2 | 2021-03-14T01:35:49.000Z | 2021-03-31T06:43:01.000Z | import aisy_sca
aisy = aisy_sca.Aisy()
aisy.set_resources_root_folder(resources_root_folder)
aisy.set_database_root_folder(databases_root_folder)
aisy.set_datasets_root_folder(datasets_root_folder)
aisy.set_database_name("database_ascad.sqlite")
aisy.set_dataset(datasets_dict["ascad-variable.h5"])
aisy.set_aes_leaka... | 35.151515 | 93 | 0.756034 | import aisy_sca
from app import *
from custom.custom_models.neural_networks import *
def mlp(classes, number_of_samples, neuron, layer, activation, learning_rate):
model = Sequential(name="my_mlp")
for l_i in range(layer):
if l_i == 0:
model.add(Dense(neuron, activation=activation, input_s... | 0 | 0 | 0 | 0 | 0 | 578 | 0 | 25 | 67 |
b26d02c3d0efb754c3b3a24b7d1419f391088747 | 464 | py | Python | examples/script_archive/04a_probo_backend_minimize.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 33 | 2020-08-30T16:22:35.000Z | 2022-02-26T13:48:32.000Z | examples/script_archive/04a_probo_backend_minimize.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2021-01-18T19:46:43.000Z | 2021-03-24T09:59:14.000Z | examples/script_archive/04a_probo_backend_minimize.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2020-08-25T17:02:15.000Z | 2021-04-21T16:40:44.000Z | from tuun.backend import ProboBackend
model_config = {'name': 'simplegp', 'ls': 3.0, 'alpha': 1.5, 'sigma': 1e-5}
acqfunction_config = {'name': 'default', 'acq_str': 'ei'}
acqoptimizer_config = {'name': 'default', 'max_iter': 200}
domain_config = {'name': 'real', 'min_max': [(-5, 5)]}
f = lambda x: x[0] ** 4 - x[0] *... | 38.666667 | 87 | 0.663793 | from tuun.backend import ProboBackend
model_config = {'name': 'simplegp', 'ls': 3.0, 'alpha': 1.5, 'sigma': 1e-5}
acqfunction_config = {'name': 'default', 'acq_str': 'ei'}
acqoptimizer_config = {'name': 'default', 'max_iter': 200}
domain_config = {'name': 'real', 'min_max': [(-5, 5)]}
f = lambda x: x[0] ** 4 - x[0] *... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
17689d329656c94612181a0434fd03dc2cf7df6e | 440 | py | Python | test.py | nerophung/japanese-fake-text | 96576bdba3482923da94eeee99554c46c2ef5a54 | [
"MIT"
] | null | null | null | test.py | nerophung/japanese-fake-text | 96576bdba3482923da94eeee99554c46c2ef5a54 | [
"MIT"
] | null | null | null | test.py | nerophung/japanese-fake-text | 96576bdba3482923da94eeee99554c46c2ef5a54 | [
"MIT"
] | 1 | 2022-01-18T04:29:50.000Z | 2022-01-18T04:29:50.000Z | from jpntextgen.engine import Engine
engine = Engine()
print(engine.get_address())
print(engine.get_full_name())
print(engine.get_date())
print(engine.get_general_text())
print(engine.get_additional_info())
print(engine.get_email())
print(engine.get_url())
print(engine.get_eng_katakana())
print(engine.get_phone_numbe... | 25.882353 | 36 | 0.795455 | from jpntextgen.engine import Engine
engine = Engine()
print(engine.get_address())
print(engine.get_full_name())
print(engine.get_date())
print(engine.get_general_text())
print(engine.get_additional_info())
print(engine.get_email())
print(engine.get_url())
print(engine.get_eng_katakana())
print(engine.get_phone_numbe... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6eab66787e84eb8aae4d1008158ae1eee5cddb4d | 7,270 | py | Python | drlnd/core/pipeline/train.py | yycho0108/DRLND_Core | 79117bd933b6cbf9f74e3356f5e1b8b156173cdc | [
"MIT"
] | null | null | null | drlnd/core/pipeline/train.py | yycho0108/DRLND_Core | 79117bd933b6cbf9f74e3356f5e1b8b156173cdc | [
"MIT"
] | null | null | null | drlnd/core/pipeline/train.py | yycho0108/DRLND_Core | 79117bd933b6cbf9f74e3356f5e1b8b156173cdc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from drlnd.core.common.logger import get_default_logger
logger = get_default_logger()
| 35.463415 | 92 | 0.64608 | #!/usr/bin/env python3
import numpy as np
import os
import time
import gym
import json
import sys
import functools
from tqdm import tqdm, tnrange
from drlnd.core.common.util import is_notebook, count_boundaries
from drlnd.core.agents.base_agent import AgentBase
from drlnd.core.common.ring_buffer import ContiguousRing... | 0 | 0 | 0 | 515 | 0 | 6,041 | 0 | 197 | 403 |
56ca6cd44551c234bf3fa5b39dce129da19ceb88 | 6,117 | py | Python | bin/v06_43_00-UpdateGeometryToLArCoreAlg.py | lgarren/larsoft | bdceafc0cde6241f6d60e91cc44e5c560c60a4e7 | [
"Apache-2.0"
] | 3 | 2020-02-10T19:20:35.000Z | 2021-11-03T13:06:49.000Z | bin/v06_43_00-UpdateGeometryToLArCoreAlg.py | lgarren/larsoft | bdceafc0cde6241f6d60e91cc44e5c560c60a4e7 | [
"Apache-2.0"
] | 28 | 2019-07-30T14:59:19.000Z | 2022-01-14T16:47:25.000Z | bin/v06_43_00-UpdateGeometryToLArCoreAlg.py | lgarren/larsoft | bdceafc0cde6241f6d60e91cc44e5c560c60a4e7 | [
"Apache-2.0"
] | 20 | 2019-08-19T17:18:37.000Z | 2021-06-07T15:57:37.000Z | #!/usr/bin/env python2
#
# This script changes C++ code, CMake files and FHiCL configuration to use
# larcorealg instead of larcore for geometrye
#
# Change log:
# 20170703 (petrillo@fnal.gov)
# original version
#
import sys
import SerialSubstitution
from SerialSubstitution import AddProcessor, RunSubstitutor
##... | 66.48913 | 130 | 0.594409 | #!/usr/bin/env python2
#
# This script changes C++ code, CMake files and FHiCL configuration to use
# larcorealg instead of larcore for geometrye
#
# Change log:
# 20170703 (petrillo@fnal.gov)
# original version
#
import sys, re
import SerialSubstitution
from SerialSubstitution import AddProcessor, RunSubstitutor
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 |
5dbe38ae1f40bd57abcb02a077877d0da7b3a766 | 3,929 | py | Python | flocker/docs/version_extensions.py | wallnerryan/flocker-profiles | bcd3ced8edf4af86a68070ff6a714c45f9f4913b | [
"Apache-2.0"
] | null | null | null | flocker/docs/version_extensions.py | wallnerryan/flocker-profiles | bcd3ced8edf4af86a68070ff6a714c45f9f4913b | [
"Apache-2.0"
] | null | null | null | flocker/docs/version_extensions.py | wallnerryan/flocker-profiles | bcd3ced8edf4af86a68070ff6a714c45f9f4913b | [
"Apache-2.0"
] | null | null | null | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Sphinx extension to add directives to allow files and code to include the
latest installable version of Flocker.
"""
import importlib
from flocker import __version__ as version
from flocker.common.version import get_installable_version
PLACEHOLDER = u... | 31.685484 | 79 | 0.692543 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Sphinx extension to add directives to allow files and code to include the
latest installable version of Flocker.
"""
import importlib
import os
from sphinx.directives.code import LiteralInclude
from sphinx.roles import XRefRole
from flocker import __v... | 0 | 0 | 0 | 1,632 | 0 | 259 | 0 | 42 | 230 |
e1f386d336997274ce53c9d682995430ea59a328 | 8,266 | py | Python | tools/project.py | AK391/anycost-gan | a827390a77d6360ed6902511de447a503584c63f | [
"MIT"
] | 692 | 2021-03-05T02:05:40.000Z | 2022-03-30T19:09:32.000Z | tools/project.py | AK391/anycost-gan | a827390a77d6360ed6902511de447a503584c63f | [
"MIT"
] | 22 | 2021-03-11T02:56:59.000Z | 2022-03-31T13:59:39.000Z | tools/project.py | AK391/anycost-gan | a827390a77d6360ed6902511de447a503584c63f | [
"MIT"
] | 81 | 2021-03-05T06:03:39.000Z | 2022-03-28T09:33:50.000Z | import argparse
import os
import json
import torch
import torch.nn as nn
from torchvision import transforms
from PIL import Image
import lpips
import sys
sys.path.append('.') # to run from the project root dir
import models
torch.backends.cudnn.benchmark = False
if __name__ == "__main__":
device = "cu... | 36.414097 | 118 | 0.635858 | import argparse
import os
import json
import random
import torch
import torch.nn as nn
from torch.nn import functional as F
from torchvision import transforms
from PIL import Image
from tqdm import tqdm
import lpips
import sys
sys.path.append('.') # to run from the project root dir
import models
from thirdparty i... | 0 | 0 | 0 | 0 | 0 | 4,376 | 0 | 135 | 271 |
efbebadb15895ab66ee3fc804cec5b920f7027c3 | 1,006 | py | Python | hello_BC.py | bc1109/ubuntu | 71b3a1bd0b5d027016b5868da9ab442c8e4f49d2 | [
"Apache-2.0"
] | null | null | null | hello_BC.py | bc1109/ubuntu | 71b3a1bd0b5d027016b5868da9ab442c8e4f49d2 | [
"Apache-2.0"
] | null | null | null | hello_BC.py | bc1109/ubuntu | 71b3a1bd0b5d027016b5868da9ab442c8e4f49d2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
"""A tiny Python program to check that Python is working.
Try running this program from t... | 25.794872 | 66 | 0.706759 | #!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
"""A tiny Python program to check that Python is working.
Try running this program from t... | 0 | 0 | 0 | 0 | 0 | 162 | 0 | -11 | 70 |
de2607a926a8a835910df56da1e8fb214dc6bdf2 | 699 | py | Python | test/notsosimple_project_test.py | leotrs/decu | e920a7046220a0547826084c11b6a74029e3c658 | [
"MIT"
] | 4 | 2017-10-30T21:22:32.000Z | 2020-10-16T04:15:44.000Z | test/notsosimple_project_test.py | leotrs/decu | e920a7046220a0547826084c11b6a74029e3c658 | [
"MIT"
] | 105 | 2017-10-05T18:27:04.000Z | 2018-10-10T15:55:47.000Z | test/notsosimple_project_test.py | leotrs/decu | e920a7046220a0547826084c11b6a74029e3c658 | [
"MIT"
] | null | null | null | """
notsosimple_project_test.py
---------------------------
Run `decu` on the mock project notsosimple_project.
"""
import os
import decu
import pytest
from subprocess import call
from util import make_teardown_fixture
PROJECT_DIR = 'notsosimple_project/'
teardown = pytest.fixture(scope='module', autouse=True)(
... | 25.888889 | 78 | 0.695279 | """
notsosimple_project_test.py
---------------------------
Run `decu` on the mock project notsosimple_project.
"""
import os
import decu
import pytest
from subprocess import call
from util import make_teardown_fixture
PROJECT_DIR = 'notsosimple_project/'
teardown = pytest.fixture(scope='module', autouse=True)(
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
592878835b82a1a9afbd4b012a52a907a6f06777 | 7,731 | py | Python | src/data/interim_to_single_files.py | Rungetf/learna_ba | a5784fd1dd031a876b7c3908207c7ffff546039f | [
"Apache-2.0"
] | null | null | null | src/data/interim_to_single_files.py | Rungetf/learna_ba | a5784fd1dd031a876b7c3908207c7ffff546039f | [
"Apache-2.0"
] | 7 | 2020-11-13T19:07:44.000Z | 2022-02-10T02:31:11.000Z | src/data/interim_to_single_files.py | Rungetf/learna_ba | a5784fd1dd031a876b7c3908207c7ffff546039f | [
"Apache-2.0"
] | null | null | null |
if __name__ == '__main__':
# split_local_data_to_single_files('data/rfam_learn_local/test')
# split_local_data_to_single_files('data/rfam_learn_local/train')
# split_local_data_to_single_files('data/rfam_learn_local/validation')
# print("split test data")
# split_via_dataframe('data/', 'rfam_loc... | 56.845588 | 336 | 0.646876 | import pandas as pd
import numpy as np
from pathlib import Path
def split_local_data_to_single_files(data_dir, extension='.rna'):
target_file_paths = Path(data_dir, dataset).glob('*.local')
for target_file_path in target_file_paths:
[Path(data_dir, f"{index+1}{extension}").resolve().write_text(target.r... | 0 | 0 | 0 | 0 | 0 | 6,291 | 0 | -2 | 250 |
34c0d7a9e3f20c24833704a8fe1f84449a9f92dc | 2,970 | py | Python | cli_scripts/voice_coding_cli.py | MLH-Fellowship/LarynxCode | 840fee18c689a357052825607c27fc8e3e56571c | [
"MIT"
] | 1 | 2021-09-17T06:11:02.000Z | 2021-09-17T06:11:02.000Z | cli_scripts/voice_coding_cli.py | soma2000-lang/LarynxCode | 840fee18c689a357052825607c27fc8e3e56571c | [
"MIT"
] | 5 | 2021-02-03T05:29:41.000Z | 2021-02-08T01:14:11.000Z | cli_scripts/voice_coding_cli.py | soma2000-lang/LarynxCode | 840fee18c689a357052825607c27fc8e3e56571c | [
"MIT"
] | 4 | 2021-02-03T05:05:00.000Z | 2021-07-14T06:21:10.000Z |
# Coloring libraries
# Try colorama
try:
import colorama
colorama.init()
except ImportError:
colorama = None
# Try termcolor
try:
from termcolor import colored
except ImportError:
colored = None
# Help section coloring and Grouping
# Styling
'''cli_group.add_command(enable_voice_coding)
cli_grou... | 37.125 | 249 | 0.695623 | import subprocess,sys,click
from subprocess import Popen,CREATE_NEW_CONSOLE
from selenium import webdriver
import six
from pyfiglet import figlet_format
from click_help_colors import HelpColorsGroup, HelpColorsCommand
# Coloring libraries
# Try colorama
try:
import colorama
colorama.init()
except ImportError:
... | 0 | 2,004 | 0 | 0 | 0 | 257 | 0 | 86 | 222 |
3b03ef567c9d9bb1e0c9b4e41a10a0612f647307 | 1,803 | py | Python | troposphere/validators/route53.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | troposphere/validators/route53.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | troposphere/validators/route53.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from .. import AWSProperty
| 26.130435 | 82 | 0.591791 | # Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from .. import AWSProperty
from . import boolean, network_port, positive_integer
class AlarmIdentifier(AWSProperty):
"""
Export:
"""
props = {
"Name": (str, True),
"Reg... | 0 | 0 | 0 | 1,533 | 0 | 0 | 0 | 32 | 91 |
84f93797b565e0ae5ca73e73f34d03e08a5bf990 | 697 | py | Python | sites/migrations/0027_apicollections.py | jeffcnz/mon-site-register | 79460838cc0c4f69325a02785f1f5cbfed107523 | [
"MIT"
] | null | null | null | sites/migrations/0027_apicollections.py | jeffcnz/mon-site-register | 79460838cc0c4f69325a02785f1f5cbfed107523 | [
"MIT"
] | 17 | 2019-11-12T05:53:56.000Z | 2019-11-26T21:55:20.000Z | sites/migrations/0027_apicollections.py | jeffcnz/mon-site-register | 79460838cc0c4f69325a02785f1f5cbfed107523 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-11-21 21:06
| 29.041667 | 111 | 0.596844 | # Generated by Django 2.2.6 on 2019-11-21 21:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('sites', '0026_auto_20191122_0731'),
]
operations = [
migrations.CreateModel(
name='ApiCollectio... | 0 | 0 | 0 | 550 | 0 | 0 | 0 | 30 | 68 |
7f85a86c36b65042bb52fa6bb39cd317aa2eeda3 | 488 | py | Python | 02-FaceDetect.py | amandureja/Important-Content | d222bbd65f3cf7b40a6766905baa160576b6d295 | [
"Apache-2.0"
] | null | null | null | 02-FaceDetect.py | amandureja/Important-Content | d222bbd65f3cf7b40a6766905baa160576b6d295 | [
"Apache-2.0"
] | null | null | null | 02-FaceDetect.py | amandureja/Important-Content | d222bbd65f3cf7b40a6766905baa160576b6d295 | [
"Apache-2.0"
] | null | null | null | import cv2
face_data = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
cap = cv2.VideoCapture(0)
while True:
ret, img = cap.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_data.detectMultiScale(gray, 1.3, 5)
for x,y,w,h in faces:
cv2.rectangle(img, (... | 22.181818 | 73 | 0.610656 | import cv2
face_data = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
cap = cv2.VideoCapture(0)
while True:
ret, img = cap.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_data.detectMultiScale(gray, 1.3, 5)
for x,y,w,h in faces:
cv2.rectangle(img, (... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bf3b2ede706000786c30581e1848a076ed85c14d | 397 | py | Python | nsp_project_app/migrations/0030_post_title.py | Priyansh863/e-backend | c8c1bb8a7c0de96febacfeec76249256c8df3303 | [
"bzip2-1.0.6"
] | null | null | null | nsp_project_app/migrations/0030_post_title.py | Priyansh863/e-backend | c8c1bb8a7c0de96febacfeec76249256c8df3303 | [
"bzip2-1.0.6"
] | null | null | null | nsp_project_app/migrations/0030_post_title.py | Priyansh863/e-backend | c8c1bb8a7c0de96febacfeec76249256c8df3303 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.5 on 2020-10-16 07:38
| 20.894737 | 62 | 0.602015 | # Generated by Django 2.2.5 on 2020-10-16 07:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('nsp_project_app', '0029_followers_user'),
]
operations = [
migrations.AddField(
model_name='post',
name='Title',
... | 0 | 0 | 0 | 283 | 0 | 0 | 0 | 19 | 46 |
180ef89cd982370260ffffb51d65e68be1182952 | 245 | py | Python | app/__init__.py | prof-rossetti/flask-firebase-template-2022 | 2a5691c30e2c7b9c8b7c2511cbef600bda63a904 | [
"MIT"
] | null | null | null | app/__init__.py | prof-rossetti/flask-firebase-template-2022 | 2a5691c30e2c7b9c8b7c2511cbef600bda63a904 | [
"MIT"
] | 2 | 2022-03-28T01:40:56.000Z | 2022-03-29T19:21:58.000Z | app/__init__.py | prof-rossetti/flask-firebase-template-2022 | 2a5691c30e2c7b9c8b7c2511cbef600bda63a904 | [
"MIT"
] | null | null | null |
import os
from dotenv import load_dotenv
load_dotenv()
APP_ENV = os.getenv("APP_ENV", default="development") # IMPORTANT: set to "production" in production
APP_VERSION = os.getenv("APP_VERSION", default="v0.0.1") # update upon new releases
| 22.272727 | 100 | 0.75102 |
import os
from dotenv import load_dotenv
load_dotenv()
APP_ENV = os.getenv("APP_ENV", default="development") # IMPORTANT: set to "production" in production
APP_VERSION = os.getenv("APP_VERSION", default="v0.0.1") # update upon new releases
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
567782ee404e093a3dedcabf0eeaf8233347e61e | 1,814 | py | Python | pc1/main.py | renzoqamao/mate_computacional | e2947d9c51842606d80bfcb179120fe77519646e | [
"CECILL-B"
] | null | null | null | pc1/main.py | renzoqamao/mate_computacional | e2947d9c51842606d80bfcb179120fe77519646e | [
"CECILL-B"
] | null | null | null | pc1/main.py | renzoqamao/mate_computacional | e2947d9c51842606d80bfcb179120fe77519646e | [
"CECILL-B"
] | null | null | null |
vertices= (
(0, 0, 0),
(1, 0, 0),
(1, 1, 0),
(0, 1 ,0),
(0, 0, 1),
(1, 0, 1),
(1, 1, 1),
(0, 1, 1),
)
edges = (
(0,1),
(1,2),
(2,3),
(3,0),
(0,4),
(1,5),
(2,6),
(3,7),
(4,5),
(5,6),
(6,7),
(7,4)
)
main()
| 19.717391 | 58 | 0.479603 | import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
vertices= (
(0, 0, 0),
(1, 0, 0),
(1, 1, 0),
(0, 1 ,0),
(0, 0, 1),
(1, 0, 1),
(1, 1, 1),
(0, 1, 1),
)
edges = (
(0,1),
(1,2),
(2,3),
(3,0),
(0,4),
(1,5),
(2,6),
... | 0 | 0 | 0 | 0 | 0 | 1,357 | 0 | 3 | 156 |
1387b0b9111ea77d42de3fc741ee39fbca30863c | 10,594 | py | Python | docusign_esign/models/chunked_upload_response.py | cridenour/docusign-python-client | 7c0804b4f9fb850c64e05793eb5472c2c6387716 | [
"MIT"
] | null | null | null | docusign_esign/models/chunked_upload_response.py | cridenour/docusign-python-client | 7c0804b4f9fb850c64e05793eb5472c2c6387716 | [
"MIT"
] | null | null | null | docusign_esign/models/chunked_upload_response.py | cridenour/docusign-python-client | 7c0804b4f9fb850c64e05793eb5472c2c6387716 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | 30.976608 | 240 | 0.631961 | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | 0 | 5,455 | 0 | 4,737 | 0 | 0 | 0 | -31 | 105 |
01ac30f2716595c2e4a7fd83e8a61e67130e1a5d | 440 | py | Python | Id card generator/index.py | saadhaxxan/Awesome-Python-Projects | 0be4eb73eee92899d6cc09c5ea9e0a31195d8bd4 | [
"MIT"
] | 38 | 2020-08-25T16:09:48.000Z | 2022-02-21T08:31:23.000Z | Id card generator/index.py | saadhaxxan/Awesome-Python-Projects | 0be4eb73eee92899d6cc09c5ea9e0a31195d8bd4 | [
"MIT"
] | null | null | null | Id card generator/index.py | saadhaxxan/Awesome-Python-Projects | 0be4eb73eee92899d6cc09c5ea9e0a31195d8bd4 | [
"MIT"
] | 16 | 2021-01-06T03:33:41.000Z | 2022-03-16T22:31:13.000Z | from PyQt5.uic import loadUiType
ui,_ = loadUiType('id_gen.ui')
if __name__ == '__main__':
main()
| 16.296296 | 34 | 0.672727 | from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
import sys
import MySQLdb
from PyQt5.uic import loadUiType
ui,_ = loadUiType('id_gen.ui')
class MainApp(QMainWindow , ui):
def __init__(self):
QMainWindow.__init__(self)
self.setupUi(self)
def main():
app = ... | 0 | 0 | 0 | 97 | 0 | 80 | 0 | -1 | 156 |
453dd078ab69f7f03a16fb31e0c25ecfb41b8050 | 2,211 | py | Python | simulate_all.py | libsmelt/Simulator | dad65cf14259f2e4b190620832d17e842b28a613 | [
"MIT"
] | 2 | 2016-11-03T07:04:45.000Z | 2017-03-15T14:29:17.000Z | simulate_all.py | libsmelt/Simulator | dad65cf14259f2e4b190620832d17e842b28a613 | [
"MIT"
] | 1 | 2019-10-26T20:42:17.000Z | 2019-10-26T20:42:17.000Z | simulate_all.py | libsmelt/Simulator | dad65cf14259f2e4b190620832d17e842b28a613 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2013-2016, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
import sys
im... | 27.6375 | 92 | 0.521031 | #!/usr/bin/env python
#
# Copyright (c) 2013-2016, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
import sys
im... | 0 | 0 | 0 | 0 | 0 | 1,756 | 0 | -4 | 46 |
07f5a116b7a98cb4d917d876e1d2b098ef359ce3 | 40,556 | py | Python | survos/widgets/base.py | paskino/SuRVoS | e01e784442e2e9f724826cdb70f3a50c034c6455 | [
"Apache-2.0"
] | 22 | 2016-09-30T08:04:42.000Z | 2022-03-05T07:24:18.000Z | survos/widgets/base.py | paskino/SuRVoS | e01e784442e2e9f724826cdb70f3a50c034c6455 | [
"Apache-2.0"
] | 81 | 2016-11-21T15:32:14.000Z | 2022-02-20T00:22:27.000Z | survos/widgets/base.py | paskino/SuRVoS | e01e784442e2e9f724826cdb70f3a50c034c6455 | [
"Apache-2.0"
] | 6 | 2018-11-22T10:19:59.000Z | 2022-02-04T06:15:48.000Z |
DEFAULT_DIR_KEY = "default_dir"
DEFAULT_DATA_KEY = "default_data_dir"
| 32.680097 | 101 | 0.609256 |
from ..qt_compat import QtGui, QtCore, QtWidgets
import six
import os
from collections import defaultdict
from ..core import DataModel, LabelManager
DEFAULT_DIR_KEY = "default_dir"
DEFAULT_DATA_KEY = "default_data_dir"
class SectionCombo(QtWidgets.QToolButton):
currentIndexChanged = QtCore.pyqtSignal(int)
... | 0 | 452 | 0 | 38,994 | 0 | 0 | 0 | 39 | 986 |
c453d726fe5860f3a093246cab294b7de5b7c2a0 | 13,259 | py | Python | src/pyensae/languages/RListener.py | sdpython/pyensae | ada4dbb0b9901bf481eff2ea239e74ed964d93b0 | [
"MIT"
] | 28 | 2015-07-19T21:20:51.000Z | 2022-02-16T11:50:53.000Z | src/pyensae/languages/RListener.py | sdpython/pyensae | ada4dbb0b9901bf481eff2ea239e74ed964d93b0 | [
"MIT"
] | 34 | 2015-06-16T15:38:25.000Z | 2021-12-29T11:04:01.000Z | src/pyensae/languages/RListener.py | sdpython/pyensae | ada4dbb0b9901bf481eff2ea239e74ed964d93b0 | [
"MIT"
] | 27 | 2015-01-13T08:24:22.000Z | 2022-03-31T14:51:23.000Z | # Generated from \R.g4 by ANTLR 4.9
if __name__ is not None and "." in __name__:
from .RParser import RParser
else:
from RParser import RParser
# This class defines a complete listener for a parse tree produced by RParser.
del RParser
| 33.230576 | 84 | 0.711894 | # Generated from \R.g4 by ANTLR 4.9
from antlr4 import *
if __name__ is not None and "." in __name__:
from .RParser import RParser
else:
from RParser import RParser
# This class defines a complete listener for a parse tree produced by RParser.
class RListener(ParseTreeListener):
# Enter a parse tree pro... | 0 | 0 | 0 | 12,968 | 0 | 0 | 0 | -1 | 45 |
d6d5f4b1d39b3fc15094d73458952248928d0546 | 2,020 | py | Python | touchtechnology/common/debugging.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | touchtechnology/common/debugging.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | 28 | 2016-12-09T21:14:19.000Z | 2022-01-11T07:17:16.000Z | touchtechnology/common/debugging.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
def strict_show_toolbar_callback(request):
"""
Additional check against custom permission ``debug_toolbar.show``.
:param request: HttpRequest
:return: bool
"""
if hasattr(request, 'user') and \
request.user.has_perm('debug_toolbar.sh... | 29.705882 | 77 | 0.669802 | import logging
logger = logging.getLogger(__name__)
def strict_show_toolbar_callback(request):
"""
Additional check against custom permission ``debug_toolbar.show``.
:param request: HttpRequest
:return: bool
"""
if hasattr(request, 'user') and \
request.user.has_perm('debug_toolbar.sh... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3d48dc045189e96cada25d04390ede7f5b4b3ce3 | 7,871 | py | Python | serviceconnect/views.py | Nick-Getka/ServiceConnect | adc7d3eeb1841674f221e23a867ba0e72b8b64f1 | [
"MIT"
] | null | null | null | serviceconnect/views.py | Nick-Getka/ServiceConnect | adc7d3eeb1841674f221e23a867ba0e72b8b64f1 | [
"MIT"
] | null | null | null | serviceconnect/views.py | Nick-Getka/ServiceConnect | adc7d3eeb1841674f221e23a867ba0e72b8b64f1 | [
"MIT"
] | null | null | null | import re
import os
import random
import requests
from .models import User
from . import app, db
basic_payload = {
'api_key': os.environ.get('AB_API_KEY'),
'cookie': "TestyMcTestface"
}
#Parsing Decision Tree
tax_available = False
while not tax_available:
t = requests.get('https://searchbertha-hrd.appspot... | 40.158163 | 195 | 0.567272 | import re
import os
import random
import psycopg2
import requests
from .models import User
from flask import request, session
from twilio.twiml.messaging_response import MessagingResponse, Message
from . import app, db
basic_payload = {
'api_key': os.environ.get('AB_API_KEY'),
'cookie': "TestyMcTestface"
}
#P... | 0 | 1,424 | 0 | 0 | 0 | 479 | 0 | 56 | 110 |
18945dcd77da87679cfd961b9d56059bc0f83c9c | 157 | py | Python | meshrcnn/evaluation/__init__.py | MAYURGAIKWAD/meshrcnn | b47ecd47ca7de7055b7d141e63ddab286c5245f3 | [
"BSD-3-Clause"
] | 1,028 | 2020-01-23T23:30:54.000Z | 2022-03-27T22:33:50.000Z | meshrcnn/evaluation/__init__.py | MAYURGAIKWAD/meshrcnn | b47ecd47ca7de7055b7d141e63ddab286c5245f3 | [
"BSD-3-Clause"
] | 103 | 2020-01-24T05:29:48.000Z | 2022-03-08T13:04:24.000Z | meshrcnn/evaluation/__init__.py | MAYURGAIKWAD/meshrcnn | b47ecd47ca7de7055b7d141e63ddab286c5245f3 | [
"BSD-3-Clause"
] | 179 | 2020-01-24T08:14:30.000Z | 2022-03-19T00:34:05.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
| 52.333333 | 85 | 0.847134 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .pix3d_evaluation import Pix3DEvaluator, transform_meshes_to_camera_coord_system
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 22 |
4245f88e9de681ea222ae2ef29fe0812ea0bfc72 | 656 | py | Python | lib/coloraide/color/distance/delta_e_itp.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 253 | 2015-03-04T06:48:43.000Z | 2022-03-25T14:22:17.000Z | lib/coloraide/color/distance/delta_e_itp.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 197 | 2015-03-04T21:40:47.000Z | 2022-03-25T17:04:36.000Z | lib/coloraide/color/distance/delta_e_itp.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 32 | 2015-03-21T03:28:01.000Z | 2021-09-06T07:20:51.000Z | """
Delta E ITP.
https://kb.portrait.com/help/ictcp-color-difference-metric
"""
from ... import util
| 22.62069 | 90 | 0.577744 | """
Delta E ITP.
https://kb.portrait.com/help/ictcp-color-difference-metric
"""
from ..distance import DeltaE
import math
from ... import util
class DEITP(DeltaE):
"""Delta E ITP class."""
@staticmethod
def name():
"""Name of method."""
return "itp"
@staticmethod
def distance(c... | 0 | 406 | 0 | 82 | 0 | 0 | 0 | -2 | 67 |
307f5b49178b048c9ff80486f74009566c7864b8 | 5,654 | py | Python | xsssniper/core/crawler.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | 370 | 2015-01-23T12:27:44.000Z | 2022-03-30T16:47:10.000Z | core/crawler.py | starling021/xsssniper | 02b59afd15efead30bdf4829b6c1356abb8731cd | [
"ISC"
] | 17 | 2015-02-25T15:53:22.000Z | 2022-02-01T06:06:10.000Z | core/crawler.py | starling021/xsssniper | 02b59afd15efead30bdf4829b6c1356abb8731cd | [
"ISC"
] | 117 | 2015-02-02T02:20:02.000Z | 2022-03-31T05:31:47.000Z | #!/usr/bin/env python
try:
from mechanize import Request, urlopen, URLError, HTTPError, ProxyHandler, build_opener, install_opener, Browser
except ImportError:
print "\n[X] Please install mechanize module:"
print " http://wwwsearch.sourceforge.net/mechanize/\n"
exit()
from collections import defaul... | 35.559748 | 115 | 0.534843 | #!/usr/bin/env python
try:
from mechanize import Request, urlopen, URLError, HTTPError,ProxyHandler, build_opener, install_opener, Browser
except ImportError:
print "\n[X] Please install mechanize module:"
print " http://wwwsearch.sourceforge.net/mechanize/\n"
exit()
from collections import default... | 0 | 0 | 0 | 5,202 | 0 | 0 | 0 | -1 | 25 |
13083e6ff3faeb59150c08896ea1c86bf797c8cc | 989 | py | Python | gui/graps_io/save_view.py | lcford2/graps_gui | a47b598cd746425203e8df1ddf77815e3b1522e9 | [
"MIT"
] | null | null | null | gui/graps_io/save_view.py | lcford2/graps_gui | a47b598cd746425203e8df1ddf77815e3b1522e9 | [
"MIT"
] | 5 | 2020-07-22T11:51:26.000Z | 2022-02-17T20:07:12.000Z | gui/graps_io/save_view.py | lcford2/graps_gui | a47b598cd746425203e8df1ddf77815e3b1522e9 | [
"MIT"
] | null | null | null | from __future__ import division
| 30.90625 | 67 | 0.637007 | from __future__ import division
from builtins import str
from past.utils import old_div
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
import dictionaries as dlg_populate
import sys
import pickle
from IPython import embed as II
def save_view(self, filename):
items = list(self.u... | 0 | 0 | 0 | 0 | 0 | 701 | 0 | 34 | 221 |
a946bc634840bcb55acab354df78c91be75bf3dc | 1,315 | py | Python | Cumulative Practice Problems/Date Converter.py | dmitry-izmerov/Udacity-Intro-to-computer-science | 534d75d3f0f39e5c28cd0e3789222ad2a4b37a8a | [
"MIT"
] | null | null | null | Cumulative Practice Problems/Date Converter.py | dmitry-izmerov/Udacity-Intro-to-computer-science | 534d75d3f0f39e5c28cd0e3789222ad2a4b37a8a | [
"MIT"
] | null | null | null | Cumulative Practice Problems/Date Converter.py | dmitry-izmerov/Udacity-Intro-to-computer-science | 534d75d3f0f39e5c28cd0e3789222ad2a4b37a8a | [
"MIT"
] | null | null | null | __author__ = 'demi'
# Question 5: Date Converter
# Write a procedure date_converter which takes two inputs. The first is
# a dictionary and the second a string. The string is a valid date in
# the format month/day/year. The procedure should return
# the date written in the form <day> <name of month> <year>.
# For ex... | 29.222222 | 71 | 0.663878 | __author__ = 'demi'
# Question 5: Date Converter
# Write a procedure date_converter which takes two inputs. The first is
# a dictionary and the second a string. The string is a valid date in
# the format month/day/year. The procedure should return
# the date written in the form <day> <name of month> <year>.
# For ex... | 0 | 0 | 0 | 0 | 0 | 147 | 0 | 0 | 23 |
e8c7ce636feb1aabe59299a6bef17079db148574 | 5,991 | py | Python | tools/codemap.py | RyanSchuster/vos64 | 66a2df43d88836746170278fa7169fb97ec702c4 | [
"BSD-3-Clause"
] | 1 | 2019-10-23T06:19:01.000Z | 2019-10-23T06:19:01.000Z | tools/codemap.py | RyanSchuster/vos64 | 66a2df43d88836746170278fa7169fb97ec702c4 | [
"BSD-3-Clause"
] | 27 | 2015-12-06T04:20:11.000Z | 2015-12-24T20:07:33.000Z | tools/codemap.py | RyanSchuster/vos64 | 66a2df43d88836746170278fa7169fb97ec702c4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# ------------------------------------------------------------------------------
# Classes for holding source code entities
# ------------------------------------------------------------------------------
# Factories for module and function filters
# --------------------------------... | 25.066946 | 80 | 0.633617 | #!/usr/bin/env python3
import scanner
# ------------------------------------------------------------------------------
# Classes for holding source code entities
class Module(object):
def __init__(self):
self.brief = ''
self.detail = ''
self.functions = set()
self.calls = set()
class Function(object):
... | 0 | 0 | 0 | 4,517 | 0 | 520 | 0 | -7 | 276 |
4568f8e6f5498f1dafcbce739b5866ade9fb629b | 6,471 | py | Python | example/tweet.py | sctnightcore/flask-rauth | 50e1af457b81bd7122be19ca6a9edf8940e096b5 | [
"BSD-3-Clause"
] | 32 | 2015-03-09T02:00:02.000Z | 2020-11-20T21:51:17.000Z | example/tweet.py | sctnightcore/flask-rauth | 50e1af457b81bd7122be19ca6a9edf8940e096b5 | [
"BSD-3-Clause"
] | 1 | 2016-11-16T02:35:42.000Z | 2016-11-16T02:35:42.000Z | example/tweet.py | sctnightcore/flask-rauth | 50e1af457b81bd7122be19ca6a9edf8940e096b5 | [
"BSD-3-Clause"
] | 11 | 2015-01-26T09:01:12.000Z | 2020-01-21T14:57:01.000Z | '''
Instructions:
1. Make sure you have Flask, Flask-Rauth, and SQLAlchemy installed.
$ pip install Flask Flask-Rauth SQLAlchemy
2. Open a Python shell in this directory and execute the following:
$ python
>>> from tweet import init_db
>>> init_db()
>>> exit()
This will initia... | 30.380282 | 89 | 0.693556 | '''
Instructions:
1. Make sure you have Flask, Flask-Rauth, and SQLAlchemy installed.
$ pip install Flask Flask-Rauth SQLAlchemy
2. Open a Python shell in this directory and execute the following:
$ python
>>> from tweet import init_db
>>> init_db()
>>> exit()
This will initia... | 0 | 4,063 | 0 | 227 | 0 | 35 | 0 | 95 | 230 |
2126194c0cca956a996f5074663683a243fdaa5e | 340 | py | Python | dp_tornado/engine/template/example/controller/main/contact.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 18 | 2015-04-07T14:28:39.000Z | 2020-02-08T14:03:38.000Z | dp_tornado/engine/template/example/controller/main/contact.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 7 | 2016-10-05T05:14:06.000Z | 2021-05-20T02:07:22.000Z | dp_tornado/engine/template/example/controller/main/contact.py | donghak-shin/dp-tornado | 095bb293661af35cce5f917d8a2228d273489496 | [
"MIT"
] | 11 | 2015-12-15T09:49:39.000Z | 2021-09-06T18:38:21.000Z | # -*- coding: utf-8 -*-
| 30.909091 | 100 | 0.705882 | # -*- coding: utf-8 -*-
from dp_tornado.engine.controller import Controller as dpController
class ContactController(dpController):
def get(self, param1=None, param2=None):
server_version = self.config.server.version.master
self.finish('/main/contact with %s, %s (server ver. %s)' % (param1, param... | 0 | 0 | 0 | 223 | 0 | 0 | 0 | 46 | 46 |
943e70eefc2897f41e82f6d3478c78f4f8cb39e1 | 7,648 | py | Python | tests/test_binary.py | ya-ds/crosspredict | d0902e7e5776db2e29c6f92aac0c61927502887d | [
"MIT"
] | 19 | 2020-04-05T18:23:44.000Z | 2022-03-21T09:13:47.000Z | tests/test_binary.py | crosspredict/crosspredict | b64d6fe5d985b90c6845508b912482011b9b37cf | [
"MIT"
] | null | null | null | tests/test_binary.py | crosspredict/crosspredict | b64d6fe5d985b90c6845508b912482011b9b37cf | [
"MIT"
] | 1 | 2021-08-03T06:36:02.000Z | 2021-08-03T06:36:02.000Z | import pandas as pd
pd.set_option('display.max_columns', 999)
pd.set_option('display.max_rows', 999)
PARAMETERS_FPATH = 'tests/parameters.yml'
| 32.40678 | 111 | 0.655727 | import os
from collections import namedtuple
from hyperopt import fmin, tpe, Trials, space_eval
import numpy as np
import pandas as pd
import pytest
import requests
import yaml
from crosspredict.crossval import \
CrossLightgbmModel, CrossXgboostModel, CrossCatboostModel
from crosspredict.iterator import Iterator
... | 0 | 4,905 | 0 | 0 | 0 | 1,934 | 0 | 130 | 521 |
ff455a748efee4cfba3707b0f51548bd878e4008 | 1,453 | py | Python | dentsrc/config_base.py | livibetter/twimonial | aa54b5efde2a3d9ed634a959dc466ad078b5f9d4 | [
"BSD-3-Clause"
] | null | null | null | dentsrc/config_base.py | livibetter/twimonial | aa54b5efde2a3d9ed634a959dc466ad078b5f9d4 | [
"BSD-3-Clause"
] | null | null | null | dentsrc/config_base.py | livibetter/twimonial | aa54b5efde2a3d9ed634a959dc466ad078b5f9d4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
# For different service
SITE_NAME = 'Dentimonial'
TRACKING_HASHTAG = '#dentimonial'
TWEET_ACTION_NAME = 'Send'
SERVICE_NAME = 'Identi.ca'
SERVICE_URI = 'http://identi.ca/'
FOLLOWERS_NAME = 'Subscribers'
FOLLOWED_NAME = 'Subscribed'
FOLLOW_NAME = 'Subscribe to'
TWEET_NAME = 'Notice'
... | 22.353846 | 108 | 0.754301 | # -*- coding: utf-8 -*-
import os
# For different service
SITE_NAME = 'Dentimonial'
TRACKING_HASHTAG = '#dentimonial'
TWEET_ACTION_NAME = 'Send'
SERVICE_NAME = 'Identi.ca'
SERVICE_URI = 'http://identi.ca/'
FOLLOWERS_NAME = 'Subscribers'
FOLLOWED_NAME = 'Subscribed'
FOLLOW_NAME = 'Subscribe to'
TWEET_NAME = 'Notice'
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
90825bd21cef07f61694b9ac724405dad570aed9 | 73 | py | Python | microbeannotator/__init__.py | silvtal/MicrobeAnnotator | ff5ee0c09fe0223879c9be7dac90dbcbcae9a106 | [
"Artistic-2.0"
] | 56 | 2020-07-22T03:26:01.000Z | 2022-03-30T08:55:39.000Z | microbeannotator/__init__.py | silvtal/MicrobeAnnotator | ff5ee0c09fe0223879c9be7dac90dbcbcae9a106 | [
"Artistic-2.0"
] | 43 | 2020-06-05T08:37:35.000Z | 2022-03-30T09:19:31.000Z | microbeannotator/__init__.py | silvtal/MicrobeAnnotator | ff5ee0c09fe0223879c9be7dac90dbcbcae9a106 | [
"Artistic-2.0"
] | 14 | 2020-05-11T03:16:05.000Z | 2022-03-23T08:13:14.000Z | version_info = (2, 0, 5)
version = '.'.join(str(c) for c in version_info) | 36.5 | 48 | 0.657534 | version_info = (2, 0, 5)
version = '.'.join(str(c) for c in version_info) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
187381e1e4eab658f8dc7056a99fc20caf5ad86a | 8,870 | py | Python | runtime/test/specs/V1_3/qlstm_projection.mod.py | aosp-goes-brrbrr/packages_modules_NeuralNetworks | 87a14e21ce905ce7c4584fe9a53e4397a4d33c67 | [
"Apache-2.0"
] | null | null | null | runtime/test/specs/V1_3/qlstm_projection.mod.py | aosp-goes-brrbrr/packages_modules_NeuralNetworks | 87a14e21ce905ce7c4584fe9a53e4397a4d33c67 | [
"Apache-2.0"
] | null | null | null | runtime/test/specs/V1_3/qlstm_projection.mod.py | aosp-goes-brrbrr/packages_modules_NeuralNetworks | 87a14e21ce905ce7c4584fe9a53e4397a4d33c67 | [
"Apache-2.0"
] | 2 | 2021-11-28T11:20:31.000Z | 2021-11-28T11:28:38.000Z | #
# Copyright (C) 2020 The Android Open Source Project
#
# 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 la... | 41.643192 | 104 | 0.705862 | #
# Copyright (C) 2020 The Android Open Source Project
#
# 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 la... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 22 |
f97269ac7f197b28df8ca7996bafaa9a4ff10343 | 504 | py | Python | CursoEmVideo/ex053.py | ElivanLimaJunior/Python | 57c277f3ec0da06d6c8aa125b50d01a5ab88934d | [
"MIT"
] | null | null | null | CursoEmVideo/ex053.py | ElivanLimaJunior/Python | 57c277f3ec0da06d6c8aa125b50d01a5ab88934d | [
"MIT"
] | null | null | null | CursoEmVideo/ex053.py | ElivanLimaJunior/Python | 57c277f3ec0da06d6c8aa125b50d01a5ab88934d | [
"MIT"
] | null | null | null | frase = str(input('Digite uma frase: ')).strip().upper()
palavras = frase.split()
junto = ''.join(palavras)
inverso = ''
for letra in range(len(junto) -1, -1, -1):
inverso += junto[letra]
if inverso == junto:
print('Temos um palndromo')
else:
print('A frase digitada no um palndromo!')
#a debaixo peguei no... | 28 | 61 | 0.640873 | frase = str(input('Digite uma frase: ')).strip().upper()
palavras = frase.split()
junto = ''.join(palavras)
inverso = ''
for letra in range(len(junto) -1, -1, -1):
inverso += junto[letra]
if inverso == junto:
print('Temos um palíndromo')
else:
print('A frase digitada não é um palíndromo!')
#a debaixo pegue... | 18 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15adee1fd0c85144a846a6973bceb9bfde990ff7 | 5,640 | py | Python | 00a_precompute_dcase_fixed.py | andres-fr/dcase2021_umaps | 0418b256d484a66958763061170bb2346cb6030a | [
"MIT"
] | 2 | 2021-11-17T14:12:11.000Z | 2021-11-30T09:28:21.000Z | 00a_precompute_dcase_fixed.py | andres-fr/dcase2021_umaps | 0418b256d484a66958763061170bb2346cb6030a | [
"MIT"
] | null | null | null | 00a_precompute_dcase_fixed.py | andres-fr/dcase2021_umaps | 0418b256d484a66958763061170bb2346cb6030a | [
"MIT"
] | 1 | 2021-08-22T14:54:59.000Z | 2021-08-22T14:54:59.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Precompute DCASE2021 Task 2 Dataset fixed representations (logSTFT, logMel)
"""
import os
from pathlib import Path
import json
#
from omegaconf import OmegaConf
import numpy as np
#
from d2021umaps.utils import IncrementalHDF5
from d2021umaps.logging import ColorLogg... | 38.630137 | 80 | 0.616489 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Precompute DCASE2021 Task 2 Dataset fixed representations (logSTFT, logMel)
"""
import os
from pathlib import Path
import json
#
from omegaconf import OmegaConf
import numpy as np
#
from d2021umaps.utils import IncrementalHDF5
from d2021umaps.logging import ColorLogg... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
85348e5ffc6d2600f61b774c35de0ff2b86cb4aa | 7,444 | py | Python | src/psoNeuralNetwork/vonNeumannPSONN.py | pooyadav/cpso-for-nn-training | f643d00e37a6500126561c429263c94f09d870e9 | [
"MIT"
] | 1 | 2020-01-19T00:27:42.000Z | 2020-01-19T00:27:42.000Z | src/psoNeuralNetwork/vonNeumannPSONN.py | Sharzy92/cpso-for-nn-training | f643d00e37a6500126561c429263c94f09d870e9 | [
"MIT"
] | null | null | null | src/psoNeuralNetwork/vonNeumannPSONN.py | Sharzy92/cpso-for-nn-training | f643d00e37a6500126561c429263c94f09d870e9 | [
"MIT"
] | 2 | 2019-11-18T14:52:51.000Z | 2020-01-19T00:27:26.000Z | import numpy as np
np.set_printoptions(suppress=True)
| 42.056497 | 147 | 0.60532 | import numpy as np
import matplotlib.pyplot as plt
from numberGenerator.chaos.cprng import CPRNG
from particleSwarmOptimization.pso import PSO
from particleSwarmOptimization.structure.particle import Particle
from particleSwarmOptimization.structure.chaoticParticle import ChaoticParticle
from neuralNetwork.feedForward... | 0 | 0 | 0 | 6,981 | 0 | 0 | 0 | 229 | 178 |
416bd9a1b0e5ac7a5fe87646662142d57e63317a | 1,059 | py | Python | chat/channels.py | SafetyGuardians/SafetyGuardiansApp | aa53aeda3974e3de73fea32b598fbd15a2f46fd5 | [
"MIT"
] | null | null | null | chat/channels.py | SafetyGuardians/SafetyGuardiansApp | aa53aeda3974e3de73fea32b598fbd15a2f46fd5 | [
"MIT"
] | 1 | 2021-03-10T00:53:05.000Z | 2021-03-10T00:53:05.000Z | chat/channels.py | SafetyGuardians/SafetyGuardiansApp | aa53aeda3974e3de73fea32b598fbd15a2f46fd5 | [
"MIT"
] | null | null | null | """Notification channels for django-notifs."""
| 27.868421 | 73 | 0.678942 | """Notification channels for django-notifs."""
from json import dumps
import pika
from notifications.channels import BaseNotificationChannel
class BroadCastWebSocketChannel(BaseNotificationChannel):
"""Fanout notification for RabbitMQ."""
def _connect(self):
"""Connect to the RabbitMQ server."""
... | 0 | 0 | 0 | 891 | 0 | 0 | 0 | 28 | 92 |
54a40ca37344c270ba9a186e55f16e63e23e1490 | 4,402 | py | Python | app/StagyBee/views.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | null | null | null | app/StagyBee/views.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | 1 | 2019-02-20T21:15:08.000Z | 2019-02-20T21:15:08.000Z | app/StagyBee/views.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2022 Simon Zigelli
#
# 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... | 34.124031 | 120 | 0.623126 | # Copyright 2019-2022 Simon Zigelli
#
# 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... | 0 | 712 | 0 | 1,601 | 0 | 940 | 0 | 118 | 294 |
ac6502df6c74550c5f00ed474190bd596e2b1cff | 907 | py | Python | _unittests/ut_td_1a/test_LONG_internet_retrieve_speeches.py | Jerome-maker/ensae_teaching_cs | 43ea044361ee60c00c85aea354a7b25c21c0fd07 | [
"MIT"
] | 73 | 2015-05-12T13:12:11.000Z | 2021-12-21T11:44:29.000Z | _unittests/ut_td_1a/test_LONG_internet_retrieve_speeches.py | Jerome-maker/ensae_teaching_cs | 43ea044361ee60c00c85aea354a7b25c21c0fd07 | [
"MIT"
] | 90 | 2015-06-23T11:11:35.000Z | 2021-03-31T22:09:15.000Z | _unittests/ut_td_1a/test_LONG_internet_retrieve_speeches.py | Jerome-maker/ensae_teaching_cs | 43ea044361ee60c00c85aea354a7b25c21c0fd07 | [
"MIT"
] | 65 | 2015-01-13T08:23:55.000Z | 2022-02-11T22:42:07.000Z | """
@brief test log(time=21s)
"""
import unittest
if __name__ == "__main__":
unittest.main()
| 25.914286 | 86 | 0.593164 | """
@brief test log(time=21s)
"""
import os
import unittest
from pyquickhelper.pycode import ExtTestCase
from ensae_teaching_cs.td_1a.discours_politique import enumerate_speeches_from_elysees
class TestRetrieveSpeeches(ExtTestCase):
def test_retrieve_speeches(self):
temp = os.path.abspath(
... | 0 | 0 | 0 | 637 | 0 | 0 | 0 | 76 | 89 |
b424617c8a16ffc92d5d3c8adc9331822d496557 | 687 | py | Python | pyanimelist/util/scraper.py | byronvanstien/Pyanimelist | eff1fb4cdffe9a8e6dca59138549715d61c484ae | [
"MIT"
] | 1 | 2022-01-17T03:17:52.000Z | 2022-01-17T03:17:52.000Z | pyanimelist/util/scraper.py | byronvanstien/Pyanimelist | eff1fb4cdffe9a8e6dca59138549715d61c484ae | [
"MIT"
] | null | null | null | pyanimelist/util/scraper.py | byronvanstien/Pyanimelist | eff1fb4cdffe9a8e6dca59138549715d61c484ae | [
"MIT"
] | null | null | null |
def scraper_enabled(func):
"""
Decorator which ensures that a :class:`pyanimelist.Client.scraper` isn't used without it being explictly allowed
Example usage:
.. code-block:: py
from pyanimelist.util.web import scraper_enabled
@scraper_enabled
async def function(func):
... | 27.48 | 130 | 0.657933 | import warnings
from functools import wraps
def scraper_enabled(func):
"""
Decorator which ensures that a :class:`pyanimelist.Client.scraper` isn't used without it being explictly allowed
Example usage:
.. code-block:: py
from pyanimelist.util.web import scraper_enabled
@scraper_enab... | 0 | 246 | 0 | 0 | 0 | 0 | 0 | 0 | 70 |
6ae69a9250b82a1d7c556c26274cba207dc1f76d | 8,091 | py | Python | examples/SchedulerExample/schedule_example/agent.py | bl33m/volttron | 7c2d7f5d90a9b9ab152436483a98854d393f301b | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | examples/SchedulerExample/schedule_example/agent.py | bl33m/volttron | 7c2d7f5d90a9b9ab152436483a98854d393f301b | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | examples/SchedulerExample/schedule_example/agent.py | bl33m/volttron | 7c2d7f5d90a9b9ab152436483a98854d393f301b | [
"Apache-2.0",
"BSD-2-Clause"
] | 1 | 2022-03-22T21:10:52.000Z | 2022-03-22T21:10:52.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2020, Battelle Memorial Institute.
#
# 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... | 39.857143 | 147 | 0.557039 | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2020, Battelle Memorial Institute.
#
# 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... | 0 | 1,132 | 0 | 3,657 | 0 | 274 | 0 | 85 | 91 |
dcc12bae79a15121df33468eed8a33d7ee458e69 | 14,044 | py | Python | lib/medzoo/Unet3D.py | eynaij/MedicalZooPytorch_RibFrac | 720cd2a3b7e62a47ed35b9e41e15db92e802ffb8 | [
"MIT"
] | 2 | 2020-09-20T15:59:37.000Z | 2021-04-12T09:28:35.000Z | lib/medzoo/Unet3D.py | eynaij/MedicalZooPytorch_RibFrac | 720cd2a3b7e62a47ed35b9e41e15db92e802ffb8 | [
"MIT"
] | 1 | 2020-12-17T02:38:05.000Z | 2020-12-17T02:38:05.000Z | lib/medzoo/Unet3D.py | eynaij/MedicalZooPytorch_RibFrac | 720cd2a3b7e62a47ed35b9e41e15db92e802ffb8 | [
"MIT"
] | null | null | null | import torch.nn as nn
| 43.614907 | 132 | 0.604386 | import torch.nn as nn
import torch
from torchsummary import summary
import torchsummaryX
from lib.medzoo.BaseModelClass import BaseModel
import torch.nn.functional as F
class BaseAttentionBlock(nn.Module):
"""The basic implementation for self-attention block/non-local block."""
def __init__(self, in_channels,... | 0 | 0 | 0 | 13,783 | 0 | 0 | 0 | 37 | 202 |
7577d07b966b266678d961ee0ccdc4a7eaa10639 | 834 | py | Python | setup.py | vitor-vidal-negr/pyKriging | 03309528466f201f37b112bb9540bf49e14e963b | [
"MIT"
] | 354 | 2015-02-24T13:51:19.000Z | 2022-03-27T01:12:35.000Z | setup.py | vitor-vidal-negr/pyKriging | 03309528466f201f37b112bb9540bf49e14e963b | [
"MIT"
] | 44 | 2015-02-25T03:34:51.000Z | 2022-03-05T08:07:39.000Z | setup.py | vitor-vidal-negr/pyKriging | 03309528466f201f37b112bb9540bf49e14e963b | [
"MIT"
] | 121 | 2015-02-24T17:52:48.000Z | 2022-03-23T12:28:21.000Z | from setuptools import setup, find_packages # Always prefer setuptools over distutils
from os import path, walk
here = path.abspath(path.dirname(__file__))
datadir = 'pyKriging/sampling_plans'
package_data = [ (d, [path.join(d, f) for f in files]) for d,folders,files in walk(datadir)]
data_files=[]
for i in package_d... | 29.785714 | 92 | 0.690647 | from setuptools import setup, find_packages # Always prefer setuptools over distutils
from os import path, walk
here = path.abspath(path.dirname(__file__))
datadir = 'pyKriging/sampling_plans'
package_data = [ (d, [path.join(d, f) for f in files]) for d,folders,files in walk(datadir)]
data_files=[]
for i in package_d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1867e2653f5a6d44422f07bf4c77c2117d38662f | 3,580 | py | Python | classify_r_equiv/update_data.py | yassu/classify-r-equiv | 42dbd20166add8449daabce790b15848b2f3a6c6 | [
"Apache-2.0"
] | null | null | null | classify_r_equiv/update_data.py | yassu/classify-r-equiv | 42dbd20166add8449daabce790b15848b2f3a6c6 | [
"Apache-2.0"
] | 3 | 2018-10-03T17:07:00.000Z | 2018-10-11T00:48:59.000Z | classify_r_equiv/update_data.py | yassu/classify-r-equiv | 42dbd20166add8449daabce790b15848b2f3a6c6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
x, y = symbols("x y")
| 27.751938 | 79 | 0.550279 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import json
from classify_r_equiv.const import get_seed_functions
from tqdm import tqdm
from sympy import *
import random
x, y = symbols("x y")
class MyEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, np.integer):
... | 0 | 0 | 0 | 325 | 643 | 2,234 | 0 | 9 | 293 |
dc77c869b6b272fd18ee192b680364c6a30377ec | 2,722 | py | Python | Tutorial03-mouseEvents.py | xanewton/PygameTutorial | 5d0d08100daf51524e640e187cb082c8bec96250 | [
"Apache-2.0"
] | null | null | null | Tutorial03-mouseEvents.py | xanewton/PygameTutorial | 5d0d08100daf51524e640e187cb082c8bec96250 | [
"Apache-2.0"
] | null | null | null | Tutorial03-mouseEvents.py | xanewton/PygameTutorial | 5d0d08100daf51524e640e187cb082c8bec96250 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# Source https://lorenzod8n.wordpress.com/2007/05/30/pygame-tutorial-3-mouse-events/
# Deal with mouse events.
import pygame
# Tracks the position of the mouse on our window.
# Draws lines that cut the mouse pointers coordinates.
# Draws lines that cut the mouse pointers coordinates flas... | 27.77551 | 84 | 0.608744 | #! /usr/bin/env python
# Source https://lorenzod8n.wordpress.com/2007/05/30/pygame-tutorial-3-mouse-events/
# Deal with mouse events.
import pygame
# Tracks the position of the mouse on our window.
def track_mouse_position():
x = y = 0
running = 1
screen = pygame.display.set_mode((640, 400))
while... | 6 | 0 | 0 | 0 | 0 | 2,082 | 0 | 0 | 88 |
8d8795d0f000296a8ff155eb1baa7b2e8a25aa3f | 4,925 | py | Python | scripts/upstream_usage.py | Data-to-Knowledge/waimak-de-tide | a13bc8005173466d438ff6de0f86d3e70fb20017 | [
"Apache-2.0"
] | null | null | null | scripts/upstream_usage.py | Data-to-Knowledge/waimak-de-tide | a13bc8005173466d438ff6de0f86d3e70fb20017 | [
"Apache-2.0"
] | null | null | null | scripts/upstream_usage.py | Data-to-Knowledge/waimak-de-tide | a13bc8005173466d438ff6de0f86d3e70fb20017 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 30 12:33:58 2018
@author: michaelek
"""
import os
import pandas as pd
from hilltoppy import web_service as ws
from hilltoppy.util import convert_site_names
from pyhydrotel import get_ts_data, get_sites_mtypes
from flownat import FlowNat
from pdsql import mssql
import yaml... | 39.087302 | 286 | 0.652792 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 30 12:33:58 2018
@author: michaelek
"""
import os
import pandas as pd
from hilltoppy import web_service as ws
from hilltoppy.util import convert_site_names
from pyhydrotel import get_ts_data, get_sites_mtypes
from flownat import FlowNat
from pdsql import mssql
import yaml... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2533bd390fe0f75109854d9db6caf4c85c798749 | 3,138 | py | Python | programmers/lv3/card_matching_1.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | programmers/lv3/card_matching_1.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | programmers/lv3/card_matching_1.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | #
"""
1. .
2. permutations .
3. . -> .
4. bfs .
"""
dy = [-1, 1, 0, 0]
dx = [0, 0, -1, 1]
INF = 987654321
if __name__ == "__main__":
board = [[3, 0, 0, 2], [0, 0, 1, 0], [0, 1, 0, 0], [2, 0, 0, 3]]
print(solution(board, 0, 1))
| 25.721311 | 68 | 0.472913 | # 카드 짝 맞추기
"""
1. 현재 보드를 모두 순회하면서 카드의 종류를 모두 긁어 모은다.
2. 순회한 보드에 따라 permutations 한다.
3. 방문할 좌표들을 백트래킹한다. -> 좌표들을 저장하고 좌표의 인덱스만 백트래킹한다.
4. 방문해야할 모든 좌표 세트를 구하고 bfs를 실행한다.
"""
import copy
from collections import deque
from itertools import permutations
dy = [-1, 1, 0, 0]
dx = [0, 0, -1, 1]
INF = 987654321
def get_card(b... | 285 | 0 | 0 | 0 | 0 | 2,583 | 0 | 11 | 181 |
d3a19d3778e78cd70649190099187c224f117dc4 | 7,293 | py | Python | pauxy/estimators/hubbard.py | pauxy-qmc/pauxy | 1da80284284769b59361c73cfa3c2d914c74a73f | [
"Apache-2.0"
] | 16 | 2020-08-05T17:17:17.000Z | 2022-03-18T04:06:18.000Z | pauxy/estimators/hubbard.py | pauxy-qmc/pauxy | 1da80284284769b59361c73cfa3c2d914c74a73f | [
"Apache-2.0"
] | 4 | 2020-05-17T21:28:20.000Z | 2021-04-22T18:05:50.000Z | pauxy/estimators/hubbard.py | pauxy-qmc/pauxy | 1da80284284769b59361c73cfa3c2d914c74a73f | [
"Apache-2.0"
] | 5 | 2020-05-18T01:03:18.000Z | 2021-04-13T15:36:29.000Z | import numpy
def local_energy_hubbard_holstein_momentum(system, G, P, Lap, Ghalf=None):
r"""Calculate local energy of walker for the Hubbard-Hostein model.
Parameters
----------
system : :class:`HubbardHolstein`
System information for the HubbardHolstein model.
G : :class:`numpy.ndarray`
... | 33.92093 | 108 | 0.603181 | import numpy
def local_energy_hubbard_holstein_momentum(system, G, P, Lap, Ghalf=None):
r"""Calculate local energy of walker for the Hubbard-Hostein model.
Parameters
----------
system : :class:`HubbardHolstein`
System information for the HubbardHolstein model.
G : :class:`numpy.ndarray`
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c7269f04b682e8809b889866122b71b54e1b413e | 9,924 | py | Python | http_check/tests/test_http_check.py | Siecje/integrations-core | b2f3ea4145b25394be0b274093d1f0723e8f968d | [
"BSD-3-Clause"
] | null | null | null | http_check/tests/test_http_check.py | Siecje/integrations-core | b2f3ea4145b25394be0b274093d1f0723e8f968d | [
"BSD-3-Clause"
] | null | null | null | http_check/tests/test_http_check.py | Siecje/integrations-core | b2f3ea4145b25394be0b274093d1f0723e8f968d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
# 3p
from datadog_checks.http_check import HTTPCheck
from datadog_checks.utils.headers import headers as agent_headers
from .common import (CONFIG, CONFIG_HTTP_HEADERS, CONFIG_UNORMALIZE... | 48.409756 | 120 | 0.743954 | # -*- coding: utf-8 -*-
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
# 3p
import mock
from datadog_checks.http_check import HTTPCheck
from datadog_checks.utils.headers import headers as agent_headers
from .common import (
FAKE_CERT, CONFIG, CONFIG_HTT... | 0 | 1,067 | 0 | 0 | 0 | 4,143 | 0 | 134 | 183 |
1c430821f923be31c49db28013f3a7692f993b15 | 7,542 | py | Python | pychron/core/fits/measurement_fits_selector.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | null | null | null | pychron/core/fits/measurement_fits_selector.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | 80 | 2018-07-17T20:10:20.000Z | 2021-08-17T15:38:24.000Z | pychron/core/fits/measurement_fits_selector.py | UManPychron/pychron | b84c9fd70072f9cbda30abe2c471e64fe3dd75d8 | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2014 Jake Ross
#
# 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/licens... | 36.086124 | 112 | 0.570936 | # ===============================================================================
# Copyright 2014 Jake Ross
#
# 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/licens... | 0 | 0 | 0 | 5,273 | 0 | 0 | 0 | 431 | 424 |
c2250245a603f24ce7290d4cd4f35480986061bb | 686 | py | Python | advertools/__init__.py | Dishtid/advertools | b5ceac59a70ad6bfe3ebfaddbdbd1d2bb40c0acd | [
"MIT"
] | null | null | null | advertools/__init__.py | Dishtid/advertools | b5ceac59a70ad6bfe3ebfaddbdbd1d2bb40c0acd | [
"MIT"
] | null | null | null | advertools/__init__.py | Dishtid/advertools | b5ceac59a70ad6bfe3ebfaddbdbd1d2bb40c0acd | [
"MIT"
] | null | null | null |
"""Top-level package for advertools."""
__author__ = """Elias Dabbas"""
__email__ = 'eliasdabbas@gmail.com'
__version__ = '0.9.0'
| 31.181818 | 52 | 0.827988 |
"""Top-level package for advertools."""
__author__ = """Elias Dabbas"""
__email__ = 'eliasdabbas@gmail.com'
__version__ = '0.9.0'
from advertools.ad_create import ad_create
from advertools.ad_from_string import ad_from_string
from advertools.emoji import emoji_search, emoji_df
from advertools.extract import *
from a... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 309 |
6826e5ce17d70145196c9a67ee8185975a7eae94 | 960 | py | Python | experiments/default.py | huxia001/autokeras | f4503bb3a3be014b452f54d8e2d187bb6419f627 | [
"MIT"
] | 1 | 2018-08-03T05:59:54.000Z | 2018-08-03T05:59:54.000Z | experiments/default.py | HangJie720/autokeras | 1619d8c398a955559fb6389797716c9a0989cb43 | [
"MIT"
] | null | null | null | experiments/default.py | HangJie720/autokeras | 1619d8c398a955559fb6389797716c9a0989cb43 | [
"MIT"
] | null | null | null | from keras.datasets import cifar10
from autokeras.generator import DefaultClassifierGenerator
from autokeras.net_transformer import default_transform
from autokeras.preprocessor import OneHotEncoder
from autokeras.utils import ModelTrainer
if __name__ == '__main__':
(x_train, y_train), (x_test, y_test) = cifar10... | 30.967742 | 92 | 0.698958 | from keras.datasets import cifar10
from autokeras.generator import DefaultClassifierGenerator
from autokeras.net_transformer import default_transform
from autokeras.preprocessor import OneHotEncoder
from autokeras.utils import ModelTrainer
if __name__ == '__main__':
(x_train, y_train), (x_test, y_test) = cifar10... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
880efcf1db08bcf2ab60ea3f9d8ced020d40a37c | 877 | py | Python | trelloConnector.py | featherbear/trello-epd | d38f6afa724bde7c95be1aae19584d7be360b40f | [
"Unlicense"
] | null | null | null | trelloConnector.py | featherbear/trello-epd | d38f6afa724bde7c95be1aae19584d7be360b40f | [
"Unlicense"
] | null | null | null | trelloConnector.py | featherbear/trello-epd | d38f6afa724bde7c95be1aae19584d7be360b40f | [
"Unlicense"
] | null | null | null | from dotenv import load_dotenv
load_dotenv()
import os
os.chdir(os.path.dirname(os.path.realpath(__file__)))
boardTitle = os.getenv("BOARD_NAME")
listTitle = os.getenv("LIST_NAME")
| 28.290323 | 105 | 0.697834 | from dotenv import load_dotenv
load_dotenv()
import os
os.chdir(os.path.dirname(os.path.realpath(__file__)))
from trello import TrelloClient
def fetch():
# Create the client connection
client = TrelloClient(
api_key=os.getenv("TRELLO_API_KEY"),
api_secret=os.getenv("TRELLO_API_TOKEN")
)
... | 0 | 0 | 0 | 0 | 0 | 638 | 0 | 10 | 46 |
8fc2f633646983fe6f0306d09a05f261c61251ca | 6,971 | py | Python | device-app/modbus/lib/mqtt_handler.py | MEUIIOT/moxaiiot-uc2100-qbee-io | 8815bc2a7ba901c99381777fadf0ad1528f10e24 | [
"MIT"
] | null | null | null | device-app/modbus/lib/mqtt_handler.py | MEUIIOT/moxaiiot-uc2100-qbee-io | 8815bc2a7ba901c99381777fadf0ad1528f10e24 | [
"MIT"
] | null | null | null | device-app/modbus/lib/mqtt_handler.py | MEUIIOT/moxaiiot-uc2100-qbee-io | 8815bc2a7ba901c99381777fadf0ad1528f10e24 | [
"MIT"
] | null | null | null | #!/usr/bin/env python 3
"""
MQTT client base class to Connect, Publish and Subscribe messages using Mosquitto broker
"""
__author__ = "Amjad B."
__license__ = "MIT"
__version__ = '1.0'
__status__ = "beta"
import logging
logger = logging.getLogger(__name__)
| 35.566327 | 123 | 0.564625 | #!/usr/bin/env python 3
"""
MQTT client base class to Connect, Publish and Subscribe messages using Mosquitto broker
"""
__author__ = "Amjad B."
__license__ = "MIT"
__version__ = '1.0'
__status__ = "beta"
import time
import json
import ssl
import sys
import logging
import paho.mqtt.client as mqtt_client
logger... | 0 | 0 | 0 | 6,597 | 0 | 0 | 0 | -25 | 134 |
894ca23ad6e8483cfa68bb8240043fecadfa0eed | 1,113 | py | Python | main_vis.py | jakobj/python-tdl | 375e97c18daa7f12896dd3f6b9dccd179f22aa03 | [
"MIT"
] | null | null | null | main_vis.py | jakobj/python-tdl | 375e97c18daa7f12896dd3f6b9dccd179f22aa03 | [
"MIT"
] | null | null | null | main_vis.py | jakobj/python-tdl | 375e97c18daa7f12896dd3f6b9dccd179f22aa03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import universe
seed = 91231
n_steps_pretraining = 3000
n_steps = 3500
steps_to_reward = 9
max_reward = n_steps / steps_to_reward
# uni = universe.Universe('grid_world', world='world0')
uni = universe.Universe('grid_world', world='2d_world... | 21.403846 | 60 | 0.680144 | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import time
import universe
seed = 91231
n_steps_pretraining = 3000
n_steps = 3500
steps_to_reward = 9
max_reward = n_steps / steps_to_reward
# uni = universe.Universe('grid_world', world='world0')
uni = universe.Universe('grid_world', wor... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 22 |