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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
703dcdcb3dceca810f8ea6fd1e516cbaac94bd85 | 627 | py | Python | manage.py | mans-18/digest_back | 29301ccbd377aa96d9e1219ba5ad226ec413ef4c | [
"MIT"
] | null | null | null | manage.py | mans-18/digest_back | 29301ccbd377aa96d9e1219ba5ad226ec413ef4c | [
"MIT"
] | null | null | null | manage.py | mans-18/digest_back | 29301ccbd377aa96d9e1219ba5ad226ec413ef4c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'digproj.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
f03f13e3415b09f34a7bdc6724de64939aed13fe | 352 | py | Python | examples/models/deep/create_residual_dbn.py | recogna-lab/recogners | 711295f53b47c76246d57df24b75d18bc7ec62e8 | [
"MIT"
] | 1 | 2019-07-04T19:36:42.000Z | 2019-07-04T19:36:42.000Z | examples/models/deep/create_residual_dbn.py | recogna-lab/recogners | 711295f53b47c76246d57df24b75d18bc7ec62e8 | [
"MIT"
] | null | null | null | examples/models/deep/create_residual_dbn.py | recogna-lab/recogners | 711295f53b47c76246d57df24b75d18bc7ec62e8 | [
"MIT"
] | 1 | 2019-12-09T16:18:51.000Z | 2019-12-09T16:18:51.000Z | from learnergy.models.deep import ResidualDBN
# Creates a ResidualDBN-based class
model = ResidualDBN(
model="bernoulli",
n_visible=784,
n_hidden=(128, 256, 128),
steps=(1, 1, 1),
learning_rate=(0.1, 0.1, 0.1),
momentum=(0, 0, 0),
decay=(0, 0, 0),
temperature=(1, 1, 1),
zetta1=1,
... | 20.705882 | 45 | 0.605114 |
cc6cc4d96f4e572f0898280f7e63a8f78903989a | 19,835 | py | Python | killerbee/dev_sewio.py | Acesonnall/killerbee | 354c68bcf21f60910d9f68f62285b977db76fb60 | [
"BSD-3-Clause"
] | 2 | 2019-06-16T06:53:46.000Z | 2022-02-18T01:05:36.000Z | killerbee/dev_sewio.py | Acesonnall/killerbee | 354c68bcf21f60910d9f68f62285b977db76fb60 | [
"BSD-3-Clause"
] | 1 | 2019-11-23T17:16:55.000Z | 2019-11-23T17:16:55.000Z | killerbee/dev_sewio.py | Acesonnall/killerbee | 354c68bcf21f60910d9f68f62285b977db76fb60 | [
"BSD-3-Clause"
] | 2 | 2019-06-15T15:54:36.000Z | 2019-06-15T15:55:39.000Z | # KillerBee Device Support for:
# Sewio Open-Sniffer Radio Client
# (product previously known as Wislab Sniffer)
# This sniffer is a remote IPv4 host.
#
# (C) 2013 Ryan Speers <ryan at riverloopsecurity.com>
#
# For documentation from the vendor, visit:
# http://www.sniffer.wislab.cz/sniffer-configuration/
#
import... | 45.597701 | 452 | 0.621528 |
2acd7ecf16c10327ae21f8c82dc0ac15ebd1f929 | 1,292 | py | Python | SimpleMDMpy/PushCertificate.py | AndrewWCarson/simpleMDMpy | 6539f94e569ceb84b94b3ee3b35ce9fa5a3040a2 | [
"MIT"
] | 8 | 2021-03-08T17:16:00.000Z | 2022-02-04T16:50:34.000Z | SimpleMDMpy/PushCertificate.py | AndrewWCarson/simpleMDMpy | 6539f94e569ceb84b94b3ee3b35ce9fa5a3040a2 | [
"MIT"
] | 19 | 2021-03-02T17:27:23.000Z | 2022-01-31T22:49:06.000Z | SimpleMDMpy/PushCertificate.py | AndrewWCarson/simpleMDMpy | 6539f94e569ceb84b94b3ee3b35ce9fa5a3040a2 | [
"MIT"
] | 8 | 2021-03-11T05:45:20.000Z | 2022-01-14T21:07:57.000Z | #!/usr/bin/env python
"""Methods related to the Apple Push Notification
Certificate utilized by the account."""
#pylint: disable=invalid-name
import SimpleMDMpy.SimpleMDM
class PushCertificate(SimpleMDMpy.SimpleMDM.Connection):
"""Push cert module actions"""
def __init__(self, api_key):
SimpleMDMpy.S... | 34.918919 | 64 | 0.666409 |
2459f8bb6d078c7dc29c89a916bb0eb4d21a0d62 | 1,442 | py | Python | osf/features.py | caseyrollins/osf.io | e42e566f303d09b54f4025517031b08f404592eb | [
"Apache-2.0"
] | 1 | 2019-12-23T04:30:20.000Z | 2019-12-23T04:30:20.000Z | osf/features.py | caseyrollins/osf.io | e42e566f303d09b54f4025517031b08f404592eb | [
"Apache-2.0"
] | null | null | null | osf/features.py | caseyrollins/osf.io | e42e566f303d09b54f4025517031b08f404592eb | [
"Apache-2.0"
] | null | null | null | DISABLE_ENGAGEMENT_EMAILS = 'disable_engagement_emails'
ELASTICSEARCH_METRICS = 'elasticsearch_metrics'
EMBER_AUTH_REGISTER = 'ember_auth_register'
EMBER_CREATE_DRAFT_REGISTRATION = 'ember_create_draft_registration_page'
EMBER_EDIT_DRAFT_REGISTRATION = 'ember_edit_draft_registration_page'
EMBER_FILE_DETAIL = 'ember_fi... | 51.5 | 76 | 0.891123 |
080ccef833786adb31700e7283b9ff4533fb7a65 | 1,499 | py | Python | daily_coding_challenge/october_2020/summary_ranges_228.py | anjaligopi/leetcode | 26fa64525c92e01dfbcdd7851f5b3a91f6ec203b | [
"Apache-2.0"
] | null | null | null | daily_coding_challenge/october_2020/summary_ranges_228.py | anjaligopi/leetcode | 26fa64525c92e01dfbcdd7851f5b3a91f6ec203b | [
"Apache-2.0"
] | null | null | null | daily_coding_challenge/october_2020/summary_ranges_228.py | anjaligopi/leetcode | 26fa64525c92e01dfbcdd7851f5b3a91f6ec203b | [
"Apache-2.0"
] | null | null | null | """
Question:
You are given a sorted unique integer array nums.
Return the smallest sorted list of ranges that cover all the numbers in the array exactly. That is, each element of nums is covered by exactly one of the ranges, and there is no integer x such that x is in one of the ranges but not in nums.
Each range [a... | 24.57377 | 240 | 0.542362 |
cdd92c956813c60b25b9816e1032d26ac9994e0b | 2,132 | py | Python | logical/bpe.py | guotong1988/coarse2fine-cpu-win | 10dbb4920bcab95e7e5168bfd1e6d95f87f47b2f | [
"MIT"
] | 2 | 2020-07-31T21:51:08.000Z | 2020-10-23T07:32:06.000Z | logical/bpe.py | guotong1988/coarse2fine-cpu-win | 10dbb4920bcab95e7e5168bfd1e6d95f87f47b2f | [
"MIT"
] | null | null | null | logical/bpe.py | guotong1988/coarse2fine-cpu-win | 10dbb4920bcab95e7e5168bfd1e6d95f87f47b2f | [
"MIT"
] | null | null | null |
PAR_CHILD_PAIR = 0
ORD_PAIR = 1
UNORD_PAIR = 2
class BpePair(object):
def __init__(self, _in):
if isinstance(_in, tuple):
self.p0, self.p1, self.type_pair = _in
else:
raise NotImplementedError
def is_match(self, c0, c1):
if self.type_pair in (PAR_CHILD_PAIR, O... | 26.320988 | 90 | 0.572233 |
51aff65a0eca8e1ad6cdcaa787cbf81d712c6f02 | 4,029 | py | Python | src/run.py | Nacho114/ml-project-1 | d6e368f56e1ff4a89d1aba84dac2907d61ac0e7f | [
"MIT"
] | null | null | null | src/run.py | Nacho114/ml-project-1 | d6e368f56e1ff4a89d1aba84dac2907d61ac0e7f | [
"MIT"
] | null | null | null | src/run.py | Nacho114/ml-project-1 | d6e368f56e1ff4a89d1aba84dac2907d61ac0e7f | [
"MIT"
] | 1 | 2021-11-01T08:31:10.000Z | 2021-11-01T08:31:10.000Z | from utils import preprocessing as pp
from utils import constant
from utils import loader
from utils import misc
import model
def get_models(model_type, learning_param, nb_models=3):
"""generate models based on params"""
models = []
for _ in range(nb_models):
curr_model = model.Model(model_type, ... | 25.66242 | 81 | 0.600397 |
4464788b62eadee80d53fde76b1c7b8ae45fb3f4 | 3,340 | py | Python | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportOverview/NCSCReportOverview.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportOverview/NCSCReportOverview.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCReportOverview/NCSCReportOverview.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def calculate_overall(data: dict = None) -> str:
if not data:
return ""
results = [x["Result"] for x in data]
if "Not Achieved" in results:
return "Not Achieved"
elif "Partially Achi... | 36.304348 | 120 | 0.628443 |
36ff4320d61aa2b9232f29f6305d341722bbbfe0 | 611 | py | Python | tgadmin/santabot/migrations/0003_alter_event_last_register_date_and_more.py | c-Door-in/secret-santa-bot | 1b1e71f76f5673a0b07d55307fa9c3dae84f24c5 | [
"MIT"
] | null | null | null | tgadmin/santabot/migrations/0003_alter_event_last_register_date_and_more.py | c-Door-in/secret-santa-bot | 1b1e71f76f5673a0b07d55307fa9c3dae84f24c5 | [
"MIT"
] | null | null | null | tgadmin/santabot/migrations/0003_alter_event_last_register_date_and_more.py | c-Door-in/secret-santa-bot | 1b1e71f76f5673a0b07d55307fa9c3dae84f24c5 | [
"MIT"
] | 1 | 2021-12-22T13:19:52.000Z | 2021-12-22T13:19:52.000Z | # Generated by Django 4.0 on 2021-12-23 21:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('santabot', '0002_alter_user_options_event'),
]
operations = [
migrations.AlterField(
model_name='event',
name='last_re... | 25.458333 | 78 | 0.612111 |
1a152017bc0ccbdc1972560d04477c665ef97082 | 15,428 | py | Python | src/assistants/compliance/calculation_logic.py | the-scouts/assistants | 20a86339d069f98fb410a5bc40cbd227fcc9b24a | [
"MIT"
] | null | null | null | src/assistants/compliance/calculation_logic.py | the-scouts/assistants | 20a86339d069f98fb410a5bc40cbd227fcc9b24a | [
"MIT"
] | 3 | 2021-09-03T22:03:52.000Z | 2021-11-13T02:26:40.000Z | src/assistants/compliance/calculation_logic.py | the-scouts/assistants | 20a86339d069f98fb410a5bc40cbd227fcc9b24a | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import TYPE_CHECKING
import pandas as pd
from assistants.compliance.util.input_data_utility import completed_to_due_vector
from assistants.compliance.util.input_data_utility import date_end_sept_2021
if TYPE_CHECKING:
import datetime
date_transition = pd.Timestamp... | 59.567568 | 201 | 0.718628 |
98d633e0afb3adc2a0d46e0aabd366b812e0e72c | 7,637 | py | Python | azure-devops/azext_devops/devops_sdk/v5_1/settings/settings_client.py | doggy8088/azure-devops-cli-extension | 2f6b1a6ffbc49ae454df640a8bb00dac991d6514 | [
"MIT"
] | 326 | 2019-04-10T12:38:23.000Z | 2022-03-31T23:07:49.000Z | azure-devops/azext_devops/devops_sdk/v5_1/settings/settings_client.py | doggy8088/azure-devops-cli-extension | 2f6b1a6ffbc49ae454df640a8bb00dac991d6514 | [
"MIT"
] | 562 | 2019-04-10T07:36:12.000Z | 2022-03-28T07:37:54.000Z | azure-devops/azext_devops/devops_sdk/v5_1/settings/settings_client.py | doggy8088/azure-devops-cli-extension | 2f6b1a6ffbc49ae454df640a8bb00dac991d6514 | [
"MIT"
] | 166 | 2019-04-10T07:59:40.000Z | 2022-03-16T14:17:13.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | 53.034722 | 132 | 0.607045 |
95d7c3c0288293a1e72467683ec8b97e24c1dd58 | 1,888 | py | Python | framework/analytics/__init__.py | listinc/osf.io | b9a0357f3e9b6e905b732e750a16e9452c459d78 | [
"Apache-2.0"
] | 1 | 2019-12-23T04:30:20.000Z | 2019-12-23T04:30:20.000Z | framework/analytics/__init__.py | listinc/osf.io | b9a0357f3e9b6e905b732e750a16e9452c459d78 | [
"Apache-2.0"
] | 20 | 2020-03-24T16:48:03.000Z | 2022-03-08T22:38:38.000Z | framework/analytics/__init__.py | listinc/osf.io | b9a0357f3e9b6e905b732e750a16e9452c459d78 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import logging
from flask import request
from framework.celery_tasks import app
from framework.postcommit_tasks.handlers import run_postcommit
logger = logging.getLogger(__name__)
# TODO Find out why this is here and fix it.
collection = None
# if database._get_current_object() is not None:
# ... | 29.968254 | 78 | 0.743114 |
16bfc8ffafdec55deffa2f0425651eefcb90e4ed | 2,860 | py | Python | tests/test_find_enrichment_allfmts.py | flying-sheep/goatools | 1e3a74faa17cbdeef02550c7ddf17b65cf47d34a | [
"BSD-2-Clause"
] | 477 | 2015-02-10T06:54:42.000Z | 2022-03-15T12:36:11.000Z | tests/test_find_enrichment_allfmts.py | flying-sheep/goatools | 1e3a74faa17cbdeef02550c7ddf17b65cf47d34a | [
"BSD-2-Clause"
] | 174 | 2015-02-05T18:11:14.000Z | 2022-03-29T10:24:19.000Z | tests/test_find_enrichment_allfmts.py | flying-sheep/goatools | 1e3a74faa17cbdeef02550c7ddf17b65cf47d34a | [
"BSD-2-Clause"
] | 202 | 2015-01-21T12:29:23.000Z | 2022-03-01T13:26:05.000Z | #!/usr/bin/env python3
"""Test running an enrichment using any annotation file format."""
from __future__ import print_function
__copyright__ = "Copyright (C) 2010-2019, DV Klopfenstein, H Tang. All rights reserved."
import os
import itertools
from goatools.base import get_godag
from goatools.associations import dnl... | 37.631579 | 93 | 0.66014 |
f7067981ef0bca0bb6f5bc61f52e181f4e519911 | 6,923 | py | Python | chap 5/5_5.py | hmhuy2000/Reinforcement-Learning-SuttonBartoI | 97ca9dc11c4cb4fda74b144e658c3eac756131ff | [
"MIT"
] | null | null | null | chap 5/5_5.py | hmhuy2000/Reinforcement-Learning-SuttonBartoI | 97ca9dc11c4cb4fda74b144e658c3eac756131ff | [
"MIT"
] | null | null | null | chap 5/5_5.py | hmhuy2000/Reinforcement-Learning-SuttonBartoI | 97ca9dc11c4cb4fda74b144e658c3eac756131ff | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from tqdm import trange
import seaborn as sns
import random
# ========================== CFG =======================
class CFG:
HIT = 1
STOP = 0
actions = [STOP, HIT]
WIN = 1
DRAW = 0
LOSE = -1
# ======================== function ==========... | 30.90625 | 135 | 0.535462 |
c11e4849ef723d75d8864390b37a43e50874d8ee | 1,810 | py | Python | pipeline_test/stitch-results.py | bionlproc/biocppi_extraction | a683473e2c16f65328456d2a084e9455e243c349 | [
"MIT"
] | 2 | 2018-09-23T08:55:31.000Z | 2020-08-21T02:16:07.000Z | pipeline_test/stitch-results.py | bionlproc/biocppi_extraction | a683473e2c16f65328456d2a084e9455e243c349 | [
"MIT"
] | null | null | null | pipeline_test/stitch-results.py | bionlproc/biocppi_extraction | a683473e2c16f65328456d2a084e9455e243c349 | [
"MIT"
] | 1 | 2019-04-16T17:40:01.000Z | 2019-04-16T17:40:01.000Z | #!/usr/bin/env python
import sys, os, random, pickle, json
import argparse
import numpy as np
import pandas as pd
parser = argparse.ArgumentParser(description='Train and evaluate BiLSTM on a given dataset')
parser.add_argument('files', metavar='FILE', nargs='*', help='files to read, if empty, stdin is used')
def main... | 34.807692 | 120 | 0.537569 |
3075f435ad40aa16b9b8d9e20ec6123e98d05fa9 | 1,390 | py | Python | discovery-provider/src/queries/get_genre_metrics.py | ppak10/audius-protocol | 4dd9df787cbd39f86c5623ce7899b3855b7b314e | [
"Apache-2.0"
] | 1 | 2020-11-10T04:04:47.000Z | 2020-11-10T04:04:47.000Z | discovery-provider/src/queries/get_genre_metrics.py | ppak10/audius-protocol | 4dd9df787cbd39f86c5623ce7899b3855b7b314e | [
"Apache-2.0"
] | null | null | null | discovery-provider/src/queries/get_genre_metrics.py | ppak10/audius-protocol | 4dd9df787cbd39f86c5623ce7899b3855b7b314e | [
"Apache-2.0"
] | null | null | null | import logging
from sqlalchemy import func, desc
from src.models import Track
from src.utils import db_session
logger = logging.getLogger(__name__)
def get_genre_metrics(args):
"""
Returns metrics for track genres over the provided bucket
Args:
args: dict The parsed args from the request
... | 25.272727 | 64 | 0.594964 |
697744ce1de89f7c8d4ce0b3f757ba467a8a02c6 | 4,072 | py | Python | google/ads/googleads/v5/services/services/ad_parameter_service/transports/base.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v5/services/services/ad_parameter_service/transports/base.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v5/services/services/ad_parameter_service/transports/base.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | # -*- 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 o... | 34.508475 | 78 | 0.669204 |
094ac3e832de27b1f02f8dda8255e1f2a1d2149e | 662 | py | Python | lib/sqlalchemy/dialects/firebird/__init__.py | smarkets/sqlalchemy | 9c96d96d0fe558d625755277e0b23a7bc82cd148 | [
"MIT"
] | 2 | 2015-11-05T09:43:45.000Z | 2017-05-31T14:22:02.000Z | venv/lib/python2.7/site-packages/sqlalchemy/dialects/firebird/__init__.py | wbonack/witty-name | 07a4babed5b4ff4846c10268a65975c6c800de2b | [
"BSD-3-Clause"
] | 4 | 2017-10-24T22:44:01.000Z | 2017-10-24T22:44:19.000Z | venv/lib/python2.7/site-packages/sqlalchemy/dialects/firebird/__init__.py | wbonack/witty-name | 07a4babed5b4ff4846c10268a65975c6c800de2b | [
"BSD-3-Clause"
] | 1 | 2021-03-25T00:26:15.000Z | 2021-03-25T00:26:15.000Z | # firebird/__init__.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from sqlalchemy.dialects.firebird import base, kinterbasdb, fdb
base.dialect = f... | 31.52381 | 84 | 0.702417 |
3ab96cb95f9f6612efaa15e1074951b57c01498a | 1,475 | py | Python | setup.py | Romkabouter/rhasspy-wake-pocketsphinx-hermes | aba0f0d7aa71dc3b96ec71a20e3d4a630de1d1bb | [
"MIT"
] | null | null | null | setup.py | Romkabouter/rhasspy-wake-pocketsphinx-hermes | aba0f0d7aa71dc3b96ec71a20e3d4a630de1d1bb | [
"MIT"
] | 2 | 2020-04-24T19:16:12.000Z | 2021-06-05T07:36:31.000Z | setup.py | Romkabouter/rhasspy-wake-pocketsphinx-hermes | aba0f0d7aa71dc3b96ec71a20e3d4a630de1d1bb | [
"MIT"
] | 2 | 2020-07-25T14:01:20.000Z | 2021-04-28T18:49:30.000Z | """Setup file for rhasspywake_pocketsphinx_hermes"""
from pathlib import Path
import setuptools
this_dir = Path(__file__).parent
# -----------------------------------------------------------------------------
# Load README in as long description
long_description: str = ""
readme_path = this_dir / "README.md"
if rea... | 31.382979 | 94 | 0.665763 |
0ec9a7bc2bee1d105c5ad0de623a519001fee984 | 644 | py | Python | film_details_searcher/film_details_searcher/models/search_result.py | tomaszkyc/film_details_searcher | e8e12bc739990324f6ab4110fdd363e6ef207f1a | [
"MIT"
] | null | null | null | film_details_searcher/film_details_searcher/models/search_result.py | tomaszkyc/film_details_searcher | e8e12bc739990324f6ab4110fdd363e6ef207f1a | [
"MIT"
] | null | null | null | film_details_searcher/film_details_searcher/models/search_result.py | tomaszkyc/film_details_searcher | e8e12bc739990324f6ab4110fdd363e6ef207f1a | [
"MIT"
] | null | null | null | from dataclasses import dataclass
@dataclass(init=True, repr=True, eq=True, frozen=True)
class SearchResult:
details: dict
@classmethod
def parse(cls, title, link):
if not isinstance(title, str) or not isinstance(link, str):
raise TypeError('Link and title should be str type')
... | 25.76 | 67 | 0.63354 |
310b38f4be6c471fb815605fce8e28f4b585ed12 | 9,512 | py | Python | flowsaber/tasks/shell.py | flowsaber/flowsaber | 7d68d085bbd9165d2bc0e0acd7826e70569c5fa3 | [
"MIT"
] | 31 | 2021-05-08T06:35:07.000Z | 2022-03-05T05:58:24.000Z | flowsaber/tasks/shell.py | flowsaber/flowsaber | 7d68d085bbd9165d2bc0e0acd7826e70569c5fa3 | [
"MIT"
] | 3 | 2021-05-10T12:36:57.000Z | 2021-05-15T14:01:15.000Z | flowsaber/tasks/shell.py | zhqu1148980644/flowsaber | 7d68d085bbd9165d2bc0e0acd7826e70569c5fa3 | [
"MIT"
] | 1 | 2021-03-09T06:18:17.000Z | 2021-03-09T06:18:17.000Z | import os
import shutil
import subprocess
from pathlib import Path
from typing import List, Union, Tuple, Any
import flowsaber
from flowsaber.core.task import Task
from flowsaber.core.utility.target import Stdin, Stdout, File
from flowsaber.core.utils import class_deco
from flowsaber.utility.utils import change_cwd, c... | 36.1673 | 118 | 0.574012 |
9114c4f386573011dc0252a8f9e550326d01eae5 | 34,271 | py | Python | tests/providers/gcp/gcp_test.py | hacktobeer/cloud-forensics-utils | d50d4e36dca0fe450e286e351b2a4bf3942b8786 | [
"Apache-2.0"
] | null | null | null | tests/providers/gcp/gcp_test.py | hacktobeer/cloud-forensics-utils | d50d4e36dca0fe450e286e351b2a4bf3942b8786 | [
"Apache-2.0"
] | null | null | null | tests/providers/gcp/gcp_test.py | hacktobeer/cloud-forensics-utils | d50d4e36dca0fe450e286e351b2a4bf3942b8786 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 41.440145 | 105 | 0.702722 |
9c591db55b69e051f447379daddbaeee6abb2d7d | 15,544 | py | Python | Src/StdLib/Lib/site-packages/pythonwin/pywin/framework/editor/editor.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 1,078 | 2016-07-19T02:48:30.000Z | 2022-03-30T21:22:34.000Z | Src/StdLib/Lib/site-packages/pythonwin/pywin/framework/editor/editor.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 576 | 2017-05-21T12:36:48.000Z | 2022-03-30T13:47:03.000Z | Src/StdLib/Lib/site-packages/pythonwin/pywin/framework/editor/editor.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 269 | 2017-05-21T04:44:47.000Z | 2022-03-31T16:18:13.000Z | #####################################################################
#
# editor.py
#
# A general purpose text editor, built on top of the win32ui edit
# type, which is built on an MFC CEditView
#
#
# We now support reloading of externally modified documented
# (eg, presumably by some other process, such as source cont... | 33.356223 | 133 | 0.726583 |
c658d7f26d10814e59e905c0126be8184ead973a | 1,272 | py | Python | tempest/api/baremetal/test_nodestates.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/baremetal/test_nodestates.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/baremetal/test_nodestates.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 NEC 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 ... | 37.411765 | 78 | 0.701258 |
fc29e0b8ba44b2223f4417c292881898b694d581 | 2,118 | py | Python | saleor/graphql/checkout/tests/benchmark/conftest.py | codefl/saleor | 96613dfb04fd73c19d6793ad00d37f07bb376c3a | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/checkout/tests/benchmark/conftest.py | codefl/saleor | 96613dfb04fd73c19d6793ad00d37f07bb376c3a | [
"CC-BY-4.0"
] | 12 | 2021-03-30T14:37:10.000Z | 2022-03-12T00:58:16.000Z | saleor/graphql/checkout/tests/benchmark/conftest.py | codefl/saleor | 96613dfb04fd73c19d6793ad00d37f07bb376c3a | [
"CC-BY-4.0"
] | null | null | null | import pytest
from saleor.checkout import calculations
from saleor.checkout.utils import add_variant_to_checkout
from saleor.payment import ChargeStatus, TransactionKind
from saleor.payment.models import Payment
@pytest.fixture
def customer_checkout(customer_user, checkout_with_voucher_percentage_and_shipping):
... | 26.475 | 86 | 0.778093 |
ab174bd885e3011d508fb6e2fbfd6c4b3a47300a | 4,262 | py | Python | pytest_cases/tests/pytest_extension/fixtures/fixture_plus_and_others/test_fixtures_paramfixtures.py | chinghwayu/python-pytest-cases | a95f2a50c201a10c6a2aa2544bd1ea39aab23a47 | [
"BSD-3-Clause"
] | null | null | null | pytest_cases/tests/pytest_extension/fixtures/fixture_plus_and_others/test_fixtures_paramfixtures.py | chinghwayu/python-pytest-cases | a95f2a50c201a10c6a2aa2544bd1ea39aab23a47 | [
"BSD-3-Clause"
] | null | null | null | pytest_cases/tests/pytest_extension/fixtures/fixture_plus_and_others/test_fixtures_paramfixtures.py | chinghwayu/python-pytest-cases | a95f2a50c201a10c6a2aa2544bd1ea39aab23a47 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from pytest_cases import param_fixture, param_fixtures, pytest_fixture_plus
# pytest.param - not available in all versions
has_pytest_param = hasattr(pytest, 'param')
if has_pytest_param:
pytest_param = pytest.param
else:
def pytest_param(*args, **kwargs):
return args
# ---------- (1)
... | 36.42735 | 97 | 0.557719 |
c1a99e8d11c52eab282adf1b0a336efeefeb1b27 | 8,042 | py | Python | tools/release/auto_roll.py | hustwei/v8 | 3a7b389879060aad7cdb92c0bb1886899829c0ae | [
"BSD-3-Clause"
] | 31 | 2016-04-09T20:25:03.000Z | 2022-02-11T08:52:06.000Z | tools/release/auto_roll.py | hustwei/v8 | 3a7b389879060aad7cdb92c0bb1886899829c0ae | [
"BSD-3-Clause"
] | 12 | 2015-01-02T18:51:45.000Z | 2016-04-02T19:18:10.000Z | tools/release/auto_roll.py | hustwei/v8 | 3a7b389879060aad7cdb92c0bb1886899829c0ae | [
"BSD-3-Clause"
] | 16 | 2016-09-29T09:16:44.000Z | 2022-02-03T17:29:33.000Z | #!/usr/bin/env python
# Copyright 2014 the V8 project 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 argparse
import os
import sys
from common_includes import *
ROLL_SUMMARY = ("Summary of changes available at:\n"
... | 34.663793 | 244 | 0.655683 |
b0b91e34de865183e8c263cc1fcf4775a3aaa523 | 5,583 | py | Python | src/034_evaluate-pcen-convnet-full-audio.py | BirdVox/bv_context_adaptation | 9bd446326ac927d72f7c333eac07ee0490fc3127 | [
"MIT"
] | 5 | 2018-10-17T21:17:26.000Z | 2019-06-14T01:48:29.000Z | src/034_evaluate-pcen-convnet-full-audio.py | BirdVox/bv_context_adaptation | 9bd446326ac927d72f7c333eac07ee0490fc3127 | [
"MIT"
] | null | null | null | src/034_evaluate-pcen-convnet-full-audio.py | BirdVox/bv_context_adaptation | 9bd446326ac927d72f7c333eac07ee0490fc3127 | [
"MIT"
] | 3 | 2018-12-22T00:04:43.000Z | 2021-06-09T20:02:28.000Z | import csv
import datetime
import h5py
import mir_eval
import numpy as np
import os
import pandas as pd
import peakutils
import sklearn.metrics
import sys
import time
import localmodule
# Read command-line arguments.
args = sys.argv[1:]
aug_kind_str = args[0]
test_unit_str = args[1]
predict_unit_str = args[2]
trial_... | 27.502463 | 74 | 0.67401 |
738c398a68d9b8d01fc0a513e6c40af6271c55d0 | 1,891 | py | Python | geetools/ui/__init__.py | hubert-thieriot/gee_tools | e4907d6a6b536326fdd8495e86d42d72694efede | [
"MIT"
] | 369 | 2017-05-22T22:13:20.000Z | 2022-03-31T09:40:12.000Z | geetools/ui/__init__.py | yqx674834119/gee_tools | d7b35174933739f3aeee439d622e5fab57b6dd2d | [
"MIT"
] | 58 | 2017-10-31T13:15:32.000Z | 2022-03-18T16:06:01.000Z | geetools/ui/__init__.py | yqx674834119/gee_tools | d7b35174933739f3aeee439d622e5fab57b6dd2d | [
"MIT"
] | 109 | 2017-08-09T09:02:07.000Z | 2022-01-08T10:27:48.000Z | # coding=utf-8
""" User Interface Tools """
import ee
import threading
import pprint
from . import dispatcher, map
ASYNC = False
def eprint(*args, **kwargs):
""" Print EE Objects. Similar to `print(object.getInfo())` but with
some magic (lol)
:param eeobject: object to print
:type eeobject: ee.Compu... | 25.554054 | 77 | 0.603384 |
2ad9b9f6ae9924564d6e2023b37d7ce435b1482d | 650 | py | Python | Odoo-Modules/OpenAcademy-Tutorial/openacademy/wizard.py | Koubae/Odoo-Projects | da34fbd4ba531c45f752c640d7e17603b15fb401 | [
"MIT"
] | null | null | null | Odoo-Modules/OpenAcademy-Tutorial/openacademy/wizard.py | Koubae/Odoo-Projects | da34fbd4ba531c45f752c640d7e17603b15fb401 | [
"MIT"
] | null | null | null | Odoo-Modules/OpenAcademy-Tutorial/openacademy/wizard.py | Koubae/Odoo-Projects | da34fbd4ba531c45f752c640d7e17603b15fb401 | [
"MIT"
] | null | null | null | from odoo import models, fields, api
class Wizard(models.TransientModel):
_name = 'openacademy.wizard'
_description = "Wizard: Quick Registration of Attendees to Sessions"
def _default_sessions(self):
return self.env['openacademy.session'].browse(self._context.get('active_ids'))
session_ids =... | 32.5 | 86 | 0.698462 |
1aa918381786e2b2989a88e285cb40694d649637 | 397 | py | Python | djangoCrud/wsgi.py | sasili-adetunji/django-crud | f5759463937791f530a1a09335f05b8444c9488f | [
"MIT"
] | null | null | null | djangoCrud/wsgi.py | sasili-adetunji/django-crud | f5759463937791f530a1a09335f05b8444c9488f | [
"MIT"
] | null | null | null | djangoCrud/wsgi.py | sasili-adetunji/django-crud | f5759463937791f530a1a09335f05b8444c9488f | [
"MIT"
] | null | null | null | """
WSGI config for djangoCrud project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SE... | 23.352941 | 78 | 0.788413 |
6e21ce370e262eb79b371e4abc27b48bcc3f5014 | 28,843 | py | Python | erroranalysis/tests/test_matrix_filter.py | jplummer01/responsible-ai-toolbox | 96a5aa198fed4a17e9d21b164f8556b7263377de | [
"MIT"
] | null | null | null | erroranalysis/tests/test_matrix_filter.py | jplummer01/responsible-ai-toolbox | 96a5aa198fed4a17e9d21b164f8556b7263377de | [
"MIT"
] | null | null | null | erroranalysis/tests/test_matrix_filter.py | jplummer01/responsible-ai-toolbox | 96a5aa198fed4a17e9d21b164f8556b7263377de | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation
# Licensed under the MIT License.
import numpy as np
import pandas as pd
import pytest
from common_utils import (create_adult_census_data,
create_binary_classification_dataset,
create_boston_data, create_cancer_data,
... | 47.67438 | 79 | 0.533266 |
c7e8be71d991cde03d9d3d80386c0948865d3519 | 1,887 | py | Python | app/auth/routes.py | jonodrew/mentor-match | 42087a045874fe87076e3c650ea79fa39a40872f | [
"MIT"
] | 1 | 2022-01-24T21:01:54.000Z | 2022-01-24T21:01:54.000Z | app/auth/routes.py | jonodrew/mentor-match | 42087a045874fe87076e3c650ea79fa39a40872f | [
"MIT"
] | 39 | 2021-09-18T09:08:31.000Z | 2022-03-21T11:36:01.000Z | app/auth/routes.py | jonodrew/mentor-match | 42087a045874fe87076e3c650ea79fa39a40872f | [
"MIT"
] | null | null | null | import os
import flask
from app.auth import auth_bp
from flask import redirect, url_for
import google_auth_oauthlib.flow # type: ignore
CONFIG = {
"web": {
"client_id": os.environ.get("GOOGLE_CLIENT_ID"),
"project_id": "mentor-match-333011",
"auth_uri": "https://accounts.google.com/o/oa... | 31.983051 | 84 | 0.683625 |
7293b05c6583f85fcc9f83427b197eff8e6c5774 | 2,527 | py | Python | Statistics.py | gauss-clb/dqn | 86bc152136679949b592e58fb2f02b20dea81308 | [
"MIT"
] | 4 | 2018-09-30T06:31:27.000Z | 2020-02-13T20:39:05.000Z | Statistics.py | gauss-clb/dqn | 86bc152136679949b592e58fb2f02b20dea81308 | [
"MIT"
] | null | null | null | Statistics.py | gauss-clb/dqn | 86bc152136679949b592e58fb2f02b20dea81308 | [
"MIT"
] | null | null | null | import csv
import time
import numpy as np
class Statistics:
def __init__(self, fileName = 'breakout.csv'):
print('Write the header of %s: ' % fileName)
self.csvFile = open(fileName, 'w', newline = '')
self.csvWriter = csv.writer(self.csvFile)
self.csvWriter.writerow((
'... | 31.5875 | 164 | 0.565097 |
1597b6f451b1e50492ed1c4fb5c16183d8f8be95 | 6,386 | py | Python | semaver/_version_range.py | ashep/semaver | 1fccf32bc1352ad84618cbb37a279cd3838989c9 | [
"MIT"
] | null | null | null | semaver/_version_range.py | ashep/semaver | 1fccf32bc1352ad84618cbb37a279cd3838989c9 | [
"MIT"
] | null | null | null | semaver/_version_range.py | ashep/semaver | 1fccf32bc1352ad84618cbb37a279cd3838989c9 | [
"MIT"
] | null | null | null | """Semantic Versioning Helper for Python
"""
__author__ = 'Oleksandr Shepetko'
__email__ = 'a@shepetko.com'
__license__ = 'MIT'
import re
from . import _error
from ._version import Version, VERSION_PART_MAX
_VERSION_RANGE_RE_V1 = re.compile(r'(==|<=|>=|>|<|~|\^)\s*(\d+)(?:\.(\d+)(?:\.(\d+))?)?')
_VERSION_RANGE_RE_V2 ... | 38.011905 | 112 | 0.466019 |
d8141debda60d574a0b0504e669b1aa8aae4fca7 | 1,344 | py | Python | frozen_lake.py | TheBeege/reinforcement_learning | 411997b5727b52f601575be8f0f515a6778f3dfc | [
"MIT"
] | null | null | null | frozen_lake.py | TheBeege/reinforcement_learning | 411997b5727b52f601575be8f0f515a6778f3dfc | [
"MIT"
] | 1 | 2021-06-01T21:54:40.000Z | 2021-06-01T21:54:40.000Z | frozen_lake.py | TheBeege/reinforcement_learning | 411997b5727b52f601575be8f0f515a6778f3dfc | [
"MIT"
] | null | null | null | #!/bin/env python3
# https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0
# i have no ideas what this does yet.
# i just wanted to get something running
import gym
import numpy as np
env = gym.make('FrozenLake-v0')
# Initiali... | 28.595745 | 145 | 0.627976 |
3115eee870e756a437237a8d85aabe19a049cf61 | 878 | py | Python | random-sound/basketball.py | tarah-s/raspberrypi | 1bce3b43f4fc6980e06289b85d25d072e1de82ee | [
"MIT"
] | null | null | null | random-sound/basketball.py | tarah-s/raspberrypi | 1bce3b43f4fc6980e06289b85d25d072e1de82ee | [
"MIT"
] | null | null | null | random-sound/basketball.py | tarah-s/raspberrypi | 1bce3b43f4fc6980e06289b85d25d072e1de82ee | [
"MIT"
] | null | null | null | # External module imports
import os
import RPi.GPIO as GPIO
import time
import subprocess
import url
import calendar
import json
os.system("sudo amixer sset PCM,0 300%")
BatteryTime = # hours
url = ''
postdata = { 'time': str(calendar.timegm(time.gmtime())) }
req = urllib2.Request(url)
req.add_header('Content-Type',... | 21.414634 | 79 | 0.702733 |
5f2031e4658da062c47fa7c8edffb3af5fa9b8f0 | 983 | py | Python | docker-images/webserver/app.py | bolcom/docker-for-testers | 80e36ec06d4b44dfd4c52889c2e018afac1902e9 | [
"Apache-2.0"
] | 3 | 2018-12-09T18:32:10.000Z | 2019-02-07T19:41:45.000Z | docker-images/webserver/app.py | bolcom/docker-for-testers | 80e36ec06d4b44dfd4c52889c2e018afac1902e9 | [
"Apache-2.0"
] | 1 | 2017-05-10T15:56:30.000Z | 2017-05-10T15:56:30.000Z | docker-images/webserver/app.py | bolcom/docker-for-testers | 80e36ec06d4b44dfd4c52889c2e018afac1902e9 | [
"Apache-2.0"
] | 6 | 2017-04-18T15:05:21.000Z | 2018-10-15T18:13:56.000Z | import os
import pgdb
import logging
import sys
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
try:
conn = pgdb.connect( host='database', user='postgres', password='myPassword', database='mydata' )
cur = conn.cursor()
cur.execute( "SELECT value FROM kv WHERE k... | 36.407407 | 262 | 0.655137 |
888234f0853871989171c69fe45464963ecb9066 | 1,116 | py | Python | UrbaniaUsuarios/Usuarios/functions/email.py | nicoescandarani/urbania-users-azure | 49ecc3f968333de7fe2b53a6d845d11e52ee78b3 | [
"MIT"
] | null | null | null | UrbaniaUsuarios/Usuarios/functions/email.py | nicoescandarani/urbania-users-azure | 49ecc3f968333de7fe2b53a6d845d11e52ee78b3 | [
"MIT"
] | null | null | null | UrbaniaUsuarios/Usuarios/functions/email.py | nicoescandarani/urbania-users-azure | 49ecc3f968333de7fe2b53a6d845d11e52ee78b3 | [
"MIT"
] | null | null | null | import io
import email
import smtplib
from Usuarios.functions.login import getClient
def sendMail(usuario, password, destinatario):
try:
client = getClient("ManagedIdentity")
miCasilla = client.get_secret("Email-User-account").value
miPass = client.get_secret("Email-User-Password")... | 36 | 118 | 0.612007 |
3e4cde80f368a813ffaaa87cb97371249d565ca0 | 3,458 | py | Python | src/digitalmarket/settings.py | damansinghh/digital-marketplace | 3d1797716f39459950fcf10042603890335f7f55 | [
"MIT"
] | 104 | 2015-12-11T10:33:17.000Z | 2022-03-26T04:36:13.000Z | src/digitalmarket/settings.py | damansinghh/digital-marketplace | 3d1797716f39459950fcf10042603890335f7f55 | [
"MIT"
] | 6 | 2020-06-06T01:20:49.000Z | 2022-03-12T00:32:27.000Z | src/digitalmarket/settings.py | damansinghh/digital-marketplace | 3d1797716f39459950fcf10042603890335f7f55 | [
"MIT"
] | 85 | 2015-12-12T11:26:21.000Z | 2022-03-02T21:12:50.000Z | """
Django settings for digitalmarket project.
Generated by 'django-admin startproject' using Django 1.8.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Buil... | 22.454545 | 127 | 0.677848 |
29b60a3cd29ea66849ad3e39a3dd09cf9c0d8a86 | 6,559 | py | Python | Gh compilation files/modules.py | ibois-epfl/Manis-timber-plate-joinery-solver | fecdb1dfe23348de261f034f85baf24ac396e8cc | [
"MIT"
] | 3 | 2021-10-19T11:55:59.000Z | 2022-02-04T15:29:04.000Z | Gh compilation files/modules.py | ibois-epfl/Manis-timber-plate-joinery-solver | fecdb1dfe23348de261f034f85baf24ac396e8cc | [
"MIT"
] | null | null | null | Gh compilation files/modules.py | ibois-epfl/Manis-timber-plate-joinery-solver | fecdb1dfe23348de261f034f85baf24ac396e8cc | [
"MIT"
] | null | null | null | """Get modules from model."""
from ghpythonlib.componentbase import dotnetcompiledcomponent as component
import Grasshopper, GhPython
import System
import rhinoscriptsyntax as rs
import copy
from Grasshopper import DataTree
from Grasshopper.Kernel.Data import GH_Path
__author__ = "Nicolas Rogeau"
__laborat... | 42.044872 | 419 | 0.594603 |
4898fa6c27c2e5d407df0e1e5ddddb5958353e6e | 1,662 | py | Python | scipy/sparse/linalg/dsolve/__init__.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | 8 | 2015-10-07T00:37:32.000Z | 2022-01-21T17:02:33.000Z | scipy/sparse/linalg/dsolve/__init__.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/linalg/dsolve/__init__.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | 8 | 2015-05-09T14:23:57.000Z | 2018-11-15T05:56:00.000Z | """
Linear Solvers
==============
The default solver is SuperLU (included in the scipy distribution),
which can solve real or complex linear systems in both single and
double precisions. It is automatically replaced by UMFPACK, if
available. Note that UMFPACK works in double precision only, so
switch it off by
>>> ... | 25.569231 | 68 | 0.644404 |
1d688df2d406dd0bcae68fc3f68ab8641f150116 | 1,705 | py | Python | ru.py | kerem3338/ru | 054ec3a16292135c3eec77e8949991a93516ea10 | [
"MIT"
] | 1 | 2021-12-18T20:54:59.000Z | 2021-12-18T20:54:59.000Z | ru.py | kerem3338/ru | 054ec3a16292135c3eec77e8949991a93516ea10 | [
"MIT"
] | null | null | null | ru.py | kerem3338/ru | 054ec3a16292135c3eec77e8949991a93516ea10 | [
"MIT"
] | null | null | null | import os
import sys
import re
import rucom
ru_json = {"cls": rucom.Ru.cls, "file": __file__}
ru_class = {"ru": ru_json}
varibles_json = {}
current_line=1
def yorumla(code):
space_count = code.count(" ")
line_count = code.count("\n")
if line_count == 0:
line_count+=1
for i in range(line_count):
line=co... | 26.640625 | 86 | 0.587097 |
931c2cd16eeb7056f71805528bf16dafc197614f | 15,278 | py | Python | library/cartridge_manage_replicaset.py | opomuc/ansible-cartridge | 65ce632a5858fbda2af5fddd574ad3bd7041f1d6 | [
"BSD-2-Clause"
] | 1 | 2021-03-23T16:51:10.000Z | 2021-03-23T16:51:10.000Z | library/cartridge_manage_replicaset.py | opomuc/ansible-cartridge | 65ce632a5858fbda2af5fddd574ad3bd7041f1d6 | [
"BSD-2-Clause"
] | 7 | 2020-11-20T07:50:02.000Z | 2021-04-30T06:28:12.000Z | library/cartridge_manage_replicaset.py | opomuc/ansible-cartridge | 65ce632a5858fbda2af5fddd574ad3bd7041f1d6 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.helpers import ModuleRes, CartridgeException
from ansible.module_utils.helpers import get_control_console
from ansible.module_utils.helpers import get_all_cluster_instances
import time
argument_spec = {
'replicaset':... | 37.723457 | 117 | 0.604137 |
3b8e6be6e606f7e1c36dba1e95480db7a4ba670f | 911 | py | Python | nativerl/python/tests/test_nativerl_arrays.py | SkymindIO/nativerl | 48f1a9897ca67fd892165818904fe8a33c5c19d4 | [
"Apache-2.0"
] | 3 | 2022-02-14T09:48:53.000Z | 2022-02-20T15:06:01.000Z | nativerl/python/tests/test_nativerl_arrays.py | SkymindIO/nativerl | 48f1a9897ca67fd892165818904fe8a33c5c19d4 | [
"Apache-2.0"
] | 1 | 2022-02-16T11:38:44.000Z | 2022-02-16T19:33:42.000Z | nativerl/python/tests/test_nativerl_arrays.py | SkymindIO/nativerl | 48f1a9897ca67fd892165818904fe8a33c5c19d4 | [
"Apache-2.0"
] | 1 | 2022-02-14T09:48:54.000Z | 2022-02-14T09:48:54.000Z | import os
import numpy as np
if os.environ.get("USE_PY_NATIVERL"):
import pathmind_training.pynativerl as nativerl
else:
import nativerl
def test_nativerl_arrays():
np_arr = np.array([2.0, 3.0, 3.0, 4.0], dtype=np.float32)
arr = nativerl.Array(np_arr)
assert len(arr) == 4
term_contribution... | 27.606061 | 88 | 0.646542 |
fff96a55ce7d646e5989b94b105670fb09566bd9 | 6,469 | py | Python | tests/tools/gaussian_mixture/gaussian_mixture_test.py | zoepiran/ott | 05f53501d0bee031c86bb2d29db2eacfe84dceeb | [
"Apache-2.0"
] | 110 | 2021-12-28T17:18:08.000Z | 2022-03-31T00:20:57.000Z | tests/tools/gaussian_mixture/gaussian_mixture_test.py | zoepiran/ott | 05f53501d0bee031c86bb2d29db2eacfe84dceeb | [
"Apache-2.0"
] | 14 | 2022-01-31T14:04:47.000Z | 2022-03-24T17:20:35.000Z | tests/tools/gaussian_mixture/gaussian_mixture_test.py | zoepiran/ott | 05f53501d0bee031c86bb2d29db2eacfe84dceeb | [
"Apache-2.0"
] | 17 | 2022-01-31T11:59:26.000Z | 2022-03-31T11:28:44.000Z | # coding=utf-8
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 39.445122 | 79 | 0.666254 |
6bb19090d340dfe5d8cfbbb9800faf0d01dafa2e | 17,014 | py | Python | etc/script/gen_api_docs.py | cesindo/pandemia | 1add0633c413237e8b4d64d3c197dc5ecf1a0087 | [
"MIT"
] | 15 | 2020-03-17T13:40:09.000Z | 2021-03-10T05:52:16.000Z | etc/script/gen_api_docs.py | fatkhur1960/pandemia | 506c407fcae6bf4f84861b455c144fc495a4377f | [
"MIT"
] | 8 | 2020-03-27T12:11:29.000Z | 2021-10-09T07:00:09.000Z | etc/script/gen_api_docs.py | fatkhur1960/pandemia | 506c407fcae6bf4f84861b455c144fc495a4377f | [
"MIT"
] | 13 | 2020-03-17T13:39:44.000Z | 2020-11-10T03:15:47.000Z | #!/usr/bin/env python
import sys
import os
import json
import re
from functools import cmp_to_key
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "libs", "pandemia-client-py"))
import pandemia
def get_path(path):
return os.path.join(os.path.dirname(__file__), "..", "..", path)
def ident_4(... | 37.725055 | 156 | 0.476843 |
e954a5590765428e5cbb8b185fb25a87142ef02a | 2,090 | py | Python | theguardian_api.py | letitbevi/theguardian-api | 8c58721e0e8b7d3e1fd42ad1f27919eae0371037 | [
"MIT"
] | null | null | null | theguardian_api.py | letitbevi/theguardian-api | 8c58721e0e8b7d3e1fd42ad1f27919eae0371037 | [
"MIT"
] | null | null | null | theguardian_api.py | letitbevi/theguardian-api | 8c58721e0e8b7d3e1fd42ad1f27919eae0371037 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import re
import json
import requests
import nltk
def request_theguardian(params):
### theguardian endpoint URL
r = requests.get('http://content.guardianapis.com/search', params=params)
response = json.loads(r.text)
### pagination rules
if res... | 32.65625 | 117 | 0.613876 |
e042aa15a3b65e3311b381b928f1723fec8f26cf | 5,311 | py | Python | harness/determined/cli/task.py | prabhum456/determined | 7e8017df0f62d80d21f5483578e2d5abd0e30935 | [
"Apache-2.0"
] | null | null | null | harness/determined/cli/task.py | prabhum456/determined | 7e8017df0f62d80d21f5483578e2d5abd0e30935 | [
"Apache-2.0"
] | null | null | null | harness/determined/cli/task.py | prabhum456/determined | 7e8017df0f62d80d21f5483578e2d5abd0e30935 | [
"Apache-2.0"
] | null | null | null | import json
from argparse import Namespace
from typing import Any, Dict, List, Union
from determined.cli import render
from determined.common import api
from determined.common.api import authentication
from determined.common.declarative_argparse import Arg, Cmd, Group
def render_tasks(args: Namespace, tasks: Dict[st... | 28.100529 | 93 | 0.523442 |
42da17906e250320f82e02b8ef26b13bf76c65a1 | 767 | py | Python | microbench/nest/nez/nez_generator.py | yshinya6/Cello | 92b683fc99c6d6d691213846251bd07c2ac19b1a | [
"Apache-2.0"
] | null | null | null | microbench/nest/nez/nez_generator.py | yshinya6/Cello | 92b683fc99c6d6d691213846251bd07c2ac19b1a | [
"Apache-2.0"
] | null | null | null | microbench/nest/nez/nez_generator.py | yshinya6/Cello | 92b683fc99c6d6d691213846251bd07c2ac19b1a | [
"Apache-2.0"
] | null | null | null | import sys
import random
alphabets = []
codes = (('a','z'),('A','Z'),('0','9'))
# create alphabet list
for r in codes:
chars = map(chr, range(ord(r[0]),ord(r[1])+1))
alphabets.extend(chars)
# print alphabets
for n in range(0,62):
ntermList = []
cnt = 0
for alt in alphabets:
nextsymbol = "... | 25.566667 | 79 | 0.52412 |
f23939dee4283720e933b333b7021187dbd41130 | 891 | py | Python | sundara/config.py | rshipp/sundara | 432c48feaf1960289a7f1a517526d2d9e68c717e | [
"BSD-3-Clause"
] | null | null | null | sundara/config.py | rshipp/sundara | 432c48feaf1960289a7f1a517526d2d9e68c717e | [
"BSD-3-Clause"
] | null | null | null | sundara/config.py | rshipp/sundara | 432c48feaf1960289a7f1a517526d2d9e68c717e | [
"BSD-3-Clause"
] | null | null | null | """Sundara jāla: for a beautiful web.
Read in configuration options from a project's Sundara config.
"""
import os
import shutil
from configparser import ConfigParser
from sundara import resources
USER_CONF = os.path.expanduser('~/.sundararc')
PROJECT_CONF = '.sundararc'
class Config():
def __init__(self, dir):... | 27.84375 | 63 | 0.643098 |
e68d0834328489e30ff05e10d656889d85042af5 | 742 | py | Python | clubbi_utils/common/timeit.py | dev-clubbi/clubbi_utils | 3a3622374daf0927e6b8aedb58266e8792426880 | [
"MIT"
] | null | null | null | clubbi_utils/common/timeit.py | dev-clubbi/clubbi_utils | 3a3622374daf0927e6b8aedb58266e8792426880 | [
"MIT"
] | 34 | 2021-11-23T14:10:52.000Z | 2022-03-30T22:46:24.000Z | clubbi_utils/common/timeit.py | dev-clubbi/clubbi_utils | 3a3622374daf0927e6b8aedb58266e8792426880 | [
"MIT"
] | null | null | null | import time
from inspect import iscoroutinefunction
from clubbi_utils.logging import logger
def with_timeit(f):
meta = dict(
qualname=f.__qualname__,
__module__=f.__module__,
)
def wrapper(*args, **kwargs):
begin = time.time()
r = f(*args, **kwargs)
end = time.tim... | 23.935484 | 75 | 0.603774 |
67e61806329753711cea611c21dc70a37360b085 | 14,871 | py | Python | src/engine/SCons/Scanner/Fortran.py | Valkatraz/scons | 5e70c65f633dcecc035751c9f0c6f894088df8a0 | [
"MIT"
] | 2 | 2019-11-21T14:40:00.000Z | 2020-10-25T15:44:53.000Z | src/engine/SCons/Scanner/Fortran.py | Valkatraz/scons | 5e70c65f633dcecc035751c9f0c6f894088df8a0 | [
"MIT"
] | 3 | 2019-01-15T20:40:02.000Z | 2021-02-13T03:16:34.000Z | src/engine/SCons/Scanner/Fortran.py | Valkatraz/scons | 5e70c65f633dcecc035751c9f0c6f894088df8a0 | [
"MIT"
] | 2 | 2019-12-23T05:06:28.000Z | 2020-01-16T12:57:55.000Z | """SCons.Scanner.Fortran
This module implements the dependency scanner for Fortran code.
"""
#
# __COPYRIGHT__
#
# 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, includ... | 45.756923 | 125 | 0.598884 |
ec50e0b522460c43827e62c0a0e255b2a0377874 | 1,068 | py | Python | flask_app/get_maps.py | marilynwaldman/flask_gunicorn_nginx_docker | 436999062ab7bdab5e40c0a0f403bb2d661dbb0b | [
"MIT"
] | null | null | null | flask_app/get_maps.py | marilynwaldman/flask_gunicorn_nginx_docker | 436999062ab7bdab5e40c0a0f403bb2d661dbb0b | [
"MIT"
] | null | null | null | flask_app/get_maps.py | marilynwaldman/flask_gunicorn_nginx_docker | 436999062ab7bdab5e40c0a0f403bb2d661dbb0b | [
"MIT"
] | null | null | null | #get maps
from pathlib import Path
from utils import download_from_gdrive
import time
map_dict = { 'CenCal.html' : ['California Water Districts and Pits',
'Top 3 producers',
"https://drive.google.com/file/d/1bqhQ0Wuv_iVOmQKJafpXpbx891rzPLgV/view?usp=sha... | 28.864865 | 118 | 0.568352 |
37b6b6ec6042cb29c41fe4df9ea6e991a2356840 | 1,105 | py | Python | dataRetention/app/models.py | catarinaacsilva/data-retention-light | 23441e363fbbd408385695f5bf833bb345f2a74b | [
"MIT"
] | null | null | null | dataRetention/app/models.py | catarinaacsilva/data-retention-light | 23441e363fbbd408385695f5bf833bb345f2a74b | [
"MIT"
] | null | null | null | dataRetention/app/models.py | catarinaacsilva/data-retention-light | 23441e363fbbd408385695f5bf833bb345f2a74b | [
"MIT"
] | null | null | null | from django.db import models
import uuid
class Contact(models.Model):
email = models.EmailField(unique = True, null=False, primary_key=True)
class Stay_Data(models.Model):
email = models.ForeignKey(Contact, on_delete=models.CASCADE, null=False)
datein = models.DateTimeField(null=False)
dateout = mode... | 33.484848 | 94 | 0.723077 |
1d0e660f2111018722a50b51e5131def7e1f007f | 29,555 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/operations/_application_security_groups_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/operations/_application_security_groups_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/operations/_application_security_groups_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.839798 | 219 | 0.670885 |
3f07d9966ebf4ac78e83025a3a619dce43ed59fb | 374 | py | Python | tests/test_state_neighbors.py | HandyCodeJob/state-neighbors | d4cd1274c13a1a93e08dd8fdbe04774336866fa9 | [
"0BSD"
] | null | null | null | tests/test_state_neighbors.py | HandyCodeJob/state-neighbors | d4cd1274c13a1a93e08dd8fdbe04774336866fa9 | [
"0BSD"
] | null | null | null | tests/test_state_neighbors.py | HandyCodeJob/state-neighbors | d4cd1274c13a1a93e08dd8fdbe04774336866fa9 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_state_neighbors
----------------------------------
Tests for `state_neighbors` module.
"""
import unittest
from state_neighbors import state_neighbors
class TestStateNeighbors(unittest.TestCase):
def setUp(self):
pass
def test_something(self... | 14.384615 | 44 | 0.606952 |
40d7703e546450941f9d5be9409e3282911dc5a0 | 9,048 | py | Python | assignment1/q3_word2vec.py | sadahanu/cs224n_assignment | 81cc2d38658aa6f4b88f13167ab65b1388f869a3 | [
"MIT"
] | null | null | null | assignment1/q3_word2vec.py | sadahanu/cs224n_assignment | 81cc2d38658aa6f4b88f13167ab65b1388f869a3 | [
"MIT"
] | null | null | null | assignment1/q3_word2vec.py | sadahanu/cs224n_assignment | 81cc2d38658aa6f4b88f13167ab65b1388f869a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import random
from q1_softmax import softmax
from q2_gradcheck import gradcheck_naive
from q2_sigmoid import sigmoid, sigmoid_grad
def normalizeRows(x):
""" Row normalization function
Implement a function that normalizes each row of a matrix to have
unit length.... | 33.88764 | 80 | 0.647104 |
b377c568524b1cda1a79d2b89be48e2eb3b5cd41 | 15,417 | py | Python | paths_cli/tests/wizard/test_wizard.py | sroet/openpathsampling-cli | 600d361195b5a3dfe68630358554e8f3e1e99599 | [
"MIT"
] | 2 | 2020-02-11T13:32:57.000Z | 2021-07-11T13:07:01.000Z | paths_cli/tests/wizard/test_wizard.py | sroet/openpathsampling-cli | 600d361195b5a3dfe68630358554e8f3e1e99599 | [
"MIT"
] | 44 | 2020-02-11T10:17:21.000Z | 2022-01-03T19:53:06.000Z | paths_cli/tests/wizard/test_wizard.py | sroet/openpathsampling-cli | 600d361195b5a3dfe68630358554e8f3e1e99599 | [
"MIT"
] | 3 | 2020-02-11T10:18:25.000Z | 2021-08-15T16:03:24.000Z | import pytest
from unittest import mock
from paths_cli.tests.wizard.mock_wizard import (
MockConsole, make_mock_wizard, make_mock_retry_wizard
)
import pathlib
from openpathsampling.experimental.storage.collective_variables import \
CoordinateFunctionCV
from paths_cli.wizard.wizard import *
from paths_cli... | 37.149398 | 76 | 0.596874 |
19d32fe86400b9a71e027dbddaa9bca5c5c30339 | 1,177 | py | Python | carpet_bot_manager/messages.py | FAS-Server/BotManager | 27f250fe3dbc9f1a0a0bf8ad72ea711909b00b48 | [
"MIT"
] | 2 | 2021-08-30T05:33:59.000Z | 2022-01-21T12:35:34.000Z | carpet_bot_manager/messages.py | FAS-Server/BotManager | 27f250fe3dbc9f1a0a0bf8ad72ea711909b00b48 | [
"MIT"
] | 5 | 2021-09-10T16:59:34.000Z | 2022-02-05T02:16:46.000Z | carpet_bot_manager/messages.py | FAS-Server/CarpetBotManager | 27f250fe3dbc9f1a0a0bf8ad72ea711909b00b48 | [
"MIT"
] | null | null | null | import re
from typing import Union
from mcdreforged.api.rtext import RAction, RText, RTextBase, RTextList
from mcdreforged.api.types import PluginServerInterface
from carpet_bot_manager import constants
meta = PluginServerInterface.get_instance().get_plugin_metadata(constants.plugin_id)
def tr(translation_key: str... | 29.425 | 107 | 0.593033 |
0bd1e2550343f8f8525cd7967925797835491579 | 7,273 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/netapp/elementsw/tests/unit/plugins/modules/test_na_elementsw_access_group.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/netapp/elementsw/tests/unit/plugins/modules/test_na_elementsw_access_group.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/netapp/elementsw/tests/unit/plugins/modules/test_na_elementsw_access_group.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | ''' unit test for Ansible module: na_elementsw_account.py '''
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import json
import pytest
from ansible_collections.netapp.elementsw.tests.unit.compat import unittest
from ansible_collections.netapp.elementsw.tests.unit.compat.mock im... | 41.323864 | 105 | 0.659563 |
47c53bf64dc483ed6dbb88fad8002539c567cb41 | 9,189 | py | Python | aea/cli/config.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | aea/cli/config.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | aea/cli/config.py | lrahmani/agents-aea | 9bd1d51530fc21bf41b5adea031cda19a94b048b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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 ... | 35.478764 | 89 | 0.631951 |
300c573162a5bb68c423e4b72a1b45c2ee963b99 | 5,490 | py | Python | docs/conf.py | Landcross/xbox-webapi-python | 0e3f01254907d929fc52f843a5f3bf53ef2ba876 | [
"MIT"
] | null | null | null | docs/conf.py | Landcross/xbox-webapi-python | 0e3f01254907d929fc52f843a5f3bf53ef2ba876 | [
"MIT"
] | null | null | null | docs/conf.py | Landcross/xbox-webapi-python | 0e3f01254907d929fc52f843a5f3bf53ef2ba876 | [
"MIT"
] | null | null | null | #
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup --------------------------------------------------------------
# If extensions (or ... | 30.670391 | 79 | 0.650638 |
c0b17af8636cba31bec1d69dff5077692a318d01 | 186 | py | Python | online_watcher/__main__.py | trebuh/online-server-watcher | 2c31e5b042615690ed48d79d27d40fa0666f4aee | [
"MIT"
] | 5 | 2016-06-02T12:42:18.000Z | 2020-04-05T18:27:03.000Z | online_watcher/__main__.py | trebuh/online-server-watcher | 2c31e5b042615690ed48d79d27d40fa0666f4aee | [
"MIT"
] | null | null | null | online_watcher/__main__.py | trebuh/online-server-watcher | 2c31e5b042615690ed48d79d27d40fa0666f4aee | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# coding: utf-8
from online_watcher import OnlineWatcher
def main():
watcher = OnlineWatcher()
watcher.start()
if __name__ == '__main__':
main()
| 13.285714 | 40 | 0.666667 |
337159501c243f0cfef4795292b719a995a40c1c | 24,394 | py | Python | pysnmp-with-texts/H3C-IF-EXT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/H3C-IF-EXT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/H3C-IF-EXT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module H3C-IF-EXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/H3C-IF-EXT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:22:36 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 131.150538 | 2,466 | 0.780889 |
491284c6679112d7604ce7e674a4464fede6ae45 | 882 | py | Python | Q3/Q2/bandits/damped_epsilon_greedy_agent.py | yolannel/COMP0037_CW1 | 55ae68eed0cdb69f34e3b35229061ae3276357d5 | [
"MIT"
] | null | null | null | Q3/Q2/bandits/damped_epsilon_greedy_agent.py | yolannel/COMP0037_CW1 | 55ae68eed0cdb69f34e3b35229061ae3276357d5 | [
"MIT"
] | null | null | null | Q3/Q2/bandits/damped_epsilon_greedy_agent.py | yolannel/COMP0037_CW1 | 55ae68eed0cdb69f34e3b35229061ae3276357d5 | [
"MIT"
] | 2 | 2022-02-18T21:04:06.000Z | 2022-02-22T18:15:52.000Z | """
Created on 14 Jan 2022
@author: ucacsjj
"""
import math
import numpy as np
from .agent import Agent
class DampedEpsilonGreedyAgent(Agent):
def __init__(self, environment, epsilon):
super().__init__(environment)
self._epsilon = epsilon
def _choose_action(self):
if np.random.... | 25.941176 | 75 | 0.62585 |
44c1284a76a01e86a9b51fbe8f2842fc1ea97b52 | 7,788 | py | Python | download.py | ZeyuSun/flare-prediction-smarp | ad60163eb83b47ba39e898beb387031d349e2ed6 | [
"MIT"
] | null | null | null | download.py | ZeyuSun/flare-prediction-smarp | ad60163eb83b47ba39e898beb387031d349e2ed6 | [
"MIT"
] | null | null | null | download.py | ZeyuSun/flare-prediction-smarp | ad60163eb83b47ba39e898beb387031d349e2ed6 | [
"MIT"
] | null | null | null | import re
import os
from glob import glob
from multiprocessing import Pool
import multiprocessing
from datetime import datetime, timedelta
import pandas as pd
from tqdm import tqdm, trange
import drms
from sunpy.time import TimeRange
from sunpy.net import Fido
from sunpy.net import attrs as a
######### Change these ##... | 33.568966 | 114 | 0.643939 |
862799ac05abd0bd956ebb21bb42180f5dd72663 | 1,148 | py | Python | lyft/urls.py | kimani-njoroge/Uber_Clone | 610a242c75e2873897f8dc9458371c32e52d11ef | [
"MIT"
] | null | null | null | lyft/urls.py | kimani-njoroge/Uber_Clone | 610a242c75e2873897f8dc9458371c32e52d11ef | [
"MIT"
] | 4 | 2020-06-05T18:47:50.000Z | 2021-09-08T00:00:03.000Z | lyft/urls.py | kimani-njoroge/Uber_Clone | 610a242c75e2873897f8dc9458371c32e52d11ef | [
"MIT"
] | null | null | null | """lyft URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | 38.266667 | 79 | 0.698606 |
039e3d9b3ecab94755185d6f493d39efdccd6d2c | 9,802 | py | Python | arviz/plots/backends/matplotlib/posteriorplot.py | sudojarvis/arviz | 73531be4f23df7d764b2e3bec8c5ef5cb882590d | [
"Apache-2.0"
] | 1,159 | 2018-04-03T08:50:54.000Z | 2022-03-31T18:03:52.000Z | arviz/plots/backends/matplotlib/posteriorplot.py | sudojarvis/arviz | 73531be4f23df7d764b2e3bec8c5ef5cb882590d | [
"Apache-2.0"
] | 1,656 | 2018-03-23T14:15:05.000Z | 2022-03-31T14:00:28.000Z | arviz/plots/backends/matplotlib/posteriorplot.py | sudojarvis/arviz | 73531be4f23df7d764b2e3bec8c5ef5cb882590d | [
"Apache-2.0"
] | 316 | 2018-04-03T14:25:52.000Z | 2022-03-25T10:41:29.000Z | """Matplotlib Plot posterior densities."""
from numbers import Number
import matplotlib.pyplot as plt
import numpy as np
from ....stats import hdi
from ....stats.density_utils import get_bins
from ...kdeplot import plot_kde
from ...plot_utils import (
_scale_fig_size,
calculate_point_estimate,
format_sig_... | 28.577259 | 100 | 0.524383 |
b5f5c4e368bfbbecc3f963fc2545a39f6a9148eb | 3,652 | py | Python | app/view/transaksi.py | Dapuluous/PerpusPBO | db88c7eacd09f923bf28a03f494e8fe14c6cfbf1 | [
"MIT"
] | 4 | 2020-12-12T06:30:52.000Z | 2021-12-23T06:59:40.000Z | app/view/transaksi.py | Dapuluous/PerpusPBO | db88c7eacd09f923bf28a03f494e8fe14c6cfbf1 | [
"MIT"
] | null | null | null | app/view/transaksi.py | Dapuluous/PerpusPBO | db88c7eacd09f923bf28a03f494e8fe14c6cfbf1 | [
"MIT"
] | null | null | null | from app.model.bukuModel import Buku
from app.model.anggotaModel import Anggota
from app.model.transaksiModel import Transaksi
from app.utility import *
from datetime import datetime, timedelta
import pyfiglet
def transaksiMenu(idUser, namaUser):
print(pyfiglet.figlet_format("E-LIB") + "===========================")
... | 30.949153 | 133 | 0.672234 |
8bc045a02d991081ecbef994a5ba9b9f6b813102 | 2,899 | py | Python | tests/writer/unit/postgresql_backend/test_db_events.py | jsangmeister/openslides-datastore-service | 7170f008ccac0b31c37ffeee083b972bc314660d | [
"MIT"
] | 2 | 2020-01-20T13:56:28.000Z | 2020-02-17T10:56:26.000Z | tests/writer/unit/postgresql_backend/test_db_events.py | jsangmeister/openslides-datastore-service | 7170f008ccac0b31c37ffeee083b972bc314660d | [
"MIT"
] | 122 | 2020-01-16T15:13:37.000Z | 2022-03-17T10:32:47.000Z | tests/writer/unit/postgresql_backend/test_db_events.py | jsangmeister/openslides-datastore-service | 7170f008ccac0b31c37ffeee083b972bc314660d | [
"MIT"
] | 7 | 2020-02-20T12:04:17.000Z | 2021-11-23T17:54:33.000Z | from unittest.mock import MagicMock
import pytest
from datastore.writer.postgresql_backend import (
BaseDbEvent,
DbCreateEvent,
DbDeleteEvent,
DbDeleteFieldsEvent,
DbListUpdateEvent,
DbRestoreEvent,
DbUpdateEvent,
)
def test_base_db_event_get_modified_fields():
with pytest.raises(Not... | 23.007937 | 56 | 0.686789 |
363cac4332fbdb9ff9641a1c908aece053ad7ba3 | 17,479 | py | Python | torchfile.py | hologerry/wct_tf_experiment | 688de9e138ea10d19f1835a617d46e45a9e299ef | [
"MIT"
] | null | null | null | torchfile.py | hologerry/wct_tf_experiment | 688de9e138ea10d19f1835a617d46e45a9e299ef | [
"MIT"
] | null | null | null | torchfile.py | hologerry/wct_tf_experiment | 688de9e138ea10d19f1835a617d46e45a9e299ef | [
"MIT"
] | null | null | null | """
Copyright (c) 2016, Brendan Shillingford
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the fol... | 36.263485 | 118 | 0.625322 |
c54c0c492e8e59341ab72a8b77e4e1d8a47a792b | 1,330 | py | Python | pjsip/tests/pjsua/inc_const.py | tomorrow-rain/pjsip | 776e032c4ee2672cd42b8c665021b1310181d126 | [
"MIT"
] | null | null | null | pjsip/tests/pjsua/inc_const.py | tomorrow-rain/pjsip | 776e032c4ee2672cd42b8c665021b1310181d126 | [
"MIT"
] | null | null | null | pjsip/tests/pjsua/inc_const.py | tomorrow-rain/pjsip | 776e032c4ee2672cd42b8c665021b1310181d126 | [
"MIT"
] | null | null | null | # $Id$
# Useful constants
##########################
# MENU OUTPUT
#
##########################
# EVENTS
#
# Text to expect when there is incoming call
EVENT_INCOMING_CALL = "Press .* answer"
##########################
# CALL STATES
#
# Call state is CALLING
STATE_CALLING = "state.*CALLING"
# Call state is EARL... | 20.461538 | 72 | 0.626316 |
ec25479977f41fbe043be9293c021a40890e9669 | 7,420 | py | Python | tests/snc/simulation/store_data/test_numpy_encoder.py | dmcnamee/snc | c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786 | [
"Apache-2.0"
] | 5 | 2021-03-24T16:23:10.000Z | 2021-11-17T12:44:51.000Z | tests/snc/simulation/store_data/test_numpy_encoder.py | dmcnamee/snc | c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786 | [
"Apache-2.0"
] | 3 | 2021-03-26T01:16:08.000Z | 2021-05-08T22:06:47.000Z | tests/snc/simulation/store_data/test_numpy_encoder.py | dmcnamee/snc | c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786 | [
"Apache-2.0"
] | 2 | 2021-03-24T17:20:06.000Z | 2021-04-19T09:01:12.000Z | from copy import deepcopy
import cvxpy as cvx
import json
import numpy as np
import snc.simulation.store_data.numpy_encoder as numpy_encoder
class MySerializableClass:
def to_serializable(self):
return {"hello": "world"}
def test_json_encoder_with_numpy():
x = [10, 20, 30, 40, 50]
a = np.array... | 24.012945 | 124 | 0.580054 |
c265705639e90d586f50b9f6cab62e461a999793 | 437 | py | Python | containers/06-activity_prediction/deps/combine_dock2bind.py | TravisWheelerLab/drug-sniffer | 15c8a02de9367e08fb33cd83b45b6038ba15550f | [
"BSD-3-Clause"
] | null | null | null | containers/06-activity_prediction/deps/combine_dock2bind.py | TravisWheelerLab/drug-sniffer | 15c8a02de9367e08fb33cd83b45b6038ba15550f | [
"BSD-3-Clause"
] | null | null | null | containers/06-activity_prediction/deps/combine_dock2bind.py | TravisWheelerLab/drug-sniffer | 15c8a02de9367e08fb33cd83b45b6038ba15550f | [
"BSD-3-Clause"
] | 1 | 2022-03-10T18:15:26.000Z | 2022-03-10T18:15:26.000Z | #!/usr/bin/env python3
# Combines output from dock2bind with the input SMI string
# We do this so we don't have to worry about newlines and such
# Usage: combine.py <smi> <score>
def main(args):
smi_path = args[0]
score_path = args[1]
smi = open(smi_path, "r").read().strip()
score = open(score_path, ... | 21.85 | 62 | 0.640732 |
afd25b088d967603ef27d65e8c14832b62535da4 | 750 | py | Python | tests/test_hashing.py | VerseGroup/vg-em | 3c9a93aa9c3c3cba2bace9259bab8b2668b54069 | [
"MIT"
] | 2 | 2022-01-13T18:33:25.000Z | 2022-01-13T18:34:56.000Z | tests/test_hashing.py | VerseGroup/EM-python | 3c9a93aa9c3c3cba2bace9259bab8b2668b54069 | [
"MIT"
] | null | null | null | tests/test_hashing.py | VerseGroup/EM-python | 3c9a93aa9c3c3cba2bace9259bab8b2668b54069 | [
"MIT"
] | null | null | null | # python imports
import os
import sys
from tabnanny import check
# adding dir to sys to allow local importing
currentdir = os.path.abspath(os.path.dirname(__file__))
sys.path.append(currentdir)
parentdir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
sys.path.append(parentdir)
# local impo... | 25.862069 | 87 | 0.702667 |
f184c9443d754173bc922ac3f2a6af04c6675d12 | 105 | py | Python | pyecore/__init__.py | pyecore/pyecore-py2 | b15dde74d235e530ca72f77a85fb7e8c93002a98 | [
"BSD-3-Clause"
] | null | null | null | pyecore/__init__.py | pyecore/pyecore-py2 | b15dde74d235e530ca72f77a85fb7e8c93002a98 | [
"BSD-3-Clause"
] | null | null | null | pyecore/__init__.py | pyecore/pyecore-py2 | b15dde74d235e530ca72f77a85fb7e8c93002a98 | [
"BSD-3-Clause"
] | null | null | null | """
"""
from .utils import install_issubclass_patch
__version__ = "0.9.0"
install_issubclass_patch()
| 10.5 | 43 | 0.733333 |
e3931495f9c400553ba7ea3b0cac8ea241f24a80 | 1,707 | py | Python | model/encoder.py | aiwizzard/text2text | 850dba85487518a2a1dabd7baacda97875313768 | [
"Apache-2.0"
] | null | null | null | model/encoder.py | aiwizzard/text2text | 850dba85487518a2a1dabd7baacda97875313768 | [
"Apache-2.0"
] | null | null | null | model/encoder.py | aiwizzard/text2text | 850dba85487518a2a1dabd7baacda97875313768 | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
from model.embedding import Embeddings, PositonalEncoding
from model.attention import SelfAttention
from model.ffnet import FFNet
class EncoderLayer(nn.Module):
def __init__(self, head=8, model_dim=512, ff_dim=2048, dropout_rate=0.1):
super(EncoderLayer, self).__init__()
sel... | 31.611111 | 86 | 0.639133 |
232c4b21a03d68837b294861a8afed45a03f8d26 | 4,531 | py | Python | Interactive_TAIG/itaig_demo.py | AMR-/CMU-Structured-Representations-For-Robots | f6f5f2d7c31686bf00e6568dff712ccde4f0dad1 | [
"MIT"
] | null | null | null | Interactive_TAIG/itaig_demo.py | AMR-/CMU-Structured-Representations-For-Robots | f6f5f2d7c31686bf00e6568dff712ccde4f0dad1 | [
"MIT"
] | null | null | null | Interactive_TAIG/itaig_demo.py | AMR-/CMU-Structured-Representations-For-Robots | f6f5f2d7c31686bf00e6568dff712ccde4f0dad1 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- encoding: UTF-8 -*-
import qi
import sys
import argparse
import time
from instruction_graph.interactive.InteractiveManager import InteractiveManager
from pepper_ig.ITAIGDemoMemoryObject import PepperMemory
from pepper_ig.ITAIGDemoPrimitiveLibrary import PepperPrimitiveLibrary
class Inter... | 39.4 | 100 | 0.573163 |
440d03d4346cb45845ae19c7176c8691eaa86b3f | 18,885 | py | Python | SGAN.py | Firyuza/SGAN | 1c22f1b8217d4f6bf8191cd3840339ba668af3e8 | [
"MIT"
] | 8 | 2019-01-10T09:17:13.000Z | 2021-07-13T14:38:15.000Z | SGAN.py | Firyuza/SGAN | 1c22f1b8217d4f6bf8191cd3840339ba668af3e8 | [
"MIT"
] | null | null | null | SGAN.py | Firyuza/SGAN | 1c22f1b8217d4f6bf8191cd3840339ba668af3e8 | [
"MIT"
] | 4 | 2019-03-18T05:31:26.000Z | 2020-10-09T09:21:53.000Z | import numpy as np
import os
import shutil
import time
import multiprocessing
import torch
import torchvision
import torchvision.transforms as transforms
from torch import nn
from torch.autograd import Variable
from torch.optim import Adam
from discriminator import Discriminator
from generator import Generator
from c... | 48.053435 | 142 | 0.58422 |
752887649060196161980d30bbe6ea91d03ef47a | 3,526 | py | Python | openpnm/models/phases/molar_density.py | halotudio/openPNM-copy2 | d400ec65e9421256a531f6d22a38255b002d5dcb | [
"MIT"
] | 1 | 2021-05-01T11:10:43.000Z | 2021-05-01T11:10:43.000Z | openpnm/models/phases/molar_density.py | halotudio/openPNM-copy2 | d400ec65e9421256a531f6d22a38255b002d5dcb | [
"MIT"
] | null | null | null | openpnm/models/phases/molar_density.py | halotudio/openPNM-copy2 | d400ec65e9421256a531f6d22a38255b002d5dcb | [
"MIT"
] | null | null | null | r"""
"""
import numpy as np
def standard(target, mol_weight='pore.molecular_weight',
density='pore.density'):
r"""
Calculates the molar density from the molecular weight and mass density
Parameters
----------
target : OpenPNM Object
The object for which these values are being... | 28.666667 | 79 | 0.646341 |
29e49f9aac12cc84590f59d014db74e62c82af16 | 7,626 | py | Python | luxmedSnip.py | jagub2/LuxmedSniper | 3ab31b61e00e5caa1aff7113aeb2740623b3dfe3 | [
"MIT"
] | null | null | null | luxmedSnip.py | jagub2/LuxmedSniper | 3ab31b61e00e5caa1aff7113aeb2740623b3dfe3 | [
"MIT"
] | null | null | null | luxmedSnip.py | jagub2/LuxmedSniper | 3ab31b61e00e5caa1aff7113aeb2740623b3dfe3 | [
"MIT"
] | null | null | null | import argparse
import yaml
import coloredlogs
import json
import logging
import os
import datetime
import shelve
import schedule
import requests
import telegram.bot
import time
from telegram.ext import Updater, messagequeue
from telegram.utils.request import Request
coloredlogs.install(level="INFO")
log = logging.ge... | 39.926702 | 120 | 0.629688 |
08f6cbeacfa5bcdce286afeab8972f07252a2e82 | 910 | py | Python | unit_tests/tests_model.py | inpho/vsm | d5fc930ccc95f275e10e151c8f05db2c05aba01f | [
"MIT"
] | 31 | 2015-01-30T20:09:48.000Z | 2021-08-13T12:57:49.000Z | unit_tests/tests_model.py | inpho/vsm | d5fc930ccc95f275e10e151c8f05db2c05aba01f | [
"MIT"
] | 80 | 2015-01-30T19:08:40.000Z | 2019-11-02T20:15:56.000Z | unit_tests/tests_model.py | inpho/vsm | d5fc930ccc95f275e10e151c8f05db2c05aba01f | [
"MIT"
] | 10 | 2015-09-18T01:52:23.000Z | 2019-07-14T08:22:06.000Z | import unittest2 as unittest
import numpy as np
from vsm.corpus.util.corpusbuilders import random_corpus
from vsm.model.base import BaseModel
class TestBaseModel(unittest.TestCase):
def setUp(self):
self.c = random_corpus(1000, 50, 6, 100)
self.m = BaseModel(self.c, 'context')
def test_Bas... | 27.575758 | 66 | 0.657143 |
189d133d0e5ce2699e4c57b606b97b840bcecbf9 | 1,484 | py | Python | awacs/chatbot.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | null | null | null | awacs/chatbot.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | 19 | 2020-11-30T06:43:54.000Z | 2022-02-21T09:02:54.000Z | awacs/chatbot.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 = 'AWS Chatbot'
prefix = 'chatbot'
class Action(BaseAction):
def __init__(self, action=None):
sup = super(Action, s... | 32.26087 | 70 | 0.768868 |
1d654f832c270958c9991a70b61fa6f9c8f3546c | 1,410 | py | Python | plato/datasources/cinic10.py | cuiboyuan/plato | 260b785cbbf8588c92331d6343211ff72321f90e | [
"Apache-2.0"
] | 135 | 2021-04-14T09:06:08.000Z | 2022-03-31T03:38:42.000Z | plato/datasources/cinic10.py | cuiboyuan/plato | 260b785cbbf8588c92331d6343211ff72321f90e | [
"Apache-2.0"
] | 39 | 2021-05-16T00:34:08.000Z | 2022-03-10T22:03:57.000Z | plato/datasources/cinic10.py | cuiboyuan/plato | 260b785cbbf8588c92331d6343211ff72321f90e | [
"Apache-2.0"
] | 41 | 2021-04-14T10:40:07.000Z | 2022-03-28T10:24:20.000Z | """
The CINIC-10 dataset.
For more information about CINIC-10, refer to:
https://github.com/BayesWatch/cinic-10
"""
import logging
import os
from torchvision import datasets, transforms
from plato.config import Config
from plato.datasources import base
class DataSource(base.DataSource):
"""The CINIC-10 datas... | 30 | 79 | 0.592908 |
ac105058d2c27e4c33e74282fbd82bfed7d939b0 | 721 | py | Python | test/test_squaregrid.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | 1 | 2020-08-03T16:24:06.000Z | 2020-08-03T16:24:06.000Z | test/test_squaregrid.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | test/test_squaregrid.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | from squaregrid import *
def test_squaregrid():
gr = SquareGrid(3.0,6)
expected_indices = [ (0,0), (1,0), (2,0), (3,0), (4,0), (5,0),
(0,1), (1,1), (2,1), (3,1), (4,1), (5,1),
(0,2), (1,2), (2,2), (3,2), (4,2), (5,2),
(0,3), (1,3), (2,3... | 37.947368 | 72 | 0.398058 |
18f8d32374884d4f6955d50f5b9499827f2c206c | 5,518 | py | Python | resource/webcrawler.py | ZhihaoXu/fifaweb | 26836d4601871d66b6ae2f0aa2bb68dc779c76db | [
"MIT"
] | 1 | 2019-11-23T13:37:59.000Z | 2019-11-23T13:37:59.000Z | resource/webcrawler.py | ZhihaoXu/fifaweb | 26836d4601871d66b6ae2f0aa2bb68dc779c76db | [
"MIT"
] | null | null | null | resource/webcrawler.py | ZhihaoXu/fifaweb | 26836d4601871d66b6ae2f0aa2bb68dc779c76db | [
"MIT"
] | null | null | null | import pandas as pd
import re
import requests
from bs4 import BeautifulSoup
from tqdm import tqdm
# Get basic players information for all players
base_url = "https://sofifa.com/players?offset="
columns = ['ID', 'Name', 'Age', 'Photo', 'Nationality', 'Flag', 'Overall', 'Potential', 'Club', 'Club Logo', 'Value', 'Wage',... | 53.057692 | 865 | 0.594418 |
b71f5106f1f292fab6cc10561108a70143129a9b | 5,846 | py | Python | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/events/keyboardevents.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | 1 | 2015-07-12T07:24:17.000Z | 2015-07-12T07:24:17.000Z | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/events/keyboardevents.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | null | null | null | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/events/keyboardevents.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | 1 | 2016-02-19T21:55:53.000Z | 2016-02-19T21:55:53.000Z | """Event classes and manager relating to the keyboard"""
from OpenGLContext.events import event, eventmanager
class KeyboardEvent (event.Event):
"""Raw keyboard events, includes <ctrl> and the like.
Characters are reported as their un-modified equivalents,
so that 'A' represents both "a" and "A"
a... | 42.985294 | 92 | 0.583134 |
280074a92505f85065b953c2b8db29ab17a7171b | 6,365 | py | Python | plotter.py | maetulj/SFND_2D_Feature_Tracking | cfc44d7c92e22bf2cdbd897504ea9c560b04e6b5 | [
"MIT"
] | 1 | 2020-03-03T13:04:20.000Z | 2020-03-03T13:04:20.000Z | plotter.py | maetulj/SFND_2D_Feature_Tracking | cfc44d7c92e22bf2cdbd897504ea9c560b04e6b5 | [
"MIT"
] | null | null | null | plotter.py | maetulj/SFND_2D_Feature_Tracking | cfc44d7c92e22bf2cdbd897504ea9c560b04e6b5 | [
"MIT"
] | 1 | 2020-04-11T21:19:11.000Z | 2020-04-11T21:19:11.000Z | #!/bin/bash python
import subprocess
import numpy as np
from matplotlib import pyplot as plt
vis = "false"
# Possible detectors.
detectors = ["SHITOMASI"] # ["SHITOMASI", "HARRIS", "FAST", "BRISK", "ORB", "AKAZE", "SIFT"]
descriptors = ["BRISK", "BRIEF", "ORB", "FREAK", "AKAZE", "SIFT"]
print("Computing...", end="",... | 36.371429 | 189 | 0.664729 |
156a4751a0acf1068fca8aa84160af3b57178567 | 706 | py | Python | sundaytasks/__init__.py | olafura/sundaytasks-py | 5a796068e63b603890d71c0dd9203a09b36d1831 | [
"Apache-2.0"
] | null | null | null | sundaytasks/__init__.py | olafura/sundaytasks-py | 5a796068e63b603890d71c0dd9203a09b36d1831 | [
"Apache-2.0"
] | null | null | null | sundaytasks/__init__.py | olafura/sundaytasks-py | 5a796068e63b603890d71c0dd9203a09b36d1831 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2014 Olafur Arason
#
# 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... | 33.619048 | 75 | 0.749292 |
704d36771432bd01e89ff25059f84e10e85f8ad9 | 646 | py | Python | selectinf/randomized/tests/test_slope_subgrad.py | TianXie1999/selective-inference | ca02bbd84af5f5597944c75bde8337db9c69066a | [
"BSD-3-Clause"
] | 51 | 2016-03-31T16:34:15.000Z | 2022-01-16T04:32:58.000Z | selectinf/randomized/tests/test_slope_subgrad.py | TianXie1999/selective-inference | ca02bbd84af5f5597944c75bde8337db9c69066a | [
"BSD-3-Clause"
] | 11 | 2016-04-07T00:19:58.000Z | 2021-10-03T18:31:14.000Z | selectinf/randomized/tests/test_slope_subgrad.py | TianXie1999/selective-inference | ca02bbd84af5f5597944c75bde8337db9c69066a | [
"BSD-3-Clause"
] | 14 | 2015-10-28T17:29:05.000Z | 2021-08-16T21:04:30.000Z | import numpy as np
from ..slope import _projection_onto_selected_subgradients
def test_projection():
prox_arg = np.random.normal(0,1,10)
weights = np.linspace(3, 5, 10)[::-1]
ordering = np.random.choice(10, 10, replace=False)
cluster_sizes = [2,3,1,1,3]
active_signs = np.ones(10)
proj = _pro... | 29.363636 | 64 | 0.493808 |
419eda383bf0a05f9ee8c5300c698bb671f3202e | 10,065 | py | Python | MPE/train_maddpg.py | rudrasohan/Multi-Agent-Particle-Environment | 006bfa0905f4b608c64d15a8d553866ca5bbed25 | [
"MIT"
] | 9 | 2019-03-01T12:52:04.000Z | 2021-09-18T08:11:03.000Z | MPE/train_maddpg.py | rudrasohan/Multi-Agent-Particle-Environment | 006bfa0905f4b608c64d15a8d553866ca5bbed25 | [
"MIT"
] | null | null | null | MPE/train_maddpg.py | rudrasohan/Multi-Agent-Particle-Environment | 006bfa0905f4b608c64d15a8d553866ca5bbed25 | [
"MIT"
] | 1 | 2019-01-20T05:08:21.000Z | 2019-01-20T05:08:21.000Z | import argparse
import gym
import numpy as np
import os
import tensorflow as tf
import time
import pickle
from torcs_world import World, Agent
from make_torcs_env import MultiAgentTorcsEnv
import maddpg.common.tf_util as U
from maddpg.trainer.maddpg import MADDPGAgentTrainer
import tensorflow.contrib.layers as layers
... | 46.597222 | 155 | 0.618877 |
26cca1eaa7069adfc0a659bde2b889f8e56efaf4 | 1,847 | py | Python | Widgets/plot_widgets/Canvas2Dupgraded.py | qftphys/Software-for-visualising-magnetic-layers | 7e4c5680b8e87aa677bdf4c912cbccdcb11b09a3 | [
"MIT"
] | null | null | null | Widgets/plot_widgets/Canvas2Dupgraded.py | qftphys/Software-for-visualising-magnetic-layers | 7e4c5680b8e87aa677bdf4c912cbccdcb11b09a3 | [
"MIT"
] | null | null | null | Widgets/plot_widgets/Canvas2Dupgraded.py | qftphys/Software-for-visualising-magnetic-layers | 7e4c5680b8e87aa677bdf4c912cbccdcb11b09a3 | [
"MIT"
] | null | null | null | import numpy as np
from pyqtgraph import PlotWidget
import pyqtgraph as pg
from AnimatedWidget import AnimatedWidget
class Canvas2Dupgraded(PlotWidget, AnimatedWidget):
def __init__(self, parent=None, data_dict=None):
super(Canvas2Dupgraded, self).__init__()
self.shareData(**data_dict)
self... | 43.97619 | 83 | 0.638874 |
1a18f484eb9f439f720683bafcb30a920a9fd27a | 2,976 | py | Python | runtime/bamboo-pipeline/pipeline/tests/core/data/test_base.py | DomineCore/bamboo-engine | fb4583e70f9e1e87d9d48c2393db8d8104306f37 | [
"MIT"
] | 55 | 2021-09-07T11:50:35.000Z | 2022-03-23T13:19:38.000Z | runtime/bamboo-pipeline/pipeline/tests/core/data/test_base.py | DomineCore/bamboo-engine | fb4583e70f9e1e87d9d48c2393db8d8104306f37 | [
"MIT"
] | 64 | 2021-09-07T12:04:12.000Z | 2022-03-29T03:47:18.000Z | runtime/bamboo-pipeline/pipeline/tests/core/data/test_base.py | DomineCore/bamboo-engine | fb4583e70f9e1e87d9d48c2393db8d8104306f37 | [
"MIT"
] | 20 | 2021-09-07T11:52:08.000Z | 2022-03-28T08:05:22.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 44.41791 | 115 | 0.710685 |
7993139a3bfdfe3510d6914cf00a2c5cf0551a1e | 653 | py | Python | stubs.min/System/ComponentModel/__init___parts/ICollectionViewFactory.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/ComponentModel/__init___parts/ICollectionViewFactory.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/ComponentModel/__init___parts/ICollectionViewFactory.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class ICollectionViewFactory:
""" An interface that enables implementing collections to create a view to their data. Normally,user code does not call methods on this interface. """
def CreateView(self):
"""
CreateView(self: ICollectionViewFactory) -> ICollectionView
Creates a new view on the collect... | 40.8125 | 152 | 0.715161 |
7d4381ccbf11242bc10e8860e8de054af4c98985 | 4,045 | py | Python | src/board.py | DonPancoe/Adafruit_Blinka | c12a47fcd81c7d89dea171551cb81b25d2b935a1 | [
"MIT"
] | null | null | null | src/board.py | DonPancoe/Adafruit_Blinka | c12a47fcd81c7d89dea171551cb81b25d2b935a1 | [
"MIT"
] | null | null | null | src/board.py | DonPancoe/Adafruit_Blinka | c12a47fcd81c7d89dea171551cb81b25d2b935a1 | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2017 cefn for adafruit industries
#
# 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... | 33.429752 | 79 | 0.769839 |
82c717015a6581c74eb5e665c37f86704cbf92b2 | 1,605 | py | Python | payments/backends/base.py | Elijah-glitch/Hey | 00c09a0c8bfa9868d8048f697b36849569f9e127 | [
"MIT"
] | 25 | 2016-07-14T06:16:17.000Z | 2021-12-21T06:52:42.000Z | payments/backends/base.py | Elijah-glitch/Hey | 00c09a0c8bfa9868d8048f697b36849569f9e127 | [
"MIT"
] | 4 | 2017-11-29T20:20:30.000Z | 2017-12-01T00:04:29.000Z | payments/backends/base.py | Elijah-glitch/Hey | 00c09a0c8bfa9868d8048f697b36849569f9e127 | [
"MIT"
] | 5 | 2016-07-19T18:26:24.000Z | 2020-05-31T18:40:15.000Z | from django.utils.translation import ugettext_lazy as _
class BackendBase:
backend_id = None
backend_verbose_name = ""
backend_display_name = ""
backend_enabled = False
backend_has_recurring = False
def __init__(self, settings):
pass
def new_payment(self, payment):
""" In... | 28.157895 | 76 | 0.655452 |
edd53b6871a3ce0d270284789cf75b880288ac45 | 7,758 | py | Python | lifelines/fitters/log_normal_aft_fitter.py | lordqyxz/lifelines | 5c8a7b136e2fd341836772745af009504947ea9e | [
"MIT"
] | null | null | null | lifelines/fitters/log_normal_aft_fitter.py | lordqyxz/lifelines | 5c8a7b136e2fd341836772745af009504947ea9e | [
"MIT"
] | null | null | null | lifelines/fitters/log_normal_aft_fitter.py | lordqyxz/lifelines | 5c8a7b136e2fd341836772745af009504947ea9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from autograd import numpy as np
from autograd.scipy.stats import norm
from scipy.special import erfinv
import pandas as pd
from lifelines.utils import _get_index
from lifelines.fitters import ParametericAFTRegressionFitter
from lifelines.utils.safe_exp import safe_exp
from autograd.builtins i... | 39.989691 | 160 | 0.64282 |
28ef453ee5f8d23cb0a2f05a478a185fef9c5085 | 2,375 | py | Python | src/train/preprocessing/batch_data.py | cdmacfadyen/classify-modality | fe4dadbd3a52a59e51c192a6cb16bacf394f4473 | [
"MIT"
] | 1 | 2021-07-06T12:12:29.000Z | 2021-07-06T12:12:29.000Z | src/train/preprocessing/batch_data.py | cdmacfadyen/classify-modality | fe4dadbd3a52a59e51c192a6cb16bacf394f4473 | [
"MIT"
] | null | null | null | src/train/preprocessing/batch_data.py | cdmacfadyen/classify-modality | fe4dadbd3a52a59e51c192a6cb16bacf394f4473 | [
"MIT"
] | null | null | null | """Currently the training process is slowed by
IO, so we want to pre-batch the data to speed things up,
this way reads will be more sequential.
"""
import numpy as np
import glob
import os
from pathlib import Path
import random
import logging
dataset = "validate"
data_dir = "/data2/cdcm/rescaled"
root_dir = f"{da... | 33.450704 | 130 | 0.645053 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.