hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | 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 245 | max_issues_repo_name stringlengths 6 130 | 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 245 | max_forks_repo_name stringlengths 6 130 | 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 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c20635ba12b5e58b04f9f2176a256a231464f9d | 21,757 | py | Python | tests/test_unix.py | dmgolembiowski/uvloop | f0095409f124bcbd4e22082814b2bccb1603eb00 | [
"Apache-2.0",
"MIT"
] | 9,084 | 2016-04-04T10:42:42.000Z | 2022-03-30T22:53:22.000Z | tests/test_unix.py | dmgolembiowski/uvloop | f0095409f124bcbd4e22082814b2bccb1603eb00 | [
"Apache-2.0",
"MIT"
] | 382 | 2016-04-02T19:19:09.000Z | 2022-03-22T08:39:18.000Z | tests/test_unix.py | dmgolembiowski/uvloop | f0095409f124bcbd4e22082814b2bccb1603eb00 | [
"Apache-2.0",
"MIT"
] | 562 | 2016-04-01T19:42:12.000Z | 2022-03-30T22:40:40.000Z | import asyncio
import os
import pathlib
import socket
import tempfile
import time
import unittest
import sys
from uvloop import _testbase as tb
class _TestUnix:
def test_create_unix_server_1(self):
CNT = 0 # number of clients that were successful
TOTAL_CNT = 100 # total number of clie... | 32.184911 | 78 | 0.542906 | import asyncio
import os
import pathlib
import socket
import tempfile
import time
import unittest
import sys
from uvloop import _testbase as tb
class _TestUnix:
def test_create_unix_server_1(self):
CNT = 0
TOTAL_CNT = 100
TIMEOUT = 5.0
async def handle_client(r... | true | true |
1c2065878774e98593804d72bdc95e77b7ffb246 | 2,721 | py | Python | tests/env/packages/env_test_cryptography.py | TerraWilly/foxbms-2 | 62288b333fe6da52deae91f74fb15e71060ac99c | [
"CC-BY-4.0"
] | 1 | 2021-04-11T02:02:28.000Z | 2021-04-11T02:02:28.000Z | tests/env/packages/env_test_cryptography.py | TerraWilly/foxbms-2 | 62288b333fe6da52deae91f74fb15e71060ac99c | [
"CC-BY-4.0"
] | null | null | null | tests/env/packages/env_test_cryptography.py | TerraWilly/foxbms-2 | 62288b333fe6da52deae91f74fb15e71060ac99c | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der
# angewandten Forschung e.V. All rights reserved.
#
# BSD 3-Clause License
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the fol... | 37.791667 | 79 | 0.734656 |
import logging
import argparse
import cryptography
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
"-v",
"--verbosity",
dest="verbosity",
action="count",
default=0,
help="set verbosity level",
)... | true | true |
1c2065d4ed043bcecc46830ff28ead96f52538d1 | 55 | py | Python | test_example.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-machung21 | 5a54a401ea8ab9524445ab13225ab540243550b4 | [
"MIT"
] | 1 | 2018-10-24T18:12:48.000Z | 2018-10-24T18:12:48.000Z | test_example.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-machung21 | 5a54a401ea8ab9524445ab13225ab540243550b4 | [
"MIT"
] | 1 | 2018-10-09T15:56:49.000Z | 2018-10-09T15:56:49.000Z | test_example.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-machung21 | 5a54a401ea8ab9524445ab13225ab540243550b4 | [
"MIT"
] | null | null | null | def test_function():
return True
test_function()
| 9.166667 | 20 | 0.709091 | def test_function():
return True
test_function()
| true | true |
1c2067301d276a0507cfdc2ebebc6bee871a4c74 | 1,897 | py | Python | server/create_new_database.py | tyler-w-medlin/SCoRe | 963ad13b4cc182ea90e272fb3d4d034d784b4e59 | [
"MIT"
] | null | null | null | server/create_new_database.py | tyler-w-medlin/SCoRe | 963ad13b4cc182ea90e272fb3d4d034d784b4e59 | [
"MIT"
] | null | null | null | server/create_new_database.py | tyler-w-medlin/SCoRe | 963ad13b4cc182ea90e272fb3d4d034d784b4e59 | [
"MIT"
] | null | null | null | """
Automation script for creating a new database
Author: Elliott Campbell
"""
from flask_sqlalchemy import SQLAlchemy
from flask import Flask
import os
def ask_name():
return input("Enter name of database ('database' or 'score'): ")
def create_file(file_name):
with open("database/{}.db".format(file_name), ... | 26.71831 | 116 | 0.651555 | from flask_sqlalchemy import SQLAlchemy
from flask import Flask
import os
def ask_name():
return input("Enter name of database ('database' or 'score'): ")
def create_file(file_name):
with open("database/{}.db".format(file_name), "w") as f:
pass
if __name__ == "__main__":
file_name = ask_name()
... | true | true |
1c2067702576b99eadca370ff7fd9a5e24c3de23 | 5,289 | py | Python | chocolate/connection/mongodb.py | yangzhg/chocolate | 1d78cce743c45de3ec8c9b8a5d3628b6c30cb97d | [
"BSD-3-Clause"
] | null | null | null | chocolate/connection/mongodb.py | yangzhg/chocolate | 1d78cce743c45de3ec8c9b8a5d3628b6c30cb97d | [
"BSD-3-Clause"
] | null | null | null | chocolate/connection/mongodb.py | yangzhg/chocolate | 1d78cce743c45de3ec8c9b8a5d3628b6c30cb97d | [
"BSD-3-Clause"
] | null | null | null |
from contextlib import contextmanager
import pickle
import time
try:
from pymongo import MongoClient
except ImportError:
MongoClient = False
from ..base import Connection
class MongoDBConnection(Connection):
"""Connection to a MongoDB database.
Args:
url (str): Full url to the database inc... | 35.26 | 126 | 0.643033 |
from contextlib import contextmanager
import pickle
import time
try:
from pymongo import MongoClient
except ImportError:
MongoClient = False
from ..base import Connection
class MongoDBConnection(Connection):
def __init__(self, url, database="chocolate", result_col="results", complementary_col="compleme... | true | true |
1c2067c12576263eba0891ea0945d9779ae0155d | 3,436 | py | Python | fairseq/criterions/label_smoothed_cross_entropy_attn_loss.py | ToWeRT1An/fairseq | c6d872abeb1afb33c030c39a267d1fd0fe57591a | [
"BSD-3-Clause"
] | null | null | null | fairseq/criterions/label_smoothed_cross_entropy_attn_loss.py | ToWeRT1An/fairseq | c6d872abeb1afb33c030c39a267d1fd0fe57591a | [
"BSD-3-Clause"
] | null | null | null | fairseq/criterions/label_smoothed_cross_entropy_attn_loss.py | ToWeRT1An/fairseq | c6d872abeb1afb33c030c39a267d1fd0fe57591a | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import math
from fairseq import u... | 41.39759 | 103 | 0.637951 |
import math
from fairseq import utils
from . import FairseqCriterion, register_criterion
@register_criterion('label_smoothed_cross_entropy_attn_loss')
class LabelSmoothedCrossEntropyCriterionAttnLoss(FairseqCriterion):
def __init__(self, args, task):
super().__init__(args, task)
self.eps... | true | true |
1c2069452eb24f5a649c3498055dab5e2729929c | 481 | py | Python | tasks/utils/files_saving.py | tzamalisp/tasks_opensource | 73dee9c506c388d6c5b8d65e0d8053320978ce81 | [
"MIT"
] | null | null | null | tasks/utils/files_saving.py | tzamalisp/tasks_opensource | 73dee9c506c388d6c5b8d65e0d8053320978ce81 | [
"MIT"
] | null | null | null | tasks/utils/files_saving.py | tzamalisp/tasks_opensource | 73dee9c506c388d6c5b8d65e0d8053320978ce81 | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
# plot pretty figures
import matplotlib as mpl
mpl.rc('axes', labelsize=14)
mpl.rc('xtick', labelsize=12)
mpl.rc('ytick', labelsize=12)
def save_fig(saving_path, fig_id, tight_layout=True, fig_extension="png", resolution=300):
path = os.path.join(saving_path, fig_id + "."... | 30.0625 | 90 | 0.727651 | import os
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.rc('axes', labelsize=14)
mpl.rc('xtick', labelsize=12)
mpl.rc('ytick', labelsize=12)
def save_fig(saving_path, fig_id, tight_layout=True, fig_extension="png", resolution=300):
path = os.path.join(saving_path, fig_id + "." + fig_extension)
... | true | true |
1c2069723f9ddcf149401ce162a2969445f36965 | 255 | py | Python | geodatacrawl/geodatacrawl/__init__.py | domenicomonaco/adaptive_geo_data_crawl | ea49ee6619c5c5eb6923e97c272f96e033711b65 | [
"BSD-3-Clause"
] | 1 | 2022-03-18T14:30:00.000Z | 2022-03-18T14:30:00.000Z | geodatacrawl/geodatacrawl/__init__.py | domenicomonaco/adaptive_geo_data_crawl | ea49ee6619c5c5eb6923e97c272f96e033711b65 | [
"BSD-3-Clause"
] | null | null | null | geodatacrawl/geodatacrawl/__init__.py | domenicomonaco/adaptive_geo_data_crawl | ea49ee6619c5c5eb6923e97c272f96e033711b65 | [
"BSD-3-Clause"
] | null | null | null | #Adaptive Geolocated-data crawler: intelligent adaptive crawler for Google Place
#Monaco, D. (2019). An adaptive agent for Google Place crawling (No. 934). EasyChair
#3-clause BSD license
#Domenico Monaco, Tecnologie per persone, http://domenicomonaco.it
| 51 | 84 | 0.792157 | true | true | |
1c2069b39d8e20affbdde029a9bfbb780757c59b | 21,176 | py | Python | plugins/modules/oci_waas_http_redirect.py | A7rMtWE57x/oci-ansible-collection | 80548243a085cd53fd5dddaa8135b5cb43612c66 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_waas_http_redirect.py | A7rMtWE57x/oci-ansible-collection | 80548243a085cd53fd5dddaa8135b5cb43612c66 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_waas_http_redirect.py | A7rMtWE57x/oci-ansible-collection | 80548243a085cd53fd5dddaa8135b5cb43612c66 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017, 2020 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 42.779798 | 160 | 0.615225 |
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "1.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = """
---
module: oci_waas_http_redirect
short_description: Manage a HttpRedirect resource in ... | true | true |
1c2069df5eb239146684166a74b8400eb566d595 | 191 | py | Python | recipe/run_test.py | jorisvandenbossche/pyproj-feedstock | 92002323e46fbaceb6ca7623f371409864ab1550 | [
"BSD-3-Clause"
] | null | null | null | recipe/run_test.py | jorisvandenbossche/pyproj-feedstock | 92002323e46fbaceb6ca7623f371409864ab1550 | [
"BSD-3-Clause"
] | null | null | null | recipe/run_test.py | jorisvandenbossche/pyproj-feedstock | 92002323e46fbaceb6ca7623f371409864ab1550 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import pyproj
pyproj.test()
from pyproj import Proj
Proj(init='epsg:4269')
# Test pyproj_datadir.
if not os.path.isdir(pyproj.datadir.get_data_dir()):
sys.exit(1)
| 14.692308 | 52 | 0.743455 | import os
import sys
import pyproj
pyproj.test()
from pyproj import Proj
Proj(init='epsg:4269')
if not os.path.isdir(pyproj.datadir.get_data_dir()):
sys.exit(1)
| true | true |
1c206a4f532322d3dbb7f2a904f68c3807eae01c | 3,546 | py | Python | salt/modules/win_path.py | d--j/salt | 579f900be67a80e1a77674bc6aa21fec836c1c4c | [
"Apache-2.0"
] | 1 | 2019-03-16T12:41:43.000Z | 2019-03-16T12:41:43.000Z | salt/modules/win_path.py | d--j/salt | 579f900be67a80e1a77674bc6aa21fec836c1c4c | [
"Apache-2.0"
] | null | null | null | salt/modules/win_path.py | d--j/salt | 579f900be67a80e1a77674bc6aa21fec836c1c4c | [
"Apache-2.0"
] | null | null | null | '''
Manage the Windows System PATH
Note that not all Windows applications will rehash the PATH environment variable,
Only the ones that listen to the WM_SETTINGCHANGE message
http://support.microsoft.com/kb/104011
'''
# Python Libs
import logging
import re
# Third party libs
try:
import win32gui
import win3... | 23.176471 | 143 | 0.609701 |
import logging
import re
try:
import win32gui
import win32con
HAS_WIN32 = True
except ImportError:
HAS_WIN32 = False
import salt.utils
log = logging.getLogger(__name__)
def __virtual__():
if salt.utils.is_windows() and HAS_WIN32:
return 'win_path'
return False
def _normali... | true | true |
1c206bdb8a500d1efaacb22d49e7b6ba8e334015 | 3,290 | py | Python | CompiladorWeb/settings.py | IngMachine/compiladores | d8cd2cde29af09188037e7627fc63403a322f5c7 | [
"Apache-2.0"
] | null | null | null | CompiladorWeb/settings.py | IngMachine/compiladores | d8cd2cde29af09188037e7627fc63403a322f5c7 | [
"Apache-2.0"
] | null | null | null | CompiladorWeb/settings.py | IngMachine/compiladores | d8cd2cde29af09188037e7627fc63403a322f5c7 | [
"Apache-2.0"
] | null | null | null | """
Django settings for CompiladorWeb project.
Generated by 'django-admin startproject' using Django 2.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import... | 25.703125 | 91 | 0.685106 |
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'q***(^&%^#ebp$7%4tt-fm0-div0&eo!ldl1(l_fqqfj^^3#0h'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.content... | true | true |
1c206c23def64f221f60f42fb16bd08e305f3967 | 13,965 | py | Python | contrib/gitian-build.py | gothcoin/coin | d8812caf6d04884eade5f8d52b556a0282875fa9 | [
"MIT"
] | 2 | 2021-05-16T07:29:34.000Z | 2021-05-17T12:41:48.000Z | contrib/gitian-build.py | gothcoin/coin | d8812caf6d04884eade5f8d52b556a0282875fa9 | [
"MIT"
] | null | null | null | contrib/gitian-build.py | gothcoin/coin | d8812caf6d04884eade5f8d52b556a0282875fa9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
def setup():
global args, workdir
programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget']
if args.kvm:
programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils']
elif args.docker:
dockers = ['docker.io',... | 59.679487 | 237 | 0.658432 |
import argparse
import os
import subprocess
import sys
def setup():
global args, workdir
programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget']
if args.kvm:
programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils']
elif args.docker:
dockers = ['docker.io', 'docker-ce']
... | true | true |
1c206c653b989d5ee15c73b7c501595a8df42f09 | 38,615 | py | Python | tsai/models/layers.py | duyniem/tsai | 18ea05f6077fe011fb9e3f206311abe4c0f3105c | [
"Apache-2.0"
] | null | null | null | tsai/models/layers.py | duyniem/tsai | 18ea05f6077fe011fb9e3f206311abe4c0f3105c | [
"Apache-2.0"
] | null | null | null | tsai/models/layers.py | duyniem/tsai | 18ea05f6077fe011fb9e3f206311abe4c0f3105c | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/100_models.layers.ipynb (unless otherwise specified).
__all__ = ['noop', 'init_lin_zero', 'lin_zero_init', 'SwishBeta', 'same_padding1d', 'Pad1d', 'Conv1dSame',
'same_padding2d', 'Pad2d', 'Conv2dSame', 'Conv2d', 'Chomp1d', 'Conv1dCausal', 'Conv1d', 'SeparableC... | 42.527533 | 160 | 0.654746 |
__all__ = ['noop', 'init_lin_zero', 'lin_zero_init', 'SwishBeta', 'same_padding1d', 'Pad1d', 'Conv1dSame',
'same_padding2d', 'Pad2d', 'Conv2dSame', 'Conv2d', 'Chomp1d', 'Conv1dCausal', 'Conv1d', 'SeparableConv1d',
'AddCoords1d', 'ConvBlock', 'Conv', 'ConvBN', 'ConvIN', 'CoordConv', 'CoordConvBN'... | true | true |
1c206c6dd1e3ff29e36f232695b8ec1ba95d801d | 163 | py | Python | atve/library/core/service.py | TE-ToshiakiTanaka/atve | e6ad4d2343dc9271d173729c2680eddf3d5dd8a6 | [
"MIT"
] | null | null | null | atve/library/core/service.py | TE-ToshiakiTanaka/atve | e6ad4d2343dc9271d173729c2680eddf3d5dd8a6 | [
"MIT"
] | null | null | null | atve/library/core/service.py | TE-ToshiakiTanaka/atve | e6ad4d2343dc9271d173729c2680eddf3d5dd8a6 | [
"MIT"
] | null | null | null | import os
import sys
class Factory(object):
def __init__(self):
pass
def get(self):
return True
NAME = "atve.core"
FACTORY = Factory()
| 11.642857 | 23 | 0.613497 | import os
import sys
class Factory(object):
def __init__(self):
pass
def get(self):
return True
NAME = "atve.core"
FACTORY = Factory()
| true | true |
1c206e5c507e730e0d27f4f8a0edf761fa52b0ab | 18,455 | py | Python | code/rover_fsm.py | yycho0108/RoboND-Rover-Project | df3dd5bf038358aaa1bded6c6c35f983f0f1c522 | [
"MIT"
] | null | null | null | code/rover_fsm.py | yycho0108/RoboND-Rover-Project | df3dd5bf038358aaa1bded6c6c35f983f0f1c522 | [
"MIT"
] | null | null | null | code/rover_fsm.py | yycho0108/RoboND-Rover-Project | df3dd5bf038358aaa1bded6c6c35f983f0f1c522 | [
"MIT"
] | 1 | 2019-01-07T17:41:40.000Z | 2019-01-07T17:41:40.000Z | import numpy as np
import cv2
from astar import AStar2DGrid as AStar, GDist
from utils import score_frontier, normalize_angle
OBS_THRESH = 5
class RoverFSM(object):
""" Simple Rover State Machine """
def __init__(self, rover, state='plan', **sargs):
self._rover = rover
self._state = state
... | 35.696325 | 141 | 0.516608 | import numpy as np
import cv2
from astar import AStar2DGrid as AStar, GDist
from utils import score_frontier, normalize_angle
OBS_THRESH = 5
class RoverFSM(object):
""" Simple Rover State Machine """
def __init__(self, rover, state='plan', **sargs):
self._rover = rover
self._state = state
... | false | true |
1c206f114580143b1c2152f0adfa330f203115e5 | 5,806 | py | Python | tensorflow_gan/examples/progressive_gan/train_main.py | Ankuraxz/gan | b956c7d571539fd1053b3df3dddddbcbd27be65c | [
"Apache-2.0"
] | 2 | 2021-03-29T04:39:29.000Z | 2021-05-14T05:51:40.000Z | tensorflow_gan/examples/progressive_gan/train_main.py | Ankuraxz/gan | b956c7d571539fd1053b3df3dddddbcbd27be65c | [
"Apache-2.0"
] | 2 | 2020-08-18T20:47:45.000Z | 2020-08-19T18:38:39.000Z | tensorflow_gan/examples/progressive_gan/train_main.py | Ankuraxz/gan | b956c7d571539fd1053b3df3dddddbcbd27be65c | [
"Apache-2.0"
] | 1 | 2020-08-18T16:12:39.000Z | 2020-08-18T16:12:39.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow GAN Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 33.560694 | 80 | 0.723906 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
from absl import flags
from absl import logging
import six
import tensorflow.compat.v1 as tf
from tensorflow_gan.examples.progressive_gan import data_provider
from tensorflow_gan.e... | true | true |
1c207038b7d2f8a8ed2393e2679e53ca74d06dfa | 4,767 | py | Python | choi/object_search/video_detection.py | HDNua/kwin | 33ce866c2b37faa1a5940354a0e5b3919e5eecc8 | [
"MIT"
] | 2 | 2017-11-01T12:46:06.000Z | 2017-12-02T04:01:25.000Z | choi/object_search/video_detection.py | HDNua/kwin | 33ce866c2b37faa1a5940354a0e5b3919e5eecc8 | [
"MIT"
] | null | null | null | choi/object_search/video_detection.py | HDNua/kwin | 33ce866c2b37faa1a5940354a0e5b3919e5eecc8 | [
"MIT"
] | null | null | null | """
video recognizer
Developer: HeeJun Choi, DoYoung Han
Version: 0.6.5
Release Date: 2017-01-09
"""
import numpy as np
import cv2
import tensorflow as tf
import sys
from kwin import *
import time
import dataset
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
#################################################... | 29.245399 | 91 | 0.609188 |
import numpy as np
import cv2
import tensorflow as tf
import sys
from kwin import *
import time
import dataset
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
| true | true |
1c2071e822caef925f20740344b77c945b58fd94 | 11,127 | py | Python | python/cuml/test/test_pickle.py | madsbk/cuml | 9584d2ad3ad11b6448eff34478de75bfa5898aca | [
"Apache-2.0"
] | 7 | 2019-02-26T10:41:09.000Z | 2020-06-17T06:08:57.000Z | python/cuml/test/test_pickle.py | danielhanchen/cuml | fab74ca94fdbc5b49281660ce32a48cfd3d66f46 | [
"Apache-2.0"
] | null | null | null | python/cuml/test/test_pickle.py | danielhanchen/cuml | fab74ca94fdbc5b49281660ce32a48cfd3d66f46 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 32.15896 | 78 | 0.725173 |
import pytest
import cuml
from cuml.test.utils import array_equal
import numpy as np
from sklearn.datasets import load_iris
from sklearn.datasets import make_regression
import pickle
from sklearn.manifold.t_sne import trustworthiness
regression_models = dict(
LinearRegression=cuml.LinearRegression()... | true | true |
1c2072996b79987c87b9d943bb478d362f44a977 | 1,889 | py | Python | experiments/karla/diplomski-rad/blade/pb/datasets/n20-racon-hax/finished-experiments/model-n20-mix-pb-racon-hax-5.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | null | null | null | experiments/karla/diplomski-rad/blade/pb/datasets/n20-racon-hax/finished-experiments/model-n20-mix-pb-racon-hax-5.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | null | null | null | experiments/karla/diplomski-rad/blade/pb/datasets/n20-racon-hax/finished-experiments/model-n20-mix-pb-racon-hax-5.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | 1 | 2018-12-23T13:50:29.000Z | 2018-12-23T13:50:29.000Z | from comet_ml import Experiment
experiment = Experiment(api_key="oda8KKpxlDgWmJG5KsYrrhmIV", project_name="consensusnet")
import numpy as np
from keras.models import Model
from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization, Input
from keras.layers import Conv1D, MaxPooling1D, Conv2D, Max... | 33.140351 | 132 | 0.72631 | from comet_ml import Experiment
experiment = Experiment(api_key="oda8KKpxlDgWmJG5KsYrrhmIV", project_name="consensusnet")
import numpy as np
from keras.models import Model
from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization, Input
from keras.layers import Conv1D, MaxPooling1D, Conv2D, Max... | true | true |
1c2073012bc783d250e61d2289fa8347463648bc | 5,471 | py | Python | project_e/users/models.py | effortless-electric/project-e | ae4e8415204319999ee2ecac248e2504ec1fff63 | [
"bzip2-1.0.6"
] | null | null | null | project_e/users/models.py | effortless-electric/project-e | ae4e8415204319999ee2ecac248e2504ec1fff63 | [
"bzip2-1.0.6"
] | 3 | 2020-01-30T03:47:26.000Z | 2021-05-11T00:58:08.000Z | project_e/users/models.py | effortless-electric/project-e | ae4e8415204319999ee2ecac248e2504ec1fff63 | [
"bzip2-1.0.6"
] | null | null | null | from django.db import models
from django.contrib.auth.models import (
AbstractBaseUser, BaseUserManager
)
from django.urls import reverse
from django.core.mail import send_mail
from django.template import Context
from django.template.loader import render_to_string
from allauth.account.utils import user_pk_to_url_s... | 36.966216 | 145 | 0.675562 | from django.db import models
from django.contrib.auth.models import (
AbstractBaseUser, BaseUserManager
)
from django.urls import reverse
from django.core.mail import send_mail
from django.template import Context
from django.template.loader import render_to_string
from allauth.account.utils import user_pk_to_url_s... | true | true |
1c2073429f3120e8c92a483a56edfd11d305adf2 | 827 | py | Python | python/34_find_first_and_last_position_of_element_in_sorted_array.py | Tyler314/leetcode | 53aaee13adfb91ae2f85f2db0208ddd94d81f643 | [
"MIT"
] | null | null | null | python/34_find_first_and_last_position_of_element_in_sorted_array.py | Tyler314/leetcode | 53aaee13adfb91ae2f85f2db0208ddd94d81f643 | [
"MIT"
] | null | null | null | python/34_find_first_and_last_position_of_element_in_sorted_array.py | Tyler314/leetcode | 53aaee13adfb91ae2f85f2db0208ddd94d81f643 | [
"MIT"
] | null | null | null | class Solution:
def searchRange(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
def _binSearch(left, right):
if left > right:
return -1
mid = left + ((right - left) // 2)
if num... | 30.62963 | 50 | 0.422007 | class Solution:
def searchRange(self, nums, target):
def _binSearch(left, right):
if left > right:
return -1
mid = left + ((right - left) // 2)
if nums[mid] == target:
return mid
if nums[mid] > target:
return _bi... | true | true |
1c207369444f69320f1c5295e3aef993c62408fa | 1,225 | py | Python | tools/c7n_azure/tests/test_vmss.py | CliffJumper/cloud-custodian | 47d2f0aa990d2179c8f6764ac53c12720069ddcb | [
"Apache-2.0"
] | null | null | null | tools/c7n_azure/tests/test_vmss.py | CliffJumper/cloud-custodian | 47d2f0aa990d2179c8f6764ac53c12720069ddcb | [
"Apache-2.0"
] | null | null | null | tools/c7n_azure/tests/test_vmss.py | CliffJumper/cloud-custodian | 47d2f0aa990d2179c8f6764ac53c12720069ddcb | [
"Apache-2.0"
] | 1 | 2019-11-06T16:54:06.000Z | 2019-11-06T16:54:06.000Z | # Copyright 2015-2018 Capital One Services, 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 agreed ... | 34.027778 | 82 | 0.651429 |
from __future__ import absolute_import, division, print_function, unicode_literals
from azure_common import BaseTest, arm_template
class VMSSTest(BaseTest):
def setUp(self):
super(VMSSTest, self).setUp()
@arm_template('vmss.json')
def test_find_by_name(self):
p = self.load_p... | true | true |
1c2074dc809402630e33b981b012ae543141cdc9 | 371 | py | Python | src/pypeid/cli.py | FFRI/pypeid | 6e4707cb4632694af71d100513e7e2891bdd9f2a | [
"Apache-2.0"
] | 3 | 2020-05-29T07:45:59.000Z | 2022-01-22T00:06:41.000Z | src/pypeid/cli.py | FFRI/pypeid | 6e4707cb4632694af71d100513e7e2891bdd9f2a | [
"Apache-2.0"
] | 2 | 2020-05-28T08:36:19.000Z | 2020-09-08T04:36:41.000Z | src/pypeid/cli.py | FFRI/pypeid | 6e4707cb4632694af71d100513e7e2891bdd9f2a | [
"Apache-2.0"
] | 1 | 2021-08-20T13:09:49.000Z | 2021-08-20T13:09:49.000Z | def main() -> None:
import sys
from .scanner import PEiDScanner, format_as_katc_peid
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} input_file")
return
peid_scanner = PEiDScanner()
scan_result = peid_scanner.scan_file(sys.argv[1])
print(format_as_katc_peid(scan_res... | 24.733333 | 58 | 0.633423 | def main() -> None:
import sys
from .scanner import PEiDScanner, format_as_katc_peid
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} input_file")
return
peid_scanner = PEiDScanner()
scan_result = peid_scanner.scan_file(sys.argv[1])
print(format_as_katc_peid(scan_res... | true | true |
1c20764c97e676b9bf67593336712045883ca91b | 2,803 | py | Python | samples/cli/accelbyte_py_sdk_cli/platform/_apply_user_redemption.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | samples/cli/accelbyte_py_sdk_cli/platform/_apply_user_redemption.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | samples/cli/accelbyte_py_sdk_cli/platform/_apply_user_redemption.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template_file: python-cli-command.j2
# justice-platform-service (4.10.0)
# pylint: disable=duplicate-co... | 33.369048 | 97 | 0.730289 |
import json
import yaml
from typing import Optional
import click
from .._utils import login_as as login_as_internal
from .._utils import to_dict
from accelbyte_py_sdk.api.platform import apply_user_redemption as apply_user_redemption_internal
from accelbyte_py_sdk.api.platform.models import Er... | true | true |
1c2076647591fc9f76f3fa4aff96932a2e6bc527 | 1,267 | py | Python | mocket/compat.py | thedrow/python-mocket | 0febd284c906ec737c21a5f67bd35f16aabc8245 | [
"BSD-3-Clause"
] | 1 | 2019-04-11T15:39:32.000Z | 2019-04-11T15:39:32.000Z | mocket/compat.py | thedrow/python-mocket | 0febd284c906ec737c21a5f67bd35f16aabc8245 | [
"BSD-3-Clause"
] | null | null | null | mocket/compat.py | thedrow/python-mocket | 0febd284c906ec737c21a5f67bd35f16aabc8245 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import shlex
import six
encoding = os.getenv("MOCKET_ENCODING", 'utf-8')
text_type = six.text_type
byte_type = six.binary_type
basestring = six.string_types
PY2 = sys.version_info[0] == 2
if PY2:
from BaseHTTPServer import BaseHTTPRequestHandler
from urlparse import urlsplit, parse_qs, ... | 22.22807 | 72 | 0.684294 | import os
import sys
import shlex
import six
encoding = os.getenv("MOCKET_ENCODING", 'utf-8')
text_type = six.text_type
byte_type = six.binary_type
basestring = six.string_types
PY2 = sys.version_info[0] == 2
if PY2:
from BaseHTTPServer import BaseHTTPRequestHandler
from urlparse import urlsplit, parse_qs, ... | true | true |
1c2076a0e82cadd18b0d14d345adf961d063a2a0 | 11,471 | py | Python | easy_efficientdet/factory.py | waldemarmeier/easy-efficientdet | 1329f497fdfd0542ee0db074020c4db351b1aa57 | [
"Apache-2.0"
] | null | null | null | easy_efficientdet/factory.py | waldemarmeier/easy-efficientdet | 1329f497fdfd0542ee0db074020c4db351b1aa57 | [
"Apache-2.0"
] | null | null | null | easy_efficientdet/factory.py | waldemarmeier/easy-efficientdet | 1329f497fdfd0542ee0db074020c4db351b1aa57 | [
"Apache-2.0"
] | null | null | null | import json
import traceback
from inspect import isgeneratorfunction
from typing import Optional, Sequence, Tuple, Union
import tensorflow as tf
from easy_efficientdet._third_party.training import CosineLrSchedule
from easy_efficientdet.anchors import generate_anchor_boxes
from easy_efficientdet.config import ObjectD... | 41.561594 | 88 | 0.609014 | import json
import traceback
from inspect import isgeneratorfunction
from typing import Optional, Sequence, Tuple, Union
import tensorflow as tf
from easy_efficientdet._third_party.training import CosineLrSchedule
from easy_efficientdet.anchors import generate_anchor_boxes
from easy_efficientdet.config import ObjectD... | true | true |
1c2078247feb58c025d720b76cc3ab5cb5b06fbe | 313 | py | Python | readme/tests/test_use_user_dict.py | howl-anderson/MicroTokenizer | f0ad19ee42fc947f432dfcbe687a474ccc78c7c8 | [
"MIT"
] | 136 | 2018-06-12T14:30:05.000Z | 2022-03-25T09:50:33.000Z | readme/tests/test_use_user_dict.py | howl-anderson/MicroTokenizer | f0ad19ee42fc947f432dfcbe687a474ccc78c7c8 | [
"MIT"
] | 5 | 2018-06-19T05:21:09.000Z | 2021-07-16T13:41:00.000Z | readme/tests/test_use_user_dict.py | howl-anderson/MicroTokenizer | f0ad19ee42fc947f432dfcbe687a474ccc78c7c8 | [
"MIT"
] | 16 | 2018-09-19T13:33:42.000Z | 2021-06-02T03:30:31.000Z | def test_main(datadir):
import MicroTokenizer
tokens = MicroTokenizer.cut("「杭研」正确应该不会被切开", HMM=False)
print(tokens)
# loading user's custom dictionary file
MicroTokenizer.load_userdict(datadir / 'user_dict.txt')
tokens = MicroTokenizer.cut("「杭研」正确应该不会被切开", HMM=False)
print(tokens)
| 26.083333 | 59 | 0.71246 | def test_main(datadir):
import MicroTokenizer
tokens = MicroTokenizer.cut("「杭研」正确应该不会被切开", HMM=False)
print(tokens)
MicroTokenizer.load_userdict(datadir / 'user_dict.txt')
tokens = MicroTokenizer.cut("「杭研」正确应该不会被切开", HMM=False)
print(tokens)
| true | true |
1c2078b2d90dbe2fbf7033db40b5e91cdba7cb1d | 2,397 | py | Python | housing/ModelChecking.py | namiwa/QFHousing | cbe65902ee42e1c0be09f4d5e255bcf2b404ef6a | [
"MIT"
] | null | null | null | housing/ModelChecking.py | namiwa/QFHousing | cbe65902ee42e1c0be09f4d5e255bcf2b404ef6a | [
"MIT"
] | null | null | null | housing/ModelChecking.py | namiwa/QFHousing | cbe65902ee42e1c0be09f4d5e255bcf2b404ef6a | [
"MIT"
] | null | null | null | import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import statsmodels.api as sm
from scipy import stats
from housing.ML import ML_Model
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import Lasso, BayesianRidge
def statistical_plots(fitted_y, y):
... | 31.539474 | 82 | 0.648728 | import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import statsmodels.api as sm
from scipy import stats
from housing.ML import ML_Model
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import Lasso, BayesianRidge
def statistical_plots(fitted_y, y):
... | true | true |
1c2078fc0b262100b33f2093d9ecadcbc2ba115c | 1,688 | py | Python | util/writefeaturevectorVOC2010.py | ashish-code/structured-sparsity-visual-classification | 49e7bd24dab8d4f6e5b012ab333c6012e7404b84 | [
"MIT"
] | null | null | null | util/writefeaturevectorVOC2010.py | ashish-code/structured-sparsity-visual-classification | 49e7bd24dab8d4f6e5b012ab333c6012e7404b84 | [
"MIT"
] | null | null | null | util/writefeaturevectorVOC2010.py | ashish-code/structured-sparsity-visual-classification | 49e7bd24dab8d4f6e5b012ab333c6012e7404b84 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# writefeaturevectorVOC2010.py
#
import os
import string
import numpy as np
import csv
def main():
rootDir = '/vol/vssp/diplecs/ash/Data/'
dataSets = ['VOC2010']
imageSets = '/ImageSets/Main/'
outDir = '/FeatureMatrix/'
inDir = '/Feature/'
ftype = '.s... | 32.461538 | 76 | 0.677133 |
import os
import string
import numpy as np
import csv
def main():
rootDir = '/vol/vssp/diplecs/ash/Data/'
dataSets = ['VOC2010']
imageSets = '/ImageSets/Main/'
outDir = '/FeatureMatrix/'
inDir = '/Feature/'
ftype = '.sift'
for dataset in dataSets:
fcatid=rootDir+dataset+'/'+'catidlist.txt'
catnames=... | true | true |
1c20793d27129c5dce7f6e9de39bd4f1fa78719d | 7,155 | py | Python | electrum_dash/plugins/ledger/auth2fa.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | 51 | 2018-01-09T01:44:49.000Z | 2022-02-22T13:28:43.000Z | electrum_dash/plugins/ledger/auth2fa.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | 152 | 2017-07-11T16:24:56.000Z | 2022-03-21T13:29:39.000Z | electrum_dash/plugins/ledger/auth2fa.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | 67 | 2018-01-11T23:54:50.000Z | 2022-03-29T21:59:23.000Z | import copy
from typing import TYPE_CHECKING
from PyQt5.QtWidgets import (QDialog, QLineEdit, QTextEdit, QVBoxLayout, QLabel,
QWidget, QHBoxLayout, QComboBox)
from btchip.btchip import BTChipException
from electrum_dash.gui.qt.util import PasswordLineEdit
from electrum_dash.i18n import ... | 42.337278 | 157 | 0.613138 | import copy
from typing import TYPE_CHECKING
from PyQt5.QtWidgets import (QDialog, QLineEdit, QTextEdit, QVBoxLayout, QLabel,
QWidget, QHBoxLayout, QComboBox)
from btchip.btchip import BTChipException
from electrum_dash.gui.qt.util import PasswordLineEdit
from electrum_dash.i18n import ... | true | true |
1c2079fc2ebc07e19224e604cd4397fc2401fa2f | 832 | py | Python | demo.py | lanp74/emass-py | 9c2ef4d514d6062b0414b629594420588cf7b6b9 | [
"MIT"
] | 4 | 2021-03-22T10:31:02.000Z | 2021-11-29T11:10:58.000Z | demo.py | lanp74/emass-py | 9c2ef4d514d6062b0414b629594420588cf7b6b9 | [
"MIT"
] | null | null | null | demo.py | lanp74/emass-py | 9c2ef4d514d6062b0414b629594420588cf7b6b9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys, getopt
from emass.emass import EMass
def main(argv):
formula = argv[1]
limit = 0
charge = 0
try:
opts, args = getopt.getopt(argv[2:], "hl:c:")
except getopt.GetoptError:
print("demo.py -l <limit> -c <charge>")
sys.exit(... | 23.111111 | 83 | 0.524038 |
import sys, getopt
from emass.emass import EMass
def main(argv):
formula = argv[1]
limit = 0
charge = 0
try:
opts, args = getopt.getopt(argv[2:], "hl:c:")
except getopt.GetoptError:
print("demo.py -l <limit> -c <charge>")
sys.exit(2)
for opt, arg in opts:
... | true | true |
1c207aa2bd0d4c7958414b1c78bc506a316e49c3 | 2,185 | py | Python | bin/zinc_cayman_closeness2.py | samgoldman97/kinase-cpi-reanalysis | e45e055280b51abee95e2d15da91577a913328f2 | [
"MIT"
] | 19 | 2020-09-28T06:05:17.000Z | 2022-03-24T22:27:19.000Z | bin/zinc_cayman_closeness2.py | samgoldman97/kinase-cpi-reanalysis | e45e055280b51abee95e2d15da91577a913328f2 | [
"MIT"
] | 3 | 2020-11-24T15:52:17.000Z | 2022-02-09T23:53:47.000Z | bin/zinc_cayman_closeness2.py | brianhie/uncertainty | 2a9dd1966632abefa94ecf4c5cf33020cca9d903 | [
"MIT"
] | 7 | 2020-08-31T01:46:57.000Z | 2022-02-26T00:58:59.000Z | from itertools import combinations
from rdkit import Chem
from rdkit.Chem.AllChem import GetMorganFingerprintAsBitVect
from rdkit.Chem.Descriptors import ExactMolWt
from rdkit.Chem.GraphDescriptors import BalabanJ, BertzCT
from rdkit.DataStructs import FingerprintSimilarity
import numpy as np
import sys
if __name__ ==... | 35.241935 | 71 | 0.566133 | from itertools import combinations
from rdkit import Chem
from rdkit.Chem.AllChem import GetMorganFingerprintAsBitVect
from rdkit.Chem.Descriptors import ExactMolWt
from rdkit.Chem.GraphDescriptors import BalabanJ, BertzCT
from rdkit.DataStructs import FingerprintSimilarity
import numpy as np
import sys
if __name__ ==... | true | true |
1c207bda35f8cb56cf6a84676f7e4f0e3868f1f0 | 437 | py | Python | src/game/visualisation/visualisation_statics.py | IvanRoblesMunoz/hungry_geese_game | 806454bbd1178f214ceae51ea9724faffbb13396 | [
"MIT"
] | 1 | 2021-12-04T13:11:07.000Z | 2021-12-04T13:11:07.000Z | src/game/visualisation/visualisation_statics.py | IvanRoblesMunoz/hungry_geese_game | 806454bbd1178f214ceae51ea9724faffbb13396 | [
"MIT"
] | null | null | null | src/game/visualisation/visualisation_statics.py | IvanRoblesMunoz/hungry_geese_game | 806454bbd1178f214ceae51ea9724faffbb13396 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 28 18:03:50 2021
@author: roblesi
Statics for visualisation.
"""
# =============================================================================
# Grid possition
# =============================================================================
START... | 23 | 79 | 0.405034 |
START_HEIGHT = 150 * 0.75 + 10
START_WIDTH = 50 * 0.75 + 10
WIDTH_STEP = 64 * 0.75 + 2.35
HEIGHT_STEP = 64 * 0.75 + 2.35
| true | true |
1c207c74ce3740f53f4cfb001de9bffad08ae3bf | 2,995 | py | Python | io_scene_niftools/operators/kf_import_op.py | ZtModArchive/blender_niftools_addon | fc28f567e1fa431ec6633cb2a138898136090b29 | [
"BSD-3-Clause"
] | 94 | 2020-11-06T15:06:20.000Z | 2022-03-25T05:58:10.000Z | io_scene_niftools/operators/kf_import_op.py | ZtModArchive/blender_niftools_addon | fc28f567e1fa431ec6633cb2a138898136090b29 | [
"BSD-3-Clause"
] | 97 | 2020-11-02T19:15:47.000Z | 2022-03-30T16:23:17.000Z | io_scene_niftools/operators/kf_import_op.py | ZtModArchive/blender_niftools_addon | fc28f567e1fa431ec6633cb2a138898136090b29 | [
"BSD-3-Clause"
] | 23 | 2020-11-29T17:51:15.000Z | 2022-03-30T19:31:29.000Z | """Blender Niftools Addon Main Import operators, function called through Import Menu"""
# ***** BEGIN LICENSE BLOCK *****
#
# Copyright © 2019, NIF File Format Library and Tools contributors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted p... | 36.975309 | 90 | 0.751586 |
import bpy
from bpy.types import Operator, PropertyGroup
from bpy_extras.io_utils import ImportHelper
from io_scene_niftools.kf_import import KfImport
from io_scene_niftools.operators.common_op import CommonDevOperator, CommonScale, CommonKf
from io_scene_niftools.utils.decorators... | true | true |
1c207c882b329dc261224eab7ca0fdf770815197 | 1,489 | py | Python | home/models.py | Reekomer/kpis | 02d346378da8646122604f6b178c7853bdaf9eed | [
"MIT"
] | null | null | null | home/models.py | Reekomer/kpis | 02d346378da8646122604f6b178c7853bdaf9eed | [
"MIT"
] | null | null | null | home/models.py | Reekomer/kpis | 02d346378da8646122604f6b178c7853bdaf9eed | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
# Create your models here.
@python_2_unicode_compatible
class Stoyo(models.Model):
datepub = models.DateField(max_length=30)
page_name = models.CharField(max_length=100)
title = models.CharField(max_length=100)
link = m... | 35.452381 | 61 | 0.770987 | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Stoyo(models.Model):
datepub = models.DateField(max_length=30)
page_name = models.CharField(max_length=100)
title = models.CharField(max_length=100)
link = models.CharField(max_length... | true | true |
1c207cee11fc5806ab3a56216a4e5728e8f0255f | 307 | py | Python | backend-project/small_eod/events/filterset.py | WlodzimierzKorza/small_eod | 027022bd71122a949a2787d0fb86518df80e48cd | [
"MIT"
] | 64 | 2019-12-30T11:24:03.000Z | 2021-06-24T01:04:56.000Z | backend-project/small_eod/events/filterset.py | WlodzimierzKorza/small_eod | 027022bd71122a949a2787d0fb86518df80e48cd | [
"MIT"
] | 465 | 2018-06-13T21:43:43.000Z | 2022-01-04T23:33:56.000Z | backend-project/small_eod/events/filterset.py | WlodzimierzKorza/small_eod | 027022bd71122a949a2787d0fb86518df80e48cd | [
"MIT"
] | 72 | 2018-12-02T19:47:03.000Z | 2022-01-04T22:54:49.000Z | from django_filters.filterset import FilterSet
from ..search.filter import SearchFilter
from .models import Event
from .searchset import EventSearchSet
class EventFilterSet(FilterSet):
query = SearchFilter(searchset=EventSearchSet())
class Meta:
model = Event
fields = ["query"]
| 21.928571 | 52 | 0.742671 | from django_filters.filterset import FilterSet
from ..search.filter import SearchFilter
from .models import Event
from .searchset import EventSearchSet
class EventFilterSet(FilterSet):
query = SearchFilter(searchset=EventSearchSet())
class Meta:
model = Event
fields = ["query"]
| true | true |
1c207cff443eec03d0ea6300a73819a082378e22 | 15,213 | py | Python | pyserverforindy/grpc_server/did_service.py | OBrezhniev/miu | 8463c1821c1be7d3362b2e1f948163dcbd7c12a0 | [
"Apache-2.0"
] | 9 | 2019-08-03T16:51:23.000Z | 2022-03-05T21:45:11.000Z | pyserverforindy/grpc_server/did_service.py | vladyslavmunin/miu | db3e89e966223e1a508bf7cfb576573deb7406e7 | [
"Apache-2.0"
] | 20 | 2019-09-29T16:20:41.000Z | 2020-04-19T07:53:42.000Z | pyserverforindy/grpc_server/did_service.py | vladyslavmunin/miu | db3e89e966223e1a508bf7cfb576573deb7406e7 | [
"Apache-2.0"
] | 4 | 2019-08-04T16:54:24.000Z | 2020-03-20T09:18:17.000Z | import os
import json
import sys
from indy import did as indy_did, IndyError
from indy.error import ErrorCode
from grpc import StatusCode
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.abspath(ROOT_DIR+'/identityLayer'))
sys.path.append(os.path.abspath(ROOT_DIR))
from... | 42.376045 | 126 | 0.647867 | import os
import json
import sys
from indy import did as indy_did, IndyError
from indy.error import ErrorCode
from grpc import StatusCode
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.abspath(ROOT_DIR+'/identityLayer'))
sys.path.append(os.path.abspath(ROOT_DIR))
from... | true | true |
1c207dad3931de39605bcf7066cad08606f16e76 | 487 | py | Python | restaurant/src/products/migrations/0019_auto_20200910_1011.py | isaac1998sm/MyFinalProject | 1fd23b08998627e7f8f9d46017b6eed8049293df | [
"MIT"
] | null | null | null | restaurant/src/products/migrations/0019_auto_20200910_1011.py | isaac1998sm/MyFinalProject | 1fd23b08998627e7f8f9d46017b6eed8049293df | [
"MIT"
] | null | null | null | restaurant/src/products/migrations/0019_auto_20200910_1011.py | isaac1998sm/MyFinalProject | 1fd23b08998627e7f8f9d46017b6eed8049293df | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2020-09-10 17:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0018_auto_20200903_1009'),
]
operations = [
migrations.AlterFi... | 23.190476 | 84 | 0.63039 |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0018_auto_20200903_1009'),
]
operations = [
migrations.AlterField(
model_name='product',
name='price',
... | true | true |
1c207ed6c47c3570b1da22f4342dac1efb3e843a | 5,985 | py | Python | api/rt_data_processing.py | istiakshihab/api-covid19-rt-bd | 10d059bb28b7955ddac3c77a52376ee7bc5900a9 | [
"MIT"
] | null | null | null | api/rt_data_processing.py | istiakshihab/api-covid19-rt-bd | 10d059bb28b7955ddac3c77a52376ee7bc5900a9 | [
"MIT"
] | 3 | 2021-04-08T21:11:45.000Z | 2021-09-22T19:19:47.000Z | api/rt_data_processing.py | istiakshihab/api-covid19-rt-bd | 10d059bb28b7955ddac3c77a52376ee7bc5900a9 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from scipy import stats as sps
def prepare_cases(cases, cutoff=5):
new_cases = cases.diff()
smoothed = new_cases.rolling(7,
win_type='gaussian',
min_periods=1,
center=True).mean(std=2).round()
idx_start = np.searchsorted(smoothed, cutoff)... | 46.757813 | 788 | 0.66015 | import pandas as pd
import numpy as np
from scipy import stats as sps
def prepare_cases(cases, cutoff=5):
new_cases = cases.diff()
smoothed = new_cases.rolling(7,
win_type='gaussian',
min_periods=1,
center=True).mean(std=2).round()
idx_start = np.searchsorted(smoothed, cutoff)... | true | true |
1c207f74c4e7cb1df9035e27df4cb9308be44cb9 | 2,066 | py | Python | src/cc_catalog_airflow/dags/common_api_workflows.py | gauravahlawat81/cccatalog | cabfa11c4e1d68c66390ed46649282b7d33e2c58 | [
"MIT"
] | 65 | 2018-05-25T00:47:18.000Z | 2021-11-30T05:58:43.000Z | src/cc_catalog_airflow/dags/common_api_workflows.py | cc-archive/cccatalog | bc95ccc159ed7f1444d44e1db08d9a11a16c6d12 | [
"MIT"
] | 463 | 2018-05-01T14:35:42.000Z | 2021-06-11T20:32:50.000Z | src/cc_catalog_airflow/dags/common_api_workflows.py | cc-archive/cccatalog | bc95ccc159ed7f1444d44e1db08d9a11a16c6d12 | [
"MIT"
] | 81 | 2018-05-05T20:33:12.000Z | 2021-04-28T02:23:10.000Z | import logging
import os
from airflow import DAG
from croniter import croniter
import util.config as conf
from util.operator_util import get_runner_operator, get_log_operator
logging.basicConfig(
format='%(asctime)s: [%(levelname)s - DAG Loader] %(message)s',
level=logging.INFO)
CRONTAB_STR = conf.CRONTAB_S... | 25.506173 | 79 | 0.666989 | import logging
import os
from airflow import DAG
from croniter import croniter
import util.config as conf
from util.operator_util import get_runner_operator, get_log_operator
logging.basicConfig(
format='%(asctime)s: [%(levelname)s - DAG Loader] %(message)s',
level=logging.INFO)
CRONTAB_STR = conf.CRONTAB_S... | true | true |
1c20810a71f186987df424dc7ab4706e509950bb | 2,397 | py | Python | base16/base16-greenscreen.py | memeplex/base16-prompt-toolkit | 8a52f886005eb1fa005fd65a2c4b1a680a1f1d91 | [
"MIT"
] | 12 | 2017-02-27T02:03:20.000Z | 2021-04-12T08:56:46.000Z | base16/base16-greenscreen.py | memeplex/base16-prompt-toolkit | 8a52f886005eb1fa005fd65a2c4b1a680a1f1d91 | [
"MIT"
] | 6 | 2017-02-27T19:09:13.000Z | 2020-12-18T10:47:30.000Z | base16/base16-greenscreen.py | memeplex/base16-prompt-toolkit | 8a52f886005eb1fa005fd65a2c4b1a680a1f1d91 | [
"MIT"
] | 8 | 2018-02-08T12:49:27.000Z | 2021-12-21T12:58:27.000Z | # -*- coding: utf-8 -*-
# base16-prompt-toolkit (https://github.com/memeplex/base16-prompt-toolkit)
# Base16 Prompt Toolkit template by Carlos Pita (carlosjosepita@gmail.com
# Green Screen scheme by Chris Kempson (http://chriskempson.com)
from prompt_toolkit.terminal.vt100_output import _256_colors
from pygments.styl... | 30.730769 | 109 | 0.668335 |
from prompt_toolkit.terminal.vt100_output import _256_colors
from pygments.style import Style
from pygments.token import (Keyword, Name, Comment, String, Error, Text,
Number, Operator, Literal, Token)
base00 = '#001100'
base01 = '#003300'
base02 = '#005500'
base03 = '#007700'
base0... | true | true |
1c208114e9819622cae49e883163cf988e04f98f | 2,842 | py | Python | poptimizer/data/views/go.py | ArjaraGit/poptimizer | 0d221d964791cc387dde44529cacb19d35e5febe | [
"Unlicense"
] | null | null | null | poptimizer/data/views/go.py | ArjaraGit/poptimizer | 0d221d964791cc387dde44529cacb19d35e5febe | [
"Unlicense"
] | null | null | null | poptimizer/data/views/go.py | ArjaraGit/poptimizer | 0d221d964791cc387dde44529cacb19d35e5febe | [
"Unlicense"
] | 1 | 2021-12-02T13:32:44.000Z | 2021-12-02T13:32:44.000Z | """Предварительная версия интеграции с Go."""
import aiohttp
import asyncio
import pandas as pd
import numpy as np
from bson import json_util
from pandas import testing
from poptimizer.data import ports
from poptimizer.data.app import bootstrap
from poptimizer.portfolio import portfolio
from poptimizer.shared import c... | 27.592233 | 113 | 0.668191 | import aiohttp
import asyncio
import pandas as pd
import numpy as np
from bson import json_util
from pandas import testing
from poptimizer.data import ports
from poptimizer.data.app import bootstrap
from poptimizer.portfolio import portfolio
from poptimizer.shared import connections
VIEWER = bootstrap.VIEWER
async ... | true | true |
1c208207bf6d3649d630db726926aee9dcec3732 | 1,303 | py | Python | wplay/schedule_message.py | amandhamija98/whatsapp-play | 16e5442988dcf660e68e1fd0a5a645ec231b41cb | [
"MIT"
] | 3 | 2020-05-17T07:23:19.000Z | 2020-07-02T14:58:09.000Z | wplay/schedule_message.py | amandhamija98/whatsapp-play | 16e5442988dcf660e68e1fd0a5a645ec231b41cb | [
"MIT"
] | null | null | null | wplay/schedule_message.py | amandhamija98/whatsapp-play | 16e5442988dcf660e68e1fd0a5a645ec231b41cb | [
"MIT"
] | null | null | null | # region IMPORTS
from datetime import datetime
from pathlib import Path
import time
import sys
from wplay.utils import browser_config
from wplay.utils import target_search
from wplay.utils import target_select
from wplay.utils import io
from wplay.utils.Logger import Logger
# endregion
# region LOGGER
__logger = Log... | 32.575 | 72 | 0.737529 |
from datetime import datetime
from pathlib import Path
import time
import sys
from wplay.utils import browser_config
from wplay.utils import target_search
from wplay.utils import target_select
from wplay.utils import io
from wplay.utils.Logger import Logger
__logger = Logger(Path(__file__).name)
async def sche... | true | true |
1c20823c759199d8894c6e95ddcb71c4600f4cb8 | 3,094 | py | Python | shamrock/__main__.py | aheroine/use-macke | 2a8fafa79f80711f068f97d30f8ca83ff3b32ea0 | [
"Apache-2.0"
] | 2 | 2019-07-21T15:19:48.000Z | 2019-07-21T15:23:06.000Z | shamrock/__main__.py | chubbymaggie/macke | 6a09aa50d90069da7261fc4af1cc7924f9eeeaa3 | [
"Apache-2.0"
] | null | null | null | shamrock/__main__.py | chubbymaggie/macke | 6a09aa50d90069da7261fc4af1cc7924f9eeeaa3 | [
"Apache-2.0"
] | null | null | null | """
Start a complete analysis with the MACKE toolchain on a given bitcode file
"""
import argparse
from macke.config import check_config
from .shamrock import Shamrock
def main():
"""
Parse command line arguments, initialize and start a complete MACKE run
"""
parser = argparse.ArgumentParser(
... | 25.154472 | 84 | 0.594376 | import argparse
from macke.config import check_config
from .shamrock import Shamrock
def main():
parser = argparse.ArgumentParser(
description="""\
Run KLEE and some additional analysis on the given bitcode file.
"""
)
parser.add_argument(
'bcfile',
metavar=".bc-f... | true | true |
1c20825fff7012f7190fcbe11ed1052f2209ed8d | 6,646 | py | Python | citrine_converters/tools/hough.py | rbuxman/new-refactor | c2254fa637fbe54a54e445a0a872d2d0bbe4165a | [
"BSD-2-Clause"
] | null | null | null | citrine_converters/tools/hough.py | rbuxman/new-refactor | c2254fa637fbe54a54e445a0a872d2d0bbe4165a | [
"BSD-2-Clause"
] | 2 | 2017-10-04T19:38:48.000Z | 2017-10-04T19:45:07.000Z | citrine_converters/tools/hough.py | rbuxman/new-refactor | c2254fa637fbe54a54e445a0a872d2d0bbe4165a | [
"BSD-2-Clause"
] | 2 | 2017-09-25T22:49:09.000Z | 2018-07-03T16:35:05.000Z | from __future__ import division
import numpy as np
class HoughSpace(np.ndarray):
__doc__ = r"""
Constructs a Hough transform space of the `xdata` and
`ydata`.
Construct a Hough space that, given an orientation,
determines the distance to a point.
For $ax + by + c = 0$, $a = \sin \phi$ and $... | 32.578431 | 76 | 0.535661 | from __future__ import division
import numpy as np
class HoughSpace(np.ndarray):
__doc__ = r"""
Constructs a Hough transform space of the `xdata` and
`ydata`.
Construct a Hough space that, given an orientation,
determines the distance to a point.
For $ax + by + c = 0$, $a = \sin \phi$ and $... | true | true |
1c208307ac22d68a1cddb5c32fd97a62e9b2a103 | 12,093 | py | Python | Classification/NBA_API.py | mprego/NBA | 6b065f0bafb72da2a9a8e4e01304e0097e6dfd77 | [
"MIT"
] | null | null | null | Classification/NBA_API.py | mprego/NBA | 6b065f0bafb72da2a9a8e4e01304e0097e6dfd77 | [
"MIT"
] | 1 | 2016-06-21T03:01:17.000Z | 2016-06-21T03:01:17.000Z | Classification/NBA_API.py | mprego/NBA | 6b065f0bafb72da2a9a8e4e01304e0097e6dfd77 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
This code contains methods for pulling data from NBA.com
It depends on the NBA_PY package
'''
#Imports Packages
from nba_py import *
from nba_py import team
from nba_py import game
from nba_py.constants import *
from Dunks_experiment import *
import pandas as pd
import datetime as dt
import... | 48.959514 | 294 | 0.639461 |
from nba_py import *
from nba_py import team
from nba_py import game
from nba_py.constants import *
from Dunks_experiment import *
import pandas as pd
import datetime as dt
import numpy as np
import time
def create_schedule(start_dt, end_dt):
master_game_list=pd.DataFrame()
for date in pd.date... | true | true |
1c2083187dfdb7a33147704a9d5ff4fd3e222192 | 482 | py | Python | xt/model/__init__.py | ZZHsunsky/xingtian | 0484e2c968d9e6b2e5f43a3b86c0213a095ba309 | [
"MIT"
] | 1 | 2020-08-15T15:42:30.000Z | 2020-08-15T15:42:30.000Z | xt/model/__init__.py | ZZHsunsky/xingtian | 0484e2c968d9e6b2e5f43a3b86c0213a095ba309 | [
"MIT"
] | 3 | 2021-03-31T20:15:40.000Z | 2022-02-09T23:50:46.000Z | built-in/TensorFlow/Research/reinforcement-learning/ModelZoo_QMIX_TensorFlow/xt/model/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | null | null | null | # from .model_creator import model_creator
"""
model module work for the NN architecture define
"""
from __future__ import division, print_function
from xt.model.model import XTModel
import xt.util.common as common
from xt.framework import Registers
__ALL__ = ["model_builder", "Model"]
def model_builder(model_info):... | 26.777778 | 52 | 0.76556 |
from __future__ import division, print_function
from xt.model.model import XTModel
import xt.util.common as common
from xt.framework import Registers
__ALL__ = ["model_builder", "Model"]
def model_builder(model_info):
model_name = model_info['model_name']
model_ = Registers.model[model_name](model_info)
... | true | true |
1c208357e2b57149d92f7340b6c69ea2b9a6f2dc | 3,184 | py | Python | mosdef_code/spectra/fit_prospector_emission.py | brianlorenz/code | e24277bbb1deb2f0488f7b6e1f28c7b633c2c12b | [
"MIT"
] | null | null | null | mosdef_code/spectra/fit_prospector_emission.py | brianlorenz/code | e24277bbb1deb2f0488f7b6e1f28c7b633c2c12b | [
"MIT"
] | null | null | null | mosdef_code/spectra/fit_prospector_emission.py | brianlorenz/code | e24277bbb1deb2f0488f7b6e1f28c7b633c2c12b | [
"MIT"
] | 1 | 2021-12-08T01:20:12.000Z | 2021-12-08T01:20:12.000Z | # Fits the emission lines of the prospector data in the same way that we fit our own data
import numpy as np
import pandas as pd
from astropy.io import ascii
import initialize_mosdef_dirs as imd
from fit_emission import fit_emission
from prospector_plot import load_obj
def setup_prospector_fit_csv(groupID, run_name)... | 42.453333 | 113 | 0.721106 |
import numpy as np
import pandas as pd
from astropy.io import ascii
import initialize_mosdef_dirs as imd
from fit_emission import fit_emission
from prospector_plot import load_obj
def setup_prospector_fit_csv(groupID, run_name):
obs = load_obj(f'{groupID}_obs', run_name)
redshift_cor = 1
spec_df ... | true | true |
1c20839c900d5331052f4ee9e20fe7ae710236b4 | 614 | py | Python | engine/src/juliabox/handlers/ping.py | shashi/JuliaBox | 10f65b3ed1b5b2ca703a4ff2c79940cc10c66c61 | [
"MIT"
] | 50 | 2016-09-09T02:17:09.000Z | 2022-03-15T17:16:20.000Z | engine/src/juliabox/handlers/ping.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 58 | 2016-08-29T19:19:28.000Z | 2018-11-14T01:49:16.000Z | engine/src/juliabox/handlers/ping.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 24 | 2016-09-27T18:20:54.000Z | 2022-01-02T09:37:44.000Z | import tornado
import tornado.web
import tornado.gen
from handler_base import JBoxHandler
from juliabox.interactive import SessContainer
class PingHandler(JBoxHandler):
@tornado.web.asynchronous
@tornado.gen.coroutine
def get(self):
valid_req = self.is_valid_req()
sessname = self.get_sess... | 29.238095 | 65 | 0.677524 | import tornado
import tornado.web
import tornado.gen
from handler_base import JBoxHandler
from juliabox.interactive import SessContainer
class PingHandler(JBoxHandler):
@tornado.web.asynchronous
@tornado.gen.coroutine
def get(self):
valid_req = self.is_valid_req()
sessname = self.get_sess... | true | true |
1c2083ca8623dfca49e4832b669abaab93dd9e3e | 18,668 | py | Python | rubin_sim/utils/FocalPlaneUtils.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/utils/FocalPlaneUtils.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/utils/FocalPlaneUtils.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | import numpy as np
import palpy
from rubin_sim.utils.CodeUtilities import _validate_inputs
from rubin_sim.utils import _observedFromICRS, _icrsFromObserved
from rubin_sim.utils import radiansFromArcsec
__all__ = ["_pupilCoordsFromObserved",
"_pupilCoordsFromRaDec", "pupilCoordsFromRaDec",
"_raDec... | 42.139955 | 109 | 0.651489 | import numpy as np
import palpy
from rubin_sim.utils.CodeUtilities import _validate_inputs
from rubin_sim.utils import _observedFromICRS, _icrsFromObserved
from rubin_sim.utils import radiansFromArcsec
__all__ = ["_pupilCoordsFromObserved",
"_pupilCoordsFromRaDec", "pupilCoordsFromRaDec",
"_raDec... | true | true |
1c2083ec1de6d900357da8750a6a404a66a58499 | 982 | py | Python | src/mayaToLux/mtlu_devmodule/scripts/updateSDK.py | haggi/OpenMaya | 746e0740f480d9ef8d2173f31b3c99b9b0ea0d24 | [
"MIT"
] | 42 | 2015-01-03T15:07:25.000Z | 2021-12-09T03:56:59.000Z | src/mayaToLux/mtlu_devmodule/scripts/updateSDK.py | haggi/OpenMaya | 746e0740f480d9ef8d2173f31b3c99b9b0ea0d24 | [
"MIT"
] | 66 | 2015-01-02T13:28:44.000Z | 2022-03-16T14:00:57.000Z | src/mayaToLux/mtlu_devmodule/scripts/updateSDK.py | haggi/OpenMaya | 746e0740f480d9ef8d2173f31b3c99b9b0ea0d24 | [
"MIT"
] | 12 | 2015-02-07T05:02:17.000Z | 2020-07-10T17:21:44.000Z | import shutil
import sys
import os
import path
binDir = path.path("C:/Users/haggi/coding/lux/windows/Projects/luxrender/x64")
binDirA = path.path("C:/Users/haggi/coding/lux/windows/Projects/luxrays/x64")
binDest = path.path("C:/Users/haggi/coding/OpenMaya/src/mayaToLux/devkit/luxsdk/bin")
libDest = path.path("C:/User... | 36.37037 | 87 | 0.656823 | import shutil
import sys
import os
import path
binDir = path.path("C:/Users/haggi/coding/lux/windows/Projects/luxrender/x64")
binDirA = path.path("C:/Users/haggi/coding/lux/windows/Projects/luxrays/x64")
binDest = path.path("C:/Users/haggi/coding/OpenMaya/src/mayaToLux/devkit/luxsdk/bin")
libDest = path.path("C:/User... | true | true |
1c208461a72fde5585713f2cf1d2276925237f1a | 313 | py | Python | projects/models.py | cornyhorse-forks/DjangoPersonalSite | 467ffd0f7db81bd2db5991e5479670e93b2db421 | [
"Unlicense"
] | null | null | null | projects/models.py | cornyhorse-forks/DjangoPersonalSite | 467ffd0f7db81bd2db5991e5479670e93b2db421 | [
"Unlicense"
] | null | null | null | projects/models.py | cornyhorse-forks/DjangoPersonalSite | 467ffd0f7db81bd2db5991e5479670e93b2db421 | [
"Unlicense"
] | 2 | 2021-04-26T03:15:20.000Z | 2021-05-03T05:44:27.000Z | from django.db import models
class Project(models.Model):
title = models.CharField(max_length=100, unique=True)
description = models.TextField(null=True)
body = models.TextField(null=True)
image = models.FilePathField(path="/img")
detail_image = models.FilePathField(path="/img", null=True)
| 31.3 | 63 | 0.728435 | from django.db import models
class Project(models.Model):
title = models.CharField(max_length=100, unique=True)
description = models.TextField(null=True)
body = models.TextField(null=True)
image = models.FilePathField(path="/img")
detail_image = models.FilePathField(path="/img", null=True)
| true | true |
1c2084b58543a28cac0ecf56a8ee83d112f33146 | 14,847 | py | Python | cryptoapis/model/validate_address_e400.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/validate_address_e400.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/validate_address_e400.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 45.12766 | 484 | 0.596754 |
import re
import sys
from cryptoapis.model_utils import (
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenA... | true | true |
1c208565de67f3a1ef441d694dd3e06468023882 | 937 | py | Python | examples/hello_world.py | HAYASAKA-Ryosuke/kettle | bb3f8fc4d7e72e35fd9d6b5d7769af679af7ceb1 | [
"MIT"
] | 5 | 2018-01-09T07:22:21.000Z | 2022-01-30T18:43:29.000Z | examples/hello_world.py | HAYASAKA-Ryosuke/kettle | bb3f8fc4d7e72e35fd9d6b5d7769af679af7ceb1 | [
"MIT"
] | 1 | 2018-08-27T19:35:14.000Z | 2021-08-07T04:49:40.000Z | examples/hello_world.py | HAYASAKA-Ryosuke/kettle | bb3f8fc4d7e72e35fd9d6b5d7769af679af7ceb1 | [
"MIT"
] | null | null | null | from wsgiref import simple_server
from kettle.application import Application
def hello(request, response):
print(request.query_params)
return response.text('Hello World!!')
def hello_post(request, response):
print(request.data)
return response.text('Hello POST!!')
def ham(request, response):
p... | 28.393939 | 70 | 0.724653 | from wsgiref import simple_server
from kettle.application import Application
def hello(request, response):
print(request.query_params)
return response.text('Hello World!!')
def hello_post(request, response):
print(request.data)
return response.text('Hello POST!!')
def ham(request, response):
p... | true | true |
1c2086230cf696c46607c20705c6bcf4def4fcec | 355 | py | Python | docker/taxii-server/verify.py | MySMBTech/dockerfiles | 6bdd4c874b4d2c33114b917cad4cf9d6d267dd97 | [
"MIT"
] | 48 | 2018-12-12T12:18:09.000Z | 2022-03-05T02:23:42.000Z | docker/taxii-server/verify.py | Axonius/dockerfiles | f2135e9abb468ee8db339ec27b2ba737acbbaef6 | [
"MIT"
] | 7,201 | 2018-12-24T17:14:17.000Z | 2022-03-31T13:39:12.000Z | docker/taxii-server/verify.py | Axonius/dockerfiles | f2135e9abb468ee8db339ec27b2ba737acbbaef6 | [
"MIT"
] | 94 | 2018-12-17T10:59:21.000Z | 2022-03-29T12:59:30.000Z | import warnings
warnings.simplefilter('error')
# make sure import doesn't generate warnings as seen: https://github.com/demisto/etc/issues/36452
# <frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
fr... | 50.714286 | 171 | 0.814085 | import warnings
warnings.simplefilter('error')
# <frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
from gevent.pywsgi import WSGIServer
| true | true |
1c208666dd4a983c4967aaa251ffc21d7e802f27 | 2,324 | py | Python | actions/0_del_interface.py | StackStorm-Exchange/vyatta | a1b16e425da29e279744bdcbff422d7f481b2424 | [
"Apache-2.0"
] | 3 | 2018-11-20T17:08:00.000Z | 2021-12-13T17:56:16.000Z | actions/0_del_interface.py | StackStorm-Exchange/vyatta | a1b16e425da29e279744bdcbff422d7f481b2424 | [
"Apache-2.0"
] | 4 | 2017-05-03T16:56:28.000Z | 2021-02-10T21:53:40.000Z | actions/0_del_interface.py | StackStorm-Exchange/vyatta | a1b16e425da29e279744bdcbff422d7f481b2424 | [
"Apache-2.0"
] | 3 | 2017-05-03T16:06:57.000Z | 2021-01-28T17:48:22.000Z | import requests
import warnings
import json
from st2client.client import Client
from st2common.runners.base_action import Action
class InternalDelIntf(Action):
def run(self, deviceIP, cmd_path, intfType, intfNum):
cmd_path = cmd_path[:26]
# Fetching device credentials based on keys derived from ... | 39.389831 | 77 | 0.469449 | import requests
import warnings
import json
from st2client.client import Client
from st2common.runners.base_action import Action
class InternalDelIntf(Action):
def run(self, deviceIP, cmd_path, intfType, intfNum):
cmd_path = cmd_path[:26]
| true | true |
1c2086fed63e366569e186a415db5e7959872ba7 | 864 | py | Python | Fraktale/Treiber/basis_treiber.py | heureka-code/Fraktale | 291a84c7a1ba0b0f97e8fd4da35339f0239a6e9c | [
"MIT"
] | null | null | null | Fraktale/Treiber/basis_treiber.py | heureka-code/Fraktale | 291a84c7a1ba0b0f97e8fd4da35339f0239a6e9c | [
"MIT"
] | null | null | null | Fraktale/Treiber/basis_treiber.py | heureka-code/Fraktale | 291a84c7a1ba0b0f97e8fd4da35339f0239a6e9c | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from Fraktale.Farbadapter import BasisFarbadapter
from Fraktale.Welten.basis_welt import FraktalWelt
import numpy as np
class BasisTreiber(ABC):
def __init__(self,
screen_width: int, screen_height: int,
welt, farbadapter: BasisFarbadapter):
... | 24.685714 | 61 | 0.665509 | from abc import ABC, abstractmethod
from Fraktale.Farbadapter import BasisFarbadapter
from Fraktale.Welten.basis_welt import FraktalWelt
import numpy as np
class BasisTreiber(ABC):
def __init__(self,
screen_width: int, screen_height: int,
welt, farbadapter: BasisFarbadapter):
... | true | true |
1c20887f2e8f91e20f9885706122e975aefe0d10 | 10,786 | py | Python | modules/imports.py | dvanderrijst/arXiv-demo-dataset | 8c79a7bbafc62209d4c77a75285deb46cf6d0dfb | [
"BSD-3-Clause"
] | 6 | 2020-09-04T13:57:30.000Z | 2021-09-04T23:01:37.000Z | modules/imports.py | dvanderrijst/arXiv-demo-dataset | 8c79a7bbafc62209d4c77a75285deb46cf6d0dfb | [
"BSD-3-Clause"
] | 4 | 2020-09-22T09:10:45.000Z | 2021-06-22T11:45:28.000Z | modules/imports.py | dvanderrijst/arXiv-demo-dataset | 8c79a7bbafc62209d4c77a75285deb46cf6d0dfb | [
"BSD-3-Clause"
] | 3 | 2020-09-04T13:57:55.000Z | 2022-02-15T16:21:40.000Z | """ Import routines """
import weaviate
from dateutil import parser
from modules.utilities import format_journal_name
from modules.utilities import format_author_name
from modules.utilities import generate_uuid
from modules.utilities import check_batch_result
from modules.utilities import extract_year
from modules.uti... | 38.521429 | 111 | 0.605971 |
import weaviate
from dateutil import parser
from modules.utilities import format_journal_name
from modules.utilities import format_author_name
from modules.utilities import generate_uuid
from modules.utilities import check_batch_result
from modules.utilities import extract_year
from modules.utilities import DEFAULT_MA... | true | true |
1c2088b68914c7a7356f73a75270fff3f08f47a3 | 365 | py | Python | codewarsKatas/find_the_parity_outlier.py | cyrionp/PythonChallenges | 1fd0d29d4d711c7d2b8c59848aac6a693d4e8d73 | [
"MIT"
] | 1 | 2021-08-22T02:29:57.000Z | 2021-08-22T02:29:57.000Z | codewarsKatas/find_the_parity_outlier.py | cyrionp/PythonChallenges | 1fd0d29d4d711c7d2b8c59848aac6a693d4e8d73 | [
"MIT"
] | null | null | null | codewarsKatas/find_the_parity_outlier.py | cyrionp/PythonChallenges | 1fd0d29d4d711c7d2b8c59848aac6a693d4e8d73 | [
"MIT"
] | null | null | null | # https://www.codewars.com/kata/5526fc09a1bbd946250002dc/train/python
def find_outlier(integers):
even,odd,val_even,val_odd=0,0,0,0
for num in integers:
if num%2==0:
val_even=num
even+=1
else:
val_odd=num
odd+=1
return val_even if odd>even els... | 24.333333 | 69 | 0.60274 |
def find_outlier(integers):
even,odd,val_even,val_odd=0,0,0,0
for num in integers:
if num%2==0:
val_even=num
even+=1
else:
val_odd=num
odd+=1
return val_even if odd>even else val_odd
| true | true |
1c20894dfbbc8e805982db3aa853f0a176a42c37 | 12,680 | py | Python | c7n/resources/kinesis.py | jagjeetsm/cloud-custodian | 10b9f62e93bfb6e00ed0889fd661cc9a995679d4 | [
"Apache-2.0"
] | 1 | 2020-01-22T17:30:48.000Z | 2020-01-22T17:30:48.000Z | c7n/resources/kinesis.py | jagjeetsm/cloud-custodian | 10b9f62e93bfb6e00ed0889fd661cc9a995679d4 | [
"Apache-2.0"
] | null | null | null | c7n/resources/kinesis.py | jagjeetsm/cloud-custodian | 10b9f62e93bfb6e00ed0889fd661cc9a995679d4 | [
"Apache-2.0"
] | null | null | null | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
import jmespath
from c7n.actions import Action
from c7n.manager import resources
from c7n.filters.kms import KmsRelatedFilter
from c7n.query import ConfigSource, DescribeSource, QueryResourceManager, TypeInfo
from c7n.tags import universal_... | 33.544974 | 84 | 0.631073 |
import jmespath
from c7n.actions import Action
from c7n.manager import resources
from c7n.filters.kms import KmsRelatedFilter
from c7n.query import ConfigSource, DescribeSource, QueryResourceManager, TypeInfo
from c7n.tags import universal_augment
from c7n.filters.vpc import SubnetFilter
from c7n.utils import local_... | true | true |
1c20898cdb6a3f18e1701bbf688953a949507354 | 3,837 | py | Python | sources/multi/foxaholic.py | mesmerlord/lncrawler | b309e892969ecd3e7c8e68aef70b6614131fcb3c | [
"Apache-2.0"
] | 710 | 2018-11-16T13:33:30.000Z | 2022-03-29T02:25:36.000Z | sources/multi/foxaholic.py | mesmerlord/lncrawler | b309e892969ecd3e7c8e68aef70b6614131fcb3c | [
"Apache-2.0"
] | 949 | 2018-11-11T16:16:09.000Z | 2022-03-31T09:56:04.000Z | sources/multi/foxaholic.py | mesmerlord/lncrawler | b309e892969ecd3e7c8e68aef70b6614131fcb3c | [
"Apache-2.0"
] | 196 | 2018-11-15T17:41:36.000Z | 2022-03-31T23:13:15.000Z | # -*- coding: utf-8 -*-
import logging
from bs4.element import Tag
import requests
from lncrawl.core.crawler import Crawler
logger = logging.getLogger(__name__)
search_url = 'https://www.foxaholic.com/?s=%s&post_type=wp-manga'
# chapter_list_url = 'https://www.foxaholic.com/wp-admin/admin-ajax.php'
class Foxaholi... | 35.859813 | 118 | 0.561376 |
import logging
from bs4.element import Tag
import requests
from lncrawl.core.crawler import Crawler
logger = logging.getLogger(__name__)
search_url = 'https://www.foxaholic.com/?s=%s&post_type=wp-manga'
class FoxaholicCrawler(Crawler):
base_url = [
'https://foxaholic.com/',
'https://www.foxa... | true | true |
1c208a5c98daf71511b0fc657765a472d7618b30 | 3,006 | py | Python | src/toil/test/src/resumabilityTest.py | YeoLab/toil | 9837c396b946bc4a0cf97e7c2705e5892b88707b | [
"Apache-2.0"
] | null | null | null | src/toil/test/src/resumabilityTest.py | YeoLab/toil | 9837c396b946bc4a0cf97e7c2705e5892b88707b | [
"Apache-2.0"
] | 1 | 2017-07-31T23:47:25.000Z | 2017-07-31T23:47:25.000Z | src/toil/test/src/resumabilityTest.py | lexentbio/toil | 6ad3813af4450962d0899aa6c821189f86472ef9 | [
"Apache-2.0"
] | 1 | 2020-09-17T17:49:32.000Z | 2020-09-17T17:49:32.000Z | # Copyright (C) 2016 UCSC Computational Genomics Lab
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 36.216867 | 105 | 0.685296 |
from __future__ import absolute_import
import os
from six.moves import xrange
from toil.job import Job
from toil.test import ToilTest
from toil.jobStores.abstractJobStore import NoSuchFileException
from toil.leader import FailedJobsException
class ResumabilityTest(ToilTest):
def test(self):
... | true | true |
1c208a6c20989a1c2908ebddaefde4384cf6e38f | 3,988 | py | Python | test/unit/test_depfixer.py | thomasrockhu/bfg9000 | 1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a | [
"BSD-3-Clause"
] | 72 | 2015-06-23T02:35:13.000Z | 2021-12-08T01:47:40.000Z | test/unit/test_depfixer.py | thomasrockhu/bfg9000 | 1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a | [
"BSD-3-Clause"
] | 139 | 2015-03-01T18:48:17.000Z | 2021-06-18T15:45:14.000Z | test/unit/test_depfixer.py | thomasrockhu/bfg9000 | 1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a | [
"BSD-3-Clause"
] | 19 | 2015-12-23T21:24:33.000Z | 2022-01-06T04:04:41.000Z | from io import StringIO
from . import *
from bfg9000 import depfixer
class TestEmitDeps(TestCase):
def test_empty_deps(self):
instream = StringIO('foo:\n')
outstream = StringIO()
depfixer.emit_deps(instream, outstream)
self.assertEqual(outstream.getvalue(), '')
def test_sing... | 35.927928 | 76 | 0.618857 | from io import StringIO
from . import *
from bfg9000 import depfixer
class TestEmitDeps(TestCase):
def test_empty_deps(self):
instream = StringIO('foo:\n')
outstream = StringIO()
depfixer.emit_deps(instream, outstream)
self.assertEqual(outstream.getvalue(), '')
def test_sing... | true | true |
1c208ae6708760b7523205a9887a7fe10f065d25 | 18,957 | py | Python | tensorflow_model_optimization/python/core/internal/tensor_encoding/stages/stages_impl.py | akarmi/model-optimization | 2d3faaa361ecb3639f4a29da56e0e6ed52336318 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:14:45.000Z | 2019-10-10T06:14:45.000Z | tensorflow_model_optimization/python/core/internal/tensor_encoding/stages/stages_impl.py | akarmi/model-optimization | 2d3faaa361ecb3639f4a29da56e0e6ed52336318 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_optimization/python/core/internal/tensor_encoding/stages/stages_impl.py | akarmi/model-optimization | 2d3faaa361ecb3639f4a29da56e0e6ed52336318 | [
"Apache-2.0"
] | 1 | 2020-01-01T04:38:34.000Z | 2020-01-01T04:38:34.000Z | # Copyright 2019, 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 appli... | 36.039924 | 98 | 0.686554 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
from tensorflow_model_optimization.python.core.intern... | true | true |
1c208b094d42063f4600e3118f79a3411da7b885 | 2,855 | py | Python | backend/api/serializers.py | JumboCode/YEF | 433b9215e61794730362d9ad9749b88236875be5 | [
"MIT"
] | 2 | 2018-12-10T03:14:31.000Z | 2019-03-27T16:20:36.000Z | backend/api/serializers.py | JumboCode/YEF | 433b9215e61794730362d9ad9749b88236875be5 | [
"MIT"
] | 22 | 2018-12-06T23:54:20.000Z | 2019-04-17T18:15:43.000Z | backend/api/serializers.py | JumboCode/YEF | 433b9215e61794730362d9ad9749b88236875be5 | [
"MIT"
] | 1 | 2020-11-03T05:27:10.000Z | 2020-11-03T05:27:10.000Z | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from api.models import Team, Tournament, Round, MemberPoint, JudgePoint, MatchUp, Judge, Member, Club
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('id', 'url', 'userna... | 37.565789 | 101 | 0.685814 | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from api.models import Team, Tournament, Round, MemberPoint, JudgePoint, MatchUp, Judge, Member, Club
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('id', 'url', 'userna... | true | true |
1c208b9ae635829a6515edc3407f1267302226a7 | 1,818 | py | Python | 5_deep_learning/02_CNN/batchmaker.py | karanchawla/ai_for_robotics | 03bb66bae99bac3acd79bc1ec6d3b9c0eeabcdf8 | [
"BSD-3-Clause"
] | 65 | 2017-03-03T07:30:28.000Z | 2021-08-19T01:12:47.000Z | 5_deep_learning/02_CNN/batchmaker.py | karanchawla/ai_for_robotics | 03bb66bae99bac3acd79bc1ec6d3b9c0eeabcdf8 | [
"BSD-3-Clause"
] | 4 | 2017-03-02T13:51:40.000Z | 2017-11-01T16:49:22.000Z | 5_deep_learning/02_CNN/batchmaker.py | ethz-asl/ai_for_robotics | 03bb66bae99bac3acd79bc1ec6d3b9c0eeabcdf8 | [
"BSD-3-Clause"
] | 43 | 2017-03-02T11:31:21.000Z | 2020-10-30T07:10:59.000Z | # Copyright 2017 Mark Pfeiffer, ASL, ETH Zurich, Switzerland
# Copyright 2017 Fadri Furrer, ASL, ETH Zurich, Switzerland
# Copyright 2017 Renaud Dubé, ASL, ETH Zurich, Switzerland
import numpy as np
from random import shuffle
class Batchmaker:
def __init__(self, input_data, output_data, batch_size=64):
se... | 44.341463 | 97 | 0.690869 |
import numpy as np
from random import shuffle
class Batchmaker:
def __init__(self, input_data, output_data, batch_size=64):
self.input_data = input_data
self.input_shape = input_data.shape[1] * input_data.shape[2]
self.output_data = output_data
self.output_shape = output_data.sh... | false | true |
1c208c2cad09d883be2ae77b5d2973bf827bd959 | 3,314 | py | Python | FIP_mirror/ydl_utils.py | dbeley/FIP_mirror | f56910639d94601b3fe85e92fab8e9cea3fdeba5 | [
"MIT"
] | null | null | null | FIP_mirror/ydl_utils.py | dbeley/FIP_mirror | f56910639d94601b3fe85e92fab8e9cea3fdeba5 | [
"MIT"
] | 1 | 2021-06-02T00:02:42.000Z | 2021-06-02T00:02:42.000Z | FIP_mirror/ydl_utils.py | dbeley/FIP_mirror | f56910639d94601b3fe85e92fab8e9cea3fdeba5 | [
"MIT"
] | null | null | null | import logging
from youtube_dl import YoutubeDL
# import requests
# from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
# def get_youtube_soup(name):
# header = {
# "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
# }
# with requests.Session() a... | 30.127273 | 107 | 0.574231 | import logging
from youtube_dl import YoutubeDL
logger = logging.getLogger(__name__)
h_term, position):
ydl_opts = {"logger": MyLogger()}
with YoutubeDL(ydl_opts) as ydl:
info_dict = ydl.extract_info(
f"ytsearch{position}:{search_term}", download=False
)
... | true | true |
1c208c9ceb6be1e997869e0671bfee31e1ec8291 | 1,396 | py | Python | test/functional/feature_shutdown.py | BitPalnet/BitPal | 0cce7aea31a2e45fecec0e2ef42728aa26355704 | [
"MIT"
] | 1 | 2021-03-09T22:25:20.000Z | 2021-03-09T22:25:20.000Z | test/functional/feature_shutdown.py | BitPalnet/BitPal | 0cce7aea31a2e45fecec0e2ef42728aa26355704 | [
"MIT"
] | null | null | null | test/functional/feature_shutdown.py | BitPalnet/BitPal | 0cce7aea31a2e45fecec0e2ef42728aa26355704 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The BitPal Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitpald shutdown."""
from test_framework.test_framework import BitPalTestFramework
from test_frame... | 38.777778 | 103 | 0.7149 |
from test_framework.test_framework import BitPalTestFramework
from test_framework.util import assert_equal, get_rpc_proxy, wait_until
from threading import Thread
def test_long_call(node):
block = node.waitfornewblock()
assert_equal(block['height'], 0)
class ShutdownTest(BitPalTestFramework):
def se... | true | true |
1c208d0940b444932fa1a28e1718f3324496d97b | 3,591 | py | Python | stacked_capsule_autoencoders/capsules/models/model.py | kinoute/google-research | 4a59cab927579ea9722e43252c695de5da4eb5e2 | [
"Apache-2.0"
] | 86 | 2019-11-17T03:20:51.000Z | 2022-03-07T22:47:34.000Z | stacked_capsule_autoencoders/capsules/models/model.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 14 | 2020-02-28T12:40:52.000Z | 2022-02-10T00:43:43.000Z | stacked_capsule_autoencoders/capsules/models/model.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 19 | 2019-12-10T13:27:09.000Z | 2021-04-10T17:29:21.000Z | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 26.6 | 74 | 0.676135 |
import functools
from monty.collections import AttrDict
import sonnet as snt
import tensorflow as tf
class _Memoize(object):
def __init__(self, arg_transform=None):
super(_Memoize, self).__init__()
self.memo = {}
self.arg_transform = arg_transform
def __call__(self, func):
@funct... | true | true |
1c208d0b5cf7b12974295a9f01b4aee82dad4199 | 111 | py | Python | pytes/__init__.py | BarbulescuMihai/Dispersion-Relation-Solvers | 8c9864016e7fd43d9fd332ac91eca1630c2c25d3 | [
"MIT"
] | 2 | 2018-06-10T15:57:39.000Z | 2019-01-21T12:00:49.000Z | pytes/__init__.py | BarbulescuMihai/Dispersion-Relation-Solvers | 8c9864016e7fd43d9fd332ac91eca1630c2c25d3 | [
"MIT"
] | null | null | null | pytes/__init__.py | BarbulescuMihai/Dispersion-Relation-Solvers | 8c9864016e7fd43d9fd332ac91eca1630c2c25d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 29 12:08:37 2018
@author: mihai
"""
from .main import * | 13.875 | 36 | 0.558559 |
from .main import * | true | true |
1c208f1164423f01e493b3ca2ae83eddc3ce5f04 | 26,901 | py | Python | elasticapm/traces.py | patrick-ryan/apm-agent-python | 9cbd4ee1f666f807a44f2bb346d4f70d071c9d66 | [
"BSD-3-Clause"
] | null | null | null | elasticapm/traces.py | patrick-ryan/apm-agent-python | 9cbd4ee1f666f807a44f2bb346d4f70d071c9d66 | [
"BSD-3-Clause"
] | null | null | null | elasticapm/traces.py | patrick-ryan/apm-agent-python | 9cbd4ee1f666f807a44f2bb346d4f70d071c9d66 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, t... | 35.963904 | 120 | 0.625367 |
import functools
import random
import re
import threading
import time
import timeit
import warnings
from collections import defaultdict
from elasticapm.conf import constants
from elasticapm.conf.constants import LABEL_RE, SPAN, TRANSACTION
from elasticapm.context import init_execution_con... | true | true |
1c208f1f963332e4d19f270049f81f63de9a7759 | 14,072 | py | Python | fkie_node_manager_daemon/tests/test_launch_servicer.py | JOiiNT-LAB/multimaster_fkie | 8d77d75f57da16ad81c01069e6f616e8d7121ff7 | [
"BSD-3-Clause"
] | 194 | 2015-01-21T12:46:42.000Z | 2022-03-29T08:22:22.000Z | fkie_node_manager_daemon/tests/test_launch_servicer.py | JOiiNT-LAB/multimaster_fkie | 8d77d75f57da16ad81c01069e6f616e8d7121ff7 | [
"BSD-3-Clause"
] | 146 | 2015-01-13T23:02:24.000Z | 2022-03-23T05:54:02.000Z | fkie_node_manager_daemon/tests/test_launch_servicer.py | JOiiNT-LAB/multimaster_fkie | 8d77d75f57da16ad81c01069e6f616e8d7121ff7 | [
"BSD-3-Clause"
] | 103 | 2015-02-08T23:20:02.000Z | 2022-03-27T12:45:48.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Fraunhofer FKIE/US, Alexander Tiderko
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code mus... | 67.980676 | 217 | 0.701535 |
import os
import grpc
import unittest
import time
from grpc.beta._metadata import beta
from fkie_node_manager_daemon.common import interpret_path
import fkie_multimaster_msgs.grpc.launch_pb2 as lmsg
from fkie_node_manager_daemon.launch_servicer import LaunchServicer
from fkie_node_manag... | true | true |
1c20903c91341a40dfd6ce23fc4ceca9b0856a0c | 1,066 | py | Python | neutron/db/migration/alembic_migrations/versions/xena/expand/8df53b0d2c0e_increase_tag_elements_from_60_to_255_.py | Joffref/neutron | 09f72d2ac42ff92a4a3f96dd00800ba0cf367270 | [
"Apache-2.0"
] | null | null | null | neutron/db/migration/alembic_migrations/versions/xena/expand/8df53b0d2c0e_increase_tag_elements_from_60_to_255_.py | Joffref/neutron | 09f72d2ac42ff92a4a3f96dd00800ba0cf367270 | [
"Apache-2.0"
] | null | null | null | neutron/db/migration/alembic_migrations/versions/xena/expand/8df53b0d2c0e_increase_tag_elements_from_60_to_255_.py | Joffref/neutron | 09f72d2ac42ff92a4a3f96dd00800ba0cf367270 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 OpenStack Foundation
#
# 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 ... | 28.052632 | 78 | 0.724203 |
import sqlalchemy as sa
from alembic import op
revision = '8df53b0d2c0e'
down_revision = '6135a7bd4425'
TABLE = 'tags'
def upgrade():
op.alter_column(TABLE, 'tag', existing_type=sa.String(60),
type_=sa.String(255), existing_nullable=False)
| true | true |
1c2090a3c48632e4cbe20bd77d8abd2b827cd713 | 756 | py | Python | src/test/test_util/test_get_executable.py | decafjoe/safe | 12fec41e8b82fe5170ebb0e39ca7eb211f1d88b8 | [
"BSD-3-Clause"
] | null | null | null | src/test/test_util/test_get_executable.py | decafjoe/safe | 12fec41e8b82fe5170ebb0e39ca7eb211f1d88b8 | [
"BSD-3-Clause"
] | null | null | null | src/test/test_util/test_get_executable.py | decafjoe/safe | 12fec41e8b82fe5170ebb0e39ca7eb211f1d88b8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tests for :func:`safe.util.get_executable`.
:author: Joe Joyce <joe@decafjoe.com>
:copyright: Copyright (c) Joe Joyce and contributors, 2016-2019.
:license: BSD
"""
import subprocess
from safe.util import get_executable
def test_missing():
"""Check that ``None`` is returned for missi... | 28 | 73 | 0.652116 |
import subprocess
from safe.util import get_executable
def test_missing():
assert get_executable('this_is_not_a_real_executable_i_hope') is None
def test_ls():
for line in subprocess.check_output(('which', 'ls')).splitlines():
line = line.decode('utf-8').strip()
if line and line.lstrip()[0... | true | true |
1c20910deec0f7fe7f1e2bc7b10c57c0f0e540c8 | 5,082 | py | Python | third_party/elecfreaks/incomplete_controller_for_python.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-03-17T08:27:11.000Z | 2022-03-17T08:27:11.000Z | third_party/elecfreaks/incomplete_controller_for_python.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-02-10T16:30:35.000Z | 2022-02-10T16:33:21.000Z | third_party/elecfreaks/incomplete_controller_for_python.py | feagi/feagi | 598abbe294b5d9cd7ff34861fa6568ba899b2ab8 | [
"Apache-2.0"
] | 1 | 2022-02-07T22:15:54.000Z | 2022-02-07T22:15:54.000Z | # MIT License
#
# Copyright (c) 2020 Lionkk
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | 33.88 | 103 | 0.638135 |
from microbit import *
from Cutebot import *
import _i2c as i2c
class Motor():
def __init__(self):
i2c.init()
self.__pinL = pin13
self.__pinR = pin14
self.__pinL.set_pull(self.__pinL.PULL_UP)
self.__pinR.set_pull(self.__pinR.PULL_UP)
def set_motor... | true | true |
1c20918ffc8e95b547cb83e52804ee3a943962e7 | 17,936 | py | Python | tensorflow/python/keras/layers/cudnn_recurrent_test.py | ShireFolk/tensorflow | d9a386fe5ff6f8d2dc011c832708ed4096904e0f | [
"Apache-2.0"
] | 27 | 2020-02-29T04:13:22.000Z | 2022-02-07T21:54:50.000Z | tensorflow/python/keras/layers/cudnn_recurrent_test.py | kaist-ina/tensorflow | 169124c0c9630b719e7f0e55722c38c7ecd6c5ac | [
"Apache-2.0"
] | 5 | 2020-06-01T18:50:38.000Z | 2021-07-16T07:13:52.000Z | tensorflow/python/keras/layers/cudnn_recurrent_test.py | kaist-ina/tensorflow | 169124c0c9630b719e7f0e55722c38c7ecd6c5ac | [
"Apache-2.0"
] | 10 | 2020-12-15T03:55:24.000Z | 2021-12-17T23:14:11.000Z | # Copyright 2018 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... | 35.943888 | 80 | 0.682203 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tempfile
from absl.testing import parameterized
import numpy as np
from tensorflow.python import keras
from tensorflow.python.framework import test_util
from tensorflow.python.k... | true | true |
1c20920d0b2e5cda2f9afed25c118f7b9d743884 | 1,684 | py | Python | tests/console/commands/self/test_update.py | zEdS15B3GCwq/poetry | 2afe9840533aacfe561d3fdf65c6fb2e790d89b1 | [
"MIT"
] | 7,258 | 2018-02-28T16:23:08.000Z | 2019-12-11T18:27:58.000Z | tests/console/commands/self/test_update.py | zEdS15B3GCwq/poetry | 2afe9840533aacfe561d3fdf65c6fb2e790d89b1 | [
"MIT"
] | 1,608 | 2018-02-28T15:31:35.000Z | 2019-12-11T20:00:05.000Z | tests/console/commands/self/test_update.py | zEdS15B3GCwq/poetry | 2afe9840533aacfe561d3fdf65c6fb2e790d89b1 | [
"MIT"
] | 597 | 2018-03-07T15:07:46.000Z | 2019-12-11T16:36:22.000Z | from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from poetry.core.packages.package import Package
from poetry.core.semver.version import Version
from poetry.__version__ import __version__
from poetry.factory import Factory
if TYPE_CHECKING:
from cleo.t... | 25.134328 | 74 | 0.759501 | from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from poetry.core.packages.package import Package
from poetry.core.semver.version import Version
from poetry.__version__ import __version__
from poetry.factory import Factory
if TYPE_CHECKING:
from cleo.t... | true | true |
1c209211bb1f9bf3b543b4e8cc7b100109237f32 | 379 | py | Python | raft/config.py | hangsz/raft | 024cad57d51fc78fcf046847bf422c98cc9ffa1b | [
"Apache-2.0"
] | 113 | 2019-11-19T03:02:09.000Z | 2022-03-20T07:32:15.000Z | raft/config.py | zhanglong3211/raft | 024cad57d51fc78fcf046847bf422c98cc9ffa1b | [
"Apache-2.0"
] | 5 | 2019-11-19T03:02:54.000Z | 2021-05-14T07:00:29.000Z | raft/config.py | zhanglong3211/raft | 024cad57d51fc78fcf046847bf422c98cc9ffa1b | [
"Apache-2.0"
] | 36 | 2019-11-19T05:01:25.000Z | 2022-02-26T08:23:21.000Z | class Config(object):
ip = "localhost"
mport = 9998 # master port
sport = 9999 # slave port
cport = 11000 # client port
master_path = "data/master/"
slave_path = "data/slave/"
node_path = "data/node/"
class DevConfig(Config):
env = "DEV"
class ProdConfig(Config):
env = "PROD"... | 18.95 | 32 | 0.601583 | class Config(object):
ip = "localhost"
mport = 9998
sport = 9999
cport = 11000
master_path = "data/master/"
slave_path = "data/slave/"
node_path = "data/node/"
class DevConfig(Config):
env = "DEV"
class ProdConfig(Config):
env = "PROD"
config = {
"DEV": DevConfig,
... | true | true |
1c2092330d626da0f91cb1a6c564ec55a1b2f1ed | 15,644 | py | Python | xarm/x3/gpio.py | tutorintelligence/xArm-Python-SDK | 25e1328d94629277cceb76d0830e41f2402afa2c | [
"BSD-3-Clause"
] | null | null | null | xarm/x3/gpio.py | tutorintelligence/xArm-Python-SDK | 25e1328d94629277cceb76d0830e41f2402afa2c | [
"BSD-3-Clause"
] | null | null | null | xarm/x3/gpio.py | tutorintelligence/xArm-Python-SDK | 25e1328d94629277cceb76d0830e41f2402afa2c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2019, UFACTORY, Inc.
# All rights reserved.
#
# Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com>
import time
from ..core.utils.log import logger
from ..core.config.x_config import XCONF
from .code import APIState
from .ba... | 43.096419 | 199 | 0.577729 |
import time
from ..core.utils.log import logger
from ..core.config.x_config import XCONF
from .code import APIState
from .base import Base
from .decorator import xarm_is_connected, xarm_is_ready, xarm_wait_until_not_pause, xarm_is_not_simulation_mode, xarm_wait_until_cmdnum_lt_max
class GPIO(Base):
def __... | true | true |
1c20925b1235f928b0a79a92682469f4cfea3e03 | 40,297 | py | Python | nuggetemoji/bot.py | LimeProgramming/NuggetEmoji | 889a6a3f66013f372ddfc6ea19260d2557a8651c | [
"MIT"
] | null | null | null | nuggetemoji/bot.py | LimeProgramming/NuggetEmoji | 889a6a3f66013f372ddfc6ea19260d2557a8651c | [
"MIT"
] | null | null | null | nuggetemoji/bot.py | LimeProgramming/NuggetEmoji | 889a6a3f66013f372ddfc6ea19260d2557a8651c | [
"MIT"
] | null | null | null | import re
import sys
import json
import random
import asyncio
import aiohttp
import discord
import logging
import pathlib
import datetime
import traceback
from typing import Union, Optional, NoReturn
from discord.ext import commands
from collections.abc import Iterable
from .config import Config
from .util import exce... | 39.123301 | 281 | 0.556195 | import re
import sys
import json
import random
import asyncio
import aiohttp
import discord
import logging
import pathlib
import datetime
import traceback
from typing import Union, Optional, NoReturn
from discord.ext import commands
from collections.abc import Iterable
from .config import Config
from .util import exce... | true | true |
1c209494fb79c737a2f27fa389e47e02e9e97b8d | 1,210 | py | Python | azure/mgmt/network/v2017_03_01/models/vpn_client_parameters.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2017_03_01/models/vpn_client_parameters.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2017_03_01/models/vpn_client_parameters.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# C... | 35.588235 | 83 | 0.614876 |
from msrest.serialization import Model
class VpnClientParameters(Model):
_validation = {
'processor_architecture': {'required': True},
}
_attribute_map = {
'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'},
}
def __init__(self, pr... | true | true |
1c2094e1cb33fadf732f7e4a896e2efdf7270a85 | 153,110 | py | Python | QUANTAXIS/QAUtil/QADate_trade.py | sjtututu/QUANTAXIS | e9e20cdeda8b8d132433037b639a7e60f286a190 | [
"MIT"
] | 1 | 2019-11-02T14:42:52.000Z | 2019-11-02T14:42:52.000Z | QUANTAXIS/QAUtil/QADate_trade.py | sjtututu/QUANTAXIS | e9e20cdeda8b8d132433037b639a7e60f286a190 | [
"MIT"
] | null | null | null | QUANTAXIS/QAUtil/QADate_trade.py | sjtututu/QUANTAXIS | e9e20cdeda8b8d132433037b639a7e60f286a190 | [
"MIT"
] | null | null | null | # coding:utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2019 yutiansut/QUANTAXIS
#
# 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 limit... | 19.712888 | 163 | 0.429541 |
import datetime
import pandas as pd
from QUANTAXIS.QAUtil.QAParameter import MARKET_TYPE
trade_date_sse = [
'1990-12-19',
'1990-12-20',
'1990-12-21',
'1990-12-24',
'1990-12-25',
'1990-12-26',
'1990-12-27',
'1990-12-28',
'1990-12-31',
'... | true | true |
1c20957c0ba21d87507625b891c3eb875fb99dbc | 180 | py | Python | schedule/apps.py | goodhelpllc/django-scheduler | f240c7c9bd02ecea448155aadaf00ef41dbd9b29 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T16:13:33.000Z | 2020-10-27T16:13:33.000Z | schedule/apps.py | goodhelpllc/django-scheduler | f240c7c9bd02ecea448155aadaf00ef41dbd9b29 | [
"BSD-3-Clause"
] | null | null | null | schedule/apps.py | goodhelpllc/django-scheduler | f240c7c9bd02ecea448155aadaf00ef41dbd9b29 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T08:06:13.000Z | 2020-10-27T08:06:13.000Z | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class ScheduleConfig(AppConfig):
name = "schedule"
verbose_name = _("Schedules")
| 22.5 | 54 | 0.766667 | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class ScheduleConfig(AppConfig):
name = "schedule"
verbose_name = _("Schedules")
| true | true |
1c20989f9baf3fab2cc090c4991c53cb4be6374b | 34,609 | py | Python | my_happy_bokeh/models/annotations.py | ggservice007/my-happy-bokeh | 4d904e132e095d4551fb136cb012866daf1a4e15 | [
"Apache-2.0"
] | null | null | null | my_happy_bokeh/models/annotations.py | ggservice007/my-happy-bokeh | 4d904e132e095d4551fb136cb012866daf1a4e15 | [
"Apache-2.0"
] | 7 | 2021-02-06T08:56:52.000Z | 2021-02-08T10:33:59.000Z | my_happy_bokeh/models/annotations.py | ggservice007/my-happy-bokeh | 4d904e132e095d4551fb136cb012866daf1a4e15 | [
"Apache-2.0"
] | null | null | null | '''
Renderers for various kinds of annotations that can be added to
Bokeh plots
'''
#-----------------------------------------------------------------------------
# Boilerplate
#-----------------------------------------------------------------------------
import logging # isort:skip
log = logging.getLogger(__name__)
... | 30.736234 | 148 | 0.643532 |
import logging
log = logging.getLogger(__name__)
from ..core.enums import (
AngleUnits,
Dimension,
FontStyle,
LegendClickPolicy,
LegendLocation,
Orientation,
RenderMode,
SpatialUnits,
TextAlign,
TooltipAttachment,
VerticalAlign,
)
from ..core.has_props import abstra... | true | true |
1c20998317936c1a28fcc5067f3d8597db922a4d | 45,718 | py | Python | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | null | null | null | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_spark_job_definition_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 44.001925 | 170 | 0.666893 |
import functools
from typing import TYPE_CHECKING
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipelin... | true | true |
1c2099d05fc7efff72974a628ad0a52e7346efe5 | 79,377 | py | Python | neutron/tests/unit/db/test_agentschedulers_db.py | 1pintbeer/neutron | f5a827c2be06f24a1f8025f120f16c12eb1b1f55 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/db/test_agentschedulers_db.py | 1pintbeer/neutron | f5a827c2be06f24a1f8025f120f16c12eb1b1f55 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/db/test_agentschedulers_db.py | 1pintbeer/neutron | f5a827c2be06f24a1f8025f120f16c12eb1b1f55 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 OpenStack Foundation.
#
# 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... | 48.518949 | 79 | 0.595739 |
import datetime
import mock
from neutron_lib.api.definitions import dhcpagentscheduler as das_apidef
from neutron_lib import constants
from neutron_lib import context
from neutron_lib.db import api as db_api
from neutron_lib.plugins import constants as plugin_constants
from neutron_lib.plugins import di... | true | true |
1c2099f3122e0cbbea9c6e9c489013fa1c9ebb74 | 375 | py | Python | numpy/fft/_fft_build.py | Squarecap/numpy | 1172b039950db72ae8452e9f65b5fd7cac977a23 | [
"BSD-3-Clause"
] | null | null | null | numpy/fft/_fft_build.py | Squarecap/numpy | 1172b039950db72ae8452e9f65b5fd7cac977a23 | [
"BSD-3-Clause"
] | null | null | null | numpy/fft/_fft_build.py | Squarecap/numpy | 1172b039950db72ae8452e9f65b5fd7cac977a23 | [
"BSD-3-Clause"
] | null | null | null | from cffi import FFI
ffi = FFI()
ffi.cdef('''
void cffti(int n, double wsave[]);
void rffti(int n, double wsave[]);
void cfftf(int n, double c[], double wsave[]);
void cfftb(int n, double c[], double wsave[]);
void rfftf(int n, double r[], double wsave[]);
void rfftb(int n, double r[], double wsave[]);
''')
ffi.set... | 23.4375 | 61 | 0.658667 | from cffi import FFI
ffi = FFI()
ffi.cdef('''
void cffti(int n, double wsave[]);
void rffti(int n, double wsave[]);
void cfftf(int n, double c[], double wsave[]);
void cfftb(int n, double c[], double wsave[]);
void rfftf(int n, double r[], double wsave[]);
void rfftb(int n, double r[], double wsave[]);
''')
ffi.set... | true | true |
1c209a160efac7738a7e8469f38fc5cc8751a318 | 20,633 | py | Python | model.py | yanfei-zhang-95/CT-Recon_ | bfe1d9d0b269129847fd8ecf0b654ebda6b15ec4 | [
"MIT"
] | null | null | null | model.py | yanfei-zhang-95/CT-Recon_ | bfe1d9d0b269129847fd8ecf0b654ebda6b15ec4 | [
"MIT"
] | null | null | null | model.py | yanfei-zhang-95/CT-Recon_ | bfe1d9d0b269129847fd8ecf0b654ebda6b15ec4 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import tensorlayer as tl
import tensorflow.keras as keras
class modelComponents():
@staticmethod
def tensorial_neural_block(x, new_shape1, new_shape2, new_shape3, scope, actv = tf.nn.sigmoid, isIN = True, isActv = True):
with tf.variable_scope(scope):
... | 45.64823 | 177 | 0.602094 | import numpy as np
import tensorflow as tf
import tensorlayer as tl
import tensorflow.keras as keras
class modelComponents():
@staticmethod
def tensorial_neural_block(x, new_shape1, new_shape2, new_shape3, scope, actv = tf.nn.sigmoid, isIN = True, isActv = True):
with tf.variable_scope(scope):
... | true | true |
1c209a995536cb92ee7222a4fa742ebce0687898 | 380 | py | Python | donkeycar/__init__.py | 991693552/donkeycar-pi | f629f69c4a2c3d167e59525e3eedc4c0a7991cba | [
"MIT"
] | 6 | 2019-06-05T02:25:55.000Z | 2021-06-21T13:48:58.000Z | donkeycar/__init__.py | 991693552/donkeycar_jetson_nano | 0656898c14099f105f82945dd481cc6ce606b103 | [
"MIT"
] | null | null | null | donkeycar/__init__.py | 991693552/donkeycar_jetson_nano | 0656898c14099f105f82945dd481cc6ce606b103 | [
"MIT"
] | 4 | 2019-06-19T07:04:10.000Z | 2020-03-12T08:10:57.000Z | __version__ = '2.5.8'
print('using donkey v{} ...'.format(__version__))
import sys
if sys.version_info.major < 3:
msg = 'Donkey Requires Python 3.4 or greater. You are using {}'.format(sys.version)
raise ValueError(msg)
from . import parts
from .vehicle import Vehicle
from .memory import Memory
from . impor... | 22.352941 | 87 | 0.728947 | __version__ = '2.5.8'
print('using donkey v{} ...'.format(__version__))
import sys
if sys.version_info.major < 3:
msg = 'Donkey Requires Python 3.4 or greater. You are using {}'.format(sys.version)
raise ValueError(msg)
from . import parts
from .vehicle import Vehicle
from .memory import Memory
from . impor... | true | true |
1c209ab98d6d79ce094e3629639c89f4e40d7e89 | 2,859 | py | Python | nova/api/openstack/compute/block_device_mapping.py | nicholaskuechler/nova | ff412c3888b234eb123161cc4e6d0d0d69c0004e | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/block_device_mapping.py | nicholaskuechler/nova | ff412c3888b234eb123161cc4e6d0d0d69c0004e | [
"Apache-2.0"
] | 1 | 2021-03-21T11:39:52.000Z | 2021-03-21T11:39:52.000Z | nova/api/openstack/compute/block_device_mapping.py | nicholaskuechler/nova | ff412c3888b234eb123161cc4e6d0d0d69c0004e | [
"Apache-2.0"
] | 1 | 2021-03-21T11:37:33.000Z | 2021-03-21T11:37:33.000Z | # Copyright 2013 OpenStack Foundation
# 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 requ... | 36.653846 | 79 | 0.693949 |
from webob import exc
from nova.api.openstack.compute.schemas import block_device_mapping as \
schema_block_device_mapping
from nova.api.openstack import extensions
from nova import block_device
from nova import exception
from nova.i18n import _
ALIAS ... | true | true |
1c209bb759c959c856ac8727da1d3a9f8b9eb37b | 1,196 | py | Python | extras.py | my-isu-research/CutMix-PyTorch | 00870a196a39c6061c97972d797d34886589439d | [
"MIT"
] | null | null | null | extras.py | my-isu-research/CutMix-PyTorch | 00870a196a39c6061c97972d797d34886589439d | [
"MIT"
] | null | null | null | extras.py | my-isu-research/CutMix-PyTorch | 00870a196a39c6061c97972d797d34886589439d | [
"MIT"
] | null | null | null | import torchvision.transforms as transforms
import os
import torchvision.datasets as datasets
import torch.nn as nn
def get_base_transform(img_size = 32,
mean = [x / 255.0 for x in [125.3, 123.0, 113.9]],
std = [x / 255.0 for x in [63.0, 62.1, 66.7]]):
normalize = transforms.Normalize(mean, std)
tran... | 31.473684 | 94 | 0.7199 | import torchvision.transforms as transforms
import os
import torchvision.datasets as datasets
import torch.nn as nn
def get_base_transform(img_size = 32,
mean = [x / 255.0 for x in [125.3, 123.0, 113.9]],
std = [x / 255.0 for x in [63.0, 62.1, 66.7]]):
normalize = transforms.Normalize(mean, std)
tran... | true | true |
1c209c4c16a4c583c81094870e318bc2ab1101ff | 5,054 | py | Python | Projects/ABM_DA/experiments/ukf_experiments/tests/ex1_tests.py | RobertClay/DUST-RC | 09f7ec9d8d093021d068dff8a7a48c15ea318b86 | [
"MIT"
] | 15 | 2018-11-21T14:57:24.000Z | 2022-03-04T15:42:09.000Z | Projects/ABM_DA/experiments/ukf_experiments/tests/ex1_tests.py | RobertClay/DUST-RC | 09f7ec9d8d093021d068dff8a7a48c15ea318b86 | [
"MIT"
] | 125 | 2019-11-06T13:03:35.000Z | 2022-03-07T13:38:33.000Z | Projects/ABM_DA/experiments/ukf_experiments/tests/ex1_tests.py | RobertClay/DUST-RC | 09f7ec9d8d093021d068dff8a7a48c15ea318b86 | [
"MIT"
] | 6 | 2018-11-20T15:56:49.000Z | 2021-10-08T10:21:06.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 17 15:00:50 2020
@author: medrclaa
"""
import os
"if running this file on its own. this will move cwd up to ukf_experiments."
if os.path.split(os.getcwd())[1] != "ukf_experiments":
os.chdir("..")
import numpy as np
from numpy.testing import... | 25.525253 | 84 | 0.553027 |
import os
if os.path.split(os.getcwd())[1] != "ukf_experiments":
os.chdir("..")
import numpy as np
from numpy.testing import assert_array_equal as aae
import unittest
import sys
import math
from modules.ukf_ex1 import omission_index, hx1, ex1_main, obs_key_func
from modules import ukf_fx
class Test_ex1(... | true | true |
1c209d376fc2e5cb44405925db17257ddc8911c6 | 22,979 | py | Python | src/azure-cli/azure/cli/command_modules/network/_template_builder.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 3,287 | 2016-07-26T17:34:33.000Z | 2022-03-31T09:52:13.000Z | src/azure-cli/azure/cli/command_modules/network/_template_builder.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 19,206 | 2016-07-26T07:04:42.000Z | 2022-03-31T23:57:09.000Z | src/azure-cli/azure/cli/command_modules/network/_template_builder.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 2,575 | 2016-07-26T06:44:40.000Z | 2022-03-31T22:56:06.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 45.413043 | 119 | 0.549023 |
def _build_frontend_ip_config(cmd, name, public_ip_id=None, subnet_id=None, private_ip_address=None,
private_ip_allocation=None, zone=None, private_ip_address_version=None,
enable_private_link=False,
private_link_configurati... | true | true |
1c209dd42c58030a4a55420032db0199ae0a32e0 | 9,297 | py | Python | pyabc/sampler/redis_eps/cli.py | j-zimmermann/pyABC | fde3f97978297ad7a09528d1e18ff3580c91e8d9 | [
"BSD-3-Clause"
] | null | null | null | pyabc/sampler/redis_eps/cli.py | j-zimmermann/pyABC | fde3f97978297ad7a09528d1e18ff3580c91e8d9 | [
"BSD-3-Clause"
] | null | null | null | pyabc/sampler/redis_eps/cli.py | j-zimmermann/pyABC | fde3f97978297ad7a09528d1e18ff3580c91e8d9 | [
"BSD-3-Clause"
] | null | null | null | import sys
import socket
import signal
from redis import StrictRedis
import pickle
import os
import cloudpickle
from time import time
import click
from .redis_logging import logger
from .cmd import (N_EVAL, N_ACC, N_REQ, ALL_ACCEPTED,
N_WORKER, SSA, QUEUE, START, STOP,
MSG, BATCH_SIZ... | 33.807273 | 79 | 0.582446 | import sys
import socket
import signal
from redis import StrictRedis
import pickle
import os
import cloudpickle
from time import time
import click
from .redis_logging import logger
from .cmd import (N_EVAL, N_ACC, N_REQ, ALL_ACCEPTED,
N_WORKER, SSA, QUEUE, START, STOP,
MSG, BATCH_SIZ... | true | true |
1c209e41c59a6bf84d2eaa4cb3653d12da5de739 | 3,029 | py | Python | pyrobolearn/robots/noise/gaussian_noise.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | 2 | 2021-01-21T21:08:30.000Z | 2022-03-29T16:45:49.000Z | pyrobolearn/robots/noise/gaussian_noise.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | null | null | null | pyrobolearn/robots/noise/gaussian_noise.py | Pandinosaurus/pyrobolearn | 9cd7c060723fda7d2779fa255ac998c2c82b8436 | [
"Apache-2.0"
] | 1 | 2020-09-29T21:25:39.000Z | 2020-09-29T21:25:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Define the Gaussian noise class.
This noise can be applied notably on sensors and actuators.
"""
import numpy as np
from pyrobolearn.robots.noise.noise import Noise
__author__ = "Brian Delhaisse"
__copyright__ = "Copyright 2019, PyRoboLearn"
__credits__ = ["Brian Del... | 34.816092 | 108 | 0.593595 |
import numpy as np
from pyrobolearn.robots.noise.noise import Noise
__author__ = "Brian Delhaisse"
__copyright__ = "Copyright 2019, PyRoboLearn"
__credits__ = ["Brian Delhaisse"]
__license__ = "GNU GPLv3"
__version__ = "1.0.0"
__maintainer__ = "Brian Delhaisse"
__email__ = "briandelhaisse@gmail.com"
__status__ = "... | true | true |
1c209f411d265c04362e3c2728b7f510236f3a00 | 10,165 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/community/grafana/plugins/modules/grafana_user.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/community/grafana/plugins/modules/grafana_user.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/community/grafana/plugins/modules/grafana_user.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... | 33.770764 | 146 | 0.651943 |
from __future__ import absolute_import, division, print_function
DOCUMENTATION = '''
---
module: grafana_user
author:
- Antoine Tanzilli (@Tailzip)
- Hong Viet LE (@pomverte)
- Julien Alexandre (@jual)
- Marc Cyprien (@LeFameux)
version_added: "1.0.0"
short_description: Manage Grafana User
d... | true | true |
1c209f61d9e0ba571c28bde1a5f81534e705185e | 3,269 | py | Python | dump_images.py | kemaloksuz/fullgrad-saliency | afa1a55ebf36ac195a90f6e82dc617fcc7c11d72 | [
"MIT"
] | 1 | 2019-11-28T21:01:52.000Z | 2019-11-28T21:01:52.000Z | dump_images.py | kemaloksuz/fullgrad-saliency | afa1a55ebf36ac195a90f6e82dc617fcc7c11d72 | [
"MIT"
] | null | null | null | dump_images.py | kemaloksuz/fullgrad-saliency | afa1a55ebf36ac195a90f6e82dc617fcc7c11d72 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/
# Written by Suraj Srinivas <suraj.srinivas@idiap.ch>
#
""" Compute saliency maps of images from dataset folder
and dump them in a results folder """
import torch
from torchvision import datasets, transforms, utils
import os
# Import saliency ... | 30.839623 | 83 | 0.681554 |
import torch
from torchvision import datasets, transforms, utils
import os
from saliency.fullgrad import FullGrad
from saliency.simple_fullgrad import SimpleFullGrad
from models.vgg import *
from models.resnet import *
from misc_functions import *
import pdb
from mmcv.parallel import MMDataParallel
def init_mo... | true | true |
1c209f7fdd68f90273686829f8f219e82af2309d | 328 | py | Python | construction/config/docs.py | erpcloudsystems/construction | d2bc6f012d2b3490f41c7d43fedec5ed214c2a5d | [
"MIT"
] | null | null | null | construction/config/docs.py | erpcloudsystems/construction | d2bc6f012d2b3490f41c7d43fedec5ed214c2a5d | [
"MIT"
] | null | null | null | construction/config/docs.py | erpcloudsystems/construction | d2bc6f012d2b3490f41c7d43fedec5ed214c2a5d | [
"MIT"
] | 1 | 2021-04-13T12:31:59.000Z | 2021-04-13T12:31:59.000Z | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/construction"
# docs_base_url = "https://[org_name].github.io/construction"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "Constr... | 27.333333 | 68 | 0.734756 |
def get_context(context):
context.brand_html = "Construction"
| true | true |
1c209f93fc4cb71386afa80ee133079eaf7335c0 | 3,335 | py | Python | src/area-charts/stackedarea.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/area-charts/stackedarea.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/area-charts/stackedarea.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | #Stacked area plots -
#These work in the same way as area graphs do, but they use multiple data series that start each point
#from the point left by the previous data series. The entire graph represents the total of all data plotted.
#They are useful, overall, for comparing multiple variables changing over an interva... | 29 | 162 | 0.675862 |
import pandas as pd
import numpy as np
import matplotlib.cm as cmp
import matplotlib.colors as cl
import matplotlib.pyplot as plt
import matplotlib.patches as mp
import plotly.graph_objects as go
import plotly.express as px
from scipy import stats
area_labels = ['Breaststroke', 'Backstroke', 'Butterfly', 'Med... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.