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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f777d8ffffd5a01c2395b5687a6b0cf1cd4d6499 | 7,257 | py | Python | test/redis_client/redis_client.py | nikhilc149/e-utran-features-bug-fixes | 4e9d08b54c9181e9790208556ddd716907f7d3d9 | [
"Apache-2.0"
] | null | null | null | test/redis_client/redis_client.py | nikhilc149/e-utran-features-bug-fixes | 4e9d08b54c9181e9790208556ddd716907f7d3d9 | [
"Apache-2.0"
] | null | null | null | test/redis_client/redis_client.py | nikhilc149/e-utran-features-bug-fixes | 4e9d08b54c9181e9790208556ddd716907f7d3d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
####################################
#
# Redis Test Script
#
####################################
import redis
import sys
import pydoc
import os
import datetime
import pytz
import time
import csv
# Macros
CONNECTED_CP_KEY_NAME = "connected_cp"
NUM_CDR_PARAM = 68
REDIS_CERT_PATH = '../../config... | 32.542601 | 126 | 0.461761 |
import redis
import sys
import pydoc
import os
import datetime
import pytz
import time
import csv
CONNECTED_CP_KEY_NAME = "connected_cp"
NUM_CDR_PARAM = 68
REDIS_CERT_PATH = '../../config/redis_cert/redis.crt'
REDIS_KEY_PATH = '../../config/redis_cert/redis.key'
REDIS_CA_CERT_PATH = '../../config/redis_cert/ca.crt'... | false | true |
f777da444e6594f1194076611b0c78f80707cf07 | 21,297 | py | Python | ares/sources/Source.py | JJHibbard/ares | 4b185747f2182524d732ef8316bff3a709bd85f2 | [
"MIT"
] | null | null | null | ares/sources/Source.py | JJHibbard/ares | 4b185747f2182524d732ef8316bff3a709bd85f2 | [
"MIT"
] | null | null | null | ares/sources/Source.py | JJHibbard/ares | 4b185747f2182524d732ef8316bff3a709bd85f2 | [
"MIT"
] | 1 | 2021-06-16T23:13:56.000Z | 2021-06-16T23:13:56.000Z | """
Source.py
Author: Jordan Mirocha
Affiliation: University of Colorado at Boulder
Created on: Sun Jul 22 16:28:08 2012
Description: Initialize a radiation source.
"""
from __future__ import print_function
import re, os
import numpy as np
from scipy.integrate import quad
from ..util import ParameterFile
from ..phy... | 32.122172 | 101 | 0.559609 | from __future__ import print_function
import re, os
import numpy as np
from scipy.integrate import quad
from ..util import ParameterFile
from ..physics.Hydrogen import Hydrogen
from ..physics.Cosmology import Cosmology
from ..util.ParameterFile import ParameterFile
from ..static.IntegralTables import IntegralTable
from... | true | true |
f777dacd344e43d50776c56c0ce5f0d1e4106475 | 1,982 | py | Python | nicos_mlz/panda/setups/kelvinox.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/panda/setups/kelvinox.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-08-18T10:55:42.000Z | 2021-08-18T10:55:42.000Z | nicos_mlz/panda/setups/kelvinox.py | ISISComputingGroup/nicos | 94cb4d172815919481f8c6ee686f21ebb76f2068 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
description = 'Kelvinox from Panda with labview-control'
group = 'optional'
includes = ['alias_T']
devices = dict(
# DONT CHANGE THESE NAMES OR THE LABVIEW PART WONT WORK ANYMORE !
mc = device('nicos.devices.generic.CacheWriter',
description = 'Mixing chamber temperature',
... | 26.426667 | 69 | 0.524218 |
description = 'Kelvinox from Panda with labview-control'
group = 'optional'
includes = ['alias_T']
devices = dict(
mc = device('nicos.devices.generic.CacheWriter',
description = 'Mixing chamber temperature',
userlimits = (0.01, 6),
abslimits = (0.01, 6),
fmtstr = '%.3f',
... | true | true |
f777daea861a39495ddb3df87a0353db25df58c1 | 34,954 | py | Python | skbeam/core/accumulators/binned_statistic.py | xxxxHolic/scikit-beam | d1b4e746ff3daba8d0e8d5163259462fc9298b9a | [
"BSD-3-Clause"
] | 1 | 2018-10-12T02:01:02.000Z | 2018-10-12T02:01:02.000Z | skbeam/core/accumulators/binned_statistic.py | xxxxHolic/scikit-beam | d1b4e746ff3daba8d0e8d5163259462fc9298b9a | [
"BSD-3-Clause"
] | null | null | null | skbeam/core/accumulators/binned_statistic.py | xxxxHolic/scikit-beam | d1b4e746ff3daba8d0e8d5163259462fc9298b9a | [
"BSD-3-Clause"
] | null | null | null | """
Copyright 2001, 2002 Enthought, Inc.
All rights reserved.
Copyright 2003-2013 SciPy Developers.
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 abov... | 44.189633 | 79 | 0.576386 |
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from ..utils import radial_grid, angle_grid, bin_edges_to_centers
class BinnedStatisticDD(object):
std_ = ('mean', 'median', 'count', 'sum', 'std')
def __init__(self, sample, statistic='mean',
... | true | true |
f777dc81e176a46f144e04df3af6660d19838a15 | 3,397 | py | Python | tests/unit/test_umain.py | kellrott/udocker | 16a16de21a24f93a01331359b91884f406342737 | [
"Apache-2.0"
] | 963 | 2016-05-31T12:20:14.000Z | 2022-03-29T17:52:10.000Z | tests/unit/test_umain.py | ericcurtin/udocker | 87fb41cb5bcdb211d70f2b7f067c8e33d8959a1f | [
"Apache-2.0"
] | 212 | 2016-07-11T10:45:14.000Z | 2022-03-05T08:13:38.000Z | tests/unit/test_umain.py | ericcurtin/udocker | 87fb41cb5bcdb211d70f2b7f067c8e33d8959a1f | [
"Apache-2.0"
] | 124 | 2016-07-22T06:32:37.000Z | 2022-02-25T23:55:48.000Z | #!/usr/bin/env python
"""
udocker unit tests: UMain
"""
from unittest import TestCase, main
from unittest.mock import patch
from udocker.umain import UMain
from udocker.config import Config
class UMainTestCase(TestCase):
"""Test UMain() class main udocker program."""
def setUp(self):
Config().getcon... | 32.663462 | 66 | 0.619959 |
from unittest import TestCase, main
from unittest.mock import patch
from udocker.umain import UMain
from udocker.config import Config
class UMainTestCase(TestCase):
def setUp(self):
Config().getconf()
def tearDown(self):
pass
def test_01_init(self):
argv = ["udocker", "-h"]
... | true | true |
f777dd3b9f32d175f571a8df3b9f417f54bb3d24 | 5,714 | py | Python | modul_entityLinking.py | heikeadel/slot_filling_system | 2ba9cd6d72dbaaf6d86ee2b0caa76eb9e64619e7 | [
"MIT"
] | null | null | null | modul_entityLinking.py | heikeadel/slot_filling_system | 2ba9cd6d72dbaaf6d86ee2b0caa76eb9e64619e7 | [
"MIT"
] | null | null | null | modul_entityLinking.py | heikeadel/slot_filling_system | 2ba9cd6d72dbaaf6d86ee2b0caa76eb9e64619e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#####################################
### CIS SLOT FILLING SYSTEM ####
### 2014-2015 ####
### Author: Heike Adel ####
#####################################
from __future__ import unicode_literals
import codecs, sys
reload(sys)
sys.setdefaulte... | 40.524823 | 140 | 0.616381 |
from __future__ import unicode_literals
import codecs, sys
reload(sys)
sys.setdefaultencoding('utf-8')
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
sys.stderr = codecs.getwriter('utf8')(sys.stderr)
import requests
import re
import json
class EntityLinking:
def getWikiIdWAT(self, text, entity): self.logge... | false | true |
f777dd6381658a66b7858bf4df6bf732a81f0957 | 635 | py | Python | setup.py | sancho1952007/pynodejs | 996a0de344f4bd132bf249318e6487e2ab48cb4f | [
"MIT"
] | null | null | null | setup.py | sancho1952007/pynodejs | 996a0de344f4bd132bf249318e6487e2ab48cb4f | [
"MIT"
] | null | null | null | setup.py | sancho1952007/pynodejs | 996a0de344f4bd132bf249318e6487e2ab48cb4f | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup_args=dict(
name="PyNodeJS",
version='1.0',
author="Sancho Godinho",
description="A Module to Use Some Node JS Keywords In Python!",
long_description="Please See Docs on: https://github.com/sancho1952007/PyNodeJS",
packages=["pynodejs"],
... | 35.277778 | 86 | 0.685039 | from setuptools import setup, find_packages
setup_args=dict(
name="PyNodeJS",
version='1.0',
author="Sancho Godinho",
description="A Module to Use Some Node JS Keywords In Python!",
long_description="Please See Docs on: https://github.com/sancho1952007/PyNodeJS",
packages=["pynodejs"],
... | true | true |
f777de3d8ce60adc0f69393caac24f7309148b57 | 6,548 | py | Python | recipes/libsodium/all/conanfile.py | dyndrite/conan-center-index | 106b5c2f532d5129e7ca1997e29e4e105bb3018c | [
"MIT"
] | null | null | null | recipes/libsodium/all/conanfile.py | dyndrite/conan-center-index | 106b5c2f532d5129e7ca1997e29e4e105bb3018c | [
"MIT"
] | null | null | null | recipes/libsodium/all/conanfile.py | dyndrite/conan-center-index | 106b5c2f532d5129e7ca1997e29e4e105bb3018c | [
"MIT"
] | null | null | null | from conan.tools.microsoft import msvc_runtime_flag
from conans import ConanFile, AutoToolsBuildEnvironment, tools, MSBuild
from conans.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.43.0"
class LibsodiumConan(ConanFile):
name = "libsodium"
description = "A modern and easy-to... | 37.632184 | 134 | 0.593616 | from conan.tools.microsoft import msvc_runtime_flag
from conans import ConanFile, AutoToolsBuildEnvironment, tools, MSBuild
from conans.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.43.0"
class LibsodiumConan(ConanFile):
name = "libsodium"
description = "A modern and easy-to... | true | true |
f777de4c285edadea330d44cf2c685bac3e318c5 | 7,769 | py | Python | torch_stft/stft.py | Wliubei/Multiple-Resolutionse | 3d8a9a725a00e5f9a2ac3b2b9659bc22b3876f75 | [
"Unlicense"
] | null | null | null | torch_stft/stft.py | Wliubei/Multiple-Resolutionse | 3d8a9a725a00e5f9a2ac3b2b9659bc22b3876f75 | [
"Unlicense"
] | null | null | null | torch_stft/stft.py | Wliubei/Multiple-Resolutionse | 3d8a9a725a00e5f9a2ac3b2b9659bc22b3876f75 | [
"Unlicense"
] | null | null | null | import torch
import numpy as np
import torch.nn.functional as F
from scipy.signal import get_window
from librosa.util import pad_center, tiny
from .util import window_sumsquare
import librosa
class STFT(torch.nn.Module):
def __init__(self, filter_length=1724, hop_length=130, win_length=None,
window... | 42.222826 | 114 | 0.614236 | import torch
import numpy as np
import torch.nn.functional as F
from scipy.signal import get_window
from librosa.util import pad_center, tiny
from .util import window_sumsquare
import librosa
class STFT(torch.nn.Module):
def __init__(self, filter_length=1724, hop_length=130, win_length=None,
window... | true | true |
f777e01091f2f835c89cbaf3381e40063c437664 | 3,513 | py | Python | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/rest_lock_site_view_req_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/rest_lock_site_view_req_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/rest_lock_site_view_req_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class RestLockSiteViewReqBody:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the ... | 25.830882 | 82 | 0.557928 |
import pprint
import re
import six
class RestLockSiteViewReqBody:
sensitive_list = []
openapi_types = {
'status': 'int',
'participant_id': 'str'
}
attribute_map = {
'status': 'status',
'participant_id': 'participantID'
}
def __init__(self, status=None... | true | true |
f777e1fcf2ee5371e4440ede1a45756409177566 | 2,232 | py | Python | frontend/assets/backup/AutoHotPy-master/Example1-GameCombo.py | ruslanmv/BOT-MMORPG-AI | f5e8badfd9b067aefd8d905623faafb313382e28 | [
"MIT"
] | 6 | 2021-12-13T13:50:26.000Z | 2022-03-12T03:18:48.000Z | frontend/assets/backup/AutoHotPy-master/Example1-GameCombo.py | ruslanmv/BOT-MMORPG-AI | f5e8badfd9b067aefd8d905623faafb313382e28 | [
"MIT"
] | null | null | null | frontend/assets/backup/AutoHotPy-master/Example1-GameCombo.py | ruslanmv/BOT-MMORPG-AI | f5e8badfd9b067aefd8d905623faafb313382e28 | [
"MIT"
] | 2 | 2022-03-05T05:42:43.000Z | 2022-03-29T12:20:25.000Z | # -*- coding: utf-8 -*-
"""
@author: Emilio Moretti
Copyright 2013 Emilio Moretti <emilio.morettiATgmailDOTcom>
This program is distributed under the terms of the GNU Lesser General Public License.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public ... | 42.923077 | 133 | 0.732975 |
from AutoHotPy import AutoHotPy
def exitAutoHotKey(autohotpy,event):
autohotpy.stop()
def superCombo(autohotpy,event):
autohotpy.A.press() autohotpy.S.press()
autohotpy.LEFT_ARROW.press()
autohotpy.UP_ARROW.press()
autohotpy.A.press()
autohotpy.S.press()
if __name__=="__main__":
... | true | true |
f777e208af2185aea29612db564f56eb664ddf1a | 204 | py | Python | api/modules/os/path.py | gmaliar/tilt.build | 6179471fc5cf2bd1b03cfd0a32cfc5d01095fd89 | [
"Apache-2.0"
] | null | null | null | api/modules/os/path.py | gmaliar/tilt.build | 6179471fc5cf2bd1b03cfd0a32cfc5d01095fd89 | [
"Apache-2.0"
] | null | null | null | api/modules/os/path.py | gmaliar/tilt.build | 6179471fc5cf2bd1b03cfd0a32cfc5d01095fd89 | [
"Apache-2.0"
] | null | null | null | def realpath(path: str) -> str:
"""Return the canonical path of the specified filename, eliminating any symbolic links encountered in the path (if they are supported by the operating system)."""
pass
| 51 | 164 | 0.754902 | def realpath(path: str) -> str:
pass
| true | true |
f777e27663ff0a901ebf24e8b0eb3b752e4cc5ac | 4,465 | py | Python | c7n/resources/glue.py | gleework/cloud-custodian | 44e50a139531b127702e8c46a8bb51964b9c65c7 | [
"Apache-2.0"
] | null | null | null | c7n/resources/glue.py | gleework/cloud-custodian | 44e50a139531b127702e8c46a8bb51964b9c65c7 | [
"Apache-2.0"
] | 1 | 2018-06-05T20:40:02.000Z | 2018-06-05T21:15:51.000Z | c7n/resources/glue.py | gleework/cloud-custodian | 44e50a139531b127702e8c46a8bb51964b9c65c7 | [
"Apache-2.0"
] | 1 | 2021-06-09T21:22:02.000Z | 2021-06-09T21:22:02.000Z | # Copyright 2016-2017 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 ... | 31.892857 | 88 | 0.665398 | from __future__ import absolute_import, division, print_function, unicode_literals
from botocore.exceptions import ClientError
from concurrent.futures import as_completed
from c7n.manager import resources
from c7n.query import QueryResourceManager
from c7n.utils import local_session, chunks, type_schema
from c7n.acti... | true | true |
f777e291c0d54d362ae7c71415f040929a0178b8 | 821 | py | Python | bitbots_lowlevel/bitbots_ros_control/scripts/battery_led.py | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 3 | 2017-07-10T14:35:27.000Z | 2021-03-23T06:11:08.000Z | bitbots_lowlevel/bitbots_ros_control/scripts/battery_led.py | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 54 | 2018-12-18T12:52:19.000Z | 2022-03-30T04:25:04.000Z | bitbots_lowlevel/bitbots_ros_control/scripts/battery_led.py | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 1 | 2019-07-28T11:24:53.000Z | 2019-07-28T11:24:53.000Z | #!/usr/bin/env python3
import rospy
from std_msgs.msg import ColorRGBA, Float64
rospy.init_node("battery_led")
pub = rospy.Publisher("/led2", ColorRGBA, queue_size=1)
led_full = ColorRGBA()
led_full.a = 1.0
led_full.r = 0
led_full.g = 0
led_full.b = 1
led_mid = ColorRGBA()
led_mid.a = 1.0
led_mid.r = 0
led_mid.g =... | 17.104167 | 86 | 0.665043 |
import rospy
from std_msgs.msg import ColorRGBA, Float64
rospy.init_node("battery_led")
pub = rospy.Publisher("/led2", ColorRGBA, queue_size=1)
led_full = ColorRGBA()
led_full.a = 1.0
led_full.r = 0
led_full.g = 0
led_full.b = 1
led_mid = ColorRGBA()
led_mid.a = 1.0
led_mid.r = 0
led_mid.g = 1
led_mid.b = 0
led_l... | true | true |
f777e3259ff9597acf666d527d5534057245daa0 | 997 | py | Python | Scripts/Add_sphere_with_Modifiers.py | vitawebsitedesign/blender-python-scripts | b99e7695db32f8bb00ecbd5dc0cff4dff2f2e376 | [
"MIT"
] | null | null | null | Scripts/Add_sphere_with_Modifiers.py | vitawebsitedesign/blender-python-scripts | b99e7695db32f8bb00ecbd5dc0cff4dff2f2e376 | [
"MIT"
] | null | null | null | Scripts/Add_sphere_with_Modifiers.py | vitawebsitedesign/blender-python-scripts | b99e7695db32f8bb00ecbd5dc0cff4dff2f2e376 | [
"MIT"
] | null | null | null | import bpy # Imports the bpy module
from math import radians
# Creates a variable called my_cursor_location that stores the location of the 3D cursor
my_cursor_location = bpy.context.scene.cursor.location
# Creates a variable called x_cursor and stores the x location of the 3d cursor
x_cursor = my_cursor_location.x
y... | 33.233333 | 174 | 0.744233 | import bpy from math import radians
my_cursor_location = bpy.context.scene.cursor.location
x_cursor = my_cursor_location.x
y_cursor = my_cursor_location.y
z_cursor = my_cursor_location.z
x_rotation = radians(90)
for obj in range(10):
bpy.ops.mesh.primitive_uv_sphere_add(enter_editmode=False, align='WORLD', ... | true | true |
f777e50fed689e8ece6ec7d7ab2c292e4fc76d04 | 961 | py | Python | common/__init__.py | fzalkow/music_indexing | b7a0405f229f81d759e3fbe5a870da3532874afc | [
"MIT"
] | 1 | 2021-07-14T13:40:10.000Z | 2021-07-14T13:40:10.000Z | common/__init__.py | fzalkow/music_indexing | b7a0405f229f81d759e3fbe5a870da3532874afc | [
"MIT"
] | null | null | null | common/__init__.py | fzalkow/music_indexing | b7a0405f229f81d759e3fbe5a870da3532874afc | [
"MIT"
] | null | null | null | '''
File name: common/__init__.py
Author: Frank Zalkow
Date: 2020
License: MIT
This file is part of the following repository:
https://github.com/fzalkow/music_indexing
'''
import numpy as np
import librosa
CHROMA_DIMS = 12
def compute_features(fn_audio):
Fs = 22050
H = 2205
smooth = 41
downsample ... | 25.972973 | 110 | 0.663892 |
import numpy as np
import librosa
CHROMA_DIMS = 12
def compute_features(fn_audio):
Fs = 22050
H = 2205
smooth = 41
downsample = 10
x, _ = librosa.load(fn_audio, sr=Fs)
X_iirt = librosa.spectrum.iirt(x, sr=Fs, win_length=H*2, hop_length=H, center=True)
fmin = librosa.midi_to_hz(24)
X... | true | true |
f777e512e5bae2414d4d666d93198ffe34243d16 | 1,457 | py | Python | day04.py | jlucangelio/adventofcode-2021 | 99280ff2150eff692f01ce342931940558dfc2a3 | [
"MIT"
] | null | null | null | day04.py | jlucangelio/adventofcode-2021 | 99280ff2150eff692f01ce342931940558dfc2a3 | [
"MIT"
] | null | null | null | day04.py | jlucangelio/adventofcode-2021 | 99280ff2150eff692f01ce342931940558dfc2a3 | [
"MIT"
] | null | null | null | def wins(board):
r_5 = range(5)
for r in r_5:
if all([board[(r, j)] for j in r_5]):
return True
for c in r_5:
if all([board[(i, c)] for i in r_5]):
return True
def sum_board(board, called):
s = 0
for i in range(5):
for j in range(5):
if... | 23.126984 | 76 | 0.502402 | def wins(board):
r_5 = range(5)
for r in r_5:
if all([board[(r, j)] for j in r_5]):
return True
for c in r_5:
if all([board[(i, c)] for i in r_5]):
return True
def sum_board(board, called):
s = 0
for i in range(5):
for j in range(5):
if... | true | true |
f777e5530619e1a5fa3f0d35ce5bf0b9acf6a3d9 | 860 | py | Python | webapp/__init__.py | eude313/goal | 8ebc6c3fa3011d11ee106536e0b9d315b1f5cc2b | [
"MIT"
] | null | null | null | webapp/__init__.py | eude313/goal | 8ebc6c3fa3011d11ee106536e0b9d315b1f5cc2b | [
"MIT"
] | null | null | null | webapp/__init__.py | eude313/goal | 8ebc6c3fa3011d11ee106536e0b9d315b1f5cc2b | [
"MIT"
] | null | null | null | from flask import Flask
from config import config_options
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_bcrypt import Bcrypt
#creating app configuration
login_manager= LoginManager()
login_manager.login_view= 'signIn'
db = SQLAlchemy()
bcrypt = Bcrypt()
def create_app(config_... | 25.294118 | 55 | 0.77093 | from flask import Flask
from config import config_options
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_bcrypt import Bcrypt
login_manager= LoginManager()
login_manager.login_view= 'signIn'
db = SQLAlchemy()
bcrypt = Bcrypt()
def create_app(config_name):
app = Flask(__nam... | true | true |
f777e7c8fc449bb5d2b893ab62e48ccfffff02e9 | 670 | py | Python | portapp/migrations/0004_auto_20201229_2150.py | nmshohel/portfolio | f37090479c85d307a1c8cb7d95cce4172a1f63c4 | [
"MIT"
] | null | null | null | portapp/migrations/0004_auto_20201229_2150.py | nmshohel/portfolio | f37090479c85d307a1c8cb7d95cce4172a1f63c4 | [
"MIT"
] | null | null | null | portapp/migrations/0004_auto_20201229_2150.py | nmshohel/portfolio | f37090479c85d307a1c8cb7d95cce4172a1f63c4 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-29 18:50
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('portapp', '0003_work_bolumu_work_alt_baslik'),
]
operations = [
migrations.AddField(
model_name='wo... | 25.769231 | 70 | 0.619403 |
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('portapp', '0003_work_bolumu_work_alt_baslik'),
]
operations = [
migrations.AddField(
model_name='work_bolumu',
name='work_aciklama',
... | true | true |
f777e8324a18d16644e172229f87d4d2ef68036d | 6,527 | py | Python | aict_tools/scripts/plot_direction_performance.py | seinecke/aict-tools | 87601eba47d77385ac35145fd0b85d7aa7d66c71 | [
"MIT"
] | null | null | null | aict_tools/scripts/plot_direction_performance.py | seinecke/aict-tools | 87601eba47d77385ac35145fd0b85d7aa7d66c71 | [
"MIT"
] | null | null | null | aict_tools/scripts/plot_direction_performance.py | seinecke/aict-tools | 87601eba47d77385ac35145fd0b85d7aa7d66c71 | [
"MIT"
] | null | null | null | import click
import logging
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
import numpy as np
from sklearn.externals import joblib
from ..configuration import AICTConfig
import fact.io
from ..plotting import (
plot_roc,
plot_probabilities,
plot_regressor_confusion,
... | 40.042945 | 89 | 0.649916 | import click
import logging
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
import numpy as np
from sklearn.externals import joblib
from ..configuration import AICTConfig
import fact.io
from ..plotting import (
plot_roc,
plot_probabilities,
plot_regressor_confusion,
... | true | true |
f777e8af939672f9d19bfeceda28a24f9c47b84c | 1,087 | py | Python | code/helpers/aiomasTools.py | JosTorre/chordentlich | c87c5510d8a22a4e374b8a56a6f4baa7e9480641 | [
"Apache-2.0"
] | 16 | 2015-10-27T19:49:48.000Z | 2022-03-21T22:30:20.000Z | code/helpers/aiomasTools.py | JosTorre/chordentlich | c87c5510d8a22a4e374b8a56a6f4baa7e9480641 | [
"Apache-2.0"
] | null | null | null | code/helpers/aiomasTools.py | JosTorre/chordentlich | c87c5510d8a22a4e374b8a56a6f4baa7e9480641 | [
"Apache-2.0"
] | 6 | 2018-01-25T21:13:50.000Z | 2022-02-01T08:27:28.000Z | def aiomas_parse_url(url):
"""Parse the agent *url* and return a ``((host, port), agent)`` tuple.
Raise a :exc:`ValueError` if the URL cannot be parsed.
This function is taken from the aiomas library (https://bitbucket.org/ssc/aiomas).
"""
try:
proto, addr_aid = url... | 36.233333 | 90 | 0.48942 | def aiomas_parse_url(url):
try:
proto, addr_aid = url.split('://', 1)
if proto == 'tcp':
addr, aid = addr_aid.split('/', 1)
host, port = addr.rsplit(':', 1)
if host[0] == '[' and host[-1] == ']':
... | true | true |
f777e988582e7f56995b8ad739fa53ef9048fdb8 | 11,636 | py | Python | models/encoders/resnet_18.py | MoonBlvd/TFSegmentation | baa874237289227c99163fe119448579904a231f | [
"Apache-2.0"
] | null | null | null | models/encoders/resnet_18.py | MoonBlvd/TFSegmentation | baa874237289227c99163fe119448579904a231f | [
"Apache-2.0"
] | null | null | null | models/encoders/resnet_18.py | MoonBlvd/TFSegmentation | baa874237289227c99163fe119448579904a231f | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
from layers.utils import variable_summaries, variable_with_weight_decay
from utils.misc import timeit
from utils.misc import _debug
# import torchfile
import pickle
import pdb
class RESNET18:
"""
RESNET 18 Encoder class
"""
def __init__(self, x_input,
... | 39.578231 | 120 | 0.561447 | import tensorflow as tf
import numpy as np
from layers.utils import variable_summaries, variable_with_weight_decay
from utils.misc import timeit
from utils.misc import _debug
import pickle
import pdb
class RESNET18:
def __init__(self, x_input,
num_classes,
pretrained_path,
... | true | true |
f777eaf4a0cc33a9ad34a325ee87c47cd8f3244e | 2,039 | py | Python | transforms_test.py | daniel03c1/audio_augment | ee73bb0844e22c57c9cbeb129560da4a3853f77d | [
"MIT"
] | null | null | null | transforms_test.py | daniel03c1/audio_augment | ee73bb0844e22c57c9cbeb129560da4a3853f77d | [
"MIT"
] | 3 | 2021-03-12T08:55:05.000Z | 2021-03-17T05:29:15.000Z | transforms_test.py | daniel03c1/audio_augment | ee73bb0844e22c57c9cbeb129560da4a3853f77d | [
"MIT"
] | null | null | null | import PIL.Image
import PIL.ImageEnhance
import PIL.ImageOps
import numpy as np
import os
import random
import torch
import unittest
from transforms import *
class TransformsTest(unittest.TestCase):
def setUp(self):
self.pil_img = PIL.Image.open('test_img.jpeg')
self.np_img = np.arra... | 31.369231 | 81 | 0.621873 | import PIL.Image
import PIL.ImageEnhance
import PIL.ImageOps
import numpy as np
import os
import random
import torch
import unittest
from transforms import *
class TransformsTest(unittest.TestCase):
def setUp(self):
self.pil_img = PIL.Image.open('test_img.jpeg')
self.np_img = np.arra... | true | true |
f777ebf632ff210c7845a4ccc77709a49e203fcd | 11,791 | py | Python | test/test_c_parser.py | ethanhs/pegen | 94aaaf1a51b35d2d7971c09b7b8cdef2901bf667 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | test/test_c_parser.py | ethanhs/pegen | 94aaaf1a51b35d2d7971c09b7b8cdef2901bf667 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | test/test_c_parser.py | ethanhs/pegen | 94aaaf1a51b35d2d7971c09b7b8cdef2901bf667 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | import ast
from pathlib import PurePath
import textwrap
from typing import Optional, Sequence
import traceback
import pytest # type: ignore
from pegen.grammar_parser import GeneratedParser as GrammarParser
from pegen.testutil import parse_string, generate_parser_c_extension, generate_c_parser_source
def check_inpu... | 34.078035 | 129 | 0.629887 | import ast
from pathlib import PurePath
import textwrap
from typing import Optional, Sequence
import traceback
import pytest
from pegen.grammar_parser import GeneratedParser as GrammarParser
from pegen.testutil import parse_string, generate_parser_c_extension, generate_c_parser_source
def check_input_strings_for_g... | true | true |
f777ecd3e931ad5e4dc8da3a551bc09e516b624a | 7,890 | py | Python | tests/failure/test_aurorabridge_failure.py | bopopescu/peloton | ac6a2c444bcfc70b5b6f4bdbaef67af68a415ad1 | [
"Apache-2.0"
] | 617 | 2019-03-01T15:25:48.000Z | 2022-03-31T00:24:32.000Z | tests/failure/test_aurorabridge_failure.py | bopopescu/peloton | ac6a2c444bcfc70b5b6f4bdbaef67af68a415ad1 | [
"Apache-2.0"
] | 24 | 2019-03-11T03:38:38.000Z | 2021-03-25T22:30:15.000Z | tests/failure/test_aurorabridge_failure.py | bopopescu/peloton | ac6a2c444bcfc70b5b6f4bdbaef67af68a415ad1 | [
"Apache-2.0"
] | 64 | 2019-03-11T01:57:10.000Z | 2022-03-13T20:09:23.000Z | import logging
import pytest
import random
import time
from tests.integration.aurorabridge_test.client import api
from tests.integration.aurorabridge_test.util import (
assert_keys_equal,
get_job_update_request,
get_update_status,
start_job_update,
wait_for_rolled_forward,
wait_for_update_statu... | 37.932692 | 89 | 0.675285 | import logging
import pytest
import random
import time
from tests.integration.aurorabridge_test.client import api
from tests.integration.aurorabridge_test.util import (
assert_keys_equal,
get_job_update_request,
get_update_status,
start_job_update,
wait_for_rolled_forward,
wait_for_update_statu... | true | true |
f777ed7b58125aa59f840a60acda647309f15144 | 12,605 | py | Python | gym_pybullet_drones/control/DSLPIDControl.py | MFadhilArkan/gym-pybullet-drones | cc2e14da194682b2a5fb2f1a6ca7d047bf2dafae | [
"MIT"
] | null | null | null | gym_pybullet_drones/control/DSLPIDControl.py | MFadhilArkan/gym-pybullet-drones | cc2e14da194682b2a5fb2f1a6ca7d047bf2dafae | [
"MIT"
] | null | null | null | gym_pybullet_drones/control/DSLPIDControl.py | MFadhilArkan/gym-pybullet-drones | cc2e14da194682b2a5fb2f1a6ca7d047bf2dafae | [
"MIT"
] | null | null | null | import math
import numpy as np
import pybullet as p
from scipy.spatial.transform import Rotation
from gym_pybullet_drones.control.BaseControl import BaseControl
from gym_pybullet_drones.envs.BaseAviary import DroneModel, BaseAviary
class DSLPIDControl(BaseControl):
"""PID control class for Crazyflies.
Based ... | 45.505415 | 134 | 0.524712 | import math
import numpy as np
import pybullet as p
from scipy.spatial.transform import Rotation
from gym_pybullet_drones.control.BaseControl import BaseControl
from gym_pybullet_drones.envs.BaseAviary import DroneModel, BaseAviary
class DSLPIDControl(BaseControl):
def __init__(self,
drone_... | true | true |
f777ef065fc7bc68ffa3b969f760d8e3f99aa14e | 1,354 | py | Python | test/bindings/python/utrecht-test.py | mesozoic-drones/valhalla | cafc34e63f3189d017348391a18847e8250d2b30 | [
"MIT"
] | 1,947 | 2016-02-25T20:54:40.000Z | 2022-03-30T11:13:21.000Z | test/bindings/python/utrecht-test.py | mesozoic-drones/valhalla | cafc34e63f3189d017348391a18847e8250d2b30 | [
"MIT"
] | 2,635 | 2016-02-23T15:36:46.000Z | 2022-03-30T09:51:41.000Z | test/bindings/python/utrecht-test.py | mesozoic-drones/valhalla | cafc34e63f3189d017348391a18847e8250d2b30 | [
"MIT"
] | 472 | 2016-03-11T09:38:02.000Z | 2022-03-29T14:01:48.000Z | # -*- coding: utf-8 -*-
import sys
import os
import valhalla
import json
import re
def has_cyrillic(text):
"""
This is ensuring that the given text contains cyrllic characters
:param text: The text to validate
:return: Returns true if there are cyrillic characters
"""
# Note: The character r... | 41.030303 | 149 | 0.669129 |
import sys
import os
import valhalla
import json
import re
def has_cyrillic(text):
return bool(re.search('[\u0400-\u04FF]', text))
valhalla.Configure(sys.argv[1] if len(sys.argv) > 1 else os.path.dirname(os.path.abspath(__file__)) + '/valhalla.json')
actor = valhalla.Actor()
query = '{"locations":[{"la... | true | true |
f777ef5325fa1eca7a2f7f8ac23cace6a69d3ec4 | 3,669 | py | Python | review_scrape/review_scrape.py | mariana1412/FEUP-PRI | 9c72e8f41d073230cf91d27cfb3e55adb9718ed2 | [
"MIT"
] | null | null | null | review_scrape/review_scrape.py | mariana1412/FEUP-PRI | 9c72e8f41d073230cf91d27cfb3e55adb9718ed2 | [
"MIT"
] | null | null | null | review_scrape/review_scrape.py | mariana1412/FEUP-PRI | 9c72e8f41d073230cf91d27cfb3e55adb9718ed2 | [
"MIT"
] | 1 | 2022-03-22T17:37:24.000Z | 2022-03-22T17:37:24.000Z | import pandas as pd
import requests
import re
from bs4 import BeautifulSoup
from timeit import default_timer
import asyncio
from concurrent.futures import ThreadPoolExecutor
from threading import Thread
from queue import Empty, Queue
import signal
import sys
START_TIME = default_timer()
CLEANR = re.compile('<.*?>')
q... | 27.177778 | 101 | 0.581902 | import pandas as pd
import requests
import re
from bs4 import BeautifulSoup
from timeit import default_timer
import asyncio
from concurrent.futures import ThreadPoolExecutor
from threading import Thread
from queue import Empty, Queue
import signal
import sys
START_TIME = default_timer()
CLEANR = re.compile('<.*?>')
q... | true | true |
f777f0a76b0b1733c389aaedea0691c6183184e8 | 4,419 | py | Python | dask/dataframe/optimize.py | galipremsagar/dask | 134182e05009dbb20bd8e59ccf8bf771e5d4399a | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/optimize.py | galipremsagar/dask | 134182e05009dbb20bd8e59ccf8bf771e5d4399a | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/optimize.py | galipremsagar/dask | 134182e05009dbb20bd8e59ccf8bf771e5d4399a | [
"BSD-3-Clause"
] | null | null | null | """ Dataframe optimizations """
import operator
from dask.base import tokenize
from .. import config, core
from ..blockwise import Blockwise, fuse_roots, optimize_blockwise
from ..highlevelgraph import HighLevelGraph
from ..optimization import cull, fuse
from ..utils import ensure_dict
def optimize(dsk, keys, **kwa... | 31.791367 | 88 | 0.554198 | import operator
from dask.base import tokenize
from .. import config, core
from ..blockwise import Blockwise, fuse_roots, optimize_blockwise
from ..highlevelgraph import HighLevelGraph
from ..optimization import cull, fuse
from ..utils import ensure_dict
def optimize(dsk, keys, **kwargs):
if not isinstance(keys... | true | true |
f777f131bed4347ad7433a7e5b9b58b4dadca15b | 4,399 | py | Python | examples/materialized_paths/materialized_paths.py | mmeyer724/sqlalchemy | 330f112d4976786fba29b9a13c0e24dc3b3ef77c | [
"MIT"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | examples/materialized_paths/materialized_paths.py | mmeyer724/sqlalchemy | 330f112d4976786fba29b9a13c0e24dc3b3ef77c | [
"MIT"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | examples/materialized_paths/materialized_paths.py | mmeyer724/sqlalchemy | 330f112d4976786fba29b9a13c0e24dc3b3ef77c | [
"MIT"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | """Illustrates the "materialized paths" pattern.
Materialized paths is a way to represent a tree structure in SQL with fast
descendant and ancestor queries at the expense of moving nodes (which require
O(n) UPDATEs in the worst case, where n is the number of nodes in the tree). It
is a good balance in terms of perform... | 28.380645 | 79 | 0.607183 | from sqlalchemy import Column
from sqlalchemy import create_engine
from sqlalchemy import func
from sqlalchemy import Integer
from sqlalchemy import select
from sqlalchemy import String
from sqlalchemy.dialects.postgresql import ARRAY
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import fo... | true | true |
f777f158ac3bef6864ce106ea4fc0bf81ac73028 | 4,718 | py | Python | tests/models/validators/v3_1_1/jsd_eeef18d70b159f788b717e301dd3643.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 36 | 2021-05-18T16:24:19.000Z | 2022-03-05T13:44:41.000Z | tests/models/validators/v3_1_0/jsd_eeef18d70b159f788b717e301dd3643.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 15 | 2021-06-08T19:03:37.000Z | 2022-02-25T14:47:33.000Z | tests/models/validators/v3_1_1/jsd_eeef18d70b159f788b717e301dd3643.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 6 | 2021-06-10T09:32:01.000Z | 2022-01-12T08:34:39.000Z | # -*- coding: utf-8 -*-
"""Identity Services Engine getCSRs data model.
Copyright (c) 2021 Cisco and/or its affiliates.
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, includ... | 29.860759 | 82 | 0.430055 |
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
import fastjsonschema
import json
from ciscoisesdk.exceptions import MalformedRequest
from builtins import *
class JSONSchemaValidatorEeef18D70B159F788B717E301Dd3643(object):
def __init__(self):
sup... | true | true |
f777f17c38be1d159d116ecf9f5f418ef1cfe83b | 922 | py | Python | AMAO/apps/Aluno/views/views.py | arruda/amao | 83648aa2c408b1450d721b3072dc9db4b53edbb8 | [
"MIT"
] | 2 | 2017-04-26T14:08:02.000Z | 2017-09-01T13:10:17.000Z | AMAO/apps/Aluno/views/views.py | arruda/amao | 83648aa2c408b1450d721b3072dc9db4b53edbb8 | [
"MIT"
] | null | null | null | AMAO/apps/Aluno/views/views.py | arruda/amao | 83648aa2c408b1450d721b3072dc9db4b53edbb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.shortcuts import get_object_or_404, render_to_response
from django.views.generic.simple import direct_to_template
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from Aluno.models import Aluno
@login_required
def minhasAva... | 36.88 | 129 | 0.777657 |
from django.shortcuts import get_object_or_404, render_to_response
from django.views.generic.simple import direct_to_template
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from Aluno.models import Aluno
@login_required
def minhasAvaliacoes(request):
al... | true | true |
f777f19d8d6ff893340fc970a17547cbbf609dfd | 13,022 | py | Python | src/pretix/api/views/event.py | gnomus/pretix | 9a9ae3e7807c5fce12adeabf5e2bb81e6b32fb38 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/api/views/event.py | gnomus/pretix | 9a9ae3e7807c5fce12adeabf5e2bb81e6b32fb38 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/api/views/event.py | gnomus/pretix | 9a9ae3e7807c5fce12adeabf5e2bb81e6b32fb38 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import django_filters
from django.db import transaction
from django.db.models import ProtectedError, Q
from django.utils.timezone import now
from django_filters.rest_framework import DjangoFilterBackend, FilterSet
from django_scopes import scopes_disabled
from rest_framework import filters, viewsets
from rest_framework... | 38.755952 | 120 | 0.612425 | import django_filters
from django.db import transaction
from django.db.models import ProtectedError, Q
from django.utils.timezone import now
from django_filters.rest_framework import DjangoFilterBackend, FilterSet
from django_scopes import scopes_disabled
from rest_framework import filters, viewsets
from rest_framework... | true | true |
f777f2ac7f9ff773ded83c21c66b74ea64b60cbb | 8,189 | py | Python | applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/generate_mesh_tying_mortar_condition.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 2 | 2020-04-30T19:13:08.000Z | 2021-04-14T19:40:47.000Z | applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/generate_mesh_tying_mortar_condition.py | Jacklwln/Kratos | 12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de | [
"BSD-4-Clause"
] | 1 | 2020-04-30T19:19:09.000Z | 2020-05-02T14:22:36.000Z | applications/ContactStructuralMechanicsApplication/symbolic_generation/mesh_tying_mortar_condition/generate_mesh_tying_mortar_condition.py | Jacklwln/Kratos | 12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
from KratosMultiphysics import *
from KratosMultiphysics.ContactStructuralMechanicsApplication import *
from sympy import *
from custom_sympy_fe_utilities import *
import operator
... | 47.610465 | 1,034 | 0.608377 | from __future__ import print_function, absolute_import, division
from KratosMultiphysics import *
from KratosMultiphysics.ContactStructuralMechanicsApplication import *
from sympy import *
from custom_sympy_fe_utilities import *
import operator
do_simplifications = False
mode = "c"
impose_partion_of_unity = False... | true | true |
f777f511c05a65e1ce3ff1679d4bb3e7b85872da | 3,821 | py | Python | telegram_bot.py | hoetaek/menu_recommend_bot | 8e22b1745634203a66b265c86673e43c7287348f | [
"MIT"
] | null | null | null | telegram_bot.py | hoetaek/menu_recommend_bot | 8e22b1745634203a66b265c86673e43c7287348f | [
"MIT"
] | null | null | null | telegram_bot.py | hoetaek/menu_recommend_bot | 8e22b1745634203a66b265c86673e43c7287348f | [
"MIT"
] | null | null | null | from telegram.ext import Updater
from data import label_menu_data, get_label, get_korean_menu
from menu_recommend import recommend_menu
import logging
from telegram.ext import MessageHandler, Filters
from telegram.ext import CommandHandler, CallbackQueryHandler
from telegram import InlineKeyboardButton, InlineKeybo... | 39.391753 | 114 | 0.716828 | from telegram.ext import Updater
from data import label_menu_data, get_label, get_korean_menu
from menu_recommend import recommend_menu
import logging
from telegram.ext import MessageHandler, Filters
from telegram.ext import CommandHandler, CallbackQueryHandler
from telegram import InlineKeyboardButton, InlineKeybo... | true | true |
f777f5a5cd45f2fcf552e88fb4937f2c3b218aef | 6,610 | py | Python | ansible/library/bgp_facts.py | yxieca/sonic-mgmt | 0e8fbba7fc3c406bb83d939c70116accdb8bbf54 | [
"Apache-2.0"
] | null | null | null | ansible/library/bgp_facts.py | yxieca/sonic-mgmt | 0e8fbba7fc3c406bb83d939c70116accdb8bbf54 | [
"Apache-2.0"
] | null | null | null | ansible/library/bgp_facts.py | yxieca/sonic-mgmt | 0e8fbba7fc3c406bb83d939c70116accdb8bbf54 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
DOCUMENTATION = '''
module: bgp_facts
version_added: "2.0"
author: John Arnold (johnar@microsoft.com)
short_description: Retrieve BGP neighbor information from Quagga
description:
- Retrieve BGP neighbor information from Quagga, using the VTYSH command line
- Retrieved facts ... | 39.580838 | 137 | 0.559607 |
DOCUMENTATION = '''
module: bgp_facts
version_added: "2.0"
author: John Arnold (johnar@microsoft.com)
short_description: Retrieve BGP neighbor information from Quagga
description:
- Retrieve BGP neighbor information from Quagga, using the VTYSH command line
- Retrieved facts will be inserted i... | true | true |
f777f7eec420d12b4db0b09e5be421043ca1968d | 1,054 | py | Python | askalexa/request/device.py | scottenglert/AskAlexa | aac9d8aa4d6d5d2e9dcd079e0ac516b06c8a94ba | [
"MIT"
] | 2 | 2018-05-25T11:18:18.000Z | 2019-08-09T19:23:54.000Z | askalexa/request/device.py | scottenglert/AskAlexa | aac9d8aa4d6d5d2e9dcd079e0ac516b06c8a94ba | [
"MIT"
] | null | null | null | askalexa/request/device.py | scottenglert/AskAlexa | aac9d8aa4d6d5d2e9dcd079e0ac516b06c8a94ba | [
"MIT"
] | null | null | null | class Device(object):
'''
This is an object that provides information about the device making the
request.
'''
def __init__(self, device_id, supported_interfaces):
self._device_id = device_id
self._supported_interfaces = supported_interfaces
@classmethod
def crea... | 34 | 83 | 0.662239 | class Device(object):
def __init__(self, device_id, supported_interfaces):
self._device_id = device_id
self._supported_interfaces = supported_interfaces
@classmethod
def create_from_json(cls, device_json):
device_id = device_json.get('deviceId')
supported_interface... | true | true |
f777f80945222dbc3274d2ddd510ee0e99c35e81 | 72,735 | py | Python | docusign_esign/models/notary_host.py | Thinkful/docusign-esign-python-client | d4e84468cfc502fc4a99277cd7440e2f42e66443 | [
"MIT"
] | null | null | null | docusign_esign/models/notary_host.py | Thinkful/docusign-esign-python-client | d4e84468cfc502fc4a99277cd7440e2f42e66443 | [
"MIT"
] | null | null | null | docusign_esign/models/notary_host.py | Thinkful/docusign-esign-python-client | d4e84468cfc502fc4a99277cd7440e2f42e66443 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | 39.444143 | 2,365 | 0.686327 |
import pprint
import re
import six
class NotaryHost(object):
swagger_types = {
'access_code': 'str',
'access_code_metadata': 'PropertyMetadata',
'add_access_code_to_email': 'str',
'allow_system_override_for_locked_recipient': 'str',
'auto_responded_reason': 'str',
... | true | true |
f777f80b9831c2a1916e5dffd820b08936205ef2 | 537 | py | Python | findyour3d/customer/migrations/0010_auto_20170911_1906.py | hqpr/findyour3d | 8ad3d2cb7bd0adfd080bb2314df1c78b94d3973a | [
"MIT"
] | null | null | null | findyour3d/customer/migrations/0010_auto_20170911_1906.py | hqpr/findyour3d | 8ad3d2cb7bd0adfd080bb2314df1c78b94d3973a | [
"MIT"
] | null | null | null | findyour3d/customer/migrations/0010_auto_20170911_1906.py | hqpr/findyour3d | 8ad3d2cb7bd0adfd080bb2314df1c78b94d3973a | [
"MIT"
] | 1 | 2020-11-26T10:52:20.000Z | 2020-11-26T10:52:20.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-11 19:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer', '0009_auto_20170911_1844'),
]
operations = [
migrations.AlterFie... | 25.571429 | 125 | 0.607076 | from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer', '0009_auto_20170911_1844'),
]
operations = [
migrations.AlterField(
model_name='customer',
name='basic_material',... | true | true |
f777f85d5ae96aa7bb55a73fbf468004942a9cb9 | 1,321 | py | Python | webwarrior/index.py | blastmaster/webwarrior-task | 8d10b1c0b40ecdc2884b93f44724de71c3ab783f | [
"MIT"
] | null | null | null | webwarrior/index.py | blastmaster/webwarrior-task | 8d10b1c0b40ecdc2884b93f44724de71c3ab783f | [
"MIT"
] | null | null | null | webwarrior/index.py | blastmaster/webwarrior-task | 8d10b1c0b40ecdc2884b93f44724de71c3ab783f | [
"MIT"
] | null | null | null | ''' index '''
from flask import Flask, render_template, redirect, url_for
from .webwarrior import Webwarrior
import pprint
app = Flask(__name__)
app.config.update(dict(
Warrior = Webwarrior(),
DEBUG = True,
))
def format_date(date):
pass
def format_tags(tags):
pass
@app.route("/")
def index():
... | 25.403846 | 88 | 0.67676 |
from flask import Flask, render_template, redirect, url_for
from .webwarrior import Webwarrior
import pprint
app = Flask(__name__)
app.config.update(dict(
Warrior = Webwarrior(),
DEBUG = True,
))
def format_date(date):
pass
def format_tags(tags):
pass
@app.route("/")
def index():
return l... | true | true |
f777f8a4a6ae5513f2accfe855db6bc3e1703bc0 | 788 | py | Python | src/py_dss_interface/models/Relays/RelaysV.py | davilamds/py_dss_interface | a447c97787aeac962381db88dd622ccb235eef4b | [
"MIT"
] | 8 | 2020-08-15T12:56:03.000Z | 2022-01-04T15:51:14.000Z | src/py_dss_interface/models/Relays/RelaysV.py | rodolfoplondero/py_dss_interface | cb6771b34ed322a5df7ef1cc194611e794f26441 | [
"MIT"
] | 24 | 2021-04-24T18:33:19.000Z | 2021-11-13T14:59:54.000Z | src/py_dss_interface/models/Relays/RelaysV.py | rodolfoplondero/py_dss_interface | cb6771b34ed322a5df7ef1cc194611e794f26441 | [
"MIT"
] | 7 | 2020-08-15T12:56:04.000Z | 2021-10-04T16:14:30.000Z | # -*- encoding: utf-8 -*-
"""
Created by eniocc at 11/10/2020
"""
import ctypes
from py_dss_interface.models import Bridge
from py_dss_interface.models.Base import Base
class RelaysV(Base):
"""
This interface can be used to read/write certain properties of the active DSS object.
The structure of the in... | 31.52 | 115 | 0.722081 | import ctypes
from py_dss_interface.models import Bridge
from py_dss_interface.models.Base import Base
class RelaysV(Base):
def relays_all_names(self):
return Bridge.var_array_function(self.dss_obj.RelaysV, ctypes.c_int(0), ctypes.c_int(0), None)
| true | true |
f777fa6011abd4d8181ab0670e31fef6d5d5d140 | 13,131 | py | Python | code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/inline_response20012_data_company_country.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/inline_response20012_data_company_country.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/inline_response20012_data_company_country.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Stocks API For Digital Portals
The stocks API features a screener to search for equity instruments based on stock-specific parameters. Parameters for up to three fiscal years might now be used in one request; data is available for the ten most recent completed fiscal years. Estimates are available for the... | 49.738636 | 1,585 | 0.600107 |
import re import sys
from fds.sdk.StocksAPIforDigitalPortals.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_com... | true | true |
f777fad2438945e9b344ea74b460dae8e8c73554 | 1,015 | py | Python | blog/migrations/0001_initial.py | wang542413041/mysite | da4033047ccd4aa814336a64d54fb875f131776f | [
"MIT"
] | 1 | 2019-06-03T06:03:08.000Z | 2019-06-03T06:03:08.000Z | blog/migrations/0001_initial.py | wang542413041/mysite | da4033047ccd4aa814336a64d54fb875f131776f | [
"MIT"
] | null | null | null | blog/migrations/0001_initial.py | wang542413041/mysite | da4033047ccd4aa814336a64d54fb875f131776f | [
"MIT"
] | null | null | null | # Generated by Django 2.1.1 on 2018-09-13 09:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 31.71875 | 147 | 0.613793 |
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
... | true | true |
f777faeed5ee7106f7e23fa0a4f0d83d0f5afc73 | 209 | py | Python | misc.py | HaleTom/python_common_functions | 6ed244bbb0124e6e225510f27b884780ea7e17b3 | [
"MIT"
] | 1 | 2019-05-04T10:32:33.000Z | 2019-05-04T10:32:33.000Z | misc.py | HaleTom/python_common_functions | 6ed244bbb0124e6e225510f27b884780ea7e17b3 | [
"MIT"
] | null | null | null | misc.py | HaleTom/python_common_functions | 6ed244bbb0124e6e225510f27b884780ea7e17b3 | [
"MIT"
] | null | null | null | # Get a package's version as a string
# https://stackoverflow.com/a/32965521/5353461
def package_version(package_name):
import pkg_resources
return pkg_resources.get_distribution(package_name).version
| 34.833333 | 63 | 0.803828 | # https://stackoverflow.com/a/32965521/5353461
def package_version(package_name):
import pkg_resources
return pkg_resources.get_distribution(package_name).version
| true | true |
f777fb00f44f0ca73c075a4cf45faa2a89f1ceb9 | 55 | py | Python | statsforecast/__init__.py | Nixtla/statsforecast | cd7f9630ea3ebaa24049b859d2292bd4a9855116 | [
"MIT"
] | 483 | 2021-11-25T19:58:54.000Z | 2022-03-31T23:53:03.000Z | statsforecast/__init__.py | Nixtla/statsforecast | cd7f9630ea3ebaa24049b859d2292bd4a9855116 | [
"MIT"
] | 50 | 2021-12-06T21:26:34.000Z | 2022-03-31T16:56:06.000Z | statsforecast/__init__.py | Nixtla/statsforecast | cd7f9630ea3ebaa24049b859d2292bd4a9855116 | [
"MIT"
] | 29 | 2022-02-03T22:09:19.000Z | 2022-03-31T02:13:51.000Z | __version__ = "0.5.5"
from .core import StatsForecast
| 13.75 | 31 | 0.745455 | __version__ = "0.5.5"
from .core import StatsForecast
| true | true |
f777fc201814c00cdb30850dc9367c10d00b3e4f | 22,205 | py | Python | qiskit_ibm_runtime/ibm_backend.py | Qiskit/qiskit-ibm-runtime | 03b27fc32e462f87bcd246071ca09c75beeb573e | [
"Apache-2.0"
] | 20 | 2021-11-24T07:38:45.000Z | 2022-03-27T06:54:30.000Z | qiskit_ibm_runtime/ibm_backend.py | Qiskit/qiskit-ibm-runtime | 03b27fc32e462f87bcd246071ca09c75beeb573e | [
"Apache-2.0"
] | 188 | 2021-11-18T18:59:38.000Z | 2022-03-31T23:35:29.000Z | qiskit_ibm_runtime/ibm_backend.py | Qiskit/qiskit-ibm-runtime | 03b27fc32e462f87bcd246071ca09c75beeb573e | [
"Apache-2.0"
] | 20 | 2021-11-18T21:28:59.000Z | 2022-03-24T13:46:06.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 39.722719 | 116 | 0.643549 |
import logging
from typing import Iterable, Union, Optional, Any, List
from datetime import datetime as python_datetime
from qiskit.qobj.utils import MeasLevel, MeasReturnType
from qiskit.providers.backend import BackendV2 as Backend, QubitProperties
from qiskit.providers.options import Options
from qiskit.provider... | true | true |
f777fc3d0b2c2e31adaa2c6dad027b2cf56ba6eb | 5,833 | py | Python | model_v2.py | cindyxinyiwang/MoEM | 1d37f96cec1a97856224793f15a90170b8266a1b | [
"MIT"
] | null | null | null | model_v2.py | cindyxinyiwang/MoEM | 1d37f96cec1a97856224793f15a90170b8266a1b | [
"MIT"
] | null | null | null | model_v2.py | cindyxinyiwang/MoEM | 1d37f96cec1a97856224793f15a90170b8266a1b | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from embed_regularize import embedded_dropout
from locked_dropout import LockedDropout
from weight_drop import WeightDrop
class RNNModel_v2(nn.Module):
"""Container module with an encoder, a recurren... | 41.368794 | 139 | 0.624721 | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from embed_regularize import embedded_dropout
from locked_dropout import LockedDropout
from weight_drop import WeightDrop
class RNNModel_v2(nn.Module):
def __init__(self, rnn_type, ntoken, ninp, nhi... | true | true |
f777fcb25ffce7cf43f7663da98ec63ee54eb1d0 | 1,681 | py | Python | Tree/145_BinaryTreePostorderTraversal.py | cls1991/leetcode | 0fd165afa2ec339a6f194bc57f8810e66cd2822b | [
"MIT"
] | 180 | 2018-01-25T01:50:04.000Z | 2021-11-09T11:47:45.000Z | Tree/145_BinaryTreePostorderTraversal.py | cls1991/leetcode | 0fd165afa2ec339a6f194bc57f8810e66cd2822b | [
"MIT"
] | 6 | 2018-01-25T07:51:51.000Z | 2019-10-26T14:10:53.000Z | Tree/145_BinaryTreePostorderTraversal.py | cls1991/leetcode | 0fd165afa2ec339a6f194bc57f8810e66cd2822b | [
"MIT"
] | 29 | 2018-01-25T01:55:58.000Z | 2019-09-02T07:19:59.000Z | # coding: utf8
"""
题目链接: https://leetcode.com/problems/binary-tree-postorder-traversal/description.
题目描述:
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree [1,null,2,3],
1
\
2
/
... | 22.413333 | 84 | 0.534801 |
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def postorderTraversal(self, root):
ans = []
self.recursive_postorder(root, ans)
self.iterative_postorder(root, ans)
return ans
... | true | true |
f777fe2ca809397ede237c59a4f586aa432cf1df | 5,260 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/operations/_usages_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/operations/_usages_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/operations/_usages_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.576271 | 134 | 0.649049 | 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.pipeline.transport import HttpR... | true | true |
f777fea9b974de2fda5df180978abc9c2d497b24 | 5,192 | py | Python | common/code/snippets/parasites/_Dq1iEpfXgAADZRg.jpg.zip.extracted/inject.py | nevesnunes/env | 7a5e3816334337e04a87e1a2e4dc322215901744 | [
"MIT"
] | 4 | 2020-04-07T14:45:02.000Z | 2021-12-28T22:43:16.000Z | common/code/snippets/parasites/_Dq1iEpfXgAADZRg.jpg.zip.extracted/inject.py | nevesnunes/env | 7a5e3816334337e04a87e1a2e4dc322215901744 | [
"MIT"
] | null | null | null | common/code/snippets/parasites/_Dq1iEpfXgAADZRg.jpg.zip.extracted/inject.py | nevesnunes/env | 7a5e3816334337e04a87e1a2e4dc322215901744 | [
"MIT"
] | 2 | 2020-04-08T03:12:06.000Z | 2021-03-04T20:33:03.000Z | #!/usr/bin/python3
"""
WARNING: The code you are about to view is DISGUSTING
I wrote most of it months ago, so don't ask me what it's doing, or why.
"""
import struct
import sys
from ctypes import *
# BEGIN ZIP FILE STRUCTURES
class LocalFileHeader(Structure):
_pack_ = 1
_fields_ = [
("magic", c_uint32),
("... | 24.490566 | 178 | 0.6901 |
import struct
import sys
from ctypes import *
class LocalFileHeader(Structure):
_pack_ = 1
_fields_ = [
("magic", c_uint32),
("version_needed", c_uint16),
("flags", c_uint16),
("compression_method", c_uint16),
("mtime", c_uint16),
("mdate", c_uint16),
("crc32", c_uint32),
("comp_size", c_uint32),... | true | true |
f777fecc33d1f89f04e4ca0204038c065d674322 | 1,376 | py | Python | ML_Nizar/wikidata/tmp/wdidmapping.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | 1 | 2020-06-25T16:39:35.000Z | 2020-06-25T16:39:35.000Z | ML_Nizar/wikidata/tmp/wdidmapping.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | 6 | 2020-03-06T12:31:38.000Z | 2021-09-20T15:08:17.000Z | ML_Nizar/wikidata/tmp/wdidmapping.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | null | null | null | import sqlite3
import pywikibot
import re
con = sqlite3.connect('C:/Users/nizar/Downloads/demosaurus.sqlite')
cur = con.cursor()
cur.execute("Select DISTINCT(Wikipedia.ppn), Wikipedia.identifier, Wikipedia.language from NTA inner join Wikipedia on Wikipedia.ppn = NTA.ppn inner join authorship_ggc on NTA.ppn = au... | 37.189189 | 283 | 0.640262 | import sqlite3
import pywikibot
import re
con = sqlite3.connect('C:/Users/nizar/Downloads/demosaurus.sqlite')
cur = con.cursor()
cur.execute("Select DISTINCT(Wikipedia.ppn), Wikipedia.identifier, Wikipedia.language from NTA inner join Wikipedia on Wikipedia.ppn = NTA.ppn inner join authorship_ggc on NTA.ppn = au... | true | true |
f777ffd74f9799fd23eb3a0964f5b85b19131f37 | 3,261 | py | Python | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability_py3.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability_py3.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_sql/sql/models/service_objective_capability_py3.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.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 ... | 41.278481 | 103 | 0.632321 |
from msrest.serialization import Model
class ServiceObjectiveCapability(Model):
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'supported_max_sizes': {'readonly': True},
'performance_level': {'readonly': True},
'sku': {'readonly': True},
'su... | true | true |
f778009f402dc7aede20728e0ffd6f15f69eeb0d | 2,074 | py | Python | pycon/finaid/migrations/0010_auto_20160927_0947.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 154 | 2015-01-17T02:29:24.000Z | 2022-03-20T20:37:24.000Z | pycon/finaid/migrations/0010_auto_20160927_0947.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 316 | 2015-01-10T04:01:50.000Z | 2020-09-30T20:18:08.000Z | pycon/finaid/migrations/0010_auto_20160927_0947.py | azkarmoulana/pycon | 931388e6f640c35b892bb4b2d12581ba7ec8cf4e | [
"BSD-3-Clause"
] | 89 | 2015-01-10T05:25:21.000Z | 2022-02-27T03:28:59.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('finaid', '0009_auto_20150917_1629'),
]
operations = [
migrations.RemoveField(
model_name='financialaidapplicatio... | 43.208333 | 240 | 0.645612 | from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('finaid', '0009_auto_20150917_1629'),
]
operations = [
migrations.RemoveField(
model_name='financialaidapplication',
name='po... | true | true |
f77801de93147bdce10893641ce3a3608466b4c9 | 15,704 | py | Python | tests/test_views.py | marianaasilva/drf-friendly-errors | 7ea96dc53b6f8ab2632d00339b4b2f8414e7ba40 | [
"MIT"
] | 8 | 2019-03-15T18:08:58.000Z | 2020-11-17T08:24:32.000Z | tests/test_views.py | marianaasilva/drf-friendly-errors | 7ea96dc53b6f8ab2632d00339b4b2f8414e7ba40 | [
"MIT"
] | null | null | null | tests/test_views.py | marianaasilva/drf-friendly-errors | 7ea96dc53b6f8ab2632d00339b4b2f8414e7ba40 | [
"MIT"
] | 1 | 2020-04-23T14:59:06.000Z | 2020-04-23T14:59:06.000Z | from django.core.urlresolvers import reverse
from rest_framework.test import APIRequestFactory
from rest_framework_friendly_errors import settings
from tests import BaseTestCase
from tests.models import Snippet
from tests.views import SnippetList, Snippet2List, SnippetDetail
class ListViewTestCase(BaseTestCase):
... | 49.539432 | 83 | 0.629457 | from django.core.urlresolvers import reverse
from rest_framework.test import APIRequestFactory
from rest_framework_friendly_errors import settings
from tests import BaseTestCase
from tests.models import Snippet
from tests.views import SnippetList, Snippet2List, SnippetDetail
class ListViewTestCase(BaseTestCase):
... | true | true |
f7780218945351888ef4fef86688ee8f27afcca9 | 1,211 | py | Python | examples/change_behaviors.py | sanjaymsh/flask-jwt-simple | ed930340cfcff5a6ddc49248d4682e87204dd3be | [
"MIT"
] | 70 | 2017-08-24T21:41:03.000Z | 2021-06-04T07:22:20.000Z | examples/change_behaviors.py | Nimor111/flask-jwt-simple | 5dacfab8ac2c0b373148f40acdf08da2ffe3329b | [
"MIT"
] | 25 | 2017-09-19T07:34:28.000Z | 2021-06-01T22:07:24.000Z | examples/change_behaviors.py | Nimor111/flask-jwt-simple | 5dacfab8ac2c0b373148f40acdf08da2ffe3329b | [
"MIT"
] | 18 | 2017-09-18T11:02:03.000Z | 2022-02-04T05:45:02.000Z | from flask import Flask, jsonify, request
from flask_jwt_simple import JWTManager, jwt_required, create_jwt
app = Flask(__name__)
app.config['JWT_SECRET_KEY'] = 'super-secret' # Change this!
jwt = JWTManager(app)
# Using the expired_token_loader decorator, we will now call
# this function whenever an expired but o... | 28.162791 | 65 | 0.690339 | from flask import Flask, jsonify, request
from flask_jwt_simple import JWTManager, jwt_required, create_jwt
app = Flask(__name__)
app.config['JWT_SECRET_KEY'] = 'super-secret' jwt = JWTManager(app)
@jwt.expired_token_loader
def my_expired_token_callback():
err_json = {
"status": 401,
"title": "... | true | true |
f778023b30bf07bfadbc8b1aada01fc7636df4c1 | 7,010 | py | Python | examples/capture_savehdf5_display.py | hilltailor/22037-Camera-1 | 4a236bcb236071b3cc051dcce0756d3d9804ec0f | [
"MIT"
] | 1 | 2022-03-04T21:31:24.000Z | 2022-03-04T21:31:24.000Z | examples/capture_savehdf5_display.py | hilltailor/22037-Camera-1 | 4a236bcb236071b3cc051dcce0756d3d9804ec0f | [
"MIT"
] | null | null | null | examples/capture_savehdf5_display.py | hilltailor/22037-Camera-1 | 4a236bcb236071b3cc051dcce0756d3d9804ec0f | [
"MIT"
] | 1 | 2022-03-25T00:11:01.000Z | 2022-03-25T00:11:01.000Z | ##########################################################################
# Testing of display and capture & storage thread combined.
# Scan for camera
# Aquire 14 images
# Convert to b/w
# Save hdf5 files
##########################################################################
# Results
#
#
########################... | 39.829545 | 137 | 0.610699 |
import logging, time, platform
from datetime import datetime
import numpy as np
from numba import vectorize
import cv2
configs = {
'camera_res' : (1280, 720 ), 'exposure' : -6, 'autoexposure' : 1.0, 'fps' : 30, 'fourcc' : -... | true | true |
f7780273048963722bab333d4663d853009f00f4 | 2,004 | py | Python | wildlifelicensing/apps/applications/migrations/0003_auto_20160623_1114.py | jawaidm/wildlifelicensing | 87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82 | [
"Apache-2.0"
] | null | null | null | wildlifelicensing/apps/applications/migrations/0003_auto_20160623_1114.py | jawaidm/wildlifelicensing | 87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82 | [
"Apache-2.0"
] | 11 | 2019-03-19T02:03:11.000Z | 2019-05-31T07:20:59.000Z | wildlifelicensing/apps/applications/migrations/0003_auto_20160623_1114.py | jawaidm/wildlifelicensing | 87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82 | [
"Apache-2.0"
] | 2 | 2020-08-10T10:17:10.000Z | 2021-10-31T23:20:53.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-23 03:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wl_applications', '0002_auto_20160610_1647'),
]
operations = [
migrations.Cr... | 29.470588 | 114 | 0.560379 | from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wl_applications', '0002_auto_20160610_1647'),
]
operations = [
migrations.CreateModel(
name='ApplicationRequest',
fields=[
... | true | true |
f778032c170bb6d7aa6b0813ed318b5c24054e97 | 11,966 | py | Python | sdk/python/feast/infra/provider.py | charliec443/feast | 8b3a97a9774fa6a2cefcf64c237a36212a158ab1 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/infra/provider.py | charliec443/feast | 8b3a97a9774fa6a2cefcf64c237a36212a158ab1 | [
"Apache-2.0"
] | 1 | 2021-07-15T18:45:49.000Z | 2021-07-15T18:45:49.000Z | sdk/python/feast/infra/provider.py | charliec443/feast | 8b3a97a9774fa6a2cefcf64c237a36212a158ab1 | [
"Apache-2.0"
] | null | null | null | import abc
from datetime import datetime
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
import pandas
import pyarrow
from tqdm import tqdm
from feast import errors, importer
from feast.entity import Entity
from feast.feature_table import FeatureTable
from feast... | 38.230032 | 104 | 0.663212 | import abc
from datetime import datetime
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
import pandas
import pyarrow
from tqdm import tqdm
from feast import errors, importer
from feast.entity import Entity
from feast.feature_table import FeatureTable
from feast... | true | true |
f77803ee7c6803d723723cb6d2f59c049add5970 | 1,583 | py | Python | velkozz_web_api/apps/social_media_api/admin.py | velkoz-data-ingestion/velkozz_web_api | 519a6a90e5fdf5bab8ba2daf637768c5fd424a12 | [
"MIT"
] | null | null | null | velkozz_web_api/apps/social_media_api/admin.py | velkoz-data-ingestion/velkozz_web_api | 519a6a90e5fdf5bab8ba2daf637768c5fd424a12 | [
"MIT"
] | null | null | null | velkozz_web_api/apps/social_media_api/admin.py | velkoz-data-ingestion/velkozz_web_api | 519a6a90e5fdf5bab8ba2daf637768c5fd424a12 | [
"MIT"
] | null | null | null | # Importing Django Models:
from django.contrib import admin
# Importing Database Base Models:
from social_media_api.model_views_seralizers.reddit_api.reddit_models import RedditPosts, RedditDevApps, RedditDevAppForm, Subreddits, RedditLogs, RedditPipeline
from .models.indeed.indeed_models import IndeedJobPosts
from .m... | 37.690476 | 161 | 0.758686 | from django.contrib import admin
from social_media_api.model_views_seralizers.reddit_api.reddit_models import RedditPosts, RedditDevApps, RedditDevAppForm, Subreddits, RedditLogs, RedditPipeline
from .models.indeed.indeed_models import IndeedJobPosts
from .models.youtube.youtube_models import DailyYoutubeChannelStats
... | true | true |
f77803f69ced65cee61c6e2f927fcebcadddfc21 | 5,109 | py | Python | groceries.py | CZnyu/groceries-exercise | 9eafdea246b5bc66d2f38987f925fb521cab6c33 | [
"MIT"
] | null | null | null | groceries.py | CZnyu/groceries-exercise | 9eafdea246b5bc66d2f38987f925fb521cab6c33 | [
"MIT"
] | null | null | null | groceries.py | CZnyu/groceries-exercise | 9eafdea246b5bc66d2f38987f925fb521cab6c33 | [
"MIT"
] | null | null | null |
products = [
{"id":1, "name": "Chocolate Sandwich Cookies", "department": "snacks", "aisle": "cookies cakes", "price": 3.50},
{"id":2, "name": "All-Seasons Salt", "department": "pantry", "aisle": "spices seasonings", "price": 4.99},
{"id":3, "name": "Robust Golden Unsweetened Oolong Tea", "department": "b... | 44.426087 | 158 | 0.627912 |
products = [
{"id":1, "name": "Chocolate Sandwich Cookies", "department": "snacks", "aisle": "cookies cakes", "price": 3.50},
{"id":2, "name": "All-Seasons Salt", "department": "pantry", "aisle": "spices seasonings", "price": 4.99},
{"id":3, "name": "Robust Golden Unsweetened Oolong Tea", "department": "b... | true | true |
f7780509ad6906585dee64ffbe282a76e1020fe7 | 1,888 | py | Python | check_es-nodes.py | RobinOphalvens/monitoring-plugins | 2ccb9ebe68594ceffc48cca882bdba4b04f7b05a | [
"Apache-2.0"
] | 12 | 2018-08-10T01:40:43.000Z | 2021-12-29T20:11:22.000Z | check_es-nodes.py | RobinOphalvens/monitoring-plugins | 2ccb9ebe68594ceffc48cca882bdba4b04f7b05a | [
"Apache-2.0"
] | 2 | 2018-09-07T21:58:55.000Z | 2021-09-01T07:18:22.000Z | check_es-nodes.py | RobinOphalvens/monitoring-plugins | 2ccb9ebe68594ceffc48cca882bdba4b04f7b05a | [
"Apache-2.0"
] | 24 | 2018-07-24T22:52:54.000Z | 2022-01-26T15:57:46.000Z | #!/usr/bin/python
from nagioscheck import NagiosCheck, UsageError
from nagioscheck import PerformanceMetric, Status
import urllib2
import optparse
try:
import json
except ImportError:
import simplejson as json
class ESNodesCheck(NagiosCheck):
def __init__(self):
NagiosCheck.__init__(self)
... | 33.122807 | 78 | 0.590572 | from nagioscheck import NagiosCheck, UsageError
from nagioscheck import PerformanceMetric, Status
import urllib2
import optparse
try:
import json
except ImportError:
import simplejson as json
class ESNodesCheck(NagiosCheck):
def __init__(self):
NagiosCheck.__init__(self)
self.add_optio... | false | true |
f77806b432bf54a5e54e58d35a5278d4b303aff3 | 4,185 | py | Python | trac/util/autoreload.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | null | null | null | trac/util/autoreload.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | null | null | null | trac/util/autoreload.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C)2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consis... | 36.077586 | 80 | 0.579689 |
import os
import sys
import threading
import time
import traceback
_SLEEP_TIME = 1
def _reloader_thread(modification_callback, loop_callback):
mtimes = {}
while True:
for filename in filter(None, [getattr(module, '__file__', None)
for module in sys.modules.values... | true | true |
f77806bbb43c2932b23778a4b6f1e8058ab39c55 | 5,675 | py | Python | test/test_generate_quantities.py | akirayou/cmdstanpy | f6a526807ea4d248844ac2f1a44e4c53bfca197c | [
"BSD-3-Clause"
] | null | null | null | test/test_generate_quantities.py | akirayou/cmdstanpy | f6a526807ea4d248844ac2f1a44e4c53bfca197c | [
"BSD-3-Clause"
] | null | null | null | test/test_generate_quantities.py | akirayou/cmdstanpy | f6a526807ea4d248844ac2f1a44e4c53bfca197c | [
"BSD-3-Clause"
] | 1 | 2021-05-19T08:33:50.000Z | 2021-05-19T08:33:50.000Z | """CmdStan method generate_quantities tests"""
import os
import unittest
from pandas.testing import assert_frame_equal
from cmdstanpy.cmdstan_args import Method
from cmdstanpy.model import CmdStanModel
HERE = os.path.dirname(os.path.abspath(__file__))
DATAFILES_PATH = os.path.join(HERE, 'data')
class GenerateQuant... | 34.186747 | 79 | 0.597885 |
import os
import unittest
from pandas.testing import assert_frame_equal
from cmdstanpy.cmdstan_args import Method
from cmdstanpy.model import CmdStanModel
HERE = os.path.dirname(os.path.abspath(__file__))
DATAFILES_PATH = os.path.join(HERE, 'data')
class GenerateQuantitiesTest(unittest.TestCase):
def test_gen_... | true | true |
f77807d8870d4716f1eb3f7761fdea603df30173 | 3,726 | py | Python | src/titiler/core/titiler/core/middleware.py | kalxas/titiler | 5e4e497f1033eb64b65315068c094abe8259cd8c | [
"MIT"
] | null | null | null | src/titiler/core/titiler/core/middleware.py | kalxas/titiler | 5e4e497f1033eb64b65315068c094abe8259cd8c | [
"MIT"
] | null | null | null | src/titiler/core/titiler/core/middleware.py | kalxas/titiler | 5e4e497f1033eb64b65315068c094abe8259cd8c | [
"MIT"
] | null | null | null | """Titiler middlewares."""
import logging
import re
import time
from typing import Optional, Set
from fastapi.logger import logger
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from starlette.types import ASGIApp
class CacheControlMiddleware(BaseHTTPMiddleware):
... | 31.05 | 82 | 0.630972 |
import logging
import re
import time
from typing import Optional, Set
from fastapi.logger import logger
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from starlette.types import ASGIApp
class CacheControlMiddleware(BaseHTTPMiddleware):
def __init__(
se... | true | true |
f77807efb1c3bf10fd85c2218f1ca050acc53c9c | 1,153 | py | Python | src/camshift.py | Pecneb/Biztonsagi-Kamera-Projekt | 1d87fe70b98be6bcbb0051ee45542dbe5e0df3e2 | [
"MIT"
] | null | null | null | src/camshift.py | Pecneb/Biztonsagi-Kamera-Projekt | 1d87fe70b98be6bcbb0051ee45542dbe5e0df3e2 | [
"MIT"
] | null | null | null | src/camshift.py | Pecneb/Biztonsagi-Kamera-Projekt | 1d87fe70b98be6bcbb0051ee45542dbe5e0df3e2 | [
"MIT"
] | null | null | null | from typing import Annotated
import cv2 as cv
def track_motion(frame, mask, initial_track_window = ()):
'''
This module takes frame and mask arguments.
Frame is a frame from a video src.
The mask is the area of a motion on the video frame.
From these information, the module will track the object on... | 28.825 | 75 | 0.660885 | from typing import Annotated
import cv2 as cv
def track_motion(frame, mask, initial_track_window = ()):
x, y, w, h = initial_track_window
track_window = (x, y, w, h)
img = cv.cvtColor(frame, cv.COLOR_BGR2HSV)
mhist = cv.calcHist([img], [0], None, [2], [0,256])
roi = img[y:y+... | true | true |
f77808061eaaf9467eb34ae350165fcf5bcaed7a | 1,201 | py | Python | testing/scripts/check_network_annotations.py | zipated/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | testing/scripts/check_network_annotations.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | testing/scripts/check_network_annotations.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""//testing/scripts wrapper for the network traffic annotations checks.
This script is used to run check_annotations.py on the trybots... | 25.553191 | 77 | 0.696087 |
import json
import os
import sys
import common
def main_run(args):
command_line = [
sys.executable,
os.path.join(common.SRC_DIR, 'tools', 'traffic_annotation', 'scripts',
'check_annotations.py'),
'--build-path',
os.path.join(args.paths['checkout'], 'out', args.build_co... | true | true |
f77809fc0b7a5ff6e84bcc3fdf0eafa7cfdf6167 | 3,443 | py | Python | spider/crawl.py | sunlu123456/proxy_list | 383128e4ec2285b095bb44fd5454e94fda133802 | [
"MIT"
] | 4 | 2019-10-18T14:06:03.000Z | 2020-05-08T07:55:12.000Z | spider/crawl.py | sunlu123456/proxy_list | 383128e4ec2285b095bb44fd5454e94fda133802 | [
"MIT"
] | 4 | 2021-03-31T19:21:15.000Z | 2021-12-13T20:24:21.000Z | spider/crawl.py | sunlu123456/proxy_list | 383128e4ec2285b095bb44fd5454e94fda133802 | [
"MIT"
] | 1 | 2019-11-15T05:25:13.000Z | 2019-11-15T05:25:13.000Z | # -*- coding: UTF-8 -*-
import requests
import config
import json
class Crawl(object):
def _transparent(self, page=1):
raise NotImplementedError
def _anonymous(self, page=1):
raise NotImplementedError
def _http(self):
raise NotImplementedError
def _https(self):
raise... | 28.454545 | 133 | 0.512925 | import requests
import config
import json
class Crawl(object):
def _transparent(self, page=1):
raise NotImplementedError
def _anonymous(self, page=1):
raise NotImplementedError
def _http(self):
raise NotImplementedError
def _https(self):
raise NotImplementedError
... | true | true |
f7780a2733f38971b7bda72054497e62d46b78f1 | 616 | py | Python | flatland/database/population/sheet/box_text_line_instances.py | erik-soederholm/flatland-model-diagram-editor | 088e27cded9eca2cacba2c6168c03caf4b43ef72 | [
"MIT"
] | 10 | 2021-01-03T16:47:34.000Z | 2022-03-30T18:47:07.000Z | flatland/database/population/sheet/box_text_line_instances.py | modelint/flatland-model-diagram-editor | 088e27cded9eca2cacba2c6168c03caf4b43ef72 | [
"MIT"
] | 91 | 2021-01-09T02:14:13.000Z | 2022-02-24T10:24:10.000Z | flatland/database/population/sheet/box_text_line_instances.py | erik-soederholm/flatland-model-diagram-editor | 088e27cded9eca2cacba2c6168c03caf4b43ef72 | [
"MIT"
] | 1 | 2021-01-13T22:13:19.000Z | 2021-01-13T22:13:19.000Z | """
box_text_line_instances.py
"""
population = [
# SE Simple data boxes
{'Metadata': 'Title', 'Box': 5, 'Title block pattern': 'SE Simple', 'Order': 1},
{'Metadata': 'Organization', 'Box': 3, 'Title block pattern': 'SE Simple', 'Order': 1},
{'Metadata': 'Author', 'Box': 6, 'Title block pattern': 'SE Si... | 51.333333 | 96 | 0.594156 | population = [
{'Metadata': 'Title', 'Box': 5, 'Title block pattern': 'SE Simple', 'Order': 1},
{'Metadata': 'Organization', 'Box': 3, 'Title block pattern': 'SE Simple', 'Order': 1},
{'Metadata': 'Author', 'Box': 6, 'Title block pattern': 'SE Simple', 'Order': 1},
{'Metadata': 'Modification date', ... | true | true |
f7780a4edcb9dfda1ae009709effad889a636021 | 51 | py | Python | configs/stock.py | fswzb/autotrade | e3240dc6d5d81504b3df3be7f0f85000ce5b634d | [
"MIT"
] | 1 | 2020-06-22T06:18:07.000Z | 2020-06-22T06:18:07.000Z | configs/stock.py | fswzb/autotrade | e3240dc6d5d81504b3df3be7f0f85000ce5b634d | [
"MIT"
] | null | null | null | configs/stock.py | fswzb/autotrade | e3240dc6d5d81504b3df3be7f0f85000ce5b634d | [
"MIT"
] | 1 | 2019-11-24T18:09:47.000Z | 2019-11-24T18:09:47.000Z | # coding=utf-8
stock_list = ['000839', '', '', ''] | 17 | 35 | 0.509804 |
stock_list = ['000839', '', '', ''] | true | true |
f7780a77cc56972b55e39df2971fa3fab284c983 | 1,557 | py | Python | src/block_viewer/outputs.py | richarddennis/block_viewer | ffc9340b70e340da9058fe468bac4c8767bd7b3d | [
"MIT"
] | null | null | null | src/block_viewer/outputs.py | richarddennis/block_viewer | ffc9340b70e340da9058fe468bac4c8767bd7b3d | [
"MIT"
] | null | null | null | src/block_viewer/outputs.py | richarddennis/block_viewer | ffc9340b70e340da9058fe468bac4c8767bd7b3d | [
"MIT"
] | null | null | null | from block_viewer.utils import decode_uint64
from block_viewer.utils import decode_varint
from block_viewer.script import Script
from binascii import b2a_hex
class Output(object):
def __init__(self,
value=None,
txout_script_length=None,
script_pubkey=None):
... | 37.071429 | 100 | 0.607579 | from block_viewer.utils import decode_uint64
from block_viewer.utils import decode_varint
from block_viewer.script import Script
from binascii import b2a_hex
class Output(object):
def __init__(self,
value=None,
txout_script_length=None,
script_pubkey=None):
... | true | true |
f7780af559ada893d2c8c8a76d6b6add5b4b59b0 | 2,961 | py | Python | .github/scripts/run_pylint_check.py | TIBCOSoftware/spotfire-python | 928af37ea7e6c5d066843989508ad12c893388cd | [
"BSD-3-Clause"
] | 5 | 2021-05-26T18:30:09.000Z | 2021-12-10T15:09:12.000Z | .github/scripts/run_pylint_check.py | TIBCOSoftware/spotfire-python | 928af37ea7e6c5d066843989508ad12c893388cd | [
"BSD-3-Clause"
] | 15 | 2021-04-27T07:12:19.000Z | 2022-02-25T13:32:48.000Z | .github/scripts/run_pylint_check.py | TIBCOSoftware/spotfire-python | 928af37ea7e6c5d066843989508ad12c893388cd | [
"BSD-3-Clause"
] | 5 | 2021-04-27T00:21:47.000Z | 2022-01-28T23:21:14.000Z | import argparse
import io
import sys
from ghapi.all import GhApi
import pylint.lint
from pylint.__pkginfo__ import __version__ as pl_version
def run_pylint(directory):
saved_stdout = sys.stdout
sys.stdout = io.StringIO()
result = pylint.lint.Run([directory], exit=False)
output = sys.stdout.getvalue()... | 46.265625 | 114 | 0.642013 | import argparse
import io
import sys
from ghapi.all import GhApi
import pylint.lint
from pylint.__pkginfo__ import __version__ as pl_version
def run_pylint(directory):
saved_stdout = sys.stdout
sys.stdout = io.StringIO()
result = pylint.lint.Run([directory], exit=False)
output = sys.stdout.getvalue()... | true | true |
f7780b4c54d1f49dd436e83700c44f5820be0d70 | 3,166 | py | Python | powercycle/automatic_email_bash.py | ccsuexs450/power-cycle | c69099ccfc36b33df446ad9e468b2fe9359c0dfa | [
"MIT"
] | 3 | 2019-03-04T05:01:21.000Z | 2019-03-19T03:52:37.000Z | powercycle/automatic_email_bash.py | ccsuexs450/power-cycle | c69099ccfc36b33df446ad9e468b2fe9359c0dfa | [
"MIT"
] | 2 | 2019-03-13T00:22:34.000Z | 2019-03-19T23:47:05.000Z | powercycle/automatic_email_bash.py | nep67/power-cycle | c69099ccfc36b33df446ad9e468b2fe9359c0dfa | [
"MIT"
] | 1 | 2019-10-16T01:23:37.000Z | 2019-10-16T01:23:37.000Z | #!/usr/bin/python
import smtplib, ssl, email,os,socket
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import re
def sendBatchEmail(password):
smtp_server = "smtp.gmail.com" ##dont touch
port = 587 ##dont touch
... | 34.791209 | 90 | 0.567909 | import smtplib, ssl, email,os,socket
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import re
def sendBatchEmail(password):
smtp_server = "smtp.gmail.com" port = 587 sender_email = "bicycle.email.bot@gmail.... | true | true |
f7780b4f14ab3821ef117341889dce1ba994e06b | 1,364 | py | Python | dev/mathematica/get_ldmx_acceptance_to_share/detector_hit_conditions.py | jmlazaro25/vissig | 370262b0546959bd2936cfd1ffa16de5b85a3dee | [
"MIT"
] | null | null | null | dev/mathematica/get_ldmx_acceptance_to_share/detector_hit_conditions.py | jmlazaro25/vissig | 370262b0546959bd2936cfd1ffa16de5b85a3dee | [
"MIT"
] | null | null | null | dev/mathematica/get_ldmx_acceptance_to_share/detector_hit_conditions.py | jmlazaro25/vissig | 370262b0546959bd2936cfd1ffa16de5b85a3dee | [
"MIT"
] | null | null | null | import numpy as np
import collections
def _xv_from_uni(xi,zmax,gct):
"""
Generate a z vertex displacement from a uniform random variable
both zmax and gct should be in cm
"""
if xi > 0.:
return gct*np.log(xi) + zmax
else:
return -100.*zmax
xv_from_uni = np.vectorize(_xv_fr... | 31 | 88 | 0.648094 | import numpy as np
import collections
def _xv_from_uni(xi,zmax,gct):
if xi > 0.:
return gct*np.log(xi) + zmax
else:
return -100.*zmax
xv_from_uni = np.vectorize(_xv_from_uni)
def _det_hit_condition(_pa, _pr, det_rad, zmax, xv, Ethr=1.):
pa = np.array(_pa)
pr = np.arr... | true | true |
f7780d9bbbf3285528b1f4c5c17225049f87dfc6 | 2,300 | py | Python | dags/treino04.py | Jazys/docker-airflow | 347619d857f5d19a6955c51a23f381e2406f7d22 | [
"Apache-2.0"
] | 29 | 2021-01-19T04:40:28.000Z | 2022-02-08T09:16:50.000Z | dags/treino04.py | Jazys/docker-airflow | 347619d857f5d19a6955c51a23f381e2406f7d22 | [
"Apache-2.0"
] | null | null | null | dags/treino04.py | Jazys/docker-airflow | 347619d857f5d19a6955c51a23f381e2406f7d22 | [
"Apache-2.0"
] | 35 | 2021-01-07T03:47:40.000Z | 2022-03-19T03:49:23.000Z | from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.python_operator import PythonOperator, BranchPythonOperator
from datetime import datetime, timedelta
import zipfile
import random
import pandas as pd
default_args = {
'owner': 'Neylson Crepalde',
"depends_on... | 27.058824 | 160 | 0.714348 | from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.python_operator import PythonOperator, BranchPythonOperator
from datetime import datetime, timedelta
import zipfile
import random
import pandas as pd
default_args = {
'owner': 'Neylson Crepalde',
"depends_on... | true | true |
f7780ee722af2fae1a4ef2ee67fa127613b6be55 | 15,709 | py | Python | src/handlers.py | rome2rio/TokyoGTFS | c641529cd4e1d84692e85060dacb710270bc235f | [
"MIT"
] | 10 | 2018-10-24T13:49:18.000Z | 2022-02-06T22:58:34.000Z | src/handlers.py | rome2rio/TokyoGTFS | c641529cd4e1d84692e85060dacb710270bc235f | [
"MIT"
] | null | null | null | src/handlers.py | rome2rio/TokyoGTFS | c641529cd4e1d84692e85060dacb710270bc235f | [
"MIT"
] | 6 | 2019-04-17T03:57:29.000Z | 2021-01-26T11:44:53.000Z | try: import ijson.backends.yajl2_c as ijson
except: import ijson
from datetime import datetime, timedelta, date
from warnings import warn
from bs4 import BeautifulSoup
from copy import copy
from tempfile import TemporaryDirectory
import pykakasi
import requests
import iso8601
import json
import csv
import io
import os... | 32.591286 | 116 | 0.588262 | try: import ijson.backends.yajl2_c as ijson
except: import ijson
from datetime import datetime, timedelta, date
from warnings import warn
from bs4 import BeautifulSoup
from copy import copy
from tempfile import TemporaryDirectory
import pykakasi
import requests
import iso8601
import json
import csv
import io
import os... | true | true |
f7780f3425371c22efe2ad997060b29fce725cf4 | 11,051 | py | Python | docs/code/Intro_Testing.py | abhilashgupta/fuzzingbook | 7fdf50c1d110e060c5758ac938d18d70d7861104 | [
"MIT"
] | null | null | null | docs/code/Intro_Testing.py | abhilashgupta/fuzzingbook | 7fdf50c1d110e060c5758ac938d18d70d7861104 | [
"MIT"
] | null | null | null | docs/code/Intro_Testing.py | abhilashgupta/fuzzingbook | 7fdf50c1d110e060c5758ac938d18d70d7861104 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This material is part of "The Fuzzing Book".
# Web site: https://www.fuzzingbook.org/html/Intro_Testing.html
# Last change: 2019-10-19 14:04:52+02:00
#
#!/
# Copyright (c) 2018-2019 Saarland University, CISPA, authors, and contributors
#
# Permission is hereby granted, ... | 19.4903 | 81 | 0.611981 |
if __name__ == "__main__":
print('# Introduction to Software Testing')
if __name__ == "__main__":
print('\n## Simple Testing')
def my_sqrt(x):
approx = None
guess = x / 2
while approx != guess:
approx = guess
guess = (approx + x / approx) / 2
return approx
if __nam... | true | true |
f7780f9b37f6ce30ac78ed4772e02163fc9294ce | 901 | py | Python | Dobble_Game.py | parth2608/NPTEL-Joy-of-computing-with-Python | ab1bf72612ec386da5bf3e5669145859814ef51c | [
"MIT"
] | null | null | null | Dobble_Game.py | parth2608/NPTEL-Joy-of-computing-with-Python | ab1bf72612ec386da5bf3e5669145859814ef51c | [
"MIT"
] | null | null | null | Dobble_Game.py | parth2608/NPTEL-Joy-of-computing-with-Python | ab1bf72612ec386da5bf3e5669145859814ef51c | [
"MIT"
] | null | null | null | import string
import random
symbols=[]
symbols=list(string.ascii_letters)
card1=[0]*5
card2=[0]*5
pos1=random.randint(0,4)
pos2=random.randint(0,4)
samesymbol=random.choice(symbols)
symbols.remove(samesymbol)
if(pos1==pos2):
card2[pos1]=samesymbol
card1[pos1]=samesymbol
else:
card1[pos1]=sames... | 24.351351 | 41 | 0.661487 | import string
import random
symbols=[]
symbols=list(string.ascii_letters)
card1=[0]*5
card2=[0]*5
pos1=random.randint(0,4)
pos2=random.randint(0,4)
samesymbol=random.choice(symbols)
symbols.remove(samesymbol)
if(pos1==pos2):
card2[pos1]=samesymbol
card1[pos1]=samesymbol
else:
card1[pos1]=sames... | true | true |
f77810a3ce002298a85373bfc0b13431d32c66f1 | 5,113 | py | Python | tensorflow_federated/python/core/impl/wrappers/computation_wrapper_instances.py | houcharlie/federated-legacy | cb10a9cdcea33288f8113e7445782d21c8c65f81 | [
"Apache-2.0"
] | 5 | 2020-06-04T20:10:25.000Z | 2020-07-22T02:15:38.000Z | tensorflow_federated/python/core/impl/wrappers/computation_wrapper_instances.py | houcharlie/federated-legacy | cb10a9cdcea33288f8113e7445782d21c8c65f81 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/impl/wrappers/computation_wrapper_instances.py | houcharlie/federated-legacy | cb10a9cdcea33288f8113e7445782d21c8c65f81 | [
"Apache-2.0"
] | 1 | 2022-02-27T18:31:12.000Z | 2022-02-27T18:31:12.000Z | # Copyright 2018, The TensorFlow Federated 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 applicable law o... | 46.063063 | 88 | 0.749853 |
from tensorflow_federated.python.common_libs import py_typecheck
from tensorflow_federated.python.core.impl import computation_impl
from tensorflow_federated.python.core.impl import federated_computation_utils
from tensorflow_federated.python.core.impl import tensorflow_serialization
from tensorflow_federated.python.c... | true | true |
f77810b88e87c04fb8e59ed7498559d02863649e | 7,591 | py | Python | gramex/handlers/modelhandler.py | NAnnamalai/gramex | 6a0845aed2f7423da09eaa84678d3a0519fe1ff1 | [
"MIT"
] | 130 | 2019-02-05T06:09:16.000Z | 2022-03-31T03:09:00.000Z | gramex/handlers/modelhandler.py | NAnnamalai/gramex | 6a0845aed2f7423da09eaa84678d3a0519fe1ff1 | [
"MIT"
] | 457 | 2019-02-05T05:08:34.000Z | 2022-03-30T03:47:45.000Z | gramex/handlers/modelhandler.py | NAnnamalai/gramex | 6a0845aed2f7423da09eaa84678d3a0519fe1ff1 | [
"MIT"
] | 50 | 2019-02-12T12:20:02.000Z | 2022-03-15T02:50:02.000Z | import os
import json
import gramex.ml
import pandas as pd
import gramex.cache
import gramex.data
from gramex.handlers import BaseHandler
import tornado.escape
class ModelHandler(BaseHandler):
'''
Allows users to create API endpoints to train/test models exposed through Scikit-Learn.
TODO: support Scikit-... | 43.130682 | 97 | 0.608484 | import os
import json
import gramex.ml
import pandas as pd
import gramex.cache
import gramex.data
from gramex.handlers import BaseHandler
import tornado.escape
class ModelHandler(BaseHandler):
@classmethod
def setup(cls, path, **kwargs):
super(ModelHandler, cls).setup(**kwargs)
cls.path = path... | true | true |
f77811623def2a313524cb2aacb7090a56038bbb | 17,554 | py | Python | moto/elb/models.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 3 | 2020-08-04T20:29:41.000Z | 2020-11-09T09:28:19.000Z | moto/elb/models.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 1 | 2016-02-11T14:54:01.000Z | 2016-02-12T14:11:05.000Z | moto/elb/models.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 2 | 2017-03-02T05:59:52.000Z | 2020-09-03T13:25:44.000Z | from __future__ import unicode_literals
import datetime
from boto.ec2.elb.attributes import (
LbAttributes,
ConnectionSettingAttribute,
ConnectionDrainingAttribute,
AccessLogAttribute,
CrossZoneLoadBalancingAttribute,
)
from boto.ec2.elb.policies import Policies, OtherPolicy
from moto.compat import... | 36.723849 | 88 | 0.644924 | from __future__ import unicode_literals
import datetime
from boto.ec2.elb.attributes import (
LbAttributes,
ConnectionSettingAttribute,
ConnectionDrainingAttribute,
AccessLogAttribute,
CrossZoneLoadBalancingAttribute,
)
from boto.ec2.elb.policies import Policies, OtherPolicy
from moto.compat import... | true | true |
f77811a2499fd6b22e3abe1f4d94ae246d239b12 | 1,851 | py | Python | bookmanager/book/migrations/0001_initial.py | hucan602/info | dcc4910d7a048f83ebd68c1078f3a2e08f931300 | [
"MIT"
] | null | null | null | bookmanager/book/migrations/0001_initial.py | hucan602/info | dcc4910d7a048f83ebd68c1078f3a2e08f931300 | [
"MIT"
] | null | null | null | bookmanager/book/migrations/0001_initial.py | hucan602/info | dcc4910d7a048f83ebd68c1078f3a2e08f931300 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2020-09-24 01:41
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='BookInfo',
fields=[
... | 40.23913 | 128 | 0.562399 |
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='BookInfo',
fields=[
('id', models.AutoField(auto_created=T... | true | true |
f77811c1fcf3e5bcd2fa14ec6a260206e73190cb | 13,661 | py | Python | starter_kit/dev_meta_features/competition/data_io.py | infomon/meta_nas | b81b7de86d26ae1ec0d6646b4277f3c918e5e35d | [
"Apache-2.0"
] | 1 | 2021-07-08T15:32:26.000Z | 2021-07-08T15:32:26.000Z | starter_kit/dev_meta_features/competition/data_io.py | infomon/meta_nas | b81b7de86d26ae1ec0d6646b4277f3c918e5e35d | [
"Apache-2.0"
] | null | null | null | starter_kit/dev_meta_features/competition/data_io.py | infomon/meta_nas | b81b7de86d26ae1ec0d6646b4277f3c918e5e35d | [
"Apache-2.0"
] | null | null | null | # Functions performing various input/output operations for the ChaLearn AutoML challenge
# Main contributors: Arthur Pesah and Isabelle Guyon, August-October 2014
# ALL INFORMATION, SOFTWARE, DOCUMENTATION, AND DATA ARE PROVIDED "AS-IS".
# ISABELLE GUYON, CHALEARN, AND/OR OTHER ORGANIZERS OR CODE AUTHORS DISCLAIM
# A... | 34.672589 | 154 | 0.619501 |
# IN NO EVENT SHALL ISABELLE GUYON AND/OR OTHER ORGANIZERS BE LIABLE FOR ANY SPECIAL,
# INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF SOFTWARE, DOCUMENTS, MATERIALS,
# PUBLICATIONS, OR INFORMATION MADE AVAILABLE FOR THE CHALLENGE.
from __... | true | true |
f77813271b60d4ed2502af96bb7c9e1e4852a8cf | 6,639 | py | Python | tests/unit/beacons/test_watchdog.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | 1 | 2021-09-06T00:14:04.000Z | 2021-09-06T00:14:04.000Z | tests/unit/beacons/test_watchdog.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | 2 | 2021-04-30T21:17:57.000Z | 2021-12-13T20:40:23.000Z | tests/unit/beacons/test_watchdog.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Python libs
from __future__ import absolute_import, print_function, unicode_literals
import os
import shutil
import tempfile
import time
# Salt libs
import salt.utils.files
import salt.utils.platform
from salt.beacons import watchdog
from salt.ext.six.moves import range
from tests.support.mixins im... | 31.316038 | 79 | 0.597982 |
from __future__ import absolute_import, print_function, unicode_literals
import os
import shutil
import tempfile
import time
import salt.utils.files
import salt.utils.platform
from salt.beacons import watchdog
from salt.ext.six.moves import range
from tests.support.mixins import LoaderModuleMockMixin
from tests.sup... | true | true |
f77813e7334c09eda757ba0aee73abe114cb1737 | 7,442 | py | Python | sdk/python/pulumi_aws/appmesh/virtual_router.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/appmesh/virtual_router.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/appmesh/virtual_router.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Virtua... | 47.401274 | 320 | 0.661516 |
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class VirtualRouter(pulumi.CustomResource):
arn: pulumi.Output[str]
created_date: pulumi.Output[str]
last_updated_date: pulumi.Output[str]
mesh_name: pulumi.Output[str]
name: p... | true | true |
f77814fe3e54717b50c9288851ec105c22c5632f | 55,627 | py | Python | src/sfctl/tests/request_generation_test.py | rapatchi/service-fabric-cli | 2117349cfeced03b98d2a440193a09534ad438f1 | [
"MIT"
] | null | null | null | src/sfctl/tests/request_generation_test.py | rapatchi/service-fabric-cli | 2117349cfeced03b98d2a440193a09534ad438f1 | [
"MIT"
] | null | null | null | src/sfctl/tests/request_generation_test.py | rapatchi/service-fabric-cli | 2117349cfeced03b98d2a440193a09534ad438f1 | [
"MIT"
] | 1 | 2018-10-16T13:08:23.000Z | 2018-10-16T13:08:23.000Z | # -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
# ... | 48.20364 | 213 | 0.582289 |
from __future__ import print_function
from os import (remove, path)
import json
import logging
from shutil import rmtree
import vcr
from mock import patch
from knack.testsdk import ScenarioTest
from jsonpickle import decode
from sfctl.entry import cli
from sfctl.tests.helpers import (MOCK_CONFIG, get_mock_endpoint, ... | true | true |
f77818c22b2c87ba92cdfa6175bc11d3973dc2e5 | 12,404 | py | Python | scrubadub_spacy/detectors/spacy_name_title.py | LeapBeyond/scrubadub_spacy | 3387874882537b7111da2e9e4763b2f95e762473 | [
"Apache-2.0"
] | 27 | 2022-02-22T15:45:03.000Z | 2022-03-22T22:10:23.000Z | scrubadub_spacy/detectors/spacy_name_title.py | LeapBeyond/scrubadub_spacy | 3387874882537b7111da2e9e4763b2f95e762473 | [
"Apache-2.0"
] | null | null | null | scrubadub_spacy/detectors/spacy_name_title.py | LeapBeyond/scrubadub_spacy | 3387874882537b7111da2e9e4763b2f95e762473 | [
"Apache-2.0"
] | 3 | 2022-02-23T06:58:14.000Z | 2022-02-24T19:49:30.000Z |
from typing import Generator, Optional, Sequence, List, Iterable
try:
import spacy
from spacy.language import Language
from spacy.tokens import Doc
from spacy.tokens import Span
except ImportError as e:
if e.name == "spacy":
raise ImportError(
"Could not find module 'spacy'. If... | 44.142349 | 120 | 0.644873 |
from typing import Generator, Optional, Sequence, List, Iterable
try:
import spacy
from spacy.language import Language
from spacy.tokens import Doc
from spacy.tokens import Span
except ImportError as e:
if e.name == "spacy":
raise ImportError(
"Could not find module 'spacy'. If... | true | true |
f77818d2f755b1ef2e2aab05e07e99f9d89dcfa5 | 17,861 | py | Python | facecap.py | HighCWu/import_daz | d8fe108e4a0c5df3d8077b10f25b2deee0bd0f1f | [
"BSD-2-Clause"
] | null | null | null | facecap.py | HighCWu/import_daz | d8fe108e4a0c5df3d8077b10f25b2deee0bd0f1f | [
"BSD-2-Clause"
] | null | null | null | facecap.py | HighCWu/import_daz | d8fe108e4a0c5df3d8077b10f25b2deee0bd0f1f | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2016-2021, Thomas Larsson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions... | 40.318284 | 103 | 0.615587 |
import bpy
from mathutils import Vector, Euler, Matrix
from .error import *
from .utils import *
from .animation import ActionOptions
from .fileutils import SingleFile, TextFile, CsvFile
class FACSImporter(SingleFile, ActionOptions):
makeNewAction : BoolProperty(
name = "New Action",
descriptio... | true | true |
f77819239a3726fb1e362047fcee622885102869 | 1,264 | py | Python | smartteddy.basket.computer/service/speechrecognition/main.py | smart-teddy-project-hhs/SmartTeddy | 24df02705d50e4cb604973366e0fd961e9c21eaa | [
"MIT"
] | 2 | 2020-10-14T14:47:01.000Z | 2020-10-27T15:44:19.000Z | smartteddy.basket.computer/service/speechrecognition/main.py | smart-teddy-project-hhs/SmartTeddy | 24df02705d50e4cb604973366e0fd961e9c21eaa | [
"MIT"
] | 9 | 2020-10-24T11:06:26.000Z | 2020-10-30T14:52:36.000Z | smartteddy.basket.computer/service/speechrecognition/main.py | smart-teddy-project-hhs/SmartTeddy | 24df02705d50e4cb604973366e0fd961e9c21eaa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from vosk import Model, KaldiRecognizer
import os
import pyaudio
import requests
import json
voice_model = "medium_model_nl"
if not os.path.exists(voice_model):
print(
f"Please download the model from https://alphacephei.com/vosk/models and unpack as {voice_model} in the current fo... | 28.088889 | 129 | 0.670886 |
from vosk import Model, KaldiRecognizer
import os
import pyaudio
import requests
import json
voice_model = "medium_model_nl"
if not os.path.exists(voice_model):
print(
f"Please download the model from https://alphacephei.com/vosk/models and unpack as {voice_model} in the current folder.")
exit(1)
m... | true | true |
f778192917eee89b681158e609b932ddc2dd6af7 | 1,754 | py | Python | tests/sampling/certainty/test_most_confidence.py | dumpmemory/nlpatl | 59209242d1ac26714b11b86261070ac50cc90432 | [
"MIT"
] | 18 | 2021-11-29T06:43:46.000Z | 2022-03-29T09:58:32.000Z | tests/sampling/certainty/test_most_confidence.py | dumpmemory/nlpatl | 59209242d1ac26714b11b86261070ac50cc90432 | [
"MIT"
] | null | null | null | tests/sampling/certainty/test_most_confidence.py | dumpmemory/nlpatl | 59209242d1ac26714b11b86261070ac50cc90432 | [
"MIT"
] | 1 | 2021-11-29T06:43:47.000Z | 2021-11-29T06:43:47.000Z | import unittest
import numpy as np
from nlpatl.sampling.certainty import MostConfidenceSampling
class TestSamplingConfidence(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.data = np.array(
[
[0.01689184, 0.02989921, 0.92348951, 0.0158317, 0.01388775],... | 42.780488 | 78 | 0.583808 | import unittest
import numpy as np
from nlpatl.sampling.certainty import MostConfidenceSampling
class TestSamplingConfidence(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.data = np.array(
[
[0.01689184, 0.02989921, 0.92348951, 0.0158317, 0.01388775],... | true | true |
f778198a8e46bd8de743c8dc9e995c47bee7581f | 664 | py | Python | tests/unittest/assertAlmostEqual.py | nanobowers/py2cr | b7deb8c227cf43ce0e1bf7d638d5b4c00b7e9bdb | [
"MIT"
] | 61 | 2021-10-06T03:29:45.000Z | 2022-02-11T20:42:16.000Z | tests/unittest/assertAlmostEqual.py | nanobowers/py2rb | 4518a1549cfacc25a1ea3c736bca3de15a123878 | [
"MIT"
] | 2 | 2021-12-27T03:05:30.000Z | 2021-12-27T18:10:33.000Z | tests/unittest/assertAlmostEqual.py | nanobowers/py2cr | b7deb8c227cf43ce0e1bf7d638d5b4c00b7e9bdb | [
"MIT"
] | 2 | 2021-12-27T16:35:46.000Z | 2021-12-28T10:41:49.000Z | import unittest
class TestRunnable(unittest.TestCase):
def test_almeq(self):
#(first, second, places=7, msg=None, delta=None)
self.assertAlmostEqual(1.0, 1.00000001, 7)
self.assertAlmostEqual(1.0, 1.00000001, 7, '''comment test''')
self.assertAlmostEqual(1.0, 1.00000001, msg='''com... | 39.058824 | 86 | 0.65512 | import unittest
class TestRunnable(unittest.TestCase):
def test_almeq(self):
self.assertAlmostEqual(1.0, 1.00000001, 7)
self.assertAlmostEqual(1.0, 1.00000001, 7, '''comment test''')
self.assertAlmostEqual(1.0, 1.00000001, msg='''comment test''', delta=1e-8)
def test_notalmeq(s... | true | true |
f7781a63df32ff7a6698e157fe41c82f49e83947 | 7,733 | py | Python | a2c_ppo_acktr/envs.py | haider4445/MultipleAdvAttacks | 1bc3a3dc9c2b6787851d9e70c6127a9144ff34ba | [
"MIT"
] | 33 | 2021-01-12T14:21:24.000Z | 2022-03-22T00:38:50.000Z | a2c_ppo_acktr/envs.py | haider4445/MultipleAdvAttacks | 1bc3a3dc9c2b6787851d9e70c6127a9144ff34ba | [
"MIT"
] | 8 | 2020-11-04T16:13:39.000Z | 2021-01-03T05:46:25.000Z | a2c_ppo_acktr/envs.py | davide97l/Tianshou-adversarial-attacks | a5e420a39b6d0eaf38b300ae5d74d4732e5eb6ec | [
"MIT"
] | 5 | 2021-02-09T08:13:02.000Z | 2022-03-21T22:47:50.000Z | import os
import sys
import gym
import numpy as np
import torch
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import make_atari, wrap_deepmind
from baselines.common.vec_env import VecEnvWrapper
from baselines.common.vec_env.dummy_vec_env import DummyVecEnv
from baselin... | 30.808765 | 93 | 0.606492 | import os
import sys
import gym
import numpy as np
import torch
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import make_atari, wrap_deepmind
from baselines.common.vec_env import VecEnvWrapper
from baselines.common.vec_env.dummy_vec_env import DummyVecEnv
from baselin... | true | true |
f7781cceb36fda4696fac035cdc741f955542c9c | 10,213 | py | Python | contrib/devtools/github-merge.py | paakjis/bitcoin | 9189e30b127b6d9244da132c4c90084e7bb870be | [
"MIT"
] | 1 | 2020-01-27T13:09:48.000Z | 2020-01-27T13:09:48.000Z | contrib/devtools/github-merge.py | paakjis/bitcoin | 9189e30b127b6d9244da132c4c90084e7bb870be | [
"MIT"
] | null | null | null | contrib/devtools/github-merge.py | paakjis/bitcoin | 9189e30b127b6d9244da132c4c90084e7bb870be | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2016 Bitcoin Core Developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# This script will locally construct a merge commit for a pull request on a
# github repository, inspect it, sign ... | 43.275424 | 143 | 0.62489 |
# * pull/$PULL/head (the current state of the remote pull request)
# * pull/$PULL/merge (github's merge)
from __future__ import division,print_function,unicode_literals
import os,sys
from sys import stdin,stdout,stderr
import argparse
import subprocess
GIT = os.getenv('GIT','git')
BASH = os.getenv('BASH','bash')
A... | true | true |
f7781d00559111ad95aafec6fad1bda0576ecba5 | 5,216 | py | Python | Autodroid/label_al.py | AutumnSun1996/GameTools | 05ed69c09e69e284092cfaffd9eb6313f654c729 | [
"BSD-3-Clause"
] | null | null | null | Autodroid/label_al.py | AutumnSun1996/GameTools | 05ed69c09e69e284092cfaffd9eb6313f654c729 | [
"BSD-3-Clause"
] | null | null | null | Autodroid/label_al.py | AutumnSun1996/GameTools | 05ed69c09e69e284092cfaffd9eb6313f654c729 | [
"BSD-3-Clause"
] | null | null | null | import sys
import copy
from enum import IntEnum, auto
import tkinter as tk
from tkinter import simpledialog, Label
import itertools
import cv2.cv2 as cv
import numpy as np
from PIL import Image, ImageTk
from shapely import geometry
from simulator import image_tools, win32_tools
from notebook.azurlane import *
import... | 27.166667 | 88 | 0.613689 | import sys
import copy
from enum import IntEnum, auto
import tkinter as tk
from tkinter import simpledialog, Label
import itertools
import cv2.cv2 as cv
import numpy as np
from PIL import Image, ImageTk
from shapely import geometry
from simulator import image_tools, win32_tools
from notebook.azurlane import *
import... | true | true |
f7781d6061123d670f9fa8ed668df089641cf1a2 | 1,333 | py | Python | jesse/indicators/alligator.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 5 | 2021-05-21T07:39:16.000Z | 2021-11-17T11:08:41.000Z | jesse/indicators/alligator.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | null | null | null | jesse/indicators/alligator.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 2 | 2021-05-21T10:14:53.000Z | 2021-05-27T04:39:51.000Z | from collections import namedtuple
import numpy as np
from jesse.helpers import get_candle_source, np_shift, slice_candles
AG = namedtuple('AG', ['jaw', 'teeth', 'lips'])
def alligator(candles: np.ndarray, source_type: str = "close", sequential: bool = False) -> AG:
"""
Alligator
:param candles: np.nd... | 25.634615 | 95 | 0.621905 | from collections import namedtuple
import numpy as np
from jesse.helpers import get_candle_source, np_shift, slice_candles
AG = namedtuple('AG', ['jaw', 'teeth', 'lips'])
def alligator(candles: np.ndarray, source_type: str = "close", sequential: bool = False) -> AG:
candles = slice_candles(candles, sequential)... | true | true |
f7781f72a520a48b4b049cf6e49decbe6515bdc5 | 9,382 | py | Python | makesnap3.py | strofimovsky/aws-rolling-snaps | 231c3fef6981f442a6a9a38e5c9f04de84a3c840 | [
"BSD-3-Clause"
] | 19 | 2016-07-08T21:45:30.000Z | 2020-07-08T06:28:41.000Z | makesnap3.py | strofimovsky/aws-rolling-snaps | 231c3fef6981f442a6a9a38e5c9f04de84a3c840 | [
"BSD-3-Clause"
] | 14 | 2016-07-15T20:09:45.000Z | 2017-02-13T05:12:53.000Z | makesnap3.py | strofimovsky/aws-rolling-snaps | 231c3fef6981f442a6a9a38e5c9f04de84a3c840 | [
"BSD-3-Clause"
] | 6 | 2016-07-14T19:18:06.000Z | 2017-05-03T19:30:31.000Z | #!/usr/bin/env python
# Author: Sergey Trofimovsky <troff@paranoia.ru>
# (c) 2016
#
# License: BSD
"""Maintain rolling snapshots for EBS volumes
Usage::
$ makesnap3.py {hour|day|week|month|year}
"""
import argparse
import boto3
import sys
import re
import os
import time
import json
import logging
from datetime i... | 31.589226 | 120 | 0.571307 |
import argparse
import boto3
import sys
import re
import os
import time
import json
import logging
from datetime import datetime
from collections import defaultdict
config_defaults = defaultdict(lambda: None, {
'aws_profile_name': 'default',
'ec2_region_name': '',
'tag_name': 'MakeSnapshot',
'tag_va... | true | true |
f7781f8205cb5de5a5a70ae7d49df374cfea9b9e | 1,509 | py | Python | apps/competition/urls.py | HON95/studlan | 8dc38c64d0060506d865b9c834466fed2f9f9571 | [
"MIT"
] | null | null | null | apps/competition/urls.py | HON95/studlan | 8dc38c64d0060506d865b9c834466fed2f9f9571 | [
"MIT"
] | null | null | null | apps/competition/urls.py | HON95/studlan | 8dc38c64d0060506d865b9c834466fed2f9f9571 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import url
from .views import (activity_details, activity_details_filtered, competition_details, forfeit, join,
lan_compos, lan_list, leave, main, register_score, schedule, start_compo, submit_score)
urlpatterns = [
# Main comp oversight
url(... | 48.677419 | 135 | 0.67727 |
from django.conf.urls import url
from .views import (activity_details, activity_details_filtered, competition_details, forfeit, join,
lan_compos, lan_list, leave, main, register_score, schedule, start_compo, submit_score)
urlpatterns = [
url(r'^$', main, name='competitions'),
url(r'^... | true | true |
f778203561213694768d578b78a6dbddfd2eac76 | 11,039 | py | Python | tweets2text/models.py | rji-futures-lab/tweets-to-text | 06294ee4655734108850577774d3caf615f66520 | [
"MIT"
] | 1 | 2019-07-12T17:34:08.000Z | 2019-07-12T17:34:08.000Z | tweets2text/models.py | rji-futures-lab/tweets-to-text | 06294ee4655734108850577774d3caf615f66520 | [
"MIT"
] | 51 | 2018-08-17T22:04:11.000Z | 2021-09-22T18:01:10.000Z | tweets2text/models.py | rji-futures-lab/tweets-to-text | 06294ee4655734108850577774d3caf615f66520 | [
"MIT"
] | 1 | 2019-12-03T17:23:24.000Z | 2019-12-03T17:23:24.000Z | import json
import random
from time import sleep
import uuid
from django.conf import settings
from django.contrib.postgres.fields import ArrayField, JSONField
from django.db import models
from django.utils import timezone
from requests.exceptions import HTTPError
from TwitterAPI import TwitterPager
from .constants impo... | 26.6 | 88 | 0.571157 | import json
import random
from time import sleep
import uuid
from django.conf import settings
from django.contrib.postgres.fields import ArrayField, JSONField
from django.db import models
from django.utils import timezone
from requests.exceptions import HTTPError
from TwitterAPI import TwitterPager
from .constants impo... | true | true |
f77822f18e8a7e3166b380d579c555832475bb32 | 12,104 | py | Python | mordecai/utilities.py | vks/mordecai | 87c1aee4864975cc672323d043e5fbf9d6f554f7 | [
"MIT"
] | null | null | null | mordecai/utilities.py | vks/mordecai | 87c1aee4864975cc672323d043e5fbf9d6f554f7 | [
"MIT"
] | null | null | null | mordecai/utilities.py | vks/mordecai | 87c1aee4864975cc672323d043e5fbf9d6f554f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
import os
import sys
import json
import numpy
import pandas as pd
from elasticsearch_dsl import Search, Q
from elasticsearch import Elasticsearch
import spacy
try:
nlp
except NameError:
nlp = spacy.load('en_c... | 45.164179 | 114 | 0.590549 | from __future__ import unicode_literals
from __future__ import print_function
import os
import sys
import json
import numpy
import pandas as pd
from elasticsearch_dsl import Search, Q
from elasticsearch import Elasticsearch
import spacy
try:
nlp
except NameError:
nlp = spacy.load('en_core_web_lg')
def count... | true | true |
f77824d8f08497b77eaed74f8ba3d94b23981c31 | 131 | py | Python | test.py | dzruyk/labbot | bc1bfa5a507dfc7c40348d45b917c9d97c8f710d | [
"EFL-2.0"
] | null | null | null | test.py | dzruyk/labbot | bc1bfa5a507dfc7c40348d45b917c9d97c8f710d | [
"EFL-2.0"
] | null | null | null | test.py | dzruyk/labbot | bc1bfa5a507dfc7c40348d45b917c9d97c8f710d | [
"EFL-2.0"
] | null | null | null | #!/usr/bin/python3
import willie
@willie.module.commands('helloworld')
def helloworld(bot, trigger):
bot.say('Hello, world!')
| 18.714286 | 37 | 0.717557 | import willie
@willie.module.commands('helloworld')
def helloworld(bot, trigger):
bot.say('Hello, world!')
| true | true |
f77825661be1714a19eeb3c8f9979a332e53465d | 864 | py | Python | conf_testing/lib/HABAppTests/test_rule/test_case/test_case.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 44 | 2018-12-13T08:46:44.000Z | 2022-03-07T03:23:21.000Z | conf_testing/lib/HABAppTests/test_rule/test_case/test_case.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 156 | 2019-03-02T20:53:31.000Z | 2022-03-23T13:13:58.000Z | conf_testing/lib/HABAppTests/test_rule/test_case/test_case.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 18 | 2019-03-08T07:13:21.000Z | 2022-03-22T19:52:31.000Z | import time
from HABAppTests.test_rule._rest_patcher import RestPatcher
from HABAppTests.test_rule.test_case import TestResult, TestResultStatus
class TestCase:
def __init__(self, name: str, func: callable, args=[], kwargs={}):
self.name = name
self.func = func
self.args = args
se... | 28.8 | 72 | 0.575231 | import time
from HABAppTests.test_rule._rest_patcher import RestPatcher
from HABAppTests.test_rule.test_case import TestResult, TestResultStatus
class TestCase:
def __init__(self, name: str, func: callable, args=[], kwargs={}):
self.name = name
self.func = func
self.args = args
se... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.