hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8a38bc74368caa4dd4518acaedb8ddd7fd007b48 | 329 | py | Python | textworld/gym/spaces/tests/test_spaces.py | JohnnySun8/TextWorld | 9a54e9d642f7605a0f3ebba3285cdd04047975e2 | [
"MIT"
] | 307 | 2019-05-07T01:51:55.000Z | 2022-03-31T19:35:47.000Z | textworld/gym/spaces/tests/test_spaces.py | JohnnySun8/TextWorld | 9a54e9d642f7605a0f3ebba3285cdd04047975e2 | [
"MIT"
] | 84 | 2019-05-08T14:24:36.000Z | 2022-03-31T14:35:16.000Z | textworld/gym/spaces/tests/test_spaces.py | JohnnySun8/TextWorld | 9a54e9d642f7605a0f3ebba3285cdd04047975e2 | [
"MIT"
] | 70 | 2019-05-21T21:36:56.000Z | 2022-02-28T12:04:27.000Z | from textworld.gym.spaces.text_spaces import Word
def test_word_space():
vocab = ["word1", "word2", "word3"]
space = Word(max_length=5, vocab=vocab)
out = space.tokenize("This is word2!")
expected = [space.BOS_id, space.UNK_id, space.UNK_id, space.w2id["word2"], space.EOS_id]
assert list(out) == ... | 29.909091 | 92 | 0.683891 |
746921de2e572bfa92a143f858d22c4103a1e7a9 | 357 | py | Python | tests/test_basic.py | benhoyle/skeleton_proj | b1961ffbe3bb688984161281567a28abbd6b66a0 | [
"MIT"
] | null | null | null | tests/test_basic.py | benhoyle/skeleton_proj | b1961ffbe3bb688984161281567a28abbd6b66a0 | [
"MIT"
] | null | null | null | tests/test_basic.py | benhoyle/skeleton_proj | b1961ffbe3bb688984161281567a28abbd6b66a0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .context import skeleton
# Import other stuff here
import unittest
class BasicTestSuite(unittest.TestCase):
"""Basic test cases."""
def setUp(self):
"""Pre-test activities."""
pass
def test_X(self):
""" Add tests here. """
pass
if __name... | 17.85 | 40 | 0.588235 |
8c03eacd193caa8571751839398939ecdfa82acd | 6,497 | py | Python | osf/models/validators.py | chennan47/osf.io | 270608592b39a94941a3e329c0dc16d295a82472 | [
"Apache-2.0"
] | null | null | null | osf/models/validators.py | chennan47/osf.io | 270608592b39a94941a3e329c0dc16d295a82472 | [
"Apache-2.0"
] | null | null | null | osf/models/validators.py | chennan47/osf.io | 270608592b39a94941a3e329c0dc16d295a82472 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import re
from django.core.validators import URLValidator, validate_email as django_validate_email
from django.core.exceptions import ValidationError as DjangoValidationError
from django.utils.deconstruct import deconstructible
from website.notifications.constants import NOTIFICATION_TYPES
fro... | 35.118919 | 113 | 0.680006 |
38770e3827460fc4610d876626f6ecf5daea1a3f | 2,879 | py | Python | models/ext_layers/test_ps.py | ardihikaru/hfsoftmax | 55966f3a902c16df9b1ca93a77c5cd43efd47fd9 | [
"MIT"
] | 1 | 2018-10-11T09:27:53.000Z | 2018-10-11T09:27:53.000Z | models/ext_layers/test_ps.py | dapengchen123/hfsoftmax | 467bd90814abdf3e5ad8384e6e05749172b68ae6 | [
"MIT"
] | null | null | null | models/ext_layers/test_ps.py | dapengchen123/hfsoftmax | 467bd90814abdf3e5ad8384e6e05749172b68ae6 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
from paramclient import ParameterClient
def test_sgd(bs, cls, fdim, midw, lr, weight_decay, momentum):
assert cls >= bs
assert lr > 0
assert weight_decay >= 0
assert momentum >= 0
assert all([isinstance(x, int) for x in [bs, cls, fdim]])
... | 38.905405 | 109 | 0.578673 |
db8e5c456af99b4a32749da58b31122b191c7784 | 4,066 | py | Python | pirates/effects/TorchFire.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/effects/TorchFire.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/effects/TorchFire.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.actor import Actor
from direct.particles import ParticleEffect
from direct.particles import Particles
from direct.particles import ForceGroup
from EffectController import EffectController
from pirates.piratesgui.GameOptions impor... | 47.835294 | 181 | 0.699705 |
9a2d449d18ff80fde4fc58619d988002164558f9 | 1,134 | py | Python | setup.py | commandtab/ariadne | c154b8ed3026e500d1c8dd8d792fa728ce17f6b4 | [
"BSD-3-Clause"
] | null | null | null | setup.py | commandtab/ariadne | c154b8ed3026e500d1c8dd8d792fa728ce17f6b4 | [
"BSD-3-Clause"
] | null | null | null | setup.py | commandtab/ariadne | c154b8ed3026e500d1c8dd8d792fa728ce17f6b4 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
import os
from setuptools import setup
CLASSIFIERS = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python ::... | 29.076923 | 83 | 0.650794 |
4af57202acc8186956d052e0434d5532bf0358cc | 3,558 | py | Python | graphql_ws/aiohttp.py | elancapital/graphql-ws | 06e7c65792d5047682053da9b46406cec7a6cd99 | [
"MIT"
] | 1 | 2019-01-04T06:21:38.000Z | 2019-01-04T06:21:38.000Z | graphql_ws/aiohttp.py | clemfromspace/graphql-ws | b4c1e45feacc913c734db44930aa79aa2770fc77 | [
"MIT"
] | null | null | null | graphql_ws/aiohttp.py | clemfromspace/graphql-ws | b4c1e45feacc913c734db44930aa79aa2770fc77 | [
"MIT"
] | null | null | null | from inspect import isawaitable, isasyncgen
from asyncio import ensure_future
from aiohttp import WSMsgType
from graphql.execution.executors.asyncio import AsyncioExecutor
from .base import ConnectionClosedException, BaseConnectionContext, BaseSubscriptionServer
from .observable_aiter import setup_observable_extensio... | 35.58 | 90 | 0.689432 |
b620782377c6a9c4eeb526226fbf24421dd8ce9f | 1,793 | py | Python | tensorflow_datasets/scripts/build_docs_test.py | atksh/datasets | 814058b31ebd99e418114016d60ab4d6f8f82070 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/scripts/build_docs_test.py | atksh/datasets | 814058b31ebd99e418114016d60ab4d6f8f82070 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/scripts/build_docs_test.py | atksh/datasets | 814058b31ebd99e418114016d60ab4d6f8f82070 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 30.389831 | 74 | 0.710541 |
497f38b98544561146ef5cfc448b66a72cbc8cf2 | 415 | py | Python | reservation_service/wsgi.py | LukaKon/reservation_service | 33dceab9ddce0678dacf1c126ee01e0d7fd12b64 | [
"MIT"
] | null | null | null | reservation_service/wsgi.py | LukaKon/reservation_service | 33dceab9ddce0678dacf1c126ee01e0d7fd12b64 | [
"MIT"
] | null | null | null | reservation_service/wsgi.py | LukaKon/reservation_service | 33dceab9ddce0678dacf1c126ee01e0d7fd12b64 | [
"MIT"
] | null | null | null | """
WSGI config for reservation_service project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('... | 24.411765 | 79 | 0.79759 |
aa68a4b963160d89f144bcea88e59a7a2f0c9105 | 3,785 | py | Python | logger_setup.py | oliverwatts/dctts_osw | 46042a80d045b6fd6403601e9e8fb447d304b6b3 | [
"Apache-2.0"
] | 45 | 2019-11-14T17:37:47.000Z | 2021-09-07T03:08:25.000Z | logger_setup.py | oliverwatts/dctts_osw | 46042a80d045b6fd6403601e9e8fb447d304b6b3 | [
"Apache-2.0"
] | 6 | 2020-09-25T12:05:45.000Z | 2022-02-09T23:30:08.000Z | logger_setup.py | oliverwatts/dctts_osw | 46042a80d045b6fd6403601e9e8fb447d304b6b3 | [
"Apache-2.0"
] | 10 | 2019-12-10T08:01:10.000Z | 2021-02-09T11:10:19.000Z | import logging
import os
import sys
import subprocess
import socket
import numpy
import tensorflow
from libutil import safe_makedir
def logger_setup(logdir):
safe_makedir(logdir)
## Get new unique named logfile for each run:
i = 1
while True:
logfile = os.path.join(logdir, 'log_{:06d}.txt'.fo... | 38.232323 | 129 | 0.635931 |
4cea59c3e6cc17a2daa0b1f4a128adbf06943e94 | 859 | py | Python | Honey Production/script.py | diffrxction/ML-Model | f6a4caee85505aa09f63e3205312e518daa4b74a | [
"Apache-2.0"
] | null | null | null | Honey Production/script.py | diffrxction/ML-Model | f6a4caee85505aa09f63e3205312e518daa4b74a | [
"Apache-2.0"
] | null | null | null | Honey Production/script.py | diffrxction/ML-Model | f6a4caee85505aa09f63e3205312e518daa4b74a | [
"Apache-2.0"
] | null | null | null | import codecademylib3_seaborn
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn import linear_model
df = pd.read_csv("https://content.codecademy.com/programs/data-science-path/linear_regression/honeyproduction.csv")
#1
print(df.head())
#2
prod_per_year = df.groupby('year').totalprod... | 15.618182 | 115 | 0.743888 |
d435307fb7e6fe7161d6d680690a18d1e1b777c2 | 1,365 | py | Python | qcfractal/dashboard/index.py | radical-cybertools/QCFractal | 676997ef4bc267ae9adfe0064843c42a5701dcf4 | [
"BSD-3-Clause"
] | null | null | null | qcfractal/dashboard/index.py | radical-cybertools/QCFractal | 676997ef4bc267ae9adfe0064843c42a5701dcf4 | [
"BSD-3-Clause"
] | null | null | null | qcfractal/dashboard/index.py | radical-cybertools/QCFractal | 676997ef4bc267ae9adfe0064843c42a5701dcf4 | [
"BSD-3-Clause"
] | null | null | null | import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from . import dash_managers, dash_queue, dash_service
from .app import app
from .navbar import navbar
body = dbc.Container(
[
dbc.Row([
dbc... | 27.857143 | 91 | 0.541392 |
e4b68c2df65d006e7ee73c1d14467bc912c63e4a | 1,242 | py | Python | var/spack/repos/builtin/packages/libcircle/package.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-10T13:47:48.000Z | 2019-04-17T13:05:17.000Z | var/spack/repos/builtin/packages/libcircle/package.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 17 | 2019-03-21T15:54:00.000Z | 2022-03-29T19:34:28.000Z | var/spack/repos/builtin/packages/libcircle/package.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-04-06T09:04:11.000Z | 2020-01-24T12:52:12.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libcircle(AutotoolsPackage):
"""libcircle provides an efficient distributed queue on a clu... | 40.064516 | 186 | 0.699678 |
30228fb467ae21ec063addeeeb2bf978a2e6a368 | 770 | py | Python | setup.py | ShivamSRS/s-vae-pytorch | a7004a1ab9b3f037caeca7d5be242d0768aebc71 | [
"MIT"
] | 294 | 2018-07-29T10:50:01.000Z | 2022-03-28T09:30:02.000Z | setup.py | ShivamSRS/s-vae-pytorch | a7004a1ab9b3f037caeca7d5be242d0768aebc71 | [
"MIT"
] | 12 | 2018-08-04T09:32:22.000Z | 2020-05-26T13:40:39.000Z | setup.py | Chenxingyu1990/gzsl_svae | adc4f4d9905ea65477cf35e89b9822a9b96b8f14 | [
"MIT"
] | 48 | 2018-09-28T16:02:12.000Z | 2022-03-04T02:54:56.000Z |
import os
from setuptools import setup
from setuptools import find_packages
setup(
name='hyperspherical_vae',
version='0.1.1',
author='Nicola De Cao, Tim R. Davidson, Luca Falorsi',
author_email='nicola.decao@gmail.com',
description='Pytorch implementation of Hyperspherical Variational Auto-Encode... | 38.5 | 119 | 0.723377 |
0e7a17ce823e163f3ad407ea6a0b7930f5c923bf | 5,749 | py | Python | pcdet/utils/common_utils.py | neolixcn/OpenPCDet | 32bae37db13711a4fb35ad2980068470bb6cee1c | [
"Apache-2.0"
] | null | null | null | pcdet/utils/common_utils.py | neolixcn/OpenPCDet | 32bae37db13711a4fb35ad2980068470bb6cee1c | [
"Apache-2.0"
] | null | null | null | pcdet/utils/common_utils.py | neolixcn/OpenPCDet | 32bae37db13711a4fb35ad2980068470bb6cee1c | [
"Apache-2.0"
] | null | null | null | import logging
import os
import pickle
import random
import shutil
import subprocess
import numpy as np
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
def check_numpy_to_torch(x):
if isinstance(x, np.ndarray):
return torch.from_numpy(x).float(), True
return x, False
... | 29.482051 | 97 | 0.662376 |
9f233eec0b42d044f017ccdd2b71aad048bbdeee | 3,587 | bzl | Python | java/private/suite.bzl | TamsilAmani/selenium | 65b7a240185e1de4bc7693c69cd60cca11c3903a | [
"Apache-2.0"
] | 25,151 | 2015-01-01T15:40:17.000Z | 2022-03-31T18:44:03.000Z | java/private/suite.bzl | TamsilAmani/selenium | 65b7a240185e1de4bc7693c69cd60cca11c3903a | [
"Apache-2.0"
] | 9,885 | 2015-01-03T17:53:00.000Z | 2022-03-31T21:48:12.000Z | java/private/suite.bzl | TamsilAmani/selenium | 65b7a240185e1de4bc7693c69cd60cca11c3903a | [
"Apache-2.0"
] | 8,441 | 2015-01-05T09:36:44.000Z | 2022-03-31T19:58:06.000Z | load(":library.bzl", "java_library", "java_test")
load(":selenium_test.bzl", "BROWSERS", "selenium_test")
load(":package.bzl", "package_name")
_test_attrs = [
"browsers",
"deploy_manifest_lines",
"flaky",
"jvm_flags",
"launcher",
"main_class",
"shard_count",
"size",
"test_class",
... | 23.444444 | 78 | 0.534151 |
4338a666cff1d4aee08ecfceb9e8afba03dfe3b5 | 7,993 | py | Python | module/engine/TfidfEngine.py | Andrzej111/text_search | a24a3dd09b8af43d9706d43e702674cca099ca21 | [
"MIT"
] | null | null | null | module/engine/TfidfEngine.py | Andrzej111/text_search | a24a3dd09b8af43d9706d43e702674cca099ca21 | [
"MIT"
] | null | null | null | module/engine/TfidfEngine.py | Andrzej111/text_search | a24a3dd09b8af43d9706d43e702674cca099ca21 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import overload
from gensim import corpora,models,similarities
from collections import defaultdict
from .StringMatcher import StringMatcher
from .AbstractEngine import AbstractSearchEngine
import unittest
import six
class TfidfEngine(AbstractSearchEngine):
... | 35.683036 | 119 | 0.594645 |
dab1f9c2ba72be36213e20594a349e080d676c3e | 11,630 | py | Python | kstudent/views.py | mayankgujrathi/LabExamManager | 4eff1951ded76aee1e692e8ba4b2601b9b8ba44b | [
"MIT"
] | null | null | null | kstudent/views.py | mayankgujrathi/LabExamManager | 4eff1951ded76aee1e692e8ba4b2601b9b8ba44b | [
"MIT"
] | null | null | null | kstudent/views.py | mayankgujrathi/LabExamManager | 4eff1951ded76aee1e692e8ba4b2601b9b8ba44b | [
"MIT"
] | null | null | null | from django.shortcuts import redirect, render
import datetime
from nteacher.models import Exam, Question, Result
import random
import pytz
from plyer import notification
from students.decorators import student_required
from django.contrib.auth import authenticate, get_user_model, logout
from django.http import ... | 46.334661 | 246 | 0.660103 |
50d49eaa14551902e4e7e472f779f91db6fe40e2 | 2,700 | py | Python | cloudroast/images/v2/functional/test_add_image_tag_negative.py | bhushan5/cloudroast | 60e05df96fe50b3bc511ee1cf1c818329d4360a1 | [
"Apache-2.0"
] | null | null | null | cloudroast/images/v2/functional/test_add_image_tag_negative.py | bhushan5/cloudroast | 60e05df96fe50b3bc511ee1cf1c818329d4360a1 | [
"Apache-2.0"
] | null | null | null | cloudroast/images/v2/functional/test_add_image_tag_negative.py | bhushan5/cloudroast | 60e05df96fe50b3bc511ee1cf1c818329d4360a1 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2014 Rackspace
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, software
dist... | 31.395349 | 72 | 0.677037 |
7cf711a00d9cc407367e171c7c31d5a3bdd8de8e | 1,033 | py | Python | py/preprocess-bars.py | fabianheredia/Taxis_Inteligentes | f436c9b5c62266d45acdda55b7f8287b55a21f6b | [
"MIT"
] | null | null | null | py/preprocess-bars.py | fabianheredia/Taxis_Inteligentes | f436c9b5c62266d45acdda55b7f8287b55a21f6b | [
"MIT"
] | 1 | 2018-11-21T19:13:55.000Z | 2018-12-02T01:21:01.000Z | py/preprocess-bars.py | fabianheredia/Taxis_Inteligentes | f436c9b5c62266d45acdda55b7f8287b55a21f6b | [
"MIT"
] | 2 | 2018-12-06T07:01:45.000Z | 2018-12-15T14:13:53.000Z | import json
import datetime
import csv
from pprint import pprint
with open('reporteTaxi.json') as f:
data = json.load(f)
with open('actividad2.csv', 'w') as csvfile:
fieldnames = ['tid','cid','h','fecha','hora','estado','lat','lon']
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
writer.writeheader(... | 26.487179 | 225 | 0.594385 |
48df91b2ca289c155d06473cbce6178069f25622 | 2,973 | py | Python | data/p2DJ/New/R2/benchmark/startQiskit139.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startQiskit139.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startQiskit139.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=8
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as... | 27.785047 | 82 | 0.621594 |
9f02e2cc6bc6f5349f7b04b5819d02b0743d12e1 | 11,607 | py | Python | ENV/lib/python3.5/site-packages/pyrogram/crypto/rsa.py | block1o1/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | ENV/lib/python3.5/site-packages/pyrogram/crypto/rsa.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | null | null | null | ENV/lib/python3.5/site-packages/pyrogram/crypto/rsa.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 1 | 2022-03-15T22:52:53.000Z | 2022-03-15T22:52:53.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free S... | 53.243119 | 88 | 0.690962 |
800234898274ca39ef0f77984aa9325c08394f27 | 576 | py | Python | uvloop/_version.py | dmgolembiowski/uvloop | f0095409f124bcbd4e22082814b2bccb1603eb00 | [
"Apache-2.0",
"MIT"
] | 9,084 | 2016-04-04T10:42:42.000Z | 2022-03-30T22:53:22.000Z | uvloop/_version.py | dmgolembiowski/uvloop | f0095409f124bcbd4e22082814b2bccb1603eb00 | [
"Apache-2.0",
"MIT"
] | 382 | 2016-04-02T19:19:09.000Z | 2022-03-22T08:39:18.000Z | uvloop/_version.py | dmgolembiowski/uvloop | f0095409f124bcbd4e22082814b2bccb1603eb00 | [
"Apache-2.0",
"MIT"
] | 562 | 2016-04-01T19:42:12.000Z | 2022-03-30T22:40:40.000Z | # This file MUST NOT contain anything but the __version__ assignment.
#
# When making a release, change the value of __version__
# to an appropriate value, and open a pull request against
# the correct branch (master if making a new feature release).
# The commit message MUST contain a properly formatted release
# log,... | 41.142857 | 69 | 0.770833 |
2c5665eac4fa3978bec1ba6f511dc68d7220527a | 20,323 | py | Python | tests/integration/modules/test_cmdmod.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | tests/integration/modules/test_cmdmod.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | tests/integration/modules/test_cmdmod.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | import os
import random
import sys
import tempfile
from contextlib import contextmanager
import pytest
import salt.utils.path
import salt.utils.platform
import salt.utils.user
from tests.support.case import ModuleCase
from tests.support.helpers import dedent
from tests.support.runtests import RUNTIME_VARS
AVAILABLE_P... | 32.938412 | 88 | 0.57526 |
7562153b3fe343539c33265327be795344bc3f4e | 6,031 | py | Python | dataset.py | zhaohengz/3D-ResNets-PyTorch | 19371d9cfed024c09d3e9502d9895adc350b0227 | [
"MIT"
] | 2 | 2019-06-14T18:46:36.000Z | 2019-06-14T18:46:48.000Z | dataset.py | zhaohengz/3D-ResNets-PyTorch | 19371d9cfed024c09d3e9502d9895adc350b0227 | [
"MIT"
] | null | null | null | dataset.py | zhaohengz/3D-ResNets-PyTorch | 19371d9cfed024c09d3e9502d9895adc350b0227 | [
"MIT"
] | 1 | 2019-06-14T18:33:34.000Z | 2019-06-14T18:33:34.000Z | from datasets.kinetics import Kinetics
from datasets.activitynet import ActivityNet
from datasets.ucf101 import UCF101
from datasets.hmdb51 import HMDB51
from datasets.synthetic import Synthetic
def get_training_set(opt, spatial_transform, temporal_transform,
target_transform, image_type):
as... | 33.137363 | 91 | 0.590947 |
abbc3b43f33ed1f6eddd255006bfb12e1df375d6 | 30,751 | py | Python | src/fsec/parser.py | HiggsHydra/permian-frac-exchange | 1dd1e409e5389373590c7d3780a54cd9f12d1166 | [
"MIT"
] | null | null | null | src/fsec/parser.py | HiggsHydra/permian-frac-exchange | 1dd1e409e5389373590c7d3780a54cd9f12d1166 | [
"MIT"
] | null | null | null | src/fsec/parser.py | HiggsHydra/permian-frac-exchange | 1dd1e409e5389373590c7d3780a54cd9f12d1166 | [
"MIT"
] | null | null | null | """Classes to parse attributes from frac schedules with uncertain shape and formatting."""
from __future__ import annotations # self return type annotations
from typing import Any
import inspect
import logging
import os
import re
from datetime import datetime
from functools import partial
from typing import Callable
... | 30.781782 | 114 | 0.545283 |
a8bc388089de1ae64b1baee0ce80a01971e3b615 | 3,866 | py | Python | mnist/expert_mnist.py | mokpro/tensorflow_examples | c1d600a92a1ede3a187b7839f0842ff188373fdf | [
"MIT"
] | 10 | 2017-04-20T02:53:47.000Z | 2018-04-19T03:52:49.000Z | mnist/expert_mnist.py | mokpro/tensorflow_examples | c1d600a92a1ede3a187b7839f0842ff188373fdf | [
"MIT"
] | null | null | null | mnist/expert_mnist.py | mokpro/tensorflow_examples | c1d600a92a1ede3a187b7839f0842ff188373fdf | [
"MIT"
] | 13 | 2016-12-23T03:21:02.000Z | 2020-04-11T19:59:37.000Z | from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
from arg_parser import *
OPTIMIZERS_NAME_TO_CLASS_MAP = {
'GradientDescent': tf.train.GradientDescentOptimizer(0.3),
'Adagrad': tf.train.AdagradOptimizer(0.3),
'Adadelta': tf.train.AdadeltaOptimizer(0.3),
'ProximalAdagr... | 30.68254 | 78 | 0.613037 |
58e202248302915f663b8200ea1dc0cecb011b0f | 9,667 | py | Python | turf/invariant/tests/geometry_type_from_features/test_geometry_type_from_features.py | diogomatoschaves/pyturf | 966e0c37389f7ad398431498f16e7cc9b510cd56 | [
"MIT"
] | 5 | 2020-04-12T15:15:51.000Z | 2020-04-20T14:40:53.000Z | turf/invariant/tests/geometry_type_from_features/test_geometry_type_from_features.py | diogomatoschaves/pyturf | 966e0c37389f7ad398431498f16e7cc9b510cd56 | [
"MIT"
] | 36 | 2020-04-09T16:49:05.000Z | 2020-06-01T14:39:37.000Z | turf/invariant/tests/geometry_type_from_features/test_geometry_type_from_features.py | diogomatoschaves/pyturf | 966e0c37389f7ad398431498f16e7cc9b510cd56 | [
"MIT"
] | null | null | null | import pytest
import os
from turf.helpers import (
point,
line_string,
polygon,
feature_collection,
Point,
LineString,
Polygon,
)
from turf.invariant import get_geometry_type
from turf.utils.error_codes import error_code_messages
from turf.utils.exceptions import InvalidInput
from turf.uti... | 33.682927 | 86 | 0.380159 |
c5367c0edd15ef46bae370e67a7b407b6cfe1768 | 684 | py | Python | setup.py | smwa/round_robin_tournament | 8a2959e21d77f9fac722e787de57293062aa89dc | [
"MIT"
] | 1 | 2022-01-12T20:49:31.000Z | 2022-01-12T20:49:31.000Z | setup.py | smwa/round_robin_tournament | 8a2959e21d77f9fac722e787de57293062aa89dc | [
"MIT"
] | null | null | null | setup.py | smwa/round_robin_tournament | 8a2959e21d77f9fac722e787de57293062aa89dc | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="round_robin_tournament",
version="1.0.0",
author="Michael Smith",
author_email="michael.smith.ok@gmail.com",
description="A round robin tournament match handler.",
long_description=lon... | 29.73913 | 58 | 0.676901 |
55e22861455cfe7e13daf557c0719c4f64bce761 | 1,133 | py | Python | 01_fundamentals/05_loops/02_nested_for.py | doanthanhnhan/learningPY | 93c10c5225a306c791402095e1cf0b454f31d0c2 | [
"MIT"
] | 1 | 2021-04-04T02:39:05.000Z | 2021-04-04T02:39:05.000Z | 01_fundamentals/05_loops/02_nested_for.py | doanthanhnhan/learningPY | 93c10c5225a306c791402095e1cf0b454f31d0c2 | [
"MIT"
] | null | null | null | 01_fundamentals/05_loops/02_nested_for.py | doanthanhnhan/learningPY | 93c10c5225a306c791402095e1cf0b454f31d0c2 | [
"MIT"
] | null | null | null | # Using a Nested for Loop
n = 50
num_list = [10, 4, 23, 6, 18, 27, 47]
for n1 in num_list:
for n2 in num_list: # Now we have two iterators
if (n1 + n2 == n):
print(n1, n2)
# The break Keyword
n = 50
num_list = [10, 4, 23, 6, 18, 27, 47]
found = False # This bool will become true once a pair is found
fo... | 26.348837 | 82 | 0.664607 |
9c1fd080f8f0b50b41b6395a6d42e4a018de2e27 | 3,333 | py | Python | caffe2/python/operator_test/text_file_reader_test.py | KevinKecc/caffe2 | a2b6c6e2f0686358a84277df65e9489fb7d9ddb2 | [
"Apache-2.0"
] | 585 | 2015-08-10T02:48:52.000Z | 2021-12-01T08:46:59.000Z | caffe2/python/operator_test/text_file_reader_test.py | PDFxy/caffe2 | 28523ff1ff33f18eaf8b04cc4e0f308826e1861a | [
"Apache-2.0"
] | 27 | 2018-04-14T06:44:22.000Z | 2018-08-01T18:02:39.000Z | caffe2/python/operator_test/text_file_reader_test.py | PDFxy/caffe2 | 28523ff1ff33f18eaf8b04cc4e0f308826e1861a | [
"Apache-2.0"
] | 183 | 2015-08-10T02:49:04.000Z | 2021-12-01T08:47:13.000Z | # Copyright (c) 2016-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 40.156627 | 80 | 0.544854 |
fc11e13f07244f2d9d0828a93003409dd23128a0 | 1,389 | py | Python | src/server/ims_exceptions.py | Cray-HPE/ims | d684cb1cd04cad4ee2246049ae27d3291dd5f469 | [
"MIT"
] | 1 | 2022-01-26T21:18:52.000Z | 2022-01-26T21:18:52.000Z | src/server/ims_exceptions.py | Cray-HPE/ims | d684cb1cd04cad4ee2246049ae27d3291dd5f469 | [
"MIT"
] | 2 | 2021-12-17T21:47:53.000Z | 2022-02-28T15:55:34.000Z | src/server/ims_exceptions.py | Cray-HPE/ims | d684cb1cd04cad4ee2246049ae27d3291dd5f469 | [
"MIT"
] | null | null | null | #
# MIT License
#
# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the... | 37.540541 | 76 | 0.784737 |
151cd2a42ecef61617618f6beb325d7f94373d3b | 131,811 | py | Python | pandas/tests/tseries/offsets/test_offsets.py | Inevitable-Marzipan/pandas | ff50b46045886604dd70438f73df7bf9da3da89b | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/tseries/offsets/test_offsets.py | Inevitable-Marzipan/pandas | ff50b46045886604dd70438f73df7bf9da3da89b | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/tseries/offsets/test_offsets.py | Inevitable-Marzipan/pandas | ff50b46045886604dd70438f73df7bf9da3da89b | [
"BSD-3-Clause"
] | 1 | 2020-11-05T13:46:01.000Z | 2020-11-05T13:46:01.000Z | from datetime import date, datetime, timedelta
from distutils.version import LooseVersion
import numpy as np
import pytest
from pandas._libs.tslibs import (
NaT, OutOfBoundsDatetime, Timestamp, conversion, timezones)
from pandas._libs.tslibs.frequencies import (
INVALID_FREQ_ERR_MSG, get_freq_code, get_freq_s... | 41.33302 | 79 | 0.553626 |
6ee4ed1d848f4addbad07e439ced1056f18f44a7 | 12,093 | py | Python | sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_authorization_management_client.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_authorization_management_client.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_authorization_management_client.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 54.472973 | 371 | 0.71223 |
570a02bcbd81064d14d98cda5faad47d0af48ace | 6,781 | py | Python | certbot-ci/certbot_integration_tests/utils/certbot_call.py | luisriverag/certbot | 52e207a404ab3600637fc7a24492e2c68512ce2d | [
"Apache-2.0"
] | 1 | 2021-06-24T21:44:22.000Z | 2021-06-24T21:44:22.000Z | certbot-ci/certbot_integration_tests/utils/certbot_call.py | luisriverag/certbot | 52e207a404ab3600637fc7a24492e2c68512ce2d | [
"Apache-2.0"
] | 5 | 2021-03-15T21:43:04.000Z | 2021-07-22T20:31:43.000Z | certbot-ci/certbot_integration_tests/utils/certbot_call.py | luisriverag/certbot | 52e207a404ab3600637fc7a24492e2c68512ce2d | [
"Apache-2.0"
] | 2 | 2022-03-25T20:23:51.000Z | 2022-03-25T21:05:15.000Z | #!/usr/bin/env python
"""Module to call certbot in test mode"""
from distutils.version import LooseVersion
import os
import subprocess
import sys
import certbot_integration_tests
# pylint: disable=wildcard-import,unused-wildcard-import
from certbot_integration_tests.utils.constants import *
def certbot_test(certbot... | 43.748387 | 98 | 0.686772 |
9aa730e8486b2d2059de1adcf647065fc27477fa | 38,081 | py | Python | src/mako/lib/util.py | harababurel/google-apis-rs | 819e1ccce5c503329bf6ed5dd9078553a48997c5 | [
"MIT-feh",
"Apache-2.0",
"MIT"
] | null | null | null | src/mako/lib/util.py | harababurel/google-apis-rs | 819e1ccce5c503329bf6ed5dd9078553a48997c5 | [
"MIT-feh",
"Apache-2.0",
"MIT"
] | null | null | null | src/mako/lib/util.py | harababurel/google-apis-rs | 819e1ccce5c503329bf6ed5dd9078553a48997c5 | [
"MIT-feh",
"Apache-2.0",
"MIT"
] | null | null | null | import re
import os
from random import (randint, random, choice, seed)
import collections
from copy import deepcopy
import subprocess
seed(1337)
re_linestart = re.compile('^', flags=re.MULTILINE)
re_spaces_after_newline = re.compile('^ {4}', flags=re.MULTILINE)
re_first_4_spaces = re.compile('^ {1,4}', flags=re.MULTI... | 35.925472 | 636 | 0.613823 |
ebf054423fbbc18b8138bc2c049bdd1b8d3b59e1 | 2,692 | py | Python | src/nti/webhooks/tests/test_zcml.py | NextThought/nti.webhooks | 2015a02fba8d4ca1811a76872a2266c5e85d5728 | [
"Apache-2.0"
] | 1 | 2020-10-20T09:23:57.000Z | 2020-10-20T09:23:57.000Z | src/nti/webhooks/tests/test_zcml.py | NextThought/nti.webhooks | 2015a02fba8d4ca1811a76872a2266c5e85d5728 | [
"Apache-2.0"
] | 7 | 2020-06-23T22:10:37.000Z | 2020-12-04T20:27:45.000Z | src/nti/webhooks/tests/test_zcml.py | NextThought/nti.webhooks | 2015a02fba8d4ca1811a76872a2266c5e85d5728 | [
"Apache-2.0"
] | 1 | 2020-10-28T19:58:12.000Z | 2020-10-28T19:58:12.000Z | # -*- coding: utf-8 -*-
"""
Tests for zcml.py and ZCML configuration.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from nti.testing import base
class TestConfiguration(base.AbstractTestBase):
def test_duplicate_permissions_in_zcml_conflict(s... | 37.388889 | 82 | 0.578009 |
20dd9d3844452d449b0128fece04f49c4e9aab8e | 7,397 | py | Python | sourceCode/lin_log_model.py | Super151804/stata_scratch | 82fc9f6c6fdc8daa21b05ac4dd7ec0854a25afc3 | [
"MIT"
] | null | null | null | sourceCode/lin_log_model.py | Super151804/stata_scratch | 82fc9f6c6fdc8daa21b05ac4dd7ec0854a25afc3 | [
"MIT"
] | null | null | null | sourceCode/lin_log_model.py | Super151804/stata_scratch | 82fc9f6c6fdc8daa21b05ac4dd7ec0854a25afc3 | [
"MIT"
] | null | null | null | from sklearn.linear_model import LinearRegression
import pandas as pd
import numpy as np
import scipy
import matplotlib.pyplot as plt
import base64
from io import BytesIO
from sourceCode.func import create_t_figure
from sourceCode.func import create_p_figure
from sourceCode.func import create_b_figure
import platform
... | 33.776256 | 116 | 0.428282 |
a69d54751b84111282cc38be7db64b4813cc5724 | 13,534 | py | Python | bin/arbfit.py | davwong47/empirical-JTK_CYCLE-with-asymmetry | 936e1cc22c125590edaa418313bc4db30d3399fc | [
"MIT"
] | 4 | 2018-07-24T12:11:46.000Z | 2022-01-28T04:31:15.000Z | bin/arbfit.py | davwong47/empirical-JTK_CYCLE-with-asymmetry | 936e1cc22c125590edaa418313bc4db30d3399fc | [
"MIT"
] | 9 | 2015-04-27T09:58:00.000Z | 2021-09-15T12:33:52.000Z | bin/arbfit.py | davwong47/empirical-JTK_CYCLE-with-asymmetry | 936e1cc22c125590edaa418313bc4db30d3399fc | [
"MIT"
] | 8 | 2016-07-26T18:25:02.000Z | 2022-01-28T02:44:11.000Z | # -*- coding: utf-8 -*-
'''====
Easyfit
====
Provides an easy to use wrapper to fit common functions to a data set using the
Levenberg–Marquardt algorithm provided by mpfit. A full description of the
suppoerted functions and how to use the wrapper is given in easyfit.fit
'''
import numpy as np
from mpfit import mpfit
... | 34.52551 | 91 | 0.473548 |
40054e7a86ed542172aaaae95e52b8917221f2ae | 730 | py | Python | src/seller_products/migrations/0003_auto_20210920_2059.py | evis-market/web-interface-backend | f8930ff1c009ad18e522ab29680b4bcd50a6020e | [
"MIT"
] | 2 | 2021-08-30T22:58:32.000Z | 2021-12-12T10:47:52.000Z | src/seller_products/migrations/0003_auto_20210920_2059.py | evis-market/web-interface-backend | f8930ff1c009ad18e522ab29680b4bcd50a6020e | [
"MIT"
] | null | null | null | src/seller_products/migrations/0003_auto_20210920_2059.py | evis-market/web-interface-backend | f8930ff1c009ad18e522ab29680b4bcd50a6020e | [
"MIT"
] | 1 | 2021-08-22T19:12:44.000Z | 2021-08-22T19:12:44.000Z | # Generated by Django 3.2.7 on 2021-09-20 20:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('seller_products', '0002_auto_20210919_1513'),
]
operations = [
migrations.AlterField(
model_name='sellerproduct',
na... | 30.416667 | 116 | 0.649315 |
f1f37622b2a7498f3532b41eff240b7c86ed4e5e | 134,607 | py | Python | pandas/indexes/base.py | jgoppert/pandas | f62e8f242d90d849e4854f4fe82e9ebb5b731d74 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/indexes/base.py | jgoppert/pandas | f62e8f242d90d849e4854f4fe82e9ebb5b731d74 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/indexes/base.py | jgoppert/pandas | f62e8f242d90d849e4854f4fe82e9ebb5b731d74 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | 1 | 2019-02-20T18:01:08.000Z | 2019-02-20T18:01:08.000Z | import datetime
import warnings
import operator
import numpy as np
import pandas.tslib as tslib
import pandas.lib as lib
import pandas._join as _join
import pandas.algos as _algos
import pandas.index as _index
from pandas.lib import Timestamp, Timedelta, is_datetime_array
from pandas.compat import range, u
from panda... | 34.710418 | 83 | 0.552765 |
c93b82b1d6ddbe55d57e7e9aa441d37f6903e2b6 | 8,024 | py | Python | core/player.py | 3ldr0n/elzring | ab4b04ead320fcdaa197e504974e3fb712c5d161 | [
"MIT"
] | null | null | null | core/player.py | 3ldr0n/elzring | ab4b04ead320fcdaa197e504974e3fb712c5d161 | [
"MIT"
] | null | null | null | core/player.py | 3ldr0n/elzring | ab4b04ead320fcdaa197e504974e3fb712c5d161 | [
"MIT"
] | null | null | null | import os
import pygame
from gamesettings import GameSettings as gs
class Player(pygame.sprite.Sprite):
def __init__(self, game):
super().__init__()
self.game = game
self.width = 32
self.height = 64
self.spritesheet = pygame.image.load(
os.path.join(gs.ASSETS... | 31.34375 | 79 | 0.601695 |
159a844748c59b68a44a5d8a67439ec9474799e2 | 88,327 | py | Python | spire/wsgi/server.py | siq/spire | 6365590277e9a6bfb6e4e0df5b2b47dba0f71711 | [
"Linux-OpenIB"
] | null | null | null | spire/wsgi/server.py | siq/spire | 6365590277e9a6bfb6e4e0df5b2b47dba0f71711 | [
"Linux-OpenIB"
] | 1 | 2016-09-15T16:19:27.000Z | 2016-09-15T16:20:06.000Z | spire/wsgi/server.py | siq/spire | 6365590277e9a6bfb6e4e0df5b2b47dba0f71711 | [
"Linux-OpenIB"
] | null | null | null | """A high-speed, production ready, thread pooled, generic HTTP server.
Simplest example on how to use this module directly
(without using CherryPy's application machinery)::
from cherrypy import wsgiserver
def my_crazy_app(environ, start_response):
status = '200 OK'
response_headers = [('Cont... | 37.585957 | 135 | 0.540605 |
817864575b0ca9fbe0a935f013b311f27c5f3722 | 348 | py | Python | src/words_tweeted.py | navygit/data_challenge | d61d7e67d5f147b473c2e68e10bdd95a797ac0c8 | [
"Apache-2.0"
] | null | null | null | src/words_tweeted.py | navygit/data_challenge | d61d7e67d5f147b473c2e68e10bdd95a797ac0c8 | [
"Apache-2.0"
] | null | null | null | src/words_tweeted.py | navygit/data_challenge | d61d7e67d5f147b473c2e68e10bdd95a797ac0c8 | [
"Apache-2.0"
] | null | null | null | # example of program that calculates the total number of times each word has been tweeted.
import collections
import operator
infile = open("tweet_input/tweets.txt")
words = collections.Counter()
for line in infile:
words.update(line.split())
for word, count in words.iterite... | 24.857143 | 90 | 0.672414 |
bdf822de8ce632d52e0e233778355c7c827d245a | 38,416 | py | Python | KuttyPyLibNano.py | sayanchowdhury/KuttyPy-GUI | d80a80f50ce0940f821da2734ebdc908aa8679a8 | [
"MIT"
] | 6 | 2019-11-08T07:21:17.000Z | 2021-08-14T13:48:37.000Z | KuttyPyLibNano.py | sayanchowdhury/KuttyPy-GUI | d80a80f50ce0940f821da2734ebdc908aa8679a8 | [
"MIT"
] | 9 | 2019-01-09T19:45:14.000Z | 2021-02-05T08:42:10.000Z | KuttyPyLibNano.py | sayanchowdhury/KuttyPy-GUI | d80a80f50ce0940f821da2734ebdc908aa8679a8 | [
"MIT"
] | 4 | 2020-02-04T23:30:55.000Z | 2021-02-04T10:11:34.000Z | '''
Code snippet for reading data from the kuttypy
'''
import serial, struct, time,platform,os,sys,functools
from utilities import REGISTERS_NANO as REGISTERS
from collections import OrderedDict
import numpy as np
if 'inux' in platform.system(): #Linux based system
import fcntl
Byte = struct.Struct("B") # size ... | 31.960067 | 257 | 0.672714 |
361e8b48ea75e0276c78f2dfd479d766d100f81a | 20 | py | Python | tests/test_forms.py | Drazerr/roster-wizard | 600dc5a196dc6c11e879f3cec86b2bbee6e0bf36 | [
"MIT"
] | null | null | null | tests/test_forms.py | Drazerr/roster-wizard | 600dc5a196dc6c11e879f3cec86b2bbee6e0bf36 | [
"MIT"
] | null | null | null | tests/test_forms.py | Drazerr/roster-wizard | 600dc5a196dc6c11e879f3cec86b2bbee6e0bf36 | [
"MIT"
] | null | null | null | """Form Testing."""
| 10 | 19 | 0.55 |
188e01bfe5fe89f15c39553287e845845c7911b7 | 276 | py | Python | Maths/abs.py | Nazima54/Python | 4b5f664e5e7effeb3d3f93bb804e8dde2e4bfb57 | [
"MIT"
] | null | null | null | Maths/abs.py | Nazima54/Python | 4b5f664e5e7effeb3d3f93bb804e8dde2e4bfb57 | [
"MIT"
] | null | null | null | Maths/abs.py | Nazima54/Python | 4b5f664e5e7effeb3d3f93bb804e8dde2e4bfb57 | [
"MIT"
] | null | null | null | def absVal(num):
"""
Function to fins absolute value of numbers.
>>>absVal(-5)
5
>>>absVal(0)
0
"""
if num < 0:
return -num
else:
return num
def main():
print(absVal(-34)) # = 34
if __name__ == '__main__':
main()
| 13.8 | 47 | 0.492754 |
63248d7b2eb821685ff3b7bcbc76199c408d29ab | 13,292 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/cloud/cloudscale/cloudscale_server.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 1 | 2021-04-02T08:08:39.000Z | 2021-04-02T08:08:39.000Z | venv/lib/python2.7/site-packages/ansible/modules/cloud/cloudscale/cloudscale_server.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/ansible/modules/cloud/cloudscale/cloudscale_server.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 1 | 2020-05-03T01:13:16.000Z | 2020-05-03T01:13:16.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2017, Gaudenz Steinlin <gaudenz.steinlin@cloudscale.ch>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ve... | 33.565657 | 152 | 0.649639 |
53d83a66409b9be5b9dbec1fa27f763ea2c7e47e | 4,150 | py | Python | src/oreaper/__main__.py | datadavev/oreaper | 8094e3e8c666d1d7445ca2220c5922198e871a5b | [
"Apache-2.0"
] | null | null | null | src/oreaper/__main__.py | datadavev/oreaper | 8094e3e8c666d1d7445ca2220c5922198e871a5b | [
"Apache-2.0"
] | null | null | null | src/oreaper/__main__.py | datadavev/oreaper | 8094e3e8c666d1d7445ca2220c5922198e871a5b | [
"Apache-2.0"
] | null | null | null | '''
Load DataONE ORE documents and output relations as a json dictionary, one entry per line.
'''
import sys
import os
import logging
import argparse
import dateparser
from pytz import timezone
from d1_client import cnclient_2_0
import json
import requests
from . import oreparser
PRODUCTION_CN = "https://cn.dataone... | 35.775862 | 89 | 0.649157 |
38eace8ff6337480f70abd95d08446a1b685fca8 | 2,912 | py | Python | app.py | K701user/Cryptocurrency | 107b1e619ecb0f8a9fcdaa547108ec70894a0012 | [
"MIT"
] | null | null | null | app.py | K701user/Cryptocurrency | 107b1e619ecb0f8a9fcdaa547108ec70894a0012 | [
"MIT"
] | null | null | null | app.py | K701user/Cryptocurrency | 107b1e619ecb0f8a9fcdaa547108ec70894a0012 | [
"MIT"
] | null | null | null | # -*- coding:utf8 -*-
# !/usr/bin/env python
# Copyright 2017 Google 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... | 25.54386 | 74 | 0.653159 |
3b9f77498ed2e71aac60323d0bfc63325a31dd69 | 9,592 | py | Python | app/die_information.py | mongodb-labs/disasm | 8e76351a858d3273943703cfc62bb7e48c94cd7c | [
"Apache-2.0"
] | 269 | 2016-06-21T03:46:28.000Z | 2022-03-04T11:21:19.000Z | app/die_information.py | mongodb-labs/disasm | 8e76351a858d3273943703cfc62bb7e48c94cd7c | [
"Apache-2.0"
] | 4 | 2016-06-21T03:48:19.000Z | 2017-03-01T07:03:00.000Z | app/die_information.py | mongodb-labs/disasm | 8e76351a858d3273943703cfc62bb7e48c94cd7c | [
"Apache-2.0"
] | 19 | 2016-07-21T04:57:14.000Z | 2021-08-20T09:56:29.000Z | # Copyright 2016 MongoDB Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | 37.46875 | 100 | 0.627085 |
f93f65627e29a3bc563bae1243c9252bd22b4c77 | 3,628 | py | Python | alibi_detect/utils/tensorflow/tests/test_distance_tf.py | amanjha8100/alibi-detect | 13b2664dca601aebc25c774fd6814bd5d380d6e7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | alibi_detect/utils/tensorflow/tests/test_distance_tf.py | amanjha8100/alibi-detect | 13b2664dca601aebc25c774fd6814bd5d380d6e7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | alibi_detect/utils/tensorflow/tests/test_distance_tf.py | amanjha8100/alibi-detect | 13b2664dca601aebc25c774fd6814bd5d380d6e7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import numpy as np
from itertools import product
import pytest
import tensorflow as tf
from alibi_detect.utils.tensorflow import GaussianRBF, mmd2, mmd2_from_kernel_matrix
from alibi_detect.utils.tensorflow import relative_euclidean_distance, squared_pairwise_distance
n_features = [2, 5]
n_instances = [(100, 100), (10... | 37.402062 | 105 | 0.739526 |
e2edb4c128025d9f4f59d39d92efbc9a3ecb7c6a | 11,092 | py | Python | lib/structs.py | bfaure/terrain_parser | 7b5ed1ad2070357794bf693df0c621f883d547e3 | [
"MIT"
] | null | null | null | lib/structs.py | bfaure/terrain_parser | 7b5ed1ad2070357794bf693df0c621f883d547e3 | [
"MIT"
] | null | null | null | lib/structs.py | bfaure/terrain_parser | 7b5ed1ad2070357794bf693df0c621f883d547e3 | [
"MIT"
] | null | null | null |
import time
import numpy as np
from vispy import app, scene
from vispy.util.filter import gaussian_filter
import vispy
_DEFAULT_IMPORT_COMPRESSION_VALUE = 10
_DEFAULT_PLOT_COMPRESSION_VALUE = 1
_DEFAULT_ELEV_SCALE_VALUE = 0.01
_DEFAULT_PLOT_TYPE = "3D"
class preferences:
def __init__(self):
self.... | 25.557604 | 117 | 0.695907 |
25cfc1b7091308fe61a73d4d9711badec7b01178 | 2,461 | py | Python | config.py | DeerKK/Deformable-Modeling | 97b14be152e78f44dd6e783059bc5380a3a74a68 | [
"MIT"
] | 4 | 2020-11-16T16:06:08.000Z | 2022-03-30T03:53:54.000Z | config.py | DeerKK/Deformable-Modeling | 97b14be152e78f44dd6e783059bc5380a3a74a68 | [
"MIT"
] | null | null | null | config.py | DeerKK/Deformable-Modeling | 97b14be152e78f44dd6e783059bc5380a3a74a68 | [
"MIT"
] | null | null | null | import math
class DMConfig(object):
def __init__(self, MODE):
# ----------- global setting
self.mode = MODE
self.step = 'y'
self.robot_model_path = "robot_model_data/ur5Blocks.xml"
self.ee_link_number = 7
self.calibration_xform_path = 'calibrated_transforms/calibrat... | 36.191176 | 100 | 0.527834 |
be1ed558e8af5152c6303c0859188aab68ff7d5a | 2,332 | py | Python | suma.py | jordidh/joc-escriu-nom | d4f8cc06a6e059161ff12c2956092c5ab73eb6e4 | [
"MIT"
] | null | null | null | suma.py | jordidh/joc-escriu-nom | d4f8cc06a6e059161ff12c2956092c5ab73eb6e4 | [
"MIT"
] | null | null | null | suma.py | jordidh/joc-escriu-nom | d4f8cc06a6e059161ff12c2956092c5ab73eb6e4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import sys
import os
import subprocess
import pyttsx
from gtts import gTTS
import readchar
from PIL import Image
ordinals = ["primera", "segona", "tercera", "quarta", "cinquena", "sisena", "setena", "vuitena", "novena", "desena"]
def digues(frase):
tts = gTTS(text=fra... | 27.761905 | 116 | 0.605918 |
0c2f1f2c3c0fb4e564dc74941891069af0c9f13c | 3,765 | py | Python | DB.py | SharagaFun/DB-Laba-3 | 614ac14cfdd67ca89d0a7cd497dedf0d91a5823a | [
"WTFPL"
] | null | null | null | DB.py | SharagaFun/DB-Laba-3 | 614ac14cfdd67ca89d0a7cd497dedf0d91a5823a | [
"WTFPL"
] | null | null | null | DB.py | SharagaFun/DB-Laba-3 | 614ac14cfdd67ca89d0a7cd497dedf0d91a5823a | [
"WTFPL"
] | 3 | 2020-06-06T17:04:10.000Z | 2021-06-12T18:29:51.000Z | import psycopg2
from psycopg2 import sql
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
import json
from urllib.request import urlopen
import ssl
class DB:
def __init__(self, address, port, login, password, name='Weed', structureURL='https://raw.githubusercontent.com/SharagaFun/DB-Laba-4/master/struct... | 36.201923 | 160 | 0.657636 |
820a0dc83c1564b9220d6616270c713267c8533c | 1,125 | py | Python | audit_trail/models/fielddiff.py | darshit7/django-model-audit | 903b73aa06abfd41b73c299bd7b7ec93f5203917 | [
"BSD-3-Clause"
] | 6 | 2018-05-07T10:11:14.000Z | 2021-06-29T14:27:57.000Z | audit_trail/models/fielddiff.py | darshit7/django-model-audit | 903b73aa06abfd41b73c299bd7b7ec93f5203917 | [
"BSD-3-Clause"
] | 2 | 2019-06-28T09:51:34.000Z | 2020-11-13T07:10:21.000Z | audit_trail/models/fielddiff.py | darshit7/django-model-audit | 903b73aa06abfd41b73c299bd7b7ec93f5203917 | [
"BSD-3-Clause"
] | 6 | 2018-05-07T10:08:48.000Z | 2020-11-23T22:27:36.000Z | '''
Created on 06-Jan-2017
@author: dharmikp
'''
from django.db import models
from django.utils.translation import ugettext_lazy as _
class FieldDiff(models.Model):
"""
Difference between fields.
"""
id = models.BigAutoField(primary_key=True)
"""
Id field of field diff, it is auto increment... | 23.4375 | 77 | 0.616889 |
a0759af26236270fb1c6586c08906a2e1b0bfc10 | 260 | py | Python | graphic1.py | raj-bunsha/Turtle-Graphics | 5013b26fdc652b47149fa76253a59514c4a26ff3 | [
"MIT"
] | null | null | null | graphic1.py | raj-bunsha/Turtle-Graphics | 5013b26fdc652b47149fa76253a59514c4a26ff3 | [
"MIT"
] | null | null | null | graphic1.py | raj-bunsha/Turtle-Graphics | 5013b26fdc652b47149fa76253a59514c4a26ff3 | [
"MIT"
] | null | null | null | from turtle import*
import colorsys
t=Turtle()
s=Screen()
s.bgcolor("black")
t.speed(0)
n=36
h=0
for i in range(360):
c=colorsys.hsv_to_rgb(h,1,0.8)
h+=1/n
t.color(c)
t.left(10)
for j in range(5):
t.forward(200)
t.left(144)
| 15.294118 | 34 | 0.592308 |
764b919b8a5119b29dc15d216e1043c2b742a291 | 162 | py | Python | Unit 04 Functions/01 Functions/Importing Modules/11-Here be Dragons.py | lpython2006e/python-samples | b94ba67ce0d7798ecf796dadae206aa75da58301 | [
"MIT"
] | null | null | null | Unit 04 Functions/01 Functions/Importing Modules/11-Here be Dragons.py | lpython2006e/python-samples | b94ba67ce0d7798ecf796dadae206aa75da58301 | [
"MIT"
] | null | null | null | Unit 04 Functions/01 Functions/Importing Modules/11-Here be Dragons.py | lpython2006e/python-samples | b94ba67ce0d7798ecf796dadae206aa75da58301 | [
"MIT"
] | null | null | null | import math # Imports the math module
everything = dir(math) # Sets everything to a list of things from math
print(everything # Prints 'em all!)
| 40.5 | 70 | 0.679012 |
f1bfcf51ecc5f8a24a37a3275445baf881c9beb6 | 13,611 | py | Python | manila/network/standalone_network_plugin.py | mail2nsrajesh/manila | ec052a6cff2ddc722e3b78ab208801e6b94ab55a | [
"Apache-2.0"
] | null | null | null | manila/network/standalone_network_plugin.py | mail2nsrajesh/manila | ec052a6cff2ddc722e3b78ab208801e6b94ab55a | [
"Apache-2.0"
] | null | null | null | manila/network/standalone_network_plugin.py | mail2nsrajesh/manila | ec052a6cff2ddc722e3b78ab208801e6b94ab55a | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Mirantis, 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 required b... | 44.335505 | 78 | 0.601719 |
2c6f334907ffc24b1dfbd5c91e04dc50b36eae1e | 6,168 | py | Python | gbpservice/neutron/tests/unit/services/grouppolicy/test_neutronv2_client.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | null | null | null | gbpservice/neutron/tests/unit/services/grouppolicy/test_neutronv2_client.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | null | null | null | gbpservice/neutron/tests/unit/services/grouppolicy/test_neutronv2_client.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | 1 | 2019-12-03T15:28:24.000Z | 2019-12-03T15:28:24.000Z | # 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, software
# d... | 45.021898 | 78 | 0.585117 |
2fc0158b83b81ca63ad0c4a37de54f56a5bbce68 | 1,592 | py | Python | examples/put_object_sse-s3.py | rgeens/minio-py | aab96e33f117dfd35a84fb4a3748966dd2b53096 | [
"Apache-2.0"
] | null | null | null | examples/put_object_sse-s3.py | rgeens/minio-py | aab96e33f117dfd35a84fb4a3748966dd2b53096 | [
"Apache-2.0"
] | null | null | null | examples/put_object_sse-s3.py | rgeens/minio-py | aab96e33f117dfd35a84fb4a3748966dd2b53096 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Minio Python Library for Amazon S3 Compatible Cloud Storage, (C) 2018 Minio, 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/licen... | 31.84 | 107 | 0.743719 |
d19827522d48d18d9ec0d42d8d14422554483e2e | 13,371 | py | Python | databricks_cli/clusters/cli.py | testruction/databricks-cli | 4e74b10ed3e3f017f1444fc1b7842c5b25f1fe7c | [
"Apache-2.0"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | databricks_cli/clusters/cli.py | testruction/databricks-cli | 4e74b10ed3e3f017f1444fc1b7842c5b25f1fe7c | [
"Apache-2.0"
] | 1 | 2021-08-03T12:23:01.000Z | 2021-08-10T08:35:22.000Z | databricks_cli/clusters/cli.py | testruction/databricks-cli | 4e74b10ed3e3f017f1444fc1b7842c5b25f1fe7c | [
"Apache-2.0"
] | 2 | 2021-12-09T07:23:21.000Z | 2022-03-31T06:13:10.000Z | # Databricks CLI
# Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"), except
# that the use of services to which certain application programming
# interfaces (each, an "API") connect requires that the user first obtain
# a license for the use of the APIs from Databricks,... | 37.038781 | 98 | 0.730985 |
975a0701f94f9ac1738500728363d00dba4ac9d3 | 202 | py | Python | Osnove/4_9_1GlobalneVarijablaMix.py | Smajkan/PythonUcenjePonovo | 00982fb4caacb35ed11748dcc471f26257c8e5ed | [
"CC0-1.0"
] | null | null | null | Osnove/4_9_1GlobalneVarijablaMix.py | Smajkan/PythonUcenjePonovo | 00982fb4caacb35ed11748dcc471f26257c8e5ed | [
"CC0-1.0"
] | null | null | null | Osnove/4_9_1GlobalneVarijablaMix.py | Smajkan/PythonUcenjePonovo | 00982fb4caacb35ed11748dcc471f26257c8e5ed | [
"CC0-1.0"
] | null | null | null | #Kreiraj varijablu koja je izvan funkcije i iskoristi je unutar funkcije
x = "zabavan"
def mojaFunkcija():
x = "dobar"
print("Python je " + x)
mojaFunkcija()
print("Python je " + x) | 16.833333 | 72 | 0.643564 |
baa9fb1554b18055cd9ab9f9b834ecbae2f0eef6 | 4,051 | py | Python | lingo24/business_documents/client.py | boltlearning/lingo24 | 35ae9a98f8f29fb4e04d6c42a728c69af96dbdc4 | [
"MIT"
] | null | null | null | lingo24/business_documents/client.py | boltlearning/lingo24 | 35ae9a98f8f29fb4e04d6c42a728c69af96dbdc4 | [
"MIT"
] | null | null | null | lingo24/business_documents/client.py | boltlearning/lingo24 | 35ae9a98f8f29fb4e04d6c42a728c69af96dbdc4 | [
"MIT"
] | 1 | 2021-04-21T06:58:29.000Z | 2021-04-21T06:58:29.000Z | import json
import urlparse
import requests
from .domains import DomainCollection
from .endpoints import API_ENDPOINT_URLS
from .files import FileCollection
from .locales import LocaleCollection
from .services import ServiceCollection
from .projects import ProjectCollection
class Client(object):
def __init__(se... | 30.689394 | 92 | 0.629721 |
d03acdeb73e418ccc2ccbf09c5343cd09bf7e3bf | 6,166 | py | Python | Tools/GenericToolsSplitByAttributes.py | marbiouk/dsmtools | df127f8e3eca7785b0154f0001a05f76270dca2f | [
"MIT"
] | 1 | 2020-07-04T05:14:21.000Z | 2020-07-04T05:14:21.000Z | Tools/GenericToolsSplitByAttributes.py | marbiouk/dsmtools | df127f8e3eca7785b0154f0001a05f76270dca2f | [
"MIT"
] | 2 | 2018-02-09T17:16:30.000Z | 2018-02-09T17:20:11.000Z | Tools/GenericToolsSplitByAttributes.py | marecotec/dsmtools | df127f8e3eca7785b0154f0001a05f76270dca2f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import arcpy
import os
from math import radians, sin, cos
class GenericToolsSplitByAttributes(object):
"""This class has the methods you need to define
to use your code as an ArcGIS Python Tool."""
def __init__(self):
"""Define the tool (tool name is the name o... | 43.730496 | 156 | 0.576224 |
15839074451087f7b2fbaabec6118302eb583c47 | 20,409 | py | Python | doc_source/_ext/supported_resources.py | Sam-Martin/cloud-wanderer | 1879f9bb150054be5bf33fd46a47414b4939529e | [
"MIT"
] | 1 | 2020-12-07T10:37:41.000Z | 2020-12-07T10:37:41.000Z | doc_source/_ext/supported_resources.py | Sam-Martin/cloud-wanderer | 1879f9bb150054be5bf33fd46a47414b4939529e | [
"MIT"
] | null | null | null | doc_source/_ext/supported_resources.py | Sam-Martin/cloud-wanderer | 1879f9bb150054be5bf33fd46a47414b4939529e | [
"MIT"
] | null | null | null | import os
import pathlib
from collections import defaultdict
from functools import lru_cache
from typing import TYPE_CHECKING
import boto3
import botocore
import docutils
import sphinx
from docutils import nodes
from docutils.frontend import OptionParser
from graph_visualisation import GraphManager
from jinja2 import ... | 42.966316 | 120 | 0.662159 |
9c1369820c37f090251d296b44f7dc922182e39b | 7,027 | py | Python | src/azure-cli/azure/cli/command_modules/rdbms/_client_factory.py | toki95/azure-cli | a221f49b9af6cf889cde20bbe4b42956900acd37 | [
"MIT"
] | 1 | 2020-03-14T07:10:34.000Z | 2020-03-14T07:10:34.000Z | src/azure-cli/azure/cli/command_modules/rdbms/_client_factory.py | toki95/azure-cli | a221f49b9af6cf889cde20bbe4b42956900acd37 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/rdbms/_client_factory.py | toki95/azure-cli | a221f49b9af6cf889cde20bbe4b42956900acd37 | [
"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.
# --------------------------------------------------------------------... | 33.94686 | 94 | 0.746834 |
05e079bcd3147f1a9932b3d95968e6505da9acbe | 405 | py | Python | sentag/wsgi.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 3 | 2021-12-11T12:20:07.000Z | 2022-01-15T14:34:07.000Z | sentag/wsgi.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 1 | 2021-11-28T22:34:58.000Z | 2021-11-28T22:35:43.000Z | sentag/wsgi.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 1 | 2022-01-26T16:41:12.000Z | 2022-01-26T16:41:12.000Z | """
WSGI config for sentag project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('... | 23.823529 | 79 | 0.753086 |
bbffbd64eae808816c15b09eb38addb04bb2eb03 | 32,001 | py | Python | lib/galaxy/managers/datasets.py | sneumann/galaxy | f6011bab5b8adbabae4986a45849bb9158ffc8bb | [
"CC-BY-3.0"
] | 1 | 2019-07-27T19:30:55.000Z | 2019-07-27T19:30:55.000Z | lib/galaxy/managers/datasets.py | sneumann/galaxy | f6011bab5b8adbabae4986a45849bb9158ffc8bb | [
"CC-BY-3.0"
] | 4 | 2021-02-08T20:28:34.000Z | 2022-03-02T02:52:55.000Z | lib/galaxy/managers/datasets.py | sneumann/galaxy | f6011bab5b8adbabae4986a45849bb9158ffc8bb | [
"CC-BY-3.0"
] | 1 | 2018-05-30T07:38:54.000Z | 2018-05-30T07:38:54.000Z | """
Manager and Serializer for Datasets.
"""
import glob
import logging
import os
from six import string_types
import galaxy.datatypes.metadata
from galaxy import (
exceptions,
model
)
from galaxy.datatypes import sniff
from galaxy.managers import (
base,
deletable,
rbac_secured,
secured,
... | 44.445833 | 203 | 0.64973 |
47879abb8542ad147d5d15f118bc8b511f37a923 | 322 | py | Python | WPAutomate1.py | Shuvo31/Whatsapp-Automation-with-Python | f3825bd41f4a0060d3c43dd03bb5d8f26aa732a8 | [
"MIT"
] | 2 | 2021-05-29T17:01:05.000Z | 2021-05-30T06:54:48.000Z | WPAutomate1.py | Shuvo31/Whatsapp-Automation-with-Python | f3825bd41f4a0060d3c43dd03bb5d8f26aa732a8 | [
"MIT"
] | null | null | null | WPAutomate1.py | Shuvo31/Whatsapp-Automation-with-Python | f3825bd41f4a0060d3c43dd03bb5d8f26aa732a8 | [
"MIT"
] | null | null | null | import pywhatkit
m1 = input("Please Enter the Mobile Number:")
t1=input("Please type the message:")
tm1= int(input("Please Enter the time frame hour:"))
ss1= int(input("Please Enter the time frame minutes "))
try:
pywhatkit.sendwhatmsg(m1,t1,tm1,ss1)
print("Message sent successfully!")
except:
print("Error!"... | 29.272727 | 55 | 0.717391 |
802e55b96a1b99a1a96f2fbe22a3011d4c383fcc | 8,866 | py | Python | pysc18/pysc18.py | rabryan/pysc18 | 4879ed8f6a11d9e8c5ff7cab31d4ccde2847b898 | [
"MIT"
] | 1 | 2021-08-13T13:15:54.000Z | 2021-08-13T13:15:54.000Z | pysc18/pysc18.py | rabryan/pysc18 | 4879ed8f6a11d9e8c5ff7cab31d4ccde2847b898 | [
"MIT"
] | null | null | null | pysc18/pysc18.py | rabryan/pysc18 | 4879ed8f6a11d9e8c5ff7cab31d4ccde2847b898 | [
"MIT"
] | null | null | null | """
serial communication interface with SC18IM700
"""
import serial
import logging as log
I2C_START_CMD=b'S'
I2C_STOP_CMD=b'P'
REG_WRITE_CMD=b'W'
REG_READ_CMD=b'R'
GPIO_WRITE_CMD=b'O'
GPIO_READ_CMD=b'I'
FRAME_END=b'P'
""" Registers"""
REG_BRG0=0x00
REG_BRG1=0x01
REG_PortConf1=0x02
REG_PortConf2=0x03
def _i2c_write_a... | 34.498054 | 111 | 0.629371 |
345ec1b849491817a87840581565354118fce45f | 59,146 | py | Python | tests/unit/test_app.py | melevittfl/chalice | 5a073c78a8ad083ff9aff25ccad57b79db29ba55 | [
"Apache-2.0"
] | 1 | 2019-04-14T20:16:47.000Z | 2019-04-14T20:16:47.000Z | tests/unit/test_app.py | melevittfl/chalice | 5a073c78a8ad083ff9aff25ccad57b79db29ba55 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_app.py | melevittfl/chalice | 5a073c78a8ad083ff9aff25ccad57b79db29ba55 | [
"Apache-2.0"
] | null | null | null | import sys
import base64
import logging
import json
import gzip
import inspect
import pytest
from pytest import fixture
import hypothesis.strategies as st
from hypothesis import given, assume
import six
from chalice import app
from chalice import NotFoundError
from chalice.app import APIGateway, Request, Response, h... | 32.19706 | 79 | 0.639925 |
0a221365f5d5947f067c0f23e62a3fefce3248f8 | 10,380 | py | Python | openktn_old/forms/classes/api_pandas_TransitionsDataFrame.py | uibcdf/OpenKinNet | 8ed5d3da561e7a0f62ac80cb02cc09116c08ac25 | [
"MIT"
] | null | null | null | openktn_old/forms/classes/api_pandas_TransitionsDataFrame.py | uibcdf/OpenKinNet | 8ed5d3da561e7a0f62ac80cb02cc09116c08ac25 | [
"MIT"
] | null | null | null | openktn_old/forms/classes/api_pandas_TransitionsDataFrame.py | uibcdf/OpenKinNet | 8ed5d3da561e7a0f62ac80cb02cc09116c08ac25 | [
"MIT"
] | null | null | null | from os.path import basename as _basename
from openktn.foreign import Pandas_TransitionsDataFrame as pandas_TransitionsDataFrame
from simtk.unit import kelvin, nanoseconds
import numpy as np
form_name=_basename(__file__).split('.')[0].replace('api_','').replace('_','.')
is_form={
pandas_TransitionsDataFrame : for... | 29.239437 | 113 | 0.72553 |
4cc48c9012d885b592527da0eaf89822d5c25e92 | 20 | py | Python | tonie_sync/__init__.py | AndyHeinz/tonie_sync | 6cd2bd5d64f44fad1aa7b44f52f5001a2bb845f6 | [
"MIT"
] | 15 | 2015-02-22T18:54:21.000Z | 2020-12-15T12:50:28.000Z | tonie_sync/__init__.py | AndyHeinz/tonie_sync | 6cd2bd5d64f44fad1aa7b44f52f5001a2bb845f6 | [
"MIT"
] | 1 | 2020-12-18T20:03:27.000Z | 2021-12-14T12:13:22.000Z | tonie_sync/__init__.py | AndyHeinz/tonie_sync | 6cd2bd5d64f44fad1aa7b44f52f5001a2bb845f6 | [
"MIT"
] | 2 | 2020-12-18T19:35:49.000Z | 2021-03-14T21:04:31.000Z | from .sync import *
| 10 | 19 | 0.7 |
7247e0fe75b443e25830d4db5d005e2e4d9cfe00 | 1,047 | py | Python | col2gray2d.py | Nobu575/AppItk | 91de313115b753a6fb1ae67f53d4979580ef768b | [
"MIT"
] | null | null | null | col2gray2d.py | Nobu575/AppItk | 91de313115b753a6fb1ae67f53d4979580ef768b | [
"MIT"
] | null | null | null | col2gray2d.py | Nobu575/AppItk | 91de313115b753a6fb1ae67f53d4979580ef768b | [
"MIT"
] | null | null | null | import numpy as np
import itk
import matplotlib.pyplot as plt
# Input file name
input_filename = './jenga.png'
# Set dimension
Dimension = 2
# Read input image
itk_image = itk.imread(input_filename)
# Setting for input image (RBG color)
ComponentType = itk.UC
InputPixelType = itk.RGBPixel[ComponentType]
InputImageT... | 25.536585 | 88 | 0.776504 |
96692565e7a33793f995180f7d13b954fa5d5651 | 7,193 | py | Python | mindinsight/mindconverter/graph_based_converter/third_party_graph/pytorch_graph_node.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | null | null | null | mindinsight/mindconverter/graph_based_converter/third_party_graph/pytorch_graph_node.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | null | null | null | mindinsight/mindconverter/graph_based_converter/third_party_graph/pytorch_graph_node.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd.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 ap... | 30.350211 | 108 | 0.596274 |
cee8b9838d231a25927aa10029bd8e3b10b50441 | 12,827 | py | Python | templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/to_replace_{{cookiecutter.lowercase_modelname}}.py | nhatminh46vn/transformers | 9972a0279f45d81b29e4bdc2a906436a783bc2f7 | [
"Apache-2.0"
] | 1 | 2021-02-22T19:29:07.000Z | 2021-02-22T19:29:07.000Z | templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/to_replace_{{cookiecutter.lowercase_modelname}}.py | juand-r/transformers | 912f6881d2b69f180522172a5283702bd8c41d9c | [
"Apache-2.0"
] | null | null | null | templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/to_replace_{{cookiecutter.lowercase_modelname}}.py | juand-r/transformers | 912f6881d2b69f180522172a5283702bd8c41d9c | [
"Apache-2.0"
] | 1 | 2021-02-08T12:28:01.000Z | 2021-02-08T12:28:01.000Z | ## Copyright 2020 The HuggingFace Team. 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 ... | 39.835404 | 214 | 0.73891 |
08c74248f8258f8f24a8a7cf16d5e754203a3a6a | 4,293 | py | Python | tensorflow_probability/python/experimental/auto_batching/allocation_strategy_test.py | matthieucoquet/probability | 2426f4fc4743ceedc1a638a03d19ce6654ebff76 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/experimental/auto_batching/allocation_strategy_test.py | matthieucoquet/probability | 2426f4fc4743ceedc1a638a03d19ce6654ebff76 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/experimental/auto_batching/allocation_strategy_test.py | matthieucoquet/probability | 2426f4fc4743ceedc1a638a03d19ce6654ebff76 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 42.50495 | 89 | 0.708595 |
e654352e030fd9076b8115c80fd90ef275a16377 | 1,558 | py | Python | setup.py | boarnasia/bokelper | 257dd1e141a6b904f6232921b5759bc25fd25ca3 | [
"MIT"
] | null | null | null | setup.py | boarnasia/bokelper | 257dd1e141a6b904f6232921b5759bc25fd25ca3 | [
"MIT"
] | null | null | null | setup.py | boarnasia/bokelper | 257dd1e141a6b904f6232921b5759bc25fd25ca3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import re
from setuptools import setup, find_packages
long_description = '(empty)'
try:
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
long_description = f.read()
except: # noqa
pass
def get_version(package):
"""
Return package versio... | 26.862069 | 75 | 0.573171 |
edfd3268f4be0666e60202dcc3fd6ad13a92d852 | 233 | py | Python | swirls.py | bathelomeo/swirls | 5e6632c644cb56efaeb215c6bfddd00aa8e9531a | [
"MIT"
] | 1 | 2021-12-08T12:47:15.000Z | 2021-12-08T12:47:15.000Z | swirls.py | bathelomeo/swirls | 5e6632c644cb56efaeb215c6bfddd00aa8e9531a | [
"MIT"
] | null | null | null | swirls.py | bathelomeo/swirls | 5e6632c644cb56efaeb215c6bfddd00aa8e9531a | [
"MIT"
] | null | null | null | import turtle
colors = ['red', 'orange', 'Yellow', 'green', 'blue', 'Indigo', 'Violet']
t = turtle.Pen()
turtle.bgcolor('black')
for x in range(360):
t.pencolor(colors[x%7])
t.width(x//100 + 1)
t.forward(x)
t.left(59) | 25.888889 | 73 | 0.600858 |
b57374cb6dadc258bd64319a0a9c87707e2fc6e1 | 1,995 | py | Python | tests/absolute_url_overrides/tests.py | bpeschier/django | f54c0ec06e390dc5bce95fdccbcb51d6423da4f9 | [
"BSD-3-Clause"
] | 3 | 2020-05-30T17:08:51.000Z | 2021-12-14T02:55:19.000Z | tests/absolute_url_overrides/tests.py | bpeschier/django | f54c0ec06e390dc5bce95fdccbcb51d6423da4f9 | [
"BSD-3-Clause"
] | 1 | 2021-03-24T12:53:33.000Z | 2021-03-24T12:53:33.000Z | tests/absolute_url_overrides/tests.py | bpeschier/django | f54c0ec06e390dc5bce95fdccbcb51d6423da4f9 | [
"BSD-3-Clause"
] | 4 | 2016-07-31T14:29:15.000Z | 2021-10-19T03:32:44.000Z | from django.db import models
from django.test import TestCase
class AbsoluteUrlOverrideTests(TestCase):
def test_get_absolute_url(self):
"""
get_absolute_url() functions as a normal method.
"""
get_absolute_url = lambda o: '/test-a/%s/' % o.pk
TestA = self._create_model_cl... | 36.272727 | 90 | 0.603509 |
f88fde153bbaa6a99f1d4efe3b36ae748ca79b8b | 259 | py | Python | src/hyperparams.py | marka17/digit-recognition | 129fa77dc41eca4f4ffbc6a37045a194cd4beb12 | [
"MIT"
] | null | null | null | src/hyperparams.py | marka17/digit-recognition | 129fa77dc41eca4f4ffbc6a37045a194cd4beb12 | [
"MIT"
] | null | null | null | src/hyperparams.py | marka17/digit-recognition | 129fa77dc41eca4f4ffbc6a37045a194cd4beb12 | [
"MIT"
] | null | null | null | import attr
@attr.s
class Hyperparams:
# featurizing
sr: int = attr.ib(default=16000)
n_fft: int = attr.ib(default=800)
win_length: int = attr.ib(default=400)
hop_length: int = attr.ib(default=160)
n_mels: int = attr.ib(default=40)
| 19.923077 | 42 | 0.660232 |
5766310371956278a6a5719752b2d614131817cf | 1,375 | py | Python | .docs/create_tutorials.py | Gael-de-Sailly/flopy | 4104cf5e6a35e2a1fd6183442962ae5cb258fa7a | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | .docs/create_tutorials.py | Gael-de-Sailly/flopy | 4104cf5e6a35e2a1fd6183442962ae5cb258fa7a | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | .docs/create_tutorials.py | Gael-de-Sailly/flopy | 4104cf5e6a35e2a1fd6183442962ae5cb258fa7a | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | import os
import shutil
def create_notebooks():
wpth = ".working"
if os.path.isdir(wpth):
shutil.rmtree(wpth)
os.makedirs(wpth)
# copy the python files
pth = os.path.join("..", "examples", "Tutorials")
# get a list of python files
py_files = []
for dirpath, _, filenames in os... | 25.943396 | 79 | 0.557091 |
a59c810d5d8dae5cb381f3e13332ff4a20d610d0 | 3,253 | py | Python | tests/test_sdds.py | Mael-Le-Garrec/sdds | e5c40a85250dc7e0dd349996043b76dedaa72769 | [
"MIT"
] | null | null | null | tests/test_sdds.py | Mael-Le-Garrec/sdds | e5c40a85250dc7e0dd349996043b76dedaa72769 | [
"MIT"
] | null | null | null | tests/test_sdds.py | Mael-Le-Garrec/sdds | e5c40a85250dc7e0dd349996043b76dedaa72769 | [
"MIT"
] | null | null | null | import os
import io
import pytest
import numpy as np
from sdds.reader import (
read_sdds,
_gen_words,
_get_def_as_dict,
_read_header,
_sort_definitions,
)
from sdds.writer import write_sdds, _sdds_def_as_str
from sdds.classes import Parameter, Column, Array
CURRENT_DIR = os.path.dirname(__file__)
... | 28.535088 | 71 | 0.674147 |
12e019a0cd0941702089fe783e3911010f007a45 | 2,805 | py | Python | 3-Classification/Logistic Regression/Code.py | HMSheharyar/MachineLearning | 4f2fdf2a1cafb4b8c743dd3af3bd118a8a47ff68 | [
"MIT"
] | 1 | 2019-02-16T18:39:29.000Z | 2019-02-16T18:39:29.000Z | 3-Classification/Logistic Regression/Code.py | HMSheharyar/MachineLearning | 4f2fdf2a1cafb4b8c743dd3af3bd118a8a47ff68 | [
"MIT"
] | null | null | null | 3-Classification/Logistic Regression/Code.py | HMSheharyar/MachineLearning | 4f2fdf2a1cafb4b8c743dd3af3bd118a8a47ff68 | [
"MIT"
] | null | null | null | #------------------------------------------------- Logistic Regression -------------------------------------------------#
#---Libraries Import---#
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#---Importing the dataset---#
dataset = pd.read_csv('FileName.csv')
X = dataset.iloc[:, [2, 3]].val... | 39.507042 | 121 | 0.640285 |
6aa4511102f160cd929284b52afd5bead1b4fcd5 | 2,851 | py | Python | src/ros_comm/rostest/src/rostest/rostestutil.py | jungleni/ros_code_reading | 499e98c0b0d309da78060b19b55c420c22110d65 | [
"Apache-2.0"
] | 742 | 2017-07-05T02:49:36.000Z | 2022-03-30T12:55:43.000Z | src/ros_comm/rostest/src/rostest/rostestutil.py | jungleni/ros_code_reading | 499e98c0b0d309da78060b19b55c420c22110d65 | [
"Apache-2.0"
] | 73 | 2017-07-06T12:50:51.000Z | 2022-03-07T08:07:07.000Z | src/ros_comm/rostest/src/rostest/rostestutil.py | jungleni/ros_code_reading | 499e98c0b0d309da78060b19b55c420c22110d65 | [
"Apache-2.0"
] | 425 | 2017-07-04T22:03:29.000Z | 2022-03-29T06:59:06.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 34.768293 | 93 | 0.761838 |
c25f1bcda8ff8539a2d5c9d1df976c4d291a5066 | 4,034 | py | Python | alipay/aop/api/request/AlipayOpenAppOpenbizmockApisdkgrayQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOpenAppOpenbizmockApisdkgrayQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOpenAppOpenbizmockApisdkgrayQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenAppOpenbizmockApisdkgrayQueryModel import AlipayOpenAppOpenbizmockApisdkgrayQueryModel
class AlipayOpenAppOpenbizmockApisd... | 27.82069 | 148 | 0.649975 |
6b19b1f3b20438d1acf1b5400cb346f017fcb730 | 979 | py | Python | nncf/api/statistics.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | 310 | 2020-10-29T09:22:42.000Z | 2022-03-31T04:53:34.000Z | nncf/api/statistics.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | 615 | 2020-10-28T10:22:25.000Z | 2022-03-29T18:09:23.000Z | nncf/api/statistics.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | 86 | 2020-10-28T11:34:34.000Z | 2022-03-31T08:00:35.000Z | """
Copyright (c) 2021 Intel Corporation
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 writin... | 33.758621 | 88 | 0.727273 |
32d3f6e338be09d3c63b5364e5b990bc74983c92 | 10,564 | py | Python | src/robot/utils/importer.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 7 | 2015-02-25T10:55:02.000Z | 2015-11-04T03:20:05.000Z | src/robot/utils/importer.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 12 | 2015-02-24T17:00:06.000Z | 2015-07-31T08:32:07.000Z | src/robot/utils/importer.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 2 | 2015-12-15T11:00:35.000Z | 2018-02-24T18:11:24.000Z | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | 39.864151 | 85 | 0.647861 |
c6ba3109d49f1e6c2496772efa4f422e2e06dca5 | 900 | py | Python | transfer_model/utils/typing.py | ribeiro-hugo/smplx | c78618adca86e746d84fe5da3fab1edb319f3f1f | [
"Xnet",
"X11",
"RSA-MD"
] | 776 | 2019-06-14T22:04:27.000Z | 2022-03-30T20:07:35.000Z | transfer_model/utils/typing.py | ribeiro-hugo/smplx | c78618adca86e746d84fe5da3fab1edb319f3f1f | [
"Xnet",
"X11",
"RSA-MD"
] | 113 | 2019-06-14T22:44:02.000Z | 2022-03-18T13:31:30.000Z | transfer_model/utils/typing.py | ribeiro-hugo/smplx | c78618adca86e746d84fe5da3fab1edb319f3f1f | [
"Xnet",
"X11",
"RSA-MD"
] | 187 | 2019-06-17T06:20:27.000Z | 2022-03-31T17:24:32.000Z | # -*- coding: utf-8 -*-
# Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is
# holder of all proprietary rights on this computer program.
# You can only use this computer program if you have closed
# a license agreement with MPG or you get the right to use the computer
# program from someone who is... | 32.142857 | 77 | 0.752222 |
2cd792447d8cf9d38360fd5a5c700db40208f826 | 3,775 | py | Python | Tests/Functions/test_gmsh2.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | 1 | 2021-07-08T01:27:24.000Z | 2021-07-08T01:27:24.000Z | Tests/Functions/test_gmsh2.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | null | null | null | Tests/Functions/test_gmsh2.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | null | null | null | import pytest
import sys
import json
from os import makedirs
from os.path import join, isdir
from pyleecan.Functions.load import load
from pyleecan.Classes.Simu1 import Simu1
from pyleecan.Classes.Output import Output
from pyleecan.Classes.SlotM10 import SlotM10
from pyleecan.definitions import DATA_DIR
from Tests imp... | 27.355072 | 78 | 0.689007 |
4e6f7796677186446f72ee899174fe1556eccd6f | 25 | py | Python | andromeda/roles/assistant/models/__init__.py | sango09/andromeda_api_rest | b4a3267146f4f9a985fb3f512e652d4ff354bba2 | [
"MIT"
] | 1 | 2021-09-08T18:58:16.000Z | 2021-09-08T18:58:16.000Z | andromeda/roles/assistant/views/__init__.py | sango09/andromeda_api_rest | b4a3267146f4f9a985fb3f512e652d4ff354bba2 | [
"MIT"
] | null | null | null | andromeda/roles/assistant/views/__init__.py | sango09/andromeda_api_rest | b4a3267146f4f9a985fb3f512e652d4ff354bba2 | [
"MIT"
] | null | null | null | from .assistant import *
| 12.5 | 24 | 0.76 |
b64c3dd4d88aeba1dbde2f0ad1b0bea924bb06b6 | 1,364 | py | Python | Copy/Code lines statistics.py | zhsword/exercise | 4887086502520e4b6e6197785b58c4626ba8b5b7 | [
"MIT"
] | null | null | null | Copy/Code lines statistics.py | zhsword/exercise | 4887086502520e4b6e6197785b58c4626ba8b5b7 | [
"MIT"
] | null | null | null | Copy/Code lines statistics.py | zhsword/exercise | 4887086502520e4b6e6197785b58c4626ba8b5b7 | [
"MIT"
] | null | null | null | import easygui as g
import os
def search_file(star_dir):
os.chdir(star_dir)
for each_file in os.listdir(os.curdir):
ext = os.path.splitext(each_file)[1]
if ext in target:
lines = calc_code(each_file)
try:
file_list[ext] += 1
except KeyError:... | 22.733333 | 68 | 0.531525 |
91b9ef10253f37ef226b96e804d0987d67a10a5f | 23,280 | py | Python | pymatgen/transformations/advanced_transformations.py | yanikou19/pymatgen | 8ee0d9ff35a9c2fa4f00da5d423e536ed8914e31 | [
"MIT"
] | null | null | null | pymatgen/transformations/advanced_transformations.py | yanikou19/pymatgen | 8ee0d9ff35a9c2fa4f00da5d423e536ed8914e31 | [
"MIT"
] | null | null | null | pymatgen/transformations/advanced_transformations.py | yanikou19/pymatgen | 8ee0d9ff35a9c2fa4f00da5d423e536ed8914e31 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module implements more advanced transformations.
"""
__author__ = "Shyue Ping Ong, Stephen Dacek"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.com"
__... | 38.606965 | 80 | 0.61628 |
a97f4a798f8a0176bfeda8fbbf32d48663ca6f06 | 1,493 | py | Python | Python.FancyBear/quickstart.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 2 | 2021-02-04T06:47:45.000Z | 2021-07-28T10:02:10.000Z | Python.FancyBear/quickstart.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Python.FancyBear/quickstart.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import argparse
import httplib2
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import run_flow, argparser
# Parse the command-line arguments (e.g. --noauth_local_webserver)
parser = argparse... | 31.765957 | 75 | 0.780308 |
361f1688f8bc06eae6a5437b2ca43ac796b26d73 | 1,067 | py | Python | kubernetes/test/test_v1beta2_controller_revision_list.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta2_controller_revision_list.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta2_controller_revision_list.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | 23.711111 | 106 | 0.737582 |
995038f578e37c65fa19ada807f8541d88dff220 | 1,276 | py | Python | alexa-smarthome/sample_backend/lambda/lambda_api/python/endpoint_cloud/api_response.py | Ernestyj/PyStudy | ee2e314eb808b0b7c4574b3061814abb81bbb7ab | [
"Apache-2.0"
] | 1 | 2016-11-28T03:26:05.000Z | 2016-11-28T03:26:05.000Z | alexa-smarthome/sample_backend/lambda/lambda_api/python/endpoint_cloud/api_response.py | Ernestyj/PyStudy | ee2e314eb808b0b7c4574b3061814abb81bbb7ab | [
"Apache-2.0"
] | null | null | null | alexa-smarthome/sample_backend/lambda/lambda_api/python/endpoint_cloud/api_response.py | Ernestyj/PyStudy | ee2e314eb808b0b7c4574b3061814abb81bbb7ab | [
"Apache-2.0"
] | 2 | 2017-02-02T15:13:01.000Z | 2019-05-30T01:59:17.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use this file except in
# compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/asl/
#
# or in the "licen... | 33.578947 | 100 | 0.68652 |
6719b31dab37250fce85fa70d7df6e30439df8d7 | 2,563 | py | Python | python/cudf/cudf/tests/test_numpy_interop.py | rajkaramchedu-nvidia/cudf | b06e0ef22c5271697d0533c1bb0355964f51cc41 | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/tests/test_numpy_interop.py | rajkaramchedu-nvidia/cudf | b06e0ef22c5271697d0533c1bb0355964f51cc41 | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/tests/test_numpy_interop.py | rajkaramchedu-nvidia/cudf | b06e0ef22c5271697d0533c1bb0355964f51cc41 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pytest
from cudf.dataframe import DataFrame
def test_to_records_noindex():
df = DataFrame()
df["a"] = aa = np.arange(10, dtype=np.int32)
df["b"] = bb = np.arange(10, 20, dtype=np.float64)
rec = df.to_records(index=False)
assert rec.dtype.names == ("a", "b")
np.testi... | 35.109589 | 71 | 0.642606 |
0cba385650c2615c4ab8f3420704882163430c8e | 300 | py | Python | setup.py | SavinaRoja/PyKeyboard | 4b7201821f461015bd72f87c4ca15e72bb421c3f | [
"WTFPL"
] | 23 | 2015-05-02T05:20:24.000Z | 2021-11-23T01:35:05.000Z | setup.py | SavinaRoja/PyKeyboard | 4b7201821f461015bd72f87c4ca15e72bb421c3f | [
"WTFPL"
] | 1 | 2019-02-21T07:12:29.000Z | 2019-02-21T07:12:29.000Z | setup.py | SavinaRoja/PyKeyboard | 4b7201821f461015bd72f87c4ca15e72bb421c3f | [
"WTFPL"
] | 13 | 2015-07-21T04:54:45.000Z | 2022-01-02T15:07:20.000Z | from distutils.core import setup
setup(name='PyKeyboard',
version='0.1',
description='Cross-platform keyboard control',
author='Paul Barton',
author_email='pablo.barton@gmail.com',
url='https://github.com/SavinaRoja/PyKeyboard',
packages = ["pykeyboard"]
)
| 27.272727 | 53 | 0.656667 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.