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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfebdc0f6cd106411e690aa30a03ad7d8289dd06 | 251 | py | Python | pynovice/gaode_map/__init__.py | wqwangchn/novice | d52190a9cd5045726e49aff8610b718636c304c7 | [
"MIT"
] | 2 | 2020-06-28T08:30:47.000Z | 2020-11-04T07:55:42.000Z | pynovice/gaode_map/__init__.py | wqwangchn/novice | d52190a9cd5045726e49aff8610b718636c304c7 | [
"MIT"
] | 8 | 2020-11-13T18:56:02.000Z | 2022-02-10T03:16:52.000Z | pynovice/gaode_map/__init__.py | wqwangchn/novice | d52190a9cd5045726e49aff8610b718636c304c7 | [
"MIT"
] | 2 | 2020-09-17T00:12:36.000Z | 2020-11-04T07:55:55.000Z | # coding=utf-8
# /usr/bin/env python
'''
Author: wenqiangw
Email: wenqiangw@opera.com
Date: 2020-07-28 15:07
Desc: 数据分布画图
'''
from .trajectory_playback import Trajectory as Trajectory_his
from .trajectory_playback_v2 import Trajectory as Trajectory | 19.307692 | 61 | 0.784861 |
9996b6f808a2cba8342baf6f3ae3984a2648f8f7 | 3,616 | py | Python | src/models/encoders.py | dbarrejon/Shi-VAE | b6f2c92e40d3585274dc7586e3b36d8ca45624aa | [
"MIT"
] | 4 | 2021-03-17T01:55:00.000Z | 2021-11-02T10:02:28.000Z | src/models/encoders.py | dbarrejon/Shi-VAE | b6f2c92e40d3585274dc7586e3b36d8ca45624aa | [
"MIT"
] | null | null | null | src/models/encoders.py | dbarrejon/Shi-VAE | b6f2c92e40d3585274dc7586e3b36d8ca45624aa | [
"MIT"
] | null | null | null | # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Copyright (c) 2021. by Daniel Barrejon, UC3M. +
# All rights reserved. This file is part of the Shi-VAE, and is released under the +
# "MIT License Agreement". Please see the LICE... | 36.525253 | 90 | 0.551438 |
41d4a837480486e392e325f7e33f7190ea59fdf7 | 11,090 | py | Python | tests/testflows/rbac/tests/privileges/kill_mutation.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | 18 | 2021-05-29T01:12:33.000Z | 2021-11-18T12:34:48.000Z | tests/testflows/rbac/tests/privileges/kill_mutation.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | null | null | null | tests/testflows/rbac/tests/privileges/kill_mutation.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | 2 | 2021-07-13T06:42:45.000Z | 2021-07-21T13:47:22.000Z | from rbac.requirements import *
from rbac.helper.common import *
import rbac.helper.errors as errors
@TestSuite
def no_privilege(self, node=None):
"""Check that user doesn't need privileges to execute `KILL MUTATION` with no mutations.
"""
if node is None:
node = self.context.node
with Scenari... | 43.151751 | 163 | 0.656267 |
6a14d4b03e056ca4ff90571a80e1e0f92a0c932a | 545 | py | Python | importer/migrations/0008_campaigntaskdetails_project.py | juliecentofanti172/juliecentofanti.github.io | 446ea8522b9f4a6709124ebb6e0f675acf7fe205 | [
"CC0-1.0"
] | 134 | 2018-05-23T14:00:29.000Z | 2022-03-10T15:47:53.000Z | importer/migrations/0008_campaigntaskdetails_project.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | 1,104 | 2018-05-22T20:18:22.000Z | 2022-03-31T17:28:40.000Z | importer/migrations/0008_campaigntaskdetails_project.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | 32 | 2018-05-22T20:22:38.000Z | 2021-12-21T14:11:44.000Z | # Generated by Django 2.0.8 on 2018-09-20 20:05
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("importer", "0007_auto_20180917_1654")]
operations = [
migrations.AddField(
model_name="campaigntaskdetails",... | 24.772727 | 60 | 0.59633 |
5f6b6182b98c553b844a23464fb14483cf25c5c3 | 10,025 | py | Python | google/cloud/dialogflow_v2/services/participants/transports/base.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflow_v2/services/participants/transports/base.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflow_v2/services/participants/transports/base.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 36.856618 | 103 | 0.648978 |
fd8fca7e72aff6669420718c024b098b45600dc8 | 479 | py | Python | data_structures/array/array_string.py | Nobodylesszb/python_module | 37d2cdcf89a3ff02a9e560696a059cec9272bd1f | [
"MIT"
] | null | null | null | data_structures/array/array_string.py | Nobodylesszb/python_module | 37d2cdcf89a3ff02a9e560696a059cec9272bd1f | [
"MIT"
] | null | null | null | data_structures/array/array_string.py | Nobodylesszb/python_module | 37d2cdcf89a3ff02a9e560696a059cec9272bd1f | [
"MIT"
] | null | null | null | #该array模块定义了一个非常类似于a的序列数据结构list,
# 除了所有成员必须具有相同的基本类型。
# 支持的类型都是数字或其他固定大小的基本类型,如字节
import array
import binascii
s = b'This is the array.'
a = array.array('b', s)
print('As byte string:', s)
print('As array :', a)
print('As hex :', binascii.hexlify(a))
"""
As byte string: b'This is the array.'
As array ... | 26.611111 | 111 | 0.649269 |
bae2ffb46278c08c3bdcf07190687485f82cbd11 | 1,137 | py | Python | sa-fastapi/qr-code-fs-atom/scripted-atom/scripts/qr_generator.py | piximos/scripted-atoms | 6156803e2512bec11ed0403121b9e7f9bf019d99 | [
"MIT"
] | 2 | 2020-12-21T20:49:26.000Z | 2021-12-23T16:04:48.000Z | sa-fastapi/qr-code-s3-atom/scripted-atom/scripts/qr_generator.py | piximos/scripted-atoms | 6156803e2512bec11ed0403121b9e7f9bf019d99 | [
"MIT"
] | null | null | null | sa-fastapi/qr-code-s3-atom/scripted-atom/scripts/qr_generator.py | piximos/scripted-atoms | 6156803e2512bec11ed0403121b9e7f9bf019d99 | [
"MIT"
] | null | null | null | import os
import qrcode
from re import match
class QrGenerator:
@staticmethod
def generate_qr(data: str, qr_id: str, color_fill: str = None, color_bg: str = None):
QrGenerator.test_hex_value(color_fill)
QrGenerator.test_hex_value(color_bg)
qr_dir = os.getenv('QR_TMP_FOLDER')
... | 31.583333 | 118 | 0.619173 |
1a3e2506f9910819ddc1eb4222619fa09df838f5 | 403 | py | Python | arc/075/d.py | wotsushi/competitive-programming | 17ec8fd5e1c23aee626aee70b1c0da8d7f8b8c86 | [
"MIT"
] | 3 | 2019-06-25T06:17:38.000Z | 2019-07-13T15:18:51.000Z | arc/075/d.py | wotsushi/competitive-programming | 17ec8fd5e1c23aee626aee70b1c0da8d7f8b8c86 | [
"MIT"
] | null | null | null | arc/075/d.py | wotsushi/competitive-programming | 17ec8fd5e1c23aee626aee70b1c0da8d7f8b8c86 | [
"MIT"
] | null | null | null | from math import ceil
# 入力
N, A, B = map(int, input().split())
h = [int(input()) for _ in range(N)]
# 二分法により解を求める
def bis(p, ok, ng):
mid = (ok + ng) // 2
return (
ok if abs(ok - ng) == 1 else
bis(p, mid, ng) if p(mid) else
bis(p, ok, mid)
)
ans = bis(
lambda k: sum(max(0, c... | 15.5 | 71 | 0.476427 |
4744f149b50ff979daa103c28ad272f1f00d7722 | 5,394 | py | Python | hadoop/hadoopget.py | gjgj821/traffic_prediction | ceed31ccf9cdaa83cfa7912111bf0ec2e699467e | [
"MIT"
] | 3 | 2017-08-11T02:29:45.000Z | 2021-08-05T03:05:57.000Z | hadoop/hadoopget.py | gjgj821/traffic_prediction | ceed31ccf9cdaa83cfa7912111bf0ec2e699467e | [
"MIT"
] | null | null | null | hadoop/hadoopget.py | gjgj821/traffic_prediction | ceed31ccf9cdaa83cfa7912111bf0ec2e699467e | [
"MIT"
] | 2 | 2015-09-07T08:10:12.000Z | 2016-03-13T08:00:25.000Z | # coding=utf-8
import os
from core.relative import Relative, Parent
__author__ = 'GaoJie'
# 加载hadoop结果集,计算
DATA_DIR = 'data/mapred/'
# merge -------- should map to id
# adx :int, --U 0
# device_device_type :int, --u 1
# detworkConnection_connecti... | 34.139241 | 117 | 0.50927 |
4a36d80f13469b66c184e6d25b179945c9df47d1 | 1,017 | py | Python | cma-es/cma&mse&quad&pow/Ss.py | luzhijun/- | c9a7f39fd033a3ba3c57acbbd309c05ac17e6bef | [
"Apache-2.0"
] | 17 | 2016-11-18T03:15:14.000Z | 2022-01-09T07:50:56.000Z | cma-es/cma&mse&quad&pow/Ss.py | luzhijun/- | c9a7f39fd033a3ba3c57acbbd309c05ac17e6bef | [
"Apache-2.0"
] | null | null | null | cma-es/cma&mse&quad&pow/Ss.py | luzhijun/- | c9a7f39fd033a3ba3c57acbbd309c05ac17e6bef | [
"Apache-2.0"
] | 7 | 2016-11-20T10:20:57.000Z | 2021-04-20T05:29:57.000Z | #!usr/bin/env python
#encoding: utf-8
__author__="luzhijun"
'''
产生数据集合,dataSet[0:3]使用多项式函数产生噪点数据;dataSet[3:6]使用指数函数产生噪点数据;
realDataSet[0]存放多项式函数产生真实数据,realDataSet[1]存放指数函数产生真实数据
'''
import funcs
import numpy as np
x1=np.linspace(0,20,150)
x2=np.hstack((np.random.exponential(5,300),x1))
x2.sort()
x3=np.hstack((np.rando... | 22.6 | 58 | 0.711898 |
bf6840aef5379a3539fe14e0205bf1725f85f79e | 8,666 | py | Python | cinder/volume/drivers/block_device.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 1 | 2019-02-08T05:24:58.000Z | 2019-02-08T05:24:58.000Z | cinder/volume/drivers/block_device.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/block_device.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Mirantis, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 37.842795 | 79 | 0.608701 |
221235b5ad45cb338763c2710a5eb813260a6298 | 6,931 | py | Python | lib/relation_engine_bulk_update/relation_engine_bulk_updateImpl.py | kbaseapps/relation_engine_bulk_update | 04638d3d9e87eb9dc5afe30f96d1e4b84f633b8b | [
"MIT"
] | null | null | null | lib/relation_engine_bulk_update/relation_engine_bulk_updateImpl.py | kbaseapps/relation_engine_bulk_update | 04638d3d9e87eb9dc5afe30f96d1e4b84f633b8b | [
"MIT"
] | null | null | null | lib/relation_engine_bulk_update/relation_engine_bulk_updateImpl.py | kbaseapps/relation_engine_bulk_update | 04638d3d9e87eb9dc5afe30f96d1e4b84f633b8b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#BEGIN_HEADER
import ujson
import logging
import os
from installed_clients.CatalogClient import Catalog
from installed_clients.KBaseReportClient import KBaseReport
from installed_clients.WorkspaceClient import Workspace
from relation_engine_bulk_update.genome_collections import update_ncbi_gen... | 41.502994 | 114 | 0.654307 |
54ae3700c4d1684b98156e9d439499b64165f241 | 9,991 | py | Python | train/gen/adv/models/particles/v4_noetaphi_trunc7_limit100/lib.py | sammysiegel/SubtLeNet | 94d1507a8a7c60548b59400109b6c4086ad83141 | [
"MIT"
] | null | null | null | train/gen/adv/models/particles/v4_noetaphi_trunc7_limit100/lib.py | sammysiegel/SubtLeNet | 94d1507a8a7c60548b59400109b6c4086ad83141 | [
"MIT"
] | null | null | null | train/gen/adv/models/particles/v4_noetaphi_trunc7_limit100/lib.py | sammysiegel/SubtLeNet | 94d1507a8a7c60548b59400109b6c4086ad83141 | [
"MIT"
] | 2 | 2019-07-08T20:18:22.000Z | 2020-06-01T20:04:08.000Z | #!/usr/bin/env python2.7
from _common import *
from ..generators.gen import make_coll, generate, get_dims
from ..generators import gen as generator
'''
some global definitions
'''
NEPOCH = 50
VERSION = 4
MODELDIR = environ.get('MODELDIR', 'models/') + '/particles/'
BASEDIR = environ['BASEDIR']
OPTIMIZER = 'Adam'
_... | 36.068592 | 102 | 0.610049 |
446fb4a33cf0356102d8955b158c6b5f39970224 | 15,442 | py | Python | test/integration/ggrc/models/test_issue.py | HLD/ggrc-core | 9bdc0fc6ca9e252f4919db682d80e360d5581eb4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/models/test_issue.py | HLD/ggrc-core | 9bdc0fc6ca9e252f4919db682d80e360d5581eb4 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | test/integration/ggrc/models/test_issue.py | HLD/ggrc-core | 9bdc0fc6ca9e252f4919db682d80e360d5581eb4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Tests for Issue model."""
from ggrc import db
from ggrc.models import all_models
from integration.ggrc import generator
from integration.ggrc import TestCase, Api
from integration.ggrc.models import facto... | 38.034483 | 79 | 0.681647 |
fedac9faf25e949d83a034c051f6a26f524ea8e0 | 36,613 | py | Python | utils/testsuite/testsuite.py | Shanu1515/hermes | a6260f2aba22656117202da53d11fa5cc17fe690 | [
"MIT"
] | 1 | 2021-05-12T13:38:27.000Z | 2021-05-12T13:38:27.000Z | utils/testsuite/testsuite.py | Shanu1515/hermes | a6260f2aba22656117202da53d11fa5cc17fe690 | [
"MIT"
] | 6 | 2021-03-01T21:22:38.000Z | 2022-02-26T02:00:00.000Z | utils/testsuite/testsuite.py | Shanu1515/hermes | a6260f2aba22656117202da53d11fa5cc17fe690 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import enum
import os
import re
import subprocess
import sys
import tempfile
import textwrap
import tim... | 34.410714 | 102 | 0.569907 |
fb290dc711627dd9d2620f483426a24bc92ece67 | 10,454 | py | Python | analyzer/codechecker_analyzer/analyzers/config_handler.py | gargaroff/codechecker | f3574a373f454dc57f813225af6e54824f194e23 | [
"Apache-2.0"
] | null | null | null | analyzer/codechecker_analyzer/analyzers/config_handler.py | gargaroff/codechecker | f3574a373f454dc57f813225af6e54824f194e23 | [
"Apache-2.0"
] | null | null | null | analyzer/codechecker_analyzer/analyzers/config_handler.py | gargaroff/codechecker | f3574a373f454dc57f813225af6e54824f194e23 | [
"Apache-2.0"
] | null | null | null | # -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... | 43.377593 | 79 | 0.594892 |
5d59faa16860e4129ae3024106a55e47cfab96db | 2,151 | py | Python | scripts/check_cache_trace.py | NeHalem90/rocket-chip | 90d4ccd720f7bad0a62c99b55f057b2e50ace218 | [
"Apache-2.0"
] | 1,199 | 2019-06-18T23:08:07.000Z | 2022-03-31T08:21:58.000Z | scripts/check_cache_trace.py | NeHalem90/rocket-chip | 90d4ccd720f7bad0a62c99b55f057b2e50ace218 | [
"Apache-2.0"
] | 656 | 2019-06-20T09:21:59.000Z | 2022-03-31T15:37:04.000Z | scripts/check_cache_trace.py | NeHalem90/rocket-chip | 90d4ccd720f7bad0a62c99b55f057b2e50ace218 | [
"Apache-2.0"
] | 495 | 2019-06-19T01:38:31.000Z | 2022-03-31T11:42:23.000Z | import sys
from collections import defaultdict
# Checks a trace of cache transactions to make sure the data is correct
# Note: this will only work if the L2 agent only receives cached traffic
# (either caching Acquires or Releases). If there are any builtin
# Put or PutBlock requests, they will not be reflected in the... | 32.590909 | 72 | 0.611808 |
893318527a7c4bba4f3cf74454c101ac7fd37e53 | 18,915 | py | Python | giveaways/gset.py | Shukla-G/cray-cogs | b852194ed373912c002be05be7216f7bfe54dc19 | [
"MIT"
] | null | null | null | giveaways/gset.py | Shukla-G/cray-cogs | b852194ed373912c002be05be7216f7bfe54dc19 | [
"MIT"
] | null | null | null | giveaways/gset.py | Shukla-G/cray-cogs | b852194ed373912c002be05be7216f7bfe54dc19 | [
"MIT"
] | null | null | null | from typing import Union
import discord
from redbot.core import commands
from redbot.core.bot import Red
from redbot.core.utils.chat_formatting import box, humanize_list
from .main import Giveaways
from .models import config, get_guild_settings, get_role
class Gset(Giveaways, name="Giveaways"):
"""
Host emb... | 40.590129 | 222 | 0.614433 |
20794bb8094ef25c92834e59328a484528ce2701 | 708 | py | Python | crypto/rocket-ship-academy/solve.py | zeyu2001/STANDCON-Challenges | ba302a01e0f644c7fc84ca6c64f24ad5b4a082e0 | [
"MIT"
] | 3 | 2021-07-25T11:01:21.000Z | 2022-03-28T13:31:36.000Z | crypto/rocket-ship-academy/solve.py | zeyu2001/STANDCON-Challenges | ba302a01e0f644c7fc84ca6c64f24ad5b4a082e0 | [
"MIT"
] | null | null | null | crypto/rocket-ship-academy/solve.py | zeyu2001/STANDCON-Challenges | ba302a01e0f644c7fc84ca6c64f24ad5b4a082e0 | [
"MIT"
] | null | null | null | from Crypto.Util.number import long_to_bytes
from pwn import *
from decimal import *
import re
getcontext().prec = 100000000
pattern = "n = (\d+)\ne = (\d+)\nc = (\d+)"
conn = remote('localhost', '12345')
received = conn.recv().decode()
matches = re.search(pattern, received)
n, e, c = int(matches[1]), int(matches[2... | 21.454545 | 71 | 0.649718 |
6753cafcb0b4c296f3309ce45bfc1ec85949ba53 | 3,569 | py | Python | monai/handlers/classification_saver.py | RobinCamarasa/MONAI | 8207e1e2a3555ddc3fe938e058552651900dc951 | [
"Apache-2.0"
] | null | null | null | monai/handlers/classification_saver.py | RobinCamarasa/MONAI | 8207e1e2a3555ddc3fe938e058552651900dc951 | [
"Apache-2.0"
] | null | null | null | monai/handlers/classification_saver.py | RobinCamarasa/MONAI | 8207e1e2a3555ddc3fe938e058552651900dc951 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 43 | 110 | 0.680863 |
6f4596a91b7cf14aed7afbaf0f821f8a0848dd26 | 1,100 | py | Python | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/BentFabricWiresOrientation.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/BentFabricWiresOrientation.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/BentFabricWiresOrientation.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class BentFabricWiresOrientation(Enum, IComparable, IFormattable, IConvertible):
"""
Bent Fabric wires orientation.
enum BentFabricWiresOrientation,values: Down (0),Up (1)
"""
def __eq__(self, *args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass... | 23.913043 | 221 | 0.566364 |
b9b6b0ef084d754f6d29a03cd11c16ae3e033395 | 29,054 | py | Python | applications/neural_search/recall/domain_adaptive_pretraining/data_tools/dataset_utils.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | applications/neural_search/recall/domain_adaptive_pretraining/data_tools/dataset_utils.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | applications/neural_search/recall/domain_adaptive_pretraining/data_tools/dataset_utils.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors, and NVIDIA, and PaddlePaddle Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | 37.440722 | 106 | 0.583018 |
03572a7ca0e4bb0341be7c974b2c11603a11182f | 33,774 | py | Python | submm_python_routines/KIDs/find_resonances_interactive.py | chw3k5/WaferScreen | c0ca7fe939fe7cd0b722b7d6129b148c03a7505c | [
"Apache-2.0"
] | 1 | 2021-07-30T19:06:07.000Z | 2021-07-30T19:06:07.000Z | submm_python_routines/KIDs/find_resonances_interactive.py | chw3k5/WaferScreen | c0ca7fe939fe7cd0b722b7d6129b148c03a7505c | [
"Apache-2.0"
] | 8 | 2021-04-22T20:47:48.000Z | 2021-07-30T19:06:01.000Z | submm_python_routines/KIDs/find_resonances_interactive.py | chw3k5/WaferScreen | c0ca7fe939fe7cd0b722b7d6129b148c03a7505c | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import os
import sys
from scipy import signal, fftpack
import platform
from submm_python_routines.KIDs import resonance_fitting as rf
from matplotlib.backends.backend_pdf import PdfPages
from typing import NamedTuple
"""
Standalone version of kidPy's find_KIDs_inter... | 47.838527 | 126 | 0.590454 |
7444ae4b35cbffa2905470be0a0e2d249b489126 | 743 | py | Python | decorator_patterns/function_decorator_with_arguments.py | jbrt/python-decorator-patterns | f12cf820bcc4c6be9c810dfd222ca0845131debf | [
"MIT"
] | null | null | null | decorator_patterns/function_decorator_with_arguments.py | jbrt/python-decorator-patterns | f12cf820bcc4c6be9c810dfd222ca0845131debf | [
"MIT"
] | null | null | null | decorator_patterns/function_decorator_with_arguments.py | jbrt/python-decorator-patterns | f12cf820bcc4c6be9c810dfd222ca0845131debf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
def decorator_with_argument(arg1, arg2):
"""
Function decorator with arguments
:param arg1: (int) first argument
:param arg2: (int) second argument
:return: function decorated
"""
def inner_function(func_to_decorate):
def wrapper(*args, **kwargs):
... | 24.766667 | 69 | 0.628533 |
f6dcfa4366444b4b8367dc0a1ee266fd35f33a25 | 3,350 | py | Python | xtra/sample/app/urls.py | HyechurnJang/archon | 2cda56436ed6dea65d38774f7c9ed6c3315dbc03 | [
"Apache-2.0"
] | 1 | 2018-03-07T08:33:23.000Z | 2018-03-07T08:33:23.000Z | xtra/sample/app/urls.py | HyechurnJang/archon | 2cda56436ed6dea65d38774f7c9ed6c3315dbc03 | [
"Apache-2.0"
] | 2 | 2017-03-14T01:02:55.000Z | 2017-03-14T01:07:29.000Z | xtra/sample/app/urls.py | HyechurnJang/archon | 2cda56436ed6dea65d38774f7c9ed6c3315dbc03 | [
"Apache-2.0"
] | 4 | 2017-02-03T04:53:07.000Z | 2020-04-20T07:52:47.000Z | # -*- coding: utf-8 -*-
################################################################################
# _____ _ _____ _ #
# / ____(_) / ____| | | #
# | | _ ___ ___ ___ | (___ _ _ ___... | 64.423077 | 81 | 0.28597 |
828ca23a5b6e76bf683fdb5bf99aee451b120a82 | 3,206 | py | Python | codegen/verify.py | RobinZhang14ZLP/fast-matmul | 8bc5d3a7a5da86e191a5ddb39e88b4a2ce60315b | [
"BSD-2-Clause"
] | null | null | null | codegen/verify.py | RobinZhang14ZLP/fast-matmul | 8bc5d3a7a5da86e191a5ddb39e88b4a2ce60315b | [
"BSD-2-Clause"
] | null | null | null | codegen/verify.py | RobinZhang14ZLP/fast-matmul | 8bc5d3a7a5da86e191a5ddb39e88b4a2ce60315b | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2014-2015, Sandia Corporation
# All rights reserved.
#
# This file is part of fast-matmul and is under the BSD 2-Clause License,
# which can be found in the LICENSE file in the root directory, or at
# http://opensource.org/licenses/BSD-2-Clause.
import sys
# the sizes; we check mxnxk matmu... | 27.401709 | 106 | 0.468808 |
42237db1314ef0fd26230ec1fc841a24b6124a52 | 9,315 | py | Python | src/api/store/team.py | gregory-chekler/api | 11ecbea945e7eb6fa677a0c0bb32bda51ba15f28 | [
"MIT"
] | null | null | null | src/api/store/team.py | gregory-chekler/api | 11ecbea945e7eb6fa677a0c0bb32bda51ba15f28 | [
"MIT"
] | null | null | null | src/api/store/team.py | gregory-chekler/api | 11ecbea945e7eb6fa677a0c0bb32bda51ba15f28 | [
"MIT"
] | null | null | null | from database.models import Team, UserProfile, Media, Community, TeamMember
from _main_.utils.massenergize_errors import MassEnergizeAPIError, InvalidResourceError, ServerError, CustomMassenergizeError, NotAuthorizedError
from _main_.utils.massenergize_response import MassenergizeResponse
from django.utils.text import ... | 33.872727 | 145 | 0.659796 |
e7ecbdd676e062d9dbb02397884e661395c9698e | 1,348 | py | Python | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/request/v20170613/CreateDataSourceRequest.py | ankitdobhal/aliyun-openapi-python-sdk | 991b1c2d91adc468480defc23ba790d4369cce7b | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/request/v20170613/CreateDataSourceRequest.py | ankitdobhal/aliyun-openapi-python-sdk | 991b1c2d91adc468480defc23ba790d4369cce7b | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/request/v20170613/CreateDataSourceRequest.py | ankitdobhal/aliyun-openapi-python-sdk | 991b1c2d91adc468480defc23ba790d4369cce7b | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 40.848485 | 95 | 0.775223 |
acd846dd1f365e41268b403eb39e1a57fcece476 | 13,763 | py | Python | ch/cli/run.py | zuiwan/CodingHub-CLI | 9ced732de351412f1fd32b3a5eb67117e42779f6 | [
"Apache-2.0"
] | null | null | null | ch/cli/run.py | zuiwan/CodingHub-CLI | 9ced732de351412f1fd32b3a5eb67117e42779f6 | [
"Apache-2.0"
] | null | null | null | ch/cli/run.py | zuiwan/CodingHub-CLI | 9ced732de351412f1fd32b3a5eb67117e42779f6 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import print_function
import shutil
import click
import sys
from checksumdir import dirhash
try:
from pipes import quote as shell_quote
except ImportError:
from shlex import quote as shell_quote
from tabulate import tabulate
from time import sleep
from ch.cli.utils import (wait... | 38.769014 | 117 | 0.567536 |
c7f400e7edc61e1168d86d42c000d8ad44a1cada | 7,631 | py | Python | examples/pwr_run/checkpointing/final/feedback_v100_only/job69.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/final/feedback_v100_only/job69.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/final/feedback_v100_only/job69.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 32.751073 | 118 | 0.693618 |
d7d2d0cb92d8f12c57b42bf07cdbb0dccf6f70d3 | 8,879 | py | Python | python/ccxt/exmo.py | morgwn-shaw/bttb | a0e8dac53f233f747ad1c50c13a1d4b2d0ca14a5 | [
"MIT"
] | 3 | 2017-11-19T22:08:29.000Z | 2018-02-21T11:14:41.000Z | python/ccxt/exmo.py | morgwn-shaw/bttb | a0e8dac53f233f747ad1c50c13a1d4b2d0ca14a5 | [
"MIT"
] | null | null | null | python/ccxt/exmo.py | morgwn-shaw/bttb | a0e8dac53f233f747ad1c50c13a1d4b2d0ca14a5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
class exmo (Exchange):
def describe(self):
return self.deep_extend(super(exmo, self).describe(), {
'id': 'exmo',
'name': 'EXMO',
'countries': ['ES... | 35.374502 | 126 | 0.463453 |
fdbf5d346c596b15ed39108d549e413e9a296110 | 3,599 | py | Python | pytorch/model.py | ginobilinie/3d-unet | 164978b4421c2196e6066bc5391ace5b83ab2216 | [
"MIT"
] | 1 | 2021-04-14T05:36:55.000Z | 2021-04-14T05:36:55.000Z | pytorch/model.py | ginobilinie/3d-unet | 164978b4421c2196e6066bc5391ace5b83ab2216 | [
"MIT"
] | null | null | null | pytorch/model.py | ginobilinie/3d-unet | 164978b4421c2196e6066bc5391ace5b83ab2216 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class UNet3D(nn.Module):
def __init__(self, in_channel, n_classes):
self.in_channel = in_channel
self.n_classes = n_classes
super(UNet3D, self).__init__()
self.ec0 = self.encoder(self.in_channel, 32, bias=False, batchnorm=False)
self.ec1 =... | 37.103093 | 109 | 0.588497 |
90d876744815401039d9cf87c0c7768941c6a5b9 | 10,740 | py | Python | logic/emails/mailing_list.py | D516-lang/origin-website | 3281a7017cf695cd0eeaca1a641be6ab5014118b | [
"MIT"
] | null | null | null | logic/emails/mailing_list.py | D516-lang/origin-website | 3281a7017cf695cd0eeaca1a641be6ab5014118b | [
"MIT"
] | null | null | null | logic/emails/mailing_list.py | D516-lang/origin-website | 3281a7017cf695cd0eeaca1a641be6ab5014118b | [
"MIT"
] | null | null | null | import json
import re
from config import constants
from config import universal
from database import db, db_common, db_models
from flask import jsonify, flash, redirect
from flask_babel import gettext, Babel, Locale
from logic.emails import email_types
from nameparser import HumanName
import sendgrid
from tools import... | 38.633094 | 221 | 0.618901 |
c17e9d2a317ca03c68369638c14d0db36101a746 | 1,222 | py | Python | hatloads/blocks/windows/__init__.py | YurinDoctrine/HatLoads | adc6fe51368f24a4a0b818138b6afa6e46969ff8 | [
"MIT"
] | 1 | 2022-01-20T12:00:12.000Z | 2022-01-20T12:00:12.000Z | hatloads/blocks/windows/__init__.py | YurinDoctrine/HatLoads | adc6fe51368f24a4a0b818138b6afa6e46969ff8 | [
"MIT"
] | null | null | null | hatloads/blocks/windows/__init__.py | YurinDoctrine/HatLoads | adc6fe51368f24a4a0b818138b6afa6e46969ff8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# MIT License
#
# Copyright (c) 2020-2022 EntySec
#
# 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... | 35.941176 | 80 | 0.754501 |
b90102466efae9d60792a6ca7e5d8cf2539a7c0a | 1,261 | py | Python | setup.py | danimateo/ytmdl | c2f425e3493f414f246cf2c064e6491e8231c7a1 | [
"MIT"
] | null | null | null | setup.py | danimateo/ytmdl | c2f425e3493f414f246cf2c064e6491e8231c7a1 | [
"MIT"
] | null | null | null | setup.py | danimateo/ytmdl | c2f425e3493f414f246cf2c064e6491e8231c7a1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Setup ytmdl."""
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
req_pkgs = [
'youtube_dl',
'mutagen',
'itunespy==1.5.5',
'requests',
'colorama',
'bs4',
'downloader-cli',... | 26.270833 | 54 | 0.528945 |
add4366a1cd4692905bb2459271be6454d4f0d46 | 7,543 | py | Python | banco.py | lcs-amorim/OPE-EasyParty | b3439bf21523d7f3fb19b12283c24f364bf54388 | [
"Apache-2.0"
] | null | null | null | banco.py | lcs-amorim/OPE-EasyParty | b3439bf21523d7f3fb19b12283c24f364bf54388 | [
"Apache-2.0"
] | 4 | 2020-06-05T18:01:15.000Z | 2021-09-07T23:51:04.000Z | banco.py | lcs-amorim/OPE-EasyParty | b3439bf21523d7f3fb19b12283c24f364bf54388 | [
"Apache-2.0"
] | 1 | 2018-10-02T23:45:15.000Z | 2018-10-02T23:45:15.000Z | # This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey has `on_delete` set to the desired behavior.
# * Remove `managed = False` lines if ... | 38.682051 | 129 | 0.713907 |
c26f3248ed5b38c4b1da306d1e4df1b5d90b9e7c | 3,121 | py | Python | app/app/settings.py | stevie38mwenje/recipe | 623038b47844000acee0053dcf3edff69822b1b8 | [
"MIT"
] | null | null | null | app/app/settings.py | stevie38mwenje/recipe | 623038b47844000acee0053dcf3edff69822b1b8 | [
"MIT"
] | null | null | null | app/app/settings.py | stevie38mwenje/recipe | 623038b47844000acee0053dcf3edff69822b1b8 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.0.6.
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/
"""
import os
# Bui... | 25.373984 | 91 | 0.69497 |
47887f3edc2b0b1aa790c3f6c2084fe4076b9ad4 | 7,831 | py | Python | cinder/scheduler/evaluator/evaluator.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/scheduler/evaluator/evaluator.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/scheduler/evaluator/evaluator.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# 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/LICEN... | 26.278523 | 78 | 0.569148 |
b3f711d831c9ff76e549194360d55675424d86f7 | 4,232 | py | Python | src/arch/arm/ArmTLB.py | fusiled/gem5 | 670436b9cd7a23f03c9d7248abb8eb19939c83a6 | [
"BSD-3-Clause"
] | 22 | 2018-07-03T16:46:51.000Z | 2022-03-22T08:29:36.000Z | src/arch/arm/ArmTLB.py | fusiled/gem5 | 670436b9cd7a23f03c9d7248abb8eb19939c83a6 | [
"BSD-3-Clause"
] | 1 | 2022-02-21T07:56:08.000Z | 2022-02-21T07:56:18.000Z | src/arch/arm/ArmTLB.py | fusiled/gem5 | 670436b9cd7a23f03c9d7248abb8eb19939c83a6 | [
"BSD-3-Clause"
] | 25 | 2017-12-02T00:46:04.000Z | 2022-02-18T19:28:53.000Z | # -*- mode:python -*-
# Copyright (c) 2009, 2013, 2015 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware i... | 42.32 | 77 | 0.750709 |
7bfc9ca131c13653d0ed2f1b3ff098871c043914 | 101 | py | Python | wiretap/__init__.py | karthicraghupathi/django_rapyd_wiretap | 9382d6e2e3d719e9635eb6300f0f224c69aee40d | [
"Apache-2.0"
] | null | null | null | wiretap/__init__.py | karthicraghupathi/django_rapyd_wiretap | 9382d6e2e3d719e9635eb6300f0f224c69aee40d | [
"Apache-2.0"
] | null | null | null | wiretap/__init__.py | karthicraghupathi/django_rapyd_wiretap | 9382d6e2e3d719e9635eb6300f0f224c69aee40d | [
"Apache-2.0"
] | 1 | 2022-03-10T15:41:10.000Z | 2022-03-10T15:41:10.000Z | __version__ = "0.0.5"
import logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
| 16.833333 | 61 | 0.782178 |
67e1c641c06f51b8a9f9b4d0adbbc71d4889beb3 | 1,935 | py | Python | gui/invRender.py | C1ffisme/pyopengl-sandbox | 38b07ef50e7642be44a571a8768aa4ac749bde89 | [
"MIT"
] | 4 | 2018-07-03T16:51:17.000Z | 2021-12-10T09:18:56.000Z | gui/invRender.py | C1ffisme/pyopengl-sandbox | 38b07ef50e7642be44a571a8768aa4ac749bde89 | [
"MIT"
] | null | null | null | gui/invRender.py | C1ffisme/pyopengl-sandbox | 38b07ef50e7642be44a571a8768aa4ac749bde89 | [
"MIT"
] | 1 | 2021-12-10T08:47:53.000Z | 2021-12-10T08:47:53.000Z | import numpy
import math
import inventory
def create_inventory(width, height, display, inv=[]):
gui_height = 0.7
gui_width = 0.7
gui_v = numpy.array([-gui_width,-gui_height,0.1, -gui_width, gui_height,0.1, gui_width,-gui_height,0.1, -gui_width,gui_height,0.1, gui_width,-gui_height,0.1, gui_width,gui_height,0.1],... | 37.211538 | 201 | 0.672351 |
745fbbb997cacde727d1f60dda52ee65279e7072 | 61,247 | py | Python | Classclient.py | ehunaj/cl1 | c9054d34177070c2c43d65c4eee553271decbe13 | [
"BSD-3-Clause"
] | null | null | null | Classclient.py | ehunaj/cl1 | c9054d34177070c2c43d65c4eee553271decbe13 | [
"BSD-3-Clause"
] | null | null | null | Classclient.py | ehunaj/cl1 | c9054d34177070c2c43d65c4eee553271decbe13 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Support ===ZNF TEAM BOTZ===
from Dit.linepy import *
from akad.ttypes import *
import time, asyncio, json, threading, codecs, sys, os, re, urllib, requests,subprocess,traceback,random
from Naked.toolshed.shell import execute_js
from bs4 import BeautifulSoup
creator = ["u9d79f5031bc4c73a5054a... | 54.345164 | 182 | 0.401048 |
a1b4029c62a29255d2ffeb829655268b5b2b2d36 | 2,982 | py | Python | tests/mmm/topology/topology-l2gw.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | 1 | 2015-05-19T08:36:55.000Z | 2015-05-19T08:36:55.000Z | tests/mmm/topology/topology-l2gw.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | tests/mmm/topology/topology-l2gw.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Midokura SARL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 39.76 | 81 | 0.632126 |
ff179388bda1ba9636cf07d7367ec22b077dcc6e | 1,317 | py | Python | python_modules/libraries/dagster-dask/setup.py | wingyplus/dagster | 1771b49f58c62141628da6a767516d3dcb9637d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-dask/setup.py | wingyplus/dagster | 1771b49f58c62141628da6a767516d3dcb9637d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-dask/setup.py | wingyplus/dagster | 1771b49f58c62141628da6a767516d3dcb9637d6 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages, setup
def get_version():
version = {}
with open('dagster_dask/version.py') as fp:
exec(fp.read(), version) # pylint: disable=W0122
return version['__version__']
if __name__ == '__main__':
setup(
name='dagster-dask',
version=get_version(... | 30.627907 | 102 | 0.549734 |
19e913d0b17babfa1ed8ae8077b692c2f216a11e | 183 | py | Python | atcoder/abc059/b.py | Ashindustry007/competitive-programming | 2eabd3975c029d235abb7854569593d334acae2f | [
"WTFPL"
] | 506 | 2018-08-22T10:30:38.000Z | 2022-03-31T10:01:49.000Z | atcoder/abc059/b.py | Ashindustry007/competitive-programming | 2eabd3975c029d235abb7854569593d334acae2f | [
"WTFPL"
] | 13 | 2019-08-07T18:31:18.000Z | 2020-12-15T21:54:41.000Z | atcoder/abc059/b.py | Ashindustry007/competitive-programming | 2eabd3975c029d235abb7854569593d334acae2f | [
"WTFPL"
] | 234 | 2018-08-06T17:11:41.000Z | 2022-03-26T10:56:42.000Z | #!/usr/bin/env python3
# https://abc059.contest.atcoder.jp/tasks/abc059_b
a = int(input())
b = int(input())
if a == b: print('EQUAL')
elif a < b: print('LESS')
else: print('GREATER')
| 22.875 | 50 | 0.650273 |
fe4c5bf32ba08eb64a90f40b14f3cc571817c9d6 | 3,755 | py | Python | chapter08/commons/optimizer.py | Myeonghan-Jeong/deep-learning-from-scratch | 0df7f9f352920545f5309e8e11c7cf879ad477e5 | [
"MIT"
] | null | null | null | chapter08/commons/optimizer.py | Myeonghan-Jeong/deep-learning-from-scratch | 0df7f9f352920545f5309e8e11c7cf879ad477e5 | [
"MIT"
] | 3 | 2021-06-08T21:22:11.000Z | 2021-09-08T01:55:11.000Z | chapter08/commons/optimizer.py | myeonghan-nim/deep-learning-from-scratch | fef3e327c49593b5df74728a1cba1144948a2999 | [
"MIT"
] | null | null | null | import numpy as np
class SGD:
def __init__(self, lr=0.01):
self.lr = lr
def update(self, params, grads):
for key in params.keys():
params[key] -= self.lr * grads[key]
class Momentum:
def __init__(self, lr=0.01, momentum=0.9):
self.lr = lr
self.momentum = mome... | 32.37069 | 121 | 0.514514 |
c5ae2e7c2f58bb828c4f607981d72ceef3ac1833 | 852 | py | Python | src/bots/requests_backend/utils.py | lbougan/whale-alert-telegram-bot | 9216512e4fb3e2ad578ca607b9a581f9a62c0c17 | [
"MIT"
] | 1 | 2021-12-10T11:27:37.000Z | 2021-12-10T11:27:37.000Z | src/bots/requests_backend/utils.py | lbougan/whale-alert-telegram-bot | 9216512e4fb3e2ad578ca607b9a581f9a62c0c17 | [
"MIT"
] | null | null | null | src/bots/requests_backend/utils.py | lbougan/whale-alert-telegram-bot | 9216512e4fb3e2ad578ca607b9a581f9a62c0c17 | [
"MIT"
] | 1 | 2022-01-16T09:33:39.000Z | 2022-01-16T09:33:39.000Z | from typing import Dict, Union
from six.moves.urllib import parse as urlparse
def build_url(base_url: str, query_params: Dict[str, Union[str, int]]) -> str:
"""
Adds additional query parameters to the base_url
e.g. build_url('https://example.ch', {'q': 'demo'}) -> https://example.ch?q=demo.
It will al... | 35.5 | 96 | 0.704225 |
b81d9bc767d2caac86adacc782af9a32d502f9da | 19,618 | py | Python | cloudkitty/tests/storage/v2/elasticsearch/test_client.py | stackhpc/cloudkitty | 25149441fb9bf1a5d0b5dd6db81468ca14c2998a | [
"Apache-2.0"
] | null | null | null | cloudkitty/tests/storage/v2/elasticsearch/test_client.py | stackhpc/cloudkitty | 25149441fb9bf1a5d0b5dd6db81468ca14c2998a | [
"Apache-2.0"
] | 1 | 2022-01-20T16:35:22.000Z | 2022-01-20T16:35:22.000Z | cloudkitty/tests/storage/v2/elasticsearch/test_client.py | stackhpc/cloudkitty | 25149441fb9bf1a5d0b5dd6db81468ca14c2998a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Objectif Libre
#
# 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... | 40.616977 | 79 | 0.524569 |
5be2c43ad0a66fe0abbe48f101d8d1f644e8734c | 475 | py | Python | lectures/07-python-dictionaries/examples/char_count1.py | donaldscoon/biosys-analytics | 8d4593277bd701c77ff5c2d5eb3aee7c67ab33a4 | [
"MIT"
] | 1 | 2019-01-15T16:30:25.000Z | 2019-01-15T16:30:25.000Z | lectures/07-python-dictionaries/examples/char_count1.py | donaldscoon/biosys-analytics | 8d4593277bd701c77ff5c2d5eb3aee7c67ab33a4 | [
"MIT"
] | null | null | null | lectures/07-python-dictionaries/examples/char_count1.py | donaldscoon/biosys-analytics | 8d4593277bd701c77ff5c2d5eb3aee7c67ab33a4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Character counter"""
import sys
import os
from collections import Counter
args = sys.argv[1:]
if len(args) != 1:
print('Usage: {} INPUT'.format(os.path.basename(args[0])))
sys.exit(1)
file = args[0]
text = ''
if os.path.isfile(arg):
text = ''.join(open(arg).re... | 18.269231 | 63 | 0.595789 |
960bed93b5f86286d58e0591b45527a8bf17acd6 | 18,159 | py | Python | tests/test_search.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 1,582 | 2015-01-05T02:41:44.000Z | 2022-03-30T20:03:22.000Z | tests/test_search.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 66 | 2015-01-23T07:58:04.000Z | 2021-11-12T02:23:27.000Z | tests/test_search.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 347 | 2015-01-05T07:47:07.000Z | 2021-09-20T21:22:32.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import shutil
import vilya.models.elastic as _el
from nose import SkipTest
from tests.base import TestCase
from tests.utils import delete_project
from vilya.libs.search import code_unittest_client
import vilya.models.elastic.indexer as _index
import vi... | 35.816568 | 79 | 0.63346 |
b3b1e5a5a97551a97e88acd956f19d04b673ba51 | 6,075 | py | Python | ibrnet/sample_ray.py | QiuhongAnnaWei/IBRNet | 6c8b68e6d95eae04535ff0906387ec7899f5d5ce | [
"Apache-2.0"
] | 254 | 2021-02-26T09:08:03.000Z | 2022-03-27T05:09:26.000Z | ibrnet/sample_ray.py | QiuhongAnnaWei/IBRNet | 6c8b68e6d95eae04535ff0906387ec7899f5d5ce | [
"Apache-2.0"
] | 10 | 2021-05-18T15:12:33.000Z | 2022-03-22T01:53:47.000Z | ibrnet/sample_ray.py | QiuhongAnnaWei/IBRNet | 6c8b68e6d95eae04535ff0906387ec7899f5d5ce | [
"Apache-2.0"
] | 35 | 2021-04-13T14:37:14.000Z | 2022-03-13T23:06:59.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.449367 | 120 | 0.569877 |
cf13f9d2eb7378159ff347beb4da214146517d26 | 437 | py | Python | Pacote_download/Sobre Random.py | devluisg1/old_projects_python | a1fabcf154e1c574aa89e60968321d6e7489fdf1 | [
"MIT"
] | null | null | null | Pacote_download/Sobre Random.py | devluisg1/old_projects_python | a1fabcf154e1c574aa89e60968321d6e7489fdf1 | [
"MIT"
] | null | null | null | Pacote_download/Sobre Random.py | devluisg1/old_projects_python | a1fabcf154e1c574aa89e60968321d6e7489fdf1 | [
"MIT"
] | null | null | null | import random
from datetime import date
lista = ['pedra', 'papel', 'tesoura']
escolha = random.choice(lista)
print(escolha)
# MEU TESTE AQUI, NEM É SOBRE RANDOM, É MAIS SOBRE DATETIME
hoje = date.today().year
ano = 2003
atual = date.today().year
lista = []
for c in range(hoje, 2003, - 1):
if c % 4 == 0 and c % 10... | 21.85 | 59 | 0.638444 |
cdc8abf329c7d22422d756e774d8e5c5fe6ff572 | 5,490 | py | Python | setuptools_git_versioning.py | bmiklautz/setuptools-git-versioning | bc7e35002c26cca619c8fbdd2e62c6b065f744d8 | [
"MIT"
] | null | null | null | setuptools_git_versioning.py | bmiklautz/setuptools-git-versioning | bc7e35002c26cca619c8fbdd2e62c6b065f744d8 | [
"MIT"
] | null | null | null | setuptools_git_versioning.py | bmiklautz/setuptools-git-versioning | bc7e35002c26cca619c8fbdd2e62c6b065f744d8 | [
"MIT"
] | null | null | null | import os
import subprocess
from setuptools.dist import Distribution
from distutils.errors import DistutilsSetupError
from typing import List, Optional, Any, Callable
from six.moves import collections_abc
DEFAULT_TEMPLATE = "{tag}" # type: str
DEFAULT_DEV_TEMPLATE = "{tag}.dev{ccount}+git.{sha}" # type: str
DEFAULT... | 30 | 106 | 0.628051 |
2e64e4e2be15524004187158d11414174fcc389d | 918 | py | Python | manage.py | dalmarcogd/test_django_elasticsearch | 9c97857a7f225a87554637fcae405e8c1a03d0f7 | [
"Apache-2.0"
] | null | null | null | manage.py | dalmarcogd/test_django_elasticsearch | 9c97857a7f225a87554637fcae405e8c1a03d0f7 | [
"Apache-2.0"
] | 13 | 2020-06-05T18:26:43.000Z | 2021-06-10T20:36:13.000Z | backend/server_beta/manage.py | dalmarcogd/challenge_ms | 761f0a588b4c309cf6e226d306df3609c1179b4c | [
"MIT"
] | 1 | 2019-04-07T23:42:22.000Z | 2019-04-07T23:42:22.000Z | #!/usr/bin/env python
import os
import sys
try:
import googleclouddebugger
googleclouddebugger.AttachDebugger()
except ImportError:
pass
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "server_beta_project.settings")
try:
from django.core.management import execute_from... | 31.655172 | 83 | 0.665577 |
91fa9f4ec0e69143231ab78cf116e6d4c795db62 | 1,677 | py | Python | source/lambda/active_learning_1p/Output/export_partial.py | awslabs/sagemaker-av-visual-perception | 9956c08bc775b012f1d8c768cc79d8366b5c87f0 | [
"Apache-2.0"
] | 1 | 2021-10-20T15:30:08.000Z | 2021-10-20T15:30:08.000Z | source/lambda/active_learning_1p/Output/export_partial.py | awslabs/sagemaker-av-visual-perception | 9956c08bc775b012f1d8c768cc79d8366b5c87f0 | [
"Apache-2.0"
] | null | null | null | source/lambda/active_learning_1p/Output/export_partial.py | awslabs/sagemaker-av-visual-perception | 9956c08bc775b012f1d8c768cc79d8366b5c87f0 | [
"Apache-2.0"
] | null | null | null | import json
from collections import OrderedDict
from s3_helper import S3Ref, download_stringio, upload
import logging
from io import StringIO
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def merge_manifests(full_input, partial_output):
"""
This method merges the output from partial output manif... | 32.25 | 80 | 0.709004 |
a9f22fcc82b215eb3a7bce2ac3e14ddd29c5a6e6 | 3,073 | py | Python | lambdasoc/sim/blackboxes/serial/wrapper.py | shrine-maiden-heavy-industries/lambdasoc | c81f27e47eec20e46344ce32dfb2590eb2721c83 | [
"BSD-2-Clause"
] | null | null | null | lambdasoc/sim/blackboxes/serial/wrapper.py | shrine-maiden-heavy-industries/lambdasoc | c81f27e47eec20e46344ce32dfb2590eb2721c83 | [
"BSD-2-Clause"
] | null | null | null | lambdasoc/sim/blackboxes/serial/wrapper.py | shrine-maiden-heavy-industries/lambdasoc | c81f27e47eec20e46344ce32dfb2590eb2721c83 | [
"BSD-2-Clause"
] | null | null | null | from amaranth import *
from amaranth.utils import bits_for
__all__ = ["AsyncSerialRX_Blackbox", "AsyncSerialTX_Blackbox", "AsyncSerial_Blackbox"]
class AsyncSerialRX_Blackbox(Elaboratable):
def __init__(self, *, divisor, divisor_bits=None, data_bits=8, parity="none", parent=None):
if parent is not None ... | 34.144444 | 95 | 0.556459 |
e1e3a89e5a3f358c5099625ceda51c9d2088ee23 | 768 | py | Python | Linearmodel-Python.py | atompa/Python_regrex1_script | b04647dc7187062e93022c118199d24fa1809871 | [
"Apache-2.0"
] | null | null | null | Linearmodel-Python.py | atompa/Python_regrex1_script | b04647dc7187062e93022c118199d24fa1809871 | [
"Apache-2.0"
] | null | null | null | Linearmodel-Python.py | atompa/Python_regrex1_script | b04647dc7187062e93022c118199d24fa1809871 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import pandas as pd
import sys
df = pd.read_csv(sys.argv[1])
print (df)
import matplotlib.pyplot as plt
x = df.x
y = df.y
plt.scatter(x,y)
plt.title('Regrex Data')
plt.xlabel('x')
plt.ylabel('y')
plt.show()
plt.savefig('Scatterplot_Python.png')
import numpy as np
f... | 9.721519 | 49 | 0.669271 |
999f90772d6153629012e207830cc57bdfc43e16 | 2,254 | py | Python | pycnc/Operation.py | BbiKkuMi/heekscnc | 7a5dbea079f176c5dbc1e7f83313ff43f8fe5084 | [
"BSD-3-Clause"
] | 107 | 2015-01-13T20:42:11.000Z | 2022-02-12T22:20:50.000Z | pycnc/Operation.py | BbiKkuMi/heekscnc | 7a5dbea079f176c5dbc1e7f83313ff43f8fe5084 | [
"BSD-3-Clause"
] | 31 | 2015-10-03T07:30:54.000Z | 2021-02-09T22:06:28.000Z | pycnc/Operation.py | BbiKkuMi/heekscnc | 7a5dbea079f176c5dbc1e7f83313ff43f8fe5084 | [
"BSD-3-Clause"
] | 55 | 2015-02-17T00:41:47.000Z | 2022-02-14T11:26:46.000Z | from Object import Object
from consts import *
import HeeksCNC
from CNCConfig import CNCConfig
class Operation(Object):
def __init__(self):
Object.__init__(self)
self.active = True
self.comment = ''
self.title = self.TypeName()
self.tool_number = 0
... | 34.151515 | 102 | 0.562112 |
0c32056c1dfd9798240d4e436b9cb7b5937e88e9 | 7,240 | py | Python | src/sage/combinat/ranker.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/ranker.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/ranker.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | 1 | 2020-07-24T12:20:37.000Z | 2020-07-24T12:20:37.000Z | """
Rankers
"""
#*****************************************************************************
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>,
# Nicolas M. Thiery <nthiery at users.sf.net>
# Ported from MuPAD-Combinat (combinat::rankers)
#
# Distributed under the terms of the GNU ... | 25.051903 | 78 | 0.549171 |
7a3051d00f38e0eff75bb168e585010e8a372ed4 | 16,015 | py | Python | camera.py | Xorfor/Camera | 7c60fad8099d3e25d67aaaf0c9755cdd114de024 | [
"MIT"
] | 1 | 2019-09-12T05:14:21.000Z | 2019-09-12T05:14:21.000Z | camera.py | Xorfor/Camera | 7c60fad8099d3e25d67aaaf0c9755cdd114de024 | [
"MIT"
] | null | null | null | camera.py | Xorfor/Camera | 7c60fad8099d3e25d67aaaf0c9755cdd114de024 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ================================================================================
# Based on:
# //github.com/pageauc/pi-timolo
# ================================================================================
# import RPi.GPIO as GPIO
import os
import datetime
import s... | 31.966068 | 110 | 0.510209 |
f1bd8f9fea120a41d0ac1b89ce6d2543d98d1a01 | 3,809 | py | Python | bokeh/command/subcommands/svg.py | DuCorey/bokeh | a88e24f34d40499a4608d01da8d706123350b4e6 | [
"BSD-3-Clause"
] | 1 | 2020-02-06T05:27:53.000Z | 2020-02-06T05:27:53.000Z | bokeh/command/subcommands/svg.py | DuCorey/bokeh | a88e24f34d40499a4608d01da8d706123350b4e6 | [
"BSD-3-Clause"
] | null | null | null | bokeh/command/subcommands/svg.py | DuCorey/bokeh | a88e24f34d40499a4608d01da8d706123350b4e6 | [
"BSD-3-Clause"
] | null | null | null | '''
To generate standalone SVGs for a Bokeh application from a single
Python script, pass the script name to ``bokeh svg`` on the command
line:
.. code-block:: sh
bokeh svg app_script.py
The generated SVGs will be saved in the current working directory with
the name ``app_script.svg``. If there are multiple SVGs... | 29.992126 | 136 | 0.632187 |
874983d5d0b0d4babd2506c1ace1254022b2bf47 | 958 | py | Python | venv/lib/python3.8/site-packages/statsmodels/stats/tests/test_outliers_influence.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 12 | 2018-09-03T14:48:13.000Z | 2021-11-28T13:08:15.000Z | venv/lib/python3.8/site-packages/statsmodels/stats/tests/test_outliers_influence.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 5 | 2022-02-13T14:38:04.000Z | 2022-02-15T00:13:07.000Z | venv/lib/python3.8/site-packages/statsmodels/stats/tests/test_outliers_influence.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 6 | 2018-02-18T12:42:41.000Z | 2020-08-07T10:36:29.000Z | import numpy as np
from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import (
reset_ramsey,
variance_inflation_factor,
)
from statsmodels.tools import add_constant
def test_re... | 33.034483 | 70 | 0.751566 |
d956eae5bfcbf99b8477449a239e06a56103c164 | 62,468 | py | Python | tool/Controllers/CaffeParser.py | HornedSungem/SungemSDK-Python | 5ce5eb7f84654aecf6840de773188f436219559d | [
"Apache-2.0"
] | 14 | 2018-08-16T09:11:39.000Z | 2019-12-07T12:54:32.000Z | tool/Controllers/CaffeParser.py | HornedSungem/SungemSDK-Python | 5ce5eb7f84654aecf6840de773188f436219559d | [
"Apache-2.0"
] | 2 | 2019-08-23T23:31:10.000Z | 2020-06-17T09:21:57.000Z | tool/Controllers/CaffeParser.py | HornedSungem/SungemSDK-Python | 5ce5eb7f84654aecf6840de773188f436219559d | [
"Apache-2.0"
] | 7 | 2018-10-02T01:46:43.000Z | 2021-06-04T19:10:47.000Z | # Copyright 2017 Intel Corporation.
# The source code, information and material ("Material") contained herein is
# owned by Intel Corporation or its suppliers or licensors, and title to such
# Material remains with Intel Corporation or its suppliers or licensors.
# The Material contains proprietary information of Intel... | 43.081379 | 119 | 0.445572 |
cf62f3e5d53a951036b2ae04edaea894a2cc712e | 1,433 | py | Python | setup.py | macklenc/mtnlion | ba2e93faeed3004d344a8c14f37a409da572271d | [
"MIT"
] | null | null | null | setup.py | macklenc/mtnlion | ba2e93faeed3004d344a8c14f37a409da572271d | [
"MIT"
] | 174 | 2018-05-11T13:00:10.000Z | 2021-11-15T17:47:29.000Z | setup.py | macklenc/mtnlion | ba2e93faeed3004d344a8c14f37a409da572271d | [
"MIT"
] | 1 | 2018-05-13T11:11:15.000Z | 2018-05-13T11:11:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import find_packages, setup
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
requirements = ["Click>=6.0", "numpy", "matplotlib", ... | 30.489362 | 117 | 0.675506 |
7f72cd96a94af2b4db800f5947dbbbfd9634035e | 71 | py | Python | sherry/view/digital/__init__.py | py-mu/sherry | af1e95f1eada663ba3b3fb607ca88f099f894f36 | [
"MIT"
] | 1 | 2021-06-27T05:54:23.000Z | 2021-06-27T05:54:23.000Z | sherry/view/digital/__init__.py | py-mu/sherry | af1e95f1eada663ba3b3fb607ca88f099f894f36 | [
"MIT"
] | null | null | null | sherry/view/digital/__init__.py | py-mu/sherry | af1e95f1eada663ba3b3fb607ca88f099f894f36 | [
"MIT"
] | 1 | 2021-07-28T09:00:43.000Z | 2021-07-28T09:00:43.000Z | # coding=utf-8
"""
create by pymu
on 2021/8/12
at 20:35
""" | 11.833333 | 18 | 0.521127 |
2ef293a98bf7b6aa997f0a5080714676031bbf4a | 1,723 | py | Python | modules/push.py | ak-oz007/Beyond-Infinity_Abishek-M-K | b5e5474a6916edf69a88b4462c5694901b50f4c7 | [
"Apache-2.0"
] | null | null | null | modules/push.py | ak-oz007/Beyond-Infinity_Abishek-M-K | b5e5474a6916edf69a88b4462c5694901b50f4c7 | [
"Apache-2.0"
] | null | null | null | modules/push.py | ak-oz007/Beyond-Infinity_Abishek-M-K | b5e5474a6916edf69a88b4462c5694901b50f4c7 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
def push(cap):
# cap = cv2.VideoCapture('D:\\Downloads\\5_1_5.avi')
frame_width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
frame_height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
fourcc = cv2.VideoWriter_fourcc('X', 'V', 'I', 'D')
out = cv2.VideoWriter("output... | 34.46 | 100 | 0.557168 |
fabe536be607b5bb7e09b48ea5c7e45822eec459 | 2,557 | py | Python | codes/model/expert_policy/normal_mlp.py | shagunsodhani/consistent-dynamics | cc1527f2468cdcebea9a57387254278eb5547fe3 | [
"MIT"
] | 8 | 2019-05-06T13:30:57.000Z | 2020-05-25T20:32:47.000Z | codes/model/expert_policy/normal_mlp.py | shagunsodhani/consistent-dynamics | cc1527f2468cdcebea9a57387254278eb5547fe3 | [
"MIT"
] | null | null | null | codes/model/expert_policy/normal_mlp.py | shagunsodhani/consistent-dynamics | cc1527f2468cdcebea9a57387254278eb5547fe3 | [
"MIT"
] | 2 | 2019-05-06T15:11:42.000Z | 2020-03-06T12:36:16.000Z | import os
import numpy as np
import torch
import torch.nn as nn
from torch.distributions import Normal
from codes.model.expert_policy.utils import RunningMeanStd
class NormalMLPPolicy(nn.Module):
def __init__(self, input_size, output_size, hidden_size, num_layers,
nonlinearity=nn.Tanh):
... | 38.742424 | 97 | 0.67501 |
6c74b95a2f66a0a94c4fa75d909cc1024ffa0b68 | 7,021 | py | Python | demos/test_process_dic.py | VibroSim/closure_measurements | 3c5560db85e0e9e276aaccc06c49c63224dbddca | [
"MIT"
] | null | null | null | demos/test_process_dic.py | VibroSim/closure_measurements | 3c5560db85e0e9e276aaccc06c49c63224dbddca | [
"MIT"
] | null | null | null | demos/test_process_dic.py | VibroSim/closure_measurements | 3c5560db85e0e9e276aaccc06c49c63224dbddca | [
"MIT"
] | null | null | null | import sys
import os
import multiprocessing
import numpy as np
from matplotlib import pyplot as pl
from function_as_script import scriptify
from closure_measurements.process_dic import load_dgs
from closure_measurements.process_dic import Calc_CTODs as calc_CTODs_function
from closure_measurements.process_dic impor... | 45.296774 | 491 | 0.79604 |
8f3d209e6c6c2bf39050c221f1b255356ac48559 | 4,943 | py | Python | code/dataloaders/dataset.py | tea321000/SSL4MIS | 8d1b0be08cf089943481a47877b36eb6405fffb2 | [
"MIT"
] | null | null | null | code/dataloaders/dataset.py | tea321000/SSL4MIS | 8d1b0be08cf089943481a47877b36eb6405fffb2 | [
"MIT"
] | null | null | null | code/dataloaders/dataset.py | tea321000/SSL4MIS | 8d1b0be08cf089943481a47877b36eb6405fffb2 | [
"MIT"
] | null | null | null | import os
import cv2
import torch
import random
import numpy as np
from glob import glob
from torch.utils.data import Dataset
import h5py
from scipy.ndimage.interpolation import zoom
import itertools
from scipy import ndimage
from torch.utils.data.sampler import Sampler
class BaseDataSets(Dataset):
def __init__(s... | 30.89375 | 93 | 0.620676 |
2ee5d43f858504b757d728b4741916e1630ef02e | 3,840 | py | Python | ThymeBoost/predict_functions.py | tblume1992/ThymeBoost_old | 52fe4d8b25d1b2b7b92934010d697735cb7b68b4 | [
"MIT"
] | null | null | null | ThymeBoost/predict_functions.py | tblume1992/ThymeBoost_old | 52fe4d8b25d1b2b7b92934010d697735cb7b68b4 | [
"MIT"
] | null | null | null | ThymeBoost/predict_functions.py | tblume1992/ThymeBoost_old | 52fe4d8b25d1b2b7b92934010d697735cb7b68b4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
def predict_trend(booster_obj, boosting_round, forecast_horizon):
"""
Predict the trend component using the booster
Parameters
----------
boosting_round : int
The round to reference when getting model params.
forecast_horizon : ... | 31.219512 | 81 | 0.59375 |
d2d7a3bbdf4c4f00402868f74bd7bf8e6a72eb3c | 10,812 | py | Python | oauth2client/crypt.py | DUYNT/google-api-python-client | 37d60a2da6864ebef5bd83daa4da680e06e08db3 | [
"Apache-2.0"
] | 1 | 2015-05-14T00:06:51.000Z | 2015-05-14T00:06:51.000Z | oauth2client/crypt.py | DUYNT/google-api-python-client | 37d60a2da6864ebef5bd83daa4da680e06e08db3 | [
"Apache-2.0"
] | 1 | 2016-06-23T16:33:52.000Z | 2016-06-23T16:33:52.000Z | oauth2client/crypt.py | DUYNT/google-api-python-client | 37d60a2da6864ebef5bd83daa4da680e06e08db3 | [
"Apache-2.0"
] | 1 | 2020-07-24T20:04:47.000Z | 2020-07-24T20:04:47.000Z | #!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 27.234257 | 80 | 0.661487 |
2c934d65a52053af9a36cfae28b9a50a26a4be7b | 3,527 | py | Python | gis4wrf/plugin/ui/browser_nml_schema.py | XavierCLL/gis4wrf | 686b167d656f5f1835858f1b94de4423091f957c | [
"MIT"
] | 1 | 2018-09-09T16:40:18.000Z | 2018-09-09T16:40:18.000Z | gis4wrf/plugin/ui/browser_nml_schema.py | mostamndi/gis4wrf | 93eb69e5f2e87e9805dcaf8fee05db0228fd81c4 | [
"MIT"
] | null | null | null | gis4wrf/plugin/ui/browser_nml_schema.py | mostamndi/gis4wrf | 93eb69e5f2e87e9805dcaf8fee05db0228fd81c4 | [
"MIT"
] | 1 | 2019-11-10T04:52:35.000Z | 2019-11-10T04:52:35.000Z | from typing import Tuple, Set, Any
from PyQt5.QtWidgets import QTextBrowser
class NmlSchemaBrowser(QTextBrowser):
def __init__(self, nml_schema: dict):
super().__init__()
html, self.anchors = get_schema_html(nml_schema)
# TODO set encoding of help page, e.g. degree symbol appears incorrect... | 41.494118 | 103 | 0.505529 |
9bff0b8a0cf820bd81332f9046c79ea56b29a8f4 | 2,476 | py | Python | froide/foisite/models.py | OpendataCH/froide | 8136bac0d8caa56f9cfc7ba15480be987280e55d | [
"MIT"
] | null | null | null | froide/foisite/models.py | OpendataCH/froide | 8136bac0d8caa56f9cfc7ba15480be987280e55d | [
"MIT"
] | null | null | null | froide/foisite/models.py | OpendataCH/froide | 8136bac0d8caa56f9cfc7ba15480be987280e55d | [
"MIT"
] | null | null | null | import logging
from django.conf import settings
from django.db import models
from django.dispatch import receiver
from django.utils.translation import gettext_lazy as _
logger = logging.getLogger(__name__)
class FoiSite(models.Model):
country_code = models.CharField(_("Country Code"), max_length=5)
country_... | 26.623656 | 81 | 0.623183 |
adf5494c5d195fe63cdc1522ba29c7002769652a | 380 | py | Python | keylog.py | trackmastersteve/keylogger | 3870f32ff44e12206ff343dbf6f6e330ce3909df | [
"MIT"
] | 1 | 2018-10-10T00:41:40.000Z | 2018-10-10T00:41:40.000Z | keylog.py | trackmastersteve/keylogger | 3870f32ff44e12206ff343dbf6f6e330ce3909df | [
"MIT"
] | null | null | null | keylog.py | trackmastersteve/keylogger | 3870f32ff44e12206ff343dbf6f6e330ce3909df | [
"MIT"
] | null | null | null | # keylogger.py
from pynput.keyboard import Key, Listener
import logging
log_dir = ""
logging.basicConfig(filename=(log_dir + "keylog.txt"), level=logging.DEBUG, format='%(asctime)s: %(messages)s:')
def on_press(key):
logging.info(str(key))
#if key == Key.esc:
#return False # Stop listener
with L... | 23.75 | 112 | 0.692105 |
92a62dff0c82d94fc3374f160672012b712e8b43 | 3,837 | py | Python | utils/net_utils.py | isamu-isozaki/hidden-networks | 7dcb96a7de43b65ffde176d771f88b5ecedb84ab | [
"Apache-2.0"
] | 132 | 2019-12-03T19:02:36.000Z | 2022-03-27T15:56:43.000Z | utils/net_utils.py | isamu-isozaki/hidden-networks | 7dcb96a7de43b65ffde176d771f88b5ecedb84ab | [
"Apache-2.0"
] | 9 | 2019-12-05T16:28:33.000Z | 2022-02-21T21:49:13.000Z | utils/net_utils.py | isamu-isozaki/hidden-networks | 7dcb96a7de43b65ffde176d771f88b5ecedb84ab | [
"Apache-2.0"
] | 45 | 2019-12-04T00:11:53.000Z | 2022-03-30T21:07:37.000Z | from functools import partial
import os
import pathlib
import shutil
import math
import torch
import torch.nn as nn
def save_checkpoint(state, is_best, filename="checkpoint.pth", save=False):
filename = pathlib.Path(filename)
if not filename.parent.exists():
os.makedirs(filename.parent)
torch.s... | 27.604317 | 75 | 0.593954 |
9091ee732a1e387a39ab13e63f41e1d4618c9c14 | 3,405 | py | Python | samplecdxjob.py | ikreymer/webarchive-indexing | 2cfe14dbd86be78b3710c98744503f8a34dd76a5 | [
"MIT"
] | 35 | 2015-03-09T23:47:07.000Z | 2021-04-19T11:40:48.000Z | samplecdxjob.py | ikreymer/webarchive-indexing | 2cfe14dbd86be78b3710c98744503f8a34dd76a5 | [
"MIT"
] | 10 | 2015-03-13T01:07:47.000Z | 2018-10-18T15:07:24.000Z | samplecdxjob.py | ikreymer/webarchive-indexing | 2cfe14dbd86be78b3710c98744503f8a34dd76a5 | [
"MIT"
] | 7 | 2015-06-11T16:59:26.000Z | 2017-12-04T12:48:40.000Z | import random
from heapq import heappush, heapreplace
from mrjob.job import MRJob
from mrjob.protocol import RawValueProtocol
#=============================================================================
class SampleCDXJob(MRJob):
""" Sample CDX key space using reservoir sampling
MR algorithm adapted:
h... | 34.744898 | 99 | 0.537445 |
55cbb8568d9993b1c86ec5440d480cfb230386b0 | 5,162 | py | Python | GUI/gui.py | KonstantinosKaratzidis/ActivePlant | 3ae7b5ac9986a7510819753ba93984f59ee060ae | [
"MIT"
] | null | null | null | GUI/gui.py | KonstantinosKaratzidis/ActivePlant | 3ae7b5ac9986a7510819753ba93984f59ee060ae | [
"MIT"
] | null | null | null | GUI/gui.py | KonstantinosKaratzidis/ActivePlant | 3ae7b5ac9986a7510819753ba93984f59ee060ae | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QApplication, QMainWindow
from generated.main_window import Ui_MainWindow
from port_selector import PortSelector
from fatal import FatalMessage
from plant import Plant, import_plants
from proto import PlantConnection, ResponseTimeout
from settings import Settings
import time
from serial impo... | 34.413333 | 87 | 0.691592 |
4ba57fdd5c31312965c809f2cb7510719a78d427 | 5,944 | py | Python | Arbitrage/ArbitrageBot/rebalancing.py | LabMazurokCom/Blockchain | 6f0d8a2ce52434b70e698ce0cc75e46f442daa1c | [
"MIT"
] | 13 | 2018-04-05T11:56:04.000Z | 2021-01-13T02:39:47.000Z | Arbitrage/ArbitrageBot/rebalancing.py | LabMazurokCom/Blockchain | 6f0d8a2ce52434b70e698ce0cc75e46f442daa1c | [
"MIT"
] | 40 | 2018-03-28T14:14:19.000Z | 2018-07-11T12:46:21.000Z | Arbitrage/ArbitrageBot/rebalancing.py | LabMazurokCom/Blockchain | 6f0d8a2ce52434b70e698ce0cc75e46f442daa1c | [
"MIT"
] | 8 | 2018-05-30T19:45:08.000Z | 2021-01-23T14:34:01.000Z | import datetime
import os
File = os.path.basename(__file__)
EPS = 1e-8
def make_orders(order_books, pair, current_balance, need_base, need_quote):
"""
makes orders to rebalance assets
:param order_books: see example at the beginning of this file
:param pair: pair or currencies to balance assets for
... | 34.760234 | 161 | 0.533311 |
5bda013b86910213b9a272609eb95118774b6d52 | 537 | py | Python | wordcount/wcount/views.py | chandansau/wordcount- | 38df4d189ca2a745dde7977fc18518b371935f03 | [
"MIT"
] | null | null | null | wordcount/wcount/views.py | chandansau/wordcount- | 38df4d189ca2a745dde7977fc18518b371935f03 | [
"MIT"
] | null | null | null | wordcount/wcount/views.py | chandansau/wordcount- | 38df4d189ca2a745dde7977fc18518b371935f03 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
def home(request):
return render(request,"home.html")
def count(request):
fulltext=request.GET['fulltext']
wordlist=fulltext.split()
worddictionary= {}
for word in wordlist:
if word in worddictionary:
... | 28.263158 | 124 | 0.659218 |
7c8973b7f4c3f097a06e5e03fdc0dcd276824755 | 5,085 | py | Python | test/Variables/ListVariable.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | 1 | 2019-09-18T06:37:02.000Z | 2019-09-18T06:37:02.000Z | test/Variables/ListVariable.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | test/Variables/ListVariable.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... | 27.93956 | 104 | 0.688496 |
c0a4e1100a7e501be3cf79926dd8ec1c9b4b321d | 851 | py | Python | Tools/Scenarios/merge.py | ErQing/Nova | f33ffa519a0a3115e77a1a2317001858ccde8956 | [
"MIT"
] | 212 | 2020-11-04T19:31:15.000Z | 2022-03-30T14:44:32.000Z | Tools/Scenarios/merge.py | ErQing/Nova | f33ffa519a0a3115e77a1a2317001858ccde8956 | [
"MIT"
] | 6 | 2021-05-26T01:02:26.000Z | 2022-01-28T11:04:53.000Z | Tools/Scenarios/merge.py | ErQing/Nova | f33ffa519a0a3115e77a1a2317001858ccde8956 | [
"MIT"
] | 28 | 2020-11-05T03:05:01.000Z | 2022-03-03T03:30:30.000Z | #!/usr/bin/env python3
import os
in_dir = '../../Assets/Resources/Scenarios/'
template_filename = 'template.txt'
out_filename = 'scenario.txt'
with open(template_filename, 'r', encoding='utf-8') as f_template:
with open(out_filename, 'w', encoding='utf-8', newline='\n') as f_out:
for line in f_template:
... | 37 | 74 | 0.534665 |
9d540fcf3ffd47391a70cffc9d5875aeef46f4ba | 9,631 | py | Python | inceptionV1-OnFire.py | xiaoluo999/fire-detection-cnn | e0d45f78af970be1cb8f935b10f87d2590e01913 | [
"MIT"
] | null | null | null | inceptionV1-OnFire.py | xiaoluo999/fire-detection-cnn | e0d45f78af970be1cb8f935b10f87d2590e01913 | [
"MIT"
] | null | null | null | inceptionV1-OnFire.py | xiaoluo999/fire-detection-cnn | e0d45f78af970be1cb8f935b10f87d2590e01913 | [
"MIT"
] | null | null | null | ################################################################################
# Example : perform live fire detection in video using InceptionV1-OnFire CNN
# Copyright (c) 2017/18 - Andrew Dunnings / Toby Breckon, Durham University, UK
# License : https://github.com/tobybreckon/fire-detection-cnn/blob/master/LICE... | 43.977169 | 161 | 0.649569 |
6f7c6dd24f07d836bfcc4727c3766c7afe0bfdcb | 286 | py | Python | python/ordering_common/ordering_psi4.py | colleeneb/simint-generator | 48125f29612c4a78a2d1493f717d82e4af095c59 | [
"BSD-3-Clause"
] | 20 | 2017-07-04T16:10:22.000Z | 2021-04-19T20:48:44.000Z | python/ordering_common/ordering_psi4.py | colleeneb/simint-generator | 48125f29612c4a78a2d1493f717d82e4af095c59 | [
"BSD-3-Clause"
] | 9 | 2017-03-22T07:57:38.000Z | 2018-12-11T18:48:55.000Z | python/ordering_common/ordering_psi4.py | colleeneb/simint-generator | 48125f29612c4a78a2d1493f717d82e4af095c59 | [
"BSD-3-Clause"
] | 8 | 2017-10-23T23:16:28.000Z | 2021-12-13T17:18:11.000Z | from .gaussian import Gaussian
def IteratePsi4(g):
newg = Gaussian(g.am)
if g.ijk[2] == g.am:
newg.ijk = [-1, -1, -1]
elif g.ijk[2] < (g.am - g.ijk[0]):
newg.ijk = [g.ijk[0], g.ijk[1]-1, g.ijk[2]+1]
else:
newg.ijk = [g.ijk[0]-1, g.am-g.ijk[0]+1, 0]
return newg
| 20.428571 | 49 | 0.538462 |
9e0f1f920377e87997892102de21c8ba512bfb3f | 5,427 | py | Python | drivers/lockInAmp/sr830.py | mv20100/phd_code | 2262c71c7c35aed5759c4b0e058fe74c44e5266b | [
"MIT"
] | null | null | null | drivers/lockInAmp/sr830.py | mv20100/phd_code | 2262c71c7c35aed5759c4b0e058fe74c44e5266b | [
"MIT"
] | null | null | null | drivers/lockInAmp/sr830.py | mv20100/phd_code | 2262c71c7c35aed5759c4b0e058fe74c44e5266b | [
"MIT"
] | null | null | null | import visa
import time
import numpy as np
sensitivities = [2e-9,5e-9,1e-8,2e-8,5e-8,1e-7,2e-7,5e-7,1e-6,2e-6,5e-6,
1e-5,2e-5,5e-5,1e-4,2e-4,5e-4,1e-3,2e-3,5e-3,1e-2,2e-2,5e-2,
1e-1,2e-1,5e-1,1] # in volt
timeConstants = [1e-5,3e-5,1e-4,3e-4,1e-3,3e-3,1e-2,3e-2,0.1,0.3,1,3,10,30,1e2,3e2,1e3,3e3,1e4,3e4]... | 29.335135 | 112 | 0.696149 |
748c875f667303df7dc99fcda1857333081b1eb1 | 5,251 | py | Python | ansible/modules/monitoring/logstash_plugin.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/monitoring/logstash_plugin.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ansible/modules/monitoring/logstash_plugin.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to manage elasticsearch plugins
(c) 2017, Loic Blot <loic.blot@unix-experience.fr>
This file is part of Ansible
Ansible 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 So... | 28.538043 | 106 | 0.655113 |
3c0b2874c8ec9c138eb2bfa36d6845104f7a73f1 | 5,730 | py | Python | examples/csgo_esp.py | zenxs/PyMeow | a7596cb3057225761d2be9aaff69000894b822a0 | [
"MIT"
] | 2 | 2021-09-01T11:39:52.000Z | 2022-01-02T13:35:54.000Z | examples/csgo_esp.py | zenxs/PyMeow | a7596cb3057225761d2be9aaff69000894b822a0 | [
"MIT"
] | null | null | null | examples/csgo_esp.py | zenxs/PyMeow | a7596cb3057225761d2be9aaff69000894b822a0 | [
"MIT"
] | null | null | null | import sys
from pymeow import *
from requests import get
class Offsets:
pass
class Colors:
white = rgb("white")
black = rgb("black")
blue = rgb("blue")
red = rgb("red")
cyan = rgb("cyan")
orange = rgb("orange")
silver = rgb("silver")
class Entity:
def __init__(self, addr, mem, ... | 37.207792 | 95 | 0.460908 |
35e47f6bd27c29eb96181326b9c40866dc06a3f4 | 743 | py | Python | py_wolfram/wapex3.py | JMaio/Askii | 7cc611b470226a7983f85b4788df5884fa5140ed | [
"Apache-2.0"
] | null | null | null | py_wolfram/wapex3.py | JMaio/Askii | 7cc611b470226a7983f85b4788df5884fa5140ed | [
"Apache-2.0"
] | null | null | null | py_wolfram/wapex3.py | JMaio/Askii | 7cc611b470226a7983f85b4788df5884fa5140ed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import wap
server = 'http://api.wolframalpha.com/v2/query.jsp'
appid = 'XXXX'
input = 'pi'
waeo = wap.WolframAlphaEngine(appid, server)
queryStr = waeo.CreateQuery(input)
wap.WolframAlphaQuery(queryStr, appid)
result = waeo.PerformQuery(queryStr)
result = wap.WolframAlph... | 25.62069 | 51 | 0.66891 |
5a354848db3ce6db64424fb17d8f5bf471d55494 | 4,802 | py | Python | tf_agents/policies/fixed_policy.py | Francis777/agents | 24e878a697be418307cfbff69724d86be767719d | [
"Apache-2.0"
] | null | null | null | tf_agents/policies/fixed_policy.py | Francis777/agents | 24e878a697be418307cfbff69724d86be767719d | [
"Apache-2.0"
] | null | null | null | tf_agents/policies/fixed_policy.py | Francis777/agents | 24e878a697be418307cfbff69724d86be767719d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 42.122807 | 109 | 0.702832 |
bdab127d3bdba5e9517e41922671458fb53d8ee0 | 4,224 | py | Python | pdb_rslice.py | edraizen/pdb-tools | b43ef472cb9c53ef58e400888a2ed837512ae7ee | [
"Apache-2.0"
] | null | null | null | pdb_rslice.py | edraizen/pdb-tools | b43ef472cb9c53ef58e400888a2ed837512ae7ee | [
"Apache-2.0"
] | null | null | null | pdb_rslice.py | edraizen/pdb-tools | b43ef472cb9c53ef58e400888a2ed837512ae7ee | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Extracts a portion of the PDB file, from residue i (to residue j).
Slices are inclusive.
usage: python pdb_rslice.py <i>:<j> <pdb file>
examples: python pdb_rslice.py 1:10 1CTF.pdb # Extracts residues 1 to 10
python pdb_rslice.py 1: 1CTF.pdb # Extracts residues 1 to END
p... | 29.333333 | 93 | 0.547112 |
500e3b78597c6bda22c23770a2a96b1bd30f4a4e | 39,893 | py | Python | tensorflow/python/ops/rnn_cell_impl.py | salonirk11/tensorflow | 7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7 | [
"Apache-2.0"
] | 13 | 2017-02-22T02:20:06.000Z | 2018-06-06T04:18:03.000Z | tensorflow/python/ops/rnn_cell_impl.py | salonirk11/tensorflow | 7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7 | [
"Apache-2.0"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | tensorflow/python/ops/rnn_cell_impl.py | salonirk11/tensorflow | 7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7 | [
"Apache-2.0"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.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... | 38.618587 | 80 | 0.67869 |
f3b811259dbb33b3cd8e5587c98111771a606b28 | 1,772 | py | Python | test/test_ezsignfolder_create_object_v2_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsignfolder_create_object_v2_response.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsignfolder_create_object_v2_response.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... | 37.702128 | 118 | 0.813205 |
62213a32f7d6e3af24125276dea70501044d88cb | 5,059 | py | Python | backend/api/python_http_client/kfp_server_api/models/api_pipeline_runtime.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | backend/api/python_http_client/kfp_server_api/models/api_pipeline_runtime.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | backend/api/python_http_client/kfp_server_api/models/api_pipeline_runtime.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # coding: utf-8
"""
Kubeflow Pipelines API
This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.
Contact: kubeflow-pipelines@google.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import s... | 33.503311 | 153 | 0.638268 |
437dc879e8034c5dbe420c44e159c2202a0167bb | 469 | py | Python | env/lib/python3.8/site-packages/plotly/validators/cone/hoverlabel/_bgcolorsrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/cone/hoverlabel/_bgcolorsrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/cone/hoverlabel/_bgcolorsrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="bgcolorsrc", parent_name="cone.hoverlabel", **kwargs
):
super(BgcolorsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_... | 31.266667 | 79 | 0.641791 |
05bd6f2d1b5e9b2f961020bac59b10441bf13da9 | 515 | py | Python | bot.py | Exganza/TelBot-init | aba70d10e2f326cd74943826db7122444d078c0f | [
"MIT"
] | null | null | null | bot.py | Exganza/TelBot-init | aba70d10e2f326cd74943826db7122444d078c0f | [
"MIT"
] | null | null | null | bot.py | Exganza/TelBot-init | aba70d10e2f326cd74943826db7122444d078c0f | [
"MIT"
] | null | null | null | import telebot
import time
# API_TOKEN
bot_token = '*******************************'
bot = telebot.TeleBot(token=bot_token)
@bot.message_handler(commands=['start'])
def send_welcome(message):
pass
@bot.message_handler(commands=['help'])
def send_welcome(message):
pass
# Handle normal messages
@bot.message... | 17.758621 | 59 | 0.642718 |
782f0f859e8e23374f1fdaff5f7ad9a9917ad4a2 | 618 | py | Python | balance/views.py | dagolap/liquidator-backend | 542470db6a0169533f402c9f82ae4d9dd7f47b23 | [
"MIT"
] | null | null | null | balance/views.py | dagolap/liquidator-backend | 542470db6a0169533f402c9f82ae4d9dd7f47b23 | [
"MIT"
] | null | null | null | balance/views.py | dagolap/liquidator-backend | 542470db6a0169533f402c9f82ae4d9dd7f47b23 | [
"MIT"
] | null | null | null | from base.views import RetrieveCreateUpdateDestroyView, ByDateRangeView, RetrieveView
from base.mixins import CompanyFilterMixin
from .models import BankBalance
from .serializers import BankBalanceSerializer
class BankBalanceMixin(CompanyFilterMixin):
lookup_field = 'id'
queryset = BankBalance.objects.all()
... | 26.869565 | 85 | 0.825243 |
71a570895559608007c55310e2ab5afb055181ac | 830 | py | Python | var/spack/repos/builtin/packages/bitmap/package.py | whitfin/spack | aabd2be31a511d0e00c1017f7311a421659319d9 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 3 | 2019-06-27T13:26:50.000Z | 2019-07-01T16:24:54.000Z | var/spack/repos/builtin/packages/bitmap/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | var/spack/repos/builtin/packages/bitmap/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Bitmap(AutotoolsPackage):
"""bitmap, bmtoa, atobm - X bitmap (XBM) editor and converter ut... | 30.740741 | 79 | 0.692771 |
de00015354650ec88b78255ae55907962f625326 | 4,285 | py | Python | trainer_grasp.py | wenbowen123/catgrasp | 4b2f4016fc40e8aad1f157267c460ce333dec7ad | [
"Apache-2.0",
"MIT"
] | 44 | 2022-03-05T00:47:18.000Z | 2022-03-31T11:12:02.000Z | trainer_grasp.py | wenbowen123/catgrasp | 4b2f4016fc40e8aad1f157267c460ce333dec7ad | [
"Apache-2.0",
"MIT"
] | null | null | null | trainer_grasp.py | wenbowen123/catgrasp | 4b2f4016fc40e8aad1f157267c460ce333dec7ad | [
"Apache-2.0",
"MIT"
] | 9 | 2022-03-22T08:02:10.000Z | 2022-03-28T10:49:06.000Z | import os.path
import numpy as np
import os,sys,copy,time,cv2,tqdm
from scipy.signal import convolve2d
code_dir = os.path.dirname(os.path.realpath(__file__))
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.optim.lr_scheduler i... | 36.939655 | 216 | 0.676779 |
0b3c1d04bb9c4412bce6f776ddba306f1328cd5c | 1,182 | py | Python | bin/goodreadsquotes.py | shlomif/fortunes | 41ba7913f1ec208c0d4264610fd78a50ac3cd4f2 | [
"Unlicense"
] | 18 | 2019-07-27T04:49:54.000Z | 2022-02-26T18:23:55.000Z | bin/goodreadsquotes.py | JKirchartz/fortune | 2e32ba0a57e3842dc06c8128d880ab4c8ec3aefc | [
"Unlicense"
] | 2 | 2019-11-07T18:24:11.000Z | 2022-03-17T03:38:26.000Z | bin/goodreadsquotes.py | JKirchartz/fortune | 2e32ba0a57e3842dc06c8128d880ab4c8ec3aefc | [
"Unlicense"
] | 4 | 2020-02-04T18:29:23.000Z | 2021-08-21T17:26:32.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyleft (ↄ) 2016 jkirchartz <me@jkirchartz.com>
#
# Distributed under terms of the NPL (Necessary Public License) license.
"""
Download all quotes from GoodReads by author's quote URL, print in fortune format
usage:
python goodreadsquotes.py ... | 27.488372 | 97 | 0.626058 |
65fa614b9639c7c159e427932bcec9916247ffb9 | 409 | py | Python | tests/test_controller_with_output_template.py | EvgenySmekalin/winter | 24b6a02f958478547a4a120324823743a1f7e1a1 | [
"MIT"
] | 9 | 2019-01-24T11:50:19.000Z | 2019-07-05T07:58:46.000Z | tests/test_controller_with_output_template.py | EvgenySmekalin/winter | 24b6a02f958478547a4a120324823743a1f7e1a1 | [
"MIT"
] | 100 | 2019-01-29T08:11:38.000Z | 2020-04-03T12:00:42.000Z | tests/test_controller_with_output_template.py | EvgenySmekalin/winter | 24b6a02f958478547a4a120324823743a1f7e1a1 | [
"MIT"
] | 8 | 2020-07-16T13:56:50.000Z | 2021-12-27T03:33:23.000Z | from http import HTTPStatus
from rest_framework.test import APIClient
from tests.entities import AuthorizedUser
def test_controller_with_output_template():
client = APIClient()
user = AuthorizedUser()
client.force_authenticate(user)
response = client.get('/with-output-template/?name=John')
ass... | 24.058824 | 61 | 0.755501 |
26ccc12da4dbe6b4fdc02f6df76aa4a1fa4439a2 | 1,064 | py | Python | anim/lv_example_anim_1.py | shownb/lv_mpy_examples_v8 | ae09b2d591ed182f2746274269dade7e6b93a6fe | [
"MIT"
] | 3 | 2021-04-30T10:13:38.000Z | 2021-12-06T05:51:09.000Z | anim/lv_example_anim_1.py | shownb/lv_mpy_examples_v8 | ae09b2d591ed182f2746274269dade7e6b93a6fe | [
"MIT"
] | null | null | null | anim/lv_example_anim_1.py | shownb/lv_mpy_examples_v8 | ae09b2d591ed182f2746274269dade7e6b93a6fe | [
"MIT"
] | 2 | 2021-06-01T15:35:40.000Z | 2021-11-29T21:21:04.000Z | #!/opt/bin/lv_micropython -i
import time
import lvgl as lv
import display_driver
def anim_x_cb(label, v):
label.set_x(v)
def sw_event_cb(e,label):
sw = e.get_target()
if sw.has_state(lv.STATE.CHECKED):
a = lv.anim_t()
a.init()
a.set_var(label)
a.set_values(label.get_x(), ... | 22.638298 | 77 | 0.642857 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.