hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e9ec4193774aba9d1981df6bc8be646424e0fb9 | 472 | py | Python | hypergan/losses/wasserstein_loss.py | Darkar25/HyperGAN | 76ef7e0c20569ceece88dc76396d92c77050692b | [
"MIT"
] | 1 | 2019-05-29T14:24:04.000Z | 2019-05-29T14:24:04.000Z | hypergan/losses/wasserstein_loss.py | KonradLinkowski/HyperGAN | 3153daee838dbb8e8d8926b1e81419682a24f2fe | [
"MIT"
] | 218 | 2021-05-25T01:46:15.000Z | 2022-02-11T01:08:52.000Z | hypergan/losses/wasserstein_loss.py | KonradLinkowski/HyperGAN | 3153daee838dbb8e8d8926b1e81419682a24f2fe | [
"MIT"
] | null | null | null | import tensorflow as tf
import hyperchamber as hc
from hypergan.losses.base_loss import BaseLoss
class WassersteinLoss(BaseLoss):
def _create(self, d_real, d_fake):
config = self.config
print("Initializing Wasserstein loss", config.reverse)
if(config.reverse):
d_loss = -d_rea... | 23.6 | 62 | 0.625 |
0d89974ac069013a71917eaa10a1e7d37838b6cd | 55,093 | py | Python | insomniac/views.py | singulart/Insomniac | 5d18a7ede5d03d2f590b7752911b9d86d93aadcd | [
"MIT"
] | null | null | null | insomniac/views.py | singulart/Insomniac | 5d18a7ede5d03d2f590b7752911b9d86d93aadcd | [
"MIT"
] | null | null | null | insomniac/views.py | singulart/Insomniac | 5d18a7ede5d03d2f590b7752911b9d86d93aadcd | [
"MIT"
] | null | null | null | import datetime
from enum import Enum
from typing import Optional
from insomniac.actions_types import GetProfileAction
from insomniac.counters_parser import parse
from insomniac.device_facade import DeviceFacade
from insomniac.scroll_end_detector import ScrollEndDetector
from insomniac.sleeper import sleeper
from inso... | 41.052906 | 140 | 0.610622 |
23d7b7b84a1fddcde311bf5f0045b5af1ab28ec7 | 8,083 | py | Python | train.py | lemonhu/RE-CNN-pytorch | 6776e34f4842a43dde90faec43970bc7a487e944 | [
"MIT"
] | 49 | 2018-12-21T06:17:20.000Z | 2021-12-30T10:46:51.000Z | train.py | lemonhu/RE-CNN-pytorch | 6776e34f4842a43dde90faec43970bc7a487e944 | [
"MIT"
] | 3 | 2019-02-28T00:04:02.000Z | 2021-08-08T15:07:54.000Z | train.py | lemonhu/RE-CNN-pytorch | 6776e34f4842a43dde90faec43970bc7a487e944 | [
"MIT"
] | 11 | 2019-03-31T16:47:04.000Z | 2021-05-07T19:25:22.000Z | """Train and evaluate the model"""
import argparse
import logging
import os
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import LambdaLR
from tqdm import trange
import tools.utils as utils
import model.net as net
from tools.data_loader import DataLoader
from evaluate i... | 40.014851 | 129 | 0.634418 |
c02aac31ec029df374780586a801f9bcf703f732 | 7,407 | py | Python | install/services/Glidein.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | null | null | null | install/services/Glidein.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | 3 | 2015-12-02T19:37:45.000Z | 2016-01-20T03:21:48.000Z | install/services/Glidein.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | 1 | 2015-12-01T23:02:41.000Z | 2015-12-01T23:02:41.000Z | #!/usr/bin/env python
import traceback
import sys,os,os.path,string,time
import optparse
import common
from Configuration import ConfigurationError
from Configuration import Configuration
from Configuration import ConfigurationError
import VDTClient
#STARTUP_DIR=sys.path[0]
#sys.path.append(os.path.join(STARTUP_DIR,... | 34.291667 | 109 | 0.620899 |
d0a013e31875788027a2d16ea2e906844eada94b | 1,529 | py | Python | 19-Attribute-And-Property/19-05-Shelve1.py | xiaohui100/FluentPython | b65fad00e724598657c21660ffa8fa9c5507cf3e | [
"MIT"
] | null | null | null | 19-Attribute-And-Property/19-05-Shelve1.py | xiaohui100/FluentPython | b65fad00e724598657c21660ffa8fa9c5507cf3e | [
"MIT"
] | null | null | null | 19-Attribute-And-Property/19-05-Shelve1.py | xiaohui100/FluentPython | b65fad00e724598657c21660ffa8fa9c5507cf3e | [
"MIT"
] | null | null | null | """
@author: Alfons
@contact: alfons_xh@163.com
@file: 19-05-Shelve1.py
@time: 18-8-17 下午10:36
@version: v1.0
"""
import os
import requests
import json
DATA_URL = "http://www.oreilly.com/pub/sc/osconfeed"
STORE_FILE = "data/osconfeed.json"
def Load():
"""
加载目标json数据
:return: 数据的dict格式
"""
if not... | 22.820896 | 95 | 0.646174 |
eac1042ad236408336213472f74539d592aa4a31 | 78,575 | py | Python | src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models_py3.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | null | null | null | src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models_py3.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | src/monitor-control-service/azext_amcs/vendored_sdks/amcs/models/_models_py3.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 1 | 2022-03-10T22:13:02.000Z | 2022-03-10T22:13:02.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 ... | 40.294872 | 290 | 0.674438 |
ec6556f41cfa0334799d5865070fdca5ebfab195 | 3,235 | py | Python | profiles_project/settings.py | IsaiahAim/profiles-rest-api | 933aed151647c0aabbb9fc8b0d1480bb782ae503 | [
"MIT"
] | null | null | null | profiles_project/settings.py | IsaiahAim/profiles-rest-api | 933aed151647c0aabbb9fc8b0d1480bb782ae503 | [
"MIT"
] | null | null | null | profiles_project/settings.py | IsaiahAim/profiles-rest-api | 933aed151647c0aabbb9fc8b0d1480bb782ae503 | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... | 25.674603 | 91 | 0.700464 |
3e5ba8b22b18c3a55b22a04427c0b70ddbca99b4 | 318 | py | Python | test/sagemaker_tests/tensorflow/tensorflow2_training/resources/smmodelparallel/utils.py | Yixiao99/deep-learning-containers | 01f078adf5abfb92e802b326511981bdd4a8c85c | [
"Apache-2.0"
] | 383 | 2020-05-19T18:09:10.000Z | 2022-03-29T22:41:05.000Z | test/sagemaker_tests/tensorflow/tensorflow2_training/resources/smmodelparallel/utils.py | Yixiao99/deep-learning-containers | 01f078adf5abfb92e802b326511981bdd4a8c85c | [
"Apache-2.0"
] | 551 | 2020-05-27T17:25:50.000Z | 2022-03-31T18:00:35.000Z | test/sagemaker_tests/tensorflow/tensorflow2_training/resources/smmodelparallel/utils.py | Yixiao99/deep-learning-containers | 01f078adf5abfb92e802b326511981bdd4a8c85c | [
"Apache-2.0"
] | 263 | 2020-05-19T18:17:12.000Z | 2022-03-29T22:41:10.000Z | # Standard Library
import inspect
import os
def log_result(label, res):
frame = inspect.stack()[1]
module = inspect.getmodule(frame[0])
filename = os.path.basename(module.__file__)
filename = filename.split(".")[0]
print("[SMP_METRIC]__" + filename + "__" + str(label) + "__" + str(res) + "\n")
| 24.461538 | 83 | 0.644654 |
42cf7762268ef8cc9148ff31bd33d00efae9caf1 | 80 | py | Python | VSCode_work/chapter4/chapter4_4_4.py | syncccc/Python-Crash-Course | 51fe429dd606583a790f3c1603bb3439382c09e0 | [
"MIT"
] | 1 | 2021-08-15T15:58:21.000Z | 2021-08-15T15:58:21.000Z | VSCode_work/chapter4/chapter4_4_4.py | syncccc/Python-Crash-Course | 51fe429dd606583a790f3c1603bb3439382c09e0 | [
"MIT"
] | null | null | null | VSCode_work/chapter4/chapter4_4_4.py | syncccc/Python-Crash-Course | 51fe429dd606583a790f3c1603bb3439382c09e0 | [
"MIT"
] | null | null | null | numbers = ['1','2','3','4','5']
# 打印元素
for number in numbers:
print(number)
| 16 | 31 | 0.5625 |
7189286c16096a5291c757ba1d05c01cdd9cab59 | 4,627 | py | Python | TensorFlow/train_dataloader.py | FilippoAleotti/SistemiDigitaliM | 7a6a5827fc2fcb81f26cfca24755359f21a39889 | [
"MIT"
] | 2 | 2020-09-23T12:17:55.000Z | 2020-10-05T18:29:15.000Z | TensorFlow/train_dataloader.py | FilippoAleotti/SistemiDigitaliM | 7a6a5827fc2fcb81f26cfca24755359f21a39889 | [
"MIT"
] | null | null | null | TensorFlow/train_dataloader.py | FilippoAleotti/SistemiDigitaliM | 7a6a5827fc2fcb81f26cfca24755359f21a39889 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import argparse
import time
import random
import os
import cv2
import datetime
from utils import prepare_label, read_labels, extract_central_crop
from networks.factory import get_network
import imutils
parser = argparse.ArgumentParser(description='Run a training of the Networ... | 43.242991 | 164 | 0.663281 |
63393559a64ae83615e8c6333c28fac6be715349 | 203 | py | Python | src/services/hotel-v1-python/app/errors/item_not_found.py | gauthiersiri/instana-openshift | b6ed8e4ecb1c681d1fb4e19eb5a8fbf4fa8532de | [
"Apache-2.0"
] | 5 | 2021-06-16T23:14:20.000Z | 2022-01-07T02:31:39.000Z | src/services/hotel-v1-python/app/errors/item_not_found.py | gauthiersiri/instana-openshift | b6ed8e4ecb1c681d1fb4e19eb5a8fbf4fa8532de | [
"Apache-2.0"
] | 17 | 2020-02-18T20:55:51.000Z | 2021-06-02T03:38:53.000Z | src/services/hotel-v1-python/app/errors/item_not_found.py | gauthiersiri/instana-openshift | b6ed8e4ecb1c681d1fb4e19eb5a8fbf4fa8532de | [
"Apache-2.0"
] | 34 | 2021-04-16T09:36:50.000Z | 2022-03-04T18:12:13.000Z | class ItemNotFoundException(Exception):
def __init__(self, id):
super().__init__("{0} Not found in DB".format(id))
self.errors = "Item Not Found Exception"
print(self.errors)
| 33.833333 | 58 | 0.650246 |
637fc1123eae2cd47ab561971ac73e10501ad348 | 2,660 | py | Python | tf1/rnn.py | lcl1026504480/mfpython | c1b1689a42488129299e31152764c535eb8e66e0 | [
"MIT"
] | null | null | null | tf1/rnn.py | lcl1026504480/mfpython | c1b1689a42488129299e31152764c535eb8e66e0 | [
"MIT"
] | null | null | null | tf1/rnn.py | lcl1026504480/mfpython | c1b1689a42488129299e31152764c535eb8e66e0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 8 11:10:06 2020
@author: lenovouser
"""
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# Hyper Parameters
TIME_STEP = 10 # rnn time step
INPUT_SIZE = 1 # rnn input size
CELL_SIZE = 32 # rnn cell size
LR = 0.02 # le... | 40.30303 | 120 | 0.631203 |
a71097d346eca1a940cdb909a7857d81626f6609 | 16,490 | py | Python | python/fate_client/pipeline/utils/invoker/job_submitter.py | qixiuai/FATE | 6d50af65b96b5b226afda30dfa8e4a1e5746952d | [
"Apache-2.0"
] | null | null | null | python/fate_client/pipeline/utils/invoker/job_submitter.py | qixiuai/FATE | 6d50af65b96b5b226afda30dfa8e4a1e5746952d | [
"Apache-2.0"
] | null | null | null | python/fate_client/pipeline/utils/invoker/job_submitter.py | qixiuai/FATE | 6d50af65b96b5b226afda30dfa8e4a1e5746952d | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.083141 | 119 | 0.547119 |
0b8faf317e65360d408b20d346c5a502085dad2e | 66 | py | Python | acq4/analysis/modules/AtlasBuilder/__init__.py | aleonlein/acq4 | 4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555 | [
"MIT"
] | 47 | 2015-01-05T16:18:10.000Z | 2022-03-16T13:09:30.000Z | acq4/analysis/modules/AtlasBuilder/__init__.py | aleonlein/acq4 | 4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555 | [
"MIT"
] | 48 | 2015-04-19T16:51:41.000Z | 2022-03-31T14:48:16.000Z | acq4/analysis/modules/AtlasBuilder/__init__.py | sensapex/acq4 | 9561ba73caff42c609bd02270527858433862ad8 | [
"MIT"
] | 32 | 2015-01-15T14:11:49.000Z | 2021-07-15T13:44:52.000Z | from __future__ import print_function
from .AtlasBuilder import *
| 22 | 37 | 0.848485 |
7e4f0e2058711b75544d0b3d74a3d2c9f8f9eb26 | 4,221 | py | Python | python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py | Beovolytics-Inc/0x-monorepo | 8a20cc682cd620cc5bed3df9db7b654aa6e02dbf | [
"Apache-2.0"
] | 1,075 | 2018-03-04T13:18:52.000Z | 2022-03-29T06:33:59.000Z | python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py | Beovolytics-Inc/0x-monorepo | 8a20cc682cd620cc5bed3df9db7b654aa6e02dbf | [
"Apache-2.0"
] | 1,873 | 2018-03-03T14:37:53.000Z | 2021-06-26T03:02:12.000Z | python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py | Beovolytics-Inc/0x-monorepo | 8a20cc682cd620cc5bed3df9db7b654aa6e02dbf | [
"Apache-2.0"
] | 500 | 2018-03-03T20:39:43.000Z | 2022-03-21T21:01:55.000Z | """0x JSON schemas and associated utilities.
Setup
-----
Install the package with pip::
pip install 0x-json-schemas
"""
from os import path
import json
from typing import Mapping
from pkg_resources import resource_string
import jsonschema
from stringcase import snakecase
class _LocalRefResolver(jsonschema.R... | 35.175 | 100 | 0.638474 |
04ed0b971926e255fc89b949f687a8b2c7203f8f | 314 | py | Python | mongoengine/base/__init__.py | Rippling/mongoengine | c3b6fa6ffdfe05fcf6f49857c1a89fee0175a05f | [
"MIT"
] | null | null | null | mongoengine/base/__init__.py | Rippling/mongoengine | c3b6fa6ffdfe05fcf6f49857c1a89fee0175a05f | [
"MIT"
] | 28 | 2016-11-30T03:15:18.000Z | 2022-02-25T15:57:02.000Z | mongoengine/base/__init__.py | Rippling/mongoengine | c3b6fa6ffdfe05fcf6f49857c1a89fee0175a05f | [
"MIT"
] | 1 | 2021-11-10T05:33:18.000Z | 2021-11-10T05:33:18.000Z | from __future__ import absolute_import
from mongoengine.base.common import *
from mongoengine.base.datastructures import *
from mongoengine.base.document import *
from mongoengine.base.fields import *
from mongoengine.base.metaclasses import *
# Help with backwards compatibility
from mongoengine.errors import *
| 31.4 | 45 | 0.834395 |
c558217124f2664a67a95213bcc26597800cd1b3 | 395 | py | Python | code/167.Two-Sum-II-Input-Array-Is-Sorted.py | Aden-Q/leetcode | ebd4804edd4f172b9981b22c18d9ff654cf20762 | [
"Apache-2.0"
] | 1 | 2019-09-22T03:08:14.000Z | 2019-09-22T03:08:14.000Z | code/167.Two-Sum-II-Input-Array-Is-Sorted.py | Aden-Q/leetcode | ebd4804edd4f172b9981b22c18d9ff654cf20762 | [
"Apache-2.0"
] | null | null | null | code/167.Two-Sum-II-Input-Array-Is-Sorted.py | Aden-Q/leetcode | ebd4804edd4f172b9981b22c18d9ff654cf20762 | [
"Apache-2.0"
] | null | null | null | class Solution:
def twoSum(self, numbers: List[int], target: int) -> List[int]:
left = 0
right = len(numbers) - 1
while left < right:
cur_sum = numbers[left] + numbers[right]
if cur_sum == target:
return [left+1, right+1]
elif cur_sum < tar... | 32.916667 | 67 | 0.468354 |
b62ea9077b5ae52567fba3145d8cfa00335c5cea | 158 | py | Python | tests/test_functions.py | ichirod-japan/waganolib | 30c2ef998d3253910a8f557ebb5e6e2475ba81f9 | [
"MIT"
] | 1 | 2021-03-09T08:21:22.000Z | 2021-03-09T08:21:22.000Z | tests/test_functions.py | ichirod-japan/waganolib | 30c2ef998d3253910a8f557ebb5e6e2475ba81f9 | [
"MIT"
] | null | null | null | tests/test_functions.py | ichirod-japan/waganolib | 30c2ef998d3253910a8f557ebb5e6e2475ba81f9 | [
"MIT"
] | null | null | null | from wagano import calculation
def test_haversine():
assert calculation.haversine(52.370216, 4.895168, 52.520008,
13.404954) == 945793.4375088713 | 31.6 | 65 | 0.740506 |
9e2c37cc04bca3909d9ce1a24ec28300b252cbe6 | 14,670 | py | Python | pypy/rpython/ootypesystem/rstr.py | benoitc/pypy | a3e1b12d1d01dc29056b7badc051ffc034297658 | [
"MIT"
] | 1 | 2020-01-21T11:10:51.000Z | 2020-01-21T11:10:51.000Z | pypy/rpython/ootypesystem/rstr.py | benoitc/pypy | a3e1b12d1d01dc29056b7badc051ffc034297658 | [
"MIT"
] | null | null | null | pypy/rpython/ootypesystem/rstr.py | benoitc/pypy | a3e1b12d1d01dc29056b7badc051ffc034297658 | [
"MIT"
] | null | null | null | from pypy.tool.pairtype import pairtype
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rpython.error import TyperError
from pypy.rpython.rstr import AbstractStringRepr,AbstractCharRepr,\
AbstractUniCharRepr, AbstractStringIteratorRepr,\
AbstractLLHelpers, AbstractUnicodeRepr
from pypy.rpython.rmodel imp... | 32.966292 | 90 | 0.60668 |
b06762581b953e1a9ccc9265b5aa5940442a1a3d | 5,803 | py | Python | networks/imdn_block.py | zhuxyme/zxySRFBN_CVPR2019 | c1afe776e7759bc05f2235b6db708e337cf2ae0e | [
"MIT"
] | null | null | null | networks/imdn_block.py | zhuxyme/zxySRFBN_CVPR2019 | c1afe776e7759bc05f2235b6db708e337cf2ae0e | [
"MIT"
] | null | null | null | networks/imdn_block.py | zhuxyme/zxySRFBN_CVPR2019 | c1afe776e7759bc05f2235b6db708e337cf2ae0e | [
"MIT"
] | null | null | null | import torch.nn as nn
from collections import OrderedDict
import torch
def conv_layer(in_channels, out_channels, kernel_size, stride=1, dilation=1, groups=1):
padding = int((kernel_size - 1) / 2) * dilation
return nn.Conv2d(in_channels, out_channels, kernel_size, stride, padding=padding, bias=True, dilation=d... | 38.177632 | 115 | 0.664656 |
5bc0c9c1a48f3929ae2163a28b3c68d1c420816b | 749 | py | Python | jia/scheduler/migrations/versions/265ea1d587a3_.py | joshblum/chronology | d730355a5686ebba9f1c8e369ba26a3080d9fa26 | [
"MIT"
] | null | null | null | jia/scheduler/migrations/versions/265ea1d587a3_.py | joshblum/chronology | d730355a5686ebba9f1c8e369ba26a3080d9fa26 | [
"MIT"
] | null | null | null | jia/scheduler/migrations/versions/265ea1d587a3_.py | joshblum/chronology | d730355a5686ebba9f1c8e369ba26a3080d9fa26 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 265ea1d587a3
Revises: None
Create Date: 2014-10-22 13:43:08.178132
"""
# revision identifiers, used by Alembic.
revision = '265ea1d587a3'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
... | 22.69697 | 61 | 0.688919 |
49000eaa7c62949c7177f2acdb784fed0ff74b8a | 55,254 | py | Python | 1. Information Gathering/recon-ng/recon/core/framework.py | Sorsnce/exploits | 5cd1932ccafcd2c1b92b8642e9a64fa0d2e99324 | [
"MIT"
] | 16 | 2019-09-22T06:38:07.000Z | 2021-06-19T18:31:12.000Z | 1. Information Gathering/recon-ng/recon/core/framework.py | Sorsnce/exploits | 5cd1932ccafcd2c1b92b8642e9a64fa0d2e99324 | [
"MIT"
] | null | null | null | 1. Information Gathering/recon-ng/recon/core/framework.py | Sorsnce/exploits | 5cd1932ccafcd2c1b92b8642e9a64fa0d2e99324 | [
"MIT"
] | 8 | 2019-10-02T13:35:45.000Z | 2021-02-07T22:28:11.000Z | from contextlib import closing
import cmd
import codecs
import inspect
import json
import os
import random
import re
import requests
import socket
import sqlite3
import string
import subprocess
import sys
import traceback
#=================================================
# SUPPORT CLASSES
#===========================... | 39.32669 | 339 | 0.555996 |
87d6d28523d5873c7fb75b8e9b667fa22a730c50 | 2,375 | py | Python | day 18/day18_part2_tree.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | 2 | 2020-12-17T18:49:20.000Z | 2021-02-20T16:48:14.000Z | day 18/day18_part2_tree.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | null | null | null | day 18/day18_part2_tree.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | 3 | 2020-12-20T19:08:32.000Z | 2020-12-26T22:11:15.000Z | from operator import add, mul
RUN_TEST = False
TEST_SOLUTIONS = sum([231, 51, 46, 1445, 669060, 23340])
TEST_INPUT_FILE = 'test_input_day_18.txt'
INPUT_FILE = 'input_day_18.txt'
OPERATORS = {'+': add, '*': mul, '🎄': lambda a, b: (a + b) // 2}
ARGS = [OPERATORS]
def main_part2(input_file, operators):
with ope... | 30.448718 | 100 | 0.598737 |
b5a0d350c8b7ffd1b2f2094041886f39a47d62bb | 10,160 | py | Python | tests/test_utils.py | lvh/falcon | 29754bf4dddacbe8dff1e752f98a47bdda5519bd | [
"Apache-2.0"
] | 2 | 2015-04-16T22:01:52.000Z | 2015-04-20T21:53:19.000Z | tests/test_utils.py | lvh/falcon | 29754bf4dddacbe8dff1e752f98a47bdda5519bd | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | lvh/falcon | 29754bf4dddacbe8dff1e752f98a47bdda5519bd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime
import functools
import io
import random
import sys
import testtools
import six
import falcon
import falcon.testing
from falcon import util
from falcon.util import uri
def _arbitrary_uris(count, length):
return (
u''.join(
[random.choice... | 35.155709 | 77 | 0.563484 |
df671e68c215faebffdf61dc84e1a96235c4db12 | 6,379 | py | Python | python/services/cloudresourcemanager/alpha/tag_key.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | python/services/cloudresourcemanager/alpha/tag_key.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | python/services/cloudresourcemanager/alpha/tag_key.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 38.197605 | 85 | 0.697131 |
506df1e8ef308fda5fbfcc903029dc47b9fb019c | 13,014 | py | Python | espnet/nets/pytorch_backend/lm/default.py | Syzygianinfern0/espnet | 3ea59a0050e8a6a40138ac2365c258825b02f9cd | [
"Apache-2.0"
] | 5 | 2020-10-26T11:28:04.000Z | 2021-12-17T07:49:11.000Z | espnet/nets/pytorch_backend/lm/default.py | Syzygianinfern0/espnet | 3ea59a0050e8a6a40138ac2365c258825b02f9cd | [
"Apache-2.0"
] | null | null | null | espnet/nets/pytorch_backend/lm/default.py | Syzygianinfern0/espnet | 3ea59a0050e8a6a40138ac2365c258825b02f9cd | [
"Apache-2.0"
] | 1 | 2020-07-17T11:50:17.000Z | 2020-07-17T11:50:17.000Z | """Default Recurrent Neural Network Languge Model in `lm_train.py`."""
from typing import Any
from typing import List
from typing import Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from espnet.nets.lm_interface import LMInterface
from espnet.nets.pytorch_backend.e2e_asr import to_device
... | 34.428571 | 88 | 0.552251 |
450dcec32ecbeac33ff4e5f68efa0bcc1aa77e05 | 12,819 | py | Python | elasticdl/python/ps/optimizer_wrapper.py | mirwu/elasticdl | a82c1189c57b87ba797221a10d492794a21bf459 | [
"MIT"
] | 1 | 2020-01-10T02:32:51.000Z | 2020-01-10T02:32:51.000Z | elasticdl/python/ps/optimizer_wrapper.py | mirwu/elasticdl | a82c1189c57b87ba797221a10d492794a21bf459 | [
"MIT"
] | null | null | null | elasticdl/python/ps/optimizer_wrapper.py | mirwu/elasticdl | a82c1189c57b87ba797221a10d492794a21bf459 | [
"MIT"
] | null | null | null | """Optimizer Wrapper for ElasticDL"""
import threading
import tensorflow as tf
from tensorflow.keras.optimizers import (
SGD,
Adadelta,
Adagrad,
Adam,
Adamax,
Ftrl,
Nadam,
RMSprop,
)
from elasticdl.python.common.log_utils import default_logger as logger
from elasticdl.python.ps.embedd... | 39.687307 | 79 | 0.644356 |
721c9816e5fddfc9265ac8bbc4ed6f273a163d35 | 124 | py | Python | components/studio/models/apps.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 25 | 2020-05-08T22:24:54.000Z | 2022-03-11T18:16:58.000Z | components/studio/models/apps.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 75 | 2020-05-08T22:15:59.000Z | 2021-11-22T10:00:04.000Z | components/studio/models/apps.py | aitmlouk/stackn | c8029394a15b03796a4864938f9db251b65c7354 | [
"Apache-2.0"
] | 12 | 2020-11-04T13:09:46.000Z | 2022-03-14T16:22:40.000Z | from django.apps import AppConfig
class ModelsConfig(AppConfig):
name = 'models'
verbose_name = 'Scaleout Models'
| 17.714286 | 36 | 0.733871 |
eeb014b8c5845c07c9e8567074c02d45c652ec7c | 941 | py | Python | session_wordcount/pro/pro/urls.py | olzlgur/Like_lion | ac55cd5a0dd81863cb9481b1c7635d629d409660 | [
"MIT"
] | null | null | null | session_wordcount/pro/pro/urls.py | olzlgur/Like_lion | ac55cd5a0dd81863cb9481b1c7635d629d409660 | [
"MIT"
] | null | null | null | session_wordcount/pro/pro/urls.py | olzlgur/Like_lion | ac55cd5a0dd81863cb9481b1c7635d629d409660 | [
"MIT"
] | null | null | null | """pro URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 37.64 | 77 | 0.70457 |
7f6530c6cfa40309cd691ebbed664849ce4ee892 | 52,244 | py | Python | kuber/v1_19/rbac_v1beta1.py | datalayer-externals/kuber | 4d577950ce7d1be2b882fbe66827dc3d7e67b350 | [
"MIT"
] | 1 | 2019-06-11T04:57:34.000Z | 2019-06-11T04:57:34.000Z | kuber/v1_19/rbac_v1beta1.py | datalayer-externals/kuber | 4d577950ce7d1be2b882fbe66827dc3d7e67b350 | [
"MIT"
] | 1 | 2019-05-05T22:08:13.000Z | 2019-05-06T11:43:32.000Z | kuber/v1_19/rbac_v1beta1.py | datalayer-externals/kuber | 4d577950ce7d1be2b882fbe66827dc3d7e67b350 | [
"MIT"
] | 2 | 2021-05-08T14:47:56.000Z | 2021-10-15T21:47:04.000Z | import typing # noqa: F401
from kubernetes import client # noqa: F401
from kuber import kube_api as _kube_api # noqa: F401
from kuber import definitions as _kuber_definitions # noqa: F401
from kuber import _types # noqa: F401
from kuber.v1_19.meta_v1 import LabelSelector # noqa: F401
from kuber.v1_19.meta_v1 im... | 30.822419 | 88 | 0.566783 |
e8968753fb8dba92afd379d31f92ec991a0acf7d | 1,815 | py | Python | tests/parser/features/iteration/test_break.py | lrettig/viper | 4abdd2b59b58fe87ca0aee05c792a6e0363b5358 | [
"MIT"
] | null | null | null | tests/parser/features/iteration/test_break.py | lrettig/viper | 4abdd2b59b58fe87ca0aee05c792a6e0363b5358 | [
"MIT"
] | null | null | null | tests/parser/features/iteration/test_break.py | lrettig/viper | 4abdd2b59b58fe87ca0aee05c792a6e0363b5358 | [
"MIT"
] | 1 | 2018-09-02T22:47:00.000Z | 2018-09-02T22:47:00.000Z | import pytest
from tests.setup_transaction_tests import chain as s, tester as t, ethereum_utils as u, check_gas, \
get_contract_with_gas_estimation, get_contract
def test_break_test():
break_test = """
@public
def log(n: num) -> num:
c = n * 1.0
output = 0
for i in range(400):
c = c / 1.25... | 22.407407 | 100 | 0.539945 |
4fd56c66f04be7da69bb4db870f46b02015c1146 | 4,184 | py | Python | vyapp/completion.py | hgdsraj/vy | 759cd5ab006c14f40c57dcd9eb190adf1a67e18f | [
"MIT"
] | null | null | null | vyapp/completion.py | hgdsraj/vy | 759cd5ab006c14f40c57dcd9eb190adf1a67e18f | [
"MIT"
] | null | null | null | vyapp/completion.py | hgdsraj/vy | 759cd5ab006c14f40c57dcd9eb190adf1a67e18f | [
"MIT"
] | null | null | null | from vyapp.widgets import FloatingWindow, MatchBox, Echo
from vyapp.tools import match_sub_pattern
from tkinter import LEFT, BOTH, Text, SCROLL
class Option(object):
def __init__(self, name, type='', doc=''):
self.name = name
self.doc = doc
self.type = type
def docstring(self):
... | 32.184615 | 83 | 0.602772 |
265ce1fe7fd1a46ef61925cab27244f0e2198b67 | 96 | py | Python | project/learning/apps.py | DmitrySevostianov/learning_test_project | f41eb38283a572ee6d11ee3b99da8eebab039d89 | [
"MIT"
] | null | null | null | project/learning/apps.py | DmitrySevostianov/learning_test_project | f41eb38283a572ee6d11ee3b99da8eebab039d89 | [
"MIT"
] | null | null | null | project/learning/apps.py | DmitrySevostianov/learning_test_project | f41eb38283a572ee6d11ee3b99da8eebab039d89 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class LearningConfig(AppConfig):
name = 'learning'
| 16 | 34 | 0.71875 |
6e991f32e1b303168c78f57e97146698627267ab | 1,969 | py | Python | py/pyglass/pyglass/pdf/api.py | bengsquared/manila | 0cbb50781d925558508990b51ec5f78c6bee1972 | [
"MIT"
] | 2 | 2015-01-02T07:15:07.000Z | 2015-04-15T05:23:59.000Z | py/pyglass/pyglass/pdf/api.py | bengsquared/manila | 0cbb50781d925558508990b51ec5f78c6bee1972 | [
"MIT"
] | 2 | 2020-11-04T05:49:26.000Z | 2021-03-13T21:05:36.000Z | py/pyglass/pyglass/pdf/api.py | bengsquared/manila | 0cbb50781d925558508990b51ec5f78c6bee1972 | [
"MIT"
] | 2 | 2020-11-03T00:48:06.000Z | 2021-03-12T00:14:07.000Z | # -*- coding: utf-8 -*-
# Default libs
import os
from tempfile import NamedTemporaryFile
from os.path import exists
# Library modules
from PyPDF2 import PdfFileMerger, PdfFileReader, PdfFileWriter
from pxprocess import check_call
############################################################
# PDF CLASSES
###########... | 25.571429 | 90 | 0.659726 |
279bf638509f8c9af18bf08e0b9499f5ebfa14cd | 104 | py | Python | test/unit/handler/__init__.py | 4degrees/mill | ba8362193fa9cbcb52e9b6d188d3060eed495038 | [
"Apache-2.0"
] | null | null | null | test/unit/handler/__init__.py | 4degrees/mill | ba8362193fa9cbcb52e9b6d188d3060eed495038 | [
"Apache-2.0"
] | 1 | 2016-05-18T08:56:43.000Z | 2016-05-18T09:11:31.000Z | test/unit/logger/__init__.py | 4degrees/mill | ba8362193fa9cbcb52e9b6d188d3060eed495038 | [
"Apache-2.0"
] | null | null | null | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
| 26 | 57 | 0.721154 |
cc2ceacd49f159cbf4cce9e1d2364aaa491eecd4 | 3,013 | py | Python | kindle_version_finder.py | capybala/find-ebook-edition-backend | 0321ae8c883fdc241553ad16abf0db9d47eb278d | [
"MIT"
] | null | null | null | kindle_version_finder.py | capybala/find-ebook-edition-backend | 0321ae8c883fdc241553ad16abf0db9d47eb278d | [
"MIT"
] | null | null | null | kindle_version_finder.py | capybala/find-ebook-edition-backend | 0321ae8c883fdc241553ad16abf0db9d47eb278d | [
"MIT"
] | null | null | null | #coding: utf-8
from __future__ import unicode_literals
import re
import logging
from kindle_version_cache import KindleVersionCache
from api_wrapper import AmazonWrapper, AmazonException
VALID_ASIN_RE = re.compile(r'^\w{10}$')
logger = logging.getLogger(__name__)
class KindleVersionFinder(object):
def __init... | 30.13 | 91 | 0.625954 |
3c5c679a292923c72839973da7ae086965ddef88 | 13,832 | py | Python | tests/api/test_masking.py | eodcgmbh/datacube-core | 0792e519ccfd33e0a0acf368aa6f33ca2c1ea50f | [
"Apache-2.0"
] | 363 | 2017-03-17T07:33:18.000Z | 2022-03-25T12:33:36.000Z | tests/api/test_masking.py | eodcgmbh/datacube-core | 0792e519ccfd33e0a0acf368aa6f33ca2c1ea50f | [
"Apache-2.0"
] | 1,035 | 2017-03-07T05:38:43.000Z | 2022-03-29T03:19:10.000Z | tests/api/test_masking.py | eodcgmbh/datacube-core | 0792e519ccfd33e0a0acf368aa6f33ca2c1ea50f | [
"Apache-2.0"
] | 146 | 2017-03-08T01:08:37.000Z | 2022-03-16T01:52:13.000Z | # This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2020 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import yaml
import pytest
from xarray import DataArray, Dataset
import numpy as np
from datacube.utils.masking import (
list_flag_names,
... | 31.436364 | 112 | 0.590949 |
a35e19c3bbe17ee8f917205f6a0a67a2f50b9a34 | 607 | py | Python | QRSMS/initial/migrations/0045_auto_20200523_2256.py | Srishti-Ahuja/QRSMS-V1 | 1f2fa82e8ddaeb62e633fcd6a136696355317bba | [
"Apache-2.0"
] | 4 | 2020-06-16T09:42:20.000Z | 2021-11-24T08:18:16.000Z | QRSMS/initial/migrations/0045_auto_20200523_2256.py | Srishti-Ahuja/QRSMS-V1 | 1f2fa82e8ddaeb62e633fcd6a136696355317bba | [
"Apache-2.0"
] | 7 | 2021-04-08T21:57:34.000Z | 2022-02-27T06:41:15.000Z | QRSMS/initial/migrations/0045_auto_20200523_2256.py | Srishti-Ahuja/QRSMS-V1 | 1f2fa82e8ddaeb62e633fcd6a136696355317bba | [
"Apache-2.0"
] | 7 | 2020-11-29T09:45:44.000Z | 2022-03-30T15:27:33.000Z | # Generated by Django 2.2 on 2020-05-23 17:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('initial', '0044_auto_20200522_1714'),
]
operations = [
migrations.AddField(
model_name='studentmarks',
name='obtained_... | 25.291667 | 70 | 0.602965 |
e6d439a13048c011f0f9d869e42262a7781ef281 | 165 | py | Python | 326. Power of Three/solution.py | Rukeith/leetcode | 001aaf83968889d0cbc634dcc3bd1b59728d1ecc | [
"MIT"
] | 3 | 2018-06-19T08:36:32.000Z | 2019-03-25T04:05:04.000Z | 326. Power of Three/solution.py | Rukeith/leetcode | 001aaf83968889d0cbc634dcc3bd1b59728d1ecc | [
"MIT"
] | null | null | null | 326. Power of Three/solution.py | Rukeith/leetcode | 001aaf83968889d0cbc634dcc3bd1b59728d1ecc | [
"MIT"
] | null | null | null | class Solution:
def isPowerOfThree(self, n: int) -> bool:
"""
3^19 is biggest 3 power number
"""
return n > 0 and 3**19 % n == 0
| 23.571429 | 45 | 0.49697 |
a1012db735efaaad877bc7ba0d5753c097909864 | 7,882 | py | Python | tests/unit/greedy_algorithm_test.py | MassDynamics/protein-inference | 05cc9738a3fcd074d8e6789bb24979a9837082cf | [
"MIT"
] | 4 | 2020-11-25T03:08:07.000Z | 2020-11-25T23:28:06.000Z | tests/unit/greedy_algorithm_test.py | MassDynamics/protein-inference | 05cc9738a3fcd074d8e6789bb24979a9837082cf | [
"MIT"
] | null | null | null | tests/unit/greedy_algorithm_test.py | MassDynamics/protein-inference | 05cc9738a3fcd074d8e6789bb24979a9837082cf | [
"MIT"
] | 1 | 2020-11-25T04:52:04.000Z | 2020-11-25T04:52:04.000Z | import unittest
from protein_inference.problem_network import ProblemNetwork
from protein_inference.reprisal.greedy_algorithm import GreedyAlgorithm
import networkx as nx
from copy import deepcopy
class GreedyAlgorithmTest(unittest.TestCase):
def test_score_protein_basic(self):
g = nx.Graph()
g.... | 36.831776 | 85 | 0.606826 |
ab3f578cfc8767db0bd8527dff76a53a3655b781 | 1,213 | py | Python | userbot/modules/paste.py | ZezinhoRey/PurpleBot | d1cf9c967a3901edb2b2151f882d495058061205 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 11 | 2020-11-02T21:01:49.000Z | 2022-03-14T04:24:43.000Z | userbot/modules/paste.py | ZezinhoRey/PurpleBot | d1cf9c967a3901edb2b2151f882d495058061205 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2021-02-15T21:44:17.000Z | 2021-02-28T20:59:44.000Z | userbot/modules/paste.py | ZezinhoRey/PurpleBot | d1cf9c967a3901edb2b2151f882d495058061205 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 44 | 2020-10-24T13:05:34.000Z | 2022-02-28T23:46:40.000Z | # Copyright (C) 2021 KenHV
from requests import post
from telethon.tl.types import MessageMediaWebPage
from userbot import CMD_HELP
from userbot.events import register
@register(outgoing=True, pattern=r"^\.paste(?:\s|$)([\s\S]*)")
async def paste(event):
"""Pastes given text to Katb.in"""
await event.edit("... | 30.325 | 86 | 0.63479 |
1f7b739ab5073d09e906eac56b5ce39a04753238 | 53,777 | py | Python | z_score_vs_f1/phase2_Trie.py | dalakada/TwiCSv2 | 40672a99a201f6e2aab9dd085e1f4a29e8253f3b | [
"MIT"
] | 2 | 2019-04-01T00:54:39.000Z | 2021-06-22T18:02:47.000Z | z_score_vs_f1/phase2_Trie.py | dalakada/TwiCSv2 | 40672a99a201f6e2aab9dd085e1f4a29e8253f3b | [
"MIT"
] | null | null | null | z_score_vs_f1/phase2_Trie.py | dalakada/TwiCSv2 | 40672a99a201f6e2aab9dd085e1f4a29e8253f3b | [
"MIT"
] | 2 | 2018-06-20T14:50:03.000Z | 2020-08-27T01:55:34.000Z | # coding: utf-8
from nltk.corpus import stopwords
import pandas as pd
import NE_candidate_module as ne
from nltk.tokenize import sent_tokenize, word_tokenize
import string
import copy
import numpy
import math
from itertools import groupby
from operator import itemgetter
from scipy import stats
import SVM as svm
import... | 43.650162 | 1,604 | 0.59637 |
f87b2b525d3401a6909684ac92358535dac8b178 | 2,809 | py | Python | examples/adwords/v201502/basic_operations/add_keywords.py | coxmediagroup/googleads-python-lib | f85d5d8ab771e93b03b616ef65e2d3082aeef484 | [
"Apache-2.0"
] | 1 | 2015-08-12T14:47:40.000Z | 2015-08-12T14:47:40.000Z | examples/adwords/v201502/basic_operations/add_keywords.py | coxmediagroup/googleads-python-lib | f85d5d8ab771e93b03b616ef65e2d3082aeef484 | [
"Apache-2.0"
] | 1 | 2020-07-24T15:10:10.000Z | 2020-07-24T15:10:10.000Z | examples/adwords/v201502/basic_operations/add_keywords.py | coxmediagroup/googleads-python-lib | f85d5d8ab771e93b03b616ef65e2d3082aeef484 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 28.663265 | 78 | 0.656461 |
7802e583de2050628b3e0658cd2999e96ad41d51 | 5,055 | py | Python | bindings/python/pysurvive/__init__.py | jdavidberger/libsurvive | 3dc35a3c5195724998cbb9e3b486e41ce6b1110d | [
"MIT"
] | 208 | 2020-02-18T18:48:39.000Z | 2022-03-31T14:06:40.000Z | bindings/python/pysurvive/__init__.py | jdavidberger/libsurvive | 3dc35a3c5195724998cbb9e3b486e41ce6b1110d | [
"MIT"
] | 100 | 2020-02-12T02:42:52.000Z | 2022-03-26T13:41:38.000Z | bindings/python/pysurvive/__init__.py | jdavidberger/libsurvive | 3dc35a3c5195724998cbb9e3b486e41ce6b1110d | [
"MIT"
] | 52 | 2020-03-26T09:09:18.000Z | 2022-03-21T07:50:56.000Z | import ctypes
import traceback
import types
import os
import pysurvive.pysurvive_generated
from pysurvive.pysurvive_generated import *
LP_c_char = ctypes.POINTER(ctypes.c_char)
LP_LP_c_char = ctypes.POINTER(LP_c_char)
def add_to_lifetime(ctx, obj):
if not hasattr(ctx, 'lifetime'):
ctx.lifetime = []
c... | 33.7 | 136 | 0.701879 |
e6cf33195326fe5132e0409d62fd7768d58f009f | 1,370 | py | Python | chatbot_payload/line_chat.py | e23thr/py-chatbot-payload | acc91b07c1ff2b70f27195ec05d5bf97ca3d5b11 | [
"MIT"
] | null | null | null | chatbot_payload/line_chat.py | e23thr/py-chatbot-payload | acc91b07c1ff2b70f27195ec05d5bf97ca3d5b11 | [
"MIT"
] | null | null | null | chatbot_payload/line_chat.py | e23thr/py-chatbot-payload | acc91b07c1ff2b70f27195ec05d5bf97ca3d5b11 | [
"MIT"
] | null | null | null | from .helpers import check_type as __type_check
def line_text_message(message: str):
__type_check(message, str, can_be_none=False)
return {
"type": "text",
"text": message[:5000]
}
def line_sticker_message(package_id: str, sticker_id: str):
__type_check(package_id, str, can_be_none=F... | 30.444444 | 99 | 0.69927 |
5455ed31df3e1b52e3f4cb969d4c6bd9b1243bb0 | 1,451 | py | Python | tests/conftest.py | nomadixinc/django-money | 2c04749110c78978d4f12fe42d8f28a7bc9014dd | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | nomadixinc/django-money | 2c04749110c78978d4f12fe42d8f28a7bc9014dd | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | nomadixinc/django-money | 2c04749110c78978d4f12fe42d8f28a7bc9014dd | [
"BSD-3-Clause"
] | 2 | 2019-08-29T04:51:29.000Z | 2019-09-25T08:46:27.000Z | # -*- coding: utf-8 -*-
from decimal import Decimal
from django import VERSION
import pytest
from moneyed import Money
from tests.testapp.models import InheritorModel, ModelWithDefaultAsInt
from ._compat import patch
@pytest.yield_fixture()
def patched_convert_money():
"""
The `convert_money` function wil... | 24.183333 | 90 | 0.70572 |
3c2c92daaac9edf17ce98fdccc5b588851c8544c | 9,640 | py | Python | model_sngan.py | Chenlang2018/Code-for-paper-Learning-to-Generate-Steganographic-Cover-for-Audio-Steganography-using-GAN- | 41387e9e72df9c1f1228ed782dc62a87741733ba | [
"Apache-2.0"
] | null | null | null | model_sngan.py | Chenlang2018/Code-for-paper-Learning-to-Generate-Steganographic-Cover-for-Audio-Steganography-using-GAN- | 41387e9e72df9c1f1228ed782dc62a87741733ba | [
"Apache-2.0"
] | null | null | null | model_sngan.py | Chenlang2018/Code-for-paper-Learning-to-Generate-Steganographic-Cover-for-Audio-Steganography-using-GAN- | 41387e9e72df9c1f1228ed782dc62a87741733ba | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from snlayer.snconv1d import SNConv1d
from snlayer.snlinear import SNLinear
import torch.nn.functional as F
import numpy as np
class Discriminator(nn.Module):
def __init__(self):
super(Discriminator, self).__init__()
self.conv1 = nn.Sequential(
... | 33.127148 | 118 | 0.512344 |
ec0027be8be2da0fb4494354dfeb74eaa1d4e06b | 712 | py | Python | setup.py | bgodii/flask-cf-framework | 7a3754cff2acdeae29cf80f95a6167a8eb44fd43 | [
"MIT"
] | null | null | null | setup.py | bgodii/flask-cf-framework | 7a3754cff2acdeae29cf80f95a6167a8eb44fd43 | [
"MIT"
] | null | null | null | setup.py | bgodii/flask-cf-framework | 7a3754cff2acdeae29cf80f95a6167a8eb44fd43 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="flask-cf-framework", # Replace with your own username
version="0.0.3",
author="Gleison Batista",
# author_email="author@example.com",
description="A route handler for Google Cloud Function... | 32.363636 | 63 | 0.675562 |
991f5b3bc2726303d773e2250da7c956770e88a3 | 6,332 | py | Python | horovod/keras/__init__.py | gate2k1/horovod | 38e91bee84efbb5b563a4928027a75dc3974633b | [
"Apache-2.0"
] | 12 | 2020-06-04T20:23:49.000Z | 2022-03-18T18:22:59.000Z | horovod/keras/__init__.py | gate2k1/horovod | 38e91bee84efbb5b563a4928027a75dc3974633b | [
"Apache-2.0"
] | 4 | 2020-12-04T21:00:38.000Z | 2022-01-22T12:49:30.000Z | horovod/keras/__init__.py | gate2k1/horovod | 38e91bee84efbb5b563a4928027a75dc3974633b | [
"Apache-2.0"
] | 8 | 2020-07-25T15:25:47.000Z | 2022-03-17T02:27:15.000Z | # Copyright 2017 Uber Technologies, 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 applica... | 41.933775 | 100 | 0.683828 |
40ba20d62fc7fa0403e5bf31dc9d91a3d080192b | 2,085 | py | Python | tests/mulgauss.py | LiyrAstroph/CDNest | afb6b869ce1c4ebd76662b20310f1d9d3db4e26e | [
"MIT"
] | 6 | 2019-09-11T03:34:45.000Z | 2020-10-16T12:14:05.000Z | tests/mulgauss.py | LiyrAstroph/DNest_C | afb6b869ce1c4ebd76662b20310f1d9d3db4e26e | [
"MIT"
] | 2 | 2020-05-14T10:04:48.000Z | 2021-01-06T02:04:19.000Z | tests/mulgauss.py | LiyrAstroph/DNest_C | afb6b869ce1c4ebd76662b20310f1d9d3db4e26e | [
"MIT"
] | null | null | null | #
# an example borrowed from the DNest4 package by Brendon J. Brewer, with minor modifications
#
#
from mpi4py import MPI
import numpy as np
import scipy.special as sp
import cydnest
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
def analytic_log_Z(num_params):
"""
return evidence for multi-dimensional Gaussian
... | 27.077922 | 103 | 0.680576 |
df4ea5901d91ba56eac6bd137f4b8e2f5c5ba656 | 9,955 | py | Python | synapse/util/caches/lrucache.py | ThiefMaster/synapse | f2af3e4fc550e7e93be1b0f425c3e9c484b96293 | [
"Apache-2.0"
] | 1 | 2020-07-21T17:51:02.000Z | 2020-07-21T17:51:02.000Z | synapse/util/caches/lrucache.py | mjvaldez/synapse | de119063f248981510e961e83f1515a3add19a21 | [
"Apache-2.0"
] | 1 | 2020-02-10T10:03:31.000Z | 2020-02-10T10:03:31.000Z | synapse/util/caches/lrucache.py | mjvaldez/synapse | de119063f248981510e961e83f1515a3add19a21 | [
"Apache-2.0"
] | 1 | 2020-01-30T11:03:37.000Z | 2020-01-30T11:03:37.000Z | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.42671 | 89 | 0.576092 |
ea452af7147fc7fc5e9a1776651edcdbce68ecad | 210 | py | Python | examples/installation/urls.py | sim1234/cms_forms | 8a0edf6de98e8e6037acc6016f030e1429f1a866 | [
"MIT"
] | null | null | null | examples/installation/urls.py | sim1234/cms_forms | 8a0edf6de98e8e6037acc6016f030e1429f1a866 | [
"MIT"
] | 110 | 2020-04-18T19:54:26.000Z | 2022-01-13T02:28:06.000Z | examples/installation/urls.py | sim1234/cms_forms | 8a0edf6de98e8e6037acc6016f030e1429f1a866 | [
"MIT"
] | 1 | 2021-01-15T13:11:39.000Z | 2021-01-15T13:11:39.000Z | from django.urls import path, include
from django.contrib import admin
urlpatterns = [
path("admin/", admin.site.urls),
path("forms/", include("cms_forms.urls")),
path("", include("cms.urls")),
]
| 21 | 46 | 0.661905 |
8a77514f45f3af1182cc08d21bb8ee08237f8aa7 | 1,816 | py | Python | qmla/shared_functionality/experimental_data_processing.py | flynnbr11/QMD | ac8cfe1603658ee9b916452f29b99460ee5e3d44 | [
"MIT"
] | 9 | 2021-01-08T12:49:01.000Z | 2021-12-29T06:59:32.000Z | qmla/shared_functionality/experimental_data_processing.py | flynnbr11/QMD | ac8cfe1603658ee9b916452f29b99460ee5e3d44 | [
"MIT"
] | 2 | 2021-02-22T20:42:25.000Z | 2021-02-22T22:22:59.000Z | qmla/shared_functionality/experimental_data_processing.py | flynnbr11/QMD | ac8cfe1603658ee9b916452f29b99460ee5e3d44 | [
"MIT"
] | 9 | 2021-02-15T14:18:48.000Z | 2021-12-17T04:02:07.000Z | import os
import numpy as np
from bisect import bisect_left
import random
def nearest_experimental_time_available(times, t):
"""
- times: Sorted time list
- experimental_data: dict where key is time and value is expectation value
- t: time to get nearest available experimental data point f... | 26.318841 | 79 | 0.553965 |
0f2cd07747386905fd73856bd339731e90e485c4 | 3,344 | py | Python | podcast/migrations/0001_initial.py | Arlefreak/api.afk | 7e968f6dc3b593ad8f20a4962cb7e3c91bf3ab79 | [
"MIT"
] | null | null | null | podcast/migrations/0001_initial.py | Arlefreak/api.afk | 7e968f6dc3b593ad8f20a4962cb7e3c91bf3ab79 | [
"MIT"
] | 5 | 2016-01-21T20:21:42.000Z | 2016-01-22T23:00:33.000Z | podcast/migrations/0001_initial.py | Arlefreak/ApiArlefreak | 7e968f6dc3b593ad8f20a4962cb7e3c91bf3ab79 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2017-05-25 17:54
from __future__ import unicode_literals
import adminsortable.fields
from django.db import migrations, models
import django.db.models.deletion
import podcast.models
import taggit.managers
class Migration(migrations.Migration):
initial = True... | 42.871795 | 178 | 0.586124 |
ba83a47deab5673a265b615412c6f7ffcb14f61f | 11,717 | py | Python | venv/Lib/site-packages/networkx/algorithms/tree/tests/test_branchings.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 3 | 2020-08-04T20:29:41.000Z | 2020-11-09T09:28:19.000Z | venv/Lib/site-packages/networkx/algorithms/tree/tests/test_branchings.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 30 | 2020-04-15T19:37:40.000Z | 2020-04-22T21:19:35.000Z | venv/Lib/site-packages/networkx/algorithms/tree/tests/test_branchings.py | 997Yi/Flask-web | 6b5e5d274bfa25fbd3db5af02723a5671f1e901d | [
"MIT"
] | 2 | 2020-03-12T23:20:22.000Z | 2021-02-15T21:54:02.000Z | import pytest
np = pytest.importorskip('numpy')
import networkx as nx
from networkx.algorithms.tree import branchings
from networkx.algorithms.tree import recognition
from networkx.testing import *
#
# Explicitly discussed examples from Edmonds paper.
#
# Used in Figures A-F.
#
G_array = np.array([
# 0 1 2... | 30.433766 | 84 | 0.600324 |
d58e12597472c22cd1f81043d2515ec35f7f49dd | 3,246 | py | Python | Examples/Catalyst/CxxFullExample/SampleScripts/feslicescript.py | demarle/ParaView | ec9642303012a3344f9be7a0acea45cc2b329720 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2019-04-22T09:09:18.000Z | 2019-04-22T09:09:18.000Z | Examples/Catalyst/MPISubCommunicatorExample/SampleScripts/feslicescript.py | JamesLinus/ParaView | d0dd28e0527c230044f1891db2d8ad0170a04af0 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | Examples/Catalyst/MPISubCommunicatorExample/SampleScripts/feslicescript.py | JamesLinus/ParaView | d0dd28e0527c230044f1891db2d8ad0170a04af0 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-06-23T09:05:08.000Z | 2020-06-23T09:05:08.000Z |
try: paraview.simple
except: from paraview.simple import *
from paraview import coprocessing
#--------------------------------------------------------------
# Code generated from cpstate.py to create the CoProcessor.
# ----------------------- CoProcessor definition -----------------------
def CreateCoProcessor()... | 37.310345 | 123 | 0.676217 |
9bfcb672aa522891e875386882883f3a413a429c | 23,486 | py | Python | google/cloud/aiplatform_v1/services/featurestore_online_serving_service/transports/grpc_asyncio.py | sararob/python-aiplatform | e64cd5588848a4dcd9117ff905e9569576541b69 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/services/featurestore_online_serving_service/transports/grpc_asyncio.py | sararob/python-aiplatform | e64cd5588848a4dcd9117ff905e9569576541b69 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/services/featurestore_online_serving_service/transports/grpc_asyncio.py | sararob/python-aiplatform | e64cd5588848a4dcd9117ff905e9569576541b69 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 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.871094 | 107 | 0.651282 |
602c225c6b0c0554a9868b51e137345be1d31ad2 | 3,487 | py | Python | src/block_helper.py | mehbhasi/amazon-comprehend-semi-structured-documents-annotation-tools | 8993c8b80fe5ad52417ba378e8ecb0539078c911 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0"
] | 10 | 2021-09-16T16:21:36.000Z | 2022-03-18T10:44:25.000Z | src/block_helper.py | mehbhasi/amazon-comprehend-semi-structured-documents-annotation-tools | 8993c8b80fe5ad52417ba378e8ecb0539078c911 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0"
] | 3 | 2021-11-03T11:21:54.000Z | 2021-12-02T17:13:30.000Z | src/block_helper.py | mehbhasi/amazon-comprehend-semi-structured-documents-annotation-tools | 8993c8b80fe5ad52417ba378e8ecb0539078c911 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0"
] | 7 | 2021-09-17T19:41:31.000Z | 2022-02-02T09:55:05.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
"""Block helper class."""
import uuid
import copy
class DictionaryClass:
"""Class to define an object as a dictionary."""
def __str__(self):
"""Return a string representation of the object as a dict... | 31.990826 | 117 | 0.649555 |
146f8c172a38b928dce7cedb8a3fdd7a5d994e53 | 4,179 | py | Python | tests/test_processing.py | JiadaoZ22/wfdb-python | f69c7df7ac4ed3a6f6262474225bd976bcb115f6 | [
"MIT"
] | null | null | null | tests/test_processing.py | JiadaoZ22/wfdb-python | f69c7df7ac4ed3a6f6262474225bd976bcb115f6 | [
"MIT"
] | null | null | null | tests/test_processing.py | JiadaoZ22/wfdb-python | f69c7df7ac4ed3a6f6262474225bd976bcb115f6 | [
"MIT"
] | null | null | null | import numpy as np
import wfdb
from wfdb import processing
class test_processing():
"""
Test processing functions
"""
def test_resample_single(self):
sig, fields = wfdb.rdsamp('sample-data/100')
ann = wfdb.rdann('sample-data/100', 'atr')
fs = fields['fs']
fs_target = ... | 33.97561 | 81 | 0.520699 |
23798bd8bcd83189cc7316f55112bc1c09451b18 | 160 | py | Python | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_Lag1Trend_Seasonal_WeekOfYear_AR.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_Lag1Trend_Seasonal_WeekOfYear_AR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_Lag1Trend_Seasonal_WeekOfYear_AR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Anscombe'] , ['Lag1Trend'] , ['Seasonal_WeekOfYear'] , ['AR'] ); | 40 | 87 | 0.75625 |
837047fb2260fb6087a8895ae1792f8b2c845db2 | 615 | py | Python | setup.py | gonzalorodrigo/SoPaper | 0246c1baeb3a863cb6415ab769f363eb86267bd6 | [
"CC-BY-4.0"
] | 158 | 2015-02-07T13:19:38.000Z | 2022-03-02T15:29:22.000Z | setup.py | gonzalorodrigo/SoPaper | 0246c1baeb3a863cb6415ab769f363eb86267bd6 | [
"CC-BY-4.0"
] | 8 | 2015-06-15T04:06:30.000Z | 2020-01-25T14:04:02.000Z | setup.py | gonzalorodrigo/SoPaper | 0246c1baeb3a863cb6415ab769f363eb86267bd6 | [
"CC-BY-4.0"
] | 39 | 2016-01-01T07:14:32.000Z | 2021-04-26T08:25:02.000Z | #from distutils.core import setup
from setuptools import setup
kwargs = dict(
name = 'sopaper',
version = '0.8',
description = 'Automatically search and download paper',
author = 'Yuxin Wu',
author_email = 'ppwwyyxxc@gmail.com',
url = 'https://github.com/ppwwyyxx/sopaper',
keywords = ['Utility'],
packag... | 30.75 | 78 | 0.679675 |
a8ee955bef39bb5a5fc5998aa9f5a2fc7b10dfdd | 1,318 | py | Python | ivy/functional/backends/mxnet/array_api/data_type_functions.py | su-hss/Project_Su | 5076271068d36095a9653815a5901ef23e07cfea | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/array_api/data_type_functions.py | su-hss/Project_Su | 5076271068d36095a9653815a5901ef23e07cfea | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/array_api/data_type_functions.py | su-hss/Project_Su | 5076271068d36095a9653815a5901ef23e07cfea | [
"Apache-2.0"
] | null | null | null | # global
import numpy as np
# noinspection PyPackageRequirements
import mxnet as mx
from typing import Union
# local
import ivy
# noinspection PyShadowingBuiltins
def iinfo(type: Union[type, str, mx.ndarray.ndarray.NDArray]) \
-> np.iinfo:
return np.iinfo(ivy.dtype_from_str(type))
class Finfo:
def... | 22.724138 | 89 | 0.676783 |
44171e9fe25d2fea022c476f2382b36f8bdf3af6 | 6,653 | py | Python | mamba_gator/tests/utils.py | ericpre/gator | 96a711f9ef3aa03e488bd14b4322c750b5e88c55 | [
"BSD-3-Clause"
] | null | null | null | mamba_gator/tests/utils.py | ericpre/gator | 96a711f9ef3aa03e488bd14b4322c750b5e88c55 | [
"BSD-3-Clause"
] | null | null | null | mamba_gator/tests/utils.py | ericpre/gator | 96a711f9ef3aa03e488bd14b4322c750b5e88c55 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import errno
import json
import os
import sys
import time
from binascii import hexlify
from threading import Event, Thread
from typing import List
from unittest import TestCase
from unittest.mock import patch
import jupyter_core.paths
import requests
from ipython_genutils.tempdir import TemporaryDirect... | 32.140097 | 113 | 0.60499 |
21576f61d4a2d910327992c5dda86062b0d143d4 | 32,661 | py | Python | RixsSpectrum.py | kkummer/RixsToolBox | 48e220035697c9a85eaa3fe79307593aa5558065 | [
"MIT"
] | 4 | 2020-06-06T10:37:22.000Z | 2021-12-14T11:50:09.000Z | RixsSpectrum.py | kkummer/RixsToolBox | 48e220035697c9a85eaa3fe79307593aa5558065 | [
"MIT"
] | 5 | 2019-04-27T16:06:23.000Z | 2020-12-09T20:34:47.000Z | RixsSpectrum.py | kkummer/RixsToolBox | 48e220035697c9a85eaa3fe79307593aa5558065 | [
"MIT"
] | 2 | 2016-11-07T19:26:25.000Z | 2018-06-15T09:55:29.000Z | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#/*##########################################################################
# Copyright (C) 2016 K. Kummer, A. Tamborino, European Synchrotron Radiation
# Facility
#
# This file is part of the ID32 RIXSToolBox developed at the ESRF by the ID32
# staff and the ESR... | 47.541485 | 125 | 0.533542 |
ef1e6fff90fc932447ed565cd5b6cce8f689990c | 1,792 | py | Python | var/spack/repos/builtin/packages/dftd4/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/dftd4/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/dftd4/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.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)
from spack import *
class Dftd4(MesonPackage):
"""Generally Applicable Atomic-Charge Dependent London Dispersion Cor... | 38.956522 | 93 | 0.667969 |
777ccba134309c23a0269ce7d246dd10187510f0 | 604 | py | Python | 3_using_python_to_access_web_data/week4/exercise4.py | phattp/python-for-everybody | 3c277406d1133c64e1b600aa761d6bcb016ab608 | [
"MIT"
] | null | null | null | 3_using_python_to_access_web_data/week4/exercise4.py | phattp/python-for-everybody | 3c277406d1133c64e1b600aa761d6bcb016ab608 | [
"MIT"
] | null | null | null | 3_using_python_to_access_web_data/week4/exercise4.py | phattp/python-for-everybody | 3c277406d1133c64e1b600aa761d6bcb016ab608 | [
"MIT"
] | null | null | null | from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
import re
# Ignore SSL certificate errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
url = input('Enter - ')
html = urlopen(url, context=ctx).read()
soup = BeautifulSoup(html, "html.parser")
... | 20.133333 | 44 | 0.69702 |
826281907cc22b1b1fdfc6049007dc43ad0724c2 | 5,976 | py | Python | examples/mnist/mnist_with_visdom.py | VinhLoiIT/ignite | 3b2b9655ea9f80ce49b8a9f1c2d72f80e2a95f56 | [
"BSD-3-Clause"
] | 1 | 2020-03-04T20:07:45.000Z | 2020-03-04T20:07:45.000Z | examples/mnist/mnist_with_visdom.py | hefv57/ignite | a22a0f5e909ac70d2a1f76a60b6e84b2134f196c | [
"BSD-3-Clause"
] | null | null | null | examples/mnist/mnist_with_visdom.py | hefv57/ignite | a22a0f5e909ac70d2a1f76a60b6e84b2134f196c | [
"BSD-3-Clause"
] | null | null | null | from argparse import ArgumentParser
import torch
from torch.utils.data import DataLoader
from torch import nn
import torch.nn.functional as F
from torch.optim import SGD
from torchvision.datasets import MNIST
from torchvision.transforms import Compose, ToTensor, Normalize
import numpy as np
try:
import visdom
exc... | 40.378378 | 120 | 0.669846 |
4a49e34d9dedd9de3c2a32b4f7bc7ad3d73631ea | 434 | py | Python | Py96/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py96/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py96/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | def temp_converter():
temp = input("Enter temperature (e.g. 77C or 111F):").upper()
degree = int(temp[:-1])
conv = temp[-1]
if conv.upper() == "F":
result = int(round(degree - 32) * 5 / 9)
oconv = "Fahrenheit"
elif conv.upper() == "C":
result = int(round(9 * degree) / 5 + 32... | 24.111111 | 65 | 0.525346 |
d1a03c979d3d85a17475e1e87fe4ceccbefdcfe1 | 94 | py | Python | mailem/template/__init__.py | vihtinsky/py-mailem | 007953b507bc6a0cf665cebcfb600c7214d770ed | [
"BSD-2-Clause"
] | 3 | 2015-12-09T11:30:41.000Z | 2018-09-19T02:29:52.000Z | mailem/template/__init__.py | vihtinsky/py-mailem | 007953b507bc6a0cf665cebcfb600c7214d770ed | [
"BSD-2-Clause"
] | 3 | 2016-06-04T10:58:17.000Z | 2019-02-27T12:48:11.000Z | mailem/template/__init__.py | vihtinsky/py-mailem | 007953b507bc6a0cf665cebcfb600c7214d770ed | [
"BSD-2-Clause"
] | 2 | 2017-04-20T17:21:59.000Z | 2019-12-16T18:57:31.000Z | from .template import Template
from .registry import TemplateRegistry
from . import renderer
| 18.8 | 38 | 0.829787 |
2e4d6e3b7ed23d20b496c3b352357684ee8f4857 | 922 | py | Python | thelma/repositories/rdb/schema/tables/isopoolset.py | fogathmann/TheLMA | ac330a0005da4fea2f1387da9ff9938611ad1481 | [
"MIT"
] | 1 | 2020-07-12T22:47:58.000Z | 2020-07-12T22:47:58.000Z | thelma/repositories/rdb/schema/tables/isopoolset.py | papagr/TheLMA | d2dc7a478ee5d24ccf3cc680888e712d482321d0 | [
"MIT"
] | null | null | null | thelma/repositories/rdb/schema/tables/isopoolset.py | papagr/TheLMA | d2dc7a478ee5d24ccf3cc680888e712d482321d0 | [
"MIT"
] | 1 | 2020-07-12T22:40:36.000Z | 2020-07-12T22:40:36.000Z | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
ISO molecule design pool set association table.
"""
from sqlalchemy import Column
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlal... | 31.793103 | 80 | 0.647505 |
a18384ef7b9743507fb778e0b32bfe28539247c9 | 3,569 | py | Python | setup.py | python-retool/lib1 | 3ffd786e9c7eba8a76f837f9904d5640529e6bc2 | [
"BSD-2-Clause"
] | null | null | null | setup.py | python-retool/lib1 | 3ffd786e9c7eba8a76f837f9904d5640529e6bc2 | [
"BSD-2-Clause"
] | null | null | null | setup.py | python-retool/lib1 | 3ffd786e9c7eba8a76f837f9904d5640529e6bc2 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import setuptools
package_dir = {"": "src"}
packages = ["lib1"]
package_data = {"": ["*"]}
install_requires = ["attrs==19.1.0", "click==7.0"]
entry_points = {"console_scripts": ["lib1 = lib1.cli:cli"]}
setup_kwargs = {
"name": "01d61084-d29e-11e9-96d1-7c5cf84ffe8e",
"version": "0.... | 108.151515 | 2,895 | 0.688148 |
9c5b24c2adfb9a9cc681bb5296e62612a125f210 | 4,580 | py | Python | yandex/cloud/mdb/mysql/v1/database_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 36 | 2018-12-23T13:51:50.000Z | 2022-03-25T07:48:24.000Z | yandex/cloud/mdb/mysql/v1/database_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 15 | 2019-02-28T04:55:09.000Z | 2022-03-06T23:17:24.000Z | yandex/cloud/mdb/mysql/v1/database_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 18 | 2019-02-23T07:10:57.000Z | 2022-03-28T14:41:08.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: yandex/cloud/mdb/mysql/v1/database.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _ref... | 37.540984 | 473 | 0.75917 |
6b7bf16e3073919b4d60c657ad6ac261f720a9c3 | 5,479 | py | Python | corehq/apps/userreports/tests/utils.py | akshita-sh/commcare-hq | 236b25ff9cd1a634fc5586e0f9e29473c8ac71b8 | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | corehq/apps/userreports/tests/utils.py | akshita-sh/commcare-hq | 236b25ff9cd1a634fc5586e0f9e29473c8ac71b8 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T04:45:16.000Z | 2021-06-02T04:45:16.000Z | corehq/apps/userreports/tests/utils.py | akshita-sh/commcare-hq | 236b25ff9cd1a634fc5586e0f9e29473c8ac71b8 | [
"BSD-3-Clause"
] | null | null | null | import json
import os
import re
import uuid
from datetime import date, datetime, time
from decimal import Decimal
import six
import sqlalchemy
from django.db import DEFAULT_DB_ALIAS
from mock import patch
from casexml.apps.case.models import CommCareCase
from dimagi.utils.parsing import json_format_datetime
from pill... | 31.130682 | 92 | 0.655412 |
796cfc56e20f81aa798d7204f670f1924651c651 | 4,365 | py | Python | collector_module/opmon_mongodb_maintenance/create_users.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | 2 | 2021-06-30T11:12:31.000Z | 2021-09-24T08:50:03.000Z | collector_module/opmon_mongodb_maintenance/create_users.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | null | null | null | collector_module/opmon_mongodb_maintenance/create_users.py | nordic-institute/X-Road-Metrics | 249d859466bf6065257cf8b3c27d0e9db4ab2378 | [
"MIT"
] | 2 | 2021-07-02T12:31:37.000Z | 2021-11-09T08:44:09.000Z | #!/usr/bin/env python3
"""
Script to create MongoDb users for X-Road Metrics tools.
"""
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any pers... | 37.307692 | 114 | 0.675601 |
2d30d1598c0c3c3dd9d028d2b2887c8aeecc4ca7 | 4,058 | py | Python | discordbot/user/discord_games/minigame_dc.py | AXXIAR/MiniGamesBot | 7d2e15dfafbe703949326545177ea5782d52a294 | [
"MIT"
] | null | null | null | discordbot/user/discord_games/minigame_dc.py | AXXIAR/MiniGamesBot | 7d2e15dfafbe703949326545177ea5782d52a294 | [
"MIT"
] | null | null | null | discordbot/user/discord_games/minigame_dc.py | AXXIAR/MiniGamesBot | 7d2e15dfafbe703949326545177ea5782d52a294 | [
"MIT"
] | null | null | null | import asyncio
import discord.errors
from discordbot.utils.emojis import STOP
from discordbot.utils.variables import TIMEOUT
class MinigameDisc:
def __init__(self, session):
self.session = session
self.emojis = set()
self.players = session.players
self.winners = []
self.l... | 35.596491 | 115 | 0.598571 |
704c590450a253a9452e52944d245103f23a5977 | 2,792 | py | Python | python_tests/Vectors/Generation/Consensus/MeritRemoval/Multiple.py | brunoerg/Ember | fbd8a5f43a81de7f5a6ba6bcecfac7e6bdb535fa | [
"CC0-1.0"
] | null | null | null | python_tests/Vectors/Generation/Consensus/MeritRemoval/Multiple.py | brunoerg/Ember | fbd8a5f43a81de7f5a6ba6bcecfac7e6bdb535fa | [
"CC0-1.0"
] | null | null | null | python_tests/Vectors/Generation/Consensus/MeritRemoval/Multiple.py | brunoerg/Ember | fbd8a5f43a81de7f5a6ba6bcecfac7e6bdb535fa | [
"CC0-1.0"
] | null | null | null | #Types.
from typing import IO, Dict, Any
#Consensus classes.
from python_tests.Classes.Consensus.Element import SignedElement
from python_tests.Classes.Consensus.Verification import SignedVerification
from python_tests.Classes.Consensus.MeritRemoval import SignedMeritRemoval
from python_tests.Classes.Consensus.Consens... | 28.20202 | 118 | 0.737464 |
215ba3694fecc40795cf3db407f0d5b2f01955a9 | 287 | py | Python | g.py | revertdata/tweeder | 23f7f9bb648b9fd0e729ceb8647d6cca1c7396fe | [
"MIT"
] | 10 | 2019-12-29T21:43:45.000Z | 2021-02-04T04:31:21.000Z | g.py | telepathics/tweeder | c01f535412033c436fe5cf2ee2895e10509624ce | [
"MIT"
] | null | null | null | g.py | telepathics/tweeder | c01f535412033c436fe5cf2ee2895e10509624ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
ROW_OFFSET=2
SHEET_NAME='@telepathics Reply Guys'
SCOPES='https://www.googleapis.com/auth/spreadsheets'
GSPREAD_SCOPES=['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
SPREADSHEET_ID='1VVU6jz63JLqxooM4z01xxOvjrtjYvOmr9AvPBoOVDCA' | 41 | 97 | 0.811847 |
8a574f58e99e1ef63f0028b2d6d412bff7e7aa29 | 1,421 | py | Python | var/spack/repos/builtin/packages/neovim/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2021-02-22T18:04:31.000Z | 2021-02-22T18:04:31.000Z | var/spack/repos/builtin/packages/neovim/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2021-01-11T09:16:43.000Z | 2021-01-12T20:07:23.000Z | var/spack/repos/builtin/packages/neovim/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-03-06T11:04:37.000Z | 2020-03-06T11:04:37.000Z | # 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 Neovim(CMakePackage):
"""NeoVim: the future of vim"""
homepage = "http://neovim.io"
... | 34.658537 | 95 | 0.719212 |
07e7bddf6f27ea363c4477eb4d82261eca73c13b | 24,052 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/crypto/openssl_csr.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/ansible/modules/crypto/openssl_csr.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/ansible/modules/crypto/openssl_csr.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2017, Yanis Guenane <yanis+ansible@guenane.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': ... | 41.32646 | 148 | 0.652794 |
1ee8c10fde9c87f7827415c400283f3ff4bb1fb9 | 543 | py | Python | src/tratamientos/migrations/0012_auto_20190523_0036.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | src/tratamientos/migrations/0012_auto_20190523_0036.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | 32 | 2016-05-09T19:37:08.000Z | 2022-01-13T01:00:52.000Z | src/tratamientos/migrations/0012_auto_20190523_0036.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.1 on 2019-05-23 03:36
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('tratamientos', '0011_remove_sesion_motivo_consulta'),
]
operations = [
migrations.AlterField(
m... | 27.15 | 151 | 0.672192 |
c3b2fb25cd5a5708a3e3ea309e8bd93b432db96a | 3,995 | py | Python | dense.py | SwikarGautam/ConvoNet | 4c1234a50c95b8d6bb4d8b6353cc681fae5f3ace | [
"MIT"
] | null | null | null | dense.py | SwikarGautam/ConvoNet | 4c1234a50c95b8d6bb4d8b6353cc681fae5f3ace | [
"MIT"
] | null | null | null | dense.py | SwikarGautam/ConvoNet | 4c1234a50c95b8d6bb4d8b6353cc681fae5f3ace | [
"MIT"
] | null | null | null | import numpy as np
class Dense:
def __init__(self, input_shape, output_shape, activation, dropout=None, batch_norm_momentum=False, beta1=0.9, beta2=0.999):
self.weights = np.random.normal(0, np.sqrt(1/input_shape), (input_shape, output_shape))
self.biases = np.random.randn(1, output_shape)
... | 39.95 | 127 | 0.604255 |
ea218d8913a08f497da1537f491907ea3322c67c | 1,831 | py | Python | nn_utils.py | ppramesi/JOANNA | db03aad134a3ce751184d53e2bef427ecec18044 | [
"MIT"
] | 3 | 2015-12-24T00:29:27.000Z | 2017-07-07T14:00:08.000Z | nn_utils.py | ppramesi/JOANNA | db03aad134a3ce751184d53e2bef427ecec18044 | [
"MIT"
] | null | null | null | nn_utils.py | ppramesi/JOANNA | db03aad134a3ce751184d53e2bef427ecec18044 | [
"MIT"
] | 3 | 2016-05-10T06:35:28.000Z | 2018-06-18T16:41:23.000Z | from keras.layers.core import TimeDistributedDense, Activation, AutoEncoderDropout
from keras.layers.recurrent import LSTM, GRU
from keras.preprocessing import sequence
from keras.models import Sequential
def buildPrestackedAutoencoder(layerCount, dimDecrease, input_dim, dropout=0.1, encActivation='softplus', dec... | 49.486486 | 132 | 0.70781 |
42f02b827785102657a42abc660f7f531e2242a6 | 7,309 | py | Python | examples/rl_3h.py | wsepesi/poke-env | 59b427cfaa316104c359fd1c7326429642015720 | [
"MIT"
] | null | null | null | examples/rl_3h.py | wsepesi/poke-env | 59b427cfaa316104c359fd1c7326429642015720 | [
"MIT"
] | null | null | null | examples/rl_3h.py | wsepesi/poke-env | 59b427cfaa316104c359fd1c7326429642015720 | [
"MIT"
] | null | null | null | #max to true max
#moves_dmg_multiplier updated for stab
# -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
from poke_env.player_configuration import PlayerConfiguration
from poke_env.player.env_player import Gen7EnvSinglePlayer
from poke_env.player.random_player import RandomPlayer
from poke_env.serve... | 32.340708 | 224 | 0.660692 |
df99a377912a22247e69805a25b3c4cabe3ecaf4 | 3,557 | py | Python | src/scs_dfe/interface/dfe/dfe.py | south-coast-science/scs_dfe_eng | 05708b27ba65438d11fad0d947bcff3df37dc87d | [
"MIT"
] | null | null | null | src/scs_dfe/interface/dfe/dfe.py | south-coast-science/scs_dfe_eng | 05708b27ba65438d11fad0d947bcff3df37dc87d | [
"MIT"
] | null | null | null | src/scs_dfe/interface/dfe/dfe.py | south-coast-science/scs_dfe_eng | 05708b27ba65438d11fad0d947bcff3df37dc87d | [
"MIT"
] | 2 | 2017-12-05T12:41:48.000Z | 2019-09-29T14:41:30.000Z | """
Created on 20 Jun 2019
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
A digital front-end (DFE) sensor interface
"""
from scs_core.gas.afe_baseline import AFEBaseline
from scs_core.gas.afe_calib import AFECalib
from scs_core.gas.afe.pt1000_calib import Pt1000Calib
from scs_dfe.gas.afe.afe import AFE... | 25.775362 | 118 | 0.46528 |
59dda79edbbfa12fa73535ba05e9213ad651cea1 | 9,886 | py | Python | cert_uploader/cli.py | GESkunkworks/cert-uploader | ee5cffbc3f14dd415d57e452a11475d5a237f125 | [
"MIT"
] | 4 | 2018-10-05T11:34:40.000Z | 2020-03-03T01:28:10.000Z | cert_uploader/cli.py | GESkunkworks/cert-uploader | ee5cffbc3f14dd415d57e452a11475d5a237f125 | [
"MIT"
] | null | null | null | cert_uploader/cli.py | GESkunkworks/cert-uploader | ee5cffbc3f14dd415d57e452a11475d5a237f125 | [
"MIT"
] | 2 | 2018-12-28T11:58:49.000Z | 2021-09-03T21:06:50.000Z | import re
from argparse import ArgumentParser
from time import sleep
from botocore.exceptions import ClientError
from .scan import scan_for_certificates
from .uploader import ACMCertificateUploader, IAMCertificateUploader
def get_version():
from .version import version
return version
def main():
parse... | 30.232416 | 114 | 0.553712 |
225862b4e006c71896bbc5dda1c3e05e17dda573 | 2,122 | py | Python | statbanksync/models/mirror.py | laosdirg/statbanksync | 0b9f6a7341754eeaebf87797982038c1a79ab7f2 | [
"MIT"
] | null | null | null | statbanksync/models/mirror.py | laosdirg/statbanksync | 0b9f6a7341754eeaebf87797982038c1a79ab7f2 | [
"MIT"
] | null | null | null | statbanksync/models/mirror.py | laosdirg/statbanksync | 0b9f6a7341754eeaebf87797982038c1a79ab7f2 | [
"MIT"
] | null | null | null | from statbanksync.database import Base, engine
import sqlalchemy
from sqlalchemy import Column, Sequence, types
class Mirror(Base):
"""Creates mirror objects that hold information on the last updated row of statbank table
"""
__tablename__ = 'mirrors'
statbank_table_id = Column(types.Text(), primary_... | 37.892857 | 103 | 0.599434 |
2d15f0a74e0e9ade162c1d7cbcdb98f6bc2bda17 | 11,309 | py | Python | numpy/core/memmap.py | maniteja123/numpy | 77ce5f48506c6305cd8987683291275726cde623 | [
"BSD-3-Clause"
] | 5 | 2016-10-28T02:39:59.000Z | 2017-04-26T03:13:10.000Z | numpy/core/memmap.py | maniteja123/numpy | 77ce5f48506c6305cd8987683291275726cde623 | [
"BSD-3-Clause"
] | 2 | 2019-07-19T16:30:31.000Z | 2019-07-19T19:17:13.000Z | numpy/core/memmap.py | tacaswell/numpy | 1147490663d36b05fad8dcce1e104601c2724560 | [
"BSD-3-Clause"
] | 4 | 2017-01-27T19:17:28.000Z | 2021-02-20T10:39:08.000Z | from __future__ import division, absolute_import, print_function
import numpy as np
from .numeric import uint8, ndarray, dtype
from numpy.compat import long, basestring, is_pathlib_path
__all__ = ['memmap']
dtypedescr = dtype
valid_filemodes = ["r", "c", "r+", "w+"]
writeable_filemodes = ["r+", "w+"]
mode_equivalen... | 33.758209 | 83 | 0.537979 |
b204432130b092c0f2708c4d13f40a37a57377a7 | 4,122 | py | Python | test/functional/interface_diaz_cli.py | diazcoin/diaz | 0fbc2b2fc5259871e86b47b7b5f1023c37416b61 | [
"MIT"
] | 3 | 2019-08-12T15:58:48.000Z | 2019-09-04T07:27:44.000Z | test/functional/interface_diaz_cli.py | diazcoin/diaz | 0fbc2b2fc5259871e86b47b7b5f1023c37416b61 | [
"MIT"
] | null | null | null | test/functional/interface_diaz_cli.py | diazcoin/diaz | 0fbc2b2fc5259871e86b47b7b5f1023c37416b61 | [
"MIT"
] | 1 | 2019-09-07T02:45:39.000Z | 2019-09-07T02:45:39.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test diaz-cli"""
from test_framework.test_framework import DiazTestFramework
from test_framework.util i... | 52.846154 | 160 | 0.693595 |
af5d84d404f0ac7dba52667f1e41421a62d798d7 | 247 | py | Python | model/group.py | Qwertty7/python_training | 9dae3e77d1f30e75c2cd452f38a91b854d0648a4 | [
"Apache-2.0"
] | 1 | 2020-01-21T07:59:40.000Z | 2020-01-21T07:59:40.000Z | model/group.py | Qwertty7/python_training | 9dae3e77d1f30e75c2cd452f38a91b854d0648a4 | [
"Apache-2.0"
] | null | null | null | model/group.py | Qwertty7/python_training | 9dae3e77d1f30e75c2cd452f38a91b854d0648a4 | [
"Apache-2.0"
] | 1 | 2020-01-21T08:00:01.000Z | 2020-01-21T08:00:01.000Z | class Group:
# создаем конструктор в классе Group
# записыает значение парамерта в свойства объекта
def __init__(self, name=None, header=None, footer=None):
self.name = name
self.header = header
self.footer = footer
| 22.454545 | 60 | 0.684211 |
22159904340f11436a834af6ad313a2e86872e25 | 19,947 | py | Python | src/scc_hypervisor_collector/api/configuration.py | SUSE/scc-hypervisor-collector | e3b9d2e7ddc3210b1f4fbe7a06eac8c22adb4c9a | [
"Apache-2.0"
] | null | null | null | src/scc_hypervisor_collector/api/configuration.py | SUSE/scc-hypervisor-collector | e3b9d2e7ddc3210b1f4fbe7a06eac8c22adb4c9a | [
"Apache-2.0"
] | null | null | null | src/scc_hypervisor_collector/api/configuration.py | SUSE/scc-hypervisor-collector | e3b9d2e7ddc3210b1f4fbe7a06eac8c22adb4c9a | [
"Apache-2.0"
] | null | null | null | """
SCC Hypervisor Collector Config Content.
The configuration for the SCC Hypervisor Collector is managed
as a hierarchy of dict-like mutable mapping objects which can
be validated against a set of required fields.
Additionally it is possible to specify a list of sensitive fields
whose values should not be displayed... | 32.486971 | 79 | 0.595929 |
f1f3de9c00f87973686d82e368797ea1b25004cf | 17,881 | py | Python | venv/Lib/site-packages/scipy/optimize/_constraints.py | mokshagna517/recommendation_sys | bc8ced225dff3c93d619ff5da363f42d0aa0676c | [
"MIT"
] | 366 | 2019-04-07T20:34:48.000Z | 2022-03-29T07:35:38.000Z | venv/Lib/site-packages/scipy/optimize/_constraints.py | mokshagna517/recommendation_sys | bc8ced225dff3c93d619ff5da363f42d0aa0676c | [
"MIT"
] | 30 | 2020-04-15T19:37:40.000Z | 2020-04-22T21:19:35.000Z | venv/Lib/site-packages/scipy/optimize/_constraints.py | mokshagna517/recommendation_sys | bc8ced225dff3c93d619ff5da363f42d0aa0676c | [
"MIT"
] | 61 | 2019-04-08T00:58:14.000Z | 2022-03-20T23:04:28.000Z | """Constraints definition for minimize."""
from __future__ import division, print_function, absolute_import
import numpy as np
from ._hessian_update_strategy import BFGS
from ._differentiable_functions import (
VectorFunction, LinearVectorFunction, IdentityVectorFunction)
from .optimize import OptimizeWarning
from ... | 39.64745 | 121 | 0.633242 |
8d318f4490040a31916b07b77515346df1ae3558 | 606 | py | Python | saleor/account/migrations/0029_user_meta.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/account/migrations/0029_user_meta.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/account/migrations/0029_user_meta.py | aminziadna/saleor | 2e78fb5bcf8b83a6278af02551a104cfa555a1fb | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | # Generated by Django 2.2.3 on 2019-07-16 08:17
import django.contrib.postgres.fields.jsonb
from django.db import migrations
import saleor.core.utils.json_serializer
class Migration(migrations.Migration):
dependencies = [("account", "0028_user_private_meta")]
operations = [
migrations.AddField(
... | 25.25 | 76 | 0.627063 |
7f6ed82bf9df56f5b254cd1ee937ba4de7101e08 | 5,377 | py | Python | src/conways.py | AbiFranklin/Cellular-Automata | 545baab2ea75eff1dbf8f048ee0607781528161d | [
"MIT"
] | null | null | null | src/conways.py | AbiFranklin/Cellular-Automata | 545baab2ea75eff1dbf8f048ee0607781528161d | [
"MIT"
] | null | null | null | src/conways.py | AbiFranklin/Cellular-Automata | 545baab2ea75eff1dbf8f048ee0607781528161d | [
"MIT"
] | null | null | null | import pygame, random
import pygameMenu
import sys
from patterns import blinker
# Define some colors and other constants
BLUE = (66, 87, 245)
WHITE = (255, 255, 255)
PINK = (242, 172, 241)
GRAY = (228, 230, 235)
DGRAY = (192, 192, 192)
WIN_SIZE = 500
CELL_SIZE = 20
# This sets the margin between each cell
MARGIN =... | 23.792035 | 93 | 0.454715 |
6cf55af70df5fcd0a2798786cbf4a7fced7c1db9 | 7,592 | py | Python | code/analysis/plot_neuron_dynamics.py | INM-6/reproducing-polychronization | fbce7040450a92996ef64bb081558ea02f6a72da | [
"MIT"
] | 2 | 2019-09-05T13:26:55.000Z | 2019-11-27T17:23:13.000Z | code/analysis/plot_neuron_dynamics.py | INM-6/reproducing-polychronization | fbce7040450a92996ef64bb081558ea02f6a72da | [
"MIT"
] | null | null | null | code/analysis/plot_neuron_dynamics.py | INM-6/reproducing-polychronization | fbce7040450a92996ef64bb081558ea02f6a72da | [
"MIT"
] | 3 | 2018-09-20T13:03:05.000Z | 2021-12-09T09:31:07.000Z | import matplotlib
matplotlib.use('Agg')
import nest
from nest import voltage_trace as vtr
import numpy as np
import pylab as plt
import seaborn as sns
import argparse
import plot_helper as phf
import matplotlib.gridspec as gridspec
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input', nargs='+', type... | 24.810458 | 118 | 0.682165 |
05022d9ad9e48527138b4d31e5152cbc532c6c3f | 7,613 | py | Python | project/extractor_module/characteristic_extractor/can_be_vbn_extractor.py | Xxhhj1/doc-generate-1 | 2363bfde4125c179cefb5ea9305f222f989eaa33 | [
"MIT"
] | 1 | 2021-02-05T08:42:55.000Z | 2021-02-05T08:42:55.000Z | project/extractor_module/characteristic_extractor/can_be_vbn_extractor.py | Xxhhj1/doc-generate-1 | 2363bfde4125c179cefb5ea9305f222f989eaa33 | [
"MIT"
] | null | null | null | project/extractor_module/characteristic_extractor/can_be_vbn_extractor.py | Xxhhj1/doc-generate-1 | 2363bfde4125c179cefb5ea9305f222f989eaa33 | [
"MIT"
] | null | null | null | from sekg.util.dependency_tree_util import DependencyTreeUtil
from project.extractor_module.constant.constant import RelationNameConstant, ALLKnowledgeFromType, NPEntityType
from project.extractor_module.data_model.simple_sentence import SimpleSentence
from project.extractor_module.data_model.statement_record import S... | 52.868056 | 119 | 0.569027 |
9305f4d15f47de17c8ee4070e3dc8d4a7139a5d5 | 9,886 | py | Python | projects/anosql/doc/conf.py | arrdem/source | df9aae1253ed415ade3a2b59e8a0996ff659543d | [
"MIT"
] | 4 | 2021-08-17T15:47:38.000Z | 2021-10-06T01:59:32.000Z | projects/anosql/doc/conf.py | arrdem/source | df9aae1253ed415ade3a2b59e8a0996ff659543d | [
"MIT"
] | 8 | 2021-08-14T17:47:08.000Z | 2021-09-20T20:22:47.000Z | projects/anosql/doc/conf.py | arrdem/source | df9aae1253ed415ade3a2b59e8a0996ff659543d | [
"MIT"
] | 1 | 2021-10-09T21:24:35.000Z | 2021-10-09T21:24:35.000Z | # -*- coding: utf-8 -*-
#
# anosql documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 25 09:16:20 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 29.076471 | 84 | 0.702509 |
393375f259b24648e4d25bb680ec53221ea293c1 | 677 | py | Python | backend/models/redeemed.py | salah-walid/Ecommerce-Shopping-App | c828701b03dab74c72538943f7aac5192fa20be6 | [
"MIT"
] | 1 | 2021-12-12T12:53:14.000Z | 2021-12-12T12:53:14.000Z | backend/models/redeemed.py | JetLightStudio/Ecommerce-Shopping-App | c828701b03dab74c72538943f7aac5192fa20be6 | [
"MIT"
] | null | null | null | backend/models/redeemed.py | JetLightStudio/Ecommerce-Shopping-App | c828701b03dab74c72538943f7aac5192fa20be6 | [
"MIT"
] | 1 | 2021-06-08T10:22:08.000Z | 2021-06-08T10:22:08.000Z | from django.db import models
from .productOrderData import productOrderData
from appConf.models.user import User
class redeemed(models.Model):
productOrder = models.ForeignKey(productOrderData, on_delete=models.CASCADE, null=False)
user = models.ForeignKey(User, on_delete=models.CASCADE, null=False)
poin... | 33.85 | 92 | 0.700148 |
89e238d755e45f98d1342c29de9fd4bc7b5d7a89 | 2,232 | py | Python | app/tests/test_meetup.py | huudi001/Question-api-v1 | 9b98013ca3830645d6b27fb53e99a2d05e9807cb | [
"MIT"
] | null | null | null | app/tests/test_meetup.py | huudi001/Question-api-v1 | 9b98013ca3830645d6b27fb53e99a2d05e9807cb | [
"MIT"
] | null | null | null | app/tests/test_meetup.py | huudi001/Question-api-v1 | 9b98013ca3830645d6b27fb53e99a2d05e9807cb | [
"MIT"
] | null | null | null | import json
import datetime
from base_test import BaseTestCase
class TestMeetups(BaseTestCase):
def test_post_meetup(self):
with self.client:
response = self.client.post('/api/v1/meetups', data=json.dumps(dict(meetup_id=100, location='mombasa',images='[image1, image2, image3]', topic='tech'... | 65.647059 | 299 | 0.685932 |
16819b20bce563ab0fb751dce772d243831f4c07 | 3,106 | py | Python | transforms.py | Siddhant021295/Gesture-Recognation-IPN-Hands | cd9bff56b88daa8c9d4397974e96baa599851d59 | [
"MIT"
] | null | null | null | transforms.py | Siddhant021295/Gesture-Recognation-IPN-Hands | cd9bff56b88daa8c9d4397974e96baa599851d59 | [
"MIT"
] | null | null | null | transforms.py | Siddhant021295/Gesture-Recognation-IPN-Hands | cd9bff56b88daa8c9d4397974e96baa599851d59 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
import numpy as np
import imgaug.augmenters as iaa
from imgaug.augmentables.bbs import BoundingBox, BoundingBoxesOnImage
# from imgaug.augmentables.segmaps import SegmentationMapsOnImage
from utils_ import xywh2xyxy_np
import torchvision.transforms as transforms
class Im... | 25.883333 | 88 | 0.572118 |
16e842290416e8fb3729f4bf6465063a8e97f074 | 12,324 | py | Python | third_party/blink/tools/blinkpy/web_tests/controllers/test_result_sink_unittest.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | third_party/blink/tools/blinkpy/web_tests/controllers/test_result_sink_unittest.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | third_party/blink/tools/blinkpy/web_tests/controllers/test_result_sink_unittest.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2020 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 contextlib
import json
import mock
import re
import requests
import sys
import unittest
from six.moves.urllib.parse import urlparse
from blinkpy.comm... | 35.211429 | 81 | 0.557124 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.