hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 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 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0eed507c0a7d908570e5345420f87553a7bbdb5d | 788 | py | Python | main.py | poltavski/social-network-frontend | ccc3410e23e42cfc65efd811aba262ec88163481 | [
"MIT"
] | null | null | null | main.py | poltavski/social-network-frontend | ccc3410e23e42cfc65efd811aba262ec88163481 | [
"MIT"
] | null | null | null | main.py | poltavski/social-network-frontend | ccc3410e23e42cfc65efd811aba262ec88163481 | [
"MIT"
] | null | null | null | from fastapi import FastAPI, Request, Response
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from utils import get_page_data, process_initial
import uvicorn
app = FastAPI()
templates = Jinja2Templates(directory="templates")
app.mou... | 29.185185 | 74 | 0.769036 |
0eed571d3bbd262c5cff9905eccfdacc18b2c6bf | 4,515 | py | Python | Core/Python/create_static_group.py | Ku-Al/OpenManage-Enterprise | 5cc67435d7cedb091edb07311ed9dceeda43277f | [
"Apache-2.0"
] | null | null | null | Core/Python/create_static_group.py | Ku-Al/OpenManage-Enterprise | 5cc67435d7cedb091edb07311ed9dceeda43277f | [
"Apache-2.0"
] | null | null | null | Core/Python/create_static_group.py | Ku-Al/OpenManage-Enterprise | 5cc67435d7cedb091edb07311ed9dceeda43277f | [
"Apache-2.0"
] | null | null | null | #
# Python script using OME API to create a new static group
#
# _author_ = Raajeev Kalyanaraman <Raajeev.Kalyanaraman@Dell.com>
# _version_ = 0.1
#
# Copyright (c) 2020 Dell EMC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lic... | 44.70297 | 108 | 0.61041 |
0eed82297822ff3d19f2f5807a4ad2a8d7e8d1d9 | 4,531 | py | Python | examples/references/segmentation/pascal_voc2012/code/dataflow/dataloaders.py | kagrze/ignite | 18708a76f86623545311d35bc48673eac9e55591 | [
"BSD-3-Clause"
] | null | null | null | examples/references/segmentation/pascal_voc2012/code/dataflow/dataloaders.py | kagrze/ignite | 18708a76f86623545311d35bc48673eac9e55591 | [
"BSD-3-Clause"
] | null | null | null | examples/references/segmentation/pascal_voc2012/code/dataflow/dataloaders.py | kagrze/ignite | 18708a76f86623545311d35bc48673eac9e55591 | [
"BSD-3-Clause"
] | null | null | null | from typing import Callable, Optional, Tuple, Union
import numpy as np
from torch.utils.data import DataLoader, Sampler
from torch.utils.data.dataset import Subset, ConcatDataset
import torch.utils.data.distributed as data_dist
from dataflow.datasets import get_train_dataset, get_val_dataset, TransformedDataset, get... | 43.990291 | 116 | 0.637387 |
0eef441f20577a797d6570e849cc35b3e4804f14 | 6,309 | py | Python | saleor/core/jwt.py | autobotasia/saleor | e03e9f6ab1bddac308a6609d6b576a87e90ae655 | [
"CC-BY-4.0"
] | 1 | 2022-02-19T13:27:40.000Z | 2022-02-19T13:27:40.000Z | saleor/core/jwt.py | autobotasia/saleor | e03e9f6ab1bddac308a6609d6b576a87e90ae655 | [
"CC-BY-4.0"
] | null | null | null | saleor/core/jwt.py | autobotasia/saleor | e03e9f6ab1bddac308a6609d6b576a87e90ae655 | [
"CC-BY-4.0"
] | 2 | 2021-12-03T16:59:37.000Z | 2022-02-19T13:05:42.000Z | from datetime import datetime, timedelta
from typing import Any, Dict, Optional
import graphene
import jwt
from django.conf import settings
from django.core.handlers.wsgi import WSGIRequest
from ..account.models import User
from ..app.models import App
from .permissions import (
get_permission_names,
get_perm... | 30.926471 | 84 | 0.703598 |
0eef6d139660d7b5753e9bf6938554e0499dccc1 | 3,513 | py | Python | locust/configuration.py | pancaprima/locust | dba803fcdd13ff2fada4e8b8ee37a163aa519a48 | [
"MIT"
] | 1 | 2018-09-03T10:05:55.000Z | 2018-09-03T10:05:55.000Z | locust/configuration.py | pancaprima/locust | dba803fcdd13ff2fada4e8b8ee37a163aa519a48 | [
"MIT"
] | 14 | 2017-09-20T11:01:44.000Z | 2020-02-21T18:37:58.000Z | locust/configuration.py | erlanggakrisnamukti/locust | dba803fcdd13ff2fada4e8b8ee37a163aa519a48 | [
"MIT"
] | 3 | 2018-01-24T09:39:56.000Z | 2018-08-24T06:30:23.000Z | import os, json, logging, jsonpath_rw_ext, jsonpath_rw
from jsonpath_rw import jsonpath, parse
from . import events
from ast import literal_eval
from flask import make_response
logger = logging.getLogger(__name__)
CONFIG_PATH = '/tests/settings/config.json'
| 34.782178 | 114 | 0.562767 |
0eefcd2d4671b89d12e5ea2a56457ebf60bf3929 | 458 | py | Python | data/migrations/0023_discardaction_answers.py | SIXMON/peps | 48c09a951a0193ada7b91c8bb6efc4b1232c3520 | [
"MIT"
] | 5 | 2019-08-29T13:55:47.000Z | 2021-11-15T08:30:33.000Z | data/migrations/0023_discardaction_answers.py | SIXMON/peps | 48c09a951a0193ada7b91c8bb6efc4b1232c3520 | [
"MIT"
] | 295 | 2019-08-19T12:40:29.000Z | 2022-01-24T14:03:20.000Z | data/migrations/0023_discardaction_answers.py | SIXMON/peps | 48c09a951a0193ada7b91c8bb6efc4b1232c3520 | [
"MIT"
] | 7 | 2020-05-27T06:28:48.000Z | 2021-11-17T10:00:54.000Z | # Generated by Django 2.2.4 on 2019-11-14 16:48
import django.contrib.postgres.fields.jsonb
from django.db import migrations
| 22.9 | 88 | 0.637555 |
0eefd82c5da7e16c24688892ee11d187a2303e65 | 1,297 | py | Python | app/models.py | juanitodread/pitaya-falcon | f4b889f9fa39072aeb9f1c71fe5f3bb259082e93 | [
"Apache-2.0"
] | null | null | null | app/models.py | juanitodread/pitaya-falcon | f4b889f9fa39072aeb9f1c71fe5f3bb259082e93 | [
"Apache-2.0"
] | null | null | null | app/models.py | juanitodread/pitaya-falcon | f4b889f9fa39072aeb9f1c71fe5f3bb259082e93 | [
"Apache-2.0"
] | null | null | null | from json import JSONEncoder
from time import time
| 27.595745 | 109 | 0.621434 |
0ef004434fa16f22e39f1c30a252704c35a2362e | 2,034 | py | Python | compute_pi.py | jakobkogler/pi_memorize | c82c24f26407f1728ad1e73851b72dea9bf779f6 | [
"MIT"
] | null | null | null | compute_pi.py | jakobkogler/pi_memorize | c82c24f26407f1728ad1e73851b72dea9bf779f6 | [
"MIT"
] | null | null | null | compute_pi.py | jakobkogler/pi_memorize | c82c24f26407f1728ad1e73851b72dea9bf779f6 | [
"MIT"
] | null | null | null | """Compute pi."""
from decimal import Decimal, getcontext
import argparse
import itertools
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Calculates pi.')
parser.add_argument('--precision', type=int, default=100,
help='The desired precision of pi (default: 1... | 29.478261 | 102 | 0.564897 |
0ef0299af0be6f4403ddbf6bc9801b26ba188122 | 1,657 | py | Python | scripts/01_deploy_data_types.py | LaMemeBete/nodys-smart-contract | f67b88d98ebf7063b72f46cb2b014d5de96eb56d | [
"MIT",
"Unlicense"
] | null | null | null | scripts/01_deploy_data_types.py | LaMemeBete/nodys-smart-contract | f67b88d98ebf7063b72f46cb2b014d5de96eb56d | [
"MIT",
"Unlicense"
] | null | null | null | scripts/01_deploy_data_types.py | LaMemeBete/nodys-smart-contract | f67b88d98ebf7063b72f46cb2b014d5de96eb56d | [
"MIT",
"Unlicense"
] | null | null | null | #!/usr/bin/python3
import time
from brownie import (
DataTypes,
TransparentUpgradeableProxy,
ProxyAdmin,
config,
network,
Contract,
)
from scripts.helpful_scripts import get_account, encode_function_data
| 35.255319 | 93 | 0.692818 |
0ef0869b952bf4b7857333b5caa682157e430b0a | 659 | py | Python | modules/BidirectionalLSTM.py | omni-us/pytorch-retinanet | 8d3ee38d50df0afec2ab4dfa0eabb8219eb399f5 | [
"Apache-2.0"
] | 12 | 2019-08-14T13:32:30.000Z | 2022-03-09T15:25:33.000Z | modules/BidirectionalLSTM.py | omni-us/pytorch-retinanet | 8d3ee38d50df0afec2ab4dfa0eabb8219eb399f5 | [
"Apache-2.0"
] | 2 | 2019-12-29T21:15:00.000Z | 2020-01-14T13:51:54.000Z | modules/BidirectionalLSTM.py | omni-us/pytorch-retinanet | 8d3ee38d50df0afec2ab4dfa0eabb8219eb399f5 | [
"Apache-2.0"
] | 6 | 2019-08-03T16:22:41.000Z | 2020-09-27T16:55:40.000Z | import torch.nn as nn
| 28.652174 | 69 | 0.614568 |
0ef1f7b69f59398c929a14885bdad0d62cb19dca | 5,173 | py | Python | main.py | JaekwangCha/my_pytorch_templet | 7b6b67116e9d69abd64631d90b38fedc79be6c8c | [
"MIT"
] | null | null | null | main.py | JaekwangCha/my_pytorch_templet | 7b6b67116e9d69abd64631d90b38fedc79be6c8c | [
"MIT"
] | null | null | null | main.py | JaekwangCha/my_pytorch_templet | 7b6b67116e9d69abd64631d90b38fedc79be6c8c | [
"MIT"
] | null | null | null | # written by Jaekwang Cha
# version 0.1
# ================== IMPORT CUSTOM LEARNING LIBRARIES ===================== #
from customs.train import train, test
from customs.dataset import load_dataset
from customs.model import load_model
# ================== TRAINING SETTINGS ================== #
import argparse... | 52.785714 | 159 | 0.605838 |
0ef37debe8fbb6d99817c5ad659e3ff1f210c644 | 4,812 | py | Python | test/core/024-sc4-gridftp-http/Rosetta.py | ahnitz/pegasus | e269b460f4d87eb3f3a7e91cd82e2c28fdb55573 | [
"Apache-2.0"
] | 127 | 2015-01-28T19:19:13.000Z | 2022-03-31T05:57:40.000Z | test/core/024-sc4-gridftp-http/Rosetta.py | ahnitz/pegasus | e269b460f4d87eb3f3a7e91cd82e2c28fdb55573 | [
"Apache-2.0"
] | 14 | 2015-04-15T17:44:20.000Z | 2022-02-22T22:48:49.000Z | test/core/024-sc4-gridftp-http/Rosetta.py | ahnitz/pegasus | e269b460f4d87eb3f3a7e91cd82e2c28fdb55573 | [
"Apache-2.0"
] | 70 | 2015-01-22T15:20:32.000Z | 2022-02-21T22:50:23.000Z | #!/usr/bin/env python3
import logging
import sys
import subprocess
from pathlib import Path
from datetime import datetime
from Pegasus.api import *
logging.basicConfig(level=logging.DEBUG)
# --- Work Dir Setup -----------------------------------------------------------
RUN_ID = "024-sc4-gridftp-http-" + datetime.no... | 24.932642 | 86 | 0.588113 |
0ef391d627e7c29662611237b93dc0cbb0bb55b3 | 1,600 | py | Python | tests/nls_smoother_test.py | sisl/CEEM | 6154587fe3cdb92e8b7f70eedb1262caa1553cc8 | [
"MIT"
] | 5 | 2020-06-21T16:50:42.000Z | 2021-03-14T04:02:01.000Z | tests/nls_smoother_test.py | sisl/CEEM | 6154587fe3cdb92e8b7f70eedb1262caa1553cc8 | [
"MIT"
] | 1 | 2021-03-13T07:46:36.000Z | 2021-03-16T05:14:47.000Z | tests/nls_smoother_test.py | sisl/CEEM | 6154587fe3cdb92e8b7f70eedb1262caa1553cc8 | [
"MIT"
] | 1 | 2021-03-30T12:08:20.000Z | 2021-03-30T12:08:20.000Z | import torch
from ceem.opt_criteria import *
from ceem.systems import LorenzAttractor
from ceem.dynamics import *
from ceem.smoother import *
from ceem import utils
if __name__ == '__main__':
test_smoother()
| 23.880597 | 89 | 0.6325 |
0ef3a6ff8273269894257cdbba761bebf9bbfde6 | 5,787 | py | Python | qiskit/visualization/pulse_v2/device_info.py | godspeed5/qiskit-terra | a5d87c3e4a663ab962704585fba0caef15061246 | [
"Apache-2.0"
] | 15 | 2020-06-29T08:33:39.000Z | 2022-02-12T00:28:51.000Z | qiskit/visualization/pulse_v2/device_info.py | godspeed5/qiskit-terra | a5d87c3e4a663ab962704585fba0caef15061246 | [
"Apache-2.0"
] | 4 | 2020-11-27T09:34:13.000Z | 2021-04-30T21:13:41.000Z | qiskit/visualization/pulse_v2/device_info.py | godspeed5/qiskit-terra | a5d87c3e4a663ab962704585fba0caef15061246 | [
"Apache-2.0"
] | 11 | 2020-06-29T08:40:24.000Z | 2022-02-24T17:39:16.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# 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 derivative wo... | 39.910345 | 96 | 0.681355 |
0ef3c67e54e013586a797d3526f9d748c2da9ba4 | 8,401 | py | Python | django_gotolong/mfund/views.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 15 | 2019-12-06T16:19:45.000Z | 2021-08-20T13:22:22.000Z | django_gotolong/mfund/views.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 14 | 2020-12-08T10:45:05.000Z | 2021-09-21T17:23:45.000Z | django_gotolong/mfund/views.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 9 | 2020-01-01T03:04:29.000Z | 2021-04-18T08:42:30.000Z | # Create your views here.
from .models import Mfund
import plotly.graph_objects as go
from plotly.offline import plot
from plotly.tools import make_subplots
from django.db.models import Q
from django.conf import settings
from django.shortcuts import redirect
from django.contrib.auth.decorators import login_require... | 31.464419 | 104 | 0.644209 |
0ef63c39ffdfa491eb48d1233a4ab5b8fb12a49a | 5,444 | py | Python | m3u8.py | akria00/m3u8-Downloader-master | 37bf4683b0390998a819d0bb5b8af18ffb2166f6 | [
"Apache-2.0"
] | 2 | 2020-01-10T20:31:12.000Z | 2020-03-04T19:34:15.000Z | m3u8.py | akria00/m3u8-Downloader-master | 37bf4683b0390998a819d0bb5b8af18ffb2166f6 | [
"Apache-2.0"
] | null | null | null | m3u8.py | akria00/m3u8-Downloader-master | 37bf4683b0390998a819d0bb5b8af18ffb2166f6 | [
"Apache-2.0"
] | 1 | 2019-04-19T08:04:05.000Z | 2019-04-19T08:04:05.000Z | #coding: utf-8
from gevent import monkey
monkey.patch_all()
from gevent.pool import Pool
import gevent
import requests
import urllib
import os
import time
import re
import ssl
if __name__ == '__main__':
downloader = Downloader(5)
downloader.run('https://www.xiaodianying.com/filets/2069/dp.m3u8', './video',Tru... | 38.609929 | 171 | 0.517083 |
0ef760e6a3a5620b5876eba10c68bc7b0bb1b6c8 | 474 | py | Python | buzzbox/restaurants/migrations/0002_restaurant_description.py | Danielvalev/kutiika | 661b850163de942a137157a97d98d90553861044 | [
"MIT"
] | null | null | null | buzzbox/restaurants/migrations/0002_restaurant_description.py | Danielvalev/kutiika | 661b850163de942a137157a97d98d90553861044 | [
"MIT"
] | null | null | null | buzzbox/restaurants/migrations/0002_restaurant_description.py | Danielvalev/kutiika | 661b850163de942a137157a97d98d90553861044 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-06 10:02
from django.db import migrations, models
| 23.7 | 102 | 0.620253 |
0ef7742a3f6f5d085c7065159824fcf2edcb86c7 | 5,910 | py | Python | src/dsrlib/ui/utils.py | fraca7/dsremap | fb8f4fb13e74b512ed0cac05387fbe9694faebcf | [
"MIT"
] | 8 | 2020-09-06T02:15:10.000Z | 2022-01-12T22:49:20.000Z | src/dsrlib/ui/utils.py | fraca7/dsremap | fb8f4fb13e74b512ed0cac05387fbe9694faebcf | [
"MIT"
] | 5 | 2021-03-29T20:37:46.000Z | 2021-09-19T13:20:24.000Z | src/dsrlib/ui/utils.py | fraca7/dsremap | fb8f4fb13e74b512ed0cac05387fbe9694faebcf | [
"MIT"
] | 2 | 2020-09-16T01:45:49.000Z | 2021-06-12T12:38:15.000Z | #!/usr/bin/env python3
import os
import contextlib
from PyQt5 import QtCore, QtWidgets
from dsrlib.settings import Settings
def getSaveFilename(parent, domain, extension):
with Settings().grouped('Paths') as settings:
path = QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.DocumentsLocatio... | 37.884615 | 160 | 0.57445 |
0ef7cab0d5cd63afd5bc70bd0539a8ffbacf39c0 | 37,201 | py | Python | src/tiden/tidenrunner.py | mshonichev/example_pkg | 556a703fe8ea4a7737b8cae9c5d4d19c1397a70b | [
"Apache-2.0"
] | null | null | null | src/tiden/tidenrunner.py | mshonichev/example_pkg | 556a703fe8ea4a7737b8cae9c5d4d19c1397a70b | [
"Apache-2.0"
] | null | null | null | src/tiden/tidenrunner.py | mshonichev/example_pkg | 556a703fe8ea4a7737b8cae9c5d4d19c1397a70b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2017-2020 GridGain Systems.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 42.858295 | 121 | 0.597403 |
0ef87bb853368bafa20ca953ac321175f6e8c5af | 5,425 | py | Python | ludwig/data/cache/manager.py | ludwig-ai/ludw | b9d95bbdb474bc22260269de1bc094bc5455f37c | [
"Apache-2.0"
] | 970 | 2020-12-17T15:09:20.000Z | 2022-03-31T22:58:03.000Z | ludwig/data/cache/manager.py | ludwig-ai/ludw | b9d95bbdb474bc22260269de1bc094bc5455f37c | [
"Apache-2.0"
] | 503 | 2020-12-16T21:44:40.000Z | 2022-03-31T18:21:52.000Z | ludwig/data/cache/manager.py | ludwig-ai/ludw | b9d95bbdb474bc22260269de1bc094bc5455f37c | [
"Apache-2.0"
] | 145 | 2020-12-18T07:38:30.000Z | 2022-03-29T19:05:08.000Z | import logging
import os
import re
import uuid
from pathlib import Path
from ludwig.constants import CHECKSUM, META, TEST, TRAINING, VALIDATION
from ludwig.data.cache.util import calculate_checksum
from ludwig.utils import data_utils
from ludwig.utils.fs_utils import delete, path_exists
logger = logging.getLogger(__n... | 37.413793 | 111 | 0.650323 |
0ef896d76fe90ca7521ad1e92767789c5b227b40 | 2,629 | py | Python | test_calc_base.py | kshshkim/factorioCalcPy | 2a7c6ca567a3bf0d2b19f3cf0bc05274f83d4205 | [
"MIT"
] | 1 | 2021-09-21T01:42:05.000Z | 2021-09-21T01:42:05.000Z | test_calc_base.py | kshshkim/factorioCalcPy | 2a7c6ca567a3bf0d2b19f3cf0bc05274f83d4205 | [
"MIT"
] | null | null | null | test_calc_base.py | kshshkim/factorioCalcPy | 2a7c6ca567a3bf0d2b19f3cf0bc05274f83d4205 | [
"MIT"
] | null | null | null | import pprint
from FactorioCalcBase.data.binary import sorted_recipe_list, production_machine_category_list_dict
from FactorioCalcBase.recipe import Recipe
from FactorioCalcBase.calculator_base import CalculatorBase
from FactorioCalcBase.dependency_dict_common_function import dict_add_number
import time
| 40.446154 | 104 | 0.637885 |
0ef9b198b443266a7fb573c35726d29675e45f68 | 2,561 | py | Python | lib/py/src/Thrift.py | ahfeel/thrift | 3ac3fa6fede4b2446209cfeb6fcae5900da543cc | [
"BSL-1.0"
] | 3 | 2016-02-03T07:28:51.000Z | 2017-02-28T06:20:21.000Z | lib/py/src/Thrift.py | shigin/thrift | 4ca9547ffa73082fc4c3ff349dc23a1fda8dcc48 | [
"BSL-1.0"
] | null | null | null | lib/py/src/Thrift.py | shigin/thrift | 4ca9547ffa73082fc4c3ff349dc23a1fda8dcc48 | [
"BSL-1.0"
] | 8 | 2020-03-12T13:42:59.000Z | 2021-05-27T06:34:33.000Z | # Copyright (c) 2006- Facebook
# Distributed under the Thrift Software License
#
# See accompanying file LICENSE or visit the Thrift site at:
# http://developers.facebook.com/thrift/
| 23.281818 | 62 | 0.635689 |
0ef9be0b4faecf741290076154fb3c5bae164853 | 6,546 | py | Python | engine.py | nyumaya/wake-word-benchmark | d2f7ac091d31403f3398bc3ef2e2de4876a4629e | [
"Apache-2.0"
] | null | null | null | engine.py | nyumaya/wake-word-benchmark | d2f7ac091d31403f3398bc3ef2e2de4876a4629e | [
"Apache-2.0"
] | null | null | null | engine.py | nyumaya/wake-word-benchmark | d2f7ac091d31403f3398bc3ef2e2de4876a4629e | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 Picovoice Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 33.397959 | 122 | 0.669111 |
0efb8a4758e96798acb51aad7950963bd5e398c7 | 1,549 | py | Python | objO_and_ctxMgr/harakiri.py | thirschbuechler/didactic-barnacles | 88d0a2b572aacb2cb45e68bb4f05fa5273224439 | [
"MIT"
] | null | null | null | objO_and_ctxMgr/harakiri.py | thirschbuechler/didactic-barnacles | 88d0a2b572aacb2cb45e68bb4f05fa5273224439 | [
"MIT"
] | null | null | null | objO_and_ctxMgr/harakiri.py | thirschbuechler/didactic-barnacles | 88d0a2b572aacb2cb45e68bb4f05fa5273224439 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 20 22:18:58 2020
@author: https://stackoverflow.com/questions/293431/python-object-deleting-itself
@editor: thirschbuechler
this is probably overkill to alternatively exit a with-context, rather than by exception,
but hey, maybe it will be needed, ... | 29.226415 | 92 | 0.666882 |
0efbf67a5c5c854b7696ec4d515b55094ea51fb7 | 6,593 | py | Python | chapter2/gestures.py | srimani-programmer/Opencv-with-Python-Blueprints-second-Edition | 8762022a58a379229f02d7250d8344087d98516d | [
"MIT"
] | 39 | 2019-11-25T21:30:14.000Z | 2022-03-29T05:12:43.000Z | chapter2/gestures.py | srimani-programmer/Opencv-with-Python-Blueprints-second-Edition | 8762022a58a379229f02d7250d8344087d98516d | [
"MIT"
] | 2 | 2020-04-19T20:38:15.000Z | 2021-09-29T05:02:48.000Z | chapter2/gestures.py | srimani-programmer/Opencv-with-Python-Blueprints-second-Edition | 8762022a58a379229f02d7250d8344087d98516d | [
"MIT"
] | 29 | 2019-12-22T15:18:18.000Z | 2021-12-25T13:52:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A module containing an algorithm for hand gesture recognition"""
import numpy as np
import cv2
from typing import Tuple
__author__ = "Michael Beyeler"
__license__ = "GNU GPL 3.0 or later"
def recognize(img_gray):
"""Recognizes hand gesture in a single-channel dep... | 36.425414 | 97 | 0.64341 |
0efc0f40ba7d7a4e242df39e71061af9c4be7d55 | 4,224 | py | Python | satt/trace/logger/panic.py | jnippula/satt | aff4562b7e94f095d2e13eb10b9ac872484bb5cd | [
"Apache-2.0"
] | 54 | 2016-11-09T13:26:40.000Z | 2019-04-30T16:29:45.000Z | satt/trace/logger/panic.py | jnippula/satt | aff4562b7e94f095d2e13eb10b9ac872484bb5cd | [
"Apache-2.0"
] | 2 | 2016-11-09T13:25:19.000Z | 2017-03-27T04:09:35.000Z | satt/trace/logger/panic.py | jnippula/satt | aff4562b7e94f095d2e13eb10b9ac872484bb5cd | [
"Apache-2.0"
] | 10 | 2016-11-28T07:55:40.000Z | 2019-03-23T12:40:36.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
// Copyright (c) 2015 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE... | 38.054054 | 125 | 0.615057 |
0efc1162d67d89e44bbe7d9f3dc36378c583e84a | 688 | py | Python | xlab/cli.py | csalcedo001/xlab | 8c51f035a870dd57339ff0208a3ab27ef6b8b41f | [
"Apache-2.0"
] | 1 | 2022-03-23T23:44:14.000Z | 2022-03-23T23:44:14.000Z | xlab/cli.py | csalcedo001/xlab | 8c51f035a870dd57339ff0208a3ab27ef6b8b41f | [
"Apache-2.0"
] | null | null | null | xlab/cli.py | csalcedo001/xlab | 8c51f035a870dd57339ff0208a3ab27ef6b8b41f | [
"Apache-2.0"
] | null | null | null | import sys
import os
from . import filesys
MAIN_USAGE_MESSAGE = """
usage: xlab command ...
Options:
positional arguments:
command
project
"""
| 16.380952 | 61 | 0.543605 |
0efc40d3300b3d6d0a1fa06e980fe71072140597 | 16,294 | py | Python | python/paddle/optimizer/adamw.py | jzhang533/Paddle | 3227b2c401a80104e0c01dedcef2061ffa1ebbed | [
"Apache-2.0"
] | null | null | null | python/paddle/optimizer/adamw.py | jzhang533/Paddle | 3227b2c401a80104e0c01dedcef2061ffa1ebbed | [
"Apache-2.0"
] | 1 | 2021-09-07T10:31:38.000Z | 2021-09-08T09:18:20.000Z | python/paddle/optimizer/adamw.py | jzhang533/Paddle | 3227b2c401a80104e0c01dedcef2061ffa1ebbed | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 42.543081 | 130 | 0.603044 |
0efde6b5a9c1239ffa852e70caccc25e5c41c1dd | 1,880 | py | Python | tests/resources/test_interactions.py | VinLau/BAR_API | 0719a5fbc08872f667590b27347af9bfed669bca | [
"MIT"
] | 1 | 2020-07-06T20:12:25.000Z | 2020-07-06T20:12:25.000Z | tests/resources/test_interactions.py | VinLau/BAR_API | 0719a5fbc08872f667590b27347af9bfed669bca | [
"MIT"
] | 37 | 2020-06-27T02:58:23.000Z | 2022-03-29T00:35:28.000Z | tests/resources/test_interactions.py | VinLau/BAR_API | 0719a5fbc08872f667590b27347af9bfed669bca | [
"MIT"
] | 9 | 2020-06-26T23:09:16.000Z | 2022-01-26T21:20:46.000Z | from api import app
from unittest import TestCase
| 31.864407 | 86 | 0.519149 |
0efdfc79a9eea6c3e7cf614d63469062b5917d5a | 2,261 | py | Python | src/dialogflow-java-client-master/samples/clients/VirtualTradingAssistant/src/main/java/ai/examples/scraper/historicalScrape.py | 16kozlowskim/Group-20-SE | ceb8c319643964a3f478772d8f10090962df567c | [
"MIT"
] | null | null | null | src/dialogflow-java-client-master/samples/clients/VirtualTradingAssistant/src/main/java/ai/examples/scraper/historicalScrape.py | 16kozlowskim/Group-20-SE | ceb8c319643964a3f478772d8f10090962df567c | [
"MIT"
] | null | null | null | src/dialogflow-java-client-master/samples/clients/VirtualTradingAssistant/src/main/java/ai/examples/scraper/historicalScrape.py | 16kozlowskim/Group-20-SE | ceb8c319643964a3f478772d8f10090962df567c | [
"MIT"
] | null | null | null | # install BeautifulSoup4 before running
#
# prints out historical data in csv format:
#
# [date, open, high, low, close, volume]
#
import re, csv, sys, urllib2
from bs4 import BeautifulSoup
# If start date and end date is the same only one value will be returned and
# if not the multiple values which can be used to ma... | 29.75 | 205 | 0.658116 |
0eff08358676f71813cab0fd67b31eed87ddaad4 | 5,460 | py | Python | client/client.py | odontomachus/hotbox | d42c48d7f056f2b1f7bd707ad674e737a3c2fe08 | [
"MIT"
] | null | null | null | client/client.py | odontomachus/hotbox | d42c48d7f056f2b1f7bd707ad674e737a3c2fe08 | [
"MIT"
] | null | null | null | client/client.py | odontomachus/hotbox | d42c48d7f056f2b1f7bd707ad674e737a3c2fe08 | [
"MIT"
] | null | null | null | import sys
import io
from collections import defaultdict
import struct
from time import sleep
import queue
import threading
import serial
from serial import SerialException
RUN_LABELS = ('Time left', 'Temp 1', 'Temp 2', 'Off Goal', 'Temp Change', 'Duty cycle (/30)', 'Heating', 'Cycle', 'Total time', 'Goal temp')
MSG... | 26.25 | 140 | 0.512637 |
0eff0ae716a4c5a7fc1773362d577d2a440094dc | 2,549 | py | Python | test/functional/abc-sync-chain.py | ComputerCraftr/devault | 546b54df85e3392f85e7ea5fcd4ea9b395ba8f4c | [
"MIT"
] | 35 | 2019-02-23T06:21:13.000Z | 2021-11-15T11:35:13.000Z | test/functional/abc-sync-chain.py | ComputerCraftr/devault | 546b54df85e3392f85e7ea5fcd4ea9b395ba8f4c | [
"MIT"
] | 60 | 2019-02-25T18:17:03.000Z | 2021-07-13T00:14:00.000Z | test/functional/abc-sync-chain.py | ComputerCraftr/devault | 546b54df85e3392f85e7ea5fcd4ea9b395ba8f4c | [
"MIT"
] | 24 | 2019-02-20T05:37:02.000Z | 2021-10-29T18:42:10.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test that a node receiving many (potentially out of order) blocks exits
initial block download (IBD; this occur... | 31.085366 | 77 | 0.629266 |
16004b3ebbf7944e6af5eebfe55aa2baa0c582bb | 1,325 | py | Python | djangostagram/posts/models.py | hongsemy/InstagramWithDjango | 18cb273668809fb48d829e1ac11438c51505623a | [
"MIT"
] | null | null | null | djangostagram/posts/models.py | hongsemy/InstagramWithDjango | 18cb273668809fb48d829e1ac11438c51505623a | [
"MIT"
] | null | null | null | djangostagram/posts/models.py | hongsemy/InstagramWithDjango | 18cb273668809fb48d829e1ac11438c51505623a | [
"MIT"
] | null | null | null | from django.db import models
from djangostagram.users import models as user_model
# Create your models here.
# This class is used in other models as an inheritance.
# An often-used pattern
| 30.813953 | 90 | 0.627925 |
160140a1d069dde69b115daae82f3d8b2a6cf9c6 | 497 | py | Python | guillotina/contrib/workflows/events.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 173 | 2017-03-10T18:26:12.000Z | 2022-03-03T06:48:56.000Z | guillotina/contrib/workflows/events.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 921 | 2017-03-08T14:04:43.000Z | 2022-03-30T10:28:56.000Z | guillotina/contrib/workflows/events.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 60 | 2017-03-16T19:59:44.000Z | 2022-03-03T06:48:59.000Z | from guillotina.contrib.workflows.interfaces import IWorkflowChangedEvent
from guillotina.events import ObjectEvent
from zope.interface import implementer
| 31.0625 | 73 | 0.744467 |
1601ac11a20c04fcd9a8cadea05debe08ac71228 | 6,340 | py | Python | data_steward/cdr_cleaner/cleaning_rules/covid_ehr_vaccine_concept_suppression.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 16 | 2017-06-30T20:05:05.000Z | 2022-03-08T21:03:19.000Z | data_steward/cdr_cleaner/cleaning_rules/covid_ehr_vaccine_concept_suppression.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 342 | 2017-06-23T21:37:40.000Z | 2022-03-30T16:44:16.000Z | data_steward/cdr_cleaner/cleaning_rules/covid_ehr_vaccine_concept_suppression.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 33 | 2017-07-01T00:12:20.000Z | 2022-01-26T18:06:53.000Z | """
Suppress COVID EHR vaccine concepts.
Original Issues: DC-1692
"""
# Python imports
import logging
# Project imports
from cdr_cleaner.cleaning_rules.deid.concept_suppression import AbstractBqLookupTableConceptSuppression
from constants.cdr_cleaner import clean_cdr as cdr_consts
from common import JINJA_ENV, CDM_T... | 37.964072 | 108 | 0.681388 |
160368ea260cbc50567d2f17656bb9f30dc2af47 | 3,494 | py | Python | pydbhub/httphub.py | sum3105/pydbhub | 501ea2c0ec7785bc06a38961a1366c3c04d7fabd | [
"MIT"
] | 18 | 2021-06-03T14:27:55.000Z | 2022-02-25T17:55:33.000Z | pydbhub/httphub.py | sum3105/pydbhub | 501ea2c0ec7785bc06a38961a1366c3c04d7fabd | [
"MIT"
] | 3 | 2021-06-20T07:17:51.000Z | 2021-12-10T15:24:19.000Z | pydbhub/httphub.py | sum3105/pydbhub | 501ea2c0ec7785bc06a38961a1366c3c04d7fabd | [
"MIT"
] | 5 | 2021-06-29T09:50:40.000Z | 2021-12-31T12:10:57.000Z | import pydbhub
from typing import Any, Dict, List, Tuple
from json.decoder import JSONDecodeError
import requests
import io
def send_request_json(query_url: str, data: Dict[str, Any]) -> Tuple[List[Any], str]:
"""
send_request_json sends a request to DBHub.io, formatting the returned result as JSON
Param... | 30.649123 | 108 | 0.61763 |
1603becbcb60a137e24357b35d07d2dd6b8de743 | 809 | py | Python | test_calcscore.py | BrandonLeiran/bracket-scoring | a099e9a56ee3083c3a9db7d085b11b1dc7fe77f8 | [
"MIT"
] | null | null | null | test_calcscore.py | BrandonLeiran/bracket-scoring | a099e9a56ee3083c3a9db7d085b11b1dc7fe77f8 | [
"MIT"
] | null | null | null | test_calcscore.py | BrandonLeiran/bracket-scoring | a099e9a56ee3083c3a9db7d085b11b1dc7fe77f8 | [
"MIT"
] | null | null | null | import pytest
from calcscore import round_score
# you'll be picking what teams make it to the next round
# - so picking 32, then 16, then 8, 4, 2, 1...i.e. round 1-6 winners
# teams will have a name & a seed
# seed doesn't change, so maybe make that not passed around w/ results
| 31.115385 | 74 | 0.68974 |
16045e96f3ff12b08a6e4885879fa2b0a083c578 | 4,803 | py | Python | tests/test_get.py | bgyori/pyobo | f199f62f65fc7faff307b56f979a369202c8ad33 | [
"MIT"
] | null | null | null | tests/test_get.py | bgyori/pyobo | f199f62f65fc7faff307b56f979a369202c8ad33 | [
"MIT"
] | null | null | null | tests/test_get.py | bgyori/pyobo | f199f62f65fc7faff307b56f979a369202c8ad33 | [
"MIT"
] | null | null | null | import unittest
from operator import attrgetter
import obonet
from pyobo import SynonymTypeDef, get
from pyobo.struct import Reference
from pyobo.struct.struct import (
iterate_graph_synonym_typedefs, iterate_graph_typedefs, iterate_node_parents, iterate_node_properties,
iterate_node_relationships, iterate_no... | 39.694215 | 111 | 0.636269 |
16054aa866f43fe130ae74a4adb86263728710d3 | 2,676 | py | Python | src/commons.py | ymontilla/WebScrapingCatastro | a184b5c92199305e28ca7346c01d1e78e0a92c13 | [
"MIT"
] | null | null | null | src/commons.py | ymontilla/WebScrapingCatastro | a184b5c92199305e28ca7346c01d1e78e0a92c13 | [
"MIT"
] | null | null | null | src/commons.py | ymontilla/WebScrapingCatastro | a184b5c92199305e28ca7346c01d1e78e0a92c13 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# +
## Utilidades comunes entre places y OSM.
# +
import csv
import ast
import codecs
from math import cos, asin, sqrt
# +
# -
import pandas as pd
def distance(lat1, lon1, lat2, lon2):
"""
El resultado de la medicin de distancia esta en kilometros.
"""
p = 0.017453292519... | 36.162162 | 114 | 0.612855 |
160586a7f083f1efa16456b4bf747dcafc4be695 | 7,851 | py | Python | GamesGetter.py | JamescMcE/BasketBet | f87719ac793ea50822e8c52fc23191dba9ad6418 | [
"CC0-1.0"
] | null | null | null | GamesGetter.py | JamescMcE/BasketBet | f87719ac793ea50822e8c52fc23191dba9ad6418 | [
"CC0-1.0"
] | null | null | null | GamesGetter.py | JamescMcE/BasketBet | f87719ac793ea50822e8c52fc23191dba9ad6418 | [
"CC0-1.0"
] | null | null | null | #This script Imports Game Data from ESPN, and Odds from the ODDS-API, and then imports them into a MySQL table, example in workbench here https://puu.sh/HOKCj/ce199eec8e.png
import mysql.connector
import requests
import json
import datetime
import time
#Connection to the MYSQL Server.
mydb = mysql.connector.... | 42.668478 | 257 | 0.584639 |
16071d9e180a990b1f3b40b4034a6c704c0e2258 | 4,302 | py | Python | neurodocker/tests/test_neurodocker.py | effigies/neurodocker | 4b0f32d2915b8b0308e3e391d534e05eb29b8d09 | [
"Apache-2.0"
] | 1 | 2021-01-27T06:00:35.000Z | 2021-01-27T06:00:35.000Z | neurodocker/tests/test_neurodocker.py | giovtorres/neurodocker | 65575f5e44f2c5ef96a5da51d0df54b1af80bb79 | [
"Apache-2.0"
] | null | null | null | neurodocker/tests/test_neurodocker.py | giovtorres/neurodocker | 65575f5e44f2c5ef96a5da51d0df54b1af80bb79 | [
"Apache-2.0"
] | null | null | null | """Tests for neurodocker.main"""
# Author: Jakub Kaczmarzyk <jakubk@mit.edu>
from __future__ import absolute_import, unicode_literals
import sys
import pytest
from neurodocker.neurodocker import create_parser, parse_args, main
| 31.173913 | 79 | 0.58066 |
1607f8c0c3d6768327bf886d9e6092523f205171 | 2,778 | py | Python | fuzzers/011-cle-ffconfig/generate.py | tmichalak/prjuray | 53f3c94b58ffc6d405ac20a3b340ae726717ed47 | [
"0BSD"
] | 39 | 2020-07-17T19:43:40.000Z | 2022-01-07T02:05:48.000Z | fuzzers/011-cle-ffconfig/generate.py | tmichalak/prjuray | 53f3c94b58ffc6d405ac20a3b340ae726717ed47 | [
"0BSD"
] | 24 | 2020-07-17T20:15:54.000Z | 2022-01-21T08:29:51.000Z | fuzzers/011-cle-ffconfig/generate.py | tmichalak/prjuray | 53f3c94b58ffc6d405ac20a3b340ae726717ed47 | [
"0BSD"
] | 11 | 2020-07-17T19:43:45.000Z | 2022-02-09T08:43:23.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 The Project U-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
'''
FDCE Primitive: D Flip-Flop with Clock... | 28.060606 | 101 | 0.596472 |
1608246c353096fff06ae6f3c3c9e80955bceb92 | 2,697 | py | Python | hmc/integrators/states/riemannian_leapfrog_state.py | JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo | 7ee1b530db0eb536666dbc872fbf8200e53dd49b | [
"MIT"
] | 1 | 2021-11-23T15:40:07.000Z | 2021-11-23T15:40:07.000Z | hmc/integrators/states/riemannian_leapfrog_state.py | JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo | 7ee1b530db0eb536666dbc872fbf8200e53dd49b | [
"MIT"
] | null | null | null | hmc/integrators/states/riemannian_leapfrog_state.py | JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo | 7ee1b530db0eb536666dbc872fbf8200e53dd49b | [
"MIT"
] | null | null | null | from typing import Callable
import numpy as np
from hmc.integrators.states.leapfrog_state import LeapfrogState
from hmc.integrators.fields import riemannian
from hmc.linalg import solve_psd
| 32.890244 | 104 | 0.68743 |
1608a15c941a14be0a253388b661310efd0d4787 | 2,834 | py | Python | MultirangerTest.py | StuartLiam/DroneNavigationOnboard | 11ac6a301dfc72b15e337ddf09f5ddc79265a03f | [
"MIT"
] | null | null | null | MultirangerTest.py | StuartLiam/DroneNavigationOnboard | 11ac6a301dfc72b15e337ddf09f5ddc79265a03f | [
"MIT"
] | null | null | null | MultirangerTest.py | StuartLiam/DroneNavigationOnboard | 11ac6a301dfc72b15e337ddf09f5ddc79265a03f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 2... | 31.488889 | 77 | 0.693013 |
160b1c97ac3f8a38cfc9b68c4f0651550e3df491 | 266 | py | Python | employees/choices.py | sauli6692/barbershop | 862357bd78235e720b2e3b868d2423a57bb4e328 | [
"MIT"
] | null | null | null | employees/choices.py | sauli6692/barbershop | 862357bd78235e720b2e3b868d2423a57bb4e328 | [
"MIT"
] | null | null | null | employees/choices.py | sauli6692/barbershop | 862357bd78235e720b2e3b868d2423a57bb4e328 | [
"MIT"
] | null | null | null | from django.utils.translation import ugettext_lazy as _
USER_TYPE_STAFF = 'STAFF'
USER_TYPE_ADMIN = 'ADMIN'
USER_TYPE_BARBER = 'BARBER'
USER_TYPE_CHOICES = (
(USER_TYPE_STAFF, _('Dev')),
(USER_TYPE_ADMIN, _('Admin')),
(USER_TYPE_BARBER, _('Barber')),
) | 24.181818 | 55 | 0.714286 |
160b335422855d4c69636103d3682d2f66956533 | 821 | py | Python | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/html5test.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/html5test.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/html5test.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState
from telemetry.page import page as page_module
from telemetry import story
| 27.366667 | 76 | 0.751523 |
160c8a87b1d001ed3cb1d85873c9a8a8f238d3b2 | 6,537 | py | Python | lessons/sqlite_example/database.py | eliranM98/python_course | d9431dd6c0f27fca8ca052cc2a821ed0b883136c | [
"MIT"
] | 6 | 2019-03-29T06:14:53.000Z | 2021-10-15T23:42:36.000Z | lessons/sqlite_example/database.py | eliranM98/python_course | d9431dd6c0f27fca8ca052cc2a821ed0b883136c | [
"MIT"
] | 4 | 2019-09-06T10:03:40.000Z | 2022-03-11T23:30:55.000Z | lessons/sqlite_example/database.py | eliranM98/python_course | d9431dd6c0f27fca8ca052cc2a821ed0b883136c | [
"MIT"
] | 12 | 2019-06-20T19:34:52.000Z | 2021-10-15T23:42:39.000Z | """
in this example we want to create a user credentials database with:
user_id & password
logger showing connection logs, DB version, errors during fetching & executing
"""
import sqlite3
from lessons.sqlite_example.log import create as create_logger
if "__main__" == __name__:
import os
log_file = os.pat... | 39.379518 | 137 | 0.621539 |
160d55ef119cabea32b158df2e672f5773e80b28 | 217 | py | Python | backend/app/projectx/routing.py | emmawoollett/projectx | c061df01d581456884f46c2b8e3b478626501dec | [
"MIT"
] | null | null | null | backend/app/projectx/routing.py | emmawoollett/projectx | c061df01d581456884f46c2b8e3b478626501dec | [
"MIT"
] | null | null | null | backend/app/projectx/routing.py | emmawoollett/projectx | c061df01d581456884f46c2b8e3b478626501dec | [
"MIT"
] | null | null | null | from django.urls import re_path
from projectx.consumers import UserWebSocketConsumer
from .consumers import UserWebSocketConsumer
websocket_urlpatterns = [
re_path(r"^ws/$", UserWebSocketConsumer.as_asgi()),
]
| 21.7 | 55 | 0.801843 |
160fd3286e288456d5bdd6bcd283afcbe0cfc945 | 399 | py | Python | aldryn_search/cms_apps.py | lab360-ch/aldryn-search | 15a319edac126aa1e44f22d34a7bcb5aec3e3dde | [
"BSD-3-Clause"
] | 11 | 2019-03-29T10:32:13.000Z | 2021-02-26T11:44:44.000Z | aldryn_search/cms_apps.py | lab360-ch/aldryn-search | 15a319edac126aa1e44f22d34a7bcb5aec3e3dde | [
"BSD-3-Clause"
] | 23 | 2019-01-31T16:20:57.000Z | 2021-11-10T19:57:58.000Z | aldryn_search/cms_apps.py | lab360-ch/aldryn-search | 15a319edac126aa1e44f22d34a7bcb5aec3e3dde | [
"BSD-3-Clause"
] | 23 | 2019-02-14T09:59:40.000Z | 2022-03-10T12:38:48.000Z | from django.utils.translation import ugettext_lazy as _
from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
from .conf import settings
if settings.ALDRYN_SEARCH_REGISTER_APPHOOK:
apphook_pool.register(AldrynSearchApphook)
| 22.166667 | 55 | 0.77193 |
161021c6a14b006c767d40fee4f27d3f18827442 | 744 | py | Python | BizPy/openpyxl/20200513/horizontal_chart.py | t2y/python-study | 52a132ea600d4696164e540d8a8f8f5fc58e097a | [
"Apache-2.0"
] | 18 | 2016-08-15T00:24:44.000Z | 2020-11-30T15:11:52.000Z | BizPy/openpyxl/20200513/horizontal_chart.py | t2y/python-study | 52a132ea600d4696164e540d8a8f8f5fc58e097a | [
"Apache-2.0"
] | null | null | null | BizPy/openpyxl/20200513/horizontal_chart.py | t2y/python-study | 52a132ea600d4696164e540d8a8f8f5fc58e097a | [
"Apache-2.0"
] | 6 | 2016-09-28T10:47:03.000Z | 2020-10-14T10:20:06.000Z | import pandas as pd
from openpyxl import Workbook
from openpyxl.chart import BarChart, Reference
wb = Workbook()
ws = wb.active
df = pd.read_csv('population.csv')
ws.append(df.columns.tolist())
for row in df.values:
ws.append(list(row))
row_length = 1 + len(df.values)
values = Reference(ws, min_col=... | 25.655172 | 76 | 0.72043 |
161068852c112b7ab6b2bbf31d699217b497ca00 | 462 | py | Python | changes/api/serializer/models/logsource.py | alex/changes | 69a17b4c639e7082a75d037384ccb68ead3a0b4b | [
"Apache-2.0"
] | 1 | 2015-11-08T13:00:44.000Z | 2015-11-08T13:00:44.000Z | changes/api/serializer/models/logsource.py | alex/changes | 69a17b4c639e7082a75d037384ccb68ead3a0b4b | [
"Apache-2.0"
] | null | null | null | changes/api/serializer/models/logsource.py | alex/changes | 69a17b4c639e7082a75d037384ccb68ead3a0b4b | [
"Apache-2.0"
] | null | null | null | from changes.api.serializer import Serializer, register
from changes.models.log import LogSource
| 27.176471 | 55 | 0.582251 |
161139c53368ea4186cb4cad223d2c35a3e06750 | 1,246 | py | Python | examples/prostate/data_preparation/utils/nrrd_to_nifti.py | IsaacYangSLA/NVFlare | 8c6582894c9a8431f64479bc9f472fefcd71e5a7 | [
"Apache-2.0"
] | null | null | null | examples/prostate/data_preparation/utils/nrrd_to_nifti.py | IsaacYangSLA/NVFlare | 8c6582894c9a8431f64479bc9f472fefcd71e5a7 | [
"Apache-2.0"
] | null | null | null | examples/prostate/data_preparation/utils/nrrd_to_nifti.py | IsaacYangSLA/NVFlare | 8c6582894c9a8431f64479bc9f472fefcd71e5a7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 35.6 | 100 | 0.764045 |
16117ea75b817e23fa127a364786f0a599ad09cc | 1,570 | py | Python | setup.py | jszakmeister/rst2ctags | 22f4035d9ea1e43a07b91f806014d318b3dc5097 | [
"BSD-3-Clause"
] | 23 | 2015-03-05T14:12:08.000Z | 2022-01-08T00:21:39.000Z | setup.py | jszakmeister/rst2ctags | 22f4035d9ea1e43a07b91f806014d318b3dc5097 | [
"BSD-3-Clause"
] | 8 | 2015-03-05T14:15:44.000Z | 2020-10-02T00:16:55.000Z | setup.py | jszakmeister/rst2ctags | 22f4035d9ea1e43a07b91f806014d318b3dc5097 | [
"BSD-3-Clause"
] | 12 | 2015-03-05T15:12:22.000Z | 2021-11-09T21:29:55.000Z | from setuptools import setup
import io
import os
import re
version_re = re.compile(r'^__version__ = "([^"]*)"$')
# Find the version number.
with open('rst2ctags.py', 'r') as f:
for line in f:
line = line.rstrip()
m = version_re.match(line)
if m:
version = m.group(1)
... | 26.610169 | 74 | 0.610191 |
161220d89127fbd24716ad1fd95c0f68eb787901 | 50,986 | py | Python | py-ws/hardshare/cli.py | rerobots/hardshare | 456e7d1d1eb21d03efc3cd1f7960a1729b62527b | [
"Apache-2.0"
] | 8 | 2020-04-14T17:19:57.000Z | 2022-03-03T08:55:34.000Z | py-ws/hardshare/cli.py | rerobots/hardshare | 456e7d1d1eb21d03efc3cd1f7960a1729b62527b | [
"Apache-2.0"
] | 11 | 2020-04-01T15:13:37.000Z | 2021-06-15T22:10:31.000Z | py-ws/hardshare/cli.py | rerobots/hardshare | 456e7d1d1eb21d03efc3cd1f7960a1729b62527b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2018 rerobots, 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 47.784442 | 109 | 0.530459 |
1612e716ac963ff1c93e60be69cd7a089a9ba5ac | 3,870 | py | Python | app/realty.py | JenBanks8585/Labs_CitySpireDS | 4755bd5ce718ee2f65f6a53a5918bd0cf18b2ddf | [
"MIT"
] | null | null | null | app/realty.py | JenBanks8585/Labs_CitySpireDS | 4755bd5ce718ee2f65f6a53a5918bd0cf18b2ddf | [
"MIT"
] | null | null | null | app/realty.py | JenBanks8585/Labs_CitySpireDS | 4755bd5ce718ee2f65f6a53a5918bd0cf18b2ddf | [
"MIT"
] | null | null | null | """Realty Info"""
import os
import requests
from dotenv import load_dotenv
from fastapi import APIRouter, Depends
import sqlalchemy
from pydantic import BaseModel, SecretStr
from app import config
from app.walk_score import *
load_dotenv()
router = APIRouter()
headers = {'x-rapidapi-key': os.getenv('api_key'),
... | 28.880597 | 100 | 0.575969 |
1614bfb3f4849c9afe583c49f1da9a5698654285 | 2,648 | py | Python | dist/weewx-4.0.0b3/bin/weewx/junk2.py | v0rts/docker-weewx | 70b2f252051dfead4fcb74e74662b297831e6342 | [
"Apache-2.0"
] | 10 | 2017-01-05T17:30:48.000Z | 2021-09-18T15:04:20.000Z | dist/weewx-4.0.0b3/bin/weewx/junk2.py | v0rts/docker-weewx | 70b2f252051dfead4fcb74e74662b297831e6342 | [
"Apache-2.0"
] | 2 | 2019-07-21T10:48:42.000Z | 2022-02-16T20:36:45.000Z | dist/weewx-4.0.0b3/bin/weewx/junk2.py | v0rts/docker-weewx | 70b2f252051dfead4fcb74e74662b297831e6342 | [
"Apache-2.0"
] | 12 | 2017-01-05T18:50:30.000Z | 2021-10-05T07:35:45.000Z | from __future__ import print_function
import time
import weeutil.weeutil
import weewx.manager
import weewx.xtypes
archive_sqlite = {'database_name': '/home/weewx/archive/weepwr.sdb', 'driver': 'weedb.sqlite'}
archive_mysql = {'database_name': 'weewx', 'user': 'weewx', 'password': 'weewx', 'driver': 'weedb.mysql'}
sq... | 50.923077 | 203 | 0.692976 |
16156ec4833837e6239f5128828011fb974363b0 | 5,868 | py | Python | fast_lemon_api_test.py | a6502/fast_lemon_api | 09a5b6eec3e84d1d006f927e502a7071a28739cc | [
"Unlicense"
] | null | null | null | fast_lemon_api_test.py | a6502/fast_lemon_api | 09a5b6eec3e84d1d006f927e502a7071a28739cc | [
"Unlicense"
] | null | null | null | fast_lemon_api_test.py | a6502/fast_lemon_api | 09a5b6eec3e84d1d006f927e502a7071a28739cc | [
"Unlicense"
] | null | null | null | #!/usr/bin/env pytest-3
from fastapi.testclient import TestClient
from fast_lemon_api import app
client = TestClient(app)
neworder = {
"isin": "blablablabla",
"limit_price": 0.2,
"side": "buy",
"quantity": 1,
"valid_until": 1996943663,
"status": "open"
}
order_id = None
| 30.5625 | 80 | 0.387014 |
1616161b4c2c7495b51d0bf323d5ee79ad27b64f | 4,999 | py | Python | tests/regenerate_credentials.py | andrewkozlik/pam-u2f | 5b504783c9af972c790bdcb506867bad7df5e333 | [
"BSD-2-Clause"
] | null | null | null | tests/regenerate_credentials.py | andrewkozlik/pam-u2f | 5b504783c9af972c790bdcb506867bad7df5e333 | [
"BSD-2-Clause"
] | null | null | null | tests/regenerate_credentials.py | andrewkozlik/pam-u2f | 5b504783c9af972c790bdcb506867bad7df5e333 | [
"BSD-2-Clause"
] | null | null | null | #!/bin/python2
import collections
import re
import subprocess
import sys
PUC = "../pamu2fcfg/pamu2fcfg"
resident = ["", "-r"]
presence = ["", "-P"]
pin = ["", "-N"]
verification = ["", "-V"]
Credential = collections.namedtuple("Credential", "keyhandle pubkey attributes oldformat")
sshformat = 0
# Single crede... | 34.475862 | 109 | 0.509302 |
16173a166fd943413345036df12245c2a4ab8343 | 5,807 | py | Python | tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_scalar_test.py | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 13 | 2018-07-23T18:53:35.000Z | 2021-11-18T19:56:45.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_scalar_test.py | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 6 | 2020-04-21T20:38:18.000Z | 2020-06-16T01:00:15.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_scalar_test.py | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 13 | 2018-09-07T13:28:38.000Z | 2020-07-17T15:06:24.000Z | # Copyright 2016 The TensorFlow 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 applica... | 37.707792 | 92 | 0.646633 |
161805dd743777711d517821e54c4fec5cc46ec8 | 7,634 | py | Python | mule/util/algorand_util.py | bricerisingalgorand/mule | 721b73f691076e5c3e2ebb8a79313da486fb0f96 | [
"MIT"
] | null | null | null | mule/util/algorand_util.py | bricerisingalgorand/mule | 721b73f691076e5c3e2ebb8a79313da486fb0f96 | [
"MIT"
] | null | null | null | mule/util/algorand_util.py | bricerisingalgorand/mule | 721b73f691076e5c3e2ebb8a79313da486fb0f96 | [
"MIT"
] | null | null | null | import os
import subprocess
import json
import urllib.request
from mule.util import os_util
from mule.util import file_util
from mule.util import time_util
from mule.util import s3_util
from mule.util import semver_util
import platform
def install_node(data_dir, bin_dir, channel, node_package_version='latest'):
""... | 38.361809 | 150 | 0.716793 |
161931efe310b9554c601df989d24d47e0bdfff9 | 2,490 | py | Python | examples/showcase/src/demos_panels/scrollPanel.py | allbuttonspressed/pyjs | c726fdead530eb63ee4763ae15daaa58d84cd58f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/showcase/src/demos_panels/scrollPanel.py | allbuttonspressed/pyjs | c726fdead530eb63ee4763ae15daaa58d84cd58f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/showcase/src/demos_panels/scrollPanel.py | allbuttonspressed/pyjs | c726fdead530eb63ee4763ae15daaa58d84cd58f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-11-18T14:17:59.000Z | 2019-11-18T14:17:59.000Z | """
The ``ui.ScrollPanel`` class implements a panel that scrolls its contents.
If you want the scroll bars to be always visible, call
``setAlwaysShowScrollBars(True)``. You can also change the current scrolling
position programmatically by calling ``setScrollPosition(vPos)`` and
``setScrollHorizontalPosition(hPos)`` ... | 42.20339 | 97 | 0.677912 |
1619ba2c67e7c086f7e9ae9363f2ebb460f2febc | 772 | py | Python | psdn.py | xiongchiamiov/phone-suitable-domain-name | da8d28c5783415f406e19b8ef2cde4c790a4c95d | [
"WTFPL"
] | 3 | 2017-10-23T18:31:24.000Z | 2021-02-01T21:22:24.000Z | psdn.py | xiongchiamiov/phone-suitable-domain-name | da8d28c5783415f406e19b8ef2cde4c790a4c95d | [
"WTFPL"
] | null | null | null | psdn.py | xiongchiamiov/phone-suitable-domain-name | da8d28c5783415f406e19b8ef2cde4c790a4c95d | [
"WTFPL"
] | 1 | 2016-10-14T10:47:41.000Z | 2016-10-14T10:47:41.000Z | #!/usr/bin/env python3
# May you recognize your weaknesses and share your strengths.
# May you share freely, never taking more than you give.
# May you find love and love everyone you find.
import re
import time
import whois
phone_spellable = re.compile(r'^[filoqrsuwxy]+$')
candidate_words = []
with open('/usr/sha... | 23.393939 | 61 | 0.634715 |
161a0260062e641dc32fc774ac4b854148c5381e | 3,310 | py | Python | src/requester/py/ElevatorTestCaseList.py | akzare/Elevator_Sys_Design | 2f7d7381d68699515a43ec4cf7a8a8afade726f3 | [
"MIT"
] | 1 | 2020-09-03T06:36:22.000Z | 2020-09-03T06:36:22.000Z | src/requester/py/ElevatorTestCaseList.py | akzare/Elevator_Sys_Design | 2f7d7381d68699515a43ec4cf7a8a8afade726f3 | [
"MIT"
] | null | null | null | src/requester/py/ElevatorTestCaseList.py | akzare/Elevator_Sys_Design | 2f7d7381d68699515a43ec4cf7a8a8afade726f3 | [
"MIT"
] | null | null | null | '''
* @file ElevatorTestCaseList.py
* @author Armin Zare Zadeh
* @date 30 July 2020
* @version 0.1
* @brief Implements a class to hold all the test cases during the program life cycle.
'''
#!/usr/bin/env python3
import sys
import ctypes
import ElevatorConfig as cfg
import ElevatorMsgProtocol as msgProto
| 50.151515 | 105 | 0.459517 |
161a66975b57933d5f14b6a51378ceceb0ae3ebd | 1,725 | py | Python | cart/views.py | pmaigutyak/mp-cart | 53adbbdeea7f8f8b2d432b103f7347d89adf3e30 | [
"0BSD"
] | 1 | 2021-09-25T14:31:48.000Z | 2021-09-25T14:31:48.000Z | cart/views.py | pmaigutyak/mp-cart | 53adbbdeea7f8f8b2d432b103f7347d89adf3e30 | [
"0BSD"
] | null | null | null | cart/views.py | pmaigutyak/mp-cart | 53adbbdeea7f8f8b2d432b103f7347d89adf3e30 | [
"0BSD"
] | 1 | 2021-04-10T18:50:47.000Z | 2021-04-10T18:50:47.000Z |
from django.utils.translation import ugettext
from django.views.decorators.http import require_POST
from django.http import JsonResponse
from django.shortcuts import render
from django.core.exceptions import ValidationError
from django.views.decorators.csrf import csrf_exempt
from cart.lib import get_cart
from cart.f... | 26.136364 | 75 | 0.697391 |
161a6fecb9358040e2c0bfdcfac12240bdf3bc16 | 2,089 | py | Python | ChessAI/src/const.py | darius-luca-tech/AI_Projects | 3cff26878807121e077375e5dbef39390fea0189 | [
"MIT"
] | 2 | 2020-07-11T14:48:27.000Z | 2020-08-04T11:24:58.000Z | ChessAI/src/const.py | darius-luca-tech/AI_Projects | 3cff26878807121e077375e5dbef39390fea0189 | [
"MIT"
] | null | null | null | ChessAI/src/const.py | darius-luca-tech/AI_Projects | 3cff26878807121e077375e5dbef39390fea0189 | [
"MIT"
] | null | null | null |
#------ game constants -----#
#players
WHITE = 0
BLACK = 1
BOTH = 2
#color for onTurnLabel
PLAYER_COLOR = ["white", "black"]
#figures
PAWN = 1
KNIGHT = 2
BISHOP = 3
ROOK = 4
QUEEN = 5
KING = 6
FIGURE_NAME = [ "", "pawn", "knight", "bishop", "rook", "queen", "king" ]
#used in move 32bit for prom... | 22.706522 | 99 | 0.567736 |
161b1a291b36fd8f7983e45a6a229f8f666d35f1 | 392 | py | Python | agent.py | kapzlok2408/Pokemon-Showdown-Node-Bot | c759eb9106fd2a3da3ebe4692a6730c37b2e5ee3 | [
"MIT"
] | null | null | null | agent.py | kapzlok2408/Pokemon-Showdown-Node-Bot | c759eb9106fd2a3da3ebe4692a6730c37b2e5ee3 | [
"MIT"
] | null | null | null | agent.py | kapzlok2408/Pokemon-Showdown-Node-Bot | c759eb9106fd2a3da3ebe4692a6730c37b2e5ee3 | [
"MIT"
] | null | null | null | import gym
import gym_pokemon
import random
if __name__ == "__main__":
env = gym.make("Pokemon-v0")
total_reward = 0.0
total_steps = 0
obs = env.reset()
while True:
action = random.randint(-1,8)
obs, reward, done, _ = env.step(action)
total_reward += reward
total_steps += 1
print("Currently %d steps, t... | 20.631579 | 81 | 0.683673 |
161b1ad3ceff80971c5c3ea0ba2b51d497a4a215 | 264 | py | Python | Curso-Em-Video-Python/Mundo-2/EXs/EX038.py | victor-da-costa/Aprendendo-Python | 8fd19b93a13953cda30de02de7dac22b4e62fb5b | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/Mundo-2/EXs/EX038.py | victor-da-costa/Aprendendo-Python | 8fd19b93a13953cda30de02de7dac22b4e62fb5b | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/Mundo-2/EXs/EX038.py | victor-da-costa/Aprendendo-Python | 8fd19b93a13953cda30de02de7dac22b4e62fb5b | [
"MIT"
] | null | null | null | num1 = int(input('Digite o 1 nmero: '))
num2 = int(input('Digite o 2 nmero: '))
if num1 > num2:
print('O {} maior que {}'.format(num1, num2))
elif num1 < num2:
print('O {} maior que4 {}'.format(num2, num1))
else:
print('Os nmeros so iguais')
| 29.333333 | 52 | 0.613636 |
161b52cb8725f9e857d4d9abd90c6be8f1cb0dec | 964 | py | Python | setup.py | danjjl/ipyfilechooser | 19d2e906207b2c3426675eda7889267f5956b182 | [
"MIT"
] | null | null | null | setup.py | danjjl/ipyfilechooser | 19d2e906207b2c3426675eda7889267f5956b182 | [
"MIT"
] | null | null | null | setup.py | danjjl/ipyfilechooser | 19d2e906207b2c3426675eda7889267f5956b182 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def read(fname):
"""Open files relative to package."""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='ipyfilechooser',
version='0.3.1',
author='Thomas Bouve (@crahan)',
author_email='... | 26.777778 | 70 | 0.637967 |
161dd7d6b32c517702822fdd2b972e9c34a403fe | 8,759 | py | Python | appengine/chromium_build_logs/handler.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/chromium_build_logs/handler.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/chromium_build_logs/handler.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import appengine_config
import datetime
import json
import logging
import os.path
import pickle
import sys
import urllib
sys.path.append(
os.path.j... | 31.170819 | 79 | 0.685352 |
161f5fc0724b14420397243336670a4b9fb7062e | 20,580 | py | Python | aws_lambda/pytorch/source/caffe2/python/operator_test/elementwise_op_broadcast_test.py | YevhenVieskov/ML-DL-in-production | 03839abcb93a49d4f05c43aa4e446a040027cdb0 | [
"MIT"
] | 4 | 2020-09-17T11:50:17.000Z | 2021-08-25T06:14:10.000Z | aws_lambda/pytorch/source/caffe2/python/operator_test/elementwise_op_broadcast_test.py | YevhenVieskov/ML-DL-in-production | 03839abcb93a49d4f05c43aa4e446a040027cdb0 | [
"MIT"
] | null | null | null | aws_lambda/pytorch/source/caffe2/python/operator_test/elementwise_op_broadcast_test.py | YevhenVieskov/ML-DL-in-production | 03839abcb93a49d4f05c43aa4e446a040027cdb0 | [
"MIT"
] | 6 | 2020-10-16T13:28:31.000Z | 2021-08-25T12:08:34.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
from hypothesis import given
import numpy as np
from caffe2.proto import caffe2_pb2
from caffe2.python import core, workspace
import caffe2.python.hypot... | 42 | 79 | 0.56035 |
161fe3f007696be8bbc024b9cad0f629ab8008f8 | 28,143 | py | Python | kayobe/tests/unit/cli/test_commands.py | jovial/kayobe | 49e61fef4a221ee9fcfcee2b7bac02b6acc5bd0c | [
"Apache-2.0"
] | null | null | null | kayobe/tests/unit/cli/test_commands.py | jovial/kayobe | 49e61fef4a221ee9fcfcee2b7bac02b6acc5bd0c | [
"Apache-2.0"
] | null | null | null | kayobe/tests/unit/cli/test_commands.py | jovial/kayobe | 49e61fef4a221ee9fcfcee2b7bac02b6acc5bd0c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 StackHPC Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 37.324934 | 93 | 0.538855 |
1620270422616b41ca7180a5b9004dcde020933a | 1,590 | py | Python | keras2onnx/proto/tfcompat.py | CNugteren/keras-onnx | b3d6b6486fe56640c48c62dd098e9405e35b4e9f | [
"MIT"
] | 1 | 2021-04-15T16:35:54.000Z | 2021-04-15T16:35:54.000Z | keras2onnx/proto/tfcompat.py | CNugteren/keras-onnx | b3d6b6486fe56640c48c62dd098e9405e35b4e9f | [
"MIT"
] | null | null | null | keras2onnx/proto/tfcompat.py | CNugteren/keras-onnx | b3d6b6486fe56640c48c62dd098e9405e35b4e9f | [
"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.
###############################################################################
imp... | 31.8 | 83 | 0.610692 |
16205a78e576c7488204d92806cb7a59f5ca5566 | 11,588 | py | Python | back2back/httpmulticlient.py | excentis/ByteBlower_python_examples | 0e082e17413abf5e25f6d14b85e50e7f73e7f965 | [
"BSD-3-Clause"
] | 2 | 2018-10-04T10:55:55.000Z | 2018-11-29T08:51:38.000Z | back2back/httpmulticlient.py | excentis/ByteBlower_python_examples | 0e082e17413abf5e25f6d14b85e50e7f73e7f965 | [
"BSD-3-Clause"
] | null | null | null | back2back/httpmulticlient.py | excentis/ByteBlower_python_examples | 0e082e17413abf5e25f6d14b85e50e7f73e7f965 | [
"BSD-3-Clause"
] | 3 | 2018-10-04T10:56:29.000Z | 2019-10-28T10:19:40.000Z | """
HTTP MultiServer/MultiClient for the ByteBlower Python API.
All examples are guaranteed to work with Python 2.7 and above
Copyright 2018, Excentis N.V.
"""
# Needed for python2 / python3 print function compatibility
from __future__ import print_function
# import the ByteBlower module
import byteblowerll.byteblowe... | 36.440252 | 101 | 0.621764 |
16214a743fb88fbf7d2c7ed97c9778c2fbeb46d1 | 4,764 | py | Python | tools/pod-xml-to-geojson.py | 24-timmarsseglingarna/app | 0c028bd2eb284c6893cb16dd91bd093b2222338f | [
"Apache-2.0"
] | null | null | null | tools/pod-xml-to-geojson.py | 24-timmarsseglingarna/app | 0c028bd2eb284c6893cb16dd91bd093b2222338f | [
"Apache-2.0"
] | 14 | 2017-08-24T12:46:58.000Z | 2021-04-21T07:56:58.000Z | tools/pod-xml-to-geojson.py | 24-timmarsseglingarna/app | 0c028bd2eb284c6893cb16dd91bd093b2222338f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Converts a PoD XML file to a GeoJSON file.
#
# With the --javascript parameter, the generated file is a javascript
# file defining a variable 'basePodSpec'.
#
# Get the PoD XML file from http://dev.24-timmars.nu/PoD/xmlapi_app.php.
import xml.etree.ElementTree as etree
import argparse
import r... | 29.407407 | 79 | 0.553736 |
1621aa767e78100c7f16f615ddf74780115c4b1d | 9,106 | py | Python | rastervision/plugin.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | 3 | 2020-07-05T04:04:18.000Z | 2021-02-05T16:19:55.000Z | rastervision/plugin.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | null | null | null | rastervision/plugin.py | carderne/raster-vision | 915fbcd3263d8f2193e65c2cd0eb53e050a47a01 | [
"Apache-2.0"
] | 1 | 2020-04-27T15:21:53.000Z | 2020-04-27T15:21:53.000Z | import os
import json
import importlib
from pluginbase import PluginBase
import rastervision as rv
from rastervision.protos.plugin_pb2 import PluginConfig as PluginConfigMsg
from rastervision.utils.files import download_if_needed
def load_conf_list(s):
"""Loads a list of items from the config.
Lists shoul... | 40.471111 | 80 | 0.648913 |
1621ccd669a0abec2dea3abc64d60feca57f3bfe | 2,134 | py | Python | acsm/nnutils/resunet.py | eldar/acsm | 04069e8bb4c12185473dc10c3355e5367fa98968 | [
"Apache-2.0"
] | 52 | 2020-04-02T12:35:55.000Z | 2022-03-11T07:47:30.000Z | acsm/nnutils/resunet.py | eldar/acsm | 04069e8bb4c12185473dc10c3355e5367fa98968 | [
"Apache-2.0"
] | 8 | 2020-06-04T07:34:34.000Z | 2021-09-18T21:17:26.000Z | acsm/nnutils/resunet.py | eldar/acsm | 04069e8bb4c12185473dc10c3355e5367fa98968 | [
"Apache-2.0"
] | 6 | 2020-07-12T02:12:18.000Z | 2021-03-06T05:03:33.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from absl import flags
import os
import os.path as osp
import numpy as np
import torch
import torchvision
import torch.nn as nn
from torch.autograd import Variable
import functools
from . ... | 27.358974 | 79 | 0.612933 |
162335a5b07a8e07ba6397644e3e4ed7a9f459e2 | 8,442 | py | Python | uproot_methods/common/TVector.py | marinang/uproot-methods | 1d16d51ab7da19b4f31070d24e8fbfed3ae3ec8f | [
"BSD-3-Clause"
] | null | null | null | uproot_methods/common/TVector.py | marinang/uproot-methods | 1d16d51ab7da19b4f31070d24e8fbfed3ae3ec8f | [
"BSD-3-Clause"
] | null | null | null | uproot_methods/common/TVector.py | marinang/uproot-methods | 1d16d51ab7da19b4f31070d24e8fbfed3ae3ec8f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2018, DIANA-HEP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list ... | 31.036765 | 91 | 0.650912 |
16262857a0ab051d70328d47ffe56eedbe48f8d3 | 1,259 | py | Python | tpp/controller/ConversionController.py | pennyarcade/TPPP | 9bb6db774d77f74c54ed2fa004e97c1aa114fff9 | [
"MIT"
] | null | null | null | tpp/controller/ConversionController.py | pennyarcade/TPPP | 9bb6db774d77f74c54ed2fa004e97c1aa114fff9 | [
"MIT"
] | null | null | null | tpp/controller/ConversionController.py | pennyarcade/TPPP | 9bb6db774d77f74c54ed2fa004e97c1aa114fff9 | [
"MIT"
] | null | null | null | """
Implements a non interactive controller to controt non-interactive visualizers.
(i.e. those that are used for converting TPP souce code into another format)
"""
from tpp.FileParser import FileParser
from tpp.controller.TPPController import TPPController
| 24.686275 | 81 | 0.590151 |
1626ca15f81c599021a7770317db1230752e7b3f | 4,282 | py | Python | scrapers/covid_scraper.py | ZachGeo/covidGR_API | 2f316337dda65bd33ac895df336481c3c2abe2c6 | [
"MIT"
] | null | null | null | scrapers/covid_scraper.py | ZachGeo/covidGR_API | 2f316337dda65bd33ac895df336481c3c2abe2c6 | [
"MIT"
] | null | null | null | scrapers/covid_scraper.py | ZachGeo/covidGR_API | 2f316337dda65bd33ac895df336481c3c2abe2c6 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from datetime import date
from lxml import html
import requests
import re
import json
if __name__ == '__main__':
cs = CovidScraper()
results = cs.scrape_data()
print(results)
| 32.439394 | 148 | 0.615834 |
16278cfaea317b80559af8d9f8ed6e412d50c446 | 776 | py | Python | img/autoeditimg.py | schorsche/css3-imageslider | 6d15b2e77f141b8e871bdce2049ee7b2567981fe | [
"MIT"
] | null | null | null | img/autoeditimg.py | schorsche/css3-imageslider | 6d15b2e77f141b8e871bdce2049ee7b2567981fe | [
"MIT"
] | null | null | null | img/autoeditimg.py | schorsche/css3-imageslider | 6d15b2e77f141b8e871bdce2049ee7b2567981fe | [
"MIT"
] | 1 | 2019-02-23T22:54:22.000Z | 2019-02-23T22:54:22.000Z | #!/usr/bin/python2.7
import os
from PIL import Image
DATEI_WEB_GROSSE = 700
if __name__ == '__main__':
main() | 22.171429 | 68 | 0.68299 |
1627fcf089cd43ce83004fbce276962343e2f2c7 | 785 | py | Python | wow/wow.py | brisberg/Kiri-Cogs | 9a5307ff8fbaa5e0560ec518cf26df52347da98d | [
"MIT"
] | null | null | null | wow/wow.py | brisberg/Kiri-Cogs | 9a5307ff8fbaa5e0560ec518cf26df52347da98d | [
"MIT"
] | null | null | null | wow/wow.py | brisberg/Kiri-Cogs | 9a5307ff8fbaa5e0560ec518cf26df52347da98d | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
| 29.074074 | 99 | 0.64586 |
16286e428c3bbec3fb9fbe61340a4121c6311a63 | 274 | py | Python | tests/attacks/class_test.py | henrik997/privacy-evaluator | f1d0e6c10ff58e582a44243788ab66c1d453bfa0 | [
"MIT"
] | null | null | null | tests/attacks/class_test.py | henrik997/privacy-evaluator | f1d0e6c10ff58e582a44243788ab66c1d453bfa0 | [
"MIT"
] | null | null | null | tests/attacks/class_test.py | henrik997/privacy-evaluator | f1d0e6c10ff58e582a44243788ab66c1d453bfa0 | [
"MIT"
] | null | null | null | import pytest
from privacy_evaluator.attacks.sample_attack import Sample_Attack
"""
This test only test if no error is thrown when calling the function, can be removed in the future
"""
| 24.909091 | 97 | 0.762774 |
162894b73abedfff0ad797772b95e5e53cb507ab | 2,412 | py | Python | setup.py | Oli2/presto-python-client | 11a89c2528a35d5af6916e9c9175cb3e1f84160b | [
"Apache-2.0"
] | null | null | null | setup.py | Oli2/presto-python-client | 11a89c2528a35d5af6916e9c9175cb3e1f84160b | [
"Apache-2.0"
] | null | null | null | setup.py | Oli2/presto-python-client | 11a89c2528a35d5af6916e9c9175cb3e1f84160b | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 33.041096 | 78 | 0.641376 |
162b50aea1cc09a5257abec74537cee83cae39dc | 368 | py | Python | Graphs/Pie Chart.py | TausifAnsari/PyHub | f6c949dc6a3974f57d7d146708443d0ceeb4418f | [
"MIT"
] | 1 | 2020-09-30T19:31:20.000Z | 2020-09-30T19:31:20.000Z | Graphs/Pie Chart.py | TanviSutar/PyHub | 6281e9f515674fb51f0d0862c26ec18020fa7d83 | [
"MIT"
] | null | null | null | Graphs/Pie Chart.py | TanviSutar/PyHub | 6281e9f515674fb51f0d0862c26ec18020fa7d83 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as graph
subject = ["Probability", "Calculas", "Discrete Mathematics", "Adv Engineering Mathematics",
"Linear Algebra", "Cryptography"]
weightage = [250,900,850,1200,290,345]
seperator = [0.05,0,0,0,0.05,0.05]
graph.title("Mathematics Topic Weightage")
graph.pie(weightage,labels=subject,au... | 30.666667 | 93 | 0.741848 |
162b6c04231d6cc1d5159da7ca51127039c4295e | 6,252 | py | Python | exercises/perform_model_selection.py | noavilk/IML.HUJI | 35aa4e6fbe489239e4fe72bf38c0dba3e6c81f37 | [
"MIT"
] | null | null | null | exercises/perform_model_selection.py | noavilk/IML.HUJI | 35aa4e6fbe489239e4fe72bf38c0dba3e6c81f37 | [
"MIT"
] | null | null | null | exercises/perform_model_selection.py | noavilk/IML.HUJI | 35aa4e6fbe489239e4fe72bf38c0dba3e6c81f37 | [
"MIT"
] | null | null | null | from __future__ import annotations
import numpy as np
import pandas as pd
from sklearn import datasets
from IMLearn.metrics import mean_square_error
from IMLearn.utils import split_train_test
from IMLearn.model_selection import cross_validate
from IMLearn.learners.regressors import PolynomialFitting, LinearRegression, ... | 45.304348 | 117 | 0.644274 |
162c0bbced3e06420246b7de0d2ad6e3745c54ef | 9,001 | py | Python | libraries/tools/media_utils.py | unfoldingWord-dev/d43-catalog | 6c36f59b9b326e0ead45739c09631ef1e57c4932 | [
"MIT"
] | 1 | 2017-05-18T22:18:31.000Z | 2017-05-18T22:18:31.000Z | libraries/tools/media_utils.py | unfoldingWord-dev/d43-catalog | 6c36f59b9b326e0ead45739c09631ef1e57c4932 | [
"MIT"
] | 54 | 2016-11-07T03:07:03.000Z | 2021-04-14T21:24:04.000Z | libraries/tools/media_utils.py | unfoldingWord-dev/d43-catalog | 6c36f59b9b326e0ead45739c09631ef1e57c4932 | [
"MIT"
] | 7 | 2016-10-26T18:15:14.000Z | 2018-06-01T18:37:32.000Z | import re
import copy
def parse_media(media, content_version, project_chapters):
"""
Converts a media object into formats usable in the catalog
:param media: the media object
:type media: dict
:param content_version: the current version of the source content
:type content_version: string
:p... | 39.47807 | 120 | 0.579602 |
162c1fe872f535df8473bc4c5719a90f0e1d8d91 | 4,518 | py | Python | django_customflow/mixins.py | Brad19940809/django-customflow | 502eed512d7c29e8d176c67fa62a7fce0be492d7 | [
"MIT"
] | 1 | 2019-08-06T09:28:11.000Z | 2019-08-06T09:28:11.000Z | django_customflow/mixins.py | Brad19940809/django-customflow | 502eed512d7c29e8d176c67fa62a7fce0be492d7 | [
"MIT"
] | null | null | null | django_customflow/mixins.py | Brad19940809/django-customflow | 502eed512d7c29e8d176c67fa62a7fce0be492d7 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# create_time: 2019/8/5 16:02
# __author__ = 'brad'
from . import utils
from .tasks.base import WaitingTask, BaseTask
| 34.227273 | 112 | 0.626162 |
162c59bea2ea2599ffb8f94490a631231802e6ea | 2,272 | py | Python | video_encoding/fields.py | fossabot/django-video-encoding | 16a88c2d61d28e6f5ec2b49956ce356f8c458c67 | [
"BSD-3-Clause"
] | 164 | 2019-07-29T17:59:06.000Z | 2022-03-19T21:36:01.000Z | video_encoding/fields.py | fossabot/django-video-encoding | 16a88c2d61d28e6f5ec2b49956ce356f8c458c67 | [
"BSD-3-Clause"
] | 188 | 2019-03-16T09:53:25.000Z | 2019-07-25T14:57:24.000Z | video_encoding/fields.py | fossabot/django-video-encoding | 16a88c2d61d28e6f5ec2b49956ce356f8c458c67 | [
"BSD-3-Clause"
] | 80 | 2019-08-03T17:49:08.000Z | 2022-02-28T16:56:33.000Z | from django.db.models.fields.files import (FieldFile, ImageField,
ImageFileDescriptor)
from django.utils.translation import ugettext as _
from .backends import get_backend_class
from .files import VideoFile
| 31.555556 | 78 | 0.636444 |
162cf5942b39cb55c7afb1cde65c73f78fbc4d55 | 8,182 | py | Python | test/spec/test_spec.py | raghu1121/SLM-Lab | 58e98b6521f581515d04ebacff5226105237ed9b | [
"MIT"
] | 1 | 2021-09-01T11:57:04.000Z | 2021-09-01T11:57:04.000Z | test/spec/test_spec.py | ragtz/SLM-Lab | 42c48af308dfe36401990aca3795bc481cf28c17 | [
"MIT"
] | null | null | null | test/spec/test_spec.py | ragtz/SLM-Lab | 42c48af308dfe36401990aca3795bc481cf28c17 | [
"MIT"
] | null | null | null | from flaky import flaky
from slm_lab.experiment.control import Trial
from slm_lab.experiment.monitor import InfoSpace
from slm_lab.lib import util
from slm_lab.spec import spec_util
import os
import pandas as pd
import pytest
import sys
# helper method to run all tests in test_spec
| 36.855856 | 82 | 0.744072 |
162d0aa4bb77e9b34f76b8530aaf8f57b28901c9 | 647 | py | Python | test/test_modify_group.py | Sfairat00/training_python | 14562b377d19bf22fc077e02efc7e56e73785a55 | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | Sfairat00/training_python | 14562b377d19bf22fc077e02efc7e56e73785a55 | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | Sfairat00/training_python | 14562b377d19bf22fc077e02efc7e56e73785a55 | [
"Apache-2.0"
] | null | null | null | from model.group import Group
| 26.958333 | 60 | 0.698609 |
162ffe7bb753d133521ad38601ddfbb5cb83a226 | 4,192 | py | Python | readme_metrics/MetricsMiddleware.py | readmeio/metrics-sdks-python | 02bc6e486260641f1a62760d20370157a4928af6 | [
"0BSD"
] | 2 | 2020-09-23T04:44:22.000Z | 2021-07-06T18:14:11.000Z | readme_metrics/MetricsMiddleware.py | readmeio/metrics-sdks-python | 02bc6e486260641f1a62760d20370157a4928af6 | [
"0BSD"
] | null | null | null | readme_metrics/MetricsMiddleware.py | readmeio/metrics-sdks-python | 02bc6e486260641f1a62760d20370157a4928af6 | [
"0BSD"
] | 1 | 2020-09-23T04:44:25.000Z | 2020-09-23T04:44:25.000Z | import io
import time
import datetime
from readme_metrics.Metrics import Metrics
from readme_metrics.MetricsApiConfig import MetricsApiConfig
from readme_metrics.ResponseInfoWrapper import ResponseInfoWrapper
from werkzeug import Request
| 34.933333 | 87 | 0.569656 |
16312fcb11ab7937c366343185da9dd102a4e745 | 4,048 | py | Python | kbrl.py | deekshaarya4/gymexperiments | 2d503ba14fcfba41339de25dd78d649bd12693e6 | [
"MIT"
] | null | null | null | kbrl.py | deekshaarya4/gymexperiments | 2d503ba14fcfba41339de25dd78d649bd12693e6 | [
"MIT"
] | null | null | null | kbrl.py | deekshaarya4/gymexperiments | 2d503ba14fcfba41339de25dd78d649bd12693e6 | [
"MIT"
] | null | null | null | import numpy as np
import gym
from sklearn.neighbors import NearestNeighbors
import matplotlib.pyplot as plt
import argparse
parser = argparse.ArgumentParser(description='KBRL with KNN')
parser.add_argument('--episodes', nargs='?', type=int, default=500)
parser.add_argument('--max_timesteps', nargs='?', type=int, defa... | 30.900763 | 100 | 0.673913 |
1631aec82f9bb8a63392680178fdfa614b25b1c9 | 10,654 | py | Python | shardDesigner/shardTemplateDir/shardStemDir/log/elast.py | vinci-project/rootShard | 2f6633c7fb1c1b690c0a38ffbb16af0b50d532bb | [
"MIT"
] | null | null | null | shardDesigner/shardTemplateDir/shardStemDir/log/elast.py | vinci-project/rootShard | 2f6633c7fb1c1b690c0a38ffbb16af0b50d532bb | [
"MIT"
] | 7 | 2020-03-02T11:23:41.000Z | 2022-03-11T23:52:51.000Z | shardDesigner/shardTemplateDir/shardStemDir/log/elast.py | vinci-project/rootShard | 2f6633c7fb1c1b690c0a38ffbb16af0b50d532bb | [
"MIT"
] | null | null | null | import elasticsearch
from elasticsearch import Elasticsearch
from elasticsearch import helpers
import time, json, datetime, os
| 41.455253 | 186 | 0.382016 |
1631ce5936a7d3f836485152fc8ba3c55b4623c2 | 722 | py | Python | corehq/apps/sms/tests.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | corehq/apps/sms/tests.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | corehq/apps/sms/tests.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from util import clean_phone_number, clean_outgoing_sms_text
from django.test import TestCase
| 32.818182 | 106 | 0.685596 |
16320687d82ed5fd57ef5ebf44c1b6e925a208e1 | 12,169 | py | Python | deepchem/models/atomic_conv.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 3 | 2019-05-29T19:18:25.000Z | 2021-01-25T05:44:05.000Z | deepchem/models/atomic_conv.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 10 | 2017-02-23T19:39:22.000Z | 2017-08-31T22:21:18.000Z | deepchem/models/atomic_conv.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 1 | 2018-09-22T00:53:53.000Z | 2018-09-22T00:53:53.000Z | __author__ = "Joseph Gomes"
__copyright__ = "Copyright 2017, Stanford University"
__license__ = "MIT"
import sys
from deepchem.models import KerasModel
from deepchem.models.layers import AtomicConvolution
from deepchem.models.losses import L2Loss
from tensorflow.keras.layers import Input, Layer
import numpy as np
im... | 36.109792 | 143 | 0.639494 |
163248c24fc9b2b48d8f714d22251c83d3496af1 | 2,694 | py | Python | dialogue-engine/test/programytest/config/brain/test_oob.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 104 | 2020-03-30T09:40:00.000Z | 2022-03-06T22:34:25.000Z | dialogue-engine/test/programytest/config/brain/test_oob.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 25 | 2020-06-12T01:36:35.000Z | 2022-02-19T07:30:44.000Z | dialogue-engine/test/programytest/config/brain/test_oob.py | cotobadesign/cotoba-agent-oss | 3833d56e79dcd7529c3e8b3a3a8a782d513d9b12 | [
"MIT"
] | 10 | 2020-04-02T23:43:56.000Z | 2021-05-14T13:47:01.000Z | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | 42.761905 | 126 | 0.72977 |
16329b70c55c3c7cf597931457db274fe5d63821 | 327 | py | Python | pypad/active_skill/interfaces/orb_generator_asi.py | candyninja001/pypad | 82bfc104c2524ca54cc415d37d2c21fec471838f | [
"MIT"
] | null | null | null | pypad/active_skill/interfaces/orb_generator_asi.py | candyninja001/pypad | 82bfc104c2524ca54cc415d37d2c21fec471838f | [
"MIT"
] | null | null | null | pypad/active_skill/interfaces/orb_generator_asi.py | candyninja001/pypad | 82bfc104c2524ca54cc415d37d2c21fec471838f | [
"MIT"
] | null | null | null | import abc
from ...orb_attribute import OrbAttribute
# Interface for active skills that create specific orb types (whether board change, orb change, orb spawn, etc) | 36.333333 | 111 | 0.776758 |
1632af4d460f191002d145c0aa53f5434243e662 | 5,717 | py | Python | setup.py | DivoK/mystery | b656eebe678c64864b2a5762765f36bddd540933 | [
"MIT"
] | 8 | 2019-05-31T19:46:49.000Z | 2020-05-14T22:21:35.000Z | setup.py | DivoK/mystery | b656eebe678c64864b2a5762765f36bddd540933 | [
"MIT"
] | 4 | 2019-06-04T15:24:22.000Z | 2021-06-01T23:53:37.000Z | setup.py | DivoK/mystery | b656eebe678c64864b2a5762765f36bddd540933 | [
"MIT"
] | 4 | 2019-06-04T15:08:46.000Z | 2020-04-25T15:52:00.000Z | """
Core business logic for `mystery`.
This code will run when the package is being built and installed.
"""
import json
import pathlib
import random
import tempfile
import urllib.request
import typing
import setuptools
from setuptools.command.sdist import sdist
# Load the configuration file.
CONFIG_PATH = pathlib.P... | 32.117978 | 109 | 0.688473 |
1632cc5107307be666384111255532a74d2d121a | 1,665 | py | Python | ADMM_primal.py | CrazyIvanPro/Optimal_Transport | aa782820a5ca5a01909ed3c32acbada43f6cfa0f | [
"MIT"
] | 2 | 2020-11-09T10:37:19.000Z | 2021-07-06T09:24:30.000Z | ADMM_primal.py | CrazyIvanPro/Optimal_Transport | aa782820a5ca5a01909ed3c32acbada43f6cfa0f | [
"MIT"
] | null | null | null | ADMM_primal.py | CrazyIvanPro/Optimal_Transport | aa782820a5ca5a01909ed3c32acbada43f6cfa0f | [
"MIT"
] | 1 | 2021-06-03T17:07:01.000Z | 2021-06-03T17:07:01.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =======================================
# File Name: ADMM_primal.py
# Purpose : implementation for ADMM method
# for solving primal problem
# =======================================
from utils import get_params
import numpy as np
import sys
def ADMM_primal(... | 29.732143 | 89 | 0.465465 |
163306f757b2b46fb97912f794d0169c24de2f36 | 1,117 | py | Python | misc_scripts/CleanVCFparams.py | pombase/legacy-eg-loader | 1a324121325ffc3b9a4c15922f7a12756a9c3206 | [
"Apache-2.0"
] | null | null | null | misc_scripts/CleanVCFparams.py | pombase/legacy-eg-loader | 1a324121325ffc3b9a4c15922f7a12756a9c3206 | [
"Apache-2.0"
] | null | null | null | misc_scripts/CleanVCFparams.py | pombase/legacy-eg-loader | 1a324121325ffc3b9a4c15922f7a12756a9c3206 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import os
import sys
import pprint
import argparse
parser = argparse.ArgumentParser(description='Clean up the data for a given parameter')
parser.add_argument('--infile', help="Path to the VCF file", default='test.vcf')
parser.add_argument('--outfile', help="Path to the new VCF file", default='test.... | 25.386364 | 94 | 0.637422 |