hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | 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 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 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.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795887d75505bc9eb0ef46449b5233ebcd73dfb7 | 2,942 | py | Python | Snippets/Gtk/Python GooCanvas/src/SimpleItem.py | fredmorcos/attic | 0da3b94aa525df59ddc977c32cb71c243ffd0dbd | [
"Unlicense"
] | 2 | 2021-01-24T09:00:51.000Z | 2022-01-23T20:52:17.000Z | Snippets/Gtk/Python GooCanvas/src/SimpleItem.py | fredmorcos/attic | 0da3b94aa525df59ddc977c32cb71c243ffd0dbd | [
"Unlicense"
] | 6 | 2020-02-29T01:59:03.000Z | 2022-02-15T10:25:40.000Z | Snippets/Gtk/Python GooCanvas/src/SimpleItem.py | fredmorcos/attic | 0da3b94aa525df59ddc977c32cb71c243ffd0dbd | [
"Unlicense"
] | 1 | 2019-03-22T14:41:21.000Z | 2019-03-22T14:41:21.000Z | '''
This file is part of Camarillo.
Copyright (C) 2008 Frederic-Gerald Morcos <fred.morcos@gmail.com>
Copyright (C) 2008 Mohammed Hazem <cviruss@gmail.com>
Camarillo 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 Fou... | 29.42 | 73 | 0.689667 |
795888da11aa9efee0d4b805f9b6f3a9e0b5e241 | 210 | py | Python | courses/api/permissions.py | esiebomaj/skillNG | f0133615a7b397205d988b3fc4352d099cc5f166 | [
"MIT"
] | null | null | null | courses/api/permissions.py | esiebomaj/skillNG | f0133615a7b397205d988b3fc4352d099cc5f166 | [
"MIT"
] | 19 | 2020-07-29T21:36:11.000Z | 2022-03-12T00:46:40.000Z | courses/api/permissions.py | esiebomaj/skillNG | f0133615a7b397205d988b3fc4352d099cc5f166 | [
"MIT"
] | null | null | null | from rest_framework.permissions import BasePermission
class IsEnrolled(BasePermission):
def has_object_permission(self, request, view, obj):
return obj.students.filter(id=request.user.id).exists() | 35 | 63 | 0.780952 |
795888f3c3687c8d57b25ce07caea89a087554f6 | 313 | py | Python | oop_advance/use_metaclass.py | LaurenceYang/learn-python | 819994039abd3af298f73b1a73976eaa95071096 | [
"Apache-2.0"
] | 2 | 2018-01-20T03:38:58.000Z | 2019-07-21T11:33:24.000Z | oop_advance/use_metaclass.py | LaurenceYang/learn-python | 819994039abd3af298f73b1a73976eaa95071096 | [
"Apache-2.0"
] | null | null | null | oop_advance/use_metaclass.py | LaurenceYang/learn-python | 819994039abd3af298f73b1a73976eaa95071096 | [
"Apache-2.0"
] | null | null | null | class ListMetaClass(type):
def __new__(cls, name, bases, attrs):
attrs['add'] = lambda self, value : self.append(value)
return type.__new__(cls, name, bases, attrs)
class MyList(list, metaclass=ListMetaClass):
pass
L = MyList()
L.add(1)
L.add(2)
L.add(3)
L.add(4)
L.add('END')
print(L) | 18.411765 | 62 | 0.645367 |
795889f081072bbd6963492e1ec68a9f7134f25d | 12,440 | py | Python | test/opsgenie_swagger/models/thousand_eyes_integration.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | test/opsgenie_swagger/models/thousand_eyes_integration.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | test/opsgenie_swagger/models/thousand_eyes_integration.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | 1 | 2020-11-07T11:27:13.000Z | 2020-11-07T11:27:13.000Z | # coding: utf-8
"""
OpsGenie REST API
OpsGenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from opsgenie_swagger.models.integration import Integration # ... | 39.119497 | 265 | 0.683923 |
79588b412e3ecec0dcabb06078d17b2e965e512c | 2,123 | py | Python | ros_bt_py/setup.py | fzi-forschungszentrum-informatik/ros_bt_py | ed65e2b2f0a03411101f455c0ab38401ba50bada | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2022-03-11T14:30:43.000Z | 2022-03-31T07:21:35.000Z | ros_bt_py/setup.py | fzi-forschungszentrum-informatik/ros_bt_py | ed65e2b2f0a03411101f455c0ab38401ba50bada | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ros_bt_py/setup.py | fzi-forschungszentrum-informatik/ros_bt_py | ed65e2b2f0a03411101f455c0ab38401ba50bada | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -------- BEGIN LICENSE BLOCK --------
# Copyright 2022 FZI Forschungszentrum Informatik
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the ab... | 42.46 | 77 | 0.728686 |
79588b922ef95b4ea2c7a370c20c3a25b7a0e146 | 1,918 | py | Python | goldsrc/mdl_v4/structs/sequence.py | tltneon/SourceIO | 418224918c2b062a4c78a41d4d65329ba2decb22 | [
"MIT"
] | 1 | 2021-07-12T12:55:27.000Z | 2021-07-12T12:55:27.000Z | goldsrc/mdl_v4/structs/sequence.py | syborg64/SourceIO | e4ba86d801f518e192260af08ef533759c2e1cc3 | [
"MIT"
] | null | null | null | goldsrc/mdl_v4/structs/sequence.py | syborg64/SourceIO | e4ba86d801f518e192260af08ef533759c2e1cc3 | [
"MIT"
] | null | null | null | import math
from typing import List
import numpy as np
from ....source_shared.base import Base
from ....utilities.byte_io_mdl import ByteIO
def euler_to_quat(euler):
eulerd = euler[2] * 0.5
v8 = math.sin(eulerd)
v9 = math.cos(eulerd)
eulerd = euler[1] * 0.5
v12 = math.sin(eulerd)
v10 = math.... | 28.626866 | 115 | 0.613139 |
79588c3f969326716acbf5fae00ef28966606f03 | 108,536 | py | Python | pygeoapi/api.py | Canadian-Geospatial-Platform/pygeoapi | 56ccf43d25a9e06ec351a57d0ebc73dc09110013 | [
"MIT"
] | 3 | 2021-02-22T13:19:14.000Z | 2021-06-04T17:51:13.000Z | pygeoapi/api.py | Canadian-Geospatial-Platform/pygeoapi | 56ccf43d25a9e06ec351a57d0ebc73dc09110013 | [
"MIT"
] | null | null | null | pygeoapi/api.py | Canadian-Geospatial-Platform/pygeoapi | 56ccf43d25a9e06ec351a57d0ebc73dc09110013 | [
"MIT"
] | null | null | null | # =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
# Francesco Bartoli <xbartolone@gmail.com>
# Sander Schaminee <sander.schaminee@geocat.net>
#
# Copyright (c) 2021 Tom Kralidis
# Copyright (c) 2020 Francesco Bartoli
#
# Permission is... | 38.929699 | 100 | 0.533445 |
79588cb94e7fb4cd6d2ff9484f21fad9e6447f59 | 1,869 | py | Python | tests/test_event.py | TierMobility/dj-stripe | 454a10746197af108ec9f12bbb841b6b28116235 | [
"MIT"
] | null | null | null | tests/test_event.py | TierMobility/dj-stripe | 454a10746197af108ec9f12bbb841b6b28116235 | [
"MIT"
] | null | null | null | tests/test_event.py | TierMobility/dj-stripe | 454a10746197af108ec9f12bbb841b6b28116235 | [
"MIT"
] | null | null | null | """
dj-stripe Event Model Tests.
"""
from copy import deepcopy
from unittest.mock import patch
from django.contrib.auth import get_user_model
from django.test import TestCase
from stripe.error import StripeError
from djstripe import webhooks
from djstripe.models import Event
from . import FAKE_CUSTOMER, FAKE_EVENT_T... | 28.753846 | 82 | 0.789727 |
79588dad90065d9b77baf4d892f0b899d77258f1 | 490 | py | Python | dds_web/development/cache_temp.py | pericsson/dds_web | 60e4436b94e1999e09a1f2b81520384b204dc8df | [
"BSD-3-Clause"
] | null | null | null | dds_web/development/cache_temp.py | pericsson/dds_web | 60e4436b94e1999e09a1f2b81520384b204dc8df | [
"BSD-3-Clause"
] | null | null | null | dds_web/development/cache_temp.py | pericsson/dds_web | 60e4436b94e1999e09a1f2b81520384b204dc8df | [
"BSD-3-Clause"
] | null | null | null | """ Temparoy methods for cacheing """
import os
import json
from flask import current_app
tmp_ucache_path = os.path.join(current_app.config.get("LOCAL_TEMP_CACHE"), "{}_{}_cache.json")
def store_temp_ucache(tu, tp, usid):
with open(tmp_ucache_path.format(tu, usid), "w") as tchf:
json.dump({"username": t... | 27.222222 | 94 | 0.706122 |
79588e13abfb1cc9e7c21ee0bead598f3edef553 | 3,481 | py | Python | bigmler/tsevaluation.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | bigmler/tsevaluation.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | bigmler/tsevaluation.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017-2020 BigML
#
# 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 ... | 37.031915 | 75 | 0.62798 |
795892047f7fee8bceeeabd0090f9c5703e68d12 | 297 | py | Python | utils/timeit.py | orrinjelo/AdventOfCode2018 | 7455737bebfb56d7912c8f8760a55ea0a5b240a3 | [
"MIT"
] | 1 | 2020-12-14T21:05:28.000Z | 2020-12-14T21:05:28.000Z | utils/timeit.py | orrinjelo/AdventOfCode2018 | 7455737bebfb56d7912c8f8760a55ea0a5b240a3 | [
"MIT"
] | null | null | null | utils/timeit.py | orrinjelo/AdventOfCode2018 | 7455737bebfb56d7912c8f8760a55ea0a5b240a3 | [
"MIT"
] | null | null | null | import time
def timeit(method):
def timed(*args, **kw):
ts = time.time()
result = method(*args, **kw)
te = time.time()
print(f'{method.__name__} {(te-ts)*1000:.3f} msec')
return result
return timed | 22.846154 | 59 | 0.451178 |
795892cacaf38933bbb01032934f7569637e1617 | 7,622 | py | Python | tests/notebooks/imodels_demo.py | jiayouwyhit/imodels | 2f3e3cd55b6ac1e6d0f21420bf9c4c29e4d39b06 | [
"MIT"
] | 1 | 2021-05-22T13:04:36.000Z | 2021-05-22T13:04:36.000Z | tests/notebooks/imodels_demo.py | jiayouwyhit/imodels | 2f3e3cd55b6ac1e6d0f21420bf9c4c29e4d39b06 | [
"MIT"
] | null | null | null | tests/notebooks/imodels_demo.py | jiayouwyhit/imodels | 2f3e3cd55b6ac1e6d0f21420bf9c4c29e4d39b06 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,../tests/notebooks//py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.10.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
... | 30.246032 | 121 | 0.704802 |
795894b7ee70ebc43cb1d79d09b26c3a8e9c7f87 | 8,660 | py | Python | venv/Lib/site-packages/praw/models/reddit/multi.py | briehanrahan/subdiver | 92373f29dac2342e8a7e716a2966ce394f18fd1b | [
"CC0-1.0"
] | 38 | 2020-03-14T22:22:40.000Z | 2022-02-24T18:05:45.000Z | venv/Lib/site-packages/praw/models/reddit/multi.py | briehanrahan/subdiver | 92373f29dac2342e8a7e716a2966ce394f18fd1b | [
"CC0-1.0"
] | 3 | 2021-03-30T13:15:12.000Z | 2021-09-22T18:55:59.000Z | venv/Lib/site-packages/praw/models/reddit/multi.py | briehanrahan/subdiver | 92373f29dac2342e8a7e716a2966ce394f18fd1b | [
"CC0-1.0"
] | 9 | 2020-02-21T23:55:13.000Z | 2021-03-22T07:48:23.000Z | """Provide the Multireddit class."""
import re
from json import dumps
from typing import Any, Dict, List, Optional, TypeVar, Union
from ...const import API_PATH
from ...util.cache import cachedproperty
from ..listing.mixins import SubredditListingMixin
from .base import RedditBase
from .redditor import Redditor
from .... | 38.488889 | 79 | 0.576097 |
79589543f0f09038ca80392bc3f1808942dc64cc | 5,695 | py | Python | estimateS3ensitivity_CoLA_Finetuned.py | m-hahn/fairseq | 8508699326640a6a7a83ed4de17ac986e6213bbe | [
"MIT"
] | null | null | null | estimateS3ensitivity_CoLA_Finetuned.py | m-hahn/fairseq | 8508699326640a6a7a83ed4de17ac986e6213bbe | [
"MIT"
] | null | null | null | estimateS3ensitivity_CoLA_Finetuned.py | m-hahn/fairseq | 8508699326640a6a7a83ed4de17ac986e6213bbe | [
"MIT"
] | null | null | null | import math
import sys
import torch
task = sys.argv[1]
assert task == "CoLA"
def mean(values):
return sum(values)/len(values)
sensitivityHistogram = [0 for _ in range(40)]
def variance(values):
values = values.exp()
values = 2*values-1 # make probabilities rescale to [-1, 1]
return float(((values-value... | 35.372671 | 128 | 0.699034 |
7958954fd7ce4f688604d0b06b4280cab76f0e48 | 5,354 | py | Python | aiochat/chat/views.py | comeonmike/aiohttp_chat | d1aad0dfcd87ebb29e348814beff1efed9e78faa | [
"MIT"
] | null | null | null | aiochat/chat/views.py | comeonmike/aiohttp_chat | d1aad0dfcd87ebb29e348814beff1efed9e78faa | [
"MIT"
] | null | null | null | aiochat/chat/views.py | comeonmike/aiohttp_chat | d1aad0dfcd87ebb29e348814beff1efed9e78faa | [
"MIT"
] | null | null | null | import re
import aiohttp_jinja2
from textwrap import dedent
from aiohttp import web, WSMsgType
from chat.models import Room, Message
from helpers.decorators import login_required
from helpers.tools import redirect, add_message, get_object_or_404
class CreateRoom(web.View):
""" Create new chat room """
@lo... | 38.517986 | 109 | 0.582182 |
795895fbc430cb698f214748f273bb4709a8ca62 | 2,261 | py | Python | idl2py/star/mphase.py | RapidLzj/idl2py | 193051cd8d01db0d125b8975713b885ad521a992 | [
"MIT"
] | null | null | null | idl2py/star/mphase.py | RapidLzj/idl2py | 193051cd8d01db0d125b8975713b885ad521a992 | [
"MIT"
] | null | null | null | idl2py/star/mphase.py | RapidLzj/idl2py | 193051cd8d01db0d125b8975713b885ad521a992 | [
"MIT"
] | null | null | null | """
By Dr Jie Zheng -Q, NAOC
v1 2019-04-27
"""
import numpy as np
from..util import *
def mphase():
pass
#pro mphase,jd, k
#;+
#; NAME:
#; MPHASE
#; PURPOSE:
#; Return the illuminated fraction of the Moon at given Julian date(s)
#;
#; CALLING SEQUENCE:
#; MPHASE, jd, k
#... | 31.84507 | 83 | 0.581601 |
7958974363b5453c81f2b61994973a951b0cb6c8 | 1,169 | py | Python | dataxHWSp2021/HW2_CoreConcepts/student/tests/q4b2.py | UCBerkeley-SCET/DataX-Berkeley | f912d22c838b511d3ada4ecfa3548afd80437b74 | [
"Apache-2.0"
] | 28 | 2020-06-15T23:53:36.000Z | 2022-03-19T09:27:02.000Z | dataxHWSp2021/HW2_CoreConcepts/student/tests/q4b2.py | UCBerkeley-SCET/DataX-Berkeley | f912d22c838b511d3ada4ecfa3548afd80437b74 | [
"Apache-2.0"
] | 4 | 2020-06-24T22:20:31.000Z | 2022-02-28T01:37:36.000Z | dataxHWSp2021/HW2_CoreConcepts/student/tests/q4b2.py | UCBerkeley-SCET/DataX-Berkeley | f912d22c838b511d3ada4ecfa3548afd80437b74 | [
"Apache-2.0"
] | 78 | 2020-06-19T09:41:01.000Z | 2022-02-05T00:13:29.000Z | test = { 'name': 'q4b2',
'points': 3,
'suites': [ { 'cases': [ { 'code': '>>> print '
"(clf_knn.named_steps['knn'].__class__ "
'if clf_knn.__class__==Pipeline '
... | 55.666667 | 109 | 0.264328 |
795897a88af1ebe4cccbcb891d2257c35bf6a051 | 628 | py | Python | tests/test_getObjectRoutes.py | madibag/TikTok-Api | aef7cabdef6afe6e028d9382f7d5b1575354f6fa | [
"MIT"
] | null | null | null | tests/test_getObjectRoutes.py | madibag/TikTok-Api | aef7cabdef6afe6e028d9382f7d5b1575354f6fa | [
"MIT"
] | null | null | null | tests/test_getObjectRoutes.py | madibag/TikTok-Api | aef7cabdef6afe6e028d9382f7d5b1575354f6fa | [
"MIT"
] | null | null | null | from TikTokApi import TikTokApi
def test_tiktok_object():
api = TikTokApi()
assert len(api.getTikTokById("6829267836783971589")) > 0
assert (
len(
api.getTikTokByUrl(
"https://www.tiktok.com/@therock/video/6829267836783971589"
)
)
> 0
)
... | 20.933333 | 75 | 0.622611 |
795897c339d60d9471cbe25bc4141886a88efbc6 | 4,037 | py | Python | sunpy/tests/helpers.py | LaudateCorpus1/sunpy | f7bdf22e5229a577c5851c1e05502f0d68b4b369 | [
"BSD-2-Clause"
] | 1 | 2016-09-19T18:53:34.000Z | 2016-09-19T18:53:34.000Z | sunpy/tests/helpers.py | wtbarnes/sunpy | f7bdf22e5229a577c5851c1e05502f0d68b4b369 | [
"BSD-2-Clause"
] | null | null | null | sunpy/tests/helpers.py | wtbarnes/sunpy | f7bdf22e5229a577c5851c1e05502f0d68b4b369 | [
"BSD-2-Clause"
] | null | null | null | import sys
import platform
import warnings
from pathlib import Path
from functools import wraps
import matplotlib as mpl
import matplotlib.pyplot as plt
import pkg_resources
import pytest
import astropy
from astropy.wcs.wcs import FITSFixedWarning
import sunpy.map
__all__ = ['skip_windows', 'skip_glymur', 'skip_ana... | 30.353383 | 123 | 0.689373 |
795898af1648ec960b85a7321dc963c3b2517679 | 462 | py | Python | api/anime.py | AbdifatahOsman2/Tofu-Animev2 | 8d1d047497a49a3679026fdbe443dd36dc19c973 | [
"MIT"
] | null | null | null | api/anime.py | AbdifatahOsman2/Tofu-Animev2 | 8d1d047497a49a3679026fdbe443dd36dc19c973 | [
"MIT"
] | null | null | null | api/anime.py | AbdifatahOsman2/Tofu-Animev2 | 8d1d047497a49a3679026fdbe443dd36dc19c973 | [
"MIT"
] | null | null | null | from peewee import *
import datetime
from pyparsing import Char
from db import DATABASE
from user import User
class Anime(Model):
id = AutoField()
name = CharField()
author = CharField()
type = CharField()
rating = IntegerField()
hot_take = CharField()
image = CharField()
user = Fore... | 21 | 61 | 0.686147 |
79589abee39a2b165c7a95f5fbe0549444d9ba14 | 189,170 | py | Python | src/azure-cli/azure/cli/command_modules/acs/custom.py | zackliu/azure-cli | 680f8339ac010a89d4063566fabc5991abc8a4c2 | [
"MIT"
] | 1 | 2021-04-22T09:20:56.000Z | 2021-04-22T09:20:56.000Z | src/azure-cli/azure/cli/command_modules/acs/custom.py | zackliu/azure-cli | 680f8339ac010a89d4063566fabc5991abc8a4c2 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/acs/custom.py | zackliu/azure-cli | 680f8339ac010a89d4063566fabc5991abc8a4c2 | [
"MIT"
] | 1 | 2021-04-16T18:14:41.000Z | 2021-04-16T18:14:41.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 46.026764 | 222 | 0.649448 |
79589b94c3e9a4a42740f98c0f04552e9b6f26c4 | 1,300 | py | Python | align_data/blogs/__init__.py | igor0/alignment-research-dataset | 4a0291a31dd57ce3f7c5fa322980e140be4eccdc | [
"MIT"
] | null | null | null | align_data/blogs/__init__.py | igor0/alignment-research-dataset | 4a0291a31dd57ce3f7c5fa322980e140be4eccdc | [
"MIT"
] | null | null | null | align_data/blogs/__init__.py | igor0/alignment-research-dataset | 4a0291a31dd57ce3f7c5fa322980e140be4eccdc | [
"MIT"
] | null | null | null | from pprint import pprint
from .wp_blog import WordpressBlog
from .medium_blog import MediumBlog
BLOG_REGISTRY = [
WordpressBlog("https://aiimpacts.org"),
WordpressBlog("https://aipulse.org"),
WordpressBlog("https://aisafety.camp"),
WordpressBlog("https://casparoesterheld.com"),
WordpressBlog("htt... | 43.333333 | 75 | 0.695385 |
79589d56ab6f6445d7ce6cc0cb8c013c585bfc86 | 105 | py | Python | app/auth/__init__.py | merRen22/PyTask | ec4591e244270914b9e85eb6637f7053a3b8e0b4 | [
"MIT"
] | null | null | null | app/auth/__init__.py | merRen22/PyTask | ec4591e244270914b9e85eb6637f7053a3b8e0b4 | [
"MIT"
] | null | null | null | app/auth/__init__.py | merRen22/PyTask | ec4591e244270914b9e85eb6637f7053a3b8e0b4 | [
"MIT"
] | null | null | null | from flask import Blueprint
auth = Blueprint('auth', __name__, url_prefix='/auth')
from . import views
| 17.5 | 54 | 0.742857 |
79589d93b8082fed8af8d66055d0aa3b7ba431b1 | 1,457 | py | Python | asimo/train.py | selonsy/MachineLearning | 4e1be16aeab6a312511206751e9c168963d31839 | [
"MIT"
] | 1 | 2018-12-27T01:31:59.000Z | 2018-12-27T01:31:59.000Z | asimo/train.py | shenjl/MachineLearning | 4e1be16aeab6a312511206751e9c168963d31839 | [
"MIT"
] | 2 | 2019-11-10T10:29:10.000Z | 2019-11-10T10:29:10.000Z | asimo/train.py | selonsy/MachineLearning | 4e1be16aeab6a312511206751e9c168963d31839 | [
"MIT"
] | null | null | null | from train.run_Train_SiamFPN import train
if __name__ == "__main__":
# data_dir = "/home/hfan/Dataset/ILSVRC2015_crops/Data/VID/train"
# train_imdb = "/home/hfan/Desktop/PyTorch-SiamFC/ILSVRC15-curation/imdb_video_train.json"
# val_imdb = "/home/hfan/Desktop/PyTorch-SiamFC/ILSVRC15-curation/imdb_video... | 47 | 100 | 0.748799 |
79589f10b68d379a9611d6e6d8c0e4a681d596ba | 110 | py | Python | src/drugbank_downloader/__init__.py | cthoyt/drugbank_downloader | 1bfac2b7d900abf03788c9441882a739df313d9e | [
"MIT"
] | 11 | 2020-12-20T18:18:27.000Z | 2022-03-27T13:26:12.000Z | src/drugbank_downloader/__init__.py | cthoyt/drugbank_downloader | 1bfac2b7d900abf03788c9441882a739df313d9e | [
"MIT"
] | 1 | 2021-08-31T01:25:53.000Z | 2021-08-31T08:44:32.000Z | src/drugbank_downloader/__init__.py | cthoyt/drugbank_downloader | 1bfac2b7d900abf03788c9441882a739df313d9e | [
"MIT"
] | 1 | 2021-12-07T08:23:43.000Z | 2021-12-07T08:23:43.000Z | # -*- coding: utf-8 -*-
from .api import download_drugbank, get_drugbank_root, open_drugbank, parse_drugbank
| 27.5 | 84 | 0.763636 |
79589fca4ca277f0994845ffa398866d57e81855 | 1,650 | py | Python | simpleml/utils/errors.py | ptoman/SimpleML | a829ee05da01a75b64982d91a012e9274b6f7c6e | [
"BSD-3-Clause"
] | 15 | 2018-08-19T19:36:23.000Z | 2021-11-09T17:47:18.000Z | simpleml/utils/errors.py | ptoman/SimpleML | a829ee05da01a75b64982d91a012e9274b6f7c6e | [
"BSD-3-Clause"
] | 75 | 2020-10-11T17:58:59.000Z | 2022-03-29T22:34:54.000Z | simpleml/utils/errors.py | ptoman/SimpleML | a829ee05da01a75b64982d91a012e9274b6f7c6e | [
"BSD-3-Clause"
] | 4 | 2018-04-30T23:09:42.000Z | 2022-01-19T08:03:18.000Z | '''
Error classes
'''
__author__ = 'Elisha Yadgaran'
class SimpleMLError(Exception):
def __str__(self):
if hasattr(self, 'message'):
return self.message
return self.args[0]
class DatasetError(SimpleMLError):
def __init__(self, *args, **kwargs):
super(DatasetError, self)._... | 30.555556 | 60 | 0.658182 |
7958a22dc5651b53160092dd56aaa17d3ce790cb | 4,323 | py | Python | envs/GTAV/models/densenet.py | Sindy98/spc2 | dbc1e7b937d80a90d16e69445e14ebcffc05fc68 | [
"BSD-3-Clause"
] | 14 | 2021-01-11T19:22:31.000Z | 2022-01-05T14:07:24.000Z | inplace_abn/models/densenet.py | calincru/inplace_abn | 5c82984ddbe2ef170f978c6273e7f3fbceb8a150 | [
"BSD-3-Clause"
] | 7 | 2021-04-20T08:55:28.000Z | 2021-09-25T07:26:31.000Z | inplace_abn/models/densenet.py | calincru/inplace_abn | 5c82984ddbe2ef170f978c6273e7f3fbceb8a150 | [
"BSD-3-Clause"
] | 4 | 2021-01-19T01:50:04.000Z | 2022-03-03T08:30:02.000Z | import sys
from collections import OrderedDict
from functools import partial
import torch.nn as nn
from ..modules import ABN, GlobalAvgPool2d, DenseModule
from ._util import try_index
class DenseNet(nn.Module):
def __init__(self,
structure,
norm_act=ABN,
input_... | 35.727273 | 120 | 0.535508 |
7958a4204655ee9cb168ab3e596cdc678be64b1f | 11,548 | py | Python | lane_finder.py | roshea6/CarND-LaneLines | ec4911a679ecd26fa9dcb954ae08c6a18bf17a09 | [
"MIT"
] | null | null | null | lane_finder.py | roshea6/CarND-LaneLines | ec4911a679ecd26fa9dcb954ae08c6a18bf17a09 | [
"MIT"
] | null | null | null | lane_finder.py | roshea6/CarND-LaneLines | ec4911a679ecd26fa9dcb954ae08c6a18bf17a09 | [
"MIT"
] | null | null | null | import cv2
import math
import numpy as np
def grayscale(img):
"""Applies the Grayscale transform
This will return an image with only one color channel
but NOTE: to see the returned image as grayscale
(assuming your grayscaled image is called 'gray')
you should call plt.imshow(gray, cmap='gray')""... | 44.245211 | 158 | 0.650762 |
7958a485934130f8ae26d571fc12a72d5ad42e8c | 15,293 | py | Python | cardinal_pythonlib/tools/pdf_to_booklet.py | bopopescu/pythonlib | 9c2187d6092ba133342ca3374eb7c86f9d296c30 | [
"Apache-2.0"
] | null | null | null | cardinal_pythonlib/tools/pdf_to_booklet.py | bopopescu/pythonlib | 9c2187d6092ba133342ca3374eb7c86f9d296c30 | [
"Apache-2.0"
] | null | null | null | cardinal_pythonlib/tools/pdf_to_booklet.py | bopopescu/pythonlib | 9c2187d6092ba133342ca3374eb7c86f9d296c30 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# cardinal_pythonlib/tools/pdf_to_booklet.py
"""
===============================================================================
Original code copyright (C) 2009-2020 Rudolf Cardinal (rudolf@pobox.com).
This file is part of cardinal_pythonlib.
Licensed under the Apache License, Ver... | 33.759382 | 111 | 0.573334 |
7958a5480f85a73ed366ced63af731f79aed5849 | 1,567 | py | Python | pythonforandroid/recipes/gevent/__init__.py | syrykh/python-for-android | dea23e8c6d11cfad0554f3e846cbe245578781fd | [
"MIT"
] | 6,278 | 2015-01-02T16:34:05.000Z | 2022-03-31T10:24:45.000Z | pythonforandroid/recipes/gevent/__init__.py | ganeshgandhiTN/python-for-android | 690dd18bcf9bbd3ff5a245ac1e7296cc266e5543 | [
"MIT"
] | 1,877 | 2015-01-01T16:16:10.000Z | 2022-03-27T17:34:34.000Z | pythonforandroid/recipes/gevent/__init__.py | ganeshgandhiTN/python-for-android | 690dd18bcf9bbd3ff5a245ac1e7296cc266e5543 | [
"MIT"
] | 1,565 | 2015-01-02T19:35:37.000Z | 2022-03-31T15:37:06.000Z | import re
from pythonforandroid.logger import info
from pythonforandroid.recipe import CythonRecipe
class GeventRecipe(CythonRecipe):
version = '1.4.0'
url = 'https://pypi.python.org/packages/source/g/gevent/gevent-{version}.tar.gz'
depends = ['librt', 'setuptools']
patches = ["cross_compiling.patch"]... | 44.771429 | 97 | 0.620294 |
7958a5c6865272342eaa73429f89db757ba44560 | 5,581 | py | Python | python/pls.py | mwalton/em-machineLearning | efd76961fa3b78e042ca481733152a683074d15c | [
"MIT"
] | null | null | null | python/pls.py | mwalton/em-machineLearning | efd76961fa3b78e042ca481733152a683074d15c | [
"MIT"
] | null | null | null | python/pls.py | mwalton/em-machineLearning | efd76961fa3b78e042ca481733152a683074d15c | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.cross_decomposition import PLSRegression
import matplotlib.pyplot as plt
from math import sqrt
from sklearn.metrics import mean_squared_error
from sklearn.preprocessing import StandardScaler
def loadData(XPath, yPath):
X = np.genfromtxt(XPath, delimiter=",", dtype="float32")
y =... | 37.456376 | 137 | 0.708296 |
7958a5fa5e113f8bc2698658c23481eee58b2359 | 10,338 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/netvisor/_pn_vrouterlbif.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/modules/network/netvisor/_pn_vrouterlbif.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/modules/network/netvisor/_pn_vrouterlbif.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
""" PN CLI vrouter-loopback-interface-add/remove """
#
# This file is part of Ansible
#
# Ansible 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 version 3 of the License, or
# (at yo... | 30.859701 | 80 | 0.639776 |
7958a6ccf00825ceb9787548ef8a585cc8b76663 | 4,126 | py | Python | growth/too/tool.py | deepchatterjeeligo/growth-too-marshal | cefd6a4549cdd34895bd8067833273baaf891341 | [
"MIT"
] | 14 | 2019-04-16T19:31:30.000Z | 2020-08-18T21:34:54.000Z | growth/too/tool.py | deepchatterjeeligo/growth-too-marshal | cefd6a4549cdd34895bd8067833273baaf891341 | [
"MIT"
] | 86 | 2019-04-16T20:43:04.000Z | 2021-04-23T16:16:39.000Z | growth/too/tool.py | deepchatterjeeligo/growth-too-marshal | cefd6a4549cdd34895bd8067833273baaf891341 | [
"MIT"
] | 11 | 2019-04-16T18:41:53.000Z | 2020-04-21T13:22:13.000Z | from getpass import getpass
import os
import click
from flask.cli import FlaskGroup
import lxml.etree
from passlib.apache import HtpasswdFile
from tqdm import tqdm
from .flask import app
from . import models, tasks
from . import views, twilio # noqa: F401
@click.group(cls=FlaskGroup, create_app=lambda *args, **kwa... | 30.116788 | 78 | 0.656083 |
7958a763d07146962cade9309d57c019fd1cdd25 | 3,877 | py | Python | sparse/repos/jflamant/bispy/setup.py | yuvipanda/mybinder.org-analytics | 7b654e3e21dea790505c626d688aa15640ea5808 | [
"BSD-3-Clause"
] | 1 | 2021-03-18T23:33:35.000Z | 2021-03-18T23:33:35.000Z | sparse/repos/jflamant/bispy/setup.py | yuvipanda/mybinder.org-analytics | 7b654e3e21dea790505c626d688aa15640ea5808 | [
"BSD-3-Clause"
] | 17 | 2020-01-28T22:33:27.000Z | 2021-06-10T21:05:49.000Z | sparse/repos/jflamant/bispy/setup.py | yuvipanda/mybinder.org-analytics | 7b654e3e21dea790505c626d688aa15640ea5808 | [
"BSD-3-Clause"
] | 1 | 2021-07-17T12:55:22.000Z | 2021-07-17T12:55:22.000Z | """A setuptools based setup module.
See:
https://packaging.python.org/tutorials/distributing-packages/#configuring-your-project
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To u... | 35.568807 | 94 | 0.679649 |
7958a7b2421c3e50f8aae1dafb8f614323f38329 | 2,763 | py | Python | userprofile/api_userprofile.py | FiniteElementries/barebone_server | 3713b7d384aa9501741eeebdc49398d917deabb3 | [
"MIT"
] | null | null | null | userprofile/api_userprofile.py | FiniteElementries/barebone_server | 3713b7d384aa9501741eeebdc49398d917deabb3 | [
"MIT"
] | null | null | null | userprofile/api_userprofile.py | FiniteElementries/barebone_server | 3713b7d384aa9501741eeebdc49398d917deabb3 | [
"MIT"
] | null | null | null |
from django.contrib.auth.models import User
from django.http import HttpResponse
import json
import ast
import sys
from userprofile.models import UserProfile
import account.api_account
from helper.http_handler import package_handle
def get_userprofile_detail(request):
"""
:param
:return:
"""
re... | 22.647541 | 111 | 0.70105 |
7958a7d83648ae174cbd8bab35caaa84732942f0 | 3,221 | py | Python | viz_estimate_nolabel_dataset.py | duncangoudie/LaneATT | 263df500addf38e0912e3da7b4e878ca289391c3 | [
"MIT"
] | null | null | null | viz_estimate_nolabel_dataset.py | duncangoudie/LaneATT | 263df500addf38e0912e3da7b4e878ca289391c3 | [
"MIT"
] | null | null | null | viz_estimate_nolabel_dataset.py | duncangoudie/LaneATT | 263df500addf38e0912e3da7b4e878ca289391c3 | [
"MIT"
] | null | null | null | """
Given an unlabelled dataset (such as KITTI), visualise the result of images being run through the LaneATT model.
"""
import argparse
import cv2
import torch
import random
import numpy as np
from tqdm import tqdm, trange
from lib.config import Config
import os
import sys
PACKAGE_PARENT = '../'
SCRIPT_DIR = os.... | 30.386792 | 113 | 0.598261 |
7958a84d59a6ca21d5db56b11a7eefd76b4b2c0d | 8,630 | py | Python | PhloxAR/math3/objects/quaternion.py | jardinier/phlox | f312569ec983b5f27c75846b34debc04fe7bdf98 | [
"Apache-2.0"
] | 1 | 2016-05-22T00:12:14.000Z | 2016-05-22T00:12:14.000Z | PhloxAR/math3/objects/quaternion.py | jardinier/phlox | f312569ec983b5f27c75846b34debc04fe7bdf98 | [
"Apache-2.0"
] | null | null | null | PhloxAR/math3/objects/quaternion.py | jardinier/phlox | f312569ec983b5f27c75846b34debc04fe7bdf98 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Represents a Quaternion rotation.
The Quaternion class provides a number of convenient functions and
conversions.
::
import numpy as np
from math3 import Quaternion, Matrix33, Matrix44, Vector3, Vector4
q = Quaternion()
# explicit creation
q = Quaternion.from_x_rotatio... | 30.280702 | 94 | 0.631518 |
7958a86575fc366fbcc46e811337400e5e010555 | 1,237 | py | Python | models/__init__.py | pszyu/irr | 43511b4d85f04d62f132bd2e76da31d052000731 | [
"Apache-2.0"
] | null | null | null | models/__init__.py | pszyu/irr | 43511b4d85f04d62f132bd2e76da31d052000731 | [
"Apache-2.0"
] | null | null | null | models/__init__.py | pszyu/irr | 43511b4d85f04d62f132bd2e76da31d052000731 | [
"Apache-2.0"
] | null | null | null | from . import flownet1s
from . import flownet1s_irr
from . import flownet1s_irr_bi
from . import flownet1s_irr_occ
from . import flownet1s_irr_occ_bi
from . import IRR_FlowNet
from . import pwcnet
from . import pwcnet_bi
from . import pwcnet_occ
from . import pwcnet_occ_bi
from . import pwcnet_irr
from . import pwcnet... | 29.452381 | 53 | 0.755861 |
7958a8d3d0de125943542b2bdfdd5b515cd31807 | 691 | py | Python | morad/models.py | MoradAlkhatib/djangoX | 98759b6ad7931f7af78c892725ea147eeee0a529 | [
"MIT"
] | null | null | null | morad/models.py | MoradAlkhatib/djangoX | 98759b6ad7931f7af78c892725ea147eeee0a529 | [
"MIT"
] | null | null | null | morad/models.py | MoradAlkhatib/djangoX | 98759b6ad7931f7af78c892725ea147eeee0a529 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth import get_user_model
from django.urls import reverse
class Car(models.Model):
name = models.CharField(max_length=64)
color = models.CharField(max_length=32)
type_car = models.CharField(max_length=64)
price = models.FloatField(max_length=32 ,null=Fal... | 38.388889 | 113 | 0.725036 |
7958a98a5d6177ff9cb381d9d4d7c417df5fb786 | 443 | py | Python | ch02-python/mini_project/components/selecter.py | skforest/intro_ds | 478a6b236c2e33c4baffec8aafa8e0a8ed68dca8 | [
"Apache-2.0"
] | null | null | null | ch02-python/mini_project/components/selecter.py | skforest/intro_ds | 478a6b236c2e33c4baffec8aafa8e0a8ed68dca8 | [
"Apache-2.0"
] | null | null | null | ch02-python/mini_project/components/selecter.py | skforest/intro_ds | 478a6b236c2e33c4baffec8aafa8e0a8ed68dca8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
此脚本用于得到出现次数最多的元素
"""
from mini_project.components.counter import word_count
def get_frequent_item(data):
"""
找出给定列表中,出现次数最多的元素
参数
----
data : list,原始数据列表
返回
----
re : list,在给定列表中出现次数最大的元素
"""
_hash = word_count(data)
max_num = max(_hash.value... | 17.038462 | 65 | 0.629797 |
7958abed719329e6f485b63e0b929b30c9d23e76 | 6,056 | py | Python | tests/ut/python/pipeline/parse/test_operator.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | tests/ut/python/pipeline/parse/test_operator.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 1 | 2020-12-29T06:46:38.000Z | 2020-12-29T06:46:38.000Z | tests/ut/python/pipeline/parse/test_operator.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 29.398058 | 91 | 0.521301 |
7958ac011df18df3b5013ca807d5d502d373f8a2 | 46,411 | py | Python | segno/__init__.py | eduardomazolini/segno | 9bf6f74237485d082d9251be8e0d0e463fd4ffea | [
"BSD-3-Clause"
] | null | null | null | segno/__init__.py | eduardomazolini/segno | 9bf6f74237485d082d9251be8e0d0e463fd4ffea | [
"BSD-3-Clause"
] | null | null | null | segno/__init__.py | eduardomazolini/segno | 9bf6f74237485d082d9251be8e0d0e463fd4ffea | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 - 2020 -- Lars Heuer
# All rights reserved.
#
# License: BSD License
#
"""\
QR Code and Micro QR Code implementation.
"QR Code" and "Micro QR Code" are registered trademarks of DENSO WAVE INCORPORATED.
"""
from __future__ import absolute_import, unicode_literals
import sy... | 45.590373 | 97 | 0.515783 |
7958adc648efafbbb98f9745c4e3b5ac657479ae | 37,780 | py | Python | src/pykeen/nn/modules.py | sunny1401/pykeen | ad449ecc753eb603670de67cfa5f49020c61db12 | [
"MIT"
] | null | null | null | src/pykeen/nn/modules.py | sunny1401/pykeen | ad449ecc753eb603670de67cfa5f49020c61db12 | [
"MIT"
] | null | null | null | src/pykeen/nn/modules.py | sunny1401/pykeen | ad449ecc753eb603670de67cfa5f49020c61db12 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Stateful interaction functions."""
from __future__ import annotations
import logging
import math
from abc import ABC, abstractmethod
from typing import (
Any, Callable, Generic, Mapping, MutableMapping, Optional, Sequence, Tuple, Union,
cast,
)
import torch
from torch import Float... | 34.565416 | 119 | 0.635733 |
7958adf3b828ffe6412a76280c707cbcef3a7cf5 | 25,068 | py | Python | lib/DashboardService/DashboardServiceServer.py | eapearson/kbase-sdk-module-dashboard-service | c45562bcb78e3944e70d16ef55dfaa25932ec094 | [
"MIT"
] | null | null | null | lib/DashboardService/DashboardServiceServer.py | eapearson/kbase-sdk-module-dashboard-service | c45562bcb78e3944e70d16ef55dfaa25932ec094 | [
"MIT"
] | null | null | null | lib/DashboardService/DashboardServiceServer.py | eapearson/kbase-sdk-module-dashboard-service | c45562bcb78e3944e70d16ef55dfaa25932ec094 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import json
import os
import random as _random
import sys
import traceback
from getopt import getopt, GetoptError
from multiprocessing import Process
from os import environ
from wsgiref.simple_server import make_server
import requests as _requests
from json... | 38.097264 | 151 | 0.549705 |
7958af96652dc8b4cf01f7ae1d58396f49e55dfe | 3,019 | py | Python | graph_clustering/cluster_stats.py | ryota-sugimoto/virome_scripts | 161f9a71f6a1ea78c7028a29d0422bac50b167f5 | [
"MIT"
] | 1 | 2020-09-06T19:42:02.000Z | 2020-09-06T19:42:02.000Z | graph_clustering/cluster_stats.py | ryota-sugimoto/virome_scripts | 161f9a71f6a1ea78c7028a29d0422bac50b167f5 | [
"MIT"
] | null | null | null | graph_clustering/cluster_stats.py | ryota-sugimoto/virome_scripts | 161f9a71f6a1ea78c7028a29d0422bac50b167f5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('protospacers_bedfile',
type=argparse.FileType('r'))
parser.add_argument('cluster_file',
type=argparse.FileType('r'))
parser.add_argument('-t', '--min_co_occurance',
... | 30.806122 | 79 | 0.631666 |
7958b0ac5a70495dfaf05400ac4e7cbefaa0545d | 3,310 | py | Python | pypureclient/flasharray/FA_2_5/models/remote_protection_group_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_5/models/remote_protection_group_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_5/models/remote_protection_group_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 29.553571 | 150 | 0.563444 |
7958b20f29426ebecba4ff5e2c94c08fa7752c41 | 6,046 | py | Python | research/object_detection/utils/variables_helper.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | 1 | 2021-05-17T01:42:29.000Z | 2021-05-17T01:42:29.000Z | research/object_detection/utils/variables_helper.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | research/object_detection/utils/variables_helper.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.851351 | 88 | 0.680284 |
7958b2e1c498af4b3081d0f0b9df8088c1f03ba1 | 4,827 | py | Python | talent.py | Schinkenwurst/zbd_got_talent | f7f3de15f8a90f9cb1023c2ce868733d20febdd8 | [
"MIT"
] | null | null | null | talent.py | Schinkenwurst/zbd_got_talent | f7f3de15f8a90f9cb1023c2ce868733d20febdd8 | [
"MIT"
] | null | null | null | talent.py | Schinkenwurst/zbd_got_talent | f7f3de15f8a90f9cb1023c2ce868733d20febdd8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from tkinter import *
import pika
from threading import Thread
import simpleaudio as sa
#######################################################################
# Consumer for RabbitMQ
def amqp_consume():
# Callback on message
def onmessage(ch, method, properties, body):
body = body... | 28.732143 | 71 | 0.570955 |
7958b4350ce847609614ff05d065a1d98b75f119 | 952 | py | Python | isi_sdk_8_2_1/test/test_statistics_history_stat.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/test/test_statistics_history_stat.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/test/test_statistics_history_stat.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_1
from i... | 23.219512 | 100 | 0.720588 |
7958b49c69a794167eccaa70e2fcc90de2aebb0e | 26,125 | py | Python | tests/test_sanity.py | mehdisadeghi/emscripten | a3e96c3bd4751632de6e9d1d57172ac9429fcb2d | [
"MIT"
] | null | null | null | tests/test_sanity.py | mehdisadeghi/emscripten | a3e96c3bd4751632de6e9d1d57172ac9429fcb2d | [
"MIT"
] | null | null | null | tests/test_sanity.py | mehdisadeghi/emscripten | a3e96c3bd4751632de6e9d1d57172ac9429fcb2d | [
"MIT"
] | null | null | null | # Copyright 2013 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
import os
import platform
import shutil
import time
import re
import ... | 37.321429 | 175 | 0.670392 |
7958b4fd66eddc0589bd0cab9ffca0082b9c62bc | 467 | py | Python | backend/core/utils.py | jerkeeler/teeny-weeny-analytics | 677155c31c411d7d818b8c39f906c25e6fd9b23c | [
"MIT"
] | null | null | null | backend/core/utils.py | jerkeeler/teeny-weeny-analytics | 677155c31c411d7d818b8c39f906c25e6fd9b23c | [
"MIT"
] | 2 | 2020-02-11T23:24:10.000Z | 2020-06-05T19:27:32.000Z | backend/core/utils.py | jerkeeler/teeny-weeny-analytics | 677155c31c411d7d818b8c39f906c25e6fd9b23c | [
"MIT"
] | null | null | null | import random
from django.utils.text import slugify
from core.consts import SLUG_TOKEN_LENGTH, TOKEN_CHARS, TOKEN_LENGTH
def gen_token(token_length: int = TOKEN_LENGTH) -> str:
return ''.join([random.choice(TOKEN_CHARS) for _ in range(token_length)])
def gen_slug(attr: str, max_length: int = 32) -> str:
t... | 27.470588 | 77 | 0.734475 |
7958b53037bd6d5217c616d0e373ef655fca9074 | 900 | py | Python | spike/DataTools/UploadFolderToGD.py | jian-frank-cao/spike | a02f6d26f8705c79104110b07263f69199325093 | [
"MIT"
] | null | null | null | spike/DataTools/UploadFolderToGD.py | jian-frank-cao/spike | a02f6d26f8705c79104110b07263f69199325093 | [
"MIT"
] | null | null | null | spike/DataTools/UploadFolderToGD.py | jian-frank-cao/spike | a02f6d26f8705c79104110b07263f69199325093 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 24 09:38:58 2021
@author: Jian Cao
Move files from local folder to Google Drive
"""
from spike.DataTools import ConnectGoogleDrive
def UploadFolderToGD(token_path, source_path, gd_folder):
"""Move files from local folder to Google Drive
Parameters:
tok... | 28.125 | 66 | 0.671111 |
7958b88cbe8a1c6679297c33e29d31c62941132c | 440 | py | Python | backend/app/controllers/errorhandlers.py | DankanTsar/memesmerkatuan | 4654f1164930d2ee0241a3beeae5a1d28daa2e1e | [
"BSD-3-Clause"
] | null | null | null | backend/app/controllers/errorhandlers.py | DankanTsar/memesmerkatuan | 4654f1164930d2ee0241a3beeae5a1d28daa2e1e | [
"BSD-3-Clause"
] | null | null | null | backend/app/controllers/errorhandlers.py | DankanTsar/memesmerkatuan | 4654f1164930d2ee0241a3beeae5a1d28daa2e1e | [
"BSD-3-Clause"
] | null | null | null | from flask import render_template
from .. import app
from ..misc.cur_user import cur_user
@app.errorhandler(403)
def forbidden(e):
return render_template('errors/403.html', user=cur_user()), 403
@app.errorhandler(404)
def page_not_found(e):
return render_template('errors/404.html', user=cur_user()), 404
@... | 23.157895 | 67 | 0.75 |
7958b9df5a4cfc39e803ad5ee63151ab2074dcb8 | 7,534 | py | Python | vcs/testbench/remove_x.py | RISCVERS/pyverilog-helper | e4f0f365e7fc9be5fbdbad3cf962dc4581cae291 | [
"MulanPSL-1.0"
] | 2 | 2021-06-25T04:11:24.000Z | 2021-06-25T04:47:24.000Z | vcs/testbench/remove_x.py | RISCVERS/env-scripts | 84570153957797cdf585c0395ab45e5c8742907e | [
"MulanPSL-1.0"
] | null | null | null | vcs/testbench/remove_x.py | RISCVERS/env-scripts | 84570153957797cdf585c0395ab45e5c8742907e | [
"MulanPSL-1.0"
] | 1 | 2021-06-25T04:47:29.000Z | 2021-06-25T04:47:29.000Z | import sys
need_initial = [
# not initialized registers (from rocket-chip and chisel lib)
# (1) RRArbiter.lastGrant; (2) PLRU replacement init state
("`CORE.memBlock.dcache.missReqArb.lastGrant", 2),
("`CORE.memBlock.dcache.missQueue.pipe_req_arb.lastGrant", 4),
("`CORE.memBlock.dcache.storeReplayUnit.pipe_r... | 44.05848 | 125 | 0.675869 |
7958bace07c87257b2e8f00caa9c1995adf5fadb | 83 | py | Python | test.py | dbarroso1/Morti-OS-RTC | d4c0169d7f1e517caf6b1417fad70dea3debe784 | [
"MIT"
] | null | null | null | test.py | dbarroso1/Morti-OS-RTC | d4c0169d7f1e517caf6b1417fad70dea3debe784 | [
"MIT"
] | null | null | null | test.py | dbarroso1/Morti-OS-RTC | d4c0169d7f1e517caf6b1417fad70dea3debe784 | [
"MIT"
] | null | null | null | my_list = [1,2,3,4,5]
if 10 in my_list:
print(my_list)
else:
print('nope') | 13.833333 | 21 | 0.60241 |
7958becfef6d033be691cb049099f49b7058cfb6 | 359 | py | Python | tests/test_tes_tss.py | jergosh/pyranges | a401fd5bf1f6aa1a2546354a22d81e8c59a82114 | [
"MIT"
] | null | null | null | tests/test_tes_tss.py | jergosh/pyranges | a401fd5bf1f6aa1a2546354a22d81e8c59a82114 | [
"MIT"
] | null | null | null | tests/test_tes_tss.py | jergosh/pyranges | a401fd5bf1f6aa1a2546354a22d81e8c59a82114 | [
"MIT"
] | null | null | null | def test_five_end(f1):
result = f1.five_end(slack=5)
print(f1)
print(result)
assert list(result.Start) == [0, 3, 2]
assert list(result.End) == [9, 14, 13]
def test_three_end(f2):
print(f2)
result = f2.three_end(slack=500)
print(result)
assert list(result.Start) == [0, 0]
... | 16.318182 | 42 | 0.601671 |
7958bfd68b95549d4f012791688141df82febd50 | 1,642 | py | Python | fhirclient/models/medicinalproductundesirableeffect.py | zzhou41/client-py | cbfa8d7c7f1bad233b237b7c5582fc0577b21f70 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/medicinalproductundesirableeffect.py | zzhou41/client-py | cbfa8d7c7f1bad233b237b7c5582fc0577b21f70 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/medicinalproductundesirableeffect.py | zzhou41/client-py | cbfa8d7c7f1bad233b237b7c5582fc0577b21f70 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/MedicinalProductUndesirableEffect) on 2019-07-29.
# 2019, SMART Health IT.
import sys
from dataclasses import dataclass
from typing import ClassVar, Optional, List
from .fhirabstractbase imp... | 42.102564 | 130 | 0.737515 |
7958c17bf5445a014e8e24cbce72ac8b488b284c | 27,185 | py | Python | readthedocs/rtd_tests/tests/test_celery.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,092 | 2019-06-29T07:47:30.000Z | 2022-03-31T14:54:59.000Z | readthedocs/rtd_tests/tests/test_celery.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,389 | 2019-06-29T04:22:55.000Z | 2022-03-31T22:57:49.000Z | readthedocs/rtd_tests/tests/test_celery.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 1,185 | 2019-06-29T21:49:31.000Z | 2022-03-30T09:57:15.000Z | import os
import shutil
from os.path import exists
from tempfile import mkdtemp
from unittest import mock
from unittest.mock import MagicMock, patch
from allauth.socialaccount.models import SocialAccount
from django.conf import settings
from django.contrib.auth.models import User
from django.test import TestCase
from ... | 38.725071 | 100 | 0.618503 |
7958c2a137fd3682c21bde108045d7dc957a2a20 | 3,559 | py | Python | bindings/python/ensmallen/datasets/string/marinospirilluminsulare.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/marinospirilluminsulare.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/marinospirilluminsulare.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Marinospirillum insulare.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prote... | 32.953704 | 223 | 0.678561 |
7958c3903b3d63d29e127647bd0603187f137469 | 3,916 | py | Python | base/base/settings.py | daavelino/vulnerability-catalog | 61e0db9cc4656a16847ec635a4cac3e9a6c67dd4 | [
"MIT"
] | 12 | 2018-01-09T18:03:41.000Z | 2021-02-04T08:21:43.000Z | base/base/settings.py | daavelino/vulnerability-catalog | 61e0db9cc4656a16847ec635a4cac3e9a6c67dd4 | [
"MIT"
] | 21 | 2018-01-13T21:23:22.000Z | 2021-04-08T18:28:05.000Z | base/base/settings.py | daavelino/vulnerability-catalog | 61e0db9cc4656a16847ec635a4cac3e9a6c67dd4 | [
"MIT"
] | 7 | 2017-08-29T10:27:19.000Z | 2021-11-09T00:37:03.000Z | """
Django settings for base project.
For more information on this file, see
https://docs.djangoproject.com/en/3.2.3/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2.3/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_... | 24.475 | 91 | 0.710419 |
7958c3a1ee2104829abebc0979f00ff9a9518c2e | 103 | py | Python | clib/training/__init__.py | Swall0w/clib | 46f659783d5a0a6ec5994c3c707c1cc8a7934385 | [
"MIT"
] | 1 | 2017-08-27T00:01:27.000Z | 2017-08-27T00:01:27.000Z | clib/training/__init__.py | Swall0w/clib | 46f659783d5a0a6ec5994c3c707c1cc8a7934385 | [
"MIT"
] | 49 | 2017-08-20T02:09:26.000Z | 2017-12-31T11:58:27.000Z | clib/training/__init__.py | Swall0w/clib | 46f659783d5a0a6ec5994c3c707c1cc8a7934385 | [
"MIT"
] | 1 | 2017-12-08T08:31:38.000Z | 2017-12-08T08:31:38.000Z | from clib.training import dataset
from clib.training import iterator
from clib.training import updater
| 25.75 | 34 | 0.854369 |
7958c3e0a5e6843a712077f2682eb5a1644248d0 | 5,309 | py | Python | test/functional/rpc_preciousblock.py | valuero-org/valuero | c0a8d40d377c39792e5a79d4a67f00bc592aef87 | [
"MIT"
] | null | null | null | test/functional/rpc_preciousblock.py | valuero-org/valuero | c0a8d40d377c39792e5a79d4a67f00bc592aef87 | [
"MIT"
] | null | null | null | test/functional/rpc_preciousblock.py | valuero-org/valuero | c0a8d40d377c39792e5a79d4a67f00bc592aef87 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Copyright (c) 2017-2019 The Raven Core developers
# Copyright (c) 2018-2019 The Rito Core developers
# Copyright (c) 2019 The Valuero developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.... | 44.613445 | 127 | 0.670371 |
7958c49f40d607ac32aab3794bd041cbfe57b6c6 | 1,166 | py | Python | youtube_sync/formatter.py | tommygod3/youtube-sync | 613bed22df2befb208463f9e654f43f42ef649f3 | [
"MIT"
] | null | null | null | youtube_sync/formatter.py | tommygod3/youtube-sync | 613bed22df2befb208463f9e654f43f42ef649f3 | [
"MIT"
] | null | null | null | youtube_sync/formatter.py | tommygod3/youtube-sync | 613bed22df2befb208463f9e654f43f42ef649f3 | [
"MIT"
] | null | null | null | import os, re
from mutagen.mp3 import EasyMP3
regex_old = re.compile(r"^(?P<title>.*) - (?P<name>.*)-(?P<mess>.{11}).mp3$")
regex_new = re.compile(r"^(?P<name>.*) - (?P<title>.*)-(?P<mess>.{11}).mp3$")
for filename in os.listdir("."):
if '.mp3' in filename:
print(f"Old name: {filename}")
match_old... | 37.612903 | 84 | 0.554889 |
7958c5530eb8267b59051001c433338607f3f09f | 23,985 | py | Python | hottbox/algorithms/decomposition/cpd.py | adamurban98/hottbox | 26580018ec6d38a1b08266c04ce4408c9e276130 | [
"Apache-2.0"
] | 167 | 2018-05-07T10:31:00.000Z | 2022-02-24T19:20:31.000Z | hottbox/algorithms/decomposition/cpd.py | adamurban98/hottbox | 26580018ec6d38a1b08266c04ce4408c9e276130 | [
"Apache-2.0"
] | 19 | 2018-05-10T13:26:39.000Z | 2020-01-31T12:49:27.000Z | hottbox/algorithms/decomposition/cpd.py | adamurban98/hottbox | 26580018ec6d38a1b08266c04ce4408c9e276130 | [
"Apache-2.0"
] | 24 | 2018-04-02T17:16:50.000Z | 2021-12-07T06:21:40.000Z | import functools
import warnings
import numpy as np
from hottbox.utils.generation.basic import residual_tensor
from hottbox.core.structures import Tensor, TensorCPD
from hottbox.core.operations import khatri_rao, hadamard, sampled_khatri_rao
from .base import Decomposition, svd
# TODO: Need to add option of sorting v... | 39 | 119 | 0.574651 |
7958c6972800396d14317e36be3e2f5dfec5c63d | 1,037 | py | Python | src/vm/stack.py | mingz2013/lang-py | 1788bae92cbc8b5f3f99d9ae1c45ea116d870d91 | [
"Apache-2.0"
] | null | null | null | src/vm/stack.py | mingz2013/lang-py | 1788bae92cbc8b5f3f99d9ae1c45ea116d870d91 | [
"Apache-2.0"
] | null | null | null | src/vm/stack.py | mingz2013/lang-py | 1788bae92cbc8b5f3f99d9ae1c45ea116d870d91 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@FileName: stack
@Time: 2020/2/4 14:18
@Author: zhaojm
Module Description
"""
class StackNode(object):
def __get_d(self):
d = self.__dict__
d['__class_name__'] = self.__class__.__name__
return d
def __str__(self):
return str(self.__get_d())
... | 17.87931 | 53 | 0.583414 |
7958c70aded789ff0f34dab3625c58587e551999 | 2,802 | py | Python | rampwf/utils/pretty_print.py | mehdidc/ramp-workflow | 68146005369b31c1c855c2372172d355440994a1 | [
"BSD-3-Clause"
] | null | null | null | rampwf/utils/pretty_print.py | mehdidc/ramp-workflow | 68146005369b31c1c855c2372172d355440994a1 | [
"BSD-3-Clause"
] | null | null | null | rampwf/utils/pretty_print.py | mehdidc/ramp-workflow | 68146005369b31c1c855c2372172d355440994a1 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Utility methods to print the results in a terminal using term colors
"""
from __future__ import print_function
import numpy as np
from pandas import option_context
from colored import stylize, fg, attr
# Dictionary of term colors used for printing to terminal
fg_colors = {
'official_train': 'l... | 34.592593 | 75 | 0.598144 |
7958c74b2b84f29f1c972c3369debd283abe709c | 3,164 | py | Python | app.py | aewens/babili-bot | a28241c7180e2dc17b9fee71357bbb96d625532a | [
"BSD-3-Clause"
] | null | null | null | app.py | aewens/babili-bot | a28241c7180e2dc17b9fee71357bbb96d625532a | [
"BSD-3-Clause"
] | null | null | null | app.py | aewens/babili-bot | a28241c7180e2dc17b9fee71357bbb96d625532a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
from argparse import ArgumentParser
from os.path import dirname, realpath
from bot import Bot, Tasks, Responses
from actions import actions
from coroutines import coroutines
parser = ArgumentParser(description="A meta bot for ~team")
parser.add_argument(
"-c",
"--config",
dest="c... | 27.275862 | 77 | 0.631479 |
7958c7ca93bde48377c396c4f52f80ee133e0a08 | 8,522 | py | Python | backend/crypto_bot/management/commands/feed_exchange_history.py | landdafku11/cryptocurrencybot | d91976d4fb42c75632e92bf9dd2b183d584b0f89 | [
"MIT"
] | 1 | 2021-09-30T13:41:12.000Z | 2021-09-30T13:41:12.000Z | backend/crypto_bot/management/commands/feed_exchange_history.py | KangDo96/CryptoCurrencyBot | 3c5d347495b27c752016302fec761efc46daaae5 | [
"MIT"
] | null | null | null | backend/crypto_bot/management/commands/feed_exchange_history.py | KangDo96/CryptoCurrencyBot | 3c5d347495b27c752016302fec761efc46daaae5 | [
"MIT"
] | null | null | null | import os ,sys
import pprint
from django.conf import settings
import django
from django.core.management import BaseCommand, CommandError
main_folder = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(main_folder)
import ccxt
from services.ccxt_api import CCXTApiHandler as ha... | 43.258883 | 168 | 0.581906 |
7958c89e8f71092e3a6db5620b292ae3c0c4c6a4 | 33,336 | py | Python | tests/core/full_node/test_full_node_store.py | morrillup/chaingreen-blockchain | 0b2d008dd10228670decf360d21448a65fce48a4 | [
"Apache-2.0"
] | 1 | 2021-11-12T20:30:23.000Z | 2021-11-12T20:30:23.000Z | tests/core/full_node/test_full_node_store.py | morrillup/chaingreen-blockchain | 0b2d008dd10228670decf360d21448a65fce48a4 | [
"Apache-2.0"
] | null | null | null | tests/core/full_node/test_full_node_store.py | morrillup/chaingreen-blockchain | 0b2d008dd10228670decf360d21448a65fce48a4 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa: F811, F401
import asyncio
import atexit
import logging
from secrets import token_bytes
from typing import List, Optional
import pytest
from chaingreen.consensus.blockchain import ReceiveBlockResult
from chaingreen.consensus.multiprocess_validation import PreValidationResult
from chaingreen.consensus.p... | 44.746309 | 120 | 0.62773 |
7958c9e64466c108aab2695afeb3052514f6c64c | 7,472 | py | Python | cvxpy/constraints/exponential.py | ebezzam/cvxpy | 38f76c938bf19eed7fb0a39e7fd2395c8fc42489 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cvxpy/constraints/exponential.py | ebezzam/cvxpy | 38f76c938bf19eed7fb0a39e7fd2395c8fc42489 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cvxpy/constraints/exponential.py | ebezzam/cvxpy | 38f76c938bf19eed7fb0a39e7fd2395c8fc42489 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """
Copyright 2013 Steven Diamond
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, softwar... | 32.34632 | 81 | 0.560225 |
7958cbafa0726a863a840b7dbb240d776ec36e20 | 2,873 | py | Python | alghoritms.py | juliaaz/ADS_lab1 | 0029a1b9b8c9c5877c6bd9cb2642aca157ad6c17 | [
"MIT"
] | null | null | null | alghoritms.py | juliaaz/ADS_lab1 | 0029a1b9b8c9c5877c6bd9cb2642aca157ad6c17 | [
"MIT"
] | null | null | null | alghoritms.py | juliaaz/ADS_lab1 | 0029a1b9b8c9c5877c6bd9cb2642aca157ad6c17 | [
"MIT"
] | null | null | null | """
Module which implements different sorts of an array of n elements.
"""
import time
def selection_sort(lst):
'''
lst -> (lst, int)
Performs sorting by selection method.
Returns sorted array and number of comparisons made.
:param lst: list to be sorted.
:return: sorted lst and number of compa... | 26.601852 | 66 | 0.571876 |
7958cbe36129753e4b96eaa6f9a7c106b0dd909f | 71 | py | Python | Exercicios Python/ex047.py | ClaudioSiqueira/Exercicios-Python | 128387769b34b7d42aee5c1effda16de21216e10 | [
"MIT"
] | null | null | null | Exercicios Python/ex047.py | ClaudioSiqueira/Exercicios-Python | 128387769b34b7d42aee5c1effda16de21216e10 | [
"MIT"
] | null | null | null | Exercicios Python/ex047.py | ClaudioSiqueira/Exercicios-Python | 128387769b34b7d42aee5c1effda16de21216e10 | [
"MIT"
] | null | null | null | from time import sleep
for c in range(0, 51, 2):
print(c, end=' ')
| 17.75 | 25 | 0.605634 |
7958cbf1817bf7ac193f0098a883dc351e3eea6e | 17,715 | py | Python | a_star_n_puzzle.py | eugenechantk/cs152-harnessing-ai-algorithm | 5b8ff485c49e6c91699b2d72c2d6645e7aa6367c | [
"MIT"
] | null | null | null | a_star_n_puzzle.py | eugenechantk/cs152-harnessing-ai-algorithm | 5b8ff485c49e6c91699b2d72c2d6645e7aa6367c | [
"MIT"
] | null | null | null | a_star_n_puzzle.py | eugenechantk/cs152-harnessing-ai-algorithm | 5b8ff485c49e6c91699b2d72c2d6645e7aa6367c | [
"MIT"
] | 1 | 2018-10-25T15:53:43.000Z | 2018-10-25T15:53:43.000Z | import heapq
import numpy as np
import time
def flatten(board):
# if it's nested lists, flatten them. I do this with list comprehension taking each tile at a time from each sublist
if type(board[1])==list:
board = [item for sublist in board for item in sublist]
# else, it should be a list of ints ... | 35.43 | 135 | 0.606266 |
7958cc9cda9df94ef07f1e1d1ba36279762d1f67 | 12,387 | py | Python | eureka/S5_lightcurve_fitting/plots_s5.py | astrojake/Eureka | 57cb0f1a576dfbbef9ba616b7a13a28c42efb876 | [
"MIT"
] | null | null | null | eureka/S5_lightcurve_fitting/plots_s5.py | astrojake/Eureka | 57cb0f1a576dfbbef9ba616b7a13a28c42efb876 | [
"MIT"
] | null | null | null | eureka/S5_lightcurve_fitting/plots_s5.py | astrojake/Eureka | 57cb0f1a576dfbbef9ba616b7a13a28c42efb876 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import corner
from scipy import stats
from copy import deepcopy
from .likelihood import computeRMS
from .utils import COLORS
def plot_fit(lc, model, meta, fitter, isTitle=True):
"""Plot the fitted model over the data. (Fig 5100)
Parameters
----------
... | 35.800578 | 148 | 0.602325 |
7958ccefc2462f91a6d124ffb52d09065c97b19e | 6,342 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/advpls_5dde8265ff1ecdeb96de20b298f80538.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/advpls_5dde8265ff1ecdeb96de20b298f80538.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/advpls_5dde8265ff1ecdeb96de20b298f80538.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 38.436364 | 187 | 0.660833 |
7958cdbbdf26a7d16d56bba8accd4a23cd3e4a74 | 19,177 | py | Python | integration_tests/test_suites/celery-k8s-integration-test-suite/test_integration.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | integration_tests/test_suites/celery-k8s-integration-test-suite/test_integration.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | integration_tests/test_suites/celery-k8s-integration-test-suite/test_integration.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | # pylint doesn't know about pytest fixtures
# pylint: disable=unused-argument
import datetime
import os
import time
import boto3
import pytest
from dagster import DagsterEventType
from dagster.core.storage.pipeline_run import PipelineRunStatus
from dagster.core.storage.tags import DOCKER_IMAGE_TAG
from dagster.core.te... | 37.974257 | 100 | 0.655316 |
7958d02a6b13ff5846dece7f43f5a1a4e7749b3b | 10,010 | py | Python | wagtail/contrib/sitemaps/tests.py | Nawarrr/wagtail | 4db71de5a2af19086026605be8fcb92c4be623aa | [
"BSD-3-Clause"
] | null | null | null | wagtail/contrib/sitemaps/tests.py | Nawarrr/wagtail | 4db71de5a2af19086026605be8fcb92c4be623aa | [
"BSD-3-Clause"
] | null | null | null | wagtail/contrib/sitemaps/tests.py | Nawarrr/wagtail | 4db71de5a2af19086026605be8fcb92c4be623aa | [
"BSD-3-Clause"
] | null | null | null | import datetime
import pytz
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.shortcuts import get_current_site
from django.test import RequestFactory, TestCase, override_settings
from django.utils import timezone
from wagtail.core.models import Page... | 35 | 91 | 0.61978 |
7958d26558926feff1845e9c57a0580d3c94fca6 | 1,913 | py | Python | python/GafferDispatchUITest/__init__.py | sebaDesmet/gaffer | 47b2d093c40452bd77947e3b5bd0722a366c8d59 | [
"BSD-3-Clause"
] | 1 | 2016-07-31T09:55:09.000Z | 2016-07-31T09:55:09.000Z | python/GafferDispatchUITest/__init__.py | rkoschmitzky/gaffer | ec6262ae1292767bdeb9520d1447d65a4a511884 | [
"BSD-3-Clause"
] | 2 | 2017-08-23T21:35:45.000Z | 2018-01-29T08:59:33.000Z | python/GafferDispatchUITest/__init__.py | rkoschmitzky/gaffer | ec6262ae1292767bdeb9520d1447d65a4a511884 | [
"BSD-3-Clause"
] | 1 | 2020-12-21T12:33:49.000Z | 2020-12-21T12:33:49.000Z | ##########################################################################
#
# Copyright (c) 2015, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | 44.488372 | 77 | 0.687925 |
7958d3abcba282265d44d1f4bc2a059eae35b2f2 | 297 | py | Python | jobsapp/migrations/0015_delete_applicant1.py | Deepanjalli/job_portal6 | 2869de5dca16a88f840ce0e4a26fe2edba3e9cae | [
"MIT"
] | null | null | null | jobsapp/migrations/0015_delete_applicant1.py | Deepanjalli/job_portal6 | 2869de5dca16a88f840ce0e4a26fe2edba3e9cae | [
"MIT"
] | 4 | 2020-06-06T01:42:22.000Z | 2021-09-08T01:50:57.000Z | jobsapp/migrations/0015_delete_applicant1.py | Deepanjalli/job_portal6 | 2869de5dca16a88f840ce0e4a26fe2edba3e9cae | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-02-21 07:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('jobsapp', '0014_auto_20200221_0651'),
]
operations = [
migrations.DeleteModel(
name='Applicant1',
),
]
| 17.470588 | 47 | 0.609428 |
7958d44d161db8cbcc45bb2365bbc211564f09a6 | 5,659 | py | Python | SOFTWARE/Python/pyA20/pyA20/utilities/color.py | GitHubRepoDescription/OLINUXINO-forked | 7b7587c3b1b96af5c2eccef671449a4a4f6b993b | [
"Unlicense"
] | 880 | 2015-01-05T08:44:23.000Z | 2022-03-25T09:09:19.000Z | SOFTWARE/Python/pyA20/pyA20/utilities/color.py | tinkertux/OLINUXINO | b4bd32fef9218f9210aedf321286f8c50ca52259 | [
"Unlicense"
] | 79 | 2017-09-28T02:34:36.000Z | 2021-12-06T10:03:52.000Z | SOFTWARE/Python/pyA20/pyA20/utilities/color.py | tinkertux/OLINUXINO | b4bd32fef9218f9210aedf321286f8c50ca52259 | [
"Unlicense"
] | 672 | 2015-01-04T06:30:01.000Z | 2022-03-29T10:47:59.000Z | __author__ = 'stefan'
class Colors:
def __init__(self):
self = self
def test(self):
print "Regular"
print self.Black + "Black" + self.Color_Off
print self.Red + "Red" + self.Color_Off
print self.Green + "Green" + self.Color_Off
print self.Yellow + "Yellow" + se... | 36.275641 | 61 | 0.582435 |
7958d6e9a3dcff58ac4799e8c64ccd26e3fe19e5 | 2,382 | py | Python | scripts/qt1/pyqt_sw08_LCD_Slider_Sender.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt1/pyqt_sw08_LCD_Slider_Sender.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt1/pyqt_sw08_LCD_Slider_Sender.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QWidget, QLCDNumber, QSlider,
QPushButton, QVBoxLayout,
QHBoxLayout, QApplication, QLabel)
class Example(QWidget):
def __init__(self): # Konstrukor
# OJ super(... | 29.407407 | 63 | 0.555835 |
7958d6ee4dff75ffea481b6e6822470ff72b43c2 | 7,430 | py | Python | tests/e2e/logging/test_openshift-logging.py | b-ranto/ocs-ci | 75cc7c1b58f0d2d9c428bdfb3e9a204639c592c1 | [
"MIT"
] | null | null | null | tests/e2e/logging/test_openshift-logging.py | b-ranto/ocs-ci | 75cc7c1b58f0d2d9c428bdfb3e9a204639c592c1 | [
"MIT"
] | null | null | null | tests/e2e/logging/test_openshift-logging.py | b-ranto/ocs-ci | 75cc7c1b58f0d2d9c428bdfb3e9a204639c592c1 | [
"MIT"
] | null | null | null | """
This file contains the testcases for openshift-logging
"""
import logging
import pytest
import random
from tests import helpers, disruption_helpers
from ocs_ci.ocs import constants
from ocs_ci.ocs.resources.pod import get_all_pods, get_pod_obj
from ocs_ci.utility.retry import retry
from ocs_ci.framework.testli... | 35.21327 | 93 | 0.679677 |
7958d717c5e32215c7397d3fabafb1f9b71cf8e0 | 344 | py | Python | Codewars/Test/Array_leaders_array_series_3_test.py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | Codewars/Test/Array_leaders_array_series_3_test.py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | Codewars/Test/Array_leaders_array_series_3_test.py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | import unittest
from Array_leaders_array_series_3_ import array_leaders2
class Array_Leader(unittest.TestCase):
def test_1(self):
self.assertEqual(array_leaders2([0, -29, 3]), [0, 3])
def test_2(self):
self.assertEqual(array_leaders2([0,1, 2, 3, 4]), [4])
if __name__ == '__main__':
... | 28.666667 | 65 | 0.656977 |
7958d8aa71573dfc5469fc07e9691ec050d207e2 | 7,084 | py | Python | discord/models/emoji.py | sakurazaki/discord-continued | 7210363f3a531879fbff8be35b346a272f1845c9 | [
"MIT"
] | null | null | null | discord/models/emoji.py | sakurazaki/discord-continued | 7210363f3a531879fbff8be35b346a272f1845c9 | [
"MIT"
] | null | null | null | discord/models/emoji.py | sakurazaki/discord-continued | 7210363f3a531879fbff8be35b346a272f1845c9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .asset import Asset
from . import utils
from .partial_emoji import _EmojiTag
from .user import User
class Emoji(_EmojiTag):
"""Represents a custom emoji.
Depending on the way this object was created, some of the attributes can
have a value of ``None``.
.. container:: ope... | 30.934498 | 117 | 0.582722 |
7958d9d533bfba560da54eb8f9174606cf1da719 | 1,249 | py | Python | deepocr/utils/fonts.py | das-projects/deepOCR | ffc6db691605b7b4837da9619ab6e918fa1c18de | [
"Apache-2.0"
] | 1 | 2022-01-28T09:48:34.000Z | 2022-01-28T09:48:34.000Z | deepocr/utils/fonts.py | das-projects/deepOCR | ffc6db691605b7b4837da9619ab6e918fa1c18de | [
"Apache-2.0"
] | null | null | null | deepocr/utils/fonts.py | das-projects/deepOCR | ffc6db691605b7b4837da9619ab6e918fa1c18de | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2022, Arijit Das.
# Code adapted from doctr and huggingface
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
import logging
import platform
from typing import Optional
from PIL import Image... | 32.025641 | 113 | 0.659728 |
7958da063f16f9d2135f735adeaacf714e071f8d | 6,838 | py | Python | Register.py | arshita1123/Student-Result-Management-System | 4d5f64796ed3b1060c05cb8724381cefcd126158 | [
"BSD-3-Clause"
] | null | null | null | Register.py | arshita1123/Student-Result-Management-System | 4d5f64796ed3b1060c05cb8724381cefcd126158 | [
"BSD-3-Clause"
] | null | null | null | Register.py | arshita1123/Student-Result-Management-System | 4d5f64796ed3b1060c05cb8724381cefcd126158 | [
"BSD-3-Clause"
] | null | null | null | from tkinter import *
from PIL import Image,ImageTk
from tkinter import ttk,messagebox
import sqlite3
import os
class register_ui:
def __init__(self,root):
self.root=root
self.root.title("Registeration Window")
self.root.geometry("1350x700+0+0")
self.root.config(bg='white')
... | 43.278481 | 235 | 0.597836 |
7958da85d573b212e0b1c0bcd8122d19e9ec3a7b | 3,670 | py | Python | src/transformers/models/blenderbot/convert_blenderbot_original_pytorch_checkpoint_to_pytorch.py | sunjiao123sun/transformers | c994eca173f0eaf818caf4cc93148a4b040a6b04 | [
"Apache-2.0"
] | 2 | 2019-04-12T12:22:38.000Z | 2019-07-15T02:49:42.000Z | src/transformers/models/blenderbot/convert_blenderbot_original_pytorch_checkpoint_to_pytorch.py | evanzd/transformers | c60e0e1ee45f4bf1017736b146c51729f120bb83 | [
"Apache-2.0"
] | 2 | 2022-01-13T04:20:10.000Z | 2022-03-12T01:04:07.000Z | src/transformers/models/blenderbot/convert_blenderbot_original_pytorch_checkpoint_to_pytorch.py | evanzd/transformers | c60e0e1ee45f4bf1017736b146c51729f120bb83 | [
"Apache-2.0"
] | 1 | 2022-02-22T08:18:08.000Z | 2022-02-22T08:18:08.000Z | # coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# 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... | 31.913043 | 111 | 0.676022 |
7958da87b25f428e3a4969ae29e9a5065e3d6493 | 951 | py | Python | yang_modules/pyangbind_demo.py | ksator/automation_and_telemetry_workshop | ecc29115f590837bc12ba51a6a98986981799048 | [
"Apache-2.0"
] | 7 | 2021-05-27T09:13:07.000Z | 2022-01-09T13:15:24.000Z | yang_modules/pyangbind_demo.py | ksator/automation_and_telemetry_workshop | ecc29115f590837bc12ba51a6a98986981799048 | [
"Apache-2.0"
] | null | null | null | yang_modules/pyangbind_demo.py | ksator/automation_and_telemetry_workshop | ecc29115f590837bc12ba51a6a98986981799048 | [
"Apache-2.0"
] | 1 | 2021-06-29T16:01:38.000Z | 2021-06-29T16:01:38.000Z | from oc_bgp import openconfig_bgp
import pyangbind.lib.pybindJSON as pybindJSON
oc=openconfig_bgp()
oc.bgp.global_.config.as_="65002"
oc.bgp.peer_groups.peer_group.add("XYZ")
oc.bgp.peer_groups.peer_group["XYZ"].config.peer_group_name="XYZ"
oc.bgp.peer_groups.peer_group["XYZ"].config.peer_as=65002
oc.bgp.neighbors.... | 33.964286 | 80 | 0.760252 |
7958da8827a3dc3d948eba6118b9337b8fbf2985 | 2,858 | py | Python | tests/components/sleepiq/test_init.py | zalke/home-assistant | a31e49c857722c0723dc5297cd83cbce0f8716f6 | [
"Apache-2.0"
] | 2 | 2019-07-28T18:56:14.000Z | 2019-07-28T18:56:17.000Z | tests/components/sleepiq/test_init.py | zalke/home-assistant | a31e49c857722c0723dc5297cd83cbce0f8716f6 | [
"Apache-2.0"
] | null | null | null | tests/components/sleepiq/test_init.py | zalke/home-assistant | a31e49c857722c0723dc5297cd83cbce0f8716f6 | [
"Apache-2.0"
] | 1 | 2018-04-29T02:14:32.000Z | 2018-04-29T02:14:32.000Z | """The tests for the SleepIQ component."""
import unittest
from unittest.mock import MagicMock, patch
import requests_mock
from homeassistant import setup
import homeassistant.components.sleepiq as sleepiq
from tests.common import load_fixture, get_test_home_assistant
def mock_responses(mock, single=False):
""... | 32.850575 | 79 | 0.63296 |
7958da97cbe31bc01b58ce683cb003a54bd1dedd | 2,094 | py | Python | plugins/cortex_v2/komand_cortex_v2/connection/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/cortex_v2/komand_cortex_v2/connection/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/cortex_v2/komand_cortex_v2/connection/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Input:
API_KEY = "api_key"
HOST = "host"
PORT = "port"
PROTOCOL = "protocol"
PROXY = "proxy"
VERIFY = "verify"
class ConnectionSchema(komand.Input):
schema = json.loads("""
{
"type": "object",
"title": "Va... | 21.8125 | 131 | 0.505731 |
7958db603c6b3fd3c19a7c75dc92c195bbc21ab8 | 524 | py | Python | invera/task/migrations/0005_auto_20210112_2300.py | LeoLeiva/todo-challenge | f6f24f53758eb4e425c91516bcab7af8cad66814 | [
"MIT"
] | null | null | null | invera/task/migrations/0005_auto_20210112_2300.py | LeoLeiva/todo-challenge | f6f24f53758eb4e425c91516bcab7af8cad66814 | [
"MIT"
] | null | null | null | invera/task/migrations/0005_auto_20210112_2300.py | LeoLeiva/todo-challenge | f6f24f53758eb4e425c91516bcab7af8cad66814 | [
"MIT"
] | 1 | 2021-01-10T20:19:42.000Z | 2021-01-10T20:19:42.000Z | # Generated by Django 2.2.17 on 2021-01-13 02:00
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('task', '0004_auto_20210112_1842'),
]
operations = [
migrations.AlterField(
... | 24.952381 | 131 | 0.645038 |
7958dbaad853c6b30095cb293f9387bb9c73d13b | 2,294 | py | Python | main.py | johndpope/StyleSegments | f6f63df0806c0c90db31f51c64fefe299cdec36a | [
"Unlicense",
"MIT"
] | 1 | 2021-01-15T20:05:45.000Z | 2021-01-15T20:05:45.000Z | main.py | johndpope/StyleSegments | f6f63df0806c0c90db31f51c64fefe299cdec36a | [
"Unlicense",
"MIT"
] | 1 | 2021-01-20T08:45:32.000Z | 2021-01-21T11:04:16.000Z | main.py | johndpope/StyleSegments | f6f63df0806c0c90db31f51c64fefe299cdec36a | [
"Unlicense",
"MIT"
] | 2 | 2021-01-15T20:05:51.000Z | 2021-01-20T03:19:06.000Z | from config import images_paths, ims_config, combined_folder, overwrite, mask_blur_size
from segmentation.segment_image import transfer_styles
from style_transfer.style_transfer import StyleTransferModel
import cv2
import numpy as np
from pathlib import Path
if __name__ == "__main__":
# Get all the masks
mask... | 44.115385 | 110 | 0.597646 |
7958dc544bd682861b4101d3e9a76f5a80a56fed | 4,542 | py | Python | usdmanager/constants.py | J-Mo63/usdmanager | 6ded425e8c47f5e81be5252aeba9698a64808978 | [
"Apache-2.0"
] | 215 | 2019-03-29T20:45:40.000Z | 2022-03-22T12:00:32.000Z | usdmanager/constants.py | J-Mo63/usdmanager | 6ded425e8c47f5e81be5252aeba9698a64808978 | [
"Apache-2.0"
] | 19 | 2019-03-29T21:40:00.000Z | 2022-03-23T16:35:57.000Z | usdmanager/constants.py | J-Mo63/usdmanager | 6ded425e8c47f5e81be5252aeba9698a64808978 | [
"Apache-2.0"
] | 33 | 2019-03-29T21:47:55.000Z | 2022-03-21T21:57:21.000Z | #
# Copyright 2018 DreamWorks Animation L.L.C.
#
# 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 agre... | 46.824742 | 170 | 0.690004 |
7958dc7614a600a58910dad733ec3b2a18e8a5e3 | 75,166 | py | Python | pyNastran/converters/nastran/gui/results_helper.py | 214929177/pyNastran | 73032d6ffd445ef085c124dde6b5e90a516a5b6a | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/nastran/gui/results_helper.py | 214929177/pyNastran | 73032d6ffd445ef085c124dde6b5e90a516a5b6a | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/nastran/gui/results_helper.py | 214929177/pyNastran | 73032d6ffd445ef085c124dde6b5e90a516a5b6a | [
"BSD-3-Clause"
] | 1 | 2021-10-14T03:52:44.000Z | 2021-10-14T03:52:44.000Z | """Interface for converting OP2 results to the GUI format"""
# pylint: disable=C1801, C0103
from __future__ import annotations
import os
from collections import defaultdict
from typing import Tuple, Dict, Union, Any, TYPE_CHECKING
import numpy as np
from numpy.linalg import norm # type: ignore
from pyNastran.gui.gui... | 42.109804 | 114 | 0.53455 |
7958dd41fb2288ae2f41529307079d4faef1b564 | 4,388 | py | Python | tools/buildgen/plugins/expand_version.py | warlock135/grpc | 81e13e4fa9c0cdf7dc131ce548e1604c895b738c | [
"Apache-2.0"
] | 36,552 | 2015-02-26T17:30:13.000Z | 2022-03-31T22:41:33.000Z | tools/buildgen/plugins/expand_version.py | SanjanaSingh897/grpc | 2d858866eb95ce5de8ccc8c35189a12733d8ca79 | [
"Apache-2.0"
] | 23,536 | 2015-02-26T17:50:56.000Z | 2022-03-31T23:39:42.000Z | tools/buildgen/plugins/expand_version.py | SanjanaSingh897/grpc | 2d858866eb95ce5de8ccc8c35189a12733d8ca79 | [
"Apache-2.0"
] | 11,050 | 2015-02-26T17:22:10.000Z | 2022-03-31T10:12:35.000Z | # Copyright 2016 gRPC authors.
#
# 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... | 33.242424 | 83 | 0.572926 |
7958de1e7635485bb26b663f83e5e2db7bbd6d6a | 1,751 | py | Python | helpers/users_resource_helper.py | maxazure/papers | d58267d86a522316f2a32128d9f9c82feee08bcc | [
"MIT"
] | null | null | null | helpers/users_resource_helper.py | maxazure/papers | d58267d86a522316f2a32128d9f9c82feee08bcc | [
"MIT"
] | null | null | null | helpers/users_resource_helper.py | maxazure/papers | d58267d86a522316f2a32128d9f9c82feee08bcc | [
"MIT"
] | null | null | null | from flask_restful import fields, reqparse, inputs
from models.user import User
paginate_fields = {
'total': fields.Integer,
'pageSize': fields.Integer,
'current': fields.Integer
}
user_fields = {
'id': fields.Integer,
'name': fields.String,
'email': fields.String,
'intro': fields.String... | 19.032609 | 65 | 0.70988 |
7958de4d51c3a4fc21da6eba81ad18baa57e3921 | 3,309 | py | Python | Bio/Graphics/GenomeDiagram/_CrossLink.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 2,856 | 2015-01-01T07:10:06.000Z | 2022-03-31T18:17:25.000Z | Bio/Graphics/GenomeDiagram/_CrossLink.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 3,429 | 2015-01-05T11:11:42.000Z | 2022-03-31T13:08:10.000Z | Bio/Graphics/GenomeDiagram/_CrossLink.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 1,619 | 2015-01-05T13:07:11.000Z | 2022-03-31T19:19:52.000Z | # Copyright 2011-2017 by Peter Cock. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Genome Diagram Featu... | 32.762376 | 82 | 0.591115 |
7958df5384ef5f790b3b5a58777975ae7ccebd3a | 330 | py | Python | core/forms.py | Kaue-Silva/Site_Lembretes | 006ce55468e88eb762bf303ddb4dbfb9270c5a52 | [
"MIT"
] | null | null | null | core/forms.py | Kaue-Silva/Site_Lembretes | 006ce55468e88eb762bf303ddb4dbfb9270c5a52 | [
"MIT"
] | null | null | null | core/forms.py | Kaue-Silva/Site_Lembretes | 006ce55468e88eb762bf303ddb4dbfb9270c5a52 | [
"MIT"
] | null | null | null | from django.contrib.auth import forms
from django import forms
from .models import Lembrete
class LembreteForm(forms.ModelForm):
class Meta:
model = Lembrete
fields = ['titulo', 'descricao', 'data_hora']
widgets = {
'data_hora': forms.TextInput(attrs={'type':'datetime-local'})
... | 25.384615 | 73 | 0.642424 |
7958e0dcd2bbb3124402c9adfba2da4339ba9b00 | 764 | py | Python | .history/List of Capstone Projects/prime_factorization_20200516165159.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | 1 | 2020-05-18T17:50:00.000Z | 2020-05-18T17:50:00.000Z | .history/List of Capstone Projects/prime_factorization_20200516165159.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | .history/List of Capstone Projects/prime_factorization_20200516165159.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | '''
Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them.
'''
import HeaderOfFiles
def prime_factor(number):
'''
Finding and display all Prime Factors
'''
my_list = []
i = 2
while i < number + 1:
if number % i == 0:
... | 22.470588 | 114 | 0.527487 |
7958e16aaeb1bc6305f5a37d351aecdfd108f91f | 2,111 | py | Python | visualiser/facades/ociLoadBalancerHost.py | antoniogomezr/oci-designer-tookit | 0f8756bf778cbbc923df2020ea11cf384e855590 | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | visualiser/facades/ociLoadBalancerHost.py | antoniogomezr/oci-designer-tookit | 0f8756bf778cbbc923df2020ea11cf384e855590 | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | visualiser/facades/ociLoadBalancerHost.py | antoniogomezr/oci-designer-tookit | 0f8756bf778cbbc923df2020ea11cf384e855590 | [
"UPL-1.0",
"Apache-2.0"
] | 1 | 2020-11-18T05:50:53.000Z | 2020-11-18T05:50:53.000Z | #!/usr/bin/python
# Copyright (c) 2020, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
"""Provide Module Description
"""
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
__author__ = ["Ulr... | 34.606557 | 121 | 0.65514 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.