hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ffc848b36df9543bc9c65b1e7d814ce4c4b71f7e | 9,212 | py | Python | monai/metrics/metric.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | 1 | 2021-07-13T00:34:41.000Z | 2021-07-13T00:34:41.000Z | monai/metrics/metric.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | monai/metrics/metric.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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... | 41.309417 | 119 | 0.659466 |
ffc857100538fe994ea7e0bb880d2d757498ac9e | 196 | py | Python | math_and_algorithm/032.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | math_and_algorithm/032.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | math_and_algorithm/032.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | from bisect import *
N, X = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
index = bisect_left(A, X)
if index < N and A[index] == X:
print("Yes")
else:
print("No") | 19.6 | 35 | 0.586735 |
ffc862782b1e229318fa02487095db8e6422e49c | 19,211 | py | Python | tests/contexts.py | mernst/cozy | d7b2c0ee575057dea4ebec201d579f0ecd785b1b | [
"Apache-2.0"
] | 188 | 2017-11-27T18:59:34.000Z | 2021-12-31T02:28:33.000Z | tests/contexts.py | mernst/cozy | d7b2c0ee575057dea4ebec201d579f0ecd785b1b | [
"Apache-2.0"
] | 95 | 2017-11-13T01:21:48.000Z | 2020-10-30T06:38:14.000Z | tests/contexts.py | mernst/cozy | d7b2c0ee575057dea4ebec201d579f0ecd785b1b | [
"Apache-2.0"
] | 16 | 2018-02-13T04:49:09.000Z | 2021-02-06T13:26:46.000Z | from collections import OrderedDict
import unittest
from cozy.common import OrderedSet
from cozy.target_syntax import *
from cozy.typecheck import retypecheck
from cozy.syntax_tools import pprint
from cozy.pools import RUNTIME_POOL, STATE_POOL
from cozy.contexts import RootCtx, UnderBinder, all_subexpressions_with_con... | 142.303704 | 9,038 | 0.616001 |
ffc875955e0a89901cdc1cd93c700699c3ebf764 | 499 | py | Python | perm_security/TokenStrategy/PermissionDeniedException.py | TheJoeSmo/perm-security | 2fd8ceb4fc72cce5889f55731056665a887399e1 | [
"MIT"
] | null | null | null | perm_security/TokenStrategy/PermissionDeniedException.py | TheJoeSmo/perm-security | 2fd8ceb4fc72cce5889f55731056665a887399e1 | [
"MIT"
] | null | null | null | perm_security/TokenStrategy/PermissionDeniedException.py | TheJoeSmo/perm-security | 2fd8ceb4fc72cce5889f55731056665a887399e1 | [
"MIT"
] | null | null | null | from perm_banana import Permission
from ..MemberAdapter.MemberAdapter import MemberAdapter
class PermissionDeniedException(Exception):
"""
An error that is raised when a member does not have permission to do something.
"""
def __init__(self, permissions: Permission, member: MemberAdapter):
s... | 33.266667 | 119 | 0.735471 |
ffc91551fefb0772c6bfcd72b7646af5a506f0bc | 4,789 | py | Python | FlaskApp/db/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | 2 | 2018-05-31T15:02:08.000Z | 2018-07-11T11:02:44.000Z | FlaskApp/db/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | null | null | null | FlaskApp/db/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | null | null | null | from .db_main import db
import os
from markdown2 import markdown
from flask import Markup
import json
import importlib
class Model(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(80), nullable=False)
topic = db.Column(db.String(80), nullable=False)
version = db.Colum... | 38.007937 | 120 | 0.577156 |
ffc917fd6d530ecafe485c63083d8c3ebbb762d4 | 1,811 | py | Python | nvflare/apis/workspace.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 155 | 2021-08-05T18:05:09.000Z | 2022-03-27T15:32:56.000Z | nvflare/apis/workspace.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 216 | 2021-12-01T06:07:12.000Z | 2022-03-30T23:34:02.000Z | nvflare/apis/workspace.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 44 | 2021-11-24T16:03:29.000Z | 2022-03-24T23:28:39.000Z | # Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 30.694915 | 74 | 0.66593 |
ffc9335816134b502b4717f58a35790cf1192046 | 542 | py | Python | dear_petition/petition/migrations/0010_auto_20200208_0238.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 4 | 2020-04-01T14:42:45.000Z | 2021-12-12T21:11:11.000Z | dear_petition/petition/migrations/0010_auto_20200208_0238.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 142 | 2019-08-12T19:08:34.000Z | 2022-03-29T23:05:35.000Z | dear_petition/petition/migrations/0010_auto_20200208_0238.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 8 | 2020-02-04T20:37:00.000Z | 2021-03-28T13:28:32.000Z | # Generated by Django 2.2.4 on 2020-02-08 02:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("petition", "0009_auto_20200208_0237"),
]
operations = [
migrations.RemoveField(model_name="batch", name="records",),
migrations.Alte... | 24.636364 | 80 | 0.594096 |
ffc93f934fb22ef1c2996ff831f384245811365a | 2,827 | py | Python | python-midonetclient/src/midonetclient/client.py | gdecandia/midonet-1 | 6a8e2ec3941061716fbf13c99d2133c7a3b5d3aa | [
"Apache-2.0"
] | null | null | null | python-midonetclient/src/midonetclient/client.py | gdecandia/midonet-1 | 6a8e2ec3941061716fbf13c99d2133c7a3b5d3aa | [
"Apache-2.0"
] | null | null | null | python-midonetclient/src/midonetclient/client.py | gdecandia/midonet-1 | 6a8e2ec3941061716fbf13c99d2133c7a3b5d3aa | [
"Apache-2.0"
] | 1 | 2018-10-25T05:52:05.000Z | 2018-10-25T05:52:05.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2014 Midokura Europe SARL, All Rights Reserved.
# 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://w... | 39.816901 | 75 | 0.701097 |
ffc959228ca7dabe4f6d5cc4c8ebb750db000e88 | 2,670 | py | Python | sdk/synapse/azure-mgmt-synapse/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/synapse/azure-mgmt-synapse/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/synapse/azure-mgmt-synapse/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 35.6 | 103 | 0.609363 |
ffc97e73b0be441cdfbb7049da7b4395023c04b5 | 854 | py | Python | equinox/update.py | marcelroed/equinox | 3804a8d60217bde685bee0a893a7bd55b1e63c26 | [
"Apache-2.0"
] | 325 | 2021-08-03T12:14:45.000Z | 2022-03-31T04:32:19.000Z | equinox/update.py | marcelroed/equinox | 3804a8d60217bde685bee0a893a7bd55b1e63c26 | [
"Apache-2.0"
] | 32 | 2021-08-04T03:27:01.000Z | 2022-03-31T06:19:14.000Z | equinox/update.py | marcelroed/equinox | 3804a8d60217bde685bee0a893a7bd55b1e63c26 | [
"Apache-2.0"
] | 21 | 2021-08-04T05:35:19.000Z | 2022-03-27T22:15:12.000Z | import jax
from .custom_types import PyTree
def _apply_update(u, p):
if u is None:
return p
else:
return p + u
def _is_none(x):
return x is None
def apply_updates(model: PyTree, updates: PyTree) -> PyTree:
"""A `jax.tree_map`-broadcasted version of
```python
model = model ... | 22.473684 | 84 | 0.660422 |
ffc9846b416dfc23f10f4b90833ebc200a651455 | 1,684 | py | Python | scripts/fb/MaximumProductSubArray.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/fb/MaximumProductSubArray.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/fb/MaximumProductSubArray.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
Maximum Product Subarray
Given an integer array nums, find a contiguous non-empty subarray
within the array that has the largest product, and return the product.
It is guaranteed that the answer will fit in a 32-bit integer.
A subarray is a contiguous subsequence of the array.
Example 1:
Input: nums = [2,3,-... | 20.790123 | 85 | 0.603919 |
ffc9a88b4a76ebad9817f2f879326b5d81c7f7d1 | 10,289 | py | Python | dev/parsing.py | open-covid-data/healthmap-gdo-temp | 5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e | [
"MIT"
] | 5 | 2020-04-16T13:54:24.000Z | 2020-07-06T13:42:10.000Z | dev/parsing.py | open-covid-data/healthmap-gdo-temp | 5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e | [
"MIT"
] | 487 | 2020-04-16T00:56:09.000Z | 2020-07-27T09:09:29.000Z | dev/parsing.py | open-covid-data/healthmap-gdo-temp | 5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import base64
from os import environ, listdir
from pathlib import Path
import re
import subprocess
import sys
import boto3
import docker
LOCALSTACK_URL = environ.get("AWS_ENDPOINT", "http://localhost:4566")
AWS_ACCESS_KEY_ID = environ.get("AWS_ACCESS_KEY_ID", "fake")
AWS_SECRE... | 39.121673 | 122 | 0.615512 |
ffc9b0b9d5dcddc57c13771b5bae1a9bd15a03a7 | 10,298 | py | Python | tests/compile/test_shared.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/compile/test_shared.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/compile/test_shared.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
import aesara.tensor
from aesara.compile.sharedvalue import SharedVariable, generic, shared
from aesara.configdefaults import config
from aesara.misc.safe_asarray import _asarray
from aesara.tensor.type import (
TensorType,
bscalar,
bvector,
dscalar,
dvector,
fs... | 29.763006 | 81 | 0.540688 |
ffc9d318f9ff31dbdaa53a7885e99cb90ce69f33 | 1,402 | py | Python | python_modules/dagster/dagster/core/host_representation/grpc_server_state_subscriber.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/host_representation/grpc_server_state_subscriber.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/host_representation/grpc_server_state_subscriber.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | from enum import Enum
from typing import NamedTuple, Optional
from dagster import check
class LocationStateChangeEventType(Enum):
LOCATION_UPDATED = "LOCATION_UPDATED"
LOCATION_DISCONNECTED = "LOCATION_DISCONNECTED"
LOCATION_RECONNECTED = "LOCATION_RECONNECTED"
LOCATION_ERROR = "LOCATION_ERROR"
cla... | 28.612245 | 85 | 0.652639 |
ffc9f3233cb0ea6d05f78b02537448d0d390b0b7 | 3,371 | py | Python | keystoneclient/v3/projects.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | 1 | 2020-12-18T01:07:30.000Z | 2020-12-18T01:07:30.000Z | keystoneclient/v3/projects.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | keystoneclient/v3/projects.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# Copyright 2011 Nebula, 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/... | 34.050505 | 78 | 0.633343 |
ffca0a7ac177a68c74653dd8fe7c9c5efcd63e79 | 696 | py | Python | game/smallestrotationwithhighestscore.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | game/smallestrotationwithhighestscore.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | game/smallestrotationwithhighestscore.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | import collections
class Solution(object):
def bestRotation(self, A):
"""
:type A: List[int]
:rtype: int
"""
cnts = collections.defaultdict(int)
ans = 0
for i, n in enumerate(A):
cnts[n - i] += 1
ans += n <= i
bestAns, bestIdx =... | 27.84 | 43 | 0.386494 |
ffca2def41a26a4609bd03cff26c4fda96391fcd | 1,197 | py | Python | tests/test_units.py | M-Shadow/robotpy-wpilib-utilities | ba95d45041e00842afadaedd2f3cbf2a3ac9cdf7 | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-20T02:56:17.000Z | 2020-03-17T04:44:12.000Z | tests/test_units.py | M-Shadow/robotpy-wpilib-utilities | ba95d45041e00842afadaedd2f3cbf2a3ac9cdf7 | [
"MIT",
"BSD-3-Clause"
] | 107 | 2015-01-26T23:47:10.000Z | 2022-03-16T13:57:36.000Z | tests/test_units.py | M-Shadow/robotpy-wpilib-utilities | ba95d45041e00842afadaedd2f3cbf2a3ac9cdf7 | [
"MIT",
"BSD-3-Clause"
] | 21 | 2016-01-01T01:44:40.000Z | 2022-03-15T18:00:35.000Z | from robotpy_ext.common_drivers import units
def close_enough(val_1, val_2):
"""Quick function to determine if val_1 ~= val_2"""
return abs(val_1 - val_2) < 0.001
def test_meters_to_cm():
assert units.convert(units.meter, units.centimeter, 1) == 100
assert units.convert(units.meter, units.centimeter... | 32.351351 | 78 | 0.730159 |
ffca339e0bada2caabfe74a049dcfdee4881f5a7 | 61 | py | Python | sqlalchemy_geonames/settings.py | dionysio/sqlalchemy-geonames | 0d2542cf53512b14415319f23ad53dc4994691a8 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2015-02-24T20:20:49.000Z | 2021-07-21T02:32:15.000Z | sqlalchemy_geonames/settings.py | dionysio/sqlalchemy-geonames | 0d2542cf53512b14415319f23ad53dc4994691a8 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-11-13T17:00:26.000Z | 2020-05-28T13:12:07.000Z | sqlalchemy_geonames/settings.py | dionysio/sqlalchemy-geonames | 0d2542cf53512b14415319f23ad53dc4994691a8 | [
"BSD-2-Clause-FreeBSD"
] | 6 | 2015-03-28T12:23:50.000Z | 2020-05-28T08:41:50.000Z | import os
DEBUG = 'SQLALCHEMY_GEONAMES_DEBUG' in os.environ
| 15.25 | 49 | 0.803279 |
ffca37bd0d8e2d1f62c36a2bdf189381cba0b389 | 871 | py | Python | app/schemas.py | cknolla/flask-smorest-sqlalchemy-odata | 83f52777f6eace8212c2841c2211cebfa79c48f8 | [
"MIT"
] | 3 | 2021-05-20T23:48:00.000Z | 2022-02-10T04:30:12.000Z | app/schemas.py | cknolla/flask-smorest-sqlalchemy-odata | 83f52777f6eace8212c2841c2211cebfa79c48f8 | [
"MIT"
] | null | null | null | app/schemas.py | cknolla/flask-smorest-sqlalchemy-odata | 83f52777f6eace8212c2841c2211cebfa79c48f8 | [
"MIT"
] | null | null | null | """Define resource schemas."""
import stringcase
from marshmallow import Schema, fields
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
from app import models
class CamelCaseSchema(Schema):
# https://marshmallow.readthedocs.io/en/latest/examples.html#inflection-camel-casing-keys
def on_bind_field(sel... | 24.194444 | 93 | 0.768083 |
ffca61454707cb915e45b0ee209f5389bd0cbfcd | 801 | py | Python | defoe/alto/queries/total_documents.py | kallewesterling/defoe | d72af2f748fd4363a4718c93bb0b0284b8cb1f3e | [
"MIT"
] | 2 | 2022-02-14T12:10:54.000Z | 2022-02-14T12:35:44.000Z | defoe/alto/queries/total_documents.py | kallewesterling/defoe | d72af2f748fd4363a4718c93bb0b0284b8cb1f3e | [
"MIT"
] | 17 | 2022-02-09T21:46:14.000Z | 2022-02-25T14:55:09.000Z | defoe/alto/queries/total_documents.py | kallewesterling/defoe | d72af2f748fd4363a4718c93bb0b0284b8cb1f3e | [
"MIT"
] | 1 | 2022-02-14T13:19:08.000Z | 2022-02-14T13:19:08.000Z | """
Counts total number of documents.
"""
def do_query(archives, config_file=None, logger=None, context=None):
"""
Iterate through archives and count total number of documents.
Returns result of form:
{
"num_documents": num_documents
}
:param archives: RDD of defoe.alto.a... | 25.83871 | 68 | 0.677903 |
ffca6b08952440e65163c4fb54dc45e6ae76dd34 | 399 | py | Python | intro/meta_classe.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | intro/meta_classe.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | 2 | 2020-07-19T15:36:35.000Z | 2022-02-02T20:30:16.000Z | intro/meta_classe.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class MinhaMetaClass(type):
def __new__(cls, clsname, superclasses, attributedict):
print('clsname', clsname)
print('superclasses', superclasses)
print('atributos', attributedict)
return type.__new__(cls, clsname, superclasses, attributedict)
class Pai(): pass
class Filha(Pai... | 28.5 | 66 | 0.729323 |
ffcabd69eaac39694319e58b901dfa13a9503044 | 16,815 | py | Python | recognition/partial_fc/mxnet/evaluation/ijb.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | recognition/partial_fc/mxnet/evaluation/ijb.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | recognition/partial_fc/mxnet/evaluation/ijb.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | import argparse
import os
import pickle
import timeit
import warnings
from pathlib import Path
import cv2
import matplotlib
import matplotlib.pyplot as plt
import mxnet as mx
import numpy as np
import pandas as pd
import sklearn
from menpo.visualize.viewmatplotlib import sample_colours_from_colourmap
from mxnet.gluon.... | 36.475054 | 118 | 0.593756 |
ffcac1ed698279aa5ab681959d199599a213eb48 | 1,193 | py | Python | portal/apps/shoutbox/migrations/0001_initial.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 8 | 2020-12-15T17:11:08.000Z | 2021-12-13T22:08:33.000Z | portal/apps/shoutbox/migrations/0001_initial.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 28 | 2020-12-15T17:34:03.000Z | 2022-02-01T04:09:10.000Z | portal/apps/shoutbox/migrations/0001_initial.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 7 | 2020-12-15T19:59:17.000Z | 2021-11-24T16:47:06.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-07-22 16:39
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrati... | 34.085714 | 165 | 0.611903 |
ffcac7824c96e32e98af96469521e5e20c9b5529 | 2,949 | py | Python | haproxy/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | haproxy/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | haproxy/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | import pytest
import os
import subprocess
import requests
import time
import logging
import mock
import tempfile
import shutil
import getpass
import common
log = logging.getLogger('test_haproxy')
@pytest.fixture
def aggregator():
from datadog_checks.stubs import aggregator
aggregator.reset()
return aggr... | 30.402062 | 93 | 0.619532 |
ffcac8615460cf695ee2618f816869736ba8a0fa | 1,903 | py | Python | tests/test_pyembedpg_with_context.py | Simulmedia/pyembedpg | 62c25777a115f4dc77262a8d99ee4c38137f645f | [
"Apache-2.0"
] | 32 | 2015-07-31T14:48:57.000Z | 2022-03-09T18:50:57.000Z | tests/test_pyembedpg_with_context.py | Simulmedia/pyembedpg | 62c25777a115f4dc77262a8d99ee4c38137f645f | [
"Apache-2.0"
] | 6 | 2015-08-13T18:49:12.000Z | 2021-06-09T14:55:24.000Z | tests/test_pyembedpg_with_context.py | Simulmedia/pyembedpg | 62c25777a115f4dc77262a8d99ee4c38137f645f | [
"Apache-2.0"
] | 7 | 2016-08-10T20:10:48.000Z | 2021-04-29T04:07:46.000Z | #
# Copyright 2015 Simulmedia, 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 wr... | 37.313725 | 129 | 0.651603 |
ffcb46114a82bdfef84de00a50022f5048a46c26 | 7,300 | py | Python | InvenTree/part/forms.py | wolffam/InvenTree | 4af6b65ac3bfce132b2dfa35d221cfd7df0d761d | [
"MIT"
] | null | null | null | InvenTree/part/forms.py | wolffam/InvenTree | 4af6b65ac3bfce132b2dfa35d221cfd7df0d761d | [
"MIT"
] | null | null | null | InvenTree/part/forms.py | wolffam/InvenTree | 4af6b65ac3bfce132b2dfa35d221cfd7df0d761d | [
"MIT"
] | null | null | null | """
Django Forms for interacting with Part objects
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from InvenTree.forms import HelperForm
from InvenTree.helpers import GetExportFormats
from InvenTree.fields import RoundingDecimalFormField
from mptt.fields import TreeNodeChoiceField
from django im... | 28.515625 | 166 | 0.592603 |
ffcb550b60494682633c52b0533edb1975daa743 | 4,789 | py | Python | scripts/predict_plain_data.py | dslaborg/sumo | 1e9bfedaff201d4bd37b4889b6091cc4b9c8ad01 | [
"MIT"
] | 3 | 2022-02-03T22:54:14.000Z | 2022-03-31T09:59:02.000Z | scripts/predict_plain_data.py | dslaborg/sumo | 1e9bfedaff201d4bd37b4889b6091cc4b9c8ad01 | [
"MIT"
] | null | null | null | scripts/predict_plain_data.py | dslaborg/sumo | 1e9bfedaff201d4bd37b4889b6091cc4b9c8ad01 | [
"MIT"
] | null | null | null | import argparse
import re
from pathlib import Path
from sys import path
from typing import Union
import matplotlib.pyplot as plt
import numpy as np
import pytorch_lightning as pl
import torch
from scipy.stats import zscore
from torch.utils.data import Dataset, DataLoader
from a7.butter_filter import butter_bandpass_f... | 33.256944 | 118 | 0.678221 |
ffcb5b689215d8d9422768c99d37f31457dcc314 | 1,456 | py | Python | accessories/AM2302.py | Dgragnolati/HAP-python | 8480dfd03caa2385a71a28fae1bc5c2061645be7 | [
"Apache-2.0"
] | null | null | null | accessories/AM2302.py | Dgragnolati/HAP-python | 8480dfd03caa2385a71a28fae1bc5c2061645be7 | [
"Apache-2.0"
] | null | null | null | accessories/AM2302.py | Dgragnolati/HAP-python | 8480dfd03caa2385a71a28fae1bc5c2061645be7 | [
"Apache-2.0"
] | null | null | null | """An Accessory for the AM2302 temperature and humidity sensor.
Assumes the DHT22 module is in a package called sensors.
Also, make sure pigpiod is running.
The DHT22 module was taken from
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=71336
"""
import time
import random
import pigpio
import sensors.DHT22 as ... | 28.54902 | 75 | 0.68544 |
ffcb61032e9367119cb7c561ae26a1b2d625c729 | 2,574 | py | Python | src/python/pants/backend/python/python_artifact.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/python_artifact.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/python_artifact.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import json
from hashlib import sha1
from pants.base.payload_field import PayloadField
... | 25.485149 | 103 | 0.663559 |
ffcb61484cabedff1ce6f68573795244efc8ae90 | 18,711 | py | Python | pylot/simulation/challenge/ERDOSAgent.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | pylot/simulation/challenge/ERDOSAgent.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | pylot/simulation/challenge/ERDOSAgent.py | victorsun123/pylot | 43df8de4b4ed562370a5512093f6d9b486699567 | [
"Apache-2.0"
] | null | null | null | from absl import flags
import pickle
import rospy
from std_msgs.msg import String
import sys
import time
import threading
import carla
from srunner.challenge.autoagents.autonomous_agent import AutonomousAgent, Track
from erdos.data_stream import DataStream
import erdos.graph
from erdos.message import Message, Waterm... | 39.641949 | 84 | 0.624766 |
ffcb6c0c23ec2e5bf2b9ba0c1fe5a7e178f17272 | 728 | py | Python | components/__init__.py | soochan-lee/CN-DPM | d592c5d794e4bddc4947f2ed61d6a9e50c6da277 | [
"MIT"
] | 91 | 2019-12-30T08:47:16.000Z | 2022-03-17T01:14:00.000Z | cn_dpm/components/__init__.py | ryanlindeborg/CN-DPM | df2f839efde28a23748ebe2fe23b88600c40fbf6 | [
"MIT"
] | 6 | 2020-03-24T14:46:39.000Z | 2020-10-26T10:24:37.000Z | cn_dpm/components/__init__.py | ryanlindeborg/CN-DPM | df2f839efde28a23748ebe2fe23b88600c40fbf6 | [
"MIT"
] | 13 | 2020-02-09T19:06:33.000Z | 2021-11-23T13:48:50.000Z | from typing import Dict
from .component import ComponentG, ComponentD
from .vae import MlpVae, MlpSharingVae, CnnVae, CnnSharingVae, ResNetVae
from .classifier import (
MlpClassifier,
MlpSharingClassifier,
CnnClassifier,
ResNetClassifier,
ResNetSharingClassifier,
)
G: Dict[str, ComponentG] = {
... | 26.962963 | 72 | 0.739011 |
ffcb7586aab90ea02e1714d62e64a159aa8e7483 | 16,434 | py | Python | geosoft/gxapi/GXUSERMETA.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | geosoft/gxapi/GXUSERMETA.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | geosoft/gxapi/GXUSERMETA.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | ### extends 'class_empty.py'
### block ClassImports
# NOTICE: Do not edit anything here, it is generated code
from . import gxapi_cy
from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref
### endblock ClassImports
### block Header
# NOTICE: The code generator will not replace the code in this block
### end... | 26.678571 | 184 | 0.584824 |
ffcb7a8d063fe137989cf40bdbeaaa3a8c9a907f | 2,552 | py | Python | stellarlab/constant.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | null | null | null | stellarlab/constant.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | null | null | null | stellarlab/constant.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | 1 | 2021-10-02T02:18:28.000Z | 2021-10-02T02:18:28.000Z | #!/usr/bin/env python
"""Astronomical and physical constants"""
# physical constants
c = 299792458. # m/s, light of speed, exactly
h = 6.62606957e-34 # kg m^2/s, planck constant
e = 1.60217657e-19 # C, elementary charge
G = 6.67384e-11 # m^3/(kg s), gravitational c... | 47.259259 | 96 | 0.573668 |
ffcbe7d5edd06f00e49a052c4b179a2d0e7737b8 | 24 | py | Python | JDjango/dialogs/dialogORM/__init__.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjango/dialogs/dialogORM/__init__.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjango/dialogs/dialogORM/__init__.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | from .dialogORM import * | 24 | 24 | 0.791667 |
ffcbf57eb4c4b4b2ae2caf1b9bd50fa0e1c12040 | 195 | py | Python | jenkinsapi_tests/test_utils/random_strings.py | ifwe/jenkinsapi | 31a7fbb07efcd48e226f7dcf643fd2a2625416c0 | [
"MIT"
] | 1 | 2015-01-12T14:15:59.000Z | 2015-01-12T14:15:59.000Z | jenkinsapi_tests/test_utils/random_strings.py | moustuk/jenkinsapi-1 | d18c1e669965c209093763f3295f79c9d3ccdeea | [
"MIT"
] | null | null | null | jenkinsapi_tests/test_utils/random_strings.py | moustuk/jenkinsapi-1 | d18c1e669965c209093763f3295f79c9d3ccdeea | [
"MIT"
] | null | null | null | import random
import string
def random_string(length=10):
return ''.join(random.choice(string.ascii_lowercase) for i in range(length))
if __name__ == '__main__':
print random_string()
| 19.5 | 80 | 0.738462 |
ffcc045694ffa1107d7518a98589611a0d0ac12c | 39,892 | py | Python | mouse_burrows/algorithm/pass4.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | 1 | 2016-03-06T05:16:38.000Z | 2016-03-06T05:16:38.000Z | mouse_burrows/algorithm/pass4.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | null | null | null | mouse_burrows/algorithm/pass4.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | null | null | null | '''
Created on Oct 2, 2014
@author: David Zwicker <dzwicker@seas.harvard.edu>
Module that contains the class responsible for the fourth pass of the algorithm
'''
from __future__ import division
import copy
import functools
import time
import cv2
import numpy as np
from scipy import cluster
from shapely import geom... | 42.035827 | 93 | 0.573022 |
ffcc0e7b20ae2740fb41c1691f46be6074732174 | 6,041 | py | Python | ingestion/src/metadata/ingestion/api/parser.py | codingwithabhi/OpenMetadata | 196b023643cbb8cd3be11294c7b40aa9aaf8e88b | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/api/parser.py | codingwithabhi/OpenMetadata | 196b023643cbb8cd3be11294c7b40aa9aaf8e88b | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/api/parser.py | codingwithabhi/OpenMetadata | 196b023643cbb8cd3be11294c7b40aa9aaf8e88b | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# 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... | 33.561111 | 117 | 0.738619 |
ffcc2d4e0f8300bdaf15b1e08e4e5bc18b00dbaf | 13,914 | py | Python | build/lib/feature_space_tree/experiments/experiment_splited.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | build/lib/feature_space_tree/experiments/experiment_splited.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | build/lib/feature_space_tree/experiments/experiment_splited.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# coding: utf-8
# Copyright (C) 2011-2012 FeatureSpaceTree Project
#
# 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
... | 41.16568 | 156 | 0.476858 |
ffcc4eea563691fc8c4c0e47ca0176c2b78110e4 | 11,013 | py | Python | symm/addons.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | symm/addons.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | symm/addons.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
from functools import reduce
import numpy
import scipy.linalg
from pyscf import lib
from pyscf.lib import logger
from pyscf.symm import basis
from pyscf.symm import param
def label_orb_symm(mol, irrep_name, symm_orb, mo, s=None, check=True, tol=1e-9):
'''Label the ... | 35.073248 | 88 | 0.591483 |
ffcc6ce78d73346522ac8b33eec936dba6cd0b72 | 2,702 | py | Python | sdk/containerservice/azure-mgmt-containerservice/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/containerservice/azure-mgmt-containerservice/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 36.026667 | 103 | 0.613249 |
ffcc7f79578ab32754999584377b7197534c4723 | 1,405 | bzl | Python | github.com/gogo/protobuf/gogo_proto_library.bzl | nmalsang/rules_proto | 241535ece7d0dc507efc128439558d6e880738f9 | [
"Apache-2.0"
] | null | null | null | github.com/gogo/protobuf/gogo_proto_library.bzl | nmalsang/rules_proto | 241535ece7d0dc507efc128439558d6e880738f9 | [
"Apache-2.0"
] | null | null | null | github.com/gogo/protobuf/gogo_proto_library.bzl | nmalsang/rules_proto | 241535ece7d0dc507efc128439558d6e880738f9 | [
"Apache-2.0"
] | null | null | null | load("//github.com/gogo/protobuf:gogo_proto_compile.bzl", "gogo_proto_compile")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//go:utils.bzl", "get_importmappings")
wkt_mappings = get_importmappings({
"google/protobuf/any.proto": "github.com/gogo/protobuf/types",
"google/protobuf/duration.proto": ... | 33.452381 | 88 | 0.652669 |
ffcc861cd0991580afc88069527f50c9514df8b7 | 5,819 | py | Python | appengine/chromium_cq_status/handlers/test/post_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/chromium_cq_status/handlers/test/post_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/chromium_cq_status/handlers/test/post_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
from third_party.testing_utils import testing
from webtest.app import AppError
import main
from model.password import Password
from model.reco... | 36.597484 | 79 | 0.643925 |
ffcc89627c7be2248a6413afbeb26990edd4ad26 | 1,320 | py | Python | garbage_classifier/utils.py | JinglinLi/deep_learning_garbage_classification | ed49a71298c9a6507dd09c10a51c77cf4ad83926 | [
"MIT"
] | null | null | null | garbage_classifier/utils.py | JinglinLi/deep_learning_garbage_classification | ed49a71298c9a6507dd09c10a51c77cf4ad83926 | [
"MIT"
] | null | null | null | garbage_classifier/utils.py | JinglinLi/deep_learning_garbage_classification | ed49a71298c9a6507dd09c10a51c77cf4ad83926 | [
"MIT"
] | null | null | null | """Copyright (c) 2021 Malte Bonart"""
import logging
import os
from datetime import datetime
import cv2
def write_image(out, frame):
"""
writes frame from the webcam as png file to disk. datetime is used as filename.
"""
if not os.path.exists(out):
os.makedirs(out)
now = datetime.now()
... | 22.758621 | 83 | 0.632576 |
ffcc8c2c786a4dac24283116ad0e44379c2964ff | 14,663 | py | Python | partnerclient/hfppnetwork/partner/query/parser.py | NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention | 4facd935920e77239c25323ca7e233cb899ba9f5 | [
"Apache-2.0"
] | 7 | 2015-07-15T06:47:16.000Z | 2020-10-17T20:51:09.000Z | partnerclient/hfppnetwork/partner/query/parser.py | NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention | 4facd935920e77239c25323ca7e233cb899ba9f5 | [
"Apache-2.0"
] | null | null | null | partnerclient/hfppnetwork/partner/query/parser.py | NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention | 4facd935920e77239c25323ca7e233cb899ba9f5 | [
"Apache-2.0"
] | 8 | 2017-01-30T02:27:01.000Z | 2021-04-21T04:15:48.000Z | """
Copyright (C) 2010 - 2013 TopCoder Inc., All Rights Reserved.
This module defines the Parser class and the ParserError class. See their
documentation below for details.
@version 1.0 (Healthcare Fraud Prevention - Query Parsing and Query Generation)
@author: TCSASSEMBLER
"""
from query.parser_config import Parser... | 34.501176 | 86 | 0.592785 |
ffcc92b9a3ee2174872114a49bbea977cb2e3217 | 2,125 | py | Python | plot.py | seramelp/Snakemake-k-mer | 85ea8bf28dc27131980f226f1690400079e96bdb | [
"MIT"
] | null | null | null | plot.py | seramelp/Snakemake-k-mer | 85ea8bf28dc27131980f226f1690400079e96bdb | [
"MIT"
] | null | null | null | plot.py | seramelp/Snakemake-k-mer | 85ea8bf28dc27131980f226f1690400079e96bdb | [
"MIT"
] | 2 | 2020-10-01T09:12:43.000Z | 2021-06-07T11:49:32.000Z | import seaborn as sns
import numpy as np
import matplotlib.pylab as plt
import pandas as pd
import os
def plot_counts(data,k):
"""Plot counts
Parameters
----------
data : array
The array with the k-mer values.
k: int
K-mer value
"""
plt.ylabel('counts')
plt.title( '%i-mer ... | 23.876404 | 62 | 0.621647 |
ffcc9325760c20da894fb6ed870edf08e1b52764 | 59,994 | py | Python | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_partition_sets.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_partition_sets.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_partition_sets.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['TestPartitionSets.test_get_partition_set[non_launchable_in_memory_instance_lazy_repository] 1'] = {
'partitionSetOrError': {
'__ty... | 30.797741 | 125 | 0.360719 |
ffcca91996cbc3d09f571380292bfb9916f02ae7 | 1,014 | py | Python | gpMgmt/bin/gppylib/test/unit/test_unit_pysync.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | gpMgmt/bin/gppylib/test/unit/test_unit_pysync.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | gpMgmt/bin/gppylib/test/unit/test_unit_pysync.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | import os, tempfile, hashlib
from gp_unittest import *
from lib.pysync import LocalPysync
CONTENT = 'To be or not to be.'
class LocalPySyncTestCase(GpTestCase):
def setUp(self):
self.subject = LocalPysync(['pysync', '/tmp', 'localhost:/tmp'])
def tearDown(self):
super(LocalPySyncTestCase, se... | 25.35 | 91 | 0.651874 |
ffccb91a5c61c609eb958808f5589fbccead56c4 | 23,340 | py | Python | tests/workflow_tests/test_scale_workflow.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2015-11-03T14:27:11.000Z | 2015-11-03T14:27:11.000Z | tests/workflow_tests/test_scale_workflow.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 2 | 2021-03-20T05:33:19.000Z | 2021-03-26T00:38:21.000Z | tests/workflow_tests/test_scale_workflow.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2019-10-29T06:15:31.000Z | 2019-10-29T06:15:31.000Z | ########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 46.309524 | 79 | 0.586332 |
ffccbef32d1f90bab8e360c544c1b9e16e7d7164 | 19,959 | py | Python | cadnano/views/sliceview/tools/selectslicetool.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2022-03-27T14:37:32.000Z | 2022-03-27T14:37:32.000Z | cadnano/views/sliceview/tools/selectslicetool.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | null | null | null | cadnano/views/sliceview/tools/selectslicetool.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T02:29:38.000Z | 2021-01-22T02:29:38.000Z | # -*- coding: utf-8 -*-
"""Summary
"""
from PyQt5.QtCore import QPointF, Qt
from PyQt5.QtGui import QPainterPath
from PyQt5.QtWidgets import (QGraphicsItemGroup, QGraphicsPathItem, # QGraphicsRectItem,
QGraphicsItem, QMenu, QAction)
from cadnano.fileio import v3encode, v3decode
from cadnan... | 32.088424 | 107 | 0.588557 |
ffccdae5a8f62ecb3008dd133c2e85f7e7fa904c | 15,919 | py | Python | intersight/apis/network_element_summary_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/network_element_summary_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/network_element_summary_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 56.250883 | 818 | 0.648533 |
ffcd1a527862dcf62719ce173718efc6327da5a5 | 5,427 | py | Python | applications/tensorflow/cnns/models/official_keras/mobilenet_base.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/models/official_keras/mobilenet_base.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/models/official_keras/mobilenet_base.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2019 Graphcore Ltd.
from typing import Optional, Tuple, Union
import numpy as np
import tensorflow as tf
from models import tf_layers
ImageNetBlockType = Tuple[int, int, int, int]
CifarBlockType = Tuple[int, int, int]
TensorType = Union[tf.Tensor, np.ndarray, tf.placeholder]
layers = tf_layers
class M... | 45.225 | 119 | 0.635526 |
ffcd3e195e7aacb679852905f1174d84e9ac9818 | 31,558 | py | Python | 1.0.0/hp/basic.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | 1.0.0/hp/basic.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | 1.0.0/hp/basic.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | '''
Created on Jun 24, 2017
@author: cef
Library of custom hp functions for pythons builtin librarires
#===============================================================================
# # PHILOSOPHY ---------------------------------------------------------------
#============================================... | 36.231917 | 141 | 0.440332 |
ffcd55d8529396ebbb635ee7ac918d5ca7e240e8 | 1,694 | py | Python | src/ggrc/migrations/versions/20170215144723_2f1cee67a8f3_add_default_assessment_notifications_.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc/migrations/versions/20170215144723_2f1cee67a8f3_add_default_assessment_notifications_.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc/migrations/versions/20170215144723_2f1cee67a8f3_add_default_assessment_notifications_.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
Add default Assessment notifications settings.
Create Date: 2017-02-15 14:47:23.772467
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
... | 24.550725 | 79 | 0.713105 |
ffcd6960122131d0abfab774db2bb896fe640aa0 | 282 | py | Python | python/webapp-userreg-flask-mysql/app/main/errors.py | parijatmishra/learn | e69e3e866d7a35940f405e94e00cb90059413dab | [
"Apache-2.0"
] | null | null | null | python/webapp-userreg-flask-mysql/app/main/errors.py | parijatmishra/learn | e69e3e866d7a35940f405e94e00cb90059413dab | [
"Apache-2.0"
] | 8 | 2020-09-04T20:14:10.000Z | 2022-03-08T22:43:37.000Z | python/webapp-userreg-flask-mysql/app/main/errors.py | parijatmishra/learn | e69e3e866d7a35940f405e94e00cb90059413dab | [
"Apache-2.0"
] | null | null | null | from flask import render_template
from . import main_blueprint
@main_blueprint.app_errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404
@main_blueprint.app_errorhandler(500)
def internal_server_error(e):
return render_template('500.html'), 500
| 25.636364 | 43 | 0.797872 |
ffcdcfbcdff4c446743f5e7147e44ec8d66d3696 | 999 | py | Python | 42_Trapping-Rain-Water.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | 3 | 2018-07-05T05:51:10.000Z | 2019-05-04T08:35:44.000Z | 42_Trapping-Rain-Water.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | 42_Trapping-Rain-Water.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | class Solution(object):
def trap(self, height):
"""
:type height: List[int]
:rtype: int
"""
if len(height) < 3:
return 0
max_height = 0
max_height_index = 0
for i in range(len(height)):
if height[i] > max_height:
... | 29.382353 | 66 | 0.517518 |
ffcddbeea0edc2bb629862207454ae41621098a2 | 4,937 | py | Python | code/Exp2_error_curve.py | yongleex/GCME | 77227e70605069c4fbfec570621fd19efdce1da4 | [
"MIT"
] | 6 | 2021-12-08T05:31:52.000Z | 2022-02-23T20:37:55.000Z | code/Exp2_error_curve.py | yongleex/GCME | 77227e70605069c4fbfec570621fd19efdce1da4 | [
"MIT"
] | null | null | null | code/Exp2_error_curve.py | yongleex/GCME | 77227e70605069c4fbfec570621fd19efdce1da4 | [
"MIT"
] | 1 | 2021-12-17T04:42:48.000Z | 2021-12-17T04:42:48.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
Experiment 2: Test the gamma estimation accuracy in comparison with BIGC method
Author: Yong Lee
E-Mail: yongli.cv@gmail.com
C-Data: 2019.04.11
______________________________
version 2
M-Data: 2020.09.03
1. Correct the bugs of AGT-ME
2. Add CAB algorithm
... | 35.014184 | 93 | 0.613936 |
ffce0ccaced36ae9faac795cca17928672a81128 | 601 | py | Python | wargame/performance-study/profile_ex.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | 1 | 2020-12-01T20:30:27.000Z | 2020-12-01T20:30:27.000Z | wargame/performance-study/profile_ex.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | wargame/performance-study/profile_ex.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | """profile_ex
This module contains supporting code to be used by cProfile. The cProfile can
be run on this file (from the commandline) as:
$ python -m cProfile profile_ex.py
"""
def test_1():
"""Trivial multiplication example"""
return 100 * 100
def test_2():
"""Trivial for looping example"""
x ... | 20.033333 | 77 | 0.620632 |
ffce0f26eeaa93cb39a5f2b3202809941590d861 | 988 | py | Python | tests/test_eda.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 1 | 2019-09-14T16:59:34.000Z | 2019-09-14T16:59:34.000Z | tests/test_eda.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | null | null | null | tests/test_eda.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 7 | 2020-01-19T14:40:08.000Z | 2022-01-14T12:50:30.000Z | """Tests eda module
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from dsutils.eda import countplot2d
def test_countplot2d_cat_cat(plot):
"""Tests eda.countplot2d w/ 2 categorical variables"""
df = pd.DataFrame()
df['A'] = np.array(['a', 'a', 'a', 'b', 'b', 'b'])
df['B... | 21.478261 | 73 | 0.582996 |
ffce1918f1e3f69086f5205b89fa091abdc20202 | 3,923 | py | Python | stocky-devel/stocky/serverlib/serverconfig.py | cfe-lab/stocky | 6c4114551d9b61c5ba3db2c237e995fecdd2f6b3 | [
"Apache-2.0"
] | 1 | 2020-05-13T17:39:59.000Z | 2020-05-13T17:39:59.000Z | stocky-devel/stocky/serverlib/serverconfig.py | cfe-lab/stocky | 6c4114551d9b61c5ba3db2c237e995fecdd2f6b3 | [
"Apache-2.0"
] | 1 | 2018-09-18T19:39:24.000Z | 2019-02-04T23:52:59.000Z | stocky-devel/stocky/serverlib/serverconfig.py | cfe-lab/stocky | 6c4114551d9b61c5ba3db2c237e995fecdd2f6b3 | [
"Apache-2.0"
] | null | null | null | """
Implement the reading of YAML files to configure the stocky server.
"""
import math
import serverlib.yamlutil as yamlutil
import pytz
import pytz.exceptions
import fuzzywuzzy.process
# configuration files are looked for in the directory defined by this environment variable
CONFIG_DIR_ENV_NAME = 'STOCKY_CONFIG_DIR... | 40.443299 | 118 | 0.667092 |
ffce1a8a6898f166bdeffeb49710ea60d2f4dace | 625 | py | Python | user/recover_password/utils/req_to_dict.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 4 | 2018-04-23T00:04:01.000Z | 2018-10-28T22:56:51.000Z | user/recover_password/utils/req_to_dict.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 23 | 2017-12-22T08:27:35.000Z | 2021-12-13T19:57:35.000Z | user/recover_password/utils/req_to_dict.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 1 | 2020-06-03T02:07:26.000Z | 2020-06-03T02:07:26.000Z |
"""
Contains utility funcion to work with falcon POST data requests.
"""
import json
import falcon
def req_to_dict(req):
"""Exctract POST request params as a json."""
try:
raw_json = req.stream.read()
except Exception as ex:
raise falcon.HTTPError(falcon.HTTP_400, 'Error', ex.message)
... | 22.321429 | 68 | 0.6176 |
ffce388a3db82170965a72f7e161502b13f287e9 | 1,480 | py | Python | tests/test_declarative.py | mklein0/formencode | efa11250a4b6e62a56d87b79d0f0d392057efb96 | [
"MIT"
] | 63 | 2015-02-14T11:49:59.000Z | 2022-02-02T22:15:16.000Z | tests/test_declarative.py | mklein0/formencode | efa11250a4b6e62a56d87b79d0f0d392057efb96 | [
"MIT"
] | 102 | 2015-01-08T18:01:46.000Z | 2022-01-25T01:20:09.000Z | tests/test_declarative.py | mklein0/formencode | efa11250a4b6e62a56d87b79d0f0d392057efb96 | [
"MIT"
] | 44 | 2015-01-11T13:22:57.000Z | 2021-12-02T08:54:17.000Z | from __future__ import absolute_import
# -*- coding: utf-8 -*-
import unittest
import re
from formencode import declarative
class TestDeclarative(unittest.TestCase):
def test_init(self):
D = declarative.Declarative
obj = D()
self.assertEqual(getattr(obj, 'foo', 'none'), 'none')
... | 31.489362 | 68 | 0.593919 |
ffce3c3144d77447419715162c49b4574467fa11 | 957 | py | Python | music_bg/background.py | music-bg/music_bg | 5b79eacb32506b6eda5861df4b5f71b611c5dfa3 | [
"MIT"
] | 3 | 2021-09-17T12:27:46.000Z | 2021-09-18T19:03:01.000Z | music_bg/background.py | music-bg/music_bg | 5b79eacb32506b6eda5861df4b5f71b611c5dfa3 | [
"MIT"
] | null | null | null | music_bg/background.py | music-bg/music_bg | 5b79eacb32506b6eda5861df4b5f71b611c5dfa3 | [
"MIT"
] | null | null | null | import subprocess
from loguru import logger
from music_bg.context import Context
def set_background(filename: str, context: Context) -> None:
"""
Update current background.
:param filename: path to background file.
:param context: current mbg context.
"""
logger.debug("Setting background")
... | 27.342857 | 83 | 0.684431 |
ffce5abf8d44d5fdcdc558aacccac2c5d0d189b0 | 1,157 | py | Python | nebpyclient/api/__init__.py | Nebulon/nebpyclient | 8ea044096bd18aaccbfb81eca4e26ec29895a18c | [
"MIT"
] | 2 | 2020-11-30T21:21:27.000Z | 2021-09-29T21:43:37.000Z | nebpyclient/api/__init__.py | Nebulon/nebpyclient | 8ea044096bd18aaccbfb81eca4e26ec29895a18c | [
"MIT"
] | 1 | 2020-12-01T15:18:24.000Z | 2020-12-01T15:18:24.000Z | nebpyclient/api/__init__.py | Nebulon/nebpyclient | 8ea044096bd18aaccbfb81eca4e26ec29895a18c | [
"MIT"
] | 2 | 2020-12-01T15:16:46.000Z | 2021-09-29T21:46:40.000Z | #
# Copyright 2021 Nebulon, Inc.
# All Rights Reserved.
#
# DISCLAIMER: THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
# EVENT SHALL THE AUTHORS OR COPYRIG... | 28.925 | 79 | 0.756266 |
ffce5c23871c7b523cfa8b8869992970fd12e6c4 | 111 | py | Python | violas_client/crypto/__init__.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/crypto/__init__.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/crypto/__init__.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | import os
import sys
# sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../canoser')))
| 27.75 | 89 | 0.72973 |
ffce5ec7094c95395912d6b971747ca5086c278a | 8,544 | py | Python | neuro-cli/src/neuro_cli/formatters/images.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-cli/src/neuro_cli/formatters/images.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-cli/src/neuro_cli/formatters/images.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | import abc
from types import TracebackType
from typing import Dict, Iterable, Optional, Type
from rich import box
from rich.console import Console, RenderableType
from rich.progress import BarColumn, DownloadColumn, Progress, TaskID, TextColumn
from rich.table import Table
from rich.text import Text
from neuro_sdk im... | 31.411765 | 83 | 0.604635 |
ffce762fb4bcdadf77e973617d078e029f64cc09 | 350 | py | Python | linux/userspace/elf-mangler/demonstration/ptrleakrop1/pwnscript.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | linux/userspace/elf-mangler/demonstration/ptrleakrop1/pwnscript.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | linux/userspace/elf-mangler/demonstration/ptrleakrop1/pwnscript.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2
from pwn import *
import sys
p = process(sys.argv[1])
p.recvuntil(':')
leakptr = int(p.recvline().strip(), 16)
shellptr = leakptr - 16
print("Leaked ptr " + hex(leakptr))
print("Which means i think shellptr is " + hex(shellptr))
p.sendline('A' * 64 + 'B' * 8 + p64(shellptr))
p.sendline('whoami ;... | 19.444444 | 57 | 0.662857 |
ffce7b474825f3ea02c832f7f2813ec634e62578 | 7,414 | py | Python | sysinv/sysinv/sysinv/sysinv/helm/manifest_openstack.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/helm/manifest_openstack.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/helm/manifest_openstack.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# All Rights Reserved.
#
""" System inventory Armada manifest operator."""
from sysinv.common import constants
from sysinv.common import exception
from sysinv.helm import manifest_base... | 41.418994 | 74 | 0.709064 |
ffce86dc5a7c4e275cb369675e30733b9f1870e8 | 459 | py | Python | examples/zeromq_sender.py | msabramo/diesel | a1ed7ed0358d0fec8592e23aafc3b7ec167ab649 | [
"BSD-3-Clause"
] | 224 | 2015-01-03T06:33:05.000Z | 2021-11-22T03:19:02.000Z | examples/zeromq_sender.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 12 | 2015-01-01T03:35:15.000Z | 2021-05-22T23:37:28.000Z | examples/zeromq_sender.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 37 | 2015-01-04T01:47:55.000Z | 2022-03-03T02:04:15.000Z | from diesel import quickstart, quickstop, sleep
from diesel.protocols.zeromq import DieselZMQSocket, zctx, zmq
import time
def send_message():
outsock = DieselZMQSocket(zctx.socket(zmq.DEALER), connect="tcp://127.0.0.1:5000")
for x in xrange(500000):
outsock.send("yo dawg %s" % x)
if x % 1000 ... | 24.157895 | 86 | 0.649237 |
ffce8df7585705e0fba0d38043bdc3556dd9f8ab | 9,456 | py | Python | gftool/lattice/kagome.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 12 | 2020-10-09T10:05:44.000Z | 2022-02-22T14:04:19.000Z | gftool/lattice/kagome.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 20 | 2020-01-28T09:15:27.000Z | 2022-02-06T16:48:30.000Z | gftool/lattice/kagome.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 6 | 2021-03-09T19:10:37.000Z | 2022-02-02T14:29:06.000Z | """2D Kagome lattice.
The DOS is finite in the interval :math:`[-2D/3, 4D/3]`, where :math:`D` is the
half-bandwidth.
The kagome lattice can be decomposed into `~gftool.lattice.triangular` and a
dispersionless flat band. The dispersive part looks like the
`~gftool.lattice.honeycomb` lattice.
:half_bandwidth: The hal... | 30.801303 | 98 | 0.619712 |
ffcea7fc29d8eb27b855f5a16b0ec817d43ce455 | 2,010 | py | Python | submarine-sdk/pysubmarine/submarine/entities/_submarine_object.py | akizminet/submarine | aa6e865f27167a26050d8daa293e0b4f41a144b6 | [
"Apache-2.0"
] | 544 | 2019-10-29T02:35:31.000Z | 2022-03-31T21:22:44.000Z | submarine-sdk/pysubmarine/submarine/entities/_submarine_object.py | akizminet/submarine | aa6e865f27167a26050d8daa293e0b4f41a144b6 | [
"Apache-2.0"
] | 545 | 2019-10-29T03:21:38.000Z | 2022-03-30T05:21:15.000Z | submarine-sdk/pysubmarine/submarine/entities/_submarine_object.py | akizminet/submarine | aa6e865f27167a26050d8daa293e0b4f41a144b6 | [
"Apache-2.0"
] | 220 | 2019-10-29T05:14:03.000Z | 2022-03-28T07:29:30.000Z | # 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 use t... | 34.655172 | 99 | 0.710945 |
ffcebe1f6c366b332c91ca625caf4196fa0d8bba | 5,191 | py | Python | validator/tests/test_merkle_trie/tests.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2017-08-04T10:31:00.000Z | 2017-08-04T10:31:00.000Z | validator/tests/test_merkle_trie/tests.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2021-12-09T23:11:26.000Z | 2021-12-09T23:11:26.000Z | validator/tests/test_merkle_trie/tests.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 28.838889 | 80 | 0.62801 |
ffcee83e071a966d67c47d7a6e87f203b591ec86 | 1,184 | py | Python | main.py | alinamuliak/map_project | 93bf8422704723b13ecb5220b5e0704c822890f6 | [
"MIT"
] | null | null | null | main.py | alinamuliak/map_project | 93bf8422704723b13ecb5220b5e0704c822890f6 | [
"MIT"
] | null | null | null | main.py | alinamuliak/map_project | 93bf8422704723b13ecb5220b5e0704c822890f6 | [
"MIT"
] | null | null | null | """
The main module at start of which the map is created based on the user input
with the film_chooser.py module.
"""
from time import sleep
import film_chooser as flmc
def slow(message):
"""
Print text slowly creating an effect of printing machine.
"""
for letter in message:
print(letter, en... | 29.6 | 79 | 0.661318 |
ffcf01a2e6f946a2789c8080af7a277db8271401 | 23 | py | Python | fabric_cf/__init__.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | fabric_cf/__init__.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | 67 | 2020-12-21T15:39:49.000Z | 2022-02-27T17:55:00.000Z | fabric_cf/__init__.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | __VERSION__ = "1.0.5"
| 7.666667 | 21 | 0.608696 |
ffcf08e4538fb08d55bcccf114eb79d3b594fffc | 27,510 | py | Python | b5/modules/docker.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 14 | 2018-11-24T23:33:35.000Z | 2022-02-04T23:46:49.000Z | b5/modules/docker.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 3 | 2020-02-10T11:05:11.000Z | 2020-03-04T08:42:11.000Z | b5/modules/docker.py | team23/b5 | 90f45e86966eeb7a259667bbe06a5555648d012d | [
"BSD-3-Clause"
] | 1 | 2020-02-11T19:45:13.000Z | 2020-02-11T19:45:13.000Z | import os
import pwd
import shlex
import warnings
from typing import Tuple
from ..exceptions import B5ExecutionError
from . import CONFIG_PREFIX_RE, BaseModule
class DockerModule(BaseModule):
'''docker module
'''
DEFAULT_CONFIG = {
'base_path': '.',
'docker_bin': 'docker',
'docke... | 41.306306 | 118 | 0.477208 |
ffcf249fa8b2f9acd9a730fd31bbea91d3e27362 | 8,296 | py | Python | benchmark/framework/aea_test_wrapper.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | benchmark/framework/aea_test_wrapper.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | benchmark/framework/aea_test_wrapper.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | 32.280156 | 94 | 0.619455 |
ffcf29d68c9715ab1c5b85bf5bb6323442be3170 | 1,153 | py | Python | src/osducli/commands/search/id.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | 3 | 2021-08-19T05:59:39.000Z | 2021-11-10T08:02:58.000Z | src/osducli/commands/search/id.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | 2 | 2021-09-13T11:10:15.000Z | 2021-11-25T13:21:54.000Z | src/osducli/commands/search/id.py | equinor/osdu-cli | 579922556925ea7ad759a6230498378cf724b445 | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright (c) Equinor ASA. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
"""Search se... | 30.342105 | 100 | 0.645273 |
ffcf5731cb4320d3e3993f5ad683514157a6b67c | 547 | py | Python | 0x0B-python-input_output/3-write_file.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x0B-python-input_output/3-write_file.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x0B-python-input_output/3-write_file.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Module for the write_file(filename="", text="") that writes a string to a text
file (UTF8) and returns the number of characters written.
"""
def write_file(filename="", text=""):
"""
Function that writes a string to a text file (UTF8) and returns the number
of characters written.
... | 24.863636 | 78 | 0.638026 |
ffcf5aedef59d4fe6b8fd88e02c62b39f23e0dd9 | 665 | py | Python | sessions/002-session-strings/exercises/string_methods_video.py | robotlightsyou/pfb-resources | 3623f54d87f7eddb0ea858d14845552d356643a9 | [
"MIT"
] | null | null | null | sessions/002-session-strings/exercises/string_methods_video.py | robotlightsyou/pfb-resources | 3623f54d87f7eddb0ea858d14845552d356643a9 | [
"MIT"
] | 2 | 2021-04-21T05:12:55.000Z | 2021-04-21T05:15:04.000Z | sessions/002-session-strings/exercises/string_methods_video.py | robotlightsyou/pfb-resources | 3623f54d87f7eddb0ea858d14845552d356643a9 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
'''
Ask the user for input, modify the return
'''
#print("helloworld")
import sys
global_var = "howdy"
def main(data):
print_some_word(data)
data = 'test'
print_some_word(data)
def print_some_word(word):
print(word)
if __name__ == "__main__":
someword = 'blue'
m... | 16.219512 | 45 | 0.557895 |
ffcf6a5169f05ef3bce76cb65333b484b375a01b | 143,286 | py | Python | oscar/lib/python2.7/site-packages/pygments/lexers/lisp.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pygments/lexers/lisp.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pygments/lexers/lisp.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.lexers.lisp
~~~~~~~~~~~~~~~~~~~~
Lexers for Lispy languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, words,... | 54.647597 | 90 | 0.56642 |
ffcf8d78462d3d0ee68758395dc0c69a13337b03 | 37,738 | pyt | Python | Sentinel.pyt | EsriDE/ArcGIS-Sentinel2-Download-Tools | 85b76770ca1e692bca9d7d58f23667ab6661428d | [
"Apache-2.0"
] | 28 | 2017-01-25T15:14:43.000Z | 2022-02-07T06:00:22.000Z | Sentinel.pyt | EsriDE/ArcGIS-Sentinel2-Download-Tools | 85b76770ca1e692bca9d7d58f23667ab6661428d | [
"Apache-2.0"
] | 1 | 2018-08-16T08:01:27.000Z | 2018-08-24T16:51:28.000Z | Sentinel.pyt | EsriDE/ArcGIS-Sentinel2-Download-Tools | 85b76770ca1e692bca9d7d58f23667ab6661428d | [
"Apache-2.0"
] | 15 | 2017-09-10T06:48:00.000Z | 2021-11-07T20:42:39.000Z | # -*- coding: UTF-8 -*-
# Copyright 2018 Esri Deutschland GmbH
#
# 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 requir... | 62.687708 | 361 | 0.621973 |
ffcf9aefc64249ecdeeb7933f988b7d3bbe54fc4 | 83 | py | Python | Florence/FunctionSpace/ThreeDimensional/Hex/__init__.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 65 | 2017-08-04T10:21:13.000Z | 2022-02-21T21:45:09.000Z | Florence/FunctionSpace/ThreeDimensional/Hex/__init__.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 6 | 2018-06-03T02:29:20.000Z | 2022-01-18T02:30:22.000Z | Florence/FunctionSpace/ThreeDimensional/Hex/__init__.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 10 | 2018-05-30T09:44:10.000Z | 2021-05-18T08:06:51.000Z | from .HexLagrangeGaussLobatto import LagrangeGaussLobatto, GradLagrangeGaussLobatto | 83 | 83 | 0.927711 |
ffcfa61e1a07eee32d54e506c73bee7dfdda830d | 57,148 | py | Python | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_alert_config.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_alert_config.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/metricsadvisor/azure-ai-metricsadvisor/tests/test_alert_config.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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.
# ----------------------------------------------------------------------... | 55.863148 | 137 | 0.61626 |
ffcfd01b96ac9dd1da3667d5535c379000f30ef3 | 435 | py | Python | core/migrations/0013_artifact_name.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | null | null | null | core/migrations/0013_artifact_name.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 140 | 2020-01-21T15:42:29.000Z | 2021-08-21T18:04:19.000Z | core/migrations/0013_artifact_name.py | IS-AgroSmart/AgroSmart-Web | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 1 | 2021-05-03T06:12:35.000Z | 2021-05-03T06:12:35.000Z | # Generated by Django 3.0.1 on 2020-03-07 02:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0012_auto_20200307_0150'),
]
operations = [
migrations.AddField(
model_name='artifact',
name='name',
... | 21.75 | 68 | 0.597701 |
ffcfe8bec0ac2d68db87171bb23fc202e6a8dfda | 885 | py | Python | test_app/management/commands/test_job_halt.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | test_app/management/commands/test_job_halt.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | test_app/management/commands/test_job_halt.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | # encoding=utf-8
from __future__ import unicode_literals
import os
import signal
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
from django_joblog import JobLogger, DummyJobLogger, JobLoggerContext
class Co... | 32.777778 | 77 | 0.675706 |
ffcfea7ff8e41976c0546dd7ebe2e32b39094984 | 385 | py | Python | example/tests/test_config.py | triaxtec/fastapi-serverless-cookiecutter | fe5ca7ebb0fbe47ee55adbe93431b02862e62544 | [
"MIT"
] | 15 | 2020-05-09T16:34:29.000Z | 2021-06-05T14:26:34.000Z | example/tests/test_config.py | triaxtec/fastapi-serverless-cookiecutter | fe5ca7ebb0fbe47ee55adbe93431b02862e62544 | [
"MIT"
] | null | null | null | example/tests/test_config.py | triaxtec/fastapi-serverless-cookiecutter | fe5ca7ebb0fbe47ee55adbe93431b02862e62544 | [
"MIT"
] | 1 | 2020-08-13T18:40:55.000Z | 2020-08-13T18:40:55.000Z | def test_get_config_aws_load(mocker):
from example import config
AWSSource = mocker.patch.object(config, "AWSSource", return_value={"custom_key": "custom_value"})
mocker.patch.object(config, "_app_config", None)
config = config.get_config({"env": "testing"})
AWSSource.assert_called_once_with("exa... | 35 | 101 | 0.72987 |
ffcfffdf1997a99bc5274659a582d672a0066143 | 1,557 | py | Python | app/backend/core/models.py | philippeoz/temperature_by_location | 4d856737c258200b475fd542a226bb04092a9d6c | [
"MIT"
] | null | null | null | app/backend/core/models.py | philippeoz/temperature_by_location | 4d856737c258200b475fd542a226bb04092a9d6c | [
"MIT"
] | 3 | 2020-02-11T23:28:00.000Z | 2021-06-10T21:16:24.000Z | app/backend/core/models.py | philippeoz/temperature_by_location | 4d856737c258200b475fd542a226bb04092a9d6c | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from django.utils.translation import gettext as _
class IPRequestLog(models.Model):
"""Model definition for IPRequestLog."""
ip = models.CharField(max_length=50)
created_at = models.DateTimeField(auto_now=False, auto_now_add=True)
class ... | 33.12766 | 72 | 0.705202 |
ffd03566d2c67c04fac49ce6ad42a028f17814f6 | 34,007 | py | Python | mlox/modules/ruleParser.py | NullCascade/mlox | 37c480d231c02795461c16dc9e3730424e1bb20e | [
"MIT"
] | null | null | null | mlox/modules/ruleParser.py | NullCascade/mlox | 37c480d231c02795461c16dc9e3730424e1bb20e | [
"MIT"
] | null | null | null | mlox/modules/ruleParser.py | NullCascade/mlox | 37c480d231c02795461c16dc9e3730424e1bb20e | [
"MIT"
] | null | null | null |
import os
import re
import io
import logging
from pprint import PrettyPrinter
from . import pluggraph
from . import fileFinder
# comments start with ';'
re_comment = re.compile(r'(?:^|\s);.*$')
# re_rule matches the start of a rule.
# TBD: check end-bracket pattern
re_rule = re.compile(r'^\[(version|order|nearend|nea... | 46.521204 | 218 | 0.558003 |
ffd0375b6f5faf6e68dd211197fce20cd0193d89 | 8,235 | py | Python | model/featnet/BiFPN.py | ZhangHanbo/Visual-Manipulation-Relationship-Network-Pytorch | 9dd24947db318f6e404918d4758f1d824eea3748 | [
"MIT"
] | 26 | 2019-10-31T08:21:46.000Z | 2022-03-11T13:58:43.000Z | model/featnet/BiFPN.py | xjtAlgo/Visual-Manipulation-Relationship-Network-Pytorch | da7fffcc6bed062fa1a5dc12b4279f3456825664 | [
"MIT"
] | 12 | 2019-11-07T09:12:50.000Z | 2022-03-12T02:58:18.000Z | model/featnet/BiFPN.py | xjtAlgo/Visual-Manipulation-Relationship-Network-Pytorch | da7fffcc6bed062fa1a5dc12b4279f3456825664 | [
"MIT"
] | 11 | 2019-10-30T08:44:47.000Z | 2022-03-11T13:58:48.000Z | import torch.nn as nn
import torch.nn.functional as F
from model.basenet.utils import ConvModule
from model.utils.net_utils import weights_xavier_init
import torch
class BIFPN(nn.Module):
def __init__(self,
in_channels,
out_channels,
num_outs,
... | 40.170732 | 132 | 0.531148 |
ffd04511f242df2a25c024828179764c559cf74e | 7,063 | py | Python | pytest_django/fixtures.py | dcramer/pytest_django | 693aae274bcd68fd20d6f638abd58be0c21bd782 | [
"BSD-3-Clause"
] | 1 | 2015-11-06T10:47:26.000Z | 2015-11-06T10:47:26.000Z | pytest_django/fixtures.py | dcramer/pytest_django | 693aae274bcd68fd20d6f638abd58be0c21bd782 | [
"BSD-3-Clause"
] | null | null | null | pytest_django/fixtures.py | dcramer/pytest_django | 693aae274bcd68fd20d6f638abd58be0c21bd782 | [
"BSD-3-Clause"
] | null | null | null | """All pytest-django fixtures"""
from __future__ import with_statement
import copy
import os
import pytest
from . import live_server_helper
from .db_reuse import monkey_patch_creation_for_db_reuse
from .django_compat import is_django_unittest
from .lazy_django import skip_if_no_django
__all__ = ['_django_db_setup'... | 32.548387 | 75 | 0.69503 |
ffd08ed8b3c59c3c13cabed95e29866b695a326f | 956 | py | Python | autofunc/tests/test_get_match_factor.py | SoftwareDevEngResearch/AutoFunc | f6ee58f00472345029891ac6f6cea585abf15cd9 | [
"MIT"
] | null | null | null | autofunc/tests/test_get_match_factor.py | SoftwareDevEngResearch/AutoFunc | f6ee58f00472345029891ac6f6cea585abf15cd9 | [
"MIT"
] | 2 | 2019-04-23T02:53:56.000Z | 2019-04-25T17:26:39.000Z | autofunc/tests/test_get_match_factor.py | SoftwareDevEngResearch/AutoFunc | f6ee58f00472345029891ac6f6cea585abf15cd9 | [
"MIT"
] | 1 | 2019-04-23T01:27:56.000Z | 2019-04-23T01:27:56.000Z | from autofunc.get_match_factor import match
from autofunc.get_top_results import get_top_results
from autofunc.find_associations import find_associations
from autofunc.get_data import get_data
import os.path
import numpy as np
def test_1():
"""
Tests that the match factor for a known learning set and test ca... | 28.969697 | 109 | 0.756276 |
ffd0ace63a5a0b26299fa09c79102b114e48eebf | 10,634 | py | Python | alignshift/models/truncated_densenet3d_acs.py | ashwinvaswani/lesion_detection | 26246e3954209075c56649dfb2ef565290e6dcb3 | [
"MIT"
] | null | null | null | alignshift/models/truncated_densenet3d_acs.py | ashwinvaswani/lesion_detection | 26246e3954209075c56649dfb2ef565290e6dcb3 | [
"MIT"
] | null | null | null | alignshift/models/truncated_densenet3d_acs.py | ashwinvaswani/lesion_detection | 26246e3954209075c56649dfb2ef565290e6dcb3 | [
"MIT"
] | null | null | null | """
DenseNet121
Difference from densenet in torchvision for higher resolution:
1. Modify the stride of first convolution layer (7x7 with stride 2) into 1
2. Remove the first max-pooling layer
"""
import re
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
fr... | 40.9 | 120 | 0.615291 |
ffd0b0de59f9aaee18073d7831e8e468b4ebf43f | 1,481 | py | Python | bumblebee/modules/datetime.py | 4shadoww/bumblebee-status | dd98c1ec51fa96f8d6f8233c0caac047a79951b2 | [
"MIT"
] | 5 | 2020-09-12T09:13:23.000Z | 2021-07-07T06:48:28.000Z | bumblebee/modules/datetime.py | 4shadoww/bumblebee-status | dd98c1ec51fa96f8d6f8233c0caac047a79951b2 | [
"MIT"
] | null | null | null | bumblebee/modules/datetime.py | 4shadoww/bumblebee-status | dd98c1ec51fa96f8d6f8233c0caac047a79951b2 | [
"MIT"
] | null | null | null | # pylint: disable=C0111,R0903
"""Displays the current date and time.
Parameters:
* datetime.format: strftime()-compatible formatting string
* date.format : alias for datetime.format
* time.format : alias for datetime.format
* datetime.locale: locale to use rather than the system default
* da... | 30.854167 | 71 | 0.646185 |
ffd0c8bf2b54337975e557e95b8f0dc30e7d28f7 | 143,578 | py | Python | Lib/test/test_logging.py | bendmorris/static-python | 2e0f8c4d7ed5b359dc7d8a75b6fb37e6b6c5c473 | [
"PSF-2.0"
] | 164 | 2015-01-04T07:04:07.000Z | 2022-01-06T03:18:56.000Z | Lib/test/test_logging.py | idobatter/cpython | c7b03e7b57cedccb77e37f65f9bbcb82050c2bb5 | [
"PSF-2.0"
] | 3 | 2015-08-27T07:35:26.000Z | 2016-04-07T16:35:39.000Z | Lib/test/test_logging.py | bendmorris/static-python | 2e0f8c4d7ed5b359dc7d8a75b6fb37e6b6c5c473 | [
"PSF-2.0"
] | 35 | 2015-06-11T05:35:55.000Z | 2022-01-11T19:32:00.000Z | #!/usr/bin/env python
#
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright n... | 34.78992 | 99 | 0.563896 |
ffd16d325c38467be230f5824d78fbc409a21779 | 21,948 | py | Python | Notebooks/CarsDB-compare.py | JRCSTU/wltp | 18650f372044371ed994a161a93473a75e76d2a9 | [
"Apache-2.0"
] | 11 | 2017-05-22T18:31:01.000Z | 2021-11-08T12:20:07.000Z | Notebooks/CarsDB-compare.py | JRCSTU/wltp | 18650f372044371ed994a161a93473a75e76d2a9 | [
"Apache-2.0"
] | 11 | 2016-08-09T13:37:13.000Z | 2020-03-31T20:33:20.000Z | Notebooks/CarsDB-compare.py | JRCSTU/wltp | 18650f372044371ed994a161a93473a75e76d2a9 | [
"Apache-2.0"
] | 6 | 2017-11-30T10:22:32.000Z | 2020-12-03T14:04:55.000Z | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.6.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% [markdown]
# # C... | 28.916996 | 145 | 0.631493 |
ffd17f8fe28dac8bd4c7107aada6bfc40487d483 | 4,738 | py | Python | home/views.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | home/views.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | home/views.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.conf import settings
from django.views.decorators.cache import cache_page
from django.http import JsonResponse
from news.models import News
from common.models import ReleaseNotes, ReleaseStatistics, Citation
from googleapiclient.discovery import build
from oauth2client.... | 50.404255 | 256 | 0.666948 |
ffd19e521af032e157dd312b2eeca6bb414aa613 | 2,923 | py | Python | infra/tools/log/__main__.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | infra/tools/log/__main__.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | infra/tools/log/__main__.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""List and cat logs in the infra cloud.
Commands:
list Lists all log types
list <log> Lists all machines that write this log... | 34.797619 | 82 | 0.652412 |
ffd1afe9679fcf1c4e293b6c959b5a3fcb106c91 | 973 | py | Python | onadata/apps/restservice/tasks.py | GrupoCATO/kobocat | 10cee40a39886c04227de38e592fef37e14e8faa | [
"BSD-2-Clause"
] | 1 | 2019-12-05T14:29:23.000Z | 2019-12-05T14:29:23.000Z | onadata/apps/restservice/tasks.py | GrupoCATO/kobocat | 10cee40a39886c04227de38e592fef37e14e8faa | [
"BSD-2-Clause"
] | 4 | 2018-01-20T12:06:00.000Z | 2020-01-21T23:13:37.000Z | onadata/apps/restservice/tasks.py | GrupoCATO/kobocat | 10cee40a39886c04227de38e592fef37e14e8faa | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from celery import shared_task
from django.conf import settings
@shared_task(bind=True)
def service_definition_task(self, rest_service, data):
"""
Tries to send data to the endpoint of the hook
It retries 3 times maximum.
- after 2 minutes,
- after 20 minute... | 30.40625 | 92 | 0.678314 |
ffd1dba2fcd2bcdd4a52c4f1d39ca7c0ad5ae041 | 5,059 | py | Python | tests/test_metadata.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | 16 | 2019-07-04T16:00:13.000Z | 2022-01-28T19:51:58.000Z | tests/test_metadata.py | containerbuildsystem/atomic-reactor | 5734a189fc79245d99610f3a81b3aee9913db355 | [
"BSD-3-Clause"
] | 577 | 2019-06-03T07:53:16.000Z | 2022-03-31T04:01:23.000Z | tests/test_metadata.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | 17 | 2020-02-21T13:30:06.000Z | 2022-02-15T10:42:32.000Z | """
Copyright (c) 2019 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import pytest
from atomic_reactor.inner import DockerBuildWorkflow
from atomic_reactor.plugin import Plugin, BuildPlugin
from atomic_reactor... | 27.198925 | 80 | 0.647756 |
ffd20e15072915df13dfe2a7c8e1b3d5199e2316 | 1,633 | py | Python | leetcode/medium/209-Min_size_subarr_sum.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/209-Min_size_subarr_sum.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/209-Min_size_subarr_sum.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #209
"""
from typing import List
class Solution:
# O(n) - Sliding window
def minSubArrayLen(self, s: int, nums: List[int]) -> int:
if not nums:
return
l = 0 # left pointer of sliding window
res = len(nums) + 1 # let len greater then len(nums)
... | 25.515625 | 96 | 0.484385 |
ffd21686e71bb6d962a18f3ffe57e9c6dd052717 | 468 | py | Python | src/glove_tf_21/callbacks/lr_tensorboard_callback.py | bbreton3/glove_tf_21 | 16b18bdb2d41c104dcd9159c0a760336bb5fd4d1 | [
"MIT"
] | 1 | 2020-04-18T16:33:05.000Z | 2020-04-18T16:33:05.000Z | src/glove_tf_21/callbacks/lr_tensorboard_callback.py | bbreton3/glove_tf_21 | 16b18bdb2d41c104dcd9159c0a760336bb5fd4d1 | [
"MIT"
] | 7 | 2020-11-13T17:44:25.000Z | 2022-02-10T01:16:13.000Z | src/glove_tf_21/callbacks/lr_tensorboard_callback.py | bbreton3/glove_tf_21 | 16b18bdb2d41c104dcd9159c0a760336bb5fd4d1 | [
"MIT"
] | null | null | null | import tensorflow as tf
class LrTensorboardCallback(tf.keras.callbacks.TensorBoard):
"""
Inspired from : https://stackoverflow.com/questions/49127214/keras-how-to-output-learning-rate-onto-tensorboard
This class adds the learning rate to the tensorboard
"""
def on_epoch_end(self, epoch, logs=Non... | 31.2 | 115 | 0.700855 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.