hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aef808c706cbf6f11a9c1272fa0254cb60087342 | 325 | py | Python | pychemin/constants.py | ewen-lbh/pychemin | 3e41b9a13a5517e55151e6874932ce92bfd9fa53 | [
"MIT"
] | 1 | 2020-04-15T07:11:21.000Z | 2020-04-15T07:11:21.000Z | pychemin/constants.py | ewen-lbh/pychemin | 3e41b9a13a5517e55151e6874932ce92bfd9fa53 | [
"MIT"
] | 1 | 2020-03-26T23:54:30.000Z | 2020-03-26T23:57:41.000Z | pychemin/constants.py | ewen-lbh/pychemin | 3e41b9a13a5517e55151e6874932ce92bfd9fa53 | [
"MIT"
] | 1 | 2020-03-23T16:51:09.000Z | 2020-03-23T16:51:09.000Z | from os import path
GODSPEED_MODE = False
DEBUG_MODE = True
BASE_DIR = path.dirname(path.dirname(__file__))
STAT_NAMES = {
'hp': "Vie",
'speed': "Vitesse",
'reputation': "Réputation",
'food': "Niveau d'alimentation",
'strength': "Force",
'smart': "Intelligence",
"name": "Nom"
}
NON_NUMERIC_STATS = ['na... | 18.055556 | 47 | 0.658462 |
f10747c541aee9e19fd6b862021398a13217fd34 | 5,761 | py | Python | mindware/components/ensemble/unnamed_ensemble.py | aman-gupta-1995/Machine-Learning-Mindware | 8b3050720711730520683c89949e3dbdfb168961 | [
"MIT"
] | 27 | 2021-07-19T09:03:34.000Z | 2022-03-31T06:19:23.000Z | mindware/components/ensemble/unnamed_ensemble.py | aman-gupta-1995/Machine-Learning-Mindware | 8b3050720711730520683c89949e3dbdfb168961 | [
"MIT"
] | 4 | 2021-07-15T12:17:10.000Z | 2022-01-26T17:16:58.000Z | mindware/components/ensemble/unnamed_ensemble.py | aman-gupta-1995/Machine-Learning-Mindware | 8b3050720711730520683c89949e3dbdfb168961 | [
"MIT"
] | 17 | 2020-05-12T20:24:50.000Z | 2021-07-11T03:31:38.000Z | import numpy as np
import pandas as pd
import scipy.spatial
from sklearn.metrics._scorer import _BaseScorer
from mindware.components.utils.constants import CLS_TASKS
from sklearn.cluster import AgglomerativeClustering
from sklearn.metrics import accuracy_score
def choose_base_models_regression(predictions, labels, nu... | 38.152318 | 111 | 0.646242 |
de6a9e447f2b8a947d8e58117aa0dcdb4b85ec7b | 36,975 | py | Python | ddsp/core.py | chetakks/ddsp | 72923ec557e208a6e4374b7b5dfb6d871130807e | [
"Apache-2.0"
] | null | null | null | ddsp/core.py | chetakks/ddsp | 72923ec557e208a6e4374b7b5dfb6d871130807e | [
"Apache-2.0"
] | null | null | null | ddsp/core.py | chetakks/ddsp | 72923ec557e208a6e4374b7b5dfb6d871130807e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The DDSP Authors.
#
# 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 wri... | 39.503205 | 80 | 0.674537 |
83cf4caf850199baf381e818b63a9e974810224c | 2,240 | py | Python | oasislmf/utils/data.py | jonathanbethel/OasisLMF | 7dfbbd237580d36f4b209a5e4494d21d7950e668 | [
"BSD-3-Clause"
] | 1 | 2019-08-10T18:53:53.000Z | 2019-08-10T18:53:53.000Z | oasislmf/utils/data.py | jonathanbethel/OasisLMF | 7dfbbd237580d36f4b209a5e4494d21d7950e668 | [
"BSD-3-Clause"
] | null | null | null | oasislmf/utils/data.py | jonathanbethel/OasisLMF | 7dfbbd237580d36f4b209a5e4494d21d7950e668 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
__all__ = [
'get_dataframe'
]
import builtins
import pandas as pd
import six
from .exceptions import OasisException
def get_dataframe(
src_fp=None,
src_type='csv',
src_buf=None,
src_data=None,
float_precision='high',
lowercase_cols=True,
index_col=True,
... | 32 | 157 | 0.658036 |
79e25b4e2cad92fa6af52bf9ac75948b90fc0dae | 1,149 | py | Python | nova/api/validation/extra_specs/accel.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,874 | 2015-01-04T05:18:34.000Z | 2022-03-31T03:30:28.000Z | nova/api/validation/extra_specs/accel.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 40 | 2015-04-13T02:32:42.000Z | 2022-02-16T02:28:06.000Z | nova/api/validation/extra_specs/accel.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,996 | 2015-01-04T15:11:51.000Z | 2022-03-31T11:03:13.000Z | # Copyright 2020 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 applicable law o... | 31.054054 | 75 | 0.684073 |
0c61f96660218c9a26c3aebe80ffc0e0501133bf | 1,931 | bzl | Python | packages/labs/package.bzl | kriswuollett/rules_nodejs | 5798eeeda78c8acc2ebc2f24a41aca33164a972f | [
"Apache-2.0"
] | 645 | 2017-08-22T22:18:51.000Z | 2022-03-31T11:50:53.000Z | packages/labs/package.bzl | bolitt/rules_nodejs | ba9f82103c6122bb316614734489e44552d3d266 | [
"Apache-2.0"
] | 2,172 | 2017-08-26T23:52:39.000Z | 2022-03-31T23:51:29.000Z | packages/labs/package.bzl | bolitt/rules_nodejs | ba9f82103c6122bb316614734489e44552d3d266 | [
"Apache-2.0"
] | 570 | 2017-08-24T19:57:44.000Z | 2022-03-29T12:09:04.000Z | "Install toolchain dependencies"
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
load(":mock_io_bazel_rules_closure.bzl", "mock_io_bazel_rules_closure")
def npm_bazel_labs_dependencies():
"""
Fetch our transitive dependencies.
... | 35.759259 | 106 | 0.674262 |
db854c8f461fb59876d0a50c15a4f523f98e0f90 | 685 | py | Python | djangocms_text_ckeditor/migrations/0001_initial.py | toffi9/djangocms-text-ckeditor | 175a1a444de8ca1ba4742196cb83150d45b5c505 | [
"BSD-3-Clause"
] | null | null | null | djangocms_text_ckeditor/migrations/0001_initial.py | toffi9/djangocms-text-ckeditor | 175a1a444de8ca1ba4742196cb83150d45b5c505 | [
"BSD-3-Clause"
] | null | null | null | djangocms_text_ckeditor/migrations/0001_initial.py | toffi9/djangocms-text-ckeditor | 175a1a444de8ca1ba4742196cb83150d45b5c505 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '__first__'),
]
operations = [
migrations.CreateModel(
name='Text',
fields=[
(... | 26.346154 | 174 | 0.557664 |
9bd223ad59a85b6979573779593eb820af5680e9 | 25,722 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_route_tables_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_route_tables_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_route_tables_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.168539 | 191 | 0.662623 |
20033f3af563f76a3b614bfb0621a81378596936 | 3,001 | py | Python | tensorflow/python/keras/layers/preprocessing/benchmarks/category_vocab_list_varlen_benchmark.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 4 | 2016-07-14T15:15:05.000Z | 2017-03-02T15:17:22.000Z | tensorflow/python/keras/layers/preprocessing/benchmarks/category_vocab_list_varlen_benchmark.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 1 | 2021-03-23T03:25:15.000Z | 2021-03-23T03:25:15.000Z | tensorflow/python/keras/layers/preprocessing/benchmarks/category_vocab_list_varlen_benchmark.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 5 | 2016-11-07T21:17:45.000Z | 2020-05-31T00:16:59.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.5125 | 101 | 0.752416 |
fc6b6ad2f54a3f40536088de8066ad188b6b9d2d | 1,379 | py | Python | aoc2020/day13/day13_part2.py | GetPastTheMonkey/advent-of-code | db80be6d87baba4d5315cc69276905c55762da86 | [
"MIT"
] | 1 | 2019-09-15T16:37:24.000Z | 2019-09-15T16:37:24.000Z | aoc2020/day13/day13_part2.py | GetPastTheMonkey/advent-of-code | db80be6d87baba4d5315cc69276905c55762da86 | [
"MIT"
] | null | null | null | aoc2020/day13/day13_part2.py | GetPastTheMonkey/advent-of-code | db80be6d87baba4d5315cc69276905c55762da86 | [
"MIT"
] | null | null | null | from functools import reduce
from typing import List
from utils import get_input_lines
mods = []
rems = []
for offset, bus_id in enumerate(list(get_input_lines(__file__))[1].split(",")):
if bus_id == "x":
continue
bus_id = int(bus_id)
# Use Chinese Remainder Theorem
# (X mod bus_id) = k * b... | 24.625 | 96 | 0.626541 |
7f7c1463679c4037d288e4ed5bb43d073696a252 | 2,601 | py | Python | src/namegen/driver_memory.py | MuistotKartalla/muistot-namegen | 97d0608db4e29636f127ddc7349d95c1e99c52e3 | [
"MIT"
] | null | null | null | src/namegen/driver_memory.py | MuistotKartalla/muistot-namegen | 97d0608db4e29636f127ddc7349d95c1e99c52e3 | [
"MIT"
] | null | null | null | src/namegen/driver_memory.py | MuistotKartalla/muistot-namegen | 97d0608db4e29636f127ddc7349d95c1e99c52e3 | [
"MIT"
] | 1 | 2022-03-23T13:14:49.000Z | 2022-03-23T13:14:49.000Z | import base64
import collections
import gzip
import json
import typing
from .driver import Driver
from .utils import hash_file, read_initial_values, generate_next, get_random, get_state_file, get_word_file, lcm
class Item:
__slots__ = ['start', 'end', 'value']
start: str
end: str
value: int
def ... | 27.967742 | 112 | 0.546328 |
83f77381424d84160ae5897ca820bf7cd327d70b | 10,857 | py | Python | src/models/wisenet_base/packages/DEXTR/train_pascal.py | JanAlexanderPersonal/covid19_weak_supervision | 5599e48c9945f1e08a2731740bc8f6e44a031703 | [
"Apache-2.0"
] | 7 | 2020-07-22T19:48:52.000Z | 2021-08-06T13:43:21.000Z | src/models/wisenet_base/packages/DEXTR/train_pascal.py | JanAlexanderPersonal/covid19_weak_supervision | 5599e48c9945f1e08a2731740bc8f6e44a031703 | [
"Apache-2.0"
] | 1 | 2021-03-06T15:57:21.000Z | 2021-03-06T15:57:21.000Z | src/models/wisenet_base/packages/DEXTR/train_pascal.py | JanAlexanderPersonal/covid19_weak_supervision | 5599e48c9945f1e08a2731740bc8f6e44a031703 | [
"Apache-2.0"
] | 1 | 2021-02-09T02:16:21.000Z | 2021-02-09T02:16:21.000Z | import sys; sys.path.append("../../_EXTRAS"); import misc as ms
import socket
import timeit
from datetime import datetime
import scipy.misc as sm
from collections import OrderedDict
import glob
# PyTorch includes
import torch.optim as optim
from torchvision import transforms
from torch.utils.data import DataLoader
fr... | 43.25498 | 119 | 0.651653 |
5817d99fc9ab5cb79fbdf899c02f0a7221c6cd73 | 14,776 | py | Python | tests/vfs/zip_file_entry.py | jaegeral/dfvfs | 606d09bf4de0b5dcf20d1dddff879dfed5c93640 | [
"Apache-2.0"
] | null | null | null | tests/vfs/zip_file_entry.py | jaegeral/dfvfs | 606d09bf4de0b5dcf20d1dddff879dfed5c93640 | [
"Apache-2.0"
] | null | null | null | tests/vfs/zip_file_entry.py | jaegeral/dfvfs | 606d09bf4de0b5dcf20d1dddff879dfed5c93640 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the file entry implementation using the zipfile."""
import unittest
from dfvfs.lib import definitions
from dfvfs.path import factory as path_spec_factory
from dfvfs.resolver import context
from dfvfs.vfs import zip_file_entry
from dfvfs.vfs import zip_file_sy... | 36.756219 | 80 | 0.754331 |
fba7a147c3bce36fc30172b39cb7379ac8ba2cfb | 16,090 | py | Python | datalad/distributed/tests/test_create_sibling_gitlab.py | AKSoo/datalad | dbc34478980c808a86b5531316c986abac953e37 | [
"MIT"
] | null | null | null | datalad/distributed/tests/test_create_sibling_gitlab.py | AKSoo/datalad | dbc34478980c808a86b5531316c986abac953e37 | [
"MIT"
] | 1 | 2020-12-01T20:13:51.000Z | 2020-12-01T20:13:51.000Z | datalad/distributed/tests/test_create_sibling_gitlab.py | jwodder/datalad | 2b92a764fdc64b750dad68eb51c817218a1ec153 | [
"MIT"
] | null | null | null | # ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
"""Test create public... | 38.127962 | 95 | 0.600435 |
e904fc15dac021e1d3ef7996c3f9d6c5ba9f9160 | 5,518 | py | Python | builder/builder.py | dfm/builder | c237559d6c8169f4c9b25119f46ee1a2eb08272f | [
"MIT"
] | null | null | null | builder/builder.py | dfm/builder | c237559d6c8169f4c9b25119f46ee1a2eb08272f | [
"MIT"
] | null | null | null | builder/builder.py | dfm/builder | c237559d6c8169f4c9b25119f46ee1a2eb08272f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
__all__ = ["Library", "build_ext"]
import os
import re
import glob
import logging
from functools import wraps
from distutils.version import StrictVersion
try:
from setuptools.command.build_ext import build_ext as _build_ext
except ImportError:
f... | 32.269006 | 78 | 0.570859 |
67d2cb668d6117de7a354e4880195ad8546e89fd | 13,250 | py | Python | rayml/automl/engine/engine_base.py | gcode-ai/rayml | 92c4f3c6041f465fee27a6c03bd7959c4ef21124 | [
"BSD-3-Clause"
] | null | null | null | rayml/automl/engine/engine_base.py | gcode-ai/rayml | 92c4f3c6041f465fee27a6c03bd7959c4ef21124 | [
"BSD-3-Clause"
] | null | null | null | rayml/automl/engine/engine_base.py | gcode-ai/rayml | 92c4f3c6041f465fee27a6c03bd7959c4ef21124 | [
"BSD-3-Clause"
] | null | null | null | """Base class for rayml engines."""
import sys
import time
import traceback
from abc import ABC, abstractmethod
from collections import OrderedDict
import numpy as np
import pandas as pd
import woodwork as ww
from rayml.automl.utils import tune_binary_threshold
from rayml.exceptions import PipelineScoreError
from ray... | 36.501377 | 155 | 0.627245 |
4b10eadb1e16e846fd746e33b83f1ea1db03512e | 747 | py | Python | examples/simple_configure.py | mikimn/arggo | 79d7b0e7c391e9e1e8cf4621db95382ad9fd074e | [
"MIT"
] | 2 | 2021-05-26T17:29:50.000Z | 2021-05-29T10:19:10.000Z | examples/simple_configure.py | mikimn/arggo | 79d7b0e7c391e9e1e8cf4621db95382ad9fd074e | [
"MIT"
] | 10 | 2021-03-12T14:33:34.000Z | 2021-05-23T14:48:45.000Z | examples/simple_configure.py | mikimn/arggo | 79d7b0e7c391e9e1e8cf4621db95382ad9fd074e | [
"MIT"
] | 1 | 2021-09-22T18:03:29.000Z | 2021-09-22T18:03:29.000Z | import os
from dataclasses import dataclass
import sys
sys.path.append(os.getcwd())
sys.path.append("../")
import arggo
from arggo.dataclass_utils import parser_field
@dataclass
class Arguments:
name: str = parser_field(help="The user's name.")
should_greet: bool = parser_field(help="Whether or not I should ... | 23.34375 | 84 | 0.689424 |
e9e5d231a58d8bc436dd443594fc4f4142b6eb7e | 3,728 | py | Python | zaza/openstack/utilities/exceptions.py | gnuoy/zaza-openstack-tests | 0546e01b627d7e0a785ef801e88743480e94cbed | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/openstack/utilities/exceptions.py | gnuoy/zaza-openstack-tests | 0546e01b627d7e0a785ef801e88743480e94cbed | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zaza/openstack/utilities/exceptions.py | gnuoy/zaza-openstack-tests | 0546e01b627d7e0a785ef801e88743480e94cbed | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2018 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... | 19.316062 | 74 | 0.69367 |
1a818f4925dc80ebd9045151a8a3fded973a1002 | 1,829 | py | Python | backend/api/v1/aggregator/helpers.py | bcgov-c/wally | 264bc5d40f9b5cf293159f1bc0424cfd9ff8aa06 | [
"Apache-2.0"
] | null | null | null | backend/api/v1/aggregator/helpers.py | bcgov-c/wally | 264bc5d40f9b5cf293159f1bc0424cfd9ff8aa06 | [
"Apache-2.0"
] | null | null | null | backend/api/v1/aggregator/helpers.py | bcgov-c/wally | 264bc5d40f9b5cf293159f1bc0424cfd9ff8aa06 | [
"Apache-2.0"
] | null | null | null | import math
import json
import pyproj
from geojson import dumps, FeatureCollection, Feature, Point
from shapely.geometry import mapping
from api.config import GWELLS_API_URL
from api.v1.aggregator.schema import ExternalAPIRequest, GWELLSAPIParams, json_to_geojson
EARTH_RADIUS = 6378137
MAX_LATITUDE = 85.0511287798
t... | 28.138462 | 98 | 0.700929 |
7447bd308a621cd0f12f389b22d15aae4b2137d0 | 1,248 | py | Python | tests/test_controllers_opendaylight.py | dfarrell07/CBenchF | a3a5d9a6d2a703a77499a9ee8a2592d2f90b52e7 | [
"BSD-2-Clause"
] | 1 | 2020-11-18T03:13:45.000Z | 2020-11-18T03:13:45.000Z | tests/test_controllers_opendaylight.py | dfarrell07/CBenchF | a3a5d9a6d2a703a77499a9ee8a2592d2f90b52e7 | [
"BSD-2-Clause"
] | null | null | null | tests/test_controllers_opendaylight.py | dfarrell07/CBenchF | a3a5d9a6d2a703a77499a9ee8a2592d2f90b52e7 | [
"BSD-2-Clause"
] | 1 | 2019-02-20T14:34:57.000Z | 2019-02-20T14:34:57.000Z | """Tests for the module that abstracts the OpenDaylight controller."""
import unittest
import cbenchf.controllers.opendaylight as odl_mod
class TestInit(unittest.TestCase):
"""Test building the ODL abstraction."""
@unittest.skip("Travis doesn't have Docker")
def test_basic(self):
"""Test a bas... | 28.363636 | 76 | 0.674679 |
544ca046e83a06b991014cd0c0e16e41fa92d041 | 590 | py | Python | chapter05/wsgirequest_demo/front/views.py | Tomtao626/django | fe945063593b4bfe82d74842f728b854b501a294 | [
"Apache-2.0"
] | null | null | null | chapter05/wsgirequest_demo/front/views.py | Tomtao626/django | fe945063593b4bfe82d74842f728b854b501a294 | [
"Apache-2.0"
] | null | null | null | chapter05/wsgirequest_demo/front/views.py | Tomtao626/django | fe945063593b4bfe82d74842f728b854b501a294 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from django.core.handlers.wsgi import WSGIRequest
# Create your views here.
def index(request):
print(request)
print(type(request))
return HttpResponse("success")
def login(request):
print(request.get_host())
print(request.... | 24.583333 | 49 | 0.70678 |
af85c2306e0610da00c175bfda90993367783497 | 965 | py | Python | sampletab.py | alexdevonport/pypimm-gui | db156a73934b69927f67952917953302627eea67 | [
"MIT"
] | null | null | null | sampletab.py | alexdevonport/pypimm-gui | db156a73934b69927f67952917953302627eea67 | [
"MIT"
] | null | null | null | sampletab.py | alexdevonport/pypimm-gui | db156a73934b69927f67952917953302627eea67 | [
"MIT"
] | null | null | null | import tkinter as tk
class SampleTab(tk.Frame):
"""
"""
def __init__(self, master):
super().__init__(master, session)
self.master = master
self.session = session
self.sampleListFrame = tk.Frame(self)
self.sampleList = tk.Listbox(self.sampleListFrame)
self.sa... | 29.242424 | 65 | 0.601036 |
ed4cdf74b11c877cacf4116de0cbd018a9430c6b | 10,524 | py | Python | ssseg/inference.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | 2 | 2021-10-31T21:52:30.000Z | 2021-12-21T12:35:37.000Z | ssseg/inference.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | null | null | null | ssseg/inference.py | zhizhangxian/sssegmentation | 90613f6e0abf4cdd729cf382ab2a915e106d8649 | [
"MIT"
] | null | null | null | '''
Function:
Visualize the segmentation results by using our segmentors
Author:
Zhenchao Jin
'''
import os
import cv2
import copy
import torch
import warnings
import argparse
import numpy as np
import torch.nn.functional as F
from tqdm import tqdm
from modules import *
from cfgs import BuildConfig
warnings.fil... | 53.42132 | 161 | 0.61241 |
c11635bf0509ab3eb04442d5f8bd453592e0244e | 5,326 | py | Python | dynamic_rest/meta.py | aleontiev/dynamic-rest | d4635f2163e1ae90c3c4fd680ef59ceb048d7cf7 | [
"MIT"
] | null | null | null | dynamic_rest/meta.py | aleontiev/dynamic-rest | d4635f2163e1ae90c3c4fd680ef59ceb048d7cf7 | [
"MIT"
] | null | null | null | dynamic_rest/meta.py | aleontiev/dynamic-rest | d4635f2163e1ae90c3c4fd680ef59ceb048d7cf7 | [
"MIT"
] | 3 | 2018-05-08T16:34:39.000Z | 2019-05-22T04:21:18.000Z | """Module containing Django meta helpers."""
from itertools import chain
from django.db import models
from dynamic_rest.related import RelatedObject
from dynamic_rest.compat import DJANGO110
class Meta(object):
_instances = {}
def __new__(cls, model):
key = model._meta.db_table if hasattr(model, '_... | 28.481283 | 78 | 0.553887 |
6a4884565142e681020a00eb43071f551cfb1433 | 1,184 | py | Python | toontown/shtiker/ShtikerPage.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 8 | 2017-10-10T11:41:01.000Z | 2021-02-23T12:55:47.000Z | toontown/shtiker/ShtikerPage.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/shtiker/ShtikerPage.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 2 | 2019-04-06T16:18:23.000Z | 2021-02-25T06:25:01.000Z | import ShtikerBook
from direct.fsm import StateData
from direct.gui.DirectGui import *
from pandac.PandaModules import *
class ShtikerPage(DirectFrame, StateData.StateData):
def __init__(self):
DirectFrame.__init__(self, relief=None, sortOrder=DGG.BACKGROUND_SORT_INDEX)
self.initialiseoptions(Shti... | 25.73913 | 84 | 0.627534 |
aed025efe3b040d661da60d7f0dac901dbec7856 | 2,692 | py | Python | examples/python/geometry/point_cloud_to_rgbd.py | jeertmans/Open3D | 4b9f7dcff14ab5f7d662121ff6cdab60c07118de | [
"MIT"
] | 6 | 2019-02-09T13:33:57.000Z | 2019-11-27T07:13:51.000Z | examples/python/geometry/point_cloud_to_rgbd.py | jeertmans/Open3D | 4b9f7dcff14ab5f7d662121ff6cdab60c07118de | [
"MIT"
] | null | null | null | examples/python/geometry/point_cloud_to_rgbd.py | jeertmans/Open3D | 4b9f7dcff14ab5f7d662121ff6cdab60c07118de | [
"MIT"
] | 3 | 2019-01-21T13:05:06.000Z | 2020-01-05T09:41:55.000Z | # ----------------------------------------------------------------------------
# - Open3D: www.open3d.org -
# ----------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2018-2021 www.open3d.org
#
# Permission i... | 48.071429 | 79 | 0.556464 |
017ba80782550323116bf9af8881331eb47dbbe1 | 4,585 | py | Python | benchmark/startQiskit_noisy1608.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1608.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1608.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=60
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 32.51773 | 82 | 0.622246 |
d173ca556a23b2354daae71e205d1f276b2794a8 | 14,264 | py | Python | chart/tests/test_webserver.py | aditishankar/test | dd3c46115ed3d5af7e6a4a6f8745cffb9b762c3a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | chart/tests/test_webserver.py | aditishankar/test | dd3c46115ed3d5af7e6a4a6f8745cffb9b762c3a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | chart/tests/test_webserver.py | aditishankar/test | dd3c46115ed3d5af7e6a4a6f8745cffb9b762c3a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 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 u... | 39.732591 | 110 | 0.562465 |
ce3a540e59fb3520d7ab6d3c56da5ec56fd1150a | 331 | py | Python | third_party/conan/recipes/llvm_x86_utils/conanfile.py | trobol/orbit | 62a206c34b1308e0d56b91f695f39ba8879b713c | [
"BSD-2-Clause"
] | 1 | 2021-04-15T23:59:38.000Z | 2021-04-15T23:59:38.000Z | third_party/conan/recipes/llvm_x86_utils/conanfile.py | idfoxdale/orbit | c6525a14e65b1de57028eaca0ab633265aedf348 | [
"BSD-2-Clause"
] | null | null | null | third_party/conan/recipes/llvm_x86_utils/conanfile.py | idfoxdale/orbit | c6525a14e65b1de57028eaca0ab633265aedf348 | [
"BSD-2-Clause"
] | 1 | 2020-07-14T13:16:03.000Z | 2020-07-14T13:16:03.000Z | from conans import python_requires
common = python_requires('llvm-common/0.0.3@orbitdeps/stable')
class LLVMX86Utils(common.LLVMModulePackage):
version = common.LLVMModulePackage.version
name = 'llvm_x86_utils'
llvm_component = 'llvm'
llvm_module = 'X86Utils'
llvm_requires = ['llvm_headers', 'llvm... | 30.090909 | 62 | 0.752266 |
8687d5f9b4615e823cf7f531b786cae1b9483af1 | 3,564 | py | Python | bindings/python/ensmallen/datasets/string/arthrobacterarilaitensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/arthrobacterarilaitensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/arthrobacterarilaitensis.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Arthrobacter arilaitensis.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prot... | 33 | 223 | 0.679012 |
ec137a592b8d14e5cc291c592ede979337782ddf | 17,578 | py | Python | sw/3rd_party/VTK-7.1.0/Common/DataModel/Testing/Python/LineIntersectQuadraticCells.py | esean/stl_voro_fill | c569a4019ff80afbf85482c7193711ea85a7cafb | [
"MIT"
] | 4 | 2019-05-30T01:52:12.000Z | 2021-09-29T21:12:13.000Z | graphics/VTK-7.0.0/Common/DataModel/Testing/Python/LineIntersectQuadraticCells.py | hlzz/dotfiles | 0591f71230c919c827ba569099eb3b75897e163e | [
"BSD-3-Clause"
] | null | null | null | graphics/VTK-7.0.0/Common/DataModel/Testing/Python/LineIntersectQuadraticCells.py | hlzz/dotfiles | 0591f71230c919c827ba569099eb3b75897e163e | [
"BSD-3-Clause"
] | 2 | 2019-08-30T23:36:13.000Z | 2019-11-08T16:52:01.000Z | #!/usr/bin/env python
import sys
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Prevent .pyc files being created.
# Stops the vtk source being polluted
# by .pyc files.
sys.dont_write_bytecode = True
import backdrop
# Contour every qu... | 34.399217 | 76 | 0.745477 |
5726c9828590dbcc55b7716c8be02822d8975d0e | 5,080 | py | Python | selfdrive/car/volkswagen/carcontroller.py | snedelkoski/openpilot | 3e945fb1fb8562949f801ea316e66d16ffa5a4ca | [
"MIT"
] | 1 | 2022-03-17T07:17:41.000Z | 2022-03-17T07:17:41.000Z | selfdrive/car/volkswagen/carcontroller.py | meiling222/openpilot | db7b49c71cfc420259d99d3a4a6f0972b4f887e8 | [
"MIT"
] | 2 | 2022-01-25T22:23:41.000Z | 2022-01-26T02:57:58.000Z | selfdrive/car/volkswagen/carcontroller.py | meiling222/openpilot | db7b49c71cfc420259d99d3a4a6f0972b4f887e8 | [
"MIT"
] | null | null | null | from cereal import car
from selfdrive.car import apply_std_steer_torque_limits
from selfdrive.car.volkswagen import volkswagencan
from selfdrive.car.volkswagen.values import DBC_FILES, CANBUS, MQB_LDW_MESSAGES, BUTTON_STATES, CarControllerParams as P
from opendbc.can.packer import CANPacker
VisualAlert = car.CarContro... | 43.418803 | 143 | 0.624606 |
be2042f7d08397a1b748eb9c3ec07452c9c6d2bd | 741 | py | Python | app/products/products.py | prinzz1208/StockManagementBackend | db9f3e3c0ddb41d988be6bc91f20b7af28ff99e0 | [
"MIT"
] | null | null | null | app/products/products.py | prinzz1208/StockManagementBackend | db9f3e3c0ddb41d988be6bc91f20b7af28ff99e0 | [
"MIT"
] | null | null | null | app/products/products.py | prinzz1208/StockManagementBackend | db9f3e3c0ddb41d988be6bc91f20b7af28ff99e0 | [
"MIT"
] | 1 | 2021-09-30T18:01:08.000Z | 2021-09-30T18:01:08.000Z | from app.categories.schemas import AddproductDTO, productDTO
from sqlalchemy.orm.session import Session
from app.database.dbconfig import get_db
from fastapi import APIRouter
from fastapi.param_functions import Depends
from app.products.schemas import AddProductDTO, ProductDTO
from . import repository
router = APIRout... | 43.588235 | 96 | 0.820513 |
771956d5fc0348b4bf57c43c19f23950f9f5b3d5 | 6,926 | py | Python | meerk40t/device/ch341/ch341.py | aniziorodrigues/meerk40t | ca1180b690a2f25748fe04cb7fdbf270520deab9 | [
"MIT"
] | null | null | null | meerk40t/device/ch341/ch341.py | aniziorodrigues/meerk40t | ca1180b690a2f25748fe04cb7fdbf270520deab9 | [
"MIT"
] | null | null | null | meerk40t/device/ch341/ch341.py | aniziorodrigues/meerk40t | ca1180b690a2f25748fe04cb7fdbf270520deab9 | [
"MIT"
] | null | null | null | from ...kernel import Module
def plugin(kernel, lifecycle=None):
if lifecycle == "register":
kernel.register("module/ch341", CH341)
class Connection:
"""
A single connection to an CH341 device.
"""
def __init__(self, channel, state):
self.channel = channel
self.state = s... | 34.80402 | 119 | 0.594282 |
d85ced9ef535e5311366ca531fe0b8650ece10b5 | 700 | py | Python | 91. Decode Ways/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | 2 | 2019-10-05T09:48:20.000Z | 2019-10-05T15:40:01.000Z | 91. Decode Ways/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | null | null | null | 91. Decode Ways/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | 3 | 2020-09-27T05:48:30.000Z | 2021-08-13T10:07:08.000Z | class Solution:
def numDecodings(self, s):
"""
:type s: str
:rtype: int
"""
if s[0] == '0':
return 0
dp = [0 for i in range(len(s) + 1)]
dp[0] = 1
dp[1] = 1
for i in range(2, len(s)+1):
... | 25.925926 | 100 | 0.31 |
af27be71dcbbd0e064ccf2c0541f336522cdcc3d | 7,488 | py | Python | heatclient/osc/v1/software_config.py | enterstudio/python-heatclient | 954e475a6a0a12432ec325d7579460fabcf3f40a | [
"Apache-2.0"
] | 57 | 2015-01-15T05:36:00.000Z | 2021-10-04T13:28:31.000Z | heatclient/osc/v1/software_config.py | enterstudio/python-heatclient | 954e475a6a0a12432ec325d7579460fabcf3f40a | [
"Apache-2.0"
] | null | null | null | heatclient/osc/v1/software_config.py | enterstudio/python-heatclient | 954e475a6a0a12432ec325d7579460fabcf3f40a | [
"Apache-2.0"
] | 57 | 2015-01-06T07:00:01.000Z | 2021-06-15T05:17:52.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
# distrib... | 31.070539 | 77 | 0.614183 |
aa0e38769c7c9ce7f6a6425c97060ea70edbc59a | 456 | py | Python | nocloud/storage-pool/list_storage_pool_by_name.py | chong601/NoCloud | 98fa5fba5220c5f98a7c55974161c2285615ac1f | [
"MIT"
] | 14 | 2021-02-24T00:11:01.000Z | 2021-06-19T09:58:06.000Z | nocloud/storage-pool/list_storage_pool_by_name.py | chong601/NoCloud | 98fa5fba5220c5f98a7c55974161c2285615ac1f | [
"MIT"
] | 1 | 2021-03-05T00:12:55.000Z | 2021-03-05T00:17:16.000Z | nocloud/storage-pool/list_storage_pool_by_name.py | chong601/NoCloud | 98fa5fba5220c5f98a7c55974161c2285615ac1f | [
"MIT"
] | 3 | 2021-02-24T00:23:32.000Z | 2021-03-02T09:09:33.000Z | import libvirt
# Constants
LIBVIRT_URI = 'qemu+ssh://chong601@10.102.0.5/system'
INFO_VOLUME_ACTIVATING = 'Pool "{}" is inactive, temporarily activating pool...'
INFO_VOLUME_DEACTIVATING = 'Deactivating pool "{}"...'
# Parameters
STORAGE_POOL_NAME = 'vm-ubuntu-focal-lxd-1'
# Internal definitions
libvirt_conn = lib... | 25.333333 | 80 | 0.760965 |
6fd6ed672a3cf7b5b3b8c39d77d87f188c77aae3 | 15,167 | py | Python | salt/crypt.py | slafs/salt | 13340355afb15db7fcc1b8393247f7aa10024710 | [
"Apache-2.0"
] | null | null | null | salt/crypt.py | slafs/salt | 13340355afb15db7fcc1b8393247f7aa10024710 | [
"Apache-2.0"
] | null | null | null | salt/crypt.py | slafs/salt | 13340355afb15db7fcc1b8393247f7aa10024710 | [
"Apache-2.0"
] | null | null | null | '''
The crypt module manages all of the cryptography functions for minions and
masters, encrypting and decrypting payloads, preparing messages, and
authenticating peers
'''
# Import python libs
import os
import sys
import hmac
import hashlib
import logging
# Import third party libs
from M2Crypto import RSA
from Crypt... | 36.459135 | 85 | 0.58291 |
1616437c78665e6d42eb002ea9fbc5edc07ff33d | 191 | py | Python | ch04/filter.regular.py | kxen42/Learn-Python-Programming-Third-Edition | 851ddc5e6094fadd44f31a9ad1d3876456b04372 | [
"MIT"
] | 19 | 2021-11-05T22:54:09.000Z | 2022-03-29T15:03:47.000Z | ch04/filter.regular.py | kxen42/Learn-Python-Programming-Third-Edition | 851ddc5e6094fadd44f31a9ad1d3876456b04372 | [
"MIT"
] | null | null | null | ch04/filter.regular.py | kxen42/Learn-Python-Programming-Third-Edition | 851ddc5e6094fadd44f31a9ad1d3876456b04372 | [
"MIT"
] | 26 | 2021-11-12T17:04:50.000Z | 2022-03-29T01:10:35.000Z | # filter.regular.py
def is_multiple_of_five(n):
return not n % 5
def get_multiples_of_five(n):
return list(filter(is_multiple_of_five, range(n)))
print(get_multiples_of_five(50))
| 17.363636 | 54 | 0.748691 |
c4d6343021539078383822b733ff9c84c80b6df7 | 105,279 | py | Python | autotest/ogr/ogr_elasticsearch.py | jcphill/gdal | 98c9ecf8513325bb69888d368bd9a0d54b79e72b | [
"Apache-2.0"
] | 2 | 2022-03-24T00:53:48.000Z | 2022-03-26T02:52:52.000Z | autotest/ogr/ogr_elasticsearch.py | jcphill/gdal | 98c9ecf8513325bb69888d368bd9a0d54b79e72b | [
"Apache-2.0"
] | 1 | 2022-02-26T19:07:05.000Z | 2022-02-27T00:11:45.000Z | autotest/ogr/ogr_elasticsearch.py | jcphill/gdal | 98c9ecf8513325bb69888d368bd9a0d54b79e72b | [
"Apache-2.0"
] | 1 | 2022-01-13T19:15:30.000Z | 2022-01-13T19:15:30.000Z | #!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Elasticsearch driver testing (with fake server)
# Author: Even Rouault <even dot rouault at spatialys.com>
#
######################################################... | 35.304829 | 1,260 | 0.508553 |
9e53ff93583876cb8f8c424caaf8360089e866ce | 16,352 | py | Python | fhir/resources/STU3/supplyrequest.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 144 | 2019-05-08T14:24:43.000Z | 2022-03-30T02:37:11.000Z | fhir/resources/STU3/supplyrequest.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 82 | 2019-05-13T17:43:13.000Z | 2022-03-30T16:45:17.000Z | fhir/resources/STU3/supplyrequest.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 48 | 2019-04-04T14:14:53.000Z | 2022-03-30T06:07:31.000Z | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/SupplyRequest
Release: STU3
Version: 3.0.2
Revision: 11917
Last updated: 2019-10-24T11:53:00+11:00
"""
import typing
from pydantic import Field, root_validator
from . import backboneelement, domainresource, fhirtypes
class SupplyRequest(do... | 36.418708 | 91 | 0.614359 |
df9098d8f9504281b24fc5b32d8afa091d76f904 | 997 | py | Python | ex24.py | Ma-Min-Min/python-exercises | 1b0d63456d88b4750f89821782812becf4177375 | [
"MIT"
] | null | null | null | ex24.py | Ma-Min-Min/python-exercises | 1b0d63456d88b4750f89821782812becf4177375 | [
"MIT"
] | null | null | null | ex24.py | Ma-Min-Min/python-exercises | 1b0d63456d88b4750f89821782812becf4177375 | [
"MIT"
] | null | null | null | print ("Let's practice everything.")
print ('You\'d need to know \'bout escapes with \\ that do:')
print ('\n newlines and \t tabs.')
poem = """
\tThe lovely world
with logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is non... | 25.564103 | 70 | 0.665998 |
c41fc9859bccb42d33b981e3745b45516318516a | 71 | py | Python | api/database/__init__.py | masaiborg/fastapi-mysql-docker-template | af218847b6cb38e4193cda6805405ccfa6dd4f7c | [
"MIT"
] | 2 | 2022-02-15T05:40:55.000Z | 2022-03-22T22:10:41.000Z | api/database/__init__.py | masaiborg/fastapi-mysql-docker-template | af218847b6cb38e4193cda6805405ccfa6dd4f7c | [
"MIT"
] | null | null | null | api/database/__init__.py | masaiborg/fastapi-mysql-docker-template | af218847b6cb38e4193cda6805405ccfa6dd4f7c | [
"MIT"
] | null | null | null | # database module
from .query import query_get, query_put, query_update | 35.5 | 53 | 0.830986 |
dee3571efa3bca3468053368883cce33a186d551 | 7,929 | py | Python | docs/conf.py | csu-hmc/GaitAnalysisToolKit | 1757032cb9cfe62a747aaa53fa320a8d8600db58 | [
"Apache-2.0"
] | 75 | 2015-03-07T19:38:13.000Z | 2022-03-28T13:59:29.000Z | docs/conf.py | csu-hmc/GaitAnalysisToolKit | 1757032cb9cfe62a747aaa53fa320a8d8600db58 | [
"Apache-2.0"
] | 21 | 2015-01-13T00:51:22.000Z | 2022-01-26T10:58:28.000Z | docs/conf.py | csu-hmc/GaitAnalysisToolKit | 1757032cb9cfe62a747aaa53fa320a8d8600db58 | [
"Apache-2.0"
] | 25 | 2015-05-25T21:28:08.000Z | 2022-02-24T07:30:37.000Z | # -*- coding: utf-8 -*-
#
# GaitAnalysisToolKit documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 11 12:40:21 2011.
#
# 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 f... | 33.0375 | 124 | 0.720393 |
db5d04173a045320c576971e2a7ef9f36742fbe2 | 788 | py | Python | src/phonebot/core/common/path.py | vi-robotics/pyphonebot-core | 9b95dff2f2b3a7465ce10fb6562be82c6f9b4244 | [
"MIT"
] | null | null | null | src/phonebot/core/common/path.py | vi-robotics/pyphonebot-core | 9b95dff2f2b3a7465ce10fb6562be82c6f9b4244 | [
"MIT"
] | null | null | null | src/phonebot/core/common/path.py | vi-robotics/pyphonebot-core | 9b95dff2f2b3a7465ce10fb6562be82c6f9b4244 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
from os.path import abspath
from typing import AnyStr
class PhonebotPath():
"""Path configuration contains absolute paths to Phonebot directories.
"""
@staticmethod
def root() -> AnyStr @ abspath:
"""The root directory.
Returns:
str: The ab... | 28.142857 | 83 | 0.625635 |
807d7284422443396a86e2ea0fdb08749529d3f9 | 2,858 | py | Python | examples/adspygoogle/dfa/v1_20/upload_in_stream_asset.py | cherry-wb/googleads-python-lib | 24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04 | [
"Apache-2.0"
] | null | null | null | examples/adspygoogle/dfa/v1_20/upload_in_stream_asset.py | cherry-wb/googleads-python-lib | 24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04 | [
"Apache-2.0"
] | null | null | null | examples/adspygoogle/dfa/v1_20/upload_in_stream_asset.py | cherry-wb/googleads-python-lib | 24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04 | [
"Apache-2.0"
] | 2 | 2020-04-02T19:00:31.000Z | 2020-08-06T03:28:38.000Z | #!/usr/bin/python
#
# Copyright 2013 Google 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 b... | 34.02381 | 80 | 0.749125 |
65fec9814e339ba1288ec6b5542d1191f8f6b57a | 408 | py | Python | mayan/apps/mimetype/apps.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 1 | 2021-06-17T18:24:25.000Z | 2021-06-17T18:24:25.000Z | mayan/apps/mimetype/apps.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | 7 | 2020-06-06T00:01:04.000Z | 2022-01-13T01:47:17.000Z | mayan/apps/mimetype/apps.py | Syunkolee9891/Mayan-EDMS | 3759a9503a264a180b74cc8518388f15ca66ac1a | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from mayan.apps.common.apps import MayanAppConfig
from .dependencies import * # NOQA
class MIMETypesApp(MayanAppConfig):
name = 'mayan.apps.mimetype'
has_tests = True
verbose_name = _('MIME types')
def... | 24 | 56 | 0.730392 |
5d89f8a0635ce7bc07a26ed63a3c7d300222f57a | 32,292 | py | Python | sdk/python/pulumi_azure_native/network/v20150615/security_rule.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20150615/security_rule.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20150615/security_rule.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"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, overload
from ... import _utilities
fro... | 60.813559 | 5,245 | 0.689985 |
30aacfc1f1939accbdee0e28ec46d9abf2b01918 | 6,304 | py | Python | pybelt.py | hermanj13/Pybelt | 050fe8dce8107d9b80dda4bb15dc466104f9ba47 | [
"MIT"
] | null | null | null | pybelt.py | hermanj13/Pybelt | 050fe8dce8107d9b80dda4bb15dc466104f9ba47 | [
"MIT"
] | null | null | null | pybelt.py | hermanj13/Pybelt | 050fe8dce8107d9b80dda4bb15dc466104f9ba47 | [
"MIT"
] | null | null | null | import argparse
import random
import sys
import getpass
# Pointers
from lib.pointers import run_proxy_finder
from lib.pointers import run_xss_scan
from lib.pointers import run_sqli_scan
from lib.pointers import run_dork_checker
from lib.pointers import run_hash_cracker
from lib.pointers import run_hash_verification
fr... | 46.352941 | 105 | 0.637214 |
5e7b5f60b9cd22a6ce1fdbd6d5081462be1a2408 | 1,886 | py | Python | src/serenity/data/batch/load_sharadar_institutional_holdings.py | dunetz/serenity | b53adb8cb76b176665a517972982cb90367b810f | [
"Apache-2.0"
] | null | null | null | src/serenity/data/batch/load_sharadar_institutional_holdings.py | dunetz/serenity | b53adb8cb76b176665a517972982cb90367b810f | [
"Apache-2.0"
] | null | null | null | src/serenity/data/batch/load_sharadar_institutional_holdings.py | dunetz/serenity | b53adb8cb76b176665a517972982cb90367b810f | [
"Apache-2.0"
] | 1 | 2021-09-23T10:47:35.000Z | 2021-09-23T10:47:35.000Z | from serenity.data.batch.load_sharadar_tickers import LoadSharadarTickersTask
from serenity.data.batch.utils import LoadSharadarTableTask, ExportQuandlTableTask
from serenity.data.sharadar_api import clean_nulls
from serenity.data.sharadar_holdings import InstitutionalInvestor, SecurityType, InstitutionalHoldings
from ... | 42.863636 | 112 | 0.699894 |
d9b7f2326ebee76f1dee39307a828d211df9aab7 | 5,851 | py | Python | test/test_phonology.py | defseg/PyLaut | e0d84d49189aceffdfaf8ccd94f16f4797dbbd80 | [
"MIT"
] | 4 | 2015-01-05T19:28:16.000Z | 2019-09-01T05:02:15.000Z | test/test_phonology.py | defseg/PyLaut | e0d84d49189aceffdfaf8ccd94f16f4797dbbd80 | [
"MIT"
] | 153 | 2016-07-20T18:38:37.000Z | 2021-03-25T22:29:47.000Z | test/test_phonology.py | defseg/PyLaut | e0d84d49189aceffdfaf8ccd94f16f4797dbbd80 | [
"MIT"
] | 5 | 2015-01-05T19:28:21.000Z | 2019-04-22T16:40:19.000Z | """
Test module for phonology.py
"""
import pytest
from pylaut.language.phonology import phonology
@pytest.fixture
def vowels():
return {"aː", "iː", "uː", "a", "i", "u", "ə"}
@pytest.fixture
def consonants():
return {"p", "t", "k", "s", "x", "r", "l", "w"}
@pytest.fixture
def sample_phonology(vowels, con... | 31.12234 | 79 | 0.735772 |
414072e3fc9aa9894f5b0a73cb0be246a1b7e96e | 586 | py | Python | my_env/Lib/site-packages/sklearn/linear_model/bayes.py | obulrdy6881/Drowsinss | 61cb9281d7dd22aee282b517e2fbf500f0ff9935 | [
"MIT"
] | 2 | 2021-05-02T07:59:56.000Z | 2021-12-14T19:53:13.000Z | Web application/env/Lib/site-packages/sklearn/linear_model/bayes.py | arpit0891/Covid-19-and-Pneumonia-detection-from-X-Ray | 6b2756e4672ab25083a0a50f44f36bec1833e789 | [
"MIT"
] | 7 | 2021-06-08T21:46:24.000Z | 2022-03-12T00:35:31.000Z | my_env/Lib/site-packages/sklearn/linear_model/bayes.py | obulrdy6881/Drowsinss | 61cb9281d7dd22aee282b517e2fbf500f0ff9935 | [
"MIT"
] | 1 | 2021-05-02T07:59:59.000Z | 2021-05-02T07:59:59.000Z |
# THIS FILE WAS AUTOMATICALLY GENERATED BY deprecated_modules.py
import sys
# mypy error: Module X has no attribute y (typically for C extensions)
from . import _bayes # type: ignore
from ..externals._pep562 import Pep562
from ..utils.deprecation import _raise_dep_warning_if_not_pytest
deprecated_path = 'skl... | 30.842105 | 71 | 0.774744 |
4adcdd0112b264ba0d8cd22d3b1e20956399f7fb | 960 | py | Python | pandas/tests/indexes/multi/test_astype.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 5 | 2019-07-26T15:22:41.000Z | 2021-09-28T09:22:17.000Z | pandas/tests/indexes/multi/test_astype.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 16 | 2021-03-19T09:44:52.000Z | 2022-03-12T00:22:14.000Z | pandas/tests/indexes/multi/test_astype.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 9 | 2020-02-05T10:24:12.000Z | 2020-02-10T13:08:50.000Z | import numpy as np
import pytest
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas.util.testing import assert_copy
def test_astype(idx):
expected = idx.copy()
actual = idx.astype("O")
assert_copy(actual.levels, expected.levels)
assert_copy(actual.codes, expected.codes)
assert [l... | 30.967742 | 74 | 0.710417 |
873cb87fd2245d18113c3ddd753c6e4a13104b7d | 22,701 | py | Python | indicators/models.py | AkshJain99/Activity-CE | cbd1aa94a115a5bdba5e69fa3030335fa58c695b | [
"Apache-2.0"
] | 1 | 2021-07-07T07:31:53.000Z | 2021-07-07T07:31:53.000Z | indicators/models.py | AkshJain99/Activity-CE | cbd1aa94a115a5bdba5e69fa3030335fa58c695b | [
"Apache-2.0"
] | null | null | null | indicators/models.py | AkshJain99/Activity-CE | cbd1aa94a115a5bdba5e69fa3030335fa58c695b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from django.db import models
from django.contrib import admin
from django.utils import timezone
import uuid
from simple_history.models import HistoricalRecords
from decimal import Decimal
from datetime import datetime, timedelta
from workflow.models import (
Program, Se... | 40.610018 | 124 | 0.687238 |
abf92b8969204a5aa3d4a13bfb23b5c6157cf7ae | 6,465 | py | Python | docs/tutorials/project_allocation/data.py | samf1986/matching | c1ed91127ef73e22702c66d88a4c53464625b7a8 | [
"MIT"
] | 94 | 2018-09-11T17:46:41.000Z | 2022-03-23T09:35:22.000Z | docs/tutorials/project_allocation/data.py | samf1986/matching | c1ed91127ef73e22702c66d88a4c53464625b7a8 | [
"MIT"
] | 54 | 2018-08-31T21:05:22.000Z | 2021-09-26T10:26:13.000Z | docs/tutorials/project_allocation/data.py | samf1986/matching | c1ed91127ef73e22702c66d88a4c53464625b7a8 | [
"MIT"
] | 36 | 2018-11-09T22:49:31.000Z | 2022-01-31T10:09:27.000Z | """ A script to generate the dummy datasets used in `main.ipynb`. """
import string
import sys
import numpy as np
import pandas as pd
MAX_STUDENTS = 100
MAX_STUDENT_CHOICES = 25
MAX_SUPERVISOR_PROJECTS = 4
MAX_CAPACITY = 8
SEED = 2019
if len(sys.argv) == 6:
MAX_STUDENTS = int(sys.argv[1])
MAX_STUDENT_CHOICE... | 30.21028 | 80 | 0.702243 |
e06a8a1d82bd6d1168e6d681ccd80483453dce69 | 2,946 | py | Python | Grid/GridProcessing.py | kensukenk/optimized_dp | 4771787366ca04139c168c8988dad378ad404ab6 | [
"MIT"
] | 41 | 2020-06-23T01:58:03.000Z | 2022-03-28T01:45:12.000Z | Grid/GridProcessing.py | kensukenk/optimized_dp | 4771787366ca04139c168c8988dad378ad404ab6 | [
"MIT"
] | 1 | 2021-08-01T06:58:57.000Z | 2021-08-01T06:58:57.000Z | Grid/GridProcessing.py | kensukenk/optimized_dp | 4771787366ca04139c168c8988dad378ad404ab6 | [
"MIT"
] | 20 | 2020-06-05T20:52:02.000Z | 2022-03-01T03:17:39.000Z | import numpy as np
import math
class Grid:
def __init__(self, minBounds, maxBounds, dims, pts_each_dim, periodicDims=[]):
"""
Args:
minBounds (list): The lower bounds of each dimension in the grid
maxBounds (list): The upper bounds of each dimension in the grid
... | 35.071429 | 121 | 0.549559 |
6a01019bb0185d0d7524389fa49677afc7b7e5ff | 516 | py | Python | data/train/python/6a01019bb0185d0d7524389fa49677afc7b7e5ffserver.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/6a01019bb0185d0d7524389fa49677afc7b7e5ffserver.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/6a01019bb0185d0d7524389fa49677afc7b7e5ffserver.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from flask import Flask
from flask.ext.restful import Api
from api import IndexApi, RoadsApi, CitiesApi, CitiesIdApi, CountriesApi
app = Flask(__name__)
app.config['DEBUG'] = True
api = Api(app)
api.add_resource(IndexApi, '/', '/index')
api.add_resource(RoadsApi, '/', '/api/roads')
api.add_resource(CitiesApi, '/', ... | 23.454545 | 72 | 0.699612 |
4a8fbf09b2b638c9036ddad104d018ccd18568d8 | 17,071 | py | Python | src/core/toga/app.py | simonw/toga | 8b52479c5d9960c5f3af960b5837ecc467c0bc95 | [
"BSD-3-Clause"
] | 3 | 2020-12-09T02:13:55.000Z | 2021-02-18T00:41:36.000Z | src/core/toga/app.py | simonw/toga | 8b52479c5d9960c5f3af960b5837ecc467c0bc95 | [
"BSD-3-Clause"
] | 1 | 2021-05-23T04:04:58.000Z | 2021-05-25T22:08:14.000Z | src/core/toga/app.py | simonw/toga | 8b52479c5d9960c5f3af960b5837ecc467c0bc95 | [
"BSD-3-Clause"
] | null | null | null | import signal
import sys
import warnings
import webbrowser
from builtins import id as identifier
from email.message import Message
from toga.command import CommandSet
from toga.handlers import wrapped_handler
from toga.icons import Icon
from toga.platform import get_platform_factory
from toga.window import Window
try... | 31.848881 | 83 | 0.613731 |
689660c370a8344787ca88afe9cd9f98b7020317 | 6,706 | py | Python | src/antispoof_processor.py | MiVaVo/Antispoof-3d | 03ee614f4daf85069ce22c80cb6ed4642bdf762e | [
"CC0-1.0"
] | 1 | 2020-06-01T13:24:06.000Z | 2020-06-01T13:24:06.000Z | src/antispoof_processor.py | MiVaVo/Antispoof-3d | 03ee614f4daf85069ce22c80cb6ed4642bdf762e | [
"CC0-1.0"
] | null | null | null | src/antispoof_processor.py | MiVaVo/Antispoof-3d | 03ee614f4daf85069ce22c80cb6ed4642bdf762e | [
"CC0-1.0"
] | null | null | null | from __future__ import absolute_import
import os
import re
from datetime import datetime as dt
from pickle import UnpicklingError
import numpy as np
from src import icp
from src.icp import draw_registration_result
from src.process_data import Landmarks3DFinder
from src.process_data import LandmarksFinderDlib
from sr... | 42.987179 | 131 | 0.642708 |
1468fcd35ed13914e4a7818e7928786fe8ee06d6 | 9,450 | py | Python | readthedocs/doc_builder/backends/mkdocs.py | ktdreyer/readthedocs.org | d5e0631e4c1f5da061bdf851a1efe48394fd6b5c | [
"MIT"
] | null | null | null | readthedocs/doc_builder/backends/mkdocs.py | ktdreyer/readthedocs.org | d5e0631e4c1f5da061bdf851a1efe48394fd6b5c | [
"MIT"
] | 4 | 2021-02-08T21:06:18.000Z | 2021-06-10T23:24:55.000Z | readthedocs/doc_builder/backends/mkdocs.py | ktdreyer/readthedocs.org | d5e0631e4c1f5da061bdf851a1efe48394fd6b5c | [
"MIT"
] | 1 | 2018-07-02T19:17:55.000Z | 2018-07-02T19:17:55.000Z | """
MkDocs_ backend for building docs.
.. _MkDocs: http://www.mkdocs.org/
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals)
import json
import logging
import os
import yaml
from django.conf import settings
from django.template import loader as template_loader
from readthe... | 35.393258 | 97 | 0.624339 |
97decb861385f63bf14d50f2bff6f2e0bb784520 | 758 | py | Python | test/util/bombz/mockserver/mockserver/wsgiapp.py | bischjer/auxiliary | e42d8a4af43c9bd4d816c03edc2465640635b46b | [
"BSD-3-Clause"
] | null | null | null | test/util/bombz/mockserver/mockserver/wsgiapp.py | bischjer/auxiliary | e42d8a4af43c9bd4d816c03edc2465640635b46b | [
"BSD-3-Clause"
] | null | null | null | test/util/bombz/mockserver/mockserver/wsgiapp.py | bischjer/auxiliary | e42d8a4af43c9bd4d816c03edc2465640635b46b | [
"BSD-3-Clause"
] | null | null | null | from paste.deploy.config import ConfigMiddleware
import sampleapp
def make_app(
global_conf,
# Optional and required configuration parameters
# can go here, or just **kw; greeting is required:
greeting,
**kw):
# This is a WSGI application:
app = sampleapp.application
# Here we merge a... | 30.32 | 59 | 0.703166 |
561b3904465075d3c46e7d335a1ab2bd05641341 | 10,593 | py | Python | benchmarks/bm_scimark_small.py | usalko/nogil | 7a480f849f1f12a159a10bb0aa0f3431f24ce5f6 | [
"0BSD"
] | 1 | 2021-11-19T02:20:24.000Z | 2021-11-19T02:20:24.000Z | benchmarks/bm_scimark_small.py | usalko/nogil | 7a480f849f1f12a159a10bb0aa0f3431f24ce5f6 | [
"0BSD"
] | null | null | null | benchmarks/bm_scimark_small.py | usalko/nogil | 7a480f849f1f12a159a10bb0aa0f3431f24ce5f6 | [
"0BSD"
] | null | null | null | from array import array
import math
import time
class Array2D(object):
def __init__(self, w, h, data=None):
self.width = w
self.height = h
self.data = array('d', [0]) * (w * h)
if data is not None:
self.setup(data)
def _idx(self, x, y):
if 0 <= x < self.wi... | 24.924706 | 82 | 0.484943 |
64eb50b5b67b7d75e65ec6120aaebed11223ea73 | 13,590 | py | Python | gs_quant/risk/core.py | shawlu95/gs-quant | 8ba89986b3126c3f552555fb1c565a46a508da93 | [
"Apache-2.0"
] | 1 | 2019-12-02T03:01:04.000Z | 2019-12-02T03:01:04.000Z | gs_quant/risk/core.py | chrisdroukas/gs-quant | f80302d23c0d2e1195d4751ad2db8ab06c6299fa | [
"Apache-2.0"
] | null | null | null | gs_quant/risk/core.py | chrisdroukas/gs-quant | f80302d23c0d2e1195d4751ad2db8ab06c6299fa | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Goldman Sachs.
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 di... | 35.483029 | 118 | 0.724135 |
66278be713a2341dc7d97681d87e654c4e95a4e0 | 5,943 | py | Python | test/redshift/test_target_table.py | Dwolla/arbalest | 5516aa11a24012a6222acc3b583261ff90ee450f | [
"MIT"
] | 46 | 2015-11-01T19:37:46.000Z | 2021-04-14T02:41:10.000Z | test/redshift/test_target_table.py | Dwolla/arbalest | 5516aa11a24012a6222acc3b583261ff90ee450f | [
"MIT"
] | 1 | 2016-04-20T16:56:44.000Z | 2016-04-20T16:56:44.000Z | test/redshift/test_target_table.py | Dwolla/arbalest | 5516aa11a24012a6222acc3b583261ff90ee450f | [
"MIT"
] | 9 | 2015-10-31T23:01:50.000Z | 2021-08-02T21:15:25.000Z | import unittest
from mock import patch, Mock
from arbalest.redshift import TargetTable
from arbalest.redshift.schema import JsonObject, Property
from arbalest.sql import Database
from test import TABLE_NAME
class TargetTableShould(unittest.TestCase):
def setUp(self):
self.schema = JsonObject(TABLE_NAME, P... | 42.148936 | 80 | 0.540131 |
b08d4116fa6263dec021d4efd16144d8878dfdd9 | 3,739 | py | Python | python/cmsaa_180.py | jaelle/cmsaa | 23f6715385dd065648d800bd94a166e9bbd85d8e | [
"MIT"
] | null | null | null | python/cmsaa_180.py | jaelle/cmsaa | 23f6715385dd065648d800bd94a166e9bbd85d8e | [
"MIT"
] | null | null | null | python/cmsaa_180.py | jaelle/cmsaa | 23f6715385dd065648d800bd94a166e9bbd85d8e | [
"MIT"
] | null | null | null | from cmsaa import attentional_bias, optimize_prioritymap, rmse,plot_results,plot_results_w_test
from cmsaa import GoalMap, SaliencyMap, PriorityMap
import matplotlib.pyplot as plt
import csv
from scipy.integrate import simps
import numpy as np
data_180 = {}
test_180 = {}
stimuli_locations_180 = [-90,-45,0... | 34.943925 | 173 | 0.654453 |
99c74bf7b2588740e6937c3a529e30916c4060f0 | 679 | py | Python | products/migrations/0008_auto_20151124_1903.py | n2o/guhema | eb390cbb5213a5ae16539ea46d473a5dc1866415 | [
"MIT"
] | null | null | null | products/migrations/0008_auto_20151124_1903.py | n2o/guhema | eb390cbb5213a5ae16539ea46d473a5dc1866415 | [
"MIT"
] | 2 | 2016-01-20T22:21:33.000Z | 2016-01-29T08:50:21.000Z | products/migrations/0008_auto_20151124_1903.py | n2o/guhema | eb390cbb5213a5ae16539ea46d473a5dc1866415 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9c1 on 2015-11-24 19:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0007_auto_20151124_1902'),
]
operations = [
migrations.AlterFiel... | 26.115385 | 89 | 0.615611 |
9eed6895e29bf7e7d93de367ceed1c8dbecd3fe2 | 8,473 | py | Python | t/qry.py | APNIC-Labs/rtmfp-probe | c15255ea242fe5c60ac33e7f9aaf0bff7884b7ad | [
"BSD-3-Clause"
] | 1 | 2015-04-29T04:40:58.000Z | 2015-04-29T04:40:58.000Z | t/qry.py | APNIC-Labs/rtmfp-probe | c15255ea242fe5c60ac33e7f9aaf0bff7884b7ad | [
"BSD-3-Clause"
] | null | null | null | t/qry.py | APNIC-Labs/rtmfp-probe | c15255ea242fe5c60ac33e7f9aaf0bff7884b7ad | [
"BSD-3-Clause"
] | 2 | 2015-05-08T03:39:51.000Z | 2019-10-17T09:20:26.000Z | #!/usr/bin/env python
from dh import DiffieHellman
import crypto
import socket
import struct
from binascii import hexlify, unhexlify
UDP_IP='50.57.70.211'
UDP_IP='127.0.0.1'
UDP_PORT=1935 #macromedia-fcs
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('', 0))
print 'Listening on port ' + str(sock... | 32.968872 | 109 | 0.558716 |
bf13b713f9e08521fec8b5d666113313149700c3 | 2,172 | py | Python | old/script/RegulatorPlot.py | schregardusc/dishtiny | b0b1841a457a955fa4c22f36a050d91f12484f9e | [
"MIT"
] | 1 | 2021-02-12T23:53:55.000Z | 2021-02-12T23:53:55.000Z | old/script/RegulatorPlot.py | schregardusc/dishtiny | b0b1841a457a955fa4c22f36a050d91f12484f9e | [
"MIT"
] | null | null | null | old/script/RegulatorPlot.py | schregardusc/dishtiny | b0b1841a457a955fa4c22f36a050d91f12484f9e | [
"MIT"
] | null | null | null | # usage:
# dataframe_filename
import sys
import os
import seaborn as sns
import pandas as pd
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
from keyname import keyname as kn
from fileshash import fileshash as fsh
matplotlib.rcParams['pdf.fonttype'] = 42
sns.set(style='white... | 24.681818 | 76 | 0.63582 |
ca5099608d281b9cdd987c21a8a7e1d4449f91a4 | 2,598 | py | Python | text_finder.py | Ry-Co/text-pair-parser | 4fe7f84fefccde3b4a632a6a4689e6fb11612d1b | [
"MIT"
] | null | null | null | text_finder.py | Ry-Co/text-pair-parser | 4fe7f84fefccde3b4a632a6a4689e6fb11612d1b | [
"MIT"
] | null | null | null | text_finder.py | Ry-Co/text-pair-parser | 4fe7f84fefccde3b4a632a6a4689e6fb11612d1b | [
"MIT"
] | null | null | null | import requests
import os
from bs4 import BeautifulSoup
from pprint import pprint
def main():
url_cnn = 'http://lite.cnn.com/en'
url_npr = 'https://text.npr.org/'
low_level_urls_npr = parse_base_urls(url_npr)
validURLs_npr = parse_urls_NPR(url_npr, low_level_urls_npr)
write_to_txt_NPR(v... | 28.549451 | 101 | 0.611239 |
299ccdd6e1a0972a6c8b00c58c9c178e605d97f8 | 1,268 | py | Python | config_example.py | exunious/Noella-Bot | ef119cf1ffc102188954962d54f07d895f4a7a94 | [
"MIT"
] | null | null | null | config_example.py | exunious/Noella-Bot | ef119cf1ffc102188954962d54f07d895f4a7a94 | [
"MIT"
] | 1 | 2019-01-08T21:53:38.000Z | 2019-01-08T21:53:38.000Z | config_example.py | exunious/Noella-Bot | ef119cf1ffc102188954962d54f07d895f4a7a94 | [
"MIT"
] | 3 | 2018-01-05T02:58:01.000Z | 2018-06-14T20:56:51.000Z | #######################################
############# Config File #############
#######################################
from discord.ext import commands
from collections import Counter
from collections import OrderedDict, deque, Counter
from datetime import datetime as dt
import openweathermapy.core as owm
import cog... | 27.565217 | 88 | 0.727129 |
09ac99b1a0535db29c6858515ce09e5dbb989af9 | 453 | py | Python | Python/Samples/Template/DkoFixing.py | plasroom46/DesignPattern.Sample | 86c05c5ae356cb01f3d075f248c45da3e6534d07 | [
"MIT"
] | 9 | 2019-03-14T01:54:31.000Z | 2021-11-26T13:00:32.000Z | Python/Samples/Template/DkoFixing.py | plasroom46/DesignPattern.Sample | 86c05c5ae356cb01f3d075f248c45da3e6534d07 | [
"MIT"
] | null | null | null | Python/Samples/Template/DkoFixing.py | plasroom46/DesignPattern.Sample | 86c05c5ae356cb01f3d075f248c45da3e6534d07 | [
"MIT"
] | 2 | 2019-08-19T06:00:04.000Z | 2021-07-15T01:23:52.000Z | from ProductFixingTemplate import ProductFixingTemplate
class DkoFixing(ProductFixingTemplate):
def findWorkOptionLeg(self):
print("DKO: Find Working Option Leg!")
def checkBarriers(self):
print("DKO: Check barries!")
def rebateBarriers(self):
print("DKO: Rebate barries!")
d... | 23.842105 | 55 | 0.668874 |
1063ef7a1b27813a8463cdfe86ec411ed6cd64d8 | 2,066 | py | Python | gateway/can/controllers/base.py | aceofwings/Cantactular | a6eb8d7128fd1388d3e75c1a8415123d1d5930e1 | [
"MIT"
] | 3 | 2017-01-26T01:37:42.000Z | 2018-07-22T02:42:52.000Z | gateway/can/controllers/base.py | aceofwings/Cantactular | a6eb8d7128fd1388d3e75c1a8415123d1d5930e1 | [
"MIT"
] | 1 | 2017-07-07T18:02:20.000Z | 2017-07-07T18:02:20.000Z | gateway/can/controllers/base.py | aceofwings/Evt-Gateway | a6eb8d7128fd1388d3e75c1a8415123d1d5930e1 | [
"MIT"
] | null | null | null |
EVTCAN = "EVTCAN"
OPENCAN = "OPENCAN"
class HandlerAssociator(type):
def __new__(cls, clsname, bases, dct):
class_frame = type.__new__(cls, clsname, bases, dct)
handlers = []
for attribute in dct.values():
if(hasattr(attribute,'match')):
handlers.append(attribu... | 24.891566 | 71 | 0.614714 |
b365d604c0a74f0fec6c4b0ddb14d5240098baa3 | 1,452 | py | Python | removeUnmatchimgorxml.py | kevincao91/Tools | 545901c682c20cd06256156dadc75b8e4e7df88c | [
"MIT"
] | null | null | null | removeUnmatchimgorxml.py | kevincao91/Tools | 545901c682c20cd06256156dadc75b8e4e7df88c | [
"MIT"
] | null | null | null | removeUnmatchimgorxml.py | kevincao91/Tools | 545901c682c20cd06256156dadc75b8e4e7df88c | [
"MIT"
] | null | null | null | # encoding=utf8
import os
from tqdm import tqdm
from basicFun import FILES
imgDir=r"/media/kevin/娱乐/xizang_database/label_data/JPEGImages"
xmlDir=r"/media/kevin/娱乐/xizang_database/label_data/Annotations"
imgType="jpg"
xmlType="xml"
def remove_xml():
imgs = [x for x in FILES.get_sorted_files(i... | 23.047619 | 65 | 0.567493 |
a4616fdb7d1b25fd8794d930b6d048076e16b540 | 10,071 | py | Python | oscarapi/urls.py | ramanaditya/django-oscar-api | da9a658c3f9e4faacda81a19eddc94527c81e46a | [
"BSD-3-Clause"
] | null | null | null | oscarapi/urls.py | ramanaditya/django-oscar-api | da9a658c3f9e4faacda81a19eddc94527c81e46a | [
"BSD-3-Clause"
] | null | null | null | oscarapi/urls.py | ramanaditya/django-oscar-api | da9a658c3f9e4faacda81a19eddc94527c81e46a | [
"BSD-3-Clause"
] | null | null | null | # pylint: disable=unbalanced-tuple-unpacking
from django.conf import settings
from django.urls import include, path, re_path
from rest_framework.urlpatterns import format_suffix_patterns
from oscarapi.utils.loading import get_api_classes, get_api_class
api_root = get_api_class("views.root", "api_root")
LoginView = ge... | 30.798165 | 123 | 0.641644 |
c1175ec2430dedd1bcc2ff464ed1272a49418932 | 26,957 | py | Python | arc/parserTest.py | shihchengli/ARC | 9c5b03c27dac41f213dfc4b26888c01c8c6f4e83 | [
"MIT"
] | null | null | null | arc/parserTest.py | shihchengli/ARC | 9c5b03c27dac41f213dfc4b26888c01c8c6f4e83 | [
"MIT"
] | null | null | null | arc/parserTest.py | shihchengli/ARC | 9c5b03c27dac41f213dfc4b26888c01c8c6f4e83 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
"""
This module contains unit tests for the parser functions
"""
import numpy as np
import os
import unittest
import arc.parser as parser
from arc.settings import arc_path
from arc.species import ARCSpecies
from arc.species.converter import xyz_to_str
class TestParser(unitt... | 60.306488 | 125 | 0.572208 |
82aad7f6c1ec15305d68fed31f2f616448cf4fab | 2,609 | py | Python | CNN.py | Giorgiobientinesi/CT-and-X-ray-COVID-image-classification | 7570ab28fa2b4e035e23d53abb5c9764bd9bb68f | [
"MIT"
] | null | null | null | CNN.py | Giorgiobientinesi/CT-and-X-ray-COVID-image-classification | 7570ab28fa2b4e035e23d53abb5c9764bd9bb68f | [
"MIT"
] | null | null | null | CNN.py | Giorgiobientinesi/CT-and-X-ray-COVID-image-classification | 7570ab28fa2b4e035e23d53abb5c9764bd9bb68f | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import os
import cv2
import random
import pickle
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten,Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
imp... | 26.09 | 111 | 0.601763 |
97e413bb24da78fb5e5b36ab2b0c0fb148eaaf26 | 3,148 | py | Python | YR2_batch_processing_multiple_images_in_python.py | zrpllvv/Image-processing | a4d4a0875175a5be56494d765168e6cb9df06da8 | [
"MIT"
] | null | null | null | YR2_batch_processing_multiple_images_in_python.py | zrpllvv/Image-processing | a4d4a0875175a5be56494d765168e6cb9df06da8 | [
"MIT"
] | null | null | null | YR2_batch_processing_multiple_images_in_python.py | zrpllvv/Image-processing | a4d4a0875175a5be56494d765168e6cb9df06da8 | [
"MIT"
] | null | null | null | import cv2
import glob
from skimage.filters import gaussian
from skimage import img_as_ubyte
#select the path
path = "test_images/imgs/*.*"
img_number = 1 #Start an iterator for image number.
#This number can be later added to output image file names.
for file in glob.glob(path):
print(file) #just... | 33.136842 | 97 | 0.683609 |
48158c9237fc6d00d0fab3d724c21086f6cf252a | 372 | py | Python | spider/opener.py | fuandenghuo/100-days-of-python | 50f3263b0984bb6690e565d58604c1882aaf465e | [
"MIT"
] | null | null | null | spider/opener.py | fuandenghuo/100-days-of-python | 50f3263b0984bb6690e565d58604c1882aaf465e | [
"MIT"
] | null | null | null | spider/opener.py | fuandenghuo/100-days-of-python | 50f3263b0984bb6690e565d58604c1882aaf465e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'abbot'
import urllib2
# 构建HTTPHandler处理器对象,支持处理HTTP请求
http_handler = urllib2.HTTPHandler(debuglevel=1)
# 创建支持处理HTTP请求的opener对象
opener = urllib2.build_opener(http_handler)
# 构建Request请求
request = urllib2.Request("http://www.baidu.com")
# 调用自定义的opener对象的open()方法,发送request请求
resp... | 18.6 | 49 | 0.768817 |
0af1a7735a304bf26207a9ff3b7b6c1ee84653a2 | 1,340 | py | Python | src/vigorish/util/exceptions.py | a-luna/vigorish | 6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6 | [
"MIT"
] | 2 | 2021-07-15T13:53:33.000Z | 2021-07-25T17:03:29.000Z | src/vigorish/util/exceptions.py | a-luna/vigorish | 6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6 | [
"MIT"
] | 650 | 2019-05-18T07:00:12.000Z | 2022-01-21T19:38:55.000Z | src/vigorish/util/exceptions.py | a-luna/vigorish | 6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6 | [
"MIT"
] | 2 | 2020-03-28T21:01:31.000Z | 2022-01-06T05:16:11.000Z | """Custom exceptions for issues specific to vigorish actions/processes."""
class S3BucketException(Exception):
"""Exception raised when an operation requiring S3 bucket access cannot be performed."""
def __init__(self, message=None):
if not message:
message = "Unable to access S3 bucket, ... | 38.285714 | 115 | 0.709701 |
138ca0898a98ec6bd3e1adafe2a5cef9bd159ff3 | 7,453 | py | Python | train/train_english_v1_multi_gpu.py | xiaoyubing/chinese_ocr | 0e9f3dd4672dd3e3aaff607c691b94a4cfa4006c | [
"Apache-2.0"
] | null | null | null | train/train_english_v1_multi_gpu.py | xiaoyubing/chinese_ocr | 0e9f3dd4672dd3e3aaff607c691b94a4cfa4006c | [
"Apache-2.0"
] | null | null | null | train/train_english_v1_multi_gpu.py | xiaoyubing/chinese_ocr | 0e9f3dd4672dd3e3aaff607c691b94a4cfa4006c | [
"Apache-2.0"
] | 1 | 2019-06-26T10:06:43.000Z | 2019-06-26T10:06:43.000Z | #-*- coding:utf-8 -*-
import os
import json
import threading
import numpy as np
from PIL import Image
import tensorflow as tf
from keras import losses
from keras import backend as K
from keras.utils import plot_model
from keras.preprocessing import image
from keras.preprocessing.sequence import pad_sequences
from kera... | 37.265 | 169 | 0.666443 |
4e4275e46e00c5461b9f1aebe0673e90ff44c7d5 | 1,043 | py | Python | app/core/migrations/0004_recipe.py | eycho97/recipe-app-api | 5ccbc4458e9be43c4c668e053f569679a5755982 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | eycho97/recipe-app-api | 5ccbc4458e9be43c4c668e053f569679a5755982 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | eycho97/recipe-app-api | 5ccbc4458e9be43c4c668e053f569679a5755982 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-02-20 19:24
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_ingredient'),
]
operations = [
migrations.CreateModel(
... | 35.965517 | 118 | 0.604027 |
363c3c30db14046000fdf690f300f06f2c065eec | 777 | py | Python | python/mul_tbls_printer/tests/consts.py | AravinthSelvaraj/problems-and-solutions | 5c31ad3797cc49d2f7d779a10f04d81fc3b559f2 | [
"MIT"
] | null | null | null | python/mul_tbls_printer/tests/consts.py | AravinthSelvaraj/problems-and-solutions | 5c31ad3797cc49d2f7d779a10f04d81fc3b559f2 | [
"MIT"
] | null | null | null | python/mul_tbls_printer/tests/consts.py | AravinthSelvaraj/problems-and-solutions | 5c31ad3797cc49d2f7d779a10f04d81fc3b559f2 | [
"MIT"
] | null | null | null | TC1_EXP_OUTPUT = """1 x 5 = 5
2 x 5 = 10
3 x 5 = 15
4 x 5 = 20
5 x 5 = 25
6 x 5 = 30
7 x 5 = 35
8 x 5 = 40
9 x 5 = 45
10 x 5 = 50"""
TC2_EXP_OUTPUT = """1 x 7 = 7
2 x 7 = 14
3 x 7 = 21
4 x 7 = 28
5 x 7 = 35
6 x 7 = 42
7 x 7 = 49
8 x 7 = 56
9 x 7 ... | 16.531915 | 35 | 0.407979 |
e9eac0db3fb83d7d634196a98c59e94535027dc9 | 3,064 | py | Python | cohesity_management_sdk/models/outlook_mailbox.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | cohesity_management_sdk/models/outlook_mailbox.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | cohesity_management_sdk/models/outlook_mailbox.py | sachinthakare-cohesity/management-sdk-python | c95f67b7d387d5bab8392be43190e598280ae7b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
import cohesity_management_sdk.models.restore_object
import cohesity_management_sdk.models.outlook_folder
class OutlookMailbox(object):
"""Implementation of the 'Outlook Mailbox.' model.
Specifies the Outlook mailbox with restore details to support full... | 38.3 | 178 | 0.674935 |
2be07185460ccb74e015e4c2e257169233d3e18d | 811 | py | Python | juju_suspend/providers/openstack.py | niedbalski/juju-suspend | a3fa076e1cac48e0fd6a73dc3aef473c78150251 | [
"MIT"
] | 3 | 2015-02-13T22:13:38.000Z | 2015-02-17T02:42:28.000Z | juju_suspend/providers/openstack.py | niedbalski/juju-suspend | a3fa076e1cac48e0fd6a73dc3aef473c78150251 | [
"MIT"
] | null | null | null | juju_suspend/providers/openstack.py | niedbalski/juju-suspend | a3fa076e1cac48e0fd6a73dc3aef473c78150251 | [
"MIT"
] | null | null | null | from juju_suspend.providers.base import Provider
class OpenstackProvider(Provider):
suspend_cmd = ". {1}; nova stop {0}"
resume_cmd = ". {1}; nova start {0}"
def __init__(self, environment):
Provider.__init__(self, environment)
if not self.environment.options.novarc:
raise Ex... | 30.037037 | 77 | 0.64365 |
374191fba27ee79db3614e20c69ab12a9b0a7134 | 2,749 | py | Python | src/groupingDishes/groupingDishes.py | kasimte/coding-challenges | 975506a7257ad0d2d234a7856006472b79ebfdc3 | [
"MIT"
] | null | null | null | src/groupingDishes/groupingDishes.py | kasimte/coding-challenges | 975506a7257ad0d2d234a7856006472b79ebfdc3 | [
"MIT"
] | null | null | null | src/groupingDishes/groupingDishes.py | kasimte/coding-challenges | 975506a7257ad0d2d234a7856006472b79ebfdc3 | [
"MIT"
] | null | null | null | '''You are given a list dishes, where each element consists of a list of
strings beginning with the name of the dish, followed by all the
ingredients used in preparing it. You want to group the dishes by
ingredients, so that for each ingredient you'll be able to find all
the dishes that contain it (if there are at leas... | 35.24359 | 77 | 0.574391 |
1e0c4a3388b7da0b0a98091b82b2705f9dac294b | 14,312 | py | Python | windmill/server/convergence.py | mikeal/windmill | 0f2b640d107bfaf6615184471f8e14ff2ecc8319 | [
"Apache-2.0"
] | 2 | 2015-06-23T17:34:58.000Z | 2015-11-06T00:04:14.000Z | windmill/server/convergence.py | mikeal/windmill | 0f2b640d107bfaf6615184471f8e14ff2ecc8319 | [
"Apache-2.0"
] | null | null | null | windmill/server/convergence.py | mikeal/windmill | 0f2b640d107bfaf6615184471f8e14ff2ecc8319 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2006-2007 Open Source Applications Foundation
# Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com>
#
# 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
#
# ... | 38.785908 | 120 | 0.621646 |
f3c615d0393bf35a7e33f5d4f1d07170e02ca9dc | 450 | py | Python | isolate/__init__.py | meteran/isolate | 7d46279a364a701ba70a7d3fbf3c391e7dc05f1d | [
"BSD-3-Clause"
] | 2 | 2017-05-10T23:50:19.000Z | 2021-12-28T22:23:43.000Z | isolate/__init__.py | meteran/isolate | 7d46279a364a701ba70a7d3fbf3c391e7dc05f1d | [
"BSD-3-Clause"
] | 1 | 2016-10-19T20:08:26.000Z | 2016-10-19T20:08:26.000Z | isolate/__init__.py | meteran/isolate | 7d46279a364a701ba70a7d3fbf3c391e7dc05f1d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from cgroupspy.nodes import Node
from isolate.namespaces import NewNamespaces, JoinNamespaces, in_namespaces as run_in_namespaces, NAMESPACES
from cgroups import Cgroup
from syscalls import *
from seccomp import SecureComputing, Arg
BYTES = Cgroup.BYTES
KILOBYTES = Cgroup.KILOBYT... | 26.470588 | 108 | 0.813333 |
e329c69d7dcb64ff9e9e4dab30f4c65f9938d461 | 91,992 | py | Python | scalyr_agent/builtin_monitors/kubernetes_monitor.py | echee2/scalyr-agent-2 | da7d168260b94dc95aedb5ae0dca03165e55cb02 | [
"Apache-2.0"
] | null | null | null | scalyr_agent/builtin_monitors/kubernetes_monitor.py | echee2/scalyr-agent-2 | da7d168260b94dc95aedb5ae0dca03165e55cb02 | [
"Apache-2.0"
] | null | null | null | scalyr_agent/builtin_monitors/kubernetes_monitor.py | echee2/scalyr-agent-2 | da7d168260b94dc95aedb5ae0dca03165e55cb02 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Scalyr 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, so... | 51.106667 | 523 | 0.634251 |
071987ac59a87f2dda87de96212d27e8bcff982c | 11,259 | py | Python | flexget/plugins/output/subtitles_subliminal.py | tarzasai/Flexget | e5822874b2ee088b508390ff02c4eda9785596bc | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/plugins/output/subtitles_subliminal.py | tarzasai/Flexget | e5822874b2ee088b508390ff02c4eda9785596bc | [
"MIT"
] | null | null | null | flexget/plugins/output/subtitles_subliminal.py | tarzasai/Flexget | e5822874b2ee088b508390ff02c4eda9785596bc | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import collections
import logging
import os
import sys
import tempfile
from flexget import plugin
from flexget.event import event
log = logging.getLogger('subtitles')
try:
... | 48.530172 | 120 | 0.564171 |
25377e975d806717769df5dbd3ddb7e2388846b8 | 633 | py | Python | Chapter05/decorator_set.py | ibiscum/Learning-Concurrency-in-Python | d3f0320ad2a80c46b37de331bf335b80df0d3ed9 | [
"MIT"
] | null | null | null | Chapter05/decorator_set.py | ibiscum/Learning-Concurrency-in-Python | d3f0320ad2a80c46b37de331bf335b80df0d3ed9 | [
"MIT"
] | null | null | null | Chapter05/decorator_set.py | ibiscum/Learning-Concurrency-in-Python | d3f0320ad2a80c46b37de331bf335b80df0d3ed9 | [
"MIT"
] | null | null | null | def locked_method(method):
"""Method decorator. Requires a lock object at self._lock"""
def new_method(self, *args, **kwargs):
with self._lock:
return method(self, *args, **kwargs)
return new_method
class DecoratorLockedSet(set):
def __init__(self, *args, **kwargs):
self.... | 27.521739 | 65 | 0.647709 |
18a053c19e1b2d061b7ab7bea1cc38d95c392c0b | 413 | py | Python | backend/indep_mobile_32141/wsgi.py | crowdbotics-apps/indep-mobile-32141 | 1c6a7799b449cd247f4c1ac58a4b43a6647f914e | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/indep_mobile_32141/wsgi.py | crowdbotics-apps/indep-mobile-32141 | 1c6a7799b449cd247f4c1ac58a4b43a6647f914e | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/indep_mobile_32141/wsgi.py | crowdbotics-apps/indep-mobile-32141 | 1c6a7799b449cd247f4c1ac58a4b43a6647f914e | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for indep_mobile_32141 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('D... | 24.294118 | 78 | 0.79661 |
94c89aec0f9a1b838b9408a5ca7d08b0be6f586f | 1,381 | py | Python | hw_15/embed.py | coinflip112/deep_reinforcment_learning | b7290b4be915e331c5aecb222c82c538cf50ef57 | [
"MIT"
] | null | null | null | hw_15/embed.py | coinflip112/deep_reinforcment_learning | b7290b4be915e331c5aecb222c82c538cf50ef57 | [
"MIT"
] | null | null | null | hw_15/embed.py | coinflip112/deep_reinforcment_learning | b7290b4be915e331c5aecb222c82c538cf50ef57 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Embed compressed data into a Python module."""
__version__ = "1.1.0"
__author__ = ("Milan Straka <straka@ufal.mff.cuni.cz>",)
import argparse
import base64
import io
import os
import sys
import tarfile
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument(
"--ou... | 24.660714 | 87 | 0.664012 |
e2f92c07c25bcc67308a2cb5dcae80b8b541482b | 35 | py | Python | junn/common/__init__.py | modsim/junn | a40423b98c6a3739dd0b2ba02d546a5db91f9215 | [
"BSD-2-Clause"
] | null | null | null | junn/common/__init__.py | modsim/junn | a40423b98c6a3739dd0b2ba02d546a5db91f9215 | [
"BSD-2-Clause"
] | null | null | null | junn/common/__init__.py | modsim/junn | a40423b98c6a3739dd0b2ba02d546a5db91f9215 | [
"BSD-2-Clause"
] | null | null | null | """Common functionality module."""
| 17.5 | 34 | 0.714286 |
7fa56427b806defda1e661b69b5987b131d93397 | 17,037 | py | Python | sdk/python/pulumi_azure_native/network/v20171101/route_filter.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20171101/route_filter.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20171101/route_filter.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"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, overload
from ... import _utilities
fro... | 54.085714 | 4,223 | 0.680871 |
d30626ebfae3d7032c8dd1caa66ccac60f3840bc | 1,469 | py | Python | image_generation/read_schematic.py | mihirp1998/blender_emblang | 4b7092b8f4dfdc5240ed8ecf8e18ec75b9e0141c | [
"BSD-3-Clause"
] | null | null | null | image_generation/read_schematic.py | mihirp1998/blender_emblang | 4b7092b8f4dfdc5240ed8ecf8e18ec75b9e0141c | [
"BSD-3-Clause"
] | null | null | null | image_generation/read_schematic.py | mihirp1998/blender_emblang | 4b7092b8f4dfdc5240ed8ecf8e18ec75b9e0141c | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import cm
from nbtschematic import SchematicFile
from mpl_toolkits.mplot3d import Axes3D
res = 64
vpath = 'output/blendfiles/train/CLEVR_new_000001.schematic'
vpath = '../output/CLEVR_' + str(res) + '_OBJ_FULL/voxels/train/CLEVR_new_00000%d.sch... | 34.97619 | 114 | 0.655548 |
896c543aa30ffeec6f29997b5b73ee34d1b50833 | 1,170 | py | Python | esmf_regrid/tests/unit/esmf_regridder/test_GridInfo.py | trexfeathers/iris-esmf-regrid | 8d7121b3c099ef3aeca47e5cb4d581882322180f | [
"BSD-3-Clause"
] | null | null | null | esmf_regrid/tests/unit/esmf_regridder/test_GridInfo.py | trexfeathers/iris-esmf-regrid | 8d7121b3c099ef3aeca47e5cb4d581882322180f | [
"BSD-3-Clause"
] | 1 | 2021-05-18T13:44:16.000Z | 2021-05-18T13:44:16.000Z | esmf_regrid/tests/unit/esmf_regridder/test_GridInfo.py | trexfeathers/iris-esmf-regrid | 8d7121b3c099ef3aeca47e5cb4d581882322180f | [
"BSD-3-Clause"
] | null | null | null | """Unit tests for :class:`esmf_regrid.esmf_regridder.GridInfo`."""
import numpy as np
from esmf_regrid.esmf_regridder import GridInfo
import esmf_regrid.tests as tests
def _make_small_grid_args():
small_x = 2
small_y = 3
small_grid_lon = np.array(range(small_x)) / (small_x + 1)
small_grid_lat = np.a... | 30.789474 | 86 | 0.688889 |
7b61a52deadd07a3b2d9f3624f16931418f6ecb5 | 2,391 | py | Python | analyze_results/visualize.py | robinhenry/gym-anm-exp | a24aa069f060ae6c8114f735438459b63afb98de | [
"MIT"
] | 5 | 2021-06-19T14:27:31.000Z | 2021-12-23T12:04:49.000Z | analyze_results/visualize.py | robinhenry/gym-anm-exp | a24aa069f060ae6c8114f735438459b63afb98de | [
"MIT"
] | null | null | null | analyze_results/visualize.py | robinhenry/gym-anm-exp | a24aa069f060ae6c8114f735438459b63afb98de | [
"MIT"
] | 2 | 2021-04-09T19:20:26.000Z | 2021-09-09T04:53:22.000Z | """
This script can be used to visualize a trained-agent interacting
with an environment, assuming the environment supports rendering.
Usage
-----
To visualize a trained agent <ALGO> (SAC or PPO) saved in folder <PATH>,
for <TIMESTEPS> timesteps, pausing for <SLEEP> seconds between each timesteps
(to make it easier to... | 31.051948 | 110 | 0.676704 |
4ffc7d8cf1f4de8293ee5b9f197ad111b33cea46 | 1,845 | py | Python | watchman/tests/integration/test_perms.py | mathewhodson/watchman | 7e831f2fe71deb6429819aa1f7856a5335b0111e | [
"Apache-2.0"
] | null | null | null | watchman/tests/integration/test_perms.py | mathewhodson/watchman | 7e831f2fe71deb6429819aa1f7856a5335b0111e | [
"Apache-2.0"
] | null | null | null | watchman/tests/integration/test_perms.py | mathewhodson/watchman | 7e831f2fe71deb6429819aa1f7856a5335b0111e | [
"Apache-2.0"
] | null | null | null | # vim:ts=4:sw=4:et:
# Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 b... | 31.271186 | 88 | 0.687263 |
4ec95c3d6a3bc774133347b7c98c8540d2e8770d | 11,550 | py | Python | 2D/2DTruncated/DoubleG-SWG.py | LiuYangMage/GenerativeEnsembleRegression | 90d9649b2566a69f4add5ab1c147293c7eb5e7c8 | [
"MIT"
] | null | null | null | 2D/2DTruncated/DoubleG-SWG.py | LiuYangMage/GenerativeEnsembleRegression | 90d9649b2566a69f4add5ab1c147293c7eb5e7c8 | [
"MIT"
] | null | null | null | 2D/2DTruncated/DoubleG-SWG.py | LiuYangMage/GenerativeEnsembleRegression | 90d9649b2566a69f4add5ab1c147293c7eb5e7c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import os
from scipy import stats
import argparse
# In[2]:
parser = argparse.ArgumentParser(description='GAN-SODE')
parser.add_argument('--GPU', type=int, default=0, help='GPU ID')
parser.add_... | 33.189655 | 182 | 0.620693 |
ce96e25bd0c02d6c6099bc0bd3e8347bc3f955d1 | 5,206 | py | Python | onnxmltools/convert/sparkml/operator_converters/gbt_classifier.py | szha/onnxmltools | b04d05bda625cbc006955ce0a220277739a95825 | [
"MIT"
] | 3 | 2019-02-27T21:03:43.000Z | 2020-04-07T22:16:50.000Z | onnxmltools/convert/sparkml/operator_converters/gbt_classifier.py | szha/onnxmltools | b04d05bda625cbc006955ce0a220277739a95825 | [
"MIT"
] | null | null | null | onnxmltools/convert/sparkml/operator_converters/gbt_classifier.py | szha/onnxmltools | b04d05bda625cbc006955ce0a220277739a95825 | [
"MIT"
] | 2 | 2020-10-01T09:24:55.000Z | 2021-04-17T13:57:31.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from ... | 60.534884 | 118 | 0.73761 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.