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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794bf782ce2a8cb0a8c1657dfc84d12a79b74150 | 70,771 | py | Python | src/sage/schemes/elliptic_curves/period_lattice.py | rekhabiswal/sage | e8633b09919542a65e7e990c8369fee30c7edefd | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/elliptic_curves/period_lattice.py | rekhabiswal/sage | e8633b09919542a65e7e990c8369fee30c7edefd | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/elliptic_curves/period_lattice.py | rekhabiswal/sage | e8633b09919542a65e7e990c8369fee30c7edefd | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Period lattices of elliptic curves and related functions
Let `E` be an elliptic curve defined over a number field `K`
(including `\QQ`). We attach a period lattice (a discrete rank 2
subgroup of `\CC`) to each embedding of `K` into `\CC`.
In the case of real embeddings, the lattice is st... | 36.745067 | 619 | 0.57265 |
794bf7af7df759e8ac5f2051df559272cbad0c82 | 3,525 | py | Python | ggpy/gdl/parser.py | hobson/ggpy | 4e6e6e876c3a4294cd711647051da2d9c1836b60 | [
"MIT"
] | 1 | 2015-01-26T19:07:45.000Z | 2015-01-26T19:07:45.000Z | ggpy/gdl/parser.py | hobson/ggpy | 4e6e6e876c3a4294cd711647051da2d9c1836b60 | [
"MIT"
] | null | null | null | ggpy/gdl/parser.py | hobson/ggpy | 4e6e6e876c3a4294cd711647051da2d9c1836b60 | [
"MIT"
] | null | null | null | import pyparsing as pp
MAX_NUM_ARGS = 1000000000 # max of 1 billion arguments for any function (relation constant)
# function constants are usually lowercase, but haven't found that as a hard requirement in the spec
function_constant = pp.Word(pp.srange("[A-Za-z]"), pp.srange("[a-zA-Z0-9_]"))
identifier = pp.Word(pp... | 50.357143 | 144 | 0.693333 |
794bf90a2671b20a134852bf93423ab8ff795de3 | 6,672 | py | Python | tests/mqtt/test_connect.py | edenhaus/amqtt | ecf64a4f82c5d4c10974bce4d3f75f7563d6170b | [
"MIT"
] | 29 | 2021-03-13T20:24:21.000Z | 2022-03-23T02:41:06.000Z | tests/mqtt/test_connect.py | edenhaus/amqtt | ecf64a4f82c5d4c10974bce4d3f75f7563d6170b | [
"MIT"
] | 74 | 2021-03-13T14:11:43.000Z | 2022-03-27T22:07:38.000Z | tests/mqtt/test_connect.py | edenhaus/amqtt | ecf64a4f82c5d4c10974bce4d3f75f7563d6170b | [
"MIT"
] | 19 | 2021-03-14T10:46:07.000Z | 2022-03-26T18:46:36.000Z | # Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
import unittest
import asyncio
from amqtt.mqtt.connect import ConnectPacket, ConnectVariableHeader, ConnectPayload
from amqtt.mqtt.packet import MQTTFixedHeader, CONNECT
from amqtt.adapters import BufferReader
class ConnectPack... | 51.72093 | 136 | 0.732464 |
794bf959cfeb0c139c7d71d78ab0a4cbeb5e84b3 | 665 | py | Python | pytest_splinter/splinter_patches.py | mpasternak/pytest-splinter | 6908f852629d593799dcd42ebc2e766f05849e20 | [
"MIT"
] | 226 | 2015-01-04T05:11:51.000Z | 2022-03-24T18:44:34.000Z | pytest_splinter/splinter_patches.py | mpasternak/pytest-splinter | 6908f852629d593799dcd42ebc2e766f05849e20 | [
"MIT"
] | 133 | 2015-01-18T17:38:11.000Z | 2022-01-21T21:42:52.000Z | pytest_splinter/splinter_patches.py | mpasternak/pytest-splinter | 6908f852629d593799dcd42ebc2e766f05849e20 | [
"MIT"
] | 59 | 2015-01-28T02:15:37.000Z | 2022-01-22T14:12:56.000Z | """Patches for splinter."""
from functools import partial
from splinter.driver.webdriver import firefox
from selenium.webdriver.common.action_chains import ActionChains # pragma: no cover
def patch_webdriverelement(): # pragma: no cover
"""Patch the WebDriverElement to allow firefox to use mouse_over."""
... | 30.227273 | 84 | 0.697744 |
794bf969a22618dc2a280014e25fceda568b9708 | 801 | py | Python | shipment.py | aroraumang/nereid-webshop | 51ab34b6d3f47362637812c834f91218954b6402 | [
"BSD-3-Clause"
] | 20 | 2015-04-18T14:41:06.000Z | 2022-02-01T20:31:32.000Z | shipment.py | aroraumang/nereid-webshop | 51ab34b6d3f47362637812c834f91218954b6402 | [
"BSD-3-Clause"
] | 111 | 2015-01-01T07:48:37.000Z | 2015-08-07T12:40:47.000Z | shipment.py | aroraumang/nereid-webshop | 51ab34b6d3f47362637812c834f91218954b6402 | [
"BSD-3-Clause"
] | 17 | 2015-01-15T11:35:22.000Z | 2020-08-31T13:46:34.000Z | # -*- coding: utf-8 -*-
'''
shipment
:copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Ltd.
:license: GPLv3, see LICENSE for more details
'''
from trytond.model import ModelView, Workflow
from trytond.pool import PoolMeta
__metaclass__ = PoolMeta
__all__ = ['ShipmentOut']
class ShipmentOu... | 22.25 | 71 | 0.642946 |
794bfa39d06a67dc3c9d637fdd59f4e5c24a2d12 | 12,342 | py | Python | main.py | 36base/36base-kakaotalk-bot | 64bfa4f77a08c6802ffdbf60ae7221e7c792bc80 | [
"MIT"
] | 7 | 2018-08-26T07:55:18.000Z | 2019-04-05T08:51:25.000Z | main.py | 36base/36base-kakaotalk-bot | 64bfa4f77a08c6802ffdbf60ae7221e7c792bc80 | [
"MIT"
] | 2 | 2018-08-13T16:06:12.000Z | 2018-09-29T03:27:43.000Z | main.py | 36base/36base-kakaotalk-bot | 64bfa4f77a08c6802ffdbf60ae7221e7c792bc80 | [
"MIT"
] | 2 | 2018-08-17T15:02:43.000Z | 2018-08-26T07:55:23.000Z | from flask import Flask, request, jsonify
from chatterbox import *
import girlsfrontline_core_python as gfl_core
import re
import logging
import json
import urllib
import pymysql
from logging_db import MySQLHandler
from ranking_poll import EventRankPoll
import static_resp as rp
import kakao_vision as kv
application =... | 33.177419 | 114 | 0.595284 |
794bfa3cbe453abd9e1df0e4557117664d3da67a | 430 | py | Python | Dataset/Leetcode/train/78/628.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/78/628.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/78/628.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, nums: List[int]) -> List[List[int]]:
n=len(nums)
all_prob=2**n
ans=list()
for i in range(all_prob):
temp=[]
bit=bin(i)[2:][::-1]
index=0
while(index<len(bit)):
if bit[index]=='1':
... | 25.294118 | 54 | 0.423256 |
794bfb426d52ad43e3e2f35e2437243e352e4c07 | 291 | py | Python | Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/07-Pydantic-Models/schemas.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/07-Pydantic-Models/schemas.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/07-Pydantic-Models/schemas.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | from pydantic import BaseModel
from datetime import datetime
class PostBase(BaseModel):
title: str
content: str
published: bool = True
class PostCreate(PostBase):
pass
class Post(PostBase):
id: int
create_at: datetime
class Config:
orm_mode = True
| 13.857143 | 30 | 0.683849 |
794bfd32c63e644a911445d5d2916f5aa80e370c | 965 | py | Python | run.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 31 | 2018-01-05T22:49:33.000Z | 2022-02-02T10:30:23.000Z | run.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 737 | 2017-12-11T17:42:11.000Z | 2022-03-29T22:42:52.000Z | run.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 46 | 2018-02-23T09:04:23.000Z | 2022-02-09T18:29:51.000Z | from fence import app, app_init, config
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"-c",
"--config_file_name",
help="Name for file is something other than "
"fence-config.yaml. Will search in defined search folders specified in "
"fence's settings. To automatically crea... | 31.129032 | 83 | 0.732642 |
794bfd92abebf04ec9ab19e5f6235d1d5f30cf7a | 2,101 | py | Python | extensions/captcha_forms.py | l29ah/vk4xmpp | 596e35a3c13d1ee102e8dc0707427947843306d2 | [
"MIT"
] | 77 | 2015-01-07T06:22:46.000Z | 2022-01-17T11:15:02.000Z | extensions/captcha_forms.py | l29ah/vk4xmpp | 596e35a3c13d1ee102e8dc0707427947843306d2 | [
"MIT"
] | 157 | 2015-01-16T07:25:42.000Z | 2021-11-24T05:59:10.000Z | extensions/captcha_forms.py | l29ah/vk4xmpp | 596e35a3c13d1ee102e8dc0707427947843306d2 | [
"MIT"
] | 31 | 2015-01-16T15:16:36.000Z | 2021-01-25T20:13:54.000Z | # coding: utf-8
# This file is a part of VK4XMPP transport
# © simpleApps, 2014 — 2015.
from hashlib import sha1
import xmpp
"""
Implements XEP-0158: CAPTCHA Forms
"""
def sendCaptcha(user, captcha):
"""
Send a captcha to the user
Args:
user: the user's jid
captcha: captcha dictionary ({"url": "https://vk.co... | 35.610169 | 120 | 0.669681 |
794bfeaf8d8752099c330384dd9330b4f7d01661 | 846 | py | Python | var/spack/repos/builtin/packages/r-codetools/package.py | shintaro-iwasaki/spack | 47998b3f4733c1264760c4a9744b1669661354b9 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-09-19T10:20:43.000Z | 2021-09-19T10:20:43.000Z | var/spack/repos/builtin/packages/r-codetools/package.py | jserv/spack | 221e680e2b0eb27971794e8a680a9cf743f079c3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-01-06T19:26:40.000Z | 2021-01-06T19:42:17.000Z | var/spack/repos/builtin/packages/r-codetools/package.py | shintaro-iwasaki/spack | 47998b3f4733c1264760c4a9744b1669661354b9 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RCodetools(RPackage):
"""Code analysis tools for R."""
homepage = "https://cloud.r-pr... | 40.285714 | 96 | 0.749409 |
794bff586d5bf3d4a0eaa28c25e523445fa3e018 | 1,367 | py | Python | setup.py | drivet/flask-whoosh | 8cccd0816406c342ce987a5dbf8cbbd63aef2f26 | [
"MIT"
] | null | null | null | setup.py | drivet/flask-whoosh | 8cccd0816406c342ce987a5dbf8cbbd63aef2f26 | [
"MIT"
] | 1 | 2015-09-07T16:22:18.000Z | 2015-09-07T16:22:18.000Z | setup.py | drivet/flask-whoosh | 8cccd0816406c342ce987a5dbf8cbbd63aef2f26 | [
"MIT"
] | null | null | null | """
Flask-Whoosh
-------------
Small Flask extension to make manipulating Whoosh indexes a slightly more
convenient in the context of a Flask web application.
"""
from setuptools import setup
setup(
name='Flask-Whoosh',
version='0.1.0',
url='https://github.com/drivet/flask-whoosh.git',
license='MIT',... | 30.377778 | 73 | 0.628383 |
794bffc58135d24b31d669f44f3d729045d41a7d | 12,478 | py | Python | examples/classifier_comparison.py | yyht/cleanlab | 00678f1ec08d97ffcba40de544859d64dc3fb1ad | [
"MIT"
] | null | null | null | examples/classifier_comparison.py | yyht/cleanlab | 00678f1ec08d97ffcba40de544859d64dc3fb1ad | [
"MIT"
] | null | null | null | examples/classifier_comparison.py | yyht/cleanlab | 00678f1ec08d97ffcba40de544859d64dc3fb1ad | [
"MIT"
] | 1 | 2020-09-01T11:57:59.000Z | 2020-09-01T11:57:59.000Z |
# coding: utf-8
# # Classifier Comparison Tutorial
# ## In this example, we demonstrate how the cleanlab package can be used with any classifier and dataset distribution. We compare performance across 10 classifiers and 4 dataset distributions in both the binary and multiclass classification setting.
#
# ### Some of... | 35.248588 | 280 | 0.635118 |
794c0064df454b2c3616dac80f79c67d9e50118f | 37,440 | py | Python | pulsar-client-cpp/python/pulsar/__init__.py | sinzin91/pulsar | f049441f4b52c1c28610b96da32ff2e9ecda5166 | [
"Apache-2.0"
] | null | null | null | pulsar-client-cpp/python/pulsar/__init__.py | sinzin91/pulsar | f049441f4b52c1c28610b96da32ff2e9ecda5166 | [
"Apache-2.0"
] | null | null | null | pulsar-client-cpp/python/pulsar/__init__.py | sinzin91/pulsar | f049441f4b52c1c28610b96da32ff2e9ecda5166 | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 38.204082 | 127 | 0.650614 |
794c00924f437b260060da4c11c24843393cb9bc | 3,038 | py | Python | cmd/gettext_pot_db.py | oo13/xgettext-endless-sky | 729098a80febab4e22ab59ad6aaa6c177521bdf7 | [
"CC0-1.0"
] | 2 | 2021-03-22T10:35:16.000Z | 2021-03-22T13:23:57.000Z | cmd/gettext_pot_db.py | oo13/xgettext-endless-sky | 729098a80febab4e22ab59ad6aaa6c177521bdf7 | [
"CC0-1.0"
] | null | null | null | cmd/gettext_pot_db.py | oo13/xgettext-endless-sky | 729098a80febab4e22ab59ad6aaa6c177521bdf7 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8-unix -*-
"""Gettext POT database"""
# Copyright © 2018, 2019, 2021 OOTA, Masato
#
# This is published by CC0 1.0.
# For more information, see CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# at https://creativecommons.org/publicdomain/zero/1.0/deed).
import types
import re
... | 34.134831 | 99 | 0.48815 |
794c00dd9bf3e917cb63f3258b655f4390e227f5 | 763 | py | Python | plugins/github/komand_github/actions/get_my_issues/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/github/komand_github/actions/get_my_issues/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/github/komand_github/actions/get_my_issues/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import komand
import requests
from .. import utils
from .schema import GetMyIssuesInput, GetMyIssuesOutput
class GetMyIssues(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name="get_my_issues",
description="Retrieve all issues assigned to the currently au... | 34.681818 | 100 | 0.650066 |
794c01c1fda57af5f5c5bdcc764b6200c3c157bf | 3,431 | py | Python | attic/wpfrontman/wp_frontman/tests/test_post.py | ludoo/wpkit | 0447d941a438e143b0e51b5e73418a0206832823 | [
"BSD-3-Clause"
] | null | null | null | attic/wpfrontman/wp_frontman/tests/test_post.py | ludoo/wpkit | 0447d941a438e143b0e51b5e73418a0206832823 | [
"BSD-3-Clause"
] | null | null | null | attic/wpfrontman/wp_frontman/tests/test_post.py | ludoo/wpkit | 0447d941a438e143b0e51b5e73418a0206832823 | [
"BSD-3-Clause"
] | null | null | null | import re
import unittest
from django.conf import settings
from django.db import connection
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import set_urlconf, get_resolver
from django.test.client import Client
from wp_frontman.blog import Blog
from wp_frontman.models import Post
... | 51.984848 | 142 | 0.692801 |
794c01f19f7180c1ae60d794e1d86443a09699ef | 4,513 | py | Python | lab_4/decode_text_score_eight_test.py | LeraTormashova/2020-2-level-labs | c38c05ffef1fc4fa4c3c5861ab9877020060567d | [
"MIT"
] | null | null | null | lab_4/decode_text_score_eight_test.py | LeraTormashova/2020-2-level-labs | c38c05ffef1fc4fa4c3c5861ab9877020060567d | [
"MIT"
] | null | null | null | lab_4/decode_text_score_eight_test.py | LeraTormashova/2020-2-level-labs | c38c05ffef1fc4fa4c3c5861ab9877020060567d | [
"MIT"
] | null | null | null | # pylint: skip-file
"""
Tests decode_text function
"""
import unittest
from lab_4.main import encode_text, WordStorage, LikelihoodBasedTextGenerator, decode_text
from lab_4.ngrams.ngram_trie import NGramTrie
class DecodeCorpusTest(unittest.TestCase):
"""
checks for decode_text function.
Score 8 or ab... | 33.679104 | 90 | 0.545092 |
794c020711b96647211039971d0a544c0938ff42 | 909 | py | Python | Images/main.py | allegheny-college-cmpsc-100-fall-2020/cmpsc-100-fall-2020-project-code-examples | 2fe28a3319e1990df17fbfb1cb4eac9dc9526ee0 | [
"CC-BY-4.0"
] | null | null | null | Images/main.py | allegheny-college-cmpsc-100-fall-2020/cmpsc-100-fall-2020-project-code-examples | 2fe28a3319e1990df17fbfb1cb4eac9dc9526ee0 | [
"CC-BY-4.0"
] | null | null | null | Images/main.py | allegheny-college-cmpsc-100-fall-2020/cmpsc-100-fall-2020-project-code-examples | 2fe28a3319e1990df17fbfb1cb4eac9dc9526ee0 | [
"CC-BY-4.0"
] | null | null | null | import random
from PIL import Image, ImageDraw
def make_random_color():
val = lambda: random.randint(0, 255)
return (val(), val(), val())
def make_random_point(x,y):
new_x = random.randint(0, x)
new_y = random.randint(0, y)
return (new_x, new_y)
# Make 10 squares of a defined size with random co... | 20.2 | 54 | 0.629263 |
794c020a14d430a7b7905c9f5d99244a0a62ff78 | 5,235 | py | Python | S4/S4 Library/simulation/sims/sim_spawner_enums.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Library/simulation/sims/sim_spawner_enums.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | S4/S4 Library/simulation/sims/sim_spawner_enums.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | from protocolbuffers import FileSerialization_pb2
from sims4.tuning.dynamic_enum import DynamicEnum
import enum
class SimNameType(DynamicEnum):
DEFAULT = 0
class SimInfoCreationSource(enum.IntFlags, export=False):
class SimInfoCreationSourceMixin:
def __init__(self, *args, **kwargs):
sup... | 46.741071 | 354 | 0.744031 |
794c039b1ecabc2719f6628c2b832c32b15ffb0e | 3,390 | py | Python | protector/tests/rules_test/test_exceed_time_limit.py | kraktus/opentsdb-protector | e21a666fb82fb9b4e935bb8af26ee8baecf82ca8 | [
"BSD-3-Clause"
] | null | null | null | protector/tests/rules_test/test_exceed_time_limit.py | kraktus/opentsdb-protector | e21a666fb82fb9b4e935bb8af26ee8baecf82ca8 | [
"BSD-3-Clause"
] | null | null | null | protector/tests/rules_test/test_exceed_time_limit.py | kraktus/opentsdb-protector | e21a666fb82fb9b4e935bb8af26ee8baecf82ca8 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019 Adobe
# All Rights Reserved.
#
# NOTICE: Adobe permits you to use, modify, and distribute this file in
# accordance with the terms of the Adobe license agreement accompanying
# it. If you have received this file from a source other than Adobe,
# then your use, modification, or distribution of it ... | 32.285714 | 72 | 0.351917 |
794c05071359501932444c2d53fa11df668b0f6e | 2,654 | py | Python | src/10.Maps, Hash Tables, and Skips Lists/10.1.5 Simiple Unsorted Map Implementation.py | LittleNewton/Data_Structure_and_Algorithm_Report | e4883a2c112259fb185107d54828eceb097e0318 | [
"Apache-2.0"
] | 3 | 2018-07-16T09:29:59.000Z | 2019-12-09T03:46:25.000Z | src/10.Maps, Hash Tables, and Skips Lists/10.1.5 Simiple Unsorted Map Implementation.py | LittleNewton/Data_Structure_and_Algorithm_Report | e4883a2c112259fb185107d54828eceb097e0318 | [
"Apache-2.0"
] | null | null | null | src/10.Maps, Hash Tables, and Skips Lists/10.1.5 Simiple Unsorted Map Implementation.py | LittleNewton/Data_Structure_and_Algorithm_Report | e4883a2c112259fb185107d54828eceb097e0318 | [
"Apache-2.0"
] | null | null | null | # 10.1.5 Simiple Unsorted Map Implementation
from collections import MutableMapping
class MapBase(MutableMapping):
"""Our own abstract base class that includes a nonpublic _Item class."""
#----------------------- nested _Item class -----------------------
class _Item:
"""Lightweight composite to ... | 32.765432 | 79 | 0.547476 |
794c055b54afd633b0c0cbe5098ee902ff9effaf | 837 | py | Python | faasmcli/faasmcli/tasks/__init__.py | kubasz/faasm | fa4cec66176c669c161f097d24edce099de66919 | [
"Apache-2.0"
] | 278 | 2020-10-01T16:37:06.000Z | 2022-03-31T07:06:01.000Z | faasmcli/faasmcli/tasks/__init__.py | kubasz/faasm | fa4cec66176c669c161f097d24edce099de66919 | [
"Apache-2.0"
] | 78 | 2020-10-01T18:46:16.000Z | 2022-03-18T15:39:03.000Z | faasmcli/faasmcli/tasks/__init__.py | kubasz/faasm | fa4cec66176c669c161f097d24edce099de66919 | [
"Apache-2.0"
] | 24 | 2020-10-21T18:45:48.000Z | 2022-03-26T08:59:41.000Z | from invoke import Collection
from . import bare_metal
from . import call
from . import codegen
from . import config
from . import dev
from . import disas
from . import docker_tasks
from . import files
from . import flame
from . import flush
from . import knative
from . import network
from . import python
from . impor... | 17.808511 | 62 | 0.702509 |
794c0614925d3642159bfd1eb7848694b2eac21b | 5,616 | py | Python | xarray/testing.py | douglatornell/xarray | 742ed3984f437982057fd46ecfb0bce214563cb8 | [
"Apache-2.0"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | xarray/testing.py | douglatornell/xarray | 742ed3984f437982057fd46ecfb0bce214563cb8 | [
"Apache-2.0"
] | 3 | 2018-11-21T02:21:19.000Z | 2018-12-18T15:34:10.000Z | xarray/testing.py | douglatornell/xarray | 742ed3984f437982057fd46ecfb0bce214563cb8 | [
"Apache-2.0"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | """Testing functions exposed to the user API"""
import numpy as np
from xarray.core import duck_array_ops
from xarray.core import formatting
def _decode_string_data(data):
if data.dtype.kind == 'S':
return np.core.defchararray.decode(data, 'utf-8', 'replace')
return data
def _data_allclose_or_equiv... | 37.192053 | 78 | 0.64156 |
794c069d61031153b35068be74a6ff596eb00232 | 15,235 | py | Python | examples/imagenet_d/main.py | bethgelab/robustness | aa0a6798fe3973bae5f47561721b59b39f126ab7 | [
"Apache-2.0"
] | 67 | 2020-07-01T01:13:19.000Z | 2022-03-28T15:33:20.000Z | examples/imagenet_d/main.py | bethgelab/robustness | aa0a6798fe3973bae5f47561721b59b39f126ab7 | [
"Apache-2.0"
] | 4 | 2021-03-04T13:24:52.000Z | 2022-03-30T22:07:40.000Z | examples/imagenet_d/main.py | bethgelab/robustness | aa0a6798fe3973bae5f47561721b59b39f126ab7 | [
"Apache-2.0"
] | 1 | 2021-05-25T09:41:10.000Z | 2021-05-25T09:41:10.000Z | import argparse
import os
import random
import shutil
import time
import warnings
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.multiprocessing as mp
import torch.utils.data
import torch.utils.data.distr... | 39.882199 | 94 | 0.612012 |
794c089b20f76e5ab0c90638dc15a03dc6f34119 | 147 | py | Python | work5.py | 1109450752/homework2018_10_11 | 22e2f8b270118851cd57abf776623b38750585f3 | [
"Apache-2.0"
] | null | null | null | work5.py | 1109450752/homework2018_10_11 | 22e2f8b270118851cd57abf776623b38750585f3 | [
"Apache-2.0"
] | null | null | null | work5.py | 1109450752/homework2018_10_11 | 22e2f8b270118851cd57abf776623b38750585f3 | [
"Apache-2.0"
] | null | null | null | import random
s1=[]
s=[0,1,2,3,4,5,6,7,8,9]
for i in range(1000):
s1.append(random.randint(0,9))
for i in s:
print(i,s1.count(i))
| 16.333333 | 35 | 0.571429 |
794c08a007bf09fcc91039fbf5c33cc93862544b | 9,239 | py | Python | models/MimoNet.py | marioviti/nn_segmentation | b754b38cd1898c0746e383ecd32d9d4c33c60b33 | [
"MIT"
] | null | null | null | models/MimoNet.py | marioviti/nn_segmentation | b754b38cd1898c0746e383ecd32d9d4c33c60b33 | [
"MIT"
] | null | null | null | models/MimoNet.py | marioviti/nn_segmentation | b754b38cd1898c0746e383ecd32d9d4c33c60b33 | [
"MIT"
] | null | null | null | from layers import *
from serialize import *
from metrics_and_losses import *
from GenericModel import GenericModel
import numpy as np
from keras import backend as K
from keras.losses import binary_crossentropy, categorical_crossentropy
from keras.utils import to_categorical
from keras.optimizers import SGD,Adam,Adag... | 41.245536 | 127 | 0.572897 |
794c0aee411fbe4874227a2e1e72ad178b2f589f | 7,311 | py | Python | wine-buffer-redis-custom_match.py | TheTacoScott/bloomingtonpuzzles | 5f2a8a4d37b1321175e037073d627b2f8655d90b | [
"MIT"
] | null | null | null | wine-buffer-redis-custom_match.py | TheTacoScott/bloomingtonpuzzles | 5f2a8a4d37b1321175e037073d627b2f8655d90b | [
"MIT"
] | null | null | null | wine-buffer-redis-custom_match.py | TheTacoScott/bloomingtonpuzzles | 5f2a8a4d37b1321175e037073d627b2f8655d90b | [
"MIT"
] | null | null | null | """
wine.py
a bipartite non directed graphing solution to the bloomreach wine puzzle
example usage:
python wine.py --input filename.txt
"""
import networkx as nx
import argparse, time, sys
import redis
parser = argparse.ArgumentParser(description='')
parser.add_argument('--input', action="store", dest="input")
pars... | 35.838235 | 183 | 0.67419 |
794c0b2cc12cf7a534f2f73083f352ce504b846b | 49 | py | Python | GSpreadPlus/__init__.py | TheReaper62/GSpread-Plus | f4d15fb6a1ba038ba944d372d608b4681275f8b0 | [
"MIT"
] | null | null | null | GSpreadPlus/__init__.py | TheReaper62/GSpread-Plus | f4d15fb6a1ba038ba944d372d608b4681275f8b0 | [
"MIT"
] | null | null | null | GSpreadPlus/__init__.py | TheReaper62/GSpread-Plus | f4d15fb6a1ba038ba944d372d608b4681275f8b0 | [
"MIT"
] | null | null | null | from GSpreadPlus.gspreadplus import Spreadclient
| 24.5 | 48 | 0.897959 |
794c0bbadc684760c9496ed7b69210fc76972051 | 1,647 | py | Python | Visualization/code.py | llavkush/greyatom-python-for-data-science | c82f9e28c9ef000becdf635d00ab0a8816e683fb | [
"MIT"
] | 2 | 2020-03-27T12:17:55.000Z | 2020-03-27T12:17:58.000Z | Visualization/code.py | llavkush/greyatom-python-for-data-science | c82f9e28c9ef000becdf635d00ab0a8816e683fb | [
"MIT"
] | null | null | null | Visualization/code.py | llavkush/greyatom-python-for-data-science | c82f9e28c9ef000becdf635d00ab0a8816e683fb | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
data = pd.read_csv(path)
loan_status= data["Loan_Status"].value_counts()
loan_status.plot(kind ="bar")
#Code starts here
# --------------
#Code starts here
property_and_loan = data.groupby(['Pro... | 22.256757 | 78 | 0.681846 |
794c0becd2352ba860ab93a516d9ae4903fa36aa | 1,083 | py | Python | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/stringOperations.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 5 | 2021-06-02T23:44:25.000Z | 2021-12-27T16:21:57.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/stringOperations.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 22 | 2021-05-31T01:33:25.000Z | 2021-10-18T18:32:39.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/stringOperations.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 3 | 2021-06-19T03:37:47.000Z | 2021-08-31T00:49:51.000Z | # This example shows you string operations
name = "Kalpak"
print("My name is " + name) # I have given space after is notice
age = 14
print("My age is ", age) # comma seprates two different things you want to print
print("This isn't going away too soon.") # that \ is called as an escape character
# the \ is used t... | 29.27027 | 87 | 0.694367 |
794c0ca2dbdb678de8cf53f5a8f242236d712fa6 | 6,738 | py | Python | homeassistant/components/enphase_envoy/sensor.py | rocket4321/core | 781084880b0bc8d1e73d3ec56b81f4717e520dc7 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/enphase_envoy/sensor.py | rocket4321/core | 781084880b0bc8d1e73d3ec56b81f4717e520dc7 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/enphase_envoy/sensor.py | rocket4321/core | 781084880b0bc8d1e73d3ec56b81f4717e520dc7 | [
"Apache-2.0"
] | null | null | null | """Support for Enphase Envoy solar energy monitor."""
from datetime import timedelta
import logging
import async_timeout
from envoy_reader.envoy_reader import EnvoyReader
import httpx
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import (
... | 31.050691 | 84 | 0.614722 |
794c0d68c04db0f70232e8f61909b43430dcdeb8 | 4,155 | py | Python | libs/configs/cfgs_res50_dota_v6.py | riciche/RetinaNet_Tensorflow_Rotation | b03a7eafba21bfbb78dbffe1be53ab914080201e | [
"MIT"
] | 2 | 2021-01-27T13:45:03.000Z | 2021-01-27T15:02:14.000Z | libs/configs/cfgs_res50_dota_v6.py | CrazyStoneonRoad/RetinaNet_Tensorflow_Rotation | b03a7eafba21bfbb78dbffe1be53ab914080201e | [
"MIT"
] | null | null | null | libs/configs/cfgs_res50_dota_v6.py | CrazyStoneonRoad/RetinaNet_Tensorflow_Rotation | b03a7eafba21bfbb78dbffe1be53ab914080201e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import tensorflow as tf
import math
"""
This is your evaluation result for task 1:
mAP: 0.6089394631017461
ap of each class:
plane:0.8859576592098442,
baseball-diamond:0.6745883911474353,
bridge:0.33... | 30.777778 | 105 | 0.673165 |
794c0d83bcc77ab26533709e57976e85c920e6e2 | 776 | py | Python | src/services/middleware/workers_io.py | QIN2DIM/v2board-mining | b757f17418275ce9ac165238b098b098d5e3326c | [
"Apache-2.0"
] | 10 | 2021-12-16T08:22:48.000Z | 2022-03-19T05:56:00.000Z | src/services/middleware/workers_io.py | QIN2DIM/v2board-mining | b757f17418275ce9ac165238b098b098d5e3326c | [
"Apache-2.0"
] | null | null | null | src/services/middleware/workers_io.py | QIN2DIM/v2board-mining | b757f17418275ce9ac165238b098b098d5e3326c | [
"Apache-2.0"
] | 1 | 2021-12-18T06:37:26.000Z | 2021-12-18T06:37:26.000Z | # -*- coding: utf-8 -*-
# Time : 2021/12/22 16:15
# Author : QIN2DIM
# Github : https://github.com/QIN2DIM
# Description:
import ast
from typing import List
from services.middleware.stream_io import RedisClient
class EntropyHeap(RedisClient):
def __init__(self):
super(EntropyHeap, self).__i... | 28.740741 | 91 | 0.662371 |
794c105cc9d1dcdf306677539f004a742abeaf08 | 665 | py | Python | vilya/views/settings/codereview.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 1,582 | 2015-01-05T02:41:44.000Z | 2022-03-30T20:03:22.000Z | vilya/views/settings/codereview.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 66 | 2015-01-23T07:58:04.000Z | 2021-11-12T02:23:27.000Z | vilya/views/settings/codereview.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 347 | 2015-01-05T07:47:07.000Z | 2021-09-20T21:22:32.000Z | # -*- coding: utf-8 -*-
import json
from vilya.libs.auth.decorators import login_required
from vilya.libs.template import st
_q_exports = ['setting', ]
@login_required
def _q_index(request):
user = request.user
return st('settings/codereview.html', **locals())
@login_required
def setting(request):
is_... | 23.75 | 59 | 0.690226 |
794c1070f022e2e32db9cac3a089978ce51be872 | 2,540 | py | Python | ansible/roles/lib_gcloud/build/lib/health_check.py | fahlmant/openshift-tools | dbb4f16ccde3404c36c23108c45ca7b67138ee12 | [
"Apache-2.0"
] | 164 | 2015-07-29T17:35:04.000Z | 2021-12-16T16:38:04.000Z | ansible/roles/lib_gcloud/build/lib/health_check.py | fahlmant/openshift-tools | dbb4f16ccde3404c36c23108c45ca7b67138ee12 | [
"Apache-2.0"
] | 3,634 | 2015-06-09T13:49:15.000Z | 2022-03-23T20:55:44.000Z | ansible/roles/lib_gcloud/build/lib/health_check.py | fahlmant/openshift-tools | dbb4f16ccde3404c36c23108c45ca7b67138ee12 | [
"Apache-2.0"
] | 250 | 2015-06-08T19:53:11.000Z | 2022-03-01T04:51:23.000Z | # pylint: skip-file
# pylint: disable=too-many-instance-attributes
class HealthCheck(GCPResource):
'''Object to represent a gcp health check'''
resource_type = "compute.v1.httpHealthCheck"
# pylint: disable=too-many-arguments
def __init__(self,
rname,
project,
... | 31.358025 | 90 | 0.564567 |
794c10758bf731dc185c5348930aaf61312886ad | 3,663 | py | Python | src/biosyn/rerankNet.py | Manikant92/BioSyn | 2f0f02769acf82fc110c724a581dd2675c47d655 | [
"MIT"
] | 1 | 2020-05-11T05:51:30.000Z | 2020-05-11T05:51:30.000Z | src/biosyn/rerankNet.py | Manikant92/BioSyn | 2f0f02769acf82fc110c724a581dd2675c47d655 | [
"MIT"
] | null | null | null | src/biosyn/rerankNet.py | Manikant92/BioSyn | 2f0f02769acf82fc110c724a581dd2675c47d655 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import logging
from tqdm import tqdm
LOGGER = logging.getLogger(__name__)
class RerankNet(nn.Module):
def __init__(self, encoder, learning_rate, weight_decay, sparse_weight, use_cuda):
LOGGER.info("RerankNet! le... | 38.557895 | 114 | 0.621349 |
794c10836a3a0cd88b481f42018b2f69c588ceb5 | 11,669 | py | Python | lib/build_graph.py | Lingistic/GraBTax | ff8e313891da88ffaebc5393cf9b2d7a8650131c | [
"Apache-2.0"
] | 9 | 2017-06-30T04:24:53.000Z | 2020-12-24T11:10:29.000Z | lib/build_graph.py | Lingistic/GraBTax | ff8e313891da88ffaebc5393cf9b2d7a8650131c | [
"Apache-2.0"
] | 2 | 2017-05-24T20:00:51.000Z | 2019-05-27T22:40:48.000Z | lib/build_graph.py | Lingistic/GraBTax | ff8e313891da88ffaebc5393cf9b2d7a8650131c | [
"Apache-2.0"
] | 3 | 2017-04-21T07:28:41.000Z | 2018-03-15T06:56:41.000Z | #!/usr/bin/env python
"""
processes a document topic matrix and determines the strength of a topic as a function of it's co-occurrences among
the corpus, beyond a threshold
"""
import numpy
from networkx import Graph, write_graphml, read_graphml, get_edge_attributes
import logging
import os
import metis
__author__ = "... | 36.23913 | 120 | 0.658497 |
794c10f822d4597636e355c03e52b24a747b68e7 | 2,834 | py | Python | theano/tensor/tests/test_mpi.py | zploskey/Theano | 9b3f6351d41d9f5e01b198e3de7538d7f032c409 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/tests/test_mpi.py | zploskey/Theano | 9b3f6351d41d9f5e01b198e3de7538d7f032c409 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/tests/test_mpi.py | zploskey/Theano | 9b3f6351d41d9f5e01b198e3de7538d7f032c409 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, division
from theano.tensor.io import (send, recv, mpi_cmps, MPISend, MPISendWait,
mpi_send_wait_cmp, mpi_tag_cmp, mpi_enabled)
import theano
import subprocess
import os
from theano.gof.sched import sort_schedule_fn
from theano import change_flags
mpi_sc... | 30.473118 | 73 | 0.632675 |
794c11cd3d9909b9cb4ac568bf7e3f9751a06559 | 80 | py | Python | kymatio/scattering2d/__init__.py | GReguig/kymatio | e0fc10057f5f8bb947068bc40afff8d3d3729052 | [
"BSD-3-Clause"
] | 516 | 2018-11-18T06:11:16.000Z | 2022-03-21T22:35:06.000Z | kymatio/scattering2d/__init__.py | GReguig/kymatio | e0fc10057f5f8bb947068bc40afff8d3d3729052 | [
"BSD-3-Clause"
] | 558 | 2018-11-19T22:21:12.000Z | 2022-03-28T14:59:15.000Z | kymatio/scattering2d/__init__.py | GReguig/kymatio | e0fc10057f5f8bb947068bc40afff8d3d3729052 | [
"BSD-3-Clause"
] | 119 | 2018-11-18T06:05:39.000Z | 2022-03-26T06:59:37.000Z | from .frontend.entry import ScatteringEntry2D
__all__ = ['ScatteringEntry2D']
| 16 | 45 | 0.8 |
794c1295f0f472c58a59bd795b7006f3b501c958 | 962 | py | Python | nova/api/openstack/compute/legacy_v2/contrib/extended_hypervisors.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 7 | 2015-09-22T11:27:16.000Z | 2015-11-02T12:33:46.000Z | nova/api/openstack/compute/legacy_v2/contrib/extended_hypervisors.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 9 | 2015-05-20T11:20:17.000Z | 2017-07-27T08:21:33.000Z | nova/api/openstack/compute/legacy_v2/contrib/extended_hypervisors.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 13 | 2015-05-05T09:34:04.000Z | 2017-11-08T02:03:46.000Z | # Copyright 2014 IBM Corp.
#
# 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 t... | 37 | 78 | 0.716216 |
794c13144a999e0f86869a7c138f51d8563f6dc2 | 2,429 | py | Python | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/DescribeDeviceURLRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2021-03-08T02:59:17.000Z | 2021-03-08T02:59:17.000Z | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/DescribeDeviceURLRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/DescribeDeviceURLRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 30.3625 | 74 | 0.741457 |
794c1314bf22e9986c1038e23ccfa6cf2ec03b66 | 5,096 | py | Python | ppo.py | ajleite/basic-ppo | e9d823275dda3c376e3e0f7d66e8dfb815b434d8 | [
"MIT"
] | 2 | 2020-06-27T11:44:19.000Z | 2022-01-11T21:23:01.000Z | ppo.py | ajleite/basic-ppo | e9d823275dda3c376e3e0f7d66e8dfb815b434d8 | [
"MIT"
] | null | null | null | ppo.py | ajleite/basic-ppo | e9d823275dda3c376e3e0f7d66e8dfb815b434d8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Copyright 2019 Abe Leite
# Based on "Proximal Policy Optimization Algorithms", Schulman et al 2017
# For the benefit of my fellow CSCI-B 659 students
# While I hope that this code is helpful I will not vouch for its total accuracy;
# my primary aim here is to elucidate the ideas from the paper.
i... | 40.768 | 113 | 0.615385 |
794c13cd48c57c87cafd7e7a8feac35abaceaa40 | 627 | py | Python | manage.py | wszoltysek/spotify | 8e8e76dc9c12b49809412e645ff49818dde08a7f | [
"MIT"
] | null | null | null | manage.py | wszoltysek/spotify | 8e8e76dc9c12b49809412e645ff49818dde08a7f | [
"MIT"
] | 6 | 2021-03-19T02:56:42.000Z | 2021-09-22T18:58:42.000Z | manage.py | wszoltysek/spotify | 8e8e76dc9c12b49809412e645ff49818dde08a7f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'spotify.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
794c140085a1b064a2e760575ac7ddd4aa5577d8 | 142 | py | Python | cmc/python/__init__.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | 1 | 2020-12-24T22:00:01.000Z | 2020-12-24T22:00:01.000Z | cmc/python/__init__.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | null | null | null | cmc/python/__init__.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | 3 | 2020-07-17T09:20:29.000Z | 2021-03-30T16:44:18.000Z | from icecube import icetray,dataclasses,sim_services
from icecube.load_pybindings import load_pybindings
load_pybindings(__name__, __path__)
| 28.4 | 52 | 0.880282 |
794c140b282262d1c2ed8f7642a914acc7fbebdb | 59,089 | py | Python | static/0.6.0.322/js/transcrypt/handlers.acesso_aluno.py | PhanterJR/www_sme | bfe3cd430a33c05e7cd4ceadfd6b90ce8f45be90 | [
"MIT"
] | null | null | null | static/0.6.0.322/js/transcrypt/handlers.acesso_aluno.py | PhanterJR/www_sme | bfe3cd430a33c05e7cd4ceadfd6b90ce8f45be90 | [
"MIT"
] | null | null | null | static/0.6.0.322/js/transcrypt/handlers.acesso_aluno.py | PhanterJR/www_sme | bfe3cd430a33c05e7cd4ceadfd6b90ce8f45be90 | [
"MIT"
] | null | null | null | import phanterpwa.frontend.gatehandler as gatehandler
import phanterpwa.frontend.helpers as helpers
import phanterpwa.frontend.components.snippets as snippets
import phanterpwa.frontend.components.widgets as widgets
import phanterpwa.frontend.forms as forms
import phanterpwa.frontend.validations as validations
import p... | 42.787111 | 194 | 0.505796 |
794c1518a44a42f65a06a6acb01aa91706931f99 | 651 | py | Python | tests/services/alertrules/test_file_type_mismatch.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/services/alertrules/test_file_type_mismatch.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/services/alertrules/test_file_type_mismatch.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | from py42.services.alertrules import FileTypeMismatchService
class TestFileTypeMisMatchClient(object):
def test_get_by_id_posts_to_correct_endpoint_for_type_mismatch_rule_type(
self, mock_connection
):
alert_rule_client = FileTypeMismatchService(mock_connection, u"tenant-id")
alert_rul... | 40.6875 | 86 | 0.703533 |
794c156443937d0cc37a41d9d4688ecaba925350 | 456 | py | Python | graphs/breadth_first_search.py | AppliedArtificialIntelligence/Algorithms | 71e70ce58d1aa0230f93a69b3f0383a755818276 | [
"Apache-2.0"
] | 99 | 2018-05-02T18:35:40.000Z | 2022-03-31T04:52:24.000Z | graphs/breadth_first_search.py | johnjdailey/python-algorithms | 71e70ce58d1aa0230f93a69b3f0383a755818276 | [
"Apache-2.0"
] | null | null | null | graphs/breadth_first_search.py | johnjdailey/python-algorithms | 71e70ce58d1aa0230f93a69b3f0383a755818276 | [
"Apache-2.0"
] | 65 | 2018-08-12T18:12:52.000Z | 2022-03-05T08:20:07.000Z | #!/usr/bin/env python
#-*- coding: utf-8 -*-
__author__ = 'Stefan Jansen'
from collections import deque
def bfs(G, s):
P, Q = {s: None}, deque([s]) # Parents and FIFO queue
while Q:
u = Q.popleft() # Constant-time for deque
for v in G[u]:
if v in P: continue... | 28.5 | 69 | 0.493421 |
794c17ddb485530e923f6a5d392871a3657b6db5 | 4,338 | py | Python | src/iks/delete_secret_cert.py | IBM/cis-integration | fbf1f5c2df57b846499856ca927d2de15b4b375c | [
"Apache-2.0"
] | 4 | 2021-08-04T16:58:18.000Z | 2022-02-16T03:28:46.000Z | src/iks/delete_secret_cert.py | IBM/cis-integration | fbf1f5c2df57b846499856ca927d2de15b4b375c | [
"Apache-2.0"
] | 16 | 2021-07-13T13:50:31.000Z | 2021-08-13T15:31:32.000Z | src/iks/delete_secret_cert.py | IBM/cis-integration | fbf1f5c2df57b846499856ca927d2de15b4b375c | [
"Apache-2.0"
] | null | null | null | '''
DISCLAIMER OF WARRANTIES:
Permission is granted to copy this Tools or Sample code for internal use only, provided that this
permission notice and warranty disclaimer appears in all copies.
THIS TOOLS OR SAMPLE CODE IS LICENSED TO YOU AS-IS.
IBM AND ITS SUPPLIERS AND LICENSORS DISCLAIM ALL WARRANTIES, EITHER EXPRES... | 46.148936 | 137 | 0.665514 |
794c18a4754c1dddfef97d3aba02e343a049c8c4 | 2,322 | py | Python | lib/python/nestedlog/api.py | swarren/nestedlog | 5f2cf9f103c735c4e5f48779f7b17324d883870c | [
"MIT"
] | 1 | 2021-03-14T17:01:43.000Z | 2021-03-14T17:01:43.000Z | lib/python/nestedlog/api.py | swarren/nestedlog | 5f2cf9f103c735c4e5f48779f7b17324d883870c | [
"MIT"
] | 10 | 2021-03-14T19:44:35.000Z | 2021-06-07T19:37:47.000Z | lib/python/nestedlog/api.py | swarren/nestedlog | 5f2cf9f103c735c4e5f48779f7b17324d883870c | [
"MIT"
] | null | null | null | # Copyright 2021 Stephen Warren <swarren@wwwdotorg.org>
# SPDX-License-Identifier: MIT
from contextlib import contextmanager
import nestedlog.data as nld
import os
import socket
import subprocess
import sys
import termios
SOCK_ENV_VAR = 'NESTED_LOG_CONTROL'
CMD_START_BLOCK = 'start-block'
CMD_END_BLOCK = 'end-block'... | 28.317073 | 85 | 0.698105 |
794c18db2a90c0d1d14c3cd285dffc5dd20f46c3 | 304 | py | Python | progressBar.py | immortal-autumn/progress-bar-tool | 72160490561a5c3e692fb9f8966f195bca4c6a0d | [
"MIT"
] | 1 | 2021-03-05T17:32:07.000Z | 2021-03-05T17:32:07.000Z | progressBar.py | immortal-autumn/progress-bar-tool | 72160490561a5c3e692fb9f8966f195bca4c6a0d | [
"MIT"
] | null | null | null | progressBar.py | immortal-autumn/progress-bar-tool | 72160490561a5c3e692fb9f8966f195bca4c6a0d | [
"MIT"
] | null | null | null | import math
# construct a progress bar
def construct_bar(progress, total):
rate = progress / total
res = '【'
dots = math.floor(20 * rate)
for i in range(dots):
res += '*'
for i in range(20 - dots):
res += '-'
return res + '】'
print(construct_bar(80, 100))
| 14.47619 | 35 | 0.555921 |
794c18dc021ae58f84a583d74741877094206361 | 1,880 | py | Python | ooobuild/dyn/drawing/graphic_filter_request.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/drawing/graphic_filter_request.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/drawing/graphic_filter_request.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 34.181818 | 109 | 0.680851 |
794c1976f25bc8314540710c46bad778d90a537a | 140 | py | Python | Python/004. Sets/02. Symmetric Difference.py | subhadeep-123/HackerRank | 4596915097e58d9fd7a8bfad3194ac35f0c25177 | [
"MIT"
] | 2 | 2020-07-20T19:47:54.000Z | 2021-04-19T21:14:59.000Z | Python/004. Sets/02. Symmetric Difference.py | subhadeep-123/HackerRank | 4596915097e58d9fd7a8bfad3194ac35f0c25177 | [
"MIT"
] | null | null | null | Python/004. Sets/02. Symmetric Difference.py | subhadeep-123/HackerRank | 4596915097e58d9fd7a8bfad3194ac35f0c25177 | [
"MIT"
] | null | null | null | m = int(input())
s1 = set(map(int, input().split()))
m = int(input())
s2 = set(map(int, input().split()))
print(*sorted(s1 ^ s2), sep='\n')
| 23.333333 | 35 | 0.564286 |
794c19a9d24e4eff6674150988461c5ab1d0d0f8 | 399 | py | Python | api/urls.py | seanpierce/django-itr | 01951612d4d49c328c89487efc83e65908c8ad58 | [
"MIT"
] | null | null | null | api/urls.py | seanpierce/django-itr | 01951612d4d49c328c89487efc83e65908c8ad58 | [
"MIT"
] | null | null | null | api/urls.py | seanpierce/django-itr | 01951612d4d49c328c89487efc83e65908c8ad58 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import get_episodes, create_new_subscription_request, create_subscriber, thanks
urlpatterns = [
path('episodes/', get_episodes, name="episodes_all"),
path('subscribe/', create_new_subscription_request,
name="new_subscription_request"),
path('confirm/', cre... | 33.25 | 91 | 0.744361 |
794c1ac6af2525fe545920115955d35e4a651c19 | 220 | py | Python | began/kernel.py | YingzhenLi/SteinGrad | 6c9b3f3bd51fabfa61890c75bdbccb22c03baa61 | [
"MIT"
] | 19 | 2018-02-13T22:51:19.000Z | 2021-11-18T10:53:20.000Z | began/kernel.py | YingzhenLi/SteinGrad | 6c9b3f3bd51fabfa61890c75bdbccb22c03baa61 | [
"MIT"
] | null | null | null | began/kernel.py | YingzhenLi/SteinGrad | 6c9b3f3bd51fabfa61890c75bdbccb22c03baa61 | [
"MIT"
] | 7 | 2018-02-26T00:50:56.000Z | 2021-01-31T10:16:47.000Z | import tensorflow as tf
def Epanechnikov_kernel(z, K):
z_ = tf.expand_dims(z, 1)
pdist_square = (z - tf.stop_gradient(z_))**2
kzz = tf.reduce_mean(1 - pdist_square, -1)
return kzz, tf.constant(1.0)
| 22 | 48 | 0.65 |
794c1b7459e4861f620dc74d587f0ebfb4e03042 | 4,553 | py | Python | Section 5/source/prep.py | quoctrinh8811/AI-for-Finance | d57f1ed0d98c1659d9ea953a9fa8d1c8194811c5 | [
"MIT"
] | 30 | 2019-02-24T04:42:17.000Z | 2022-03-02T10:12:45.000Z | Section 5/source/prep.py | quoctrinh8811/AI-for-Finance | d57f1ed0d98c1659d9ea953a9fa8d1c8194811c5 | [
"MIT"
] | 1 | 2022-01-23T16:46:59.000Z | 2022-01-23T16:46:59.000Z | Section 5/source/prep.py | quoctrinh8811/AI-for-Finance | d57f1ed0d98c1659d9ea953a9fa8d1c8194811c5 | [
"MIT"
] | 21 | 2019-03-05T23:10:43.000Z | 2022-03-07T10:04:49.000Z | """
Prepare stock prices data for use in an LSTM network.
Our goal here is to predict a closing price of a share/stock
on a given day of a company based on the metrics from previous day.
We're working with historical stock prices data in .CSV format
for Apple (APPL) (but the code is general and you can use it
with ot... | 31.184932 | 79 | 0.65056 |
794c1ba741ab4f201190cd6d966fb140430b4824 | 380 | py | Python | sessions/neo_pixel.py | dunfred/iot_sessions | 3cfb7e0c2a9f51440a6d001c723b154d64c0b725 | [
"MIT"
] | 1 | 2021-09-01T17:18:52.000Z | 2021-09-01T17:18:52.000Z | sessions/neo_pixel.py | dunfred/iot_sessions | 3cfb7e0c2a9f51440a6d001c723b154d64c0b725 | [
"MIT"
] | null | null | null | sessions/neo_pixel.py | dunfred/iot_sessions | 3cfb7e0c2a9f51440a6d001c723b154d64c0b725 | [
"MIT"
] | null | null | null | import neopixel,machine,time
import random as rd
sen = machine.Pin(26,machine.Pin.OUT)
np = neopixel.NeoPixel(sen,7)
while True:
for i in range(0,7):
r,g,b = rd.randint(0,255),rd.randint(0,255),rd.randint(0,255)
np[i]= (r,g,b)
np.write()
time.sleep(1)
for i in range(0,... | 20 | 69 | 0.536842 |
794c1bb8c4612023efb13ae63adbb3fea0cf6776 | 1,744 | py | Python | tools/mo/openvino/tools/mo/front/PowerToEltwises.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 1,127 | 2018-10-15T14:36:58.000Z | 2020-04-20T09:29:44.000Z | tools/mo/openvino/tools/mo/front/PowerToEltwises.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 439 | 2018-10-20T04:40:35.000Z | 2020-04-19T05:56:25.000Z | tools/mo/openvino/tools/mo/front/PowerToEltwises.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 414 | 2018-10-17T05:53:46.000Z | 2020-04-16T17:29:53.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from openvino.tools.mo.ops.elementwise import Mul, Add, Pow
from openvino.tools.mo.front.common.partial_infer.utils import mo_array
from openvino.tools.mo.front.common.replacement import FrontReplacementOp
from openvino.tools.mo.graph.gr... | 41.52381 | 77 | 0.637041 |
794c1c2c3de87a689351a977df0ebed5e4bfef93 | 1,341 | py | Python | python/cugraph/tests/dask/test_mg_utility.py | jwyles/cugraph | 1758d085e03d1d62ccd7064fda8cb0257011f50b | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/dask/test_mg_utility.py | jwyles/cugraph | 1758d085e03d1d62ccd7064fda8cb0257011f50b | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/dask/test_mg_utility.py | jwyles/cugraph | 1758d085e03d1d62ccd7064fda8cb0257011f50b | [
"Apache-2.0"
] | null | null | null | import cugraph.dask as dcg
from dask.distributed import Client
import gc
import cugraph
import dask_cudf
import cugraph.comms as Comms
from dask_cuda import LocalCUDACluster
import pytest
@pytest.fixture
def client_connection():
cluster = LocalCUDACluster()
client = Client(cluster)
Comms.initialize()
... | 26.294118 | 68 | 0.650261 |
794c1c3f8077ba51b49f53cd0d96dde8eb85fa4a | 122 | py | Python | pyradox/datatype/__init__.py | SaucyPigeon/pyradox | a500a5628f57e056fa019ba1e114118abe6dc205 | [
"MIT"
] | null | null | null | pyradox/datatype/__init__.py | SaucyPigeon/pyradox | a500a5628f57e056fa019ba1e114118abe6dc205 | [
"MIT"
] | null | null | null | pyradox/datatype/__init__.py | SaucyPigeon/pyradox | a500a5628f57e056fa019ba1e114118abe6dc205 | [
"MIT"
] | null | null | null | from pyradox.datatype.color import Color
from pyradox.datatype.time import Time
from pyradox.datatype.tree import Tree
| 30.5 | 41 | 0.827869 |
794c1d6ce15a67fe1a531126c3de28837aa0f86c | 6,574 | py | Python | plot_data.py | hpi-sam/minimum-wage-rl | f9342168955d2fa2623f427a6869e402592944b4 | [
"MIT"
] | null | null | null | plot_data.py | hpi-sam/minimum-wage-rl | f9342168955d2fa2623f427a6869e402592944b4 | [
"MIT"
] | null | null | null | plot_data.py | hpi-sam/minimum-wage-rl | f9342168955d2fa2623f427a6869e402592944b4 | [
"MIT"
] | null | null | null | import time
import matplotlib.pyplot as plt
from numpy.core import umath
from numpy.core.numeric import count_nonzero
from numpy.lib.function_base import average
plt.ion()
import numpy as np
import pandas as pd
plt.style.use("dark_background")
class DynamicUpdate():
#Suppose we know the x range
min_x = 0
... | 32.87 | 102 | 0.583663 |
794c1e5552a54bbae94f8c0cd74334de1478e385 | 6,852 | py | Python | cinder/tests/unit/backup/drivers/test_backup_posix.py | cloudification-io/cinder | 23d76e01f2b4f3771b57fb287084a4884238b827 | [
"Apache-2.0"
] | 571 | 2015-01-01T17:47:26.000Z | 2022-03-23T07:46:36.000Z | cinder/tests/unit/backup/drivers/test_backup_posix.py | dFarui/cinder | b2922384054ddbd46e071fd07372a75a21d7f85d | [
"Apache-2.0"
] | 37 | 2015-01-22T23:27:04.000Z | 2021-02-05T16:38:48.000Z | cinder/tests/unit/backup/drivers/test_backup_posix.py | dFarui/cinder | b2922384054ddbd46e071fd07372a75a21d7f85d | [
"Apache-2.0"
] | 841 | 2015-01-04T17:17:11.000Z | 2022-03-31T12:06:51.000Z | # Copyright (c) 2015 Red Hat, Inc.
# 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 require... | 38.066667 | 79 | 0.687682 |
794c1ea5184b7567c398660c424a1ae553ad97a7 | 2,886 | py | Python | dataset/data_utils/point_util.py | shinke-li/Campus3D | 21768908b064d19ce8daacc2fa0a1fe9e0331514 | [
"MIT"
] | 31 | 2020-08-10T13:34:38.000Z | 2022-03-28T11:20:56.000Z | dataset/data_utils/point_util.py | shinke-li/Campus3D | 21768908b064d19ce8daacc2fa0a1fe9e0331514 | [
"MIT"
] | 6 | 2020-12-01T08:57:04.000Z | 2022-03-14T11:13:28.000Z | dataset/data_utils/point_util.py | shinke-li/Campus3D | 21768908b064d19ce8daacc2fa0a1fe9e0331514 | [
"MIT"
] | 4 | 2021-01-09T05:01:50.000Z | 2021-08-18T04:25:40.000Z | import numpy as np
def gen_gaussian_ball(center, radius, size):
if not isinstance(radius, np.ndarray):
radius = np.asarray([radius, radius, radius])
pts = [np.random.normal(loc=center[i], scale=radius[i], size=size) for i in range(center.shape[0])]
return np.asarray(pts).transpose()
def gen_poin... | 35.195122 | 103 | 0.62578 |
794c1f9e0ba882f15b04b46a45de2c0a4d90605e | 112 | py | Python | matrix_registration/__init__.py | grinapo/matrix-registration | 2f444b0cb52dfd1ec9a992939e01b5363369c5df | [
"MIT"
] | null | null | null | matrix_registration/__init__.py | grinapo/matrix-registration | 2f444b0cb52dfd1ec9a992939e01b5363369c5df | [
"MIT"
] | null | null | null | matrix_registration/__init__.py | grinapo/matrix-registration | 2f444b0cb52dfd1ec9a992939e01b5363369c5df | [
"MIT"
] | null | null | null | from . import api
from . import tokens
from . import config
__version__ = '0.5.6'
name = 'matrix_registration'
| 16 | 28 | 0.732143 |
794c2140e338821a876737321fd396aad3ffe4bd | 2,180 | py | Python | scripts/parse_tlds.py | forestmonster/vimium-c | 950b6a544844970d011f17d534468c1c840d2429 | [
"MIT"
] | null | null | null | scripts/parse_tlds.py | forestmonster/vimium-c | 950b6a544844970d011f17d534468c1c840d2429 | [
"MIT"
] | null | null | null | scripts/parse_tlds.py | forestmonster/vimium-c | 950b6a544844970d011f17d534468c1c840d2429 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
FILE = "public_suffix_list.dat"
URL = "https://publicsuffix.org/list/" + FILE
DISABLED_TLDS = (
"exe", "pdf", "zip",
)
import sys
from imp import reload
reload(sys)
if hasattr(sys, "setdefaultencoding"):
sys.setdefaultencoding('utf-8')
else:
import codecs
sys.stdout = codecs.getw... | 27.25 | 84 | 0.525229 |
794c2220001b523bceb2ffd49693a23b5ad3039d | 8,676 | py | Python | ssd_gan.py | cyq373/SSD-GAN | 9dc956fd79cc2b21492fcc9bf1e4cdc5b276bdaf | [
"MIT"
] | 29 | 2020-12-10T09:55:51.000Z | 2022-03-08T13:06:38.000Z | ssd_gan.py | nianweijie/SSD-GAN | 9dc956fd79cc2b21492fcc9bf1e4cdc5b276bdaf | [
"MIT"
] | 2 | 2021-03-01T13:56:03.000Z | 2021-03-23T08:23:45.000Z | ssd_gan.py | nianweijie/SSD-GAN | 9dc956fd79cc2b21492fcc9bf1e4cdc5b276bdaf | [
"MIT"
] | 7 | 2021-06-28T02:47:23.000Z | 2022-03-13T01:19:41.000Z | """
Implementation of Base SSD-GAN models.
"""
import torch
from torch_mimicry.nets.basemodel import basemodel
from torch_mimicry.modules import losses
import numpy as np
class SSD_Generator(basemodel.BaseModel):
r"""
Base class for a generic unconditional generator model.
Attributes:
nz (int): ... | 34.983871 | 107 | 0.59071 |
794c2242585f1facaf790fd7d95c5e70f3b72ecd | 1,309 | py | Python | src/resource-graph/azext_resourcegraph/__init__.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 2 | 2021-06-05T17:51:26.000Z | 2021-11-17T11:17:56.000Z | src/resource-graph/azext_resourcegraph/__init__.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 3 | 2020-05-27T20:16:26.000Z | 2020-07-23T19:46:49.000Z | src/resource-graph/azext_resourcegraph/__init__.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 5 | 2020-05-09T17:47:09.000Z | 2020-10-01T19:52:06.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 36.361111 | 94 | 0.621085 |
794c228ac0fd8102ab33c8f9e1c0b51f4eba6537 | 178 | py | Python | src/utils/enum/flash_message_category.py | lokaimoma/Flask-QR-Code-Web-APP | 5789753757aa1939119a799cbc6bda023ea75bbc | [
"MIT"
] | 2 | 2022-03-05T18:54:15.000Z | 2022-03-24T12:19:22.000Z | src/utils/enum/flash_message_category.py | lokaimoma/Flask-QR-Code-Web-APP | 5789753757aa1939119a799cbc6bda023ea75bbc | [
"MIT"
] | null | null | null | src/utils/enum/flash_message_category.py | lokaimoma/Flask-QR-Code-Web-APP | 5789753757aa1939119a799cbc6bda023ea75bbc | [
"MIT"
] | null | null | null | # Created by Kelvin_Clark on 3/5/2022, 7:35 PM
from enum import Enum
class FlashMessageCategory(str, Enum):
SUCCESS = "success"
WARNING = "warning"
ERROR = "error"
| 19.777778 | 46 | 0.685393 |
794c2307696705e76a52d58092082a0f9416e002 | 2,696 | py | Python | emoji_model.py | AWIS99/Emojinator | bc331eba1b37520e54103a7d542e2fc9ec3a0115 | [
"MIT"
] | 3 | 2020-04-14T15:37:42.000Z | 2020-04-27T19:54:08.000Z | emoji_model.py | AWIS99/Emojinator | bc331eba1b37520e54103a7d542e2fc9ec3a0115 | [
"MIT"
] | null | null | null | emoji_model.py | AWIS99/Emojinator | bc331eba1b37520e54103a7d542e2fc9ec3a0115 | [
"MIT"
] | null | null | null | import numpy as np
from keras import layers
from keras.layers import Input, Dense, Activation, ZeroPadding2D, BatchNormalization, Flatten, Conv2D
from keras.layers import AveragePooling2D, MaxPooling2D, Dropout, GlobalMaxPooling2D, GlobalAveragePooling2D
from keras.utils import np_utils
from keras.models import Sequent... | 35.946667 | 112 | 0.720326 |
794c235193b9beef33b65724b017153eead2609a | 1,745 | py | Python | dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/ExportGridsRequest.py | srcarter3/python-awips | d981062662968cf3fb105e8e23d955950ae2497e | [
"BSD-3-Clause"
] | 33 | 2016-03-17T01:21:18.000Z | 2022-02-08T10:41:06.000Z | dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/ExportGridsRequest.py | srcarter3/python-awips | d981062662968cf3fb105e8e23d955950ae2497e | [
"BSD-3-Clause"
] | 15 | 2016-04-19T16:34:08.000Z | 2020-09-09T19:57:54.000Z | dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/ExportGridsRequest.py | Unidata/python-awips | 8459aa756816e5a45d2e5bea534d23d5b1dd1690 | [
"BSD-3-Clause"
] | 20 | 2016-03-12T01:46:58.000Z | 2022-02-08T06:53:22.000Z | #
# A pure python implementation of com.raytheon.uf.common.dataplugin.gfe.request.ExportGridsRequest
# for use by the python implementation of DynamicSerialize.
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- ------------------... | 30.614035 | 101 | 0.561605 |
794c23942a1f67848ff65e1d32a360602014740e | 4,238 | py | Python | microsoftml/202/plot_grid_search.py | wjones30309/ML-Server-Python-Samples | 975da57979dcd9c63c79d9452277cc27c175b875 | [
"CC-BY-4.0",
"MIT"
] | 32 | 2017-09-25T18:58:22.000Z | 2019-04-17T12:55:29.000Z | microsoftml/202/plot_grid_search.py | wjones30309/ML-Server-Python-Samples | 975da57979dcd9c63c79d9452277cc27c175b875 | [
"CC-BY-4.0",
"MIT"
] | 1 | 2019-05-09T13:55:01.000Z | 2019-05-09T20:21:54.000Z | microsoftml/202/plot_grid_search.py | wjones30309/ML-Server-Python-Samples | 975da57979dcd9c63c79d9452277cc27c175b875 | [
"CC-BY-4.0",
"MIT"
] | 48 | 2019-05-21T21:29:51.000Z | 2021-10-08T02:59:43.000Z | """
Grid Search
===========
All learners have what we call
`hyperparameters <https://en.wikipedia.org/wiki/Hyperparameter_(machine_learning)>`_
which impact the way a model is trained. Most of the time, they have a default
value which works on most of the datasets but that does not mean that's the best
possible value... | 31.392593 | 115 | 0.662341 |
794c247ca6a76f5a59594360b5cbfaed7761d61e | 1,361 | py | Python | src/main/resources/bitbucket/BitbucketTask.py | chandanaseshagiri1/xlr-bitbucket-plugin | 0f0b4e504e3e3a35ddf8e7aaab7be5e5fb7673f3 | [
"MIT"
] | null | null | null | src/main/resources/bitbucket/BitbucketTask.py | chandanaseshagiri1/xlr-bitbucket-plugin | 0f0b4e504e3e3a35ddf8e7aaab7be5e5fb7673f3 | [
"MIT"
] | null | null | null | src/main/resources/bitbucket/BitbucketTask.py | chandanaseshagiri1/xlr-bitbucket-plugin | 0f0b4e504e3e3a35ddf8e7aaab7be5e5fb7673f3 | [
"MIT"
] | 1 | 2020-02-26T19:21:33.000Z | 2020-02-26T19:21:33.000Z | #
# Copyright 2020 XEBIALABS
#
# 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, merge, publish, distribute, subli... | 71.631579 | 462 | 0.784717 |
794c25a461689de85f52b5a7a94017d583d9ae0b | 5,185 | py | Python | docs/source/conf.py | ricsinaruto/ParlAI | 733b627ae456d6b11a2fc4624088a781bc6c1d03 | [
"MIT"
] | 24 | 2019-09-16T00:10:54.000Z | 2021-09-08T19:31:51.000Z | docs/source/conf.py | ricsinaruto/ParlAI | 733b627ae456d6b11a2fc4624088a781bc6c1d03 | [
"MIT"
] | 3 | 2021-03-11T06:04:15.000Z | 2021-08-31T15:44:42.000Z | docs/source/conf.py | ricsinaruto/ParlAI | 733b627ae456d6b11a2fc4624088a781bc6c1d03 | [
"MIT"
] | 7 | 2019-09-16T02:37:31.000Z | 2021-09-01T06:06:17.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# ParlAI documentation build configuration file, created by
# sphinx-quickstart on Wed Apr 19 15:46:54 2017.
#
# This... | 29.798851 | 79 | 0.684667 |
794c26ac714a0d7f673c9f6fc082e366d93a4965 | 4,336 | py | Python | image_analyzer.py | openjamoses/docker-analyser | 2ca2cda0c78c90544cf7cc857eb5c99c77603347 | [
"Apache-2.0"
] | null | null | null | image_analyzer.py | openjamoses/docker-analyser | 2ca2cda0c78c90544cf7cc857eb5c99c77603347 | [
"Apache-2.0"
] | null | null | null | image_analyzer.py | openjamoses/docker-analyser | 2ca2cda0c78c90544cf7cc857eb5c99c77603347 | [
"Apache-2.0"
] | null | null | null | import argparse
import csv
import json
import os
from pathlib import Path
from analysis.Analyse import DockerImage
from analysis.DockerOptions import ImageOptions
from parser.file_contents import FileManagement
from parser.parser import Parser
parser = argparse.ArgumentParser()
parser.add_argument('-d', '--dir', help=... | 48.719101 | 135 | 0.66928 |
794c270480518a5972bacbf1fab22b31555a5b76 | 475 | py | Python | 4/oop4.py | ikramulkayes/Python_season2 | d057460d07c5d2d218ecd52e08c1d355add44df2 | [
"MIT"
] | null | null | null | 4/oop4.py | ikramulkayes/Python_season2 | d057460d07c5d2d218ecd52e08c1d355add44df2 | [
"MIT"
] | null | null | null | 4/oop4.py | ikramulkayes/Python_season2 | d057460d07c5d2d218ecd52e08c1d355add44df2 | [
"MIT"
] | null | null | null | class Cat:
def __init__(self,color = "White",state= "sitting"):
self.color = color
self.state = state
def changeColor(self,color):
self.color = color
def printCat(self):
print(f"{self.color} cat is {self.state}")
c1 = Cat()
c2 = Cat("Black")
c3 = Cat("Brown", "jumping")
c4 ... | 21.590909 | 56 | 0.625263 |
794c2718987bb3e64661920aa8099d43881032d5 | 5,768 | py | Python | melime/explainers/local_models/local_model_linear.py | elian204/melime | aef885fa4b6b02f7bf7294140d78a85fe546b622 | [
"MIT"
] | 48 | 2020-09-15T02:26:46.000Z | 2021-09-03T17:08:53.000Z | melime/explainers/local_models/local_model_linear.py | elian204/melime | aef885fa4b6b02f7bf7294140d78a85fe546b622 | [
"MIT"
] | 1 | 2020-11-03T04:14:27.000Z | 2020-11-05T16:32:25.000Z | melime/explainers/local_models/local_model_linear.py | elian204/melime | aef885fa4b6b02f7bf7294140d78a85fe546b622 | [
"MIT"
] | 3 | 2020-09-20T16:52:11.000Z | 2021-09-25T10:04:27.000Z | import numpy as np
from sklearn import metrics
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import SGDRegressor, Ridge, HuberRegressor
from melime.explainers.local_models.local_model_base import LocalModelBase
def transformer_identity(x):
... | 26.703704 | 101 | 0.564667 |
794c287c0e3c966b9d906b6e8fd638f63045d2e8 | 51 | py | Python | tuwmodel/__init__.py | raoulcollenteur/tuwmodel | 40a68a61d053dce279b055be3a01ea7c4036bffa | [
"MIT"
] | null | null | null | tuwmodel/__init__.py | raoulcollenteur/tuwmodel | 40a68a61d053dce279b055be3a01ea7c4036bffa | [
"MIT"
] | null | null | null | tuwmodel/__init__.py | raoulcollenteur/tuwmodel | 40a68a61d053dce279b055be3a01ea7c4036bffa | [
"MIT"
] | null | null | null | from .hbvmodel import *
from .model import simulate | 25.5 | 27 | 0.803922 |
794c28cf8b70ab7a8859df15e37519cc14595ba4 | 6,513 | py | Python | src/.history/Test/HiwinRT605_Strategy_test_v1_20190627100320.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/Test/HiwinRT605_Strategy_test_v1_20190627100320.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/Test/HiwinRT605_Strategy_test_v1_20190627100320.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# license removed for brevity
#策略 機械手臂 四點來回跑
import threading
import time
import rospy
import os
import numpy as np
from std_msgs.msg import String
from ROS_Socket.srv import *
from ROS_Socket.msg import *
import math
import enum
import Hiwin_RT605_Arm_Command as ArmTask
##----Arm state----------... | 35.016129 | 117 | 0.536158 |
794c28e3f924356778c0e998226a7cd9d91dffa9 | 6,912 | py | Python | morpheus/__main__.py | preller/morpheus | ba10271c6ace5aff3b35509ab5fbf42bcd6750b6 | [
"MIT"
] | 44 | 2019-06-28T04:29:02.000Z | 2022-03-03T01:29:26.000Z | morpheus/__main__.py | preller/morpheus | ba10271c6ace5aff3b35509ab5fbf42bcd6750b6 | [
"MIT"
] | 27 | 2019-01-07T22:56:04.000Z | 2022-02-18T15:44:59.000Z | morpheus/__main__.py | preller/morpheus | ba10271c6ace5aff3b35509ab5fbf42bcd6750b6 | [
"MIT"
] | 8 | 2019-06-28T16:25:08.000Z | 2022-03-07T12:16:57.000Z | # MIT License
# Copyright 2019 Ryan Hausen
#
# 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, merge, publis... | 32.914286 | 102 | 0.630353 |
794c29026bf16d235272ba920d10c9a23da82885 | 9,879 | py | Python | pennylane/templates/state_preparations/mottonen.py | kareem1925/pennylane | 04bb5ba0fcced558e1273b94b3ea8c39622c5ca4 | [
"Apache-2.0"
] | null | null | null | pennylane/templates/state_preparations/mottonen.py | kareem1925/pennylane | 04bb5ba0fcced558e1273b94b3ea8c39622c5ca4 | [
"Apache-2.0"
] | null | null | null | pennylane/templates/state_preparations/mottonen.py | kareem1925/pennylane | 04bb5ba0fcced558e1273b94b3ea8c39622c5ca4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Xanadu Quantum Technologies Inc.
# 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... | 32.390164 | 113 | 0.632959 |
794c2aee16bca61634be3e5b04091c96c0ddfff2 | 1,720 | py | Python | util.py | abwilf/Factorized | 64e7d2a54bbfbc8b1c5a2130f2b941c376402fe6 | [
"MIT"
] | 22 | 2021-03-18T22:17:59.000Z | 2022-01-26T22:04:57.000Z | util.py | abwilf/Factorized | 64e7d2a54bbfbc8b1c5a2130f2b941c376402fe6 | [
"MIT"
] | 3 | 2021-06-10T15:09:32.000Z | 2022-01-05T07:15:48.000Z | util.py | abwilf/Factorized | 64e7d2a54bbfbc8b1c5a2130f2b941c376402fe6 | [
"MIT"
] | 7 | 2021-03-18T22:00:26.000Z | 2022-03-07T01:21:33.000Z | import random
import os
import torch
import numpy as np
import zipfile
from tqdm import tqdm
from datetime import datetime
from contextlib import contextmanager
from time import time
def set_seed(my_seed):
os.environ['PYTHONHASHSEED'] = str(my_seed)
random.seed(my_seed)
np.random.seed(my_seed)
tor... | 35.102041 | 261 | 0.711047 |
794c2d84855a6809157b0cc173e4fe37ec85c9c7 | 1,499 | py | Python | src/satisfy/tool/demo_utils.py | simone-campagna/satisfy | b5327e937e32c5324c05f6288f59cfaac4a316dc | [
"Apache-2.0"
] | null | null | null | src/satisfy/tool/demo_utils.py | simone-campagna/satisfy | b5327e937e32c5324c05f6288f59cfaac4a316dc | [
"Apache-2.0"
] | null | null | null | src/satisfy/tool/demo_utils.py | simone-campagna/satisfy | b5327e937e32c5324c05f6288f59cfaac4a316dc | [
"Apache-2.0"
] | null | null | null | __all__ = [
'print_model',
'print_solve_stats',
'print_optimization_stats',
]
def print_model(model):
print("\n=== model variables: ===")
for var_index, (var_name, var_info) in enumerate(model.variables().items()):
print(" {:4d}) {!r} domain: {}".format(var_index, var_name, var_info.domain... | 30.591837 | 107 | 0.599733 |
794c2f8959eca83660977433d80c4a0bc5b4be88 | 15,122 | py | Python | src/marshmallow_sqlalchemy/convert.py | TheunsPretorius/marshmallow-sqlalchemy | eabf78746504278c7d4b08aca4c24d42b3a9e0f5 | [
"MIT"
] | 498 | 2015-04-29T05:32:08.000Z | 2022-03-29T11:42:52.000Z | src/marshmallow_sqlalchemy/convert.py | TheunsPretorius/marshmallow-sqlalchemy | eabf78746504278c7d4b08aca4c24d42b3a9e0f5 | [
"MIT"
] | 290 | 2015-05-23T01:39:51.000Z | 2022-03-15T12:44:28.000Z | src/marshmallow_sqlalchemy/convert.py | TheunsPretorius/marshmallow-sqlalchemy | eabf78746504278c7d4b08aca4c24d42b3a9e0f5 | [
"MIT"
] | 98 | 2015-05-08T01:58:09.000Z | 2022-03-05T14:05:44.000Z | import inspect
import functools
import warnings
from distutils.version import LooseVersion
import uuid
import marshmallow as ma
from marshmallow import validate, fields
from sqlalchemy.dialects import postgresql, mysql, mssql
from sqlalchemy.orm import SynonymProperty
import sqlalchemy as sa
from .exceptions import M... | 36.973105 | 92 | 0.639664 |
794c313d4324479813b0b625326c31c58a6c52bf | 2,820 | py | Python | build/android/pylib/uiautomator/test_runner.py | tmpsantos/chromium | 802d4aeeb33af25c01ee5994037bbf14086d4ac0 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | build/android/pylib/uiautomator/test_runner.py | tmpsantos/chromium | 802d4aeeb33af25c01ee5994037bbf14086d4ac0 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | build/android/pylib/uiautomator/test_runner.py | tmpsantos/chromium | 802d4aeeb33af25c01ee5994037bbf14086d4ac0 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-11-04T07:23:37.000Z | 2020-11-04T07:23:37.000Z | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Class for running uiautomator tests on a single device."""
from pylib import constants
from pylib import flag_changer
from pylib.device import intent... | 35.696203 | 80 | 0.710993 |
794c336b2c288d760796c60e77f621a17d3ae822 | 1,140 | py | Python | 2016/day08.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | 11 | 2019-12-03T06:32:37.000Z | 2021-12-24T12:23:57.000Z | 2016/day08.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | null | null | null | 2016/day08.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | 1 | 2019-12-07T06:21:31.000Z | 2019-12-07T06:21:31.000Z | # -*- coding: utf-8 -*-
# import sys
# import time
import fileinput
from utils import parse_line
WIDTH = 50
HEIGHT = 6
SCREEN = [[False for _ in range(WIDTH)] for _ in range(HEIGHT)]
# Make space for animated output
# print '\n' * HEIGHT
for line in fileinput.input():
if line.startswith('rect'):
a, b = ... | 22.8 | 74 | 0.524561 |
794c337bdaa29cf7ddadf460865e1b0cabf6dcbf | 2,602 | py | Python | 2020/day-18/part2.py | nairraghav/advent-of-code-2019 | 274a2a4a59a8be39afb323356c592af5e1921e54 | [
"MIT"
] | null | null | null | 2020/day-18/part2.py | nairraghav/advent-of-code-2019 | 274a2a4a59a8be39afb323356c592af5e1921e54 | [
"MIT"
] | null | null | null | 2020/day-18/part2.py | nairraghav/advent-of-code-2019 | 274a2a4a59a8be39afb323356c592af5e1921e54 | [
"MIT"
] | null | null | null | def is_int(int_string):
try:
int(int_string)
return True
except:
return False
def calculate(first_number, second_number, operation):
if operation == "+":
return first_number + second_number
elif operation == "*":
return first_number * second_number
def simplif... | 32.525 | 98 | 0.575711 |
794c3419880dcd04c4a9a47939d4ea89877048fb | 896 | py | Python | pets/forms.py | AlexeyDonskikh/petselection | 72a148f866b6550f6ccdfb6117acea25404df955 | [
"MIT"
] | null | null | null | pets/forms.py | AlexeyDonskikh/petselection | 72a148f866b6550f6ccdfb6117acea25404df955 | [
"MIT"
] | null | null | null | pets/forms.py | AlexeyDonskikh/petselection | 72a148f866b6550f6ccdfb6117acea25404df955 | [
"MIT"
] | null | null | null | from django import forms
from django.forms import inlineformset_factory
from pets.models import ImagePet, Pet
class PetForm(forms.ModelForm):
class Meta:
model = Pet
fields = ('name', 'age', 'weight', 'species', 'breed', 'description',)
help_texts = {
'name': 'Имя питомца',
... | 26.352941 | 78 | 0.551339 |
794c34d82bdeb106bd4ab06b8b2be88c826d162b | 2,455 | py | Python | discord/commands/errors.py | br-cz/hockey-db-bot | 9919ef1416a0ab46bd93c7a177b33955a43cb430 | [
"MIT"
] | 2 | 2021-08-29T14:03:22.000Z | 2022-01-27T10:02:48.000Z | discord/commands/errors.py | mugman174/fosscord | 3d860731b761c1be116a281303486cefaaa0228e | [
"MIT"
] | 5 | 2021-11-02T17:08:59.000Z | 2022-03-28T07:31:06.000Z | discord/commands/errors.py | mugman174/fosscord | 3d860731b761c1be116a281303486cefaaa0228e | [
"MIT"
] | 1 | 2021-11-06T14:09:15.000Z | 2021-11-06T14:09:15.000Z | """
The MIT License (MIT)
Copyright (c) 2021-present Pycord Development
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... | 37.769231 | 98 | 0.731161 |
794c350ea069aa341679917a988cf4d82813eb02 | 26,614 | py | Python | kairon/shared/account/processor.py | encounter-ai/kairon | 48eccde345781f95f0654813415e52f1b647d557 | [
"Apache-2.0"
] | null | null | null | kairon/shared/account/processor.py | encounter-ai/kairon | 48eccde345781f95f0654813415e52f1b647d557 | [
"Apache-2.0"
] | null | null | null | kairon/shared/account/processor.py | encounter-ai/kairon | 48eccde345781f95f0654813415e52f1b647d557 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from typing import Dict, Text
from loguru import logger as logging
from mongoengine.errors import DoesNotExist
from mongoengine.errors import ValidationError
from pydantic import SecretStr
from validators import ValidationFailure
from validators import email as mail_check
from kairon.exce... | 40.14178 | 148 | 0.617232 |
794c3524fbb485bf3059528a66a2992f53743214 | 24,337 | py | Python | alectryon/cli.py | start974/alectryon | df5664e71c1026af4aaf69e6b227d427a728e7c6 | [
"MIT"
] | null | null | null | alectryon/cli.py | start974/alectryon | df5664e71c1026af4aaf69e6b227d427a728e7c6 | [
"MIT"
] | null | null | null | alectryon/cli.py | start974/alectryon | df5664e71c1026af4aaf69e6b227d427a728e7c6 | [
"MIT"
] | null | null | null | # Copyright © 2019 Clément Pit-Claudel
#
# 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, merge, publish, d... | 36.986322 | 83 | 0.653285 |
794c3672463512789e30441d4fdd1a2878d00d41 | 5,788 | py | Python | tests/testapp/test_forms.py | matthiask/towel | 438bd76ca5f4a464464c5ccc6ccd04d6370df91a | [
"BSD-3-Clause"
] | 46 | 2015-01-29T03:50:22.000Z | 2021-10-01T01:36:46.000Z | tests/testapp/test_forms.py | matthiask/towel | 438bd76ca5f4a464464c5ccc6ccd04d6370df91a | [
"BSD-3-Clause"
] | 6 | 2015-04-08T13:25:17.000Z | 2017-03-18T14:04:50.000Z | tests/testapp/test_forms.py | matthiask/towel | 438bd76ca5f4a464464c5ccc6ccd04d6370df91a | [
"BSD-3-Clause"
] | 6 | 2015-06-05T14:23:51.000Z | 2020-03-26T19:33:08.000Z | from datetime import timedelta
from django.test import TestCase
from django.urls import reverse
from django.utils import timezone
from testapp.models import Message, Person
class FormsTest(TestCase):
def test_warningsform(self):
person = Person.objects.create()
emailaddress = person.emailaddress_... | 34.86747 | 87 | 0.546303 |
794c372ddba2e9b1e6c67dcd6f1ecf29aeb604b9 | 2,269 | py | Python | VSR/Backend/Torch/Models/Esrgan.py | Kadantte/VideoSuperResolution | 4c86e49d81c7a9bea1fe0780d651afc126768df3 | [
"MIT"
] | 1,447 | 2018-06-04T08:44:07.000Z | 2022-03-29T06:19:10.000Z | VSR/Backend/Torch/Models/Esrgan.py | pipixiapipi/VideoSuperResolution | 4c86e49d81c7a9bea1fe0780d651afc126768df3 | [
"MIT"
] | 96 | 2018-08-29T01:02:45.000Z | 2022-01-12T06:00:01.000Z | VSR/Backend/Torch/Models/Esrgan.py | pipixiapipi/VideoSuperResolution | 4c86e49d81c7a9bea1fe0780d651afc126768df3 | [
"MIT"
] | 307 | 2018-06-26T13:35:54.000Z | 2022-01-21T09:01:54.000Z | # Copyright (c): Wenyi Tang 2017-2019.
# Author: Wenyi Tang
# Email: wenyi.tang@intel.com
# Update Date: 2019 - 3 - 15
import logging
import numpy as np
import torch.nn as nn
from .Ops.Blocks import Activation, EasyConv2d, Rrdb
from .Ops.Discriminator import DCGAN
from .Ops.Scale import Upsample
from .Optim.SISR... | 36.015873 | 78 | 0.56677 |
794c37fe40715365670b43421b1b2f25410d25b1 | 629 | py | Python | python/basix/variants.py | jpdean/basix | d79f22d00e195bf8f5b58b8e50562b98650b0be0 | [
"MIT"
] | null | null | null | python/basix/variants.py | jpdean/basix | d79f22d00e195bf8f5b58b8e50562b98650b0be0 | [
"MIT"
] | null | null | null | python/basix/variants.py | jpdean/basix | d79f22d00e195bf8f5b58b8e50562b98650b0be0 | [
"MIT"
] | null | null | null | """Functions to manipulate variant types."""
from ._basixcpp import LagrangeVariant as _LV
def string_to_lagrange_variant(variant: str):
"""Convert a string to a Basix LagrangeVariant enum."""
if variant == "gll":
return _LV.gll_warped
if variant == "chebyshev":
return _LV.chebyshev_isaac... | 27.347826 | 59 | 0.686804 |
794c39258b174b98e904ed4e1994c160c0a51b47 | 4,960 | py | Python | stanza/utils/datasets/process_orchid.py | de9uch1/stanza | cafb7d5004842cd3c8a3ac334ce7649bac928830 | [
"Apache-2.0"
] | 25 | 2021-12-01T15:19:36.000Z | 2022-03-12T12:50:28.000Z | stanza/utils/datasets/process_orchid.py | de9uch1/stanza | cafb7d5004842cd3c8a3ac334ce7649bac928830 | [
"Apache-2.0"
] | 3 | 2021-12-14T06:34:52.000Z | 2022-02-17T08:23:20.000Z | stanza/utils/datasets/process_orchid.py | de9uch1/stanza | cafb7d5004842cd3c8a3ac334ce7649bac928830 | [
"Apache-2.0"
] | 6 | 2021-10-12T13:44:17.000Z | 2022-03-07T13:54:17.000Z | """Parses the xml conversion of orchid
https://github.com/korakot/thainlp/blob/master/xmlchid.xml
For example, if you put the data file in the above link in
extern_data/thai/orchid/xmlchid.xml
you would then run
python3 -m stanza.utils.datasets.process_orchid extern_data/thai/orchid/xmlchid.xml data/tokenize
Because... | 32.207792 | 137 | 0.587903 |
794c393f6f7e9f8ff906c5437a50c4c4e3bdac0d | 12,382 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/doc/glossary.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 145 | 2017-01-19T23:33:03.000Z | 2021-06-05T05:34:55.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/doc/glossary.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 17 | 2017-02-03T20:51:39.000Z | 2020-05-21T11:33:52.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/doc/glossary.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 44 | 2017-02-04T19:40:03.000Z | 2020-10-01T19:24:19.000Z | """
========
Glossary
========
.. glossary::
along an axis
Axes are defined for arrays with more than one dimension. A
2-dimensional array has two corresponding axes: the first running
vertically downwards across rows (axis 0), and the second running
horizontally across columns (axis 1... | 29.134118 | 82 | 0.534243 |
794c3a312e3f935dc46f44cf3cf0828cfcb9da75 | 980 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/nc/models/LogConfiguration.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/nc/models/LogConfiguration.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/nc/models/LogConfiguration.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 32.666667 | 82 | 0.72551 |
794c3b2bb8443a87f856a76d62c4d36bc450a5e6 | 13,820 | py | Python | zippy/benchmarks/src/benchmarks/sympy/sympy/series/order.py | lucapele/pele-c | ff6d06794a171f8e1b08fc6246446d9777116f56 | [
"BSD-3-Clause"
] | 319 | 2016-09-22T15:54:48.000Z | 2022-03-18T02:36:58.000Z | sympy/series/order.py | KDOTGIS/sympy | 2fb92446c40f242b341b3f17ebaa446ef5b19849 | [
"BSD-3-Clause"
] | 9 | 2016-11-03T21:56:41.000Z | 2020-08-09T19:27:37.000Z | sympy/series/order.py | KDOTGIS/sympy | 2fb92446c40f242b341b3f17ebaa446ef5b19849 | [
"BSD-3-Clause"
] | 27 | 2016-10-06T16:05:32.000Z | 2022-03-18T02:37:00.000Z | from __future__ import print_function, division
from sympy.core import Basic, S, sympify, Expr, Rational, Symbol, Dummy
from sympy.core import Add, Mul, expand_power_base, expand_log
from sympy.core.cache import cacheit
from sympy.core.compatibility import default_sort_key, is_sequence
from sympy.core.containers impor... | 34.55 | 95 | 0.501085 |
794c3b712d16ea4cdb1fb5379d624521efae0888 | 352 | py | Python | exif.py | achavez/photostreamer-pi | 9b335fac1ebc3b69f35368268166e4dfdc1aa449 | [
"MIT"
] | 11 | 2015-06-04T19:27:15.000Z | 2021-07-01T01:32:32.000Z | exif.py | achavez/photostreamer-pi | 9b335fac1ebc3b69f35368268166e4dfdc1aa449 | [
"MIT"
] | 1 | 2015-09-22T22:50:38.000Z | 2015-09-30T12:24:50.000Z | exif.py | achavez/photostreamer-pi | 9b335fac1ebc3b69f35368268166e4dfdc1aa449 | [
"MIT"
] | 2 | 2015-06-08T16:43:22.000Z | 2016-06-04T12:03:18.000Z | import exifread
def parse(fileName):
"""
Pull the EXIf info from a photo and sanitize it so for sending as JSON
by converting values to strings.
"""
f = open(fileName, 'rb')
exif = exifread.process_file(f, details=False)
parsed = {}
for key, value in exif.iteritems():
parsed[key... | 27.076923 | 74 | 0.642045 |
794c3d99f85e0d05e19944a6e885fb7f4bd4e85e | 33 | py | Python | py3_wordsmith/__init__.py | xACruceSalus/py3_wordsmith | 120d3d2e4bbf5a0e1c2635266a295354b0be1ca0 | [
"Apache-2.0"
] | 1 | 2016-03-25T16:54:33.000Z | 2016-03-25T16:54:33.000Z | py3_wordsmith/__init__.py | xACruceSalus/py3_wordsmith | 120d3d2e4bbf5a0e1c2635266a295354b0be1ca0 | [
"Apache-2.0"
] | null | null | null | py3_wordsmith/__init__.py | xACruceSalus/py3_wordsmith | 120d3d2e4bbf5a0e1c2635266a295354b0be1ca0 | [
"Apache-2.0"
] | null | null | null | from .wordsmith import Wordsmith
| 16.5 | 32 | 0.848485 |
794c3e37ff32b01e7bbba37c3ccb694582acea8a | 2,756 | py | Python | src/examples/tutorial/ascent_intro/python/ascent_trigger_example1.py | srini009/ascent | 70558059dc3fe514206781af6e48715d8934c37c | [
"BSD-3-Clause"
] | null | null | null | src/examples/tutorial/ascent_intro/python/ascent_trigger_example1.py | srini009/ascent | 70558059dc3fe514206781af6e48715d8934c37c | [
"BSD-3-Clause"
] | null | null | null | src/examples/tutorial/ascent_intro/python/ascent_trigger_example1.py | srini009/ascent | 70558059dc3fe514206781af6e48715d8934c37c | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# Copyright (c) Lawrence Livermore National Security, LLC and other Ascent
# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
# other details. No copyright assignment is required to contribute to Ascent.
#########... | 29.634409 | 88 | 0.695573 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.