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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38d9748a4b9b0e3bb13abbd76ec2c52d1568f8fd | 1,506 | py | Python | exchangelib/items/post.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/items/post.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/items/post.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
import logging
from ..fields import TextField, BodyField, DateTimeField, MailboxField
from .item import Item
from .message import Message
log = logging.getLogger(__name__)
class PostItem(Item):
"""
MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-... | 32.73913 | 108 | 0.702523 |
38d98761ff6ac8b00dd7345f045799f7e1174881 | 2,343 | py | Python | pinn/io/ani.py | FZJ-IAS5-MLMD/PiNN | bbadd16b534b1c32de18da482fc04d463a6131f6 | [
"BSD-3-Clause"
] | null | null | null | pinn/io/ani.py | FZJ-IAS5-MLMD/PiNN | bbadd16b534b1c32de18da482fc04d463a6131f6 | [
"BSD-3-Clause"
] | 1 | 2020-09-15T11:50:41.000Z | 2020-09-15T11:50:41.000Z | pinn/io/ani.py | FZJ-IAS5-MLMD/PiNN | bbadd16b534b1c32de18da482fc04d463a6131f6 | [
"BSD-3-Clause"
] | 1 | 2020-09-07T09:56:43.000Z | 2020-09-07T09:56:43.000Z | # -*- coding: utf-8 -*-
"""ANI-1, A data set of 20 million calculated off-equilibrium conformations
for organic molecules. (https://doi.org/10.6084/m9.figshare.c.3846712.v1)
Please cite the original paper when using this dataset.
The dataset is splitted by molecules while loading,
meaninig the same molecule shows up... | 37.190476 | 75 | 0.650448 |
38d994723c01e3a8f8cc885968305626d335e78c | 1,392 | py | Python | NLRA/algebra.py | Huda-Hakami/Context-Guided-Relation-Embeddings | 520ce89fe7bad3aba2f3eb112329300625bb55f7 | [
"Apache-2.0"
] | 1 | 2019-10-06T03:54:53.000Z | 2019-10-06T03:54:53.000Z | NLRA/algebra.py | Huda-Hakami/Context-Guided-Relation-Embeddings | 520ce89fe7bad3aba2f3eb112329300625bb55f7 | [
"Apache-2.0"
] | null | null | null | NLRA/algebra.py | Huda-Hakami/Context-Guided-Relation-Embeddings | 520ce89fe7bad3aba2f3eb112329300625bb55f7 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import math
from scipy.stats import entropy
#------------------------------------------------------------------
def cosine(x, y):
"""
Compute the cosine similarity between two vectors x and y.
"""
x=normalize(x)
y=normalize(y)
return np.dot(x,y.T)
#-----------------------------------------... | 32.372093 | 69 | 0.34842 |
38d9981f0061d80f48a3c75e847074c6f412ba26 | 7,941 | py | Python | codes/projects/test_discrete_parameter/data_generator/generate_data.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/test_discrete_parameter/data_generator/generate_data.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/test_discrete_parameter/data_generator/generate_data.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''Generates training and testing data
The parameter-of-interest discrete; often coefficients of the forward function
Whilst you can toggle what objects are generated,
all generated objects will be loaded by default.
In preparation for generating data, the code will:
... | 40.106061 | 100 | 0.603325 |
38d9a8739efe597fb3aef9e80f2f04e211ea19dc | 69,857 | py | Python | mpyc/runtime.py | ThomasTNO/mpyc | 11ea79be06a676a8b2ae2d81d94621ec35c638e8 | [
"MIT"
] | null | null | null | mpyc/runtime.py | ThomasTNO/mpyc | 11ea79be06a676a8b2ae2d81d94621ec35c638e8 | [
"MIT"
] | null | null | null | mpyc/runtime.py | ThomasTNO/mpyc | 11ea79be06a676a8b2ae2d81d94621ec35c638e8 | [
"MIT"
] | null | null | null | """The MPyC runtime module is used to execute secure multiparty computations.
Parties perform computations on secret-shared values by exchanging messages.
Shamir's threshold secret sharing scheme is used for finite fields of any order
exceeding the number of parties. MPyC provides secure number types and operations,
m... | 35.769073 | 100 | 0.522968 |
38d9a94f3dc44e66356d4ec35ec6a8cb44a38a72 | 1,325 | py | Python | applications/tenant/views/tenant/classic.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | applications/tenant/views/tenant/classic.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | 1 | 2022-03-12T00:57:37.000Z | 2022-03-12T00:57:37.000Z | applications/tenant/views/tenant/classic.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | from django.http import JsonResponse
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from mighty.views import DetailView, ListView
from mighty.applications.tenant.views.tenant.base import TenantBase
@method_decorator(login_required, name='dispatch')
class ... | 40.151515 | 67 | 0.748679 |
38d9b83c81d15253b75b08475a3a42654a5eb16e | 14,276 | py | Python | Tests/TestPriorityQueue.py | nikist97/Python-DataStructures | 6225c67d85aa14894c4f5451c8acd572e2e6f6b0 | [
"Apache-2.0"
] | 6 | 2018-07-07T08:54:00.000Z | 2022-03-27T00:49:51.000Z | Tests/TestPriorityQueue.py | arpitcodes/Python-DataStructures | 6225c67d85aa14894c4f5451c8acd572e2e6f6b0 | [
"Apache-2.0"
] | 4 | 2018-03-18T11:07:15.000Z | 2018-03-22T17:19:33.000Z | Tests/TestPriorityQueue.py | arpitcodes/Python-DataStructures | 6225c67d85aa14894c4f5451c8acd572e2e6f6b0 | [
"Apache-2.0"
] | 2 | 2017-07-21T10:04:25.000Z | 2017-07-21T11:34:56.000Z | """
Copyright 2017 Nikolay Stanchev
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, softwa... | 46.501629 | 120 | 0.699286 |
38d9bdb960ce1dfb5281e7a651010a36dfd8b7e2 | 1,895 | py | Python | backoffice/manager/invitation.py | MedPy-C/backend | 262834adb1f4f5714c4bd490595fdfa1f49c9675 | [
"MIT"
] | null | null | null | backoffice/manager/invitation.py | MedPy-C/backend | 262834adb1f4f5714c4bd490595fdfa1f49c9675 | [
"MIT"
] | 1 | 2021-05-20T16:08:35.000Z | 2021-05-20T16:08:35.000Z | backoffice/manager/invitation.py | MedPy-C/backend | 262834adb1f4f5714c4bd490595fdfa1f49c9675 | [
"MIT"
] | null | null | null | from django.db import models, IntegrityError
from backoffice.utils.constant import Status
from backoffice.utils.exceptions import DuplicatedRecord, InvalidOperation
class InvitationQuerySet(models.QuerySet):
def get_all(self, user_code, slug_name):
"""
get all the Invitation corresponding to the... | 35.754717 | 103 | 0.684433 |
38d9cbe477342da84edc589495e23d60aece7d19 | 3,340 | py | Python | ufora/config/LoginConfiguration.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/config/LoginConfiguration.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/config/LoginConfiguration.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora 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 i... | 34.43299 | 108 | 0.62994 |
38d9e2288f4a7887536d3f8aa4bae410eff6e479 | 7,402 | py | Python | src/transformers/models/distilbert/configuration_distilbert.py | norabelrose/transformers | 0639f72ebcc008dac59757bc5c38d6f074301491 | [
"Apache-2.0"
] | 15 | 2020-12-02T07:56:38.000Z | 2021-12-15T06:16:01.000Z | src/transformers/models/distilbert/configuration_distilbert.py | norabelrose/transformers | 0639f72ebcc008dac59757bc5c38d6f074301491 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/distilbert/configuration_distilbert.py | norabelrose/transformers | 0639f72ebcc008dac59757bc5c38d6f074301491 | [
"Apache-2.0"
] | 8 | 2020-12-12T09:03:46.000Z | 2021-12-10T04:50:49.000Z | # coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, 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.or... | 50.69863 | 153 | 0.700351 |
38da01de7820b1e6b0b25d39e71fafa25d638d06 | 1,368 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/pixie_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/pixie_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/pixie_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
import time
import board
import busio
import adafruit_pixie
# For use with CircuitPython:
uart = busio.UART(board.TX, rx=None, baudrate=115200)
# For use on Raspberry Pi/Linux with Adafruit_Blinka:
# import serial
# uart = ... | 26.823529 | 81 | 0.605263 |
38da12a6fffc7cb0e98e4e48efde5b20ead2bf0a | 4,898 | py | Python | emarket/client_seller.py | flamma7/csci5673_emarket | 44746f64212acbbaa36ca2c2d1974a9e1c003f83 | [
"MIT"
] | null | null | null | emarket/client_seller.py | flamma7/csci5673_emarket | 44746f64212acbbaa36ca2c2d1974a9e1c003f83 | [
"MIT"
] | null | null | null | emarket/client_seller.py | flamma7/csci5673_emarket | 44746f64212acbbaa36ca2c2d1974a9e1c003f83 | [
"MIT"
] | null | null | null | import json
import socket
import time
from emarket.erequests import FrontRequestEnum
from emarket.emarket import Item
import requests
import random
class ClientSeller:
def __init__(self, front_end_ips):
self.username = None
self.front_end_ips = front_end_ips
print(self.front_end_ips)
... | 35.492754 | 111 | 0.58677 |
38da2b3fb8dfc4fbcf2ebe5af020a81383983803 | 4,444 | py | Python | cfnbootstrap/__init__.py | roberthutto/aws-cfn-bootstrap | 801a16802a931fa4dae0eba4898fe1ccdb304924 | [
"Apache-2.0"
] | null | null | null | cfnbootstrap/__init__.py | roberthutto/aws-cfn-bootstrap | 801a16802a931fa4dae0eba4898fe1ccdb304924 | [
"Apache-2.0"
] | null | null | null | cfnbootstrap/__init__.py | roberthutto/aws-cfn-bootstrap | 801a16802a931fa4dae0eba4898fe1ccdb304924 | [
"Apache-2.0"
] | null | null | null | #==============================================================================
# Copyright 2011 Amazon.com, Inc. or its affiliates. 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 ... | 28.857143 | 116 | 0.684518 |
38da5f7f4a9ade80e0f353434cb13ccee7820919 | 1,711 | py | Python | imodels/experimental/bartpy/runner.py | csinva/interpretability-implementations-demos | 0223114225d0e077007b1ad49f63b64f3ff5ee15 | [
"MIT"
] | 102 | 2019-07-16T13:45:35.000Z | 2020-09-14T19:12:49.000Z | imodels/experimental/bartpy/runner.py | csinva/interpretability-workshop | db201be7723179a1f5ab20b242419a604edc9186 | [
"MIT"
] | 2 | 2020-01-03T20:47:14.000Z | 2020-01-03T21:17:39.000Z | imodels/experimental/bartpy/runner.py | csinva/interpretability-workshop | db201be7723179a1f5ab20b242419a604edc9186 | [
"MIT"
] | 8 | 2019-08-09T08:40:34.000Z | 2020-09-06T17:51:10.000Z | """
A model for running many instances of BartPy models in parallel
"""
from copy import deepcopy
from typing import List
import numpy as np
from joblib import Parallel
from .samplers.modelsampler import Chain
from .sklearnmodel import SklearnModel
def convert_chains_models(model: SklearnModel,
... | 30.553571 | 104 | 0.656341 |
38da7a8369171e9af4f54c4cfb7626c9f714ea1e | 547 | py | Python | .guides/secure/unit_tests/functions/exercise5_helper.py | codio-content/cs-intro-python-fundamentals | 7b59810b6fb98089d3b725a3b898a6403a32c447 | [
"MIT"
] | null | null | null | .guides/secure/unit_tests/functions/exercise5_helper.py | codio-content/cs-intro-python-fundamentals | 7b59810b6fb98089d3b725a3b898a6403a32c447 | [
"MIT"
] | null | null | null | .guides/secure/unit_tests/functions/exercise5_helper.py | codio-content/cs-intro-python-fundamentals | 7b59810b6fb98089d3b725a3b898a6403a32c447 | [
"MIT"
] | null | null | null | import os, shutil, sys
# path to student file
student_file = "/home/codio/workspace/code/functions/exercise5.py"
# new location for testing
new_location = "/home/codio/workspace/.guides/secure/unit_tests/functions"
# copy student file to the new location
shutil.copy(student_file, new_location)
# run the code test... | 28.789474 | 84 | 0.753199 |
38da8ca86985e62af5559c86b3ed9d8d4e249657 | 540 | py | Python | extended_uva_judge/problems.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | extended_uva_judge/problems.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | extended_uva_judge/problems.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | """Module to assist with interacting with problems on this Judge."""
from os import listdir
from os.path import isfile, join
def get_available_problems(config):
"""Gets available problems on this Judge.
:param config: The config for the judge system
:type config: dict
:return: List of the available ... | 27 | 70 | 0.692593 |
38dab2000d40c31ca55863b7e68f0af9e0700648 | 106 | py | Python | plantsegtools/postprocess/__init__.py | hci-unihd/plant-seg-tools | 38cef53940e9330e12e74c9ea98035814bde90fc | [
"MIT"
] | null | null | null | plantsegtools/postprocess/__init__.py | hci-unihd/plant-seg-tools | 38cef53940e9330e12e74c9ea98035814bde90fc | [
"MIT"
] | null | null | null | plantsegtools/postprocess/__init__.py | hci-unihd/plant-seg-tools | 38cef53940e9330e12e74c9ea98035814bde90fc | [
"MIT"
] | 2 | 2021-04-24T16:29:22.000Z | 2021-04-24T16:29:38.000Z | import os
LMC_CONFIG_PATH = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'lmc_config.yaml')
| 26.5 | 94 | 0.754717 |
38dad236c59b85aa77ffb87d23133f5ac6c75d46 | 2,852 | py | Python | Image/filtercolor_milestone.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | Image/filtercolor_milestone.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | Image/filtercolor_milestone.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import imutils
def filter_colors(image,datacolorthresh):
lower_thresh = np.array([datacolorthresh[0],datacolorthresh[1],datacolorthresh[2]])
upper_thresh = np.array([datacolorthresh[3],datacolorthresh[4],datacolorthresh[5]])
color_mask = cv2.inRange(image, lower_thresh, upper_t... | 30.666667 | 85 | 0.63885 |
38dafc35821a6ac6fa3c3931c61f0a2b17457e1d | 1,208 | py | Python | SDCUP/uer/models/bert_model.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 4 | 2022-03-12T10:31:21.000Z | 2022-03-29T03:44:24.000Z | SDCUP/uer/models/bert_model.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | null | null | null | SDCUP/uer/models/bert_model.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | null | null | null | # -*- encoding:utf-8 -*-
import torch
import torch.nn as nn
class BertModel(nn.Module):
"""
BertModel consists of three parts:
- embedding: token embedding, position embedding, segment embedding
- encoder: multi-layer transformer encoders
- target: mlm and nsp tasks
"""
def __in... | 32.648649 | 75 | 0.580298 |
38db093be69d0e43356997b27e0b072acb3a96a3 | 1,537 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/registry_usage.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/registry_usage.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/registry_usage.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"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 ... | 35.744186 | 79 | 0.588159 |
38db0aa4e38217deafbb68843f05964f97af8941 | 10,754 | py | Python | src/modules/vms/appvulndb/sqlite.py | nullsecuritynet/appvulnms | 306be6f123de95685a8e27b368534de8b27e7b38 | [
"MIT"
] | 1 | 2015-02-02T23:53:36.000Z | 2015-02-02T23:53:36.000Z | src/modules/vms/appvulndb/sqlite.py | nullsecuritynet/appvulnms | 306be6f123de95685a8e27b368534de8b27e7b38 | [
"MIT"
] | null | null | null | src/modules/vms/appvulndb/sqlite.py | nullsecuritynet/appvulnms | 306be6f123de95685a8e27b368534de8b27e7b38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: victor
# @Date: 2014-01-12
# @Last Modified by: victor
# @Last Modified time: 2014-06-05
# @Copyright:
#
# This file is part of the AppVulnMS project.
#
#
# Copyright (c) 2014 Victor Dorneanu <info AAET dornea DOT nu>
#
# Permission is hereby granted... | 36.828767 | 119 | 0.562581 |
38db4e03ccc555ac4670680712b79169fefdd3b3 | 2,046 | py | Python | tests/settings.py | komoot/django-hstore | 8f7a52c59ff7f03a290471f7cc9a9bceb2bceb26 | [
"MIT"
] | null | null | null | tests/settings.py | komoot/django-hstore | 8f7a52c59ff7f03a290471f7cc9a9bceb2bceb26 | [
"MIT"
] | null | null | null | tests/settings.py | komoot/django-hstore | 8f7a52c59ff7f03a290471f7cc9a9bceb2bceb26 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
import sys
import django
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = '!5myuh^d23p9$$lo5k$39x&ji!vceayg+wwt472!bgs$0!i3k4'
DATABASES = {
'default': {
# possible backends are:
# * django.db... | 25.259259 | 81 | 0.672043 |
38db80779ecb80668d7edb28e3f7f8e8b1b234e5 | 281 | py | Python | src/hello/__init__.py | roamdam/udacity-fullstack-nanodegree | ee8e0b19ba2a732eabc9c1e3d21117b5950c48c5 | [
"MIT"
] | null | null | null | src/hello/__init__.py | roamdam/udacity-fullstack-nanodegree | ee8e0b19ba2a732eabc9c1e3d21117b5950c48c5 | [
"MIT"
] | null | null | null | src/hello/__init__.py | roamdam/udacity-fullstack-nanodegree | ee8e0b19ba2a732eabc9c1e3d21117b5950c48c5 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
db_uri = 'postgresql://romain@localhost:5432/gym'
app = Flask(import_name='Hello world')
app.config['SQLALCHEMY_DATABASE_URI'] = db_uri
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app=app)
| 25.545455 | 52 | 0.793594 |
38db818d9c23dd71087ad111ba8da47226d7342d | 213 | py | Python | trident_chemwidgets/_version.py | tridentbio/trident-chemwidgets | da71c8c5cf5fe49f1ea050d4d658fb28d9a24d86 | [
"BSD-3-Clause"
] | 7 | 2022-03-09T17:48:14.000Z | 2022-03-18T20:41:56.000Z | trident_chemwidgets/_version.py | tridentbio/trident-chemwidgets | da71c8c5cf5fe49f1ea050d4d658fb28d9a24d86 | [
"BSD-3-Clause"
] | null | null | null | trident_chemwidgets/_version.py | tridentbio/trident-chemwidgets | da71c8c5cf5fe49f1ea050d4d658fb28d9a24d86 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Trident Bioscience, Inc..
# Distributed under the terms of the Modified BSD License.
version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
| 23.666667 | 58 | 0.704225 |
38db9238e7e6f41e307a85dd2d654528c6a94a87 | 76 | py | Python | editops/__init__.py | ctogle/editops | 479159b18a05a3974f967785823f3f308cbb72c2 | [
"MIT"
] | null | null | null | editops/__init__.py | ctogle/editops | 479159b18a05a3974f967785823f3f308cbb72c2 | [
"MIT"
] | null | null | null | editops/__init__.py | ctogle/editops | 479159b18a05a3974f967785823f3f308cbb72c2 | [
"MIT"
] | null | null | null | from .editops import editops, editdistance
from .alignment import Alignment
| 25.333333 | 42 | 0.842105 |
38dbb73c143ee84236b23a646ad9c10338130560 | 210 | py | Python | backend/database/models/attorney.py | AlexanderBerardino/police-data-trust | 587fe2bc1e7f048e2308d89803abb20f4e619aab | [
"MIT"
] | 16 | 2021-03-02T21:32:52.000Z | 2022-03-15T23:13:06.000Z | backend/database/models/attorney.py | AlexanderBerardino/police-data-trust | 587fe2bc1e7f048e2308d89803abb20f4e619aab | [
"MIT"
] | 173 | 2021-03-03T01:35:36.000Z | 2022-03-30T03:17:58.000Z | backend/database/models/attorney.py | AlexanderBerardino/police-data-trust | 587fe2bc1e7f048e2308d89803abb20f4e619aab | [
"MIT"
] | 36 | 2021-03-03T00:27:20.000Z | 2022-03-29T23:07:57.000Z | from .. import db
class Attorney(db.Model):
id = db.Column(db.Integer, primary_key=True)
legal_case_id = db.Column(db.Integer, db.ForeignKey("legal_case.id"))
text_contents = db.Column(db.String)
| 26.25 | 73 | 0.709524 |
38dbcb2037db09c11cc28b6610441327510371cf | 184 | py | Python | gaffer/pm/commands/__init__.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | gaffer/pm/commands/__init__.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | gaffer/pm/commands/__init__.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | 1 | 2018-10-28T00:59:17.000Z | 2018-10-28T00:59:17.000Z | from gaffer.pm.commands import (
start,
run,
export,
load,
unload,
scale,
ps)
from gaffer.pm.commands.base import get_commands
| 16.727273 | 48 | 0.538043 |
38dbf2b47dca4d68e38babf6af97d307fe4b483b | 1,331 | py | Python | agogosml/agogosml/utils/config.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 13 | 2018-12-07T21:02:20.000Z | 2019-02-22T14:36:31.000Z | agogosml/agogosml/utils/config.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 43 | 2018-11-30T11:31:43.000Z | 2019-04-03T16:09:06.000Z | agogosml/agogosml/utils/config.py | cicorias/agogosml | 60e0b52c2fc721bdd965aadaf8c1afd1ddb9b7d1 | [
"MIT"
] | 13 | 2018-11-29T00:31:29.000Z | 2019-02-22T18:50:28.000Z | """Configuration utilities."""
from ast import literal_eval
from json import JSONDecodeError
from json import loads
class Config:
"""Dictionary wrapper that converts string values to Python objects."""
def __init__(self, config):
"""Wrap the given configuration dictionary."""
self.__config = ... | 22.948276 | 75 | 0.589782 |
38dc05f58f1b442c4de505fedecdbdd0555b0111 | 68,994 | py | Python | app/api/v1/resources/reviewer.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 6 | 2018-11-07T12:41:30.000Z | 2020-04-12T18:07:03.000Z | app/api/v1/resources/reviewer.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 1 | 2020-10-20T12:33:18.000Z | 2020-10-20T12:33:18.000Z | app/api/v1/resources/reviewer.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 10 | 2018-11-12T06:15:19.000Z | 2021-11-18T05:45:12.000Z | """
DRS reviewer resource package.
Copyright (c) 2018-2020 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
Redistribut... | 57.639098 | 844 | 0.533467 |
38dc1f582eaf6e00b4318fc0c9b0bb542e56094e | 5,220 | py | Python | APIstuff/restaurantData.py | teomotun/Restaurant-Plug | 1ecaab7bb60706ec0eca96c2f3efb31276c536e7 | [
"Apache-2.0"
] | null | null | null | APIstuff/restaurantData.py | teomotun/Restaurant-Plug | 1ecaab7bb60706ec0eca96c2f3efb31276c536e7 | [
"Apache-2.0"
] | null | null | null | APIstuff/restaurantData.py | teomotun/Restaurant-Plug | 1ecaab7bb60706ec0eca96c2f3efb31276c536e7 | [
"Apache-2.0"
] | null | null | null | # Dependencies
import openweathermapy.core as owm
import datetime
import pandas as pd
import numpy as np
import requests
import json
class str2(str):
def __repr__(self):
# Allow str.__repr__() to do the hard work, then
# remove the outer two characters, single quotes,
# and replace them wi... | 32.42236 | 78 | 0.526628 |
38dc501816f765e9b3b53ab782804391fe863634 | 1,007 | py | Python | examples/adversarial_evasion.py | AlexeyReshetnyak/rfml | 99ae3af822a037eb2757d6efadd25eb35a50c2b2 | [
"BSD-3-Clause"
] | 61 | 2019-11-19T03:53:54.000Z | 2022-03-26T15:57:47.000Z | examples/adversarial_evasion.py | AlexeyReshetnyak/rfml | 99ae3af822a037eb2757d6efadd25eb35a50c2b2 | [
"BSD-3-Clause"
] | 2 | 2020-12-08T10:07:21.000Z | 2021-02-24T00:29:15.000Z | examples/adversarial_evasion.py | AlexeyReshetnyak/rfml | 99ae3af822a037eb2757d6efadd25eb35a50c2b2 | [
"BSD-3-Clause"
] | 30 | 2019-12-03T13:43:22.000Z | 2022-03-26T15:57:59.000Z | from rfml.attack import fgsm
from rfml.data import build_dataset
from rfml.nn.eval import compute_accuracy
from rfml.nn.model import build_model
from torch.utils.data import DataLoader
_, _, test, le = build_dataset(dataset_name="RML2016.10a", test_pct=0.9)
mask = test.df["SNR"] >= 18
model = build_model(model_name="... | 33.566667 | 83 | 0.711023 |
38dc69705027d842f1e237a00b40df8147ba0bd4 | 9,438 | py | Python | core/extractor.py | princenimo/Real-Time-Optical-Flow-Estimation | 971abe77f383850d239d010002f4562dd5d030a8 | [
"BSD-3-Clause"
] | null | null | null | core/extractor.py | princenimo/Real-Time-Optical-Flow-Estimation | 971abe77f383850d239d010002f4562dd5d030a8 | [
"BSD-3-Clause"
] | null | null | null | core/extractor.py | princenimo/Real-Time-Optical-Flow-Estimation | 971abe77f383850d239d010002f4562dd5d030a8 | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class ResidualBlock(nn.Module):
def __init__(self, in_planes, planes, norm_fn='group', stride=1):
super(ResidualBlock, self).__init__()
self.conv1 = nn.Conv2d(in_planes, planes, kernel_size=3, padding=1, stride=stride)
s... | 33 | 93 | 0.561878 |
38dc8c9e5fda90f06ec15404b81b20b52e23d427 | 3,013 | py | Python | Principles_of_Computing/Tic-Tac-Toe.py | w3-3w/trash-py | 513fa19ef1344bb17f9ae749cdde79a4846ca339 | [
"MIT"
] | null | null | null | Principles_of_Computing/Tic-Tac-Toe.py | w3-3w/trash-py | 513fa19ef1344bb17f9ae749cdde79a4846ca339 | [
"MIT"
] | null | null | null | Principles_of_Computing/Tic-Tac-Toe.py | w3-3w/trash-py | 513fa19ef1344bb17f9ae749cdde79a4846ca339 | [
"MIT"
] | null | null | null | """
Monte Carlo Tic-Tac-Toe Player
"""
import random
import poc_ttt_gui
import poc_ttt_provided as provided
# Constants for Monte Carlo simulator
# Change as desired
NTRIALS = 100 # Number of trials to run
MCMATCH = 1.0 # Score for squares played by the machine player
MCOTHER = 1.0 # Score for squares played by ... | 30.13 | 191 | 0.622967 |
38dcaadb251af6bc5083dd0eac3bd9390628ef8f | 5,141 | py | Python | owtf/shell/async_subprocess.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/shell/async_subprocess.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/shell/async_subprocess.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | """
owtf.shell.async_subprocess
~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Inspired from:
# http://code.activestate.com/recipes/440554-module-to-allow-asynchronous-subprocess-use-on-win/
"""
import errno
import os
import subprocess
import sys
import time
if subprocess.mswindows:
from win32file import ReadFile, WriteFile
... | 29.210227 | 96 | 0.528302 |
38dcd02b59e11ac5bd50d27aa9d60b1bad5581ea | 39,789 | py | Python | mrcnn/utils.py | Comverser/Mask_RCNN | c758c15b4f63c10d627af9db122db00b35e8f394 | [
"MIT"
] | null | null | null | mrcnn/utils.py | Comverser/Mask_RCNN | c758c15b4f63c10d627af9db122db00b35e8f394 | [
"MIT"
] | null | null | null | mrcnn/utils.py | Comverser/Mask_RCNN | c758c15b4f63c10d627af9db122db00b35e8f394 | [
"MIT"
] | null | null | null | """
Mask R-CNN
Common utility functions and classes.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import sys
import os
import logging
import math
import random
import numpy as np
import tensorflow as tf
import scipy
import skimage.color
imp... | 37.966603 | 104 | 0.615296 |
38dd10f5c84cdaab59dee3a77f294bcfbfd7c42f | 13,387 | py | Python | WaterberryFarm.py | lboloni/MREM | f0d6354d1d3b625e71597a42e03f4e5d859a2ef2 | [
"MIT"
] | null | null | null | WaterberryFarm.py | lboloni/MREM | f0d6354d1d3b625e71597a42e03f4e5d859a2ef2 | [
"MIT"
] | null | null | null | WaterberryFarm.py | lboloni/MREM | f0d6354d1d3b625e71597a42e03f4e5d859a2ef2 | [
"MIT"
] | null | null | null | import Environment
from InformationModel import InformationModel, ScalarFieldInformationModel_stored_observation
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
from matplotlib.path import Path
from matplotlib... | 45.074074 | 182 | 0.629193 |
38dd246e96c2e1ab163e14b844c1127cd306951a | 859 | py | Python | korona/html/tags/fieldset.py | bharadwajyarlagadda/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 2 | 2016-10-11T03:57:30.000Z | 2018-01-19T20:13:47.000Z | korona/html/tags/fieldset.py | iskodirajga/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 16 | 2016-08-19T04:08:45.000Z | 2016-09-27T03:26:39.000Z | korona/html/tags/fieldset.py | iskodirajga/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 1 | 2016-10-11T03:57:33.000Z | 2016-10-11T03:57:33.000Z | # -*- coding: utf-8 -*-
"""Module for constructing <fieldset> tag."""
from __future__ import absolute_import
from ...templates.html.tags import fieldset
class FieldSet(object):
"""Class for constructing fieldset tag.
Args:
disabled (bool): Specifies that a group of related form elements
... | 30.678571 | 73 | 0.6461 |
38dd2a2ffc3e1220e0db6628c6ea24ca50e0ac73 | 1,426 | py | Python | bitbots_head_behaviour/src/bitbots_head_behaviour/head_node.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | bitbots_head_behaviour/src/bitbots_head_behaviour/head_node.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | bitbots_head_behaviour/src/bitbots_head_behaviour/head_node.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# -*- coding:utf-8 -*-
import rospy
from bitbots_connector.connector import HeadConnector
from bitbots_head_behaviour.decisions.head_duty_decider import HeadDutyDecider
from bitbots_stackmachine.stack_machine import StackMachine
from humanoid_league_msgs.msg import HeadMode, BallRelative, Obsta... | 37.526316 | 113 | 0.741935 |
38dd2bc6533b823860de5662840493949e939dfd | 4,124 | py | Python | experiments/ashvin/camera_ready/offline_vae_multi.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/camera_ready/offline_vae_multi.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/camera_ready/offline_vae_multi.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v3
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.grill.launcher import grill_her_td3_full_experiment
from rlkit.launchers.arglauncher import run_variants
if __name__ == "__main__... | 36.495575 | 151 | 0.564258 |
38dd2d08b17399a699ef2b5b30b6c0bc3d40443f | 867 | py | Python | nuq/cuda/qdq.py | Tabrizian/learning-to-quantize | 545ef7075ff01cbb218600878943554954cef53f | [
"Apache-2.0"
] | 16 | 2020-10-16T16:21:50.000Z | 2021-12-15T06:45:12.000Z | nuq/cuda/qdq.py | Tabrizian/learning-to-quantize | 545ef7075ff01cbb218600878943554954cef53f | [
"Apache-2.0"
] | null | null | null | nuq/cuda/qdq.py | Tabrizian/learning-to-quantize | 545ef7075ff01cbb218600878943554954cef53f | [
"Apache-2.0"
] | 4 | 2020-10-27T12:32:28.000Z | 2021-04-25T04:43:45.000Z | import torch
import math
from cuquant import QDQ
def get_uniform_levels(bits):
num_levels = 2 << bits - 1
levels_uni = torch.linspace(-1, 1, steps=num_levels)
return levels_uni
def qdq_gpu(a):
assert isinstance(a, torch.cuda.FloatTensor)
bucket_size = 16
asize = a.size()
num_tail = math... | 27.09375 | 69 | 0.647059 |
38dd3167559b4009c48e0e201c323f47f3291ee6 | 3,184 | py | Python | alipay/aop/api/response/AntMerchantExpandMembercardConfigModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AntMerchantExpandMembercardConfigModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AntMerchantExpandMembercardConfigModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.MemberCardTemplateConfig import MemberCardTemplateConfig
from alipay.aop.api.domain.MemberCardPayEffectiveRule import MemberCardPayEffectiveRule
from alipay.aop.api.dom... | 39.308642 | 120 | 0.721734 |
38dd476dc21dee0ad4cd3c5b944668a03edcab94 | 1,748 | py | Python | roles/models/third_party/vat_utils.py | JMFlin/auto-preference-finder | 07dd2e6b2b28398ca9bfb6ad328c578eb9987417 | [
"MIT"
] | null | null | null | roles/models/third_party/vat_utils.py | JMFlin/auto-preference-finder | 07dd2e6b2b28398ca9bfb6ad328c578eb9987417 | [
"MIT"
] | 7 | 2020-11-13T17:50:07.000Z | 2022-02-10T02:17:14.000Z | roles/models/third_party/vat_utils.py | JMFlin/auto-preference-finder | 07dd2e6b2b28398ca9bfb6ad328c578eb9987417 | [
"MIT"
] | null | null | null | """Utilities derived from the VAT code."""
import tensorflow as tf
def generate_perturbation(x, logit, forward, epsilon, xi=1e-6):
"""Generate an adversarial perturbation.
Args:
x: Model inputs.
logit: Original model output without perturbation.
forward: Callable which com... | 29.627119 | 80 | 0.609268 |
38dd57f9cbf9bd9dbaaf0e06a37d8896675843e4 | 592 | py | Python | tests/python/multi-node/dist_sync_mlp.py | danielpinero/prueba | 4aa1b8d2d4c7a4abf8e4d604fb2ceab78b3dbe1d | [
"Apache-2.0"
] | null | null | null | tests/python/multi-node/dist_sync_mlp.py | danielpinero/prueba | 4aa1b8d2d4c7a4abf8e4d604fb2ceab78b3dbe1d | [
"Apache-2.0"
] | null | null | null | tests/python/multi-node/dist_sync_mlp.py | danielpinero/prueba | 4aa1b8d2d4c7a4abf8e4d604fb2ceab78b3dbe1d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import mxnet as mx
import logging
import common
mx.random.seed(0)
logging.basicConfig(level=logging.DEBUG)
kv = mx.kvstore.create('dist_sync')
# feed each machine the whole data
(train, val) = common.mnist(batch_size = 100,
input_shape = (784,))
# train
model = mx... | 21.142857 | 49 | 0.570946 |
38dd5dee561f032a95d4800195d5a69570abfdc0 | 15,967 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/13_ext_512crop/train4_40.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/13_ext_512crop/train4_40.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/13_ext_512crop/train4_40.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="2"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 35.403548 | 123 | 0.647147 |
38dd66773ea1e79ee0a7fd2d7ccb2b16acd76be9 | 805 | py | Python | gordon/configurations/github_config.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | 12 | 2021-09-09T00:57:53.000Z | 2022-02-11T00:56:12.000Z | gordon/configurations/github_config.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | null | null | null | gordon/configurations/github_config.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | 1 | 2021-09-15T15:52:08.000Z | 2021-09-15T15:52:08.000Z | from gordon.services.common.secrets_loader import get_secrets
import os
# Configuration settings for loading the secrets and URLs needed when interacting with GitHub
class GithubConfig:
def get_github_secrets(self):
_github_secrets = get_secrets("SECRET_GITHUB_SECRET")
webhook_secret = _github_sec... | 36.590909 | 93 | 0.744099 |
38dd6f383cc4389031ab881b840923998cf122eb | 4,152 | py | Python | trigger_attack/trigger_models.py | csy99/trigger-attack | 203871e894319befcaea5f8bce1d94d2ab5d859a | [
"BSD-2-Clause"
] | null | null | null | trigger_attack/trigger_models.py | csy99/trigger-attack | 203871e894319befcaea5f8bce1d94d2ab5d859a | [
"BSD-2-Clause"
] | null | null | null | trigger_attack/trigger_models.py | csy99/trigger-attack | 203871e894319befcaea5f8bce1d94d2ab5d859a | [
"BSD-2-Clause"
] | null | null | null | import torch
from copy import deepcopy
class TriggerModels(torch.nn.Module):
def __init__(self,
suspicious_model_filepath,
clean_model_filepaths,
device=torch.device('cpu')):
super(TriggerModels, self).__init__()
self.device = device
self... | 38.444444 | 97 | 0.667871 |
38dd74839e3ce6496979d500369542f642aec3b8 | 21,176 | py | Python | tests/api/v2_1_2/test_wireless.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_2/test_wireless.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_2/test_wireless.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI wireless API fixtures and tests.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, ... | 29.208276 | 313 | 0.714819 |
38dd93e8bb89600c3025bb3bc1111acb802dd4c4 | 3,818 | py | Python | alipay/aop/api/domain/AntfortuneStockMessageSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AntfortuneStockMessageSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AntfortuneStockMessageSendModel.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 *
from alipay.aop.api.domain.Kv import Kv
class AntfortuneStockMessageSendModel(object):
def __init__(self):
self._agreement_no = None
self._category = None
self._msg_id = None
... | 29.828125 | 75 | 0.559979 |
38ddc6e59c8236d66f8e610c60aa751464a6a1c2 | 30,005 | py | Python | buildkit/config.py | tommienu/ungoogled-chromium | f3e1b49f04150035e64b2222f7f041b98b2b2847 | [
"BSD-3-Clause"
] | null | null | null | buildkit/config.py | tommienu/ungoogled-chromium | f3e1b49f04150035e64b2222f7f041b98b2b2847 | [
"BSD-3-Clause"
] | null | null | null | buildkit/config.py | tommienu/ungoogled-chromium | f3e1b49f04150035e64b2222f7f041b98b2b2847 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: UTF-8 -*-
# Copyright (c) 2018 The ungoogled-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.
"""
Build configuration generation implementation
"""
import abc
import configparser
import collections
import iterto... | 38.077411 | 98 | 0.631928 |
38ddd7f575cbba2a804e5f9f58d5a2ce04f25a83 | 173,063 | py | Python | arc/scheduler.py | amarkpayne/ARC | fcc3bc0050f50a81c02192f72aaa31ea47d29818 | [
"MIT"
] | null | null | null | arc/scheduler.py | amarkpayne/ARC | fcc3bc0050f50a81c02192f72aaa31ea47d29818 | [
"MIT"
] | null | null | null | arc/scheduler.py | amarkpayne/ARC | fcc3bc0050f50a81c02192f72aaa31ea47d29818 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
"""
A module for scheduling jobs
Includes spawning, terminating, checking, and troubleshooting various jobs
"""
import datetime
import itertools
import logging
import os
import shutil
import time
from IPython.display import display
from rmgpy.reaction import Reaction
from ar... | 63.672921 | 122 | 0.558837 |
38dddf4884c628562f0bc9f5e186e037fe2d60db | 1,035 | py | Python | tests/tmp.py | MarcoMernberger/mgenomicsremotemail | e3297861c288e8f5126383c335d16ff6c87e29c7 | [
"MIT"
] | 1 | 2022-03-04T11:55:04.000Z | 2022-03-04T11:55:04.000Z | tests/tmp.py | MarcoMernberger/mgenomicsremotemail | e3297861c288e8f5126383c335d16ff6c87e29c7 | [
"MIT"
] | null | null | null | tests/tmp.py | MarcoMernberger/mgenomicsremotemail | e3297861c288e8f5126383c335d16ff6c87e29c7 | [
"MIT"
] | null | null | null | import pytest
import tarfile
import subprocess
import smtplib
from mgenomicsremotemail.dispatch import RunDispatcher
from pathlib import Path
from prompt_toolkit.input import create_pipe_input
from prompt_toolkit.output import DummyOutput
from prompt_toolkit.application.current import AppSession
from mock import patch
... | 25.875 | 57 | 0.761353 |
38dde4ddaf0dec52e0f5597e1c1d713ec296a254 | 828 | py | Python | mozz_archiver/middleware.py | michael-lazar/mozz-archiver | 12617d2efca91663699647654bcd3e40f5f388f2 | [
"BlueOak-1.0.0"
] | 9 | 2020-09-17T05:44:26.000Z | 2022-02-10T07:25:47.000Z | mozz_archiver/middleware.py | michael-lazar/mozz-archiver | 12617d2efca91663699647654bcd3e40f5f388f2 | [
"BlueOak-1.0.0"
] | 9 | 2020-09-24T03:17:40.000Z | 2020-11-07T04:34:35.000Z | mozz_archiver/middleware.py | michael-lazar/mozz-archiver | 12617d2efca91663699647654bcd3e40f5f388f2 | [
"BlueOak-1.0.0"
] | null | null | null | import logging
from scrapy.exceptions import IgnoreRequest
logger = logging.getLogger(__name__)
class URLDenyMiddleware:
"""
Downloader middleware that will ignore requests based on URL patterns.
"""
def __init__(self, urls, crawler):
self.urls = tuple(urls)
self.crawler = crawler
... | 29.571429 | 74 | 0.649758 |
38ddfc669797cd97b288a99cbcb21df94db081df | 3,630 | py | Python | keras2onnx/ke2onnx/merge.py | xadupre/keras-onnx | 17559f987ecce7ec40ab8a36a9596eb950f9b332 | [
"MIT"
] | 1 | 2020-10-26T03:03:02.000Z | 2020-10-26T03:03:02.000Z | keras2onnx/ke2onnx/merge.py | xadupre/keras-onnx | 17559f987ecce7ec40ab8a36a9596eb950f9b332 | [
"MIT"
] | null | null | null | keras2onnx/ke2onnx/merge.py | xadupre/keras-onnx | 17559f987ecce7ec40ab8a36a9596eb950f9b332 | [
"MIT"
] | null | null | null | ###############################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
###############################################################################
imp... | 55 | 118 | 0.619284 |
38ddfe8b5713f63f66e0b3c3bf3de1088c704543 | 6,878 | py | Python | sdk/tables/azure-data-tables/tests/test_table_service_properties_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/tables/azure-data-tables/tests/test_table_service_properties_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/tables/azure-data-tables/tests/test_table_service_properties_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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.
# --------------------------------------------------------------------... | 43.257862 | 136 | 0.69148 |
38de2051a9fcfeb4583759b533dcc872557c3969 | 3,402 | py | Python | src/figures/lisa_nums.py | sarahthiele/hush | 5a6a67cacd21615c9c02a6c3539c598ddf3da405 | [
"MIT"
] | 2 | 2021-12-08T20:12:41.000Z | 2022-03-08T21:21:15.000Z | src/figures/lisa_nums.py | sarahthiele/hush | 5a6a67cacd21615c9c02a6c3539c598ddf3da405 | [
"MIT"
] | 5 | 2021-11-23T21:50:48.000Z | 2022-01-05T16:34:32.000Z | src/figures/lisa_nums.py | sarahthiele/hush | 5a6a67cacd21615c9c02a6c3539c598ddf3da405 | [
"MIT"
] | 2 | 2021-11-23T21:43:31.000Z | 2021-12-06T14:07:34.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
model = "fiducial"
numsFZ = pd.read_hdf("../data/results.hdf", key="numLISA_30bins_{}_{}".format("FZ", model))
numsF50 = pd.read_hdf("../data/results.hdf", key="numLISA_30bins_{}_{}".format("F50", mode... | 22.832215 | 93 | 0.607584 |
38de38fe02f11e2a77d33867b8eb86a7a1fe61ae | 601 | py | Python | tests/test_model.py | NCPlayz/jishaku | 9e99154613d03925c94cc1be522604c6065a73bd | [
"MIT"
] | null | null | null | tests/test_model.py | NCPlayz/jishaku | 9e99154613d03925c94cc1be522604c6065a73bd | [
"MIT"
] | null | null | null | tests/test_model.py | NCPlayz/jishaku | 9e99154613d03925c94cc1be522604c6065a73bd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jishaku.models tests
~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2020 Devon (Gorialis) R
:license: MIT, see LICENSE for more details.
"""
import utils
from jishaku.models import copy_context_with
@utils.run_async
async def test_context_copy():
with utils.mock_ctx() as ctx:
await c... | 23.115385 | 68 | 0.668885 |
38de4d942b94d92ef06de831818af5ddab397420 | 46 | py | Python | backend/stock/__init__.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/stock/__init__.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/stock/__init__.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | default_app_config = "stock.apps.StockConfig"
| 23 | 45 | 0.826087 |
38de7aac9c1d364b03a6755f6cd1ff5f10ae3403 | 8,953 | py | Python | example_cycles/tests/benchmark_turboshaft_design.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | example_cycles/tests/benchmark_turboshaft_design.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | example_cycles/tests/benchmark_turboshaft_design.py | swryan/pyCycleOld | fbab35b74d0e5487abe686ae0823ff52e75afb3b | [
"Apache-2.0"
] | null | null | null | import numpy as np
import unittest
import os
from openmdao.api import Problem, IndepVarComp
from openmdao.utils.units import convert_units as cu
from openmdao.utils.assert_utils import assert_rel_error
from example_cycles.Turboshaft import Turboshaft
class TurboshaftDesignTestCase(unittest.TestCase):
def setUp... | 45.912821 | 92 | 0.638669 |
38deb222a052e36dc8a3332ec54c4b838ac0feed | 9,920 | py | Python | DeviceManager.py | jaredly/meerk40t | 446427e29104cb89fd2ee17ad824fc801d44afe0 | [
"MIT"
] | null | null | null | DeviceManager.py | jaredly/meerk40t | 446427e29104cb89fd2ee17ad824fc801d44afe0 | [
"MIT"
] | null | null | null | DeviceManager.py | jaredly/meerk40t | 446427e29104cb89fd2ee17ad824fc801d44afe0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.3 on Sat Feb 1 06:42:01 2020
#
import wx
from Kernel import Module, STATE_UNKNOWN
from icons import icons8_administrative_tools_50, icons8_down, icons8up, icons8_plus_50, icons8_trash_50
_ = wx.GetTranslation
class DeviceMana... | 48.15534 | 128 | 0.641532 |
38dee36689ce8e2e3b7687c0c7716efe8f9dfad5 | 14,153 | py | Python | trimesh/points.py | nbraem/trimesh | 63b56b90cb764e1138d6c373fab58ddff3fcae75 | [
"MIT"
] | null | null | null | trimesh/points.py | nbraem/trimesh | 63b56b90cb764e1138d6c373fab58ddff3fcae75 | [
"MIT"
] | null | null | null | trimesh/points.py | nbraem/trimesh | 63b56b90cb764e1138d6c373fab58ddff3fcae75 | [
"MIT"
] | null | null | null | """
points.py
-------------
Functions dealing with (n, d) points.
"""
import numpy as np
from .constants import tol
from .geometry import plane_transform
from .parent import Geometry
from . import util
from . import caching
from . import grouping
from . import transformations
def point_plane_distance(points,
... | 26.906844 | 83 | 0.581855 |
38dee923c6ce0302126f6137023ff12d041d0279 | 2,208 | py | Python | documentation/sphinx/examples/moore_penrose_pseudoinverse.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 54 | 2015-03-05T13:38:08.000Z | 2021-11-29T11:54:48.000Z | documentation/sphinx/examples/moore_penrose_pseudoinverse.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 7 | 2016-04-06T11:25:00.000Z | 2020-11-09T13:53:20.000Z | documentation/sphinx/examples/moore_penrose_pseudoinverse.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 13 | 2015-01-17T17:05:56.000Z | 2021-08-05T01:13:16.000Z | import numpy
from algopy import CGraph, Function, UTPM, dot, qr, eigh, inv, solve
# first order derivatives, one directional derivative
# D - 1 is the degree of the Taylor polynomial
# P directional derivatives at once
# M number of rows of A
# N number of cols of A
D,P,M,N = 2,1,5,2
# generate badly conditioned matr... | 31.098592 | 92 | 0.625453 |
38deec9d3a3c79d10582d6b5af93fe8dd75882a2 | 10,260 | py | Python | cron/dashboard.py | lukaszlacinski/dashboard | e84131d141f64f2ae41aa3726ff201ef9a626184 | [
"Apache-2.0"
] | null | null | null | cron/dashboard.py | lukaszlacinski/dashboard | e84131d141f64f2ae41aa3726ff201ef9a626184 | [
"Apache-2.0"
] | null | null | null | cron/dashboard.py | lukaszlacinski/dashboard | e84131d141f64f2ae41aa3726ff201ef9a626184 | [
"Apache-2.0"
] | null | null | null | from threading import Lock
import logging
import argparse
import os
import json
from time import sleep
from datetime import datetime, timedelta
from concurrent.futures import ThreadPoolExecutor as Executor
from globus_sdk import TransferClient, TransferData
from fair_research_login.client import NativeClient
from sqlal... | 38.863636 | 222 | 0.609454 |
38df1fb8bc44dfa9cd18035dad436149d1947d7e | 2,272 | py | Python | src/test.py | lhcezx/Graph-FPN | 55eb9283a7df83e003c84eede65a2700bb9fa45c | [
"MIT"
] | 19 | 2021-11-16T05:32:45.000Z | 2022-01-27T09:29:50.000Z | src/test.py | lhcezx/Graph-FPN | 55eb9283a7df83e003c84eede65a2700bb9fa45c | [
"MIT"
] | 1 | 2021-11-15T15:44:45.000Z | 2021-12-13T04:26:26.000Z | src/test.py | lhcezx/Graph-FPN | 55eb9283a7df83e003c84eede65a2700bb9fa45c | [
"MIT"
] | 1 | 2022-01-04T14:10:58.000Z | 2022-01-04T14:10:58.000Z | import os
import tensorflow as tf
import tensorflow_datasets as tfds
import init_path
from detection.utils.Label import *
from model.network import DecodePredictions
from detection.datasets.coco import COCO, Info
from model.get_model import models, backbone
from detection.utils.preprocess import *
from configs.configs... | 42.867925 | 195 | 0.697623 |
38df24637a6b361b4f733af1abc64f355a8df23d | 3,461 | py | Python | KijijiAPI.py | SohrabAmin/KijijiAutoPoster | 2f7993632d47d8606a1a6f8ee67d6b614c5a7d73 | [
"MIT"
] | 1 | 2020-09-15T05:06:30.000Z | 2020-09-15T05:06:30.000Z | KijijiAPI.py | SohrabAmin/KijijiAutoPoster | 2f7993632d47d8606a1a6f8ee67d6b614c5a7d73 | [
"MIT"
] | null | null | null | KijijiAPI.py | SohrabAmin/KijijiAutoPoster | 2f7993632d47d8606a1a6f8ee67d6b614c5a7d73 | [
"MIT"
] | null | null | null | from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as... | 30.901786 | 115 | 0.648368 |
38df3910f5e82b7dfed443c105397688611626aa | 1,745 | py | Python | satella/coding/structures/mixins/strings.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 12 | 2019-12-13T10:17:38.000Z | 2022-01-05T09:01:36.000Z | satella/coding/structures/mixins/strings.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 26 | 2016-04-01T11:55:26.000Z | 2021-12-30T17:03:59.000Z | satella/coding/structures/mixins/strings.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 1 | 2021-05-31T08:45:22.000Z | 2021-05-31T08:45:22.000Z | from abc import ABCMeta, abstractmethod
class StrEqHashableMixin(metaclass=ABCMeta):
"""
A mix-in that outfits your class with an __eq__ and __hash__ operator that take
their values from __str__ representation of your class.
"""
__slots__ = ()
def __eq__(self, other) -> bool:
return s... | 29.083333 | 90 | 0.584527 |
38df3ab8f9d14d900c865d997439936bd565a19c | 3,167 | py | Python | feincms/module/medialibrary/forms.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 17 | 2015-03-11T09:57:21.000Z | 2019-09-03T11:11:45.000Z | feincms/module/medialibrary/forms.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | null | null | null | feincms/module/medialibrary/forms.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 3 | 2015-07-07T06:33:11.000Z | 2020-01-29T15:45:49.000Z | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import, unicode_literals
import os
from django import forms
from django.utils.translation import gettext_lazy as _
from... | 35.988636 | 87 | 0.537101 |
38df595b1c3b67ceb535d7ef7b7afd2bd35ad0a8 | 2,020 | py | Python | webapp/home/actions.py | n3k0fi5t/ClonePttWeb | f2a5abb523c244389113b653ed20252fbcec5251 | [
"MIT"
] | null | null | null | webapp/home/actions.py | n3k0fi5t/ClonePttWeb | f2a5abb523c244389113b653ed20252fbcec5251 | [
"MIT"
] | null | null | null | webapp/home/actions.py | n3k0fi5t/ClonePttWeb | f2a5abb523c244389113b653ed20252fbcec5251 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.urls import reverse
from crawl.tasks import period_crawl_task
from crawl.models import Crawler
from post.models import Board, Post
from utils.paginate import paginate
from utils.response import http_response_data
from utils.request_params import param2str
cla... | 31.076923 | 78 | 0.616337 |
38df6e800b48d63e4ecc81723c5efe47dea64339 | 984 | py | Python | Bookmark Manager/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | Bookmark Manager/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | Bookmark Manager/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | # Empty List To Fill Later
myFavouriteWebs = []
# Maximum Allowed Website's
maximumWebs = 5
while maximumWebs > 0:
# Input The New Website
webSite = input("\nWebsite Name Without https://")
# Add The New Website To The List
myFavouriteWebs.append(f"https://{webSite.strip().lower()}")
# Decrease ... | 24 | 64 | 0.656504 |
38dfa13e111971e20ea34ab39ce98aab48b819f6 | 2,965 | py | Python | auto3dgm/app.py | hkirvesl/auto3dgm | e2132a992616c430f60af4871a62c0167e0917da | [
"MIT"
] | null | null | null | auto3dgm/app.py | hkirvesl/auto3dgm | e2132a992616c430f60af4871a62c0167e0917da | [
"MIT"
] | null | null | null | auto3dgm/app.py | hkirvesl/auto3dgm | e2132a992616c430f60af4871a62c0167e0917da | [
"MIT"
] | null | null | null | """
Main control flow for auto3dgm. Mainly used as a speculative document for now.
"""
from auto3dgm.dataset.datasetfactory import DatasetFactory
from auto3dgm.mesh.subsample import Subsample
from auto3dgm.analysis.correspondence import Correspondence
class Auto3dgm:
def __init__(self, config={}, run=True):
self.m... | 36.158537 | 214 | 0.757504 |
38dfacdfd57cacc97d93318571a0765be07b9379 | 69,855 | py | Python | mne/io/fiff/tests/test_raw_fiff.py | jorisvandenbossche/mne-python | 0c4db6f8ef12999d119085aa7c496cadb32411bd | [
"BSD-3-Clause"
] | null | null | null | mne/io/fiff/tests/test_raw_fiff.py | jorisvandenbossche/mne-python | 0c4db6f8ef12999d119085aa7c496cadb32411bd | [
"BSD-3-Clause"
] | null | null | null | mne/io/fiff/tests/test_raw_fiff.py | jorisvandenbossche/mne-python | 0c4db6f8ef12999d119085aa7c496cadb32411bd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
from copy import deepcopy
from functools import partial
from io import BytesIO
import os
import os.path as op
import pathlib
import pickle
import sys
impor... | 40.708042 | 79 | 0.65195 |
38dfbae6fbfe65250aed9b9aa5a4882b78028a1a | 1,911 | py | Python | ginga/aggw/ImageViewCanvasAgg.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | 1 | 2019-04-27T01:34:27.000Z | 2019-04-27T01:34:27.000Z | ginga/aggw/ImageViewCanvasAgg.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/aggw/ImageViewCanvasAgg.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | #
# ImageViewCanvasAgg.py -- A FITS image widget with canvas drawing in Agg
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga.aggw import ImageViewAgg
from gin... | 30.333333 | 75 | 0.645212 |
38dfcf63d11360b4e034f250ae807a0b1401afdf | 346 | py | Python | abc/abc247/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc247/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc247/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
S = ns()
ans = []
ans.append('0')
for i in range(3):
ans.append... | 18.210526 | 53 | 0.66185 |
38dfdefaa8561e9d2dba9154e643adfeab2be9ee | 13,631 | py | Python | helpcenter/tests/test_models.py | smalls12/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | 4 | 2017-07-30T17:43:36.000Z | 2021-09-14T04:26:37.000Z | helpcenter/tests/test_models.py | cdriehuys/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | 20 | 2016-06-30T04:52:26.000Z | 2016-09-30T04:52:15.000Z | helpcenter/tests/test_models.py | cdriehuys/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | null | null | null | from datetime import timedelta
from django.core.urlresolvers import reverse
from django.test import TestCase, override_settings
from django.utils import timezone
from django.utils.text import slugify
from helpcenter import models
from helpcenter.testing_utils import (
create_article, create_category, instance_to_... | 32.610048 | 77 | 0.646468 |
38dff6bd57ed4b14fada736e6a9a789f8332f093 | 1,320 | py | Python | Tool_naive_ngram_generator/my_ngram.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 14 | 2018-05-21T05:12:25.000Z | 2021-11-28T14:49:55.000Z | Tool_naive_ngram_generator/my_ngram.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 2 | 2018-11-28T20:59:37.000Z | 2021-07-27T22:39:33.000Z | Tool_naive_ngram_generator/my_ngram.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 6 | 2019-03-21T01:07:57.000Z | 2021-03-29T03:24:33.000Z | from collections import defaultdict, deque, Counter
# adapted from http://pit-claudel.fr/clement/blog/an-experimental-estimation-of-the-entropy-of-english-in-50-lines-of
# -python-code/ which I used in my ECE 587 course hmwk
def markov_model(stream, model_order):
model, stats = defaultdict(Counter), Counter()
... | 33.846154 | 117 | 0.65 |
38e0071ac9ab584e13fff49f01e019365f664b2e | 895 | py | Python | MachineLearning/TP7/displayFeatures2d.py | piwithy/ENSTA_MACHINE_LEARNING | 8a58b230f150ca7ceaf340086f15d0d3535d2859 | [
"MIT"
] | null | null | null | MachineLearning/TP7/displayFeatures2d.py | piwithy/ENSTA_MACHINE_LEARNING | 8a58b230f150ca7ceaf340086f15d0d3535d2859 | [
"MIT"
] | null | null | null | MachineLearning/TP7/displayFeatures2d.py | piwithy/ENSTA_MACHINE_LEARNING | 8a58b230f150ca7ceaf340086f15d0d3535d2859 | [
"MIT"
] | null | null | null | #%% package
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#%% def loadImages
def displayFeatures2d(feat, group=None):
'''
Fonction permettant de visualiser les descripteurs en 2D
appels possibles:
- displayFeatures2d(feat)
- displayFeatures2d(feat,group) si on a les... | 26.323529 | 100 | 0.661453 |
38e02ee3b5e41e19226f06c9400a2b33271b2cbe | 1,740 | py | Python | api/tests/utils.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | api/tests/utils.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | api/tests/utils.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | import json
import sys
from pathlib import Path
import yaml
# Conventions
CONVERTED_SUFFIX = "-converted.yaml"
def specs_folder():
here = Path(sys.argv[0] if __name__ == "__main__" else __file__).resolve().parent
return here.parent / "specs"
def list_files_in_api_specs(wildcard):
""" H... | 30 | 172 | 0.679885 |
38e02effaaf30386f0a0a9712f00217e238bab68 | 13,605 | py | Python | var/spack/repos/builtin/packages/cudnn/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 348 | 2015-12-30T04:05:54.000Z | 2022-02-21T10:57:53.000Z | var/spack/repos/builtin/packages/cudnn/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3,994 | 2015-12-09T09:43:00.000Z | 2017-11-04T02:46:39.000Z | var/spack/repos/builtin/packages/cudnn/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 359 | 2015-12-16T18:25:55.000Z | 2017-11-02T14:51:13.000Z | # Copyright 2013-2021 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)
import os
import platform
from spack import *
_versions = {
# cuDNN 8.3.1
'8.3.1.22-11.5': {
'Linux-x86_... | 48.41637 | 120 | 0.695406 |
38e03128a44aeb00e535323637699b550eb7d307 | 1,614 | py | Python | tests/test_integration.py | mcataford/slack-status-cli | c24f08b5115dfadca259adf6802ead93d2ffb119 | [
"MIT"
] | null | null | null | tests/test_integration.py | mcataford/slack-status-cli | c24f08b5115dfadca259adf6802ead93d2ffb119 | [
"MIT"
] | 5 | 2022-03-18T00:35:15.000Z | 2022-03-18T21:47:02.000Z | tests/test_integration.py | mcataford/slack-status-cli | c24f08b5115dfadca259adf6802ead93d2ffb119 | [
"MIT"
] | null | null | null | import unittest.mock
import urllib.parse
import os
import sys
import typing
import slack_status_cli.main
class MockResponse(typing.NamedTuple):
"""
Stand-in for http.client.HTTPResponse.
"""
status: int
response_text: str
def read(self):
return self.response_text
def test_errors_i... | 26.9 | 83 | 0.697646 |
38e03a8da4b4e15a1dfdb4099d105884c61d7bb0 | 13,342 | py | Python | clif/python/types_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 966 | 2017-04-18T04:14:04.000Z | 2022-03-03T21:22:44.000Z | clif/python/types_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 48 | 2017-05-02T23:51:29.000Z | 2021-12-06T19:10:11.000Z | clif/python/types_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 135 | 2017-04-26T06:15:30.000Z | 2022-01-07T02:17:20.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may 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,... | 46.487805 | 143 | 0.628392 |
38e042726028734e0ee04322f93fbed2aa42e5cc | 1,671 | py | Python | asposewordscloud/models/responses/delete_watermark_online_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/responses/delete_watermark_online_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/responses/delete_watermark_online_response.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="delete_watermark_online_response.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaini... | 49.147059 | 85 | 0.67325 |
38e067b81341057b398be8c5b58bd0f20a94d29c | 1,581 | py | Python | backend/runners/load_addresses.py | bayesimpact/tds-frontend | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 15 | 2018-05-08T23:54:38.000Z | 2020-03-07T20:46:37.000Z | backend/runners/load_addresses.py | akegan/encompass | 85852a91c646c62e8cd05f9c2b0c7cf0079ea7f2 | [
"Apache-2.0"
] | 297 | 2018-02-05T19:04:26.000Z | 2022-02-12T07:52:37.000Z | backend/runners/load_addresses.py | bayesimpact/tds | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 6 | 2018-05-21T19:51:15.000Z | 2019-03-21T19:20:27.000Z | """Runner to load addresses to databse from a CSV."""
import argparse
import csv
from backend.lib.database.postgres import connect, methods, postgis
from backend.lib.database.tables import address
def _get_arguments():
"""Build argument parser."""
parser = argparse.ArgumentParser(description="""
This... | 26.79661 | 91 | 0.629981 |
38e0695b0719f33f95f78ad1eb9e60ad2e01537d | 5,654 | py | Python | src/utils.py | ModOrganizer2/modorganizer-installer_wizard | fb91a1d2b64a18e258abf00f0320c2ea46875198 | [
"MIT"
] | null | null | null | src/utils.py | ModOrganizer2/modorganizer-installer_wizard | fb91a1d2b64a18e258abf00f0320c2ea46875198 | [
"MIT"
] | null | null | null | src/utils.py | ModOrganizer2/modorganizer-installer_wizard | fb91a1d2b64a18e258abf00f0320c2ea46875198 | [
"MIT"
] | 1 | 2020-11-25T16:41:19.000Z | 2020-11-25T16:41:19.000Z | # -*- encoding: utf-8 -*-
import re
from pathlib import Path
from typing import Dict, List, Mapping
from wizard.tweaks import WizardINISetting, WizardINISettingEdit
def make_obscript_ini_tweaks(tweaks: List[WizardINISetting]) -> str:
lines = []
for tweak in tweaks:
if not isinstance(tweak, Wizard... | 32.494253 | 88 | 0.577644 |
38e0736807f02ac7826489ee64eed3c9da8ffbfa | 12,104 | py | Python | src/streamlink/plugins/youtube.py | TacticalCode/streamlink | a85d364defcf2b3fc1dac3f64b13d4b654445e94 | [
"BSD-2-Clause"
] | 1 | 2018-09-25T04:13:04.000Z | 2018-09-25T04:13:04.000Z | src/streamlink/plugins/youtube.py | TacticalCode/streamlink | a85d364defcf2b3fc1dac3f64b13d4b654445e94 | [
"BSD-2-Clause"
] | 1 | 2018-09-26T04:33:51.000Z | 2018-09-26T04:33:51.000Z | src/streamlink/plugins/youtube.py | livingbio/streamlink | e2a4d1e21fbd0e4d43da77b31f4acbb51eed0397 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
import argparse
import logging
import re
from streamlink.compat import parse_qsl, is_py2
from streamlink.plugin import Plugin, PluginError, PluginArguments, PluginArgument
from streamlink.plugin.api import validate, useragents
from streamlink.plugin.api.utils import parse_query... | 33.715877 | 112 | 0.543291 |
38e08268bea420d49e1faf6df4487f835c995403 | 1,920 | py | Python | contrib/opencensus-ext-dbapi/setup.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-dbapi/setup.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-dbapi/setup.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 37.647059 | 125 | 0.681771 |
38e093639efd990e26cc189dbe7275e50af3859d | 5,047 | py | Python | sahara_plugin_cdh/plugins/cdh/client/http_client.py | tellesnobrega/sahara-plugin-cdh | c6a8a3e11b40ee36a8b41069f2cb96c029461b65 | [
"Apache-2.0"
] | null | null | null | sahara_plugin_cdh/plugins/cdh/client/http_client.py | tellesnobrega/sahara-plugin-cdh | c6a8a3e11b40ee36a8b41069f2cb96c029461b65 | [
"Apache-2.0"
] | null | null | null | sahara_plugin_cdh/plugins/cdh/client/http_client.py | tellesnobrega/sahara-plugin-cdh | c6a8a3e11b40ee36a8b41069f2cb96c029461b65 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 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... | 35.048611 | 79 | 0.632257 |
38e0d6e2357720db66a41bd009d8b154eed66a21 | 1,190 | py | Python | setup.py | jaimeviloria/jvstats | e3ca3517447dcff482b319966f65aaca024fecee | [
"MIT"
] | null | null | null | setup.py | jaimeviloria/jvstats | e3ca3517447dcff482b319966f65aaca024fecee | [
"MIT"
] | null | null | null | setup.py | jaimeviloria/jvstats | e3ca3517447dcff482b319966f65aaca024fecee | [
"MIT"
] | null | null | null | from codecs import open as codecs_open
from setuptools import setup, find_packages
import os
with codecs_open('README.md', encoding='utf-8') as f:
long_description = f.read()
install_requires = ['click']
tests_require = ['pytest','pytest-cov','pytest-console-scripts','pytest-mock']
extras_require = {}
setup_requi... | 25.319149 | 78 | 0.667227 |
38e0ec2bb9614b8658cc066b96442953e0b5a1f2 | 8,988 | py | Python | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_link_resources_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_link_resources_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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.064171 | 201 | 0.662216 |
38e10d7c7e0c989cc6ae4c0dc53508476a48647d | 7,961 | py | Python | Main/scrappers/production_by_well.py | Gitrocha2/MarineTraffic | d124952016861e046cdc98e1a916adb3e4429dbe | [
"MIT"
] | null | null | null | Main/scrappers/production_by_well.py | Gitrocha2/MarineTraffic | d124952016861e046cdc98e1a916adb3e4429dbe | [
"MIT"
] | null | null | null | Main/scrappers/production_by_well.py | Gitrocha2/MarineTraffic | d124952016861e046cdc98e1a916adb3e4429dbe | [
"MIT"
] | null | null | null | import io
import re
import datetime as dt
import csv
import requests
from bs4 import BeautifulSoup as bs
import db_helper as db
from wmscrape import runtime, helpers
from wmscrape.runtime.logger import get_logger
THIS_RUN_DATE = dt.datetime.now()
EXISTING_FILES = {}
HOME_PAGE_URL = 'http://www.anp.gov.br'
# PROD_PA... | 28.130742 | 121 | 0.62869 |
38e117686a7b1436af740f5f2bf01a9b71d3fd23 | 2,313 | py | Python | src/models.py | KaiFabi/NeuroEvolution | 2ecbff626547e3745ba51135f43bce606f93f404 | [
"MIT"
] | null | null | null | src/models.py | KaiFabi/NeuroEvolution | 2ecbff626547e3745ba51135f43bce606f93f404 | [
"MIT"
] | null | null | null | src/models.py | KaiFabi/NeuroEvolution | 2ecbff626547e3745ba51135f43bce606f93f404 | [
"MIT"
] | null | null | null | """Module holds class definition of fully-connected neural network.
Class allows to build multilayer perceptron of arbitrary depth and width.
"""
from functools import reduce
import torch
from torch import nn
class MLP(nn.Module):
"""Fully connected neural network.
Network uses Tanh activation functions t... | 28.9125 | 80 | 0.619974 |
38e11ac2f63c8dc05d17811b7728e482140913be | 1,141 | py | Python | attic/tests/post-deployment/tests/smoke/test_validate_bdd_tests.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | null | null | null | attic/tests/post-deployment/tests/smoke/test_validate_bdd_tests.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 3 | 2019-10-25T13:38:56.000Z | 2022-03-30T09:13:33.000Z | attic/tests/post-deployment/tests/smoke/test_validate_bdd_tests.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 2 | 2019-11-04T09:59:06.000Z | 2020-05-07T11:05:42.000Z | import logging
import os
from pathlib import Path
from unittest.mock import MagicMock
import pytest
from ska_ser_skallop.scripts.bdd_helper_scripts.xtp_compare import (
file_differences,
get_file_paths,
)
@pytest.mark.xfail
@pytest.mark.common
@pytest.mark.quarantine
def test_validate_bdd_features():
"""M... | 31.694444 | 91 | 0.744961 |
38e133a8b5489e44c6d4274d6d949dd4e2cf00d9 | 1,444 | py | Python | python/osr/osr_util.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | null | null | null | python/osr/osr_util.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | 4 | 2017-01-25T18:11:31.000Z | 2017-04-04T20:51:45.000Z | python/osr/osr_util.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 29.469388 | 75 | 0.735457 |
38e15d0c2ef1019d3e377a9e22bf090dfd8fa32f | 1,758 | py | Python | obs/dokuwiki/gen_front_page.py | phillip-hopper/tools | 8c2c66872ac1d3f89a90b34ffce16c3677e28a9c | [
"MIT"
] | null | null | null | obs/dokuwiki/gen_front_page.py | phillip-hopper/tools | 8c2c66872ac1d3f89a90b34ffce16c3677e28a9c | [
"MIT"
] | null | null | null | obs/dokuwiki/gen_front_page.py | phillip-hopper/tools | 8c2c66872ac1d3f89a90b34ffce16c3677e28a9c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
#
# Copyright (c) 2014 unfoldingWord
# http://creativecommons.org/licenses/MIT/
# See LICENSE file for details.
#
# Contributors:
# Jesse Griffin <jesse@distantshores.org>
#
'''
Returns version number of specified language.
'''
import os
import sys
import json
import ... | 24.416667 | 132 | 0.629693 |
38e1694736dbefd714ea496f3d8dd2403cc41cda | 57,247 | py | Python | autotest/utilities/test_gdalwarp.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2015-04-21T19:52:03.000Z | 2015-04-21T19:52:03.000Z | autotest/utilities/test_gdalwarp.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2016-04-04T09:14:19.000Z | 2016-04-14T19:17:10.000Z | autotest/utilities/test_gdalwarp.py | pramsey/gdal | 965421b79fe4d3332b0f2f633b072fdcab2b700a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: gdalwarp testing
# Author: Even Rouault <even dot rouault @ mines-paris dot org>
#
########################################################... | 33.654909 | 276 | 0.628539 |
38e1941753d44b46f5a7bdd035969625e8e4f8ca | 8,437 | py | Python | gslib/commands/bucketpolicyonly.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 649 | 2015-01-08T01:50:15.000Z | 2022-03-31T08:33:38.000Z | gslib/commands/bucketpolicyonly.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 798 | 2015-01-02T07:46:09.000Z | 2022-03-31T20:37:19.000Z | gslib/commands/bucketpolicyonly.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 315 | 2015-01-02T10:26:53.000Z | 2022-03-27T02:18:58.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 36.52381 | 87 | 0.710205 |
38e1a78f0693c20dde190eda101a9563e52e43ab | 1,908 | py | Python | app/enquiries/celery.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | 3 | 2020-04-03T12:16:56.000Z | 2020-12-09T18:18:49.000Z | app/enquiries/celery.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | 173 | 2020-03-18T09:31:50.000Z | 2022-03-26T04:19:41.000Z | app/enquiries/celery.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | null | null | null | import os
from celery import Celery
from celery.schedules import crontab
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings.common")
app = Celery("app")
# Using a string here means the worker will not have ... | 37.411765 | 86 | 0.719078 |
38e1c729bafbb07865a50b526ed396fd93d212cd | 1,053 | py | Python | test.py | Omri-L/QuadMeshCNN | 61646019da37adb2d0c510d75951ce6051dd0d62 | [
"MIT"
] | null | null | null | test.py | Omri-L/QuadMeshCNN | 61646019da37adb2d0c510d75951ce6051dd0d62 | [
"MIT"
] | null | null | null | test.py | Omri-L/QuadMeshCNN | 61646019da37adb2d0c510d75951ce6051dd0d62 | [
"MIT"
] | null | null | null | from options.test_options import TestOptions
from data import DataLoader
from models import create_model
from util.writer import Writer
import numpy as np
def run_test(epoch=-1):
print('Running Test')
opt = TestOptions().parse()
opt.serial_batches = True # no shuffle
dataset = DataLoader(opt)
mod... | 30.085714 | 83 | 0.698006 |
38e1c7bfeb8fb1db47155e28f21323f94db32201 | 18,467 | py | Python | pvops/timeseries/models/linear.py | kanderso-nrel/pvOps | f50b4090adbb92067310804dc1c782b4c2f79397 | [
"BSD-3-Clause"
] | null | null | null | pvops/timeseries/models/linear.py | kanderso-nrel/pvOps | f50b4090adbb92067310804dc1c782b4c2f79397 | [
"BSD-3-Clause"
] | null | null | null | pvops/timeseries/models/linear.py | kanderso-nrel/pvOps | f50b4090adbb92067310804dc1c782b4c2f79397 | [
"BSD-3-Clause"
] | null | null | null | # Source
import itertools
from sklearn.linear_model import LinearRegression, RANSACRegressor
import numpy as np
from sklearn.metrics import mean_squared_error, r2_score
import pandas as pd
def _array_from_df(df, X_parameters):
return np.vstack([df[xcol].values for xcol in X_parameters]).T
class Model:
"""Li... | 35.309751 | 113 | 0.584773 |
38e1d0ec65d4be314894c3182cc989e93a8859b2 | 34,375 | py | Python | yt_dlp/__init__.py | damianoamatruda/yt-dlp | 705e7c2005dfe67a905e18736c9f6345ee9d386b | [
"Unlicense"
] | 1 | 2022-01-03T19:13:33.000Z | 2022-01-03T19:13:33.000Z | yt_dlp/__init__.py | XkaV/yt-dlp | fee3f44f5f58274c637499f077aa0312e650f493 | [
"Unlicense"
] | null | null | null | yt_dlp/__init__.py | XkaV/yt-dlp | fee3f44f5f58274c637499f077aa0312e650f493 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
f'You are using an unsupported version of Python. Only Python versions 3.6 and above are supported by yt-dlp' # noqa: F541
__license__ = 'Public Domain'
import codecs
import io
import itertools
import os
import random
import re
import sys
from .options import (
parseOpts,... | 43.293451 | 223 | 0.658822 |
38e1de9f384b85a6af78ed26c8b784a378caa5f9 | 28,041 | py | Python | splunk_eventgen/eventgen_core.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | null | null | null | splunk_eventgen/eventgen_core.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | null | null | null | splunk_eventgen/eventgen_core.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from lib.eventgenconfig import Config
from lib.eventgentimer import Timer
from lib.eventgenexceptions import PluginNotLoaded, FailedLoadingPlugin
import logging
import logging.config
import os
import sys
import imp
from Queue import Queue, Empty
from threading import Thread
impor... | 48.513841 | 228 | 0.615171 |
38e1e6950bb0e21356a79abfeee64b76fbae0907 | 5,695 | py | Python | airflow/executors/debug_executor.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 3 | 2015-08-25T13:56:44.000Z | 2020-03-21T10:26:58.000Z | airflow/executors/debug_executor.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | airflow/executors/debug_executor.py | santecapital/airflow | 7f02e56c9cb8b548624d13e9c2c2b89d753f996b | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2018-07-24T08:54:45.000Z | 2018-08-31T13:41:50.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... | 36.980519 | 104 | 0.631958 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.