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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e168c9608f50a238cbaaca30beba862e648690ba | 105,212 | py | Python | neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py | jahau/neutron | 6ec341ba4e007547f658f6aa5b698c4bc4726c9f | [
"Apache-2.0"
] | 1 | 2020-01-29T17:06:17.000Z | 2020-01-29T17:06:17.000Z | neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py | jahau/neutron | 6ec341ba4e007547f658f6aa5b698c4bc4726c9f | [
"Apache-2.0"
] | null | null | null | neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py | jahau/neutron | 6ec341ba4e007547f658f6aa5b698c4bc4726c9f | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Red Hat, 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... | 46.698624 | 92 | 0.582377 |
c8e8759f94e349b7c9813e05dbc036ed8022354e | 1,832 | py | Python | byoc/models/backbones.py | mbanani/byoc | faae278b35ea95ef9619abc70452fefe4daf1e10 | [
"MIT"
] | 26 | 2021-06-02T03:25:25.000Z | 2022-01-21T19:55:53.000Z | byoc/models/backbones.py | mbanani/byoc | faae278b35ea95ef9619abc70452fefe4daf1e10 | [
"MIT"
] | 2 | 2021-11-08T14:39:21.000Z | 2022-01-12T13:35:56.000Z | byoc/models/backbones.py | mbanani/byoc | faae278b35ea95ef9619abc70452fefe4daf1e10 | [
"MIT"
] | 1 | 2021-12-30T08:57:05.000Z | 2021-12-30T08:57:05.000Z | from torch import nn as nn
from torch.nn.init import xavier_uniform_, zeros_
from torchvision.models.resnet import conv1x1, conv3x3, resnet18
class ConvBlock(nn.Module):
"""
Helper module that consists of a Conv -> BN -> ReLU
"""
def __init__(self, in_c, out_c, batchnorm=True, activation=True, k=3):
... | 29.079365 | 74 | 0.551856 |
97a45e4c1ce2b3e96bfdba35b6fefcfff976c548 | 4,583 | py | Python | lib/python2.7/site-packages/typogrify/packages/titlecase/tests.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | 6 | 2015-04-27T07:21:28.000Z | 2020-06-08T11:14:29.000Z | lib/python2.7/site-packages/typogrify/packages/titlecase/tests.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/typogrify/packages/titlecase/tests.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for titlecase"""
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../'))
from titlecase import titlecase
TEST_DATA = (
(
"Q&A with steve jobs: 'that's what happens in technology'",
"Q&A With Steve Jobs: 'That... | 26.188571 | 87 | 0.569278 |
f5ed5bef550158aa316fbbe7273061054e2d93a8 | 2,941 | py | Python | lib/rpn/generate_anchors.py | HanGuo97/image-feature-extractors | fc542443763df3e7c5fad838deec6f032243280b | [
"MIT"
] | 19 | 2019-08-09T17:30:04.000Z | 2022-02-26T07:38:06.000Z | lib/rpn/generate_anchors.py | HanGuo97/image-feature-extractors | fc542443763df3e7c5fad838deec6f032243280b | [
"MIT"
] | 3 | 2019-08-14T22:29:23.000Z | 2021-01-22T01:38:49.000Z | lib/rpn/generate_anchors.py | HanGuo97/image-feature-extractors | fc542443763df3e7c5fad838deec6f032243280b | [
"MIT"
] | 7 | 2019-10-03T19:01:17.000Z | 2021-11-01T03:34:36.000Z | # --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Sean Bell
# --------------------------------------------------------
import numpy as np
# Verify that we compute the same a... | 30.010204 | 78 | 0.510711 |
45ef2e123af585c0e041c4a002b3674fc25ae080 | 562,236 | py | Python | Data/scigrid-de/pypower/scigrid_2011_01_04_14.py | thanever/SOC | 9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4 | [
"MIT"
] | null | null | null | Data/scigrid-de/pypower/scigrid_2011_01_04_14.py | thanever/SOC | 9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4 | [
"MIT"
] | null | null | null | Data/scigrid-de/pypower/scigrid_2011_01_04_14.py | thanever/SOC | 9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4 | [
"MIT"
] | null | null | null | from numpy import array
def scigrid_2011_01_04_14():
ppc = {"version": '2'}
ppc["baseMVA"] = 100.0
ppc["bus"] = array([
[586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1,... | 70.819499 | 137 | 0.459467 |
cc3166d573729d61974bedebfa4a22eca9719fee | 1,172 | py | Python | groupdocs/models/SignatureSignatureResponse.py | groupdocs-legacy-sdk/python | 80e5ef5a9a14ac4a7815c6cf933b5b2997381455 | [
"Apache-2.0"
] | null | null | null | groupdocs/models/SignatureSignatureResponse.py | groupdocs-legacy-sdk/python | 80e5ef5a9a14ac4a7815c6cf933b5b2997381455 | [
"Apache-2.0"
] | null | null | null | groupdocs/models/SignatureSignatureResponse.py | groupdocs-legacy-sdk/python | 80e5ef5a9a14ac4a7815c6cf933b5b2997381455 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
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... | 30.051282 | 77 | 0.656997 |
81345468f726dc9b01e0cfa395e2f68757eb6454 | 15,235 | py | Python | mara_google_analytics_downloader/static.py | hz-lschick/mara-google-analytics-downloader | f9cbcc4ee25b026c10b2d6c3be371fad7e13c443 | [
"MIT"
] | null | null | null | mara_google_analytics_downloader/static.py | hz-lschick/mara-google-analytics-downloader | f9cbcc4ee25b026c10b2d6c3be371fad7e13c443 | [
"MIT"
] | 1 | 2022-01-03T18:53:42.000Z | 2022-01-03T18:53:42.000Z | mara_google_analytics_downloader/static.py | hz-lschick/mara-google-analytics-downloader | f9cbcc4ee25b026c10b2d6c3be371fad7e13c443 | [
"MIT"
] | 2 | 2021-07-14T18:14:35.000Z | 2022-03-03T14:26:42.000Z | """Contain static data from the Google Analytics API"""
# The possible metrics
# reference: https://ga-dev-tools.appspot.com/dimensions-metrics-explorer/?
METRICS = [
# User
'ga:users',
'ga:newUsers',
'ga:percentNewSessions',
'ga:1dayUsers',
'ga:7dayUsers',
'ga:14dayUsers',
'ga:28dayUse... | 24.376 | 75 | 0.662882 |
73bb7b90013ac3b84b0589caab41c1d1c54c23c1 | 395 | py | Python | env/Lib/site-packages/plotly/validators/volume/_valuesrc.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/volume/_valuesrc.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/volume/_valuesrc.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="valuesrc", parent_name="volume", **kwargs):
super(ValuesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 32.916667 | 79 | 0.673418 |
e78dd20140710cb5512369c7535c31c596a31bf3 | 40,270 | py | Python | backend/notebook-prediction/main.py | WatVis/EDAssistant | a4be2849a65abcf2f81f9c01a2172ec67aa38853 | [
"BSD-3-Clause"
] | null | null | null | backend/notebook-prediction/main.py | WatVis/EDAssistant | a4be2849a65abcf2f81f9c01a2172ec67aa38853 | [
"BSD-3-Clause"
] | null | null | null | backend/notebook-prediction/main.py | WatVis/EDAssistant | a4be2849a65abcf2f81f9c01a2172ec67aa38853 | [
"BSD-3-Clause"
] | null | null | null | from model import BertModel, Generator, LibClassifier
import torch
from torch.utils.data import random_split, Dataset, DataLoader, SequentialSampler, RandomSampler,TensorDataset
from tqdm import tqdm, trange
from torch.nn import CrossEntropyLoss, MSELoss
import torch.nn as nn
import torch.nn.functional as F
import mult... | 57.610873 | 6,438 | 0.609585 |
a2b7017613de0b371593a94a7e8a47058e6a19c4 | 2,329 | py | Python | setup.py | cgfleapfrog/gtin | 6f5ea1d25270b5c7127db75e4e43ebb329b9fdab | [
"MIT"
] | 3 | 2018-06-14T01:34:30.000Z | 2020-03-07T10:41:23.000Z | setup.py | cgfleapfrog/gtin | 6f5ea1d25270b5c7127db75e4e43ebb329b9fdab | [
"MIT"
] | null | null | null | setup.py | cgfleapfrog/gtin | 6f5ea1d25270b5c7127db75e4e43ebb329b9fdab | [
"MIT"
] | 1 | 2018-09-11T14:06:32.000Z | 2018-09-11T14:06:32.000Z | """
A python package for parsing GTINs ("Global Trade Item Numbers"—also known as UPC/EAN/JAN/ISBN).
See:
https://github.com/davebelais/gtin
"""
import re
from setuptools import setup, find_packages
from codecs import open
from os import path
d = path.abspath(path.dirname(__file__))
# Get a long description from the... | 25.315217 | 107 | 0.59897 |
ec8deb17e492bf7067a6cf0c115abbc8e2867182 | 430 | py | Python | report_txtTojson.py | lqill/Training | 65969eaf4c6d39ae949d10bb6cd81cf1693292be | [
"MIT"
] | null | null | null | report_txtTojson.py | lqill/Training | 65969eaf4c6d39ae949d10bb6cd81cf1693292be | [
"MIT"
] | null | null | null | report_txtTojson.py | lqill/Training | 65969eaf4c6d39ae949d10bb6cd81cf1693292be | [
"MIT"
] | null | null | null | from glob import glob
import json
from library import P
p = P("jaro")
LIST_OF_FILE = glob(p.p("hasil", "*.txt"))
for file in LIST_OF_FILE:
f = open(file, 'r')
text = f.read()
f.close()
json_ = {}
report = text.splitlines()
for thing in report:
json_[thing.split(",")[0]]... | 22.631579 | 57 | 0.548837 |
ec16874b592b054055348c77c3d556d7bc6b2e01 | 859 | py | Python | setup.py | Pandinosaurus/detoxify | 0cccd5992fe4e6c5f06052858e51f4da363c28f7 | [
"Apache-2.0"
] | 1 | 2022-01-15T03:38:26.000Z | 2022-01-15T03:38:26.000Z | setup.py | Aarav-USA/detoxify | 52f623bc7dd5182686a402a2b2fab48289de2d9c | [
"Apache-2.0"
] | null | null | null | setup.py | Aarav-USA/detoxify | 52f623bc7dd5182686a402a2b2fab48289de2d9c | [
"Apache-2.0"
] | 1 | 2021-12-11T15:45:59.000Z | 2021-12-11T15:45:59.000Z | #!/usr/bin/env python
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="detoxify",
version="0.4.0",
description="A python library for detecting toxic comments",
long_description=long_description,
long_description_content_t... | 28.633333 | 75 | 0.636787 |
148456ab3bb23644f3ef71f213689225e9a7f0c6 | 1,704 | py | Python | wazimap_ng/datasets/migrations/0017_auto_20200102_0938.py | arghyaiitb/wazimap-ng | 2a77860526d865b8fd0c22a2204f121fdb3b28a0 | [
"Apache-2.0"
] | 11 | 2019-12-31T20:27:22.000Z | 2022-03-10T03:55:38.000Z | wazimap_ng/datasets/migrations/0017_auto_20200102_0938.py | arghyaiitb/wazimap-ng | 2a77860526d865b8fd0c22a2204f121fdb3b28a0 | [
"Apache-2.0"
] | 164 | 2020-02-06T15:02:22.000Z | 2022-03-30T22:42:00.000Z | wazimap_ng/datasets/migrations/0017_auto_20200102_0938.py | arghyaiitb/wazimap-ng | 2a77860526d865b8fd0c22a2204f121fdb3b28a0 | [
"Apache-2.0"
] | 16 | 2020-01-03T20:30:24.000Z | 2022-01-11T11:05:15.000Z | # Generated by Django 2.2.9 on 2020-01-02 09:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('datasets', '0016_auto_20200101_2051'),
]
operations = [
migrations.AlterField(
model_name='data... | 37.866667 | 201 | 0.629695 |
34c9c097fbfd5a4b8c6c241cdcbe45f924bc9481 | 11,838 | py | Python | pandas/tests/extension/base/setitem.py | Pawel-Kranzberg/pandas | 6f90cb3d7bd5891d15a427252fba00027ca6084d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-05-07T04:58:36.000Z | 2021-05-07T04:58:59.000Z | pandas/tests/extension/base/setitem.py | Pawel-Kranzberg/pandas | 6f90cb3d7bd5891d15a427252fba00027ca6084d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/extension/base/setitem.py | Pawel-Kranzberg/pandas | 6f90cb3d7bd5891d15a427252fba00027ca6084d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-06-16T07:19:12.000Z | 2021-12-16T10:24:44.000Z | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.tests.extension.base.base import BaseExtensionTests
class BaseSetitemTests(BaseExtensionTests):
@pytest.fixture(
params=[
lambda x: x.index,
lambda x: list(x.index),
lambda x:... | 32.97493 | 88 | 0.562257 |
1e6243a4e119f31d2f0e17d6e00e65203847cf9d | 623 | py | Python | GeeProxy/items.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 2 | 2020-10-12T05:31:36.000Z | 2020-11-30T07:39:06.000Z | GeeProxy/items.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 1 | 2021-04-19T11:14:59.000Z | 2021-04-19T11:14:59.000Z | GeeProxy/items.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 1 | 2021-09-30T04:36:10.000Z | 2021-09-30T04:36:10.000Z | '''
@Author: qinzhonghe96@163.com
@Date: 2020-03-01 02:10:32
@LastEditors: qinzhonghe96@163.com
@LastEditTime: 2020-03-06 16:37:56
@Description: 定义数据字段
'''
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scra... | 18.323529 | 52 | 0.662921 |
75c8304466deeb9a25e0eb93dc1426dc9fe8cb78 | 68,431 | py | Python | venv/Lib/site-packages/PySide2/examples/widgets/animation/appchooser/appchooser_rc.py | DoesArt-Studios/RamBrowse | a81da53e04d265d17e76855e7affc11130ee6120 | [
"MIT"
] | 1 | 2020-05-18T06:35:36.000Z | 2020-05-18T06:35:36.000Z | venv/Lib/site-packages/PySide2/examples/widgets/animation/appchooser/appchooser_rc.py | DoesArt-Studios/RamBrowse | a81da53e04d265d17e76855e7affc11130ee6120 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/PySide2/examples/widgets/animation/appchooser/appchooser_rc.py | DoesArt-Studios/RamBrowse | a81da53e04d265d17e76855e7affc11130ee6120 | [
"MIT"
] | null | null | null | # Resource object code (Python 3)
# Created by: object code
# Created by: The Resource Compiler for Qt version 5.14.2
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore
qt_resource_data = b"\
\x00\x00\x13\x09\
\x89\
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
\x00\x00@\x00\x00\x00@\x08... | 48.021754 | 96 | 0.710804 |
69d0e8958bb48c98202fcefd129fac210854ac41 | 23,434 | py | Python | custom_components/stampar_pelud/sensor.py | kpisacic/Stampar-Peludna-home-assistant-custom-component | 70dd5c9fdf6d17084447b4fe96788f9b3a283aa1 | [
"MIT"
] | null | null | null | custom_components/stampar_pelud/sensor.py | kpisacic/Stampar-Peludna-home-assistant-custom-component | 70dd5c9fdf6d17084447b4fe96788f9b3a283aa1 | [
"MIT"
] | null | null | null | custom_components/stampar_pelud/sensor.py | kpisacic/Stampar-Peludna-home-assistant-custom-component | 70dd5c9fdf6d17084447b4fe96788f9b3a283aa1 | [
"MIT"
] | null | null | null | """Sensor for the Štamper Peludna Prognoza."""
from datetime import timedelta, datetime, date
import logging
import voluptuous as vol
import requests
import lxml
from bs4 import BeautifulSoup
from homeassistant.const import (
CONF_NAME,
CONF_LATITUDE,
CONF_LONGITUDE,
__version__,
)
import... | 49.438819 | 158 | 0.528591 |
094e29c091486fef55fdcaed8f0be586d3c0c9d5 | 2,956 | py | Python | dev/circleci_data/test_external_utils.py | FCP-INDI/C-PAC | 07d59f63ad716485ab0cf96e84f5d9a531312e9e | [
"BSD-3-Clause"
] | 125 | 2015-03-04T09:14:46.000Z | 2022-03-29T07:46:12.000Z | dev/circleci_data/test_external_utils.py | FCP-INDI/C-PAC | 07d59f63ad716485ab0cf96e84f5d9a531312e9e | [
"BSD-3-Clause"
] | 1,018 | 2015-01-04T16:01:29.000Z | 2022-03-31T19:23:09.000Z | dev/circleci_data/test_external_utils.py | shnizzedy/C-PAC | f33bbe64ea796a0e6f586d09cc90cf4a0a432b17 | [
"BSD-3-Clause"
] | 117 | 2015-01-10T08:05:52.000Z | 2022-01-18T05:16:51.000Z | import os
import sys
from pathlib import Path
CPAC_DIR = str(Path(__file__).parent.parent.parent)
sys.path.append(CPAC_DIR)
DATA_DIR = os.path.join(CPAC_DIR, 'dev', 'circleci_data')
from CPAC.__main__ import utils as CPAC_main_utils # noqa E402
def test_build_data_config(cli_runner):
os.chdir(DATA_DIR)
te... | 26.630631 | 77 | 0.662043 |
32b1cf50df923d9fa80847f4fc19b9cfe7ee07bb | 746 | py | Python | tests.py | leehonel/alertingSequel | a0ef8e84263d1b0c5b1e6acd5ad8b582072e52b9 | [
"Apache-2.0"
] | null | null | null | tests.py | leehonel/alertingSequel | a0ef8e84263d1b0c5b1e6acd5ad8b582072e52b9 | [
"Apache-2.0"
] | null | null | null | tests.py | leehonel/alertingSequel | a0ef8e84263d1b0c5b1e6acd5ad8b582072e52b9 | [
"Apache-2.0"
] | null | null | null |
import unittest
import requests
from timetabling_api import Students, Lessons
class StudentDetailsTestCase(unittest.TestCase):
#test for get StudentDetails
def test_get_data(self):
#test get data
get_data = 'data'
self.assertEqual(get_data, 'data')
def test_post_data(self):
#test for post data
post_dat... | 22.606061 | 48 | 0.764075 |
28100ce4566f1fdb7c241800687f664f1cd2b589 | 9,532 | py | Python | Lib/test/test_stat.py | devnexen/RustPython | 345a4f912c83ce723fc859ab934c17ffe3f2b57a | [
"CC-BY-4.0",
"MIT"
] | 2 | 2021-09-03T16:15:06.000Z | 2021-09-03T16:19:28.000Z | Lib/test/test_stat.py | devnexen/RustPython | 345a4f912c83ce723fc859ab934c17ffe3f2b57a | [
"CC-BY-4.0",
"MIT"
] | 1 | 2021-12-19T19:41:36.000Z | 2021-12-19T19:41:36.000Z | Lib/test/test_stat.py | devnexen/RustPython | 345a4f912c83ce723fc859ab934c17ffe3f2b57a | [
"CC-BY-4.0",
"MIT"
] | 1 | 2020-08-04T12:13:42.000Z | 2020-08-04T12:13:42.000Z | import unittest
import os
import socket
import sys
from test.support import skip_unless_bind_unix_socket
from test.support.os_helper import TESTFN
from test.support.import_helper import import_fresh_module
c_stat = import_fresh_module('stat', fresh=['_stat'])
py_stat = import_fresh_module('stat', blocked=['_stat'])
c... | 33.681979 | 77 | 0.583718 |
9bba0d28aad2934c67ef242b7f89ab9996e6c33b | 63 | py | Python | katas/kyu_7/where_is_vasya.py | the-zebulan/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 40 | 2016-03-09T12:26:20.000Z | 2022-03-23T08:44:51.000Z | katas/kyu_7/where_is_vasya.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | null | null | null | katas/kyu_7/where_is_vasya.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 36 | 2016-11-07T19:59:58.000Z | 2022-03-31T11:18:27.000Z | def where_is_he(p, bef, aft):
return min(p - bef, aft + 1)
| 21 | 32 | 0.603175 |
0d95bfe68320b8af5806f943782732f376a4d693 | 1,460 | py | Python | homeassistant/components/mobile_app/__init__.py | DieterChmod/home-assistant | 9aad20be283182daeec9c06ba08e54b1c3c05ff5 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/mobile_app/__init__.py | DieterChmod/home-assistant | 9aad20be283182daeec9c06ba08e54b1c3c05ff5 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/mobile_app/__init__.py | DieterChmod/home-assistant | 9aad20be283182daeec9c06ba08e54b1c3c05ff5 | [
"Apache-2.0"
] | null | null | null | """Integrates Native Apps to Home Assistant."""
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
from .const import (DATA_DELETED_IDS, DATA_REGISTRATIONS, DATA_STORE, DOMAIN,
STORAGE_KEY, STORAGE_VERSION)
from .http_api import register_http_handlers
from .webhook import regis... | 37.435897 | 78 | 0.715753 |
ddc0af17c35a9e6aab59fbd9af939bfe4597f6ab | 9,919 | py | Python | zaza/charm_lifecycle/func_test_runner.py | coreycb/zaza | 468245ac4fb4016648d8b3c35a64623dafb0d001 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/charm_lifecycle/func_test_runner.py | coreycb/zaza | 468245ac4fb4016648d8b3c35a64623dafb0d001 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/charm_lifecycle/func_test_runner.py | coreycb/zaza | 468245ac4fb4016648d8b3c35a64623dafb0d001 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2020 Canonical 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 writin... | 37.149813 | 80 | 0.626474 |
469ddb190ab689e4999e0d0a6ec8562eb05f4f19 | 11,477 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20200601/network_virtual_appliance.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20200601/network_virtual_appliance.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20200601/network_virtual_appliance.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 43.97318 | 672 | 0.668293 |
b7c9c6afb6ce32203c4861fb156f9a2c3e448e27 | 534 | py | Python | colossalai/nn/metric/accuracy_2p5d.py | xdjiangkai/ColossalAI | 4a3d3446b04065fa1c89b78cba673e96115c6325 | [
"Apache-2.0"
] | null | null | null | colossalai/nn/metric/accuracy_2p5d.py | xdjiangkai/ColossalAI | 4a3d3446b04065fa1c89b78cba673e96115c6325 | [
"Apache-2.0"
] | null | null | null | colossalai/nn/metric/accuracy_2p5d.py | xdjiangkai/ColossalAI | 4a3d3446b04065fa1c89b78cba673e96115c6325 | [
"Apache-2.0"
] | 1 | 2022-01-06T17:16:32.000Z | 2022-01-06T17:16:32.000Z | import torch
from colossalai.nn.layer.parallel_2p5d import reduce_by_batch_2p5d
from torch import nn
from ._utils import calc_acc
class Accuracy2p5D(nn.Module):
"""
Accuracy for 2p5D parallelism
:param logits: predicted labels
:param targets: true labels
"""
def __init__(self):
super... | 23.217391 | 66 | 0.677903 |
9916ee1398c08891f523066ab3db05ddffccca7f | 29,648 | py | Python | software/reach_master/reachmaster/settings/camera_settings.py | luzgool/ReachMaster | e7ef5087fb4e5c55e0b680fc00391f2f8cdc5367 | [
"BSD-3-Clause-LBNL"
] | 2 | 2020-09-19T21:04:59.000Z | 2021-07-27T15:57:49.000Z | software/reach_master/reachmaster/settings/camera_settings.py | luzgool/ReachMaster | e7ef5087fb4e5c55e0b680fc00391f2f8cdc5367 | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-02-16T21:53:00.000Z | 2021-02-16T21:53:00.000Z | software/reach_master/reachmaster/settings/camera_settings.py | luzgool/ReachMaster | e7ef5087fb4e5c55e0b680fc00391f2f8cdc5367 | [
"BSD-3-Clause-LBNL"
] | 4 | 2020-02-08T22:41:35.000Z | 2021-09-10T20:33:00.000Z | """The camera settings window is opened as a child of the
ReachMaster root application. It is designed, mainly to
specify settings required by Ximea USB3.0 cameras via the
camera interface module and the Ximea API. It provides
functionality for specifying the number of cameras, setting
their intrinsic parameters (... | 42.597701 | 103 | 0.56223 |
f95a0b7efdd809ba536472e9eb764b45899c549a | 7,715 | py | Python | data/base_dataset.py | yeyekurong/Guoqiang_PTD-Net | 825c6e9b11c7152067e9d0875dff21137965222c | [
"MIT"
] | 2 | 2022-01-03T13:44:50.000Z | 2022-03-23T03:48:23.000Z | data/base_dataset.py | yeyekurong/Guoqiang_PTD-Net | 825c6e9b11c7152067e9d0875dff21137965222c | [
"MIT"
] | null | null | null | data/base_dataset.py | yeyekurong/Guoqiang_PTD-Net | 825c6e9b11c7152067e9d0875dff21137965222c | [
"MIT"
] | null | null | null | """This module implements an abstract base class (ABC) 'BaseDataset' for datasets.
It also includes common transformation functions (e.g., get_transform, __scale_width), which can be later used in subclasses.
"""
import random
import torch
#torch.set_printoptions(profile="full")
import numpy as np
import torch.utils.d... | 34.909502 | 141 | 0.641996 |
4a6bbc90c26dc1db7360821d116ae5d5d363326f | 936 | py | Python | contributions/api/models/capabilities/environmentvariable.py | jsafoan/rokwire-building-blocks-api | 83e9f02122e17bf3a20e7ff3843afaccaeeb3387 | [
"Apache-2.0"
] | 1 | 2022-01-13T12:21:39.000Z | 2022-01-13T12:21:39.000Z | contributions/api/models/capabilities/environmentvariable.py | jsafoan/rokwire-building-blocks-api | 83e9f02122e17bf3a20e7ff3843afaccaeeb3387 | [
"Apache-2.0"
] | 313 | 2019-04-12T22:00:21.000Z | 2022-03-31T20:47:11.000Z | contributions/api/models/capabilities/environmentvariable.py | jsafoan/rokwire-building-blocks-api | 83e9f02122e17bf3a20e7ff3843afaccaeeb3387 | [
"Apache-2.0"
] | 6 | 2019-04-04T13:19:07.000Z | 2021-12-02T05:28:38.000Z | # Copyright 2020 Board of Trustees of the University of Illinois.
#
# 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 ... | 30.193548 | 75 | 0.696581 |
188ad25b37008ee8493ce8727c428c041ead284a | 2,565 | py | Python | hummingbot/connector/exchange/alpaca/alpaca_user_stream_tracker.py | Chigag-Studio/colibribot | 70a8f3a0af2cef948cbad793369da9c97c8005f9 | [
"Apache-2.0"
] | null | null | null | hummingbot/connector/exchange/alpaca/alpaca_user_stream_tracker.py | Chigag-Studio/colibribot | 70a8f3a0af2cef948cbad793369da9c97c8005f9 | [
"Apache-2.0"
] | null | null | null | hummingbot/connector/exchange/alpaca/alpaca_user_stream_tracker.py | Chigag-Studio/colibribot | 70a8f3a0af2cef948cbad793369da9c97c8005f9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import asyncio
from typing import List, Optional
from hummingbot.connector.exchange.alpaca.alpaca_api_user_stream_data_source import AlpacaAPIUserStreamDataSource
from hummingbot.connector.exchange.alpaca.alpaca_auth import AlpacaAuth
from hummingbot.connector.exchange.alpaca.alpaca_constants im... | 39.461538 | 113 | 0.710331 |
3689a1364880a89dc95b29606b08af6dbab5ce19 | 20,444 | py | Python | swift/obj/ssync_sender.py | hashsos/hashcloudos-swift | 25db6f317de58a9da226f97f0e2eedac658a0042 | [
"Apache-2.0"
] | 1 | 2019-05-25T10:55:58.000Z | 2019-05-25T10:55:58.000Z | swift/obj/ssync_sender.py | hashsos/hashcloudos-swift | 25db6f317de58a9da226f97f0e2eedac658a0042 | [
"Apache-2.0"
] | 12 | 2015-06-23T23:20:17.000Z | 2016-01-27T00:37:12.000Z | swift/obj/ssync_sender.py | hashsos/hashcloudos-swift | 25db6f317de58a9da226f97f0e2eedac658a0042 | [
"Apache-2.0"
] | 5 | 2015-06-04T19:00:11.000Z | 2015-12-16T21:04:33.000Z | # Copyright (c) 2013 OpenStack Foundation
#
# 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 ... | 44.833333 | 79 | 0.568186 |
4e3234d38cc9affe4edb7d586bca453b59815451 | 11,291 | py | Python | sdk/python/pulumi_azure_native/network/v20191201/flow_log.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20191201/flow_log.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20191201/flow_log.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 46.085714 | 1,215 | 0.656983 |
d95135b79d676bb7b44452f60eaefc0c48f6b278 | 454 | py | Python | nmbs-realtime/config.py | datamindedbe/nmbs-realtime-serverless | d4250f3ab02f5209574e3025c64fb8a553c57274 | [
"Apache-2.0"
] | null | null | null | nmbs-realtime/config.py | datamindedbe/nmbs-realtime-serverless | d4250f3ab02f5209574e3025c64fb8a553c57274 | [
"Apache-2.0"
] | null | null | null | nmbs-realtime/config.py | datamindedbe/nmbs-realtime-serverless | d4250f3ab02f5209574e3025c64fb8a553c57274 | [
"Apache-2.0"
] | null | null | null | import json
class Config:
def __init__(self, path='../config.json'):
with open(path) as data_file:
data = json.load(data_file)
self.bucket = data['bucket']
self.key_prefix = data['key_prefix']
self.connection_string = data['connection_string']
self.connection_st... | 34.923077 | 70 | 0.647577 |
1825198ce660b822d34f8c673e3767d003306bad | 1,055 | py | Python | test/kernels/test_periodic_kernel.py | julieli/gpytorch | 21f08b6067a3733ffd9d729a1ce25487976f927e | [
"MIT"
] | 1 | 2018-05-30T07:32:29.000Z | 2018-05-30T07:32:29.000Z | test/kernels/test_periodic_kernel.py | julieli/gpytorch | 21f08b6067a3733ffd9d729a1ce25487976f927e | [
"MIT"
] | null | null | null | test/kernels/test_periodic_kernel.py | julieli/gpytorch | 21f08b6067a3733ffd9d729a1ce25487976f927e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import math
import torch
import unittest
from torch.autograd import Variable
from gpytorch.kernels import PeriodicKernel
class TestPeriodicKernel(unittest.TestCase):
... | 28.513514 | 88 | 0.642654 |
bfc6709a0b84a4e189b77588a800d2240e96ed84 | 2,512 | py | Python | djangoapp/auction/requests/product_requests.py | vojta-janousek/Applifting-Microservice | 0f66e013aa78d23972c02a79acae092b3f35281b | [
"MIT"
] | null | null | null | djangoapp/auction/requests/product_requests.py | vojta-janousek/Applifting-Microservice | 0f66e013aa78d23972c02a79acae092b3f35281b | [
"MIT"
] | 1 | 2020-02-24T09:50:56.000Z | 2020-02-24T09:50:56.000Z | djangoapp/auction/requests/product_requests.py | vojta-janousek/Applifting-Microservice | 0f66e013aa78d23972c02a79acae092b3f35281b | [
"MIT"
] | null | null | null | import requests
import json
from unittest import TestCase
class ProductRequestTests(TestCase):
'''
These would be tested in random order, which would not have worked.
As a result, they have all been conglomerated into a single test method.
'''
def setUp(self):
self.domain = 'http://local... | 34.888889 | 76 | 0.560111 |
462ef0f93b7af7c52a4f221ecefb97686cb76b7c | 1,755 | py | Python | ej_3/main_xor.py | tdallas/sia-tp3 | d1710d52796f4e19a428fc4b822bf1c42507e7a8 | [
"MIT"
] | null | null | null | ej_3/main_xor.py | tdallas/sia-tp3 | d1710d52796f4e19a428fc4b822bf1c42507e7a8 | [
"MIT"
] | null | null | null | ej_3/main_xor.py | tdallas/sia-tp3 | d1710d52796f4e19a428fc4b822bf1c42507e7a8 | [
"MIT"
] | null | null | null | from numpy import exp, array, random, dot
from multilayer_perceptron import MultilayerPerceptron, NeuronLayer
#Seed the random number generator
random.seed(1)
hidden_layer_1 = NeuronLayer(5, 2)
hidden_layer_2 = NeuronLayer(5, 5)
# hidden_layer_3 = NeuronLayer(5, 5)
# hidden_layer_4 = NeuronLayer(5, 5)
# hidden_layer_... | 32.5 | 79 | 0.71567 |
6366b23d9f380eb94c2b23a21467cb233b78d025 | 676 | py | Python | joblib/externals/loky/backend/compat.py | collijk/joblib | b0bc5dd24b123b445965a5f4d487beaf6fadd083 | [
"BSD-3-Clause"
] | 1 | 2019-07-16T10:25:24.000Z | 2019-07-16T10:25:24.000Z | joblib/externals/loky/backend/compat.py | collijk/joblib | b0bc5dd24b123b445965a5f4d487beaf6fadd083 | [
"BSD-3-Clause"
] | 1 | 2020-02-17T00:13:09.000Z | 2020-02-17T00:13:09.000Z | joblib/externals/loky/backend/compat.py | jdanbrown/joblib | e205833ed42f0f1c72d69d96f4c266734cea9d95 | [
"BSD-3-Clause"
] | 1 | 2019-03-25T09:56:23.000Z | 2019-03-25T09:56:23.000Z | # flake8: noqa
###############################################################################
# Compat file to import the correct modules for each platform and python
# version.
#
# author: Thomas Moreau and Olivier grisel
#
import sys
if sys.version_info[:2] >= (3, 3):
import queue
from _pickle import Pickli... | 25.037037 | 79 | 0.64645 |
ba23faaf457655823eb02b059cfee1e5ce34a6ae | 3,822 | py | Python | python/ray/air/batch_predictor.py | shrekris-anyscale/ray | d36fd77548e1d83d6510b478f72ac668434458af | [
"Apache-2.0"
] | null | null | null | python/ray/air/batch_predictor.py | shrekris-anyscale/ray | d36fd77548e1d83d6510b478f72ac668434458af | [
"Apache-2.0"
] | 12 | 2022-03-05T05:37:28.000Z | 2022-03-19T07:14:43.000Z | python/ray/air/batch_predictor.py | shrekris-anyscale/ray | d36fd77548e1d83d6510b478f72ac668434458af | [
"Apache-2.0"
] | null | null | null | from typing import Type, Optional, Dict, Any
import ray
from ray.air import Checkpoint
from ray.air.predictor import Predictor
from ray.air.util.data_batch_conversion import convert_batch_type_to_pandas
from ray.util.annotations import PublicAPI
@PublicAPI(stability="alpha")
class BatchPredictor:
"""Batch predic... | 36.4 | 88 | 0.657509 |
1df57ccf329f2e8e3139ba94dbedcee3025f12d5 | 25,659 | py | Python | RRtoolbox/lib/directory.py | davtoh/RRTools | 6dde2d4622719d9031bf21ffbf7723231a0e2003 | [
"BSD-3-Clause"
] | 1 | 2019-07-16T03:54:22.000Z | 2019-07-16T03:54:22.000Z | RRtoolbox/lib/directory.py | davtoh/RRTools | 6dde2d4622719d9031bf21ffbf7723231a0e2003 | [
"BSD-3-Clause"
] | null | null | null | RRtoolbox/lib/directory.py | davtoh/RRTools | 6dde2d4622719d9031bf21ffbf7723231a0e2003 | [
"BSD-3-Clause"
] | 1 | 2019-07-09T02:49:06.000Z | 2019-07-09T02:49:06.000Z | # -*- coding: utf-8 -*-
"""
This module holds all path manipulation methods and a string concept called directory (referenced paths and strings)
designed to support :mod:`config` and be used with :mod:`session`.
keywords:
----------
*path*: it can be to a folder or file or url if specified
*filename*: the file name wi... | 32.316121 | 116 | 0.594255 |
b2167b9500ec92da1b42fa9d2ddf22efea48844b | 1,158 | py | Python | built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/mmdet/models/detectors/retinanet.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/mmdet/models/detectors/retinanet.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/mmdet/models/detectors/retinanet.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # Copyright 2021 Huawei Technologies Co., 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 agree... | 36.1875 | 77 | 0.670121 |
f6157097a0d84e1b377b8833d10004dd1f5989c7 | 1,793 | py | Python | tempest/lib/services/identity/v3/role_assignments_client.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 254 | 2015-01-05T19:22:52.000Z | 2022-03-29T08:14:54.000Z | tempest/lib/services/identity/v3/role_assignments_client.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 13 | 2015-03-02T15:53:04.000Z | 2022-02-16T02:28:14.000Z | tempest/lib/services/identity/v3/role_assignments_client.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 367 | 2015-01-07T15:05:39.000Z | 2022-03-04T09:50:35.000Z | # Copyright 2016 Red Hat, 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 writing, ... | 35.86 | 79 | 0.668712 |
082749bc63c121d833b699db0af915c2910a6eb3 | 2,157 | py | Python | examples/05-vector/05-bayes.py | jaychoo/pattern | 35b33de6a4cb5db516ec03e70f6d16e02d5743a1 | [
"BSD-3-Clause"
] | 1 | 2019-04-03T15:20:51.000Z | 2019-04-03T15:20:51.000Z | examples/05-vector/05-bayes.py | mrocklin/pattern | ab7b3ac05ff68df09e478181dac5d635c6c5ebd2 | [
"BSD-3-Clause"
] | null | null | null | examples/05-vector/05-bayes.py | mrocklin/pattern | ab7b3ac05ff68df09e478181dac5d635c6c5ebd2 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T08:46:59.000Z | 2020-10-15T08:46:59.000Z | import os, sys; sys.path.insert(0, os.path.join("..", ".."))
import os
import glob
from pattern.vector import Document, Corpus, Bayes, KNN, features, distance, Vector, _distance, COSINE, kdtree
#from pattern.web import PDF
##pdf = PDF(open("/users/tom/downloads/10-1.1.1.61.7217.pdf", "rb").read())
#pdf = PDF(open("/... | 23.445652 | 110 | 0.622624 |
cdbc0f8751600b3a7caa1704626be972df7f15a6 | 2,722 | py | Python | opencenter/webapp/auth.py | oolorg/opencenter | 689805f663ce9332b2502f98c384a7b4d9d46ce4 | [
"Apache-2.0"
] | null | null | null | opencenter/webapp/auth.py | oolorg/opencenter | 689805f663ce9332b2502f98c384a7b4d9d46ce4 | [
"Apache-2.0"
] | null | null | null | opencenter/webapp/auth.py | oolorg/opencenter | 689805f663ce9332b2502f98c384a7b4d9d46ce4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# OpenCenter(TM) is Copyright 2013 by Rackspace US, Inc.
##############################################################################
#
# OpenCenter is licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | 35.350649 | 79 | 0.631521 |
9e9283e491e36aadab35a1e917ffc2ecc8915c19 | 397 | py | Python | django_map/asgi.py | vujani/django_map | aef2f8691d2a1e035f60aaf2c93c1e264ed0168b | [
"MIT"
] | null | null | null | django_map/asgi.py | vujani/django_map | aef2f8691d2a1e035f60aaf2c93c1e264ed0168b | [
"MIT"
] | null | null | null | django_map/asgi.py | vujani/django_map | aef2f8691d2a1e035f60aaf2c93c1e264ed0168b | [
"MIT"
] | 1 | 2021-03-15T06:41:12.000Z | 2021-03-15T06:41:12.000Z | """
ASGI config for django_map project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
290fd75f0e7a81e1d66ff39e174724d7d3e90b39 | 17,304 | py | Python | samtranslator/model/stepfunctions/events.py | ejafarli/serverless-application-model | 6355433d1f0dec8624417180b0c989afd2d2930a | [
"Apache-2.0"
] | 1 | 2020-10-27T14:27:14.000Z | 2020-10-27T14:27:14.000Z | samtranslator/model/stepfunctions/events.py | ejafarli/serverless-application-model | 6355433d1f0dec8624417180b0c989afd2d2930a | [
"Apache-2.0"
] | null | null | null | samtranslator/model/stepfunctions/events.py | ejafarli/serverless-application-model | 6355433d1f0dec8624417180b0c989afd2d2930a | [
"Apache-2.0"
] | null | null | null | from six import string_types
import json
from samtranslator.model import PropertyType, ResourceMacro
from samtranslator.model.events import EventsRule
from samtranslator.model.iam import IAMRole, IAMRolePolicies
from samtranslator.model.types import dict_of, is_str, is_type, list_of, one_of
from samtranslator.model.in... | 43.044776 | 123 | 0.634189 |
a258fb7d9fe196dfc683f5ffe696ffc49e148f08 | 1,005 | py | Python | label_studio/ml/migrations/0004_auto_20210820_1610.py | mehdibenamorr/label-studio | 213252d360b028eb031ca127969fb35a897dc2b6 | [
"Apache-2.0"
] | 8,264 | 2019-06-25T23:08:05.000Z | 2022-03-31T18:48:34.000Z | label_studio/ml/migrations/0004_auto_20210820_1610.py | mehdibenamorr/label-studio | 213252d360b028eb031ca127969fb35a897dc2b6 | [
"Apache-2.0"
] | 1,446 | 2019-08-02T13:46:25.000Z | 2022-03-31T23:09:32.000Z | label_studio/ml/migrations/0004_auto_20210820_1610.py | epoch8/label-studio | 5f413c12f8ed5bcb932831bf6a69819ce0fe5f6a | [
"Apache-2.0"
] | 1,092 | 2019-07-02T16:36:35.000Z | 2022-03-31T20:01:19.000Z | # Generated by Django 3.1.12 on 2021-08-20 16:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ml', '0003_auto_20210309_1239'),
]
operations = [
migrations.AddField(
model_name='mlbackend',
name='is_interactive... | 34.655172 | 193 | 0.635821 |
47efda709f4afdf12654b3c4292f0e5dbd9f69ec | 283 | py | Python | test/data/getKeys.py | felipe9962/AutomaticDriving | a17ab76f54eb5094739da68a59fb77eb9843a91a | [
"MIT"
] | 12 | 2018-11-27T06:10:50.000Z | 2022-01-13T02:11:42.000Z | test/data/getKeys.py | felipe9962/AutomaticDriving | a17ab76f54eb5094739da68a59fb77eb9843a91a | [
"MIT"
] | 7 | 2017-07-08T10:42:55.000Z | 2020-11-10T20:45:13.000Z | test/data/getKeys.py | felipe9962/AutomaticDriving | a17ab76f54eb5094739da68a59fb77eb9843a91a | [
"MIT"
] | 6 | 2017-08-04T13:09:02.000Z | 2021-04-25T09:26:56.000Z | import win32api as wapi
import time
keyList = ["\b"]
for char in "ABCDEFGHIJKLMNOPQRSTUVWXYZ 123456789,.'£$/\\":
keyList.append(char)
def key_check():
keys = []
for key in keyList:
if wapi.GetAsyncKeyState(ord(key)):
keys.append(key)
return keys | 21.769231 | 59 | 0.639576 |
a51ffbd6fb3d803d78d2a077371b0a90767800de | 7,354 | py | Python | clients/python/generated/swaggeraem/models/saml_configuration_property_items_boolean.py | hoomaan-kh/swagger-aem | 0b19225bb6e071df761d176cbc13565891fe895f | [
"Apache-2.0"
] | null | null | null | clients/python/generated/swaggeraem/models/saml_configuration_property_items_boolean.py | hoomaan-kh/swagger-aem | 0b19225bb6e071df761d176cbc13565891fe895f | [
"Apache-2.0"
] | null | null | null | clients/python/generated/swaggeraem/models/saml_configuration_property_items_boolean.py | hoomaan-kh/swagger-aem | 0b19225bb6e071df761d176cbc13565891fe895f | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Adobe Experience Manager (AEM) API
Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API # noqa: E501
OpenAPI spec version: 3.2.0-pre.0
Contact: opensource@shinesolutions.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re ... | 28.726563 | 117 | 0.598586 |
424e98d4090947b18f7ba0f1c2560858a454e184 | 338 | py | Python | sympy/polys/domains/characteristiczero.py | eriknw/sympy | b7544e2bb74c011f6098a7e886fd77f41776c2c4 | [
"BSD-3-Clause"
] | 7 | 2015-01-14T06:55:33.000Z | 2018-08-11T14:43:52.000Z | sympy/polys/domains/characteristiczero.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | 1 | 2018-02-19T04:56:04.000Z | 2018-02-19T04:56:04.000Z | sympy/polys/domains/characteristiczero.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | 1 | 2016-04-24T14:39:22.000Z | 2016-04-24T14:39:22.000Z | """Implementaton of :class:`CharacteristicZero` class. """
from sympy.polys.domains.domain import Domain
class CharacteristicZero(Domain):
"""Domain that has infinite number of elements. """
has_CharacteristicZero = True
def characteristic(self):
"""Return the characteristic of this domain. """... | 24.142857 | 58 | 0.701183 |
daada9773db2c0c08a803a438ee669211221d2d4 | 542 | py | Python | sample-config.py | justinsitarz/intercom-slack | 6eb50e141ab20c1123c0f84e42e2dd091ee71738 | [
"MIT"
] | null | null | null | sample-config.py | justinsitarz/intercom-slack | 6eb50e141ab20c1123c0f84e42e2dd091ee71738 | [
"MIT"
] | null | null | null | sample-config.py | justinsitarz/intercom-slack | 6eb50e141ab20c1123c0f84e42e2dd091ee71738 | [
"MIT"
] | null | null | null | slack_url = ''
intercom_account_id = ''
intercom_bearer_token = ''
config = { 'intercom_conv_url': 'https://api.intercom.io/conversations',
'intercom_user_url': 'https://api.intercom.io/users/',
'slack_headers': { 'Content-type': 'application/json' },
'slack_url': slack_url,
'intercom_link... | 36.133333 | 111 | 0.654982 |
d62c5d5a9b3db9db3f1f7fb72ae98390ec557bc1 | 58,047 | py | Python | iotbx/shelx/tst_lex_parse_build.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | iotbx/shelx/tst_lex_parse_build.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | iotbx/shelx/tst_lex_parse_build.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
from cctbx import crystal
from cctbx import uctbx
from cctbx import sgtbx
from cctbx import adptbx
from cctbx import xray
from iotbx import shelx
from iotbx.shelx import crystal_symmetry_from_ins
from iotbx.shelx import tokens
import iotbx.builders
from libtbx.test_utils import approx_eq... | 38.518248 | 83 | 0.648802 |
5ee28bb2ed02027c6c43082f7353de4b3cd37753 | 2,710 | py | Python | ui_automation_tests/step_defs/test_filter_cases.py | uktrade/lite-internal-frontend | 39151854b1225f7956963a22ef1a8beb6897eccf | [
"MIT"
] | 4 | 2019-05-31T06:57:25.000Z | 2020-01-31T14:20:29.000Z | ui_automation_tests/step_defs/test_filter_cases.py | uktrade/lite-internal-frontend | 39151854b1225f7956963a22ef1a8beb6897eccf | [
"MIT"
] | 32 | 2019-04-03T15:16:36.000Z | 2020-07-22T14:11:07.000Z | ui_automation_tests/step_defs/test_filter_cases.py | uktrade/lite-internal-frontend | 39151854b1225f7956963a22ef1a8beb6897eccf | [
"MIT"
] | null | null | null | from pytest_bdd import when, then, parsers, scenarios
from pages.queues_pages import QueuesPages
from pages.shared import Shared
from shared import functions
from ui_automation_tests.pages.case_list_page import CaseListPage
scenarios("../features/filter_cases.feature", strict_gherkin=False)
@when("case has been mov... | 35.194805 | 114 | 0.796679 |
b1e538b11cf4032d56086a2af1ae0fd0004e9167 | 3,241 | py | Python | opwen_email_server/config.py | kulado/mailserver | d05c0b2e8d8c97b7b7a08028a9eacd4427a59c4b | [
"Apache-2.0"
] | null | null | null | opwen_email_server/config.py | kulado/mailserver | d05c0b2e8d8c97b7b7a08028a9eacd4427a59c4b | [
"Apache-2.0"
] | null | null | null | opwen_email_server/config.py | kulado/mailserver | d05c0b2e8d8c97b7b7a08028a9eacd4427a59c4b | [
"Apache-2.0"
] | null | null | null | from environs import Env
from opwen_email_server.utils.string import urlsafe
env = Env()
STORAGE_PROVIDER = env('LOKOLE_STORAGE_PROVIDER', 'AZURE_BLOBS')
BLOBS_ACCOUNT = env('LOKOLE_EMAIL_SERVER_AZURE_BLOBS_NAME', '')
BLOBS_KEY = env('LOKOLE_EMAIL_SERVER_AZURE_BLOBS_KEY', '')
BLOBS_HOST = env('LOKOLE_EMAIL_SERVER_A... | 46.3 | 96 | 0.811169 |
b85d001f3d4b5f05bdfdc066114052da5f1219c8 | 21,845 | py | Python | mergify_engine/actions/queue.py | mkurz/mergify-engine | b8a72eab44b634678cf65f19b47fc8c0d9edda65 | [
"Apache-2.0"
] | null | null | null | mergify_engine/actions/queue.py | mkurz/mergify-engine | b8a72eab44b634678cf65f19b47fc8c0d9edda65 | [
"Apache-2.0"
] | null | null | null | mergify_engine/actions/queue.py | mkurz/mergify-engine | b8a72eab44b634678cf65f19b47fc8c0d9edda65 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2020–2021 Mergify SAS
#
# 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 appl... | 41.451613 | 104 | 0.606226 |
f9404341772699a188313dd5ba0c84855c5ecc90 | 39,201 | py | Python | test/unit/common/middleware/test_tempurl.py | tsg-/swift-ec | d5cc4d274696b587e820050774db4ca2c3d9c85c | [
"Apache-2.0"
] | null | null | null | test/unit/common/middleware/test_tempurl.py | tsg-/swift-ec | d5cc4d274696b587e820050774db4ca2c3d9c85c | [
"Apache-2.0"
] | null | null | null | test/unit/common/middleware/test_tempurl.py | tsg-/swift-ec | d5cc4d274696b587e820050774db4ca2c3d9c85c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011-2014 Greg Holt
# Copyright (c) 2012-2013 Peter Portante
# Copyright (c) 2012 Iryoung Jeong
# Copyright (c) 2012 Michael Barton
# Copyright (c) 2013 Alex Gaynor
# Copyright (c) 2013 Chuck Thier
# Copyright (c) 2013 David Goetz
# Copyright (c) 2013 Donagh McCabe
# Copyright (c) 2013 Greg Lange
# Copy... | 42.288026 | 79 | 0.579194 |
e86049fb3908320123e20104851bdbfbbba97c89 | 1,393 | py | Python | docushare/client.py | linxsorg/docushare | b1955246cb4791ff367cac37d445fc9afbbc4d59 | [
"ZPL-2.1"
] | null | null | null | docushare/client.py | linxsorg/docushare | b1955246cb4791ff367cac37d445fc9afbbc4d59 | [
"ZPL-2.1"
] | null | null | null | docushare/client.py | linxsorg/docushare | b1955246cb4791ff367cac37d445fc9afbbc4d59 | [
"ZPL-2.1"
] | null | null | null | #!/usr/bin/env python2.7
# vim: fileencoding=cp932 fileformat=dos
"""client - DochShare Client
Copyright (C) 2012 HAYASI Hideki <linxs@linxs.org> All rights reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.1 (ZPL). A copy of the ZPL should accompany this distribut... | 29.638298 | 73 | 0.652548 |
04ba16022b6d298f5ae27b07f9113c8749920533 | 1,301 | py | Python | deputies/urls.py | nmota/public-contracts | b809df82147e5e4fa746416c0f9d51db2c6db05a | [
"BSD-3-Clause"
] | 25 | 2015-03-05T00:15:11.000Z | 2021-04-04T18:50:43.000Z | deputies/urls.py | nmota/public-contracts | b809df82147e5e4fa746416c0f9d51db2c6db05a | [
"BSD-3-Clause"
] | 36 | 2015-03-21T17:04:54.000Z | 2017-07-06T10:35:51.000Z | deputies/urls.py | nmota/public-contracts | b809df82147e5e4fa746416c0f9d51db2c6db05a | [
"BSD-3-Clause"
] | 7 | 2015-03-24T16:18:02.000Z | 2019-05-29T11:51:01.000Z | from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from . import views
from . import views_data
urlpatterns = patterns('',
url(r'^%s/%s$' % (_('deputies'), _('home')), views.home, name='deputies_home'),
url(r'^%s$' % _('dep... | 48.185185 | 102 | 0.475019 |
2f5197d33d002b557016f51b87aa1b01f493114e | 544 | py | Python | mifkit/objects/name.py | CitrineInformatics/mifkit | 1a20b45c6466c12e2009d9092df437e3c8b27261 | [
"Apache-2.0"
] | null | null | null | mifkit/objects/name.py | CitrineInformatics/mifkit | 1a20b45c6466c12e2009d9092df437e3c8b27261 | [
"Apache-2.0"
] | null | null | null | mifkit/objects/name.py | CitrineInformatics/mifkit | 1a20b45c6466c12e2009d9092df437e3c8b27261 | [
"Apache-2.0"
] | null | null | null | from mif_object import MifObject
class Name(MifObject):
"""
Class to store information about the name of a person.
The following fields must be defined:
family
"""
def __init__(self, given=None, family=None, **kwargs):
"""
Constructor.
:param give... | 21.76 | 58 | 0.564338 |
61aa60da241b380b5d8fcf388f81fe8274674361 | 3,934 | py | Python | deepctr_torch/models/afn.py | Fanxingye/DeepRS | 06b98cf2cb2781656805eafc577fbd088f37d17d | [
"Apache-2.0"
] | 1,770 | 2019-09-22T12:30:53.000Z | 2022-03-30T02:03:33.000Z | deepctr_torch/models/afn.py | jyjuni/DeepCTR-Torch | b4d8181e86c2165722fa9331bc16185832596232 | [
"Apache-2.0"
] | 135 | 2019-09-22T17:28:22.000Z | 2022-03-26T07:20:54.000Z | deepctr_torch/models/afn.py | jyjuni/DeepCTR-Torch | b4d8181e86c2165722fa9331bc16185832596232 | [
"Apache-2.0"
] | 497 | 2019-09-22T12:42:02.000Z | 2022-03-28T14:50:56.000Z | # -*- coding:utf-8 -*-
"""
Author:
Weiyu Cheng, weiyu_cheng@sjtu.edu.cn
Reference:
[1] Cheng, W., Shen, Y. and Huang, L. 2020. Adaptive Factorization Network: Learning Adaptive-Order Feature
Interactions. Proceedings of the AAAI Conference on Artificial Intelligence. 34, 04 (Apr. 2020), 3609-3616.
"""... | 52.453333 | 291 | 0.682003 |
233edeb73deb003af4dd8734424cada1718be084 | 363 | py | Python | pyplanter/plants/pineapple.py | nielse63/PiPlanter | 94ed5265fd4d9b4183edd4a67047d976ee5cdd72 | [
"MIT"
] | null | null | null | pyplanter/plants/pineapple.py | nielse63/PiPlanter | 94ed5265fd4d9b4183edd4a67047d976ee5cdd72 | [
"MIT"
] | 118 | 2021-03-08T11:04:41.000Z | 2022-03-31T11:07:05.000Z | pyplanter/plants/pineapple.py | nielse63/PiPlanter | 94ed5265fd4d9b4183edd4a67047d976ee5cdd72 | [
"MIT"
] | null | null | null | from pyplanter.plants.base_plant import BasePlant
class PineApple(BasePlant):
def __init__(self):
super().__init__(
soil_moisture_min=0.25,
soil_moisture_max=0.6,
temperature_min=68,
temperature_max=86,
humidity_min=80,
humidity_max=1... | 24.2 | 49 | 0.578512 |
e221dd65258017cc2529290a1233dec2acefb35b | 16,592 | py | Python | cinder/volume/drivers/datera.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 1 | 2019-02-08T05:24:58.000Z | 2019-02-08T05:24:58.000Z | cinder/volume/drivers/datera.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/datera.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Datera
# 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 applic... | 38.407407 | 79 | 0.579978 |
e87a95158c9064224c81fb546143754d74101fdb | 4,365 | py | Python | salt/utils/powershell.py | ipmb/salt | 699912ef9cde28040378aa53d6c7a12d8af756b1 | [
"Apache-2.0"
] | null | null | null | salt/utils/powershell.py | ipmb/salt | 699912ef9cde28040378aa53d6c7a12d8af756b1 | [
"Apache-2.0"
] | null | null | null | salt/utils/powershell.py | ipmb/salt | 699912ef9cde28040378aa53d6c7a12d8af756b1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Common functions for working with powershell
.. note:: The PSModulePath environment variable should be set to the default
location for PowerShell modules. This applies to all OS'es that support
powershell. If not set, then Salt will attempt to use some default paths.
If Salt can... | 34.92 | 81 | 0.653837 |
cfa0620a0976efce3fbe123775fe8065f0cce1f8 | 18,090 | py | Python | apps/challenges/migrations/0035_auto__add_unique_submissionparent_slug.py | Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803 | 4e374b4d52dfb9039ebe543e7f27682189022307 | [
"BSD-3-Clause"
] | 2 | 2015-04-06T15:20:29.000Z | 2016-12-30T12:25:11.000Z | apps/challenges/migrations/0035_auto__add_unique_submissionparent_slug.py | Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803 | 4e374b4d52dfb9039ebe543e7f27682189022307 | [
"BSD-3-Clause"
] | 2 | 2019-02-17T17:38:02.000Z | 2019-03-28T03:49:16.000Z | apps/challenges/migrations/0035_auto__add_unique_submissionparent_slug.py | Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803 | 4e374b4d52dfb9039ebe543e7f27682189022307 | [
"BSD-3-Clause"
] | 1 | 2019-03-28T03:49:18.000Z | 2019-03-28T03:49:18.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'SubmissionParent', fields ['slug']
db.create_unique('challenges_submissionp... | 78.311688 | 241 | 0.564013 |
de14812da4cbab8dfe169e0a68268beebae12f71 | 230 | py | Python | HeavyFlavorAnalysis/Skimming/python/tauTo3MuSequences_cff.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | HeavyFlavorAnalysis/Skimming/python/tauTo3MuSequences_cff.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | HeavyFlavorAnalysis/Skimming/python/tauTo3MuSequences_cff.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
from HeavyFlavorAnalysis.Skimming.tauTo3MuHLTPath_cfi import *
from HeavyFlavorAnalysis.Skimming.tauTo3MuFilter_cfi import *
tauTo3MuSkim = cms.Sequence(tauTo3MuHLTFilter+tauTo3MuFilter)
| 32.857143 | 62 | 0.869565 |
0edfe293e6956c633a83675cc7900130e9540585 | 1,967 | py | Python | renpy/angle/glblacklist.py | derektoub/Arven-s-DLD-Adventure | 0398f09127f729be9567d0a5d3bf4a6453fa8e48 | [
"CNRI-Python"
] | 1 | 2015-08-13T17:09:40.000Z | 2015-08-13T17:09:40.000Z | renpy/angle/glblacklist.py | derektoub/Arven-s-DLD-Adventure | 0398f09127f729be9567d0a5d3bf4a6453fa8e48 | [
"CNRI-Python"
] | null | null | null | renpy/angle/glblacklist.py | derektoub/Arven-s-DLD-Adventure | 0398f09127f729be9567d0a5d3bf4a6453fa8e48 | [
"CNRI-Python"
] | null | null | null | # This file was automatically generated from renpy/gl/glblacklist.py
# Modifications will be automatically overwritten.
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "S... | 39.34 | 72 | 0.729537 |
5a9f9c2e3dc893531545a84cee361a3d97f4e4a5 | 2,556 | py | Python | tests/sbv_parser.py | caiyunapp/webvtt-py | 9594fb24207a8bc9c7b5a12048cca220e5d26b40 | [
"MIT"
] | null | null | null | tests/sbv_parser.py | caiyunapp/webvtt-py | 9594fb24207a8bc9c7b5a12048cca220e5d26b40 | [
"MIT"
] | null | null | null | tests/sbv_parser.py | caiyunapp/webvtt-py | 9594fb24207a8bc9c7b5a12048cca220e5d26b40 | [
"MIT"
] | 1 | 2019-02-03T03:04:21.000Z | 2019-02-03T03:04:21.000Z | import webvtt
from .generic import GenericParserTestCase
class SBVParserTestCase(GenericParserTestCase):
def test_sbv_parse_empty_file(self):
self.assertRaises(
webvtt.errors.MalformedFileError,
webvtt.from_sbv,
self._get_file('empty.vtt') # We reuse this file as it ... | 32.35443 | 100 | 0.629108 |
8594e3f90401be67c20bbe32e531761774c3932c | 5,581 | py | Python | recipes/libx265/all/conanfile.py | Lukas-Heiligenbrunner/conan-center-index | d999bb1e3e12ccd29f2ddf7b2037678bbe33ca2a | [
"MIT"
] | null | null | null | recipes/libx265/all/conanfile.py | Lukas-Heiligenbrunner/conan-center-index | d999bb1e3e12ccd29f2ddf7b2037678bbe33ca2a | [
"MIT"
] | null | null | null | recipes/libx265/all/conanfile.py | Lukas-Heiligenbrunner/conan-center-index | d999bb1e3e12ccd29f2ddf7b2037678bbe33ca2a | [
"MIT"
] | 1 | 2020-12-11T02:35:13.000Z | 2020-12-11T02:35:13.000Z | from conans import CMake, ConanFile, tools
import os
import shutil
class Libx265Conan(ConanFile):
name = "libx265"
description = "x265 is the leading H.265 / HEVC encoder software library"
topics = ("conan", "libx265", "codec", "video", "H.265")
url = "https://github.com/conan-io/conan-center-index"
... | 40.151079 | 108 | 0.60473 |
5a8d4a1c87dd40563353ae21a35e53e235a95909 | 42,714 | py | Python | lib/engine/report.py | laranea/SocialExpressApp | 66d0823c602ce447996a6e1ae7ad0058391f6384 | [
"MIT"
] | null | null | null | lib/engine/report.py | laranea/SocialExpressApp | 66d0823c602ce447996a6e1ae7ad0058391f6384 | [
"MIT"
] | null | null | null | lib/engine/report.py | laranea/SocialExpressApp | 66d0823c602ce447996a6e1ae7ad0058391f6384 | [
"MIT"
] | null | null | null | '''
Created on May 21, 2012
@author: kristof
'''
import os
import math
from datetime import datetime
from reportlab.pdfgen import canvas
from reportlab.lib import colors
from reportlab.lib.enums import TA_JUSTIFY
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Sp... | 56.055118 | 159 | 0.631292 |
2592312f234e8e8d374972c5716e55e519378a6a | 390 | py | Python | network/solution/botnet/botnet/wsgi.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | 1 | 2019-01-02T15:04:08.000Z | 2019-01-02T15:04:08.000Z | network/solution/botnet/botnet/wsgi.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | null | null | null | network/solution/botnet/botnet/wsgi.py | giserh/book-python | ebd4e70cea1dd56986aa8efbae3629ba3f1ba087 | [
"MIT"
] | null | null | null | """
WSGI config for botnet project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTI... | 22.941176 | 78 | 0.784615 |
c1e4c6d32e44cecff15a66162139a16e70a8f08f | 73 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/irc/__init__.py | wenfeifei/miniblink49 | 2ed562ff70130485148d94b0e5f4c343da0c2ba4 | [
"Apache-2.0"
] | 5,964 | 2016-09-27T03:46:29.000Z | 2022-03-31T16:25:27.000Z | third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/irc/__init__.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 459 | 2016-09-29T00:51:38.000Z | 2022-03-07T14:37:46.000Z | third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/irc/__init__.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 1,006 | 2016-09-27T05:17:27.000Z | 2022-03-30T02:46:51.000Z | # This file is required for Python to search this directory for modules.
| 36.5 | 72 | 0.794521 |
30f6d95f0532f531ca97bd0a7a648c9b0edf580e | 3,463 | py | Python | python/ray/rllib/tests/test_catalog.py | tonymackinnon/ray | 14a1419682bdba40d2c8bf226e1727cf44abcaa4 | [
"Apache-2.0"
] | 1 | 2019-08-17T21:24:17.000Z | 2019-08-17T21:24:17.000Z | python/ray/rllib/tests/test_catalog.py | tonymackinnon/ray | 14a1419682bdba40d2c8bf226e1727cf44abcaa4 | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/tests/test_catalog.py | tonymackinnon/ray | 14a1419682bdba40d2c8bf226e1727cf44abcaa4 | [
"Apache-2.0"
] | null | null | null | import gym
import numpy as np
import unittest
from gym.spaces import Box, Discrete, Tuple
import ray
from ray.rllib.models import ModelCatalog
from ray.rllib.models.model import Model
from ray.rllib.models.preprocessors import (NoPreprocessor, OneHotPreprocessor,
Preprocess... | 34.63 | 79 | 0.619983 |
bd1498d744ca4f3232ef8e04e41e4adedc2fbdbb | 298 | py | Python | greeting.py | andrew21-meet/meet2019y1lab3 | 8ad4f0062bac9c09eb63a13101d106c8b469dcf8 | [
"MIT"
] | null | null | null | greeting.py | andrew21-meet/meet2019y1lab3 | 8ad4f0062bac9c09eb63a13101d106c8b469dcf8 | [
"MIT"
] | null | null | null | greeting.py | andrew21-meet/meet2019y1lab3 | 8ad4f0062bac9c09eb63a13101d106c8b469dcf8 | [
"MIT"
] | null | null | null | name = input ("what is your name ")
print("Hello there, " + name.capitalize())
print('Your name is ' + str(len(name)) + " letters long")
print("the first letter of your name is " + name[0].capitalize())
print("the last letter of your name is " + name[-1])
print("missing letters " + name[1:-1])
| 37.25 | 65 | 0.651007 |
956255f27015ad9054d3bde4ab03b61523a52321 | 2,228 | py | Python | test/test_suite.py | Ryandry1st/vampyre | 43bd6198ee0cbe0d3270d0c674127c7cbbb4c95e | [
"MIT"
] | 59 | 2017-01-27T22:36:38.000Z | 2021-12-08T04:16:13.000Z | test/test_suite.py | Ryandry1st/vampyre | 43bd6198ee0cbe0d3270d0c674127c7cbbb4c95e | [
"MIT"
] | 10 | 2017-01-11T15:16:11.000Z | 2021-02-17T10:43:51.000Z | test/test_suite.py | Ryandry1st/vampyre | 43bd6198ee0cbe0d3270d0c674127c7cbbb4c95e | [
"MIT"
] | 18 | 2017-01-11T14:58:32.000Z | 2021-05-03T16:34:53.000Z | """
test_suite.py: Runs through tests.
This is an old script for running tests. Eventually, we will move all the unit
tests to the new unittest format.
"""
from __future__ import print_function
# Add the path to the vampyre module and then load the module
import sys
import os
# ensure some directories are in ou... | 33.253731 | 86 | 0.628366 |
2a18bb34c2791bbd7d941780c73a63724f1c8e6b | 20,923 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_express_route_cross_connection_peerings_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_express_route_cross_connection_peerings_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/_express_route_cross_connection_peerings_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 49.816667 | 236 | 0.67562 |
9f880406a9027f919caa82a42ec9649c9de4c79a | 25,341 | py | Python | docs/html_docs/conf.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | 1 | 2021-08-02T09:49:24.000Z | 2021-08-02T09:49:24.000Z | docs/html_docs/conf.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | null | null | null | docs/html_docs/conf.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | 1 | 2021-10-14T03:52:44.000Z | 2021-10-14T03:52:44.000Z | # -*- coding: utf-8 -*-
#
# pyNastran documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 07 19:17:52 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... | 28.03208 | 85 | 0.683043 |
c2dc5e18924759950557c10791146b1d39282645 | 4,930 | py | Python | src/games/domino/module/players/strategies/utils/alphazero.py | 2kodevs/cooperAItive | 910c4c1cb356e3c404ce4b9a64c812cab3333742 | [
"MIT"
] | 1 | 2021-09-16T12:58:24.000Z | 2021-09-16T12:58:24.000Z | src/games/domino/module/players/strategies/utils/alphazero.py | 2kodevs/cooperAItive | 910c4c1cb356e3c404ce4b9a64c812cab3333742 | [
"MIT"
] | 3 | 2021-09-08T23:20:20.000Z | 2022-01-30T22:45:44.000Z | src/games/domino/module/players/strategies/utils/alphazero.py | 2kodevs/cooperAItive | 910c4c1cb356e3c404ce4b9a64c812cab3333742 | [
"MIT"
] | null | null | null | from .types import State, Action, Piece, Encoder, List, History, Any, Dict
from ....domino import Domino
from math import sqrt
import numpy as np
def gauss(num):
return (num * (num + 1)) // 2
def piece_bit(a, b, max_number):
if a > b:
a, b = b, a
cant = gauss(max_number + 1) - gauss(max_number ... | 27.388889 | 85 | 0.52211 |
a51efc9ec3127093ad24d28eed088d2af7d96e27 | 1,173 | py | Python | flexget/plugins/sites/animeindex.py | fotile96/Flexget | 0f7f805a43e25e27fce195b91228f911bf4c6b1e | [
"MIT"
] | null | null | null | flexget/plugins/sites/animeindex.py | fotile96/Flexget | 0f7f805a43e25e27fce195b91228f911bf4c6b1e | [
"MIT"
] | null | null | null | flexget/plugins/sites/animeindex.py | fotile96/Flexget | 0f7f805a43e25e27fce195b91228f911bf4c6b1e | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from future.moves.urllib.parse import quote
import logging
from flexget import plugin
from flexget.event import event
log = logging.getLogger('animeindex')
# http://tra... | 37.83871 | 174 | 0.747656 |
ae00f0041a28b8138339bca123de54a7168ad17f | 1,958 | py | Python | cache.py | rpp0/lora-phy-fingerprinting | e53cab65472b60ae66d79a7ce38f30b0929d6178 | [
"BSD-3-Clause"
] | 13 | 2017-06-21T16:01:53.000Z | 2021-11-28T09:57:48.000Z | cache.py | cx869/lora-phy-fingerprinting | e53cab65472b60ae66d79a7ce38f30b0929d6178 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T16:22:45.000Z | 2020-10-15T16:22:45.000Z | cache.py | cx869/lora-phy-fingerprinting | e53cab65472b60ae66d79a7ce38f30b0929d6178 | [
"BSD-3-Clause"
] | 5 | 2017-06-21T16:02:14.000Z | 2020-02-03T09:16:28.000Z | # Generic cache based on a standard dictionary. Used to prevent recalculations
# of the same data when iterating over training data multiple times.
class GenericCache():
def __init__(self, name="", max_elements=0):
self.max_elements = max_elements
self._internal = {}
self._g = self._generato... | 26.106667 | 103 | 0.608274 |
22034c0a2da0ee54d6fa669d83ed161c831020b2 | 6,509 | py | Python | main_mouse_blocks.py | margitantal68/sapimouse | 40b5ea6cf10c6f1d64b9dd0427d21138cc4f75e2 | [
"Apache-2.0"
] | 2 | 2021-03-27T16:36:50.000Z | 2021-07-05T04:24:52.000Z | main_mouse_blocks.py | margitantal68/sapimouse | 40b5ea6cf10c6f1d64b9dd0427d21138cc4f75e2 | [
"Apache-2.0"
] | null | null | null | main_mouse_blocks.py | margitantal68/sapimouse | 40b5ea6cf10c6f1d64b9dd0427d21138cc4f75e2 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
from util.oneclass import evaluate_authentication_train_test
from util.model import get_model_output_features, train_model
from util.normalization import normalize_rows, normalize_columns, normalize_all
from util.classification import evaluate_identification_Train_Test
from ... | 40.179012 | 197 | 0.714703 |
d04c86ba472792b3ab8b3cab2a736bd285a9bf7d | 2,502 | py | Python | taro/jobs/managed.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | taro/jobs/managed.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | taro/jobs/managed.py | PetrSixta/taro | afe0caf0e0feb6948c4cc80217b5c5d11418859b | [
"MIT"
] | null | null | null | import logging
from taro.jobs.api import Server
from taro.jobs.events import StateDispatcher, OutputDispatcher
from taro.jobs.execution import ExecutionState
from taro.jobs.plugins import PluginBase
from taro.jobs.runner import RunnerJobInstance
log = logging.getLogger(__name__)
def create_managed_job(job_id, execu... | 32.921053 | 114 | 0.674261 |
f3f1cbef65e1fc5643e6feef5e95f5c1b30fbe25 | 5,511 | py | Python | training_model_8kurban/training.py | azaryabernard/audio_track_hackathon21 | 3d3ae04dc93ef0f898e2a1e123c435030c74abe8 | [
"MIT"
] | null | null | null | training_model_8kurban/training.py | azaryabernard/audio_track_hackathon21 | 3d3ae04dc93ef0f898e2a1e123c435030c74abe8 | [
"MIT"
] | null | null | null | training_model_8kurban/training.py | azaryabernard/audio_track_hackathon21 | 3d3ae04dc93ef0f898e2a1e123c435030c74abe8 | [
"MIT"
] | null | null | null | # Import Comet and create experiment
from comet_ml import Experiment
# Comet variables
API_KEY = "<HIDDEN>"
PROJECT = "urbansound8k"
WORKSPACE = "demo"
experiment = Experiment(api_key=API_KEY,
project_name=PROJECT, workspace=WORKSPACE)
#### Dependencies ####
import IPython.display as ipd
impo... | 5,511 | 5,511 | 0.733624 |
e43d340a46d9f48c94ada2c025ec2e5d236d9571 | 99,857 | py | Python | pandas/tests/indexes/test_base.py | krey/pandas | 4a51a4e0cff0111856ef3888ec41c2cfd65210c5 | [
"BSD-3-Clause"
] | 2 | 2019-12-31T14:22:54.000Z | 2019-12-31T14:23:42.000Z | pandas/tests/indexes/test_base.py | krey/pandas | 4a51a4e0cff0111856ef3888ec41c2cfd65210c5 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/indexes/test_base.py | krey/pandas | 4a51a4e0cff0111856ef3888ec41c2cfd65210c5 | [
"BSD-3-Clause"
] | 1 | 2020-04-27T13:55:54.000Z | 2020-04-27T13:55:54.000Z | from collections import defaultdict
from datetime import datetime, timedelta
from io import StringIO
import math
import operator
import re
import numpy as np
import pytest
import pandas._config.config as cf
from pandas._libs.tslib import Timestamp
from pandas.compat import PY36
from pandas.compat.numpy import np_dat... | 35.360127 | 88 | 0.561032 |
c1f772732976d220094452673106a2a7b5a22e4b | 87 | py | Python | Dedalo/offers/apps.py | josperdom1/AII | a138ba32dc0afabd86894c044a449d7c2c343780 | [
"MIT"
] | 1 | 2021-01-04T04:30:24.000Z | 2021-01-04T04:30:24.000Z | Dedalo/offers/apps.py | josperdom1/AII | a138ba32dc0afabd86894c044a449d7c2c343780 | [
"MIT"
] | 21 | 2020-05-17T10:00:29.000Z | 2022-03-12T00:39:12.000Z | Dedalo/offers/apps.py | josperdom1/AII | a138ba32dc0afabd86894c044a449d7c2c343780 | [
"MIT"
] | 5 | 2020-05-09T22:34:38.000Z | 2020-05-17T16:51:03.000Z | from django.apps import AppConfig
class OffersConfig(AppConfig):
name = 'offers'
| 14.5 | 33 | 0.747126 |
a8e81acf5e4625979534c613d5daa7c7a668251d | 25,235 | py | Python | BasisTypen/migrations/m0022_squashed.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-12-22T13:11:12.000Z | 2021-12-22T13:11:12.000Z | BasisTypen/migrations/m0022_squashed.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | 9 | 2020-10-28T07:07:05.000Z | 2021-06-28T20:05:37.000Z | BasisTypen/migrations/m0022_squashed.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020-2021 Ramon van der Winkel.
# All rights reserved.
# Licensed under BSD-3-Clause-Clear. See LICENSE file for details.
from django.db import migrations, models
import django.db.models.deletion
def init_boogtype(apps, _):
""" Maak de boog typen aan """
# boog ty... | 39.928797 | 133 | 0.563186 |
4ed0c4c86983c6ba435fd7f94b3ff1fa320b7bf6 | 11,800 | py | Python | src/spaceone/monitoring/service/event_rule_service.py | stat-kwon/monitoring | 93e86fb6da958314f56f1352014341935f2795c0 | [
"Apache-2.0"
] | null | null | null | src/spaceone/monitoring/service/event_rule_service.py | stat-kwon/monitoring | 93e86fb6da958314f56f1352014341935f2795c0 | [
"Apache-2.0"
] | null | null | null | src/spaceone/monitoring/service/event_rule_service.py | stat-kwon/monitoring | 93e86fb6da958314f56f1352014341935f2795c0 | [
"Apache-2.0"
] | null | null | null | import logging
import fnmatch
from spaceone.core.service import *
from spaceone.monitoring.error.event_rule import *
from spaceone.monitoring.model.event_rule_model import EventRule
from spaceone.monitoring.manager.identity_manager import IdentityManager
from spaceone.monitoring.manager.event_rule_manager import Event... | 33.053221 | 120 | 0.542542 |
bc19286d23190a3eb12a3fd054b9ec86a6688794 | 1,176 | py | Python | apps/func_maximization/testAppL96.py | waitong94/smarties | e48fe6a8ba4695e20146cf5ca7c6720989217ed3 | [
"MIT"
] | 91 | 2018-07-16T07:54:06.000Z | 2022-03-15T09:50:22.000Z | apps/func_maximization/testAppL96.py | waitong94/smarties | e48fe6a8ba4695e20146cf5ca7c6720989217ed3 | [
"MIT"
] | 7 | 2019-04-03T03:14:59.000Z | 2021-11-17T09:02:14.000Z | apps/func_maximization/testAppL96.py | waitong94/smarties | e48fe6a8ba4695e20146cf5ca7c6720989217ed3 | [
"MIT"
] | 36 | 2018-07-16T08:08:35.000Z | 2022-03-29T02:40:20.000Z | # objective of this problem is to guess all state variables
# by observing roughly half of them
import numpy as np
import smarties as rl
import time
N = 8 # number of variables
F = 8 # forcing
dt = 0.01
maxStep = 1000
def Lorenz96(x):
d = np.zeros(N)
d[0] = (x[1] - x[N-2]) * x[N-1] - x[0]
d[1] = (x[2] - x[N-... | 25.565217 | 70 | 0.563776 |
255c6286ae13f9f0e252a0927567d683c7ad5549 | 397 | py | Python | NexusWebUI/NexusWebUI/asgi.py | Nexusoft/LLL-HPP | e5eec2fc402ac222d5b81438f3f3e8e490ba869d | [
"MIT"
] | 1 | 2021-12-06T15:05:28.000Z | 2021-12-06T15:05:28.000Z | NexusWebUI/NexusWebUI/asgi.py | Nexusoft/LLL-HPP | e5eec2fc402ac222d5b81438f3f3e8e490ba869d | [
"MIT"
] | null | null | null | NexusWebUI/NexusWebUI/asgi.py | Nexusoft/LLL-HPP | e5eec2fc402ac222d5b81438f3f3e8e490ba869d | [
"MIT"
] | 1 | 2021-08-28T23:31:55.000Z | 2021-08-28T23:31:55.000Z | """
ASGI config for NexusWebUI project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
07623f7f9fc148a0d59a86bdf86b1717f528a659 | 4,982 | py | Python | gurobi/2CenterMIP_brute.py | gglockner/p-center | c02fd5cb9cdf5f2ccef07b7bf911d1b5e1f77947 | [
"Apache-2.0"
] | 4 | 2020-02-18T15:14:08.000Z | 2021-07-08T13:58:54.000Z | gurobi/2CenterMIP_brute.py | gglockner/p-center | c02fd5cb9cdf5f2ccef07b7bf911d1b5e1f77947 | [
"Apache-2.0"
] | 1 | 2020-03-09T22:16:49.000Z | 2020-03-09T22:16:49.000Z | gurobi/2CenterMIP_brute.py | gglockner/p-center | c02fd5cb9cdf5f2ccef07b7bf911d1b5e1f77947 | [
"Apache-2.0"
] | 1 | 2019-10-20T21:39:47.000Z | 2019-10-20T21:39:47.000Z | # Copyright 2019 Antonio Medrano
# 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... | 31.531646 | 87 | 0.63609 |
a55b4b4078aa5a4442e7a13fac4ea47479bbbcec | 6,823 | py | Python | scripts/generate_source.py | bethau/Vulkan-ValidationLayers | e798df982b1b6fdcbc048f1987cba42cb68dfafa | [
"Apache-2.0"
] | 3 | 2020-07-04T07:23:40.000Z | 2021-07-04T00:15:37.000Z | scripts/generate_source.py | bethau/Vulkan-ValidationLayers | e798df982b1b6fdcbc048f1987cba42cb68dfafa | [
"Apache-2.0"
] | null | null | null | scripts/generate_source.py | bethau/Vulkan-ValidationLayers | e798df982b1b6fdcbc048f1987cba42cb68dfafa | [
"Apache-2.0"
] | 5 | 2021-01-24T11:28:26.000Z | 2021-07-04T00:15:38.000Z | #!/usr/bin/env python3
# Copyright (c) 2020 The Khronos Group Inc.
# Copyright (c) 2020 Valve Corporation
# Copyright (c) 2020 LunarG, Inc.
# Copyright (c) 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may ob... | 46.414966 | 114 | 0.543603 |
f16228ba218223c0d3e5631e20b6d6d083077275 | 2,442 | py | Python | CGL/CGL_1_B.py | yu8ikmnbgt6y/MyAOJ | 474b21a2a0c25e1c1f3d6d66d2a2ea52aecaa39b | [
"Unlicense"
] | 1 | 2020-01-08T16:33:46.000Z | 2020-01-08T16:33:46.000Z | CGL/CGL_1_B.py | yu8ikmnbgt6y/MyAOJ | 474b21a2a0c25e1c1f3d6d66d2a2ea52aecaa39b | [
"Unlicense"
] | null | null | null | CGL/CGL_1_B.py | yu8ikmnbgt6y/MyAOJ | 474b21a2a0c25e1c1f3d6d66d2a2ea52aecaa39b | [
"Unlicense"
] | null | null | null | import sys
import io
import time
import pprint
input_txt = """
0 0 3 4
3
2 5
1 4
0 3
"""
sys.stdin = io.StringIO(input_txt); tmp = input()
#sys.stdout = open("out.dat","w")
start = time.time()
# copy the below part and paste to the submission form.
# ---------function------------
import math
from t... | 24.666667 | 71 | 0.552007 |
d6440914e39c7cc6b1d09ebec3410be658539d16 | 9,242 | py | Python | examples/ecs/v1/cloudserver.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | null | null | null | examples/ecs/v1/cloudserver.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | null | null | null | examples/ecs/v1/cloudserver.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | null | null | null | # -*-coding:utf-8 -*-
import sys
from openstack import connection
from openstack import utils
import time
utils.enable_logging(debug=True, stream=sys.stdout)
# create connection
username = "xxxxx"
password = "xxxxx"
projectId = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # tenant ID
userDomainId = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx... | 28.262997 | 84 | 0.536464 |
938702142f7f324f5382cbec77ba241bd21b7982 | 7,486 | py | Python | tests/layer_tests/tensorflow_tests/test_tf_BiasAdd.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 1 | 2021-04-20T08:14:51.000Z | 2021-04-20T08:14:51.000Z | tests/layer_tests/tensorflow_tests/test_tf_BiasAdd.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 58 | 2020-11-06T12:13:45.000Z | 2022-03-28T13:20:11.000Z | tests/layer_tests/tensorflow_tests/test_tf_BiasAdd.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 4 | 2021-09-29T20:44:49.000Z | 2021-10-20T13:02:12.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import pytest
from common.tf_layer_test_class import CommonTFLayerTest
from common.utils.tf_utils import permute_nchw_to_nhwc
class TestBiasAdd(CommonTFLayerTest):
def create_bias_add_placeholder_const_net(self, shape, ir_version,... | 41.131868 | 131 | 0.649212 |
9251b24e9684d8681cea132e018e8df962e58707 | 111 | py | Python | code/backend/staff_api/admin.py | rollethu/noe | ef668929496069b9519b4670e8cf19a6531f5b24 | [
"MIT"
] | 16 | 2020-06-18T07:44:02.000Z | 2022-01-28T14:48:00.000Z | code/backend/staff_api/admin.py | dorinapall/noe | 6d5682ab00a2cdc5cb419ecab57804c9f70d7b3a | [
"MIT"
] | 5 | 2020-06-17T08:54:03.000Z | 2022-01-27T21:40:02.000Z | code/backend/staff_api/admin.py | dorinapall/noe | 6d5682ab00a2cdc5cb419ecab57804c9f70d7b3a | [
"MIT"
] | 4 | 2020-06-18T09:35:22.000Z | 2021-05-10T21:47:24.000Z | from django.contrib import admin
from rest_framework.authtoken.models import Token
admin.site.register(Token)
| 22.2 | 49 | 0.846847 |
fe0a03f3ebe876af491cd7ec0bc3a80c1b264b83 | 3,864 | py | Python | game/combat/combatboard.py | Sipondo/ulix-dexflow | de46482fe08e3d600dd5da581f0524b55e5df961 | [
"MIT"
] | 5 | 2021-06-25T16:44:38.000Z | 2021-12-31T01:29:00.000Z | game/combat/combatboard.py | Sipondo/ulix-dexflow | de46482fe08e3d600dd5da581f0524b55e5df961 | [
"MIT"
] | null | null | null | game/combat/combatboard.py | Sipondo/ulix-dexflow | de46482fe08e3d600dd5da581f0524b55e5df961 | [
"MIT"
] | 1 | 2021-06-25T20:33:47.000Z | 2021-06-25T20:33:47.000Z | import random
import copy
class CombatBoard:
def __init__(self, game, scene):
self.game = game
self.scene = scene
self.actives = []
self.teams = []
self.to_copy = []
self.actor = -1
self.action = None
self.narration = "Board state undefined."
... | 28.622222 | 103 | 0.578934 |
781a82a9da88e48deaa666d35bb77732f3caa1da | 23 | py | Python | MLP/check answers and ML.py | kpodosky/LNquizbot | 464df47fba15d9e980eaf50be8effb041d1bcaa3 | [
"MIT"
] | null | null | null | MLP/check answers and ML.py | kpodosky/LNquizbot | 464df47fba15d9e980eaf50be8effb041d1bcaa3 | [
"MIT"
] | null | null | null | MLP/check answers and ML.py | kpodosky/LNquizbot | 464df47fba15d9e980eaf50be8effb041d1bcaa3 | [
"MIT"
] | 1 | 2020-09-30T17:54:16.000Z | 2020-09-30T17:54:16.000Z | import stanfordcorenlp
| 11.5 | 22 | 0.913043 |
986f613da2c9e610074b1a7e457ac885f216071e | 37,974 | py | Python | functions/weapon_creation_functions.py | mtasa-typescript/mtasa-wiki-dump | edea1746850fb6c99d6155d1d7891e2cceb33a5c | [
"MIT"
] | null | null | null | functions/weapon_creation_functions.py | mtasa-typescript/mtasa-wiki-dump | edea1746850fb6c99d6155d1d7891e2cceb33a5c | [
"MIT"
] | 1 | 2021-02-24T21:50:18.000Z | 2021-02-24T21:50:18.000Z | functions/weapon_creation_functions.py | mtasa-typescript/mtasa-wiki-dump | edea1746850fb6c99d6155d1d7891e2cceb33a5c | [
"MIT"
] | null | null | null | # Autogenerated file. ANY CHANGES WILL BE OVERWRITTEN
from to_python.core.types import FunctionType, \
FunctionArgument, \
FunctionArgumentValues, \
FunctionReturnTypes, \
FunctionSignature, \
FunctionDoc, \
FunctionData, \
CompoundFunctionData
DUMP_PARTIAL = [
CompoundFunctionData(
... | 42.053156 | 390 | 0.378996 |
060cc1d1612b4adfc3fca368078424767c1766bc | 1,081 | py | Python | tests/e2e/level1/main.py | KarlJohnsonnn/rpgpy | ddf79ce3eda649fca9ef92a0d66fbb0059164f7c | [
"MIT"
] | null | null | null | tests/e2e/level1/main.py | KarlJohnsonnn/rpgpy | ddf79ce3eda649fca9ef92a0d66fbb0059164f7c | [
"MIT"
] | null | null | null | tests/e2e/level1/main.py | KarlJohnsonnn/rpgpy | ddf79ce3eda649fca9ef92a0d66fbb0059164f7c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import argparse
from rpgpy import read_rpg
import pytest
from tempfile import NamedTemporaryFile
import pickle
from rpgpy import rpg2nc
def main():
data_path = 'tests/data/level1/'
for folder in os.listdir(data_path):
for file in os.listdir(os.path.join(data_path, fold... | 30.027778 | 82 | 0.619796 |
8740108c96e3546b3f9d7d70002dc8254c10d475 | 32,677 | py | Python | rtk/software/__gui/gtk/SRR.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | null | null | null | rtk/software/__gui/gtk/SRR.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | null | null | null | rtk/software/__gui/gtk/SRR.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | 2 | 2020-04-03T04:14:42.000Z | 2021-02-22T05:30:35.000Z | #!/usr/bin/env python
"""
##########################################################################
Software Package Risk Analysis Requirements Review Specific Work Book View
##########################################################################
"""
# -*- coding: utf-8 -*-
#
# rtk.software.gui.gtk.SRR.py is... | 50.427469 | 90 | 0.621018 |
25f1951846239005436c777c92966327ca2975c1 | 4,680 | py | Python | ui/ui_modules/ventana_principal/ventana_principal.py | javi20gu/search_devices | 38d562687aa61e423f939a29d02a0cb10184fed2 | [
"Apache-2.0"
] | 1 | 2019-04-02T11:33:54.000Z | 2019-04-02T11:33:54.000Z | ui/ui_modules/ventana_principal/ventana_principal.py | javi20gu/search_devices | 38d562687aa61e423f939a29d02a0cb10184fed2 | [
"Apache-2.0"
] | null | null | null | ui/ui_modules/ventana_principal/ventana_principal.py | javi20gu/search_devices | 38d562687aa61e423f939a29d02a0cb10184fed2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainWindow.ui',
# licensing of 'MainWindow.ui' applies.
#
# Created: Tue Mar 12 00:46:34 2019
# by: pyside2-uic running on PySide2 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, QtWi... | 44.571429 | 136 | 0.706197 |
5bffbe67fafbcec4ad1bdc3fb5b10df95d675b7c | 7,801 | py | Python | adafruit_ht16k33/matrix.py | SAK917/Adafruit_CircuitPython_HT16K33 | 6fe369270605b33a3a37b96cdcf6e5d9718b69d2 | [
"MIT",
"MIT-0",
"Unlicense"
] | 35 | 2017-01-11T06:45:59.000Z | 2022-03-12T21:32:34.000Z | adafruit_ht16k33/matrix.py | SAK917/Adafruit_CircuitPython_HT16K33 | 6fe369270605b33a3a37b96cdcf6e5d9718b69d2 | [
"MIT",
"MIT-0",
"Unlicense"
] | 64 | 2017-12-07T19:55:07.000Z | 2022-03-20T15:57:33.000Z | adafruit_ht16k33/matrix.py | SAK917/Adafruit_CircuitPython_HT16K33 | 6fe369270605b33a3a37b96cdcf6e5d9718b69d2 | [
"MIT",
"MIT-0",
"Unlicense"
] | 33 | 2017-12-07T19:52:46.000Z | 2022-02-26T04:14:51.000Z | # SPDX-FileCopyrightText: Radomir Dopieralski 2016 for Adafruit Industries
# SPDX-FileCopyrightText: Tony DiCola 2016 for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
Matrix Displays
================
"""
from adafruit_ht16k33.ht16k33 import HT16K33
__version__ = "0.0.0-auto.0"
__repo__ = "https://github.... | 32.915612 | 93 | 0.52583 |
174fe7ba89bbfe73996dbefb6d157d758ed03bf7 | 1,360 | py | Python | feynman_img_t.py | EvgenyNerush/feynman-board | 34d21fa4a98ea7fb3edbac828626287bef5e413b | [
"MIT"
] | null | null | null | feynman_img_t.py | EvgenyNerush/feynman-board | 34d21fa4a98ea7fb3edbac828626287bef5e413b | [
"MIT"
] | null | null | null | feynman_img_t.py | EvgenyNerush/feynman-board | 34d21fa4a98ea7fb3edbac828626287bef5e413b | [
"MIT"
] | null | null | null | import subprocess
import time
import numpy as np
import numpy.ctypeslib as ctl
import ctypes as ct
import matplotlib.pyplot as plt
s0 = 3
nparticles = 20000000
nt = 7
no = 40 #int(5 * np.sqrt(nt))
nb = 15
nx = 2 * no + 1
subprocess.run(["make"])
lib = ctl.load_library("lib.so", "./")
clas... | 22.666667 | 97 | 0.605147 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.