hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5d6fef0f0f8deee9202937a684effa0ea3325f10 | 4,293 | py | Python | pirates/leveleditor/worldData/tortuga_building_int_8.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 3 | 2021-02-25T06:38:13.000Z | 2022-03-22T07:00:15.000Z | pirates/leveleditor/worldData/tortuga_building_int_8.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | null | null | null | pirates/leveleditor/worldData/tortuga_building_int_8.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 1 | 2021-02-25T06:38:17.000Z | 2021-02-25T06:38:17.000Z | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.leveleditor.worldData.tortuga_building_int_8
from pandac.PandaModules import Point3, VBase3, Vec4
objectStruct = {'AmbientColors... | 613.285714 | 3,837 | 0.702772 |
2a6139b95cd41bfe5c20d3d46f59e85c4b25d953 | 4,122 | py | Python | tempest/api/compute/keypairs/test_keypairs_negative.py | gamado/ds_tempest_rm_me_please | 3f5d149b3a32e713c60c59a054035ac2e5c73c28 | [
"Apache-2.0"
] | 3 | 2016-07-15T12:27:23.000Z | 2021-04-23T04:41:10.000Z | tempest/api/compute/keypairs/test_keypairs_negative.py | LIS/lis-tempest | 8e6403b2d6de81c5d18ed867b4977385c8278b75 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/keypairs/test_keypairs_negative.py | LIS/lis-tempest | 8e6403b2d6de81c5d18ed867b4977385c8278b75 | [
"Apache-2.0"
] | 12 | 2016-07-14T18:13:05.000Z | 2017-07-08T18:45:42.000Z | # Copyright 2012 OpenStack Foundation
# Copyright 2013 IBM Corp
# 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/LICE... | 44.804348 | 78 | 0.688986 |
bd24cac29ec51c23215abd2503772dca0a2fbd2f | 1,829 | py | Python | des.py | includeavaneesh/Hybridized-AES-DES-EncryptionDecryption | 6cf8f100053028ff878b99ce3287af9f0cc1aed1 | [
"MIT"
] | null | null | null | des.py | includeavaneesh/Hybridized-AES-DES-EncryptionDecryption | 6cf8f100053028ff878b99ce3287af9f0cc1aed1 | [
"MIT"
] | null | null | null | des.py | includeavaneesh/Hybridized-AES-DES-EncryptionDecryption | 6cf8f100053028ff878b99ce3287af9f0cc1aed1 | [
"MIT"
] | null | null | null | import time
import string
import random
from Crypto import Random
from Crypto.Cipher import DES
from Crypto.Random import get_random_bytes
from base64 import b64encode, b64decode
start_time = time.time()
class DESCipher(object):
def __init__(self, key):
self.block_size = DES.block_size
self.key = k... | 35.173077 | 89 | 0.686714 |
825083703a387fa044cb828f0247a29729a32d63 | 12,919 | py | Python | install_theme.py | ShaneSmiskol/eon-custom-themes | f9205af44cbbc714a4cdd6b259447147502aa420 | [
"Zlib"
] | 1 | 2020-08-13T08:04:52.000Z | 2020-08-13T08:04:52.000Z | install_theme.py | ShaneSmiskol/eon-custom-themes | f9205af44cbbc714a4cdd6b259447147502aa420 | [
"Zlib"
] | null | null | null | install_theme.py | ShaneSmiskol/eon-custom-themes | f9205af44cbbc714a4cdd6b259447147502aa420 | [
"Zlib"
] | null | null | null | #!/usr/bin/python
##################################################################################
# Permission is granted to anyone to use this software for any purpose, #
# excluding commercial applications, and to alter it and redistribute it #
# freely, subject to the following rest... | 58.990868 | 158 | 0.562505 |
42ca392345207157d4d67fa770a9b3e74cd76821 | 18,414 | py | Python | src/img_dataset/ilsvrc2017_cls_multithread.py | wenxichen/tensorflow_yolo2 | f040d9932816d8b2f8d7a67231060f0beea821d4 | [
"MIT"
] | 25 | 2017-05-15T08:44:26.000Z | 2019-09-05T05:23:59.000Z | src/img_dataset/ilsvrc2017_cls_multithread.py | wenxichen/tensorflow_yolo2 | f040d9932816d8b2f8d7a67231060f0beea821d4 | [
"MIT"
] | 5 | 2017-05-16T07:18:47.000Z | 2018-02-14T08:22:56.000Z | src/img_dataset/ilsvrc2017_cls_multithread.py | wenxichen/tensorflow_yolo2 | f040d9932816d8b2f8d7a67231060f0beea821d4 | [
"MIT"
] | 10 | 2017-07-03T13:27:27.000Z | 2018-11-21T13:10:16.000Z | """ILSVRC 2017 Classicifation Dataset.
"""
import os
import cv2
import math
import numpy as np
import random
import pickle
import xml.etree.ElementTree as ET
from tqdm import trange, tqdm
from multiprocessing import Process, Array, Queue
import config as cfg
class ilsvrc_cls:
def __init__(self, image_set, rebu... | 41.102679 | 94 | 0.55876 |
035e2405570fe68462bb1d7b170ecc190c49c8f3 | 5,766 | py | Python | testfixtures/tests/test_twisted.py | abcdenis/testfixtures | a02097aceea6ffb54de49869e9accc26190c5221 | [
"MIT"
] | 184 | 2015-03-18T09:43:35.000Z | 2021-08-20T08:22:07.000Z | testfixtures/tests/test_twisted.py | abcdenis/testfixtures | a02097aceea6ffb54de49869e9accc26190c5221 | [
"MIT"
] | 131 | 2015-09-15T15:06:51.000Z | 2021-08-24T06:54:01.000Z | testfixtures/tests/test_twisted.py | abcdenis/testfixtures | a02097aceea6ffb54de49869e9accc26190c5221 | [
"MIT"
] | 62 | 2015-06-11T20:42:36.000Z | 2021-08-21T01:01:28.000Z | from twisted.logger import Logger, formatEvent
from twisted.python.failure import Failure
from twisted.trial.unittest import TestCase
from testfixtures import compare, ShouldRaise, StringComparison as S, ShouldAssert
from testfixtures.compat import PY3
from testfixtures.twisted import LogCapture, INFO
log = Logger()
... | 34.321429 | 95 | 0.544918 |
ac44819f260e908003c7308c02700da36391bdbc | 22,305 | py | Python | Fund_Manager_v2.py | joselynzhao/Fund_Manager | 2e207a4ed1f1cc482e1026ae7bb5dbd9e5bf43e8 | [
"MIT"
] | 1 | 2021-05-28T05:20:42.000Z | 2021-05-28T05:20:42.000Z | Fund_Manager_v2.py | joselynzhao/Fund_Manager | 2e207a4ed1f1cc482e1026ae7bb5dbd9e5bf43e8 | [
"MIT"
] | null | null | null | Fund_Manager_v2.py | joselynzhao/Fund_Manager | 2e207a4ed1f1cc482e1026ae7bb5dbd9e5bf43e8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3.6
# -*- coding: utf-8 -*-
# @Time : 2021/5/24 下午7:25
# @Author : Joselynzhao
# @Email : zhaojing17@forxmail.com
# @File : Fund_Manager_v2.py
# @Software: PyCharm
# @Desc :
import requests
import random
import time
import pandas as pd
import execjs
import json
from tqdm import tqdm
impor... | 44.61 | 231 | 0.551446 |
331da8a476d0a4d80a974336c1a4e0d6e78dbabd | 230 | py | Python | train_pipeline.py | mbranbilla/creditas-challenge | f28d466fd207008365fe8c2e0e64bfbdaddbd04b | [
"MIT"
] | 1 | 2021-01-20T19:05:18.000Z | 2021-01-20T19:05:18.000Z | train_pipeline.py | mbranbilla/creditas-challenge | f28d466fd207008365fe8c2e0e64bfbdaddbd04b | [
"MIT"
] | null | null | null | train_pipeline.py | mbranbilla/creditas-challenge | f28d466fd207008365fe8c2e0e64bfbdaddbd04b | [
"MIT"
] | null | null | null | import os
os.system("python3 scripts/load_data.py")
os.system("python3 scripts/load_data.py")
os.system("python3 scripts/preprocessing.py")
os.system("python3 scripts/feature_generation.py")
os.system("python3 scripts/model.py")
| 28.75 | 50 | 0.791304 |
c03d8e037aefb572d32e100891a1824750a6685c | 31 | py | Python | Bronze/Bronze_V/24078.py | masterTyper/baekjoon_solved_ac | b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c | [
"MIT"
] | null | null | null | Bronze/Bronze_V/24078.py | masterTyper/baekjoon_solved_ac | b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c | [
"MIT"
] | null | null | null | Bronze/Bronze_V/24078.py | masterTyper/baekjoon_solved_ac | b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c | [
"MIT"
] | null | null | null | X = int(input())
print(X % 21) | 10.333333 | 16 | 0.548387 |
8ffecb3b03d5a70c611d3716a07beb6206fe004e | 17,342 | py | Python | nerdlandbot/commands/GuildData.py | woutermeuwis/nerdlandbot | efd301ed6cb4c11e4d3ce851f328bce02ca00617 | [
"MIT"
] | 5 | 2020-05-21T11:52:57.000Z | 2020-05-23T21:55:37.000Z | nerdlandbot/commands/GuildData.py | woutermeuwis/nerdlandbot | efd301ed6cb4c11e4d3ce851f328bce02ca00617 | [
"MIT"
] | 7 | 2020-05-21T12:12:14.000Z | 2020-05-24T16:15:37.000Z | nerdlandbot/commands/GuildData.py | woutermeuwis/nerdlandbot | efd301ed6cb4c11e4d3ce851f328bce02ca00617 | [
"MIT"
] | null | null | null | import json
from os import path, listdir, makedirs
from typing import List, Optional
from discord import Member
from datetime import datetime
from nerdlandbot.helpers.constants import DEFAULT_MEMBER_NOTIFICATION_NUMBER
_configFolder = "GuildConfigs"
_guildConfigCache = dict()
if not path.exists(_configFolder):
... | 35.536885 | 121 | 0.626571 |
3ee020e6bd64234041c9e27374abbd30efcef382 | 7,677 | py | Python | python/oneflow/test/modules/test_slice.py | grybd/oneflow | 82237ad096a10527591660c09b61444c42917e69 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/test/modules/test_slice.py | grybd/oneflow | 82237ad096a10527591660c09b61444c42917e69 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/test/modules/test_slice.py | grybd/oneflow | 82237ad096a10527591660c09b61444c42917e69 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 39.168367 | 88 | 0.644913 |
0d5237a456e6cbd94af1c971ebc5e48280c836b2 | 2,038 | py | Python | examples/python/linefinder.py | engagementlab/upm | 9be920dbcd4ff9f333bce27e937a6e72e46899d6 | [
"MIT"
] | 1 | 2018-11-08T03:59:01.000Z | 2018-11-08T03:59:01.000Z | examples/python/linefinder.py | engagementlab/upm | 9be920dbcd4ff9f333bce27e937a6e72e46899d6 | [
"MIT"
] | null | null | null | examples/python/linefinder.py | engagementlab/upm | 9be920dbcd4ff9f333bce27e937a6e72e46899d6 | [
"MIT"
] | 1 | 2018-11-08T03:59:04.000Z | 2018-11-08T03:59:04.000Z | #!/usr/bin/python
# Author: Zion Orent <zorent@ics.com>
# Copyright (c) 2015 Intel Corporation.
#
# 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 limi... | 37.054545 | 84 | 0.730128 |
ddbc78f3180dc89ceeb3ce9c9d73568d978545b0 | 1,053 | py | Python | src/challenges/Arc2-Crypto/04/crypto4.py | cetfor/HTHCTF2021 | fee32b71fca6d94badeea5a161021d5089f53fd7 | [
"MIT"
] | 3 | 2021-12-11T16:34:20.000Z | 2021-12-12T13:47:16.000Z | src/challenges/Arc2-Crypto/04/crypto4.py | cetfor/HTHCTF2021 | fee32b71fca6d94badeea5a161021d5089f53fd7 | [
"MIT"
] | null | null | null | src/challenges/Arc2-Crypto/04/crypto4.py | cetfor/HTHCTF2021 | fee32b71fca6d94badeea5a161021d5089f53fd7 | [
"MIT"
] | 1 | 2021-12-14T13:20:36.000Z | 2021-12-14T13:20:36.000Z | #!/usr/bin/env python3
import json
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
# Crypto facilities from pycryptodome: `pip3 install pycryptodome`
# https://www.pycryptodome.org/en/latest/src/installation.html
# Credit: http://aes.cryptohack.org/ecb_oracle/
KEY = b"ThisIsAK3yW0w!!1" # length: 16... | 27 | 78 | 0.678063 |
f02fa7046dbcedb6343876eee597825fbe3c1d1f | 155 | py | Python | reflect/example/example.py | TangJing/reflect | e72b07cfd0aec355dc86be75ccecfe49b8d7d02a | [
"MIT"
] | null | null | null | reflect/example/example.py | TangJing/reflect | e72b07cfd0aec355dc86be75ccecfe49b8d7d02a | [
"MIT"
] | null | null | null | reflect/example/example.py | TangJing/reflect | e72b07cfd0aec355dc86be75ccecfe49b8d7d02a | [
"MIT"
] | null | null | null | import io
from lib.reflect import reflect
import exampleClass
print(reflect("exampleClass").Instance("testClass").Call("testCall","test reflect example")) | 31 | 92 | 0.8 |
3b3b45db44f29af9867666c93edb8e038d58b626 | 761 | py | Python | src/dump_ast.py | sztomi/code-generator | f9e1b108664a21728f1dc5b504f8966ea40ee9e0 | [
"MIT"
] | 96 | 2015-01-14T02:01:10.000Z | 2021-08-18T10:20:55.000Z | src/dump_ast.py | sztomi/code-generator | f9e1b108664a21728f1dc5b504f8966ea40ee9e0 | [
"MIT"
] | 3 | 2015-01-15T02:33:40.000Z | 2015-08-30T20:43:09.000Z | src/dump_ast.py | sztomi/code-generator | f9e1b108664a21728f1dc5b504f8966ea40ee9e0 | [
"MIT"
] | 29 | 2015-01-22T14:31:32.000Z | 2020-12-01T21:20:42.000Z | #!/usr/bin/python
# vim: set fileencoding=utf-8
import clang.cindex
import asciitree # must be version 0.2
import sys
def node_children(node):
return (c for c in node.get_children() if c.location.file.name == sys.argv[1])
def print_node(node):
text = node.spelling or node.displayname
kind = str(node.kind)... | 30.44 | 96 | 0.69908 |
80418e7e587699821880d9322319cddc7fad5ac7 | 1,563 | py | Python | cca-operator/cca-operator.py | thejuliekramer/ckan-cloud-docker | 6b1549824a732393df41bcb4c87f3ccf0430a854 | [
"MIT"
] | 13 | 2018-11-15T10:58:16.000Z | 2019-11-03T14:05:00.000Z | cca-operator/cca-operator.py | thejuliekramer/ckan-cloud-docker | 6b1549824a732393df41bcb4c87f3ccf0430a854 | [
"MIT"
] | 46 | 2018-11-08T07:13:17.000Z | 2020-01-17T13:17:15.000Z | cca-operator/cca-operator.py | hasadna/ckan-cloud-docker | 04c8d81751f6f241f357c021e8566403e236d143 | [
"MIT"
] | 19 | 2018-11-28T14:32:52.000Z | 2019-11-29T06:21:35.000Z | #!/usr/bin/env python3
import os, sys, yaml, datetime
CCA_OPERATOR_ROLE = os.environ['CCA_OPERATOR_ROLE']
ADMIN_ROLES = ['', 'admin']
CONTINUOUS_DEPLOYMENT_ROLES = ADMIN_ROLES + ['continuous-deployment']
def print_stderr(*args):
print(*args, file=sys.stderr)
if sys.argv[1].startswith('patch-deployment ') an... | 35.522727 | 110 | 0.654511 |
086461aa17eed33703812a137788ca8f0e0e5fc8 | 4,916 | py | Python | portfolio/settings.py | lizschley/number_six | a427202397822fca1f49d43d138c24fffdbe95da | [
"MIT"
] | 1 | 2020-07-14T20:13:05.000Z | 2020-07-14T20:13:05.000Z | portfolio/settings.py | lizschley/number_six | a427202397822fca1f49d43d138c24fffdbe95da | [
"MIT"
] | 3 | 2021-04-06T20:40:08.000Z | 2021-06-03T21:54:21.000Z | portfolio/settings.py | lizschley/number_six | a427202397822fca1f49d43d138c24fffdbe95da | [
"MIT"
] | null | null | null | """
Django settings for portfolio project.
Generated by 'django-admin startproject' using Django 3.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
# pylint: d... | 29.261905 | 95 | 0.714809 |
4e45154ec136a41c576a367c642b6765c9b89d63 | 7,027 | py | Python | test/pytest/service-desktop/test_outbox.py | buk7456/MuditaOS | 06ef1e131b27b0f397cc615c96d51bede7050423 | [
"BSL-1.0"
] | 369 | 2021-11-10T09:20:29.000Z | 2022-03-30T06:36:58.000Z | test/pytest/service-desktop/test_outbox.py | buk7456/MuditaOS | 06ef1e131b27b0f397cc615c96d51bede7050423 | [
"BSL-1.0"
] | 149 | 2021-11-10T08:38:35.000Z | 2022-03-31T23:01:52.000Z | test/pytest/service-desktop/test_outbox.py | buk7456/MuditaOS | 06ef1e131b27b0f397cc615c96d51bede7050423 | [
"BSL-1.0"
] | 41 | 2021-11-10T08:30:37.000Z | 2022-03-29T08:12:46.000Z | # Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
import time
import pytest
from harness.api.contacts import AddContact, DeleteContactById
from harness.api.messages import AddMessage, DeleteMessageById
from harness.api.outbox import Not... | 37.77957 | 112 | 0.700868 |
c7bde57b0ebc5a8c49a5b0b2a9fc8e174fc70aa8 | 2,103 | py | Python | niscv_v2/analysis/real/garch_estimate.py | IanFla/Importance-Sampling | f2dd2164e95377d2cf025fcddd19b2592394e4d7 | [
"Apache-2.0"
] | null | null | null | niscv_v2/analysis/real/garch_estimate.py | IanFla/Importance-Sampling | f2dd2164e95377d2cf025fcddd19b2592394e4d7 | [
"Apache-2.0"
] | null | null | null | niscv_v2/analysis/real/garch_estimate.py | IanFla/Importance-Sampling | f2dd2164e95377d2cf025fcddd19b2592394e4d7 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
import pickle
def read(num):
data = []
for n in np.arange(1, num + 1):
file = open('../../data/real/garch_estimate_{}'.format(n), 'rb')
data.append(pickle.load(file))
return np.vstack(data)
def main():
plt.style.use('ggplot')
... | 33.380952 | 94 | 0.541607 |
f2649f7455dfedfbe1fbad7b3cd74e58ccb23087 | 5,032 | py | Python | cpi/metrics_calculator.py | ThinkOpenly/cpi-breakdown | f5a949aba068062c6c622c50feb193d8404ed08d | [
"Apache-2.0"
] | null | null | null | cpi/metrics_calculator.py | ThinkOpenly/cpi-breakdown | f5a949aba068062c6c622c50feb193d8404ed08d | [
"Apache-2.0"
] | null | null | null | cpi/metrics_calculator.py | ThinkOpenly/cpi-breakdown | f5a949aba068062c6c622c50feb193d8404ed08d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017,2019 IBM Corporation
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... | 41.245902 | 81 | 0.583267 |
e2a027e396493a8bf70ecfebe5267d508572fab6 | 8,284 | py | Python | variational_principle/compute/compute.py | Tiernan8r/Variational-Principle | e5f82956c3bfd57f7d73c7220ac2cdd9c8f09935 | [
"MIT"
] | 1 | 2020-05-21T08:10:24.000Z | 2020-05-21T08:10:24.000Z | variational_principle/compute/compute.py | Tiernan8r/Variational_Principle | e5f82956c3bfd57f7d73c7220ac2cdd9c8f09935 | [
"MIT"
] | 33 | 2020-01-21T12:02:06.000Z | 2020-06-23T16:50:57.000Z | variational_principle/compute/compute.py | Tiernan8r/Variational_Principle | e5f82956c3bfd57f7d73c7220ac2cdd9c8f09935 | [
"MIT"
] | 1 | 2022-03-17T01:50:25.000Z | 2022-03-17T01:50:25.000Z | import random
import time
import numpy as np
from scipy.linalg import null_space
from variational_principle.differentiation.laplacian import generate_laplacian
import variational_principle.potentials.potential as pot
from variational_principle import ENERGY_FACTOR
# The Lagrangian Derivative matrix
global DEV2
def... | 37.484163 | 107 | 0.655118 |
d3462810b5604ab14f042abf6673f3238946632c | 13,371 | py | Python | corporate/views/upgrade.py | fatihCinarKrtg/zulip | 9c96e030dddae71bd7d79bc3990373bfddc76d0e | [
"Apache-2.0"
] | 1 | 2021-06-25T18:10:20.000Z | 2021-06-25T18:10:20.000Z | corporate/views/upgrade.py | fatihCinarKrtg/zulip | 9c96e030dddae71bd7d79bc3990373bfddc76d0e | [
"Apache-2.0"
] | 10 | 2021-11-15T17:53:29.000Z | 2022-02-27T13:51:47.000Z | corporate/views/upgrade.py | fatihCinarKrtg/zulip | 9c96e030dddae71bd7d79bc3990373bfddc76d0e | [
"Apache-2.0"
] | 1 | 2020-12-29T17:22:00.000Z | 2020-12-29T17:22:00.000Z | import logging
from decimal import Decimal
from typing import Any, Dict, Optional
import stripe
from django import forms
from django.conf import settings
from django.core import signing
from django.db import transaction
from django.http import HttpRequest, HttpResponse, HttpResponseRedirect
from django.shortcuts impor... | 36.433243 | 103 | 0.676913 |
7d879923f603ebb23e1c3d59a5fb8523ac78ca54 | 2,609 | py | Python | galaxy/coralsnp_reports/lib/galaxy/webapps/coralsnp_reports/controllers/experiments.py | skitchen19/galaxy_tools | b935f36cfe430263564503ebb71f78dc79315acb | [
"MIT"
] | 3 | 2017-04-05T18:01:59.000Z | 2019-05-03T14:15:31.000Z | galaxy/coralsnp_reports/lib/galaxy/webapps/coralsnp_reports/controllers/experiments.py | skitchen19/galaxy_tools | b935f36cfe430263564503ebb71f78dc79315acb | [
"MIT"
] | 6 | 2019-02-27T15:45:58.000Z | 2021-01-12T15:18:50.000Z | galaxy/coralsnp_reports/lib/galaxy/webapps/coralsnp_reports/controllers/experiments.py | skitchen19/galaxy_tools | b935f36cfe430263564503ebb71f78dc79315acb | [
"MIT"
] | 2 | 2018-10-26T18:36:39.000Z | 2019-01-28T15:12:39.000Z | import logging
import sqlalchemy as sa
from markupsafe import escape
import galaxy.model
from galaxy import util
from . import BaseUIController
from galaxy.web.base.controller import web
from galaxy.webapps.reports.controllers.query import ReportQueryBuilder
log = logging.getLogger(__name__)
class Experiments(Base... | 47.436364 | 122 | 0.626677 |
f8965df973078ab9eeae0b327ad5828a2b05ccff | 3,598 | py | Python | naoqi-sdk-2.5.5.5-linux64/doc/_downloads/almotion_positionInterpolations.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | naoqi-sdk-2.5.5.5-linux64/doc/_downloads/almotion_positionInterpolations.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | naoqi-sdk-2.5.5.5-linux64/doc/_downloads/almotion_positionInterpolations.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | 1 | 2020-10-06T07:44:12.000Z | 2020-10-06T07:44:12.000Z | #! /usr/bin/env python
# -*- encoding: UTF-8 -*-
"""Example: Use positionInterpolations Method"""
import qi
import argparse
import sys
import almath
import motion
def main(session):
"""
This example uses the positionInterpolations method.
"""
# Get the services ALMotion & ALRobotPosture.
motion... | 31.017241 | 98 | 0.645081 |
8187046cb6f81f6ccbc026a35e4b290023585e85 | 5,039 | py | Python | kubernetes_asyncio/client/models/policy_v1beta1_run_as_group_strategy_options.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/policy_v1beta1_run_as_group_strategy_options.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/policy_v1beta1_run_as_group_strategy_options.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.15.9
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 33.151316 | 197 | 0.622941 |
8c7baad9f3d7c267002edf4d5def811abb0b1973 | 380 | py | Python | cursoemvideo/python/exercicio/039(alistamentoMilitar).py | mateusjustino/cursos | 10927bf62f89b5847bb0acd998e9e9191472d0f4 | [
"MIT"
] | null | null | null | cursoemvideo/python/exercicio/039(alistamentoMilitar).py | mateusjustino/cursos | 10927bf62f89b5847bb0acd998e9e9191472d0f4 | [
"MIT"
] | null | null | null | cursoemvideo/python/exercicio/039(alistamentoMilitar).py | mateusjustino/cursos | 10927bf62f89b5847bb0acd998e9e9191472d0f4 | [
"MIT"
] | null | null | null | from datetime import date
atual = date.today().year
nascimento = int(input('Digite o ano de nascimento: '))
idade = atual - nascimento
if idade < 18:
print('Ainda falta {} anos para voce se alistar'.format(18 - idade))
elif idade == 18:
print('Você está com 18 anos, está na hora de se alistar')
else:
print... | 31.666667 | 72 | 0.689474 |
05a40d144a083825177179ba8563edec71ed3a93 | 2,857 | py | Python | Homework/week7/Base/DataProcessing.py | zhufyaxel/ML_SaltyFish | 84b839fa236c471e1fa8600093f0096ff79e4097 | [
"MIT"
] | null | null | null | Homework/week7/Base/DataProcessing.py | zhufyaxel/ML_SaltyFish | 84b839fa236c471e1fa8600093f0096ff79e4097 | [
"MIT"
] | null | null | null | Homework/week7/Base/DataProcessing.py | zhufyaxel/ML_SaltyFish | 84b839fa236c471e1fa8600093f0096ff79e4097 | [
"MIT"
] | null | null | null | import os, json
from keras.preprocessing.text import Tokenizer
import _pickle as pk
from keras.preprocessing.sequence import pad_sequences
import numpy as np
from keras.utils import to_categorical
strProjectFolder = os.path.dirname(os.path.dirname(__file__))
strRAWDataFolder = os.path.join(strProjectFolder, "01-RAWDa... | 37.103896 | 109 | 0.610431 |
61bac956eafe57741762451a28f5fad275e1fd04 | 5,742 | py | Python | cardea/fhir/Dosage.py | sarahmish/Cardea | 85c4246c12178e6d1b9cc12eb39c264f3c20f3e9 | [
"MIT"
] | 69 | 2021-01-28T22:25:10.000Z | 2022-03-15T00:23:33.000Z | cardea/fhir/Dosage.py | sarahmish/Cardea | 85c4246c12178e6d1b9cc12eb39c264f3c20f3e9 | [
"MIT"
] | 30 | 2018-08-29T12:45:23.000Z | 2019-12-24T11:08:12.000Z | cardea/fhir/Dosage.py | sarahmish/Cardea | 85c4246c12178e6d1b9cc12eb39c264f3c20f3e9 | [
"MIT"
] | 14 | 2021-03-24T01:21:25.000Z | 2022-03-12T11:53:40.000Z | from .fhirbase import fhirbase
class Dosage(fhirbase):
"""
Indicates how the medication is/was taken or should be taken by the
patient.
Args:
sequence: Indicates the order in which the dosage instructions should
be applied or interpreted.
text: Free text dosage instruction... | 32.440678 | 81 | 0.5876 |
2a190a5f6a30e8d150689861e28a71d781fdee7e | 12,932 | py | Python | salt/states/netntp.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 2 | 2015-06-18T19:07:20.000Z | 2017-09-27T18:54:29.000Z | salt/states/netntp.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 12 | 2015-04-15T22:17:42.000Z | 2016-03-22T08:46:27.000Z | salt/states/netntp.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 5 | 2017-06-16T23:48:13.000Z | 2021-04-08T17:43:48.000Z | # -*- coding: utf-8 -*-
'''
Network NTP
===========
.. versionadded: 2016.11.0
Manage the configuration of NTP peers and servers on the network devices through the NAPALM proxy.
:codeauthor: Mircea Ulinic <ping@mirceaulinic.net> & Jerome Fleury <jf@cloudflare.com>
:maturity: new
:depends: napalm
:platform: un... | 31.541463 | 120 | 0.534797 |
14088831574ee8921007e4d6abcc368234d46f7f | 5,751 | py | Python | login.py | aidanMellin/p320_14 | 71d9a4028a7ccdaf5826ca0d723ec2b09f7cace0 | [
"MIT"
] | null | null | null | login.py | aidanMellin/p320_14 | 71d9a4028a7ccdaf5826ca0d723ec2b09f7cace0 | [
"MIT"
] | null | null | null | login.py | aidanMellin/p320_14 | 71d9a4028a7ccdaf5826ca0d723ec2b09f7cace0 | [
"MIT"
] | null | null | null | from logging import error
import psycopg2
import login
from sshtunnel import SSHTunnelForwarder
from os import getenv
from os.path import exists
from dotenv import load_dotenv
from datetime import datetime
def loginSequence(self):
print("\n\nWelcome to the gitBash Movie Database.\n")
while True:
print... | 38.086093 | 118 | 0.408451 |
aab6c7d702d9a23134b3256f2297b3177231656d | 4,858 | py | Python | test/corfunc/utest_corfunc.py | llimeht/sasview | d0c10746a2397c5021ed8bbc842ba99243a9b0ac | [
"BSD-3-Clause"
] | null | null | null | test/corfunc/utest_corfunc.py | llimeht/sasview | d0c10746a2397c5021ed8bbc842ba99243a9b0ac | [
"BSD-3-Clause"
] | null | null | null | test/corfunc/utest_corfunc.py | llimeht/sasview | d0c10746a2397c5021ed8bbc842ba99243a9b0ac | [
"BSD-3-Clause"
] | null | null | null | """
Unit Tests for CorfuncCalculator class
"""
from __future__ import division, print_function
import os.path
import unittest
import time
import numpy as np
from sas.sascalc.corfunc.corfunc_calculator import CorfuncCalculator
from sas.sascalc.dataloader.data_info import Data1D
def find(filename):
return os.pat... | 38.555556 | 94 | 0.635035 |
60af0b79990df8c9ba3bb4e99e6866ea49a54456 | 4,087 | py | Python | IMU/VTK-6.2.0/IO/XML/Testing/Python/TestEmptyXML.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | null | null | null | IMU/VTK-6.2.0/IO/XML/Testing/Python/TestEmptyXML.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | null | null | null | IMU/VTK-6.2.0/IO/XML/Testing/Python/TestEmptyXML.py | timkrentz/SunTracker | 9a189cc38f45e5fbc4e4c700d7295a871d022795 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# List of types and corresponding file extensions.
types = [[ 'ImageData', 'vti'],
['RectilinearGrid', 'vtr'],
['StructuredGrid', 'vts']... | 31.198473 | 82 | 0.616589 |
91c99185da5c920a02efcc3fd95009c189c51387 | 224 | py | Python | app.py | polxpolx/sample-flask | 2cc263b9c78679b2c5e23a9787d381d317088b93 | [
"MIT"
] | null | null | null | app.py | polxpolx/sample-flask | 2cc263b9c78679b2c5e23a9787d381d317088b93 | [
"MIT"
] | null | null | null | app.py | polxpolx/sample-flask | 2cc263b9c78679b2c5e23a9787d381d317088b93 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route("/")
def hello_world():
return render_template("index.html")
if __name__ == "__main__":
Schema()
app.run(debug=True)
| 16 | 40 | 0.700893 |
e7db57cf8b5ade9734ba216ba53810e7afaf098f | 550 | py | Python | pyteal/ir/__init__.py | CiottiGiorgio/pyteal | 9646a1aa479786c1e80d6a3821d5db1e6c4a16e2 | [
"MIT"
] | null | null | null | pyteal/ir/__init__.py | CiottiGiorgio/pyteal | 9646a1aa479786c1e80d6a3821d5db1e6c4a16e2 | [
"MIT"
] | 1 | 2022-03-04T14:57:57.000Z | 2022-03-04T14:57:57.000Z | pyteal/ir/__init__.py | CiottiGiorgio/pyteal | 9646a1aa479786c1e80d6a3821d5db1e6c4a16e2 | [
"MIT"
] | null | null | null | from pyteal.ir.ops import Op, Mode
from pyteal.ir.tealcomponent import TealComponent
from pyteal.ir.tealop import TealOp
from pyteal.ir.teallabel import TealLabel
from pyteal.ir.tealblock import TealBlock
from pyteal.ir.tealsimpleblock import TealSimpleBlock
from pyteal.ir.tealconditionalblock import TealConditionalBl... | 23.913043 | 63 | 0.76 |
375283861e2b5554d87d17c70c275c8bbb39de93 | 444 | py | Python | pycreate2/__init__.py | ebrukamis/pycreate2 | 20e91d61437d546bce5a3a9b2b8129633fe6e6f6 | [
"MIT"
] | 45 | 2017-07-16T14:52:54.000Z | 2022-03-11T16:23:57.000Z | pycreate2/__init__.py | ebrukamis/pycreate2 | 20e91d61437d546bce5a3a9b2b8129633fe6e6f6 | [
"MIT"
] | 15 | 2017-07-16T20:52:18.000Z | 2021-05-04T08:46:59.000Z | pycreate2/__init__.py | walchko/pycreate2 | 4bb0d86cacb3c57c3abdc99e51a0467628c94f66 | [
"MIT"
] | 38 | 2017-07-03T09:39:22.000Z | 2022-03-24T23:39:10.000Z | ##############################################
# The MIT License (MIT)
# Copyright (c) 2017 Kevin Walchko
# see LICENSE for full details
##############################################
try:
from importlib.metadata import version # type: ignore
except ImportError:
from importlib_metadata import version # type: i... | 26.117647 | 57 | 0.596847 |
dccc03ee8c57bed7b88eb1ace6853a0d0f34553a | 132 | py | Python | src/secrets_manager/warnings.py | CuriBio/secrets-manager | b09551874bf5c5aaeda9c21669a90162bf3f0ca9 | [
"MIT"
] | null | null | null | src/secrets_manager/warnings.py | CuriBio/secrets-manager | b09551874bf5c5aaeda9c21669a90162bf3f0ca9 | [
"MIT"
] | 37 | 2020-08-12T20:39:46.000Z | 2022-03-30T20:03:20.000Z | src/secrets_manager/warnings.py | CuriBio/secrets-manager | b09551874bf5c5aaeda9c21669a90162bf3f0ca9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Manage access to secrets in an application."""
class KebabCaseSecretNameWarning(UserWarning):
pass
| 18.857143 | 49 | 0.69697 |
c969e1c1bafe71f6d559aac9a449dbdd2dadac9a | 534 | py | Python | aviata/users/admin.py | reyuan8/aviata | 840e2d16a8775e0c80a38bf7e59b31c5bb8b5c31 | [
"MIT"
] | null | null | null | aviata/users/admin.py | reyuan8/aviata | 840e2d16a8775e0c80a38bf7e59b31c5bb8b5c31 | [
"MIT"
] | null | null | null | aviata/users/admin.py | reyuan8/aviata | 840e2d16a8775e0c80a38bf7e59b31c5bb8b5c31 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import get_user_model
from aviata.users.forms import UserChangeForm, UserCreationForm
User = get_user_model()
@admin.register(User)
class UserAdmin(auth_admin.UserAdmin):
form = UserChangeForm
add_... | 26.7 | 63 | 0.726592 |
8b17afe341b64bc5932118b625289cd6bbf7a941 | 47 | py | Python | scratch/current_test.py | MaxWhitney/aft | bf9981237438d70c2b8e517e1f4cde75b9eb32a4 | [
"MIT"
] | 3 | 2019-05-20T23:01:42.000Z | 2019-12-20T14:22:37.000Z | scratch/current_test.py | MaxWhitney/aft | bf9981237438d70c2b8e517e1f4cde75b9eb32a4 | [
"MIT"
] | 2 | 2018-12-19T21:31:28.000Z | 2018-12-19T21:45:56.000Z | scratch/current_test.py | anniecherk/python_type_fuzzing | 1b115c8cc5e9196c1ad8e6a5a4d6ec0af0724fc6 | [
"MIT"
] | 1 | 2019-05-15T21:54:12.000Z | 2019-05-15T21:54:12.000Z | from totest import *
addOne([(False, False)])
| 11.75 | 24 | 0.680851 |
718f4d0b7dab3225129e9e9fc8bf8af032e9a5eb | 7,944 | py | Python | test/algorithms/test_grover_optimizer.py | mtreinish/qiskit-optimization | 03a4710fd31b583d4c2f4b6c0af98922ea045d63 | [
"Apache-2.0"
] | null | null | null | test/algorithms/test_grover_optimizer.py | mtreinish/qiskit-optimization | 03a4710fd31b583d4c2f4b6c0af98922ea045d63 | [
"Apache-2.0"
] | null | null | null | test/algorithms/test_grover_optimizer.py | mtreinish/qiskit-optimization | 03a4710fd31b583d4c2f4b6c0af98922ea045d63 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 39.72 | 99 | 0.640232 |
4e3daaa3c46f54218eb861697e0d7a5dc528785d | 8,678 | py | Python | paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan_updater.py | hysunflower/PaddleSpeech | bf393573a4f738b163c672e075999b97f445a39a | [
"Apache-2.0"
] | null | null | null | paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan_updater.py | hysunflower/PaddleSpeech | bf393573a4f738b163c672e075999b97f445a39a | [
"Apache-2.0"
] | null | null | null | paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan_updater.py | hysunflower/PaddleSpeech | bf393573a4f738b163c672e075999b97f445a39a | [
"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 appli... | 37.405172 | 79 | 0.629523 |
2cf4c8de957b722bcc1c47ac05df1f0788544bfd | 15,154 | py | Python | hio-yocto-bsp/sources/poky/scripts/lib/mic/imager/direct.py | qiangzai00001/hio-prj | 060ff97fe21093b1369db78109d5b730b2b181c8 | [
"MIT"
] | null | null | null | hio-yocto-bsp/sources/poky/scripts/lib/mic/imager/direct.py | qiangzai00001/hio-prj | 060ff97fe21093b1369db78109d5b730b2b181c8 | [
"MIT"
] | null | null | null | hio-yocto-bsp/sources/poky/scripts/lib/mic/imager/direct.py | qiangzai00001/hio-prj | 060ff97fe21093b1369db78109d5b730b2b181c8 | [
"MIT"
] | null | null | null | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (c) 2013, Intel Corporation.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free ... | 39.774278 | 100 | 0.590735 |
15dafa12ff05008e13373f810feaeaf57b4050e0 | 1,252 | py | Python | forge_sdk/rpc/forge_rpc/file.py | ArcBlock/forge-python-sdk | 4e72d75d3c06b16554d660860708732c83b5f8b2 | [
"Apache-2.0"
] | 9 | 2019-05-08T01:30:22.000Z | 2020-05-08T22:11:40.000Z | forge_sdk/rpc/forge_rpc/file.py | ArcBlock/forge-python-sdk | 4e72d75d3c06b16554d660860708732c83b5f8b2 | [
"Apache-2.0"
] | 22 | 2019-05-14T18:36:17.000Z | 2019-12-24T10:09:42.000Z | forge_sdk/rpc/forge_rpc/file.py | ArcBlock/forge-python-sdk | 4e72d75d3c06b16554d660860708732c83b5f8b2 | [
"Apache-2.0"
] | null | null | null | from forge_sdk.protos import protos
from forge_sdk.rpc import lib
class ForgeFileRpc:
def __init__(self, channel):
self.stub = protos.FileRpcStub(channel)
def store_file(self, chunk):
"""GRPC call to store file
Args:
chunk(bytes or list[bytes]): file bytes to store
... | 22.357143 | 60 | 0.590256 |
7cb4abc0f63965be5a08d0370f4f2224b74e90c4 | 6,456 | py | Python | pywikibot/xmlreader.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | pywikibot/xmlreader.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | pywikibot/xmlreader.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
XML reading module.
Each XmlEntry object represents a page, as read from an XML source
The XmlDump class reads a pages_current XML dump (like the ones offered on
https://dumps.wikimedia.org/backup-index.html) and offers a generator over
XmlEntry objects which can be used by other bots.
""... | 34.15873 | 78 | 0.597119 |
bb01b4a03adf1ff54554e44dbf3eb92aae61ce8a | 12,439 | py | Python | tests/python/sparse_tensor.py | dajenet/MinkowskiEngine | 0523264aa1054911404c9e58b59d4b7aeb43e840 | [
"MIT"
] | null | null | null | tests/python/sparse_tensor.py | dajenet/MinkowskiEngine | 0523264aa1054911404c9e58b59d4b7aeb43e840 | [
"MIT"
] | null | null | null | tests/python/sparse_tensor.py | dajenet/MinkowskiEngine | 0523264aa1054911404c9e58b59d4b7aeb43e840 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 NVIDIA CORPORATION.
# Copyright (c) 2018-2020 Chris Choy (chrischoy@ai.stanford.edu).
#
# 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 wit... | 38.871875 | 86 | 0.610178 |
141849683b4610c16987dcfbe315968aadfd57e3 | 1,346 | py | Python | secret_santa.py | ReaLgressA/SecretSantaScript | 727a4087415febdbc5c3111b10760a1fc823a00c | [
"MIT"
] | null | null | null | secret_santa.py | ReaLgressA/SecretSantaScript | 727a4087415febdbc5c3111b10760a1fc823a00c | [
"MIT"
] | null | null | null | secret_santa.py | ReaLgressA/SecretSantaScript | 727a4087415febdbc5c3111b10760a1fc823a00c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Instructions:
# Create input.txt with names of participants on every string. (use UTF-8 encoding, please)
# Edit message template for your own purposes.
# Run script and send everyone their personal messages generated in Secret Santa folder.
# Merry Christmas, folks!
impo... | 49.851852 | 289 | 0.72734 |
f91c31973790b1fe1c7df2e6f4b8f85ec633cc35 | 22,708 | py | Python | qwe/planning/Planner.py | IEEERobotics/high-level | a50f2170ca81a16bd50b50f970f9e3fe9c656bfa | [
"BSD-2-Clause"
] | 1 | 2017-08-07T06:03:53.000Z | 2017-08-07T06:03:53.000Z | qwe/planning/Planner.py | IEEERobotics/high-level | a50f2170ca81a16bd50b50f970f9e3fe9c656bfa | [
"BSD-2-Clause"
] | null | null | null | qwe/planning/Planner.py | IEEERobotics/high-level | a50f2170ca81a16bd50b50f970f9e3fe9c656bfa | [
"BSD-2-Clause"
] | null | null | null | """
Code for python planner
"""
import blockSim as BlockDet
import twoWayDict as twd
import navigation.nav as nav
from datetime import datetime
import comm.serial_interface as comm
import math
import time
import logging.config
pixelsToInches = 0.0195
class Planner:
nextSeaLandBlock = [] #list of the next availabl... | 36.863636 | 142 | 0.634094 |
e1e3d19a623a0da78ca47fe6597434d295a02447 | 946 | py | Python | 09. Data structure/Ranges.py | riyabhatia26/Python-Programming | 2882728982c15c3b6380033eb2e90761b538dd93 | [
"MIT"
] | 3 | 2020-08-07T04:33:19.000Z | 2021-10-06T08:58:01.000Z | 09. Data structure/Ranges.py | riyabhatia26/Python-Programming | 2882728982c15c3b6380033eb2e90761b538dd93 | [
"MIT"
] | null | null | null | 09. Data structure/Ranges.py | riyabhatia26/Python-Programming | 2882728982c15c3b6380033eb2e90761b538dd93 | [
"MIT"
] | 2 | 2021-10-06T08:58:05.000Z | 2021-10-06T09:46:42.000Z | # Range: Sequence representing an arithmetic progression of intgers
# By default it initialized from0
a = range(3)
print(a)
for i in a:
print(a)
# Iterating over a range
for i in range(5):
print(i)
"""
Range signature
1. One argument: means argument stop value
range(stop)
2. Two arguments: means argum... | 21.022222 | 73 | 0.710359 |
0afc30f7eb353ef67478749d93089830c8c44a6c | 165 | py | Python | setup.py | hydrargyrum/sit-tagger | cf5c8e7ebad7e97fd695c565586dd9fa342a571f | [
"WTFPL"
] | 3 | 2017-12-16T15:52:50.000Z | 2019-10-15T06:50:14.000Z | setup.py | hydrargyrum/sit-tagger | cf5c8e7ebad7e97fd695c565586dd9fa342a571f | [
"WTFPL"
] | null | null | null | setup.py | hydrargyrum/sit-tagger | cf5c8e7ebad7e97fd695c565586dd9fa342a571f | [
"WTFPL"
] | 2 | 2019-06-05T19:36:58.000Z | 2020-05-17T13:01:07.000Z | #!/usr/bin/env python3
# this project is licensed under the WTFPLv2, see COPYING.txt for details
from setuptools import setup
if __name__ == '__main__':
setup()
| 18.333333 | 73 | 0.745455 |
fd0074e4f8bffdb37d305d9b85952bf85a08bd78 | 2,621 | py | Python | Callum/Day16/Packet.py | JackDanielHarding/advent-of-code-2021 | 5b860e36b4ac1af205c992763167ffef41a81a1b | [
"CC0-1.0"
] | null | null | null | Callum/Day16/Packet.py | JackDanielHarding/advent-of-code-2021 | 5b860e36b4ac1af205c992763167ffef41a81a1b | [
"CC0-1.0"
] | null | null | null | Callum/Day16/Packet.py | JackDanielHarding/advent-of-code-2021 | 5b860e36b4ac1af205c992763167ffef41a81a1b | [
"CC0-1.0"
] | null | null | null | from functools import reduce
class Packet():
def __init__(self, bits: str):
self.version = int(bits[0:3], 2)
self.type = int(bits[3:6], 2)
self.subPackets = []
if self.type == 4:
index = 6
val = ""
while True:
fir... | 37.442857 | 90 | 0.470813 |
9a6d919ef4475462117e764ebe2500935886da78 | 5,067 | py | Python | restkit/handlers/http_user_handlers/query_handler.py | ppolxda/restkit | eeb6177ccd75f8ba7b2faa252116f1e745d0f91b | [
"MIT"
] | null | null | null | restkit/handlers/http_user_handlers/query_handler.py | ppolxda/restkit | eeb6177ccd75f8ba7b2faa252116f1e745d0f91b | [
"MIT"
] | null | null | null | restkit/handlers/http_user_handlers/query_handler.py | ppolxda/restkit | eeb6177ccd75f8ba7b2faa252116f1e745d0f91b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@create: 2019-09-28 18:09:50.
@author: name
@desc: query_handler
"""
from restkit.transactions import trans_func
from restkit.handlers.http_user_conns.http_sessions import HttpSessionBaseHandler # noqa
# from restkit.tools.error_info import _
from restkit.tools.error_info import error_inf... | 28.789773 | 89 | 0.609236 |
f991ad41b3417dc64b3f31cfdff92940f084ea74 | 14,359 | py | Python | xcdat/dataset.py | tomvothecoder/xcdat | 21dad38d20baffe1db097cd898a9b7fcf2470955 | [
"Apache-2.0"
] | 3 | 2021-05-11T22:06:09.000Z | 2021-06-22T15:58:56.000Z | xcdat/dataset.py | tomvothecoder/xcdat | 21dad38d20baffe1db097cd898a9b7fcf2470955 | [
"Apache-2.0"
] | 78 | 2021-04-07T17:13:26.000Z | 2021-09-02T22:28:27.000Z | xcdat/dataset.py | tomvothecoder/xcdat | 21dad38d20baffe1db097cd898a9b7fcf2470955 | [
"Apache-2.0"
] | null | null | null | """Dataset module for functions related to an xarray.Dataset."""
from typing import Any, Dict, Hashable, List, Optional, Union
import pandas as pd
import xarray as xr
from xcdat import bounds # noqa: F401
from xcdat.logger import setup_custom_logger
logger = setup_custom_logger(__name__)
def open_dataset(
pat... | 35.280098 | 89 | 0.639669 |
7e1fba544a654e0383d84db7715ac4577b9d3593 | 4,039 | py | Python | mi_codigo.py | oscarordaz27/TheIoTLearningInitiative | 54678a38d5b58d4f41c839d133ed3c4dc1cd6025 | [
"Apache-2.0"
] | null | null | null | mi_codigo.py | oscarordaz27/TheIoTLearningInitiative | 54678a38d5b58d4f41c839d133ed3c4dc1cd6025 | [
"Apache-2.0"
] | null | null | null | mi_codigo.py | oscarordaz27/TheIoTLearningInitiative | 54678a38d5b58d4f41c839d133ed3c4dc1cd6025 | [
"Apache-2.0"
] | null | null | null | ##*****************************************************************************
## Copyright (c) 2014 IBM Corporation and other Contributors.
##
## All rights reserved. This program and the accompanying materials
## are made available under the terms of the Eclipse Public License v1.0
## which accompanies this distribu... | 28.048611 | 130 | 0.661302 |
8ef85708ab32d77d250dc4442a1b579f02e718b3 | 498 | py | Python | Tests/get_url_test.py | by09115/Flask-URLshortener | 860eef75d86658f91a9316c253b512bf3aad0a6c | [
"MIT"
] | 1 | 2019-01-02T08:50:07.000Z | 2019-01-02T08:50:07.000Z | Tests/get_url_test.py | by09115/Flask-URLshortener | 860eef75d86658f91a9316c253b512bf3aad0a6c | [
"MIT"
] | null | null | null | Tests/get_url_test.py | by09115/Flask-URLshortener | 860eef75d86658f91a9316c253b512bf3aad0a6c | [
"MIT"
] | null | null | null | from Tests import TestCaseBase, check_status_code
class GetUrlTest(TestCaseBase):
def setUp(self):
super(GetUrlTest, self).setUp()
self.short_url = self.save_url_request()
@check_status_code(302)
def test_success_get_url(self):
rv = self.get_url_request('b')
self.assertEq... | 26.210526 | 76 | 0.680723 |
45ef0262e7c7912d35d44c757f2c32841d27c4d0 | 3,806 | py | Python | idrac_memory/idrac_memory.py | anita-mithran/plugins | 3c34f4b92b9c0ae985dc3b6abfb8c952aba00cd7 | [
"BSD-2-Clause"
] | null | null | null | idrac_memory/idrac_memory.py | anita-mithran/plugins | 3c34f4b92b9c0ae985dc3b6abfb8c952aba00cd7 | [
"BSD-2-Clause"
] | null | null | null | idrac_memory/idrac_memory.py | anita-mithran/plugins | 3c34f4b92b9c0ae985dc3b6abfb8c952aba00cd7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import json
import SNMPUtil
### Monitoring iDRAC Servers - Memory Performance
### It uses snmpwalk command to get the hadrware data from the iDRAC Servers.
### SNMPUtil.py is used to get the snmp raw data and parsed to get the output json
### Download and install the latest version of Site24x7 ... | 34.6 | 143 | 0.522596 |
7366e295fe0670dd7b1f59261e70cf1c99a9395d | 3,777 | py | Python | code/src/nuvla/api/resources/data.py | nuvla/python-api | 7b530aa049eee8c8cd654c27d749d46bf0d19e87 | [
"Apache-2.0"
] | 4 | 2019-04-27T10:35:44.000Z | 2019-05-05T13:04:28.000Z | code/src/nuvla/api/resources/data.py | nuvla/python-library | 421abe6f583e1ce6a48670131faefe16b7e0bc12 | [
"Apache-2.0"
] | 21 | 2019-02-22T07:30:41.000Z | 2022-03-30T13:27:55.000Z | code/src/nuvla/api/resources/data.py | nuvla/python-library | 421abe6f583e1ce6a48670131faefe16b7e0bc12 | [
"Apache-2.0"
] | null | null | null | import os
import requests
from typing import Optional, Union
from nuvla.api import Api as Nuvla
from .base import ResourceBase
class DataRecord(ResourceBase):
resource = 'data-record'
def create(self, data: dict, infra_service_id: str):
if isinstance(data, dict):
data.update({'infrastruc... | 35.632075 | 81 | 0.608155 |
76713d714d0f442dbd2799332d27874779e6feb8 | 752 | py | Python | data/train/python/76713d714d0f442dbd2799332d27874779e6feb8urls.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/76713d714d0f442dbd2799332d27874779e6feb8urls.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/76713d714d0f442dbd2799332d27874779e6feb8urls.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from django.conf.urls import include, url
from tastypie.api import Api
import views
from resources import *
api_version = 'v1'
v1_api = Api(api_name=api_version)
v1_api.register(UserResource())
v1_api.register(DeviceResource())
v1_api.register(JourneyResource())
v1_api.register(PositionResource())
v1_api.register(Lo... | 31.333333 | 94 | 0.666223 |
4f5f71825652216f68e4951cc739e5a41fb963bb | 567 | py | Python | backend/documentapp/migrations/0002_alter_document_profile_friend.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 15 | 2020-12-23T13:56:49.000Z | 2021-12-10T11:04:23.000Z | backend/documentapp/migrations/0002_alter_document_profile_friend.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 41 | 2021-03-19T07:51:48.000Z | 2021-11-22T09:45:46.000Z | backend/documentapp/migrations/0002_alter_document_profile_friend.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 3 | 2021-03-24T15:18:24.000Z | 2021-09-11T14:51:35.000Z | # Generated by Django 3.2 on 2021-05-05 09:11
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profileapp', '0001_initial'),
('documentapp', '0001_initial'),
]
operations = [
migrations.AlterField... | 27 | 157 | 0.656085 |
4a8d1ef899b0a950d4969725d30390e40a0afdc4 | 11,693 | py | Python | tests/integration/ip_messaging/v1/service/test_channel.py | rekhafriesland/WhatsappSFDC | bd848e9ded19b9ab5e0eb714789e8f5d80fec8b4 | [
"MIT"
] | null | null | null | tests/integration/ip_messaging/v1/service/test_channel.py | rekhafriesland/WhatsappSFDC | bd848e9ded19b9ab5e0eb714789e8f5d80fec8b4 | [
"MIT"
] | null | null | null | tests/integration/ip_messaging/v1/service/test_channel.py | rekhafriesland/WhatsappSFDC | bd848e9ded19b9ab5e0eb714789e8f5d80fec8b4 | [
"MIT"
] | null | null | null | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class ChannelTestCase(Integrati... | 45.675781 | 166 | 0.570683 |
f04b57144bbc7c3e5f50aaac4b105588bd18011a | 9,668 | py | Python | components/isceobj/TopsProc/runDenseOffsets.py | earthobservatory/isce2 | 655c46cc4add275879167b750a5e91f6d00f168e | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-09-15T08:10:52.000Z | 2019-09-15T08:10:52.000Z | components/isceobj/TopsProc/runDenseOffsets.py | earthobservatory/isce2 | 655c46cc4add275879167b750a5e91f6d00f168e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | components/isceobj/TopsProc/runDenseOffsets.py | earthobservatory/isce2 | 655c46cc4add275879167b750a5e91f6d00f168e | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-06-24T20:20:18.000Z | 2021-06-24T20:32:23.000Z | #
# Author: Joshua Cohen
# Copyright 2016
# Based on Piyush Agram's denseOffsets.py script
#
import os
import isce
import isceobj
import logging
from isceobj.Util.decorators import use_api
logger = logging.getLogger('isce.insar.DenseOffsets')
def runDenseOffsets(self):
'''
Run CPU / GPU version depending on ... | 32.884354 | 95 | 0.659082 |
fb74739f731dcb7ff233ad8f97be7b324c8711ca | 1,940 | py | Python | test.py | GooooM/test2 | aa49d6e46e90bbaf95fe5e028a6b52c52799cc32 | [
"MIT"
] | 1 | 2019-08-02T08:01:41.000Z | 2019-08-02T08:01:41.000Z | test.py | GooooM/test2 | aa49d6e46e90bbaf95fe5e028a6b52c52799cc32 | [
"MIT"
] | null | null | null | test.py | GooooM/test2 | aa49d6e46e90bbaf95fe5e028a6b52c52799cc32 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
import matplotlib.pyplot as plt
class MLP(nn.Module):
def __init__(self):
super(MLP, self).__init__()
self.fc1 = nn.Linear(in_features=28 * 28, out_features=64)
self.fc2 = nn.Linear(in_features... | 31.290323 | 104 | 0.62268 |
8f17d599fcc1fdc1a1833f245677a90aa0bfe785 | 26,782 | py | Python | test/test_metadata_processing.py | kevindurston21/YANOM-Note-O-Matic | c61845791bccfc043759eaa91e189d31d7276ae2 | [
"MIT"
] | 7 | 2021-03-01T18:32:26.000Z | 2022-02-05T22:45:33.000Z | test/test_metadata_processing.py | kevindurston21/YANOM-Note-O-Matic | c61845791bccfc043759eaa91e189d31d7276ae2 | [
"MIT"
] | 50 | 2021-02-28T17:36:49.000Z | 2022-03-08T20:09:04.000Z | test/test_metadata_processing.py | kevindurston21/YANOM-Note-O-Matic | c61845791bccfc043759eaa91e189d31d7276ae2 | [
"MIT"
] | 3 | 2021-06-17T23:55:23.000Z | 2021-08-09T10:29:54.000Z | import unittest
import pytest
from src.conversion_settings import ConversionSettings
from src.metadata_processing import MetaDataProcessor
class TestMetaDataProcessor(unittest.TestCase):
def setUp(self) -> None:
self.conversion_settings = ConversionSettings()
self.conversion_settings.set_quick_s... | 41.013783 | 208 | 0.546412 |
d921c25f412ab97856b6acca98fb1c0eec05182c | 198 | py | Python | test/suite/E40.py | shardros/autopep8 | 2ab2ea74668b10f3910f3d5b9526494fa5671ca1 | [
"MIT"
] | 3,459 | 2015-01-03T15:53:43.000Z | 2022-03-31T16:33:01.000Z | test/suite/E40.py | hayata-yamamoto/autopep8 | 107e29dce22c7b367a36633a78735278e4ad4288 | [
"MIT"
] | 435 | 2015-01-03T12:58:44.000Z | 2022-03-29T12:37:13.000Z | test/suite/E40.py | hayata-yamamoto/autopep8 | 107e29dce22c7b367a36633a78735278e4ad4288 | [
"MIT"
] | 279 | 2015-03-16T16:34:51.000Z | 2022-03-26T23:58:48.000Z | #: E401
import os, sys
#: Okay
import os
import sys
from subprocess import Popen, PIPE
from myclass import MyClass
from foo.bar.yourclass import YourClass
import myclass
import foo.bar.yourclass
| 14.142857 | 39 | 0.792929 |
1bd89a44d0a79cede325cced9b773226e4b312c7 | 22,805 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/operations/_virtual_network_peerings_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/operations/_virtual_network_peerings_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/operations/_virtual_network_peerings_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.829545 | 250 | 0.680246 |
37015e4976ee1e12e6941d729dff108993fe558e | 3,292 | py | Python | galaxylearning/core/strategy.py | ZJU-DistributedAI/GalaxyLearning | b56b7f6d74a93a06f439ffb8c206b3152b916e92 | [
"Apache-2.0"
] | 4 | 2020-03-16T14:02:16.000Z | 2021-10-03T10:24:29.000Z | galaxylearning/core/strategy.py | ZJU-DistributedAI/GalaxyLearning | b56b7f6d74a93a06f439ffb8c206b3152b916e92 | [
"Apache-2.0"
] | null | null | null | galaxylearning/core/strategy.py | ZJU-DistributedAI/GalaxyLearning | b56b7f6d74a93a06f439ffb8c206b3152b916e92 | [
"Apache-2.0"
] | 3 | 2020-04-10T10:52:42.000Z | 2021-11-23T04:01:43.000Z | # federate strategies
from enum import Enum
import galaxylearning.exceptions.fl_expection as exceptions
class WorkModeStrategy(Enum):
WORKMODE_STANDALONE = "standalone"
WORKMODE_CLUSTER = "cluster"
class FederateStrategy(Enum):
FED_AVG = "fed_avg"
FED_DISTILLATION = "fed_distillation"
class RunTim... | 30.201835 | 115 | 0.701397 |
c1274d85d3451da814afc40fedba398f83895daa | 1,258 | py | Python | _unittests/ut_documentation/test_LONG_run_notebooks_pydata_2018_onnx.py | sdpython/jupytalk | 34abdf128de24becb21a9f08f243c3a74dadbfd9 | [
"MIT"
] | null | null | null | _unittests/ut_documentation/test_LONG_run_notebooks_pydata_2018_onnx.py | sdpython/jupytalk | 34abdf128de24becb21a9f08f243c3a74dadbfd9 | [
"MIT"
] | 16 | 2016-11-13T19:52:35.000Z | 2021-12-29T10:59:41.000Z | _unittests/ut_documentation/test_LONG_run_notebooks_pydata_2018_onnx.py | sdpython/jupytalk | 34abdf128de24becb21a9f08f243c3a74dadbfd9 | [
"MIT"
] | 4 | 2016-09-10T10:44:50.000Z | 2021-09-22T16:28:56.000Z | # -*- coding: utf-8 -*-
"""
@brief test log(time=13s)
"""
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.ipythonhelper import test_notebook_execution_coverage
from pyquickhelper.pycode import add_missing_development_version
import jupytalk
class TestLONGFunction... | 31.45 | 81 | 0.621622 |
0d8d08e1882432a3d3425628da72a434833020d3 | 1,722 | py | Python | scripts/provision-user.py | ideation-ai/fhir-works-on-aws-deployment | cafbad249618b61eb06a14b137c0bf4fb75fcc29 | [
"Apache-2.0"
] | 2 | 2021-05-06T21:24:19.000Z | 2021-05-27T17:16:09.000Z | scripts/provision-user.py | ideation-ai/fhir-works-on-aws-deployment | cafbad249618b61eb06a14b137c0bf4fb75fcc29 | [
"Apache-2.0"
] | 6 | 2021-04-27T11:09:33.000Z | 2021-09-02T13:13:42.000Z | scripts/provision-user.py | ideation-ai/fhir-works-on-aws-deployment | cafbad249618b61eb06a14b137c0bf4fb75fcc29 | [
"Apache-2.0"
] | 3 | 2020-12-18T17:02:18.000Z | 2020-12-29T02:45:22.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
"""
import boto3
import sys
'''
example run:
python3 provision-user.py <UserPoolId> <ClientId> <Region>
python3 provision-user.py us-west-2_yk8jbgpWM 12pgvi3gsl32qp9h8lg130arr0 us-west-2
'''
client = boto3.c... | 21.259259 | 82 | 0.631243 |
aa280bac3ed9074681898fafc29ec222bec44b85 | 10,360 | py | Python | layers.py | qwoprocks/SAPD | 2aaedab7d7f16c504be4848b233b01eac7fcdda8 | [
"Apache-2.0"
] | 104 | 2020-03-05T17:41:29.000Z | 2022-03-09T05:48:01.000Z | layers.py | qwoprocks/SAPD | 2aaedab7d7f16c504be4848b233b01eac7fcdda8 | [
"Apache-2.0"
] | 20 | 2020-03-08T10:59:40.000Z | 2022-03-12T00:19:04.000Z | layers.py | qwoprocks/SAPD | 2aaedab7d7f16c504be4848b233b01eac7fcdda8 | [
"Apache-2.0"
] | 15 | 2020-05-03T02:28:14.000Z | 2021-07-26T02:01:52.000Z | # import keras
from tensorflow import keras
import tensorflow as tf
class BatchNormalization(keras.layers.BatchNormalization):
"""
Identical to keras.layers.BatchNormalization, but adds the option to freeze parameters.
"""
def __init__(self, freeze, *args, **kwargs):
self.freeze = freeze
... | 37.948718 | 135 | 0.616795 |
cea434fc52b28cd56874ad297890931870f42cc3 | 4,699 | py | Python | koans/python_koans-master/python_koans-master/python3/koans/about_proxy_object_project.py | Readarmon0/Code_Challenges | 37c3d23a60f43f3fd5214dfe2fb1848a646feb0d | [
"MIT"
] | 1 | 2016-11-12T04:30:13.000Z | 2016-11-12T04:30:13.000Z | koans/python_koans-master/python_koans-master/python3/koans/about_proxy_object_project.py | Readarmon0/Code_Challenges | 37c3d23a60f43f3fd5214dfe2fb1848a646feb0d | [
"MIT"
] | null | null | null | koans/python_koans-master/python_koans-master/python3/koans/about_proxy_object_project.py | Readarmon0/Code_Challenges | 37c3d23a60f43f3fd5214dfe2fb1848a646feb0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Project: Create a Proxy Class
#
# In this assignment, create a proxy class (one is started for you
# below). You should be able to initialize the proxy object with any
# object. Any attributes called on the proxy object should be forwarded
# to the target object. As e... | 26.698864 | 73 | 0.633113 |
263e9ab143a530098b1aac043b0236cc3cbfb712 | 721 | py | Python | code/Level 2 - Intro to Programming/1-variables/main.py | tscofield/cpx-training | 682a2cef6bb164bc7c374744de94c21581258392 | [
"MIT"
] | 3 | 2021-04-27T14:01:49.000Z | 2021-09-30T21:17:27.000Z | code/Level 2 - Intro to Programming/1-variables/main.py | tscofield/cpx-training | 682a2cef6bb164bc7c374744de94c21581258392 | [
"MIT"
] | 18 | 2019-01-13T13:14:30.000Z | 2020-07-07T23:47:17.000Z | code/Level 2 - Intro to Programming/1-variables/main.py | tscofield/cpx-training | 682a2cef6bb164bc7c374744de94c21581258392 | [
"MIT"
] | 3 | 2019-02-07T03:43:30.000Z | 2020-05-15T17:12:11.000Z | # Learn more https://realpython.com/python-variables/
# and https://realpython.com/python-data-types/
import time
import board
import neopixel
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=.2)
# Colors
BLACK = (0, 0, 0)
RED = (255, 0, 0)
PINK = (255, 100, 120)
ORANGE = (255, 100, 0)
YELLOW = (255, 255, 0... | 19.486486 | 61 | 0.619972 |
21af4b7003e161bdf10fc1b8ea094e97cb82461f | 1,990 | py | Python | docs/source/conf.py | iot-spectator/iot-health | ff5cf5b3613d47fb990751259fab68ad8940b1c4 | [
"MIT"
] | null | null | null | docs/source/conf.py | iot-spectator/iot-health | ff5cf5b3613d47fb990751259fab68ad8940b1c4 | [
"MIT"
] | 22 | 2020-10-05T00:31:31.000Z | 2021-05-15T06:37:37.000Z | docs/source/conf.py | iot-spectator/iot-health | ff5cf5b3613d47fb990751259fab68ad8940b1c4 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.622951 | 79 | 0.669347 |
8495aa07c1bfcd3123cc59a8ee86e9fa60122fde | 55 | py | Python | backEnd/model/comment.py | PommesPeter/PhotograhicSharing | 89e46ec2de116c662e853a755133bb11501cd4ff | [
"MIT"
] | 1 | 2021-08-22T08:48:42.000Z | 2021-08-22T08:48:42.000Z | backEnd/model/comment.py | PommesPeter/PhotograhicSharing | 89e46ec2de116c662e853a755133bb11501cd4ff | [
"MIT"
] | 5 | 2021-08-21T03:26:01.000Z | 2021-09-12T04:01:03.000Z | backEnd/model/comment.py | PommesPeter/PhotograhicSharing | 89e46ec2de116c662e853a755133bb11501cd4ff | [
"MIT"
] | 3 | 2021-08-22T02:55:59.000Z | 2021-08-23T10:41:24.000Z | class Comment:
def __init__(self):
pass
| 13.75 | 24 | 0.563636 |
053d2ff88878fcc274fe5f3c3093f37485bcc7f6 | 24,754 | py | Python | library/aix_nim_vios_hc.py | wtcross/ansible-playbooks | 5e1af5cce65109045070c655747837c3edc6e7e4 | [
"Apache-2.0"
] | null | null | null | library/aix_nim_vios_hc.py | wtcross/ansible-playbooks | 5e1af5cce65109045070c655747837c3edc6e7e4 | [
"Apache-2.0"
] | null | null | null | library/aix_nim_vios_hc.py | wtcross/ansible-playbooks | 5e1af5cce65109045070c655747837c3edc6e7e4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2017, International Business Machines Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 35.062323 | 99 | 0.518098 |
713a97510e68f21c5b9776a6a22c542bd62fe5c4 | 354 | py | Python | fuzzysets.py | vbsinha/fuzzy-image-enhancement | 6bf983ddbc558b71b759dff9b1d86a9c133b1e14 | [
"MIT"
] | 11 | 2019-06-01T10:13:57.000Z | 2021-05-26T08:00:01.000Z | fuzzysets.py | vbsinha/fuzzy-image-enhancement | 6bf983ddbc558b71b759dff9b1d86a9c133b1e14 | [
"MIT"
] | 2 | 2021-01-30T23:49:20.000Z | 2021-11-01T11:54:17.000Z | fuzzysets.py | vbsinha/fuzzy-image-enhancement | 6bf983ddbc558b71b759dff9b1d86a9c133b1e14 | [
"MIT"
] | 4 | 2019-08-14T00:42:24.000Z | 2021-09-07T19:40:39.000Z | import scipy.stats
def medium(x):
assert x >= 0 and x <= 1
return 0.25 * scipy.stats.norm(0.4, 0.1).pdf(x)
def small(x):
assert x >= 0 and x <= 1
return 0.5 * scipy.stats.norm(0, 0.2).pdf(x)
def large(x):
assert x >= 0 and x <= 1
if x < 0.8:
return 0.5 * scipy.stats.norm(0.8, 0.2).... | 17.7 | 54 | 0.533898 |
9ebaf5b154ae08340c286ef30a5fcf0a8d992ce1 | 4,314 | py | Python | build/env/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/management/commands/test_windmill.py | bopopescu/myhue | 5f566970a5a1fa5af9f01832c9e9808c47634bc7 | [
"Apache-2.0"
] | 61 | 2015-03-16T18:36:06.000Z | 2021-12-02T10:08:17.000Z | windmill/management/commands/test_windmill.py | admc/windmill | 4304ee7258eb0c2814f215d8ce90abf02b1f737f | [
"Apache-2.0"
] | 8 | 2015-03-10T10:01:26.000Z | 2020-05-18T10:51:24.000Z | windmill/management/commands/test_windmill.py | admc/windmill | 4304ee7258eb0c2814f215d8ce90abf02b1f737f | [
"Apache-2.0"
] | 14 | 2015-01-29T16:28:33.000Z | 2021-09-04T11:19:48.000Z | # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com>
#
# 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 req... | 37.189655 | 100 | 0.587854 |
6074f579981b273fbdd87c216adea1fc38280a4c | 1,767 | py | Python | research/talks/ibm/05-2017/multicos.py | cgranade/cgranade.github.io | 72f263c2cc03a14a5fa853cb7b7b53a5b57626c7 | [
"MIT"
] | 3 | 2015-10-28T12:36:06.000Z | 2018-12-25T17:07:58.000Z | research/talks/uts/03-2017/multicos.py | cgranade/cgranade.github.io | 72f263c2cc03a14a5fa853cb7b7b53a5b57626c7 | [
"MIT"
] | 1 | 2017-05-08T10:00:27.000Z | 2017-05-08T10:00:27.000Z | research/talks/macquarie/08-2016/multicos.py | cgranade/cgranade.github.io | 72f263c2cc03a14a5fa853cb7b7b53a5b57626c7 | [
"MIT"
] | 3 | 2016-05-11T00:23:22.000Z | 2017-05-08T04:59:18.000Z | from qinfer.abstract_model import Model
import numpy as np
class MultiCosModel(Model):
@property
def n_modelparams(self):
return 2
@property
def is_n_outcomes_constant(self):
return True
def n_outcomes(self, expparams):
return 2
def are_models_valid(self, mode... | 35.34 | 80 | 0.611205 |
e20b3f2f0498f6b65f6ff0000549ef3bb15dbcd8 | 1,718 | py | Python | setup.py | kakwa/ldapcherry-ppolicy-cracklib | 4af7b9fa0ee4dc3ba68ef7119ea1afdbb2b27934 | [
"MIT"
] | 1 | 2015-11-05T00:20:33.000Z | 2015-11-05T00:20:33.000Z | setup.py | kakwa/ldapcherry-ppolicy-cracklib | 4af7b9fa0ee4dc3ba68ef7119ea1afdbb2b27934 | [
"MIT"
] | null | null | null | setup.py | kakwa/ldapcherry-ppolicy-cracklib | 4af7b9fa0ee4dc3ba68ef7119ea1afdbb2b27934 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
from distutils.core import setup
install_requires = ['ldapcherry', 'cracklib']
try:
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
description = f.read()
f.close()
except IOError:
description = 'lcppolicy_cracklib'
try:
license = ope... | 26.84375 | 67 | 0.658324 |
489cb0c5d18fb27bd6dcb6405fd7912c09b09016 | 854 | py | Python | tests/watson/html/test_elements.py | watsonpy/watson-html | 2e7a7024ce2d9301a8a87c762d5a3c468e002e0a | [
"BSD-3-Clause"
] | null | null | null | tests/watson/html/test_elements.py | watsonpy/watson-html | 2e7a7024ce2d9301a8a87c762d5a3c468e002e0a | [
"BSD-3-Clause"
] | null | null | null | tests/watson/html/test_elements.py | watsonpy/watson-html | 2e7a7024ce2d9301a8a87c762d5a3c468e002e0a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from pytest import raises
from watson.html.elements import flatten_attributes, TagMixin
class TestFlattenAttributes(object):
def test_flatten(self):
attrs = {'class': 'menu', 'id': 'MainMenu'}
assert flatten_attributes(attrs) == 'class="menu" id="MainMenu"'
def test_f... | 28.466667 | 72 | 0.639344 |
3a3cdcb16ee44e2c866fbee967792d0e8644c962 | 335 | py | Python | challenges/2020/03-tobogganTrajectory/python/partTwo.py | codemicro/adventOfCode | 53574532ece1d19e5f5ba2f39e8e183c4c6225a1 | [
"MIT"
] | 9 | 2020-12-06T23:18:30.000Z | 2021-12-19T22:31:26.000Z | challenges/2020/03-tobogganTrajectory/python/partTwo.py | codemicro/adventOfCode | 53574532ece1d19e5f5ba2f39e8e183c4c6225a1 | [
"MIT"
] | null | null | null | challenges/2020/03-tobogganTrajectory/python/partTwo.py | codemicro/adventOfCode | 53574532ece1d19e5f5ba2f39e8e183c4c6225a1 | [
"MIT"
] | 3 | 2020-12-08T09:45:44.000Z | 2020-12-15T19:20:20.000Z | from common import *
def partTwo(instr: str) -> int:
forest = parse(instr)
tree_product = 1
offset_pairs = [(3, 1), (1, 1), (5, 1), (7, 1), (1, 2)]
for i, pair in enumerate(offset_pairs):
encountered_trees = find_collisions(forest, *pair)
tree_product *= encountered_trees
retur... | 20.9375 | 59 | 0.620896 |
8c3c62d9f2bf7976ab66d4a22c858a41c1309650 | 1,192 | py | Python | rasa_nlu_examples/tokenizers/blankspacy.py | aresa7796/rasa-nlu-examples | 44d11a732ebca8cf32a7fee3477b3e37ee720871 | [
"Apache-2.0"
] | 129 | 2020-06-26T10:41:24.000Z | 2022-03-31T17:00:29.000Z | rasa_nlu_examples/tokenizers/blankspacy.py | aresa7796/rasa-nlu-examples | 44d11a732ebca8cf32a7fee3477b3e37ee720871 | [
"Apache-2.0"
] | 109 | 2020-06-22T09:32:18.000Z | 2022-03-31T06:00:03.000Z | rasa_nlu_examples/tokenizers/blankspacy.py | aresa7796/rasa-nlu-examples | 44d11a732ebca8cf32a7fee3477b3e37ee720871 | [
"Apache-2.0"
] | 59 | 2020-06-21T16:23:22.000Z | 2022-03-31T17:00:31.000Z | from typing import Any, Dict, List, Text
import spacy
from rasa.nlu.tokenizers.tokenizer import Token, Tokenizer
from rasa.shared.nlu.training_data.message import Message
class BlankSpacyTokenizer(Tokenizer):
"""
A simple spaCy tokenizer without a language model attached.
This tokenizer implements the t... | 30.564103 | 97 | 0.642617 |
450c3a6b170bc8fc92c1d092a04cc93cf190ccb8 | 941 | py | Python | utils/onnx.py | jacobwjs/3DDFA_V2 | 1d97fa30ce4b4b9d9df2dfea48481d7598040dcc | [
"MIT"
] | null | null | null | utils/onnx.py | jacobwjs/3DDFA_V2 | 1d97fa30ce4b4b9d9df2dfea48481d7598040dcc | [
"MIT"
] | null | null | null | utils/onnx.py | jacobwjs/3DDFA_V2 | 1d97fa30ce4b4b9d9df2dfea48481d7598040dcc | [
"MIT"
] | null | null | null | # coding: utf-8
__author__ = 'cleardusk'
import sys
sys.path.append('..')
import torch
import models_3ddfa
from utils.tddfa_util import load_model
def convert_to_onnx(**kvs):
# 1. load model
size = kvs.get('size', 120)
model = getattr(models_3ddfa, kvs.get('arch'))(
num_classes=kvs.get('num_pa... | 22.95122 | 56 | 0.618491 |
b6bbb44dba9cdff28a292e7ffb3d08af2c42cb12 | 4,028 | py | Python | pytest_testdox/plugin.py | jairhenrique/pytest-testdox | ea8796fe09cfb10b7b00786453c690d4630f9076 | [
"MIT"
] | 42 | 2016-11-04T15:15:22.000Z | 2022-03-06T11:02:34.000Z | pytest_testdox/plugin.py | renanivo/pytest-testdox | 86f8224b416a74ccc5b102b49c24a918c42d87d4 | [
"MIT"
] | 68 | 2017-03-08T16:15:23.000Z | 2022-03-10T18:35:48.000Z | pytest_testdox/plugin.py | jairhenrique/pytest-testdox | ea8796fe09cfb10b7b00786453c690d4630f9076 | [
"MIT"
] | 9 | 2018-01-21T06:21:53.000Z | 2022-03-06T11:16:27.000Z | import sys
import pytest
from _pytest.terminal import TerminalReporter
from . import constants, models, wrappers
def pytest_addoption(parser):
group = parser.getgroup('terminal reporting', 'reporting', after='general')
group.addoption(
'--testdox', action='store_true', dest='testdox', default=False,... | 29.617647 | 87 | 0.654916 |
4431a1acd0b96e5f1fc7dc426581547e026f4a75 | 512 | py | Python | xinshuo_math/test/bbox_transform/test_get_center_crop_bbox.py | xinshuoweng/cv_ml_tool | 1918b9e37ec5fb8148b8a089f226a4864d67b153 | [
"MIT"
] | 31 | 2020-03-05T12:27:21.000Z | 2022-03-07T04:00:18.000Z | xinshuo_math/test/bbox_transform/test_get_center_crop_bbox.py | xinshuoweng/cv_ml_tool | 1918b9e37ec5fb8148b8a089f226a4864d67b153 | [
"MIT"
] | null | null | null | xinshuo_math/test/bbox_transform/test_get_center_crop_bbox.py | xinshuoweng/cv_ml_tool | 1918b9e37ec5fb8148b8a089f226a4864d67b153 | [
"MIT"
] | 12 | 2020-07-06T05:06:58.000Z | 2021-11-18T14:43:20.000Z | # Author: Xinshuo Weng
# email: xinshuo.weng@gmail.com
import numpy as np
import init_paths
from bbox_transform import get_center_crop_bbox
from xinshuo_miscellaneous import CHECK_EQ_NUMPY
def test_get_center_crop_bbox():
print('check basic')
bbox = [1, 1, 10, 10]
crop_bbox = get_center_crop_bbox(bbox)
print(bbox... | 25.6 | 77 | 0.753906 |
8a6def3be0ad48b611e249a26b1b1a7e72752600 | 30 | py | Python | src/bones-ipykernel/bones/kernel/__init__.py | DangerMouseB/bones | e485611f092a3a85ed4620f13a2460f695cfc9ef | [
"BSD-3-Clause"
] | null | null | null | src/bones-ipykernel/bones/kernel/__init__.py | DangerMouseB/bones | e485611f092a3a85ed4620f13a2460f695cfc9ef | [
"BSD-3-Clause"
] | null | null | null | src/bones-ipykernel/bones/kernel/__init__.py | DangerMouseB/bones | e485611f092a3a85ed4620f13a2460f695cfc9ef | [
"BSD-3-Clause"
] | null | null | null | from ._core import MultiKernel | 30 | 30 | 0.866667 |
77bedc39a6594ad9afa067f83555317589e61400 | 1,414 | py | Python | logindefender_tb.py | corerd/PyDomo | 3a576e047f52b9e80bd79641694fae6b91724a22 | [
"MIT"
] | null | null | null | logindefender_tb.py | corerd/PyDomo | 3a576e047f52b9e80bd79641694fae6b91724a22 | [
"MIT"
] | null | null | null | logindefender_tb.py | corerd/PyDomo | 3a576e047f52b9e80bd79641694fae6b91724a22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Corrado Ubezio
#
# 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 r... | 35.35 | 80 | 0.75389 |
f0f4a924976bb11c65ec3c47f939f3b42a71e01c | 36,715 | py | Python | tests/integ/test_workflow.py | sayonkumarsaha/sagemaker-python-sdk | f399fb741984f4577ee70977a6ae5047e198a543 | [
"Apache-2.0"
] | null | null | null | tests/integ/test_workflow.py | sayonkumarsaha/sagemaker-python-sdk | f399fb741984f4577ee70977a6ae5047e198a543 | [
"Apache-2.0"
] | null | null | null | tests/integ/test_workflow.py | sayonkumarsaha/sagemaker-python-sdk | f399fb741984f4577ee70977a6ae5047e198a543 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... | 34.026877 | 100 | 0.629334 |
357d0ca31018948771c4c744f6e616edfa4f83b8 | 25,763 | py | Python | sdk/python/pulumi_gcp/bigquery/iam_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 121 | 2018-06-18T19:16:42.000Z | 2022-03-31T06:06:48.000Z | sdk/python/pulumi_gcp/bigquery/iam_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 492 | 2018-06-22T19:41:03.000Z | 2022-03-31T15:33:53.000Z | sdk/python/pulumi_gcp/bigquery/iam_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2018-06-19T01:43:13.000Z | 2022-03-23T22:43:37.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 44.572664 | 553 | 0.639561 |
074caa89d4d5900f911b903ac8673f9bbe14a98e | 4,174 | py | Python | tensorflow/reader.py | reachlin/machinelearning | eb8ba02aa0da86ccf9991fa609afa84d8c180a21 | [
"MIT"
] | 11 | 2017-12-05T17:37:18.000Z | 2020-07-01T21:47:31.000Z | tensorflow/reader.py | reachlin/machinelearning | eb8ba02aa0da86ccf9991fa609afa84d8c180a21 | [
"MIT"
] | null | null | null | tensorflow/reader.py | reachlin/machinelearning | eb8ba02aa0da86ccf9991fa609afa84d8c180a21 | [
"MIT"
] | 6 | 2017-09-11T12:31:19.000Z | 2020-12-13T16:28:48.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... | 33.934959 | 80 | 0.702444 |
dc8c76589e43ca749bbe0b37bec8ba3dd578321b | 8,169 | py | Python | tests/oss_fuzz/test_oss_fuzz_bug_report_parser.py | zhenyudg/monorail-scraper | 154a3b809241599fc4bc5096ef1b019752e0de58 | [
"MIT"
] | 1 | 2021-07-14T00:36:26.000Z | 2021-07-14T00:36:26.000Z | tests/oss_fuzz/test_oss_fuzz_bug_report_parser.py | zhenyudg/monorail-scraper | 154a3b809241599fc4bc5096ef1b019752e0de58 | [
"MIT"
] | 1 | 2020-09-05T23:17:30.000Z | 2020-09-05T23:42:05.000Z | tests/oss_fuzz/test_oss_fuzz_bug_report_parser.py | zhenyudg/monorail-scraper | 154a3b809241599fc4bc5096ef1b019752e0de58 | [
"MIT"
] | 1 | 2021-02-02T17:01:03.000Z | 2021-02-02T17:01:03.000Z | from unittest import TestCase
from monorail_scraper.issue.issue_scraper import IssueScraper
from monorail_scraper.oss_fuzz.oss_fuzz_bug_report_parser import *
from monorail_scraper.oss_fuzz.oss_fuzz_bug_report_parser import _get_project, _get_fuzzing_engine, _get_fuzz_target_binary, \
_get_job_type, _get_platform_... | 54.099338 | 290 | 0.735953 |
bd8baf9155c0efee3a26ad7a7cf05af206000ca6 | 384 | py | Python | stubs/ussl.py | esbullington/cct | 1a89d346c76236a9710177a208730584ecb65c02 | [
"MIT"
] | null | null | null | stubs/ussl.py | esbullington/cct | 1a89d346c76236a9710177a208730584ecb65c02 | [
"MIT"
] | null | null | null | stubs/ussl.py | esbullington/cct | 1a89d346c76236a9710177a208730584ecb65c02 | [
"MIT"
] | null | null | null | """
Module: 'ussl' on micropython-esp32-1.13-274
"""
# MCU: {'ver': '1.13-274', 'port': 'esp32', 'arch': 'xtensawin', 'sysname': 'esp32', 'release': '1.13.0', 'name': 'micropython', 'mpy': 10757, 'version': '1.13.0', 'machine': 'ESP32 module with ESP32', 'build': '274', 'nodename': 'esp32', 'platform': 'esp32', 'family... | 42.666667 | 284 | 0.601563 |
884c1ef3cc4f0473ed6a7f09e1911806f90f7041 | 508 | py | Python | Python/p001-Basic-Neuron-3-inputs.py | Abhash600/Neural-Networks-with-different-languages | 448e0798826543d0bad9128d6ef683ba4fff3880 | [
"MIT"
] | null | null | null | Python/p001-Basic-Neuron-3-inputs.py | Abhash600/Neural-Networks-with-different-languages | 448e0798826543d0bad9128d6ef683ba4fff3880 | [
"MIT"
] | null | null | null | Python/p001-Basic-Neuron-3-inputs.py | Abhash600/Neural-Networks-with-different-languages | 448e0798826543d0bad9128d6ef683ba4fff3880 | [
"MIT"
] | 1 | 2021-07-30T21:45:21.000Z | 2021-07-30T21:45:21.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 16 23:27:29 2020
@author: pranjal27bhardwaj
"""
import numpy as np
#print(inputs)
inputs_1 = [1.2, 5.1, 2.1]
weights = [3.1, 2.1, 8.7]
bias = 3.0
output_1 = inputs_1[0]*weights[0] + inputs_1[1]*weights[1] + inputs_1[2]*weights[2] + bias
print(ou... | 19.538462 | 90 | 0.653543 |
02042f421d2048bf94a783f39331aff9156e843b | 2,768 | py | Python | day22/day22-1.py | RobinRH/advent-of-code-2017 | 8996691abf4d9020294e5b750bef1e35effd5c68 | [
"MIT"
] | null | null | null | day22/day22-1.py | RobinRH/advent-of-code-2017 | 8996691abf4d9020294e5b750bef1e35effd5c68 | [
"MIT"
] | null | null | null | day22/day22-1.py | RobinRH/advent-of-code-2017 | 8996691abf4d9020294e5b750bef1e35effd5c68 | [
"MIT"
] | null | null | null | #answer -> 5256
'''
If the current node is infected, it turns to its right.
Otherwise, it turns to its left. (Turning is done in-place; the current node does not change.)
If the current node is clean, it becomes infected.
Otherwise, it becomes cleaned. (This is done after the node is considered for the purposes of cha... | 25.394495 | 118 | 0.60513 |
28b9a6b6f496e652d6203a07d29a468dd8fb1632 | 1,961 | py | Python | main.py | NawrasseDahman/Daily-Prayer-Time-API | fa1a1c47c04081a7f23f3b6fb978bc317af8ddae | [
"MIT"
] | 2 | 2021-09-16T20:04:47.000Z | 2021-10-09T12:10:48.000Z | main.py | NawrasseDahman/Daily-Prayer-Time-API | fa1a1c47c04081a7f23f3b6fb978bc317af8ddae | [
"MIT"
] | null | null | null | main.py | NawrasseDahman/Daily-Prayer-Time-API | fa1a1c47c04081a7f23f3b6fb978bc317af8ddae | [
"MIT"
] | null | null | null | import requests
from flask import Flask, jsonify
from threading import Thread
import json
from os import system
import googlesearch
from bs4 import BeautifulSoup
import dateparser
app = Flask('')
app.config['JSON_SORT_KEYS'] = False
@app.route('/')
def home():
return "I'm alive"
@app.route('/api/<string:s>', metho... | 33.237288 | 121 | 0.615502 |
5c5b05bf9090a5ccd01142a7c81f682151c46009 | 566 | py | Python | setup.py | pspiagicw/bluemary | da2e1b25138bc311c3309cd142b5fd303f5ad6e0 | [
"MIT"
] | null | null | null | setup.py | pspiagicw/bluemary | da2e1b25138bc311c3309cd142b5fd303f5ad6e0 | [
"MIT"
] | 8 | 2021-02-15T05:55:25.000Z | 2021-03-02T07:29:29.000Z | setup.py | pspiagicw/bluemary | da2e1b25138bc311c3309cd142b5fd303f5ad6e0 | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(
name='BlueMary',
version='0.0.1dev',
author='pspiagicw',
author_email='pspiagicw@gmail.com',
license='MIT License',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/pspiagicw/bluemary',
... | 22.64 | 50 | 0.583039 |
9177b20583e5991a998881ee67f9e0260f476e2a | 1,121 | py | Python | Gathered CTF writeups/ptr-yudai-writeups/2019/watevrCTF_2019/sabataD/solve.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:00:41.000Z | 2022-03-27T06:00:41.000Z | Gathered CTF writeups/ptr-yudai-writeups/2019/watevrCTF_2019/sabataD/solve.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | null | null | null | Gathered CTF writeups/ptr-yudai-writeups/2019/watevrCTF_2019/sabataD/solve.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:01:42.000Z | 2022-03-27T06:01:42.000Z | from ptrlib import *
def rot13(s):
output = b''
for c in s:
if ord('a') <= c <= ord('z'):
output += bytes([ord('a') + (c - ord('a') + 13) % 26])
elif ord('A') <= c <= ord('Z'):
output += bytes([ord('A') + (c - ord('A') + 13) % 26])
else:
output += byt... | 28.025 | 68 | 0.480821 |
33b60be318ddca8cf4cfb8cf0747c0cc9dba3234 | 1,938 | py | Python | lib_crypto.py | Xeratec/pytrojan | 42e1eb928d69ac514d8cbb0b0784bd8f0bf8f4a5 | [
"MIT"
] | 1 | 2020-05-08T08:59:35.000Z | 2020-05-08T08:59:35.000Z | lib_crypto.py | Xeratec/pytrojan | 42e1eb928d69ac514d8cbb0b0784bd8f0bf8f4a5 | [
"MIT"
] | null | null | null | lib_crypto.py | Xeratec/pytrojan | 42e1eb928d69ac514d8cbb0b0784bd8f0bf8f4a5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import zlib
import base64
from Crypto.Cipher import PKCS1_OAEP
from Crypto.PublicKey import RSA
import Crypto.Hash.SHA
def encrypt_string(plaintext, key, VERBOSE=False):
## Returns base64 encrypted plaintext
chunk_size = 256-2-2*Crypto.Hash.SHA.digest_size
if VERBOSE: print '\tCompressing... | 32.3 | 72 | 0.645511 |
fc72f96fd6c9b9b4a0e72d4c94728eb72e2e8a11 | 30 | py | Python | {{ cookiecutter.repo_service_reponame }}/tests/{{ cookiecutter.slug }}/test_foobar.py | boilpy/boilpy | 78f353a4b45e1df2e573993d686418dfc1f13cc8 | [
"MIT"
] | 8 | 2018-11-03T12:50:42.000Z | 2021-12-15T15:36:14.000Z | {{ cookiecutter.repo_service_reponame }}/tests/{{ cookiecutter.slug }}/test_foobar.py | boilpy/boilpy | 78f353a4b45e1df2e573993d686418dfc1f13cc8 | [
"MIT"
] | 1 | 2021-09-03T16:55:39.000Z | 2021-09-03T16:55:39.000Z | {{ cookiecutter.repo_service_reponame }}/tests/{{ cookiecutter.slug }}/test_foobar.py | boilpy/boilpy | 78f353a4b45e1df2e573993d686418dfc1f13cc8 | [
"MIT"
] | null | null | null | import {{ cookiecutter.slug }} | 30 | 30 | 0.733333 |
a6a0ea66e31bff194953fcc05d99f818eabb954d | 3,298 | py | Python | pl_examples/basic_examples/autoencoder.py | javierlorenzod/pytorch-lightning | 6dba26666aa564db414eb238d99a4213006d8220 | [
"Apache-2.0"
] | 1 | 2021-08-05T01:45:26.000Z | 2021-08-05T01:45:26.000Z | pl_examples/basic_examples/autoencoder.py | javierlorenzod/pytorch-lightning | 6dba26666aa564db414eb238d99a4213006d8220 | [
"Apache-2.0"
] | null | null | null | pl_examples/basic_examples/autoencoder.py | javierlorenzod/pytorch-lightning | 6dba26666aa564db414eb238d99a4213006d8220 | [
"Apache-2.0"
] | 1 | 2021-02-16T00:47:46.000Z | 2021-02-16T00:47:46.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... | 28.431034 | 87 | 0.639478 |
7887ab41e0402230d4eb0b05bab70d7a333d17d8 | 9,493 | py | Python | src/pyronn_torch/conebeam.py | mareikethies/pyronn-torch | 15f5e6dc4cfa9413d9bb46539806ee32e704161a | [
"MIT"
] | 8 | 2020-05-17T09:40:40.000Z | 2022-01-07T09:38:07.000Z | src/pyronn_torch/conebeam.py | mareikethies/pyronn-torch | 15f5e6dc4cfa9413d9bb46539806ee32e704161a | [
"MIT"
] | 5 | 2020-08-19T23:22:37.000Z | 2021-07-09T14:11:57.000Z | src/pyronn_torch/conebeam.py | theHamsta/pyronn-torch | 9641005b2ec78c8ede420a489ce5efaaddf9b12e | [
"MIT"
] | 5 | 2020-05-26T23:27:58.000Z | 2021-07-09T07:36:12.000Z | #
# Copyright © 2020 Stephan Seitz <stephan.seitz@fau.de>
#
# Distributed under terms of the GPLv3 license.
"""
"""
import numpy as np
import scipy.linalg
import torch
import pyronn_torch
class State:
def __init__(self,
projection_shape,
volume_shape,
source_po... | 39.065844 | 112 | 0.619088 |
35655708f6f0faa014073c158abb348d82cea232 | 5,585 | py | Python | dataprep/clean/clean_my_nric.py | Waterpine/dataprep-1 | 4032acb1d1f2c413d4cb000d17e8ffa611315f9f | [
"MIT"
] | 1,229 | 2019-12-21T02:58:59.000Z | 2022-03-30T08:12:33.000Z | dataprep/clean/clean_my_nric.py | Waterpine/dataprep-1 | 4032acb1d1f2c413d4cb000d17e8ffa611315f9f | [
"MIT"
] | 680 | 2019-12-19T06:09:23.000Z | 2022-03-31T04:15:25.000Z | dataprep/clean/clean_my_nric.py | Waterpine/dataprep-1 | 4032acb1d1f2c413d4cb000d17e8ffa611315f9f | [
"MIT"
] | 170 | 2020-01-08T03:27:26.000Z | 2022-03-20T20:42:55.000Z | """
Clean and validate a DataFrame column containing
Malaysian National Registration Identity Card Numbers (NRICs).
"""
# pylint: disable=too-many-lines, too-many-arguments, too-many-branches
from typing import Any, Union
from operator import itemgetter
import dask.dataframe as dd
import numpy as np
import pandas as p... | 32.47093 | 99 | 0.62077 |
0ea9a31d22f2a369e97c288f19d6f3de3373d9a8 | 3,665 | py | Python | ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py | bsingr/therubyracer | 2397cae80aa8f458c028e28bdf2bd8a93e6161a6 | [
"MIT",
"Unlicense"
] | 1 | 2015-11-05T01:29:05.000Z | 2015-11-05T01:29:05.000Z | ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py | bsingr/therubyracer | 2397cae80aa8f458c028e28bdf2bd8a93e6161a6 | [
"MIT",
"Unlicense"
] | null | null | null | ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py | bsingr/therubyracer | 2397cae80aa8f458c028e28bdf2bd8a93e6161a6 | [
"MIT",
"Unlicense"
] | null | null | null | """SCons.Tool.Perforce.py
Tool-specific initialization for Perforce Source Code Management system.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, ... | 34.904762 | 95 | 0.692497 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.