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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
388d2a229b5a9685c92a6b38dba2e853827bccfb | 2,134 | py | Python | Tools/Scripts/webkitpy/tool/steps/ensurelocalcommitifneeded.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/tool/steps/ensurelocalcommitifneeded.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/tool/steps/ensurelocalcommitifneeded.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 43.55102 | 120 | 0.758201 |
388d4bab2475049dec59313a3f55a16f6d576fb1 | 2,912 | py | Python | processors/custom_json_processor.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | processors/custom_json_processor.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | processors/custom_json_processor.py | hive-engine/distribution-engine-smt | 9ed4fddbae17342700a4ba0f24c667c8b853c793 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from beem.constants import STEEM_100_PERCENT
from beem.utils import resolve_authorperm, construct_authorperm
from dec... | 32 | 81 | 0.686126 |
388d7124a8a30652080c2c22f3bdab80d6243f29 | 3,642 | py | Python | var/spack/repos/builtin/packages/synapsetool/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/synapsetool/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/synapsetool/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | ##############################################################################
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Synapsetool(CMak... | 40.021978 | 81 | 0.597474 |
388d9bbf45cb614b1effa364b26754a98058059c | 89,621 | py | Python | google/cloud/security/privateca_v1beta1/services/certificate_authority_service/async_client.py | renovate-bot/python-security-private-ca | e87815a7614bd6d2aabef5fabc050c1161a76fbf | [
"Apache-2.0"
] | null | null | null | google/cloud/security/privateca_v1beta1/services/certificate_authority_service/async_client.py | renovate-bot/python-security-private-ca | e87815a7614bd6d2aabef5fabc050c1161a76fbf | [
"Apache-2.0"
] | null | null | null | google/cloud/security/privateca_v1beta1/services/certificate_authority_service/async_client.py | renovate-bot/python-security-private-ca | e87815a7614bd6d2aabef5fabc050c1161a76fbf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 45.631874 | 277 | 0.648933 |
388e03bfa5345b74e36de51ad084341ff02e7ff6 | 5,649 | py | Python | dpa/product/subscription/__init__.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 55 | 2015-07-15T02:33:55.000Z | 2020-12-28T08:02:54.000Z | dpa/product/subscription/__init__.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 5 | 2015-07-11T03:21:10.000Z | 2016-12-27T12:20:07.000Z | dpa/product/subscription/__init__.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 12 | 2015-07-08T04:48:39.000Z | 2020-06-27T11:35:58.000Z | """Classes and functions related to DPA pipeline product subscription."""
# -----------------------------------------------------------------------------
# Imports:
# -----------------------------------------------------------------------------
import os.path
from dpa.ptask.version import PTaskVersion
from dpa.prod... | 36.211538 | 80 | 0.454948 |
388e22b56249e81456b2ad03d9fe4f9af18cf9e3 | 4,357 | py | Python | src/content_realization.py | spacemanidol/LING573SP20 | b7bc935af2482f1cb329c4f6d54d5d7773fa1978 | [
"MIT"
] | null | null | null | src/content_realization.py | spacemanidol/LING573SP20 | b7bc935af2482f1cb329c4f6d54d5d7773fa1978 | [
"MIT"
] | null | null | null | src/content_realization.py | spacemanidol/LING573SP20 | b7bc935af2482f1cb329c4f6d54d5d7773fa1978 | [
"MIT"
] | 1 | 2020-12-26T01:32:30.000Z | 2020-12-26T01:32:30.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""Content here is realized"""
__author__ = 'Daniel Campos, Sicong Huang, Hayley Luke, Simola Nayak, Shunjie Wang '
__email__ = 'dacampos@uw.edu, huangs33@uw.edu, shunjiew@uw.edu, simnayak@uw.edu, jhluke@uw.edu'
import sys
import os
import re
import spacy
from data_input i... | 44.010101 | 134 | 0.606381 |
388e334c343540f1e6bdf2f9eabbba3236fe2ec3 | 2,385 | py | Python | src/refactory/namespacing/ast_ref.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | null | null | null | src/refactory/namespacing/ast_ref.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | 1 | 2022-02-07T22:18:30.000Z | 2022-02-07T22:18:30.000Z | src/refactory/namespacing/ast_ref.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | null | null | null | from __future__ import annotations
import ast
from .ast_ns import AstNamespace, AstStatement, KwargName
from .literal import string_literalify_if_denoted_else_kwarg
__all__ = ["ast_ref_tree"]
def ast_ref_tree(tree: dict, init=False) -> dict:
"""
An AST tree starting at an AST node (without aliases), built ... | 43.363636 | 86 | 0.690566 |
388e42c778edc3646616bdf4c2dadb1f41e73298 | 45,876 | py | Python | lendingclub/__init__.py | jgillick/LendingClub | 4495f99fd869810f39c00e02b0f4112c6b210384 | [
"MIT"
] | 55 | 2015-01-15T22:28:29.000Z | 2021-04-13T02:32:36.000Z | lendingclub/__init__.py | jgillick/LendingClub | 4495f99fd869810f39c00e02b0f4112c6b210384 | [
"MIT"
] | 19 | 2015-06-29T16:36:31.000Z | 2020-09-10T22:19:17.000Z | lendingclub/__init__.py | jgillick/LendingClub | 4495f99fd869810f39c00e02b0f4112c6b210384 | [
"MIT"
] | 43 | 2015-02-07T22:16:52.000Z | 2020-09-05T05:11:09.000Z | #!/usr/bin/env python
"""
The stand-alone python module for interacting with your Lending Club account.
"""
"""
The MIT License (MIT)
Copyright (c) 2013 Jeremy Gillick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), t... | 36.583732 | 217 | 0.569252 |
388e5ba8ae159492d75a36f3fb56e9887ebb33e8 | 3,359 | py | Python | tycho/ser.py | SamHDev/tycho-py | cd6f8082c2d261bac96d1b5d4ff5b5ed251658b2 | [
"MIT"
] | 2 | 2021-02-07T19:46:08.000Z | 2021-05-14T14:54:45.000Z | tycho/ser.py | SamHDev/tycho-py | cd6f8082c2d261bac96d1b5d4ff5b5ed251658b2 | [
"MIT"
] | null | null | null | tycho/ser.py | SamHDev/tycho-py | cd6f8082c2d261bac96d1b5d4ff5b5ed251658b2 | [
"MIT"
] | null | null | null | from .elements import *
from .values import *
from typing import Optional, Type
def serialise(t) -> Element:
if isinstance(t, dict):
if is_structure(t):
return Structure({str(key): serialise(value) for key, value in t.items()})
map_type = find_array_type(t.keys())
if map_type ... | 27.760331 | 102 | 0.538851 |
388e6550034942747801697823a3a38cad5c63d3 | 3,292 | gyp | Python | third_party/openh264/openh264.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | third_party/openh264/openh264.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | third_party/openh264/openh264.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2015 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.
{
'includes': [
'openh264.gypi',
'openh264_args.gypi',
],
# Settings shared by all openh264 targets.
'target_defaults': {
'conditions': [... | 30.766355 | 75 | 0.504253 |
388e6857ecd21c92023936529f4f716a3bb09cf4 | 30,229 | py | Python | src/plot_figure.py | PanZiwei/nanome | 6632e9165391cd8c556beb56e71a3fbda8065067 | [
"MIT"
] | null | null | null | src/plot_figure.py | PanZiwei/nanome | 6632e9165391cd8c556beb56e71a3fbda8065067 | [
"MIT"
] | null | null | null | src/plot_figure.py | PanZiwei/nanome | 6632e9165391cd8c556beb56e71a3fbda8065067 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# @Author : Yang Liu
# @FileName : plot_figure.py
# @Software : NANOME project
# @Organization : JAX Li Lab
# @Website : https://github.com/TheJacksonLaboratory/nanome
"""
Plots and export data for nanome paper
"""
import argparse
import glob
import gzip
import os.path
import pickle
import re... | 42.337535 | 290 | 0.588541 |
388e7cccad5fa8d9d0d1acb1073d5bee957cff97 | 467 | py | Python | alipay/aop/api/response/AlipayDigitalopUcdpApebehaviorSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayDigitalopUcdpApebehaviorSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayDigitalopUcdpApebehaviorSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayDigitalopUcdpApebehaviorSyncResponse(AlipayResponse):
def __init__(self):
super(AlipayDigitalopUcdpApebehaviorSyncResponse, self).__init__()
def parse_response_co... | 29.1875 | 115 | 0.792291 |
388e9261b676ee63e91db2c17f7dac4853497961 | 3,769 | py | Python | pytorch/test/test_foreach.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/test_foreach.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/test_foreach.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | import torch
import torch.cuda
from torch.testing._internal.common_utils import TestCase, run_tests
from torch.testing._internal.common_device_type import instantiate_device_type_tests, dtypes
class TestForeach(TestCase):
@dtypes(*torch.testing.get_all_dtypes())
def test_add_scalar_with_same_size_tensors(self,... | 36.592233 | 105 | 0.619793 |
388ea71f531fdded7f63fc3bdca15bd3484f8ae1 | 1,770 | py | Python | my_optimizers.py | dr-yali/Bone-MRI | 54c50b2da26190575ad0913f715bc15a7dbd857f | [
"MIT"
] | null | null | null | my_optimizers.py | dr-yali/Bone-MRI | 54c50b2da26190575ad0913f715bc15a7dbd857f | [
"MIT"
] | null | null | null | my_optimizers.py | dr-yali/Bone-MRI | 54c50b2da26190575ad0913f715bc15a7dbd857f | [
"MIT"
] | null | null | null | from keras import optimizers
from keras.callbacks import LearningRateScheduler
import math
OPTIMIZERS = {
"sgd-01-0.9": lambda: optimizers.SGD(lr=0.01, momentum=0.9),
"sgd-001-0.9": lambda: optimizers.SGD(lr=0.001, momentum=0.9),
"sgd-0001-0.9": lambda: optimizers.SGD(lr=0.0001, momentum=0.9),
"sgd-01-... | 45.384615 | 123 | 0.733333 |
388eabeb0baa73de6e355603c382a05c97055f63 | 1,096 | py | Python | utils/getmessage.py | mallusrgreatv2/PyHDISCORD | e414976441cbdb3a57b2c545ab164810bebe2e4b | [
"MIT"
] | 2 | 2021-07-05T12:00:39.000Z | 2021-07-05T12:00:49.000Z | utils/getmessage.py | mallusrgreatv2/PyHDISCORD | e414976441cbdb3a57b2c545ab164810bebe2e4b | [
"MIT"
] | null | null | null | utils/getmessage.py | mallusrgreatv2/PyHDISCORD | e414976441cbdb3a57b2c545ab164810bebe2e4b | [
"MIT"
] | null | null | null | import discord
import asyncio
async def GetMessage(
bot, ctx, contentOne="Default Message", contentTwo="\uFEFF", timeout=100
):
"""
This function sends an embed containing the params and then waits for a message to return
Params:
- bot (commands.Bot object) :
- ctx (context object) : Used for ... | 33.212121 | 93 | 0.62135 |
388ebdf6e86acaa0f5b78c940b556c48fadf55bd | 1,018 | py | Python | bflib/characters/racialclass/gnoll.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/characters/racialclass/gnoll.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/characters/racialclass/gnoll.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib import dice
from bflib import restrictions
from bflib.characters.classes.base import CharacterClass
from bflib.characters.classes.fighter import Fighter
from bflib.characters.classes.level import Level, LevelTable
from bflib.items.armor.lightarmor import LeatherArmor
class Gnoll(CharacterClass):
name =... | 31.8125 | 79 | 0.619843 |
388ebf9ac2db597461cb4a19e95448020f283752 | 214 | py | Python | lib/stages/death.py | brunitto/python-runner | 6d52feb45fb7b32a32a2c26324fb9345f5e9f330 | [
"MIT"
] | null | null | null | lib/stages/death.py | brunitto/python-runner | 6d52feb45fb7b32a32a2c26324fb9345f5e9f330 | [
"MIT"
] | 1 | 2017-04-12T15:16:20.000Z | 2017-04-12T15:16:20.000Z | lib/stages/death.py | brunitto/python-runner | 6d52feb45fb7b32a32a2c26324fb9345f5e9f330 | [
"MIT"
] | null | null | null | """death.py"""
from lib.stage import Stage
class Death(Stage):
"""Death stage"""
def desc(self):
"""Describe action"""
self.console.simulate_typing("YOU DIED! YOU SUCK!")
exit(1)
| 17.833333 | 59 | 0.584112 |
388ed25552818ecb8da8cf92d1fb3401087d1026 | 1,832 | py | Python | dynamic_programming/integer_partition.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | dynamic_programming/integer_partition.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | dynamic_programming/integer_partition.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''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, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 33.309091 | 116 | 0.651201 |
388efe7fa25417ccc52d80f825d2d712d0cb569a | 2,422 | py | Python | lepidoptera/migrations/0020_plantgenusobservation_plantspeciesobservation_substrateobservation.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2020-11-17T18:02:44.000Z | 2021-02-02T04:00:21.000Z | lepidoptera/migrations/0020_plantgenusobservation_plantspeciesobservation_substrateobservation.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2020-06-05T19:00:59.000Z | 2022-01-13T00:52:30.000Z | lepidoptera/migrations/0020_plantgenusobservation_plantspeciesobservation_substrateobservation.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # Generated by Django 2.0.13 on 2019-08-23 11:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('lepidoptera', '0019_first_populate_cached_binomial'),
]
operations = [
migrations.CreateModel(
... | 44.851852 | 156 | 0.592073 |
388f2b460ce6caf440414088cd49c6bf7000c6c9 | 51 | py | Python | pyEpiabm/pyEpiabm/tests/test_unit/__init__.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 11 | 2021-12-02T15:24:02.000Z | 2022-03-10T14:02:13.000Z | pyEpiabm/pyEpiabm/tests/test_unit/__init__.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 119 | 2021-11-24T13:56:48.000Z | 2022-03-30T11:52:07.000Z | pyEpiabm/pyEpiabm/tests/test_unit/__init__.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 3 | 2022-01-13T03:05:19.000Z | 2022-03-11T22:00:17.000Z | #
# Unit test subpackage for the pyEpiabm module
#
| 12.75 | 46 | 0.745098 |
388f783b34e6a53a0578749134ef4c610a262785 | 5,680 | py | Python | PPO_self_play.py | xc-liu/pacman-rl-agent | 5372f8c479b1a1f25132602978f9eb908fce774e | [
"Unlicense"
] | null | null | null | PPO_self_play.py | xc-liu/pacman-rl-agent | 5372f8c479b1a1f25132602978f9eb908fce774e | [
"Unlicense"
] | null | null | null | PPO_self_play.py | xc-liu/pacman-rl-agent | 5372f8c479b1a1f25132602978f9eb908fce774e | [
"Unlicense"
] | null | null | null | # myTeam.py
# ---------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
#
# At... | 39.172414 | 141 | 0.680634 |
388f8b8be0ee23651ab204efc51284a8d4e88f94 | 3,277 | py | Python | code/lib/clickparser/click_parser.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/lib/clickparser/click_parser.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/lib/clickparser/click_parser.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | #
# Copyright 2017 CNIT - Consorzio Nazionale Interuniversitario per le Telecomunicazioni
#
# 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/LICE... | 33.438776 | 92 | 0.623436 |
388fcad22944dc75b60487661c9d88e63d657c65 | 611 | py | Python | 01-Lesson-Plans/02-Python/3/Activities/04-Stu_Time_Value_of_Money/Unsolved/zero_coupon_bonds.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 01-Lesson-Plans/02-Python/3/Activities/04-Stu_Time_Value_of_Money/Unsolved/zero_coupon_bonds.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 01-Lesson-Plans/02-Python/3/Activities/04-Stu_Time_Value_of_Money/Unsolved/zero_coupon_bonds.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | # -*- coding: utf-8 -*-
"""
Zero-Coupon Bond Valuation.
This script will calculate the present value of zero-coupon bonds, compare the present value to the price of the bond, and determine the corresponding action (buy, not buy, neutral).
"""
# @TODO: Create a function to calculate present value
# In... | 16.513514 | 182 | 0.733224 |
389016af4f88ddbf799c1d87d48537a9d10335c8 | 1,942 | py | Python | ovh/__init__.py | lalmeras/python-ovh | e18b704dff7db3afb130fb74f28722ad535f894f | [
"BSD-3-Clause"
] | 237 | 2015-01-07T23:14:37.000Z | 2022-03-08T21:23:49.000Z | ovh/__init__.py | lalmeras/python-ovh | e18b704dff7db3afb130fb74f28722ad535f894f | [
"BSD-3-Clause"
] | 84 | 2015-03-05T11:09:35.000Z | 2022-03-15T12:18:18.000Z | ovh/__init__.py | lalmeras/python-ovh | e18b704dff7db3afb130fb74f28722ad535f894f | [
"BSD-3-Clause"
] | 79 | 2015-01-25T19:00:51.000Z | 2022-03-28T09:26:03.000Z | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2013-2018, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, t... | 47.365854 | 80 | 0.774974 |
3890294403ccf083f88ecec19d6ea1bae7759dfa | 815 | py | Python | dffml_operations_github/operations.py | pdxjohnny/dffml-operations-github | 574d3d6854ff7a789b4ca9b6d8948f2cdfdd6a84 | [
"MIT"
] | null | null | null | dffml_operations_github/operations.py | pdxjohnny/dffml-operations-github | 574d3d6854ff7a789b4ca9b6d8948f2cdfdd6a84 | [
"MIT"
] | null | null | null | dffml_operations_github/operations.py | pdxjohnny/dffml-operations-github | 574d3d6854ff7a789b4ca9b6d8948f2cdfdd6a84 | [
"MIT"
] | null | null | null | from typing import List
from dffml import op
from .api import GitHub, GitHubConfig
@op(
imp_enter={"github": lambda self: GitHub(self.config)},
ctx_enter={"gctx": lambda self: self.parent.github()},
config_cls=GitHubConfig,
)
async def github_issues(self, url: str) -> List[dict]:
return [
is... | 23.970588 | 61 | 0.645399 |
38902eac96076fdc29db5ef342ef7b1ca1cdc16d | 115 | py | Python | chapter2/oncodrivefm/oncodrivefm/__init__.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | 1 | 2015-12-22T00:53:18.000Z | 2015-12-22T00:53:18.000Z | chapter2/oncodrivefm/oncodrivefm/__init__.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | chapter2/oncodrivefm/oncodrivefm/__init__.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | VERSION = "0.7-dev"
AUTHORS = "Barcelona Biomedical Genomics research group"
CONTACT_EMAIL = "nuria.lopez@upf.edu"
| 28.75 | 56 | 0.765217 |
389036567f200234523a1468feb6c098c3ccbff4 | 384 | py | Python | store/memcache_proxy_store.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 27 | 2015-04-15T09:40:26.000Z | 2020-04-29T06:24:06.000Z | store/memcache_proxy_store.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 2 | 2015-06-03T20:19:51.000Z | 2015-06-30T20:40:14.000Z | store/memcache_proxy_store.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 10 | 2015-08-06T08:17:28.000Z | 2020-09-29T17:02:57.000Z | from biicode.server.utils.cache import MemCachedCollection
IP_ACCESSES = "ip"
class MemCacheProxyStore(object):
def __init__(self, store, cache_client):
self.store = store
self.cache_client = cache_client
self.ip_mc_collection = MemCachedCollection(cache_client, IP_ACCESSES)
def __... | 24 | 78 | 0.723958 |
389061cd1d3e038d314769bcacf1fae2a09da531 | 567 | py | Python | app/enquiries/migrations/0020_add_uk_to_region_choices.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | 3 | 2020-04-03T12:16:56.000Z | 2020-12-09T18:18:49.000Z | app/enquiries/migrations/0020_add_uk_to_region_choices.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | 173 | 2020-03-18T09:31:50.000Z | 2022-03-26T04:19:41.000Z | app/enquiries/migrations/0020_add_uk_to_region_choices.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-08-10 09:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('enquiries', '0019_reduce_validation_for_csv_input_fields'),
]
operations = [
migrations.AlterField(
model_name='enquiry',
... | 29.842105 | 208 | 0.606702 |
3890ff95ad8d5a7012d84105a662dfceacc8a8d6 | 728 | py | Python | desdeo_emo/surrogatemodelling/Problem.py | bonskotti/desdeo-emo | 6a607fa96478fd3c76394ac7b2dafdfd3c08eb2a | [
"MIT"
] | 1 | 2022-03-30T17:24:55.000Z | 2022-03-30T17:24:55.000Z | desdeo_emo/surrogatemodelling/Problem.py | bonskotti/desdeo-emo | 6a607fa96478fd3c76394ac7b2dafdfd3c08eb2a | [
"MIT"
] | null | null | null | desdeo_emo/surrogatemodelling/Problem.py | bonskotti/desdeo-emo | 6a607fa96478fd3c76394ac7b2dafdfd3c08eb2a | [
"MIT"
] | null | null | null | from desdeo_problem.Problem import ProblemBase, EvaluationResults
class surrogateProblem(ProblemBase):
def __init__(self, performance_evaluator):
super().__init__()
self.performance_evaluator = performance_evaluator
self.n_of_constraints = 0
self._max_multiplier = 1
self.ob... | 30.333333 | 65 | 0.717033 |
38916a19f145a471767c27729f79b4079cff81a4 | 2,279 | py | Python | toontown/ai/DistributedPolarBearMgr.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/ai/DistributedPolarBearMgr.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/ai/DistributedPolarBearMgr.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from direct.interval.IntervalGlobal import *
from toontown.effects import DustCloud
def getDustCloudIval(toon):
dustCloud = DustCloud.DustCloud(fBillboard=0)
dustCloud.setBillboardAxis(2.0)
dustCloud.setZ(3)... | 42.203704 | 105 | 0.715226 |
38916ace573dfe2083d8c41fadd661495f79e9d3 | 986 | py | Python | hs_core/migrations/0042_auto_20190402_1339.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_core/migrations/0042_auto_20190402_1339.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_core/migrations/0042_auto_20190402_1339.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-04-02 13:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hs_core', '0041_resourcefile__size'),
]
operations = [
migrations.AlterField(
model_name='relation',
... | 46.952381 | 623 | 0.658215 |
38916bbbbda909a8b96b8c7150f2308a9e04c6b0 | 270 | py | Python | diversity/MMO/basinhopping/python-lib/stdize.py | alexander-hagg/phdexperiments | 6506c8f2a438c67ca7c808df8715711fde73dfce | [
"MIT"
] | null | null | null | diversity/MMO/basinhopping/python-lib/stdize.py | alexander-hagg/phdexperiments | 6506c8f2a438c67ca7c808df8715711fde73dfce | [
"MIT"
] | null | null | null | diversity/MMO/basinhopping/python-lib/stdize.py | alexander-hagg/phdexperiments | 6506c8f2a438c67ca7c808df8715711fde73dfce | [
"MIT"
] | null | null | null | """
stdize.py
Operations on objects that convert them to a standard workable format.
"""
import numpy as np
def stdvec(x):
""" stdvec returns a 1D numpy array, given a list or 2d numpy array.
"""
x = np.asarray(x)
x = x.reshape(len(x),)
return x
| 18 | 72 | 0.640741 |
3891a7174df4b0cc25dd67823dfe387b90e83cf2 | 4,752 | py | Python | tests/h/links_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | tests/h/links_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | tests/h/links_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import mock
import pytest
from h import models
from h import links
class FakeAnnotation:
def __init__(self):
self.thread_root_id = "123"
self.references = None
self.target_uri = "http://example.com/foo/bar"
... | 29.515528 | 86 | 0.68771 |
3891d9a497987fbfbbc7a0535b6c5bf404c14d88 | 1,734 | py | Python | refiner/geometry.py | maxspencer/pdfrefiner | d2ff9ee83b10bbe8bb20c1adc189ca289afffc10 | [
"MIT"
] | 1 | 2016-06-14T11:41:57.000Z | 2016-06-14T11:41:57.000Z | refiner/geometry.py | maxspencer/pdfrefiner | d2ff9ee83b10bbe8bb20c1adc189ca289afffc10 | [
"MIT"
] | null | null | null | refiner/geometry.py | maxspencer/pdfrefiner | d2ff9ee83b10bbe8bb20c1adc189ca289afffc10 | [
"MIT"
] | null | null | null | class Box(object):
def __init__(self, left, top, width = 0, height = 0, page = None, right = None, bottom = None):
self.left = left
self.top = top
self.page = page
if right is not None:
self.width = right - left
else:
self.width = width
if bo... | 25.880597 | 99 | 0.519608 |
3891e18d35f0c73c503dbec1b729a86f1c40fd49 | 42,798 | py | Python | polymaze/shapes.py | kobejohn/polymaze | c7ac6049bef547f032c353c5c50e8ead95954a33 | [
"MIT"
] | 21 | 2015-02-09T17:36:36.000Z | 2021-06-01T19:58:59.000Z | polymaze/shapes.py | kobejohn/polymaze | c7ac6049bef547f032c353c5c50e8ead95954a33 | [
"MIT"
] | 1 | 2017-01-12T13:52:07.000Z | 2017-01-12T13:52:07.000Z | polymaze/shapes.py | kobejohn/polymaze | c7ac6049bef547f032c353c5c50e8ead95954a33 | [
"MIT"
] | 4 | 2017-12-07T15:18:19.000Z | 2021-06-01T19:59:20.000Z | import inspect
import math
import random
import sys
def supershapes_dict():
"""Return a dict of all supershapes in this module keyed by name."""
current_module = sys.modules[__name__]
supershapes = dict()
for name, obj in inspect.getmembers(current_module):
try:
if issubclass(obj, ... | 47.34292 | 80 | 0.47834 |
3891ed41b236efc2f945b7d7e001768bb8152579 | 12,582 | py | Python | src/compas/geometry/_primitives/quaternion.py | shervinazadi/compas | a3f5a0dd59247b6b6cdac3f14a45f9ff414f44b3 | [
"MIT"
] | 2 | 2021-03-17T18:14:22.000Z | 2021-09-19T13:50:02.000Z | src/compas/geometry/_primitives/quaternion.py | shervinazadi/compas | a3f5a0dd59247b6b6cdac3f14a45f9ff414f44b3 | [
"MIT"
] | null | null | null | src/compas/geometry/_primitives/quaternion.py | shervinazadi/compas | a3f5a0dd59247b6b6cdac3f14a45f9ff414f44b3 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import math
from compas.geometry import quaternion_multiply
from compas.geometry import quaternion_conjugate
from compas.geometry import quaternion_unitize
from compas.geometry import quaternion_canonize
from ... | 26.713376 | 126 | 0.503974 |
3891f652a9f80591fb295fa06ef23f34a30076a4 | 45,531 | py | Python | aslprep/workflows/asl/base.py | lawlessrd/aslprep | 22ec61f482cc3561f4fd35d769af0fe8bc2e80cb | [
"BSD-3-Clause"
] | 2 | 2022-03-18T18:31:12.000Z | 2022-03-18T18:31:26.000Z | aslprep/workflows/asl/base.py | kha-dija1/aslprep | ce1ed4a8fa23f64aaa7d6bb0977582586e6a7039 | [
"BSD-3-Clause"
] | null | null | null | aslprep/workflows/asl/base.py | kha-dija1/aslprep | ce1ed4a8fa23f64aaa7d6bb0977582586e6a7039 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Orchestrating the ASL-preprocessing workflow
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: init_asl_preproc_wf
.. autofunction:: init_asl_derivatives_wf
"""
from ... import config
i... | 44.638235 | 112 | 0.575037 |
3891f9134ad9686bb7247ec103e6b834dd3f5434 | 6,705 | py | Python | quartic_sdk/core/entities/tag.py | Quarticai/QuarticSDK | 443b2a35c0e0c6ee9eb3f9d073b7108e0b61f0d4 | [
"MIT"
] | 1 | 2021-03-26T12:39:44.000Z | 2021-03-26T12:39:44.000Z | quartic_sdk/core/entities/tag.py | Quarticai/QuarticSDK | 443b2a35c0e0c6ee9eb3f9d073b7108e0b61f0d4 | [
"MIT"
] | 95 | 2021-02-18T03:15:38.000Z | 2022-03-25T05:39:12.000Z | quartic_sdk/core/entities/tag.py | Quarticai/QuarticSDK | 443b2a35c0e0c6ee9eb3f9d073b7108e0b61f0d4 | [
"MIT"
] | 1 | 2021-09-03T12:46:18.000Z | 2021-09-03T12:46:18.000Z | """
The given file contains the class to refer to the tag entity
"""
from quartic_sdk.core.entities.base import Base
import quartic_sdk.utilities.constants as Constants
from quartic_sdk.core.iterators.tag_data_iterator import TagDataIterator
from quartic_sdk.utilities.exceptions import IncorrectTagParameterException,In... | 46.241379 | 147 | 0.650559 |
3892524c8d580c30b8382460b260f3a4647ed6ca | 3,750 | py | Python | tests/test_migrator.py | RedNu11/peewee_migrate2 | f35ec40bc57088461a43aa5910dc9d85df83b662 | [
"BSD-3-Clause"
] | null | null | null | tests/test_migrator.py | RedNu11/peewee_migrate2 | f35ec40bc57088461a43aa5910dc9d85df83b662 | [
"BSD-3-Clause"
] | null | null | null | tests/test_migrator.py | RedNu11/peewee_migrate2 | f35ec40bc57088461a43aa5910dc9d85df83b662 | [
"BSD-3-Clause"
] | null | null | null | from unittest import mock
import pytest
@pytest.fixture()
def _mock_connection():
"""Monkey patch psycopg2 connect"""
import psycopg2
from .mocks import postgres
with mock.patch.object(psycopg2, 'connect', postgres.MockConnection):
yield
def test_migrator():
import peewee as pw
fro... | 28.846154 | 101 | 0.696267 |
389264825cfe5ab0f8da92cbf65377fa5012699f | 1,150 | py | Python | services/traction/api/db/models/base.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/api/db/models/base.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/api/db/models/base.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | import uuid
from datetime import datetime
from typing import Optional
import pydantic
from sqlmodel import Field, SQLModel
from sqlalchemy import Column, func, text
from sqlalchemy.dialects.postgresql import UUID, TIMESTAMP
class BaseSchema(pydantic.BaseModel):
class Config(pydantic.BaseModel.Config):
or... | 29.487179 | 86 | 0.694783 |
3892684c887a45ec11ecc9541aeca7c6de30c2ad | 1,652 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/st7789_tft_gizmo_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/st7789_tft_gizmo_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/st7789_tft_gizmo_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
This test will initialize the display using displayio and draw a solid green
background, a smaller purple rectangle, and some yellow text.
"""
import board
import busio
import terminalio
import displayio
from adafruit_dis... | 27.081967 | 87 | 0.776634 |
38926d9e57b878692f826facb474cc4e9e7fcfbb | 37,248 | py | Python | ost/s1_to_ard/grd_to_ard.py | Scartography/OpenSarToolkit | 53c19e1c6c21260e73518eb9106ce7305539a83d | [
"MIT"
] | null | null | null | ost/s1_to_ard/grd_to_ard.py | Scartography/OpenSarToolkit | 53c19e1c6c21260e73518eb9106ce7305539a83d | [
"MIT"
] | null | null | null | ost/s1_to_ard/grd_to_ard.py | Scartography/OpenSarToolkit | 53c19e1c6c21260e73518eb9106ce7305539a83d | [
"MIT"
] | null | null | null | '''
Based on a reduced set of processing parameters, this script allows to
produce Sentinel-1 backscatter ARD data from GRD products.
The script allows to process consecutive frames from one acquisition and
outputs a single file.
----------------
Functions:
----------------
_slice_assembly:
creates an url... | 35.440533 | 89 | 0.577883 |
3892897e43bb0c4408e87475c835256f7aa078bc | 28,215 | py | Python | pandas/tseries/frequencies.py | hhuuggoo/pandas | f87ab95c2ecd1be6a3e3acec8f5d81e7f3c8e4bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 26 | 2018-02-14T23:52:58.000Z | 2021-08-16T13:50:03.000Z | pandas/tseries/frequencies.py | hhuuggoo/pandas | f87ab95c2ecd1be6a3e3acec8f5d81e7f3c8e4bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/tseries/frequencies.py | hhuuggoo/pandas | f87ab95c2ecd1be6a3e3acec8f5d81e7f3c8e4bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 10 | 2018-08-13T19:38:39.000Z | 2020-04-19T03:02:00.000Z | from datetime import datetime
from pandas.compat import range, long, zip
from pandas import compat
import re
import numpy as np
from pandas.core.algorithms import unique
from pandas.tseries.offsets import DateOffset
from pandas.util.decorators import cache_readonly
import pandas.tseries.offsets as offsets
import pand... | 27.580645 | 78 | 0.550735 |
38929cc0f0eaddfb19e06e07324365910a2fc071 | 1,398 | py | Python | setup.py | acdh-oeaw/acdh_abbr_client | 58d3cf3d8f9d5b2b5988384ff4e50c2ce98f9430 | [
"MIT"
] | null | null | null | setup.py | acdh-oeaw/acdh_abbr_client | 58d3cf3d8f9d5b2b5988384ff4e50c2ce98f9430 | [
"MIT"
] | null | null | null | setup.py | acdh-oeaw/acdh_abbr_client | 58d3cf3d8f9d5b2b5988384ff4e50c2ce98f9430 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=7.0',
'requests==2.25.0',
]
setup_requireme... | 26.377358 | 79 | 0.656652 |
3892bec6ebec99ddada4b9797195377e09bc47fa | 1,038 | py | Python | tests/test_api_hook.py | maralla/folklore | 851aded3db130a84d3a9c1bb581cdaad12e5b5a1 | [
"MIT"
] | null | null | null | tests/test_api_hook.py | maralla/folklore | 851aded3db130a84d3a9c1bb581cdaad12e5b5a1 | [
"MIT"
] | null | null | null | tests/test_api_hook.py | maralla/folklore | 851aded3db130a84d3a9c1bb581cdaad12e5b5a1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import mock
def test_api_called():
ctx = type('_ctx', (object,), {})
ctx.conf = {}
ctx.logger = mock.Mock()
ctx.end_at = 10
ctx.start_at = 5
ctx.args = (4, 'hello')
ctx.kwargs = {'name': 'sarah'}
ctx.api_name = 'ping_api'
from folklore.hook.api import api_... | 29.657143 | 67 | 0.638728 |
3892c0877416988251b5ed3158a958943ea97c4c | 344 | py | Python | miapy/miapy/plotting/__init__.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | 1 | 2022-02-11T18:49:34.000Z | 2022-02-11T18:49:34.000Z | miapy/miapy/plotting/__init__.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | null | null | null | miapy/miapy/plotting/__init__.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | null | null | null | """
========================================
Image plotting (:mod:`plotting` package)
========================================
This package facilitates the plotting of images for presentation and documentation purposes.
Plotting (:mod:`plotting.plotter`)
----------------------------------
.. automodule:: plotting.pl... | 24.571429 | 92 | 0.491279 |
3892ca705c9147b3386c9bb05a1af0866eebee5b | 32,019 | py | Python | antarest/study/storage/variantstudy/variant_study_service.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2021-11-15T09:26:33.000Z | 2022-02-24T09:53:54.000Z | antarest/study/storage/variantstudy/variant_study_service.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/variantstudy/variant_study_service.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | import json
import logging
import shutil
import time
from datetime import datetime
from pathlib import Path
from typing import List, Optional, cast, Dict, Union
from uuid import uuid4
import dataclasses
from fastapi import HTTPException
from filelock import FileLock # type: ignore
from antarest.core.config import Co... | 33.009278 | 145 | 0.596365 |
3892d09fc5f18c840095b10c206eb81704ca78ae | 8,068 | py | Python | benchmarks/benchmarks.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 986 | 2017-06-07T07:33:01.000Z | 2022-03-31T13:00:46.000Z | benchmarks/benchmarks.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2,623 | 2017-06-07T18:29:11.000Z | 2022-03-31T20:27:31.000Z | benchmarks/benchmarks.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 238 | 2017-06-26T19:02:58.000Z | 2022-03-31T15:18:29.000Z | import numpy as np
import pandas as pd
import ibis
import ibis.expr.datatypes as dt
from ibis.backends.pandas.udf import udf
def make_t(name='t'):
return ibis.table(
(
('_timestamp', 'int32'),
('dim1', 'int32'),
('dim2', 'int32'),
('valid_seconds', 'int32')... | 28.408451 | 77 | 0.568171 |
38930ad36e1097e68688d871511e96267a746047 | 13,917 | py | Python | oscar/lib/python2.7/site-packages/psycopg2/errorcodes.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/psycopg2/errorcodes.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/psycopg2/errorcodes.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Error codes for PostgresSQL
This module contains symbolic names for all PostgreSQL error codes.
"""
# psycopg2/errorcodes.py - PostgreSQL error codes
#
# Copyright (C) 2006-2010 Johan Dahlin <jdahlin@async.com.br>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of... | 32.440559 | 74 | 0.778401 |
389323d77f0587b02c4d65d776033cf8f277d546 | 5,228 | py | Python | tests/moduleregistry/test_moduleregistry.py | ygversil/jenkins_job_builder | 58a69e51ee51edc8eebe0db86eef93f032d231da | [
"Apache-2.0"
] | null | null | null | tests/moduleregistry/test_moduleregistry.py | ygversil/jenkins_job_builder | 58a69e51ee51edc8eebe0db86eef93f032d231da | [
"Apache-2.0"
] | null | null | null | tests/moduleregistry/test_moduleregistry.py | ygversil/jenkins_job_builder | 58a69e51ee51edc8eebe0db86eef93f032d231da | [
"Apache-2.0"
] | null | null | null | import pkg_resources
from six.moves import configparser
from six.moves import StringIO
from testscenarios.testcase import TestWithScenarios
import testtools as tt
from testtools.content import text_content
from jenkins_jobs import cmd
from jenkins_jobs.registry import ModuleRegistry
from tests.base import LoggingFixt... | 42.16129 | 79 | 0.623757 |
3893252166778daa8d608304cda027273b30a3f5 | 3,947 | py | Python | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2021_06_30_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2021_06_30_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2021_06_30_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 ... | 36.546296 | 94 | 0.784647 |
38935667d6a66a8d28cb1c3b73751906031077c4 | 24,274 | py | Python | SCRAPE/Lib/site-packages/scrapy/core/downloader/handlers/http11.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 3 | 2016-05-08T18:26:40.000Z | 2019-06-13T15:05:22.000Z | scrapy/core/downloader/handlers/http11.py | sasuke007/scrapy | b04cfa48328d5d5749dca6f50fa34e0cfc664c89 | [
"BSD-3-Clause"
] | 13 | 2021-01-14T17:29:55.000Z | 2021-12-16T19:05:44.000Z | scrapy/core/downloader/handlers/http11.py | sasuke007/scrapy | b04cfa48328d5d5749dca6f50fa34e0cfc664c89 | [
"BSD-3-Clause"
] | 1 | 2021-05-26T06:05:59.000Z | 2021-05-26T06:05:59.000Z | """Download handlers for http and https schemes"""
import ipaddress
import logging
import re
import warnings
from contextlib import suppress
from io import BytesIO
from time import time
from urllib.parse import urldefrag, urlunparse
from twisted.internet import defer, protocol, ssl
from twisted.internet.endpoints imp... | 41.003378 | 105 | 0.633311 |
389377faf0d3d1016d503c640a64554dec3559dd | 400 | py | Python | panda_prospecting/users/urls.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | null | null | null | panda_prospecting/users/urls.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | 10 | 2017-06-09T18:47:26.000Z | 2019-11-28T15:53:48.000Z | panda_prospecting/users/urls.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | null | null | null | """Defines URL patterns for users"""
from django.conf.urls import url
from django.contrib.auth import login
from . import views
urlpatterns = [
# Login page
url(r'^login/$', login, {'template_name': 'users/login.html'}, name='login'),
# Logout
url(r'^logout/$', views.logout_view, name='logout'),
... | 25 | 81 | 0.6625 |
3893808a270f987a0f0211019006df736f17fb1f | 12,290 | py | Python | feincms/extensions/translations.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 17 | 2015-03-11T09:57:21.000Z | 2019-09-03T11:11:45.000Z | feincms/extensions/translations.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | null | null | null | feincms/extensions/translations.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 3 | 2015-07-07T06:33:11.000Z | 2020-01-29T15:45:49.000Z | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
"""
This extension adds a language field to every page. When calling the request
processors the page's language is activated.
Pages in secondary languages... | 38.892405 | 88 | 0.583889 |
38939c25512ef520c3961a07664618f284244cb9 | 3,000 | py | Python | src/ftd/constraint.py | FabienTaxil/ftd | a36e0ca59eb60e216a5de1eb93d1089a7f080ec7 | [
"MIT"
] | 3 | 2022-01-26T23:43:16.000Z | 2022-02-11T07:50:49.000Z | src/ftd/constraint.py | lixaft/ftd | a36e0ca59eb60e216a5de1eb93d1089a7f080ec7 | [
"MIT"
] | null | null | null | src/ftd/constraint.py | lixaft/ftd | a36e0ca59eb60e216a5de1eb93d1089a7f080ec7 | [
"MIT"
] | null | null | null | """Provide utilities related to constraints."""
import itertools
import logging
from maya import cmds
from maya.api import OpenMaya
__all__ = ["matrix"]
LOG = logging.getLogger(__name__)
def matrix(driver, driven, offset=False, srt="srt"):
"""Constraint two node using matrix nodes.
Examples:
>>> f... | 34.883721 | 78 | 0.638 |
3893a5dd87b5bc0b67c26186cd10d0138652face | 4,973 | py | Python | gaphor/diagram/interactions/interactionspropertypages.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/diagram/interactions/interactionspropertypages.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/diagram/interactions/interactionspropertypages.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | from gi.repository import Gtk
from gaphor import UML
from gaphor.core import _, transactional
from gaphor.diagram.propertypages import (
PropertyPages,
NamedItemPropertyPage,
EditableTreeModel,
create_hbox_label,
create_tree_view,
create_uml_combo,
)
from gaphor.diagram.interactions import Mess... | 32.083871 | 84 | 0.611703 |
3893f3251f3564fa3941ebe75919a10908a113ef | 600 | py | Python | stests/core/mq/brokers/redis.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 4 | 2020-03-10T15:28:17.000Z | 2021-10-02T11:41:17.000Z | stests/core/mq/brokers/redis.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 1 | 2020-03-25T11:31:44.000Z | 2020-03-25T11:31:44.000Z | stests/core/mq/brokers/redis.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 9 | 2020-02-25T18:43:42.000Z | 2021-08-10T17:08:42.000Z | from dramatiq.brokers.redis import RedisBroker
from stests.core.utils import env
# Environment variables required by this module.
class EnvVars:
# Redis host.
DB = env.get_var('BROKER_REDIS_DB', 0, int)
# Redis protocol.
HOST = env.get_var('BROKER_REDIS_HOST', "localhost")
# Redis port.
PO... | 20 | 56 | 0.646667 |
3893fdeed4fa39f390d0ec10f0d87d5169aeb1cd | 894 | py | Python | build/toolchain/win/copy_msdia.py | uazo/goma-client | 1cffeb7978539ac2fee02257ca0a95a05b4c6cc0 | [
"BSD-3-Clause"
] | 4 | 2018-12-26T10:54:24.000Z | 2022-03-31T21:19:47.000Z | build/toolchain/win/copy_msdia.py | uazo/goma-client | 1cffeb7978539ac2fee02257ca0a95a05b4c6cc0 | [
"BSD-3-Clause"
] | null | null | null | build/toolchain/win/copy_msdia.py | uazo/goma-client | 1cffeb7978539ac2fee02257ca0a95a05b4c6cc0 | [
"BSD-3-Clause"
] | 1 | 2021-05-31T13:27:25.000Z | 2021-05-31T13:27:25.000Z | # Copyright (c) 2019 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 os
import shutil
import sys
sys.path.insert(0, os.path.join(
os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir))
import vs_t... | 26.294118 | 79 | 0.741611 |
389418e21bc77d5dea06e66e7a074d485850688b | 3,462 | py | Python | src/fortrace/core/winadminagent.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:01:51.000Z | 2022-03-31T14:01:51.000Z | src/fortrace/core/winadminagent.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | null | null | null | src/fortrace/core/winadminagent.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:02:30.000Z | 2022-03-31T14:02:30.000Z | # Copyright (C) 2017 Sascha Kopp
# This file is part of fortrace - http://fortrace.fbi.h-da.de
# See the file 'docs/LICENSE' for copying permission.
from __future__ import absolute_import
import platform
if platform.system() == "Windows":
from fortrace.utility.winmessagepipe import WinMessagePipe
from fortrace... | 37.225806 | 116 | 0.560659 |
38943353aa43b95fd17a3011e55077c2152df3a0 | 3,934 | py | Python | example/scenario_analysis.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | example/scenario_analysis.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | example/scenario_analysis.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import functools
from pathlib import Path
import warnings
import covsirphy as cs
def main():
warnings.simplefilter("error")
# Create output directory in example directory
code_path = Path(__file__)
input_dir = code_path.parent.with_name("input")
outpu... | 35.441441 | 79 | 0.672089 |
3894340870f64d3880ceb63ba80b76e0a82e9700 | 10,278 | py | Python | exatrkx/scripts/eval_reco_trkx.py | sbconlon/exatrkx-iml2020 | 5101a3bae5a15e8e0557837a8d0b9fd9e122a026 | [
"Apache-2.0"
] | 6 | 2020-10-27T21:42:27.000Z | 2021-04-18T02:06:30.000Z | exatrkx/scripts/eval_reco_trkx.py | sbconlon/exatrkx-iml2020 | 5101a3bae5a15e8e0557837a8d0b9fd9e122a026 | [
"Apache-2.0"
] | null | null | null | exatrkx/scripts/eval_reco_trkx.py | sbconlon/exatrkx-iml2020 | 5101a3bae5a15e8e0557837a8d0b9fd9e122a026 | [
"Apache-2.0"
] | 6 | 2020-11-04T23:45:10.000Z | 2021-03-26T09:06:00.000Z | #!/usr/bin/env python
import os
import math
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import glob
import itertools
from multiprocessing import Pool
from functools import partial
import time
from trackml.dataset import load_event
from trackml.score import _analyze_tracks, score_event
from ... | 44.301724 | 120 | 0.65937 |
389438782653795d7d4913a18b3a43204946d943 | 160 | py | Python | pyfite/_tests/__init__.py | Seongioi/pyfite | 8e0b08b915e96692617d6302565a8c7c882a96cd | [
"MIT"
] | null | null | null | pyfite/_tests/__init__.py | Seongioi/pyfite | 8e0b08b915e96692617d6302565a8c7c882a96cd | [
"MIT"
] | 2 | 2021-04-16T03:01:06.000Z | 2021-04-16T16:02:01.000Z | pyfite/_tests/__init__.py | Seongioi/pyfite | 8e0b08b915e96692617d6302565a8c7c882a96cd | [
"MIT"
] | 4 | 2020-05-27T19:41:56.000Z | 2021-03-24T14:31:55.000Z | # __init__.py
# Copyright (c) 2020 Applied Research Associates, Inc.
# SPDX-License-Identifier: https://spdx.org/licenses/MIT.html
"""Unit tests for pyfite
"""
| 26.666667 | 61 | 0.7375 |
38944176fa3d6444a5d4545dd7c84fbbcb394075 | 3,341 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_configuration.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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.42029 | 172 | 0.698593 |
389458cbcdec3d7b5995a724bd0bf8f71f1c9501 | 11,217 | py | Python | res/models/LATE_BRANCHING_COMBINED_ONE_FOURTH.py | GregoryEHunter/generalization_to_OOD_category_viewpoint_combinations | 52aacbb3420639cae64ce65085c17b245e5ef865 | [
"MIT"
] | 10 | 2022-02-21T17:15:18.000Z | 2022-03-19T16:06:40.000Z | res/models/LATE_BRANCHING_COMBINED_ONE_FOURTH.py | GregoryEHunter/generalization_to_OOD_category_viewpoint_combinations | 52aacbb3420639cae64ce65085c17b245e5ef865 | [
"MIT"
] | null | null | null | res/models/LATE_BRANCHING_COMBINED_ONE_FOURTH.py | GregoryEHunter/generalization_to_OOD_category_viewpoint_combinations | 52aacbb3420639cae64ce65085c17b245e5ef865 | [
"MIT"
] | 1 | 2021-12-29T16:23:46.000Z | 2021-12-29T16:23:46.000Z | import torch
import torch.nn as nn
def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=dilation, groups=groups, bias=False, dilation=dilation)
def conv1x1(in_... | 35.384858 | 106 | 0.584292 |
38947f86d8c688cabde2d7dade4a0a627f805cb0 | 5,649 | py | Python | people/models.py | allink/allink-apps | 101a9e2e0129d932970e0ae89f790d2033a7c805 | [
"BSD-3-Clause"
] | 1 | 2017-03-13T08:49:49.000Z | 2017-03-13T08:49:49.000Z | people/models.py | allink/allink-apps | 101a9e2e0129d932970e0ae89f790d2033a7c805 | [
"BSD-3-Clause"
] | null | null | null | people/models.py | allink/allink-apps | 101a9e2e0129d932970e0ae89f790d2033a7c805 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.db import models
from djangocms_text_ckeditor.fields import HTMLField
from filer.fields.image import FilerImageField
from cms.models.fields import PlaceholderField
from adminsortable.fields import SortableForeignKey
from parler... | 31.735955 | 159 | 0.627368 |
3894eda25c88a3195b9ddbd94a75bcd2d2dfcf49 | 7,491 | py | Python | tests/test_ops_matmul.py | bergtholdt/ngraph-onnx | 122de3d6c2a6f7f6e24ff2f8a5551b5465c618f6 | [
"Apache-2.0"
] | null | null | null | tests/test_ops_matmul.py | bergtholdt/ngraph-onnx | 122de3d6c2a6f7f6e24ff2f8a5551b5465c618f6 | [
"Apache-2.0"
] | null | null | null | tests/test_ops_matmul.py | bergtholdt/ngraph-onnx | 122de3d6c2a6f7f6e24ff2f8a5551b5465c618f6 | [
"Apache-2.0"
] | null | null | null | # ******************************************************************************
# Copyright 2018 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.o... | 40.934426 | 96 | 0.636097 |
389562f1962285cbf3a85e2a745a9bef76cfd3fe | 12,497 | py | Python | openpnm/network/Cubic.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | 1 | 2020-11-20T06:14:34.000Z | 2020-11-20T06:14:34.000Z | openpnm/network/Cubic.py | yushun9897/OpenPNM | 031894a53650c3193d767b0460c8ea2e66799825 | [
"MIT"
] | null | null | null | openpnm/network/Cubic.py | yushun9897/OpenPNM | 031894a53650c3193d767b0460c8ea2e66799825 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
===============================================================================
Cubic: Generate lattice-like networks
===============================================================================
"""
import numpy as np
from openpnm.network import GenericNetwork
from openpnm import topotoo... | 37.528529 | 83 | 0.54261 |
3895824cb6c5eaa3da3ef837652add042b73dc6a | 1,785 | py | Python | ai_ml_projects/masters_courses/nlp/lappinleasse.py | 5aurabhpathak/src | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | 1 | 2021-07-07T06:51:18.000Z | 2021-07-07T06:51:18.000Z | ai_ml_projects/masters_courses/nlp/lappinleasse.py | 5aurabhpathak/all-I-ve-done | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | null | null | null | ai_ml_projects/masters_courses/nlp/lappinleasse.py | 5aurabhpathak/all-I-ve-done | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | 1 | 2020-08-11T09:53:22.000Z | 2020-08-11T09:53:22.000Z | #Plugin routines for Lappin and Leasse algorithm
#Author: Saurabh Pathak
from classes import Entity, ispleonastic
from nltk.tree import ParentedTree
def halve():
global entitySet
entitySet = {entity for entity in entitySet if entity.salience != 0}
for entity in entitySet: entity.salience //= 2
entitySet =... | 40.568182 | 106 | 0.5507 |
38958714af32a68be181cbfb099a02efa53b2f77 | 8,438 | py | Python | base/constructor.py | High-East/BCI-ToolBox | 57015ae5fd008e8636889b9afba49c64c3a35ff3 | [
"MIT"
] | 10 | 2022-01-09T02:35:54.000Z | 2022-03-22T06:18:06.000Z | base/constructor.py | High-East/BCI-ToolBox | 57015ae5fd008e8636889b9afba49c64c3a35ff3 | [
"MIT"
] | null | null | null | base/constructor.py | High-East/BCI-ToolBox | 57015ae5fd008e8636889b9afba49c64c3a35ff3 | [
"MIT"
] | null | null | null | import os
import sys
import shutil
import argparse
from functools import (
wraps,
partial
)
import random
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import mne
import braindecode
import wandb
from utils.utils import (
make_dir,
read_yaml,
AttrDict,
Color,
write_js... | 30.683636 | 110 | 0.599076 |
38958c2bf2beb23a528a544fa984a553cdd2fef7 | 1,026 | py | Python | PythonNetCode/chapter3/3_6_find_network_interface_status.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter3/3_6_find_network_interface_status.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter3/3_6_find_network_interface_status.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Python Network Programming Cookbook -- Chapter - 3
# This program is optimized for Python 2.7.
# It may run on any other version with/without modifications.
import argparse
import socket
import struct
import fcntl
import nmap
SAMPLE_PORTS = '21-23'
def get_interface_status(ifname):
sock... | 29.314286 | 81 | 0.679337 |
3895931d3a31ca5a77c515af6f37f24f741b9ea7 | 42,106 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/aio/operations/_storage_accounts_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/aio/operations/_storage_accounts_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/aio/operations/_storage_accounts_operations.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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.310112 | 405 | 0.685294 |
389599f7bd8f4a69dc6f659f6d2c36a5bc5b19e5 | 564 | py | Python | activation.py | polowis/neatevo | 165bbf81b2f55a85c945aed9cc6a817ee51ad476 | [
"MIT"
] | null | null | null | activation.py | polowis/neatevo | 165bbf81b2f55a85c945aed9cc6a817ee51ad476 | [
"MIT"
] | null | null | null | activation.py | polowis/neatevo | 165bbf81b2f55a85c945aed9cc6a817ee51ad476 | [
"MIT"
] | null | null | null | import math
class Activation:
@staticmethod
def sigmoid(x):
return (1 / (1 + math.exp(-x)))
@staticmethod
def relu(x):
if (x > 0):
return x
else:
return 0
@staticmethod
def tanh(x):
return math.tanh(x)
@staticmethod
def... | 16.588235 | 49 | 0.471631 |
3895a2f3a488a624a9ab03b4b5fde15f7cbb9f48 | 899 | py | Python | hs_tools_resource/migrations/0003_auto_20150724_1501.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_tools_resource/migrations/0003_auto_20150724_1501.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_tools_resource/migrations/0003_auto_20150724_1501.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | # -*- coding: utf-8 -*-
from django.db import models, migrations
from django.conf import settings
import hs_core.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
('sites', '0001_initial'),
('pages', '__first__'),
migrations.swappable_depen... | 25.685714 | 66 | 0.552836 |
3895aa725f835fc9f69129a5dfda6379f9b67340 | 6,959 | py | Python | trainer.py | lorefx/TF-Playground | c5249ece1186d38acc30f4fcffe84b8065d39683 | [
"MIT"
] | null | null | null | trainer.py | lorefx/TF-Playground | c5249ece1186d38acc30f4fcffe84b8065d39683 | [
"MIT"
] | null | null | null | trainer.py | lorefx/TF-Playground | c5249ece1186d38acc30f4fcffe84b8065d39683 | [
"MIT"
] | null | null | null | """
This module will provide a base class for a trainer.
A trainer provides all facilites to configure, run and collect
performances for a network
"""
from matplotlib import pyplot as plt
import tensorflow as tf
class Trainer(object):
"""
A trainer provides all facilites to configure, run and collect
per... | 31.206278 | 145 | 0.627102 |
3895c1ead7ee923f4a2c90142291c2dd2bf338df | 6,564 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_job.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_job.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_job.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Job... | 29.701357 | 295 | 0.591712 |
3895f7f6c8ff95d99963fa41ffe86ee9609b8898 | 1,550 | py | Python | Main Task_MSI-H classification/efficientnet_pytorch/chkpts.py | ChangHeeHAN/PAIP2020 | e42731ed2824f9f4a2e4a30f029dfea0f9efd25c | [
"MIT"
] | 1 | 2021-11-08T03:36:50.000Z | 2021-11-08T03:36:50.000Z | Main Task_MSI-H classification/efficientnet_pytorch/chkpts.py | chhan95/PAIP2020 | e42731ed2824f9f4a2e4a30f029dfea0f9efd25c | [
"MIT"
] | 1 | 2021-01-26T18:37:11.000Z | 2021-01-27T07:35:11.000Z | Main Task_MSI-H classification/efficientnet_pytorch/chkpts.py | chhan95/PAIP2020 | e42731ed2824f9f4a2e4a30f029dfea0f9efd25c | [
"MIT"
] | null | null | null | import torch
import warnings
def detach_variable(inputs):
if isinstance(inputs, tuple):
out = []
for inp in inputs:
x = inp.detach()
x.requires_grad = inp.requires_grad
out.append(x)
return tuple(out)
else:
raise RuntimeError(
"On... | 35.227273 | 109 | 0.640645 |
3895f94ddf6f2db3f33ae9a6d97987c6a6410542 | 7,596 | py | Python | datasets/prepare_cocofied_lvis.py | superclass-FSIS/test | 9bb2844c77704a609291135b75e94a794f235aa0 | [
"Apache-2.0"
] | 196 | 2020-03-10T03:34:47.000Z | 2022-03-29T11:40:16.000Z | datasets/prepare_cocofied_lvis.py | superclass-FSIS/test | 9bb2844c77704a609291135b75e94a794f235aa0 | [
"Apache-2.0"
] | 19 | 2020-03-11T05:32:28.000Z | 2022-03-12T00:18:42.000Z | datasets/prepare_cocofied_lvis.py | superclass-FSIS/test | 9bb2844c77704a609291135b75e94a794f235aa0 | [
"Apache-2.0"
] | 19 | 2020-03-12T02:41:04.000Z | 2021-12-29T11:17:08.000Z | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import json
import copy
import os
from collections import defaultdict
# This mapping is extracted from the official LVIS mapping:
# https://github.com/lvis-dataset/lvis-api/blob/master/data/coco_to_synset.json
COCO_SYNSET_... | 42.915254 | 99 | 0.612691 |
3895fa32ab56e1b64c93aa4fff370cedee4e3bcb | 963 | py | Python | tests/extract_party_name_test.py | SamTheisens/kawalc1 | c0189c04d130680e51ca4396794c735bd51cf258 | [
"MIT"
] | 14 | 2019-04-07T08:04:15.000Z | 2019-11-03T08:27:51.000Z | tests/extract_party_name_test.py | kawalc1/kawalc1 | 6963f7f3f93e7ab897dfcda265c9dd3b12433f18 | [
"MIT"
] | 22 | 2019-03-25T05:27:12.000Z | 2020-08-17T22:13:19.000Z | tests/extract_party_name_test.py | kawalc1/kawalc1 | 6963f7f3f93e7ab897dfcda265c9dd3b12433f18 | [
"MIT"
] | 1 | 2019-04-07T16:18:33.000Z | 2019-04-07T16:18:33.000Z | import unittest
from mengenali.io import read_image
from mengenali.partyclassifier import detect_party
from tests import setup_django_settings
class PartyMatchTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
setup_django_settings()
def assert_most_similar(self, party_file, expected_re... | 34.392857 | 92 | 0.753894 |
3895fde72e68f6f6e3893bb2be9c05c6a4a323bf | 95 | py | Python | fakolibri/statiksite/apps.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | fakolibri/statiksite/apps.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | fakolibri/statiksite/apps.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class StatiksiteConfig(AppConfig):
name = 'statiksite'
| 15.833333 | 34 | 0.768421 |
38961eeb61aad98efa2d1680a38a454b54242cc0 | 16,307 | py | Python | applications/diario_obra/languages/pt.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/diario_obra/languages/pt.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/diario_obra/languages/pt.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
{
'!langcode!': 'pt',
'!langname!': 'Português',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN',
'%s %%{ro... | 50.642857 | 279 | 0.666769 |
38963c0fa66f8d89f3487e225333f1ba2868d4f7 | 5,774 | py | Python | oeml-sdk/python/openapi_client/api/positions_api.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | 1 | 2020-07-23T05:47:52.000Z | 2020-07-23T05:47:52.000Z | oeml-sdk/python/openapi_client/api/positions_api.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | null | null | null | oeml-sdk/python/openapi_client/api/positions_api.py | oskaralfons/coinapi-sdk | 2c79b6d91d0f702040dd865e79f0774a4bba9bb3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
OEML - REST API
This section will provide necessary information about the `CoinAPI OEML REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> # noqa: E501
The version... | 38.751678 | 261 | 0.6053 |
389640045099f112ce173a7232e5d53e85929355 | 22 | py | Python | constants.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | constants.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | constants.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | __VERSION__ = "2.0.0"
| 11 | 21 | 0.636364 |
389653a9ec6815b233f1d21bd0865abbb0ca0043 | 2,855 | py | Python | tests/core/tools/pytest_platon/test_linker.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | tests/core/tools/pytest_platon/test_linker.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | tests/core/tools/pytest_platon/test_linker.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | import pytest
from platonpm import (
ASSETS_DIR,
Package,
)
from platon.tools.pytest_platon.deployer import (
Deployer,
)
from platon.tools.pytest_platon.exceptions import (
DeployerError,
)
from platon.tools.pytest_platon.linker import (
deploy,
link,
linker,
run_python,
)
@pytest.fi... | 34.39759 | 93 | 0.711384 |
38965f07b5436f9e0e68a77966605033a47dbbb7 | 1,413 | py | Python | examples/wizards.py | ohjay/cspy | c6efe36bcfff4668650293bd96854b9e7cfbd351 | [
"MIT"
] | 2 | 2021-04-24T09:40:38.000Z | 2022-03-27T21:03:56.000Z | examples/wizards.py | ohjay/cspy | c6efe36bcfff4668650293bd96854b9e7cfbd351 | [
"MIT"
] | null | null | null | examples/wizards.py | ohjay/cspy | c6efe36bcfff4668650293bd96854b9e7cfbd351 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
wizards.py
Solver for CS 170's Fall 2017 project.
"""
import argparse
from cspy import Variable, Constraint, CSP
from cspy.common_constraints import uniqueness
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='wizards constraint solver')
parser.add_argument('... | 30.717391 | 109 | 0.648266 |
389680a1c0cfed8c6de07307f40559d616106ce8 | 1,331 | py | Python | src/utils/decorators.py | lk-vila/Sebotiao | 259995aa88e824ab7ddf71d5a4a6d2f4dfd46f6e | [
"MIT"
] | 1 | 2022-02-16T02:44:07.000Z | 2022-02-16T02:44:07.000Z | src/utils/decorators.py | lk-vila/Sebotiao | 259995aa88e824ab7ddf71d5a4a6d2f4dfd46f6e | [
"MIT"
] | null | null | null | src/utils/decorators.py | lk-vila/Sebotiao | 259995aa88e824ab7ddf71d5a4a6d2f4dfd46f6e | [
"MIT"
] | 5 | 2021-01-10T03:36:06.000Z | 2021-01-15T00:27:50.000Z | from secrets import choice
from extras import constants
def admin_only(command_func):
'''
Decorator to allow only administrators to call the function.
This decorator does not raises an error (as is the case with
"@commands.has_permissions(administrator=True)"). Instead, it
sends a negative repply... | 26.098039 | 84 | 0.639369 |
389692d5b3e743aaff318694acbc87790917c054 | 17,171 | py | Python | django/contrib/contenttypes/generic.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/contrib/contenttypes/generic.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/contrib/contenttypes/generic.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | """
Classes allowing "generic" relations through ContentType and object-id fields.
"""
from functools import partial
from django.core.exceptions import ObjectDoesNotExist
from django.db import connection
from django.db.models import signals
from django.db import models, router, DEFAULT_DB_ALIAS
from django.db.models.f... | 39.839907 | 102 | 0.639567 |
389695b12a3aa1d7203515b0f4664fa6eb1a8fa4 | 3,695 | py | Python | oscar/lib/python2.7/site-packages/_pytest/pastebin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/_pytest/pastebin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/_pytest/pastebin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """ submit failure or test session information to a pastebin service. """
from __future__ import absolute_import, division, print_function
import pytest
import sys
import tempfile
def pytest_addoption(parser):
group = parser.getgroup("terminal reporting")
group._addoption('--pastebin', metavar="mod... | 36.584158 | 95 | 0.607578 |
3896b3a0a18970a9e4a3860c76d9cb380be3f037 | 1,622 | py | Python | Location_Based/SituationClustering.py | JianhengHou/Situation_clustering | f7e193500535221faf159cfa5ea05d129c902723 | [
"MIT"
] | 2 | 2018-11-22T00:39:47.000Z | 2019-01-31T23:33:36.000Z | Location_Based/SituationClustering.py | JianhengHou/Situation_clustering | f7e193500535221faf159cfa5ea05d129c902723 | [
"MIT"
] | null | null | null | Location_Based/SituationClustering.py | JianhengHou/Situation_clustering | f7e193500535221faf159cfa5ea05d129c902723 | [
"MIT"
] | null | null | null | # coding: utf-8
'''
Codes between the '*' are data structures which are used for getting the precision recall and f score
'''
import sys
from LocationTopics import *
class SituationClustering():
def __init__(self, input_path, output_path, stop_point=0):
self.output_path = output_path
self.stop... | 28.964286 | 101 | 0.590012 |
3896df3d8ecbb8055c1e2995de890582ed5add98 | 42,036 | py | Python | venv/lib/python3.7/site-packages/sqlalchemy/ext/automap.py | Ryan0v0/SoftwareEngineering_Project | 14486717095b33805fb1ea0f25a03152de25b7f4 | [
"MIT"
] | 13 | 2020-03-27T04:37:45.000Z | 2022-03-27T12:50:30.000Z | venv/lib/python3.7/site-packages/sqlalchemy/ext/automap.py | linqiunan/SoftwareEngineering_Project | 14486717095b33805fb1ea0f25a03152de25b7f4 | [
"MIT"
] | 2 | 2020-04-06T17:44:37.000Z | 2021-12-09T03:32:17.000Z | venv/lib/python3.7/site-packages/sqlalchemy/ext/automap.py | linqiunan/SoftwareEngineering_Project | 14486717095b33805fb1ea0f25a03152de25b7f4 | [
"MIT"
] | 3 | 2020-03-27T20:46:01.000Z | 2022-03-05T08:57:40.000Z | # ext/automap.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
r"""Define an extension to the :mod:`sqlalchemy.ext.declarative` system
which automat... | 40.07245 | 83 | 0.650181 |
3896e5545b1cfa3cb7bd80b8e471db0822ab780b | 8,350 | py | Python | datamidware/pydb/csv2mysql.py | JagritiG/data-middleware | e51cedf173e487d270f42c993e5e7f79f85bd263 | [
"MIT"
] | null | null | null | datamidware/pydb/csv2mysql.py | JagritiG/data-middleware | e51cedf173e487d270f42c993e5e7f79f85bd263 | [
"MIT"
] | null | null | null | datamidware/pydb/csv2mysql.py | JagritiG/data-middleware | e51cedf173e487d270f42c993e5e7f79f85bd263 | [
"MIT"
] | null | null | null | """
Author: Jagriti Goswami
Date: 30th August 2020
License: MIT License
===================================================================
Implementation of function csv_2_mysql() in Python:
Imports csv file into mysql pydb
param host: host name
param user: user name
param password: password
param filename: filename ... | 32.364341 | 95 | 0.602635 |
3896ece697b5a5d2cbdd2daf2822d57057189cb4 | 540 | py | Python | src/change_exposure.py | antonmattsson/diabetic_retinopathy | 6aaa0ab3631d1cb0075d3acf2778822d62d1b532 | [
"MIT"
] | null | null | null | src/change_exposure.py | antonmattsson/diabetic_retinopathy | 6aaa0ab3631d1cb0075d3acf2778822d62d1b532 | [
"MIT"
] | null | null | null | src/change_exposure.py | antonmattsson/diabetic_retinopathy | 6aaa0ab3631d1cb0075d3acf2778822d62d1b532 | [
"MIT"
] | null | null | null | import numpy as np
from skimage import color, exposure
from skimage.io import imread
def change_exposure(fname):
img = imread('../data/converted/'+ fname + '.jpeg')
hsv = color.rgb2hsv(img)
hsv[:, :, 2] = exposure.equalize_hist(hsv[:, :, 2])
img = color.hsv2rgb(hsv)
img = img / 255
np.save('../... | 30 | 95 | 0.657407 |
3896ed4f64117843157570802c6f6ec9eb50d212 | 5,469 | py | Python | ray_multi_agent.py | Skylark0924/Gamma_Reward | 2eed6e2ea246974946b16bb7743fa55219436580 | [
"Apache-2.0"
] | 12 | 2020-10-15T08:11:50.000Z | 2021-12-11T03:10:47.000Z | ray_multi_agent.py | Skylark0924/Gamma_Reward | 2eed6e2ea246974946b16bb7743fa55219436580 | [
"Apache-2.0"
] | null | null | null | ray_multi_agent.py | Skylark0924/Gamma_Reward | 2eed6e2ea246974946b16bb7743fa55219436580 | [
"Apache-2.0"
] | 2 | 2021-01-28T09:53:11.000Z | 2021-10-03T17:29:41.000Z | '''
Multi-intersection control, using Ray multi-agent algorithms
'''
import ray
from ray import tune
from ray.tune import register_env, grid_search
import ray.rllib.agents.dqn as dqn
from ray.rllib.agents.dqn import DQNTrainer
import ray.rllib.env.group_agents_wrapper
import os
from ray.tune.logger import pretty_print... | 37.979167 | 178 | 0.66429 |
3896fd8b2ce716fdb274a7da3bc6088f7d9ebc05 | 529 | py | Python | dbt/adapters/mariadb/__init__.py | avaitla/dbt-mysql | d5f09a4b75441710503819ebac31c52e67118ad2 | [
"Apache-2.0"
] | null | null | null | dbt/adapters/mariadb/__init__.py | avaitla/dbt-mysql | d5f09a4b75441710503819ebac31c52e67118ad2 | [
"Apache-2.0"
] | null | null | null | dbt/adapters/mariadb/__init__.py | avaitla/dbt-mysql | d5f09a4b75441710503819ebac31c52e67118ad2 | [
"Apache-2.0"
] | null | null | null | from dbt.adapters.mariadb.connections import MariaDBConnectionManager # noqa
from dbt.adapters.mariadb.connections import MariaDBCredentials
from dbt.adapters.mariadb.relation import MariaDBRelation # noqa
from dbt.adapters.mariadb.column import MariaDBColumn # noqa
from dbt.adapters.mariadb.impl import MariaDBAdapt... | 35.266667 | 77 | 0.833648 |
38974a0e5002dfbe4f9e89c704a3bb19b7dd1c25 | 17,456 | py | Python | userbot/plugins/animazioni3.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | userbot/plugins/animazioni3.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | userbot/plugins/animazioni3.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | """
Commands:
.avast
.avast1
.call
.hack
.linux
.macos
.stock
.windows
"""
import asyncio
from telethon import events
from platform import uname
from userbot import CMD_HELP, ALIVE_NAME
from userbot.utils import admin_cmd
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "I'M STUPID"
@borg.on(admin_cmd(pattern=f... | 66.372624 | 759 | 0.587477 |
3897576f9ce3de3b13d0eabb28bd59d969c24558 | 2,392 | gyp | Python | components/prefs/prefs.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | components/prefs/prefs.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | components/prefs/prefs.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2013 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.
{
'targets': [
{
'target_name': 'prefs',
'type': '<(component)',
'dependencies': [
'../../base/base.gyp:base',
],
... | 26.577778 | 72 | 0.536789 |
389767e5d7cb2052aa1e0d1360207ee74408b136 | 2,009 | py | Python | ads/opctl/config/utils.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | 20 | 2022-02-22T19:07:09.000Z | 2022-03-16T17:21:42.000Z | ads/opctl/config/utils.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | ads/opctl/config/utils.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8; -*-
# Copyright (c) 2022 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
import configparser
import os
from typing import List
import urllib.parse
import fsspec
import nbformat
from nbcon... | 27.148649 | 104 | 0.704331 |
3897c665a016ba0e84e077ae0f70a7649f265d59 | 7,365 | py | Python | utils/ShapExp.py | drcastillo/hicss2020 | 0a812257215c75054d8b891e23c933d6a8327c0d | [
"Apache-2.0"
] | null | null | null | utils/ShapExp.py | drcastillo/hicss2020 | 0a812257215c75054d8b891e23c933d6a8327c0d | [
"Apache-2.0"
] | null | null | null | utils/ShapExp.py | drcastillo/hicss2020 | 0a812257215c75054d8b891e23c933d6a8327c0d | [
"Apache-2.0"
] | null | null | null |
import numpy as np
import os
import pandas as pd
import matplotlib.pyplot as plt
import sys
from collections import Counter
import pickle
import sklearn
from sklearn.model_selection import GridSearchCV, cross_val_score, StratifiedKFold, learning_curve
import seaborn as sns
from IPython.display import display, HTML
f... | 42.572254 | 147 | 0.624168 |
3897d3206b844d4fe0ba8bb476b2415a5ef3eba0 | 11,901 | py | Python | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 ... | 37.542587 | 133 | 0.650281 |
3898325fd2f4c618cda5aa8c68e2560d8f8e4bae | 3,094 | py | Python | alipay/aop/api/domain/AlipayBossProdContractDetailQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayBossProdContractDetailQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayBossProdContractDetailQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayBossProdContractDetailQueryModel(object):
def __init__(self):
self._business_id = None
self._contract_code = None
self._is_pdf_required = None
self._source_s... | 30.633663 | 83 | 0.614092 |
389860b46262082f354995d4afaac2eb8f9ef502 | 4,812 | py | Python | dvc/output/__init__.py | codito/dvc | edd83446591fcdbb5f1e58754755b68195dd2b1c | [
"Apache-2.0"
] | null | null | null | dvc/output/__init__.py | codito/dvc | edd83446591fcdbb5f1e58754755b68195dd2b1c | [
"Apache-2.0"
] | null | null | null | dvc/output/__init__.py | codito/dvc | edd83446591fcdbb5f1e58754755b68195dd2b1c | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from urllib.parse import urlparse
from funcy import collecting, project
from voluptuous import And, Any, Coerce, Length, Lower, Required, SetTo
from dvc.hash_info import HashInfo
from dvc.output.base import BaseOutput
from dvc.output.gs import GSOutput
from dvc.output.hdfs import H... | 25.595745 | 79 | 0.593308 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.