hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ed7122cf74b8267894bbe1566c04da46ac268882 | 906 | py | Python | src/djanban/apps/work_hours_packages/migrations/0007_auto_20170529_1414.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 33 | 2017-06-14T18:04:25.000Z | 2021-06-15T07:07:56.000Z | src/djanban/apps/work_hours_packages/migrations/0007_auto_20170529_1414.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 1 | 2017-05-10T08:45:55.000Z | 2017-05-10T08:45:55.000Z | src/djanban/apps/work_hours_packages/migrations/0007_auto_20170529_1414.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 8 | 2017-08-27T11:14:25.000Z | 2021-03-03T12:11:16.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-29 12:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('work_hours_packages', '0006_auto_20170529_1406'),
]
operations = [
migrations... | 34.846154 | 208 | 0.668874 |
ade4627deecaf734eb4e3e379ca04534bc7c452c | 2,557 | py | Python | examples/information_extraction/parse_subtrees.py | cmgreivel/spaCy | a31506e06060c559abfeda043503935691af2e98 | [
"MIT"
] | 88 | 2018-05-06T17:28:23.000Z | 2022-03-06T20:19:16.000Z | examples/information_extraction/parse_subtrees.py | cmgreivel/spaCy | a31506e06060c559abfeda043503935691af2e98 | [
"MIT"
] | 12 | 2018-07-19T15:11:57.000Z | 2021-08-05T11:58:29.000Z | examples/information_extraction/parse_subtrees.py | cmgreivel/spaCy | a31506e06060c559abfeda043503935691af2e98 | [
"MIT"
] | 10 | 2018-07-28T22:43:04.000Z | 2020-11-22T22:58:21.000Z | #!/usr/bin/env python
# coding: utf8
"""This example shows how to navigate the parse tree including subtrees
attached to a word.
Based on issue #252:
"In the documents and tutorials the main thing I haven't found is
examples on how to break sentences down into small sub thoughts/chunks. The
noun_chunks is handy, but h... | 39.338462 | 80 | 0.702777 |
018c11f48fe73b1e03815454a32e9d7efee9430c | 3,763 | py | Python | travis_pypi_setup.py | lettherebe-test/live_demo | 605392e521a51b6e97475ef03f297709bd7ea957 | [
"BSD-3-Clause"
] | null | null | null | travis_pypi_setup.py | lettherebe-test/live_demo | 605392e521a51b6e97475ef03f297709bd7ea957 | [
"BSD-3-Clause"
] | null | null | null | travis_pypi_setup.py | lettherebe-test/live_demo | 605392e521a51b6e97475ef03f297709bd7ea957 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Update encrypted deploy password in Travis config file
"""
from __future__ import print_function
import base64
import json
import os
from getpass import getpass
import yaml
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.h... | 30.593496 | 79 | 0.700771 |
64b38b01c675fbe80396bc5fc0e4c4f40a497be8 | 23 | py | Python | auth0/__init__.py | GDGSNF/auth0-python | 2714a3a5d6acac6c6589b01c8d94d5d5cd6deb0d | [
"MIT"
] | null | null | null | auth0/__init__.py | GDGSNF/auth0-python | 2714a3a5d6acac6c6589b01c8d94d5d5cd6deb0d | [
"MIT"
] | null | null | null | auth0/__init__.py | GDGSNF/auth0-python | 2714a3a5d6acac6c6589b01c8d94d5d5cd6deb0d | [
"MIT"
] | null | null | null | __version__ = '3.21.0'
| 11.5 | 22 | 0.652174 |
67bed3d69752092d0b87f7ef3b3588a86aef3dfd | 29,036 | py | Python | tests/modeladmin/tests.py | beniwohli/django | 514b2c989a948e3c59bda0da0c9427acf643cf5b | [
"PSF-2.0",
"BSD-3-Clause"
] | 12 | 2018-06-30T15:20:10.000Z | 2020-10-20T02:15:00.000Z | tests/modeladmin/tests.py | beniwohli/django | 514b2c989a948e3c59bda0da0c9427acf643cf5b | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/modeladmin/tests.py | beniwohli/django | 514b2c989a948e3c59bda0da0c9427acf643cf5b | [
"PSF-2.0",
"BSD-3-Clause"
] | 5 | 2018-07-17T05:41:04.000Z | 2020-07-31T12:30:46.000Z | from datetime import date
from django import forms
from django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry
from django.contrib.admin.options import (
HORIZONTAL, VERTICAL, ModelAdmin, TabularInline,
get_content_type_for_model,
)
from django.contrib.admin.sites import AdminSite
from django.... | 38.055046 | 114 | 0.602666 |
dfb184c04843ec9fc24709c674330d9f57b1e3f7 | 4,241 | py | Python | pybrain/datasets/supervised.py | zygmuntz/pybrain | 049c7f0dc8896f149813e14e4d2c0ab0c272cde4 | [
"BSD-3-Clause"
] | 2 | 2015-11-12T16:04:33.000Z | 2016-01-25T21:48:44.000Z | pybrain/datasets/supervised.py | zygmuntz/pybrain | 049c7f0dc8896f149813e14e4d2c0ab0c272cde4 | [
"BSD-3-Clause"
] | null | null | null | pybrain/datasets/supervised.py | zygmuntz/pybrain | 049c7f0dc8896f149813e14e4d2c0ab0c272cde4 | [
"BSD-3-Clause"
] | 7 | 2015-05-27T22:10:03.000Z | 2019-09-20T13:25:05.000Z | from __future__ import print_function
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de'
from random import sample
from scipy import isscalar
from pybrain.datasets.dataset import DataSet
from pybrain.utilities import fListToString
class SupervisedDataSet(DataSet):
"""SupervisedDataSets have two fields, one ... | 35.341667 | 84 | 0.594435 |
fdbc103278c41cf42171f452d500606d25e3c8f7 | 1,791 | py | Python | var/spack/repos/builtin/packages/neko/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/neko/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/neko/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 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.package import *
class Neko(AutotoolsPackage, CudaPackage, ROCmPackage):
"""Neko: A modern, portable, and... | 39.8 | 95 | 0.692351 |
cf068f0406fe41221f43239cabf77a0f144236e1 | 8,826 | py | Python | tensor2tensor/data_generators/celeba.py | repoloper/tensor2tensor | 2fd91d34b8e6d79599c0612e446175174e838b9d | [
"Apache-2.0"
] | 4 | 2019-04-20T23:28:41.000Z | 2021-01-03T03:21:43.000Z | tensor2tensor/data_generators/celeba.py | repoloper/tensor2tensor | 2fd91d34b8e6d79599c0612e446175174e838b9d | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/celeba.py | repoloper/tensor2tensor | 2fd91d34b8e6d79599c0612e446175174e838b9d | [
"Apache-2.0"
] | 1 | 2019-01-29T18:44:17.000Z | 2019-01-29T18:44:17.000Z | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | 36.92887 | 97 | 0.704736 |
784639434dd8d153d1ac72cfc6d9fcbbcca5eba4 | 544 | py | Python | contento/processors.py | inmagik/contento | b7430e42aedd80809a57d599a5841c60fd16c21f | [
"MIT"
] | 1 | 2016-10-11T17:00:30.000Z | 2016-10-11T17:00:30.000Z | contento/processors.py | inmagik/contento | b7430e42aedd80809a57d599a5841c60fd16c21f | [
"MIT"
] | 23 | 2016-08-05T17:07:31.000Z | 2021-06-10T23:30:06.000Z | contento/processors.py | inmagik/contento | b7430e42aedd80809a57d599a5841c60fd16c21f | [
"MIT"
] | 1 | 2016-09-04T23:39:40.000Z | 2016-09-04T23:39:40.000Z | import re
from django.core.urlresolvers import reverse
contento_link = "contento://(?P<url>[\w-]+)"
contento_link_re = re.compile(contento_link)
class InternalLinks(object):
def process(self, text):
def f(matchf):
match = matchf.groups()
url = match[0] or "_root"
try:
... | 27.2 | 71 | 0.568015 |
682e695bd98be1372df4814b2220fcb45f8c800c | 153 | py | Python | Chapter 08/ch8_22.py | bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE | f6a4194684515495d00aa38347a725dd08f39a0c | [
"MIT"
] | null | null | null | Chapter 08/ch8_22.py | bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE | f6a4194684515495d00aa38347a725dd08f39a0c | [
"MIT"
] | null | null | null | Chapter 08/ch8_22.py | bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE | f6a4194684515495d00aa38347a725dd08f39a0c | [
"MIT"
] | null | null | null | cities = ['Mumbai', 'London', 'Paris', 'New York']
pos = cities.index('Bangkok')
print('The index of Bangkok is: ', pos)
# error Bangkok not in list | 30.6 | 51 | 0.647059 |
b2e9f70468ad0034eecda9d18963e7bf3e3fa45a | 4,932 | py | Python | gym_malware/envs/malware_env.py | portalnir/malware-adversarial | 296a42f9d11ebfc8271cde469916c90f98b80338 | [
"MIT"
] | 1 | 2021-12-15T01:23:11.000Z | 2021-12-15T01:23:11.000Z | gym_malware/envs/malware_env.py | portalnir/malware-adversarial | 296a42f9d11ebfc8271cde469916c90f98b80338 | [
"MIT"
] | 4 | 2020-11-13T18:37:24.000Z | 2022-02-10T01:26:52.000Z | gym_malware/envs/malware_env.py | portalnir/malware-adversarial | 296a42f9d11ebfc8271cde469916c90f98b80338 | [
"MIT"
] | null | null | null | import random
import gym
from collections import OrderedDict
from gym import error, spaces, utils
from gym.utils import seeding
import hashlib
import os
import numpy as np
from gym_malware.envs.utils import interface, pefeatures
from gym_malware.envs.controls import manipulate2 as manipulate
ACTION_LOOKUP = {i: act f... | 36.264706 | 112 | 0.587388 |
f642133ce9997be66942479c81a5dccf93f5a1ca | 2,993 | py | Python | my_mourse/api_views.py | DarishkaAMS/Django_Projects-Mourse_catalog | d11606bc75b6887a260236a6546a4ea3ce050088 | [
"MIT"
] | null | null | null | my_mourse/api_views.py | DarishkaAMS/Django_Projects-Mourse_catalog | d11606bc75b6887a260236a6546a4ea3ce050088 | [
"MIT"
] | null | null | null | my_mourse/api_views.py | DarishkaAMS/Django_Projects-Mourse_catalog | d11606bc75b6887a260236a6546a4ea3ce050088 | [
"MIT"
] | null | null | null | import json
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.core.exceptions import ObjectDoesNotExist
from django.http import JsonResponse
from django.shortcuts import redirect, render, get_... | 31.505263 | 78 | 0.710324 |
2d51ca302a761ab48ca0a98c199bcbe2dc9dd45b | 2,166 | py | Python | trade_remedies_api/documents/migrations/0005_auto_20190502_0912.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | 1 | 2020-08-13T10:37:15.000Z | 2020-08-13T10:37:15.000Z | trade_remedies_api/documents/migrations/0005_auto_20190502_0912.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | 4 | 2020-09-10T13:41:52.000Z | 2020-12-16T09:00:21.000Z | trade_remedies_api/documents/migrations/0005_auto_20190502_0912.py | uktrade/trade-remedies-api | fbe2d142ef099c7244788a0f72dd1003eaa7edce | [
"MIT"
] | null | null | null | import logging
from django.db import migrations
from documents.models import DocumentBundle
logger = logging.getLogger(__name__)
def migrate_case_documents(apps, schema_editor):
try:
from cases.models import CaseDocument, SubmissionType
from cases.constants import SUBMISSION_TYPE_REGISTER_INTERE... | 35.508197 | 94 | 0.604801 |
416603bac453c4c7e73891d53bdfe21ffbc54d80 | 1,466 | py | Python | _Tracking/MLStartPoint.py | horribleheffalump/AUVResearch | f9bf37da4a74662fcd1df88a8177a654fccf0728 | [
"MIT"
] | 4 | 2020-06-23T07:24:40.000Z | 2021-05-24T04:57:52.000Z | _Tracking/MLStartPoint.py | horribleheffalump/AUVResearch | f9bf37da4a74662fcd1df88a8177a654fccf0728 | [
"MIT"
] | null | null | null | _Tracking/MLStartPoint.py | horribleheffalump/AUVResearch | f9bf37da4a74662fcd1df88a8177a654fccf0728 | [
"MIT"
] | 3 | 2020-09-23T07:14:26.000Z | 2021-07-10T12:50:28.000Z | from StaticEstimates.ConditionalMean import ConditionalMean
from StaticEstimates.PriorLearn import PriorLearn
from _Tracking.TrackingModel import *
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import MultiTaskLassoCV
from sklearn.pipeline import Pipeline
from joblib import dump, load... | 31.869565 | 108 | 0.761255 |
e9da23eef781444e4a638897d5533137cb613ee4 | 17,634 | py | Python | conans/client/remote_manager.py | brianembry/conan | 562e5b080cda1f2644fecdd40ae30faef1cf6640 | [
"MIT"
] | null | null | null | conans/client/remote_manager.py | brianembry/conan | 562e5b080cda1f2644fecdd40ae30faef1cf6640 | [
"MIT"
] | null | null | null | conans/client/remote_manager.py | brianembry/conan | 562e5b080cda1f2644fecdd40ae30faef1cf6640 | [
"MIT"
] | null | null | null | import os
import stat
import tarfile
import traceback
import shutil
import time
from requests.exceptions import ConnectionError
from conans.errors import ConanException, ConanConnectionError, NotFoundException
from conans.model.manifest import gather_files
from conans.paths import PACKAGE_TGZ_NAME, CONANINFO, CONAN_M... | 44.643038 | 112 | 0.647216 |
a778f3811b2428a76a12b4d23eb82ae1eb8334e7 | 20,246 | py | Python | exchanges/quickswap.py | 0x1d00ffff/0xbtc-discord-price-bot | afa33821bb77b63fa528a784b5ef9b913eaac115 | [
"MIT"
] | 10 | 2018-05-01T14:54:55.000Z | 2022-01-24T09:37:31.000Z | exchanges/quickswap.py | 0x1d00ffff/0xbtc-discord-price-bot | afa33821bb77b63fa528a784b5ef9b913eaac115 | [
"MIT"
] | 1 | 2019-04-10T16:44:52.000Z | 2019-04-10T16:44:52.000Z | exchanges/quickswap.py | 0x1d00ffff/0xbtc-discord-price-bot | afa33821bb77b63fa528a784b5ef9b913eaac115 | [
"MIT"
] | 16 | 2018-06-06T21:44:18.000Z | 2021-09-22T09:35:59.000Z | """
API for Uniswap v2 distributed exchange (uniswap.exchange)
Price info is pulled from the smart contract
"""
import logging
from web3 import Web3
import time
import requests
from .base_exchange import Daily24hChangeTrackedAPI, NoLiquidityException
from .uniswap_v2_abi import exchange_abi
from .uniswap_v2_router_abi... | 51.126263 | 214 | 0.69347 |
93452d01af873613cc36e7d24d70472104cda038 | 416 | py | Python | tasks/UDEMY/100_days/L005/day-5-day-5-end.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | 2 | 2022-01-19T18:01:35.000Z | 2022-02-06T06:54:38.000Z | tasks/UDEMY/100_days/L005/day-5-day-5-end.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | null | null | null | tasks/UDEMY/100_days/L005/day-5-day-5-end.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | null | null | null | #For Loop with Lists
fruits = ["Apple", "Peach", "Pear"]
for fruit in fruits:
print(fruit)
print(fruit + " Pie")
#For Loop with Range
for number in range(1, 100):
print(number)
for number in range(1, 101):
print(number)
for number in range(1, 11, 3):
print(number)
#Calculating the sum of all th... | 18.909091 | 54 | 0.65625 |
d6330de053af2086188e2a8adbf5f69b40451656 | 3,390 | py | Python | engine/__init__.py | laashub/LaasOps | 4eb088f99cc3542ff24c2fa5898d1c682dca0498 | [
"Apache-2.0"
] | 7 | 2020-03-24T08:13:19.000Z | 2020-04-18T20:17:43.000Z | engine/__init__.py | laashub/LaasOps | 4eb088f99cc3542ff24c2fa5898d1c682dca0498 | [
"Apache-2.0"
] | null | null | null | engine/__init__.py | laashub/LaasOps | 4eb088f99cc3542ff24c2fa5898d1c682dca0498 | [
"Apache-2.0"
] | 5 | 2020-03-24T08:13:27.000Z | 2020-04-24T03:27:51.000Z | import importlib
import os
from distribution.component import mymysql
ENGINE_LOGIC_DIR_STR = "engine_logic_dir"
ENGINE_LOGIC_STR = "engine_logic"
class Runtime(object):
@staticmethod
def define_dependencies(dependencies):
for item in dependencies:
try:
importlib.import_mo... | 39.418605 | 131 | 0.618584 |
4170bcd5f40fc4b753f10abb4f9949819b669599 | 9,887 | py | Python | modules/convenient_universal.py | DamienIrving/climate-analysis | 4b9911101f85bde30ac6e7764119e6410d7f633d | [
"MIT"
] | 37 | 2016-04-24T09:05:06.000Z | 2021-11-08T08:47:40.000Z | modules/convenient_universal.py | YonSci/climate-analysis | 4b9911101f85bde30ac6e7764119e6410d7f633d | [
"MIT"
] | 35 | 2015-02-18T23:42:34.000Z | 2017-03-12T01:33:48.000Z | modules/convenient_universal.py | YonSci/climate-analysis | 4b9911101f85bde30ac6e7764119e6410d7f633d | [
"MIT"
] | 16 | 2015-02-18T23:38:01.000Z | 2022-02-17T08:39:29.000Z | """Collection of convenient functions that will work with my anaconda or uvcdat install.
Functions:
adjust_lon_range -- Express longitude values in desired 360 degree interval
apply_lon_filter -- Set values outside of specified longitude range to zero
broadcast_array -- Broadcast an array to a target shap... | 30.515432 | 98 | 0.627794 |
3e6752a29d673de35a276a8caff96345f0c60760 | 2,590 | py | Python | baseclasses/pyAero_geometry.py | akleb/baseclasses | 8e8b9ee4b9e7d84e4e3f8fb28c81e80b8b459338 | [
"Apache-2.0"
] | null | null | null | baseclasses/pyAero_geometry.py | akleb/baseclasses | 8e8b9ee4b9e7d84e4e3f8fb28c81e80b8b459338 | [
"Apache-2.0"
] | null | null | null | baseclasses/pyAero_geometry.py | akleb/baseclasses | 8e8b9ee4b9e7d84e4e3f8fb28c81e80b8b459338 | [
"Apache-2.0"
] | null | null | null | """
pyAero_geometry
Holds the Python Aerodynamic Analysis Classes (base and inherited).
"""
# =============================================================================
# Geometry Class
# =============================================================================
class Geometry(object):
"""
Abstract Cla... | 23.981481 | 113 | 0.447876 |
8c5a04ffbe07fb95d8ad2f7cc9b8582166c756ac | 4,077 | py | Python | datasets/cals/__init__.py | LinguList/lexibank-data-old | 7bf886597afa26863de8527dfd8529d9eb99fcd6 | [
"Apache-2.0"
] | null | null | null | datasets/cals/__init__.py | LinguList/lexibank-data-old | 7bf886597afa26863de8527dfd8529d9eb99fcd6 | [
"Apache-2.0"
] | null | null | null | datasets/cals/__init__.py | LinguList/lexibank-data-old | 7bf886597afa26863de8527dfd8529d9eb99fcd6 | [
"Apache-2.0"
] | 1 | 2018-10-19T11:58:00.000Z | 2018-10-19T11:58:00.000Z | # coding=utf-8
"""
Note: We run libreoffice to convert from doc to docx after download.
"""
from __future__ import unicode_literals, print_function
from subprocess import check_call
import re
from collections import defaultdict
from docx import Document
from clldutils.dsv import UnicodeWriter, reader
from clldutils.mi... | 31.122137 | 86 | 0.509198 |
f99eea7aaf0bbb62146ddfb98078e1f23bb34bb0 | 1,160 | py | Python | iriusrisk-python-client-lib/test/test_productsrefcomponentscomponent_reftestscwe_source.py | iriusrisk/iriusrisk-python-client-lib | 4912706cd1e5c0bc555dbc7da02fb64cbeab3b18 | [
"Apache-2.0"
] | null | null | null | iriusrisk-python-client-lib/test/test_productsrefcomponentscomponent_reftestscwe_source.py | iriusrisk/iriusrisk-python-client-lib | 4912706cd1e5c0bc555dbc7da02fb64cbeab3b18 | [
"Apache-2.0"
] | null | null | null | iriusrisk-python-client-lib/test/test_productsrefcomponentscomponent_reftestscwe_source.py | iriusrisk/iriusrisk-python-client-lib | 4912706cd1e5c0bc555dbc7da02fb64cbeab3b18 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
IriusRisk API
Products API # noqa: E501
OpenAPI spec version: 1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import iriusrisk_python_client_lib
from iriusrisk_python_client_lib.models.products... | 28.292683 | 166 | 0.781034 |
505d06958908e030648ea3aafe1169db48ac4d74 | 3,448 | py | Python | tradingBot/tests/integration/helpers.py | yamf0/TradingBot | 9e5b7fb8f537f33ece71c9caecc4c19f13e0fc02 | [
"MIT"
] | 1 | 2020-11-10T17:17:23.000Z | 2020-11-10T17:17:23.000Z | tradingBot/tests/integration/helpers.py | yamf0/TradingBot | 9e5b7fb8f537f33ece71c9caecc4c19f13e0fc02 | [
"MIT"
] | 1 | 2020-12-15T10:55:38.000Z | 2020-12-15T10:55:38.000Z | tradingBot/tests/integration/helpers.py | yamf0/TradingBot | 9e5b7fb8f537f33ece71c9caecc4c19f13e0fc02 | [
"MIT"
] | null | null | null |
from tradingBot.src.utils.helpers import counter
from tradingBot.src.utils.helpers import mqttClientBase
import json
import subprocess
import signal
import psutil
import time
import os
import sys
sys.path.insert(0, r'')
class mqttTestclientClass(mqttClientBase):
##
# @class mqttTestclientClass
# @brie... | 25.731343 | 113 | 0.582367 |
9988b230f99278a1dbcb299fcd8718fb63b3469f | 6,066 | py | Python | tests/functional/test_custom_log_plugin.py | AKhodus/adcm | 98dbf22af3f1c6afa94505e9acaff0ac4088a602 | [
"Apache-2.0"
] | null | null | null | tests/functional/test_custom_log_plugin.py | AKhodus/adcm | 98dbf22af3f1c6afa94505e9acaff0ac4088a602 | [
"Apache-2.0"
] | null | null | null | tests/functional/test_custom_log_plugin.py | AKhodus/adcm | 98dbf22af3f1c6afa94505e9acaff0ac4088a602 | [
"Apache-2.0"
] | null | null | null | # 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
# distributed under t... | 43.021277 | 101 | 0.688922 |
d7c7bb67a78821caa0c24368826735d09195f713 | 1,367 | py | Python | reminder.py | CrEaTiiOn187/tg-management-bot | 554dbdd2134c14466baff3f3d448ac66f54ced03 | [
"MIT"
] | 3 | 2021-10-21T18:16:37.000Z | 2022-03-10T18:24:55.000Z | reminder.py | NoodleSoup/tg-management-bot | 554dbdd2134c14466baff3f3d448ac66f54ced03 | [
"MIT"
] | null | null | null | reminder.py | NoodleSoup/tg-management-bot | 554dbdd2134c14466baff3f3d448ac66f54ced03 | [
"MIT"
] | 1 | 2020-07-15T07:43:55.000Z | 2020-07-15T07:43:55.000Z | def reminder(bot, update, job_queue):
#from telegram.ext import Updater
#updater = Updater(token="698907268:AAGQE2j1nGV1vWzYeiANn8x_G7U6IWiilZY")
#j = updater.job_queue
msg = update.message
chat_id = msg.chat_id
user = bot.get_chat_member(chat_id = chat_id , user_id = msg.from_user.id)['status']
... | 35.973684 | 123 | 0.648135 |
2b75497001575f3ef3aabf4047d9edb51e621378 | 2,209 | py | Python | .venv/lib/python3.6/site-packages/sphinx/environment/collectors/dependencies.py | danielltm/sample | 9f8dc92653bf26ae08451a2bfc1491b71cc31502 | [
"MIT"
] | 1 | 2019-03-26T03:07:13.000Z | 2019-03-26T03:07:13.000Z | .venv/lib/python3.6/site-packages/sphinx/environment/collectors/dependencies.py | danielltm/sample | 9f8dc92653bf26ae08451a2bfc1491b71cc31502 | [
"MIT"
] | 301 | 2020-10-03T10:46:31.000Z | 2022-03-27T23:46:23.000Z | .venv/lib/python3.6/site-packages/sphinx/environment/collectors/dependencies.py | danielltm/sample | 9f8dc92653bf26ae08451a2bfc1491b71cc31502 | [
"MIT"
] | 1 | 2020-07-24T17:53:25.000Z | 2020-07-24T17:53:25.000Z | # -*- coding: utf-8 -*-
"""
sphinx.environment.collectors.dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The dependencies collector components for sphinx.environment.
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from os impo... | 32.970149 | 82 | 0.637845 |
01e7bc37e742fcb0bac0879f5d353ba87fd80390 | 2,933 | py | Python | authapp/views.py | dmitricus/robotshop | 4c89a70e9191a8073efc1f2709bea4b79c0a6532 | [
"MIT"
] | null | null | null | authapp/views.py | dmitricus/robotshop | 4c89a70e9191a8073efc1f2709bea4b79c0a6532 | [
"MIT"
] | null | null | null | authapp/views.py | dmitricus/robotshop | 4c89a70e9191a8073efc1f2709bea4b79c0a6532 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.shortcuts import render, HttpResponseRedirect
from authapp.forms import ShopUserLoginForm
from django.contrib import auth
from django.contrib.auth.decorators import login_required
from django.urls import reverse
from basketapp.models import Basket
from authapp.forms impor... | 27.411215 | 93 | 0.666553 |
3e8d819394c76d55d1abbc440e7ac91f0f95427a | 5,088 | py | Python | python/ray/autoscaler/local/node_provider.py | andyljones/ray | 52dfde1cbb7131fd62ebcb00f5a2b22ced7321ad | [
"Apache-2.0"
] | 1 | 2019-11-04T05:08:47.000Z | 2019-11-04T05:08:47.000Z | python/ray/autoscaler/local/node_provider.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | null | null | null | python/ray/autoscaler/local/node_provider.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from filelock import FileLock
from threading import RLock
import json
import os
import socket
import logging
from ray.autoscaler.node_provider import NodeProvider
from ray.autoscaler.tags import TAG_RAY_NODE_T... | 36.085106 | 79 | 0.527516 |
c8b81cdf6477edf579fa365ca104420e87361e39 | 9,478 | py | Python | tools/codegen/utils.py | ljhOfGithub/pytorch | c568f7b16f2a98d72ff5b7c6c6161b67b2c27514 | [
"Intel"
] | 1 | 2022-03-29T00:44:31.000Z | 2022-03-29T00:44:31.000Z | tools/codegen/utils.py | ljhOfGithub/pytorch | c568f7b16f2a98d72ff5b7c6c6161b67b2c27514 | [
"Intel"
] | null | null | null | tools/codegen/utils.py | ljhOfGithub/pytorch | c568f7b16f2a98d72ff5b7c6c6161b67b2c27514 | [
"Intel"
] | 1 | 2022-03-28T21:49:41.000Z | 2022-03-28T21:49:41.000Z | import contextlib
import functools
import hashlib
import os
import re
import textwrap
from argparse import Namespace
from typing import Tuple, List, Iterable, Iterator, Callable, Sequence, TypeVar, Optional, Dict, Any, Union, Set, NoReturn
from enum import Enum
from tools.codegen.code_template import CodeTemplate
# S... | 38.528455 | 122 | 0.631779 |
e50203a4e9a5d188e8e4bd71563446b8604bb534 | 8,561 | py | Python | caf/scripts/RsaPersCom.py | sduprey/open_data_platform | a20b5ab6a1ca99ae8aef11ac74a314114144d291 | [
"MIT"
] | 2 | 2019-12-03T13:35:31.000Z | 2019-12-03T13:35:37.000Z | caf/scripts/RsaPersCom.py | sduprey/open_data_platform | a20b5ab6a1ca99ae8aef11ac74a314114144d291 | [
"MIT"
] | null | null | null | caf/scripts/RsaPersCom.py | sduprey/open_data_platform | a20b5ab6a1ca99ae8aef11ac74a314114144d291 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
import glob
#Variable Type Label
#Communes Char NOM DE LA COMMUNE
#Codes_Insee Char NUMERO DE LA COMMUNE, CODE INSEE
#NB_Pers_par_Foyer_Alloc Num NOMBRE DE PERSONNES COUVERTES PAR UNE PRESTATION DE LA BRANCHE FAMILLE
#NB_Pers_couv_RSA Num NOMBRE DE PERSONNES COUVER... | 58.238095 | 151 | 0.759257 |
d0fb32ba199fcc42c37311042d9572cf8c1a397e | 227 | py | Python | server/constRPC.py | CostaDiego/aws-server-client-py | 8dca81fd2a629c4ec8ee6448d3a4dbb31ef16234 | [
"MIT"
] | null | null | null | server/constRPC.py | CostaDiego/aws-server-client-py | 8dca81fd2a629c4ec8ee6448d3a4dbb31ef16234 | [
"MIT"
] | null | null | null | server/constRPC.py | CostaDiego/aws-server-client-py | 8dca81fd2a629c4ec8ee6448d3a4dbb31ef16234 | [
"MIT"
] | null | null | null | OK = '1'
ADD = '2'
APPEND = '3'
GETVALUE = '4'
CREATE = '5'
STOP = '6'
HOST = '172.31.88.77'
PORT = 12304
CLIENT1 = 12305
CLIENT2 = 12306
HOSTCL1 = '172.31.89.146'
HOSTCL2 = '172.31.87.222'
| 17.461538 | 26 | 0.506608 |
109c01297b35e5e88118b4b36dfd87ee82bf2393 | 2,964 | py | Python | omega_converter/converter_functions/road/structural_object.py | lu-w/criticality-recognition | 5ad2e12699ad4bf2d7f60ce9e30f26110adce436 | [
"MIT"
] | 4 | 2022-03-13T19:33:43.000Z | 2022-03-15T22:20:36.000Z | omega_converter/converter_functions/road/structural_object.py | lu-w/criticality-recognition | 5ad2e12699ad4bf2d7f60ce9e30f26110adce436 | [
"MIT"
] | null | null | null | omega_converter/converter_functions/road/structural_object.py | lu-w/criticality-recognition | 5ad2e12699ad4bf2d7f60ce9e30f26110adce436 | [
"MIT"
] | null | null | null | from ..utils import *
@monkeypatch(omega_format.StructuralObject)
def to_auto(cls, world: owlready2.World, scenes, identifier=None, parent_identifier=None):
# Fetches ontologies
ph = auto.get_ontology(auto.Ontology.Physics, world)
l2_core = auto.get_ontology(auto.Ontology.L2_Core, world)
l2_de = auto... | 52 | 90 | 0.779352 |
a0ea3c474b5869b4cfab332d06af9f7cd009ddd7 | 907 | py | Python | ashic/misc/mat2hicrep.py | wmalab/ASHIC | f9dbee64ef13c7f10c25bc266209fb7fc430d39e | [
"MIT"
] | 5 | 2021-01-28T21:51:55.000Z | 2022-03-04T17:35:59.000Z | ashic/misc/mat2hicrep.py | wmalab/ASHIC | f9dbee64ef13c7f10c25bc266209fb7fc430d39e | [
"MIT"
] | 4 | 2020-09-01T06:23:49.000Z | 2022-01-11T03:58:04.000Z | ashic/misc/mat2hicrep.py | wmalab/ASHIC | f9dbee64ef13c7f10c25bc266209fb7fc430d39e | [
"MIT"
] | 1 | 2020-12-06T07:03:50.000Z | 2020-12-06T07:03:50.000Z | import os
import click
import numpy as np
def convert(mat, ch, r, fh):
n = mat.shape[0]
start = 0
for i in range(n):
end = start + r
fh.write("{}\t{}\t{}\t".format(ch, start, end) + '\t'.join(map(str, mat[i])) + "\n")
start = end
@click.command()
@click.argument('matfile')
@click.a... | 27.484848 | 92 | 0.588754 |
81fd8d5ff99dac0ea700184d0817a4a885871b75 | 1,832 | py | Python | python/src/nnabla/backward_function/clip_grad_by_value.py | sdonatti/nnabla | ac4a42e62dd358f16bd79c08a9a9f3d83c0100c9 | [
"Apache-2.0"
] | 1 | 2020-08-03T12:49:19.000Z | 2020-08-03T12:49:19.000Z | python/src/nnabla/backward_function/clip_grad_by_value.py | sdonatti/nnabla | ac4a42e62dd358f16bd79c08a9a9f3d83c0100c9 | [
"Apache-2.0"
] | 1 | 2020-11-09T07:33:29.000Z | 2020-11-09T07:33:29.000Z | python/src/nnabla/backward_function/clip_grad_by_value.py | sdonatti/nnabla | ac4a42e62dd358f16bd79c08a9a9f3d83c0100c9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Sony Corporation. 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 applicabl... | 37.387755 | 87 | 0.679039 |
563096a84e268e7d2a31dd466f7dbdc649a54fca | 18,452 | py | Python | custom_step/_version.py | MolSSI/custom_step | fb0a1f6a07f93d2d72f497e44a9f05e57b2df8c3 | [
"BSD-3-Clause"
] | null | null | null | custom_step/_version.py | MolSSI/custom_step | fb0a1f6a07f93d2d72f497e44a9f05e57b2df8c3 | [
"BSD-3-Clause"
] | 35 | 2019-12-17T19:48:36.000Z | 2021-11-27T20:15:05.000Z | custom_step/_version.py | MolSSI/custom_step | fb0a1f6a07f93d2d72f497e44a9f05e57b2df8c3 | [
"BSD-3-Clause"
] | 1 | 2019-11-04T20:34:45.000Z | 2019-11-04T20:34:45.000Z |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.416507 | 79 | 0.584598 |
c39c338aa1ac980e43251d3a3b806ff155640842 | 9,865 | py | Python | src/visualize.py | gruberto/DepthBenchmark | 63abdca085600bbbd601496986a0580e7bc39e23 | [
"MIT"
] | 14 | 2019-09-16T07:42:10.000Z | 2021-11-29T01:08:13.000Z | src/visualize.py | gruberto/DepthBenchmark | 63abdca085600bbbd601496986a0580e7bc39e23 | [
"MIT"
] | 5 | 2020-05-02T12:55:43.000Z | 2021-12-15T20:26:19.000Z | src/visualize.py | gruberto/DepthBenchmark | 63abdca085600bbbd601496986a0580e7bc39e23 | [
"MIT"
] | 8 | 2019-09-27T08:41:05.000Z | 2021-06-11T12:46:30.000Z | from Evaluator import Evaluator
from results import colorize_pointcloud, colorize_depth
from Dataset import Dataset
import cv2
import os
import numpy as np
def visualize(data_root, result_root, scenes, daytimes, approaches, evaluations, weathers, visibilities, rainfall_rates):
d = Dataset(data_root)
e = Evalu... | 54.203297 | 135 | 0.461733 |
21cef99ef3760082fbe7c6910b5cacc6ef60579d | 2,199 | py | Python | scripts/zMayaTools/pick_walk.py | zewt/zMayaTools | 9f7f43ab015e58cf25fc82f4ae1cdd424b5a52a1 | [
"MIT"
] | 73 | 2017-12-08T03:33:50.000Z | 2022-03-21T15:44:12.000Z | scripts/zMayaTools/pick_walk.py | fsanges/zMayaTools | 795168d497459b43439e03a55233320f90d8d11c | [
"MIT"
] | 4 | 2019-03-17T05:25:23.000Z | 2021-03-25T04:22:18.000Z | scripts/zMayaTools/pick_walk.py | fsanges/zMayaTools | 795168d497459b43439e03a55233320f90d8d11c | [
"MIT"
] | 10 | 2018-12-19T04:38:10.000Z | 2022-01-28T06:24:18.000Z | from zMayaTools import maya_helpers
from pymel import core as pm
def pick_walk_add(direction):
"""
Pick walk in a direction, adding the picked nodes to the selection instead of
replacing the selection.
"""
# pm.pickWalk is the basic pick walk command, but PickWalkUp, etc. have special
# cases f... | 46.787234 | 108 | 0.71487 |
b230dcb37cc20f0d23018807b5d2f32cefea5230 | 5,773 | py | Python | tools/memory_inspector/memory_inspector/core/backends.py | iplo/Chain | 8bc8943d66285d5258fffc41bed7c840516c4422 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | tools/memory_inspector/memory_inspector/core/backends.py | JasonEric/chromium | c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2017-02-14T21:55:58.000Z | 2017-02-14T21:55:58.000Z | tools/memory_inspector/memory_inspector/core/backends.py | JasonEric/chromium | c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
_backends = {} # Maps a string (backend name) to a |Backend| instance.
def Register(backend):
"""Called by each backend module to register upon initiali... | 30.067708 | 79 | 0.692881 |
99d38992e9153f346b041a36320b63170e517294 | 24,988 | py | Python | LICDataWarehouseSync.py | WestonSF/ArcGISDataToolkit | 106c814a022a96029052320add57f8d26d6d3a4c | [
"Apache-2.0"
] | 15 | 2015-05-29T00:18:50.000Z | 2022-03-02T07:34:03.000Z | LICDataWarehouseSync.py | WestonSF/ArcGISDataToolkit | 106c814a022a96029052320add57f8d26d6d3a4c | [
"Apache-2.0"
] | 4 | 2015-03-11T20:45:55.000Z | 2017-09-14T18:14:59.000Z | LICDataWarehouseSync.py | WestonSF/ArcGISDataToolkit | 106c814a022a96029052320add57f8d26d6d3a4c | [
"Apache-2.0"
] | 8 | 2016-03-02T14:13:52.000Z | 2019-11-18T22:47:48.000Z | #-------------------------------------------------------------
# Name: Livestock Improvement Corporation Datawarehouse Sync
# Purpose: Syncronises data between the LIC data warehouse and GIS database, producing error and change reports.
# Author: Shaun Weston (shaun_weston@eagle.co.nz)
# Date Create... | 49.976 | 309 | 0.623259 |
ba2996fc934a829e71024efe128b717115ad2b84 | 485 | py | Python | rest/sending-messages/example-1/example-1.6.x.py | shaileshn/api-snippets | 08826972154634335378fed0edd2707d7f62b03b | [
"MIT"
] | 2 | 2017-11-23T11:31:20.000Z | 2018-01-22T04:14:02.000Z | rest/sending-messages/example-1/example-1.6.x.py | berkus/twilio-api-snippets | beaa4e211044cb06daf9b73fb05ad6a7a948f879 | [
"MIT"
] | null | null | null | rest/sending-messages/example-1/example-1.6.x.py | berkus/twilio-api-snippets | beaa4e211044cb06daf9b73fb05ad6a7a948f879 | [
"MIT"
] | 1 | 2019-10-02T14:36:36.000Z | 2019-10-02T14:36:36.000Z | # Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)
message = client.messages.cr... | 28.529412 | 72 | 0.756701 |
95e1a4403054558661b3784bde4bf7312e74cabc | 2,735 | py | Python | examples/track.py | fatestcar/demo | 5baa338a1d600c816fc20d23006910d4f609a1b9 | [
"MIT"
] | null | null | null | examples/track.py | fatestcar/demo | 5baa338a1d600c816fc20d23006910d4f609a1b9 | [
"MIT"
] | null | null | null | examples/track.py | fatestcar/demo | 5baa338a1d600c816fc20d23006910d4f609a1b9 | [
"MIT"
] | 1 | 2018-10-11T05:55:33.000Z | 2018-10-11T05:55:33.000Z | import cv2
import numpy as np
from scipy.linalg import block_diag
class LaneTracker:
def __init__(self, n_lanes, proc_noise_scale, meas_noise_scale, process_cov_parallel=0, proc_noise_type='white'):
self.n_lanes = n_lanes
# 总共多少线
self.meas_size = 4 * self.n_lanes
self.state_size = ... | 38.521127 | 117 | 0.583181 |
f1f6ed3793e5f37becf6c9cf1c4a4301c537f849 | 18,267 | py | Python | airflow/providers/amazon/aws/hooks/batch_client.py | donnut/airflow | ce66bc944d246aa3b51cce6e2fc13cd25da08d6e | [
"Apache-2.0"
] | 1 | 2020-09-15T02:32:55.000Z | 2020-09-15T02:32:55.000Z | airflow/providers/amazon/aws/hooks/batch_client.py | donnut/airflow | ce66bc944d246aa3b51cce6e2fc13cd25da08d6e | [
"Apache-2.0"
] | 14 | 2019-12-03T02:54:42.000Z | 2020-02-27T16:08:10.000Z | airflow/providers/amazon/aws/hooks/batch_client.py | donnut/airflow | ce66bc944d246aa3b51cce6e2fc13cd25da08d6e | [
"Apache-2.0"
] | 1 | 2020-11-04T03:10:24.000Z | 2020-11-04T03:10:24.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 34.143925 | 108 | 0.613018 |
e4b30eb8ae32d32ba5dbcbc4f9f44a3881b5f973 | 668 | py | Python | python/features/vlsift_load_matlab.py | S-o-T/vlb | 78495570e002d0ed6badd3df62f86e416839b0af | [
"BSD-2-Clause"
] | 11 | 2017-09-08T16:32:46.000Z | 2022-02-02T15:28:22.000Z | python/features/vlsift_load_matlab.py | albutko/vlb | 437245c0991948eeb36a277937a7e67d389041e4 | [
"BSD-2-Clause"
] | 9 | 2017-09-13T20:22:51.000Z | 2019-03-13T02:38:25.000Z | python/features/vlsift_load_matlab.py | albutko/vlb | 437245c0991948eeb36a277937a7e67d389041e4 | [
"BSD-2-Clause"
] | 3 | 2017-09-08T21:07:14.000Z | 2021-02-17T17:42:43.000Z | """
vlsift matlab version python wrapper
Author: Xu Zhang
"""
import numpy as np
import features.feature_utils
from features.DetectorDescriptorTemplate import DetectorAndDescriptor
class vlsift_load_matlab(DetectorAndDescriptor):
def __init__(self, csv_flag=True):
super(
vlsift_load_matlab,
... | 22.266667 | 69 | 0.654192 |
fe742088f456e867f57ce5595630c721f1dbff30 | 335 | py | Python | h/api/groups/__init__.py | noscripter/h | a7a4095a46683ea08dae62335bbcd53f7ab313e2 | [
"MIT"
] | null | null | null | h/api/groups/__init__.py | noscripter/h | a7a4095a46683ea08dae62335bbcd53f7ab313e2 | [
"MIT"
] | null | null | null | h/api/groups/__init__.py | noscripter/h | a7a4095a46683ea08dae62335bbcd53f7ab313e2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from h.api.groups.auth import group_principals
from h.api.groups.auth import set_permissions
from h.api.groups.logic import set_group_if_reply
from h.api.groups.logic import insert_group_if_none
__all__ = (
'group_principals',
'set_permissions',
'set_group_if_reply',
'insert_gr... | 23.928571 | 51 | 0.755224 |
b854a3d195b78efbeb2c4719c42a4abefe566de5 | 34,894 | py | Python | discord/flags.py | PlasticStrawActivist/pycord | 6ec6c27c99009b36ce3c9c1d80f09dde48fe0ce6 | [
"MIT"
] | null | null | null | discord/flags.py | PlasticStrawActivist/pycord | 6ec6c27c99009b36ce3c9c1d80f09dde48fe0ce6 | [
"MIT"
] | null | null | null | discord/flags.py | PlasticStrawActivist/pycord | 6ec6c27c99009b36ce3c9c1d80f09dde48fe0ce6 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modi... | 32.641721 | 118 | 0.605319 |
0c7d5ed9aaf5bd3d21e5c7d15d019aab3204a8a2 | 2,669 | py | Python | pyvista-examples/wolf-creek.py | RichardScottOZ/banesullivan | 8b6a530fc7ea36a91f6aa6a5dc3d4d5557128d04 | [
"MIT"
] | 2 | 2019-11-14T10:44:59.000Z | 2021-05-26T05:47:48.000Z | pyvista-examples/wolf-creek.py | RichardScottOZ/banesullivan | 8b6a530fc7ea36a91f6aa6a5dc3d4d5557128d04 | [
"MIT"
] | 2 | 2019-11-14T16:53:40.000Z | 2021-09-28T23:05:42.000Z | pyvista-examples/wolf-creek.py | RichardScottOZ/banesullivan | 8b6a530fc7ea36a91f6aa6a5dc3d4d5557128d04 | [
"MIT"
] | 3 | 2019-11-14T10:20:30.000Z | 2021-09-28T18:01:38.000Z | """
Load OMF Project
~~~~~~~~~~~~~~~~
Load and visualize an OMF project file
Originally from: https://opengeovis.github.io/omfvista/examples/load-project.html
"""
import omfvista
# sphinx_gallery_thumbnail_number = 3
import pyvista as pv
from pyvista import examples
#################################################... | 29.988764 | 81 | 0.608842 |
51287e09bb2301a055c70c1427b736a14890f24b | 300 | py | Python | stdeb/__init__.py | saraso-la/stdeb | a788f74ff9951df73fbd8da7665f2d1d8eb67d99 | [
"MIT"
] | null | null | null | stdeb/__init__.py | saraso-la/stdeb | a788f74ff9951df73fbd8da7665f2d1d8eb67d99 | [
"MIT"
] | null | null | null | stdeb/__init__.py | saraso-la/stdeb | a788f74ff9951df73fbd8da7665f2d1d8eb67d99 | [
"MIT"
] | null | null | null | import logging
__version__ = '0.6.0+git' # keep in sync with ../setup.py
log = logging.getLogger('stdeb')
log.setLevel(logging.INFO)
handler = logging.StreamHandler()
handler.setLevel(logging.INFO)
formatter = logging.Formatter('%(message)s')
handler.setFormatter(formatter)
log.addHandler(handler)
| 27.272727 | 57 | 0.77 |
eb5e314017ac041165cc363685a28ed2a4d50691 | 520 | py | Python | tests/int_tests/test_lt.py | lycantropos/rithm | 61ae1614411ab0ce7feb403fdf93b71f49231ec1 | [
"MIT"
] | null | null | null | tests/int_tests/test_lt.py | lycantropos/rithm | 61ae1614411ab0ce7feb403fdf93b71f49231ec1 | [
"MIT"
] | null | null | null | tests/int_tests/test_lt.py | lycantropos/rithm | 61ae1614411ab0ce7feb403fdf93b71f49231ec1 | [
"MIT"
] | null | null | null | from hypothesis import given
from tests.utils import (IntWithBuiltin,
equivalence)
from . import strategies
@given(strategies.ints_with_builtins, strategies.ints_with_builtins)
def test_connection_with_builtin(first_with_builtin: IntWithBuiltin,
second_with_b... | 34.666667 | 78 | 0.732692 |
64dc25101eae6934bc1342bd1925494c3cbe3286 | 12,450 | py | Python | tests/core/test_datamodules.py | aribornstein/pytorch-lightning | ca68cac57ad8eefc9b477ee126eb42a483f27a39 | [
"Apache-2.0"
] | 1 | 2020-11-24T17:49:42.000Z | 2020-11-24T17:49:42.000Z | tests/core/test_datamodules.py | aribornstein/pytorch-lightning | ca68cac57ad8eefc9b477ee126eb42a483f27a39 | [
"Apache-2.0"
] | 8 | 2020-10-27T22:39:24.000Z | 2021-01-24T16:41:34.000Z | tests/core/test_datamodules.py | tarepan/pytorch-lightning | 0b7f5a88a0f4691ec228c4708295a10d403fd592 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 27.183406 | 112 | 0.697751 |
b922dbf11af57661fa50d6bba30784d7471c73a3 | 36,534 | py | Python | delfin/drivers/hpe/hpe_msa/ssh_handler.py | joseph-v/SIM | 61fedb261aa745d715b8a30c0945a6244fb807e2 | [
"Apache-2.0"
] | 4 | 2020-05-07T07:43:43.000Z | 2020-06-21T15:25:42.000Z | delfin/drivers/hpe/hpe_msa/ssh_handler.py | joseph-v/SIM | 61fedb261aa745d715b8a30c0945a6244fb807e2 | [
"Apache-2.0"
] | 210 | 2020-05-08T04:06:49.000Z | 2020-06-22T12:59:02.000Z | delfin/drivers/hpe/hpe_msa/ssh_handler.py | joseph-v/SIM | 61fedb261aa745d715b8a30c0945a6244fb807e2 | [
"Apache-2.0"
] | 10 | 2020-04-11T07:09:55.000Z | 2020-04-28T09:50:13.000Z | import hashlib
import time
import six
from oslo_log import log as logging
from operator import itemgetter
from itertools import groupby
from delfin import exception
from delfin.common import constants, alert_util
from delfin.drivers.utils.ssh_client import SSHPool
from delfin.drivers.utils.tools import Tools
from delf... | 45.954717 | 79 | 0.518969 |
d02957ed5ec95d808dd8648da6549f579dedddca | 3,012 | py | Python | test/Parallel/failed-build/fixture/teststate.py | jcassagnol-public/scons | 8eaf585a893757e68c9e4a6e25d375021fa5eab7 | [
"MIT"
] | 1,403 | 2017-11-23T14:24:01.000Z | 2022-03-30T20:59:39.000Z | test/Parallel/failed-build/fixture/teststate.py | jcassagnol-public/scons | 8eaf585a893757e68c9e4a6e25d375021fa5eab7 | [
"MIT"
] | 3,708 | 2017-11-27T13:47:12.000Z | 2022-03-29T17:21:17.000Z | test/Parallel/failed-build/fixture/teststate.py | jcassagnol-public/scons | 8eaf585a893757e68c9e4a6e25d375021fa5eab7 | [
"MIT"
] | 281 | 2017-12-01T23:48:38.000Z | 2022-03-31T15:25:44.000Z | import http.server
import socketserver
import time
from urllib.parse import urlparse, parse_qs
from threading import Lock
from enum import Enum
import psutil
class TestState(Enum):
start_state = 0
mycopy_started = 1
myfail_done = 2
class Response(Enum):
OK = 200
WAIT = 201
DONE = 202
def serv... | 33.466667 | 83 | 0.530544 |
f6097be57e8e49af83ade84d629cc760b0cdf205 | 2,348 | py | Python | examples/asynccsaga_example.py | Nathaniel-Rodriguez/asyncevo | c6398327e8a9e2d9e582c986709480bb8114872a | [
"MIT"
] | null | null | null | examples/asynccsaga_example.py | Nathaniel-Rodriguez/asyncevo | c6398327e8a9e2d9e582c986709480bb8114872a | [
"MIT"
] | null | null | null | examples/asynccsaga_example.py | Nathaniel-Rodriguez/asyncevo | c6398327e8a9e2d9e582c986709480bb8114872a | [
"MIT"
] | null | null | null | # run this example with:
# <mpi command> -n <number cores> python asyncga_example.py
# Initialize the MPI process
# all code following this code will be executed on rank 1
# rank 0 is dedicated to the scheduler
# ranks 2+ are dedicated to workers
from asyncevo import Scheduler
from asyncevo import AsyncCSAGa
from asyn... | 28.634146 | 72 | 0.567291 |
bafd6c4cb8e21f40b7b2ebcdb7d01a4f5279c9a3 | 3,247 | py | Python | app/recipe/tests/test_tags_api.py | Brainless18/recipe-app-api | 27bc5f0832ec65b155bcc383cf2659d7637454a7 | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | Brainless18/recipe-app-api | 27bc5f0832ec65b155bcc383cf2659d7637454a7 | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | Brainless18/recipe-app-api | 27bc5f0832ec65b155bcc383cf2659d7637454a7 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag, Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class Publ... | 36.483146 | 82 | 0.664613 |
46745f0d4157148dd2d326213e9c8fe46d5d2120 | 30,398 | py | Python | mkt/lookup/tests/test_views.py | oremj/zamboni | a751dc6d22f7af947da327b0a091cbab0a999f49 | [
"BSD-3-Clause"
] | null | null | null | mkt/lookup/tests/test_views.py | oremj/zamboni | a751dc6d22f7af947da327b0a091cbab0a999f49 | [
"BSD-3-Clause"
] | null | null | null | mkt/lookup/tests/test_views.py | oremj/zamboni | a751dc6d22f7af947da327b0a091cbab0a999f49 | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime, timedelta
from decimal import Decimal
import json
from babel import numbers
from pyquery import PyQuery as pq
from nose.exc import SkipTest
from nose.tools import eq_
import amo
from abuse.models import AbuseReport
from addons.cron import reindex_addons
from addons.models import Addon, ... | 38.140527 | 78 | 0.575137 |
2c18b6179a12e598a81f2c899f8a359be5edbac5 | 6,600 | py | Python | Snake/Snake-master/snake/base/snake.py | shubham-11700069/Python | 9ea7dcbe6d9050453357a0c56815ce2371f9364e | [
"Apache-2.0"
] | null | null | null | Snake/Snake-master/snake/base/snake.py | shubham-11700069/Python | 9ea7dcbe6d9050453357a0c56815ce2371f9364e | [
"Apache-2.0"
] | null | null | null | Snake/Snake-master/snake/base/snake.py | shubham-11700069/Python | 9ea7dcbe6d9050453357a0c56815ce2371f9364e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=C0103,C0111,W0201,W0212
"""Definition of class Snake."""
import random
from collections import deque
import sys
sys.path.insert(0,'D:/Python/Snake/Snake-master/snake/')
from base.direc import Direc
from base.point import PointType
from base.pos import P... | 34.020619 | 93 | 0.610758 |
eb17f34c5f12ab3dc4f2133b9485f9e17a44bf7e | 105 | py | Python | tests/manage.py | dwatkinsweb/django-skin | 925db5313f564e2edca0ea2419b5d7b752a7a518 | [
"MIT"
] | 3 | 2015-10-07T17:59:01.000Z | 2017-11-16T11:19:13.000Z | tests/manage.py | dwatkinsweb/django-skin | 925db5313f564e2edca0ea2419b5d7b752a7a518 | [
"MIT"
] | null | null | null | tests/manage.py | dwatkinsweb/django-skin | 925db5313f564e2edca0ea2419b5d7b752a7a518 | [
"MIT"
] | 2 | 2017-11-15T01:25:56.000Z | 2022-01-06T23:39:32.000Z | from django.core import management
if __name__ == "__main__":
management.execute_from_command_line() | 26.25 | 42 | 0.790476 |
841ce1871742faba322fb960dfdf941079e0b520 | 23,410 | py | Python | wpoium/wda/__init__.py | elihe999/LAN-autotest-webium | 355d3abfe3104690f8f6c574e64fd9927748c6e7 | [
"Apache-2.0"
] | null | null | null | wpoium/wda/__init__.py | elihe999/LAN-autotest-webium | 355d3abfe3104690f8f6c574e64fd9927748c6e7 | [
"Apache-2.0"
] | null | null | null | wpoium/wda/__init__.py | elihe999/LAN-autotest-webium | 355d3abfe3104690f8f6c574e64fd9927748c6e7 | [
"Apache-2.0"
] | null | null | null | import time
from wpoium.common import logging
from wpoium.settings import Setting
from wpoium.processing import processing, screenshots_name
from wpoium.common.assert_des import insert_assert
LOCATOR_LIST = [
"id",
"name",
"text",
"nameContains",
"label",
"xpath",
"labelContains",
"cla... | 31.507402 | 105 | 0.510508 |
8ba0d728786744163b80106ae3252d85466d2ebd | 36,547 | py | Python | orbitx/physics/engine.py | Spoopidy/orbitx | 701250d06bfeab3f624fe4ab8b5feea19039e088 | [
"MIT"
] | null | null | null | orbitx/physics/engine.py | Spoopidy/orbitx | 701250d06bfeab3f624fe4ab8b5feea19039e088 | [
"MIT"
] | null | null | null | orbitx/physics/engine.py | Spoopidy/orbitx | 701250d06bfeab3f624fe4ab8b5feea19039e088 | [
"MIT"
] | null | null | null | """This is the core of the OrbitX physics engine. Here, we simulate the state
of the solar system over time. To do this, we start a thread running in the
background to run the simulation, while our main thread handles all other
user interaction.
I've tried to provide a clean interface to this module, so that you don't... | 41.017957 | 79 | 0.601992 |
5d6cd939328054b68131bd25e13798279af76ff5 | 3,289 | py | Python | flexs/utils/sequence_utils.py | jarridrb/FLEXS | d51ecf6a640229e68d9158e27b25aa81b57a9ce2 | [
"Apache-2.0"
] | null | null | null | flexs/utils/sequence_utils.py | jarridrb/FLEXS | d51ecf6a640229e68d9158e27b25aa81b57a9ce2 | [
"Apache-2.0"
] | null | null | null | flexs/utils/sequence_utils.py | jarridrb/FLEXS | d51ecf6a640229e68d9158e27b25aa81b57a9ce2 | [
"Apache-2.0"
] | null | null | null | """Utility functions for manipulating sequences."""
import random
from typing import List, Union
import numpy as np
AAS = "ILVAGMFYWEDQNHCRKSTP"
"""str: Amino acid alphabet for proteins (length 20 - no stop codon)."""
DB_AAS = "ARNDCQEGHILKMFPSTWYV"
RNAA = "UGCA"
"""str: RNA alphabet (4 base pairs)."""
DNAA = "ACG... | 27.872881 | 88 | 0.645485 |
dcf388070c864a23e5da224a3aafce207877d63c | 3,689 | py | Python | examples/intermediate/coupled_cluster.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | examples/intermediate/coupled_cluster.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | examples/intermediate/coupled_cluster.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | #!/usr/bin/env python
"""
Calculates the Coupled-Cluster energy- and amplitude equations
See 'An Introduction to Coupled Cluster Theory' by
T. Daniel Crawford and Henry F. Schaefer III.
Other Resource : http://vergil.chemistry.gatech.edu/notes/sahan-cc-2010.pdf
"""
from sympy.physics.secondquant import (AntiSymmetri... | 30.237705 | 134 | 0.632963 |
69153a15a6e5ad93aae97d1df0e6b39a894fefec | 1,175 | py | Python | pyvisdk/do/vm_failed_to_reset_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/vm_failed_to_reset_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/vm_failed_to_reset_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def VmFailedToResetEvent(vim, *args, **kwargs):
'''This event records a failure to reset ... | 34.558824 | 124 | 0.605957 |
dceb3ca8137f8d011eae2afb506037cb8a6c601c | 2,286 | py | Python | figures/Fig11_het_het.py | gstonge/influential-groups | d828adeada32ad354f1af864407c66066db20144 | [
"MIT"
] | null | null | null | figures/Fig11_het_het.py | gstonge/influential-groups | d828adeada32ad354f1af864407c66066db20144 | [
"MIT"
] | null | null | null | figures/Fig11_het_het.py | gstonge/influential-groups | d828adeada32ad354f1af864407c66066db20144 | [
"MIT"
] | null | null | null | import pickle
import numpy as np
import matplotlib.pyplot as plt
from scipy.special import loggamma
from gcm import *
from matplotlib.colors import LinearSegmentedColormap
color_list = ["#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8", "#0c2c84"]
newcm = LinearSegmentedColormap.from_list('ColorMap',
... | 31.315068 | 82 | 0.680227 |
b93fd46247beb3860f0f09becc68001108efc70c | 24,685 | py | Python | mannequinchallenge/models/networks.py | plarr2020-team1/mannequinchallenge | 4aff68aedad8619a2ec557f9162cc9692181318c | [
"Apache-2.0"
] | null | null | null | mannequinchallenge/models/networks.py | plarr2020-team1/mannequinchallenge | 4aff68aedad8619a2ec557f9162cc9692181318c | [
"Apache-2.0"
] | 1 | 2020-07-05T10:24:10.000Z | 2020-07-06T10:30:17.000Z | mannequinchallenge/models/networks.py | plarr2020-team1/mannequinchallenge | 4aff68aedad8619a2ec557f9162cc9692181318c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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, soft... | 38.99684 | 119 | 0.553535 |
3246e9ee31f52ff280714f115025e7186b786ee1 | 68,346 | py | Python | python/pyspark/sql/types.py | sslowikatpalantir/spark | f9dddebf019da89d8611e11e1f12bc8864c17419 | [
"Apache-2.0"
] | null | null | null | python/pyspark/sql/types.py | sslowikatpalantir/spark | f9dddebf019da89d8611e11e1f12bc8864c17419 | [
"Apache-2.0"
] | null | null | null | python/pyspark/sql/types.py | sslowikatpalantir/spark | f9dddebf019da89d8611e11e1f12bc8864c17419 | [
"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 us... | 35.522869 | 100 | 0.624455 |
b6a3528da92797c15eba0de03edc47154d891b0c | 15,275 | py | Python | train_cifar.py | ekremerakin/ML-Reproducibility-Challenge-2021 | 005693a0c85c1022d3f475375e2c5de6e961e4ba | [
"MIT"
] | null | null | null | train_cifar.py | ekremerakin/ML-Reproducibility-Challenge-2021 | 005693a0c85c1022d3f475375e2c5de6e961e4ba | [
"MIT"
] | null | null | null | train_cifar.py | ekremerakin/ML-Reproducibility-Challenge-2021 | 005693a0c85c1022d3f475375e2c5de6e961e4ba | [
"MIT"
] | null | null | null | from warnings import filterwarnings
filterwarnings("ignore")
import os
import random
import sys
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from sklearn.metrics import accuracy_score, f1_score, precision_score,... | 34.480813 | 131 | 0.535057 |
d40c7afbbadfacad8a6d4b64e5807c012db19e02 | 7,105 | py | Python | eksupdate/src/self_managed.py | aws-samples/amazon-eks-one-click-cluster-upgrade | b9fcddfe0acb45a0d400177141603962a9ba322e | [
"MIT-0"
] | 26 | 2021-11-29T17:54:59.000Z | 2022-03-28T10:00:11.000Z | eksupdate/src/self_managed.py | aws-samples/amazon-eks-one-click-cluster-upgrade | b9fcddfe0acb45a0d400177141603962a9ba322e | [
"MIT-0"
] | null | null | null | eksupdate/src/self_managed.py | aws-samples/amazon-eks-one-click-cluster-upgrade | b9fcddfe0acb45a0d400177141603962a9ba322e | [
"MIT-0"
] | 2 | 2021-12-03T19:10:54.000Z | 2022-02-08T09:34:57.000Z | from platform import node
import boto3
import time
from .latest_ami import get_latestami
from botocore.utils import instance_cache
from .ekslogs import logs_pusher
def status_of_cluster(Clustname,regionName):
client = boto3.client('eks',region_name=regionName)
''' Getting Self Managed Cluster Status'''
re... | 39.472222 | 229 | 0.654187 |
62fd6df25205857497c33406c99d3b00b3fd3493 | 1,324 | py | Python | gdsfactory/samples/pdk/test_fab_c.py | gdsfactory/gdsfactory | e53b1f3415a81862d465e0443fc09fb35d14d1e0 | [
"MIT"
] | 42 | 2020-05-25T09:33:45.000Z | 2022-03-29T03:41:19.000Z | gdsfactory/samples/pdk/test_fab_c.py | gdsfactory/gdsfactory | e53b1f3415a81862d465e0443fc09fb35d14d1e0 | [
"MIT"
] | 133 | 2020-05-28T18:29:04.000Z | 2022-03-31T22:21:42.000Z | gdsfactory/samples/pdk/test_fab_c.py | gdsfactory/gdsfactory | e53b1f3415a81862d465e0443fc09fb35d14d1e0 | [
"MIT"
] | 17 | 2020-06-30T07:07:50.000Z | 2022-03-17T15:45:27.000Z | """Test all the components in fab_c."""
import pathlib
import pytest
from pytest_regressions.data_regression import DataRegressionFixture
from gdsfactory.difftest import difftest
from gdsfactory.samples.pdk.fab_c import factory
component_names = list(factory.keys())
dirpath = pathlib.Path(__file__).absolute().with_... | 30.090909 | 87 | 0.752266 |
4b4536df1817f0dd2c38e6f9780674e48838066e | 65 | py | Python | cron_translator/exception.py | pygaur/cron-translator | c018ef7c4720290b6cef32b09da0d24858ce20c2 | [
"MIT"
] | null | null | null | cron_translator/exception.py | pygaur/cron-translator | c018ef7c4720290b6cef32b09da0d24858ce20c2 | [
"MIT"
] | null | null | null | cron_translator/exception.py | pygaur/cron-translator | c018ef7c4720290b6cef32b09da0d24858ce20c2 | [
"MIT"
] | null | null | null | """
"""
class CronParsingException(Exception):
"""
"""
| 8.125 | 38 | 0.523077 |
1b41128a2b68b1635cf1e35e1f8742a7737efc5f | 1,901 | py | Python | data/p3BR/R2/benchmark/startPyquil220.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startPyquil220.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startPyquil220.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=41
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pr... | 25.346667 | 64 | 0.570226 |
e31f48d69d94a0c7da76c917075323cec149903b | 6,031 | py | Python | electrum/gui/qt/update_checker.py | HyperPeek/electrum-raven | 057484e957dd795286cf5822489953a6c8232ac2 | [
"MIT"
] | null | null | null | electrum/gui/qt/update_checker.py | HyperPeek/electrum-raven | 057484e957dd795286cf5822489953a6c8232ac2 | [
"MIT"
] | null | null | null | electrum/gui/qt/update_checker.py | HyperPeek/electrum-raven | 057484e957dd795286cf5822489953a6c8232ac2 | [
"MIT"
] | 1 | 2021-03-18T19:14:16.000Z | 2021-03-18T19:14:16.000Z | # Copyright (C) 2019 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
import asyncio
import base64
from distutils.version import LooseVersion
from PyQt5.QtCore import Qt, QThread, pyqtSignal
from PyQt5.QtWid... | 42.174825 | 154 | 0.641187 |
d232665993c029b4d73f8afaa64453368654cce9 | 2,773 | py | Python | cfgparser/targets/target.py | jejer/iptables-inspector | 4d05ece83d8eacff7aeb43f8798d7cf6c6bc1d5c | [
"Apache-2.0"
] | null | null | null | cfgparser/targets/target.py | jejer/iptables-inspector | 4d05ece83d8eacff7aeb43f8798d7cf6c6bc1d5c | [
"Apache-2.0"
] | null | null | null | cfgparser/targets/target.py | jejer/iptables-inspector | 4d05ece83d8eacff7aeb43f8798d7cf6c6bc1d5c | [
"Apache-2.0"
] | null | null | null | from cfgparser.targets.mark import Mark
from cfgparser.targets.dnat import DNAT
from cfgparser.targets.masquerade import Masquerade
from colorama import Fore
# http://ipset.netfilter.org/iptables.man.html
def NewTarget(target, raw):
unsupported = [
"AUDIT",
"CHECKSUM",
"CLASSIFY",
... | 24.324561 | 78 | 0.539127 |
7c74fb37e231ec0e240f8900ac147e94a95c4fdd | 1,733 | py | Python | src/Compare.py | akhof/Python-Sorting-Algorithms | 55e7c71aa3fe4f9bf68e17101b581ee1163ec770 | [
"MIT"
] | 1 | 2020-08-06T06:19:59.000Z | 2020-08-06T06:19:59.000Z | src/Compare.py | akhof/Python-Sorting-Algorithms | 55e7c71aa3fe4f9bf68e17101b581ee1163ec770 | [
"MIT"
] | null | null | null | src/Compare.py | akhof/Python-Sorting-Algorithms | 55e7c71aa3fe4f9bf68e17101b581ee1163ec770 | [
"MIT"
] | 1 | 2020-09-04T12:55:46.000Z | 2020-09-04T12:55:46.000Z |
from PySortAlgos import BadAlgorithm, BubbleSort, SelectionSort, InsertSort, QuickSort, MergeSort, HeapSort, isSorted
import time, random
START_E = 2 # 2^2 = 4
MAX_E = 22 # 2^22 = 4.194.304
TRIES = 1
TOTEST = (
#(Class, Name, Max)
(BadAlgorithm, "BadAlgorithm", 3),
... | 26.661538 | 118 | 0.415465 |
882da46a8d79bfee37d7ed66108feb809d4c631a | 2,074 | py | Python | software/instructions.py | fbcbarbosa/DigCam | ce72e18cd76fb0d24487d7b7c24e1ea3efa36071 | [
"MIT"
] | null | null | null | software/instructions.py | fbcbarbosa/DigCam | ce72e18cd76fb0d24487d7b7c24e1ea3efa36071 | [
"MIT"
] | null | null | null | software/instructions.py | fbcbarbosa/DigCam | ce72e18cd76fb0d24487d7b7c24e1ea3efa36071 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
"""
This module implements a instruction database.
"""
class Instruction:
"""
This class implements a instruction.
"""
def __init__(self, number, name, description):
"""
Creates a new instruction.
PARAMETERS
number - int: a... | 28.027027 | 85 | 0.588717 |
5d6eabeb9755babf1db4f616fcd7be810d1036ba | 4,434 | py | Python | ncclient/capabilities.py | NorthLandTeam/ncclient | ff6bba74c3304f0a5053087449f5a51e8eb13ed4 | [
"Apache-2.0"
] | 498 | 2015-10-21T18:43:23.000Z | 2022-03-29T17:27:59.000Z | ncclient/capabilities.py | NorthLandTeam/ncclient | ff6bba74c3304f0a5053087449f5a51e8eb13ed4 | [
"Apache-2.0"
] | 440 | 2015-09-07T23:43:01.000Z | 2022-03-17T11:43:16.000Z | ncclient/capabilities.py | NorthLandTeam/ncclient | ff6bba74c3304f0a5053087449f5a51e8eb13ed4 | [
"Apache-2.0"
] | 330 | 2015-09-10T16:53:50.000Z | 2022-03-31T12:24:53.000Z | # Copyright 2009 Shikhar Bhushan
#
# 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... | 27.886792 | 132 | 0.601037 |
22987266824c40bf31ed6f225f93544f7e37223c | 24,469 | py | Python | ggplot/ggplot.py | mokkyl/ggpy | 2e72907d6f62dbcf501027e6c9c2d27179bc6f5f | [
"BSD-2-Clause"
] | null | null | null | ggplot/ggplot.py | mokkyl/ggpy | 2e72907d6f62dbcf501027e6c9c2d27179bc6f5f | [
"BSD-2-Clause"
] | null | null | null | ggplot/ggplot.py | mokkyl/ggpy | 2e72907d6f62dbcf501027e6c9c2d27179bc6f5f | [
"BSD-2-Clause"
] | null | null | null | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import matplotlib.pyplot as plt
import matplotlib as mpl
from matplotlib.colors import LinearSegmentedColormap
import six
import numpy as np
import pandas as pd
import warnings
from .aes import aes
from .lege... | 37.58679 | 130 | 0.54755 |
47551fedc3633c08a317a7630536d0ee7b7e4348 | 351 | py | Python | app/_index/models.py | valeriansaliou/waaave-web | 8a0cde773563865a905af38f5a0b723a43b17341 | [
"RSA-MD"
] | 1 | 2020-04-06T10:04:43.000Z | 2020-04-06T10:04:43.000Z | app/_index/models.py | valeriansaliou/waaave-web | 8a0cde773563865a905af38f5a0b723a43b17341 | [
"RSA-MD"
] | null | null | null | app/_index/models.py | valeriansaliou/waaave-web | 8a0cde773563865a905af38f5a0b723a43b17341 | [
"RSA-MD"
] | null | null | null | from django.db import models
from _commons.fields import IdField
# IDs: stores content relationships (per ID)
class Ids(models.Model):
"""
Database [_index.ids]
"""
# System fields
item_id = IdField(db_index=True)
item_type = models.PositiveSmallIntegerField(db_index=True)
date = models.D... | 25.071429 | 63 | 0.723647 |
b37e94dbbccac2618ce9cbb5e40ab08aa597bf11 | 3,187 | py | Python | cms/tests/nonroot.py | romera-github/django-cms | 8aca4c881c7de2c58b39bc94ad0c6285ca77f4a2 | [
"BSD-3-Clause"
] | null | null | null | cms/tests/nonroot.py | romera-github/django-cms | 8aca4c881c7de2c58b39bc94ad0c6285ca77f4a2 | [
"BSD-3-Clause"
] | 5 | 2021-03-19T15:49:27.000Z | 2022-03-12T00:52:58.000Z | cms/tests/nonroot.py | rom3r4/django-cms | 8aca4c881c7de2c58b39bc94ad0c6285ca77f4a2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import with_statement
from cms.api import create_page
from cms.models import Page
from cms.test_utils.testcases import CMSTestCase
from cms.test_utils.util.context_managers import SettingsOverride
from django.contrib.auth.models import User
from django.template import Template
fr... | 42.493333 | 93 | 0.624725 |
d7d345f7c9b0275b4a9411d312940a997abf44b3 | 9,215 | py | Python | src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py | saurabsa/azure-cli-old | f77477a98c9aa9cb55daf5b0d2f410d1455a9225 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py | saurabsa/azure-cli-old | f77477a98c9aa9cb55daf5b0d2f410d1455a9225 | [
"MIT"
] | 2 | 2021-03-25T21:38:56.000Z | 2021-11-15T17:46:45.000Z | src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py | Visual-Studio-China/azure-cli-int | 48c7c7f371a0ecc4ebfd4dcfdc72764beddf5c31 | [
"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.
# --------------------------------------------------------------------... | 31.343537 | 244 | 0.688985 |
62cc22e46de56b99cb0d5fd7b4d05b08143f1cd9 | 5,430 | py | Python | conohadnsclient/tests/base.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/tests/base.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/tests/base.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2010-2011 OpenStack Foundation
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# 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
#
# htt... | 36.938776 | 79 | 0.667956 |
b137b4d02cf265bfb204ed595d85918dc53f79e4 | 677 | py | Python | manage_chat/migrations/0007_auto_20170424_0015.py | dduk-ddak/coding-night-live | be7b0b9a89a9a5332c0980dbc3698602266a1e8c | [
"MIT"
] | 73 | 2017-01-26T16:45:12.000Z | 2021-07-05T20:27:38.000Z | manage_chat/migrations/0007_auto_20170424_0015.py | dduk-ddak/coding-night-live | be7b0b9a89a9a5332c0980dbc3698602266a1e8c | [
"MIT"
] | 93 | 2017-01-25T18:28:02.000Z | 2019-06-10T22:11:38.000Z | manage_chat/migrations/0007_auto_20170424_0015.py | dduk-ddak/coding-night-live | be7b0b9a89a9a5332c0980dbc3698602266a1e8c | [
"MIT"
] | 22 | 2017-02-12T12:51:17.000Z | 2020-09-08T02:38:20.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-24 00:15
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manage_chat', '0006_poll_hash_value'),
]
operat... | 25.074074 | 67 | 0.618907 |
f82ad20d193ec8f00d4e7cb36e111ec454d0743a | 638 | py | Python | backend/src/feature_extraction/zerocrossing.py | AnXi-TieGuanYin-Tea/MusicGenreClassifiaction | a0b9f621b0a5d2451180b12af7681756c5abd138 | [
"MIT"
] | 7 | 2018-05-01T19:39:17.000Z | 2020-01-02T17:11:05.000Z | backend/src/feature_extraction/zerocrossing.py | AnXi-TieGuanYin-Tea/MusicGenreClassifiaction | a0b9f621b0a5d2451180b12af7681756c5abd138 | [
"MIT"
] | 10 | 2018-12-10T22:16:43.000Z | 2020-08-27T18:23:45.000Z | backend/src/feature_extraction/zerocrossing.py | AnXi-TieGuanYin-Tea/MusicGenreClassifiaction | a0b9f621b0a5d2451180b12af7681756c5abd138 | [
"MIT"
] | 2 | 2021-04-16T08:20:17.000Z | 2022-01-06T14:06:44.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 17 23:14:28 2018
@author: Akihiro Inui
"""
import numpy as np
def zerocrossing(input_windowed_signal:tuple or list) -> float:
"""
Zero Crossing Rate
:param input_windowed_signal: input audio signal after windowing
:return zero cro... | 24.538462 | 86 | 0.673981 |
6c29bfe7f6a1515ee88510c9ac5a3f73071694b7 | 137 | py | Python | main/templates/generated/model_init.py | lipis/gae-init-magic | 6b1e0b50f8e5200cb2dacebca9ac65e796b241a9 | [
"MIT"
] | 1 | 2018-10-26T13:33:20.000Z | 2018-10-26T13:33:20.000Z | main/templates/generated/model_init.py | lipis/gae-init-magic | 6b1e0b50f8e5200cb2dacebca9ac65e796b241a9 | [
"MIT"
] | 652 | 2018-10-26T12:28:08.000Z | 2021-08-02T09:13:48.000Z | main/templates/generated/model_init.py | lipis/gae-init-magic | 6b1e0b50f8e5200cb2dacebca9ac65e796b241a9 | [
"MIT"
] | null | null | null | # set model_dbs = model_dbs or [model_db]
# for model_db in model_dbs
from .{{model_db.variable_name}} import {{model_db.name}}
# endfor
| 27.4 | 57 | 0.744526 |
b30963254b23b68957b409dfe77dff10ccfaca9a | 221 | py | Python | test/ex3/ex3/profile_app/models.py | nrgxtra/web_framework | dd84968a77b84a03d66c5db190b28bffc479f05e | [
"MIT"
] | null | null | null | test/ex3/ex3/profile_app/models.py | nrgxtra/web_framework | dd84968a77b84a03d66c5db190b28bffc479f05e | [
"MIT"
] | null | null | null | test/ex3/ex3/profile_app/models.py | nrgxtra/web_framework | dd84968a77b84a03d66c5db190b28bffc479f05e | [
"MIT"
] | null | null | null | from django.db import models
class Profile(models.Model):
first_name = models.CharField(
max_length=30,
)
last_name = models.CharField(
max_length=30,
)
image_url = models.URLField()
| 18.416667 | 34 | 0.647059 |
b9d1e46583249391d1ee5819825b7a9ab5613abb | 22,227 | py | Python | ejpcsvparser/parse.py | elifesciences/ejp-csv-parser | e3ed2815c0b20256a4ae555a51de3bfb7d40ae4e | [
"MIT"
] | null | null | null | ejpcsvparser/parse.py | elifesciences/ejp-csv-parser | e3ed2815c0b20256a4ae555a51de3bfb7d40ae4e | [
"MIT"
] | 29 | 2017-12-09T01:16:50.000Z | 2021-10-01T16:43:30.000Z | ejpcsvparser/parse.py | elifesciences/ejp-csv-parser | e3ed2815c0b20256a4ae555a51de3bfb7d40ae4e | [
"MIT"
] | null | null | null | from __future__ import print_function
import logging
import time
from collections import OrderedDict
from xml.dom import minidom
from xml.parsers.expat import ExpatError
from elifearticle import article as ea
from elifearticle import utils as eautils
from elifetools import utils as etoolsutils
from ejpcsvparser import ... | 35.113744 | 87 | 0.673415 |
4438dca6a03a2a40ba30b58ce6284487f64a8c92 | 1,350 | py | Python | source/ch03/generate_test_names2.py | AngelLiang/programming-in-python3-2nd-edition | 8f9a6ab6768a10e94daef641009288de6845245f | [
"MIT"
] | null | null | null | source/ch03/generate_test_names2.py | AngelLiang/programming-in-python3-2nd-edition | 8f9a6ab6768a10e94daef641009288de6845245f | [
"MIT"
] | 4 | 2020-03-24T18:25:26.000Z | 2021-08-23T20:44:07.000Z | source/ch03/generate_test_names2.py | AngelLiang/programming-in-python3-2nd-edition | 8f9a6ab6768a10e94daef641009288de6845245f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2008-11 Qtrac Ltd. All rights reserved.
# This program or module is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | 38.571429 | 74 | 0.691852 |
bc80ed94d329db65b45dd18bdd386966c99ed272 | 2,977 | py | Python | contrib/devtools/test-security-check.py | bitcoinrtx/bitcoinrtx | 00bcd7e3674174460bb0704e2f61aaad813db6fb | [
"MIT"
] | null | null | null | contrib/devtools/test-security-check.py | bitcoinrtx/bitcoinrtx | 00bcd7e3674174460bb0704e2f61aaad813db6fb | [
"MIT"
] | null | null | null | contrib/devtools/test-security-check.py | bitcoinrtx/bitcoinrtx | 00bcd7e3674174460bb0704e2f61aaad813db6fb | [
"MIT"
] | 1 | 2021-03-06T12:28:17.000Z | 2021-03-06T12:28:17.000Z | #!/usr/bin/env python3
#
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Test script for security-check.py
'''
import subprocess
import unittest
def write_testcode(filename):
with open(filename, 'w', encoding="utf8") as f... | 49.616667 | 202 | 0.649647 |
fe682e5b9e49890bae70547c925521abfa8725f0 | 437 | py | Python | data/scripts/templates/object/tangible/camp/shared_camp_light_s1.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/camp/shared_camp_light_s1.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/camp/shared_camp_light_s1.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/camp/shared_camp_light_s1.iff"
result.attribute_template_id = -1
r... | 25.705882 | 66 | 0.720824 |
f0029a5ece2b73055ed62a56538fb6ecebea486a | 4,860 | py | Python | test_plugins/SimpleHBond.py | nezix/nanome-lib | e602cc9e63d1e2499c0f865da7ddbfbda44f0509 | [
"MIT"
] | 3 | 2020-07-02T13:08:27.000Z | 2021-11-24T14:32:53.000Z | test_plugins/SimpleHBond.py | nezix/nanome-lib | e602cc9e63d1e2499c0f865da7ddbfbda44f0509 | [
"MIT"
] | 11 | 2020-09-14T17:01:47.000Z | 2022-02-18T04:00:52.000Z | test_plugins/SimpleHBond.py | nezix/nanome-lib | e602cc9e63d1e2499c0f865da7ddbfbda44f0509 | [
"MIT"
] | 5 | 2020-08-12T16:30:03.000Z | 2021-12-06T18:04:23.000Z | import sys
import time
import nanome
minimum_bond_distance = 3
maximum_angstrom_distance = 3
# Config
NAME = "Test HBonds"
DESCRIPTION = "A simple plugin demonstrating how plugin system can be used to extend Nanome capabilities"
CATEGORY = "Simple Actions"
HAS_ADVANCED_OPTIONS = False
# Plugin
class SimpleHBond(n... | 43.00885 | 131 | 0.580658 |
b3f6b229ee7868173dff553698b692a8304b91df | 354 | py | Python | apps/poker/views/__init__.py | deniskrumko/izyan-poker | ce70c9c8f761409adad289809e5220237b312407 | [
"MIT"
] | 6 | 2019-08-05T07:37:52.000Z | 2021-12-30T20:07:01.000Z | apps/poker/views/__init__.py | deniskrumko/izyan-poker | ce70c9c8f761409adad289809e5220237b312407 | [
"MIT"
] | 8 | 2019-10-25T11:07:03.000Z | 2021-06-10T18:43:42.000Z | apps/poker/views/__init__.py | deniskrumko/izyan-poker | ce70c9c8f761409adad289809e5220237b312407 | [
"MIT"
] | 1 | 2019-10-07T15:44:26.000Z | 2019-10-07T15:44:26.000Z | from .create import CreateRoomView
from .index import IndexView
from .member import MemberView
from .room import RoomHistoryView, RoomView
from .settings import SettingsView
from .status import StatusView
__all__ = (
'CreateRoomView',
'IndexView',
'MemberView',
'RoomHistoryView',
'RoomView',
'S... | 20.823529 | 43 | 0.728814 |
7781f58ba0f68cb680eb11e135a8e6db617499ae | 6,764 | py | Python | examples/scripts/example21.py | Alehud/QuSpin | c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201 | [
"BSD-3-Clause"
] | 195 | 2016-10-24T18:05:31.000Z | 2022-03-29T10:11:56.000Z | examples/scripts/example21.py | markusschmitt/QuSpin | c239d01e6ce76253b03440cda3c8819a9f63e288 | [
"BSD-3-Clause"
] | 303 | 2016-10-25T20:08:11.000Z | 2022-03-31T16:52:09.000Z | examples/scripts/example21.py | markusschmitt/QuSpin | c239d01e6ce76253b03440cda3c8819a9f63e288 | [
"BSD-3-Clause"
] | 54 | 2017-01-03T18:47:52.000Z | 2022-03-16T06:54:33.000Z | from __future__ import print_function, division
#
import sys,os
os.environ['KMP_DUPLICATE_LIB_OK']='True' # uncomment this line if omp error occurs on OSX for python 3
os.environ['OMP_NUM_THREADS']='1' # set number of OpenMP threads to run in parallel
os.environ['MKL_NUM_THREADS']='1' # set number of MKL threads to run... | 31.314815 | 106 | 0.688794 |
c067e83647c0a99b0d2aaaf132f8bb0d89cecd9f | 10,458 | py | Python | show_changes.py | Linguistics575/POCRE | 36c5597921f8b3aa971b92702cdb6e063701cd7c | [
"MIT"
] | 3 | 2019-09-08T20:21:15.000Z | 2020-08-10T03:43:45.000Z | show_changes.py | Linguistics575/POCRE | 36c5597921f8b3aa971b92702cdb6e063701cd7c | [
"MIT"
] | 9 | 2018-06-08T00:49:20.000Z | 2020-08-06T16:17:03.000Z | show_changes.py | Linguistics575/POCRE | 36c5597921f8b3aa971b92702cdb6e063701cd7c | [
"MIT"
] | 1 | 2020-08-10T03:43:52.000Z | 2020-08-10T03:43:52.000Z | #!/usr/bin/env python3
'''
Compares an edited text to the original line by line and prints the edited text with changes in bold, red font.
Deletions are enclosed in square brackets.
--show_original option prints the edited and original texts side by side
--numbered prints line numbers on the left margin
@author genevp... | 34.976589 | 140 | 0.616275 |
f46c4566d3141637fadb0ab1a6f061b5fa193a4c | 572 | py | Python | discordlogin/migrations/0004_auto_20210218_1718.py | fourmattunderscore/discord-django-login-api | 6e25301662c6c041cca50e2bc537b65e7fc82bb6 | [
"MIT"
] | null | null | null | discordlogin/migrations/0004_auto_20210218_1718.py | fourmattunderscore/discord-django-login-api | 6e25301662c6c041cca50e2bc537b65e7fc82bb6 | [
"MIT"
] | null | null | null | discordlogin/migrations/0004_auto_20210218_1718.py | fourmattunderscore/discord-django-login-api | 6e25301662c6c041cca50e2bc537b65e7fc82bb6 | [
"MIT"
] | 1 | 2021-10-03T09:55:07.000Z | 2021-10-03T09:55:07.000Z | # Generated by Django 3.1.6 on 2021-02-18 07:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('discordlogin', '0003_auto_20210217_1817'),
]
operations = [
migrations.AddField(
model_name='discorduser',
... | 23.833333 | 53 | 0.559441 |
3749d2ec41908dc8064fdb27a16341c4480eb873 | 2,949 | py | Python | django_q/tests/settings.py | bigsfoot/django-q | 85615ebde02183f93ea19dbdce383085cf53e295 | [
"MIT"
] | 1,570 | 2015-06-17T22:13:29.000Z | 2022-03-31T18:38:47.000Z | django_q/tests/settings.py | bigsfoot/django-q | 85615ebde02183f93ea19dbdce383085cf53e295 | [
"MIT"
] | 560 | 2015-07-09T00:32:22.000Z | 2022-03-30T09:18:10.000Z | django_q/tests/settings.py | bigsfoot/django-q | 85615ebde02183f93ea19dbdce383085cf53e295 | [
"MIT"
] | 270 | 2015-07-01T10:56:30.000Z | 2022-03-10T15:59:49.000Z | import os
import django
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ")cqm... | 22.860465 | 71 | 0.636487 |
c1da9ce9846ab5c0b2e164683c23bd0b4c443ae0 | 1,159 | py | Python | setup.py | jmeppley/du_histogram | 9205973b43d14bca63343159b604c60718d82173 | [
"Apache-2.0"
] | null | null | null | setup.py | jmeppley/du_histogram | 9205973b43d14bca63343159b604c60718d82173 | [
"Apache-2.0"
] | null | null | null | setup.py | jmeppley/du_histogram | 9205973b43d14bca63343159b604c60718d82173 | [
"Apache-2.0"
] | null | null | null | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
DESCRIPTION = "Simply ASCII histogram of du output"
LONG_DESCRIPTION = open('README.md').read()
NAME = "du_histogram"
AUTHOR = "John Eppley"
AUTHOR_EMAIL = "jmeppley@gmail.com"
MAINTAINER = "John Eppley"
MAINTAINER_EMAIL = "... | 29.717949 | 56 | 0.665229 |
6132ad4aa8e5edc16ec2048a7eb07c3025cac7c8 | 347 | py | Python | docker/test/integration/minifi/core/RemoteProcessGroup.py | kevdoran/nifi-minifi-cpp | 4bb1fd97f5df103d5bee9a884839b24e2f77a2c5 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | docker/test/integration/minifi/core/RemoteProcessGroup.py | kevdoran/nifi-minifi-cpp | 4bb1fd97f5df103d5bee9a884839b24e2f77a2c5 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | docker/test/integration/minifi/core/RemoteProcessGroup.py | kevdoran/nifi-minifi-cpp | 4bb1fd97f5df103d5bee9a884839b24e2f77a2c5 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | import uuid
class RemoteProcessGroup(object):
def __init__(self, url, name=None):
self.uuid = uuid.uuid4()
if name is None:
self.name = str(self.uuid)
else:
self.name = name
self.url = url
def get_name(self):
return self.name
def get_uuid(se... | 17.35 | 39 | 0.567723 |
c7c7aab005a101e253319844d32e2cbf4b148d0f | 16,510 | py | Python | tortoise/fields/data.py | DDevine/tortoise-orm | 414737a78e98ffd247174590720f5c90aeac4dde | [
"Apache-2.0"
] | 1 | 2020-05-15T19:50:12.000Z | 2020-05-15T19:50:12.000Z | tortoise/fields/data.py | Tomes111/tortoise-orm | 8b55499a228e44f33fec9099f4d559c77c73beb7 | [
"Apache-2.0"
] | null | null | null | tortoise/fields/data.py | Tomes111/tortoise-orm | 8b55499a228e44f33fec9099f4d559c77c73beb7 | [
"Apache-2.0"
] | null | null | null | import datetime
import functools
import json
import warnings
from decimal import Decimal
from enum import Enum, IntEnum
from typing import TYPE_CHECKING, Any, Callable, Optional, Type, TypeVar, Union
from uuid import UUID, uuid4
from pypika import functions
from pypika.enums import SqlTypes
from pypika.terms import Te... | 28.126065 | 99 | 0.626893 |
65ddd11a99bd8fb737ae8d34a4928ab5b6961496 | 127 | py | Python | __init__.py | YihuiLu/json2markdown | 76f288bdbb96b5a569ec7e0f37689dcce995de06 | [
"MIT"
] | 2 | 2019-08-16T02:16:22.000Z | 2019-08-16T02:18:45.000Z | __init__.py | yihuiLu/json2markdown | 76f288bdbb96b5a569ec7e0f37689dcce995de06 | [
"MIT"
] | null | null | null | __init__.py | yihuiLu/json2markdown | 76f288bdbb96b5a569ec7e0f37689dcce995de06 | [
"MIT"
] | null | null | null | # @Time : 2019-09-17 15:03
# @Author : Teacher Lu
# @Site : www.yifeilu.cn
# @File : __init__.py
# @Software: PyCharm | 25.4 | 29 | 0.598425 |
e091cf37496bdac038e2930e066d75cb9b8cd139 | 2,169 | py | Python | python/UVA/10044_erdos_number.py | gineer01/programming-challenges | 9f0bbaab5b85423b5671ee3cfc2d0fd62cea4cc7 | [
"MIT"
] | null | null | null | python/UVA/10044_erdos_number.py | gineer01/programming-challenges | 9f0bbaab5b85423b5671ee3cfc2d0fd62cea4cc7 | [
"MIT"
] | null | null | null | python/UVA/10044_erdos_number.py | gineer01/programming-challenges | 9f0bbaab5b85423b5671ee3cfc2d0fd62cea4cc7 | [
"MIT"
] | null | null | null | import fileinput
import itertools
class Graph:
def __init__(self):
self.edges = {}
self.vertices = set()
def add_edge(self, u, v, data):
self.vertices.add(u)
self.vertices.add(v)
self.edges.setdefault(u, {})[v] = data
def remove_edge(self, u, v):
return sel... | 22.831579 | 86 | 0.528354 |
5b1a0f37e6a0f6629452c19808ca2b9cff1422a0 | 3,186 | py | Python | lite/tests/unittest_py/global_var_model.py | devchai123/Paddle-Lite | 442d6996a59c3498eae27610d49a0d5b2c320f24 | [
"Apache-2.0"
] | null | null | null | lite/tests/unittest_py/global_var_model.py | devchai123/Paddle-Lite | 442d6996a59c3498eae27610d49a0d5b2c320f24 | [
"Apache-2.0"
] | null | null | null | lite/tests/unittest_py/global_var_model.py | devchai123/Paddle-Lite | 442d6996a59c3498eae27610d49a0d5b2c320f24 | [
"Apache-2.0"
] | 1 | 2021-12-03T10:07:54.000Z | 2021-12-03T10:07:54.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 27.704348 | 74 | 0.606403 |
d23808cfbdaf225d0c1384425024e424ad4b1a45 | 7,202 | py | Python | moto/__init__.py | jstangroome/moto | eb6515cf50878b18081ecf0afe944a36c1bdda5f | [
"Apache-2.0"
] | null | null | null | moto/__init__.py | jstangroome/moto | eb6515cf50878b18081ecf0afe944a36c1bdda5f | [
"Apache-2.0"
] | null | null | null | moto/__init__.py | jstangroome/moto | eb6515cf50878b18081ecf0afe944a36c1bdda5f | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import importlib
def lazy_load(module_name, element):
def f(*args, **kwargs):
module = importlib.import_module(module_name, "moto")
return getattr(module, element)(*args, **kwargs)
return f
mock_acm = lazy_load(".acm", "mock_acm")
mock_apigateway = l... | 47.695364 | 86 | 0.777145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.