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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a06276abf091c4bc563e75db3381f84b36c4772 | 1,239 | py | Python | lib/spack/spack/test/cmd/debug.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-06-25T15:25:29.000Z | 2020-06-25T15:25:29.000Z | lib/spack/spack/test/cmd/debug.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2018-07-06T19:11:46.000Z | 2018-07-06T19:12:28.000Z | lib/spack/spack/test/cmd/debug.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-09-21T14:35:49.000Z | 2020-09-21T14:35:49.000Z | # Copyright 2013-2020 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)
import pytest
import os
import os.path
from spack.main import SpackCommand
from spack.util.executable import which
debu... | 28.159091 | 76 | 0.656981 |
4a062778bd5b0b4f43674622bfe12ec5a05c8b38 | 15,803 | py | Python | msaf/features.py | Slliss/msaf | 377b8a0423704029e49bfd0c60658955733096af | [
"MIT"
] | null | null | null | msaf/features.py | Slliss/msaf | 377b8a0423704029e49bfd0c60658955733096af | [
"MIT"
] | null | null | null | msaf/features.py | Slliss/msaf | 377b8a0423704029e49bfd0c60658955733096af | [
"MIT"
] | null | null | null | """
Each feature must inherit from the base class :class:`msaf.base.Features` to be
included in the whole framework.
Here is a list of all the available features:
.. autosummary::
:toctree: generated/
CQT
MFCC
PCP
Tonnetz
Tempogram
Features
"""
from builtins import super
import librosa
i... | 35.672686 | 103 | 0.567361 |
4a06286d326b041d0e4ec5849ce531ede1ab5054 | 1,058 | py | Python | week5/main.py | csMOOC/Stanford.Cryptography | 13bd0e7188a7aded37a152378b6b1238736eaade | [
"MIT"
] | 1 | 2017-11-18T15:34:44.000Z | 2017-11-18T15:34:44.000Z | week5/main.py | csMOOC/Stanford.Cryptography | 13bd0e7188a7aded37a152378b6b1238736eaade | [
"MIT"
] | null | null | null | week5/main.py | csMOOC/Stanford.Cryptography | 13bd0e7188a7aded37a152378b6b1238736eaade | [
"MIT"
] | null | null | null | from numbthy import *
p = 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084171
g = 117178298803662070095161175963353670885580849999989522055999794590639294997365837466705721764714603129285948296754282794665665271152... | 24.045455 | 159 | 0.73535 |
4a062883f5c9737f5c71c1fdaed91680571e3daa | 21,669 | py | Python | promptwithoptions/promptwithoptions.py | silkyanteater/promptwithoptions | a7c2d0b6936d90d4a6eaa1e56f179e58e26988bb | [
"MIT"
] | null | null | null | promptwithoptions/promptwithoptions.py | silkyanteater/promptwithoptions | a7c2d0b6936d90d4a6eaa1e56f179e58e26988bb | [
"MIT"
] | null | null | null | promptwithoptions/promptwithoptions.py | silkyanteater/promptwithoptions | a7c2d0b6936d90d4a6eaa1e56f179e58e26988bb | [
"MIT"
] | null | null | null | import sys
import shlex
from collections.abc import Iterable
# TODO: add a field type that is free text but with options to make it more convenient
ARGUMENT_NAMES = (
"prompt",
"options",
"data_type",
"default",
"allow_empty",
"allow_multiple",
"allow_repetitive",
"show_confirmation",... | 34.837621 | 112 | 0.582214 |
4a062944876b8fc55f977066984d8f2893f92029 | 15,355 | py | Python | HW7/model_2.py | Pyrojewel-zard/ML | d8a11d893eed3e889b9af0d6aeb3ab08cd60d997 | [
"MIT"
] | 5 | 2021-11-26T10:05:03.000Z | 2022-03-17T11:45:46.000Z | HW7/model_2.py | Pyrojewel-zard/ML | d8a11d893eed3e889b9af0d6aeb3ab08cd60d997 | [
"MIT"
] | null | null | null | HW7/model_2.py | Pyrojewel-zard/ML | d8a11d893eed3e889b9af0d6aeb3ab08cd60d997 | [
"MIT"
] | 1 | 2022-01-09T02:17:19.000Z | 2022-01-09T02:17:19.000Z | # -*- coding: utf-8 -*-
"""「hw7_bert」的副本
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1X0HkHZ8MqyDiO1oIuduZ70PCIj-LQGbh
# **Homework 7 - Bert (Question Answering)**
If you have any questions, feel free to email us at ntu-ml-2021spring-ta@googlegrou... | 41.16622 | 239 | 0.699056 |
4a062a2c96a41011232d32d9cd7f243f7cd3bcb6 | 16,733 | py | Python | sunpy/net/fido_factory.py | aringlis/sunpy | 5bcc7ea2c4319fc777b1ba03075c0adf75d69cf5 | [
"BSD-2-Clause"
] | null | null | null | sunpy/net/fido_factory.py | aringlis/sunpy | 5bcc7ea2c4319fc777b1ba03075c0adf75d69cf5 | [
"BSD-2-Clause"
] | null | null | null | sunpy/net/fido_factory.py | aringlis/sunpy | 5bcc7ea2c4319fc777b1ba03075c0adf75d69cf5 | [
"BSD-2-Clause"
] | null | null | null | """
This module provides the `Fido
<sunpy.net.fido_factory.UnifiedDownloaderFactory>` instance of
`sunpy.net.fido_factory.UnifiedDownloaderFactory` it also provides the
`~sunpy.net.fido_factory.UnifiedResponse` class which
`Fido.search <sunpy.net.fido_factory.UnifiedDownloaderFactory.search>` returns and the
`~sunpy.ne... | 37.602247 | 114 | 0.605749 |
4a062a45ba059715a00a6baf4a44bfb36cba4caf | 631 | py | Python | manage.py | Poornartha/ProductSocial | b2bc1fcf81090cb1edfdce4e76d7345e37d968e4 | [
"MIT"
] | 8 | 2020-07-05T17:06:40.000Z | 2022-02-05T19:44:53.000Z | manage.py | Poornartha/ProductSocial | b2bc1fcf81090cb1edfdce4e76d7345e37d968e4 | [
"MIT"
] | 13 | 2020-11-13T18:56:58.000Z | 2022-03-12T00:38:59.000Z | manage.py | Poornartha/ProductSocial | b2bc1fcf81090cb1edfdce4e76d7345e37d968e4 | [
"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', 'ImageSocial.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Im... | 28.681818 | 75 | 0.684628 |
4a062b5b9f6544478a16c64b7bf3bc7b2fc9ae77 | 95,983 | py | Python | tests/pmap_test.py | tlu7/jax | f4351e84191cf769b59f6e652264bb2b9ab007d8 | [
"Apache-2.0"
] | null | null | null | tests/pmap_test.py | tlu7/jax | f4351e84191cf769b59f6e652264bb2b9ab007d8 | [
"Apache-2.0"
] | 6 | 2022-01-03T13:15:47.000Z | 2022-02-14T13:14:10.000Z | tests/pmap_test.py | tlu7/jax | f4351e84191cf769b59f6e652264bb2b9ab007d8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.030478 | 105 | 0.626048 |
4a062c0e595e2e8af5db3523a46893c05fd2e992 | 7,365 | py | Python | minfraud/komand_minfraud/actions/device_lookup/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | minfraud/komand_minfraud/actions/device_lookup/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | minfraud/komand_minfraud/actions/device_lookup/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import DeviceLookupInput, DeviceLookupOutput
# Custom imports below
import minfraud
class DeviceLookup(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='device_lookup',
description='Query device info',
... | 32.879464 | 86 | 0.60353 |
4a062e5dec85f0f16710070616a51c4b5021ea62 | 1,367 | py | Python | Python3/1137.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/1137.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/1137.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 24 ms submission
class Solution:
def tribonacci(self, n: int) -> int:
if n==0:
return 0
if n==1 or n==2:
return 1
a0=0
a1=1
... | 28.479167 | 98 | 0.554499 |
4a062edaae205290737a7378ec55d8f5d070aad8 | 6,399 | py | Python | homeassistant/components/google_wifi/sensor.py | kauzu/core | 6eadc0c3033473381cb70babf9f7c813e183d2df | [
"Apache-2.0"
] | 2 | 2021-01-29T02:52:01.000Z | 2021-05-15T04:23:18.000Z | homeassistant/components/google_wifi/sensor.py | kauzu/core | 6eadc0c3033473381cb70babf9f7c813e183d2df | [
"Apache-2.0"
] | 44 | 2021-03-17T07:49:17.000Z | 2022-03-31T06:08:18.000Z | homeassistant/components/google_wifi/sensor.py | kauzu/core | 6eadc0c3033473381cb70babf9f7c813e183d2df | [
"Apache-2.0"
] | 7 | 2021-03-20T12:34:01.000Z | 2021-12-02T10:13:52.000Z | """Support for retrieving status info from Google Wifi/OnHub routers."""
from datetime import timedelta
import logging
import requests
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import (
CONF_HOST,
CONF_MONITORED_CONDITIONS,
... | 33.328125 | 88 | 0.602282 |
4a062ee80276a11c9cd04b701d9e1e8fb6dd5c24 | 5,070 | py | Python | questions.py | Fatiepie/Harriet.ai | b41ad15092cf247f0442dd6562075939b78381a9 | [
"MIT"
] | null | null | null | questions.py | Fatiepie/Harriet.ai | b41ad15092cf247f0442dd6562075939b78381a9 | [
"MIT"
] | null | null | null | questions.py | Fatiepie/Harriet.ai | b41ad15092cf247f0442dd6562075939b78381a9 | [
"MIT"
] | null | null | null | import nltk
import sys
import os
import string
import math
FILE_MATCHES = 1
SENTENCE_MATCHES = 1
def main():
# Check command-line arguments
if len(sys.argv) != 2:
sys.exit("Usage: python questions.py corpus")
# Calculate IDF values across files
files = load_files(sys.argv[1])
file_words... | 30.914634 | 85 | 0.658185 |
4a062f8097168202db7100b2cedc1adc39bc5752 | 1,232 | py | Python | gym/spaces/multi_discrete.py | MrJayK/gym | 49d33fa83c6b65859d584939dc6e72f1ad36882d | [
"Python-2.0",
"OLDAP-2.7"
] | 10 | 2019-10-20T21:27:41.000Z | 2021-06-11T23:38:45.000Z | gym/spaces/multi_discrete.py | MrJayK/gym | 49d33fa83c6b65859d584939dc6e72f1ad36882d | [
"Python-2.0",
"OLDAP-2.7"
] | 4 | 2021-06-08T20:53:32.000Z | 2022-03-12T00:13:40.000Z | gym/spaces/multi_discrete.py | MrJayK/gym | 49d33fa83c6b65859d584939dc6e72f1ad36882d | [
"Python-2.0",
"OLDAP-2.7"
] | 3 | 2020-03-05T05:30:12.000Z | 2021-04-22T05:37:05.000Z | import gym
import numpy as np
from .space import Space
class MultiDiscrete(Space):
def __init__(self, nvec):
"""
nvec: vector of counts of each categorical variable
"""
assert (np.array(nvec) > 0).all(), 'nvec (counts) have to be positive'
self.nvec = np.asarray(nvec, dtype... | 31.589744 | 96 | 0.641234 |
4a0630e70d1a843d4401cf9d0011ee9b231b613d | 3,032 | py | Python | minitests/timfuz/node_unique.py | nelsobe/litghost | 557d047316f7cd7ddfabc17f54ff5b1a47b564d2 | [
"0BSD"
] | 1 | 2020-10-31T19:32:41.000Z | 2020-10-31T19:32:41.000Z | minitests/timfuz/node_unique.py | nelsobe/prjxray | 557d047316f7cd7ddfabc17f54ff5b1a47b564d2 | [
"0BSD"
] | null | null | null | minitests/timfuz/node_unique.py | nelsobe/prjxray | 557d047316f7cd7ddfabc17f54ff5b1a47b564d2 | [
"0BSD"
] | 1 | 2021-03-08T21:02:02.000Z | 2021-03-08T21:02:02.000Z | import re
def gen_nodes(fin):
for l in fin:
lj = {}
l = l.strip()
for kvs in l.split():
name, value = kvs.split(':')
'''
NAME:LIOB33_SING_X0Y199/IOB_IBUF0
IS_BAD:0
IS_COMPLETE:1
IS_GND:0 IS_INPUT_PIN:1 IS_OUTPUT_PIN:0... | 29.436893 | 78 | 0.441953 |
4a06315ea75076de2e62efb983dd38142d868bbf | 3,460 | py | Python | tests/test_slack.py | rabibh/blackbox | c77dac14449a4a3d74ee3d2b00170b3085642bbf | [
"MIT"
] | 1 | 2021-09-11T04:35:06.000Z | 2021-09-11T04:35:06.000Z | tests/test_slack.py | rabibh/blackbox | c77dac14449a4a3d74ee3d2b00170b3085642bbf | [
"MIT"
] | null | null | null | tests/test_slack.py | rabibh/blackbox | c77dac14449a4a3d74ee3d2b00170b3085642bbf | [
"MIT"
] | null | null | null | import pytest
import requests_mock
from blackbox.exceptions import MissingFields
from blackbox.handlers.notifiers.slack import Slack
WEBHOOK = "https://hooks.slack.com/services/x/x/x"
@pytest.fixture
def mock_valid_slack_config():
"""Mock valid Slack config."""
return {"webhook": WEBHOOK}
@pytest.fixture... | 30.619469 | 123 | 0.568786 |
4a0632224c38f31f67de893e03823ba0e381267a | 6,626 | py | Python | fastapi_amis_admin/crud/base.py | cnss63/fastapi_amis_admin | 52537d153a002b3c468cb2634779010be956a9b4 | [
"Apache-2.0"
] | null | null | null | fastapi_amis_admin/crud/base.py | cnss63/fastapi_amis_admin | 52537d153a002b3c468cb2634779010be956a9b4 | [
"Apache-2.0"
] | null | null | null | fastapi_amis_admin/crud/base.py | cnss63/fastapi_amis_admin | 52537d153a002b3c468cb2634779010be956a9b4 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Callable, List, Type, Union, Optional
from fastapi import APIRouter, Depends
from pydantic import BaseModel
from starlette import status
from starlette.exceptions import HTTPException
from starlette.requests import Request
from .schema import BaseApiOut, ItemListSchema, CrudEnum, Paginator
fro... | 40.402439 | 118 | 0.626471 |
4a0632baa6d79f02c02ca8df4d3ecea746c9b382 | 1,785 | py | Python | python_modules/dagstermill/setup.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | null | null | null | python_modules/dagstermill/setup.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | null | null | null | python_modules/dagstermill/setup.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | null | null | null | import argparse
import sys
from setuptools import find_packages, setup
def get_version(name):
version = {}
with open('dagstermill/version.py') as fp:
exec(fp.read(), version) # pylint: disable=W0122
if name == 'dagstermill':
return version['__version__']
elif name == 'dagstermill-ni... | 29.262295 | 88 | 0.57591 |
4a0633709d7e215f9955c8d05768d860f4e41908 | 995 | py | Python | Lib/site-packages/rest_framework_simplejwt/exceptions.py | Priyansh863/e-backend | c8c1bb8a7c0de96febacfeec76249256c8df3303 | [
"bzip2-1.0.6"
] | 4 | 2019-12-09T08:53:12.000Z | 2020-10-29T21:41:40.000Z | rest_framework_simplejwt/exceptions.py | urantialife/django-rest-framework-simplejwt | 89cdeaa76f99aea6bc208bf914df35034169ddc7 | [
"BSD-2-Clause",
"MIT"
] | 21 | 2021-03-11T00:34:32.000Z | 2022-03-12T00:39:44.000Z | rest_framework_simplejwt/exceptions.py | urantialife/django-rest-framework-simplejwt | 89cdeaa76f99aea6bc208bf914df35034169ddc7 | [
"BSD-2-Clause",
"MIT"
] | 17 | 2019-09-11T10:30:54.000Z | 2020-12-03T06:19:00.000Z | from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions, status
class TokenError(Exception):
pass
class TokenBackendError(Exception):
pass
class DetailDictMixin:
def __init__(self, detail=None, code=None):
"""
Builds a detail dictionary for the err... | 24.875 | 80 | 0.686432 |
4a0633aceb2900f07621369b8df4b6b02bc627b9 | 2,829 | py | Python | docs/code/Tours.py | bjrnmath/debuggingbook | 8b6cd36fc75a89464e9252e40e1d4edcb6a70559 | [
"MIT"
] | null | null | null | docs/code/Tours.py | bjrnmath/debuggingbook | 8b6cd36fc75a89464e9252e40e1d4edcb6a70559 | [
"MIT"
] | null | null | null | docs/code/Tours.py | bjrnmath/debuggingbook | 8b6cd36fc75a89464e9252e40e1d4edcb6a70559 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# "Tours through the Book" - a chapter of "The Debugging Book"
# Web site: https://www.debuggingbook.org/html/Tours.html
# Last change: 2021-05-11 15:25:24+02:00
#
# Copyright (c) 2021 CISPA Helmholtz Center for Information Security
# Copyright (c) 2018-2020 Saarland Univ... | 28.867347 | 73 | 0.702368 |
4a0634954931ca16ac1471a6893421074969ce22 | 1,464 | py | Python | elastalert/rule_from_kibana.py | perceptron01/elastalert2 | bb91ecdb03dedda207237ca83d628fd5d40d29c6 | [
"Apache-2.0"
] | 8,191 | 2015-02-20T19:24:34.000Z | 2022-03-31T15:51:07.000Z | elastalert/rule_from_kibana.py | perceptron01/elastalert2 | bb91ecdb03dedda207237ca83d628fd5d40d29c6 | [
"Apache-2.0"
] | 2,793 | 2015-02-20T20:58:50.000Z | 2022-03-30T23:19:13.000Z | elastalert/rule_from_kibana.py | perceptron01/elastalert2 | bb91ecdb03dedda207237ca83d628fd5d40d29c6 | [
"Apache-2.0"
] | 2,176 | 2015-02-27T05:45:22.000Z | 2022-03-31T04:38:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import yaml
from elastalert.kibana import filters_from_dashboard
from elastalert.util import elasticsearch_client
def main():
es_host = input("Elasticsearch host: ")
es_port = input("Elasticsearch port: ")
db_name = input("Dashboard name: ")
... | 30.5 | 120 | 0.648224 |
4a0634d974af01f4662c97e17b3ddc8a26fcaccd | 2,751 | py | Python | backend/blueprints/spa_api/service_layers/replay/groups.py | dbauducco/DistributedReplays | 07e6f4c2bf104e98102b092d8a1a3ce2ac7ab291 | [
"Apache-2.0"
] | 69 | 2018-07-17T19:40:21.000Z | 2022-02-25T14:23:53.000Z | backend/blueprints/spa_api/service_layers/replay/groups.py | dbauducco/DistributedReplays | 07e6f4c2bf104e98102b092d8a1a3ce2ac7ab291 | [
"Apache-2.0"
] | 335 | 2018-07-25T19:34:55.000Z | 2022-02-26T06:04:32.000Z | backend/blueprints/spa_api/service_layers/replay/groups.py | dbauducco/DistributedReplays | 07e6f4c2bf104e98102b092d8a1a3ce2ac7ab291 | [
"Apache-2.0"
] | 42 | 2018-07-21T00:04:23.000Z | 2022-02-25T14:23:42.000Z | import logging
from typing import List
from backend.database.wrapper import player_wrapper
from backend.database.wrapper.chart.chart_data import ChartData, ChartDataPoint
from backend.database.wrapper.chart.player_chart_metadata import player_group_stats_metadata
from backend.database.wrapper.chart.stat_point import ... | 41.681818 | 114 | 0.606325 |
4a0635175b796a2efcc7e0e003bdcd883b3c737a | 1,471 | py | Python | taxjar/data/breakdown_line_item.py | danpalmer/taxjar-python | f22867bede037970970394d4c2a7635e9ec28ae9 | [
"MIT"
] | 24 | 2015-06-22T19:32:18.000Z | 2022-03-28T17:51:47.000Z | taxjar/data/breakdown_line_item.py | danpalmer/taxjar-python | f22867bede037970970394d4c2a7635e9ec28ae9 | [
"MIT"
] | 14 | 2017-05-16T15:26:15.000Z | 2022-03-17T08:06:51.000Z | taxjar/data/breakdown_line_item.py | danpalmer/taxjar-python | f22867bede037970970394d4c2a7635e9ec28ae9 | [
"MIT"
] | 15 | 2017-05-04T13:42:23.000Z | 2022-03-12T18:14:36.000Z | from jsonobject import JsonObject
from taxjar.data.float_property import TaxJarFloatProperty
class TaxJarBreakdownLineItem(JsonObject):
# NB: can return either string or integer
# `id` is a valid property, but isn't enforced here
# id = StringProperty()
taxable_amount = TaxJarFloatProperty()
tax_c... | 40.861111 | 59 | 0.774303 |
4a0636656e9d56bcef81330f4eb0e8bca6d34297 | 266 | py | Python | test/tests/wrapperdesc.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/tests/wrapperdesc.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/tests/wrapperdesc.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | class C(object):
pass
print C.__str__ is object.__str__
print type(C).__str__ is object.__str__
print type(None).__str__ is object.__str__
print type(None).__str__ is None.__str__
print type(None.__str__)
print type(type(None).__str__.__get__(None, type(None)))
| 29.555556 | 56 | 0.778195 |
4a063704b699ec091d828903fe2a9d5a5a5a3a24 | 12,689 | py | Python | remo/events/migrations/0014_auto__del_field_eventmetricoutcome_outcome__add_field_eventmetricoutco.py | glogiotatidis/remo | 1c4f55c63c8d03cbee776b60af042b8068d9f297 | [
"BSD-3-Clause"
] | null | null | null | remo/events/migrations/0014_auto__del_field_eventmetricoutcome_outcome__add_field_eventmetricoutco.py | glogiotatidis/remo | 1c4f55c63c8d03cbee776b60af042b8068d9f297 | [
"BSD-3-Clause"
] | null | null | null | remo/events/migrations/0014_auto__del_field_eventmetricoutcome_outcome__add_field_eventmetricoutco.py | glogiotatidis/remo | 1c4f55c63c8d03cbee776b60af042b8068d9f297 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'EventMetricOutcome.outcome'
db.rename_column(u'events_eventmetricoutcome', 'outcome', 'exp... | 80.310127 | 218 | 0.566002 |
4a0637883fe40e5ea7066ae8c883b2e7979be5dc | 782 | py | Python | data/__init__.py | yongchaoding/bus_passenger_detection | a716631eb6370e795f7ca40a8869d6c4ba290091 | [
"Apache-2.0"
] | null | null | null | data/__init__.py | yongchaoding/bus_passenger_detection | a716631eb6370e795f7ca40a8869d6c4ba290091 | [
"Apache-2.0"
] | null | null | null | data/__init__.py | yongchaoding/bus_passenger_detection | a716631eb6370e795f7ca40a8869d6c4ba290091 | [
"Apache-2.0"
] | null | null | null | import torch
def detection_collate(data):
"""Custom collate fn for dealing with batches of images that have a different
number of associated object annotations (bounding boxes)."""
images = []
labels = []
for sample in data:
images.append(sample[0])
labels.append(sample[1])
retu... | 30.076923 | 81 | 0.575448 |
4a0637bc3e472326933299aaf5ee066b201451d3 | 2,189 | py | Python | django_ip_geolocation/middleware.py | girishkumarkh/django-ip-geolocation | d5e04db42ac9cf17b6b23f2572e3cacd59afec74 | [
"MIT"
] | 30 | 2019-12-29T13:44:13.000Z | 2022-03-25T19:26:43.000Z | django_ip_geolocation/middleware.py | girishkumarkh/django-ip-geolocation | d5e04db42ac9cf17b6b23f2572e3cacd59afec74 | [
"MIT"
] | 28 | 2019-12-28T14:36:12.000Z | 2021-04-13T08:44:38.000Z | django_ip_geolocation/middleware.py | girishkumarkh/django-ip-geolocation | d5e04db42ac9cf17b6b23f2572e3cacd59afec74 | [
"MIT"
] | 6 | 2020-01-09T12:25:14.000Z | 2021-10-20T11:45:42.000Z | """Django middleware."""
import logging
from django.utils.deprecation import MiddlewareMixin # noqa: E501 pylint: disable=import-error
from django_ip_geolocation.utils import get_geolocation, set_cookie, \
clean_geolocation_data, is_user_consented
from django_ip_geolocation.settings import IP_GEOLOCATION_SETTINGS... | 35.306452 | 95 | 0.644587 |
4a06385da3137908be5a7f945afaee4d5ea2cd98 | 1,799 | py | Python | segmentation/feature_extraction_test.py | peternara/graph-based-image-classification-gcn | 60e93b47691e960b7f06f7a5dc11191efe881178 | [
"MIT"
] | 44 | 2017-02-26T16:52:48.000Z | 2022-02-17T18:50:02.000Z | segmentation/feature_extraction_test.py | hungerzs/graph-based-image-classification | d44182c6a28b4ab9a691a9cb1ecd4c3b851875a8 | [
"MIT"
] | 2 | 2018-11-14T05:11:25.000Z | 2020-06-23T16:24:41.000Z | segmentation/feature_extraction_test.py | hungerzs/graph-based-image-classification | d44182c6a28b4ab9a691a9cb1ecd4c3b851875a8 | [
"MIT"
] | 13 | 2018-04-26T07:46:35.000Z | 2022-02-28T15:38:53.000Z | from math import sqrt, pi as PI
import tensorflow as tf
from .feature_extraction import feature_extraction
class FeaturesTest(tf.test.TestCase):
def test_features(self):
image = tf.constant([
[[255, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [... | 30.491525 | 68 | 0.460256 |
4a063a004314b8713d778a7e0a761a9e1eaca665 | 15,036 | py | Python | src/aed/models.py | rgrzeszi/bof-aed | f7d62e63fdb4460c0bda912ba8037c77a2876cfc | [
"MIT"
] | 14 | 2017-11-24T23:34:04.000Z | 2021-06-29T01:59:27.000Z | src/aed/models.py | rgrzeszi/bof-aed | f7d62e63fdb4460c0bda912ba8037c77a2876cfc | [
"MIT"
] | null | null | null | src/aed/models.py | rgrzeszi/bof-aed | f7d62e63fdb4460c0bda912ba8037c77a2876cfc | [
"MIT"
] | 4 | 2016-11-01T12:33:22.000Z | 2018-02-10T07:42:59.000Z | '''
Copyright (C) 2015 Axel Plinge and Rene Grzeszick.
This file made available under the terms of the MIT license (see the LICENSE file).
For any publication please cite the corresponding paper (see the README file).
'''
import sys
import numpy as np
from sklearn.mixture import GMM
from features import FeatureNormal... | 34.250569 | 117 | 0.607475 |
4a063a5d09a3e13b3e0317005b170e3ab665d18f | 4,620 | py | Python | previous_version/make_affinity_labels.py | CVI-SZU/CLIMS | 9d3d0123b625b2c6941069e8fb359019a5cabd59 | [
"MIT"
] | 4 | 2022-03-19T06:50:32.000Z | 2022-03-26T03:25:51.000Z | previous_version/make_affinity_labels.py | CVI-SZU/CLIMS | 9d3d0123b625b2c6941069e8fb359019a5cabd59 | [
"MIT"
] | 1 | 2022-03-26T03:27:57.000Z | 2022-03-30T07:00:43.000Z | previous_version/make_affinity_labels.py | CVI-SZU/CLIMS | 9d3d0123b625b2c6941069e8fb359019a5cabd59 | [
"MIT"
] | null | null | null | # Copyright (C) 2020 * Ltd. All rights reserved.
# author : Sanghyeon Jo <josanghyeokn@gmail.com>
import os
import sys
import copy
import shutil
import random
import argparse
import numpy as np
import imageio
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision import transforms
from ... | 35.813953 | 149 | 0.540476 |
4a063b5b7c5fb44b10d0a8d15b61d1262e58eee6 | 3,728 | py | Python | tests/test_binds.py | indietyp/flask-sqlalchemy | 7ba8761f999bad18966a3e478a75d64c1ca11a7d | [
"BSD-3-Clause"
] | 1,917 | 2015-01-04T17:52:59.000Z | 2019-02-01T13:44:53.000Z | tests/test_binds.py | indietyp/flask-sqlalchemy | 7ba8761f999bad18966a3e478a75d64c1ca11a7d | [
"BSD-3-Clause"
] | 461 | 2015-01-02T09:38:33.000Z | 2019-01-31T14:47:50.000Z | tests/test_binds.py | indietyp/flask-sqlalchemy | 7ba8761f999bad18966a3e478a75d64c1ca11a7d | [
"BSD-3-Clause"
] | 590 | 2015-01-02T09:09:40.000Z | 2019-02-01T07:19:37.000Z | from flask_sqlalchemy import get_state
from flask_sqlalchemy import SQLAlchemy
def test_basic_binds(app, db):
app.config["SQLALCHEMY_BINDS"] = {"foo": "sqlite://", "bar": "sqlite://"}
class Foo(db.Model):
__bind_key__ = "foo"
__table_args__ = {"info": {"bind_key": "foo"}}
id = db.Colu... | 29.354331 | 84 | 0.646996 |
4a063b61c06693c64ddb60557fd0d55e8be57e22 | 3,120 | py | Python | harvester/fetcher/cmis_atom_feed_fetcher.py | amywieliczka/harvester | ed21e0167ac5e6e6002fa7c89aa78cc1e93e29d8 | [
"BSD-3-Clause"
] | 5 | 2015-01-14T20:48:28.000Z | 2015-05-13T15:31:12.000Z | harvester/fetcher/cmis_atom_feed_fetcher.py | amywieliczka/harvester | ed21e0167ac5e6e6002fa7c89aa78cc1e93e29d8 | [
"BSD-3-Clause"
] | 87 | 2015-01-09T00:17:44.000Z | 2021-12-13T19:37:44.000Z | harvester/fetcher/cmis_atom_feed_fetcher.py | amywieliczka/harvester | ed21e0167ac5e6e6002fa7c89aa78cc1e93e29d8 | [
"BSD-3-Clause"
] | 4 | 2015-02-26T23:27:44.000Z | 2019-06-11T21:43:17.000Z | # -*- coding: utf-8 -*-
import requests
from requests.auth import HTTPBasicAuth
from xml.etree import ElementTree as ET
from xmljson import badgerfish
from .fetcher import Fetcher
class CMISAtomFeedFetcher(Fetcher):
'''harvest a CMIS Atom Feed. Don't know how generic this is, just working
with Oakland Public ... | 49.52381 | 79 | 0.707692 |
4a063bf10034c89d16ab77e6291a5de96a2693b8 | 2,651 | py | Python | Tools/peg_generator/scripts/benchmark.py | oleksandr-pavlyk/cpython | eb002dbe0da9622245a355db5f0cd5aa2fc70b40 | [
"0BSD"
] | 52,316 | 2015-01-01T15:56:25.000Z | 2022-03-31T23:19:01.000Z | Tools/peg_generator/scripts/benchmark.py | dalakatt/cpython | 2f49b97cc5426087b46515254b9a97a22ee8c807 | [
"0BSD"
] | 25,286 | 2015-03-03T23:18:02.000Z | 2022-03-31T23:17:27.000Z | Tools/peg_generator/scripts/benchmark.py | dalakatt/cpython | 2f49b97cc5426087b46515254b9a97a22ee8c807 | [
"0BSD"
] | 31,623 | 2015-01-01T13:29:37.000Z | 2022-03-31T19:55:06.000Z | #!/usr/bin/env python3
import argparse
import ast
import sys
import os
from time import time
try:
import memory_profiler
except ModuleNotFoundError:
print(
"Please run `make venv` to create a virtual environment and install"
" all the dependencies, before running this script."
)
sys.ex... | 25.009434 | 99 | 0.626179 |
4a063c9d6d772559f0158b344950a4d8e6837df9 | 185,766 | py | Python | Application/WorkflowDeveloper.py | AO-StreetArt/AOWorkflowDeveloper | ac041b46a9cc9c346c46d2c061f9588c21bf9948 | [
"MIT"
] | null | null | null | Application/WorkflowDeveloper.py | AO-StreetArt/AOWorkflowDeveloper | ac041b46a9cc9c346c46d2c061f9588c21bf9948 | [
"MIT"
] | null | null | null | Application/WorkflowDeveloper.py | AO-StreetArt/AOWorkflowDeveloper | ac041b46a9cc9c346c46d2c061f9588c21bf9948 | [
"MIT"
] | null | null | null | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.button import Button
from kivy.uix.textinput imp... | 48.617116 | 204 | 0.575148 |
4a063d6bb40b2b5942ef6f07d12c2f1601e69ea4 | 990 | py | Python | create_pickled_national_bracket.py | dhermes/ncaa-bracket-scenarios | f314581068aceb4e60ad059061313b4afdcd9ca8 | [
"Apache-2.0"
] | 1 | 2016-12-11T18:09:45.000Z | 2016-12-11T18:09:45.000Z | create_pickled_national_bracket.py | dhermes/ncaa-bracket-scenarios | f314581068aceb4e60ad059061313b4afdcd9ca8 | [
"Apache-2.0"
] | null | null | null | create_pickled_national_bracket.py | dhermes/ncaa-bracket-scenarios | f314581068aceb4e60ad059061313b4afdcd9ca8 | [
"Apache-2.0"
] | null | null | null | import os
import pickle
from game_tree_classes import GameSlots
from game_tree_classes import Team
from game_tree_classes import WinnerOf
import utils
def main():
game_slots = GameSlots()
for slot_id in xrange(64):
# NOTE: This relies on the assumption from get_team_mapping.py
# that th... | 30.9375 | 71 | 0.671717 |
4a063e4a6f283f63b8ebf786a89b3cb9ffb7de5d | 23,529 | py | Python | src/azure-cli/azure/cli/command_modules/resource/_params.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | 1 | 2019-10-01T10:29:15.000Z | 2019-10-01T10:29:15.000Z | src/azure-cli/azure/cli/command_modules/resource/_params.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/resource/_params.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 78.43 | 303 | 0.713417 |
4a063e89eee4f827e6f4ac72ffac29117326e281 | 2,106 | py | Python | dusty/payload.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 421 | 2015-06-02T16:29:59.000Z | 2021-06-03T18:44:42.000Z | dusty/payload.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 404 | 2015-06-02T20:23:42.000Z | 2019-08-21T16:59:41.000Z | dusty/payload.py | gamechanger/dusty | dd9778e3a4f0c623209e53e98aa9dc1fe76fc309 | [
"MIT"
] | 16 | 2015-06-16T17:21:02.000Z | 2020-03-27T02:27:09.000Z | import json
import yaml
from .constants import VERSION
class Payload(object):
def __init__(self, fn, *args, **kwargs):
self.fn = fn
self.run_on_daemon = True
self.client_version = VERSION
self.args = args
self.kwargs = kwargs
self.suppress_warnings = False
def ... | 35.1 | 118 | 0.687559 |
4a063ecf8a206bcfe3145a95f5dcff5496d0eede | 6,197 | py | Python | indico/modules/events/models/reviews.py | aiforrural/Digital-Events-Example | 628aaa8727b259b9367ac0ae1c5ba8e9e95eca82 | [
"MIT"
] | 1 | 2021-02-08T09:34:27.000Z | 2021-02-08T09:34:27.000Z | indico/modules/events/models/reviews.py | pamirk/indico | c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768 | [
"MIT"
] | null | null | null | indico/modules/events/models/reviews.py | pamirk/indico | c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from sqlalchemy.ext.hybrid import hybrid_property
from indico.util.caching import memoize_request
from in... | 30.082524 | 84 | 0.679845 |
4a06417f2c7b60b9dc5c886887a30aefb8b754ec | 169 | py | Python | quantipy/core/tools/dp/confirmit/helpers.py | acaide/quantipy3 | 7a466b3d0d4da7e95a2ce7e34e6e55f7a1f85a51 | [
"MIT"
] | null | null | null | quantipy/core/tools/dp/confirmit/helpers.py | acaide/quantipy3 | 7a466b3d0d4da7e95a2ce7e34e6e55f7a1f85a51 | [
"MIT"
] | null | null | null | quantipy/core/tools/dp/confirmit/helpers.py | acaide/quantipy3 | 7a466b3d0d4da7e95a2ce7e34e6e55f7a1f85a51 | [
"MIT"
] | null | null | null | def int_or_float(variable):
numeric_scale = variable.get('scale')
if numeric_scale and numeric_scale != 0:
return 'float'
else:
return 'int'
| 24.142857 | 44 | 0.639053 |
4a06420dd43712ae235d1ef9d6fbd68e88342bd8 | 1,342 | py | Python | pointcnn_cls/scannet_x2_l4.py | vistart/PointCNN | bc27b1239fa70830600807d439a3e4e7b689c0aa | [
"MIT"
] | 1 | 2018-12-09T17:16:02.000Z | 2018-12-09T17:16:02.000Z | pointcnn_cls/scannet_x2_l4.py | vistart/PointCNN | bc27b1239fa70830600807d439a3e4e7b689c0aa | [
"MIT"
] | null | null | null | pointcnn_cls/scannet_x2_l4.py | vistart/PointCNN | bc27b1239fa70830600807d439a3e4e7b689c0aa | [
"MIT"
] | 1 | 2020-04-03T13:49:06.000Z | 2020-04-03T13:49:06.000Z | #!/usr/bin/python3
import os
import sys
import math
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import data_utils
load_fn = data_utils.load_cls_train_val
balance_fn = None
map_fn = None
keep_remainder = True
save_ply_fn = None
num_class = 17
sample_num = 1024
batch_size = 128
num... | 18.901408 | 76 | 0.628912 |
4a064256f14cd7da6d635daad45d57eb33a3418a | 1,210 | py | Python | bindings/python/examples/domain_point.py | mmccarty/legion | 30e00fa6016527c4cf60025a461fb7865f8def6b | [
"Apache-2.0"
] | 555 | 2015-01-19T07:50:27.000Z | 2022-03-22T11:35:48.000Z | bindings/python/examples/domain_point.py | mmccarty/legion | 30e00fa6016527c4cf60025a461fb7865f8def6b | [
"Apache-2.0"
] | 1,157 | 2015-01-07T18:34:23.000Z | 2022-03-31T19:45:27.000Z | bindings/python/examples/domain_point.py | mmccarty/legion | 30e00fa6016527c4cf60025a461fb7865f8def6b | [
"Apache-2.0"
] | 145 | 2015-02-03T02:31:42.000Z | 2022-02-28T12:03:51.000Z | #!/usr/bin/env python3
# Copyright 2021 Stanford University
#
# 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... | 27.5 | 74 | 0.694215 |
4a06429d1f73a3cb154a2f3d118a3f5961e9cb1e | 10,308 | py | Python | bconv.py | emattei/methylCtools | cbbc26d6127f64daeb522ec817232148222b3fa6 | [
"MIT"
] | 1 | 2018-07-17T16:59:46.000Z | 2018-07-17T16:59:46.000Z | bconv.py | emattei/methylCtools | cbbc26d6127f64daeb522ec817232148222b3fa6 | [
"MIT"
] | null | null | null | bconv.py | emattei/methylCtools | cbbc26d6127f64daeb522ec817232148222b3fa6 | [
"MIT"
] | 3 | 2019-02-08T10:55:07.000Z | 2020-09-09T22:23:22.000Z | #!/usr/bin/env python
#######################################
# methylCtools bconv
# v1.0.0
# 10 june 2018
#
# volker hovestadt
# developed at the german cancer research center, 2011-2015
# methylctools@hovestadt.bio
#
#
# reads are converted back to original state. positions are stored in read id.
# if a read (pair) ... | 35.180887 | 191 | 0.606907 |
4a0642e0d9d0c6b5e1f4e2e8c133cfe0b67e21cd | 1,198 | py | Python | code/crawler/crawl_book_content.py | CoolPhilChen/SE305_DBST_Project | 9a7c58695783a5035e1c1c6b83384701ba702673 | [
"MIT"
] | 6 | 2019-04-10T01:19:57.000Z | 2020-02-24T04:37:54.000Z | code/crawler/crawl_book_content.py | CoolPhilChen/SE305_DBST_Project | 9a7c58695783a5035e1c1c6b83384701ba702673 | [
"MIT"
] | null | null | null | code/crawler/crawl_book_content.py | CoolPhilChen/SE305_DBST_Project | 9a7c58695783a5035e1c1c6b83384701ba702673 | [
"MIT"
] | null | null | null | import urllib.request, queue, time
import threading
class ThreadManager():
def __init__(self, thread_num):
self.lock = threading.Lock()
self.to_crawl = queue.Queue()
self.max_count_num = 59000
self.end_flag = False
for i in range(self.max_count_num):
s... | 24.958333 | 110 | 0.496661 |
4a0643cfbcffe2a4d1bd4e43477fd4efbf6fead0 | 2,555 | py | Python | pdm/cli/commands/search.py | nasyxx/pdm | 229e4552c800db0241d9d6e9140256c4bcce2a6d | [
"MIT"
] | null | null | null | pdm/cli/commands/search.py | nasyxx/pdm | 229e4552c800db0241d9d6e9140256c4bcce2a6d | [
"MIT"
] | null | null | null | pdm/cli/commands/search.py | nasyxx/pdm | 229e4552c800db0241d9d6e9140256c4bcce2a6d | [
"MIT"
] | null | null | null | import argparse
import sys
import textwrap
from shutil import get_terminal_size
from typing import Optional
from pip._vendor.pkg_resources import safe_name
from pdm import termui
from pdm._types import SearchResult
from pdm.cli.commands.base import BaseCommand
from pdm.cli.options import verbose_option
from pdm.model... | 32.75641 | 87 | 0.6 |
4a0643d06bae049941018a32c73e9af16e54ff3e | 4,559 | py | Python | samples/2D_mixing_bubble/dim_case.py | henryleberre/MFC-develop | 59e94af2d4304b41c9b52280dfd99a300e2664ec | [
"MIT"
] | 2 | 2022-02-26T16:00:42.000Z | 2022-02-28T23:25:06.000Z | samples/2D_mixing_bubble/dim_case.py | henryleberre/MFC-develop | 59e94af2d4304b41c9b52280dfd99a300e2664ec | [
"MIT"
] | 44 | 2021-12-07T04:36:24.000Z | 2022-03-30T16:29:00.000Z | samples/2D_mixing_bubble/dim_case.py | henryleberre/MFC | 0638f7766ead02a69c386d2acd25af8b85f7d194 | [
"MIT"
] | 2 | 2021-12-07T18:59:08.000Z | 2021-12-07T19:37:14.000Z | #!/usr/bin/env python2
import json
# Configuring case dictionary
print(json.dumps({
# Logistics ================================================
'case_dir' : '\'.\'',
'run_time_info' : 'T',
# ==========================================================
# Computati... | 46.520408 | 80 | 0.395701 |
4a064452a0c1b467e6c8f2c6f9c5585c26ff7224 | 637 | py | Python | test-runner/adapters/rest/generated/e2erestapi/__init__.py | brycewang-microsoft/iot-sdks-e2e-fx | 211c9c2615a82076bda02a27152d67366755edbf | [
"MIT"
] | 12 | 2019-02-02T00:15:13.000Z | 2022-02-08T18:20:08.000Z | test-runner/adapters/rest/generated/e2erestapi/__init__.py | brycewang-microsoft/iot-sdks-e2e-fx | 211c9c2615a82076bda02a27152d67366755edbf | [
"MIT"
] | 36 | 2019-02-14T22:53:17.000Z | 2022-03-22T22:41:38.000Z | test-runner/adapters/rest/generated/e2erestapi/__init__.py | brycewang-microsoft/iot-sdks-e2e-fx | 211c9c2615a82076bda02a27152d67366755edbf | [
"MIT"
] | 12 | 2019-02-19T13:28:25.000Z | 2022-02-08T18:20:55.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 39.8125 | 99 | 0.645212 |
4a0644ee570af0e1d8978a3d4e7f692eee4e59ef | 442 | py | Python | src/evidently/analyzers/stattests/__init__.py | Tapot/evidently | ab9b91425d622566b663565508dd1c43e741f515 | [
"Apache-2.0"
] | null | null | null | src/evidently/analyzers/stattests/__init__.py | Tapot/evidently | ab9b91425d622566b663565508dd1c43e741f515 | [
"Apache-2.0"
] | null | null | null | src/evidently/analyzers/stattests/__init__.py | Tapot/evidently | ab9b91425d622566b663565508dd1c43e741f515 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from .ks_stattest import ks_stat_test
from .z_stattest import z_stat_test
from .chisquare_stattest import chi_stat_test
from .jensenshannon import jensenshannon_stat_test
from .kl_div import kl_div_stat_test
from .psi import psi_stat_test
from .wasserstein_distance_norm import wass... | 40.181818 | 103 | 0.861991 |
4a06456e669b0743e3d9ee55d17880bb85bd0c15 | 15,023 | py | Python | openmdao/solvers/linear/direct.py | cfe316/OpenMDAO | f8881db590d7dc873fb77de2504280c2ed177fbf | [
"Apache-2.0"
] | null | null | null | openmdao/solvers/linear/direct.py | cfe316/OpenMDAO | f8881db590d7dc873fb77de2504280c2ed177fbf | [
"Apache-2.0"
] | 1 | 2022-02-22T21:14:40.000Z | 2022-02-22T21:14:40.000Z | openmdao/solvers/linear/direct.py | tadkollar/OpenMDAO | f8881db590d7dc873fb77de2504280c2ed177fbf | [
"Apache-2.0"
] | null | null | null | """LinearSolver that uses linalg.solve or LU factor/solve."""
import warnings
import numpy as np
import scipy.linalg
import scipy.sparse.linalg
from scipy.sparse import csc_matrix
from openmdao.solvers.solver import LinearSolver
from openmdao.matrices.dense_matrix import DenseMatrix
def index_to_varname(system, lo... | 32.873085 | 100 | 0.562271 |
4a06462527eff991a4802f5949cab5418611cace | 18,320 | py | Python | pyrobolearn/utils/inertia.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | 2 | 2021-01-21T21:08:30.000Z | 2022-03-29T16:45:49.000Z | pyrobolearn/utils/inertia.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | null | null | null | pyrobolearn/utils/inertia.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | 1 | 2020-09-29T21:25:39.000Z | 2020-09-29T21:25:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Provide functions to process inertia matrices and moments of inertia.
References:
- Moment of inertia (Wikipedia): https://en.wikipedia.org/wiki/Moment_of_inertia
- List of moments of inertia (Wikipedia): https://en.wikipedia.org/wiki/List_of_moments_of_inertia
... | 41.076233 | 118 | 0.646834 |
4a06475597035e67196610eaa758f25ea6c0b272 | 1,368 | py | Python | mozbadges/utils/decorators.py | Mozilla-GitHub-Standards/32efa1a1fe75882ab357bdb58d92207732a76c86f080bb0f12b4b3357b38899d | 3b57876dcdf7bf9e8158b69acdb9648a7a401a49 | [
"BSD-3-Clause"
] | 1 | 2017-01-13T03:56:04.000Z | 2017-01-13T03:56:04.000Z | mozbadges/utils/decorators.py | Mozilla-GitHub-Standards/32efa1a1fe75882ab357bdb58d92207732a76c86f080bb0f12b4b3357b38899d | 3b57876dcdf7bf9e8158b69acdb9648a7a401a49 | [
"BSD-3-Clause"
] | 10 | 2019-03-29T04:59:00.000Z | 2022-01-19T14:54:45.000Z | mozbadges/utils/decorators.py | Mozilla-GitHub-Standards/32efa1a1fe75882ab357bdb58d92207732a76c86f080bb0f12b4b3357b38899d | 3b57876dcdf7bf9e8158b69acdb9648a7a401a49 | [
"BSD-3-Clause"
] | 1 | 2019-03-29T04:59:02.000Z | 2019-03-29T04:59:02.000Z | from django.http import HttpResponse
from django.shortcuts import render
def public_attributes (*args, **kwargs):
attributes = dict([(key, kwargs.get(key, key)) for key in (list(args) + kwargs.keys())])
def decorator (cls):
cls.__public__ = attributes
return cls
return decorator
def r... | 25.811321 | 92 | 0.556287 |
4a0647dec473100aacfcdd16d30c71833b0a1de3 | 2,332 | py | Python | datman/yamltools.py | gabiherman/datman | dcbca4981ff7bb1be536d6c62c3b27786cabdef9 | [
"Apache-2.0"
] | null | null | null | datman/yamltools.py | gabiherman/datman | dcbca4981ff7bb1be536d6c62c3b27786cabdef9 | [
"Apache-2.0"
] | null | null | null | datman/yamltools.py | gabiherman/datman | dcbca4981ff7bb1be536d6c62c3b27786cabdef9 | [
"Apache-2.0"
] | null | null | null | """
Some tools for interacting with YAML files.
"""
import yaml
import sys
import collections
def load_yaml(filename):
"""
Attempts to load a YAML file. Complains and exits if it fails.
"""
try:
with open(filename, 'r') as stream:
data = yaml.load(stream)
except:
print("... | 29.518987 | 110 | 0.665952 |
4a064849c1b890f1bc121ae00b4f5f7adc6d8a7b | 32,526 | py | Python | synapse/rest/client/v2_alpha/register.py | arthurthouzeau/synapse | 7e460ec2a566b19bbcda63bc04b1e422127a99b3 | [
"Apache-2.0"
] | 1 | 2021-09-09T08:50:13.000Z | 2021-09-09T08:50:13.000Z | synapse/rest/client/v2_alpha/register.py | martindale/synapse | 0f2629ebc6610971557df5810a9b34d7f07c0077 | [
"Apache-2.0"
] | null | null | null | synapse/rest/client/v2_alpha/register.py | martindale/synapse | 0f2629ebc6610971557df5810a9b34d7f07c0077 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015 - 2016 OpenMarket Ltd
# Copyright 2017 Vector Creations Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LIC... | 39.425455 | 130 | 0.623778 |
4a0648be0dd3b82baa0eb3e6de8398286399f07d | 2,338 | py | Python | rlpyt/experiments/scripts/procgen/pg/launch/launch_procgen_ff_ppo_gpu.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | rlpyt/experiments/scripts/procgen/pg/launch/launch_procgen_ff_ppo_gpu.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | rlpyt/experiments/scripts/procgen/pg/launch/launch_procgen_ff_ppo_gpu.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | import pathlib
from rlpyt.utils.launching.affinity import encode_affinity
from rlpyt.utils.launching.exp_launcher import run_experiments
from rlpyt.utils.launching.variant import make_variants, VariantLevel
affinity_code = encode_affinity(
n_cpu_core=6,
n_gpu=1,
contexts_per_gpu=1,
n_socket=1,
alte... | 33.884058 | 108 | 0.736527 |
4a0648f73f5c3ef42085c6167160b0aca60193b6 | 237 | py | Python | pizzas/io_files/dataclass.py | corderop/hashcode-2022-traning | b62286eee0a477b6548591e4607c7eaacb00e0ec | [
"MIT"
] | null | null | null | pizzas/io_files/dataclass.py | corderop/hashcode-2022-traning | b62286eee0a477b6548591e4607c7eaacb00e0ec | [
"MIT"
] | null | null | null | pizzas/io_files/dataclass.py | corderop/hashcode-2022-traning | b62286eee0a477b6548591e4607c7eaacb00e0ec | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import List
@dataclass
class ProblemData:
max_slices: int
number_of_types: int
types: List[int]
@dataclass
class SolutionData:
number_of_types: int
types: List[int] | 16.928571 | 33 | 0.734177 |
4a0649680caf310d741d016891ad65ae1b7f7e2e | 1,213 | py | Python | yt_dlp/postprocessor/execafterdownload.py | CXwudi/yt-dlp | d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a | [
"Unlicense"
] | null | null | null | yt_dlp/postprocessor/execafterdownload.py | CXwudi/yt-dlp | d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a | [
"Unlicense"
] | null | null | null | yt_dlp/postprocessor/execafterdownload.py | CXwudi/yt-dlp | d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a | [
"Unlicense"
] | null | null | null | from __future__ import unicode_literals
import re
import subprocess
from .common import PostProcessor
from ..compat import compat_shlex_quote
from ..utils import (
encodeArgument,
FORMAT_RE,
PostProcessingError,
)
class ExecAfterDownloadPP(PostProcessor):
def __init__(self, downloader, exec_cmd):
... | 28.880952 | 81 | 0.643034 |
4a0649a982f94c9caa317b3d5c521255d6c47ef2 | 33,231 | py | Python | haystack/document_store/weaviate.py | srevinsaju/haystack | e857233313569c89bb9b12b02e672c2eda452716 | [
"Apache-2.0"
] | 9 | 2020-10-23T14:39:45.000Z | 2021-11-16T10:37:11.000Z | haystack/document_store/weaviate.py | bluepeter/haystack | 0168f043850f02bdfd00bebc36b0b05ae625aae1 | [
"Apache-2.0"
] | 12 | 2020-10-07T08:07:51.000Z | 2020-10-22T14:20:19.000Z | haystack/document_store/weaviate.py | bluepeter/haystack | 0168f043850f02bdfd00bebc36b0b05ae625aae1 | [
"Apache-2.0"
] | 1 | 2021-06-10T13:54:44.000Z | 2021-06-10T13:54:44.000Z | import logging
from typing import Any, Dict, Generator, List, Optional, Union
import numpy as np
from tqdm import tqdm
from haystack import Document
from haystack.document_store.base import BaseDocumentStore
from haystack.utils import get_batches_from_generator
from weaviate import client, auth, AuthClientPassword
fr... | 47.608883 | 147 | 0.598297 |
4a064b6623cb63f3ab3457f7b7c4383912d3bfdb | 4,979 | py | Python | venv/Lib/site-packages/music21/tie.py | alimirzazadeh/wolfGANg | 5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c | [
"MIT"
] | 1 | 2022-01-28T00:03:19.000Z | 2022-01-28T00:03:19.000Z | venv/Lib/site-packages/music21/tie.py | alimirzazadeh/wolfGANg | 5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c | [
"MIT"
] | null | null | null | venv/Lib/site-packages/music21/tie.py | alimirzazadeh/wolfGANg | 5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c | [
"MIT"
] | 1 | 2021-11-23T00:49:26.000Z | 2021-11-23T00:49:26.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Name: tie.py
# Purpose: music21 classes for representing ties (visual and conceptual)
#
# Authors: Michael Scott Cuthbert
# Christopher Ariza
#
# Copyright: Copyright © 2009-2010... | 32.122581 | 97 | 0.572404 |
4a064bb5bad3204ff0c430eb42466cb49537b842 | 2,098 | py | Python | tasks/app/_utils.py | IsmaelJS/test-github-actions | 97223df261e9736c46875f590c9593dbac0d417b | [
"MIT"
] | 1,420 | 2015-11-20T01:25:14.000Z | 2022-03-22T03:51:33.000Z | tasks/app/_utils.py | IsmaelJS/test-github-actions | 97223df261e9736c46875f590c9593dbac0d417b | [
"MIT"
] | 151 | 2016-01-07T09:11:42.000Z | 2020-11-17T08:37:07.000Z | tasks/app/_utils.py | IsmaelJS/test-github-actions | 97223df261e9736c46875f590c9593dbac0d417b | [
"MIT"
] | 389 | 2015-11-23T01:14:31.000Z | 2022-02-07T08:23:11.000Z | # encoding: utf-8
"""
Invoke tasks utilities for apps.
"""
import functools
from invoke import Task as BaseTask
class Task(BaseTask):
"""
A patched Invoke Task adding support for decorated functions.
"""
def __init__(self, *args, **kwargs):
super(Task, self).__init__(*args, **kwargs)
... | 29.971429 | 78 | 0.589609 |
4a064bcb290b611f8091f4d045cb4ab31651cc6f | 1,746 | py | Python | tests/Unit/Elliptic/Systems/Elasticity/Equations.py | nilsvu/spectre | 1455b9a8d7e92db8ad600c66f54795c29c3052ee | [
"MIT"
] | 117 | 2017-04-08T22:52:48.000Z | 2022-03-25T07:23:36.000Z | tests/Unit/Elliptic/Systems/Elasticity/Equations.py | GitHimanshuc/spectre | 4de4033ba36547113293fe4dbdd77591485a4aee | [
"MIT"
] | 3,177 | 2017-04-07T21:10:18.000Z | 2022-03-31T23:55:59.000Z | tests/Unit/Elliptic/Systems/Elasticity/Equations.py | geoffrey4444/spectre | 9350d61830b360e2d5b273fdd176dcc841dbefb0 | [
"MIT"
] | 85 | 2017-04-07T19:36:13.000Z | 2022-03-01T10:21:00.000Z | # Distributed under the MIT License.
# See LICENSE.txt for details.
import numpy as np
def constitutive_relation_2d(strain, bulk_modulus, shear_modulus):
lame_constant = bulk_modulus - 2. / 3. * shear_modulus
return -2. * shear_modulus * lame_constant / (
lame_constant + 2. * shear_modulus
) * np... | 35.632653 | 79 | 0.736541 |
4a064c67dccaeea9b2e3db4748f8772b62ef20e0 | 5,221 | py | Python | Fourier/MellinTransform/Mellin_NegTempStable_European_Price.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | Fourier/MellinTransform/Mellin_NegTempStable_European_Price.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | Fourier/MellinTransform/Mellin_NegTempStable_European_Price.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | 1 | 2022-01-07T15:31:45.000Z | 2022-01-07T15:31:45.000Z | # Generated with SMOP 0.41-beta
try:
from smop.libsmop import *
except ImportError:
raise ImportError('File compiled with `smop3`, please install `smop3` to run it.') from None
# Mellin_NegTempStable_European_Price.m
@function
def Mellin_NegTempStable_European_Price(S_0=None,W=None,T=None,r=None... | 32.228395 | 156 | 0.600843 |
4a064c6c341d973fe8510d6320981bffdb6fd74e | 1,889 | py | Python | setup.py | tsammalex/pytsammalex | 9686ca580617b94f0d6d7ef61a3ad66082a98319 | [
"Apache-2.0"
] | null | null | null | setup.py | tsammalex/pytsammalex | 9686ca580617b94f0d6d7ef61a3ad66082a98319 | [
"Apache-2.0"
] | 2 | 2020-10-06T10:17:13.000Z | 2020-10-12T18:37:52.000Z | setup.py | tsammalex/pytsammalex | 9686ca580617b94f0d6d7ef61a3ad66082a98319 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='pytsammalex',
version='0.1.1.dev0',
author='Robert Forkel',
author_email='forkel@shh.mpg.de',
description='Python library',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
keywords='',
... | 27.779412 | 70 | 0.532028 |
4a064ec7a95fd49534b506249a30dd00e2d90a46 | 5,413 | py | Python | projects/vdk-plugins/vdk-kerberos-auth/src/vdk/plugin/kerberos/kerberos_configuration.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 100 | 2021-10-04T09:32:04.000Z | 2022-03-30T11:23:53.000Z | projects/vdk-plugins/vdk-kerberos-auth/src/vdk/plugin/kerberos/kerberos_configuration.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 208 | 2021-10-04T16:56:40.000Z | 2022-03-31T10:41:44.000Z | projects/vdk-plugins/vdk-kerberos-auth/src/vdk/plugin/kerberos/kerberos_configuration.py | alod83/versatile-data-kit | 9ca672d3929eb3dc6fe5c677e8c8a75e2a0d2be8 | [
"Apache-2.0"
] | 14 | 2021-10-11T14:15:13.000Z | 2022-03-11T13:39:17.000Z | # Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
import logging
import os
from pathlib import Path
from typing import Optional
from vdk.internal.core import errors
from vdk.internal.core.config import Configuration
from vdk.internal.core.config import ConfigurationBuilder
KRB_AUTH = "KRB_AUTH"
KEYT... | 38.664286 | 106 | 0.69056 |
4a064ef6213a0e6fed00e84243492f2567507769 | 5,990 | py | Python | order_food_online_project/notes/views.py | MaksNech/pylab2018_ht_12 | 3578e36570ce99b25136942320fbcd7df956d435 | [
"MIT"
] | null | null | null | order_food_online_project/notes/views.py | MaksNech/pylab2018_ht_12 | 3578e36570ce99b25136942320fbcd7df956d435 | [
"MIT"
] | null | null | null | order_food_online_project/notes/views.py | MaksNech/pylab2018_ht_12 | 3578e36570ce99b25136942320fbcd7df956d435 | [
"MIT"
] | 1 | 2019-03-15T03:36:34.000Z | 2019-03-15T03:36:34.000Z | from .forms import NoteAddForm
from .models import Note, NotedModel
from foods.models import Dish, Order
from decimal import Decimal
from django.shortcuts import render
from django.urls import reverse
from django.http import Http404
from django.http import HttpResponseRedirect
from django.db.models import Q
def note_... | 41.027397 | 113 | 0.590317 |
4a064f435e48ed91d937a95fb6e176bfce48f4bd | 10,812 | py | Python | tests/test_interface_type.py | mirumee/ariadne-graphql-modules | f95a48f428a49aa39d41ec91a2dac647b6869f86 | [
"BSD-3-Clause"
] | null | null | null | tests/test_interface_type.py | mirumee/ariadne-graphql-modules | f95a48f428a49aa39d41ec91a2dac647b6869f86 | [
"BSD-3-Clause"
] | null | null | null | tests/test_interface_type.py | mirumee/ariadne-graphql-modules | f95a48f428a49aa39d41ec91a2dac647b6869f86 | [
"BSD-3-Clause"
] | null | null | null | from dataclasses import dataclass
import pytest
from ariadne import SchemaDirectiveVisitor
from graphql import GraphQLError, graphql_sync
from ariadne_graphql_modules import (
DeferredType,
DirectiveType,
InterfaceType,
ObjectType,
make_executable_schema,
)
def test_interface_type_raises_attribu... | 23.973392 | 88 | 0.583333 |
4a064f82a240c14d4e21054840223ab5478238bc | 9,096 | py | Python | apps/blog/migrations/0001_initial.py | linuxiston/linuxiston | 8e106c206ce3e9b4b80a12ab79d320ad0f4c2970 | [
"MIT"
] | 3 | 2022-03-21T11:56:04.000Z | 2022-03-21T12:13:13.000Z | apps/blog/migrations/0001_initial.py | linuxiston/linuxiston | 8e106c206ce3e9b4b80a12ab79d320ad0f4c2970 | [
"MIT"
] | 1 | 2022-03-24T10:55:31.000Z | 2022-03-24T10:55:31.000Z | apps/blog/migrations/0001_initial.py | linuxiston/linuxiston | 8e106c206ce3e9b4b80a12ab79d320ad0f4c2970 | [
"MIT"
] | 2 | 2022-03-21T11:57:36.000Z | 2022-03-21T12:13:14.000Z | # Generated by Django 4.0.3 on 2022-04-05 11:06
import ckeditor.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER... | 34.717557 | 87 | 0.388303 |
4a0650c4b3130261fdf97dbf46d70b22cb378a66 | 434 | py | Python | telegram_gcloner/utils/callback.py | fasih4444/clonebot | b2750a6d53e1446ed43663543e87a3c32c47a918 | [
"MIT"
] | 18 | 2021-09-12T14:56:26.000Z | 2022-02-19T09:33:36.000Z | telegram_gcloner/utils/callback.py | fasih4444/clonebot | b2750a6d53e1446ed43663543e87a3c32c47a918 | [
"MIT"
] | 1 | 2022-01-29T08:38:43.000Z | 2022-01-29T08:38:43.000Z | telegram_gcloner/utils/callback.py | fasih4444/clonebot | b2750a6d53e1446ed43663543e87a3c32c47a918 | [
"MIT"
] | 60 | 2021-09-11T04:23:21.000Z | 2022-03-30T07:24:57.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import logging
from telegram.ext import CallbackContext
logger = logging.getLogger(__name__)
def callback_delete_message(context: CallbackContext):
(chat_id, message_id) = context.job.context
try:
context.bot.delete_message(chat_id=chat_id, message_id=messa... | 27.125 | 79 | 0.723502 |
4a065100566beba613214f311c84e1093158b0db | 3,241 | py | Python | data/unaligned_data_loader.py | fducau/pytorch-CycleGAN-and-pix2pix | 63761c5d8abea169d8a03a73c0bae99aaf036b6a | [
"BSD-3-Clause"
] | 1 | 2021-02-19T02:40:35.000Z | 2021-02-19T02:40:35.000Z | data/unaligned_data_loader.py | DeepModel/pytorch-CycleGAN-and-pix2pix | 63761c5d8abea169d8a03a73c0bae99aaf036b6a | [
"BSD-3-Clause"
] | null | null | null | data/unaligned_data_loader.py | DeepModel/pytorch-CycleGAN-and-pix2pix | 63761c5d8abea169d8a03a73c0bae99aaf036b6a | [
"BSD-3-Clause"
] | 1 | 2021-02-24T16:37:29.000Z | 2021-02-24T16:37:29.000Z | import torch.utils.data
import torchvision.transforms as transforms
from data.base_data_loader import BaseDataLoader
from data.image_folder import ImageFolder
from builtins import object
from pdb import set_trace as st
class PairedData(object):
def __init__(self, data_loader_A, data_loader_B):
self.data_lo... | 36.829545 | 78 | 0.576057 |
4a0651625baeb8ffb4e3b83c3850128918f40a52 | 53,368 | py | Python | src/sentry/event_manager.py | QuincyMa/sentry | 9b0401de06185a3371f9b51ce8f4732500830f50 | [
"BSD-3-Clause"
] | 1 | 2019-01-18T08:58:11.000Z | 2019-01-18T08:58:11.000Z | src/sentry/event_manager.py | QuincyMa/sentry | 9b0401de06185a3371f9b51ce8f4732500830f50 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/event_manager.py | QuincyMa/sentry | 9b0401de06185a3371f9b51ce8f4732500830f50 | [
"BSD-3-Clause"
] | null | null | null | """
sentry.event_manager
~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import logging
import os
import six
import jsonschema
from datetime import datetime, timedel... | 36.478469 | 123 | 0.576937 |
4a06523a82ef2662393a9f852e4a8b4eed0f4009 | 543 | py | Python | api/migrations/0002_auto_20210130_0636.py | EstherWaweru/JuniorDeveloperTest | 351c3f31a26dde86f650e674b8e7d79bde985e2d | [
"MIT"
] | 1 | 2021-01-31T07:11:25.000Z | 2021-01-31T07:11:25.000Z | api/migrations/0002_auto_20210130_0636.py | EstherWaweru/JuniorDeveloperTest | 351c3f31a26dde86f650e674b8e7d79bde985e2d | [
"MIT"
] | null | null | null | api/migrations/0002_auto_20210130_0636.py | EstherWaweru/JuniorDeveloperTest | 351c3f31a26dde86f650e674b8e7d79bde985e2d | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2021-01-30 06:36
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='customuser',
... | 27.15 | 184 | 0.644567 |
4a06524a4aac72b6fb438617aa59056f279c30f5 | 1,076 | py | Python | blog/models.py | DarkoR12/dafi-system | f923ea4273b04f7acc7016b2f7d03e51eb00b85b | [
"MIT"
] | null | null | null | blog/models.py | DarkoR12/dafi-system | f923ea4273b04f7acc7016b2f7d03e51eb00b85b | [
"MIT"
] | null | null | null | blog/models.py | DarkoR12/dafi-system | f923ea4273b04f7acc7016b2f7d03e51eb00b85b | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.db import models
from django.utils.text import Truncator
from meta.models import ModelMeta
class Post(ModelMeta, models.Model):
'''
Blog Post
'''
title = models.CharField... | 24.454545 | 77 | 0.677509 |
4a0652be69c2180941e765ce70390f702c566832 | 1,982 | py | Python | main.py | k783s4/Crash_Strategy_Tester | 1133a745ec583354c5d64c25ea55a0ba42c403b5 | [
"Apache-2.0"
] | null | null | null | main.py | k783s4/Crash_Strategy_Tester | 1133a745ec583354c5d64c25ea55a0ba42c403b5 | [
"Apache-2.0"
] | null | null | null | main.py | k783s4/Crash_Strategy_Tester | 1133a745ec583354c5d64c25ea55a0ba42c403b5 | [
"Apache-2.0"
] | 1 | 2022-03-24T23:46:46.000Z | 2022-03-24T23:46:46.000Z | def bot(balance, prev_outcome,prev_out_arr, remainder):
flag = False
#Every 3000 set the money aside
if(balance >= 5000):
flag = True
#If we win
if(prev_outcome):
betsize = balance / 200000
return [2.0,betsize, flag]
#If we loose
else:
if((prev_out_arr[1] * 2.... | 27.915493 | 56 | 0.531282 |
4a0652fa37fb240ac38227f0544715072c48cd9c | 2,316 | py | Python | SQL_python/DataBasePython/createTab.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | SQL_python/DataBasePython/createTab.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | SQL_python/DataBasePython/createTab.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | import psycopg2
#from config import config
def create_tables():
commands = (
"""
CREATE TABLE vendeur (
vendeur_id SERIAL PRIMARY KEY,
vendeur_name VARCHAR(255) NOT NULL
)
""",
""" CREATE TABLE parts (
part_id SERIAL PRIMARY KEY... | 24.378947 | 103 | 0.501295 |
4a0653f4683dc94885d53489010129d4d3422fdb | 1,926 | py | Python | deeplearning/ml4pl/graphs/labelled/dataflow/annotators_benchmark_test.py | Zacharias030/ProGraML | cd99d2c5362acd0b24ee224492bb3e8c4d4736fb | [
"Apache-2.0"
] | null | null | null | deeplearning/ml4pl/graphs/labelled/dataflow/annotators_benchmark_test.py | Zacharias030/ProGraML | cd99d2c5362acd0b24ee224492bb3e8c4d4736fb | [
"Apache-2.0"
] | 2 | 2020-07-27T08:22:06.000Z | 2020-07-30T17:34:35.000Z | deeplearning/ml4pl/graphs/labelled/dataflow/annotators_benchmark_test.py | Zacharias030/ProGraML | cd99d2c5362acd0b24ee224492bb3e8c4d4736fb | [
"Apache-2.0"
] | 1 | 2020-06-05T04:58:13.000Z | 2020-06-05T04:58:13.000Z | # Copyright 2019 the ProGraML authors.
#
# Contact Chris Cummins <chrisc.101@gmail.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
#
# ... | 31.064516 | 74 | 0.767913 |
4a06559775871ac1febbe376c98562695c199955 | 2,774 | py | Python | message_handler/rabbit_message_queue.py | jluech/PGAcloud_Fitness_Agent | bde5f0113af99ad1ed324c8b0ad9c5bc85e57245 | [
"MIT"
] | null | null | null | message_handler/rabbit_message_queue.py | jluech/PGAcloud_Fitness_Agent | bde5f0113af99ad1ed324c8b0ad9c5bc85e57245 | [
"MIT"
] | null | null | null | message_handler/rabbit_message_queue.py | jluech/PGAcloud_Fitness_Agent | bde5f0113af99ad1ed324c8b0ad9c5bc85e57245 | [
"MIT"
] | null | null | null | import json
import logging
import pika
from agent.operator import call_operator
from message_handler.message_handler import MessageHandler
from population.individual import Individual, IndividualEncoder
from utilities import utils
def receive_operator_callback(channel, method, properties, body):
queue_name = ut... | 32.255814 | 95 | 0.684932 |
4a06576e638367438062ceea7431db0bc405a08e | 123 | py | Python | demos/19.01.30/10am/problem_2.py | joeparis/CS161-Demos-Winter-19 | 613a93de9169fa4ee62538ff0ac93a9930b75fef | [
"MIT"
] | null | null | null | demos/19.01.30/10am/problem_2.py | joeparis/CS161-Demos-Winter-19 | 613a93de9169fa4ee62538ff0ac93a9930b75fef | [
"MIT"
] | null | null | null | demos/19.01.30/10am/problem_2.py | joeparis/CS161-Demos-Winter-19 | 613a93de9169fa4ee62538ff0ac93a9930b75fef | [
"MIT"
] | null | null | null | user_input = input("Please enter a string: ")
for character in user_input:
print(f"{character} = {ord(character):3}")
| 24.6 | 46 | 0.691057 |
4a065772d7894bfded9c904d6be047159397fa97 | 9,970 | py | Python | pyamg/classical/cr.py | thomasjpfan/pyamg | b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a | [
"MIT"
] | null | null | null | pyamg/classical/cr.py | thomasjpfan/pyamg | b0904d31c8da0c29affcd7d0fcd2bb8cb910b42a | [
"MIT"
] | 1 | 2019-12-06T17:06:29.000Z | 2019-12-06T17:06:29.000Z | pyamg/classical/cr.py | lexeyV/pyamg | cabbb008fa26d4c9d8c24decf06374185864c88b | [
"MIT"
] | null | null | null | """Compatible Relaxation."""
from __future__ import print_function
import numpy as np
import scipy as sp
from scipy.linalg import norm
from scipy.sparse import isspmatrix, spdiags, isspmatrix_csr
from copy import deepcopy
from ..relaxation.relaxation import gauss_seidel, gauss_seidel_indexed
from pyamg import amg_cor... | 28.815029 | 79 | 0.564092 |
4a0657ad65f573d02d23627efee488f6f534414c | 1,953 | py | Python | ngram_counts.py | spyysalo/recover-nonascii-characters | 2aea1f20f90e152e880f8a495b596966bea241fc | [
"MIT"
] | null | null | null | ngram_counts.py | spyysalo/recover-nonascii-characters | 2aea1f20f90e152e880f8a495b596966bea241fc | [
"MIT"
] | null | null | null | ngram_counts.py | spyysalo/recover-nonascii-characters | 2aea1f20f90e152e880f8a495b596966bea241fc | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import re
import gzip
from collections import Counter, defaultdict
from argparse import ArgumentParser
DESCRIPTION = 'Get counts for N-grams with non-ASCII alphabetic characters'
TOKENIZATION_RE = re.compile('([^\W\d_]+|\d+|\s+|.)')
NON_ASCII_ALPHA_RE = re.compile('[^\W\d_a-zA-Z]')... | 25.363636 | 78 | 0.610343 |
4a06586fdf2fed6bc152066dcb41cf5efaeb1cca | 1,548 | py | Python | bb-master/sandbox/lib/python3.5/site-packages/buildbot/scripts/dataspec.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 2 | 2017-07-11T18:56:27.000Z | 2017-07-28T14:01:12.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/scripts/dataspec.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 1 | 2017-07-28T13:53:41.000Z | 2017-07-31T15:30:40.000Z | bb-master/sandbox/lib/python3.5/site-packages/buildbot/scripts/dataspec.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | null | null | null | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | 32.25 | 79 | 0.721576 |
4a0658d084744a4b8901dc1da919021faf447cdb | 1,391 | py | Python | packages/python/plotly/plotly/validators/scattergeo/selected/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 3 | 2020-02-04T21:39:20.000Z | 2020-11-17T19:07:07.000Z | packages/python/plotly/plotly/validators/scattergeo/selected/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | packages/python/plotly/plotly/validators/scattergeo/selected/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 17 | 2019-11-21T14:11:29.000Z | 2019-11-21T15:26:23.000Z | import _plotly_utils.basevalidators
class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="textfont", parent_name="scattergeo.selected", **kwargs
):
super(TextfontValidator, self).__init__(
plotly_name=plotly_name,
pare... | 29.595745 | 81 | 0.575126 |
4a0658e1c3801120cccbc778f5ef5a84e835e094 | 7,123 | py | Python | lib/django-0.96/django/db/transaction.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/lib/django-0.96/django/db/transaction.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/lib/django-0.96/django/db/transaction.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | """
This module implements a transaction manager that can be used to define
transaction handling in a request or view function. It is used by transaction
control middleware and decorators.
The transaction manager can be in managed or in auto state. Auto state means the
system is using a commit-on-save strategy (actual... | 31.941704 | 104 | 0.673452 |
4a06599bf361bbe24d36e0d3616b6f07b9f8303c | 1,224 | py | Python | src/app/celery.py | f213/education-backend | e76151ac1ee8485debf62ed3100717206ed87712 | [
"MIT"
] | 151 | 2020-04-21T09:58:57.000Z | 2021-09-12T09:01:21.000Z | src/app/celery.py | f213/education-backend | e76151ac1ee8485debf62ed3100717206ed87712 | [
"MIT"
] | 163 | 2020-05-29T20:52:00.000Z | 2021-09-11T12:44:56.000Z | src/app/celery.py | f213/education-backend | e76151ac1ee8485debf62ed3100717206ed87712 | [
"MIT"
] | 39 | 2020-04-21T12:28:16.000Z | 2021-09-12T15:33:47.000Z | import os
from celery import Celery
from celery.schedules import crontab
from django.conf import settings
from app.conf.environ import env
__all__ = [
'celery',
]
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')
celery = Celery('app')
celery.conf.update(
broker_url=env('REDISCLOUD_URL'),
... | 29.853659 | 150 | 0.67402 |
4a0659addb5a9d1f42e87985ba34039450b9408f | 4,262 | py | Python | src/main.py | romainbsl/flask-todo | a40e76b685ed132bf76d3a198bef5f8a89ad3bc4 | [
"Apache-2.0"
] | null | null | null | src/main.py | romainbsl/flask-todo | a40e76b685ed132bf76d3a198bef5f8a89ad3bc4 | [
"Apache-2.0"
] | null | null | null | src/main.py | romainbsl/flask-todo | a40e76b685ed132bf76d3a198bef5f8a89ad3bc4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import json
import flask
import psycopg2
from flask import jsonify, Response
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from qovery_client.qovery import Qovery
# --- START INIT ---
app = flask.Flask(__name__)
# this file is not used while deployed on Qovery
configuration_file_... | 29.393103 | 143 | 0.572736 |
4a0659e5a759cffacb92ff19de26dd3c8e90b10b | 6,627 | py | Python | main.py | ricosega/ci-cd-serverless-example-cloudbuild-and-gcp | 262f3e4b5a97281d10a3f4d545c5fa7103a1e15a | [
"MIT"
] | null | null | null | main.py | ricosega/ci-cd-serverless-example-cloudbuild-and-gcp | 262f3e4b5a97281d10a3f4d545c5fa7103a1e15a | [
"MIT"
] | null | null | null | main.py | ricosega/ci-cd-serverless-example-cloudbuild-and-gcp | 262f3e4b5a97281d10a3f4d545c5fa7103a1e15a | [
"MIT"
] | null | null | null | # Copyright 2018 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 agreed to in writing, s... | 33.301508 | 78 | 0.681756 |
4a065a35f4902cd9eb7cc42d3f1d6a5149322a6f | 555 | py | Python | manage.py | intellisyscorp/django-project-template | 320bb34ef31aee00af6a8c7793825c406c214ffd | [
"Apache-2.0"
] | null | null | null | manage.py | intellisyscorp/django-project-template | 320bb34ef31aee00af6a8c7793825c406c214ffd | [
"Apache-2.0"
] | 7 | 2019-07-22T04:46:03.000Z | 2019-07-27T07:22:52.000Z | manage.py | intellisyscorp/django-project-template | 320bb34ef31aee00af6a8c7793825c406c214ffd | [
"Apache-2.0"
] | 1 | 2019-07-22T04:49:39.000Z | 2019-07-22T04:49:39.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings.base')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't imp... | 34.6875 | 87 | 0.682883 |
4a065a62d5025239c6168b4804bca762ccf97103 | 9,106 | py | Python | src/gluonnlp/data/question_answering.py | StrayBird-ATSH/gluon-nlp | 5dc6b9c9fab9e99b155554a50466c514b879ea84 | [
"Apache-2.0"
] | null | null | null | src/gluonnlp/data/question_answering.py | StrayBird-ATSH/gluon-nlp | 5dc6b9c9fab9e99b155554a50466c514b879ea84 | [
"Apache-2.0"
] | 1 | 2019-09-30T21:40:33.000Z | 2019-09-30T21:40:33.000Z | src/gluonnlp/data/question_answering.py | StrayBird-ATSH/gluon-nlp | 5dc6b9c9fab9e99b155554a50466c514b879ea84 | [
"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... | 40.292035 | 100 | 0.578849 |
4a065a8280ed4643d348f95fd8b9d957d1484af3 | 1,318 | py | Python | hard-gists/77a1a4d5506258f3dc1f/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/77a1a4d5506258f3dc1f/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/77a1a4d5506258f3dc1f/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | #! /usr/bin/python
# Copyright (c) 2015, Rethink Robotics, Inc.
# Using this CvBridge Tutorial for converting
# ROS images to OpenCV2 images
# http://wiki.ros.org/cv_bridge/Tutorials/ConvertingBetweenROSImagesAndOpenCVImagesPython
# Using this OpenCV2 tutorial for saving Images:
# http://opencv-python-tutroals.readth... | 29.954545 | 116 | 0.73217 |
4a065ac3540ad2f19fe2d47acc3ea6321945bed6 | 458 | py | Python | corpora_creation/noxfile.py | sofignatova/02books | 9eed066fee5503c88359958708dfb8eba56e465a | [
"MIT"
] | 38 | 2020-12-22T01:15:38.000Z | 2021-11-09T11:01:40.000Z | corpora_creation/noxfile.py | sofignatova/02books | 9eed066fee5503c88359958708dfb8eba56e465a | [
"MIT"
] | 1 | 2020-12-21T19:11:11.000Z | 2020-12-21T19:11:11.000Z | server/noxfile.py | sofignatova/02books | 9eed066fee5503c88359958708dfb8eba56e465a | [
"MIT"
] | 3 | 2020-12-22T04:17:50.000Z | 2020-12-22T09:03:37.000Z | """Nox config for running lint and unit tests."""
import nox
@nox.session
def lint(session):
session.install("black")
session.run(
"black",
"--check",
".",
)
@nox.session
def unit(session):
session.install("-r", "requirements-test.txt")
session.run("py.test", "--quiet", ... | 17.615385 | 55 | 0.606987 |
4a065ba5d727ca80b397b6291531d490a27091c7 | 10,113 | py | Python | nova/pci/stats.py | bopopescu/nova-17 | 2724155f4ac64aa0ef7dc25c1bf38d3c41f95b7b | [
"Apache-2.0"
] | 4 | 2015-04-13T14:52:41.000Z | 2018-02-03T19:32:13.000Z | nova/pci/stats.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | nova/pci/stats.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 2 | 2016-06-13T09:26:10.000Z | 2020-07-24T01:23:26.000Z | # Copyright (c) 2013 Intel, Inc.
# Copyright (c) 2013 OpenStack Foundation
# 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/li... | 40.290837 | 78 | 0.614061 |
4a065bf785d2324ae78b8ef7edfff6abd1c120d3 | 9,351 | py | Python | parlai/agents/ir_baseline/ir_baseline.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 2 | 2017-09-20T21:49:51.000Z | 2018-08-12T06:58:10.000Z | parlai/agents/ir_baseline/ir_baseline.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 7 | 2021-01-12T01:07:03.000Z | 2022-03-12T00:50:45.000Z | parlai/agents/ir_baseline/ir_baseline.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 1 | 2021-01-07T11:45:03.000Z | 2021-01-07T11:45:03.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.
"""
Simple IR baselines.
We plan to implement the following variants:
Given an input message, either:
(i) find the most ... | 26.87069 | 83 | 0.566357 |
4a065cfcfeaddb60c8b5b107f73c69eda2fb650e | 9,968 | py | Python | users.py | Jon-LaFlamme/cribbage | a74adeb4d3ebda0ec36d6612eab4faa9a160c0fd | [
"MIT"
] | null | null | null | users.py | Jon-LaFlamme/cribbage | a74adeb4d3ebda0ec36d6612eab4faa9a160c0fd | [
"MIT"
] | null | null | null | users.py | Jon-LaFlamme/cribbage | a74adeb4d3ebda0ec36d6612eab4faa9a160c0fd | [
"MIT"
] | null | null | null | #TODO(Jon) This module will require online components for production, but will be locally implemented in this package
import os
import json
MATCH_TEMPLATE = {'win': 0, 'was_skunked': 0, 'was_dbl_skunked': 0, 'skunked_opponent': 0, 'dbl_skunked_opponent': 0}
DIFFICULTY_MAP = {'beginner': 1, 'intermediate': 2, 'expert':... | 45.935484 | 139 | 0.547251 |
4a065cfd680c545b5f2bbb15a94d396634d98162 | 798 | py | Python | Projects/Online Workouts/w3resource/Basic - Part-I/program-49.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | 1 | 2019-09-23T15:51:45.000Z | 2019-09-23T15:51:45.000Z | Projects/Online Workouts/w3resource/Basic - Part-I/program-49.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | 5 | 2021-02-08T20:47:19.000Z | 2022-03-12T00:35:44.000Z | Projects/Online Workouts/w3resource/Basic - Part-I/program-49.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
###################################################################################
# #
# Program purpose: List all files in a directory. #
# Program Author : Happi Yvan <ivens... | 46.941176 | 83 | 0.295739 |
4a065d74c45dc34c155525d4dc16548d9ebf08f9 | 2,102 | py | Python | src/cli/scanner.py | my-tradingbot/scanner | ed932ed593aebe00022a6de213589b77ccff114d | [
"MIT"
] | null | null | null | src/cli/scanner.py | my-tradingbot/scanner | ed932ed593aebe00022a6de213589b77ccff114d | [
"MIT"
] | null | null | null | src/cli/scanner.py | my-tradingbot/scanner | ed932ed593aebe00022a6de213589b77ccff114d | [
"MIT"
] | null | null | null | import argparse
import os
import alpaca_trade_api as tradeapi
from common import BaseClient
"""
Create a new login session by setting environmental variables or using the login command
$ export ALPACAURL="https://paper-api.alpaca.markets"
$ export ALPACATOKENID="token-id"
$ export ALPACATOKENSECRET="t... | 28.026667 | 115 | 0.641294 |
4a065dbdb8f95936dc62a9d6987b3b1c7bf05d9e | 1,338 | py | Python | python_sources/slave_node/slave.py | BPChain/private-multichain | e81354996f220b27a34523db9f584f6864cac548 | [
"MIT"
] | 5 | 2018-01-31T12:20:24.000Z | 2021-08-15T16:30:55.000Z | python_sources/slave_node/slave.py | BPChain/private-multichain | e81354996f220b27a34523db9f584f6864cac548 | [
"MIT"
] | 1 | 2021-06-01T22:10:17.000Z | 2021-06-01T22:10:17.000Z | python_sources/slave_node/slave.py | BPChain/private-multichain | e81354996f220b27a34523db9f584f6864cac548 | [
"MIT"
] | null | null | null | """I send my multichain username and password and my ip to a master node so he can control my local
multichan instance """
import http.client
import json
import socket
from time import sleep
from ..data_acquisition.multichain_connector import read_user_and_password, read_rpc_port
from ..project_logger import set_up_l... | 30.409091 | 99 | 0.62855 |
4a065de662134cf8329c5fb7c6ad3ce5cb71dc1d | 37,275 | py | Python | tests/test_imapclient.py | BoniLindsley/imapclient | 8ececac1c7aa4d7eb5c8846c88e8c41ce08c6340 | [
"BSD-3-Clause"
] | null | null | null | tests/test_imapclient.py | BoniLindsley/imapclient | 8ececac1c7aa4d7eb5c8846c88e8c41ce08c6340 | [
"BSD-3-Clause"
] | null | null | null | tests/test_imapclient.py | BoniLindsley/imapclient | 8ececac1c7aa4d7eb5c8846c88e8c41ce08c6340 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2014, Menno Smits
# Released subject to the New BSD License
# Please see http://en.wikipedia.org/wiki/BSD_licenses
from __future__ import unicode_literals
import itertools
import socket
import sys
from datetime import datetime
import logging
import six
from select import POLLIN
from imapclient.excep... | 35.231569 | 116 | 0.58165 |
4a065e37123df798dc66dd5b88076eb1311db7e8 | 4,809 | py | Python | .idea/VirtualEnvironment/Lib/site-packages/hstest/stage/stage_test.py | Vladpetr/NewsPortal | cd4127fbc09d9c8f5e65c8ae699856c6d380a320 | [
"Apache-2.0"
] | null | null | null | .idea/VirtualEnvironment/Lib/site-packages/hstest/stage/stage_test.py | Vladpetr/NewsPortal | cd4127fbc09d9c8f5e65c8ae699856c6d380a320 | [
"Apache-2.0"
] | null | null | null | .idea/VirtualEnvironment/Lib/site-packages/hstest/stage/stage_test.py | Vladpetr/NewsPortal | cd4127fbc09d9c8f5e65c8ae699856c6d380a320 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, List, Optional, Tuple, Type
from hstest.common.reflection_utils import is_tests, setup_cwd
from hstest.common.utils import failed, passed
from hstest.dynamic.input.dynamic_testing import DynamicTestElement, search_dynamic_tests
from hstest.dynamic.output.colored_output import RED_BOLD, RE... | 33.866197 | 93 | 0.613433 |
4a065e42179a0d85c6deb5a59c4068c72778921a | 10,149 | py | Python | bindings/python/cntk/layers/higher_order_layers.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 17,702 | 2016-01-25T14:03:01.000Z | 2019-05-06T09:23:41.000Z | bindings/python/cntk/layers/higher_order_layers.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 3,489 | 2016-01-25T13:32:09.000Z | 2019-05-03T11:29:15.000Z | bindings/python/cntk/layers/higher_order_layers.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 5,180 | 2016-01-25T14:02:12.000Z | 2019-05-06T04:24:28.000Z | # ==============================================================================
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
''... | 43.935065 | 173 | 0.613755 |
4a065e7d7b4506661c1a7ed161272b9eb71b9352 | 2,811 | py | Python | images/images/GUI_PyOneDark/gui/widgets/py_toggle/py_toggle.py | ussnllmn/Elasticsearch-Python-GUI | 6e1efb73ee566cb75b3372bd69348d98665d53c7 | [
"MIT"
] | 1 | 2021-11-29T11:01:46.000Z | 2021-11-29T11:01:46.000Z | images/images/GUI_PyOneDark/gui/widgets/py_toggle/py_toggle.py | ussnllmn/Elasticsearch-GUI-Pyside6 | 6e1efb73ee566cb75b3372bd69348d98665d53c7 | [
"MIT"
] | null | null | null | images/images/GUI_PyOneDark/gui/widgets/py_toggle/py_toggle.py | ussnllmn/Elasticsearch-GUI-Pyside6 | 6e1efb73ee566cb75b3372bd69348d98665d53c7 | [
"MIT"
] | null | null | null | # ///////////////////////////////////////////////////////////////
#
# BY: WANDERSON M.PIMENTA
# PROJECT MADE WITH: Qt Designer and PySide6
# V: 1.0.0
#
# This project can be used freely for all uses, as long as they maintain the
# respective credits only in the Python scripts, any information in the visual
# interface ... | 31.233333 | 78 | 0.57524 |
4a065eb40bf079f171d6ab2d4582e5b9a64a45e5 | 6,330 | py | Python | plum_tools/utils/sshconf.py | seekplum/plum_tools | 1f5404a3afa42a987fbf7799f198f8c3de6b5cc5 | [
"Apache-2.0"
] | null | null | null | plum_tools/utils/sshconf.py | seekplum/plum_tools | 1f5404a3afa42a987fbf7799f198f8c3de6b5cc5 | [
"Apache-2.0"
] | 1 | 2020-03-31T02:26:37.000Z | 2020-03-31T02:26:37.000Z | plum_tools/utils/sshconf.py | seekplum/plum_tools | 1f5404a3afa42a987fbf7799f198f8c3de6b5cc5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
#=============================================================================
# ProjectName: plum_tools
# FileName: sshconf
# Desc: 解析ssh配置函数
# Author: seekplum
# Email: 1131909224m@sina.cn
# HomePage: seekplum.github.io
# Create: 2018-07-07 17:45
#=====... | 25.62753 | 88 | 0.563507 |
4a066064b15cb8b4506492a8bdd07f8e152bc911 | 3,092 | py | Python | tests/python/bench_reverse.py | Erotemic/misc | 6f8460a690d05e7e0117becc6cae9902cbe2cedd | [
"Apache-2.0"
] | 5 | 2021-04-29T21:07:18.000Z | 2021-09-29T08:46:08.000Z | tests/python/bench_reverse.py | Erotemic/misc | 6f8460a690d05e7e0117becc6cae9902cbe2cedd | [
"Apache-2.0"
] | null | null | null | tests/python/bench_reverse.py | Erotemic/misc | 6f8460a690d05e7e0117becc6cae9902cbe2cedd | [
"Apache-2.0"
] | 1 | 2018-04-07T12:26:21.000Z | 2018-04-07T12:26:21.000Z |
def benchmark_reversed_range():
import ubelt as ub
import pandas as pd
import timerit
import itertools as it
methods = []
def custom_reversed_range_v1(start, stop):
final = stop - 1
for idx in range(stop - start):
yield final - idx
def custom_reversed_range_v... | 29.447619 | 80 | 0.571475 |
4a06610b20f68064d22bef086f27d4a6836995f1 | 108 | py | Python | modules/2.79/bpy/types/OutflowFluidSettings.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/OutflowFluidSettings.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/OutflowFluidSettings.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | class OutflowFluidSettings:
use = None
use_animated_mesh = None
volume_initialization = None
| 13.5 | 32 | 0.722222 |
4a0661d4849cd203409e852e7823db4571835c77 | 4,654 | py | Python | gobbli/model/mtdnn/src/mt_dnn/gobbli_batcher.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 276 | 2019-09-13T08:25:51.000Z | 2022-03-05T13:07:55.000Z | gobbli/model/mtdnn/src/mt_dnn/gobbli_batcher.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 15 | 2019-09-06T14:05:30.000Z | 2022-01-01T20:15:06.000Z | gobbli/model/mtdnn/src/mt_dnn/gobbli_batcher.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 24 | 2019-09-18T15:11:42.000Z | 2021-12-23T18:59:55.000Z | # coding=utf-8
# Copyright (c) Microsoft. All rights reserved.
import csv
import json
import logging
import os
import pickle as pkl
import random
import string
import sys
from shutil import copyfile
import numpy as np
import torch
from pytorch_pretrained_bert.tokenization import BertTokenizer
UNK_ID=100
BOS_ID=101
... | 33.970803 | 104 | 0.597765 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.