hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
369f049ae0b13fdb9e96a59e13ac26b4fcb70360 | 682 | py | Python | build/common/commands/console.py | paulator/frappe_docker | 2eecd1311dd427d94ba86b80253441444ff4e078 | [
"MIT"
] | 1 | 2020-10-20T15:16:13.000Z | 2020-10-20T15:16:13.000Z | build/common/commands/console.py | paulator/frappe_docker | 2eecd1311dd427d94ba86b80253441444ff4e078 | [
"MIT"
] | null | null | null | build/common/commands/console.py | paulator/frappe_docker | 2eecd1311dd427d94ba86b80253441444ff4e078 | [
"MIT"
] | null | null | null | import sys
import frappe
import IPython
from frappe.utils import get_sites
def console(site):
"Start ipython console for a site"
if site not in get_sites():
print("Site {0} does not exist on the current bench".format(site))
return
frappe.init(site=site)
frappe.connect()
frappe.lo... | 22 | 74 | 0.653959 |
abbd879fc396ce6a8498b092fe88de6981528ff7 | 568 | py | Python | PyInstaller/hooks/rthooks/pyi_rth_gi.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | PyInstaller/hooks/rthooks/pyi_rth_gi.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | PyInstaller/hooks/rthooks/pyi_rth_gi.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2015-2022, PyInstaller Development Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# The full license is in the file COPYING.txt, ... | 35.5 | 78 | 0.542254 |
af8794b26d6a40516a5bad70c9168899af32d479 | 1,767 | py | Python | onlinecourse/migrations/0002_auto_20220301_1522.py | nirjharlo/django-edx | a4f7382e39e1a9e6733b9b80a026ba2f95f4f2d0 | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0002_auto_20220301_1522.py | nirjharlo/django-edx | a4f7382e39e1a9e6733b9b80a026ba2f95f4f2d0 | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0002_auto_20220301_1522.py | nirjharlo/django-edx | a4f7382e39e1a9e6733b9b80a026ba2f95f4f2d0 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.3 on 2022-03-01 15:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('onlinecourse', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Choice',
... | 38.413043 | 125 | 0.582909 |
986e3336ba174956d31f86d8ff6a9d817581fc64 | 186 | py | Python | myhdfs/errors.py | Conchsk/mlapt | 1b88b50ee1c812d86affc2f2fc5fc108dc9f1022 | [
"MIT"
] | null | null | null | myhdfs/errors.py | Conchsk/mlapt | 1b88b50ee1c812d86affc2f2fc5fc108dc9f1022 | [
"MIT"
] | null | null | null | myhdfs/errors.py | Conchsk/mlapt | 1b88b50ee1c812d86affc2f2fc5fc108dc9f1022 | [
"MIT"
] | null | null | null | class FileNotFound(Exception):
pass
class UnsupportedMode(Exception):
pass
class UnsupportedOperation(Exception):
pass
class InvalidParameterValue(Exception):
pass
| 12.4 | 39 | 0.752688 |
3d6aadfec919b9ac114a2f51a86ca57e70b4e239 | 490 | py | Python | lib/android/service.py | TE-ToshiakiTanaka/stve-project | 822985d0daad7cb63b96f4b0a64539931aebf06e | [
"MIT"
] | null | null | null | lib/android/service.py | TE-ToshiakiTanaka/stve-project | 822985d0daad7cb63b96f4b0a64539931aebf06e | [
"MIT"
] | null | null | null | lib/android/service.py | TE-ToshiakiTanaka/stve-project | 822985d0daad7cb63b96f4b0a64539931aebf06e | [
"MIT"
] | null | null | null | __version__ = (0, 2, 0)
import os
import sys
LIB_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if not LIB_PATH in sys.path:
sys.path.insert(0, LIB_PATH)
from android import module
from android.module import Android
class Factory(object):
def __init__(self):
pass
def version(... | 19.6 | 70 | 0.697959 |
79e013d8ae35ce96f9a69ecc43b7c209bdcb65bb | 3,652 | py | Python | tests/importer/test_springer_dojson.py | kpsherva/cds-ils | 8eeeb6e03784756ed24895c8d030682f9d733e8a | [
"MIT"
] | null | null | null | tests/importer/test_springer_dojson.py | kpsherva/cds-ils | 8eeeb6e03784756ed24895c8d030682f9d733e8a | [
"MIT"
] | null | null | null | tests/importer/test_springer_dojson.py | kpsherva/cds-ils | 8eeeb6e03784756ed24895c8d030682f9d733e8a | [
"MIT"
] | null | null | null | import os
from cds_dojson.marc21.utils import create_record
from cds_ils.importer.providers.springer.springer import model
marcxml = (
"""<collection xmlns="http://www.loc.gov/MARC21/slim">"""
"""<record>{0}</record></collection>"""
)
def check_transformation(marcxml_body, json_body):
"""Check transfor... | 36.52 | 73 | 0.426342 |
9a44cc781765ed39ed4b98bf19f384db03570ab6 | 57,633 | py | Python | cirq-core/cirq/ops/pauli_string.py | mkeshita/Cirq | 06b5a5bd929757bf4bafe32b16bc4fabb36f3390 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ops/pauli_string.py | mkeshita/Cirq | 06b5a5bd929757bf4bafe32b16bc4fabb36f3390 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ops/pauli_string.py | mkeshita/Cirq | 06b5a5bd929757bf4bafe32b16bc4fabb36f3390 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 37.134665 | 100 | 0.615776 |
407f7e39dbbcc98cf2b3e80f4d9786a437cead7f | 2,841 | py | Python | scripts/scrape_course_catalog.py | SeanFoley123/htl-lab1 | 32eaf17c90fcfebd04276d144375dc2f92af2f60 | [
"MIT"
] | null | null | null | scripts/scrape_course_catalog.py | SeanFoley123/htl-lab1 | 32eaf17c90fcfebd04276d144375dc2f92af2f60 | [
"MIT"
] | null | null | null | scripts/scrape_course_catalog.py | SeanFoley123/htl-lab1 | 32eaf17c90fcfebd04276d144375dc2f92af2f60 | [
"MIT"
] | null | null | null | import re
import urllib
import pandas as pd
import requests
import yaml
from bs4 import BeautifulSoup
#%%
## Configuration
# start here:
start_url = 'http://www.olin.edu/course-listing/'
# actually start on all these pages:
# TODO a more robust implementation would look for the ?page links on the original start pa... | 42.402985 | 140 | 0.690954 |
e48295c1e8cd1f4258ad7a75573006dfacfaa75c | 543 | py | Python | angr/procedures/libc/atoi.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 2 | 2018-05-02T17:41:36.000Z | 2020-05-18T02:49:16.000Z | angr/procedures/libc/atoi.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | null | null | null | angr/procedures/libc/atoi.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 1 | 2022-02-03T20:06:20.000Z | 2022-02-03T20:06:20.000Z | import angr
from angr.sim_type import SimTypeString, SimTypeInt
import logging
l = logging.getLogger("angr.procedures.libc.atoi")
class atoi(angr.SimProcedure):
#pylint:disable=arguments-differ
def run(self, s):
#pylint:disable=attribute-defined-outside-init
self.argument_types = {0: self.t... | 28.578947 | 81 | 0.709024 |
8b53cbf7c6a16e2f218ab11c2271022308dcca86 | 1,851 | py | Python | src/models/losses/hierarchical.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 8 | 2021-10-12T05:39:20.000Z | 2022-03-31T10:55:01.000Z | src/models/losses/hierarchical.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 1 | 2022-03-30T19:23:42.000Z | 2022-03-30T19:23:42.000Z | src/models/losses/hierarchical.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 5 | 2021-11-17T07:38:28.000Z | 2022-01-31T10:46:36.000Z | import numpy as np
import torch
import torch.nn as nn
from src.registry import LOSSES
__all__ = ['HierarchicalCrossEntropyLoss']
@LOSSES.register_class
class HierarchicalCrossEntropyLoss(nn.Module):
__constants__ = ['reduction']
def __init__(self, class_graph, num_leaf_classes, reduction='mean'):
s... | 34.924528 | 76 | 0.606699 |
048c9c3147a1499288635f14d285fc26fcabf19c | 2,221 | py | Python | tests/models/v2/initial_async_response_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | tests/models/v2/initial_async_response_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | tests/models/v2/initial_async_response_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | #!/usr/bin/env python
# coding: utf-8
"""
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions... | 58.447368 | 845 | 0.777578 |
8f0ad659d016723d47f0e08613a6787d0b81d974 | 2,387 | py | Python | jw/gen.py | JoonSeongLee/dss7-coupon | b2d01fbdfce10bca56b0339fca7e7dff7a1feb4f | [
"MIT"
] | null | null | null | jw/gen.py | JoonSeongLee/dss7-coupon | b2d01fbdfce10bca56b0339fca7e7dff7a1feb4f | [
"MIT"
] | null | null | null | jw/gen.py | JoonSeongLee/dss7-coupon | b2d01fbdfce10bca56b0339fca7e7dff7a1feb4f | [
"MIT"
] | null | null | null | from ml_config import *
def coupon():
return pd.read_csv('../data/coupon_list_train.csv',memory_map=True,index_col=0)
def user():
return pd.read_csv('../data/user_list.csv',memory_map=True,index_col=0)
def view(reset_index=True):
tmp = pd.read_csv('../data/coupon_visit_train.csv',memory_map=True,index_co... | 40.457627 | 166 | 0.675744 |
55dc8f19f49e6780409fa8bc177482ccb3308f38 | 10,933 | py | Python | scripts/irods/controller.py | mbwatson/irods | c242db4cb20155500767d76b62bcbc4d4032b6cf | [
"BSD-3-Clause"
] | null | null | null | scripts/irods/controller.py | mbwatson/irods | c242db4cb20155500767d76b62bcbc4d4032b6cf | [
"BSD-3-Clause"
] | null | null | null | scripts/irods/controller.py | mbwatson/irods | c242db4cb20155500767d76b62bcbc4d4032b6cf | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import contextlib
import copy
import glob
import itertools
import json
import logging
import os
import shutil
import socket
import subprocess
import sys
import tempfile
import time
import psutil
from . import six
from .configuration import IrodsConfig
from . import lib
from . imp... | 39.046429 | 113 | 0.566999 |
5c12afef44c982f639b868307af30835a3975140 | 800 | py | Python | test/config/metrics_test/trial.py | qfyin/nni | 59a1ccf8eba68b94974e84fc3834f38d851faf89 | [
"MIT"
] | 3 | 2021-01-05T07:41:58.000Z | 2021-01-11T02:08:01.000Z | test/config/metrics_test/trial.py | qfyin/nni | 59a1ccf8eba68b94974e84fc3834f38d851faf89 | [
"MIT"
] | 21 | 2020-11-13T19:01:01.000Z | 2022-02-27T09:12:51.000Z | test/config/metrics_test/trial.py | qfyin/nni | 59a1ccf8eba68b94974e84fc3834f38d851faf89 | [
"MIT"
] | 3 | 2019-01-02T06:15:50.000Z | 2019-01-30T14:31:20.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import time
import json
import argparse
import nni
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--dict_metrics", action='store_true')
args = parser.parse_args()
if args.dict_metrics:
... | 26.666667 | 62 | 0.67875 |
a3b027a36285a19096345675eaf5a8945f2b7f56 | 938 | py | Python | chainerrl/policies/mellowmax_policy.py | yuishihara/chainerrl | 74901712a8ed8207b9d526d3f45b04bf22996b8d | [
"MIT"
] | 18 | 2018-08-07T07:27:41.000Z | 2018-08-20T01:51:21.000Z | chainerrl/policies/mellowmax_policy.py | yuishihara/chainerrl | 74901712a8ed8207b9d526d3f45b04bf22996b8d | [
"MIT"
] | null | null | null | chainerrl/policies/mellowmax_policy.py | yuishihara/chainerrl | 74901712a8ed8207b9d526d3f45b04bf22996b8d | [
"MIT"
] | 2 | 2018-08-16T06:47:26.000Z | 2018-08-20T01:51:22.000Z | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
from logging import getLogger
import chainer
from chainerr... | 24.051282 | 70 | 0.715352 |
009a837286a5013b9cc3da2bb5e58d50e08c4d05 | 416 | py | Python | app.py | Wylarel/Graycraft | 8426c083875ad036d9b5efdf097643993757c8b1 | [
"Unlicense"
] | 1 | 2020-06-25T22:10:56.000Z | 2020-06-25T22:10:56.000Z | app.py | Wylarel/Graycraft | 8426c083875ad036d9b5efdf097643993757c8b1 | [
"Unlicense"
] | null | null | null | app.py | Wylarel/Graycraft | 8426c083875ad036d9b5efdf097643993757c8b1 | [
"Unlicense"
] | null | null | null | from PIL import Image
import os
files = []
print("Listing files . . .")
for r, d, f in os.walk('assets\\minecraft\\textures\\'):
for file in f:
if file.endswith(".png"):
files.append(os.path.join(r, file))
max = len(files)
for f in files:
print("Editing file - " + str(files.index(f)) + "/... | 24.470588 | 95 | 0.560096 |
9b85095faba65aec92c47c52048c4e63c4066ca1 | 683 | py | Python | app/core/migrations/0002_tag.py | rahulnegi20/recipie-api | 9e99d3c6803fe87cb64eae6980e9e0817f643f5f | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | rahulnegi20/recipie-api | 9e99d3c6803fe87cb64eae6980e9e0817f643f5f | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | rahulnegi20/recipie-api | 9e99d3c6803fe87cb64eae6980e9e0817f643f5f | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-04-23 14:29
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 28.458333 | 118 | 0.616398 |
6d447a4935e49cd3c4f7525fff6ffe5e9883656e | 6,290 | py | Python | youtube_dl/extractor/myvideo.py | LyleH/youtube-dl | 7564b09ef5c09454908f78cb91c3bd2d6daacac5 | [
"Unlicense"
] | 10 | 2020-05-29T03:20:03.000Z | 2022-03-29T01:05:20.000Z | youtube_dl/extractor/myvideo.py | huyangfeng/youtobedl | 7b0d1c28597bd38567e5b4e853f669a5a601c6e8 | [
"Unlicense"
] | 1 | 2016-05-18T01:27:28.000Z | 2016-05-18T05:00:36.000Z | PythonSamples/library/files/lib/python2.7/site-packages/youtube_dl/extractor/myvideo.py | jianglei12138/python2.7 | 280aa96d8cac98c03ca8c8ed71541f7ff7817055 | [
"PSF-2.0"
] | 9 | 2020-05-29T03:21:02.000Z | 2021-04-14T03:26:05.000Z | from __future__ import unicode_literals
import binascii
import base64
import hashlib
import re
import json
from .common import InfoExtractor
from ..compat import (
compat_ord,
compat_urllib_parse_unquote,
compat_urllib_parse_urlencode,
)
from ..utils import (
ExtractorError,
sanitized_Request,
)
... | 35.337079 | 111 | 0.534817 |
19ef09f81223f3148d0f8f0b8499e1f88648ab74 | 7,826 | py | Python | now/utils/bytecode/interpreter.py | CrystalMei/Prov_Build | 695576c36b7d5615f1cc568954658f8a7ce9eeba | [
"MIT"
] | 2 | 2017-11-10T16:17:11.000Z | 2021-12-19T18:43:22.000Z | now/utils/bytecode/interpreter.py | CrystalMei/Prov_Build | 695576c36b7d5615f1cc568954658f8a7ce9eeba | [
"MIT"
] | null | null | null | now/utils/bytecode/interpreter.py | CrystalMei/Prov_Build | 695576c36b7d5615f1cc568954658f8a7ce9eeba | [
"MIT"
] | null | null | null | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# Copyright (c) 2018, 2019, 2020 President and Fellows of Harvard College.
# This file is part of ProvBuild.
"""Define bytecode interpreter that supports iteration on bytecode"""
from __future_... | 31.179283 | 127 | 0.601712 |
27d0bad42c5319ba47386fd6a2b906d7a62e3027 | 36,329 | py | Python | aiida/backends/tests/restapi.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | 1 | 2019-04-29T12:39:31.000Z | 2019-04-29T12:39:31.000Z | aiida/backends/tests/restapi.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/restapi.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 42.490058 | 1,120 | 0.535027 |
45be6a79f8aeb3147ee92fc1b7dde3b9dd21bc32 | 7,075 | py | Python | tests/test_formats.py | bzinberg/jupytext | 219dc18740c0277aaf49ef65e2b7a7ac507d5085 | [
"MIT"
] | 1 | 2020-09-10T13:16:03.000Z | 2020-09-10T13:16:03.000Z | tests/test_formats.py | urbach/jupytext | 6d3a38505ae539975085f9d5b4e457c9566a7977 | [
"MIT"
] | null | null | null | tests/test_formats.py | urbach/jupytext | 6d3a38505ae539975085f9d5b4e457c9566a7977 | [
"MIT"
] | null | null | null | import pytest
from testfixtures import compare
from nbformat.v4.nbbase import new_notebook
import jupytext
from jupytext.formats import guess_format, divine_format, read_format_from_metadata, rearrange_jupytext_metadata
from jupytext.formats import long_form_multiple_formats, short_form_multiple_formats, update_jupytex... | 34.681373 | 118 | 0.646502 |
d9161d5c5935873264138e0df1a6aa7b2631ce3e | 195 | py | Python | jobs/views.py | safuente/santiago-alvarez-cv | 01193bb32e14c2f54483f04e669d113b50bcb731 | [
"MIT"
] | null | null | null | jobs/views.py | safuente/santiago-alvarez-cv | 01193bb32e14c2f54483f04e669d113b50bcb731 | [
"MIT"
] | null | null | null | jobs/views.py | safuente/santiago-alvarez-cv | 01193bb32e14c2f54483f04e669d113b50bcb731 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Job
def home(request):
jobs = Job.objects.all()
context = {'jobs': jobs}
return render(request, 'jobs/home.html', context)
| 17.727273 | 53 | 0.687179 |
f6d65c62d3731ff69a00c46dbd147b42c7e01eb2 | 4,547 | py | Python | packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class YAxis(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.xaxis.rangeslider"
_path_str = "layout.xaxis.rangeslider.yaxis"
_valid_props = {"ra... | 31.143836 | 84 | 0.550913 |
263450e786ad4556ed719387576f213c6877a59e | 3,391 | py | Python | papers/4318-2020-Stonehouse/Examples/CreditRisk.py | andybouts/sas-global-forum-2020 | b73f8672ec5395e2afa21b8a738802f7f25e09e8 | [
"Apache-2.0"
] | 30 | 2020-01-17T19:46:09.000Z | 2022-03-16T08:01:59.000Z | papers/4318-2020-Stonehouse/Examples/CreditRisk.py | andybouts/sas-global-forum-2020 | b73f8672ec5395e2afa21b8a738802f7f25e09e8 | [
"Apache-2.0"
] | 6 | 2020-02-11T17:04:40.000Z | 2020-11-03T17:04:37.000Z | papers/4318-2020-Stonehouse/Examples/CreditRisk.py | andybouts/sas-global-forum-2020 | b73f8672ec5395e2afa21b8a738802f7f25e09e8 | [
"Apache-2.0"
] | 70 | 2020-01-16T15:06:56.000Z | 2022-03-22T21:54:37.000Z | #%% Import packages
import swat
import pandas as pd
import os
from sys import platform
import riskpy
from os.path import join as path
#%% 1a. Start the CAS session
if "CASHOST" in os.environ:
# Create a session to the CASHOST and CASPORT variables set in your environment
conn = riskpy.SessionContext(session=sw... | 33.91 | 83 | 0.676792 |
10d9e64eb4f4dbc76b806256db1ed7c7ce45e4d9 | 1,710 | py | Python | forklog.py | z00k0/scrape | ddf49c3ce6a165bfe8099db187e605ac2a6b5754 | [
"MIT"
] | null | null | null | forklog.py | z00k0/scrape | ddf49c3ce6a165bfe8099db187e605ac2a6b5754 | [
"MIT"
] | null | null | null | forklog.py | z00k0/scrape | ddf49c3ce6a165bfe8099db187e605ac2a6b5754 | [
"MIT"
] | null | null | null | import requests
import codecs
import json
import re
import logging
from bs4 import BeautifulSoup
logging.basicConfig(
level=logging.DEBUG,
filename='forklog.log',
format='%(asctime)s %(levelname)s:%(message)s'
)
session = requests.Session()
url = "https://forklog.com/news/"
resp = sessi... | 28.032787 | 96 | 0.615205 |
1f1ba2ca6c4e40ffea83e4b88fd154cc076a042c | 7,246 | py | Python | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | null | null | null | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 1 | 2021-12-18T20:01:22.000Z | 2021-12-18T20:01:22.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.757143 | 301 | 0.664781 |
d14992d32d65ff2f475effd22bdbff3381006d35 | 5,684 | py | Python | src/openfermion/hamiltonians/_chemical_series.py | josh146/OpenFermion | e64c17a8043b2ad0a60695b581293bf903ad91a3 | [
"Apache-2.0"
] | 3 | 2018-08-03T22:48:47.000Z | 2022-02-10T15:05:35.000Z | src/openfermion/hamiltonians/_chemical_series.py | josh146/OpenFermion | e64c17a8043b2ad0a60695b581293bf903ad91a3 | [
"Apache-2.0"
] | null | null | null | src/openfermion/hamiltonians/_chemical_series.py | josh146/OpenFermion | e64c17a8043b2ad0a60695b581293bf903ad91a3 | [
"Apache-2.0"
] | 1 | 2019-09-02T00:50:58.000Z | 2019-09-02T00:50:58.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distribu... | 36.670968 | 77 | 0.612597 |
2b265b05366ffe8ccf9b9b2383d96614f8d958ed | 13,258 | py | Python | airflow/jobs/local_task_job.py | kanga333/airflow | 7864693e43c40fd8f0914c05f7e196a007d16d50 | [
"Apache-2.0"
] | null | null | null | airflow/jobs/local_task_job.py | kanga333/airflow | 7864693e43c40fd8f0914c05f7e196a007d16d50 | [
"Apache-2.0"
] | null | null | null | airflow/jobs/local_task_job.py | kanga333/airflow | 7864693e43c40fd8f0914c05f7e196a007d16d50 | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 42.49359 | 109 | 0.628451 |
92a2e34b4d6f7c5a9b54f1bfb5bae3c7b1a1e3b5 | 1,015 | py | Python | cfgov/privacy/views.py | chosak/consumerfinance.gov | 2007ac860ec7dfff0f94517f1a69e75299b97d20 | [
"CC0-1.0"
] | null | null | null | cfgov/privacy/views.py | chosak/consumerfinance.gov | 2007ac860ec7dfff0f94517f1a69e75299b97d20 | [
"CC0-1.0"
] | null | null | null | cfgov/privacy/views.py | chosak/consumerfinance.gov | 2007ac860ec7dfff0f94517f1a69e75299b97d20 | [
"CC0-1.0"
] | null | null | null | from django.urls import reverse_lazy
from django.views.generic import FormView
from privacy.forms import DisclosureConsentForm, RecordsAccessForm
class GetDisclosureConsentForm(FormView):
template_name = 'privacy/disclosure-consent-form.html'
form_class = DisclosureConsentForm
success_url = reverse_lazy(... | 35 | 69 | 0.742857 |
65b806e759da9379dce56808582d41124e893662 | 3,720 | py | Python | sdks/python/appcenter_sdk/models/CrashCounts.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/CrashCounts.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/CrashCounts.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class CrashCounts(ob... | 26.76259 | 80 | 0.554839 |
a788afd153714f27468fe8e9e4adb2823b940b99 | 8,673 | py | Python | spyder/plugins/editor/widgets/tests/test_codeeditor.py | mirazakon/spyder | c322d46af16a30aba089788a59a4e7db00ffb83f | [
"MIT"
] | 3 | 2019-09-27T21:00:00.000Z | 2021-03-07T23:28:32.000Z | spyder/plugins/editor/widgets/tests/test_codeeditor.py | mirazakon/spyder | c322d46af16a30aba089788a59a4e7db00ffb83f | [
"MIT"
] | 3 | 2020-10-13T21:15:23.000Z | 2020-10-13T21:15:24.000Z | spyder/plugins/editor/widgets/tests/test_codeeditor.py | mirazakon/spyder | c322d46af16a30aba089788a59a4e7db00ffb83f | [
"MIT"
] | 2 | 2021-04-30T01:18:22.000Z | 2021-09-19T06:31:42.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
#
# Third party imports
from qtpy.QtCore import Qt, QEvent
from qtpy.QtGui import QFont, QTextCursor, QMouseEvent
from pytestqt import qtbot
import pytest
# Local imports
from spyder.plugins.editor.widget... | 32.241636 | 81 | 0.536608 |
5d9de42d00130c0a9b14f4a73eccefb245e96eef | 2,969 | py | Python | dataloaders/data_writer_seq.py | zhxtu/ours_video | 2762501e4d3795872ffabc49fa3c73fdde10af8b | [
"MIT"
] | null | null | null | dataloaders/data_writer_seq.py | zhxtu/ours_video | 2762501e4d3795872ffabc49fa3c73fdde10af8b | [
"MIT"
] | null | null | null | dataloaders/data_writer_seq.py | zhxtu/ours_video | 2762501e4d3795872ffabc49fa3c73fdde10af8b | [
"MIT"
] | null | null | null | import os
from glob import glob
import random
# import numpy as np
image_root= '/hdd2/zy/Dataset/ThermalData/'
train_image_list=glob(os.path.join(image_root, 'Img8bit', 'train', '*', '*.bmp'))
# valinfo=open('/hdd2/zy/Dataset/ThermalData/val.txt','w')
# val_image_list=glob(os.path.join(image_root, 'Img8bit', 'val', '*... | 45.676923 | 121 | 0.607949 |
b069b3750b0ad84cc2ef7484fb6b0714c154e66d | 15,386 | py | Python | lib/pygments/lexers/shell.py | neelie/sublime-evernote | 05d82a919cab4b01f5a10c0566b8b487a149b443 | [
"MIT"
] | null | null | null | lib/pygments/lexers/shell.py | neelie/sublime-evernote | 05d82a919cab4b01f5a10c0566b8b487a149b443 | [
"MIT"
] | null | null | null | lib/pygments/lexers/shell.py | neelie/sublime-evernote | 05d82a919cab4b01f5a10c0566b8b487a149b443 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.lexers.shell
~~~~~~~~~~~~~~~~~~~~~
Lexers for various shells.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, inclu... | 36.202353 | 84 | 0.472962 |
e5ab6f8b395707df749ca2fb722820e46a690f9f | 418 | py | Python | airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/constants.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 6,215 | 2020-09-21T13:45:56.000Z | 2022-03-31T21:21:45.000Z | airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/constants.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 8,448 | 2020-09-21T00:43:50.000Z | 2022-03-31T23:56:06.000Z | airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/constants.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 1,251 | 2020-09-20T05:48:47.000Z | 2022-03-31T10:41:29.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from enum import Enum
class AmazonAdsRegion(str, Enum):
NA = "NA"
EU = "EU"
FE = "FE"
SANDBOX = "SANDBOX"
URL_MAPPING = {
"NA": "https://advertising-api.amazon.com/",
"EU": "https://advertising-api-eu.amazon.com/",
"FE": "http... | 19.904762 | 58 | 0.61244 |
d67cea65b0eec34217058de9fda3352cf77f207f | 9,523 | py | Python | neutron/conf/common.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/conf/common.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/conf/common.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 50.925134 | 79 | 0.587735 |
6df59ee8696978d160f0003c99eee4bd7d579b4c | 7,286 | py | Python | core/main.py | cmdrcryme/robophiz | c9db8816f323a5071e72d5b68c2c24534f7f76f5 | [
"Unlicense"
] | 2 | 2016-10-22T20:45:57.000Z | 2017-08-06T20:35:43.000Z | core/main.py | cmdrcryme/robophiz | c9db8816f323a5071e72d5b68c2c24534f7f76f5 | [
"Unlicense"
] | 9 | 2015-01-12T21:33:24.000Z | 2018-04-02T15:59:22.000Z | core/main.py | cmdrcryme/robophiz | c9db8816f323a5071e72d5b68c2c24534f7f76f5 | [
"Unlicense"
] | 1 | 2017-08-01T22:13:33.000Z | 2017-08-01T22:13:33.000Z | from __future__ import print_function
from builtins import str
from builtins import range
from builtins import object
import re
import _thread
import traceback
from queue import Queue
from future.builtins import str
_thread.stack_size(1024 * 512) # reduce vm size
class Input(dict):
def __init__(self, conn, raw... | 29.738776 | 79 | 0.551194 |
d228d237498a27006e3d521dbba68191ca8f0154 | 3,653 | py | Python | backend/api/api/settings/base.py | lanoir42/makefeeconverge | 61456d581a415257ebeb6b1d102820a164ded913 | [
"MIT"
] | null | null | null | backend/api/api/settings/base.py | lanoir42/makefeeconverge | 61456d581a415257ebeb6b1d102820a164ded913 | [
"MIT"
] | 5 | 2022-03-04T14:53:43.000Z | 2022-03-21T00:00:28.000Z | backend/api/api/settings/base.py | lanoir42/makefeeconverge | 61456d581a415257ebeb6b1d102820a164ded913 | [
"MIT"
] | null | null | null | """
Django settings for api project.
Generated by 'django-admin startproject' using Django 4.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
import os
from pa... | 26.471014 | 91 | 0.68738 |
d7bd1acf1376deb1879adda0d40cf20d611d057f | 739 | py | Python | tests/factories.py | Anioko/reusable-cms | 52e2a2f11a92c596bd13812d5fd14dffdcdcaa7f | [
"MIT"
] | null | null | null | tests/factories.py | Anioko/reusable-cms | 52e2a2f11a92c596bd13812d5fd14dffdcdcaa7f | [
"MIT"
] | 122 | 2020-12-31T06:31:11.000Z | 2022-03-18T14:12:03.000Z | tests/factories.py | Anioko/reusable-cms | 52e2a2f11a92c596bd13812d5fd14dffdcdcaa7f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Factories to help in tests."""
from factory import PostGenerationMethodCall, Sequence
from factory.alchemy import SQLAlchemyModelFactory
from mycms.database import db
from mycms.user.models import User
class BaseFactory(SQLAlchemyModelFactory):
"""Base factory."""
class Meta:
... | 23.09375 | 66 | 0.67659 |
1eb972e0bf64dc564da65cb1e397d2e0f96ffb6f | 2,017 | py | Python | e2e/tests/api_tests.py | NHSDigital/canary-api | 21ea101fd6034d24fd0fcd0b5b58a4a9dce0b094 | [
"MIT"
] | null | null | null | e2e/tests/api_tests.py | NHSDigital/canary-api | 21ea101fd6034d24fd0fcd0b5b58a4a9dce0b094 | [
"MIT"
] | 94 | 2020-12-15T10:32:59.000Z | 2022-03-29T13:08:29.000Z | e2e/tests/api_tests.py | NHSDigital/canary-api | 21ea101fd6034d24fd0fcd0b5b58a4a9dce0b094 | [
"MIT"
] | 1 | 2021-04-11T07:32:07.000Z | 2021-04-11T07:32:07.000Z | import pytest
import os
from aiohttp import ClientResponse
from api_test_utils import env
from api_test_utils import poll_until
from api_test_utils.api_session_client import APISessionClient
from api_test_utils.api_test_session_config import APITestSessionConfig
@pytest.mark.smoketest
@pytest.mark.asyncio
async def t... | 30.104478 | 165 | 0.728805 |
c0d550f84dc20abb960b19f7e1f08e7280310977 | 5,537 | py | Python | torch/fx/experimental/fx_acc/acc_utils.py | rraminen/pytorch | f7d5d02a1d873ef61b10186225704b2b283a989a | [
"Intel"
] | 1 | 2021-10-16T17:44:47.000Z | 2021-10-16T17:44:47.000Z | torch/fx/experimental/fx_acc/acc_utils.py | rraminen/pytorch | f7d5d02a1d873ef61b10186225704b2b283a989a | [
"Intel"
] | null | null | null | torch/fx/experimental/fx_acc/acc_utils.py | rraminen/pytorch | f7d5d02a1d873ef61b10186225704b2b283a989a | [
"Intel"
] | 1 | 2022-01-19T10:55:49.000Z | 2022-01-19T10:55:49.000Z | import inspect
import json
import os
from typing import Any, Tuple, Callable, Union, Dict, List, Optional
import re
import torch
import torch.fx
from torch.fx.passes.graph_manipulation import (
serialize_module,
)
from torch.fx.graph_module import GraphModule
from torch.fx.node import _get_qualified_name
from torc... | 34.60625 | 87 | 0.668774 |
3a4cc5653528cdab1d3e19ad1d2885de35285add | 4,083 | py | Python | test/functional/feature_includeconf.py | DiniMuhd7/asusucoin | a28c442369571bc0280a84a686e00e7dffd91064 | [
"MIT"
] | null | null | null | test/functional/feature_includeconf.py | DiniMuhd7/asusucoin | a28c442369571bc0280a84a686e00e7dffd91064 | [
"MIT"
] | null | null | null | test/functional/feature_includeconf.py | DiniMuhd7/asusucoin | a28c442369571bc0280a84a686e00e7dffd91064 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Tests the includeconf argument
Verify that:
1. adding includeconf to the configuration file causes the inc... | 49.192771 | 224 | 0.694832 |
3762c72cc883b57cb898d81c9aa212f4240fa138 | 19,940 | py | Python | sphinx/pycode/parser.py | BroadbandForum/sphinx | 93d6b1bbc67fc588e70bdab51252f7752b810f11 | [
"BSD-2-Clause"
] | 1 | 2021-06-29T13:05:19.000Z | 2021-06-29T13:05:19.000Z | sphinx/pycode/parser.py | BroadbandForum/sphinx | 93d6b1bbc67fc588e70bdab51252f7752b810f11 | [
"BSD-2-Clause"
] | 2 | 2022-02-13T19:49:39.000Z | 2022-03-02T09:52:35.000Z | sphinx/pycode/parser.py | hixio-mh/sphinx | ba1450b25ea38fad42058d6a677201179002b9a2 | [
"BSD-2-Clause"
] | null | null | null | """
sphinx.pycode.parser
~~~~~~~~~~~~~~~~~~~~
Utilities parsing and analyzing Python code.
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import inspect
import itertools
import re
import sys
import tokenize
from token import NAME, NEWLI... | 36.789668 | 117 | 0.574774 |
5e867f41830adccdb61087457111ad833032e5a7 | 1,109 | py | Python | multitest_transport/plugins/__init__.py | maksonlee/multitest_transport | 9c20a48ac856307950a204854f52be7335705054 | [
"Apache-2.0"
] | null | null | null | multitest_transport/plugins/__init__.py | maksonlee/multitest_transport | 9c20a48ac856307950a204854f52be7335705054 | [
"Apache-2.0"
] | null | null | null | multitest_transport/plugins/__init__.py | maksonlee/multitest_transport | 9c20a48ac856307950a204854f52be7335705054 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.805556 | 74 | 0.724977 |
e241536411fb2b06bfeaa8c885717fc6c67b7c92 | 163 | py | Python | tapioca_qualys_was/__init__.py | siteblindado/tapioca-qualys-was | c6a76469065f6fead4b0c8444885589eb5d21730 | [
"MIT"
] | null | null | null | tapioca_qualys_was/__init__.py | siteblindado/tapioca-qualys-was | c6a76469065f6fead4b0c8444885589eb5d21730 | [
"MIT"
] | 4 | 2020-03-24T17:14:26.000Z | 2021-06-02T00:10:18.000Z | tapioca_qualys_was/__init__.py | siteblindado/tapioca-qualys-was | c6a76469065f6fead4b0c8444885589eb5d21730 | [
"MIT"
] | null | null | null | # coding: utf-8
__author__ = 'Site Blindado S.A.'
__email__ = 'dev@siteblindado.com.br'
__version__ = '0.10'
from .tapioca_qualys_was import Qualys_was # noqa
| 18.111111 | 50 | 0.730061 |
ec3a459238bb18aa6f7195722fa3c1df374e336d | 6,139 | py | Python | venv/lib/python3.5/site-packages/airflow/contrib/operators/gcs_to_bq.py | mesodiar/bello-airflow | afede57f214774b50e6a4c083ca096ca2c060d31 | [
"MIT"
] | 1 | 2021-04-05T11:25:36.000Z | 2021-04-05T11:25:36.000Z | airflow/contrib/operators/gcs_to_bq.py | fvlankvelt/airflow | 6cbe4a475f773bf32e1d7743718f7ae1a7dd9c91 | [
"Apache-2.0"
] | null | null | null | airflow/contrib/operators/gcs_to_bq.py | fvlankvelt/airflow | 6cbe4a475f773bf32e1d7743718f7ae1a7dd9c91 | [
"Apache-2.0"
] | 1 | 2019-12-12T06:44:14.000Z | 2019-12-12T06:44:14.000Z | import json
import logging
from airflow.contrib.hooks.gcs_hook import GoogleCloudStorageHook
from airflow.contrib.hooks.bigquery_hook import BigQueryHook
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
class GoogleCloudStorageToBigQueryOperator(BaseOperator):
"""
Lo... | 47.960938 | 132 | 0.6892 |
bb7e0b7352545272ee9fee7da596c09b0c14a9f1 | 183 | py | Python | Archive/LookingForEigenvalues.py | fikrinotes/PowerfulPython | 85b4f09ef9faeecaa42e5214accda4ff07021cd7 | [
"MIT"
] | 1 | 2021-09-18T09:30:47.000Z | 2021-09-18T09:30:47.000Z | Archive/LookingForEigenvalues.py | fikrinotes/PowerfulPython | 85b4f09ef9faeecaa42e5214accda4ff07021cd7 | [
"MIT"
] | null | null | null | Archive/LookingForEigenvalues.py | fikrinotes/PowerfulPython | 85b4f09ef9faeecaa42e5214accda4ff07021cd7 | [
"MIT"
] | null | null | null | import numpy as np
A=np.array([[1,3],[-1,5]])
c=np.linalg.det(A)
d=np.linalg.inv(A)
b=np.linalg.eigvals(A)
print('Eigenvalues=',b)
print('determinant=',c)
print('inverseA:')
print(d)
| 18.3 | 26 | 0.672131 |
a3e999755a6e9001f39e06f6a03c124152f969a7 | 285 | py | Python | code/tmp_rtrip/test/encoded_modules/__init__.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | 24 | 2018-01-23T05:28:40.000Z | 2021-04-13T20:52:59.000Z | code/tmp_rtrip/test/encoded_modules/__init__.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | 17 | 2017-12-21T18:32:31.000Z | 2018-12-18T17:09:50.000Z | code/tmp_rtrip/test/encoded_modules/__init__.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | null | null | null | test_strings = ('iso_8859_1', 'iso-8859-1',
"Les hommes ont oublié cette vérité, dit le renard. Mais tu ne dois pas l'oublier. Tu deviens responsable pour toujours de ce que tu as apprivoisé."
), ('koi8_r', 'koi8-r',
'Познание бесконечности требует бесконечного времени.')
| 57 | 152 | 0.715789 |
df8e270547a929ed57a2b10d5a6de26816575a37 | 1,474 | py | Python | sample/qiskit_cuccaro.py | gines-carrascal/jupyter-qiskit | cb831e0defb23e670a3c56cee36eb2138af5998f | [
"Apache-2.0"
] | 1 | 2020-04-19T17:21:24.000Z | 2020-04-19T17:21:24.000Z | sample/qiskit_cuccaro.py | gines-carrascal/jupyter-qiskit | cb831e0defb23e670a3c56cee36eb2138af5998f | [
"Apache-2.0"
] | null | null | null | sample/qiskit_cuccaro.py | gines-carrascal/jupyter-qiskit | cb831e0defb23e670a3c56cee36eb2138af5998f | [
"Apache-2.0"
] | null | null | null | from qiskit import ClassicalRegister, QuantumRegister
from qiskit import QuantumCircuit
from qiskit import execute
from qiskit import Aer
sumando_1 = input("Primer sumando en binario (4 bits)")
sumando_2 = input("Segundo sumando en binario(4 bits)")
n = 4
a = QuantumRegister(n,"a")
b = QuantumRegister(n+1, "b")
c = ... | 19.394737 | 55 | 0.566486 |
d6cad9210b593b3a7884fc6f1dec0230b3e5962d | 315 | py | Python | pytest_django_test/settings_mysql_innodb.py | garyd203/pytest-django | 5c91295c5818f275c5e8e92e6e24391a85c6b854 | [
"BSD-3-Clause"
] | 1 | 2020-02-20T12:31:02.000Z | 2020-02-20T12:31:02.000Z | pytest_django_test/settings_mysql_innodb.py | garyd203/pytest-django | 5c91295c5818f275c5e8e92e6e24391a85c6b854 | [
"BSD-3-Clause"
] | null | null | null | pytest_django_test/settings_mysql_innodb.py | garyd203/pytest-django | 5c91295c5818f275c5e8e92e6e24391a85c6b854 | [
"BSD-3-Clause"
] | null | null | null | from .settings_base import * # noqa: F403
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "pytest_django" + db_suffix, # noqa: F405
"HOST": "localhost",
"USER": "root",
"OPTIONS": {"init_command": "SET default_storage_engine=InnoDB"},
}
}
| 26.25 | 73 | 0.568254 |
c6d54e848ec728627117e7346264dcbe45ffb951 | 6,516 | py | Python | chempy/kinetics/_native.py | bertiewooster/chempy | 115adc1d570aa1631baff4374f3128ce23fa7776 | [
"BSD-2-Clause"
] | 340 | 2015-10-30T03:41:05.000Z | 2022-03-31T05:01:17.000Z | chempy/kinetics/_native.py | bertiewooster/chempy | 115adc1d570aa1631baff4374f3128ce23fa7776 | [
"BSD-2-Clause"
] | 80 | 2015-11-03T13:31:23.000Z | 2022-03-31T16:46:19.000Z | chempy/kinetics/_native.py | bertiewooster/chempy | 115adc1d570aa1631baff4374f3128ce23fa7776 | [
"BSD-2-Clause"
] | 75 | 2016-06-06T19:55:48.000Z | 2022-03-19T23:39:13.000Z | # -*- coding: utf-8 -*-
"""
Non-public API (expect changes without notice).
Helper functions for using native code generation together with pyodesys.
"""
from collections import OrderedDict
try:
from pyodesys.native import native_sys
except ImportError:
native_sys = None
PartiallySolvedSystem = None
... | 35.606557 | 163 | 0.596378 |
12ec335ac4c5f2101234592883cbfdbe388ecee8 | 12,193 | py | Python | app/Controllers/UsersController.py | huaSoftware/easy-flask-json-mvc-socketio | d6aec4b3e610b4cc04c1650801a061c8fb92030e | [
"Apache-2.0"
] | 1 | 2019-12-11T01:26:00.000Z | 2019-12-11T01:26:00.000Z | app/Controllers/UsersController.py | huaSoftware/easy-flask-json-mvc-socketio | d6aec4b3e610b4cc04c1650801a061c8fb92030e | [
"Apache-2.0"
] | null | null | null | app/Controllers/UsersController.py | huaSoftware/easy-flask-json-mvc-socketio | d6aec4b3e610b4cc04c1650801a061c8fb92030e | [
"Apache-2.0"
] | null | null | null | '''
@Author: hua
@Date: 2018-08-30 10:52:23
@LastEditors: hua
@LastEditTime: 2019-12-03 14:13:31
'''
from app import app
from app.Controllers.BaseController import BaseController
from app.Vendor.Utils import Utils
from app.Models.Users import Users
from app.Models.Suggest import Suggest
from app.Models.Comments import ... | 29.239808 | 104 | 0.466743 |
759d43875fa3590b078f1e9b4ad53bef56645efa | 365 | py | Python | yatube/posts/migrations/0003_auto_20200207_1245.py | ashowlsky/yatube_subdomain | c15782caec647936f252e41bd54df5a62e9922d6 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0003_auto_20200207_1245.py | ashowlsky/yatube_subdomain | c15782caec647936f252e41bd54df5a62e9922d6 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0003_auto_20200207_1245.py | ashowlsky/yatube_subdomain | c15782caec647936f252e41bd54df5a62e9922d6 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-02-07 09:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('posts', '0002_auto_20200204_2115'),
]
operations = [
migrations.AlterField(
model_name='post',
name='text',
... | 19.210526 | 45 | 0.580822 |
a3c844d939edf1851abb54d5256b9c31c7ca9450 | 2,892 | py | Python | release/stubs.min/System/Windows/Forms/__init___parts/ToolStripPanelRenderEventHandler.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/System/Windows/Forms/__init___parts/ToolStripPanelRenderEventHandler.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/System/Windows/Forms/__init___parts/ToolStripPanelRenderEventHandler.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class ToolStripPanelRenderEventHandler(MulticastDelegate,ICloneable,ISerializable):
"""
Represents the method that will handle System.Windows.Forms.ToolStripPanel paint events.
ToolStripPanelRenderEventHandler(object: object,method: IntPtr)
"""
def BeginInvoke(self,sender,e,callback,object):
""" Beg... | 30.442105 | 215 | 0.723721 |
54714864dc054d586aa0265f930b754ab2d95de8 | 113,943 | py | Python | test/orm/test_froms.py | randallk/sqlalchemy | d8ac1e9e6bfc931d2f14f9846d6924106f56b7e6 | [
"MIT"
] | null | null | null | test/orm/test_froms.py | randallk/sqlalchemy | d8ac1e9e6bfc931d2f14f9846d6924106f56b7e6 | [
"MIT"
] | null | null | null | test/orm/test_froms.py | randallk/sqlalchemy | d8ac1e9e6bfc931d2f14f9846d6924106f56b7e6 | [
"MIT"
] | null | null | null | import sqlalchemy as sa
from sqlalchemy import and_
from sqlalchemy import asc
from sqlalchemy import cast
from sqlalchemy import desc
from sqlalchemy import exc as sa_exc
from sqlalchemy import exists
from sqlalchemy import ForeignKey
from sqlalchemy import func
from sqlalchemy import Integer
from sqlalchemy import li... | 31.979512 | 79 | 0.468559 |
a0f536df8662e21fa2b830dc2f08d2252a0fa37e | 5,691 | py | Python | filesdb/read_bigquery.py | remram44/filesdb | 3f8a6f3edbb0763489a563f6165ffb4f2d26362d | [
"MIT"
] | 3 | 2019-03-16T03:16:13.000Z | 2020-07-13T01:53:19.000Z | filesdb/read_bigquery.py | ViDA-NYU/filesdb | 3f8a6f3edbb0763489a563f6165ffb4f2d26362d | [
"MIT"
] | 8 | 2019-01-03T17:16:03.000Z | 2019-01-04T20:06:31.000Z | filesdb/read_bigquery.py | VIDA-NYU/filesdb | 8d978feba1f9040d736c60250be971e807d0aca5 | [
"MIT"
] | null | null | null | """Get projects, versions, and downloads from BigQuery data.
The most reliable source of information for PyPI is now on Google BigQuery. It
is the only way to get recent updates, bulk data, and some fields like download
counts.
This script allows you to import a CSV exported from BigQuery into the
database.
Use this... | 29.184615 | 114 | 0.537867 |
8dfd8a5070ec05a32a6e15feb9a3235428cbaf13 | 2,846 | py | Python | venv/lib/python3.7/site-packages/nltk/corpus/reader/nps_chat.py | VighneshHarihar/Newsify | 321f5f65bb6983c0ca5a3864900b27ce36a32717 | [
"MIT"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | venv/lib/python3.7/site-packages/nltk/corpus/reader/nps_chat.py | VighneshHarihar/Newsify | 321f5f65bb6983c0ca5a3864900b27ce36a32717 | [
"MIT"
] | 37 | 2020-10-20T08:30:53.000Z | 2020-12-22T13:15:45.000Z | venv/lib/python3.7/site-packages/nltk/corpus/reader/nps_chat.py | VighneshHarihar/Newsify | 321f5f65bb6983c0ca5a3864900b27ce36a32717 | [
"MIT"
] | 7 | 2015-09-30T03:00:44.000Z | 2021-06-04T05:34:39.000Z | # Natural Language Toolkit: NPS Chat Corpus Reader
#
# Copyright (C) 2001-2020 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
import re
import textwrap
from nltk.util import LazyConcatenation
from nltk.internals import ElementWrapper
from n... | 30.934783 | 84 | 0.590654 |
1ca6d6eecf4e8b46a67201b0f04f0f26600ff7b9 | 2,413 | py | Python | gameOfLife/Models/gridItem.py | Jack-Dane/Game-of-Life | ee3387e56f022f1d3cc84699635f68a4015f61fa | [
"MIT"
] | null | null | null | gameOfLife/Models/gridItem.py | Jack-Dane/Game-of-Life | ee3387e56f022f1d3cc84699635f68a4015f61fa | [
"MIT"
] | null | null | null | gameOfLife/Models/gridItem.py | Jack-Dane/Game-of-Life | ee3387e56f022f1d3cc84699635f68a4015f61fa | [
"MIT"
] | null | null | null |
from gameOfLife.Observers.subject import Subject
class GridItem(Subject):
def __init__(self, x, y):
super(GridItem, self).__init__()
self.x = x
self.y = y
self.active = False
self.nextIteration = False
def __str__(self):
return "1" if self.active else "0"
... | 27.735632 | 86 | 0.599254 |
74f2f92413bcc01ee8210ec1fb670b69f37c235a | 1,248 | py | Python | experiments/2014-03-21-interp-GPSS-orig.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 151 | 2015-01-09T19:25:05.000Z | 2022-01-05T02:05:52.000Z | experiments/2014-03-21-interp-GPSS-orig.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 1 | 2016-08-04T13:12:51.000Z | 2016-08-04T13:12:51.000Z | experiments/2014-03-21-interp-GPSS-orig.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 59 | 2015-02-04T19:13:58.000Z | 2021-07-28T23:36:09.000Z | Experiment(description='GPSS interpolation experiment',
data_dir='../data/tsdlr_5050/',
max_depth=10,
random_order=False,
k=1,
debug=False,
local_computation=False,
n_rand=9,
sd=2,
jitter_sd=0.1,
max_jobs=4... | 36.705882 | 92 | 0.471154 |
a48f2194126b073f9303517415078f5ca13f96ad | 101 | py | Python | src/pmt_hostel_app/apps.py | hygull/p-host | d310479ce4ca9946bf0bff43fbb527c36c18728b | [
"MIT"
] | null | null | null | src/pmt_hostel_app/apps.py | hygull/p-host | d310479ce4ca9946bf0bff43fbb527c36c18728b | [
"MIT"
] | null | null | null | src/pmt_hostel_app/apps.py | hygull/p-host | d310479ce4ca9946bf0bff43fbb527c36c18728b | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class PmtHostelAppConfig(AppConfig):
name = 'pmt_hostel_app'
| 16.833333 | 36 | 0.782178 |
a0d9b51f6437303123930ebe4a7fe49eec274d36 | 3,438 | py | Python | python/src/od_lib/definitions/path_definitions.py | open-discourse/open-discourse | cf7001e0961faa708c50f1415f37fa4a777ef83c | [
"MIT"
] | 45 | 2020-12-19T17:34:24.000Z | 2021-12-11T11:15:28.000Z | python/src/od_lib/definitions/path_definitions.py | open-discourse/open-discourse | cf7001e0961faa708c50f1415f37fa4a777ef83c | [
"MIT"
] | 28 | 2020-12-21T09:37:29.000Z | 2022-02-17T20:58:30.000Z | python/src/od_lib/definitions/path_definitions.py | open-discourse/open-discourse | cf7001e0961faa708c50f1415f37fa4a777ef83c | [
"MIT"
] | 2 | 2021-01-17T21:56:54.000Z | 2021-02-07T17:15:51.000Z | import os
# ROOT DIR _________________________________________________________________________________________
ROOT_DIR = os.path.abspath(os.path.join(__file__, "../../../.."))
# DATA _____________________________________________________________________________________________
DATA = os.path.join(ROOT_DIR, "data")
DA... | 52.090909 | 100 | 0.847877 |
b1997b630cddae6676f12dae6b45c2c3d5226a5f | 39 | py | Python | BluePrint/manager.py | CodeMath/jinrockets | 6bb26e9ca66ba951ab2d34bf1ffe79b2c605963f | [
"MIT"
] | null | null | null | BluePrint/manager.py | CodeMath/jinrockets | 6bb26e9ca66ba951ab2d34bf1ffe79b2c605963f | [
"MIT"
] | null | null | null | BluePrint/manager.py | CodeMath/jinrockets | 6bb26e9ca66ba951ab2d34bf1ffe79b2c605963f | [
"MIT"
] | null | null | null | from apps import manager
manager.run() | 13 | 24 | 0.794872 |
ad4e25809d75346cd77fdcea10e80b42f8ac0bdb | 1,568 | py | Python | demos/space_invaders/space_invaders.py | PawseySC/Using-Python-in-HPC | 8d4de3d2b921dd15ed8800f31d3633d431920f00 | [
"CC0-1.0"
] | 1 | 2020-11-30T17:40:39.000Z | 2020-11-30T17:40:39.000Z | demos/space_invaders/space_invaders.py | PawseySC/Using-Python-in-HPC | 8d4de3d2b921dd15ed8800f31d3633d431920f00 | [
"CC0-1.0"
] | null | null | null | demos/space_invaders/space_invaders.py | PawseySC/Using-Python-in-HPC | 8d4de3d2b921dd15ed8800f31d3633d431920f00 | [
"CC0-1.0"
] | 1 | 2021-09-02T15:23:45.000Z | 2021-09-02T15:23:45.000Z | #!/usr/bin/env python
import math, time
import tkinter as tk
from tkinter import Tk, Canvas, PhotoImage, Label, Button
class Game(tk.Frame):
def __init__(self, parent, *args, **kwargs):
tk.Frame.__init__(self, parent, *args, **kwargs)
self.parent = parent
parent.title("Space Invaders")
... | 41.263158 | 111 | 0.531888 |
bfe2625d0ee37e600a9a90424b297c89f1250337 | 226 | py | Python | LeetCode/python3/169.py | ZintrulCre/LeetCode_Archiver | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 279 | 2019-02-19T16:00:32.000Z | 2022-03-23T12:16:30.000Z | LeetCode/python3/169.py | ZintrulCre/LeetCode_Archiver | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 2 | 2019-03-31T08:03:06.000Z | 2021-03-07T04:54:32.000Z | LeetCode/python3/169.py | ZintrulCre/LeetCode_Crawler | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 12 | 2019-01-29T11:45:32.000Z | 2019-02-04T16:31:46.000Z | import collections
class Solution:
def majorityElement(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
d = collections.Counter(nums)
return max(d.keys(), key=d.get)
| 18.833333 | 39 | 0.544248 |
eeae0f256764eb009eec857f71eaeee5796d74ea | 5,041 | py | Python | devserver/modules/profile.py | leture/django-devserver | e6c882fc11fba013b85d37f04db8f11b531eda9a | [
"BSD-3-Clause"
] | 467 | 2015-01-02T07:06:13.000Z | 2022-03-29T14:40:03.000Z | devserver/modules/profile.py | leture/django-devserver | e6c882fc11fba013b85d37f04db8f11b531eda9a | [
"BSD-3-Clause"
] | 33 | 2015-01-28T13:08:16.000Z | 2021-03-08T11:12:50.000Z | devserver/modules/profile.py | leture/django-devserver | e6c882fc11fba013b85d37f04db8f11b531eda9a | [
"BSD-3-Clause"
] | 103 | 2015-01-12T07:13:58.000Z | 2022-02-10T05:00:07.000Z | from devserver.modules import DevServerModule
from devserver.utils.time import ms_from_timedelta
from devserver.settings import DEVSERVER_AUTO_PROFILE
from datetime import datetime
import functools
import gc
class ProfileSummaryModule(DevServerModule):
"""
Outputs a summary of cache events once a response i... | 34.765517 | 140 | 0.629835 |
6cbdd9bad0e605956ba5eb4138840f398d935425 | 2,467 | py | Python | kits19cnn/io/custom_transforms.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | 7 | 2019-12-19T01:10:09.000Z | 2021-07-05T07:35:39.000Z | kits19cnn/io/custom_transforms.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | 5 | 2019-12-19T23:03:12.000Z | 2020-02-06T04:18:34.000Z | kits19cnn/io/custom_transforms.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | 1 | 2021-03-20T06:28:37.000Z | 2021-03-20T06:28:37.000Z | from albumentations.core.transforms_interface import DualTransform
import numpy as np
class CenterCrop(DualTransform):
"""
Crop the central part of the input.
Args:
height (int): height of the crop.
width (int): width of the crop.
p (float): probability of applying the transform. D... | 35.242857 | 101 | 0.627483 |
d565a18b50a9a90ca8c7941d037217eb47fa2002 | 271 | py | Python | RandomStringGenerator.py | alvin-ylt/Python | 853128ecda7c7a387e8f392533c760adbf0c9cab | [
"Unlicense"
] | null | null | null | RandomStringGenerator.py | alvin-ylt/Python | 853128ecda7c7a387e8f392533c760adbf0c9cab | [
"Unlicense"
] | null | null | null | RandomStringGenerator.py | alvin-ylt/Python | 853128ecda7c7a387e8f392533c760adbf0c9cab | [
"Unlicense"
] | null | null | null | import random
count = 0
length = int(input("How many characters do you want?"))
string = str()
char = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*"
while count < length:
string = random.choice(char) + string
count += 1
print(string)
| 20.846154 | 79 | 0.715867 |
df4769927161c55b774ccb6ea24394c894a1b7a5 | 2,394 | py | Python | simple_rl/tasks/cleanup/cleanup_state.py | roma-patel/simple_rl | 721a748dae3296293b66f86cf2eda8c91885c298 | [
"Apache-2.0"
] | null | null | null | simple_rl/tasks/cleanup/cleanup_state.py | roma-patel/simple_rl | 721a748dae3296293b66f86cf2eda8c91885c298 | [
"Apache-2.0"
] | null | null | null | simple_rl/tasks/cleanup/cleanup_state.py | roma-patel/simple_rl | 721a748dae3296293b66f86cf2eda8c91885c298 | [
"Apache-2.0"
] | null | null | null | import copy
import random
from simple_rl.mdp.StateClass import State
from simple_rl.tasks.cleanup.CleanupMDPClass import CleanUpMDP
class CleanUpState(State):
def __init__(self, task, x, y, blocks=[], doors=[], rooms=[]):
'''
:param task: The given CleanUpTask
:param x: Agent x coordinate... | 32.794521 | 100 | 0.579365 |
3b977c868550ee897c8ec144d386d20166b5fc91 | 3,862 | py | Python | egs/wenetspeech/ASR/local/preprocess_wenetspeech.py | pingfengluo/icefall | c2c3e2ba76ecf231fb2b8bfabdc1da0dac4bd377 | [
"Apache-2.0"
] | null | null | null | egs/wenetspeech/ASR/local/preprocess_wenetspeech.py | pingfengluo/icefall | c2c3e2ba76ecf231fb2b8bfabdc1da0dac4bd377 | [
"Apache-2.0"
] | null | null | null | egs/wenetspeech/ASR/local/preprocess_wenetspeech.py | pingfengluo/icefall | c2c3e2ba76ecf231fb2b8bfabdc1da0dac4bd377 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2021 Johns Hopkins University (Piotr Żelasko)
# Copyright 2021 Xiaomi Corp. (Fangjun Kuang)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exce... | 33.008547 | 94 | 0.656396 |
c59360db7cbc9ba9afbe8490a17d6afc996012dc | 10,264 | py | Python | py27/bacpypes/task.py | mteter-upenn/bacpypes | 88623988103a48a3f5c8dfd0eb0ca7ffa0bd82b6 | [
"MIT"
] | null | null | null | py27/bacpypes/task.py | mteter-upenn/bacpypes | 88623988103a48a3f5c8dfd0eb0ca7ffa0bd82b6 | [
"MIT"
] | null | null | null | py27/bacpypes/task.py | mteter-upenn/bacpypes | 88623988103a48a3f5c8dfd0eb0ca7ffa0bd82b6 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
Task
"""
import sys
from time import time as _time
from heapq import heapify, heappush, heappop
from .singleton import SingletonLogging
from .debugging import DebugContents, Logging, ModuleLogger, bacpypes_debugging
# some debugging
_debug = 0
_log = ModuleLogger(globals())
# globals
_task_m... | 27.370667 | 95 | 0.610678 |
4831556a399691340f18e7e3cfe75de3db145e6c | 2,085 | py | Python | convpy/utils.py | markovianhq/convpy | 05c6319aa0817841def85db3ae327fd798452599 | [
"BSD-3-Clause"
] | 11 | 2018-11-13T12:14:13.000Z | 2022-03-22T07:56:22.000Z | convpy/utils.py | markovianhq/convpy | 05c6319aa0817841def85db3ae327fd798452599 | [
"BSD-3-Clause"
] | null | null | null | convpy/utils.py | markovianhq/convpy | 05c6319aa0817841def85db3ae327fd798452599 | [
"BSD-3-Clause"
] | 4 | 2020-05-19T19:04:57.000Z | 2021-07-21T02:45:08.000Z | import numpy as np
from scipy.sparse import coo_matrix
from scipy.sparse.linalg import norm
def prepare_input(y, X, end_time):
y0, y1 = y[np.isnan(y[:, 1])], y[~np.isnan(y[:, 1])]
x0, x1 = X[np.isnan(y[:, 1])], X[~np.isnan(y[:, 1])]
diagonal0, diagonal1 = coo_matrix((y0.shape[0], y0.shape[0])), coo_matr... | 29.785714 | 105 | 0.614868 |
3c1a5ab391b33ec79070a7c4505788e4e1a77cc4 | 2,774 | py | Python | validation/pull_bwa_novoalign_diffs.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 339 | 2015-01-04T13:23:04.000Z | 2022-03-25T23:09:09.000Z | validation/pull_bwa_novoalign_diffs.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 39 | 2015-01-14T21:31:09.000Z | 2021-11-18T15:15:33.000Z | validation/pull_bwa_novoalign_diffs.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 176 | 2015-01-10T17:40:44.000Z | 2022-03-25T05:14:21.000Z | #!/usr/bin/env python
"""Extract concordant variant differences between bwa and novoalign, focusing on mapping differences.
Requires:
bedtools, pybedtools, vcflib
"""
import os
import subprocess
import sys
import pybedtools
import yaml
def main(config_file):
with open(config_file) as in_handle:
config = ... | 39.070423 | 101 | 0.629416 |
54f1083328ee91bf226b2c7ab4fa94d2e6cc3a9c | 663 | py | Python | communication/python-multicast/receiver.py | pn11/benkyokai | 9ebdc46b529e76b7196add26dbc1e62ad48e72b0 | [
"MIT"
] | null | null | null | communication/python-multicast/receiver.py | pn11/benkyokai | 9ebdc46b529e76b7196add26dbc1e62ad48e72b0 | [
"MIT"
] | 22 | 2020-03-24T16:24:47.000Z | 2022-02-26T15:51:18.000Z | communication/python-multicast/receiver.py | pn11/benkyokai | 9ebdc46b529e76b7196add26dbc1e62ad48e72b0 | [
"MIT"
] | null | null | null | import argparse
import socket
def main(args=None):
parser = argparse.ArgumentParser()
parser.add_argument('target_address', help='target address')
parser.add_argument('port', help='port', nargs='?')
args = parser.parse_args()
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(so... | 26.52 | 84 | 0.660633 |
0baaee119169631b349028819450a7400f48192e | 1,623 | py | Python | aaLibrary1/Bellman_Ford_algorithm.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | aaLibrary1/Bellman_Ford_algorithm.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | aaLibrary1/Bellman_Ford_algorithm.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | """def BellmanFord(edges, num_v, source):
# グラフの初期化
inf = float("inf")
dist = [inf for i in range(num_v)]
dist[source - 1] = 0
# 辺の緩和
for i in range(num_v):
for edge in edges:
if edge[0] != inf and dist[edge[1] - 1] > dist[edge[0] - 1] + edge[2]:
dist[edge[1]... | 28.982143 | 89 | 0.444239 |
66441878790d90d2abbefe1429a306a68056fa36 | 34,323 | py | Python | builder/plotting.py | mscroggs/defelement.com | 0cfc01a0cc3b801ef10ede12bf64f77a6a70efb1 | [
"CC-BY-4.0",
"MIT"
] | 9 | 2020-12-30T17:24:46.000Z | 2022-02-16T22:10:47.000Z | builder/plotting.py | mscroggs/defelement.com | 0cfc01a0cc3b801ef10ede12bf64f77a6a70efb1 | [
"CC-BY-4.0",
"MIT"
] | 85 | 2021-01-09T09:44:45.000Z | 2022-03-26T07:34:00.000Z | builder/plotting.py | mscroggs/defelement.com | 0cfc01a0cc3b801ef10ede12bf64f77a6a70efb1 | [
"CC-BY-4.0",
"MIT"
] | 1 | 2022-03-28T08:15:38.000Z | 2022-03-28T08:15:38.000Z | from . import settings
from datetime import datetime
import os
from cairosvg import svg2png
from symfem.finite_element import CiarletElement, DirectElement
from symfem.calculus import grad
from symfem.vectors import vdot, vsub
from symfem.symbolic import subs, x
from symfem.symbolic import PiecewiseFunction
COLORS = {... | 44.287742 | 100 | 0.460478 |
4d8565f35fb71853b99871e728886ece4ba4a7e2 | 193 | py | Python | python/dgl/distributed/constants.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 1 | 2022-02-23T01:35:37.000Z | 2022-02-23T01:35:37.000Z | python/dgl/distributed/constants.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | null | null | null | python/dgl/distributed/constants.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | null | null | null | """Define all the constants used by DGL rpc"""
# Maximum size of message queue in bytes
MAX_QUEUE_SIZE = 20*1024*1024*1024
SERVER_EXIT = "server_exit"
SERVER_KEEP_ALIVE = "server_keep_alive"
| 24.125 | 46 | 0.772021 |
3d421dc0c54163354752740fdbd16dc05aae1719 | 4,680 | py | Python | swap_start/train_fast_pick/fast_play/tf_model.py | yudongqiu/gomoku | 4a95f2a5008f31fed5cb92c6bd6d55f9669ddd06 | [
"MIT"
] | 3 | 2018-06-12T09:03:41.000Z | 2019-01-14T05:34:57.000Z | swap_start/train_fast_pick/fast_play/tf_model.py | yudongqiu/gomoku | 4a95f2a5008f31fed5cb92c6bd6d55f9669ddd06 | [
"MIT"
] | null | null | null | swap_start/train_fast_pick/fast_play/tf_model.py | yudongqiu/gomoku | 4a95f2a5008f31fed5cb92c6bd6d55f9669ddd06 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import sys
import random
import tensorflow as tf
from tensorflow.keras import layers
tf.config.gpu.set_per_process_memory_fraction(0.4)
tf.keras.backend.clear_session()
class ResNetBlock(layers.Layer):
def __init__(self, filters=256, kernel_size=3):
super().__init__(... | 35.454545 | 121 | 0.64594 |
4d9946cb2c38e5f053752deded8e77e487c01862 | 3,420 | py | Python | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/error_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/error_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/error_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class ErrorResponse:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is j... | 24.782609 | 74 | 0.540058 |
30266e13f8d680972ddd2f507e28209e2be330a6 | 505 | py | Python | venv_py36/Lib/site-packages/PyInstaller/hooks/hook-adios.py | PeterMoresco/RefriCalcSoft | 1ed728ef1937fdda248cee19d97b3d13bd98af03 | [
"MIT"
] | 1 | 2018-09-12T06:30:21.000Z | 2018-09-12T06:30:21.000Z | venv_py36/Lib/site-packages/PyInstaller/hooks/hook-adios.py | PeterMoresco/RefriCalcSoft | 1ed728ef1937fdda248cee19d97b3d13bd98af03 | [
"MIT"
] | 1 | 2018-09-12T06:32:17.000Z | 2018-09-12T19:03:50.000Z | venv/lib/python3.6/site-packages/PyInstaller/hooks/hook-adios.py | rilakkyuma/tweetdelete | 5ac4001b2ba7c7d87379e616c93361c2090ed4ae | [
"MIT"
] | 2 | 2018-12-29T07:49:59.000Z | 2020-03-18T02:44:31.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2013-2018, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this s... | 29.705882 | 78 | 0.514851 |
577b0f304b3fc26f92788c81d419b85f086a9698 | 1,543 | py | Python | front-end/MemDir.py | projetoemBR/teste_mgeo | a0078301f7dfd54431d6b51abcf092079ad0e5a3 | [
"MIT"
] | 1 | 2021-12-09T18:33:24.000Z | 2021-12-09T18:33:24.000Z | front-end/MemDir.py | albertoakel/teste_mgeo | a0078301f7dfd54431d6b51abcf092079ad0e5a3 | [
"MIT"
] | null | null | null | front-end/MemDir.py | albertoakel/teste_mgeo | a0078301f7dfd54431d6b51abcf092079ad0e5a3 | [
"MIT"
] | 1 | 2021-12-09T18:34:12.000Z | 2021-12-09T18:34:12.000Z | #!/usr/bin/python3
#-------- Code Dependencies ----------
#\__________General Utilities__________/
import pprint
import time
import sys
import os
import re
import numpy as np
#\__________Local functions__________/
import ipop_fun as ipop #I/P and O/P functions
import util_fun as util #Utility function... | 25.295082 | 67 | 0.621517 |
97898460a21a12378e3473c94791d7b641c83843 | 3,113 | py | Python | benchmarks/modeling/compound.py | eteq/astropy-benchmarks | a8d5b3f30b2f1d7252d450aad53bb0572e44a1e8 | [
"BSD-3-Clause"
] | null | null | null | benchmarks/modeling/compound.py | eteq/astropy-benchmarks | a8d5b3f30b2f1d7252d450aad53bb0572e44a1e8 | [
"BSD-3-Clause"
] | null | null | null | benchmarks/modeling/compound.py | eteq/astropy-benchmarks | a8d5b3f30b2f1d7252d450aad53bb0572e44a1e8 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from astropy.modeling import models
from astropy import units as u
x_no_units_scalar = 5
x_no_units_small = np.linspace(-4, 3, 50)
x_no_units_medium = np.linspace(-40, 300, 2000)
x_no_units_large = np.linspace(-4, 300, 5e-6)
def time_init_7_no_units():
m = (models.Shift(-10.5) & models.Shift(... | 39.910256 | 94 | 0.57019 |
8eab173c69f6c7fb7b013bdd8e1f988f873be88c | 357 | py | Python | olintut/magic_slide1.py | sihrc/olintut | 445e9a406fb05ada9db4ed25015a148a7576a3c2 | [
"MIT"
] | null | null | null | olintut/magic_slide1.py | sihrc/olintut | 445e9a406fb05ada9db4ed25015a148a7576a3c2 | [
"MIT"
] | null | null | null | olintut/magic_slide1.py | sihrc/olintut | 445e9a406fb05ada9db4ed25015a148a7576a3c2 | [
"MIT"
] | null | null | null | import time
import random
from .utils import logger
@logger
def long_running_magic_number_generator():
"""
Magical numbers are conjured through black magic
"""
time.sleep(2)
return random.random()
if __name__ == "__main__":
magic_number = long_running_magic_number_generator()
print(f"Ge... | 19.833333 | 56 | 0.728291 |
0005c533b9ba3373ba3d6e9320f61fe8ab955db7 | 2,081 | py | Python | altair_transform/transform/aggregate.py | altair-viz/altair-transform | b65bf854de1e80f931e063d8fb2ec938773826fb | [
"MIT"
] | 29 | 2019-07-19T08:53:34.000Z | 2022-01-19T14:07:36.000Z | altair_transform/transform/aggregate.py | altair-viz/altair-transform | b65bf854de1e80f931e063d8fb2ec938773826fb | [
"MIT"
] | 13 | 2019-07-19T03:33:07.000Z | 2021-06-29T15:34:19.000Z | altair_transform/transform/aggregate.py | altair-viz/altair-transform | b65bf854de1e80f931e063d8fb2ec938773826fb | [
"MIT"
] | 11 | 2019-07-19T02:48:35.000Z | 2021-11-01T00:07:41.000Z | import altair as alt
import numpy as np
import pandas as pd
from .visitor import visit
@visit.register(alt.AggregateTransform)
def visit_aggregate(
transform: alt.AggregateTransform, df: pd.DataFrame
) -> pd.DataFrame:
transform = transform.to_dict()
groupby = transform.get("groupby", [])
agg_cols = {... | 27.025974 | 75 | 0.552138 |
9f843af29361c4512a5c68fb5e77dc2a08c42c23 | 1,168 | py | Python | qcelemental/tests/utils.py | PeterKraus/QCElemental | 0ac5566f9889242c2daba21921984b548d5e2bc2 | [
"BSD-3-Clause"
] | 1 | 2020-12-21T02:52:26.000Z | 2020-12-21T02:52:26.000Z | qcelemental/tests/utils.py | PeterKraus/QCElemental | 0ac5566f9889242c2daba21921984b548d5e2bc2 | [
"BSD-3-Clause"
] | null | null | null | qcelemental/tests/utils.py | PeterKraus/QCElemental | 0ac5566f9889242c2daba21921984b548d5e2bc2 | [
"BSD-3-Clause"
] | null | null | null | import sys
import utils_compare
def true_false_decorator(compare_fn, *args, **kwargs):
"""Turns `compare_fn` that returns `None` on success and raises
`_TestComparisonError` on failure into a function that returns
True/False, suitable for assertions in pytest.
"""
def true_false_wrapper(*args, ... | 31.567568 | 78 | 0.763699 |
7c484cfa3b87b9f12c88292c8891b262db6e1829 | 728 | py | Python | Episode11-Menu/Pygame/circle.py | Inksaver/Shmup_With_Pygame_Love2D_Monogame | 84838516d9dd9d6639b1b699dca546bfdfec73dc | [
"CC0-1.0"
] | 1 | 2022-02-01T04:05:04.000Z | 2022-02-01T04:05:04.000Z | Episode12-Leaderboard/Pygame/circle.py | Inksaver/Shmup_With_Pygame_Love2D_Monogame | 84838516d9dd9d6639b1b699dca546bfdfec73dc | [
"CC0-1.0"
] | null | null | null | Episode12-Leaderboard/Pygame/circle.py | Inksaver/Shmup_With_Pygame_Love2D_Monogame | 84838516d9dd9d6639b1b699dca546bfdfec73dc | [
"CC0-1.0"
] | null | null | null | ''' Circle class to provdide circle collider'''
class Circle():
def __init__(self, x:int, y:int, radius:int) -> None:
self._x = x # x position
self._y = y # y position
self._radius = radius # circle radius
@property
def x(self):
return self._x
@property
def y(self):
return self._y... | 18.2 | 55 | 0.607143 |
8fc7ec44b02e5d95ae18f47099527e501711cd8b | 11,105 | py | Python | Python_files/INRIX_data_preprocessing_18_prepare_link_flows_for_OD_demand_estimation_Oct.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/INRIX_data_preprocessing_18_prepare_link_flows_for_OD_demand_estimation_Oct.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/INRIX_data_preprocessing_18_prepare_link_flows_for_OD_demand_estimation_Oct.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Jing Zhang"
__email__ = "jingzbu@gmail.com"
__status__ = "Development"
from util import *
road_seg_inr_capac = zload('../temp_files/road_seg_inr_capac.pkz')
# load tmc-day-ave_speed data for AM peak of October
tmc_day_speed_dict_Oct_AM = zload('../temp_files/Oct_AM/tmc_day_spee... | 57.838542 | 117 | 0.600991 |
337d997218e2f10af70b7dd5f51cc535cbaada83 | 566 | py | Python | sunpy/timeseries/sources/tests/test_fermi_gbm.py | Octaves0911/sunpy | d3dff03fe6cc404e40f22da90200ffbb3d38c1a7 | [
"BSD-2-Clause"
] | 1 | 2019-03-11T12:28:25.000Z | 2019-03-11T12:28:25.000Z | sunpy/timeseries/sources/tests/test_fermi_gbm.py | Octaves0911/sunpy | d3dff03fe6cc404e40f22da90200ffbb3d38c1a7 | [
"BSD-2-Clause"
] | 10 | 2017-08-10T07:55:42.000Z | 2020-04-19T10:56:43.000Z | sunpy/timeseries/sources/tests/test_fermi_gbm.py | Octaves0911/sunpy | d3dff03fe6cc404e40f22da90200ffbb3d38c1a7 | [
"BSD-2-Clause"
] | 1 | 2019-02-06T11:57:56.000Z | 2019-02-06T11:57:56.000Z | import sunpy.timeseries
from sunpy.data.test import get_test_filepath
fermi_gbm_filepath = get_test_filepath('gbm.fits')
def test_implicit_fermi_gbm():
# Test a GBMSummary TimeSeries
ts_gbm = sunpy.timeseries.TimeSeries(fermi_gbm_filepath)
assert isinstance(ts_gbm, sunpy.timeseries.sources.fermi_gbm.GBMS... | 33.294118 | 86 | 0.805654 |
7225752618305e541081aa09c7c557d909fd8dda | 24,039 | py | Python | blist/test/mapping_tests.py | FelixKleineBoesing/blist | 29fabf804aaded386231733047eb700aff43724b | [
"BSD-3-Clause"
] | null | null | null | blist/test/mapping_tests.py | FelixKleineBoesing/blist | 29fabf804aaded386231733047eb700aff43724b | [
"BSD-3-Clause"
] | null | null | null | blist/test/mapping_tests.py | FelixKleineBoesing/blist | 29fabf804aaded386231733047eb700aff43724b | [
"BSD-3-Clause"
] | null | null | null | # This file taken from Python, licensed under the Python License Agreement
# tests common to dict and UserDict
import sys
import collections.abc as collections
from blist.test import unittest
try:
from collections import UserDict # Python 3
except ImportError:
from UserDict import UserDict # Python 2
... | 35.351471 | 109 | 0.538833 |
568e416b30dd468dda686bc8ef7923f2ec457fa3 | 3,989 | py | Python | web/manager.py | tt20050510/howard-dfs-web | 7cd17847e17fa69e3ad0be6c797ff07434b2ae7f | [
"Apache-2.0"
] | null | null | null | web/manager.py | tt20050510/howard-dfs-web | 7cd17847e17fa69e3ad0be6c797ff07434b2ae7f | [
"Apache-2.0"
] | null | null | null | web/manager.py | tt20050510/howard-dfs-web | 7cd17847e17fa69e3ad0be6c797ff07434b2ae7f | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
import json, os, configparser
import uuid
from flask import Blueprint, render_template, session, request, jsonify
from empty.TaskEmpty import Task
from timing.thread_task import JobTime
from utils import cf
from web import user_page, user_data
jt = JobTime()
TaskSession = jt.TaskSession
manage... | 24.623457 | 97 | 0.611933 |
7e1cce8847061fbcf61cf94b29dc747358d54df4 | 1,086 | py | Python | spacy/ml/extract_ngrams.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 2 | 2017-06-23T20:54:31.000Z | 2022-01-06T08:11:49.000Z | spacy/ml/extract_ngrams.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 1 | 2021-03-01T19:01:37.000Z | 2021-03-01T19:01:37.000Z | spacy/ml/extract_ngrams.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 1 | 2021-06-21T07:17:48.000Z | 2021-06-21T07:17:48.000Z | from thinc.api import Model
from ..attrs import LOWER
def extract_ngrams(ngram_size: int, attr: int = LOWER) -> Model:
model = Model("extract_ngrams", forward)
model.attrs["ngram_size"] = ngram_size
model.attrs["attr"] = attr
return model
def forward(model: Model, docs, is_train: bool):
batch_k... | 32.909091 | 84 | 0.6593 |
c9fd50715f5f3c2dea6b1ffa957fa7fe1f219c1c | 5,326 | py | Python | python/qisrc/test/test_sync_git.py | aldebaran/qibuild | efea6fa3744664348717fe5e8df708a3cf392072 | [
"BSD-3-Clause"
] | 51 | 2015-01-05T14:35:13.000Z | 2021-07-27T06:46:59.000Z | python/qisrc/test/test_sync_git.py | aldebaran/qibuild | efea6fa3744664348717fe5e8df708a3cf392072 | [
"BSD-3-Clause"
] | 104 | 2015-04-09T10:48:42.000Z | 2020-09-16T16:33:29.000Z | python/qisrc/test/test_sync_git.py | aldebaran/qibuild | efea6fa3744664348717fe5e8df708a3cf392072 | [
"BSD-3-Clause"
] | 46 | 2015-01-05T14:35:16.000Z | 2022-02-13T20:39:36.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Test Sync Git """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import... | 35.744966 | 84 | 0.686632 |
3e3e307d86193ce5d3a5013b5cc0ad0b6907faeb | 4,412 | py | Python | gluoncv/utils/export_helper.py | PistonY/gluon-cv | aff5c36c0a1985350d32b766df5644e5648f4d13 | [
"Apache-2.0"
] | 13 | 2019-03-04T13:26:58.000Z | 2020-12-15T12:45:42.000Z | gluoncv/utils/export_helper.py | PistonY/gluon-cv | aff5c36c0a1985350d32b766df5644e5648f4d13 | [
"Apache-2.0"
] | 1 | 2018-09-20T19:31:37.000Z | 2018-09-20T19:31:37.000Z | gluoncv/utils/export_helper.py | PistonY/gluon-cv | aff5c36c0a1985350d32b766df5644e5648f4d13 | [
"Apache-2.0"
] | 3 | 2019-03-06T02:11:20.000Z | 2021-03-05T09:09:28.000Z | """Helper utils for export HybridBlock to symbols."""
from __future__ import absolute_import
import mxnet as mx
from mxnet.base import MXNetError
from mxnet.gluon import HybridBlock
from mxnet.gluon import nn
class _DefaultPreprocess(HybridBlock):
"""Default preprocess block used by GluonCV.
The default prep... | 38.034483 | 100 | 0.618994 |
dbb8d363a3f18dabc2ed5ebbad4e82e02a08505c | 703 | py | Python | setup.py | Danny-Dasilva/TPUCameraManager | e9fff44bb23e913c7e9178dce140dfac438bb382 | [
"MIT"
] | null | null | null | setup.py | Danny-Dasilva/TPUCameraManager | e9fff44bb23e913c7e9178dce140dfac438bb382 | [
"MIT"
] | null | null | null | setup.py | Danny-Dasilva/TPUCameraManager | e9fff44bb23e913c7e9178dce140dfac438bb382 | [
"MIT"
] | 1 | 2019-12-18T01:56:57.000Z | 2019-12-18T01:56:57.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="TPUCameraManager", # Replace with your own username
version="0.1.1",
author="Devin Willis",
author_email="gatordevin@gmail.com",
description="A package for camera streams on the google cor... | 31.954545 | 67 | 0.677098 |
a3335724d841a69ea13920a1a223d81132bd526b | 1,106 | py | Python | notebooks/legacy/TPOT/tpot_pipeline_generations-3_popsize-20_cvfolds-3.py | jrbourbeau/cr-composition | e9efb4b713492aaf544b5dd8bb67280d4f108056 | [
"MIT"
] | null | null | null | notebooks/legacy/TPOT/tpot_pipeline_generations-3_popsize-20_cvfolds-3.py | jrbourbeau/cr-composition | e9efb4b713492aaf544b5dd8bb67280d4f108056 | [
"MIT"
] | 7 | 2017-08-29T16:20:04.000Z | 2018-06-12T16:58:36.000Z | notebooks/legacy/TPOT/tpot_pipeline_generations-3_popsize-20_cvfolds-3.py | jrbourbeau/cr-composition | e9efb4b713492aaf544b5dd8bb67280d4f108056 | [
"MIT"
] | 1 | 2018-04-03T20:56:40.000Z | 2018-04-03T20:56:40.000Z | import numpy as np
from sklearn.ensemble import GradientBoostingClassifier, VotingClassifier
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import BernoulliNB
from sklearn.pipeline import make_pipeline, make_union
from sklearn.preprocessing import FunctionTransformer
# NOTE: Make sure t... | 50.272727 | 134 | 0.814647 |
36517e7053ba4d56507b60e527fe195b489cdf30 | 1,611 | py | Python | von-x-agent/src/gunicorn_config.py | ianco/von-agent-template | eaca58314cfc9fa2e157ed72acc09bd2beb23006 | [
"Apache-2.0"
] | 7 | 2019-03-06T20:11:00.000Z | 2021-09-04T13:58:10.000Z | von-x-agent/src/gunicorn_config.py | ianco/von-agent-template | eaca58314cfc9fa2e157ed72acc09bd2beb23006 | [
"Apache-2.0"
] | 47 | 2018-07-21T22:39:11.000Z | 2022-03-02T13:08:36.000Z | von-x-agent/src/gunicorn_config.py | ianco/von-agent-template | eaca58314cfc9fa2e157ed72acc09bd2beb23006 | [
"Apache-2.0"
] | 20 | 2018-11-09T18:07:56.000Z | 2021-02-24T12:52:35.000Z | #
# Copyright 2017-2018 Government of Canada
# Public Services and Procurement Canada - buyandsell.gc.ca
#
# 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/LIC... | 30.396226 | 81 | 0.733085 |
f1560e72f3cd6a5b82ed2d39e0cddf41fab7777c | 9,026 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_securityconsole_package_cancel_install.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/fortinet/fortimanager/plugins/modules/fmgr_securityconsole_package_cancel_install.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/fortinet/fortimanager/plugins/modules/fmgr_securityconsole_package_cancel_install.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
# Copyright 2019-2021 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the ... | 32.941606 | 153 | 0.597275 |
680f7a26d87694a029a39f7a3e0a8a6061decc7d | 6,744 | py | Python | ground/core/geometries.py | lycantropos/ground | ef6f54b8cb555af8d9202d621cac57a892ecb78d | [
"MIT"
] | 4 | 2021-05-15T19:15:56.000Z | 2021-11-30T06:19:47.000Z | ground/core/geometries.py | lycantropos/ground | ef6f54b8cb555af8d9202d621cac57a892ecb78d | [
"MIT"
] | null | null | null | ground/core/geometries.py | lycantropos/ground | ef6f54b8cb555af8d9202d621cac57a892ecb78d | [
"MIT"
] | null | null | null | from operator import eq
from typing import (Sequence,
TypeVar)
from reprit.base import generate_repr
from . import hints
class Point:
__slots__ = '_x', '_y'
def __init__(self, x: hints.Scalar, y: hints.Scalar) -> None:
self._x, self._y = x, y
@property
def x(self) -> hi... | 27.193548 | 78 | 0.60261 |
28fa97566d173d1bb300b118d8c057ba6f97c4e6 | 5,482 | py | Python | src/opendms/facelandmarksdetector.py | cledouarec/OpenDMS | cbbb40aa5d37ce10e2c3cd345cff3796b0bffdcb | [
"Apache-2.0"
] | null | null | null | src/opendms/facelandmarksdetector.py | cledouarec/OpenDMS | cbbb40aa5d37ce10e2c3cd345cff3796b0bffdcb | [
"Apache-2.0"
] | null | null | null | src/opendms/facelandmarksdetector.py | cledouarec/OpenDMS | cbbb40aa5d37ce10e2c3cd345cff3796b0bffdcb | [
"Apache-2.0"
] | null | null | null | #! python3
"""
All functions related to face landmarks detection
"""
import logging
from typing import List
import cv2
import dlib
import numpy as np
import pkg_resources
class FaceLandmarksDetector:
"""
Base class for face landmarks detector.
"""
def run(self, image, faces: List) -> List:
... | 28.257732 | 79 | 0.547975 |
1c82aaf2f93ec5e3f4e804000c74bfe476422ec0 | 7,171 | py | Python | p1_navigation/dqn_agent.py | brianx0215/deep-reinforcement-learning | 606ccb5eb1b302514567e33dcfdb372942671af7 | [
"MIT"
] | null | null | null | p1_navigation/dqn_agent.py | brianx0215/deep-reinforcement-learning | 606ccb5eb1b302514567e33dcfdb372942671af7 | [
"MIT"
] | null | null | null | p1_navigation/dqn_agent.py | brianx0215/deep-reinforcement-learning | 606ccb5eb1b302514567e33dcfdb372942671af7 | [
"MIT"
] | null | null | null | import numpy as np
import random
from collections import namedtuple, deque
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = int(1e5) # replay buffer size
BATCH_SIZE = 64 # minibatch size
GAMMA = 0.99 # discount factor
TAU = 1e-3 ... | 38.143617 | 138 | 0.633803 |
30cc5f16658a76ab7ae64c0a07d031357d1c8c4e | 13,900 | py | Python | mydata_did/v1_0/utils/diddoc.py | decentralised-dataexchange/acapy-mydata-did-protocol | c84d86d12689cfb1a29d43734ee27a03ccdf8d77 | [
"Apache-2.0"
] | 1 | 2022-02-10T17:51:27.000Z | 2022-02-10T17:51:27.000Z | mydata_did/v1_0/utils/diddoc.py | decentralised-dataexchange/acapy-mydata-did-protocol | c84d86d12689cfb1a29d43734ee27a03ccdf8d77 | [
"Apache-2.0"
] | 12 | 2021-09-19T14:27:56.000Z | 2022-03-28T13:31:58.000Z | mydata_did/v1_0/utils/diddoc.py | decentralised-dataexchange/acapy-mydata-did-protocol | c84d86d12689cfb1a29d43734ee27a03ccdf8d77 | [
"Apache-2.0"
] | 1 | 2022-01-03T14:09:05.000Z | 2022-01-03T14:09:05.000Z | """
DID Document classes.
Copyright 2017-2019 Government of Canada
Public Services and Procurement Canada - buyandsell.gc.ca
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/l... | 34.152334 | 256 | 0.542086 |
2f2c0a0792b07862781bbf652c6aff1b7a94fd76 | 3,354 | py | Python | src/python/pants/backend/jvm/tasks/properties.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/properties.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/properties.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import re
from colle... | 29.946429 | 99 | 0.606738 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.