hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5f7b56220a8572a4acb5e982f2f58fae787623d1 | 5,911 | py | Python | Others/SsenseMonitor.py | 869903437/Sneaker-Monitors | eda58ada998169edc17f56f1d0b4f91ed71b98ce | [
"MIT"
] | null | null | null | Others/SsenseMonitor.py | 869903437/Sneaker-Monitors | eda58ada998169edc17f56f1d0b4f91ed71b98ce | [
"MIT"
] | null | null | null | Others/SsenseMonitor.py | 869903437/Sneaker-Monitors | eda58ada998169edc17f56f1d0b4f91ed71b98ce | [
"MIT"
] | 1 | 2021-03-01T14:12:41.000Z | 2021-03-01T14:12:41.000Z | # No restocks, only releases
import requests
import datetime
import json
from bs4 import BeautifulSoup
import urllib3
import time
import logging
import dotenv
from random_user_agent.user_agent import UserAgent
from random_user_agent.params import SoftwareName, HardwareType
logging.basicConfig(filename='Ssenselog.log',... | 35.608434 | 114 | 0.591101 |
def305f375535d8662d9a7e8ad93aba235079f10 | 39,995 | py | Python | bin/sa_haveibeenpwned/aob_py3/solnlib/packages/splunklib/searchcommands/search_command.py | hRun/SA-haveibeenpwned | 2a8ae3dedc405dc3c8dac1cb6a705a70f574afdb | [
"Apache-2.0"
] | 2 | 2020-08-17T07:52:48.000Z | 2020-12-18T16:39:32.000Z | bin/sa_haveibeenpwned/aob_py3/solnlib/packages/splunklib/searchcommands/search_command.py | hRun/SA-haveibeenpwned | 2a8ae3dedc405dc3c8dac1cb6a705a70f574afdb | [
"Apache-2.0"
] | 5 | 2020-12-15T23:40:14.000Z | 2022-02-23T15:43:18.000Z | bin/sa_haveibeenpwned/aob_py2/solnlib/packages/splunklib/searchcommands/search_command.py | hRun/SA-haveibeenpwned | 2a8ae3dedc405dc3c8dac1cb6a705a70f574afdb | [
"Apache-2.0"
] | 4 | 2019-05-16T09:57:33.000Z | 2021-07-14T12:31:21.000Z | # coding=utf-8
#
# Copyright © 2011-2015 Splunk, 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 appli... | 35.80573 | 136 | 0.585398 |
2a11e40ef93d843aec488eb6d4571f7b5fc3556c | 5,221 | py | Python | u2net_train_daedalus.py | nicolalandro/U-2-Net | eb19f7fea8fe112582a94ec03e4740c42db02246 | [
"Apache-2.0"
] | null | null | null | u2net_train_daedalus.py | nicolalandro/U-2-Net | eb19f7fea8fe112582a94ec03e4740c42db02246 | [
"Apache-2.0"
] | null | null | null | u2net_train_daedalus.py | nicolalandro/U-2-Net | eb19f7fea8fe112582a94ec03e4740c42db02246 | [
"Apache-2.0"
] | 1 | 2022-03-09T14:51:12.000Z | 2022-03-09T14:51:12.000Z | import os
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torchvision import transforms
import torch.optim as optim
import os
from data_loader import RescaleT
from data_loader import RandomCrop
from data_loader import... | 29.834286 | 201 | 0.645662 |
934bf410a82e82c38edd29f470c9b6e720090fa7 | 41,496 | py | Python | dns/query.py | reedjc/dnspython | ebc4149f74a9a553ac0dad9fe840165b225b013f | [
"ISC"
] | 3 | 2021-09-04T16:02:07.000Z | 2022-03-13T00:16:10.000Z | dns/query.py | felixonmars/dnspython | 2691834df42aab74914883fdf26109aeb62ec647 | [
"ISC"
] | 9 | 2021-11-01T08:21:40.000Z | 2022-03-25T08:23:33.000Z | dns/query.py | felixonmars/dnspython | 2691834df42aab74914883fdf26109aeb62ec647 | [
"ISC"
] | 2 | 2022-02-20T18:00:22.000Z | 2022-03-20T16:10:14.000Z | # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
# Copyright (C) 2003-2017 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permis... | 37.8268 | 80 | 0.605311 |
727926df86514612d95b3e225133e32cc23abba0 | 2,171 | py | Python | my_tkinter_interface/interface.py | ThibautMatzke/meraki-automation-dns | 77b7f7bfd77cd2a539f17f4fd5b46557e9c1041b | [
"MIT"
] | null | null | null | my_tkinter_interface/interface.py | ThibautMatzke/meraki-automation-dns | 77b7f7bfd77cd2a539f17f4fd5b46557e9c1041b | [
"MIT"
] | null | null | null | my_tkinter_interface/interface.py | ThibautMatzke/meraki-automation-dns | 77b7f7bfd77cd2a539f17f4fd5b46557e9c1041b | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import *
from automation import automation_core
from my_tkinter_interface import pages
class ProjectApp(tk.Tk):
"""
This class goal is to provide a user-friendly interface for this script.
This one also contains the possibility to choose & set the working Organization ID... | 29.739726 | 99 | 0.619991 |
df75b3eb17f0a5113bdd69bbd3ee6818fcd198aa | 6,400 | py | Python | eve_peewee/tests/__init__.py | stt/eve-peewee | 84ff6061dec7234ae1f8cc82a0afa4d03f7242aa | [
"BSD-2-Clause"
] | 2 | 2016-04-26T03:45:38.000Z | 2016-09-02T03:10:54.000Z | eve_peewee/tests/__init__.py | stt/eve-peewee | 84ff6061dec7234ae1f8cc82a0afa4d03f7242aa | [
"BSD-2-Clause"
] | null | null | null | eve_peewee/tests/__init__.py | stt/eve-peewee | 84ff6061dec7234ae1f8cc82a0afa4d03f7242aa | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import eve
import string
import random
import os
import copy
import json
from datetime import datetime
from eve import ETAG
from eve.tests import TestMinimal
from eve.utils import date_to_str
#from eve_sqlalchemy.tests import test_sql_tables
#from eve_sqlalchemy.validation import ValidatorSQL
... | 36.99422 | 80 | 0.571875 |
b63d5412f859708c272b7a4ecc9bdd57e196134b | 837 | py | Python | app/api/__init__.py | peterentroprise/entro-tad | b074d4810bcc7fb71b467da8dfaa19be66a41fa2 | [
"MIT"
] | null | null | null | app/api/__init__.py | peterentroprise/entro-tad | b074d4810bcc7fb71b467da8dfaa19be66a41fa2 | [
"MIT"
] | null | null | null | app/api/__init__.py | peterentroprise/entro-tad | b074d4810bcc7fb71b467da8dfaa19be66a41fa2 | [
"MIT"
] | null | null | null | from fastapi import APIRouter, Depends, HTTPException
from fastapi.security import APIKeyHeader
from api import item
from api import video
from api import healthcheck
api_router = APIRouter()
router = APIRouter()
API_KEY_SCHEME = APIKeyHeader(name='x-api-key')
async def verify_api_key(api_key: str = Depends(API_K... | 22.026316 | 79 | 0.725209 |
ff8d7bf08b192dc00b0746f3126a6cddb14d4674 | 1,807 | py | Python | migrations/versions/2018_03_14_22710e6fd2b1_set_category_of_alv_document_revisions.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 11 | 2015-04-23T21:57:56.000Z | 2019-04-28T12:48:58.000Z | migrations/versions/2018_03_14_22710e6fd2b1_set_category_of_alv_document_revisions.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 1 | 2016-10-05T14:10:58.000Z | 2016-10-05T14:12:23.000Z | migrations/versions/2018_03_14_22710e6fd2b1_set_category_of_alv_document_revisions.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 3 | 2016-10-05T14:00:42.000Z | 2019-01-16T14:33:43.000Z | """Set category of ALV document revisions.
Revision ID: 22710e6fd2b1
Revises: 4a3debf40b72
Create Date: 2018-03-14 15:35:30.841219
"""
from alembic import op
import sqlalchemy as sa
from app.models.base_model import BaseEntity
from app.enums import FileCategory
from sqlalchemy.ext.declarative import declarative_base... | 25.097222 | 74 | 0.705036 |
ea41479b5a889989e7a19814e350c64b80492810 | 5,477 | py | Python | code/scripts/number-of-tesseroids.py | pinga-lab/tesseroid-variable-density | 7fae8a2d6df645d64ce940f98273aef256de2e38 | [
"BSD-3-Clause"
] | 8 | 2019-06-05T21:24:36.000Z | 2022-01-03T08:57:54.000Z | code/scripts/number-of-tesseroids.py | pinga-lab/tesseroid-variable-density | 7fae8a2d6df645d64ce940f98273aef256de2e38 | [
"BSD-3-Clause"
] | 30 | 2018-09-21T22:09:24.000Z | 2019-12-24T12:34:40.000Z | code/scripts/number-of-tesseroids.py | pinga-lab/tesseroid-variable-density | 7fae8a2d6df645d64ce940f98273aef256de2e38 | [
"BSD-3-Clause"
] | 6 | 2018-10-15T02:02:33.000Z | 2021-04-25T05:00:32.000Z | """
We will compute the number of discretization that the density-based algorithm performs
in case of an exponential density and a delta value of 0.1.
We will explore different values of the constant b to see how it affects the
computational load.
"""
from __future__ import division
import os
import warnings
import num... | 32.60119 | 86 | 0.629724 |
a17768a53b63e2ddb975f68a10ce05e38bf51247 | 14,266 | py | Python | sshutil/cmd.py | fortinet-solutions-cse/netconf-proxy | 5d98867c95e59f4ed347c3fe94bfd459d6e7152d | [
"Apache-2.0"
] | 9 | 2017-08-01T04:55:18.000Z | 2022-03-28T12:24:25.000Z | sshutil/cmd.py | fortinet-solutions-cse/netconf-proxy | 5d98867c95e59f4ed347c3fe94bfd459d6e7152d | [
"Apache-2.0"
] | null | null | null | sshutil/cmd.py | fortinet-solutions-cse/netconf-proxy | 5d98867c95e59f4ed347c3fe94bfd459d6e7152d | [
"Apache-2.0"
] | 2 | 2020-09-17T06:32:11.000Z | 2021-03-16T12:52:46.000Z | # -*- coding: utf-8 -*-#
#
# Copyright (c) 2015, Deutsche Telekom AG.
#
# 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 app... | 34.129187 | 107 | 0.562666 |
7143fd47e825b7cd7d65e9a55a774769d724939b | 233 | py | Python | 02-Flask-Basics/01-Basic-Routes.py | saidulislam/flask-bootcamp-1 | 590bcac5a242b0f1f1e7540019bc3fc3e109c9b9 | [
"Apache-2.0"
] | 1 | 2019-08-07T08:05:32.000Z | 2019-08-07T08:05:32.000Z | Flask/02-Flask-Basics/01-Basic-Routes.py | Sandy1811/demandforecasting | fdb6878d93502773ba8da809c2de1b33c96fb9a0 | [
"Apache-2.0"
] | 8 | 2021-02-08T20:32:03.000Z | 2022-03-11T23:56:31.000Z | Flask/02-Flask-Basics/01-Basic-Routes.py | Sandy1811/demandforecasting | fdb6878d93502773ba8da809c2de1b33c96fb9a0 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return '<h1>Hello Puppy!</h1>'
@app.route('/information')
def info():
return '<h1>Puppies are cute!</h1>'
if __name__ == '__main__':
app.run()
| 16.642857 | 39 | 0.626609 |
617a569da9a6fd7f23c631bf479ff2771f250c87 | 947 | py | Python | Problems/Amazing Test/test.py | jamtot/HackerEarth | 71b919920dbc5b3af3fc49920939bab418455fb6 | [
"MIT"
] | 3 | 2018-07-17T09:03:02.000Z | 2020-05-11T18:03:25.000Z | Problems/Amazing Test/test.py | jamtot/HackerEarth | 71b919920dbc5b3af3fc49920939bab418455fb6 | [
"MIT"
] | null | null | null | Problems/Amazing Test/test.py | jamtot/HackerEarth | 71b919920dbc5b3af3fc49920939bab418455fb6 | [
"MIT"
] | 2 | 2016-06-01T13:16:27.000Z | 2018-09-25T08:32:24.000Z | def findSum(anslist, target, L, combo=[]):
if anslist:
return
if not target:
anslist.append(combo)
return
if target < 0:
return
for i in xrange(len(L)):
findSum(anslist, target-L[i], L[:i]+L[i+1:], combo+[L[i]])
def amazing_test():
N, X = map(int, raw_input()... | 25.594595 | 66 | 0.555438 |
723c26f0ebc163611f2aee032229ad55b1c58062 | 5,844 | py | Python | paasta_tools/check_flink_services_health.py | sofyat/paasta | 6765ed992ec224bf78741ffcd615a6a6c6ffb780 | [
"Apache-2.0"
] | null | null | null | paasta_tools/check_flink_services_health.py | sofyat/paasta | 6765ed992ec224bf78741ffcd615a6a6c6ffb780 | [
"Apache-2.0"
] | null | null | null | paasta_tools/check_flink_services_health.py | sofyat/paasta | 6765ed992ec224bf78741ffcd615a6a6c6ffb780 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2015-2019 Yelp 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 ... | 35.204819 | 110 | 0.715092 |
3f31518a509fb08bb169b38c7ea2048d7ea53093 | 22 | py | Python | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/__init__.py | bricklayer-Liu/aliyun-openapi-python-sdk | 20da2554de22679fc7c5462c483663e4d79512aa | [
"Apache-2.0"
] | 1 | 2021-03-08T02:59:17.000Z | 2021-03-08T02:59:17.000Z | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/__init__.py | bricklayer-Liu/aliyun-openapi-python-sdk | 20da2554de22679fc7c5462c483663e4d79512aa | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/__init__.py | bricklayer-Liu/aliyun-openapi-python-sdk | 20da2554de22679fc7c5462c483663e4d79512aa | [
"Apache-2.0"
] | null | null | null | __version__ = '3.0.18' | 22 | 22 | 0.681818 |
d4f96cef0ff448ad87dc6823ea398844da6224e8 | 21,399 | py | Python | tests/test_ctl.py | ServiceMax-Engineering/patroni | 48a6af6994f2bbb8a13e58db6179a514a3937429 | [
"MIT"
] | null | null | null | tests/test_ctl.py | ServiceMax-Engineering/patroni | 48a6af6994f2bbb8a13e58db6179a514a3937429 | [
"MIT"
] | null | null | null | tests/test_ctl.py | ServiceMax-Engineering/patroni | 48a6af6994f2bbb8a13e58db6179a514a3937429 | [
"MIT"
] | null | null | null | import etcd
import os
import requests
import sys
import unittest
from click.testing import CliRunner
from mock import patch, Mock
from patroni.ctl import ctl, members, store_config, load_config, output_members, request_patroni, get_dcs, parse_dcs, \
wait_for_leader, get_all_members, get_any_member, get_cursor, que... | 48.744875 | 119 | 0.641899 |
95f54412d01f3fb51da6bb00f4a082b993022764 | 379 | py | Python | tests/pickle_test.py | maratsarbasov/aioprocessing | c7202796e0ea752d48926aab52767ef2068595bc | [
"BSD-2-Clause-FreeBSD"
] | 517 | 2015-01-09T04:49:08.000Z | 2022-03-31T19:32:57.000Z | tests/pickle_test.py | maratsarbasov/aioprocessing | c7202796e0ea752d48926aab52767ef2068595bc | [
"BSD-2-Clause-FreeBSD"
] | 34 | 2015-02-20T19:19:30.000Z | 2021-12-20T16:35:48.000Z | tests/pickle_test.py | maratsarbasov/aioprocessing | c7202796e0ea752d48926aab52767ef2068595bc | [
"BSD-2-Clause-FreeBSD"
] | 32 | 2015-02-04T00:07:08.000Z | 2022-01-22T15:07:50.000Z | import pickle
import unittest
from aioprocessing.executor import _ExecutorMixin
class PickleTest(unittest.TestCase):
def test_pickle_queue(self):
q = _ExecutorMixin()
q.test = "abc"
pickled = pickle.dumps(q)
unpickled = pickle.loads(pickled)
self.assertEqual(q.test, unpick... | 21.055556 | 49 | 0.680739 |
c4a70a43adc229b9a6e502d5966e4fc974506647 | 33,122 | py | Python | mcz3lhz.py | samgregoost/self_supervised_large | 9c0c33cf374a1d5112519939012a64bca98c5f8d | [
"MIT"
] | 1 | 2021-08-25T08:32:19.000Z | 2021-08-25T08:32:19.000Z | mcz3lhz.py | samgregoost/self_supervised_large | 9c0c33cf374a1d5112519939012a64bca98c5f8d | [
"MIT"
] | null | null | null | mcz3lhz.py | samgregoost/self_supervised_large | 9c0c33cf374a1d5112519939012a64bca98c5f8d | [
"MIT"
] | null | null | null | from __future__ import print_function
import tensorflow as tf
import numpy as np
import random
import TensorflowUtils as utils
import read_MITSceneParsingDataParis as scene_parsing
import datetime
import BatchDatsetReaderMnist as dataset
from six.moves import xrange
import math
from scipy import signal
from scipy.inter... | 46.915014 | 214 | 0.607995 |
07db906e853d10e31136d7acfb1ec0e572fcb823 | 495 | py | Python | web/sites/problem.py | interestingLSY/intOJ | 1800fb204ffc69931c376333ae3454f036bd180c | [
"BSD-2-Clause"
] | 8 | 2018-12-12T03:38:13.000Z | 2019-01-25T11:46:20.000Z | web/sites/problem.py | interestingLSY/intOJ | 1800fb204ffc69931c376333ae3454f036bd180c | [
"BSD-2-Clause"
] | 1 | 2019-03-10T05:06:34.000Z | 2019-03-18T10:55:42.000Z | web/sites/problem.py | interestingLSY/intOJ | 1800fb204ffc69931c376333ae3454f036bd180c | [
"BSD-2-Clause"
] | 1 | 2019-03-17T02:04:35.000Z | 2019-03-17T02:04:35.000Z | #coding:utf-8
from flask import *
import db,modules,newsubmit
def Run(problem_id):
problem = db.Read_Problem(problem_id)
if problem == None:
flash(r'### 题目 P%d 没找着! \n 可能是因为编号不对.'%problem_id,'error')
return modules.Page_Back()
if not problem[9] and not modules.Current_User_Privilege(2):
flash(r'无此权限','error')... | 27.5 | 61 | 0.737374 |
2e2b51df25371226d2cfa6fb8b5ce9c68a6432b7 | 530 | py | Python | apps/topics/services/delete.py | hiraq/testcoil | f136ca6b3e9d0ce5da9f868ab63d9c7dda0f859e | [
"MIT"
] | null | null | null | apps/topics/services/delete.py | hiraq/testcoil | f136ca6b3e9d0ce5da9f868ab63d9c7dda0f859e | [
"MIT"
] | null | null | null | apps/topics/services/delete.py | hiraq/testcoil | f136ca6b3e9d0ce5da9f868ab63d9c7dda0f859e | [
"MIT"
] | null | null | null | from mongoengine.errors import DoesNotExist
from apps.commons.services import BaseService
from apps.commons.errors import DataNotFoundError
class DeleteService(BaseService):
_id = None
_repo = None
def __init__(self, id, repo):
self._id = id
self._repo = repo
def call(self):
... | 24.090909 | 61 | 0.635849 |
3323d7315a753a7d2c472e2ffc4ef9a958318a8d | 204 | py | Python | parser/src/test/test-data/math_sin.py | luciansmith/sedml-script | d891645d0b3f89ff190fc7e719659c8e229c07da | [
"MIT"
] | null | null | null | parser/src/test/test-data/math_sin.py | luciansmith/sedml-script | d891645d0b3f89ff190fc7e719659c8e229c07da | [
"MIT"
] | null | null | null | parser/src/test/test-data/math_sin.py | luciansmith/sedml-script | d891645d0b3f89ff190fc7e719659c8e229c07da | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created by libsedmlscript v0.0.1
"""
from sed_roadrunner import model, task, plot
from math import sin
#----------------------------------------------
sin(0.5)
| 15.692308 | 48 | 0.470588 |
0b8858f1d62e6062c69f4d73c8fb2d54e4556cee | 4,677 | py | Python | cogs/vc.py | hiraki-uk/discord-wows-bot | 58d231d4b1b552cdba0ca395ed6c624b50b7affa | [
"MIT"
] | null | null | null | cogs/vc.py | hiraki-uk/discord-wows-bot | 58d231d4b1b552cdba0ca395ed6c624b50b7affa | [
"MIT"
] | null | null | null | cogs/vc.py | hiraki-uk/discord-wows-bot | 58d231d4b1b552cdba0ca395ed6c624b50b7affa | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from scripts.logger import Logger
# import youtube_dl
class VoiceChannel(commands.Cog):
__slots__ = ('bot', 'logger')
def __init__(self, bot, logger=None):
self.bot = bot
self.logger = Logger(__name__) if logger is None else logger
# change voice channel's... | 29.415094 | 104 | 0.667736 |
983cea7a63c31142faf87c9923b77033440b96c1 | 907 | py | Python | students/K33401/Koretskaya_Lidiya/lab3/project12/project12/urls.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33401/Koretskaya_Lidiya/lab3/project12/project12/urls.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33401/Koretskaya_Lidiya/lab3/project12/project12/urls.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | """project12 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 36.28 | 77 | 0.694598 |
9050540f0ef3049892344ca9c7616ea68ac68734 | 828 | py | Python | tests/programs/cyclic_imports/cyclic_importing_package/__init__.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | tests/programs/cyclic_imports/cyclic_importing_package/__init__.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | tests/programs/cyclic_imports/cyclic_importing_package/__init__.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python tests originally created or extracted from other peoples work. The
# parts were too small to be protected.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the ... | 39.428571 | 79 | 0.718599 |
e71906be5ef611e89b714a6d8c98963e7133d191 | 1,135 | py | Python | packages/pyright-internal/src/tests/samples/loops1.py | sransara/pyright | 4e117682c946b60f2b24fd75a07736954b21f158 | [
"MIT"
] | 1 | 2020-12-28T16:58:24.000Z | 2020-12-28T16:58:24.000Z | packages/pyright-internal/src/tests/samples/loops1.py | sransara/pyright | 4e117682c946b60f2b24fd75a07736954b21f158 | [
"MIT"
] | 3 | 2022-03-03T03:03:24.000Z | 2022-03-25T14:43:54.000Z | packages/pyright-internal/src/tests/samples/loops1.py | sransara/pyright | 4e117682c946b60f2b24fd75a07736954b21f158 | [
"MIT"
] | null | null | null | # This sample tests the type checker's ability to handle type
# inferences within loop constructs.
def bar(a: list):
pass
def func1():
data = None
for x in [2, 3]:
if not data:
data = [1, 2]
else:
# This should not generate an error because the
# type c... | 26.395349 | 61 | 0.570044 |
c4f5c01044719ae03e42a3ef1a5108e6d872e5db | 3,406 | py | Python | ws2122-lspm/Lib/site-packages/pm4py/algo/organizational_mining/sna/variants/log/subcontracting.py | Malekhy/ws2122-lspm | e4dc8b801d12f862b8ef536a0f125f346f085a00 | [
"MIT"
] | 1 | 2022-01-19T04:02:46.000Z | 2022-01-19T04:02:46.000Z | ws2122-lspm/Lib/site-packages/pm4py/algo/organizational_mining/sna/variants/log/subcontracting.py | Malekhy/ws2122-lspm | e4dc8b801d12f862b8ef536a0f125f346f085a00 | [
"MIT"
] | 1 | 2021-11-19T07:21:48.000Z | 2021-11-19T07:21:48.000Z | ws2122-lspm/Lib/site-packages/pm4py/algo/organizational_mining/sna/variants/log/subcontracting.py | Malekhy/ws2122-lspm | e4dc8b801d12f862b8ef536a0f125f346f085a00 | [
"MIT"
] | 1 | 2022-01-14T17:15:38.000Z | 2022-01-14T17:15:38.000Z | '''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py 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 your option) any late... | 35.479167 | 116 | 0.669701 |
8ea0aece94fcd742a3b943f3a80c871da4d1e2f8 | 1,947 | py | Python | users/admin.py | nett00n/vas3k.club | 9afbbeda9faae57da1849bf5296e600162e2ac31 | [
"MIT"
] | null | null | null | users/admin.py | nett00n/vas3k.club | 9afbbeda9faae57da1849bf5296e600162e2ac31 | [
"MIT"
] | null | null | null | users/admin.py | nett00n/vas3k.club | 9afbbeda9faae57da1849bf5296e600162e2ac31 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from django.conf import settings
from django.shortcuts import redirect
from club.exceptions import AccessDenied
from common.data.achievements import ACHIEVEMENTS
from common.data.hats import HATS
from users.models import UserBadge
def do_user_admin_actions(request, user, dat... | 28.632353 | 63 | 0.559322 |
d9152b1a9f2aad225ccb3c88ca178f62c29200e2 | 11,458 | py | Python | blender/VTKBlender.py | unterweg/peanoclaw | 2d8b45727e3b26d824f8afc6a8772736176083af | [
"BSD-3-Clause"
] | 1 | 2015-07-14T10:05:52.000Z | 2015-07-14T10:05:52.000Z | blender/VTKBlender.py | unterweg/peanoclaw | 2d8b45727e3b26d824f8afc6a8772736176083af | [
"BSD-3-Clause"
] | null | null | null | blender/VTKBlender.py | unterweg/peanoclaw | 2d8b45727e3b26d824f8afc6a8772736176083af | [
"BSD-3-Clause"
] | 1 | 2019-12-03T15:58:53.000Z | 2019-12-03T15:58:53.000Z | # $Id: VTKBlender.py,v 1.19 2008-07-03 15:13:21 cwant Exp $
#
# Copyright (c) 2005, Chris Want, Research Support Group,
# AICT, University of Alberta. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met... | 27.08747 | 78 | 0.672718 |
4c5d296f0f239e2a997e4409f5a2e0e4f257d0eb | 316 | py | Python | hurriyet/article.py | yakupadakli/python-hurriyet | 24641a5bc8686efa13b8e2bd32810e7f00ee78c2 | [
"MIT"
] | null | null | null | hurriyet/article.py | yakupadakli/python-hurriyet | 24641a5bc8686efa13b8e2bd32810e7f00ee78c2 | [
"MIT"
] | null | null | null | hurriyet/article.py | yakupadakli/python-hurriyet | 24641a5bc8686efa13b8e2bd32810e7f00ee78c2 | [
"MIT"
] | null | null | null | from hurriyet.base import BaseClient
from hurriyet.models import Article as ArticleModel
class Article(BaseClient):
"""Hurriyet article operations."""
def __init__(self, **kwargs):
super(Article, self).__init__(**kwargs)
self.model_class = ArticleModel
self.base_url = "/articles"
| 26.333333 | 51 | 0.702532 |
4ce2e5b393da86d522e3fc442470efcced7c7836 | 2,228 | py | Python | ThreeBotPackages/threebot/calendar/radicale/tests/__init__.py | Pishoy/jumpscaleX_threebot | 781e839857fecfa601a31d98d86d304e3a6b3b4e | [
"Apache-2.0"
] | 1 | 2020-10-05T08:53:57.000Z | 2020-10-05T08:53:57.000Z | ThreeBotPackages/threebot/calendar/radicale/tests/__init__.py | Pishoy/jumpscaleX_threebot | 781e839857fecfa601a31d98d86d304e3a6b3b4e | [
"Apache-2.0"
] | 17 | 2019-11-14T08:41:37.000Z | 2020-05-27T09:23:51.000Z | ThreeBotPackages/threebot/calendar/radicale/tests/__init__.py | Pishoy/jumpscaleX_threebot | 781e839857fecfa601a31d98d86d304e3a6b3b4e | [
"Apache-2.0"
] | null | null | null | # This file is part of Radicale Server - Calendar Server
# Copyright © 2012-2017 Guillaume Ayoub
#
# This library 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 your ... | 32.764706 | 94 | 0.679084 |
09314220947123e27b1487888043951b396e5d8f | 1,261 | py | Python | taggit_suggest/utils.py | frankwiles/django-taggit-suggest | dba7ca11ff68227271c7408170918f1421fb5238 | [
"BSD-3-Clause"
] | 16 | 2015-01-17T14:11:53.000Z | 2022-03-12T07:10:58.000Z | taggit_suggest/utils.py | frankwiles/django-taggit-suggest | dba7ca11ff68227271c7408170918f1421fb5238 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:43:42.000Z | 2018-07-17T07:43:42.000Z | taggit_suggest/utils.py | frankwiles/django-taggit-suggest | dba7ca11ff68227271c7408170918f1421fb5238 | [
"BSD-3-Clause"
] | 2 | 2015-02-21T09:36:28.000Z | 2015-04-27T11:28:38.000Z | import re
from taggit_suggest.models import TagKeyword, TagRegex
from taggit.models import Tag
def _suggest_keywords(content):
"""
Suggest by keywords
"""
suggested_keywords = set()
keywords = TagKeyword.objects.all()
for k in keywords:
# Use the stem if available, otherwise use the ... | 26.270833 | 68 | 0.68755 |
87010c39d93a48df33017906233d5d65c3844df6 | 2,066 | py | Python | ad/tests/test_high_order.py | CS207-Project-Team-1/cs207-FinalProject | 417f315fe5efe34d27ffd59ed639d1208d0b300e | [
"MIT"
] | null | null | null | ad/tests/test_high_order.py | CS207-Project-Team-1/cs207-FinalProject | 417f315fe5efe34d27ffd59ed639d1208d0b300e | [
"MIT"
] | 17 | 2018-10-16T23:52:15.000Z | 2018-12-12T04:02:23.000Z | ad/tests/test_high_order.py | CS207-Project-Team-1/cs207-FinalProject | 417f315fe5efe34d27ffd59ed639d1208d0b300e | [
"MIT"
] | 1 | 2020-12-11T20:50:48.000Z | 2020-12-11T20:50:48.000Z | """Tests for d_n method"""
import ad
import pytest
import numpy as np
from math import pi
def test_unop():
x = ad.Variable("x")
y = -x
assert np.isclose(y.d_n(n=0, val=2.0), -2.0)
assert np.isclose(y.d_n(n=1, val=2.0), -1.0)
assert np.isclose(y.d_n(n=2, val=2.0), 0.0)
y = ad.Sin(2 * x)
as... | 29.942029 | 61 | 0.547435 |
3bacd4360068b2ae3fcafb2e7135cc835a7146ed | 1,039 | py | Python | sympy/polys/tests/test_specialpolys.py | gnulinooks/sympy | 46f63841f96cd025289b91ba9db3e261138d720a | [
"BSD-3-Clause"
] | 1 | 2016-05-09T10:08:18.000Z | 2016-05-09T10:08:18.000Z | sympy/polys/tests/test_specialpolys.py | gnulinooks/sympy | 46f63841f96cd025289b91ba9db3e261138d720a | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/tests/test_specialpolys.py | gnulinooks/sympy | 46f63841f96cd025289b91ba9db3e261138d720a | [
"BSD-3-Clause"
] | null | null | null |
from sympy.polys.specialpolys import (
fateman_poly_F_1, zzX_fateman_poly_F_1,
fateman_poly_F_2, zzX_fateman_poly_F_2,
fateman_poly_F_3, zzX_fateman_poly_F_3)
from sympy.polys.integerpolys import (
zzX_from_poly)
def test_fateman_poly_F_1():
f,g,h = fateman_poly_F_1(1)
F,G,H = zzX_fateman_pol... | 24.162791 | 49 | 0.663138 |
c56f964f6a306a8b83817e40f2d677d1f3ca83ae | 1,051 | py | Python | student_reg/migrations/0001_initial.py | Tony-Otis/Student_Registration | 780dc5c637f8d146135748fd3ea6758ad0e96849 | [
"MIT"
] | null | null | null | student_reg/migrations/0001_initial.py | Tony-Otis/Student_Registration | 780dc5c637f8d146135748fd3ea6758ad0e96849 | [
"MIT"
] | null | null | null | student_reg/migrations/0001_initial.py | Tony-Otis/Student_Registration | 780dc5c637f8d146135748fd3ea6758ad0e96849 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-04-15 09:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
... | 31.848485 | 117 | 0.5804 |
789795b124adfafb9fc69e1aa83762ca98de03af | 245 | py | Python | tools/__init__.py | MaybeShewill-CV/image-classification-tensorflow | 1587fa7acfaba6d33fb07c2c25248570c5d41927 | [
"MIT"
] | 4 | 2021-03-24T13:39:10.000Z | 2021-12-16T16:49:22.000Z | tools/__init__.py | MaybeShewill-CV/image-classification-tensorflow | 1587fa7acfaba6d33fb07c2c25248570c5d41927 | [
"MIT"
] | null | null | null | tools/__init__.py | MaybeShewill-CV/image-classification-tensorflow | 1587fa7acfaba6d33fb07c2c25248570c5d41927 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2021/3/24 下午4:03
# @Author : MaybeShewill-CV
# @Site : https://github.com/MaybeShewill-CV/image-classification-tensorflow
# @File : __init__.py
# @IDE: PyCharm
"""
some tools
""" | 24.5 | 79 | 0.636735 |
adf4d59ba5a67ee502d44acaefda88a789a9694d | 18,028 | py | Python | elephant/kernels.py | Kleinjohann/elephant | 74ef4a27f1d208fa0aab94f33f315907401da3bb | [
"BSD-3-Clause"
] | 2 | 2015-07-21T12:29:50.000Z | 2021-07-27T12:54:10.000Z | elephant/kernels.py | Kleinjohann/elephant | 74ef4a27f1d208fa0aab94f33f315907401da3bb | [
"BSD-3-Clause"
] | 2 | 2017-01-23T12:33:33.000Z | 2017-04-24T09:49:24.000Z | elephant/kernels.py | Kleinjohann/elephant | 74ef4a27f1d208fa0aab94f33f315907401da3bb | [
"BSD-3-Clause"
] | 1 | 2019-04-11T08:22:24.000Z | 2019-04-11T08:22:24.000Z | # -*- coding: utf-8 -*-
"""
Definition of a hierarchy of classes for kernel functions to be used
in convolution, e.g., for data smoothing (low pass filtering) or
firing rate estimation.
Examples of usage:
>>> kernel1 = kernels.GaussianKernel(sigma=100*ms)
>>> kernel2 = kernels.ExponentialKernel(sigma=8*mm, inv... | 34.273764 | 84 | 0.606667 |
a32c4e5ab423c56e0e1d7e9229b4421ae4daa03a | 2,539 | py | Python | mephisto/abstractions/providers/mock/mock_worker.py | anchit/Mephisto | e9ae83ce310e1b5a8a90557dc94736d1e297a2a3 | [
"MIT"
] | 167 | 2020-06-15T21:25:19.000Z | 2022-03-31T20:58:19.000Z | mephisto/abstractions/providers/mock/mock_worker.py | anchit/Mephisto | e9ae83ce310e1b5a8a90557dc94736d1e297a2a3 | [
"MIT"
] | 364 | 2020-06-22T17:02:18.000Z | 2022-03-31T23:40:35.000Z | mephisto/abstractions/providers/mock/mock_worker.py | anchit/Mephisto | e9ae83ce310e1b5a8a90557dc94736d1e297a2a3 | [
"MIT"
] | 47 | 2020-07-26T18:03:21.000Z | 2022-03-31T07:46:45.000Z | #!/usr/bin/env python3
# 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.
from mephisto.data_model.worker import Worker
from mephisto.abstractions.providers.mock.provider_type import PROVIDER_TY... | 37.895522 | 114 | 0.689248 |
80003adbdb48c5df767d0fd7fdc39d2aa67f342d | 2,303 | py | Python | medusa/service/grpc/restore.py | rjshrjndrn/cassandra-medusa | c8b22cdc2ded191a02f99321cf4196ca199d6256 | [
"Apache-2.0"
] | 1 | 2021-06-04T16:54:09.000Z | 2021-06-04T16:54:09.000Z | medusa/service/grpc/restore.py | rjshrjndrn/cassandra-medusa | c8b22cdc2ded191a02f99321cf4196ca199d6256 | [
"Apache-2.0"
] | null | null | null | medusa/service/grpc/restore.py | rjshrjndrn/cassandra-medusa | c8b22cdc2ded191a02f99321cf4196ca199d6256 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020- Datastax, 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... | 31.121622 | 117 | 0.746852 |
c17d00bad2e33ab3519da46b660bc757cb9f5354 | 12,132 | py | Python | colour/algebra/tests/test_common.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | colour/algebra/tests/test_common.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | colour/algebra/tests/test_common.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Defines the unit tests for the :mod:`colour.algebra.common` module.
"""
import numpy as np
import unittest
from colour.algebra import (
is_spow_enabled,
set_spow_enable,
spow_enable,
spow,
smoothstep_function,
normalise_maximum,
vector_dot,
matrix_dot,
l... | 29.233735 | 79 | 0.540801 |
ecd0bf3c5291b39fc6ce0c41e83155b0d460c667 | 1,860 | py | Python | data_utils/imbalanced.py | Kartik17/Data-Augmentation-combined-with-Adversarial-Examples-for-Robust-Point-Cloud-Classification | c715db2fb93505e3eb6f6866398ecffcef3f03ce | [
"MIT"
] | 3 | 2021-04-29T13:33:08.000Z | 2021-12-15T00:16:30.000Z | data_utils/imbalanced.py | Kartik17/Data-Augmentation-combined-with-Adversarial-Examples-for-Robust-Point-Cloud-Classification | c715db2fb93505e3eb6f6866398ecffcef3f03ce | [
"MIT"
] | null | null | null | data_utils/imbalanced.py | Kartik17/Data-Augmentation-combined-with-Adversarial-Examples-for-Robust-Point-Cloud-Classification | c715db2fb93505e3eb6f6866398ecffcef3f03ce | [
"MIT"
] | null | null | null | import torch
import torch.utils.data
import torchvision
class ImbalancedDatasetSampler(torch.utils.data.sampler.Sampler):
"""Samples elements randomly from a given list of indices for imbalanced dataset
Arguments:
indices (list, optional): a list of indices
num_samples (int, optional): number ... | 36.470588 | 103 | 0.626344 |
eb86a5fac93e14fad5b11ee69d5723656d61e71a | 2,831 | py | Python | cnn.py | HydervaliY/Lung-Cancer-Prediction-Using-CNN | ac74b130fdf7acec1f834933530783a7a2dd261d | [
"MIT"
] | null | null | null | cnn.py | HydervaliY/Lung-Cancer-Prediction-Using-CNN | ac74b130fdf7acec1f834933530783a7a2dd261d | [
"MIT"
] | null | null | null | cnn.py | HydervaliY/Lung-Cancer-Prediction-Using-CNN | ac74b130fdf7acec1f834933530783a7a2dd261d | [
"MIT"
] | null | null | null | from keras import layers
from keras.models import Sequential
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import Flatten
from keras.layers import Dense
#
number_classes=2
# Initialising the CNN
classifier = Sequential()
# Step 1 - Convolution
classifier.add(layers.Conv2D(32,... | 36.294872 | 127 | 0.617096 |
a9b999afd3a3533f483f6a79e73dc8d53aa52a89 | 231,945 | py | Python | BUG/function/zhtools/chconv.py | xdtcssdi/BUG | e4766504d60e3b10b38d8c2c6829fe425e66078c | [
"Apache-2.0"
] | 2 | 2020-02-22T15:19:42.000Z | 2021-05-13T06:36:30.000Z | BUG/function/zhtools/chconv.py | xdtcssdi/BUG | e4766504d60e3b10b38d8c2c6829fe425e66078c | [
"Apache-2.0"
] | null | null | null | BUG/function/zhtools/chconv.py | xdtcssdi/BUG | e4766504d60e3b10b38d8c2c6829fe425e66078c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# forked from MadEdit
# Name: MadEdit/TradSimp.cpp
# Description: Traditional Chinese <==> Simplified Chinese
# Author: madedit@gmail.com
# Licence: GPL
# Forked by skydarkchen <skydark2 at gmail>
import sys
UEMPTY = ''
py2 = sys.version_info < (3, 0, 0)
if py2:
UEMPTY = U... | 20.066182 | 81 | 0.600108 |
cd098d3550347e078e2e1986f05027b46d02736d | 5,194 | py | Python | pandas_ta/overlap/hilo.py | tg12/pandas-ta | ebec748fb1150cbe29dd591a9493c86b202ed5b1 | [
"MIT"
] | 1 | 2020-10-16T11:31:31.000Z | 2020-10-16T11:31:31.000Z | pandas_ta/overlap/hilo.py | tg12/pandas-ta | ebec748fb1150cbe29dd591a9493c86b202ed5b1 | [
"MIT"
] | null | null | null | pandas_ta/overlap/hilo.py | tg12/pandas-ta | ebec748fb1150cbe29dd591a9493c86b202ed5b1 | [
"MIT"
] | null | null | null | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 31.865031 | 111 | 0.65903 |
33b73e70d1878b5a1db1b46e7b0f6033b82cf062 | 18,945 | py | Python | examples/direct_fidelity_estimation.py | stubbi/Cirq | 6d2cd16991bd7fde352010d31010f85d7eafc0ba | [
"Apache-2.0"
] | 1 | 2021-07-01T06:10:48.000Z | 2021-07-01T06:10:48.000Z | examples/direct_fidelity_estimation.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | null | null | null | examples/direct_fidelity_estimation.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | null | null | null | """Implements direct fidelity estimation.
Fidelity between the desired pure state rho and the actual state sigma is
defined as:
F(rho, sigma) = Tr (rho sigma)
It is a unit-less measurement between 0.0 and 1.0. The following two papers
independently described a faster way to estimate its value:
Direct Fidelity Estima... | 36.15458 | 97 | 0.690736 |
86bc2e3f8be7fe36c1a4c865e172010036df244c | 9,706 | py | Python | pystatreduce/optimize/OAS_ScanEagle/check_scripts/check_optimal_uq_vals.py | OptimalDesignLab/pyStatReduce | 9ea128409b91dd582e574e2e1cc153572b6c60a4 | [
"MIT"
] | null | null | null | pystatreduce/optimize/OAS_ScanEagle/check_scripts/check_optimal_uq_vals.py | OptimalDesignLab/pyStatReduce | 9ea128409b91dd582e574e2e1cc153572b6c60a4 | [
"MIT"
] | null | null | null | pystatreduce/optimize/OAS_ScanEagle/check_scripts/check_optimal_uq_vals.py | OptimalDesignLab/pyStatReduce | 9ea128409b91dd582e574e2e1cc153572b6c60a4 | [
"MIT"
] | null | null | null | # check_optimal_uq_vals.py
# This file will contain the scripts to check how the optimial UQ values compare
# with each other for the different implementations. These implementations
# include
# 1. MFMC solution
# 2. Full collocation
# 3. Reduced collocation
import sys
import time
import pprint as pp
# pyStatReduce sp... | 46.663462 | 186 | 0.668865 |
26ae0b968d05089b8589605ff9a5ca2ce206848f | 810 | py | Python | examples/C_triad_chord_w_inversions.py | orbichord/orbichord | 67023e72fcab577507bd1a2ea37807720b7ea2e0 | [
"MIT"
] | null | null | null | examples/C_triad_chord_w_inversions.py | orbichord/orbichord | 67023e72fcab577507bd1a2ea37807720b7ea2e0 | [
"MIT"
] | null | null | null | examples/C_triad_chord_w_inversions.py | orbichord/orbichord | 67023e72fcab577507bd1a2ea37807720b7ea2e0 | [
"MIT"
] | null | null | null | """
Example of generator primitives.
This example generates the space of C chords identify by
their ordered pitch class string that are also triads.
"""
import itertools
from orbichord.generator import Generator
from orbichord.identify import chordSymbolIndex
from orbichord.symbol import chordSymbolFigure
from music2... | 25.3125 | 58 | 0.737037 |
863fc52ffb717d58770202dd38edbd8243149198 | 25,444 | py | Python | sdk/python/pulumi_aws_native/elasticloadbalancing/load_balancer.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/elasticloadbalancing/load_balancer.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/elasticloadbalancing/load_balancer.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 50.786427 | 194 | 0.6982 |
f94a8438f36cd6d0c0ed3d3dff97f765ca08bd78 | 3,332 | py | Python | backend/data_import/pipeline/labels.py | alairice/doccano | 27eff5caec1ec6ad31f1e74bd1b73b1dd43228dc | [
"MIT"
] | 2 | 2022-03-08T09:29:17.000Z | 2022-03-08T09:30:13.000Z | backend/data_import/pipeline/labels.py | alairice/doccano | 27eff5caec1ec6ad31f1e74bd1b73b1dd43228dc | [
"MIT"
] | null | null | null | backend/data_import/pipeline/labels.py | alairice/doccano | 27eff5caec1ec6ad31f1e74bd1b73b1dd43228dc | [
"MIT"
] | null | null | null | import abc
from typing import Any, Dict, Optional
from pydantic import BaseModel, validator
from label_types.models import CategoryType, LabelType, SpanType
from labels.models import Category, Span
from labels.models import TextLabel as TL
from projects.models import Project
class Label(BaseModel, abc.ABC):
@ab... | 25.829457 | 78 | 0.62545 |
7410e746c5cf1570d158f579241f6f8b410fa646 | 6,607 | py | Python | intprim/basis/gaussian_model.py | carlos-cardoso/intprim | cf6d83996e4a1ede3cda19c7906c6166ec5a6f6e | [
"MIT"
] | null | null | null | intprim/basis/gaussian_model.py | carlos-cardoso/intprim | cf6d83996e4a1ede3cda19c7906c6166ec5a6f6e | [
"MIT"
] | null | null | null | intprim/basis/gaussian_model.py | carlos-cardoso/intprim | cf6d83996e4a1ede3cda19c7906c6166ec5a6f6e | [
"MIT"
] | null | null | null | ##
# This module defines the GaussianModel class.
#
# @author Joseph Campbell <jacampb1@asu.edu>, Interactive Robotics Lab, Arizona State University
import intprim.basis.basis_model as basis_model
import intprim.constants
import numpy as np
##
# The GaussianModel class implements a basis model consisting of Gaus... | 64.145631 | 262 | 0.714091 |
3aa38e9029d57691ffce2852018fdc3a5d9d581a | 1,614 | py | Python | samples/generated_samples/aiplatform_v1beta1_generated_metadata_service_delete_metadata_store_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 1 | 2022-03-30T05:23:29.000Z | 2022-03-30T05:23:29.000Z | samples/generated_samples/aiplatform_v1beta1_generated_metadata_service_delete_metadata_store_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/aiplatform_v1beta1_generated_metadata_service_delete_metadata_store_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# 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.28 | 85 | 0.765799 |
f633b973e5a51aa397d1fd6a3ce1281cc98453a1 | 437 | py | Python | utils/utils_simple.py | ArciAndres/MARL_Battery_Charge | fcb5351cdd6a71419c8f19e979b7bb494c4cc5db | [
"Apache-2.0"
] | 2 | 2022-01-15T13:46:42.000Z | 2022-01-25T11:18:36.000Z | utils/utils_simple.py | ArciAndres/MARL_Battery_Charge | fcb5351cdd6a71419c8f19e979b7bb494c4cc5db | [
"Apache-2.0"
] | null | null | null | utils/utils_simple.py | ArciAndres/MARL_Battery_Charge | fcb5351cdd6a71419c8f19e979b7bb494c4cc5db | [
"Apache-2.0"
] | null | null | null | def get_command(params):
# Returns the parameters put in the command line syntax
# Consider that the bool parameters are defined by default in the argparse function
# And the value inserted in the dictionary represents nothing, but a type indicator
command = ""
for k, v in params.items():
comma... | 39.727273 | 86 | 0.643021 |
4fb19be39177e5e1d2142e6044131bef18aee4f9 | 19,612 | py | Python | test/functional/feature_backwards_compatibility.py | UFO-ETL/ufo | e85dde0c8b12c1bf3357003afb77ea85b1476d6b | [
"MIT"
] | null | null | null | test/functional/feature_backwards_compatibility.py | UFO-ETL/ufo | e85dde0c8b12c1bf3357003afb77ea85b1476d6b | [
"MIT"
] | null | null | null | test/functional/feature_backwards_compatibility.py | UFO-ETL/ufo | e85dde0c8b12c1bf3357003afb77ea85b1476d6b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2020 The UFO Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Backwards compatibility functional test
Test various backwards compatibility scenarios. Download the previ... | 45.715618 | 223 | 0.63456 |
a2bb8d51293512e889a4330a0d1bae334ebea9f6 | 11,995 | py | Python | sdk/python/pulumi_azure_native/cdn/v20190415/profile.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cdn/v20190415/profile.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cdn/v20190415/profile.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 44.925094 | 1,510 | 0.647353 |
d053b3de6090d4013942b6e81522b8dab1edba90 | 2,351 | py | Python | examples/loadtest/runLocust.py | lammySup/ncscli | 1758b7c894f2b890c7462d63a9c46ce47bf1262b | [
"MIT"
] | 3 | 2020-10-02T23:25:05.000Z | 2022-03-29T10:28:33.000Z | examples/loadtest/runLocust.py | lammySup/ncscli | 1758b7c894f2b890c7462d63a9c46ce47bf1262b | [
"MIT"
] | 1 | 2020-10-01T00:06:15.000Z | 2020-10-01T00:10:47.000Z | examples/loadtest/runLocust.py | lammySup/ncscli | 1758b7c894f2b890c7462d63a9c46ce47bf1262b | [
"MIT"
] | 3 | 2020-09-28T23:22:53.000Z | 2021-11-28T11:36:04.000Z | #!/usr/bin/env python3
print( 'runLocust.py starting' )
import os
import sys
sys.stdout.flush()
print( 'import zmq' )
sys.stdout.flush()
import zmq
print( 'imported zmq' )
sys.stdout.flush()
with open( 'runLocust.log', 'w') as outFile:
print( 'running locust', file=outFile )
sys.path.append( os.path.expanduser(... | 28.325301 | 76 | 0.670778 |
5ec5000cc6d233fc573cea5eef6efedc7c2bb281 | 4,162 | py | Python | saas/blueapps/account/components/weixin/middlewares.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | 7 | 2021-08-13T03:48:16.000Z | 2021-12-20T15:31:38.000Z | saas/blueapps/account/components/weixin/middlewares.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | 456 | 2021-08-16T02:13:57.000Z | 2022-03-30T10:02:49.000Z | saas/blueapps/account/components/weixin/middlewares.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | 17 | 2021-08-10T04:08:46.000Z | 2022-03-14T14:24:36.000Z | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | 39.638095 | 115 | 0.627583 |
75e3f803c5e577e7acb144c35d65cf7072459b10 | 472 | py | Python | src/accounts/models.py | TheNavis/back-end | 22f0e5d2ec5c745207ae1b1b05457fa4e25dc3a3 | [
"MIT"
] | null | null | null | src/accounts/models.py | TheNavis/back-end | 22f0e5d2ec5c745207ae1b1b05457fa4e25dc3a3 | [
"MIT"
] | 3 | 2020-06-05T18:29:58.000Z | 2021-06-10T20:34:13.000Z | src/accounts/models.py | TheNavis/back-end | 22f0e5d2ec5c745207ae1b1b05457fa4e25dc3a3 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
class Account(models.Model):
user = models.OneToOneField(User, verbose_name=_('User'), related_name='investor', on_delete=models.CASCADE)
phone = models.CharField(max_length=8)
updat... | 33.714286 | 112 | 0.733051 |
133fea7fc6da28505974fa7b396a684e1a5ad807 | 10,732 | py | Python | pynez/origami.py | lVlEK0/tpeg | 64e4eae6c997bdf23e5efc527ff8574b95c58ff1 | [
"MIT"
] | null | null | null | pynez/origami.py | lVlEK0/tpeg | 64e4eae6c997bdf23e5efc527ff8574b95c58ff1 | [
"MIT"
] | null | null | null | pynez/origami.py | lVlEK0/tpeg | 64e4eae6c997bdf23e5efc527ff8574b95c58ff1 | [
"MIT"
] | null | null | null | '''
`if = if(%s) %s else %s
'''
#https://docs.python.jp/3/library/dis.html#python-bytecode-instructions
'''
assume x,y,z: int
assume x,y,z: double
origami
'''
class TypeSystem(object):
__slots__ = ['nameMap']
def __init__(self):
self.nameMap = {}
self.nameMap['any'] = AnyType(self)
def ... | 28.242105 | 114 | 0.469251 |
56b03c89a3772b163dd0cb767a64c184d863c6d0 | 9,453 | py | Python | homeassistant/components/deconz/__init__.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 1 | 2021-04-08T06:02:25.000Z | 2021-04-08T06:02:25.000Z | homeassistant/components/deconz/__init__.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:32:11.000Z | 2022-01-13T01:19:23.000Z | homeassistant/components/deconz/__init__.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 1 | 2019-04-16T14:07:20.000Z | 2019-04-16T14:07:20.000Z | """
Support for deCONZ devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/deconz/
"""
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import (
CONF_API_KEY, CONF_EVENT, CONF_HOST,
CONF_ID, CONF_PO... | 33.88172 | 79 | 0.664657 |
96e97cfcfa802f95c83128fd395ca1c5a6774a50 | 635 | py | Python | example.py | xu-kai-xu/porespy | 9df231bfd4010e3a13efc66585474e148cd08d6c | [
"MIT"
] | null | null | null | example.py | xu-kai-xu/porespy | 9df231bfd4010e3a13efc66585474e148cd08d6c | [
"MIT"
] | null | null | null | example.py | xu-kai-xu/porespy | 9df231bfd4010e3a13efc66585474e148cd08d6c | [
"MIT"
] | null | null | null | import porespy as ps
import numpy as np
import matplotlib.pyplot as plt
# Generate an image of spheres using the imgen class
im = ps.generators.blobs(shape=[500, 500], porosity=0.7, blobiness=1)
plt.figure(1)
plt.imshow(im)
# Chord length distributions
chords = ps.filters.apply_chords(im=im, trim_edges=False)
colore... | 30.238095 | 69 | 0.752756 |
ed8f117c9d1463fa21727af3005ae8087992ed28 | 5,384 | py | Python | src/main.py | YusukeKambara/japan_horse_racing | 05c2e06fe265c5744b908b8575df260db18a115b | [
"MIT"
] | null | null | null | src/main.py | YusukeKambara/japan_horse_racing | 05c2e06fe265c5744b908b8575df260db18a115b | [
"MIT"
] | 1 | 2021-12-13T20:32:18.000Z | 2021-12-13T20:32:18.000Z | src/main.py | YusukeKambara/japan_horse_racing | 05c2e06fe265c5744b908b8575df260db18a115b | [
"MIT"
] | null | null | null | import io
import os
import click
import pandas as pd
from datetime import datetime
from commands import schedule as commands_schedule
from commands import race as commands_race
from datasource.netkeiba import io as netkeiba
pd.set_option("display.max_columns", None)
def main():
cmd()
@click.group()
def cmd():
... | 27.752577 | 77 | 0.640788 |
0b6ae4a6b760a5d5698c688784a02417f446f395 | 7,612 | py | Python | ambuild2/frontend/v2_2/context_manager.py | Wend4r/ambuild | cbf415104b1e7ac6baaf614cda517a5a2e827a42 | [
"BSD-3-Clause"
] | null | null | null | ambuild2/frontend/v2_2/context_manager.py | Wend4r/ambuild | cbf415104b1e7ac6baaf614cda517a5a2e827a42 | [
"BSD-3-Clause"
] | null | null | null | ambuild2/frontend/v2_2/context_manager.py | Wend4r/ambuild | cbf415104b1e7ac6baaf614cda517a5a2e827a42 | [
"BSD-3-Clause"
] | null | null | null | # vim: set ts=8 sts=4 sw=4 tw=99 et:
#
# This file is part of AMBuild.
#
# AMBuild 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 your option) any later version.
#
# ... | 38.251256 | 99 | 0.637415 |
c20d9918bb51640dc5dfeffce8bafc6ea5187640 | 2,746 | py | Python | zeus/models/change_request.py | robopsi/zeus | 83f6bdc244877ecec392c7ffbd9758ae7c3c3c5a | [
"Apache-2.0"
] | null | null | null | zeus/models/change_request.py | robopsi/zeus | 83f6bdc244877ecec392c7ffbd9758ae7c3c3c5a | [
"Apache-2.0"
] | 5 | 2021-12-13T20:52:05.000Z | 2022-03-08T23:33:59.000Z | zeus/models/change_request.py | rob-opsi/zeus | 83f6bdc244877ecec392c7ffbd9758ae7c3c3c5a | [
"Apache-2.0"
] | 1 | 2020-07-03T00:59:04.000Z | 2020-07-03T00:59:04.000Z | from sqlalchemy import event
from sqlalchemy.sql import func, select
from zeus.config import db
from zeus.db.mixins import RepositoryBoundMixin, StandardAttributes
from zeus.db.types import GUID, JSONEncodedDict
from zeus.db.utils import model_repr
from zeus.utils import timezone
class ChangeRequest(RepositoryBoundM... | 39.797101 | 88 | 0.698471 |
da31d417423b60fbdcdf85a41f45c7e6d283e869 | 510 | py | Python | CONTENT/PYTHON/LEETCODE/050_pow_x_n/powx_n.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 13 | 2021-03-11T00:25:22.000Z | 2022-03-19T00:19:23.000Z | CONTENT/PYTHON/LEETCODE/050_pow_x_n/powx_n.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 162 | 2021-03-09T01:52:11.000Z | 2022-03-12T01:09:07.000Z | CONTENT/PYTHON/LEETCODE/050_pow_x_n/powx_n.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | class Solution(object):
def myPow(self, x, n):
"""
:type x: float
:type n: int
:rtype: float
"""
if n == 0:
return 1
if n == 1:
return x
negative = False
if n < 0:
n = -n
negative = True
m... | 21.25 | 32 | 0.376471 |
4e286fe407adfbf6de79e3e9a6304da5b94b267a | 3,774 | py | Python | contrib/macdeploy/custom_dsstore.py | cryptotetsuya/shin4 | 73e81561294aef178e13ae5f5501de5e7431c8c2 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | cryptotetsuya/shin4 | 73e81561294aef178e13ae5f5501de5e7431c8c2 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | cryptotetsuya/shin4 | 73e81561294aef178e13ae5f5501de5e7431c8c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStore... | 61.868852 | 1,817 | 0.727345 |
f2302bf0b282340ade7a7c4557ffb822562ea32d | 3,918 | py | Python | twint/get.py | MaikuDev/twintproject | a5dd9afbe5d8931f807894e31543c390a98b086b | [
"MIT"
] | null | null | null | twint/get.py | MaikuDev/twintproject | a5dd9afbe5d8931f807894e31543c390a98b086b | [
"MIT"
] | null | null | null | twint/get.py | MaikuDev/twintproject | a5dd9afbe5d8931f807894e31543c390a98b086b | [
"MIT"
] | null | null | null | from . import url
from .output import Tweets, Users
from async_timeout import timeout
from bs4 import BeautifulSoup
import aiohttp
import asyncio
import concurrent.futures
data = []
async def RequestUrl(config, init):
if config.Profile:
if config.Profile_full:
_url = await url.MobileProfile(co... | 34.672566 | 100 | 0.59903 |
0394002d4f5a513e739a996402b5ba8cbe9ea4ed | 376 | py | Python | src/IronPythonWrapper/TestWrapper/TestWrapper/TestWrapper.py | ThePiranha/infer | 09eaeefef8d78df59e3153592a1451ea41910f35 | [
"MIT"
] | 1,416 | 2018-10-05T05:58:50.000Z | 2022-03-27T07:18:12.000Z | src/IronPythonWrapper/TestWrapper/TestWrapper/TestWrapper.py | ThePiranha/infer | 09eaeefef8d78df59e3153592a1451ea41910f35 | [
"MIT"
] | 162 | 2018-10-05T09:47:05.000Z | 2022-03-21T16:05:30.000Z | src/IronPythonWrapper/TestWrapper/TestWrapper/TestWrapper.py | isabella232/infer-1 | 85be0de05275ffe139cc83bd3d624c926de0d2f1 | [
"MIT"
] | 217 | 2018-10-05T08:11:11.000Z | 2022-03-20T22:31:58.000Z | # Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
import InferNetWrapper
from InferNetWrapper import *
#import modules for smoke test
import TestWrapperFuncs
from TestWr... | 25.066667 | 70 | 0.797872 |
23d1188af1746871a9d7495540ec8f70f91d5ca3 | 14,986 | py | Python | config/Config.py | apoorvumang/OpenKE | 18ba185b21aff7ab91a6603cbabf0bede8e84e2c | [
"MIT"
] | null | null | null | config/Config.py | apoorvumang/OpenKE | 18ba185b21aff7ab91a6603cbabf0bede8e84e2c | [
"MIT"
] | null | null | null | config/Config.py | apoorvumang/OpenKE | 18ba185b21aff7ab91a6603cbabf0bede8e84e2c | [
"MIT"
] | null | null | null | #coding:utf-8
import numpy as np
import tensorflow as tf
import os
import time
import datetime
import ctypes
import json
class Config(object):
'''
use ctypes to call C functions from python and set essential parameters.
'''
def __init__(self):
base_file = os.path.abspath(os.path.join(os.path.dirname(__file__), '... | 38.823834 | 165 | 0.736487 |
d93ff252dfc84765e93c6e76a12e9930edc9e6db | 135,598 | py | Python | tests/resources/test_full_game_possessions.py | bahalbach/pbpstats | 6a9f602764edb7a3ee0e880fffbb5aa34990d6e9 | [
"MIT"
] | 54 | 2019-10-16T00:10:51.000Z | 2022-03-19T21:21:05.000Z | tests/resources/test_full_game_possessions.py | bahalbach/pbpstats | 6a9f602764edb7a3ee0e880fffbb5aa34990d6e9 | [
"MIT"
] | 15 | 2019-11-19T01:20:52.000Z | 2022-02-04T13:38:37.000Z | tests/resources/test_full_game_possessions.py | bahalbach/pbpstats | 6a9f602764edb7a3ee0e880fffbb5aa34990d6e9 | [
"MIT"
] | 15 | 2019-11-19T11:54:51.000Z | 2022-03-21T05:08:53.000Z | import pbpstats
from pbpstats.client import Client
class TestFullGamePossessions:
settings = {
"dir": "tests/data",
"Possessions": {"source": "file", "data_provider": "stats_nba"},
}
client = Client(settings)
game = client.Game("0021600270")
def test_first_possession(self):
... | 32.533109 | 88 | 0.50295 |
1d78fc47eb4f83b9dae57f9c1f41442bc77e206c | 509 | py | Python | assembler/get/hyperparameters.py | NU-MSDS-Data-Eng-Capstone-Fall-2020/ml-training-leaderboard | 732939fc5eee4274c8ab48f93ba02717f7a60536 | [
"Apache-2.0"
] | 1 | 2020-12-11T23:51:35.000Z | 2020-12-11T23:51:35.000Z | assembler/get/hyperparameters.py | NU-MSDS-Data-Eng-Capstone-Fall-2020/ml-training-leaderboard | 732939fc5eee4274c8ab48f93ba02717f7a60536 | [
"Apache-2.0"
] | 6 | 2020-10-15T18:40:15.000Z | 2020-12-02T18:20:58.000Z | assembler/get/hyperparameters.py | NU-MSDS-Data-Eng-Capstone-Fall-2020/ml-training-leaderboard | 732939fc5eee4274c8ab48f93ba02717f7a60536 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import json
def get_dict(fn):
with open (fn) as fin:
read_data = fin.read()
start = read_data.index('following hyper-parameters')
finish = start + 600
start = start + read_data[start : finish].index('{')
finish = start + read_data[start:finish].index('}') + 1
hyp... | 29.941176 | 70 | 0.664047 |
bce614602014ca280b71f7878fcb4ec1dfda0585 | 7,038 | py | Python | to_nwb/extensions/auto_class.py | mpompolas/to_nwb | 1317f0ee0f4d80dde451d60d8eb5c6a544e214fe | [
"BSD-3-Clause"
] | 1 | 2020-03-31T20:02:01.000Z | 2020-03-31T20:02:01.000Z | to_nwb/extensions/auto_class.py | mpompolas/to_nwb | 1317f0ee0f4d80dde451d60d8eb5c6a544e214fe | [
"BSD-3-Clause"
] | 2 | 2020-08-27T18:16:04.000Z | 2020-09-08T18:43:34.000Z | to_nwb/extensions/auto_class.py | mpompolas/to_nwb | 1317f0ee0f4d80dde451d60d8eb5c6a544e214fe | [
"BSD-3-Clause"
] | 5 | 2018-04-04T21:27:23.000Z | 2019-04-01T13:40:00.000Z | import re
from hdmf.utils import docval
from pynwb import __NS_CATALOG
from pynwb.ecephys import *
from pynwb.icephys import *
from pynwb.file import *
from pynwb.device import *
from pynwb.misc import *
from pynwb.ophys import *
from pynwb.ogen import *
from pynwb.retinotopy import *
from pynwb.behavior import *
d... | 27.385214 | 93 | 0.570617 |
3ae0de571aa1971703681bbe918a1f3a0c668feb | 17,092 | py | Python | salt/modules/rabbitmq.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | 2 | 2015-11-07T12:05:15.000Z | 2018-10-29T13:21:06.000Z | salt/modules/rabbitmq.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | null | null | null | salt/modules/rabbitmq.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:50.000Z | 2020-10-19T11:49:50.000Z | # -*- coding: utf-8 -*-
'''
Module to provide RabbitMQ compatibility to Salt.
Todo: A lot, need to add cluster support, logging, and minion configuration
data.
'''
from __future__ import absolute_import
# Import salt libs
import salt.utils
# Import python libs
import logging
import random
import string
from salt.ext.... | 24.175389 | 93 | 0.594021 |
284182e1cbdcb4520317abe5869c48d773c7cd31 | 5,209 | py | Python | bin/rollout_cnn.py | DwangoMediaVillage/marltas_core | 91a5caf75c2350a31d47d1b0408c817644a0d41e | [
"MIT"
] | 9 | 2021-02-15T08:20:31.000Z | 2022-01-04T09:29:35.000Z | bin/rollout_cnn.py | DwangoMediaVillage/marltas_core | 91a5caf75c2350a31d47d1b0408c817644a0d41e | [
"MIT"
] | null | null | null | bin/rollout_cnn.py | DwangoMediaVillage/marltas_core | 91a5caf75c2350a31d47d1b0408c817644a0d41e | [
"MIT"
] | 1 | 2021-09-21T16:11:17.000Z | 2021-09-21T16:11:17.000Z | import pprint
from dataclasses import asdict, dataclass
from pathlib import Path
from typing import Optional
from dqn.cnn.config import CNNConfigBase
from dqn.cnn.learner import Learner
from dqn.cnn.policy import Policy
from dqn.explorer import Explorer
from dqn.make_env import make_env
from dqn.rollout_logger import ... | 39.462121 | 120 | 0.618353 |
9b0b3cbf87b14e39bec372bfc256566508684464 | 5,979 | py | Python | manage.py | openregister/server | 070e940ab0b716dcc5cb46a2fe312943af810ee6 | [
"MIT"
] | 2 | 2016-02-11T20:58:58.000Z | 2016-02-18T16:57:45.000Z | manage.py | openregister/openregister | 070e940ab0b716dcc5cb46a2fe312943af810ee6 | [
"MIT"
] | 4 | 2015-04-02T11:54:04.000Z | 2015-04-07T12:34:02.000Z | manage.py | openregister/server | 070e940ab0b716dcc5cb46a2fe312943af810ee6 | [
"MIT"
] | 4 | 2016-02-08T22:18:20.000Z | 2021-04-11T08:29:29.000Z | #!/usr/bin/env python3
import os
import sys
import json
import time
import requests
from flask.ext.script import Manager
from application import app
from application.registry import Register, registers
app.config.from_object(os.environ['SETTINGS'])
manager = Manager(app)
@manager.option('-s', '--source', dest='so... | 33.971591 | 79 | 0.630206 |
b4ea8449ee2c5b653b692434808e79abf658e93d | 528 | py | Python | backend/home/migrations/0001_load_initial_data.py | crowdbotics-dev/test132-2 | 26c60a6dbd43c92da5a93d0da124eb62c430fbca | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-dev/test132-2 | 26c60a6dbd43c92da5a93d0da124eb62c430fbca | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-dev/test132-2 | 26c60a6dbd43c92da5a93d0da124eb62c430fbca | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "test132-2.botics.co"
site_params = {
"name": "test132",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.objects.update_or_create(defau... | 20.307692 | 61 | 0.651515 |
490ca89f978fdb814af066042a75c09f3775a9b9 | 6,642 | py | Python | python_scripts/linear_regression_without_sklearn.py | aquinquenel/scikit-learn-mooc | edb91f1669ffad65038f5bf48a6771299be4c09d | [
"CC-BY-4.0"
] | 1 | 2022-02-17T13:13:52.000Z | 2022-02-17T13:13:52.000Z | python_scripts/linear_regression_without_sklearn.py | aquinquenel/scikit-learn-mooc | edb91f1669ffad65038f5bf48a6771299be4c09d | [
"CC-BY-4.0"
] | null | null | null | python_scripts/linear_regression_without_sklearn.py | aquinquenel/scikit-learn-mooc | edb91f1669ffad65038f5bf48a6771299be4c09d | [
"CC-BY-4.0"
] | null | null | null | # ---
# jupyter:
# kernelspec:
# display_name: Python 3
# name: python3
# ---
# %% [markdown]
# # Linear regression without scikit-learn
#
# In this notebook, we introduce linear regression. Before presenting the
# available scikit-learn classes, we will provide some insights with a simple
# example. We will... | 36.494505 | 82 | 0.741945 |
cb07e5bb7475ee4cae754ad608e01385e33a69fa | 2,642 | py | Python | src/mist/api/clouds/utils.py | cc-daveloper/mist.io_mist.api | d3f9b8d478f23bf811c0bc6d3078e512aa975f86 | [
"Apache-2.0"
] | 1 | 2019-04-10T11:37:25.000Z | 2019-04-10T11:37:25.000Z | src/mist/api/clouds/utils.py | d-mo/mist.api | d3f9b8d478f23bf811c0bc6d3078e512aa975f86 | [
"Apache-2.0"
] | 3 | 2021-04-07T23:15:17.000Z | 2021-09-23T23:21:45.000Z | src/mist/api/clouds/utils.py | cc-daveloper/mist.io_mist.api | d3f9b8d478f23bf811c0bc6d3078e512aa975f86 | [
"Apache-2.0"
] | null | null | null | import logging
import ssl
from libcloud.common.types import LibcloudError, InvalidCredsError
from libcloud.common.types import MalformedResponseError
from libcloud.common.exceptions import BaseHTTPError, RateLimitReachedError
from mist.api.exceptions import CloudUnauthorizedError, CloudUnavailableError
from mist.api.... | 36.191781 | 79 | 0.605223 |
856bf99787b13710aab19d001816e9bef047b698 | 408 | py | Python | servicos/migrations/0004_auto_20180720_0307.py | tiagocordeiro/estudio-abc | 1f48d785063717ddc3b17b32df342b9eec7dbd32 | [
"MIT"
] | null | null | null | servicos/migrations/0004_auto_20180720_0307.py | tiagocordeiro/estudio-abc | 1f48d785063717ddc3b17b32df342b9eec7dbd32 | [
"MIT"
] | 435 | 2018-07-26T16:42:24.000Z | 2022-03-28T20:11:05.000Z | servicos/migrations/0004_auto_20180720_0307.py | tiagocordeiro/estudio-abc | 1f48d785063717ddc3b17b32df342b9eec7dbd32 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.7 on 2018-07-20 06:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('servicos', '0003_auto_20180720_0305'),
]
operations = [
migrations.AlterField(
model_name='fotolito',
name='arquivo'... | 21.473684 | 68 | 0.598039 |
20e5c6e20341c9093fdf24013ac36a75d9d2b7a5 | 47,117 | py | Python | core/domain/suggestion_validators_test.py | oswalgopal/oppia | 7513e8eca5adc278974ad266b0ea3f59a646983d | [
"Apache-2.0"
] | 2 | 2021-03-07T18:39:15.000Z | 2021-03-29T20:09:11.000Z | core/domain/suggestion_validators_test.py | oswalgopal/oppia | 7513e8eca5adc278974ad266b0ea3f59a646983d | [
"Apache-2.0"
] | null | null | null | core/domain/suggestion_validators_test.py | oswalgopal/oppia | 7513e8eca5adc278974ad266b0ea3f59a646983d | [
"Apache-2.0"
] | 1 | 2022-02-14T22:03:53.000Z | 2022-02-14T22:03:53.000Z | # coding: utf-8
#
# Copyright 2020 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 45.088038 | 80 | 0.652716 |
047bb974ce670b02cdbc737a13fc24a2f5a17a10 | 399 | py | Python | bookwyrm/migrations/0089_user_show_suggested_users.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 270 | 2020-01-27T06:06:07.000Z | 2020-06-21T00:28:18.000Z | bookwyrm/migrations/0089_user_show_suggested_users.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 158 | 2020-02-10T20:36:54.000Z | 2020-06-26T17:12:54.000Z | bookwyrm/migrations/0089_user_show_suggested_users.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 15 | 2020-02-13T21:53:33.000Z | 2020-06-17T16:52:46.000Z | # Generated by Django 3.2.4 on 2021-09-08 16:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0088_auto_20210905_2233"),
]
operations = [
migrations.AddField(
model_name="user",
name="show_suggested... | 21 | 52 | 0.611529 |
8cac537af9c307e9ca814274b7a4eb1b6779338c | 7,595 | py | Python | src/qlearningAgents.py | rodrigolusa/berkeleyRL3 | fbad8ed2426cc021c8bac807bfce387c31bc8e8f | [
"MIT"
] | 2 | 2021-05-12T22:24:18.000Z | 2021-05-13T12:12:51.000Z | src/qlearningAgents.py | rodrigolusa/berkeleyRL3 | fbad8ed2426cc021c8bac807bfce387c31bc8e8f | [
"MIT"
] | null | null | null | src/qlearningAgents.py | rodrigolusa/berkeleyRL3 | fbad8ed2426cc021c8bac807bfce387c31bc8e8f | [
"MIT"
] | null | null | null | # qlearningAgents.py
# ------------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.be... | 35.325581 | 180 | 0.620935 |
4787e9b41c65a33d6c9e0c0d7c9e67fd47a511da | 1,120 | py | Python | DecryptLogin/modules/__init__.py | 0honus0/DecryptLogin | 8cc4527d37bee4ff0aeecbaf93e2d3910abf44f7 | [
"MIT"
] | null | null | null | DecryptLogin/modules/__init__.py | 0honus0/DecryptLogin | 8cc4527d37bee4ff0aeecbaf93e2d3910abf44f7 | [
"MIT"
] | null | null | null | DecryptLogin/modules/__init__.py | 0honus0/DecryptLogin | 8cc4527d37bee4ff0aeecbaf93e2d3910abf44f7 | [
"MIT"
] | null | null | null | '''initialize'''
from .core import (
douban, github, weibo, music163, zt12306, QQZone, QQQun, QQId, zhihu, bilibili,
toutiao, taobao, jingdong, ifeng, sohu, zgconline, lagou, twitter, eSurfing,
renren, w3cschool, fishc, youdao, baidupan, stackoverflow, codalab, pypi, douyu,
migu, qunar, mieshop, mpwe... | 65.882353 | 105 | 0.788393 |
eb244185b5c5301ee8281b75634a22f2eb13d7f3 | 3,335 | py | Python | server/app.py | VladimirGl/junction2016 | 5523a8631dfc8a561dfd64a87cc2829a4657b223 | [
"MIT"
] | null | null | null | server/app.py | VladimirGl/junction2016 | 5523a8631dfc8a561dfd64a87cc2829a4657b223 | [
"MIT"
] | null | null | null | server/app.py | VladimirGl/junction2016 | 5523a8631dfc8a561dfd64a87cc2829a4657b223 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask, url_for, jsonify
from flask import request
from flask import make_response, current_app
from functools import update_wrapper
from process import *
app = Flask(__name__)
def crossdomain(origin=None, methods=None, headers=None,
m... | 36.648352 | 82 | 0.655772 |
0cfab95a89783b54afa3431e08ad939c7f505040 | 19,546 | py | Python | taca_ngi_pipeline/utils/nbis_xml_generator.py | ssjunnebo/taca-ngi-pipeline | 9ad0a04c7af2e7c32d0c192ca1a313f0d172ca19 | [
"MIT"
] | 2 | 2017-09-12T13:57:18.000Z | 2017-09-12T13:57:39.000Z | taca_ngi_pipeline/utils/nbis_xml_generator.py | ssjunnebo/taca-ngi-pipeline | 9ad0a04c7af2e7c32d0c192ca1a313f0d172ca19 | [
"MIT"
] | 38 | 2015-05-19T11:20:28.000Z | 2021-09-06T07:27:20.000Z | taca_ngi_pipeline/utils/nbis_xml_generator.py | ssjunnebo/taca-ngi-pipeline | 9ad0a04c7af2e7c32d0c192ca1a313f0d172ca19 | [
"MIT"
] | 12 | 2016-03-02T12:28:33.000Z | 2021-04-16T10:50:06.000Z | #!/usr/bin/env python
import argparse
import couchdb
import os
import re
import logging
import six
from collections import defaultdict
from io import open
class xml_generator(object):
"""
A class with class methods to generate run/experiment XML files
which user can submit to reads archive with ... | 59.05136 | 177 | 0.582216 |
b814ca87dcd768e03e6d687591d9edbf88970286 | 12,404 | py | Python | python/paddle/fluid/tests/unittests/test_imperative_triple_grad.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/fluid/tests/unittests/test_imperative_triple_grad.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_imperative_triple_grad.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-09-24T11:23:36.000Z | 2021-09-24T11:23:36.000Z | # Copyright (c) 2021 PaddlePaddle 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 appli... | 39.503185 | 105 | 0.565946 |
2b465b3d626007cb9bf02a982de2682715ce0a8e | 3,955 | py | Python | adafruit_platformdetect/__init__.py | awesometic/Adafruit_Python_PlatformDetect | 0415b1c6c25a07e781bd60da82cf1c1580e3d1f2 | [
"MIT"
] | null | null | null | adafruit_platformdetect/__init__.py | awesometic/Adafruit_Python_PlatformDetect | 0415b1c6c25a07e781bd60da82cf1c1580e3d1f2 | [
"MIT"
] | 1 | 2020-05-21T14:33:28.000Z | 2020-05-21T14:33:28.000Z | adafruit_platformdetect/__init__.py | awesometic/Adafruit_Python_PlatformDetect | 0415b1c6c25a07e781bd60da82cf1c1580e3d1f2 | [
"MIT"
] | 1 | 2020-09-03T16:21:38.000Z | 2020-09-03T16:21:38.000Z | # Copyright (c) 2014-2018 Adafruit Industries
# Author: Tony DiCola, Limor Fried, Brennen Bearnes
# 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 limit... | 35 | 91 | 0.623515 |
c775ae8fda6ca73f18c286d16c2c597ac2a87d30 | 6,857 | py | Python | nodes/audio.py | sddhrthrt/COVFEFE | bc74ff0b5ee4d675482928110dda81443d4bec63 | [
"Apache-2.0"
] | null | null | null | nodes/audio.py | sddhrthrt/COVFEFE | bc74ff0b5ee4d675482928110dda81443d4bec63 | [
"Apache-2.0"
] | null | null | null | nodes/audio.py | sddhrthrt/COVFEFE | bc74ff0b5ee4d675482928110dda81443d4bec63 | [
"Apache-2.0"
] | null | null | null |
from abc import ABC, abstractmethod
import os
import logging
from nodes.helper import FileOutputNode
from utils import file_utils
from utils import signal_processing as sp
from utils.shell_run import shell_run
from config import OPENSMILE_HOME
class Mp3ToWav(FileOutputNode):
def run(self, mp3_file):
self... | 36.865591 | 147 | 0.624763 |
26f8785217199bc5f489cc5bb8ef7f149ca3dfcf | 94 | py | Python | candemachine/sections.py | Ricyteach/candemachine | 0d0baa26aeee358ea6c2fb8148bbe112e36a7fda | [
"MIT"
] | null | null | null | candemachine/sections.py | Ricyteach/candemachine | 0d0baa26aeee358ea6c2fb8148bbe112e36a7fda | [
"MIT"
] | null | null | null | candemachine/sections.py | Ricyteach/candemachine | 0d0baa26aeee358ea6c2fb8148bbe112e36a7fda | [
"MIT"
] | null | null | null | from collections import ChainMap
class SectionDict(ChainMap):
__init__ = NotImplemented
| 15.666667 | 32 | 0.797872 |
b20923408b41f37d764a69950c5b572ca17d700c | 471 | py | Python | config.py | kkverma25/Streams-Extractor | 495f6e731d17c8972eda2e0adcadfa1d256c4e08 | [
"MIT"
] | 51 | 2021-03-08T16:54:38.000Z | 2022-03-18T07:06:15.000Z | config.py | kkverma25/Streams-Extractor | 495f6e731d17c8972eda2e0adcadfa1d256c4e08 | [
"MIT"
] | 7 | 2021-03-17T11:00:20.000Z | 2022-01-25T20:36:25.000Z | config.py | kkverma25/Streams-Extractor | 495f6e731d17c8972eda2e0adcadfa1d256c4e08 | [
"MIT"
] | 148 | 2021-03-08T16:54:38.000Z | 2022-03-25T13:30:17.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
import os
class Config(object):
# Get a bot token from botfather
BOT_TOKEN = os.environ.get("BOT_TOKEN", "")
# Get from my.telegram.org (or @UseTGXBot)
APP_ID = int(os.environ.get("APP_ID", ""))
API_HASH = os.environ.get("API_HASH", ... | 21.409091 | 78 | 0.62845 |
c9dadac3346460e3cd56683ac831ab7ca6806db6 | 1,614 | py | Python | measuring/memory_size_pympler.py | slick666/Faster-Python-Programs | e9e23910fa5cabd725acb2e8553adb51516c9410 | [
"Apache-2.0"
] | null | null | null | measuring/memory_size_pympler.py | slick666/Faster-Python-Programs | e9e23910fa5cabd725acb2e8553adb51516c9410 | [
"Apache-2.0"
] | null | null | null | measuring/memory_size_pympler.py | slick666/Faster-Python-Programs | e9e23910fa5cabd725acb2e8553adb51516c9410 | [
"Apache-2.0"
] | null | null | null | # file: memory_size_pympler.py
"""Measure the size of used memory with a decorator.
"""
from __future__ import print_function
import functools #1
import sys
if sys.version_info.major < 3:
range = xrange
from pympler import tracker ... | 33.625 | 67 | 0.39715 |
b862066175a5a3f7b35f975b67b34e59e141f8dd | 249 | py | Python | alembic/__init__.py | shawnzhu/alembic | c7ce93732f334ece460e479cb104856cdd98432b | [
"MIT"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | alembic/__init__.py | shawnzhu/alembic | c7ce93732f334ece460e479cb104856cdd98432b | [
"MIT"
] | 1 | 2021-08-03T12:23:01.000Z | 2021-08-10T08:35:22.000Z | alembic/__init__.py | shawnzhu/alembic | c7ce93732f334ece460e479cb104856cdd98432b | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | import sys
from . import context # noqa
from . import op # noqa
from .runtime import environment
from .runtime import migration
__version__ = '1.4.1'
sys.modules["alembic.migration"] = migration
sys.modules["alembic.environment"] = environment
| 20.75 | 48 | 0.75502 |
2152ba9100caaf308a91bd96d5d3949e27147061 | 1,425 | py | Python | tests/test_undersampling.py | hypper-team/hypper | 880d13f91dfeaea25ba20a0e44df2ca4c1066cbb | [
"BSD-3-Clause"
] | null | null | null | tests/test_undersampling.py | hypper-team/hypper | 880d13f91dfeaea25ba20a0e44df2ca4c1066cbb | [
"BSD-3-Clause"
] | null | null | null | tests/test_undersampling.py | hypper-team/hypper | 880d13f91dfeaea25ba20a0e44df2ca4c1066cbb | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
from sklearn.model_selection import ParameterGrid
from pandas.testing import assert_frame_equal
from pathlib import Path
from hypper.undersampling import CDWU
from hypper.data import read_german_data, read_spect_heart, read_sample_data
DS = [read_german_data(), read_spect_heart(), read_sample_dat... | 28.5 | 82 | 0.659649 |
ba2c22648eed3f4b5e7b931aead344a837e3fa0c | 1,325 | py | Python | test/test_list_omni_tokens_by_address_response_item.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | test/test_list_omni_tokens_by_address_response_item.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | test/test_list_omni_tokens_by_address_response_item.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | 1 | 2021-07-21T03:35:18.000Z | 2021-07-21T03:35:18.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 35.810811 | 484 | 0.767547 |
70d514dee532bc5c1db2f9b8970def3cb152af55 | 3,362 | py | Python | options/options.py | ZhibingLai/MSFN | eb650c351edf27270bc32b50b60842a9fe40308e | [
"Apache-2.0"
] | null | null | null | options/options.py | ZhibingLai/MSFN | eb650c351edf27270bc32b50b60842a9fe40308e | [
"Apache-2.0"
] | null | null | null | options/options.py | ZhibingLai/MSFN | eb650c351edf27270bc32b50b60842a9fe40308e | [
"Apache-2.0"
] | null | null | null | import os
from collections import OrderedDict
from datetime import datetime
import json
import torch
from utils import util
def get_timestamp():
return datetime.now().strftime('%y%m%d-%H%M%S')
def parse(opt_path):
# remove comments starting with '//'
json_str = ''
with open(opt_path, 'r') as f:
... | 32.640777 | 142 | 0.609161 |
699df8bd22729da6c95981ae4c84987f4aaf7460 | 913 | py | Python | index.py | balbidatascience/ir-conciliacao-dash | ed52294daea34427cddead4fa10b55da2bd709e2 | [
"MIT"
] | null | null | null | index.py | balbidatascience/ir-conciliacao-dash | ed52294daea34427cddead4fa10b55da2bd709e2 | [
"MIT"
] | null | null | null | index.py | balbidatascience/ir-conciliacao-dash | ed52294daea34427cddead4fa10b55da2bd709e2 | [
"MIT"
] | null | null | null | from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
from app import app
from apps import app1, MonitorConciliacao, index, MonitorChargeback, AnaliseVendasAprovadas
app.layout = html.Div([
dcc.Location(id='url', refresh=False),
html.Div(id='page-c... | 29.451613 | 91 | 0.698795 |
8c105adf91259df8acda768d3daf7fa5fb1fbd53 | 597 | py | Python | spacy/lang/fa/lemmatizer/__init__.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 12 | 2019-03-20T20:43:47.000Z | 2020-04-13T11:10:52.000Z | spacy/lang/fa/lemmatizer/__init__.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 13 | 2018-06-05T11:54:40.000Z | 2019-07-02T11:33:14.000Z | spacy/lang/fa/lemmatizer/__init__.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 1 | 2020-09-02T07:24:59.000Z | 2020-09-02T07:24:59.000Z | # coding: utf8
from __future__ import unicode_literals
from ._adjectives import ADJECTIVES
from ._adjectives_exc import ADJECTIVES_EXC
from ._nouns import NOUNS
from ._nouns_exc import NOUNS_EXC
from ._verbs import VERBS
from ._verbs_exc import VERBS_EXC
from ._lemma_rules import ADJECTIVE_RULES, NOUN_RULES, VERB_RULE... | 25.956522 | 78 | 0.755444 |
dc5480c96998ad40eb0f113a32ecc917cedfbc14 | 26 | py | Python | python/walk_up/__init__.py | jeff-hykin/walk_up | 5455a643bce69d597a367467535a2f82ae0d746b | [
"MIT"
] | null | null | null | python/walk_up/__init__.py | jeff-hykin/walk_up | 5455a643bce69d597a367467535a2f82ae0d746b | [
"MIT"
] | null | null | null | python/walk_up/__init__.py | jeff-hykin/walk_up | 5455a643bce69d597a367467535a2f82ae0d746b | [
"MIT"
] | null | null | null | from walk_up.main import * | 26 | 26 | 0.807692 |
b78cc73e02d35ad1b78c4689d54115d441c651c7 | 22,893 | py | Python | mpisppy/utils/baseparsers.py | Matthew-Signorotti/mpi-sppy | 5c6b4b8cd26af517ff09706d11751f2fb05b1b5f | [
"BSD-3-Clause"
] | null | null | null | mpisppy/utils/baseparsers.py | Matthew-Signorotti/mpi-sppy | 5c6b4b8cd26af517ff09706d11751f2fb05b1b5f | [
"BSD-3-Clause"
] | null | null | null | mpisppy/utils/baseparsers.py | Matthew-Signorotti/mpi-sppy | 5c6b4b8cd26af517ff09706d11751f2fb05b1b5f | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2020 by B. Knueven, D. Mildebrath, C. Muir, J-P Watson, and D.L. Woodruff
# This software is distributed under the 3-clause BSD License.
# set up the most common parser args for mpi-sppy examples
""" NOTE TO NEW USERS: just using these parsers will not, itself, do anything.
You have to use the values wh... | 40.233743 | 129 | 0.52112 |
c7f86920cd2905987fdba7387dc0dfb7042c4908 | 27 | py | Python | report_generation/combine/__init__.py | virtualcell/test_suite | 35aeee3edcd8ed937cfce63d13c5d410c5f16143 | [
"MIT"
] | null | null | null | report_generation/combine/__init__.py | virtualcell/test_suite | 35aeee3edcd8ed937cfce63d13c5d410c5f16143 | [
"MIT"
] | 8 | 2020-11-26T23:26:03.000Z | 2021-01-07T22:49:49.000Z | report_generation/combine/__init__.py | virtualcell/test_suite | 35aeee3edcd8ed937cfce63d13c5d410c5f16143 | [
"MIT"
] | null | null | null | from logzero import logger
| 13.5 | 26 | 0.851852 |
102cbb0e4145ab739fe3401cc15055b3f55b9041 | 2,280 | py | Python | minos/common/__init__.py | Clariteia/minos_microservice_common | c58e8c193f5d9fd0980c209e6e74ee115a8fb041 | [
"MIT"
] | 5 | 2021-04-12T09:37:58.000Z | 2021-10-04T08:37:05.000Z | minos/common/__init__.py | Clariteia/minos_microservice_common | c58e8c193f5d9fd0980c209e6e74ee115a8fb041 | [
"MIT"
] | 400 | 2021-04-03T08:51:40.000Z | 2022-01-28T11:51:22.000Z | minos/common/__init__.py | Clariteia/minos_microservice_common | c58e8c193f5d9fd0980c209e6e74ee115a8fb041 | [
"MIT"
] | null | null | null | __author__ = """Clariteia Devs"""
__email__ = "devs@clariteia.com"
__version__ = "0.3.4"
from .configuration import (
BROKER,
DISCOVERY,
QUEUE,
REPOSITORY,
REST,
SAGA,
SERVICE,
SNAPSHOT,
STORAGE,
MinosConfig,
MinosConfigAbstract,
)
from .database import (
PostgreSqlLock,... | 19.655172 | 41 | 0.72193 |
6d7acb34b225551b30994722e6b92de1fa1727c2 | 1,331 | py | Python | aliyun-python-sdk-aegis/aliyunsdkaegis/request/v20161111/DescribeScreenSettingRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-aegis/aliyunsdkaegis/request/v20161111/DescribeScreenSettingRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-aegis/aliyunsdkaegis/request/v20161111/DescribeScreenSettingRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # 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... | 36.972222 | 87 | 0.768595 |
37d4e7d2e955d9f768584d6ff97cc3fbd69e0a27 | 646 | py | Python | subalign/translate.py | ychalier/subalign | 6dda4a7e37c4513a547fdd3999653b71ca778098 | [
"MIT"
] | null | null | null | subalign/translate.py | ychalier/subalign | 6dda4a7e37c4513a547fdd3999653b71ca778098 | [
"MIT"
] | null | null | null | subalign/translate.py | ychalier/subalign | 6dda4a7e37c4513a547fdd3999653b71ca778098 | [
"MIT"
] | null | null | null | """This module provides tools to translate subs from one language to another"""
import logging
import word2word #pylint: disable=E0401
def translate(sequence, from_language, to_language):
"""Translate a WordSequence from one language to another"""
logging.info("Translating sequence from '%s' to '%s'", from_... | 35.888889 | 87 | 0.702786 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.