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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ecb1b056b45fb646b5124396662365d5daf50c4 | 151 | py | Python | 0x11-python-network_1/6-post_email.py | calypsobronte/holbertonschool-higher_level_programming | c39c060d8473976fa475d22fffba5cb4329c9965 | [
"MIT"
] | null | null | null | 0x11-python-network_1/6-post_email.py | calypsobronte/holbertonschool-higher_level_programming | c39c060d8473976fa475d22fffba5cb4329c9965 | [
"MIT"
] | null | null | null | 0x11-python-network_1/6-post_email.py | calypsobronte/holbertonschool-higher_level_programming | c39c060d8473976fa475d22fffba5cb4329c9965 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import requests
from sys import argv
if __name__ == "__main__":
print((requests.post(argv[1], data={'email': argv[2]})).text)
| 18.875 | 65 | 0.675497 |
48f726dd79dfc27b4607c76077038bd79e95758c | 75,622 | py | Python | paddlenlp/transformers/visualbert/modeling.py | chenkangyang/PaddleNLP | 0d4a8a80c8c20d774db207fae214509be402d149 | [
"Apache-2.0"
] | null | null | null | paddlenlp/transformers/visualbert/modeling.py | chenkangyang/PaddleNLP | 0d4a8a80c8c20d774db207fae214509be402d149 | [
"Apache-2.0"
] | null | null | null | paddlenlp/transformers/visualbert/modeling.py | chenkangyang/PaddleNLP | 0d4a8a80c8c20d774db207fae214509be402d149 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.799763 | 178 | 0.598966 |
bf9b05faeaaaa31fd7eb82b087932b6a7df86dc8 | 9,678 | py | Python | app/models.py | jorgegene/sis-inf-project | ed97162a828abb5c3c2013c33c6511e2ae0b6efd | [
"MIT"
] | null | null | null | app/models.py | jorgegene/sis-inf-project | ed97162a828abb5c3c2013c33c6511e2ae0b6efd | [
"MIT"
] | null | null | null | app/models.py | jorgegene/sis-inf-project | ed97162a828abb5c3c2013c33c6511e2ae0b6efd | [
"MIT"
] | null | null | null | from datetime import datetime
from app import db, login
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from sqlalchemy import Column, String, Integer, Boolean, ForeignKey, Text, func
@login.user_loader
def load_user(id):
return User.query.get(int(id))
c... | 31.320388 | 229 | 0.660777 |
480947d678231989b0596f762a37d173d9b90192 | 3,424 | py | Python | tests/anova_test.py | SakuragiYoshimasa/pystats | cf64f1a9d2f26b327a19352a272e6fb36134435e | [
"MIT"
] | 1 | 2020-07-31T18:10:26.000Z | 2020-07-31T18:10:26.000Z | tests/anova_test.py | SakuragiYoshimasa/pystats | cf64f1a9d2f26b327a19352a272e6fb36134435e | [
"MIT"
] | null | null | null | tests/anova_test.py | SakuragiYoshimasa/pystats | cf64f1a9d2f26b327a19352a272e6fb36134435e | [
"MIT"
] | null | null | null | #coding: utf-8
from pystats.anova import one_way_anova_between_subject
from pystats.anova import one_way_anova_within_subject
from pystats.anova import two_way_anova_between_subject
from pystats.anova import two_way_anova_within_subject
from pystats.anova import twawis_mat
import pandas as pd
from numba import jit
impo... | 45.653333 | 170 | 0.577103 |
3485c96527c31de535e3ed891c678d6e8fb76d97 | 764 | py | Python | algorithms/3SumClosest/3SumClosest.py | zhyu/leetcode | 3c2d85b4b7a497ceffac3e562ac1a468f1f6a4b0 | [
"MIT"
] | 5 | 2015-02-18T10:17:12.000Z | 2016-11-14T19:12:21.000Z | algorithms/3SumClosest/3SumClosest.py | zhyu/leetcode | 3c2d85b4b7a497ceffac3e562ac1a468f1f6a4b0 | [
"MIT"
] | null | null | null | algorithms/3SumClosest/3SumClosest.py | zhyu/leetcode | 3c2d85b4b7a497ceffac3e562ac1a468f1f6a4b0 | [
"MIT"
] | null | null | null | class Solution:
# @return an integer
def threeSumClosest(self, num, target):
num.sort()
res = sum(num[:3])
if res > target:
diff = res-target
elif res < target:
diff = target-res
else:
return res
n = len(num)
for i in x... | 26.344828 | 43 | 0.367801 |
30b2c4ea962bcc2d10befa3f436dc0dd751064a0 | 23,696 | py | Python | pysnmp-with-texts/JUNIPER-NSM-TRAPS.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/JUNIPER-NSM-TRAPS.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/JUNIPER-NSM-TRAPS.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module JUNIPER-NSM-TRAPS (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-NSM-TRAPS
# Produced by pysmi-0.3.4 at Wed May 1 14:00:39 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 145.374233 | 2,839 | 0.722274 |
0505167872c618da3dc9e03fabff1e9b153ad753 | 31,208 | py | Python | chainer_/chainercv2/models/polynet.py | yick2232/imgclsmob | fb220bff18b27d1fc6db1bac6cf69b70c2d07490 | [
"MIT"
] | 1 | 2019-11-28T10:02:58.000Z | 2019-11-28T10:02:58.000Z | chainer_/chainercv2/models/polynet.py | fireoil/imgclsmob | fb220bff18b27d1fc6db1bac6cf69b70c2d07490 | [
"MIT"
] | null | null | null | chainer_/chainercv2/models/polynet.py | fireoil/imgclsmob | fb220bff18b27d1fc6db1bac6cf69b70c2d07490 | [
"MIT"
] | 1 | 2019-11-20T18:47:37.000Z | 2019-11-20T18:47:37.000Z | """
PolyNet for ImageNet-1K, implemented in Chainer.
Original paper: 'PolyNet: A Pursuit of Structural Diversity in Very Deep Networks,'
https://arxiv.org/abs/1611.05725.
"""
__all__ = ['PolyNet', 'polynet']
import os
import chainer.functions as F
import chainer.links as L
from chainer import Chain
from f... | 31.747711 | 120 | 0.543002 |
4996c32e2369ffbf065965528818ba48c0a7a263 | 12,780 | py | Python | mne/io/tests/test_raw.py | achilleas-k/mne-python | 0078e1af13a92ab47498dd167bc5ec73be864427 | [
"BSD-3-Clause"
] | null | null | null | mne/io/tests/test_raw.py | achilleas-k/mne-python | 0078e1af13a92ab47498dd167bc5ec73be864427 | [
"BSD-3-Clause"
] | 4 | 2016-06-04T15:28:08.000Z | 2016-12-22T14:23:13.000Z | mne/io/tests/test_raw.py | achilleas-k/mne-python | 0078e1af13a92ab47498dd167bc5ec73be864427 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Generic tests that all raw classes should run."""
# # Authors: MNE Developers
# Stefan Appelhoff <stefan.appelhoff@mailbox.org>
#
# License: BSD (3-clause)
from os import path as op
import math
import pytest
import numpy as np
from numpy.testing import (assert_allclose, assert_ar... | 40.188679 | 79 | 0.599139 |
4eb1f70c6816bfd7a4fd9e31e2280e858d14d1e7 | 208 | py | Python | Models/Application.py | khatrivarun/tinder_for_jobs_py | 208d42c7c283fc97f966ec7173d53c5c89651862 | [
"MIT"
] | 4 | 2020-12-04T06:56:48.000Z | 2021-12-15T12:48:08.000Z | Models/Application.py | khatrivarun/tinder_for_jobs_py | 208d42c7c283fc97f966ec7173d53c5c89651862 | [
"MIT"
] | null | null | null | Models/Application.py | khatrivarun/tinder_for_jobs_py | 208d42c7c283fc97f966ec7173d53c5c89651862 | [
"MIT"
] | 1 | 2020-05-23T08:01:31.000Z | 2020-05-23T08:01:31.000Z | class Application:
def __init__(self):
self.application_id = None
self.job_id = None
self.applicant_email_id = None
self.company_email_id = None
self.response = ''
| 26 | 38 | 0.620192 |
20a242c1a971b9d80b2c80232b1a0ab6de606116 | 7,950 | py | Python | test/Polynomial_tests.py | coproc/PolyPieces | 35f6262e378de92147e20d8605d8247bd70ee4bb | [
"MIT"
] | null | null | null | test/Polynomial_tests.py | coproc/PolyPieces | 35f6262e378de92147e20d8605d8247bd70ee4bb | [
"MIT"
] | null | null | null | test/Polynomial_tests.py | coproc/PolyPieces | 35f6262e378de92147e20d8605d8247bd70ee4bb | [
"MIT"
] | null | null | null | import numbers
import unittest
from src.Polynomial import Polynomial as Poly
TEST_CASES_CREATION = [
('1', ([1], 'x')),
(('1',['y']), ([1], 'y')),
('x', ([0, 1], 'x')),
('y', ([0, 1], 'y')),
('1-x', ([1, -1], 'x')),
('1-y', ([1, -1], 'y')),
('1-xy', ([1, ([0, -1], 'x')], 'y')),
(('1-xy',['xy']), ([1, -1], 'xy... | 28.597122 | 107 | 0.500126 |
75eedbb37841c98028724cac224a7d1d8b791851 | 163 | py | Python | main.py | ChrisEngstrom/Py-PE-1 | 9302e12604ed8abbf0cdaad3c32d974b665d7914 | [
"MIT"
] | null | null | null | main.py | ChrisEngstrom/Py-PE-1 | 9302e12604ed8abbf0cdaad3c32d974b665d7914 | [
"MIT"
] | null | null | null | main.py | ChrisEngstrom/Py-PE-1 | 9302e12604ed8abbf0cdaad3c32d974b665d7914 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
sumOfMultiples = 0
for i in range(3, 1000):
if (i % 3 == 0 or
i % 5 == 0):
sumOfMultiples += i
print(sumOfMultiples)
| 14.818182 | 27 | 0.558282 |
8bb55b3a473e5b5a5894fda5e0c0ce9459a3913d | 3,394 | py | Python | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/show_off_site_backup_policy_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/show_off_site_backup_policy_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/show_off_site_backup_policy_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowOffSiteBackupPolicyResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
... | 29.513043 | 84 | 0.591043 |
aca859e2f25f12a3ab7b33021b7732ed2ce39076 | 1,751 | py | Python | script.mrknow.urlresolver/lib/urlresolver9/plugins/uploadaf.py | mrknow/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 105 | 2015-11-28T00:03:11.000Z | 2021-05-05T20:47:42.000Z | script.mrknow.urlresolver/lib/urlresolver9/plugins/uploadaf.py | rrosajp/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 918 | 2015-11-28T14:12:40.000Z | 2022-03-23T20:24:49.000Z | script.mrknow.urlresolver/lib/urlresolver9/plugins/uploadaf.py | rrosajp/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 111 | 2015-12-01T14:06:10.000Z | 2020-08-01T10:44:39.000Z | """
grifthost urlresolver plugin
Copyright (C) 2015 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is d... | 32.425926 | 84 | 0.68418 |
7e16e37c2ebc8e64fa127ae390f890e4d3ec397a | 7,909 | py | Python | docs/conf.py | alexhouse/python-fitbark | 8a665c8974829079781fb6e65fbe8b4fe3d1e5da | [
"Apache-2.0"
] | 1 | 2019-03-12T04:48:55.000Z | 2019-03-12T04:48:55.000Z | docs/conf.py | alexhouse/python-fitbark | 8a665c8974829079781fb6e65fbe8b4fe3d1e5da | [
"Apache-2.0"
] | null | null | null | docs/conf.py | alexhouse/python-fitbark | 8a665c8974829079781fb6e65fbe8b4fe3d1e5da | [
"Apache-2.0"
] | 1 | 2020-07-16T07:01:51.000Z | 2020-07-16T07:01:51.000Z | # -*- coding: utf-8 -*-
#
# Python-FitBark documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 14 18:51:57 2012.
#
# 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.
... | 32.020243 | 80 | 0.717158 |
ae163ee39500634db7bbae341bb00f08a9d7af26 | 3,546 | py | Python | Paper/paper-export.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | 48 | 2015-11-09T20:05:14.000Z | 2021-12-17T23:35:12.000Z | Paper/paper-export.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | null | null | null | Paper/paper-export.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | 24 | 2015-11-18T16:15:18.000Z | 2022-03-04T10:35:22.000Z | # File: paper-export.py
# Export Paper Docs Tool
# Version 1.0
# Author: Marcel Ribas - @macribas
# Date: 3/31/2021
# Python script to export Paper Docs from a Dropbox account. It can export in either HTML or Markdown.
# It only works in accounts that have Paper In the FileSystem (PiFS). Script checks the account for ... | 32.833333 | 189 | 0.723632 |
7dcf66207cbc23910b7a4c44d7d78ced7f232cef | 1,217 | py | Python | dataloader/mnist.py | lucamocerino/Binary-Neural-Networks-PyTorch-1.0 | aa62f5449e4f64bc821aea4d9921572e8dca8037 | [
"MIT"
] | 22 | 2020-09-15T12:59:49.000Z | 2022-02-12T15:56:32.000Z | dataloader/mnist.py | lucamocerino/Binary-Neural-Networks-PyTorch-1.0 | aa62f5449e4f64bc821aea4d9921572e8dca8037 | [
"MIT"
] | 3 | 2021-08-07T15:50:13.000Z | 2022-01-27T09:46:19.000Z | dataloader/mnist.py | lucamocerino/Binary-Neural-Networks-PyTorch-1.0 | aa62f5449e4f64bc821aea4d9921572e8dca8037 | [
"MIT"
] | 2 | 2021-07-19T06:34:55.000Z | 2022-03-22T18:06:03.000Z | from torch.utils.data import DataLoader
from os.path import join
from torchvision.datasets import MNIST
from torchvision.transforms import Compose, Resize, Normalize, ToTensor
def load_train_data(batch_size=128, sampler=None):
cuda = True
loader_kwargs = {'num_workers': 0, 'pin_memory': True} if cuda else {}
... | 31.205128 | 79 | 0.590797 |
4f5db26a240b58b54d7c586ddff346eac69f1c1b | 1,192 | py | Python | src/front_end/streamlit_helpers.py | Calychas/relocation-recommendation | b6a9c5d2df49e1656af76a8402c703be52546372 | [
"MIT"
] | null | null | null | src/front_end/streamlit_helpers.py | Calychas/relocation-recommendation | b6a9c5d2df49e1656af76a8402c703be52546372 | [
"MIT"
] | 2 | 2021-11-05T11:52:10.000Z | 2022-01-27T23:16:53.000Z | src/front_end/streamlit_helpers.py | Calychas/relocation-recommendation | b6a9c5d2df49e1656af76a8402c703be52546372 | [
"MIT"
] | null | null | null | import pydeck as pdk
selectbox_options = {
"price": "Mean price of offers",
"price_per_m": "Mean price per m2 of offers",
"area": "Mean area of offers",
"count": "Number of offers"
}
cities_selectbox_options = {
"wroclaw": "Wrocław",
"gdansk": "Gdańsk",
"warszawa": "Warszawa",
"krakow"... | 23.372549 | 68 | 0.547819 |
9632a1993e43759f0e5dd5fce8d6da2bff64347e | 13,930 | py | Python | profitability.py | slimcoin-project/slm-tools | 4649327cbf80c747f1e193852f23aeeae64a72f8 | [
"MIT"
] | null | null | null | profitability.py | slimcoin-project/slm-tools | 4649327cbf80c747f1e193852f23aeeae64a72f8 | [
"MIT"
] | null | null | null | profitability.py | slimcoin-project/slm-tools | 4649327cbf80c747f1e193852f23aeeae64a72f8 | [
"MIT"
] | null | null | null | # this script uses parts of the original Slimcoin code (/src/simulations/pob_difficulty.py)
# (c) The Slimcoin Developers 2014-19
# MIT License
from random import random as rand_num
import math, argparse, datetime
#constants for block types
#do we need to compute also POS blocks? (their difficulty could be ignored pr... | 38.694444 | 393 | 0.684853 |
7b18c6191087427e04f05d2371ff5c2872c67fce | 310 | py | Python | spider/settings.py | JamesZBL/zhilian_spider | 613879e59b0e42f4a95d41cc91c369330bf8f9ac | [
"Apache-2.0"
] | 61 | 2018-02-13T09:12:07.000Z | 2022-03-01T03:38:37.000Z | spider/settings.py | JamesZBL/zhilian_spider | 613879e59b0e42f4a95d41cc91c369330bf8f9ac | [
"Apache-2.0"
] | 1 | 2018-05-21T08:54:35.000Z | 2018-05-21T08:54:35.000Z | spider/settings.py | JamesZBL/zhilian_spider | 613879e59b0e42f4a95d41cc91c369330bf8f9ac | [
"Apache-2.0"
] | 8 | 2018-05-10T05:59:39.000Z | 2022-01-30T07:12:09.000Z | # -*- coding:utf-8 -*-
"""
@author:James
Created on:18-2-12 19:43
"""
# 搜索结果页
URL_RESULT = 'http://sou.zhaopin.com/jobs/searchresult.ashx'
# 搜索请求参数名
# 1.职位关键字
KEY_KEYWORD = 'kw'
# 2.地域范围
KEY_AREA = 'jl'
# 3.页码
KYE_PAGENUM = 'p'
# 关键字
VALUE_KEYWORD = 'Java'
# 范围
VALUE_AREA = '全国'
# 页数限制
PAGE_LIMIT = 1
| 11.071429 | 60 | 0.632258 |
07066fa386a9c539d21e191421d029d7409e3270 | 1,037 | py | Python | orm_sqlfan/libreria/migrations/0003_auto_20191125_0515.py | rulotr/djangorm_sqlfan | 4bcadd1459e5a39584bb5ad8bafaaf3993324f6a | [
"MIT"
] | 2 | 2021-09-29T01:08:56.000Z | 2022-02-14T03:34:37.000Z | orm_sqlfan/libreria/migrations/0003_auto_20191125_0515.py | rulotr/djangorm_sqlfan | 4bcadd1459e5a39584bb5ad8bafaaf3993324f6a | [
"MIT"
] | 4 | 2020-02-12T02:52:19.000Z | 2021-04-08T20:46:05.000Z | orm_sqlfan/libreria/migrations/0003_auto_20191125_0515.py | rulotr/djangorm_sqlfan | 4bcadd1459e5a39584bb5ad8bafaaf3993324f6a | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-11-25 05:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('libreria', '0002_libro'),
]
operations = [
migrations.AlterField(
model_name='libro',
name='desc_corta',
... | 26.589744 | 74 | 0.550627 |
45256f1b6aa8ee4b8a135f61bbf647d92e22babc | 4,822 | py | Python | UserManagement/forms.py | SkillSmart/ConferenceManagementSystem | 43af08260f321d1d506755da5c1b6ce1cf95fc42 | [
"MIT"
] | null | null | null | UserManagement/forms.py | SkillSmart/ConferenceManagementSystem | 43af08260f321d1d506755da5c1b6ce1cf95fc42 | [
"MIT"
] | null | null | null | UserManagement/forms.py | SkillSmart/ConferenceManagementSystem | 43af08260f321d1d506755da5c1b6ce1cf95fc42 | [
"MIT"
] | null | null | null | from django.forms import ModelForm, Form
from django.contrib.auth.models import User
from django.forms.models import formset_factory, modelform_factory, inlineformset_factory
# Crispy Imports
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Div, Field
# Profile Models
from Authentica... | 31.51634 | 111 | 0.568851 |
9f23c368a5e61e56857f038c087404146c627c26 | 25,784 | py | Python | src/interface/Python/paramonte/_TabularFileContents.py | cdslaborg/paramonte | 08b5ee74e1dc9045fca8fd7d94e3bbc979a3c425 | [
"MIT"
] | 158 | 2020-01-13T06:40:27.000Z | 2022-03-28T03:12:03.000Z | src/interface/Python/paramonte/_TabularFileContents.py | cdslaborg/paramonte | 08b5ee74e1dc9045fca8fd7d94e3bbc979a3c425 | [
"MIT"
] | 12 | 2020-10-31T22:46:10.000Z | 2022-03-17T19:57:06.000Z | src/interface/Python/paramonte/_TabularFileContents.py | cdslaborg/paramonte | 08b5ee74e1dc9045fca8fd7d94e3bbc979a3c425 | [
"MIT"
] | 18 | 2020-07-04T23:45:21.000Z | 2021-09-14T06:52:07.000Z | ####################################################################################################################################
####################################################################################################################################
####
#### MIT License
####
#### ParaMonte: plain p... | 46.794918 | 132 | 0.446517 |
124f38c891599afc6d672d8572a17e4cebf5ad92 | 493 | py | Python | application/modules/__init__.py | BaggerFast/Simple_votings | 843769fa6fd2c04feb542e6b301b7b4810260d4e | [
"MIT"
] | null | null | null | application/modules/__init__.py | BaggerFast/Simple_votings | 843769fa6fd2c04feb542e6b301b7b4810260d4e | [
"MIT"
] | null | null | null | application/modules/__init__.py | BaggerFast/Simple_votings | 843769fa6fd2c04feb542e6b301b7b4810260d4e | [
"MIT"
] | null | null | null | from application.modules.index import MainView
from application.modules.vote import VotePage
from application.modules.login import LoginView
from application.modules.registration import RegistrationView
from application.modules.votings_list import VoteListView
from application.modules.edit_vote import CreateEdiVoteView... | 49.3 | 61 | 0.890467 |
008f658db1cc654952e788b75771df293c0f8582 | 5,404 | py | Python | tests/parser_original_cases.py | wapwallace/jpath_finder | 5aa058507bec290aed179256cfb66364f6f4a490 | [
"Apache-2.0"
] | null | null | null | tests/parser_original_cases.py | wapwallace/jpath_finder | 5aa058507bec290aed179256cfb66364f6f4a490 | [
"Apache-2.0"
] | null | null | null | tests/parser_original_cases.py | wapwallace/jpath_finder | 5aa058507bec290aed179256cfb66364f6f4a490 | [
"Apache-2.0"
] | 1 | 2022-03-19T02:07:15.000Z | 2022-03-19T02:07:15.000Z | # json_path, result_expected
SORTED_CASES = (
("$.objects.`sorted`", [["alpha", "beta", "gamma"]]),
("$.objects.`sorted`[1]", ["beta"]),
("$.objects_2.`sorted`", [["cat", "cow", "horse"]]),
("$.objects_2.`sorted`[0]", ["cat"]),
)
LEN_CASES = (
("$.objects.`len`", [3]),
("$.objects_2.`len`", [3]... | 38.6 | 100 | 0.463175 |
a6ad18cf2645b49fa1d3bb3bf809578ad9969e85 | 8,672 | py | Python | pyleecan/Classes/NodeMat.py | helene-t/pyleecan | 8362de9b0e32b346051b38192e07f3a6974ea9aa | [
"Apache-2.0"
] | null | null | null | pyleecan/Classes/NodeMat.py | helene-t/pyleecan | 8362de9b0e32b346051b38192e07f3a6974ea9aa | [
"Apache-2.0"
] | null | null | null | pyleecan/Classes/NodeMat.py | helene-t/pyleecan | 8362de9b0e32b346051b38192e07f3a6974ea9aa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""File generated according to Generator/ClassesRef/Mesh/NodeMat.csv
WARNING! All changes made in this file will be lost!
"""
from os import linesep
from logging import getLogger
from ._check import set_array, check_var, raise_
from ..Functions.get_logger import get_logger
from ..Functions.save... | 31.194245 | 88 | 0.598708 |
99e06670ba7b512518d5baa104472d026816177f | 396 | py | Python | cs4050_ws.py | jadppf/ai_ws | b58f8a08d29af7b88ff1a51c74c4f1061189f9b1 | [
"MIT"
] | null | null | null | cs4050_ws.py | jadppf/ai_ws | b58f8a08d29af7b88ff1a51c74c4f1061189f9b1 | [
"MIT"
] | null | null | null | cs4050_ws.py | jadppf/ai_ws | b58f8a08d29af7b88ff1a51c74c4f1061189f9b1 | [
"MIT"
] | null | null | null | from time import time
def FiB(n, F):
if F[n] != -1:
return F[n]
F[n] = FiB(n-1, F) + FiB(n-2, F)
return F[n]
def main():
mark = time() * 1000
result = None
F = []
for i in range(2, 1000):
F.append(-1)
F[0], F[1] = 1, 1
result = FiB(100, F)
print result
now =... | 17.217391 | 36 | 0.474747 |
68a138299bf7eb7fc03b31a219aeb82b0556787e | 8,796 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations/_load_balancer_load_balancing_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations/_load_balancer_load_balancing_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations/_load_balancer_load_balancing_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 49.139665 | 216 | 0.676103 |
67eab4144c3e4f3917f805a6b2ab867a2b29e32d | 3,750 | py | Python | tfx/components/pusher/component.py | romeokienzler/tfx | 6449173532bc35b78dbfb93aa89a688a7278ef59 | [
"Apache-2.0"
] | null | null | null | tfx/components/pusher/component.py | romeokienzler/tfx | 6449173532bc35b78dbfb93aa89a688a7278ef59 | [
"Apache-2.0"
] | null | null | null | tfx/components/pusher/component.py | romeokienzler/tfx | 6449173532bc35b78dbfb93aa89a688a7278ef59 | [
"Apache-2.0"
] | 1 | 2020-06-05T08:31:32.000Z | 2020-06-05T08:31:32.000Z | # Copyright 2019 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 or a... | 43.103448 | 80 | 0.731467 |
c7bfc622f24e120b68be6c2a046ab23ce94e08cb | 1,269 | py | Python | Part-1-Answers/4-Manipulating_Strings/4-Short_Long_Names.py | Spigot-Dev/Grok-Intro_To_Programming_Python1-2 | 69c64019c0424f6cc8eb326b4456a510baab7ea7 | [
"MIT"
] | 2 | 2021-11-20T11:28:22.000Z | 2022-02-07T21:56:46.000Z | Part-1-Answers/4-Manipulating_Strings/4-Short_Long_Names.py | Spigot-Dev/Grok-Intro_To_Programming_Python1-2 | 69c64019c0424f6cc8eb326b4456a510baab7ea7 | [
"MIT"
] | null | null | null | Part-1-Answers/4-Manipulating_Strings/4-Short_Long_Names.py | Spigot-Dev/Grok-Intro_To_Programming_Python1-2 | 69c64019c0424f6cc8eb326b4456a510baab7ea7 | [
"MIT"
] | 4 | 2021-11-20T11:28:25.000Z | 2022-03-12T04:10:54.000Z | #17/02/21
#What does this code do?
# This code used concepts previously explored, the code takes an input, determines the length of the input using ".len" From there, the code decides what output print, based on the length of the input.
name = input("Enter your name: ")
length = len(name)
if length <=3:
p... | 55.173913 | 203 | 0.712372 |
20a45e0e36f3f52007decb91ebc2d0bbb16af071 | 16,303 | py | Python | ProjectFiles/bin/Release/2.80/scripts/addons_contrib/io_scene_cod/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-07-08T15:51:14.000Z | 2019-07-08T15:51:14.000Z | ProjectFiles/bin/Release/2.80/scripts/addons_contrib/io_scene_cod/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | ProjectFiles/bin/Release/2.80/scripts/addons_contrib/io_scene_cod/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 34.178197 | 151 | 0.64755 |
22606731e7b89795764088872f3e8f825432344b | 2,989 | py | Python | rest_api/application.py | Krak91/haystack | 7d769d8bf14a72801c695728c87f5f4eee0e9b87 | [
"Apache-2.0"
] | null | null | null | rest_api/application.py | Krak91/haystack | 7d769d8bf14a72801c695728c87f5f4eee0e9b87 | [
"Apache-2.0"
] | null | null | null | rest_api/application.py | Krak91/haystack | 7d769d8bf14a72801c695728c87f5f4eee0e9b87 | [
"Apache-2.0"
] | 1 | 2022-01-05T15:24:36.000Z | 2022-01-05T15:24:36.000Z | import logging
logging.basicConfig(format="%(asctime)s %(message)s", datefmt="%m/%d/%Y %I:%M:%S %p")
logger = logging.getLogger(__name__)
logging.getLogger("elasticsearch").setLevel(logging.WARNING)
logging.getLogger("haystack").setLevel(logging.INFO)
try:
import uvicorn
from fastapi import FastAPI, HTTPExcep... | 38.320513 | 180 | 0.731683 |
ada8c30fab7932491efa2cf0cc39e2e470d9dad2 | 29,941 | py | Python | tensorflow/python/framework/importer.py | JanX2/tensorflow | dd788dbbfa544c1ea4768940ac4300c22bb7e88e | [
"Apache-2.0"
] | 3 | 2017-12-04T07:45:22.000Z | 2018-04-20T06:53:17.000Z | tensorflow/python/framework/importer.py | JanX2/tensorflow | dd788dbbfa544c1ea4768940ac4300c22bb7e88e | [
"Apache-2.0"
] | null | null | null | tensorflow/python/framework/importer.py | JanX2/tensorflow | dd788dbbfa544c1ea4768940ac4300c22bb7e88e | [
"Apache-2.0"
] | 1 | 2020-05-14T06:13:24.000Z | 2020-05-14T06:13:24.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.736054 | 109 | 0.654187 |
45ed163a1aa6637c65bd6c74b1895b8db9b1e8da | 47,044 | py | Python | bot3.py | banban/CreativeTradeInBot | 56938229446983e91d851a3cc8e6ef2a01ace43b | [
"MIT"
] | null | null | null | bot3.py | banban/CreativeTradeInBot | 56938229446983e91d851a3cc8e6ef2a01ace43b | [
"MIT"
] | null | null | null | bot3.py | banban/CreativeTradeInBot | 56938229446983e91d851a3cc8e6ef2a01ace43b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# pylint: disable=C0116,W0613
# This program is dedicated to the public domain under the CC0 license.
"""
First, a few callback functions are defined. Then, those functions are passed to
the Dispatcher and registered at their respective places.
Then, the bot is started and runs until we pr... | 47.138277 | 226 | 0.579351 |
9be5c1b26accf5f7319af5a092874e4d1c9bb5c0 | 537 | py | Python | lhdetect2_web/users/views.py | cscenter/lhdetect2-web | aaef586b976b4a7efc9db042ed9a04773de6fcfe | [
"MIT"
] | null | null | null | lhdetect2_web/users/views.py | cscenter/lhdetect2-web | aaef586b976b4a7efc9db042ed9a04773de6fcfe | [
"MIT"
] | null | null | null | lhdetect2_web/users/views.py | cscenter/lhdetect2-web | aaef586b976b4a7efc9db042ed9a04773de6fcfe | [
"MIT"
] | null | null | null | from django.contrib.auth import login, get_user_model
from django.shortcuts import render, redirect
from users.forms import CustomUserCreationForm
def signup(request):
if request.method == 'POST':
form = CustomUserCreationForm(request.POST)
if form.is_valid():
user = form.save()
... | 24.409091 | 56 | 0.64432 |
3aa2088c22687b8be13dea3c9bd73ee0b954e3a0 | 1,236 | py | Python | examples/manifold/plot_swissroll.py | MarcinKonowalczyk/scikit-learn | 8b18d4cbfc3a10ce85decec292d30470c69f40d7 | [
"BSD-3-Clause"
] | 2 | 2020-11-07T02:13:22.000Z | 2022-01-18T14:42:59.000Z | examples/manifold/plot_swissroll.py | MarcinKonowalczyk/scikit-learn | 8b18d4cbfc3a10ce85decec292d30470c69f40d7 | [
"BSD-3-Clause"
] | 1 | 2022-01-12T13:11:21.000Z | 2022-01-12T13:11:21.000Z | examples/manifold/plot_swissroll.py | MarcinKonowalczyk/scikit-learn | 8b18d4cbfc3a10ce85decec292d30470c69f40d7 | [
"BSD-3-Clause"
] | 1 | 2021-11-03T09:49:02.000Z | 2021-11-03T09:49:02.000Z | """
===================================
Swiss Roll reduction with LLE
===================================
An illustration of Swiss Roll reduction
with locally linear embedding
"""
# Author: Fabian Pedregosa -- <fabian.pedregosa@inria.fr>
# License: BSD 3 clause (C) INRIA 2011
print(__doc__)
import matplotlib.pyplot... | 25.75 | 79 | 0.602751 |
6bfa668d615fe87ab162cc36b90502d074b64875 | 19,702 | py | Python | detectron2/modeling/meta_arch/Multimodal_data_fusion/SE_Rexnext_Encoder.py | dongdongdong1217/Detectron2-FC | 92356ebbf52b4e39c94537af26abcf46419c8c2f | [
"Apache-2.0"
] | 4 | 2022-01-02T07:06:58.000Z | 2022-01-08T05:04:43.000Z | detectron2/modeling/meta_arch/Multimodal_data_fusion/SE_Rexnext_Encoder.py | dongdongdong1217/Detectron2-FC | 92356ebbf52b4e39c94537af26abcf46419c8c2f | [
"Apache-2.0"
] | null | null | null | detectron2/modeling/meta_arch/Multimodal_data_fusion/SE_Rexnext_Encoder.py | dongdongdong1217/Detectron2-FC | 92356ebbf52b4e39c94537af26abcf46419c8c2f | [
"Apache-2.0"
] | 1 | 2022-01-02T11:46:23.000Z | 2022-01-02T11:46:23.000Z | '''
New for ResNeXt:
1. Wider bottleneck
2. Add group for conv2
'''
from cgi import print_directory
import torch.nn as nn
import math
import torch
import numpy as np
from ..build import META_ARCH_REGISTRY
from detectron2.modeling.meta_arch.Image_classification import SE_Resnext
class Bottleneck(nn.Module):
expans... | 43.301099 | 168 | 0.627957 |
14d0dfcf4cdaf6e7c845218dcb47bf7b38ac58f9 | 205,697 | py | Python | msgraph-cli-extensions/beta/financials_beta/azext_financials_beta/vendored_sdks/financials/models/_models.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/beta/financials_beta/azext_financials_beta/vendored_sdks/financials/models/_models.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/beta/financials_beta/azext_financials_beta/vendored_sdks/financials/models/_models.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 40.523444 | 122 | 0.657973 |
9872875f0a5646f5b4b10ff772ce86f3387e1b48 | 1,487 | py | Python | bottomline/blweb/migrations/0014_auto_20210801_1041.py | mcm219/BottomLine | db82eef403c79bffa3864c4db6bc336632abaca5 | [
"MIT"
] | null | null | null | bottomline/blweb/migrations/0014_auto_20210801_1041.py | mcm219/BottomLine | db82eef403c79bffa3864c4db6bc336632abaca5 | [
"MIT"
] | 1 | 2021-06-14T02:20:40.000Z | 2021-06-14T02:20:40.000Z | bottomline/blweb/migrations/0014_auto_20210801_1041.py | mcm219/BottomLine | db82eef403c79bffa3864c4db6bc336632abaca5 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.2 on 2021-08-01 14:41
from django.db import migrations, models
import django.db.models.deletion
import localflavor.us.models
class Migration(migrations.Migration):
dependencies = [
('blweb', '0013_vehiclemodel_price'),
]
operations = [
migrations.CreateModel(
... | 42.485714 | 214 | 0.642233 |
9cac18c28843e38f98de5b660b74ef30f236c707 | 1,483 | py | Python | show_hit_progress.py | lwj5/simple-amt | 9af304f2dda3da818158c21554ede4f9fae0a89d | [
"MIT"
] | null | null | null | show_hit_progress.py | lwj5/simple-amt | 9af304f2dda3da818158c21554ede4f9fae0a89d | [
"MIT"
] | null | null | null | show_hit_progress.py | lwj5/simple-amt | 9af304f2dda3da818158c21554ede4f9fae0a89d | [
"MIT"
] | null | null | null | import argparse
from collections import Counter
import simpleamt
if __name__ == "__main__":
parser = argparse.ArgumentParser(parents=[simpleamt.get_parent_parser()])
args = parser.parse_args()
mtc = simpleamt.get_mturk_connection_from_args(args)
if args.hit_ids_file is None:
parser.error("Mu... | 32.955556 | 78 | 0.570465 |
013276f989e61e727520bee99b95f211af35cfe6 | 394 | py | Python | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/models.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/models.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.777778 | 76 | 0.474619 |
5473b109f4d8004bc0b2a03199414788d9e81138 | 2,598 | py | Python | epimargin/smoothing.py | dilawar/epimargin | 0261117cb29dd233600d8f0410d79c93ba261fd3 | [
"MIT"
] | 6 | 2021-06-19T14:01:10.000Z | 2021-12-31T23:49:34.000Z | epimargin/smoothing.py | dilawar/epimargin | 0261117cb29dd233600d8f0410d79c93ba261fd3 | [
"MIT"
] | 34 | 2020-04-26T05:50:39.000Z | 2020-06-17T14:02:32.000Z | epimargin/smoothing.py | dilawar/epimargin | 0261117cb29dd233600d8f0410d79c93ba261fd3 | [
"MIT"
] | 5 | 2021-05-26T16:35:15.000Z | 2021-09-10T02:20:34.000Z | from typing import Optional, Sequence
import numpy as np
from scipy.signal import convolve, filtfilt, iirnotch
from statsmodels.nonparametric.smoothers_lowess import lowess as sm_lowess
# supported kernels for convolution smoothing
kernels = {
"hanning" : np.hanning,
"hamming" : np.hamming,
"bartlett" ... | 40.59375 | 139 | 0.661663 |
499aa282bc2ac7e50326970dd562407916ebda4d | 7,928 | py | Python | ck/repo/module/model.r/module.py | santosh653/ck | f09b836df48598aff4db241b52c37899a73eb569 | [
"BSD-3-Clause"
] | 480 | 2015-02-04T16:07:43.000Z | 2021-08-17T13:47:53.000Z | ck/repo/module/model.r/module.py | santosh653/ck | f09b836df48598aff4db241b52c37899a73eb569 | [
"BSD-3-Clause"
] | 166 | 2015-02-05T16:03:52.000Z | 2021-08-16T14:21:58.000Z | ck/repo/module/model.r/module.py | santosh653/ck | f09b836df48598aff4db241b52c37899a73eb569 | [
"BSD-3-Clause"
] | 62 | 2015-02-05T17:21:14.000Z | 2021-09-05T10:24:53.000Z | #
# Collective Knowledge (Unified modeling using R)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin
#
cfg={} # Will be updated by CK (meta description of this module)
work={} # Will be updated by CK (temporal data)
ck=None # Will be updated by CK... | 26.783784 | 150 | 0.489279 |
85aa8921074f7531d10fa6077c12e33c5d237543 | 5,445 | py | Python | anchore_manager/cli/utils.py | roachmd/anchore-engine | 521d6796778139a95f51542670714205c2735a81 | [
"Apache-2.0"
] | null | null | null | anchore_manager/cli/utils.py | roachmd/anchore-engine | 521d6796778139a95f51542670714205c2735a81 | [
"Apache-2.0"
] | null | null | null | anchore_manager/cli/utils.py | roachmd/anchore-engine | 521d6796778139a95f51542670714205c2735a81 | [
"Apache-2.0"
] | null | null | null | import os
import re
import sys
import copy
import json
import time
import yaml
import urllib
import logging
import dateutil.parser
from prettytable import PrettyTable, PLAIN_COLUMNS
from collections import OrderedDict
#from textwrap import fill
import anchore_engine.db.entities.common
from anchore_engine.subsys impor... | 30.589888 | 136 | 0.612489 |
7668594c353183d7d86fa02f82c3baeb777acfb2 | 1,106 | py | Python | madtornado/ancient/module/syncMemcached.py | SystemLight/madtornado | 707ee156c33facd7050449f9fccef44f1c302b19 | [
"MIT"
] | 8 | 2020-04-12T13:53:13.000Z | 2022-01-11T15:31:31.000Z | madtornado/ancient/module/syncMemcached.py | SystemLight/Mad_tornado3 | 707ee156c33facd7050449f9fccef44f1c302b19 | [
"MIT"
] | null | null | null | madtornado/ancient/module/syncMemcached.py | SystemLight/Mad_tornado3 | 707ee156c33facd7050449f9fccef44f1c302b19 | [
"MIT"
] | null | null | null | from ..conf import parser
import memcache
import json
option = parser.options("cache")
print("[syncMemcached] is imported.")
class Component:
def __init__(self):
self.memcachedClient = None
self.over_time = option["over_time"]
self.server_list = json.loads(option["server_list"])
d... | 25.136364 | 77 | 0.65642 |
e9859a7024632033cf3b04e15f2e07da44c6d801 | 12,971 | py | Python | model.py | dastratakos/CS-221-Final-Project | 18849d547c939c5470bb80fcc76842a7e1d42577 | [
"Apache-2.0"
] | 1 | 2021-05-07T10:03:46.000Z | 2021-05-07T10:03:46.000Z | model.py | dastratakos/Optimized-Task-Scheduling | 18849d547c939c5470bb80fcc76842a7e1d42577 | [
"Apache-2.0"
] | null | null | null | model.py | dastratakos/Optimized-Task-Scheduling | 18849d547c939c5470bb80fcc76842a7e1d42577 | [
"Apache-2.0"
] | null | null | null | '''
file: model.py
authors: Kento Perera, Timothy Sah, and Dean Stratakos
date: December 1, 2019
----------
This file contains our implementations of Value Iteration
and Q-learning for our CS 221 Project.
We borrowed code structure from blackjack/submission.py
'''
import util, math, random, csv, timeit
from collection... | 37.488439 | 147 | 0.606507 |
5669ffb60a370e57ca3397e642b47ac397e6e11b | 2,410 | py | Python | layers.py | Shinkai125/KerasForTextClassfication | ed3d04c5c58d1dfb3f79b83ba704dd486616f0e4 | [
"MIT"
] | null | null | null | layers.py | Shinkai125/KerasForTextClassfication | ed3d04c5c58d1dfb3f79b83ba704dd486616f0e4 | [
"MIT"
] | null | null | null | layers.py | Shinkai125/KerasForTextClassfication | ed3d04c5c58d1dfb3f79b83ba704dd486616f0e4 | [
"MIT"
] | null | null | null | """
@file: layers.py.py
@time: 2020-12-02 19:32:42
"""
from tensorflow.keras.layers import Layer
from tensorflow.keras import initializers, regularizers, constraints
from tensorflow.keras import backend as K
class Attention(Layer):
"""
Custom Keras attention layer
Reference: https://www.kaggle.com/qqgeogo... | 29.753086 | 90 | 0.576763 |
81664dc77f4f6bb2cf9d0b73b35ac744a3dc4481 | 5,610 | py | Python | test/Java/JAR.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | 1 | 2015-11-04T22:22:10.000Z | 2015-11-04T22:22:10.000Z | test/Java/JAR.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | null | null | null | test/Java/JAR.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, including
# without limitation the rights to use, copy, modify, merge, publish,
... | 22.086614 | 82 | 0.612834 |
2573e05a44a918e37ca1ae9fbe409ed7f18a2379 | 9,217 | py | Python | app.py | jmewes/epages-beyond-payment-app | d610483fd016c38444bc634e4535c59a2f99f7f3 | [
"MIT"
] | null | null | null | app.py | jmewes/epages-beyond-payment-app | d610483fd016c38444bc634e4535c59a2f99f7f3 | [
"MIT"
] | 3 | 2022-03-07T17:37:31.000Z | 2022-03-08T08:39:38.000Z | app.py | jmewes/epages-beyond-payment-app | d610483fd016c38444bc634e4535c59a2f99f7f3 | [
"MIT"
] | 1 | 2018-12-13T09:29:59.000Z | 2018-12-13T09:29:59.000Z | # -*- coding: utf-8 -*-
'''
Author: Oliver Zscheyge
Description:
Web app that generates beautiful order documents for ePages Beyond shops.
'''
import os
import logging
import random
from urllib.parse import urlencode, urlparse, unquote
from flask import Flask, render_template, request, Response, abort, escape, j... | 34.781132 | 145 | 0.683303 |
afa9aade0f670cafe2342de0687a2bf1e4f85a79 | 486 | py | Python | src/paper/migrations/0077_paper_edited_file_extract.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 18 | 2021-05-20T13:20:16.000Z | 2022-02-11T02:40:18.000Z | src/paper/migrations/0077_paper_edited_file_extract.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 109 | 2021-05-21T20:14:23.000Z | 2022-03-31T20:56:10.000Z | src/paper/migrations/0077_paper_edited_file_extract.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 4 | 2021-05-17T13:47:53.000Z | 2022-02-12T10:48:21.000Z | # Generated by Django 2.2 on 2021-03-03 00:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('paper', '0076_paper_pdf_file_extract'),
]
operations = [
migrations.AddField(
model_name='paper',
name='edited_file_ex... | 25.578947 | 140 | 0.63786 |
4df318add8e40fb947867a3d0f312a6646e69e57 | 3,464 | py | Python | couchdb/database.py | mqzry/pycouchdb | 1592b1b501e6e2dea3009a83e9c937da70b49af8 | [
"MIT"
] | null | null | null | couchdb/database.py | mqzry/pycouchdb | 1592b1b501e6e2dea3009a83e9c937da70b49af8 | [
"MIT"
] | 10 | 2016-08-02T17:24:05.000Z | 2016-09-06T17:06:06.000Z | couchdb/database.py | mqzry/pycouchdb | 1592b1b501e6e2dea3009a83e9c937da70b49af8 | [
"MIT"
] | null | null | null | from .document import Document
from requests import codes
import logging
class Database:
def __init__(self, server, name):
self.name = name
self.server = server
self.session = server.session
self.session.add_part_to_prefix(name)
def exists(self):
return self.head()
... | 35.346939 | 134 | 0.568129 |
6556abfa0393649f9a79992dffd48f6c9c0ed3bb | 28,513 | py | Python | tests/dedupe_test.py | tvtongerloo/django-DefectDojo | 77f241afd7773a95a73621fcc60971263885337a | [
"BSD-3-Clause"
] | 1 | 2021-01-19T17:25:57.000Z | 2021-01-19T17:25:57.000Z | tests/dedupe_test.py | tvtongerloo/django-DefectDojo | 77f241afd7773a95a73621fcc60971263885337a | [
"BSD-3-Clause"
] | null | null | null | tests/dedupe_test.py | tvtongerloo/django-DefectDojo | 77f241afd7773a95a73621fcc60971263885337a | [
"BSD-3-Clause"
] | null | null | null | from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import unittest
import sys
import os
from base_test_class import BaseTestCase, on_exception_ht... | 56.127953 | 154 | 0.692316 |
00ed71b8fb74f17634f10c9ea4f9d985d8316e81 | 1,991 | py | Python | plugins/fortinet_fortigate/unit_test/test_get_policies.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | null | null | null | plugins/fortinet_fortigate/unit_test/test_get_policies.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | null | null | null | plugins/fortinet_fortigate/unit_test/test_get_policies.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | null | null | null | import sys
import os
from unittest import TestCase
from icon_fortinet_fortigate.actions.get_policies import GetPolicies
from icon_fortinet_fortigate.actions.get_policies.schema import Input, Output
from unit_test.util import Util
from unittest.mock import patch
from parameterized import parameterized
from insightconne... | 36.2 | 94 | 0.503265 |
55cb5c5a725eba316b3c81a2220c2aae35ced440 | 1,067 | py | Python | ding/entry/tests/test_serial_entry_sqil.py | youngzhou1999/DI-engine | 7e9e4e88a02c0fcf1a6399272b09f1dd7595e845 | [
"Apache-2.0"
] | null | null | null | ding/entry/tests/test_serial_entry_sqil.py | youngzhou1999/DI-engine | 7e9e4e88a02c0fcf1a6399272b09f1dd7595e845 | [
"Apache-2.0"
] | null | null | null | ding/entry/tests/test_serial_entry_sqil.py | youngzhou1999/DI-engine | 7e9e4e88a02c0fcf1a6399272b09f1dd7595e845 | [
"Apache-2.0"
] | null | null | null | import pytest
import torch
from copy import deepcopy
from ding.entry import serial_pipeline
from ding.entry.serial_entry_sqil import serial_pipeline_sqil
from dizoo.classic_control.cartpole.config.cartpole_sql_config import cartpole_sql_config, cartpole_sql_create_config
from dizoo.classic_control.cartpole.config.cartp... | 44.458333 | 120 | 0.818182 |
72fb59ce9d38d8974e58cfff028b0d4334b87320 | 10,709 | py | Python | cms/utils/conf.py | rspeed/django-cms-contrib | c5fbbea191646ab922b5ff6f89a1de6baa648e7f | [
"BSD-3-Clause"
] | null | null | null | cms/utils/conf.py | rspeed/django-cms-contrib | c5fbbea191646ab922b5ff6f89a1de6baa648e7f | [
"BSD-3-Clause"
] | null | null | null | cms/utils/conf.py | rspeed/django-cms-contrib | c5fbbea191646ab922b5ff6f89a1de6baa648e7f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from functools import update_wrapper
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _
from django.utils.six.moves.urllib.parse import urljoin
from cms import constants
__all__ = ['get_cm... | 36.301695 | 120 | 0.66953 |
ce1be3cf2f9052b4b6f7c4642d8d92cf96422f23 | 22,579 | py | Python | bs_seeker2-align.py | huboqiang/BSseeker2 | 385f88cf78b3efced75798c00f0e7185ac064047 | [
"MIT"
] | null | null | null | bs_seeker2-align.py | huboqiang/BSseeker2 | 385f88cf78b3efced75798c00f0e7185ac064047 | [
"MIT"
] | null | null | null | bs_seeker2-align.py | huboqiang/BSseeker2 | 385f88cf78b3efced75798c00f0e7185ac064047 | [
"MIT"
] | 1 | 2021-11-01T03:21:47.000Z | 2021-11-01T03:21:47.000Z | #!/usr/bin/env python
from optparse import OptionParser, OptionGroup
import re
import tempfile
from bs_align import output
from bs_align.bs_pair_end import *
from bs_align.bs_single_end import *
from bs_align.bs_rrbs import *
import os
#import re
#from bs_utils.utils import *
if __name__ == '__main__':
parser =... | 56.166667 | 304 | 0.538642 |
05bdc090c8242089b86e8fc4740f72cec85f402d | 4,629 | py | Python | tests/test_connector.py | zzx4998/Python-Honeypot | 78d4258bdaaacf8f0b54349f8d00c560eb6de704 | [
"Apache-2.0"
] | 1 | 2021-05-02T12:16:21.000Z | 2021-05-02T12:16:21.000Z | tests/test_connector.py | zzx4998/Python-Honeypot | 78d4258bdaaacf8f0b54349f8d00c560eb6de704 | [
"Apache-2.0"
] | 3 | 2021-07-28T01:25:31.000Z | 2022-03-29T22:10:45.000Z | tests/test_connector.py | zzx4998/Python-Honeypot | 78d4258bdaaacf8f0b54349f8d00c560eb6de704 | [
"Apache-2.0"
] | 1 | 2021-06-24T17:22:08.000Z | 2021-06-24T17:22:08.000Z | import unittest
import time
from datetime import datetime
from multiprocessing import Queue
from database.connector import (credential_events,
data_events,
honeypot_events,
insert_to_credential_events_collection,
... | 32.829787 | 83 | 0.605962 |
88b42ded4a5a32c4b7c77580ae7b5b4384062a5e | 3,350 | py | Python | bin/tumor_vis1.py | rheiland/pc4fury | 41ef56afcfdfc7931fd1b82450f36fd33dfc7697 | [
"BSD-3-Clause"
] | null | null | null | bin/tumor_vis1.py | rheiland/pc4fury | 41ef56afcfdfc7931fd1b82450f36fd33dfc7697 | [
"BSD-3-Clause"
] | null | null | null | bin/tumor_vis1.py | rheiland/pc4fury | 41ef56afcfdfc7931fd1b82450f36fd33dfc7697 | [
"BSD-3-Clause"
] | null | null | null |
from pyMCDS_cells import pyMCDS_cells
import numpy as np
from fury import window, actor, ui
#mcds = pyMCDS_cells('output00000001.xml','data')
#mcds = pyMCDS_cells('output00000001.xml','.') # 23123 cells
mcds = pyMCDS_cells('output00000001.xml','../tmpdir') # 23123 cells
#mcds = pyMCDS_cells('output00000006.xml','..... | 40.853659 | 618 | 0.682388 |
3773d4de7f8e30dc59d6dfe6149aadc64f5e778b | 300 | py | Python | tests/context.py | cxz/klaws | 7f072e46a5f7d263b7e059d21591f776c4c7991b | [
"MIT"
] | null | null | null | tests/context.py | cxz/klaws | 7f072e46a5f7d263b7e059d21591f776c4c7991b | [
"MIT"
] | null | null | null | tests/context.py | cxz/klaws | 7f072e46a5f7d263b7e059d21591f776c4c7991b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
#import sample
#httpretty doesnt work with proxy
for v in ['HTTP_PROXY', 'HTTPS_PROXY', 'http_proxy', 'https_proxy']:
if v in os.environ:
del os.environ[v]
| 23.076923 | 82 | 0.666667 |
f6c63c358cbf2da400ebc025d9f82d75f7ea05fe | 9,660 | py | Python | modules/text/language_model/bert-base-chinese/module.py | eepgxxy/PaddleHub | b2b6278f8a1f704994ef36474570bab0e0dbe6c0 | [
"Apache-2.0"
] | 2 | 2020-12-02T07:29:14.000Z | 2021-11-12T11:13:31.000Z | modules/text/language_model/bert-base-chinese/module.py | dwuping/PaddleHub | 9a3b23295947e22149cc85c17cb4cf23c03f9e06 | [
"Apache-2.0"
] | null | null | null | modules/text/language_model/bert-base-chinese/module.py | dwuping/PaddleHub | 9a3b23295947e22149cc85c17cb4cf23c03f9e06 | [
"Apache-2.0"
] | 1 | 2020-12-03T07:14:34.000Z | 2020-12-03T07:14:34.000Z | # Copyright (c) 2020 PaddlePaddle 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... | 43.513514 | 127 | 0.636232 |
1e747e7073596f5734524cf96a58ab1cec0aa7e5 | 3,420 | py | Python | tensorforce/core/baselines/network_baseline.py | bettermanlu/tensorforce | b045da9f048897842bcecebfa30bcb94703b07fd | [
"Apache-2.0"
] | 1 | 2019-12-21T03:31:33.000Z | 2019-12-21T03:31:33.000Z | tensorforce/core/baselines/network_baseline.py | jesuscast/tensorforce-clone | 524976f9cdbeebb01eb88c77ae842dbe4c4a1f36 | [
"Apache-2.0"
] | null | null | null | tensorforce/core/baselines/network_baseline.py | jesuscast/tensorforce-clone | 524976f9cdbeebb01eb88c77ae842dbe4c4a1f36 | [
"Apache-2.0"
] | 1 | 2019-12-21T03:31:39.000Z | 2019-12-21T03:31:39.000Z | # Copyright 2017 reinforce.io. 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... | 36.382979 | 116 | 0.690351 |
1e9bc646a2ddcdc4d8ab4c0887b52dc9337b83e2 | 4,121 | py | Python | old/visualizer/mzn_visualize.py | SirChri/square-grid-tiling-shapes | a8c3865b4c321d0ebcbfedbe03743a2162e4dca6 | [
"Apache-2.0"
] | null | null | null | old/visualizer/mzn_visualize.py | SirChri/square-grid-tiling-shapes | a8c3865b4c321d0ebcbfedbe03743a2162e4dca6 | [
"Apache-2.0"
] | null | null | null | old/visualizer/mzn_visualize.py | SirChri/square-grid-tiling-shapes | a8c3865b4c321d0ebcbfedbe03743a2162e4dca6 | [
"Apache-2.0"
] | null | null | null | from cgitb import text
import sys, json, re, subprocess, os, shutil
solver = sys.argv[1]
mainfile = sys.argv[2]
inputfile = sys.argv[3]
out_filepath = sys.argv[4] if len(sys.argv) > 4 else None
file_path = os.path.abspath(os.path.dirname(__file__))
if not out_filepath:
out_filepath = os.path.join(file_path, 'outp... | 29.862319 | 188 | 0.542101 |
75c2ce18b0c40005f4b2277b2dcbfaed18a55175 | 4,596 | py | Python | kubernetes_asyncio/client/models/v1_non_resource_rule.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | 1 | 2020-03-25T01:24:27.000Z | 2020-03-25T01:24:27.000Z | kubernetes_asyncio/client/models/v1_non_resource_rule.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_non_resource_rule.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 31.916667 | 178 | 0.596606 |
d8fee0180da20afe120b4fe30d12d9d3122cfcd8 | 982 | py | Python | pylava/lint/pylava_radon.py | exKAZUu/pylava | 1a42d0522fc2bb04f2849ac5544e9b1da8f7e298 | [
"MIT"
] | 76 | 2018-08-17T11:08:09.000Z | 2018-10-01T16:36:50.000Z | pylava/lint/pylava_radon.py | exKAZUu/pylava | 1a42d0522fc2bb04f2849ac5544e9b1da8f7e298 | [
"MIT"
] | 5 | 2018-12-05T09:36:40.000Z | 2020-10-01T19:43:26.000Z | pylava/lint/pylava_radon.py | exKAZUu/pylava | 1a42d0522fc2bb04f2849ac5544e9b1da8f7e298 | [
"MIT"
] | 7 | 2018-12-05T05:17:53.000Z | 2021-09-27T09:05:06.000Z | from radon.visitors import ComplexityVisitor
from radon.complexity import add_inner_blocks
from pylava.lint import Linter as Abstract
class Linter(Abstract):
"""Radon runner."""
@staticmethod
def run(path, code=None, params=None, ignore=None, select=None, **meta):
"""Check code with Radon.
... | 30.6875 | 90 | 0.632383 |
ef80afb27f29b9a8709627f30bbeef41d653912c | 15,785 | py | Python | pytorch_lightning/utilities/model_summary.py | AI-App/PyTorch-Lightning | ca9b25db80f08a3b9a3c448048949ec1adb845ba | [
"Apache-2.0"
] | 15,666 | 2020-01-14T07:16:15.000Z | 2022-03-31T23:22:26.000Z | pytorch_lightning/utilities/model_summary.py | AI-App/PyTorch-Lightning | ca9b25db80f08a3b9a3c448048949ec1adb845ba | [
"Apache-2.0"
] | 9,140 | 2020-01-14T03:10:42.000Z | 2022-03-31T19:57:09.000Z | pytorch_lightning/utilities/model_summary.py | AI-App/PyTorch-Lightning | ca9b25db80f08a3b9a3c448048949ec1adb845ba | [
"Apache-2.0"
] | 2,340 | 2020-01-14T06:45:32.000Z | 2022-03-31T22:57:07.000Z | # Copyright The PyTorch Lightning team.
#
# 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... | 36.370968 | 115 | 0.621603 |
2f5df0c790ee2784450581ef84c4ca7332b2988a | 1,204 | py | Python | test/test_ezsignfolder_request.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsignfolder_request.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsignfolder_request.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | """
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import eZmaxApi
from... | 29.365854 | 109 | 0.76495 |
c896dace3efae624ad31366bf4a3bade77421bbf | 121 | py | Python | 1007_Difference.py | DiegoC386/EJERCICIOS-URI | b2e12b6420ea16a9060726b988ea1b35cbf312c2 | [
"MIT"
] | null | null | null | 1007_Difference.py | DiegoC386/EJERCICIOS-URI | b2e12b6420ea16a9060726b988ea1b35cbf312c2 | [
"MIT"
] | null | null | null | 1007_Difference.py | DiegoC386/EJERCICIOS-URI | b2e12b6420ea16a9060726b988ea1b35cbf312c2 | [
"MIT"
] | null | null | null | A=int(input())
B=int(input())
C=int(input())
D=int(input())
DIFERENCA=((A*B)-(C*D))
print("DIFERENCA = " +str(DIFERENCA)) | 20.166667 | 37 | 0.619835 |
26e113a5c2af03b8922fc30fe3c6f745cff39476 | 3,376 | py | Python | lib/googlecloudsdk/command_lib/compute/reservations/util.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/compute/reservations/util.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | lib/googlecloudsdk/command_lib/compute/reservations/util.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 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 requir... | 35.914894 | 78 | 0.732227 |
de2bc6cc6daf7c9ce1854dd74615ad760ad6ab3e | 17,765 | py | Python | lib/cogs/mapdatabase.py | JLpython-py/Among-Us-Bot | edaedd5e820ed23b6d300070086084890ecf1ed5 | [
"MIT"
] | 4 | 2021-02-07T05:02:02.000Z | 2021-06-19T04:36:59.000Z | lib/cogs/mapdatabase.py | JLpython-py/AmongUs-MapBot | edaedd5e820ed23b6d300070086084890ecf1ed5 | [
"MIT"
] | 15 | 2020-12-13T00:59:08.000Z | 2021-01-24T20:01:25.000Z | lib/cogs/mapdatabase.py | JLpython-py/Among-Us-Bot | edaedd5e820ed23b6d300070086084890ecf1ed5 | [
"MIT"
] | 1 | 2020-12-12T14:50:20.000Z | 2020-12-12T14:50:20.000Z | #! python3
# mapdatabase.py
"""
==============================================================================
MIT License
Copyright (c) 2020 Jacob Lee
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 Sof... | 36.107724 | 78 | 0.62139 |
4efb5f6d769af4effcdbd8bb3d963ec85f195258 | 2,018 | py | Python | lib/ExtraFM.py | KanHatakeyama/anneal_project2 | e9b5e776f4ac1d202b952c9b6fb4ffaee833441d | [
"MIT"
] | null | null | null | lib/ExtraFM.py | KanHatakeyama/anneal_project2 | e9b5e776f4ac1d202b952c9b6fb4ffaee833441d | [
"MIT"
] | null | null | null | lib/ExtraFM.py | KanHatakeyama/anneal_project2 | e9b5e776f4ac1d202b952c9b6fb4ffaee833441d | [
"MIT"
] | null | null | null | from scipy.sparse import csr_matrix
from pyfm import pylibfm
import numpy as np
from numba import jit
from ScaleRegressor import ScaleRegressor
default_model = pylibfm.FM(task="regression", num_iter=30, initial_learning_rate=10**-3,
num_factors=10,
verbose=False
... | 26.552632 | 112 | 0.558474 |
9fa58e88f8a32d124b5ccb2ed5b367496fa2361c | 1,169 | py | Python | py12/py12-packages/parts/servo.py | hiro345g/raspi_magazine_201612_toku1 | 5947a1c864f9844bb8da955e1b8331553546bba6 | [
"MIT"
] | null | null | null | py12/py12-packages/parts/servo.py | hiro345g/raspi_magazine_201612_toku1 | 5947a1c864f9844bb8da955e1b8331553546bba6 | [
"MIT"
] | null | null | null | py12/py12-packages/parts/servo.py | hiro345g/raspi_magazine_201612_toku1 | 5947a1c864f9844bb8da955e1b8331553546bba6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import wiringpi
class Servo:
""" SG90サーボモーター用クラス """
PWM_CLOCK = 375
def __init__(self, pin):
""" 初期化メソッド """
self.pin = pin # GPIOピン
self._degree = 0 # 角度の初期値
# wiringpiの初期化
# wiringpi.wiringPiSetupGpio() は __init__.py で実行済み
wirin... | 22.056604 | 58 | 0.551754 |
a51ba3445e1519c5012f4e9d09682f4328a89043 | 81 | py | Python | utils_bot/typing.py | cleoold/sendo-erika | 61dcc6d7e01a59e3f454a90e3b3094eb571ff312 | [
"MIT"
] | 14 | 2019-05-28T19:44:38.000Z | 2022-01-07T19:59:18.000Z | utils_bot/typing.py | cleoold/sendo-erika | 61dcc6d7e01a59e3f454a90e3b3094eb571ff312 | [
"MIT"
] | 12 | 2019-06-29T17:11:05.000Z | 2021-07-23T07:00:27.000Z | utils_bot/typing.py | cleoold/sendo-erika | 61dcc6d7e01a59e3f454a90e3b3094eb571ff312 | [
"MIT"
] | 5 | 2019-12-12T13:50:16.000Z | 2021-01-22T04:10:51.000Z | from typing import *
T = TypeVar('T')
def depreciated(f: T) -> T:
return f
| 11.571429 | 27 | 0.604938 |
366d9f7725b435ea671eca1ce264918227124466 | 8,118 | py | Python | pennylane/ops/qubit/observables.py | ral9000/pennylane | 0afbd155d044730af546c6d90cef9d01f931632d | [
"Apache-2.0"
] | null | null | null | pennylane/ops/qubit/observables.py | ral9000/pennylane | 0afbd155d044730af546c6d90cef9d01f931632d | [
"Apache-2.0"
] | null | null | null | pennylane/ops/qubit/observables.py | ral9000/pennylane | 0afbd155d044730af546c6d90cef9d01f931632d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2021 Xanadu Quantum Technologies 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... | 32.342629 | 152 | 0.65324 |
849eb395ee3a9a83c72f052127d5f2e7a3112951 | 515 | py | Python | vtkdatawidgets/_version.py | batearedcollie/jupyter-vtk-datawidgets | cf1013d71eaba49f32a6b6c280314bafdc56cb12 | [
"BSD-3-Clause"
] | null | null | null | vtkdatawidgets/_version.py | batearedcollie/jupyter-vtk-datawidgets | cf1013d71eaba49f32a6b6c280314bafdc56cb12 | [
"BSD-3-Clause"
] | null | null | null | vtkdatawidgets/_version.py | batearedcollie/jupyter-vtk-datawidgets | cf1013d71eaba49f32a6b6c280314bafdc56cb12 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Simula Research Laboratory.
# Distributed under the terms of the Modified BSD License.
version_info = (0, 1, 0, 'dev')
__version__ = ".".join(map(str, version_info))
# The version of the attribute spec that this package
# implements. This is the value used in
# _... | 30.294118 | 58 | 0.75534 |
b842f14385fc0d76697e1b4b6fe7367de7aa8b0c | 11,462 | py | Python | pybind/nos/v7_1_0/ssh_sa/ssh/client/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/ssh_sa/ssh/client/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/ssh_sa/ssh/client/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 59.388601 | 493 | 0.719159 |
a203e0cb1c20538785456563c9637f3bf7cda63e | 505 | py | Python | summer_coding/22_generate_parentheses.py | Taewan-P/LeetCode_Repository | 0e6a91c892fd406a2629b416f37dc6a989875fde | [
"MIT"
] | null | null | null | summer_coding/22_generate_parentheses.py | Taewan-P/LeetCode_Repository | 0e6a91c892fd406a2629b416f37dc6a989875fde | [
"MIT"
] | null | null | null | summer_coding/22_generate_parentheses.py | Taewan-P/LeetCode_Repository | 0e6a91c892fd406a2629b416f37dc6a989875fde | [
"MIT"
] | null | null | null | class Solution:
def generateParenthesis(self, n: int) -> List[str]:
result = []
def generate(l,r,s):
if l < r:
return
if r == n:
result.append(s)
return
if l < n:
generate(l+... | 24.047619 | 55 | 0.310891 |
84e12d396addcde6767815b707c4d0f59d77d081 | 464 | py | Python | MC-MPC/scripts/tests.py | Anna-Kuosmanen/DAGChainer | 2e095e30dd9b158563c05d088443d6b548eeb870 | [
"MIT"
] | 9 | 2018-04-18T12:48:49.000Z | 2022-03-23T20:53:30.000Z | MC-MPC/scripts/tests.py | Anna-Kuosmanen/DAGChainer | 2e095e30dd9b158563c05d088443d6b548eeb870 | [
"MIT"
] | null | null | null | MC-MPC/scripts/tests.py | Anna-Kuosmanen/DAGChainer | 2e095e30dd9b158563c05d088443d6b548eeb870 | [
"MIT"
] | 3 | 2019-04-10T13:02:47.000Z | 2022-03-23T20:54:02.000Z | import solvers
TEST_GRAPH_NAME = "test_graph"
def test_sum(k, n, m):
solvers.generate_k_path_graph(k, n , m, TEST_GRAPH_NAME)
decomposed_sum = solvers.solve_with_decomposition(TEST_GRAPH_NAME)
normal_sum = solvers.solve_without_decomposition(TEST_GRAPH_NAME)
print decomposed_sum
print normal_sum
if( dec... | 21.090909 | 68 | 0.747845 |
99057610d96ed8ad1d3db6e7923d7615f1e5c3d2 | 3,919 | py | Python | oscar/lib/python2.7/site-packages/pip/vcs/bazaar.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/vcs/bazaar.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/vcs/bazaar.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import logging
import os
import tempfile
# TODO: Get this into six.moves.urllib.parse
try:
from urllib import parse as urllib_parse
except ImportError:
import urlparse as urllib_parse
from pip.utils import rmtree, display_path
from pip.vcs import vcs, Versi... | 33.495726 | 78 | 0.560857 |
9857e91815e3dd666ec94d4dd1d0f69f368b494e | 3,056 | py | Python | tinys3/tests/test_list_request.py | CloudKilat/tinys3 | 32c023ead540c0764250d181e8176ff41540e1c8 | [
"MIT"
] | null | null | null | tinys3/tests/test_list_request.py | CloudKilat/tinys3 | 32c023ead540c0764250d181e8176ff41540e1c8 | [
"MIT"
] | null | null | null | tinys3/tests/test_list_request.py | CloudKilat/tinys3 | 32c023ead540c0764250d181e8176ff41540e1c8 | [
"MIT"
] | 1 | 2018-08-17T12:55:43.000Z | 2018-08-17T12:55:43.000Z | # -*- coding: utf-8 -*-
import datetime
import unittest
from flexmock import flexmock
from tinys3.request_factory import ListRequest
from tinys3 import Connection
class TestNonUploadRequests(unittest.TestCase):
def setUp(self):
self.conn = Connection("TEST_ACCESS_KEY", "TEST_SECRET_KEY", tls=True)
... | 34.727273 | 82 | 0.561518 |
9f3196947c3e13cafe0adca1331aa619377c2f6c | 11,218 | py | Python | util/job_launching/get_stats.py | kiliakis/gpgpu-sim_simulations | cbd8fa40d5716d18639f81a344d16cc9a3729df1 | [
"BSD-2-Clause"
] | null | null | null | util/job_launching/get_stats.py | kiliakis/gpgpu-sim_simulations | cbd8fa40d5716d18639f81a344d16cc9a3729df1 | [
"BSD-2-Clause"
] | null | null | null | util/job_launching/get_stats.py | kiliakis/gpgpu-sim_simulations | cbd8fa40d5716d18639f81a344d16cc9a3729df1 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from optparse import OptionParser
import re
import os
import subprocess
import sys
import common
import math
import yaml
import csv
# this_directory = os.path.dirname(os.path.realpath(__file__)) + "/"
#*********************************************************--
# main script start
#************... | 42.492424 | 122 | 0.580496 |
9daf9ffd93c109545d68a60cc75ca7bfad124397 | 1,083 | py | Python | numba/ocl/tests/oclpy/test_idiv.py | SPIRV/NUMBA | 6b93f44c923e7bf8cd9f95cc5188bba3aea4e75d | [
"BSD-2-Clause",
"MIT"
] | 4 | 2017-06-30T14:22:30.000Z | 2021-01-11T16:47:23.000Z | numba/ocl/tests/oclpy/test_idiv.py | SPIRV/NUMBA | 6b93f44c923e7bf8cd9f95cc5188bba3aea4e75d | [
"BSD-2-Clause",
"MIT"
] | 1 | 2017-12-21T23:31:59.000Z | 2017-12-29T16:56:05.000Z | numba/ocl/tests/oclpy/test_idiv.py | SPIRV/NUMBA | 6b93f44c923e7bf8cd9f95cc5188bba3aea4e75d | [
"BSD-2-Clause",
"MIT"
] | null | null | null | from __future__ import print_function, division, absolute_import
import numpy as np
from numba import ocl, float32, float64, int32
from numba.ocl.testing import unittest
class TestOclIDiv(unittest.TestCase):
def test_inplace_div(self):
@ocl.jit('(float32[:,:], int32, int32)')
def div(grid, l_x, l... | 27.075 | 64 | 0.551247 |
812e887bc2d4396d07bf34fb1f219c44d9c81004 | 5,544 | py | Python | src/transformers/models/cpm/tokenization_cpm.py | dctelus/transformers | 6786cbc4b14ebff0ac59c768cadd109391db9a08 | [
"Apache-2.0"
] | 8,028 | 2018-11-05T15:19:44.000Z | 2019-07-16T09:14:59.000Z | src/transformers/models/cpm/tokenization_cpm.py | arron1227/transformers | b18dfd95e1f60ae65a959a7b255fc06522170d1b | [
"Apache-2.0"
] | 731 | 2018-11-05T21:35:52.000Z | 2019-07-16T09:51:26.000Z | src/transformers/models/cpm/tokenization_cpm.py | arron1227/transformers | b18dfd95e1f60ae65a959a7b255fc06522170d1b | [
"Apache-2.0"
] | 2,106 | 2018-11-05T15:29:15.000Z | 2019-07-16T08:51:57.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# 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/LICEN... | 47.793103 | 119 | 0.633478 |
833016b1eca4fdc2d889cef89e39d1fc4fa992a1 | 25,740 | py | Python | language-modelling/transformer_xl_wt2/pytorch/train.py | ischlag/Fast-Weight-Memory-public | 64c077f02ec320ec535cb66db3600453e1ef445f | [
"MIT"
] | 17 | 2021-01-17T02:13:15.000Z | 2021-12-12T13:55:33.000Z | language-modelling/transformer_xl_wt2/pytorch/train.py | ischlag/Fast-Weight-Memory-public | 64c077f02ec320ec535cb66db3600453e1ef445f | [
"MIT"
] | null | null | null | language-modelling/transformer_xl_wt2/pytorch/train.py | ischlag/Fast-Weight-Memory-public | 64c077f02ec320ec535cb66db3600453e1ef445f | [
"MIT"
] | 5 | 2021-03-08T16:10:38.000Z | 2022-01-04T14:42:16.000Z | # coding: utf-8
import argparse
import time
import math
import os, sys
import itertools
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from data_utils import get_lm_corpus
from mem_transformer import MemTransformerLM
from utils.exp_utils import create_exp_dir
from utils.data_parall... | 43.260504 | 119 | 0.60303 |
d57eb1e52078dad25298e38865c5509ca6248dd2 | 385 | py | Python | CursoEmVideo-Python3-Mundo2/desafio050.py | martinsnathalia/Python | 0cabf894dc9c0d0307bd1136831e011580b497c5 | [
"MIT"
] | null | null | null | CursoEmVideo-Python3-Mundo2/desafio050.py | martinsnathalia/Python | 0cabf894dc9c0d0307bd1136831e011580b497c5 | [
"MIT"
] | null | null | null | CursoEmVideo-Python3-Mundo2/desafio050.py | martinsnathalia/Python | 0cabf894dc9c0d0307bd1136831e011580b497c5 | [
"MIT"
] | null | null | null | # Desenvolva um programa que leia seis números inteiros e mostre a soma apenas daqueles que forem pares. Se o valor digitado for ímpar, desconsidere-o.
soma = 0
cont = 0
for c in range (1,7):
num = int(input('Digite o {}º número: '.format(c)))
if num % 2 == 0:
soma = soma+num
cont += 1
print('V... | 35 | 151 | 0.649351 |
97c0d567de696daa42bcc20d0ee228d630d59d21 | 3,267 | py | Python | 2.GiantBook/MyUnionFind.py | VladAlexandruIlie/FoundationsOfComputing | 939d3338d114ed4bbd54b922e6fcfbd7b770b201 | [
"MIT"
] | null | null | null | 2.GiantBook/MyUnionFind.py | VladAlexandruIlie/FoundationsOfComputing | 939d3338d114ed4bbd54b922e6fcfbd7b770b201 | [
"MIT"
] | null | null | null | 2.GiantBook/MyUnionFind.py | VladAlexandruIlie/FoundationsOfComputing | 939d3338d114ed4bbd54b922e6fcfbd7b770b201 | [
"MIT"
] | null | null | null | class MyUnionFind:
"""
This is an implementation of the union-find data structure - see module documentation for
more info.
This implementation uses quick find. Initializing a data structure with n sites takes linear time.
Afterwards, the find, connected, and count operations take constant ti... | 33.336735 | 114 | 0.549434 |
aa57d4790afac3a75db22de654f43dd4f142b24a | 135,529 | py | Python | netbox/dcim/tests/test_api.py | habalux/netbox | dd7249d2ef09a8f09139c228b8186683237ad3ee | [
"Apache-2.0"
] | 2 | 2019-03-11T12:34:06.000Z | 2021-04-22T12:55:04.000Z | netbox/dcim/tests/test_api.py | habalux/netbox | dd7249d2ef09a8f09139c228b8186683237ad3ee | [
"Apache-2.0"
] | 2 | 2021-09-08T00:50:06.000Z | 2022-01-13T01:06:14.000Z | netbox/dcim/tests/test_api.py | habalux/netbox | dd7249d2ef09a8f09139c228b8186683237ad3ee | [
"Apache-2.0"
] | 1 | 2021-05-11T07:10:44.000Z | 2021-05-11T07:10:44.000Z | from django.urls import reverse
from netaddr import IPNetwork
from rest_framework import status
from circuits.models import Circuit, CircuitTermination, CircuitType, Provider
from dcim.constants import *
from dcim.models import (
Cable, ConsolePort, ConsolePortTemplate, ConsoleServerPort, ConsoleServerPortTemplate... | 38.601253 | 120 | 0.617728 |
9af97033112294a73bebe93464a5f9fac08290b1 | 1,478 | py | Python | src/roboy_hand/gesture_recognition/train/xml_to_csv.py | Roboy/ss18_hand | 3a4b3524fe653478c8a31e62b593708fdeebef70 | [
"BSD-3-Clause"
] | 1 | 2018-07-07T21:43:05.000Z | 2018-07-07T21:43:05.000Z | src/roboy_hand/gesture_recognition/train/xml_to_csv.py | Roboy/ss18_hand | 3a4b3524fe653478c8a31e62b593708fdeebef70 | [
"BSD-3-Clause"
] | null | null | null | src/roboy_hand/gesture_recognition/train/xml_to_csv.py | Roboy/ss18_hand | 3a4b3524fe653478c8a31e62b593708fdeebef70 | [
"BSD-3-Clause"
] | 2 | 2018-05-02T15:30:49.000Z | 2020-09-13T12:23:45.000Z | import os
import glob
import pandas as pd
import xml.etree.ElementTree as ET
def xml_to_csv(path):
xml_list = []
gesture_names = ['fist', 'one', 'pinky', 'loser', 'two', 'three', 'horn', 'rockNroll', 'five', 'ok']
for xml_file in glob.glob(path + '/*.xml'):
tree = ET.parse(xml_file)
root =... | 32.844444 | 104 | 0.521651 |
2c436e20987f1a9ab4b3f42d63e59edc26b03492 | 2,272 | py | Python | PyObjCTest/test_nsinvocation.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_nsinvocation.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_nsinvocation.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | import Foundation
from PyObjCTools.TestSupport import TestCase
class TestNSInvocation(TestCase):
def test_dummy(self):
value = Foundation.NSMutableArray.arrayWithArray_([1, 2, 3])
invocation = Foundation.NSInvocation.invocationWithMethodSignature_(
value.methodSignatureForSelector_("c... | 42.074074 | 76 | 0.712148 |
adfe13c9edfffc4836b45d212f3c7c39c92aa089 | 498 | py | Python | web/transaction/models.py | vshagur/wallet-rest-api | 0d8c09c52f0c86a1f36f12949d9733caa0db7ff0 | [
"MIT"
] | null | null | null | web/transaction/models.py | vshagur/wallet-rest-api | 0d8c09c52f0c86a1f36f12949d9733caa0db7ff0 | [
"MIT"
] | null | null | null | web/transaction/models.py | vshagur/wallet-rest-api | 0d8c09c52f0c86a1f36f12949d9733caa0db7ff0 | [
"MIT"
] | null | null | null | from django.db import models
from wallet.models import Wallet
class Transaction(models.Model):
comment = models.TextField(
null=False,
blank=True,
max_length=1024,
)
balance = models.DecimalField(
null=False,
max_digits=12,
decimal_places=2,
)
wall... | 18.444444 | 36 | 0.608434 |
b665ece82721a41654015a35bf62a7fcc39dbe9d | 441 | py | Python | core/migrations/0010_auto_20180928_1104.py | CobwebOrg/cobweb-django | 14241326860620dbaa64f7eefc6d4b393f80d23c | [
"MIT"
] | 7 | 2017-09-14T18:52:58.000Z | 2020-05-18T21:01:20.000Z | core/migrations/0010_auto_20180928_1104.py | CobwebOrg/cobweb-django | 14241326860620dbaa64f7eefc6d4b393f80d23c | [
"MIT"
] | 151 | 2017-09-14T18:46:02.000Z | 2022-02-10T09:18:44.000Z | core/migrations/0010_auto_20180928_1104.py | CobwebOrg/cobweb-django | 14241326860620dbaa64f7eefc6d4b393f80d23c | [
"MIT"
] | 1 | 2017-10-29T19:37:29.000Z | 2017-10-29T19:37:29.000Z | # Generated by Django 2.1.1 on 2018-09-28 18:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0009_auto_20180917_1115'),
]
operations = [
migrations.AlterField(
model_name='organization',
name='slug',
... | 23.210526 | 104 | 0.621315 |
871db85e3c75b5c13403ad72ba0e24de827e66c6 | 5,642 | py | Python | foscam_poll.py | eagleco/udi-camera-poly | d761fe1033a7b5d294cb73438d5d8ccfbf9dbd37 | [
"MIT"
] | null | null | null | foscam_poll.py | eagleco/udi-camera-poly | d761fe1033a7b5d294cb73438d5d8ccfbf9dbd37 | [
"MIT"
] | null | null | null | foscam_poll.py | eagleco/udi-camera-poly | d761fe1033a7b5d294cb73438d5d8ccfbf9dbd37 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#
# Basic script to send UDP requests looking for foscam cameras.
#
import os
import socket
import sys
import time
import select
from struct import unpack,pack
from camera_funcs import get_valid_node_name
TIMEOUT = 6 # Run for 30 seconds max.
PING_INTERVAL = 2 # Once every 5 seconds
PING_PORT_N... | 38.380952 | 158 | 0.542184 |
50dfa79079457225271ab03d1ae821e8f18a36d9 | 38,749 | py | Python | skopt/space/space.py | teffland/scikit-optimize | b02c90e22e45fc69b0587dff601621b540e2579f | [
"BSD-3-Clause"
] | null | null | null | skopt/space/space.py | teffland/scikit-optimize | b02c90e22e45fc69b0587dff601621b540e2579f | [
"BSD-3-Clause"
] | null | null | null | skopt/space/space.py | teffland/scikit-optimize | b02c90e22e45fc69b0587dff601621b540e2579f | [
"BSD-3-Clause"
] | null | null | null | import numbers
import numpy as np
import yaml
from scipy.stats.distributions import randint
from scipy.stats.distributions import rv_discrete
from scipy.stats.distributions import uniform
from sklearn.utils import check_random_state
from sklearn.utils.fixes import sp_version
from .transformers import CategoricalEnco... | 33.901137 | 79 | 0.569511 |
bc873de95e9a7a08c1d0d11f58604f77ca65ae9c | 2,637 | py | Python | lib/models/online/classifier/features.py | sunshuofeng/TracKit | bf9d09aed7d7b8e01ccfc40a67653aa0666c868d | [
"MIT"
] | null | null | null | lib/models/online/classifier/features.py | sunshuofeng/TracKit | bf9d09aed7d7b8e01ccfc40a67653aa0666c868d | [
"MIT"
] | null | null | null | lib/models/online/classifier/features.py | sunshuofeng/TracKit | bf9d09aed7d7b8e01ccfc40a67653aa0666c868d | [
"MIT"
] | null | null | null | import torch
from torch import nn
import torch.nn.functional as F
from torchvision.models.resnet import BasicBlock, Bottleneck
from lib.models.online.layers.normalization import InstanceL2Norm
from lib.models.online.layers.transform import InterpCat
def residual_basic_block(feature_dim=256, num_blocks=1, l2norm=True,... | 42.532258 | 121 | 0.6989 |
3dfd9e6bed87f2c8692f66191d250e39ae4ffe32 | 311 | py | Python | main.py | ramanveerji/PlateInfo | 397ba8e60383d69de00684e2487daf2c25be9d69 | [
"MIT"
] | 1 | 2021-06-06T23:22:40.000Z | 2021-06-06T23:22:40.000Z | main.py | ramanveerji/PlateInfo | 397ba8e60383d69de00684e2487daf2c25be9d69 | [
"MIT"
] | null | null | null | main.py | ramanveerji/PlateInfo | 397ba8e60383d69de00684e2487daf2c25be9d69 | [
"MIT"
] | 2 | 2021-06-06T23:22:32.000Z | 2021-08-11T20:11:35.000Z | from pyrogram import Client, idle
from configs import API_ID, API_HASH, TOKEN
import asyncio
async def main():
await client.start()
await idle()
client = Client("bot", API_ID, API_HASH, bot_token=TOKEN, plugins=dict(root="plugins"))
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
| 19.4375 | 87 | 0.73955 |
7519555675bc53473ccd84e5cde96edbcfad1f1b | 25,964 | py | Python | geoportal/c2cgeoportal_geoportal/__init__.py | ponceta/c2cgeoportal | 06f17346a561f8509fd7a732760c19e859d0ed02 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | geoportal/c2cgeoportal_geoportal/__init__.py | ponceta/c2cgeoportal | 06f17346a561f8509fd7a732760c19e859d0ed02 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | geoportal/c2cgeoportal_geoportal/__init__.py | ponceta/c2cgeoportal | 06f17346a561f8509fd7a732760c19e859d0ed02 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2019, Camptocamp SA
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
#... | 38.984985 | 107 | 0.669619 |
a2eef0d32530a2a3bb7630878bddb31c835d7b76 | 4,694 | py | Python | benchmark/startQiskit_QC3268.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC3268.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC3268.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=52
import cirq
import qiskit
from qiskit import IBMQ
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from ma... | 35.832061 | 165 | 0.65637 |
3c511bd5b9c90216b04470c8b0d489686fa19f48 | 6,361 | py | Python | lib/galaxy/webapps/galaxy/api/tool_dependencies.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 2 | 2017-10-23T14:44:12.000Z | 2018-01-14T10:37:28.000Z | lib/galaxy/webapps/galaxy/api/tool_dependencies.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 30 | 2016-10-20T15:35:12.000Z | 2018-10-02T15:59:54.000Z | lib/galaxy/webapps/galaxy/api/tool_dependencies.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 7 | 2016-11-03T19:11:01.000Z | 2020-05-11T14:23:52.000Z | """
API operations allowing clients to manage tool dependencies.
"""
import logging
from galaxy.tools.deps import views
from galaxy.web import (
_future_expose_api as expose_api,
require_admin
)
from galaxy.web.base.controller import BaseAPIController
log = logging.getLogger(__name__)
class ToolDependencies... | 34.570652 | 88 | 0.620972 |
f8b9f8e1eddf48c78bb87f560f1cb093016aeb03 | 2,289 | py | Python | serpens/validators.py | noverde/serpens | 36ee126eb6f9ca2793ac49934fe207a5916f3848 | [
"MIT"
] | null | null | null | serpens/validators.py | noverde/serpens | 36ee126eb6f9ca2793ac49934fe207a5916f3848 | [
"MIT"
] | 11 | 2020-11-26T10:41:07.000Z | 2021-11-09T20:19:44.000Z | serpens/validators.py | noverde/serpens | 36ee126eb6f9ca2793ac49934fe207a5916f3848 | [
"MIT"
] | 2 | 2021-11-28T15:15:42.000Z | 2022-01-17T13:48:20.000Z | import re
from typing import List, Tuple
def validate_cpf(cpf: str) -> bool:
if not cpf.isdigit() or len(cpf) != 11 or len(set(cpf)) == 1:
return False
def _validate_digit(numbers: List[int], index: int) -> bool:
values = zip(numbers[0:index], range(index + 1, 1, -1))
sum_of_products ... | 28.974684 | 74 | 0.548274 |
dedc021e5e7e12553246f559a7cca975ca06efe3 | 859 | py | Python | backend/core/urls.py | enoscar/maiden | e22efd024df4707533e86943f4f412e32e831577 | [
"MIT"
] | null | null | null | backend/core/urls.py | enoscar/maiden | e22efd024df4707533e86943f4f412e32e831577 | [
"MIT"
] | 6 | 2021-03-10T17:04:11.000Z | 2021-09-22T18:58:32.000Z | backend/core/urls.py | enoscar/maiden | e22efd024df4707533e86943f4f412e32e831577 | [
"MIT"
] | 1 | 2020-11-17T20:23:00.000Z | 2020-11-17T20:23:00.000Z | """core URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/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 vi... | 35.791667 | 77 | 0.698487 |
5850ff6cfad6f6d4031188376a5ea429f54077d9 | 101 | py | Python | main_api.py | norrisng/FcomServer | 7d0be9e6a2c22bd0e42a5af397fb17c3b5c139b6 | [
"MIT"
] | 4 | 2018-12-11T03:09:10.000Z | 2021-05-21T18:36:54.000Z | main_api.py | 1989car/FcomServer | 1c5afb0eeb9de8afd5d4981202d16980030c09ed | [
"MIT"
] | 12 | 2018-10-26T05:47:14.000Z | 2019-05-17T22:05:47.000Z | main_api.py | norrisng/FcomServer | 7d0be9e6a2c22bd0e42a5af397fb17c3b5c139b6 | [
"MIT"
] | 1 | 2019-05-30T13:13:05.000Z | 2019-05-30T13:13:05.000Z | from api.message_api import app
if __name__ == "__main__":
app.run(host='0.0.0.0', debug=False)
| 20.2 | 40 | 0.683168 |
3e6624ff88a6e327c06df4319feeff07c7425a6f | 1,928 | py | Python | JZ/JZ25.py | lpuls/leetcode | 00e0ea28ed056c01a1e117e70f5560ada1cd8bcc | [
"MIT"
] | null | null | null | JZ/JZ25.py | lpuls/leetcode | 00e0ea28ed056c01a1e117e70f5560ada1cd8bcc | [
"MIT"
] | null | null | null | JZ/JZ25.py | lpuls/leetcode | 00e0ea28ed056c01a1e117e70f5560ada1cd8bcc | [
"MIT"
] | null | null | null | # _*_coding:utf-8_*_
class RandomListNode:
def __init__(self, x):
self.label = x
self.next = None
self.random = None
class Solution:
# 返回 RandomListNode
def Clone(self, pHead):
if None is pHead:
return None
temp = dict()
node = pHead
... | 22.418605 | 53 | 0.52749 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.