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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
03ebda09bbc22220b71fe43ac3d4374f579cc7d2 | 1,811 | py | Python | django_oac/middleware.py | przemekk1385/django-oac | 379b29921551ea1d53edb5e3fbb6fa8d3c972acb | [
"MIT"
] | null | null | null | django_oac/middleware.py | przemekk1385/django-oac | 379b29921551ea1d53edb5e3fbb6fa8d3c972acb | [
"MIT"
] | 3 | 2022-03-02T18:08:13.000Z | 2022-03-02T18:29:33.000Z | django_oac/middleware.py | przemekk1385/django_oac | 379b29921551ea1d53edb5e3fbb6fa8d3c972acb | [
"MIT"
] | null | null | null | from logging import Logger
from typing import Callable, Type
from django.contrib.auth import logout
from django.http.request import HttpRequest
from django.http.response import HttpResponseBase
from .conf import settings as oac_settings
from .decorators import populate_method_logger as populate_logger
from .exception... | 34.826923 | 87 | 0.639978 |
a4d18b5435ff15ecdb80f9c4d06afdb9aea5da6e | 265 | py | Python | where the magic happens/AddRow.py | jmolloy1/instawizardry | 67923e6e44a835e5d319c0067259740172075959 | [
"MIT"
] | null | null | null | where the magic happens/AddRow.py | jmolloy1/instawizardry | 67923e6e44a835e5d319c0067259740172075959 | [
"MIT"
] | null | null | null | where the magic happens/AddRow.py | jmolloy1/instawizardry | 67923e6e44a835e5d319c0067259740172075959 | [
"MIT"
] | null | null | null | import sys
import csv
with open('Posts.csv','r') as postFile:
posts = csv.writer(postFile)
def AddRow(row):
with open('Posts.csv','w') as postFile:
posts = csv.writer(postFile)
print(row)
posts.writerow([row])
| 17.666667 | 44 | 0.573585 |
189d7c986094ef17d479bd5d3fc6425030a64fcc | 1,414 | py | Python | awacs/lookoutvision.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | null | null | null | awacs/lookoutvision.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | 19 | 2020-11-30T06:43:54.000Z | 2022-02-21T09:02:54.000Z | awacs/lookoutvision.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2013, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from aws import Action as BaseAction
from aws import BaseARN
service_name = 'Amazon Lookout for Vision'
prefix = 'lookoutvision'
class Action(BaseAction):
def __init__(self, action=None):
s... | 31.422222 | 70 | 0.750354 |
eeb19140e302eedae6b5ab49a599484691fcb244 | 17,718 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20190901/security_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20190901/security_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20190901/security_rule.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 60.061017 | 2,495 | 0.697313 |
26077653b49bee3790983a87e9f462693160f6c9 | 77,975 | py | Python | cctbx/maptbx/__init__.py | toastisme/cctbx_project | d1a25147b5958822b6923fb55260749ccf9350ff | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-02-01T14:25:48.000Z | 2021-09-15T16:36:29.000Z | cctbx/maptbx/__init__.py | toastisme/cctbx_project | d1a25147b5958822b6923fb55260749ccf9350ff | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-06-14T17:04:17.000Z | 2019-06-24T20:54:12.000Z | cctbx/maptbx/__init__.py | toastisme/cctbx_project | d1a25147b5958822b6923fb55260749ccf9350ff | [
"BSD-3-Clause-LBNL"
] | 1 | 2022-02-08T10:11:07.000Z | 2022-02-08T10:11:07.000Z | from __future__ import absolute_import, division, print_function
import cctbx.sgtbx
import boost_adaptbx.boost.python as bp
from six.moves import range
from six.moves import zip
ext = bp.import_ext("cctbx_maptbx_ext")
from cctbx_maptbx_ext import *
from cctbx import crystal
from cctbx import sgtbx
from cctbx.array_fa... | 35.719194 | 90 | 0.663956 |
1d528b6262453b10f11297f5ba568f681a2dcb54 | 6,637 | py | Python | tureng_cli.py | iPatavatsizz/tureng_cli | 5f2eaad7d76e711e6f4452e9614f9ef84308e634 | [
"MIT"
] | 1 | 2021-06-07T13:19:32.000Z | 2021-06-07T13:19:32.000Z | tureng_cli.py | iPatavatsizz/tureng_cli | 5f2eaad7d76e711e6f4452e9614f9ef84308e634 | [
"MIT"
] | null | null | null | tureng_cli.py | iPatavatsizz/tureng_cli | 5f2eaad7d76e711e6f4452e9614f9ef84308e634 | [
"MIT"
] | null | null | null | # Command Line 'www.tureng.com' Search Interface
# Version: 1.0.0
# By Hx0z
# Github: https://www.github.com/iPatavatsizz/tureng_cli
# Import
import sys
from collections.abc import Callable
import signal
import asyncio
import requests as rq
import bs4 as bs
# Errors
class _tureng(Exception):
def __init__(self, m... | 31.454976 | 113 | 0.508212 |
4b6e66594a7de1130ef6e55f4c3489bd8a5e5351 | 2,472 | py | Python | demos/setup.py | istresearch/Dallinger | 47e4967ded9e01edbc8c1ae7132c9ec30a87f116 | [
"MIT"
] | null | null | null | demos/setup.py | istresearch/Dallinger | 47e4967ded9e01edbc8c1ae7132c9ec30a87f116 | [
"MIT"
] | null | null | null | demos/setup.py | istresearch/Dallinger | 47e4967ded9e01edbc8c1ae7132c9ec30a87f116 | [
"MIT"
] | 1 | 2019-02-07T14:16:39.000Z | 2019-02-07T14:16:39.000Z | import os
import sys
from setuptools import setup, find_packages
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
setup_args = dict(
name='dlgr.demos',
version="4.0.0",
description='Demonstration experiments for Dallinger',
url='http://github.com/Dallinger/D... | 36.352941 | 90 | 0.651294 |
c2a7dcf8c2e28dd602437c74a453bcb7a8b92ab6 | 1,691 | py | Python | scripts/plot_Zprofiles.py | scbao/pysonic | b4ccaf49772d55f632a0995c411d1cc042d71903 | [
"MIT"
] | null | null | null | scripts/plot_Zprofiles.py | scbao/pysonic | b4ccaf49772d55f632a0995c411d1cc042d71903 | [
"MIT"
] | null | null | null | scripts/plot_Zprofiles.py | scbao/pysonic | b4ccaf49772d55f632a0995c411d1cc042d71903 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: Theo Lemaire
# @Email: theo.lemaire@epfl.ch
# @Date: 2020-08-17 15:29:27
# @Last Modified by: Theo Lemaire
# @Last Modified time: 2020-08-17 19:24:19
import logging
import numpy as np
import matplotlib.pyplot as plt
from PySONIC.core import Batch, BilayerSonophore, AcousticDrive... | 27.274194 | 85 | 0.607333 |
15fa2515f2706757730bc95f3598edc066d50f81 | 4,757 | py | Python | data/eu-data/scripts/download_at.py | juhaodong/German-Covid-19 | 34316ec56f974f924070fa43ccfa44a9df830159 | [
"MIT"
] | null | null | null | data/eu-data/scripts/download_at.py | juhaodong/German-Covid-19 | 34316ec56f974f924070fa43ccfa44a9df830159 | [
"MIT"
] | null | null | null | data/eu-data/scripts/download_at.py | juhaodong/German-Covid-19 | 34316ec56f974f924070fa43ccfa44a9df830159 | [
"MIT"
] | null | null | null | import html
import logging
import os
import re
import dateutil
import pandas as pd
import requests
from lxml import etree
import lxml
from functools import reduce
from utils import _COLUMNS_ORDER, COVIDScrapper, DailyAggregator
logging.basicConfig()
logger = logging.getLogger("covid-eu-data.download.at")
AT_REPORT_... | 30.299363 | 120 | 0.559596 |
4940d942e71f24132d08bc3684eed14786403e7c | 2,132 | py | Python | api/environments/managers.py | ekampf/flagsmith | 35d1944de9763f02de5d5d1793d5b29b7fe28993 | [
"BSD-3-Clause"
] | null | null | null | api/environments/managers.py | ekampf/flagsmith | 35d1944de9763f02de5d5d1793d5b29b7fe28993 | [
"BSD-3-Clause"
] | null | null | null | api/environments/managers.py | ekampf/flagsmith | 35d1944de9763f02de5d5d1793d5b29b7fe28993 | [
"BSD-3-Clause"
] | null | null | null | from django.db.models import Manager, Prefetch
from features.models import FeatureSegment, FeatureState
from features.multivariate.models import MultivariateFeatureStateValue
class EnvironmentManager(Manager):
def filter_for_document_builder(self, *args, **kwargs):
return (
super(EnvironmentM... | 38.763636 | 109 | 0.529081 |
0c3778ff4d081d1f9a7857429508e57173a5534b | 2,845 | py | Python | Resources/books/deep_learning_time_series_forecasting/code/chapter_22/08_plot_activity_durations.py | gdepalma93/bright-athlete-academy | 54ba0cc6633637c1bd6d90120153e04b981244bf | [
"MIT"
] | null | null | null | Resources/books/deep_learning_time_series_forecasting/code/chapter_22/08_plot_activity_durations.py | gdepalma93/bright-athlete-academy | 54ba0cc6633637c1bd6d90120153e04b981244bf | [
"MIT"
] | null | null | null | Resources/books/deep_learning_time_series_forecasting/code/chapter_22/08_plot_activity_durations.py | gdepalma93/bright-athlete-academy | 54ba0cc6633637c1bd6d90120153e04b981244bf | [
"MIT"
] | null | null | null | # plot durations of each activity by subject from the har dataset
from numpy import dstack
from numpy import unique
from pandas import read_csv
from matplotlib import pyplot
# load a single file as a numpy array
def load_file(filepath):
dataframe = read_csv(filepath, header=None, delim_whitespace=True)
return datafr... | 33.869048 | 101 | 0.726889 |
2cc0eeef8811bd7130e89bb515981181446d0ff6 | 8,732 | py | Python | b2sdk/file_version.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/file_version.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/file_version.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | ######################################################################
#
# File: b2sdk/file_version.py
#
# Copyright 2019 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from typing import Optional
fr... | 36.535565 | 153 | 0.608566 |
736714689e3f0a851c5037a9363a538be2e070da | 8,455 | py | Python | 3_core_core_analysis/4_find_related_acc_genes.py | greenelab/core-accessory-interactome | 98e3f9a3036373fc5734181832f11852a75aa914 | [
"BSD-3-Clause"
] | null | null | null | 3_core_core_analysis/4_find_related_acc_genes.py | greenelab/core-accessory-interactome | 98e3f9a3036373fc5734181832f11852a75aa914 | [
"BSD-3-Clause"
] | 33 | 2020-04-24T23:07:49.000Z | 2022-03-10T22:53:09.000Z | 3_core_core_analysis/4_find_related_acc_genes.py | greenelab/core-accessory-interactome | 98e3f9a3036373fc5734181832f11852a75aa914 | [
"BSD-3-Clause"
] | 1 | 2020-04-01T17:09:27.000Z | 2020-04-01T17:09:27.000Z | # -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.9.1+dev
# kernelspec:
# display_name: Python [conda env:core_acc] *
# language: python
# nam... | 30.196429 | 310 | 0.779066 |
1859560dc4d26fcb16f09a80a40bc599dbf35cf2 | 9,397 | py | Python | tests/test_asgi.py | artcg/sanic | 8a2ea626c6d04a5eb1e28d071ffa56bf9ad98a12 | [
"MIT"
] | null | null | null | tests/test_asgi.py | artcg/sanic | 8a2ea626c6d04a5eb1e28d071ffa56bf9ad98a12 | [
"MIT"
] | 1 | 2021-03-01T18:55:22.000Z | 2021-03-01T18:55:22.000Z | tests/test_asgi.py | angrycaptain19/sanic | 27f64ddae2bd5a3ce40387f493d3e1b1068cdac7 | [
"MIT"
] | null | null | null | import asyncio
import sys
from collections import deque, namedtuple
import pytest
import uvicorn
from sanic import Sanic
from sanic.asgi import MockTransport
from sanic.exceptions import InvalidUsage
from sanic.request import Request
from sanic.response import json, text
from sanic.websocket import WebSocketConnecti... | 26.848571 | 79 | 0.693306 |
3531e98dff8912e28799ee5062ae2b66d439a15e | 3,027 | py | Python | filter.py | cueo/gmail-api-wrapper | 56de7c9d978a3e538741e42d46684d044820dde6 | [
"MIT"
] | null | null | null | filter.py | cueo/gmail-api-wrapper | 56de7c9d978a3e538741e42d46684d044820dde6 | [
"MIT"
] | null | null | null | filter.py | cueo/gmail-api-wrapper | 56de7c9d978a3e538741e42d46684d044820dde6 | [
"MIT"
] | null | null | null | from label import Label
class Filter:
def __init__(self, service):
self.service = service
self.label_service = Label(service)
self.filters = None
def all_filters(self, cached=True):
if not cached or self.filters is None:
self.filters = self.service.users().settings... | 39.311688 | 106 | 0.608523 |
955f82fa432e82ab1b95f9ecddaca5537a9eca11 | 626 | py | Python | sympy/series/tests/test_kauers.py | smichr/sympy | eda86926d98ab6cb7ec73e3cb8ea78ac15bddea3 | [
"BSD-3-Clause"
] | 7 | 2015-01-14T06:55:33.000Z | 2018-08-11T14:43:52.000Z | sympy/series/tests/test_kauers.py | smichr/sympy | eda86926d98ab6cb7ec73e3cb8ea78ac15bddea3 | [
"BSD-3-Clause"
] | 1 | 2018-02-19T04:56:04.000Z | 2018-02-19T04:56:04.000Z | sympy/series/tests/test_kauers.py | smichr/sympy | eda86926d98ab6cb7ec73e3cb8ea78ac15bddea3 | [
"BSD-3-Clause"
] | 1 | 2016-04-24T14:39:22.000Z | 2016-04-24T14:39:22.000Z | from sympy.series.kauers import finite_diff
from sympy.abc import x, y, z, w, n
from sympy import sin, cos
from sympy import pi
def test_finite_diff():
assert finite_diff(x**2 + 2*x + 1, x) == 2*x + 3
assert finite_diff(y**3 + 2*y**2 + 3*y + 5, y) == 3*y**2 + 7*y + 6
assert finite_diff(z**2 - 2*z + 3, z) ... | 39.125 | 70 | 0.563898 |
6be5191ab973c6cf239e1be9d1671ec686d18c0a | 15,908 | py | Python | tests/test_library.py | ralfstx/mopidy-kitchen | 5b0f5eb1ca64ae0a2209e49f0a48906f23e81896 | [
"MIT"
] | null | null | null | tests/test_library.py | ralfstx/mopidy-kitchen | 5b0f5eb1ca64ae0a2209e49f0a48906f23e81896 | [
"MIT"
] | null | null | null | tests/test_library.py | ralfstx/mopidy-kitchen | 5b0f5eb1ca64ae0a2209e49f0a48906f23e81896 | [
"MIT"
] | null | null | null | import logging
from mopidy.models import Album, Image, Ref, SearchResult, Track
from mopidy_kitchen.library import KitchenLibraryProvider
from mopidy_kitchen.uri import AlbumsUri, parse_uri
from .helpers import EXAMPLE_ALBUM, make_album, make_config, make_image, make_station
def test_detects_duplicates(tmp_path, c... | 36.486239 | 113 | 0.68299 |
ea1bbac86aba4ed28eb909d17edc913f4d3a277c | 173 | py | Python | en/086/python/main.py | franciscogomes2020/exercises | 8b33c4b9349a9331e4002a8225adc2a482c70024 | [
"MIT"
] | null | null | null | en/086/python/main.py | franciscogomes2020/exercises | 8b33c4b9349a9331e4002a8225adc2a482c70024 | [
"MIT"
] | null | null | null | en/086/python/main.py | franciscogomes2020/exercises | 8b33c4b9349a9331e4002a8225adc2a482c70024 | [
"MIT"
] | null | null | null | # Create a program that declares a 3x3 dimensional array and fills it with keyboard-readable values. At the end, show the matrix on the screen, with the correct formatting.
| 86.5 | 172 | 0.797688 |
22a55b22c853b9f7b9c4f89f5f35487285dc17cf | 898 | py | Python | mkt/submit/migrations/0001_initial.py | Witia1/zamboni | b1e2d5d475abff2fa5d4990415a06adee33bd647 | [
"BSD-3-Clause"
] | null | null | null | mkt/submit/migrations/0001_initial.py | Witia1/zamboni | b1e2d5d475abff2fa5d4990415a06adee33bd647 | [
"BSD-3-Clause"
] | null | null | null | mkt/submit/migrations/0001_initial.py | Witia1/zamboni | b1e2d5d475abff2fa5d4990415a06adee33bd647 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='AppSubmissionChecklist',
fields=[
('id', models... | 30.965517 | 114 | 0.569042 |
c921cc5f4a2f76250677bea3ae1d00326dc30b98 | 2,248 | py | Python | xlsxwriter/test/app/test_app02.py | edparcell/XlsxWriter | d6a5df232ac0091017ae5c65f592bcc776d296ea | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-01-09T19:43:43.000Z | 2019-01-09T19:43:43.000Z | xlsxwriter/test/app/test_app02.py | edparcell/XlsxWriter | d6a5df232ac0091017ae5c65f592bcc776d296ea | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/app/test_app02.py | edparcell/XlsxWriter | d6a5df232ac0091017ae5c65f592bcc776d296ea | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2018, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ..helperfunctions import _xml_to_list
from ...app import App
class TestAssembleApp(uni... | 33.552239 | 190 | 0.5 |
227e5a695a7153d1287ad8614f986765bfd6ca7e | 24,196 | py | Python | src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"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.
# --------------------------------------------------------------------... | 57.885167 | 223 | 0.60634 |
944fb674001b1d6e29a65f7a89686aa664032a05 | 1,956 | py | Python | code/conll2tsv.py | ltgoslo/nor_dia_change | 03fae418fec378946a81da4b373e6a581be2d33b | [
"CC-BY-4.0"
] | null | null | null | code/conll2tsv.py | ltgoslo/nor_dia_change | 03fae418fec378946a81da4b373e6a581be2d33b | [
"CC-BY-4.0"
] | 1 | 2022-03-29T00:14:22.000Z | 2022-03-29T00:14:22.000Z | code/conll2tsv.py | ltgoslo/nor_dia_change | 03fae418fec378946a81da4b373e6a581be2d33b | [
"CC-BY-4.0"
] | 1 | 2022-03-25T15:19:16.000Z | 2022-03-25T15:19:16.000Z | #! python3
# coding: utf-8
import sys
from smart_open import open
from helpers import extract_proper, check_word, num_replace
import csv
SOURCE_FILE = sys.argv[1] # Must be *.conllu.gz
TEMPFILE0_NAME = SOURCE_FILE.replace('.conllu', '.txt')
processed = extract_proper(SOURCE_FILE, TEMPFILE0_NAME) # Can turn off se... | 30.092308 | 95 | 0.666667 |
ba8443a9f4d83336d760b38d0254fd41110eb089 | 572 | py | Python | robot/pmm/resources/locators_50.py | sebastianocostanzo/PMM | 3994736c4bfe1c8ba5f1abf2c0daf948dbb8187c | [
"BSD-3-Clause"
] | null | null | null | robot/pmm/resources/locators_50.py | sebastianocostanzo/PMM | 3994736c4bfe1c8ba5f1abf2c0daf948dbb8187c | [
"BSD-3-Clause"
] | null | null | null | robot/pmm/resources/locators_50.py | sebastianocostanzo/PMM | 3994736c4bfe1c8ba5f1abf2c0daf948dbb8187c | [
"BSD-3-Clause"
] | null | null | null | """ Locators for summer'21 """
from locators_51 import pmm_lex_locators
import copy
pmm_lex_locators = copy.deepcopy(pmm_lex_locators)
pmm_lex_locators[
"contact_save"
] = "//button[contains(@class,'slds-button--neutral') and (text() or @title='Save')]"
pmm_lex_locators["related"][
"button"
] = "//article[co... | 33.647059 | 117 | 0.685315 |
d3295d6b17a6de9f890b025bed7fdbe3fc651699 | 5,193 | py | Python | kubernetes/client/api/networking_api.py | henrywu2019/python | fb7214144395c05349e70a58ea129576f6b11fc4 | [
"Apache-2.0"
] | 4,417 | 2018-01-13T04:30:48.000Z | 2022-03-31T15:33:59.000Z | kubernetes/client/api/networking_api.py | henrywu2019/python | fb7214144395c05349e70a58ea129576f6b11fc4 | [
"Apache-2.0"
] | 1,414 | 2018-01-12T19:31:56.000Z | 2022-03-31T22:01:02.000Z | kubernetes/client/api/networking_api.py | henrywu2019/python | fb7214144395c05349e70a58ea129576f6b11fc4 | [
"Apache-2.0"
] | 2,854 | 2018-01-14T08:57:33.000Z | 2022-03-31T01:41:56.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.21
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import r... | 36.314685 | 124 | 0.596187 |
7153b5c6056cb021abb75848ba1c5e455078622a | 52 | py | Python | problem_3/__init__.py | oltionzefi/daily-coding-problem | 4fe3ec53e1f3c7d299849671fdfead462d548cd3 | [
"MIT"
] | null | null | null | problem_3/__init__.py | oltionzefi/daily-coding-problem | 4fe3ec53e1f3c7d299849671fdfead462d548cd3 | [
"MIT"
] | null | null | null | problem_3/__init__.py | oltionzefi/daily-coding-problem | 4fe3ec53e1f3c7d299849671fdfead462d548cd3 | [
"MIT"
] | null | null | null | from .problem_3 import Node, serialize, deserialize
| 26 | 51 | 0.826923 |
07f361d8f00fd2d45bd2ab910a1e86c89104242a | 4,546 | py | Python | bin/statistics.py | kderme/spark-memory-simulator | b9fe69ea29175cb1452b436c4e898f335e05c47c | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | null | null | null | bin/statistics.py | kderme/spark-memory-simulator | b9fe69ea29175cb1452b436c4e898f335e05c47c | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | null | null | null | bin/statistics.py | kderme/spark-memory-simulator | b9fe69ea29175cb1452b436c4e898f335e05c47c | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
import sys
import os
import json
import plotly.plotly as py
import plotly.graph_objs as go
import matplotlib.pyplot as plt
import ntpath
def keep (line):
flag1 = '|| SIMULATION ||' in line
flag2 = '&&' not in line
flag3 = '|| SIMULATION || Predicting..' not in line
return flag1 and flag2 an... | 29.519481 | 98 | 0.577651 |
89c56066d714a6b3ac332beb9a10c725d60cd939 | 603 | py | Python | L1Trigger/L1TMuonBarrel/test/kalmanTools/makePropToVertexLUTs.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1Trigger/L1TMuonBarrel/test/kalmanTools/makePropToVertexLUTs.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1Trigger/L1TMuonBarrel/test/kalmanTools/makePropToVertexLUTs.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | from __future__ import print_function
import FWCore.ParameterSet.Config as cms
from L1Trigger.L1TMuonBarrel.simKBmtfDigis_cfi import bmtfKalmanTrackingSettings as settings
eLoss = settings.eLoss[0]
alpha = settings.aPhiB[0]
alpha2 = settings.aPhiBNLO[0]
dxy=[]
deltaK=[]
for addr in range(0,2048):
Knew=addr*... | 18.272727 | 92 | 0.684909 |
b010eb6d601402bec831742d8bd9f98e6fa9a2dd | 3,529 | py | Python | tests/test_linkedlist.py | TomCallR/py_recursive | 282437b29f783eff7575056bf8522ebf03efca32 | [
"BSD-3-Clause"
] | null | null | null | tests/test_linkedlist.py | TomCallR/py_recursive | 282437b29f783eff7575056bf8522ebf03efca32 | [
"BSD-3-Clause"
] | null | null | null | tests/test_linkedlist.py | TomCallR/py_recursive | 282437b29f783eff7575056bf8522ebf03efca32 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from lib.linkedlist import LinkedList, Cons, Empty, LList, Union_LList, identity
def build_data():
nonelist = None
new123: LinkedList[int] = Cons(1, Cons(2, Cons(3, Empty())))
return nonelist, new123
class TestLinkedList(unittest.TestCase):
#
def test_sum_int_fold(self):
no... | 36.760417 | 92 | 0.585718 |
e110d72ab75a9c1c8553753034a72c0aa9b2a84f | 264 | py | Python | iiab/extensions.py | georgejhunt/internet-in-a-box | 67f547a43e87b637723f8b5207653fd7f7887974 | [
"BSD-2-Clause"
] | 37 | 2016-11-18T21:17:29.000Z | 2021-12-02T11:48:56.000Z | iiab/extensions.py | georgejhunt/internet-in-a-box | 67f547a43e87b637723f8b5207653fd7f7887974 | [
"BSD-2-Clause"
] | 5 | 2015-01-11T18:32:13.000Z | 2016-06-11T23:10:16.000Z | iiab/extensions.py | georgejhunt/internet-in-a-box | 67f547a43e87b637723f8b5207653fd7f7887974 | [
"BSD-2-Clause"
] | 10 | 2017-06-17T14:46:47.000Z | 2022-01-23T21:59:59.000Z | # -*- coding: utf-8 -*-
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
#from flask.ext.mail import Mail
#mail = Mail()
#from flask.ext.cache import Cache
#cache = Cache()
#from flask.ext.login import LoginManager
#login_manager = LoginManager()
| 18.857143 | 43 | 0.727273 |
148386d18babc9ced9b41709a5a9da74f6efea2f | 1,901 | py | Python | holoviews/plotting/__init__.py | zbarry/holoviews | 25505a4470c56a0d62ba5813c1fe9af59f568bcf | [
"BSD-3-Clause"
] | null | null | null | holoviews/plotting/__init__.py | zbarry/holoviews | 25505a4470c56a0d62ba5813c1fe9af59f568bcf | [
"BSD-3-Clause"
] | null | null | null | holoviews/plotting/__init__.py | zbarry/holoviews | 25505a4470c56a0d62ba5813c1fe9af59f568bcf | [
"BSD-3-Clause"
] | null | null | null | """
HoloViews plotting sub-system the defines the interface to be used by
any third-party plotting/rendering package.
This file defines the HTML tags used to wrap rendered output for
display in the IPython Notebook (optional).
"""
from ..core.options import Cycle, Compositor
from ..element import Area, Polygons
from ... | 42.244444 | 82 | 0.62546 |
047e68ad5cb935ec0345c4b9fd7a882a2e33be37 | 9,998 | py | Python | DEBES_Hugo_code.py | hugodebes/Genetic_Algorithm | c3c1f205e64692abcbc44c346b6679e99aa324a6 | [
"Apache-2.0"
] | 1 | 2021-10-11T17:06:28.000Z | 2021-10-11T17:06:28.000Z | DEBES_Hugo_code.py | hugodebes/Genetic_Algorithm | c3c1f205e64692abcbc44c346b6679e99aa324a6 | [
"Apache-2.0"
] | null | null | null | DEBES_Hugo_code.py | hugodebes/Genetic_Algorithm | c3c1f205e64692abcbc44c346b6679e99aa324a6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Datascience et IA : Approximation d'une fonction (class version).ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1e7p76bxHUFlbqSbzTEf_JsCklhRglbr8
1)
Importons toutes les librairies et modules dont nous aurons besoin po... | 35.835125 | 137 | 0.693539 |
bcf34071e57d364a2cb106585cb480696e575c2a | 20,790 | py | Python | pikuli/uia/adapter/patterns_plain_description.py | NVoronchev/pikuli | b67e33fa51a7bb7252c5ac11651e2f005542f955 | [
"MIT"
] | null | null | null | pikuli/uia/adapter/patterns_plain_description.py | NVoronchev/pikuli | b67e33fa51a7bb7252c5ac11651e2f005542f955 | [
"MIT"
] | 1 | 2021-05-11T13:40:52.000Z | 2021-05-13T19:42:26.000Z | pikuli/uia/adapter/patterns_plain_description.py | NVoronchev/pikuli | b67e33fa51a7bb7252c5ac11651e2f005542f955 | [
"MIT"
] | 2 | 2021-03-31T14:10:15.000Z | 2022-01-24T02:16:04.000Z | # -*- coding: utf-8 -*-
PROPERTY = 'property'
METHOD = 'method'
patterns_plain_description = {
"AnnotationPattern" : [
(PROPERTY, 'CurrentAnnotationTypeId',
( 'out', 'c_int', 'retVal' )),
(PROPERTY, 'CurrentAnnotationTypeName',
( 'out', 'BSTR', 'retVal' )),
(PROPERTY, ... | 42.602459 | 89 | 0.517845 |
6718b30ab52876ca3009c6bbdadc057f3db1d28b | 1,349 | py | Python | files/plugins/check_xfs_errors.py | lampkicking/charm-nrpe | 29d1cd8701d696f8b2472ea43f7a8639e0b7049d | [
"MIT"
] | null | null | null | files/plugins/check_xfs_errors.py | lampkicking/charm-nrpe | 29d1cd8701d696f8b2472ea43f7a8639e0b7049d | [
"MIT"
] | null | null | null | files/plugins/check_xfs_errors.py | lampkicking/charm-nrpe | 29d1cd8701d696f8b2472ea43f7a8639e0b7049d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2017 Canonical Ltd
#
# Author: Jill Rouleau <jill.rouleau@canonical.com>
#
# Check for xfs errors and alert
#
import sys
import re
from datetime import datetime, timedelta
import subprocess
# error messages commonly seen in dmesg on xfs errors
raw_xfs_errors = ['XFS_WANT_CORRUPTED... | 29.326087 | 92 | 0.691623 |
2b366637ae6460a91b1c5abcbe3033e260677e11 | 329 | py | Python | HK BOT-10008_2020-12-21_08-19-18.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | HK BOT-10008_2020-12-21_08-19-18.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | HK BOT-10008_2020-12-21_08-19-18.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | i;m;p;o;r;t; ;C;l;o;i;n;t;F;u;s;i;o;n; ;a;s; ;c;f;
;c;f;.;l;a;u;n;c;h;_;a;n;y;_;e;x;e;_;b;a;t;_;a;p;p;l;i;c;a;t;i;o;n;(;';n;o;t;e;p;a;d;';);
;c;f;.;k;e;y;_;h;i;t;_;e;n;t;e;r;(;);
;c;f;.;k;e;y;_;w;r;i;t;e;_;e;n;t;e;r;(;';H;K;H;R;';,;k;e;y;=;';';);
;c;f;.;k;e;y;_;p;r;e;s;s;(;';a;l;t;+;f;4;';);
;c;f;.;k;e;y;_;p;r;e;s;s;(;... | 47 | 89 | 0.389058 |
a510de1be5698140a70f4d4b41b48de8eebc3377 | 1,757 | py | Python | var/spack/repos/builtin/packages/libuv/package.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-03-05T10:54:32.000Z | 2021-03-05T14:14:52.000Z | var/spack/repos/builtin/packages/libuv/package.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 32 | 2020-12-15T17:29:20.000Z | 2022-03-21T15:08:31.000Z | var/spack/repos/builtin/packages/libuv/package.py | Kerilk/spack | e027942b55407a4a5fe323b93d8e57200c873a43 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-07-19T20:31:27.000Z | 2021-07-19T21:14:14.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)
class Libuv(AutotoolsPackage):
"""Multi-platform library with a focus on asynchronous IO"""
homepage = "http://libu... | 51.676471 | 96 | 0.73136 |
9d43e2c56e02d169fd7039a51bf07e5022d43088 | 13,584 | py | Python | elifetools/rawJATS.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 9 | 2015-04-16T08:13:31.000Z | 2020-05-18T14:03:06.000Z | elifetools/rawJATS.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 310 | 2015-02-11T00:30:09.000Z | 2021-07-14T23:58:50.000Z | elifetools/rawJATS.py | elifesciences/elife-tools | ee345bf0e6703ef0f7e718355e85730abbdfd117 | [
"MIT"
] | 9 | 2015-02-04T01:21:28.000Z | 2021-06-15T12:50:47.000Z | from elifetools.utils import first, firstnn, extract_nodes, node_contents_str
"""
rawParser.py extracts and returns the nodes from the article xml using BeautifulSoup so that functionality at higher levels may use and combine them as neccessary.
"""
def article_meta(soup):
return first(extract_nodes(soup, "arti... | 22.123779 | 163 | 0.688678 |
1a4022e05f5d27c54bf3bf7048c362eb093a89fc | 1,233 | py | Python | google/ads/googleads/v8/services/types/domain_category_service.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | google/ads/googleads/v8/services/types/domain_category_service.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | google/ads/googleads/v8/services/types/domain_category_service.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 30.825 | 120 | 0.729927 |
d875fb1e44159bdb390d7f6afbee936009699c5d | 994 | py | Python | scrapy/core/downloader/handlers/http10.py | HyunTruth/scrapy | 9bc5fab870aaee23905057002276fc0e1a48485f | [
"BSD-3-Clause"
] | 9,953 | 2019-04-03T23:41:04.000Z | 2022-03-31T11:54:44.000Z | stackoverflow/venv/lib/python3.6/site-packages/scrapy/core/downloader/handlers/http10.py | W4LKURE/learn_python3_spider | 98dd354a41598b31302641f9a0ea49d1ecfa0fb1 | [
"MIT"
] | 48 | 2018-11-08T01:31:33.000Z | 2019-03-08T01:18:18.000Z | stackoverflow/venv/lib/python3.6/site-packages/scrapy/core/downloader/handlers/http10.py | W4LKURE/learn_python3_spider | 98dd354a41598b31302641f9a0ea49d1ecfa0fb1 | [
"MIT"
] | 2,803 | 2019-04-06T13:15:33.000Z | 2022-03-31T07:42:01.000Z | """Download handlers for http and https schemes
"""
from twisted.internet import reactor
from scrapy.utils.misc import load_object
from scrapy.utils.python import to_unicode
class HTTP10DownloadHandler(object):
lazy = False
def __init__(self, settings):
self.HTTPClientFactory = load_object(settings['... | 35.5 | 92 | 0.684105 |
c6a034883c2413d27da776b5b5792279424c5e98 | 2,206 | py | Python | PhdThesis/FeasibilityStudies/main.py | pariterre/ViolinOptimalControl | b7037d051a73f2c6cf5815e9d2269ea8c2e11993 | [
"MIT"
] | null | null | null | PhdThesis/FeasibilityStudies/main.py | pariterre/ViolinOptimalControl | b7037d051a73f2c6cf5815e9d2269ea8c2e11993 | [
"MIT"
] | 1 | 2020-04-16T02:21:49.000Z | 2020-04-16T02:21:49.000Z | PhdThesis/FeasibilityStudies/main.py | pariterre/ViolinOptimalControl | b7037d051a73f2c6cf5815e9d2269ea8c2e11993 | [
"MIT"
] | 1 | 2019-11-18T16:31:16.000Z | 2019-11-18T16:31:16.000Z | from enum import Enum
from feasibility_studies import FatigueIntegrator, StudyConfiguration, FatigueModels, TargetFunctions, FatigueParameters
class Study(Enum):
# DEBUG OPTIONS
XIA_ONLY = StudyConfiguration(
fatigue_parameters=FatigueParameters(),
t_end=600,
fixed_target=0.2,
... | 30.219178 | 120 | 0.651859 |
5e1334067b305d7c172ea8a958ff8dd274c2e443 | 3,433 | py | Python | test/update_candidate.py | jeromevonk/candidates-api | 256dc13a1ca73d88ae97b80e010774dc5e97c4ca | [
"MIT"
] | 1 | 2018-07-08T02:52:25.000Z | 2018-07-08T02:52:25.000Z | test/update_candidate.py | jeromevonk/candidates-api | 256dc13a1ca73d88ae97b80e010774dc5e97c4ca | [
"MIT"
] | null | null | null | test/update_candidate.py | jeromevonk/candidates-api | 256dc13a1ca73d88ae97b80e010774dc5e97c4ca | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
# Name: Candidates API test
# Author: Jerome Vergueiro Vonk
# Created: 01/06/2018
#-------------------------------------------------------------------------------
import requests
import sys
import json
import ast
from get_... | 39.918605 | 207 | 0.511215 |
bf0b75263ff7930817f047e73532f17fd7b44fc6 | 15,155 | py | Python | SMBcorr/mar_smb_cumulative.py | SmithB/SMBcorr | 7c35cf8383058986fd82b28beab3c5580f9f8667 | [
"MIT"
] | null | null | null | SMBcorr/mar_smb_cumulative.py | SmithB/SMBcorr | 7c35cf8383058986fd82b28beab3c5580f9f8667 | [
"MIT"
] | null | null | null | SMBcorr/mar_smb_cumulative.py | SmithB/SMBcorr | 7c35cf8383058986fd82b28beab3c5580f9f8667 | [
"MIT"
] | 1 | 2020-08-06T19:48:52.000Z | 2020-08-06T19:48:52.000Z | #!/usr/bin/env python
u"""
mar_smb_cumulative.py
Written by Tyler Sutterley (11/2019)
Calculates cumulative anomalies of MAR surface mass balance products
COMMAND LINE OPTIONS:
--help: list the command line options
--directory=X: set the full path to the MAR data directory
--version=X: MAR version to run
... | 41.634615 | 80 | 0.617156 |
68a79eb9967b3c1e8c6908d2ec17332aa88cd12d | 7,218 | py | Python | pywire/test_suite.py | Verkhovskaya/PyDL | 4c3f2d952dd988ff27bf359d2f2cdde65737e062 | [
"MIT"
] | 5 | 2018-07-28T18:18:59.000Z | 2022-01-05T19:01:50.000Z | pywire/test_suite.py | Verkhovskaya/PyDL | 4c3f2d952dd988ff27bf359d2f2cdde65737e062 | [
"MIT"
] | null | null | null | pywire/test_suite.py | Verkhovskaya/PyDL | 4c3f2d952dd988ff27bf359d2f2cdde65737e062 | [
"MIT"
] | null | null | null | from pywire.signal import Signal
from tkinter import *
from tkinter.ttk import Separator
from enum import Enum
class BitState(Enum):
TRUE = 1
FALSE = 2
TRUE_FORCED = 3
FALSE_FORCED = 4
UNDEFINED = 5
def bitsToInt(bit_array):
for bit in bit_array:
if bit.state == BitState.UNDEFINED:
... | 39.442623 | 119 | 0.557495 |
30f1afcbfbd6380acef898b0fff74262f61f2749 | 5,250 | py | Python | stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/extensions/filter.py | stac-utils/stac-fastapi-nosql | 0f4cf9a91f9bfd78f215895b6b848efbb631db97 | [
"MIT"
] | 6 | 2022-01-26T14:34:52.000Z | 2022-02-22T00:09:23.000Z | stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/extensions/filter.py | stac-utils/stac-fastapi-elasticsearch | 0f4cf9a91f9bfd78f215895b6b848efbb631db97 | [
"MIT"
] | 46 | 2022-02-22T21:22:17.000Z | 2022-03-25T15:20:39.000Z | stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/extensions/filter.py | stac-utils/stac-fastapi-nosql | 0f4cf9a91f9bfd78f215895b6b848efbb631db97 | [
"MIT"
] | null | null | null | """
Implements Filter Extension.
Basic CQL2 (AND, OR, NOT), comparison operators (=, <>, <, <=, >, >=), and IS NULL.
The comparison operators are allowed against string, numeric, boolean, date, and datetime types.
Basic Spatial Operators (http://www.opengis.net/spec/cql2/1.0/conf/basic-spatial-operators)
defines the ... | 26.649746 | 102 | 0.583238 |
b8aa7e9a05156a3a00e3913f2d0c8fb0dd25d7d9 | 4,345 | py | Python | runners/mlcommons_box_k8s/mlcommons_box_k8s/k8s_run.py | swiftdiaries/mlbox | 75af4a06d09190fcef792017078ae80e00cd8d3d | [
"Apache-2.0"
] | null | null | null | runners/mlcommons_box_k8s/mlcommons_box_k8s/k8s_run.py | swiftdiaries/mlbox | 75af4a06d09190fcef792017078ae80e00cd8d3d | [
"Apache-2.0"
] | null | null | null | runners/mlcommons_box_k8s/mlcommons_box_k8s/k8s_run.py | swiftdiaries/mlbox | 75af4a06d09190fcef792017078ae80e00cd8d3d | [
"Apache-2.0"
] | null | null | null | import logging
from typing import List, Dict
from mlcommons_box.common import mlbox_metadata
from kubernetes import client, config
volume_mount_prefix = "/mnt/mlbox/"
class KubernetesRun(object):
logger: logging.Logger = None
mlbox_job_manifest: client.V1Job = None
namespace: str = "default"
def __i... | 40.607477 | 125 | 0.561335 |
3014cee2dc2dc6bbf7d2d2412a2fa82d320d3fa8 | 6,161 | py | Python | apps/sqoop/src/sqoop/test_base.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 3 | 2018-01-29T14:16:02.000Z | 2019-02-05T21:33:05.000Z | apps/sqoop/src/sqoop/test_base.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 1 | 2019-05-06T15:32:21.000Z | 2019-05-06T15:32:21.000Z | apps/sqoop/src/sqoop/test_base.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 2 | 2019-12-05T17:24:36.000Z | 2021-11-22T21:21:32.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 32.426316 | 113 | 0.653141 |
a65238d7f4b5d62a069994fba073211190b72ed4 | 2,557 | py | Python | python/sync/states.py | sa363/youtrack-rest-python-library | ed7921a4ca8aa882517a531af934836a0ef295ed | [
"Apache-2.0"
] | 108 | 2015-01-04T19:27:49.000Z | 2021-11-08T09:50:08.000Z | python/sync/states.py | sa363/youtrack-rest-python-library | ed7921a4ca8aa882517a531af934836a0ef295ed | [
"Apache-2.0"
] | 12 | 2015-03-03T09:07:09.000Z | 2020-07-01T05:26:30.000Z | python/sync/states.py | sa363/youtrack-rest-python-library | ed7921a4ca8aa882517a531af934836a0ef295ed | [
"Apache-2.0"
] | 109 | 2015-01-29T13:20:37.000Z | 2022-03-19T09:03:28.000Z | import youtrack
fix = "fix"
opn = "open"
rop = "reopen"
inp = "in progress"
dis = "discuss"
crp = "can't reproduce"
obs = "obsolete"
dup = "duplicate"
asd = "as designed"
inv = "invalidate"
wat = "wait"
ver = "verify"
cvr = "can't verify"
advanced_state_machine = {
"Submitted -> Fixed" : fix,
"Submitted -> Op... | 33.644737 | 139 | 0.593664 |
3c61ee6c6e1287e85d122963d6dbb9687fe38e01 | 469 | py | Python | edit_image_data/change_shutil.py | Hoku113/support-custom-vision | e6008ce959cff26b2150e6b2a95a7c3cb1460719 | [
"BSD-3-Clause"
] | null | null | null | edit_image_data/change_shutil.py | Hoku113/support-custom-vision | e6008ce959cff26b2150e6b2a95a7c3cb1460719 | [
"BSD-3-Clause"
] | null | null | null | edit_image_data/change_shutil.py | Hoku113/support-custom-vision | e6008ce959cff26b2150e6b2a95a7c3cb1460719 | [
"BSD-3-Clause"
] | null | null | null | import pathlib
import shutil
import os
def change_suffix(file_name, from_suffix, to_suffix):
sf = pathlib.PurePath(file_name).suffix
if sf == from_suffix:
st = pathlib.PurePath(file_name).stem
to_name = st + to_suffix
shutil.move(file_name, to_name)
path = './images/'
files = os.li... | 20.391304 | 67 | 0.671642 |
be7f644fcca8edfabff23ed8b62d7a66470d1d34 | 1,433 | py | Python | scripts/AddObject/addgrid.py | AsheAnn/C4D_Python | 3fa5e1d8b4f94efb03f820a61789d276c8a5b045 | [
"MIT"
] | null | null | null | scripts/AddObject/addgrid.py | AsheAnn/C4D_Python | 3fa5e1d8b4f94efb03f820a61789d276c8a5b045 | [
"MIT"
] | null | null | null | scripts/AddObject/addgrid.py | AsheAnn/C4D_Python | 3fa5e1d8b4f94efb03f820a61789d276c8a5b045 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Note:
# - This is the Python code used in Script Manager. ... | 49.413793 | 200 | 0.287509 |
8dc946874bf4f6b81cfd8afa79037b4a42cb0437 | 31,159 | py | Python | tests/test_charts.py | stefsmeets/pyvista | 06b1ac01214a4c636395f139b681acea2543960c | [
"MIT"
] | 1,107 | 2019-05-13T06:40:26.000Z | 2022-03-31T22:16:32.000Z | tests/test_charts.py | stefsmeets/pyvista | 06b1ac01214a4c636395f139b681acea2543960c | [
"MIT"
] | 1,709 | 2019-05-13T05:52:42.000Z | 2022-03-31T18:16:53.000Z | tests/test_charts.py | stefsmeets/pyvista | 06b1ac01214a4c636395f139b681acea2543960c | [
"MIT"
] | 225 | 2019-05-16T04:24:20.000Z | 2022-03-31T18:14:02.000Z | """Test charting functionality"""
import itertools
import platform
import matplotlib.pyplot as plt
import numpy as np
import pytest
import pyvista
from pyvista import examples
from pyvista.plotting import charts, system_supports_plotting
skip_mac = pytest.mark.skipif(platform.system() == 'Darwin',
... | 32.764458 | 134 | 0.657274 |
88415ef561b33584e4d5e0d598e84242a9154359 | 1,785 | py | Python | littlelambocoin/types/blockchain_format/tree_hash.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | 6 | 2021-07-15T16:52:46.000Z | 2021-09-27T16:57:08.000Z | littlelambocoin/types/blockchain_format/tree_hash.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | 6 | 2021-07-27T08:17:34.000Z | 2021-11-30T11:39:19.000Z | littlelambocoin/types/blockchain_format/tree_hash.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | 7 | 2021-08-15T15:10:58.000Z | 2021-10-04T16:47:39.000Z | """
This is an implementation of `sha256_treehash`, used to calculate
puzzle hashes in clvm.
This implementation goes to great pains to be non-recursive so we don't
have to worry about blowing out the python stack.
"""
from typing import Optional, Set
from clvm import CLVMObject
from littlelambocoin.types.blockchai... | 30.254237 | 95 | 0.638095 |
29f731ea0645b09056e778318e04bce9a210a79e | 71,085 | py | Python | plugins/modules/aws_elastigroup.py | spotinst/spot-ansible-cloud-modules | c0814c9dbf69cb7080b02e16b6c7c82a3c376db2 | [
"MIT"
] | 1 | 2022-02-16T02:09:00.000Z | 2022-02-16T02:09:00.000Z | plugins/modules/aws_elastigroup.py | spotinst/spot-ansible-cloud-modules | c0814c9dbf69cb7080b02e16b6c7c82a3c376db2 | [
"MIT"
] | 1 | 2022-01-23T14:13:42.000Z | 2022-01-23T14:13:50.000Z | plugins/modules/aws_elastigroup.py | spotinst/spot-ansible-cloud-modules | c0814c9dbf69cb7080b02e16b6c7c82a3c376db2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017 Ansible Project
# 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
DOCUMENTATION = """
---
module: aws_elastigroup
version_added: 1.0.0
short_descri... | 32.533181 | 147 | 0.642358 |
53d3d18bf6903dce8a8def495382774bcc2d4c65 | 2,478 | py | Python | src/gedml/core/collectors/base_collector.py | zbr17/GeDML | 83f6f835e7c3319e32432b3013820f98476cc96c | [
"MIT"
] | 25 | 2021-09-06T13:26:02.000Z | 2022-01-06T13:25:24.000Z | src/gedml/core/collectors/base_collector.py | zbr17/GeDML | 83f6f835e7c3319e32432b3013820f98476cc96c | [
"MIT"
] | 1 | 2021-09-09T08:29:29.000Z | 2021-09-13T15:05:59.000Z | src/gedml/core/collectors/base_collector.py | zbr17/GeDML | 83f6f835e7c3319e32432b3013820f98476cc96c | [
"MIT"
] | 2 | 2021-09-07T08:44:41.000Z | 2021-09-09T08:31:55.000Z | import torch
from abc import ABCMeta, abstractmethod
from ..modules import WithRecorder
class BaseCollector(WithRecorder, metaclass=ABCMeta):
"""
Base class of collector module, which defines main collector method in function ``collect`` and ``update``, and defines default parameters in function ``output_list... | 39.333333 | 216 | 0.604923 |
c8c77525d0e786e301d5336063523930dca62dc4 | 3,710 | py | Python | broker/oanda/position.py | lorne-luo/qsforex | 87976aef91a3f4dd4ef1d3de17db1b014b46e4d8 | [
"Unlicense",
"MIT"
] | null | null | null | broker/oanda/position.py | lorne-luo/qsforex | 87976aef91a3f4dd4ef1d3de17db1b014b46e4d8 | [
"Unlicense",
"MIT"
] | 7 | 2020-02-11T23:56:08.000Z | 2022-02-10T07:35:07.000Z | broker/oanda/position.py | lorne-luo/qsforex | 87976aef91a3f4dd4ef1d3de17db1b014b46e4d8 | [
"Unlicense",
"MIT"
] | null | null | null | import logging
from broker.base import PositionBase
from broker.oanda.base import OANDABase
from broker.oanda.common.convertor import get_symbol
from broker.oanda.common.logger import log_error
logger = logging.getLogger(__name__)
class PositionMixin(OANDABase, PositionBase):
def pull_position(self, instrument... | 38.247423 | 87 | 0.683827 |
cf7c89d4bc4a19c01768bccdde351e1c9b7ad481 | 40 | py | Python | tests/databases/__init__.py | sethfischer/mundo-flags | 20e5ad68d760b6c736701f6e43551c738456098d | [
"MIT"
] | null | null | null | tests/databases/__init__.py | sethfischer/mundo-flags | 20e5ad68d760b6c736701f6e43551c738456098d | [
"MIT"
] | 1 | 2021-09-06T01:48:18.000Z | 2021-09-06T08:47:36.000Z | tests/databases/__init__.py | sethfischer/mundo-flags | 20e5ad68d760b6c736701f6e43551c738456098d | [
"MIT"
] | null | null | null | """Tests for manage_flags databases."""
| 20 | 39 | 0.725 |
7768e2016aaf998684615ecce25c01243c2885de | 438 | py | Python | server/api0/permissions.py | hiway/zentropi20 | 16a5afa9aac98f1e0c5856b2a4608fc4cede25c9 | [
"BSD-2-Clause"
] | null | null | null | server/api0/permissions.py | hiway/zentropi20 | 16a5afa9aac98f1e0c5856b2a4608fc4cede25c9 | [
"BSD-2-Clause"
] | null | null | null | server/api0/permissions.py | hiway/zentropi20 | 16a5afa9aac98f1e0c5856b2a4608fc4cede25c9 | [
"BSD-2-Clause"
] | null | null | null | from rest_framework.permissions import BasePermission
from .models import Frame
class IsOwner(BasePermission):
"""Custom permission class to allow only frame owners to edit them."""
def has_object_permission(self, request, view, obj):
"""Return True if permission is granted to the frame owner."""
... | 33.692308 | 74 | 0.700913 |
c4ed8c27196855b6d46f4b530abf8e7e4b8717cc | 49 | py | Python | src/carbonium/elements/__init__.py | cowboycodr/carbonium | ad0480e02631337e308a46f856bc9b58fac35c58 | [
"Apache-2.0"
] | 1 | 2021-09-23T19:22:40.000Z | 2021-09-23T19:22:40.000Z | src/carbonium/elements/__init__.py | cowboycodr/carbonium | ad0480e02631337e308a46f856bc9b58fac35c58 | [
"Apache-2.0"
] | null | null | null | src/carbonium/elements/__init__.py | cowboycodr/carbonium | ad0480e02631337e308a46f856bc9b58fac35c58 | [
"Apache-2.0"
] | null | null | null | from node import Node
from element import Element | 24.5 | 27 | 0.857143 |
b89815d1ed08fef2599c808027337fa6a902becc | 1,297 | py | Python | scripts/xml_reader.py | slabasan/hatchet | b8f2d8f0c51b95d0632fb0db95ac5caf2ea7f517 | [
"MIT"
] | null | null | null | scripts/xml_reader.py | slabasan/hatchet | b8f2d8f0c51b95d0632fb0db95ac5caf2ea7f517 | [
"MIT"
] | null | null | null | scripts/xml_reader.py | slabasan/hatchet | b8f2d8f0c51b95d0632fb0db95ac5caf2ea7f517 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2017-2020 Lawrence Livermore National Security, LLC and other
# Hatchet Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: MIT
from __future__ import print_function
try:
import xml.etree.cElementTree as ET
except ImportError:
import... | 24.018519 | 73 | 0.688512 |
56e5c536074d74d31f4d24ac8e326a346c1ae65e | 2,563 | py | Python | test/models/test_deepset.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | test/models/test_deepset.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | test/models/test_deepset.py | NetKet/netket | 96758e814fc3128e6821564d6cc2852bac40ecf2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The NetKet 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 applicable law... | 29.125 | 87 | 0.616075 |
0a6960ef625a34357baabcef7c8cfc323041eb62 | 1,411 | py | Python | ariadne_server/context/database.py | seanaye/FeatherLight-API | 4d42a424762311ee35b3fd4f689883aa4197eb2e | [
"MIT"
] | null | null | null | ariadne_server/context/database.py | seanaye/FeatherLight-API | 4d42a424762311ee35b3fd4f689883aa4197eb2e | [
"MIT"
] | null | null | null | ariadne_server/context/database.py | seanaye/FeatherLight-API | 4d42a424762311ee35b3fd4f689883aa4197eb2e | [
"MIT"
] | null | null | null | import os
import asyncio
from socket import gaierror
from gino import Gino
from helpers.mixins import LoggerMixin
class GinoInstance(LoggerMixin):
"""Gino connection manager"""
def __init__(self):
self._host = os.environ.get('POSTGRES_HOST')
self._user = os.environ.get('POSTGRES_USER')
... | 32.813953 | 93 | 0.572644 |
c35092dcfd77b9e8d51987c8c9622a956257f6d0 | 1,568 | py | Python | tests/test_pipeline.py | FcoJavT/rantanplan | 21cad3cb106659d97035bd9ac7f5dbe025f2ff8e | [
"Apache-2.0"
] | null | null | null | tests/test_pipeline.py | FcoJavT/rantanplan | 21cad3cb106659d97035bd9ac7f5dbe025f2ff8e | [
"Apache-2.0"
] | null | null | null | tests/test_pipeline.py | FcoJavT/rantanplan | 21cad3cb106659d97035bd9ac7f5dbe025f2ff8e | [
"Apache-2.0"
] | null | null | null | import spacy
from rantanplan.pipeline import load_pipeline
test_dict_list = [
{'text': 'prue', 'pos_': '', 'tag_': '',
'n_rights': 0},
{'text': '-', 'pos_': '', 'tag_': '',
'n_rights': 0},
{'text': '\n', 'pos_': '', 'tag_': '',
'n_rights': 0},
{'text': 'ba', 'pos_': '', 'tag_': '',
... | 31.36 | 76 | 0.589923 |
a9209f1cbdd7be87f57fe1746e4c3ea098e04485 | 15,117 | py | Python | pytorch_lightning/loggers/neptune.py | KyleGoyette/pytorch-lightning | d6470bf1937e51e037a7f94a55ad76898e5ae103 | [
"Apache-2.0"
] | 3 | 2021-04-09T14:03:03.000Z | 2021-04-10T02:58:23.000Z | pytorch_lightning/loggers/neptune.py | KyleGoyette/pytorch-lightning | d6470bf1937e51e037a7f94a55ad76898e5ae103 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/loggers/neptune.py | KyleGoyette/pytorch-lightning | d6470bf1937e51e037a7f94a55ad76898e5ae103 | [
"Apache-2.0"
] | 1 | 2021-09-16T15:14:11.000Z | 2021-09-16T15:14:11.000Z | # 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... | 38.36802 | 110 | 0.641529 |
7d6855a6cb17ae987e725a4e7adf90920313e807 | 4,545 | py | Python | sdk/python/pulumi_kubernetes/coordination/v1/Lease.py | RichardWLaub/pulumi-kubernetes | 19c8f1bd26e54bf5b646423a625151c95ea40594 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/coordination/v1/Lease.py | RichardWLaub/pulumi-kubernetes | 19c8f1bd26e54bf5b646423a625151c95ea40594 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/coordination/v1/Lease.py | RichardWLaub/pulumi-kubernetes | 19c8f1bd26e54bf5b646423a625151c95ea40594 | [
"Apache-2.0"
] | null | null | null | # *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
from typing import Optional
import pulumi
import pulumi.runtime
from pulumi import Input, ResourceOptions
from ... import tables, version
... | 40.945946 | 114 | 0.676128 |
7077dcfb7e15dc57093fca385d40078d19155654 | 1,099 | py | Python | zingmp3/downloader.py | mazino2d/data-crawler | 8acd60694bb3cf9514184bdb21d2f0f9e7051cf7 | [
"MIT"
] | null | null | null | zingmp3/downloader.py | mazino2d/data-crawler | 8acd60694bb3cf9514184bdb21d2f0f9e7051cf7 | [
"MIT"
] | null | null | null | zingmp3/downloader.py | mazino2d/data-crawler | 8acd60694bb3cf9514184bdb21d2f0f9e7051cf7 | [
"MIT"
] | null | null | null | import requests
import wget
import pandas as pd
import argparse
from os import listdir, mkdir, system
# Add the arguments to the parser
ap = argparse.ArgumentParser()
ap.add_argument("-c", "--count", required=True)
args = vars(ap.parse_args())
COUNT = int(args['count'])
# read file to get song id
song_info = pd.read... | 24.422222 | 68 | 0.66697 |
ecb44b8958d3fcc7bfdd0cecb642b7329df6a8d7 | 11,355 | py | Python | indico/modules/events/contributions/controllers/display.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | indico/modules/events/contributions/controllers/display.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | indico/modules/events/contributions/controllers/display.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from flask import jsonify, request, session
from sqlalchemy.orm i... | 43.011364 | 117 | 0.67609 |
0162bf4530e15cfd061a6c53d4bc1202fcd71625 | 943 | py | Python | frappe/core/page/applications/applications.py | cadencewatches/frappe | d9dcf132a10d68b2dcc80ef348e6d967f1e44084 | [
"MIT"
] | null | null | null | frappe/core/page/applications/applications.py | cadencewatches/frappe | d9dcf132a10d68b2dcc80ef348e6d967f1e44084 | [
"MIT"
] | null | null | null | frappe/core/page/applications/applications.py | cadencewatches/frappe | d9dcf132a10d68b2dcc80ef348e6d967f1e44084 | [
"MIT"
] | 1 | 2018-03-21T15:51:46.000Z | 2018-03-21T15:51:46.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.installer
from frappe import _
@frappe.whitelist()
def get_app_list():
out = {}
installed = frappe.get_installed_apps()
for app in frappe.get_al... | 25.486486 | 71 | 0.720042 |
d603d5c4455fc455616a84ba502a0767c772ec24 | 260 | py | Python | data.py | jonidakolgjini/quiz_game | eae9a197f6831f0413b3f9e0355ca0ce4b7d95a2 | [
"MIT"
] | null | null | null | data.py | jonidakolgjini/quiz_game | eae9a197f6831f0413b3f9e0355ca0ce4b7d95a2 | [
"MIT"
] | null | null | null | data.py | jonidakolgjini/quiz_game | eae9a197f6831f0413b3f9e0355ca0ce4b7d95a2 | [
"MIT"
] | null | null | null | import requests
parameters = {
"amount": 10,
"type": "boolean"
}
response = requests.get(url="https://opentdb.com/api.php?amount=10&type=boolean", params=parameters)
response.raise_for_status()
data = response.json()
question_data = data["results"]
| 20 | 100 | 0.711538 |
2cc26e8429e93f90242a3ec19c7f238335783e58 | 1,871 | py | Python | qiskit/providers/ibmq/api/exceptions.py | dowem/qiskit-ibmq-provider | dfdc56847ed5a0920e764bc7e7cea39f77a0aab2 | [
"Apache-2.0"
] | null | null | null | qiskit/providers/ibmq/api/exceptions.py | dowem/qiskit-ibmq-provider | dfdc56847ed5a0920e764bc7e7cea39f77a0aab2 | [
"Apache-2.0"
] | null | null | null | qiskit/providers/ibmq/api/exceptions.py | dowem/qiskit-ibmq-provider | dfdc56847ed5a0920e764bc7e7cea39f77a0aab2 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 26.728571 | 77 | 0.718867 |
d52797677e4ee82875503b2486fa1a15a50e1e75 | 10,290 | py | Python | harvardit/harvardit/settings.py | arochaga/harvardit | 67e2661942fb5be8bd8a68e078fd11c8899c59de | [
"Apache-2.0"
] | 4 | 2018-05-22T20:56:00.000Z | 2018-08-16T07:14:05.000Z | harvardit/harvardit/settings.py | arochaga/harvardit | 67e2661942fb5be8bd8a68e078fd11c8899c59de | [
"Apache-2.0"
] | null | null | null | harvardit/harvardit/settings.py | arochaga/harvardit | 67e2661942fb5be8bd8a68e078fd11c8899c59de | [
"Apache-2.0"
] | 4 | 2018-05-23T13:54:16.000Z | 2018-09-07T19:30:09.000Z | """
Django settings for harvardit project.
Generated by 'django-admin startproject' using Django 2.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
... | 57.486034 | 4,100 | 0.773372 |
6120bb666da2bcd0f2a9e6f393139807ea69b77c | 6,159 | py | Python | useintest/executables/builders.py | wtsi-hgi/startfortest | 426343c0ff340d4d83575cdafe2c4184707e7693 | [
"MIT"
] | 1 | 2019-06-18T20:56:42.000Z | 2019-06-18T20:56:42.000Z | useintest/executables/builders.py | wtsi-hgi/useintest | 426343c0ff340d4d83575cdafe2c4184707e7693 | [
"MIT"
] | 3 | 2017-09-21T12:14:44.000Z | 2018-02-19T11:18:47.000Z | useintest/executables/builders.py | wtsi-hgi/useintest | 426343c0ff340d4d83575cdafe2c4184707e7693 | [
"MIT"
] | null | null | null | import argparse
import base64
import os
import sys
from copy import deepcopy
from typing import List, Iterable, Dict, Set, Callable, Any, Union
from dill import dill
from useintest.executables.common import CLI_ARGUMENTS
_PROJECT_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
_ARGUMENTS_... | 41.06 | 126 | 0.618282 |
4daa2236e2b03fccc0fb013b6f45ab3818a16341 | 1,443 | py | Python | multiprocessingExercise/multiprocess_TCP_server.py | terasakisatoshi/pythonCodes | baee095ecee96f6b5ec6431267cdc6c40512a542 | [
"MIT"
] | null | null | null | multiprocessingExercise/multiprocess_TCP_server.py | terasakisatoshi/pythonCodes | baee095ecee96f6b5ec6431267cdc6c40512a542 | [
"MIT"
] | null | null | null | multiprocessingExercise/multiprocess_TCP_server.py | terasakisatoshi/pythonCodes | baee095ecee96f6b5ec6431267cdc6c40512a542 | [
"MIT"
] | null | null | null | import time
import multiprocessing
import socket
class MultiProcessingSocketStreamServer(object):
def __init__(self,port,process):
self._serversocket=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
self._serversocket.bind(('localhost',port))
self._serversocket.listen(5)
self.pro... | 25.315789 | 81 | 0.652114 |
9ef46c7cd523f2bc306f8fcae3ea66a8da8afe1b | 2,333 | py | Python | testing/l2/utils.py | milancermak/realms-contracts | 73a6772b687bbe1775d104c1ca686ee8930ff250 | [
"MIT"
] | 1 | 2022-01-06T05:44:44.000Z | 2022-01-06T05:44:44.000Z | testing/l2/utils.py | milancermak/realms-contracts | 73a6772b687bbe1775d104c1ca686ee8930ff250 | [
"MIT"
] | null | null | null | testing/l2/utils.py | milancermak/realms-contracts | 73a6772b687bbe1775d104c1ca686ee8930ff250 | [
"MIT"
] | null | null | null | """Utilities for testing Cairo contracts."""
from starkware.cairo.common.hash_state import compute_hash_on_elements
from starkware.crypto.signature.signature import private_to_stark_key, sign
from starkware.starknet.definitions.error_codes import StarknetErrorCode
from starkware.starkware_utils.error_handling import S... | 27.77381 | 100 | 0.645092 |
efd58e33698bceaf7a4a244af07cde3e9073ebf4 | 2,054 | py | Python | chapter7/services/load_csv_service.py | andreffs18/collective-intelligence | 6bea822faa4ac6ae3df8843f8af2420a25d6da0f | [
"MIT"
] | 1 | 2020-07-29T09:10:48.000Z | 2020-07-29T09:10:48.000Z | chapter7/services/load_csv_service.py | andreffs18/collective-intelligence | 6bea822faa4ac6ae3df8843f8af2420a25d6da0f | [
"MIT"
] | 3 | 2020-03-30T20:12:58.000Z | 2022-03-11T23:18:38.000Z | chapter7/services/load_csv_service.py | andreffs18/collective-intelligence | 6bea822faa4ac6ae3df8843f8af2420a25d6da0f | [
"MIT"
] | null | null | null | class LoadCSVService:
def __init__(self, standard=False, filename="data.csv"):
self.standard = standard
self.filename = filename
def call(self):
"""
For this example purpuses, we return the book example, instead of reading an actual file.
"""
if not self.standar... | 36.035088 | 97 | 0.539435 |
7869e56db8e9e99a47f188ba0a74ad3f725f19e2 | 1,811 | py | Python | tests/rekey.py | prakashngit/CCF | 3ae6e3d4074f424a85ee062aa1ed584e7e17f72f | [
"Apache-2.0"
] | null | null | null | tests/rekey.py | prakashngit/CCF | 3ae6e3d4074f424a85ee062aa1ed584e7e17f72f | [
"Apache-2.0"
] | null | null | null | tests/rekey.py | prakashngit/CCF | 3ae6e3d4074f424a85ee062aa1ed584e7e17f72f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
import infra.ccf
import infra.jsonrpc
import infra.notification
import suite.test_requirements as reqs
import infra.e2e_args
import time
from loguru import logger as LOG
@reqs.description("Rekey the ledger once")
@re... | 28.746032 | 85 | 0.687465 |
a76968da99d789a1c033841a3a6cd3b4d0776af7 | 7,665 | py | Python | networkx/release.py | nadesai/networkx | ca2df82141cf6977c9d59af2d0bfbc990e2aabce | [
"BSD-3-Clause"
] | null | null | null | networkx/release.py | nadesai/networkx | ca2df82141cf6977c9d59af2d0bfbc990e2aabce | [
"BSD-3-Clause"
] | null | null | null | networkx/release.py | nadesai/networkx | ca2df82141cf6977c9d59af2d0bfbc990e2aabce | [
"BSD-3-Clause"
] | null | null | null | """Release data for NetworkX.
When NetworkX is imported a number of steps are followed to determine
the version information.
1) If the release is not a development release (dev=False), then version
information is read from version.py, a file containing statically
defined version information. This file... | 33.181818 | 80 | 0.662883 |
a3d3ccab3479e41072a9c6e915e8e5d7e0fd3689 | 1,645 | py | Python | ebnf/primitives.py | shixiongfei/ebnf | 40f9055d240c741a248a2f797109c2b08a8c46c8 | [
"Apache-2.0"
] | 1 | 2021-02-02T11:38:06.000Z | 2021-02-02T11:38:06.000Z | ebnf/primitives.py | shixiongfei/ebnf | 40f9055d240c741a248a2f797109c2b08a8c46c8 | [
"Apache-2.0"
] | null | null | null | ebnf/primitives.py | shixiongfei/ebnf | 40f9055d240c741a248a2f797109c2b08a8c46c8 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
class Statement:
def asString(self):
raise Exception("Missing `asString` method")
def __repr__(self):
return self.asString()
def __str__(self):
return self.asString()
class Optional(Statement):
def __init__(self, token):
super().__init__()
... | 21.933333 | 62 | 0.578116 |
d85738012dd2e98d4a9e2b48ea553bbba4289afd | 8,007 | py | Python | pymc3/tests/test_diagnostics.py | vpolisky/pymc3 | 87cdd712c86321121c2ed3150764f3d847f5083c | [
"Apache-2.0"
] | null | null | null | pymc3/tests/test_diagnostics.py | vpolisky/pymc3 | 87cdd712c86321121c2ed3150764f3d847f5083c | [
"Apache-2.0"
] | null | null | null | pymc3/tests/test_diagnostics.py | vpolisky/pymc3 | 87cdd712c86321121c2ed3150764f3d847f5083c | [
"Apache-2.0"
] | 1 | 2021-04-13T10:31:26.000Z | 2021-04-13T10:31:26.000Z | import numpy as np
from numpy.testing import assert_allclose, assert_array_less
from .helpers import SeededTest
from ..model import Model
from ..step_methods import Slice, Metropolis, NUTS
from ..distributions import Normal
from ..tuning import find_MAP
from ..sampling import sample
from ..diagnostics import effective... | 38.681159 | 98 | 0.618084 |
3930f53c3d0d9dd3ab97c09e39f1837b53eda821 | 13,637 | py | Python | adaptive_lr_decay/adaptive_fed_avg_test.py | Abhin02/federated | 5fd8f69284c2784b635faadfaf6c66ce843f7701 | [
"Apache-2.0"
] | 1 | 2022-03-16T02:13:39.000Z | 2022-03-16T02:13:39.000Z | adaptive_lr_decay/adaptive_fed_avg_test.py | notminusone/federated | 6a709f5598450232b918c046cfeba849f479d5cb | [
"Apache-2.0"
] | null | null | null | adaptive_lr_decay/adaptive_fed_avg_test.py | notminusone/federated | 6a709f5598450232b918c046cfeba849f479d5cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 36.95664 | 81 | 0.694948 |
bee96d2e8c0cf7b73f3866f1f2b50d8c6a1096b8 | 11,752 | py | Python | pyopenvidu/openvidusession.py | PerchLive/pyopenvidu | fa8ac55b446c94a026dbd73d67cc090810a8c3f1 | [
"MIT"
] | null | null | null | pyopenvidu/openvidusession.py | PerchLive/pyopenvidu | fa8ac55b446c94a026dbd73d67cc090810a8c3f1 | [
"MIT"
] | null | null | null | pyopenvidu/openvidusession.py | PerchLive/pyopenvidu | fa8ac55b446c94a026dbd73d67cc090810a8c3f1 | [
"MIT"
] | null | null | null | """OpenViduSession class."""
from typing import Iterator, List
from datetime import datetime
from threading import RLock
from requests_toolbelt.sessions import BaseUrlSession
from .exceptions import OpenViduSessionDoesNotExistsError, OpenViduConnectionDoesNotExistsError, OpenViduError
from .openviduconnection import O... | 40.38488 | 236 | 0.626617 |
023055b09f366f541a2ec3b1fc2864d5c66a11db | 12,601 | py | Python | nova/tests/unit/db/test_sqlalchemy_migration.py | larsbutler/nova | fb190f30a911658d8b0c4deaf43cbb8c9e35b672 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/db/test_sqlalchemy_migration.py | larsbutler/nova | fb190f30a911658d8b0c4deaf43cbb8c9e35b672 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/db/test_sqlalchemy_migration.py | larsbutler/nova | fb190f30a911658d8b0c4deaf43cbb8c9e35b672 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 44.843416 | 79 | 0.637965 |
0d32edff94c3ac887bd837bfca0e6d5a4ccb5596 | 83 | py | Python | Know Your Code/Python/area_of_circle/area of circle.py | rswalia/open-source-contribution-for-beginners | 1ea29479c6d949760c83926b4c43a6b0d33ad0a0 | [
"MIT"
] | 35 | 2021-12-20T13:37:01.000Z | 2022-03-22T20:52:36.000Z | Know Your Code/Python/area_of_circle/area of circle.py | rswalia/open-source-contribution-for-beginners | 1ea29479c6d949760c83926b4c43a6b0d33ad0a0 | [
"MIT"
] | 152 | 2021-11-01T06:00:11.000Z | 2022-03-20T11:40:00.000Z | Know Your Code/Python/area_of_circle/area of circle.py | rswalia/open-source-contribution-for-beginners | 1ea29479c6d949760c83926b4c43a6b0d33ad0a0 | [
"MIT"
] | 71 | 2021-11-01T06:02:37.000Z | 2022-03-20T04:49:30.000Z | r=float(input("Enter radius of circle:"))
a=3.14*(r**2)
print("area of circle:",a)
| 20.75 | 41 | 0.650602 |
e48a287119e11879dfba04e7e75eef724491ce5e | 2,532 | py | Python | c_src/deps/boringssl/util/bot/update_clang.py | onedata/erlang-tls | 1c0d2c3eb8534540a5effb7f040923a0765eccf0 | [
"BSL-1.0"
] | 15 | 2016-10-16T06:14:21.000Z | 2021-12-22T18:10:17.000Z | third_party/boringssl/src/util/bot/update_clang.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | third_party/boringssl/src/util/bot/update_clang.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 7 | 2018-01-08T02:53:32.000Z | 2020-10-15T13:01:46.000Z | # Copyright (c) 2015, Google Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA... | 35.166667 | 78 | 0.731043 |
e2173b2f09759229919531b14a883e56e6ab0891 | 687 | py | Python | homework/tree-traversal/utils.py | OscarFlores-IFi/credit-rik-lecture | cc522672ae26ff19cf857987c4a14fb5f8409f15 | [
"MIT"
] | null | null | null | homework/tree-traversal/utils.py | OscarFlores-IFi/credit-rik-lecture | cc522672ae26ff19cf857987c4a14fb5f8409f15 | [
"MIT"
] | null | null | null | homework/tree-traversal/utils.py | OscarFlores-IFi/credit-rik-lecture | cc522672ae26ff19cf857987c4a14fb5f8409f15 | [
"MIT"
] | null | null | null | import functools
import json
def pretty_print(logger, serializer_function=lambda obj: obj.__dict__):
def decorator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
serializable_obj = func(*args, **kwargs)
try:
formatted_output = json.dumps(seriali... | 31.227273 | 102 | 0.637555 |
356c576d450b7bb780917f800414964ca365b2cc | 1,211 | py | Python | app1/meeting_app/report/students_enrolled_in_cursee_report/students_enrolled_in_cursee_report.py | jjaycaneza/school_test | b385bf70e98a9ba237c3b8bb53eba03b5ad1a0e1 | [
"MIT"
] | null | null | null | app1/meeting_app/report/students_enrolled_in_cursee_report/students_enrolled_in_cursee_report.py | jjaycaneza/school_test | b385bf70e98a9ba237c3b8bb53eba03b5ad1a0e1 | [
"MIT"
] | null | null | null | app1/meeting_app/report/students_enrolled_in_cursee_report/students_enrolled_in_cursee_report.py | jjaycaneza/school_test | b385bf70e98a9ba237c3b8bb53eba03b5ad1a0e1 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, justine and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
@frappe.whitelist()
def get_courses_information(course):
print(course)
if(course == None):
coursesData = frappe.db.sql("""select * from `tabStudent Information` ... | 22.018182 | 146 | 0.663914 |
f9c33f750f76e1591794eb7c14591434a66454a2 | 1,677 | py | Python | Aula18/app.py | icarogoggin/BlueEdtech_Modulo2 | ca3552624e51d15181927dc882c30572093a1b7d | [
"MIT"
] | null | null | null | Aula18/app.py | icarogoggin/BlueEdtech_Modulo2 | ca3552624e51d15181927dc882c30572093a1b7d | [
"MIT"
] | null | null | null | Aula18/app.py | icarogoggin/BlueEdtech_Modulo2 | ca3552624e51d15181927dc882c30572093a1b7d | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
user = ''
password = ''
host = ''
database = ''
app.config['SQLALCHEMY_DATABASE_URI'] = f'postgresql://{user}:{password}@{host}/{database}'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.secret_k... | 23.619718 | 91 | 0.670244 |
22fcc123f3515b414b856144e9c91b8d020e0fc7 | 6,205 | py | Python | mmcls/datasets/dataset_wrappers.py | xhdtc8/mmclassification | 606015470be69aaa3ea19b1a1bfed598c2ec5785 | [
"Apache-2.0"
] | null | null | null | mmcls/datasets/dataset_wrappers.py | xhdtc8/mmclassification | 606015470be69aaa3ea19b1a1bfed598c2ec5785 | [
"Apache-2.0"
] | null | null | null | mmcls/datasets/dataset_wrappers.py | xhdtc8/mmclassification | 606015470be69aaa3ea19b1a1bfed598c2ec5785 | [
"Apache-2.0"
] | null | null | null | import bisect
import math
from collections import defaultdict
import numpy as np
from torch.utils.data.dataset import ConcatDataset as _ConcatDataset
from .builder import DATASETS
@DATASETS.register_module()
class ConcatDataset(_ConcatDataset):
"""A wrapper of concatenated dataset.
Same as :obj:`torch.util... | 37.155689 | 167 | 0.646737 |
1a790ae7aeca8e872c40bb87c94be5c10c5c16a9 | 5,046 | py | Python | pyaz/network/private_link_service/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/network/private_link_service/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/network/private_link_service/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | from ... pyaz_utils import _call_az
from . import connection
def create(lb_frontend_ip_configs, name, resource_group, subnet, auto_approval=None, edge_zone=None, enable_proxy_protocol=None, fqdns=None, lb_name=None, location=None, private_ip_address=None, private_ip_address_version=None, private_ip_allocation_method=... | 55.450549 | 331 | 0.726912 |
48df543945ccfb039201443f8de5fd07a6556c30 | 9,385 | py | Python | build_tables.py | sunaga-lab/busmapper | 5e22d9d521c6b52f43494c8c6c1990fe1443382f | [
"MIT"
] | null | null | null | build_tables.py | sunaga-lab/busmapper | 5e22d9d521c6b52f43494c8c6c1990fe1443382f | [
"MIT"
] | 1 | 2018-01-16T03:33:43.000Z | 2018-01-16T03:33:43.000Z | build_tables.py | sunaga-lab/busmapper | 5e22d9d521c6b52f43494c8c6c1990fe1443382f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from busmap import pdfutil, htmlutil, tablereader, preset_data_reader
from busmap.build_script import *
import shutil
# ビルド設定
# PDFMinerのpdf2txt.pyのパス
pdfutil.PDF2TXT_PATH = shutil.which('pdf2txt.py')
# PDFレイアウトとかのデバッグ
pdfutil.pdfutil_debug_enabled = False
# tablerea... | 39.93617 | 162 | 0.627064 |
56144cad38468463dd98bd6f792229fbd4be88ff | 2,715 | py | Python | chia_tea/cli/start.py | Tea-n-Tech/chia-tea | a5bd327b9d5e048e55e9f5d8cefca2dbcd5eae96 | [
"BSD-3-Clause"
] | 6 | 2021-08-05T21:31:15.000Z | 2021-11-15T20:54:25.000Z | chia_tea/cli/start.py | Tea-n-Tech/chia-tea | a5bd327b9d5e048e55e9f5d8cefca2dbcd5eae96 | [
"BSD-3-Clause"
] | 49 | 2021-08-05T19:33:08.000Z | 2022-03-30T19:33:38.000Z | chia_tea/cli/start.py | Tea-n-Tech/chia-tea | a5bd327b9d5e048e55e9f5d8cefca2dbcd5eae96 | [
"BSD-3-Clause"
] | 1 | 2022-01-09T17:08:32.000Z | 2022-01-09T17:08:32.000Z | import typer
from ..monitoring.run_server import run_monitoring_server
from ..utils.config import DEFAULT_CONFIG_FILEPATH, read_config
from ..monitoring.run_client import run_monitoring_client
from ..discord.bot import run_discord_bot
from ..copy.main import run_copy
start_cmd = typer.Typer(
no_args_is_help=True... | 28.882979 | 72 | 0.674033 |
8d24dc5a5920abe50ec2dcf97539d298e1f517c1 | 1,678 | py | Python | action-transformer/nets/proposal_layer.py | leaderj1001/Action-Localization | 04d972e6dc3c07d347c70893723d91487c1c8cbd | [
"MIT"
] | 24 | 2019-07-10T15:13:27.000Z | 2021-07-08T12:12:40.000Z | action-baseline/nets/proposal_layer.py | leaderj1001/Action-Localization | 04d972e6dc3c07d347c70893723d91487c1c8cbd | [
"MIT"
] | 7 | 2019-10-06T12:22:04.000Z | 2020-04-15T13:14:10.000Z | action-transformer/nets/proposal_layer.py | leaderj1001/Action-Localization | 04d972e6dc3c07d347c70893723d91487c1c8cbd | [
"MIT"
] | 4 | 2019-10-31T09:01:15.000Z | 2021-03-26T04:20:21.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from utils.config import cfg
from nets.bbox_transform import bbox_transform_inv, clip_boxes
from torchvision.ops import nms
import torch
def proposal_layer(rpn_cls_prob, rpn_bbox_pred, im_... | 32.901961 | 102 | 0.711561 |
c64e249883ef9b798a20cc1d11a96d0c8e6be879 | 12,537 | py | Python | core/movieinfo.py | devqore/Watcher3 | f7f22d077bdcc34bdee7bc30691bef6f59b4bed4 | [
"Apache-2.0"
] | null | null | null | core/movieinfo.py | devqore/Watcher3 | f7f22d077bdcc34bdee7bc30691bef6f59b4bed4 | [
"Apache-2.0"
] | null | null | null | core/movieinfo.py | devqore/Watcher3 | f7f22d077bdcc34bdee7bc30691bef6f59b4bed4 | [
"Apache-2.0"
] | null | null | null | import json
import logging
from time import time, sleep
import core
import os
from core.helpers import Comparisons, Url
_k = Comparisons._k
logging = logging.getLogger(__name__)
class TheMovieDatabase(object):
tokens = 30 # int initial amount of tokens for TMDB rate limiting
last_token_fill = tim... | 34.347945 | 221 | 0.579006 |
b300c59207eec14fb38e799fb46906cbb3460d7f | 1,612 | py | Python | project/tests/test__config.py | eghuro/crawlcheck-report | 540592396e06340430e5c3baa7275fa002f8c367 | [
"MIT"
] | 1 | 2016-09-20T09:07:34.000Z | 2016-09-20T09:07:34.000Z | project/tests/test__config.py | eghuro/crawlcheck-report | 540592396e06340430e5c3baa7275fa002f8c367 | [
"MIT"
] | null | null | null | project/tests/test__config.py | eghuro/crawlcheck-report | 540592396e06340430e5c3baa7275fa002f8c367 | [
"MIT"
] | 1 | 2016-09-20T09:07:37.000Z | 2016-09-20T09:07:37.000Z | # project/server/tests/test_config.py
import unittest
from flask import current_app
from flask_testing import TestCase
from project.server import app
class TestDevelopmentConfig(TestCase):
def create_app(self):
app.config.from_object('project.server.config.DevelopmentConfig')
return app
... | 29.309091 | 73 | 0.709057 |
bfa7fd4f303e401470872f91a245e72d7069cc09 | 17,363 | py | Python | examples/smbclient.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | examples/smbclient.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | examples/smbclient.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | #!/usr/bin/python
# Copyright (c) 2003-2015 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Description: Mini shell using some of the SMB funcionality of the library
#
# Autho... | 34.045098 | 251 | 0.587802 |
8caa963c4514b49830494944059e05dd66e60d16 | 9,657 | py | Python | wntr/tests/test_network_elements.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | wntr/tests/test_network_elements.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | wntr/tests/test_network_elements.py | algchyhao/WNTR | dd4db188a8641a4da16cf80a1557c908fa48c17d | [
"BSD-3-Clause"
] | null | null | null | """
Test the wntr.network.elements classes
"""
from __future__ import print_function
import nose.tools
from nose import SkipTest
from nose.tools import *
from os.path import abspath, dirname, join
import numpy as np
import wntr
import wntr.network.elements as elements
from wntr.network.options import TimeOptions
testd... | 44.916279 | 111 | 0.712954 |
808a01cc5b4091223012d09c7131724522f9ba4d | 955 | py | Python | sympy/ntheory/__init__.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2016-02-22T22:46:50.000Z | 2016-02-22T22:46:50.000Z | sympy/ntheory/__init__.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 7 | 2017-05-01T14:15:32.000Z | 2017-09-06T20:44:24.000Z | sympy/ntheory/__init__.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2021-05-26T13:36:07.000Z | 2021-05-26T13:36:07.000Z | """
Number theory module (primes, etc)
"""
from .generate import nextprime, prevprime, prime, primepi, primerange, \
randprime, Sieve, sieve, primorial, cycle_length
from .primetest import isprime
from .factor_ import divisors, factorint, multiplicity, perfect_power, \
pollard_pm1, pollard_rho, primefactors, t... | 45.47619 | 79 | 0.81466 |
6fdbd369f85a99e66367a0cc7789173c63d10912 | 77 | py | Python | dynamic_stock_model/tests/__init__.py | thomasgibon/pyDSM | c3d1d16af5808051c5b8028d6a12ffe458e6d5ba | [
"BSD-3-Clause"
] | 16 | 2016-04-11T08:06:22.000Z | 2021-07-16T09:20:55.000Z | dynamic_stock_model/tests/__init__.py | thomasgibon/pyDSM | c3d1d16af5808051c5b8028d6a12ffe458e6d5ba | [
"BSD-3-Clause"
] | 2 | 2016-04-12T19:39:53.000Z | 2016-08-17T14:30:12.000Z | dynamic_stock_model/tests/__init__.py | thomasgibon/pyDSM | c3d1d16af5808051c5b8028d6a12ffe458e6d5ba | [
"BSD-3-Clause"
] | 9 | 2015-07-22T07:28:02.000Z | 2020-09-11T14:08:07.000Z | # -*- coding: utf-8 -*-
from .test_known_results import KnownResultsTestCase
| 25.666667 | 52 | 0.753247 |
de811e8cc4640f49ad089b284ba422d92fd573d4 | 30,178 | py | Python | BIT_OpenDomain_QA/Mrc/utils_duqa.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/Mrc/utils_duqa.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/Mrc/utils_duqa.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
""" Load Duqa dataset. """
from __future__ import absolute_import, division, print_function
import collections
import json
import logging
import math
from io import open
from transformers.tokenization_bert import BasicTokenizer, whitespace_tokenize
logger = logging.getLogger(__name__)
clas... | 39.448366 | 92 | 0.595666 |
d0709d3f7d06fcb04b1abb84761fe8380da1e0e9 | 72,208 | py | Python | tests/test_manager.py | pedrokiefer/rpaas | 7e2285ef4fbd3959109eead15c82d8ff3accdc94 | [
"BSD-3-Clause"
] | 39 | 2015-01-22T14:06:01.000Z | 2021-03-26T15:35:24.000Z | tests/test_manager.py | pedrokiefer/rpaas | 7e2285ef4fbd3959109eead15c82d8ff3accdc94 | [
"BSD-3-Clause"
] | 31 | 2015-01-27T12:23:38.000Z | 2018-11-05T12:50:58.000Z | tests/test_manager.py | pedrokiefer/rpaas | 7e2285ef4fbd3959109eead15c82d8ff3accdc94 | [
"BSD-3-Clause"
] | 21 | 2015-06-16T20:42:37.000Z | 2021-08-08T22:12:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 rpaas authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import copy
import consul
import unittest
import os
import mock
import rpaas.manager
from rpaas.manager import Manager, ScaleError, Quota... | 47.31848 | 120 | 0.631038 |
c2d9811be4faf1c557a27aa8f446be94fefc4a59 | 11,891 | py | Python | cosmoslib/magnetic.py | guanyilun/cosmo-codes | a1fb44a1b61211a237080949ce4bfa9e7604083f | [
"MIT"
] | 1 | 2019-08-30T04:07:29.000Z | 2019-08-30T04:07:29.000Z | cosmoslib/magnetic.py | guanyilun/cosmoslib | a1fb44a1b61211a237080949ce4bfa9e7604083f | [
"MIT"
] | null | null | null | cosmoslib/magnetic.py | guanyilun/cosmoslib | a1fb44a1b61211a237080949ce4bfa9e7604083f | [
"MIT"
] | null | null | null | """Calculation related to magnetic fields
"""
import numpy as np
import scipy.special as sp
from scipy.special import spherical_jn
from scipy.interpolate import CubicSpline
from scipy.integrate import quad, romberg
from tqdm import tqdm
from cosmoslib.units import natural as u
from cosmoslib.utils.glquad import gauss_... | 38.859477 | 141 | 0.583298 |
f8532cc164efb6861c2e040921ef6974c1559ec9 | 1,923 | py | Python | backend/typetree/test_typetree.py | catenax-ng/product-data-integrity-demonstrator | 6f6f6bb0ac6f42ec4dbdb79e607226a548703cb2 | [
"Apache-2.0"
] | null | null | null | backend/typetree/test_typetree.py | catenax-ng/product-data-integrity-demonstrator | 6f6f6bb0ac6f42ec4dbdb79e607226a548703cb2 | [
"Apache-2.0"
] | null | null | null | backend/typetree/test_typetree.py | catenax-ng/product-data-integrity-demonstrator | 6f6f6bb0ac6f42ec4dbdb79e607226a548703cb2 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 - for information on the respective copyright owner
# see the NOTICE file and/or the repository
# https://github.com/catenax-ng/product-data-integrity-demonstrator
#
# SPDX-License-Identifier: Apache-2.0
import uuid
from urllib.parse import urlparse
from fastapi.testclient import TestClient
from ... | 24.341772 | 73 | 0.601144 |
c6042d489482760fb53ce9c48c13ae1eabdb0ff7 | 3,824 | py | Python | ucscsdk/mometa/callhome/CallhomeProfile.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/mometa/callhome/CallhomeProfile.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/mometa/callhome/CallhomeProfile.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | """This module contains the general information for CallhomeProfile ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class CallhomeProfileConsts():
FORMAT_FULL_TXT = "fullTxt"
FORMAT_SHORT_TXT = "shortTxt... | 54.628571 | 401 | 0.647228 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.