hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fa1dac41f6cdbe45d9bdbb17c56e14fbb16ff4f4 | 4,427 | py | Python | huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/show_backup_policy_result.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/show_backup_policy_result.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/show_backup_policy_result.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowBackupPolicyResult:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The... | 26.35119 | 79 | 0.568782 |
5293ff72d08fd59887c24e467577b8ad7458a42f | 892 | py | Python | it.unibo.raspIntro2022/code/python/sonar.py | TryKatChup/IssLab2022 | ab970d8c7bc7f8519b2e1683cd6bf5ff24511b20 | [
"MIT"
] | 2 | 2022-03-03T20:05:58.000Z | 2022-03-04T23:09:26.000Z | it.unibo.raspIntro2022/code/python/sonar.py | TryKatChup/IssLab2022 | ab970d8c7bc7f8519b2e1683cd6bf5ff24511b20 | [
"MIT"
] | null | null | null | it.unibo.raspIntro2022/code/python/sonar.py | TryKatChup/IssLab2022 | ab970d8c7bc7f8519b2e1683cd6bf5ff24511b20 | [
"MIT"
] | null | null | null | # File: sonar.py
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
TRIG = 17
ECHO = 27
GPIO.setup(TRIG,GPIO.OUT)
GPIO.setup(ECHO,GPIO.IN)
GPIO.output(TRIG, False) #TRIG parte LOW
#print ('Waiting a few seconds for the sensor to settle')
time.sleep(2)
while True:
GPIO.output(T... | 22.871795 | 74 | 0.692825 |
b97060461c043aec5d13a09701eff4daec017216 | 368 | py | Python | dataset/toy_data_cfg.py | M3DV/SimTA | 0bb0caccbb87123e4de0e2dba17555e17e11c85d | [
"Apache-2.0"
] | 11 | 2020-11-08T11:16:53.000Z | 2022-02-20T13:33:07.000Z | dataset/toy_data_cfg.py | M3DV/SimTA | 0bb0caccbb87123e4de0e2dba17555e17e11c85d | [
"Apache-2.0"
] | null | null | null | dataset/toy_data_cfg.py | M3DV/SimTA | 0bb0caccbb87123e4de0e2dba17555e17e11c85d | [
"Apache-2.0"
] | null | null | null | import os
# generating function config
w_min, w_max = -10, 10
b_min, b_max = -10, 10
alpha_min, alpha_max = -2, 2
beta_min, beta_max = -5, 5
num_freq = 10
eps = 0.5
# train/val config
num_total_samples = 10000
duration_per_step = 2
num_pt_per_sample = 10
num_test_pt = 3
val_pct = 0.2
# save path
save_path = os.path... | 17.52381 | 66 | 0.722826 |
bf7c230db5a235d3e345b33a73b9b96ac52e7e13 | 473 | py | Python | Dataset/Leetcode/train/1/711.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/1/711.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/1/711.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution(object):
def XXX(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
result_nums = []
length = len(nums)
for x in range(length):
for y in range(x+1,length):
if nums[x] + num... | 26.277778 | 47 | 0.443975 |
0317be329ebe5d3a8b758b78f593ba495d9b5e2f | 532 | py | Python | tests/test_base_proforma_calc.py | mgrazebrook/excel2py | 02a7022aff05f6529eaabdbada92b346e8b88421 | [
"MIT"
] | null | null | null | tests/test_base_proforma_calc.py | mgrazebrook/excel2py | 02a7022aff05f6529eaabdbada92b346e8b88421 | [
"MIT"
] | 10 | 2020-05-01T00:07:45.000Z | 2020-10-23T21:36:32.000Z | tests/test_base_proforma_calc.py | mgrazebrook/excel2py | 02a7022aff05f6529eaabdbada92b346e8b88421 | [
"MIT"
] | null | null | null | from excel2py.base_proforma_calc import BaseProformaCalc
import unittest
class Sub(BaseProformaCalc):
inputs = {'x'}
class TestBaseProformaCalc(unittest.TestCase):
def test_good(self):
s = Sub()
s.calculate(x=4)
def test_missing(self):
s = Sub()
with self.assertRaises(Ty... | 19.703704 | 56 | 0.616541 |
dd19eec4bc83fba49a6c170076181d91e2c0c9db | 1,202 | py | Python | fastats/linear_algebra/qr.py | AaronCritchley/fastats | 3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe | [
"MIT"
] | 26 | 2017-07-17T09:19:53.000Z | 2021-11-30T01:36:56.000Z | fastats/linear_algebra/qr.py | AaronCritchley/fastats | 3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe | [
"MIT"
] | 320 | 2017-09-02T16:26:25.000Z | 2021-07-28T05:19:49.000Z | fastats/linear_algebra/qr.py | AaronCritchley/fastats | 3c8e50fffc08ee0dd44c615f4ed93adc47c08ffe | [
"MIT"
] | 13 | 2017-07-06T19:02:29.000Z | 2020-01-22T11:36:34.000Z |
import numpy as np
def qr_classical_gram_schmidt(A):
"""
Returns the QR decomposition of matrix A using
the modified Gram-Schmidt method.
"""
A = A.copy().astype(np.float64)
n = A.shape[1]
Q = np.zeros_like(A, dtype=np.float64)
R = np.zeros(shape=(n, n), dtype=np.float64)
for j i... | 24.04 | 51 | 0.498336 |
62742308f42a21188d30deb885a31c6ad5d00fbb | 1,445 | py | Python | var/spack/repos/builtin/packages/damask-mesh/package.py | pbrady/spack | 91fc4cf28fa7145e1f855f8c03f30574a550308f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 348 | 2015-12-30T04:05:54.000Z | 2022-02-21T10:57:53.000Z | var/spack/repos/builtin/packages/damask-mesh/package.py | pbrady/spack | 91fc4cf28fa7145e1f855f8c03f30574a550308f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3,994 | 2015-12-09T09:43:00.000Z | 2017-11-04T02:46:39.000Z | var/spack/repos/builtin/packages/damask-mesh/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 359 | 2015-12-16T18:25:55.000Z | 2017-11-02T14:51:13.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class DamaskMesh(CMakePackage):
"""Mesh solver for DAMASK"""
homepage = "https://damask.mpie.de"
url = ... | 36.125 | 102 | 0.678201 |
9465dcdf4f73306f228c231a466be4f8a1d8f738 | 3,543 | py | Python | amazon_paapi/sdk/models/items_result.py | frenners/python-amazon-paapi | 9cb744bef17f5127231367430191df12126e9c24 | [
"MIT"
] | 121 | 2020-03-07T06:56:56.000Z | 2022-03-30T21:03:43.000Z | amazon_paapi/sdk/models/items_result.py | frenners/python-amazon-paapi | 9cb744bef17f5127231367430191df12126e9c24 | [
"MIT"
] | 61 | 2020-03-03T11:03:58.000Z | 2022-01-20T19:27:49.000Z | amazon_paapi/sdk/models/items_result.py | frenners/python-amazon-paapi | 9cb744bef17f5127231367430191df12126e9c24 | [
"MIT"
] | 29 | 2020-03-04T18:08:22.000Z | 2022-03-25T18:49:46.000Z | # coding: utf-8
"""
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
A copy of the License is located at
http://www.apache.org/licenses/LICENSE-2.0
... | 27.253846 | 80 | 0.576912 |
3961ee8c5cd168f314ac11d8f4c3c4875ab13b92 | 2,037 | py | Python | hackerrank/contests/accel/balanced_string.py | spradeepv/dive-into-python | ec27d4686b7b007d21f9ba4f85d042be31ee2639 | [
"MIT"
] | null | null | null | hackerrank/contests/accel/balanced_string.py | spradeepv/dive-into-python | ec27d4686b7b007d21f9ba4f85d042be31ee2639 | [
"MIT"
] | null | null | null | hackerrank/contests/accel/balanced_string.py | spradeepv/dive-into-python | ec27d4686b7b007d21f9ba4f85d042be31ee2639 | [
"MIT"
] | null | null | null | """
A balanced string is a string having the following properties:
Both the left and right halves contain the same characters.
Both the left and right halves contain unique characters.
For example, abbaabba is balanced because the left half (abab) and the right
half (baba) both contain the same unique characters.
Xav... | 29.1 | 77 | 0.726559 |
e11865b830843d66420ccc130c3af4f21fb9793d | 138 | py | Python | numpy/mathFunction/numpyMathArithmetic.py | slowy07/pythonApps | 22f9766291dbccd8185035745950c5ee4ebd6a3e | [
"MIT"
] | 10 | 2020-10-09T11:05:18.000Z | 2022-02-13T03:22:10.000Z | numpy/mathFunction/numpyMathArithmetic.py | khairanabila/pythonApps | f90b8823f939b98f7bf1dea7ed35fe6e22e2f730 | [
"MIT"
] | null | null | null | numpy/mathFunction/numpyMathArithmetic.py | khairanabila/pythonApps | f90b8823f939b98f7bf1dea7ed35fe6e22e2f730 | [
"MIT"
] | 6 | 2020-11-26T12:49:43.000Z | 2022-03-06T06:46:43.000Z | import numpy as np
in_num = 2.0
print ("Input number : ", in_num)
out_num = np.reciprocal(in_num)
print ("Output number : ", out_num) | 19.714286 | 35 | 0.681159 |
54d5fe1a81630b6cc431990ebfbbb38263a576d9 | 7,301 | py | Python | tests/test_base_table/test_gen_table.py | mgedmin/terminaltables | ad8f46e50afdbaea377fc1f713bc0e7a31c4fccc | [
"MIT"
] | 742 | 2015-01-03T21:46:14.000Z | 2022-03-27T05:49:32.000Z | tests/test_base_table/test_gen_table.py | mgedmin/terminaltables | ad8f46e50afdbaea377fc1f713bc0e7a31c4fccc | [
"MIT"
] | 64 | 2015-01-06T01:34:12.000Z | 2020-05-07T21:52:11.000Z | tests/test_base_table/test_gen_table.py | mgedmin/terminaltables | ad8f46e50afdbaea377fc1f713bc0e7a31c4fccc | [
"MIT"
] | 96 | 2015-02-26T16:42:42.000Z | 2022-02-06T14:00:24.000Z | """Test method in BaseTable class."""
import pytest
from terminaltables.base_table import BaseTable
from terminaltables.build import flatten
from terminaltables.width_and_alignment import max_dimensions
@pytest.mark.parametrize('inner_heading_row_border', [True, False])
@pytest.mark.parametrize('inner_footing_row_b... | 32.30531 | 119 | 0.435694 |
dcd6d7e490ea5a9fe241c79175e9340e9125f880 | 3,134 | py | Python | examples/commandline/restore_branin.py | TheVinhLuong102/AutoML-SMAC3 | d4cb7ed76e0fbdd9edf6ab5360ff75de67ac2195 | [
"BSD-3-Clause"
] | 711 | 2016-08-22T14:23:29.000Z | 2022-03-29T21:56:12.000Z | examples/commandline/restore_branin.py | TheVinhLuong102/AutoML-SMAC3 | d4cb7ed76e0fbdd9edf6ab5360ff75de67ac2195 | [
"BSD-3-Clause"
] | 770 | 2016-08-17T14:39:07.000Z | 2022-03-31T11:35:58.000Z | examples/commandline/restore_branin.py | TheVinhLuong102/AutoML-SMAC3 | d4cb7ed76e0fbdd9edf6ab5360ff75de67ac2195 | [
"BSD-3-Clause"
] | 210 | 2016-08-20T15:14:29.000Z | 2022-03-30T08:04:34.000Z | """
Restore Branin
^^^^^^^^^^^^^^
This file runs SMAC and then restores the branin run with an extended computation
budget. This will also work for SMAC runs that have crashed and are continued.
"""
import logging
logging.basicConfig(level=logging.INFO)
import os
from smac.facade.smac_ac_facade import SMAC4AC
from ... | 34.065217 | 88 | 0.699107 |
9e8ee8a96caa10c4732c44ea979c0c4fcb3ea1e6 | 12,524 | py | Python | perimeterx/px_context.py | PerimeterX/perimeterx-python-ws | 945a8741dc916568b16e8abc889aac3e02f50f4f | [
"MIT"
] | 14 | 2016-09-29T08:08:05.000Z | 2022-01-12T00:53:50.000Z | perimeterx/px_context.py | PerimeterX/perimeterx-python-ws | 945a8741dc916568b16e8abc889aac3e02f50f4f | [
"MIT"
] | 8 | 2016-09-29T08:57:42.000Z | 2021-03-17T11:56:52.000Z | perimeterx/px_context.py | PerimeterX/perimeterx-python-ws | 945a8741dc916568b16e8abc889aac3e02f50f4f | [
"MIT"
] | 4 | 2016-12-01T10:17:04.000Z | 2019-04-21T09:57:02.000Z | from requests.structures import CaseInsensitiveDict
from px_constants import *
from px_data_enrichment_cookie import PxDataEnrichmentCookie
class PxContext(object):
def __init__(self, request, config):
logger = config.logger
# Default values
px_cookies = {}
request_cookie_names =... | 28.463636 | 121 | 0.655541 |
feb038ea885ed1e2304c558200712a9e21e4f7ba | 2,189 | py | Python | test/test_redshift.py | Nordstrom/nordata | 935b58f5bcdf100a9211db3bbe7d98a332c81158 | [
"Apache-2.0"
] | 5 | 2019-01-08T20:47:23.000Z | 2020-03-26T02:49:54.000Z | test/test_redshift.py | Nordstrom/nordata | 935b58f5bcdf100a9211db3bbe7d98a332c81158 | [
"Apache-2.0"
] | 3 | 2020-02-04T18:52:40.000Z | 2020-03-31T00:54:05.000Z | test/test_redshift.py | Nordstrom/nordata | 935b58f5bcdf100a9211db3bbe7d98a332c81158 | [
"Apache-2.0"
] | 2 | 2021-06-13T22:47:36.000Z | 2022-02-26T12:52:01.000Z | import os
import pytest
from ..nordata import _redshift as rs
os.environ['TEST_CREDS'] = 'host=my_hostname dbname=my_dbname user=my_user password=my_password port=1234'
def test_redshift_get_conn_value_error():
# test whether redshift_get_conn() raises a ValueError when passed a connection str
with pytest.r... | 33.676923 | 107 | 0.717679 |
64564e64aa26ba538394a409a69def897ffdc672 | 1,146 | py | Python | app/models/Post.py | mhans003/python-newsapp | 5958bd5fc85df6f254d464895a197cbeef1f1e2c | [
"MIT"
] | null | null | null | app/models/Post.py | mhans003/python-newsapp | 5958bd5fc85df6f254d464895a197cbeef1f1e2c | [
"MIT"
] | null | null | null | app/models/Post.py | mhans003/python-newsapp | 5958bd5fc85df6f254d464895a197cbeef1f1e2c | [
"MIT"
] | 1 | 2021-02-17T16:07:34.000Z | 2021-02-17T16:07:34.000Z | from datetime import datetime
from app.db import Base
from .Vote import Vote
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, select, func
from sqlalchemy.orm import relationship, column_property
# Use datetime to create created_at and updated_at fields
# Reference post's user via Foreign Key.
# W... | 44.076923 | 99 | 0.760035 |
52b6433b318cc6b56afec1b246216ff0383a3b5d | 10,240 | py | Python | python_ip_true/LVMvSSGP_model_SV2_IP.py | RomanFoell/-V-SS | 457f35ffd321cdfe9359d1df707fde9a32041c9c | [
"MIT"
] | 4 | 2017-11-03T13:28:50.000Z | 2019-04-02T22:57:49.000Z | python_ip_true/LVMvSSGP_model_SV2_IP.py | RomanFoell/-V-SS | 457f35ffd321cdfe9359d1df707fde9a32041c9c | [
"MIT"
] | null | null | null | python_ip_true/LVMvSSGP_model_SV2_IP.py | RomanFoell/-V-SS | 457f35ffd321cdfe9359d1df707fde9a32041c9c | [
"MIT"
] | 1 | 2019-12-27T05:35:15.000Z | 2019-12-27T05:35:15.000Z | # To speed Theano up, create ram disk: mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk
# Then use flag THEANO_FLAGS='base_compiledir=/mnt/ramdisk' python script.py
import sys; sys.path.insert(0, "../Theano"); sys.path.insert(0, "../../Theano")
import theano; import theano.tensor as T; import theano.sandbox.linalg as ... | 53.056995 | 335 | 0.550391 |
1680b7bb9ecdfe88e00723667cba86d577a85bab | 1,900 | py | Python | test_script/combine_json.py | warmchang/sieve | 57c2fa7d773ee344d517794f53730548f574cd3f | [
"BSD-2-Clause"
] | null | null | null | test_script/combine_json.py | warmchang/sieve | 57c2fa7d773ee344d517794f53730548f574cd3f | [
"BSD-2-Clause"
] | null | null | null | test_script/combine_json.py | warmchang/sieve | 57c2fa7d773ee344d517794f53730548f574cd3f | [
"BSD-2-Clause"
] | null | null | null | import glob
import json
import time
import os
import sys
def merge(result, patch):
"""
Recursive function to merge two dict
"""
for key in patch:
if key not in result:
result[key] = patch[key]
else:
if type(patch[key]) is not dict:
print("ERROR: ... | 26.388889 | 86 | 0.525263 |
04f2cd4ee4ba0b9b653e1e5525ea1212aba94378 | 971 | py | Python | daily_menu/daily_menu/urls.py | michalkvacek/at-chutna | bd34deaab62378d4f6598ac497de7a4a8bd41263 | [
"MIT"
] | null | null | null | daily_menu/daily_menu/urls.py | michalkvacek/at-chutna | bd34deaab62378d4f6598ac497de7a4a8bd41263 | [
"MIT"
] | null | null | null | daily_menu/daily_menu/urls.py | michalkvacek/at-chutna | bd34deaab62378d4f6598ac497de7a4a8bd41263 | [
"MIT"
] | null | null | null | """daily_menu URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 32.366667 | 77 | 0.700309 |
4f2c7606ac59d17b9ed07015747a164ff779e630 | 57,626 | py | Python | graph-to-graph/pydot.py | mbrcknl/graph-refine | 78c74f18127db53606f18f775a5a50de86bc6b97 | [
"BSD-2-Clause",
"MIT"
] | 6 | 2017-03-17T17:57:48.000Z | 2019-12-28T13:03:23.000Z | graph-to-graph/pydot.py | myuluo/graph-refine | 8924af0c61c3c863db7957e0ebac7ae1ceefad9d | [
"BSD-2-Clause",
"MIT"
] | 3 | 2020-04-07T09:15:55.000Z | 2022-03-23T01:36:26.000Z | graph-to-graph/pydot.py | myuluo/graph-refine | 8924af0c61c3c863db7957e0ebac7ae1ceefad9d | [
"BSD-2-Clause",
"MIT"
] | 7 | 2020-04-16T00:32:41.000Z | 2022-03-09T05:25:23.000Z | # -*- coding: Latin-1 -*-
#
# SPDX-License-Identifier: MIT
"""Graphviz's dot language Python interface.
This module provides with a full interface to create handle modify
and process graphs in Graphviz's dot language.
References:
pydot Homepage: http://code.google.com/p/pydot/
Graphviz: http://www.graphviz.or... | 28.248039 | 115 | 0.582376 |
9d3a9e004280740c4d8ff8381f4384536b31ecff | 26,103 | py | Python | pyramid/tests/test_integration.py | danielpronych/pyramid-doxygen | ad95a8c151c2c4e029e03aed2feda2993380f36f | [
"BSD-2-Clause"
] | null | null | null | pyramid/tests/test_integration.py | danielpronych/pyramid-doxygen | ad95a8c151c2c4e029e03aed2feda2993380f36f | [
"BSD-2-Clause"
] | null | null | null | pyramid/tests/test_integration.py | danielpronych/pyramid-doxygen | ad95a8c151c2c4e029e03aed2feda2993380f36f | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import locale
import os
import unittest
from pyramid.wsgi import wsgiapp
from pyramid.view import view_config
from pyramid.static import static_view
from pyramid.compat import (
text_,
url_quote,
)
from zope.interface import Interface
# 5 years from now (more or l... | 37.183761 | 128 | 0.643719 |
a6e8a9370c5094456b40177c39c5db2650ffb535 | 2,276 | py | Python | test_autogalaxy/cosmology/test_model.py | Jammy2211/PyAutoModel | 02f54e71900de9ec12c9070dc00a4bd001b25afa | [
"MIT"
] | null | null | null | test_autogalaxy/cosmology/test_model.py | Jammy2211/PyAutoModel | 02f54e71900de9ec12c9070dc00a4bd001b25afa | [
"MIT"
] | null | null | null | test_autogalaxy/cosmology/test_model.py | Jammy2211/PyAutoModel | 02f54e71900de9ec12c9070dc00a4bd001b25afa | [
"MIT"
] | null | null | null | import pytest
import autogalaxy as ag
def test__planck15_Om0(planck15):
planck15_Om0 = ag.cosmo.model.Planck15Om0()
critical_surface_density = planck15.critical_surface_density_between_redshifts_from(
redshift_0=0.1, redshift_1=1.0
)
critical_surface_density_Om0 = planck15_Om0... | 32.514286 | 103 | 0.753076 |
d64a3117847c55dd10639f52f2d1eeef6ce718d3 | 6,724 | py | Python | tests/python/pants_test/util/test_contextutil.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/util/test_contextutil.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/util/test_contextutil.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import shu... | 37.775281 | 100 | 0.674152 |
55e6a36a35dea42e8b1a9a12cac0fd42e73c1b3c | 282 | py | Python | mayan/apps/ocr/runtime.py | darrenflexxu/Mayan-EDMS | 6707365bfacd137e625ddc1b990168012246fa07 | [
"Apache-2.0"
] | null | null | null | mayan/apps/ocr/runtime.py | darrenflexxu/Mayan-EDMS | 6707365bfacd137e625ddc1b990168012246fa07 | [
"Apache-2.0"
] | 5 | 2021-03-19T22:59:52.000Z | 2022-03-12T00:13:16.000Z | mayan/apps/ocr/runtime.py | Sumit-Kumar-Jha/mayan | 5b7ddeccf080b9e41cc1074c70e27dfe447be19f | [
"Apache-2.0"
] | 1 | 2020-07-29T21:03:27.000Z | 2020-07-29T21:03:27.000Z | from __future__ import unicode_literals
from django.utils.module_loading import import_string
from .settings import setting_ocr_backend, setting_ocr_backend_arguments
ocr_backend = import_string(
dotted_path=setting_ocr_backend.value
)(**setting_ocr_backend_arguments.value)
| 28.2 | 72 | 0.861702 |
439c0eca1cb26c8b930b0560c63b48fd6ea73069 | 3,727 | py | Python | src/eval.py | jangirrishabh/look-closer | 91647b429a5e8f85fe29079035d4f51772df8382 | [
"MIT"
] | 15 | 2022-01-20T01:04:35.000Z | 2022-01-29T09:30:50.000Z | src/eval.py | jangirrishabh/look-closer | 91647b429a5e8f85fe29079035d4f51772df8382 | [
"MIT"
] | 1 | 2022-03-24T23:44:11.000Z | 2022-03-27T21:59:24.000Z | src/eval.py | jangirrishabh/look-closer | 91647b429a5e8f85fe29079035d4f51772df8382 | [
"MIT"
] | 1 | 2022-01-29T09:30:50.000Z | 2022-01-29T09:30:50.000Z | import torch
import torchvision
import os
import numpy as np
import gym
import utils
from copy import deepcopy
#from tqdm import tqdm
from arguments import parse_args
from env.wrappers import make_env
from algorithms.factory import make_agent
from video import VideoRecorder
import augmentations
import cv2
def evaluat... | 31.584746 | 139 | 0.739469 |
7c9a26712758be449f96c7354f4c0c28955bb85a | 700 | py | Python | demo/demo_app/celery.py | jlmadurga/listenclosely | d6df9110c3ed6fd337e0236cccbe4d931bf217b0 | [
"BSD-3-Clause"
] | 7 | 2016-01-25T15:15:54.000Z | 2018-02-17T18:48:54.000Z | demo/demo_app/celery.py | jlmadurga/listenclosely | d6df9110c3ed6fd337e0236cccbe4d931bf217b0 | [
"BSD-3-Clause"
] | 3 | 2016-03-11T13:22:17.000Z | 2017-10-18T13:28:39.000Z | demo/demo_app/celery.py | jlmadurga/listenclosely | d6df9110c3ed6fd337e0236cccbe4d931bf217b0 | [
"BSD-3-Clause"
] | 3 | 2016-12-08T17:12:35.000Z | 2018-01-06T22:57:40.000Z | from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo_app.settings")
app = Celery('listenclosely')
# Using a string here means the worker wi... | 28 | 68 | 0.797143 |
4f35f47ff4b0da2594c2c1aeb63b46f7236c3f9f | 12,353 | py | Python | tests/testflows/rbac/tests/syntax/create_row_policy.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | 18 | 2021-05-29T01:12:33.000Z | 2021-11-18T12:34:48.000Z | tests/testflows/rbac/tests/syntax/create_row_policy.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | 1 | 2020-03-26T01:50:51.000Z | 2020-03-26T01:50:51.000Z | tests/testflows/rbac/tests/syntax/create_row_policy.py | edani/ClickHouse | 17a8a4e9664fabed5b370b37e148139ba698acf5 | [
"Apache-2.0"
] | 2 | 2021-07-13T06:42:45.000Z | 2021-07-21T13:47:22.000Z | from contextlib import contextmanager
from testflows.core import *
import rbac.helper.errors as errors
from rbac.requirements import *
@TestFeature
@Name("create row policy")
@Args(format_description=False)
def feature(self, node="clickhouse1"):
"""Check create row policy query syntax.
```sql
CREATE [RO... | 54.902222 | 136 | 0.615235 |
da4d5a04e690c532a0a1d65bd78527ec520311d7 | 1,138 | py | Python | spacy/lang/lb/stop_words.py | ghollah/spaCy | 2d249a9502bfc5d3d2111165672d964b1eebe35e | [
"MIT"
] | null | null | null | spacy/lang/lb/stop_words.py | ghollah/spaCy | 2d249a9502bfc5d3d2111165672d964b1eebe35e | [
"MIT"
] | null | null | null | spacy/lang/lb/stop_words.py | ghollah/spaCy | 2d249a9502bfc5d3d2111165672d964b1eebe35e | [
"MIT"
] | null | null | null | # coding: utf8
from __future__ import unicode_literals
STOP_WORDS = set("""
a
à
äis
är
ärt
äert
ären
all
allem
alles
alleguer
als
also
am
an
anerefalls
ass
aus
awer
bei
beim
bis
bis
d'
dach
datt
däin
där
dat
de
dee
den
deel
deem
deen
deene
déi
den
deng
denger
dem
der
dësem
di
dir
do
da
dann
domat
dozou
drop
du
duerch
... | 5.342723 | 39 | 0.793497 |
f406ed67ae1bdba2a4daf5449d45d32d7cf9eabb | 1,489 | py | Python | bot.py | Boundarybreaker/FakeArtistBot | 1bbb6bf82d1656430afe2a4ce3b9b553148fef04 | [
"MIT"
] | null | null | null | bot.py | Boundarybreaker/FakeArtistBot | 1bbb6bf82d1656430afe2a4ce3b9b553148fef04 | [
"MIT"
] | null | null | null | bot.py | Boundarybreaker/FakeArtistBot | 1bbb6bf82d1656430afe2a4ce3b9b553148fef04 | [
"MIT"
] | null | null | null | import discord
from discord import Message
import random
opted_in = []
class FakeArtBot(discord.Client):
async def on_message(self, message: Message):
if message.author == self.user:
return
if message.content.startswith('!fab optin'):
opted_in.append(message.author)
... | 36.317073 | 81 | 0.568838 |
c091cfda73913191860c821a391b26807b814dfc | 1,581 | py | Python | utils/parser/planet/expression_clusters.py | legumeinfo/CoNekT | 709a4980cfa255cafd456b268e274db2b4b1f5fb | [
"MIT"
] | 14 | 2018-08-20T03:07:21.000Z | 2021-11-04T11:15:31.000Z | utils/parser/planet/expression_clusters.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 9 | 2018-07-17T15:30:47.000Z | 2021-07-05T13:11:54.000Z | utils/parser/planet/expression_clusters.py | mutwil/CoNekT | f4a4496a87d14b15bcf587975b31a2edc24c6bf7 | [
"MIT"
] | 3 | 2019-08-05T09:16:34.000Z | 2019-12-04T23:59:28.000Z | import csv
class Parser:
def __init__(self, ):
self.clusters = {}
def read_expression_clusters(self, network_file, cluster_file):
"""
Reads hrr and hcca file from the original PlaNet pipeline
ids are based on line number starting with 0 !
:param network_file: path to... | 35.133333 | 94 | 0.55408 |
5a68c241476a145f12b58ae741f299fdec973e29 | 933 | py | Python | toontown/ai/DistributedPolarBearMgrAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/ai/DistributedPolarBearMgrAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/ai/DistributedPolarBearMgrAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from toontown.toon.ToonDNA import ToonDNA
class DistributedPolarBearMgrAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedPolarBearMgrAI")
def re... | 42.409091 | 116 | 0.689175 |
590d8de8bf744cdfaa4d9f3f82d36a9864edf3bf | 25,183 | py | Python | python/handler.py | kgladstone/thesis | 6e35fbd7c2cd08e868ce5c36cd64e8025c9e5f53 | [
"BSD-3-Clause"
] | null | null | null | python/handler.py | kgladstone/thesis | 6e35fbd7c2cd08e868ce5c36cd64e8025c9e5f53 | [
"BSD-3-Clause"
] | null | null | null | python/handler.py | kgladstone/thesis | 6e35fbd7c2cd08e868ce5c36cd64e8025c9e5f53 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Filename: handler.py
Author: Keith Gladstone
Description:
This file is the heart of the program
It handles all vehicle allocation and repositioning
Contains trip_buffer, trip_location_hash_table, etc.
"""
import csv
import sys
from collections import deque
from math im... | 43.796522 | 98 | 0.64611 |
5425fffd8331989c35a30d693f02eab6c527b178 | 842 | py | Python | modules/helpers/resubscription.py | BatedUrGonnaDie/salty_bot | f8ad53fdd865762225de49164400db33fae8ba85 | [
"MIT"
] | 12 | 2015-01-16T16:48:30.000Z | 2020-08-11T20:11:51.000Z | modules/helpers/resubscription.py | BatedUrGonnaDie/salty_bot | f8ad53fdd865762225de49164400db33fae8ba85 | [
"MIT"
] | 28 | 2015-01-28T10:54:51.000Z | 2018-04-10T19:06:34.000Z | modules/helpers/resubscription.py | BatedUrGonnaDie/salty_bot | f8ad53fdd865762225de49164400db33fae8ba85 | [
"MIT"
] | 4 | 2015-07-13T08:41:32.000Z | 2019-01-12T16:19:01.000Z | #! /usr/bin/env python3.7
ON_ACTION = "USERNOTICE"
def call(salty_inst, c_msg, balancer, **kwargs):
if not c_msg["tags"] and c_msg["tags"]["msg-id"] == "resub":
return False, "Message is not a resubscription."
if not salty_inst.config["settings"]["sub_message_active"]:
return False, "Resubscr... | 42.1 | 90 | 0.667458 |
ce229d2494d427ff35435c41a3a724fb0e844456 | 5,760 | py | Python | main/data_collector.py | syxu828/Graph2Seq-0.1 | 36e38f755c0ee390735e49121259151da54bcc1c | [
"Apache-2.0"
] | 24 | 2018-11-04T17:16:52.000Z | 2022-01-06T12:34:49.000Z | main/data_collector.py | syxu828/Graph2Seq-0.1 | 36e38f755c0ee390735e49121259151da54bcc1c | [
"Apache-2.0"
] | 3 | 2018-12-09T00:31:36.000Z | 2020-07-29T06:21:51.000Z | main/data_collector.py | syxu828/Graph2Seq-0.1 | 36e38f755c0ee390735e49121259151da54bcc1c | [
"Apache-2.0"
] | 4 | 2019-01-09T06:44:41.000Z | 2019-08-04T07:55:00.000Z | import numpy as np
import json
import configure as conf
from collections import OrderedDict
def read_data(input_path, word_idx, if_increase_dict):
seqs = []
graphs = []
if if_increase_dict:
word_idx[conf.GO] = 1
word_idx[conf.EOS] = 2
word_idx[conf.unknown_word] = 3
with open(... | 29.538462 | 124 | 0.55191 |
b1883ab49ea3180eb89628df04429fcae34dcc43 | 785,241 | py | Python | simhash/simcache.py | GitHub-ZuoWei/simhash | 31115126cc12781093c0145a6203f7989a210f91 | [
"Apache-2.0"
] | 26 | 2016-07-12T07:25:39.000Z | 2021-08-18T09:39:28.000Z | simhash/simcache.py | GitHub-ZuoWei/simhash | 31115126cc12781093c0145a6203f7989a210f91 | [
"Apache-2.0"
] | null | null | null | simhash/simcache.py | GitHub-ZuoWei/simhash | 31115126cc12781093c0145a6203f7989a210f91 | [
"Apache-2.0"
] | 16 | 2015-11-24T01:30:46.000Z | 2021-07-29T01:27:28.000Z | SIMCACHE = {
'a': 0x0cc175b9c0f1b6a831c399e269772661,
'b': 0x92eb5ffee6ae2fec3ad71c777531578f,
'c': 0x4a8a08f09d37b73795649038408b5f33,
'd': 0x8277e0910d750195b448797616e091ad,
'e': 0xe1671797c52e15f763380b45e841ec32,
'f': 0x8fa14cdd754f91cc6554c9e71929cce7,
'g': 0xb2f5ff47436671b6e533d8dc3614845d,
'h': 0x2510c39011c5b... | 42.953941 | 42 | 0.86033 |
3a3a8e1dc760993c607735e7aad62a78c98bba42 | 1,583 | py | Python | src/pretalx/common/console.py | Hydro2shine/sprout | 7dfa5e9fa0a7ef9157517ad0752e393599053873 | [
"Apache-2.0"
] | null | null | null | src/pretalx/common/console.py | Hydro2shine/sprout | 7dfa5e9fa0a7ef9157517ad0752e393599053873 | [
"Apache-2.0"
] | null | null | null | src/pretalx/common/console.py | Hydro2shine/sprout | 7dfa5e9fa0a7ef9157517ad0752e393599053873 | [
"Apache-2.0"
] | null | null | null | BOLD = '\033[1m'
RESET = '\033[0m'
UD = '│'
LR = '─'
SEPARATORS = {
(False, True, True, False): '┬',
(True, False, False, True): '┴',
(False, False, True, True): '┤',
(True, True, False, False): '├',
(False, True, False, True): '┼',
(True, False, True, False): '┼',
}
def get_seperator(*args):
... | 26.830508 | 79 | 0.527479 |
8f93260ba974a52d2ed0c7cdbbb8b3d91bf9d83f | 4,206 | py | Python | resources/lib/settings.py | kolbenhans/script.kodi.hue.ambilight | 821f9aa53c3e89f171ac0d0675424776c6a51d06 | [
"WTFPL"
] | 172 | 2016-06-17T08:14:00.000Z | 2021-11-28T01:19:30.000Z | resources/lib/settings.py | kolbenhans/script.kodi.hue.ambilight | 821f9aa53c3e89f171ac0d0675424776c6a51d06 | [
"WTFPL"
] | 119 | 2016-06-14T17:09:02.000Z | 2021-12-27T22:08:41.000Z | resources/lib/settings.py | kolbenhans/script.kodi.hue.ambilight | 821f9aa53c3e89f171ac0d0675424776c6a51d06 | [
"WTFPL"
] | 73 | 2016-06-15T08:58:06.000Z | 2021-06-18T07:44:21.000Z | import sys
import xbmcaddon
__addon__ = sys.modules["__main__"].__addon__
class Settings():
def __init__(self, *args, **kwargs):
self.readxml()
def readxml(self):
global __addon__
__addon__ = xbmcaddon.Addon()
self.bridge_ip = __addon__.getSetting("bridge_ip")
self.... | 53.240506 | 121 | 0.711365 |
3006b39b2d334767a28822e63cb4938432c237a4 | 11,800 | py | Python | src/status.py | Yasmojam/DoYouHaveTheGuts2019 | dae9c1db27707f3a244845ccc282373a64ad7248 | [
"MIT"
] | null | null | null | src/status.py | Yasmojam/DoYouHaveTheGuts2019 | dae9c1db27707f3a244845ccc282373a64ad7248 | [
"MIT"
] | 1 | 2019-10-20T14:59:29.000Z | 2019-10-20T14:59:29.000Z | src/status.py | Yasmojam/DoYouHaveTheGuts2019 | dae9c1db27707f3a244845ccc282373a64ad7248 | [
"MIT"
] | null | null | null | from server import ServerMessageTypes, ObjectUpdate, Message
from enemy import Enemy
from typing import List
from collectable import COLLECTABLE_TYPES, Collectable
from time import time
from utils import closest_point, calculate_distance, count_within_radius, count_not_within_radius
GOAL_UNSAFE_TIME = 20
BLUE_GOAL = ... | 37.341772 | 97 | 0.622797 |
f8d12eadf1026ef5ccdb0e57ddd7cb0c1c6a7ef7 | 827 | py | Python | dataset/check_missing_files.py | fubiye/edgar-abs-kg | 3973059c7b1cdaab8a4e857a43c702ac0be7e725 | [
"MIT"
] | null | null | null | dataset/check_missing_files.py | fubiye/edgar-abs-kg | 3973059c7b1cdaab8a4e857a43c702ac0be7e725 | [
"MIT"
] | null | null | null | dataset/check_missing_files.py | fubiye/edgar-abs-kg | 3973059c7b1cdaab8a4e857a43c702ac0be7e725 | [
"MIT"
] | null | null | null | import os
import pandas as pd
BASE_DIR = r'D:\data\edgar\sampling\Archives\edgar\data'
ABS_DATA = r'D:\data\edgar\edgar_abs_universal.csv'
def get_ciks():
ciks = set()
for cik in os.listdir(BASE_DIR):
# full_cik = cik.rjust(10,'0')
# ciks.add(full_cik)
ciks.add(int(cik))
return cik... | 30.62963 | 92 | 0.59734 |
5ecfe8e1ccf629d3e84c7be1381a03f7ce74d1b2 | 3,387 | py | Python | configure.py | mjansson/memory_lib | 41687d0713a0c2a7901ccb6fbad7e588d531fe75 | [
"Unlicense"
] | 5 | 2020-05-08T12:32:59.000Z | 2022-03-30T18:09:32.000Z | configure.py | mjansson/memory_lib | 41687d0713a0c2a7901ccb6fbad7e588d531fe75 | [
"Unlicense"
] | null | null | null | configure.py | mjansson/memory_lib | 41687d0713a0c2a7901ccb6fbad7e588d531fe75 | [
"Unlicense"
] | 1 | 2020-06-14T14:46:25.000Z | 2020-06-14T14:46:25.000Z | #!/usr/bin/env python
"""Ninja build configurator for memory library"""
import sys
import os
sys.path.insert(0, os.path.join('build', 'ninja'))
import generator
dependlibs = ['memory', 'foundation']
generator = generator.Generator(project = 'memory', dependlibs = dependlibs, variables = [('bundleidentifier', 'com... | 47.041667 | 207 | 0.681134 |
53f90d419abdc05675dec9fb37e3e86c6b351ace | 565 | py | Python | django_app/urls.py | Ninad998/FinalYearProject | 5f626b8316d8f4c70cdd481701c20f7f1488c9fb | [
"MIT"
] | 1 | 2019-11-08T08:51:24.000Z | 2019-11-08T08:51:24.000Z | django_app/urls.py | Ninad998/FinalYearProject | 5f626b8316d8f4c70cdd481701c20f7f1488c9fb | [
"MIT"
] | null | null | null | django_app/urls.py | Ninad998/FinalYearProject | 5f626b8316d8f4c70cdd481701c20f7f1488c9fb | [
"MIT"
] | 1 | 2019-11-08T08:51:31.000Z | 2019-11-08T08:51:31.000Z | # coding=utf-8
from django.conf.urls import url
import views
urlpatterns = [
url(r'^$', views.post_list, name='post_list'),
url(r'^post/(?P<pk>\d+)/$', views.post_detail, name='post_detail'),
url(r'^post/new/$', views.post_new, name='post_new'),
url(r'^post/(?P<pk>\d+)/edit/$', views.post_edit, name='p... | 40.357143 | 81 | 0.640708 |
24747011801d372cec89fcc15391335d1eda7c30 | 772 | py | Python | app/app.py | alexander-esser/sample-web-app | eeb870985563d83131d663e343c8f89338718c08 | [
"MIT"
] | null | null | null | app/app.py | alexander-esser/sample-web-app | eeb870985563d83131d663e343c8f89338718c08 | [
"MIT"
] | null | null | null | app/app.py | alexander-esser/sample-web-app | eeb870985563d83131d663e343c8f89338718c08 | [
"MIT"
] | 1 | 2021-07-18T07:20:50.000Z | 2021-07-18T07:20:50.000Z | import time
import redis
from flask import Flask, Response
FLASK_PORT = 5000
REDIS_PORT = 6379
app = Flask(__name__)
cache = redis.Redis(host="redis", port=REDIS_PORT)
def get_hit_count():
try:
return cache.incr("hits")
except redis.exceptions.ConnectionError as exc:
return -1
@app.route("... | 22.705882 | 110 | 0.665803 |
187ac4166bc9b5e8063281533a7e479e7499f610 | 43,128 | py | Python | pkgs/statsmodels-0.6.1-np110py27_0/lib/python2.7/site-packages/statsmodels/stats/weightstats.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 10 | 2016-05-18T11:46:33.000Z | 2018-12-23T04:52:27.000Z | statsmodels/stats/weightstats.py | AnaMP/statsmodels | 2d4aad9a14619ce0c84d4c7bca9dacd66b2be566 | [
"BSD-3-Clause"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | statsmodels/stats/weightstats.py | AnaMP/statsmodels | 2d4aad9a14619ce0c84d4c7bca9dacd66b2be566 | [
"BSD-3-Clause"
] | 3 | 2015-04-01T08:26:54.000Z | 2020-02-14T14:34:10.000Z | '''Ttests and descriptive statistics with weights
Created on 2010-09-18
Author: josef-pktd
License: BSD (3-clause)
References
----------
SPSS manual
SAS manual
This follows in large parts the SPSS manual, which is largely the same as
the SAS manual with different, simpler notation.
Freq, Weight in SAS seems redu... | 33.432558 | 86 | 0.60128 |
4f1abb5aebc96429d365f921eaf61661bd347b04 | 834 | py | Python | src/djanban/apps/dev_times/migrations/0007_auto_20161111_1927.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 33 | 2017-06-14T18:04:25.000Z | 2021-06-15T07:07:56.000Z | src/djanban/apps/dev_times/migrations/0007_auto_20161111_1927.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 1 | 2017-05-10T08:45:55.000Z | 2017-05-10T08:45:55.000Z | src/djanban/apps/dev_times/migrations/0007_auto_20161111_1927.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 8 | 2017-08-27T11:14:25.000Z | 2021-03-03T12:11:16.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-11 18:27
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dev_times', '0006_auto_20161012_1431'),
]
operations... | 30.888889 | 177 | 0.655875 |
3bde35949d944282078786759ee6c61e90efb294 | 2,590 | py | Python | backend/config/settings.py | z3by/tweety-django-vue | 1f85b73cf98258be7d4b4547e6d9d596f8149892 | [
"MIT"
] | 1 | 2021-07-08T12:45:20.000Z | 2021-07-08T12:45:20.000Z | backend/config/settings.py | z3by/tweety-django | 1f85b73cf98258be7d4b4547e6d9d596f8149892 | [
"MIT"
] | 1 | 2021-06-10T02:34:12.000Z | 2021-06-10T02:34:12.000Z | backend/config/settings.py | z3by/tweety-django | 1f85b73cf98258be7d4b4547e6d9d596f8149892 | [
"MIT"
] | 1 | 2021-06-07T21:54:30.000Z | 2021-06-07T21:54:30.000Z | from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = "django-insecure-r%t+n$xoz8v6822z!j4f#49(xbf)yn#d@0h4u5@7#$o@8wm8*7"
DEBUG = True
ALLOWED_HOSTS = []
SITE_ID = 1
INSTALLED_APPS = [
"tweets",
"users",
"django.contrib.sites",
"django.contrib.admin",
"django... | 24.903846 | 91 | 0.675676 |
3e71e6e8c4887c455d31b805ab75ba9dbc3ff5bd | 1,143 | py | Python | app/tests/mixins/pep8_view_test_mixin.py | dandye/DjanGoat | 72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d | [
"MIT"
] | 65 | 2017-08-18T15:12:03.000Z | 2021-08-14T16:50:07.000Z | app/tests/mixins/pep8_view_test_mixin.py | dandye/DjanGoat | 72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d | [
"MIT"
] | 83 | 2017-11-28T21:45:20.000Z | 2021-11-02T18:52:52.000Z | app/tests/mixins/pep8_view_test_mixin.py | dandye/DjanGoat | 72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d | [
"MIT"
] | 71 | 2017-08-17T14:58:01.000Z | 2022-02-02T17:09:49.000Z | import pep8
# Mixin for testing the pep8 style rules.
class Pep8ViewsTests(object):
def test_pep8_conformance_views(self):
file_path = self.path + 'views.py'
pep8style = pep8.StyleGuide(quiet=True)
result = pep8style.check_files([file_path])
self._validate(result, file_path)
... | 36.870968 | 102 | 0.671916 |
e1c62155cff8c409947e69487aa1c0c562eb4f33 | 19,383 | py | Python | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_targets_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_targets_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_targets_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 55.538682 | 250 | 0.670588 |
8eacf3514ad762e80438a0df296904a2aba65dfa | 1,403 | py | Python | count_hands.py | zimolzak/poker-experiments | 796942993d08810464b10cee09a3df26aec309f0 | [
"MIT"
] | 2 | 2017-09-10T11:04:56.000Z | 2021-08-05T17:57:42.000Z | count_hands.py | zimolzak/poker-experiments | 796942993d08810464b10cee09a3df26aec309f0 | [
"MIT"
] | 5 | 2016-11-06T14:08:15.000Z | 2016-11-07T13:33:31.000Z | count_hands.py | zimolzak/poker-experiments | 796942993d08810464b10cee09a3df26aec309f0 | [
"MIT"
] | null | null | null | from pokermodules.convenience_hole import HR, deck_choose_2, numbers_of_hole_cards, numbers_of_hole_cards_random
standard_order = [] # Becomes list of strings ['AA', 'KK', 'QQ', ... 'AKs', ...]
ranks = 'AKQJT98765432'
for c in ranks:
standard_order += [c+c] #pairs
for a in ranks:
for b in ranks:
if ran... | 25.981481 | 112 | 0.632217 |
6f220b963f71213fb2ee5ed435a97c96abf836b1 | 4,025 | py | Python | misc/libs/helper.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | misc/libs/helper.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | misc/libs/helper.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | import os
import difflib
import configparser
def get_win_machine_name():
"""
Checks for misc/names.cfg and returns the value of win_machine_name if existing
:return: value of win_machine_name in names.cfg
"""
if os.path.exists('misc/names.cfg'):
config_path = 'misc/names.cfg'
elif os.p... | 34.401709 | 116 | 0.640248 |
0ceeeb13a5044bcf00f9b9bf5b3128a95bc4ddc0 | 1,320 | py | Python | gym_miniworld/envs/__init__.py | ptigas/tmaze | e0f4cb7e2f9d52663256ae95c1e9bbc41793de27 | [
"Apache-2.0"
] | 1 | 2021-06-17T14:05:35.000Z | 2021-06-17T14:05:35.000Z | gym_miniworld/envs/__init__.py | ptigas/tmaze | e0f4cb7e2f9d52663256ae95c1e9bbc41793de27 | [
"Apache-2.0"
] | null | null | null | gym_miniworld/envs/__init__.py | ptigas/tmaze | e0f4cb7e2f9d52663256ae95c1e9bbc41793de27 | [
"Apache-2.0"
] | null | null | null | import inspect
import gym
from .remotebot import *
from .hallway import *
from .oneroom import *
from .roomobjs import *
from .pickupobjs import *
from .tmaze import *
from .tmazecue import *
from .treasurescue import *
from .ymaze import *
from .maze import *
from .fourrooms import *
from .threerooms import *
from .w... | 22.372881 | 58 | 0.668182 |
73c3da09fa9f711e2ea152fc367d6c12fc9f1db2 | 1,086 | py | Python | test.py | zeevneumeier/abafilter | 0e82ba2a16d13ac7f5db00e01e69877c915014cc | [
"MIT"
] | null | null | null | test.py | zeevneumeier/abafilter | 0e82ba2a16d13ac7f5db00e01e69877c915014cc | [
"MIT"
] | null | null | null | test.py | zeevneumeier/abafilter | 0e82ba2a16d13ac7f5db00e01e69877c915014cc | [
"MIT"
] | null | null | null | import os
import sys
import syslog
from gtts import gTTS
from io import BytesIO
import pygame
import hashlib
import pydub
def playNag(message):
print("nagger.playNag(%s)" % message)
filename = "/tmp/abafilter_nag_%s.wav" % hashlib.md5(message.encode('utf-8')).hexdigest()
if not os.path.exis... | 24.681818 | 93 | 0.641805 |
91d5ddea07639beeae08c2b432aa36d3577d722b | 5,741 | py | Python | tests/S3Middleware/test_s3_middleware.py | bcsummers/falcon-provider-storage | 8c5847dd1b1ad80cb9baaa9d045a1eb6210cafcc | [
"Apache-2.0"
] | null | null | null | tests/S3Middleware/test_s3_middleware.py | bcsummers/falcon-provider-storage | 8c5847dd1b1ad80cb9baaa9d045a1eb6210cafcc | [
"Apache-2.0"
] | null | null | null | tests/S3Middleware/test_s3_middleware.py | bcsummers/falcon-provider-storage | 8c5847dd1b1ad80cb9baaa9d045a1eb6210cafcc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test hooks feature of falcon_provider_memcache module."""
# standard library
import binascii
import io
import json
import os
from typing import Tuple
from uuid import uuid4
# third-party
import botocore
from falcon.testing import Result
def create_multipart_formdata(fields: list) -> Tuple[... | 30.700535 | 99 | 0.652325 |
577dce42741d6e0c9855aceae68f7bc923619470 | 1,826 | py | Python | vis_dropout.py | RealMarco/GRConvNetCode | 6a2f4115c53e5c794d5a7ae23f1ec24cc58870af | [
"BSD-3-Clause"
] | null | null | null | vis_dropout.py | RealMarco/GRConvNetCode | 6a2f4115c53e5c794d5a7ae23f1ec24cc58870af | [
"BSD-3-Clause"
] | null | null | null | vis_dropout.py | RealMarco/GRConvNetCode | 6a2f4115c53e5c794d5a7ae23f1ec24cc58870af | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
from io import StringIO
plt.figure(1)
#font = FontProperties(fname=r'C:\Windows\Fonts\simhei.ttf')
#plt.plot([0,29],[0.90,0.90],color='k',linestyle='--',linewidth=0.4)
#plt.plot([0,29],[0.80,0.80],color='k',linestyle... | 39.695652 | 144 | 0.719606 |
f5982797bd0944c0683a1dbe8afa5e09370d0191 | 771 | py | Python | src/py/util/primerator.py | cgnik/euler | fe70459a0e0d0272980300a4782872f2e545fea5 | [
"MIT"
] | null | null | null | src/py/util/primerator.py | cgnik/euler | fe70459a0e0d0272980300a4782872f2e545fea5 | [
"MIT"
] | null | null | null | src/py/util/primerator.py | cgnik/euler | fe70459a0e0d0272980300a4782872f2e545fea5 | [
"MIT"
] | null | null | null | from multiprocessing import Pool
from util.factoring import is_prime_quick
class Primerator:
def __init__(self, limit):
self.limit = limit
def _candidate_generator_(self):
for x in range(3, self.limit, 2):
yield x
def _one_thread_(self, candidate):
if candidate % 10... | 27.535714 | 74 | 0.651102 |
5e2ab2bc86bd1dab83ad3e0fda6473a3fe74fcd9 | 4,486 | py | Python | tests/bootstrap_builders.py | priyankaanehra/regolith | 393c8a88eb7657d1ae5ea017e2cd0b72ed981e8f | [
"CC0-1.0"
] | 7 | 2018-07-20T19:19:23.000Z | 2022-02-02T20:48:15.000Z | tests/bootstrap_builders.py | priyankaanehra/regolith | 393c8a88eb7657d1ae5ea017e2cd0b72ed981e8f | [
"CC0-1.0"
] | 822 | 2017-11-06T21:54:58.000Z | 2022-03-31T12:25:41.000Z | tests/bootstrap_builders.py | priyankaanehra/regolith | 393c8a88eb7657d1ae5ea017e2cd0b72ed981e8f | [
"CC0-1.0"
] | 43 | 2018-01-05T20:35:21.000Z | 2022-03-24T00:13:03.000Z | import json
import os
import shutil
from xonsh.lib import subprocess
import sys
import tempfile
from copy import deepcopy
from regolith.broker import load_db
from regolith.fsclient import dump_yaml
from regolith.schemas import EXEMPLARS
from regolith.main import main
builder_map = [
"cv",
"html",
"resume... | 28.75641 | 83 | 0.50379 |
8c3bde5c77419950de0e1e7f3907a5ea1df9044a | 2,236 | py | Python | archigan/pipeline.py | ctogle/archigan | 5ba10e2fdfd612606c479aaf5b517799d41967b0 | [
"MIT"
] | 23 | 2020-09-07T03:27:36.000Z | 2022-03-27T19:21:19.000Z | archigan/pipeline.py | ctogle/archigan | 5ba10e2fdfd612606c479aaf5b517799d41967b0 | [
"MIT"
] | null | null | null | archigan/pipeline.py | ctogle/archigan | 5ba10e2fdfd612606c479aaf5b517799d41967b0 | [
"MIT"
] | 4 | 2021-05-11T04:17:52.000Z | 2022-03-27T19:21:21.000Z | import os
import cv2
import numpy as np
from tqdm import tqdm
#import argparse
#from multiprocessing import Pool
class ArchiPipeline:
"""
Args:
layers (list):
stages (list):
"""
def __init__(self, layers, stages):
self.layers = layers
self.stages = stages
@stati... | 33.878788 | 116 | 0.531753 |
d8fb66aa6f1f306c776aa5528dc65a57f7fde134 | 8,087 | py | Python | test/functional/test_framework/authproxy.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 158 | 2016-01-08T10:38:37.000Z | 2022-02-01T06:28:05.000Z | test/functional/test_framework/authproxy.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 196 | 2015-11-19T10:59:24.000Z | 2021-10-07T14:52:13.000Z | test/functional/test_framework/authproxy.py | orobio/gulden-official | a329faf163b15eabc7ff1d9f07ea87f66df8d27d | [
"MIT"
] | 71 | 2016-06-25T23:29:04.000Z | 2022-03-14T10:57:19.000Z | # Copyright (c) 2011 Jeff Garzik
#
# Previous copyright, from python-jsonrpc/jsonrpc/proxy.py:
#
# Copyright (c) 2007 Jan-Klaas Kollhof
#
# This file is part of jsonrpc.
#
# jsonrpc is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# th... | 42.78836 | 155 | 0.643626 |
caad8840197aff5b38baa9c6f4053c896eb12496 | 2,551 | py | Python | sunpy/util/xml.py | drewleonard42/sunpy | 79ca90a032213d82d42a3657a693b20b99b22464 | [
"BSD-2-Clause"
] | null | null | null | sunpy/util/xml.py | drewleonard42/sunpy | 79ca90a032213d82d42a3657a693b20b99b22464 | [
"BSD-2-Clause"
] | null | null | null | sunpy/util/xml.py | drewleonard42/sunpy | 79ca90a032213d82d42a3657a693b20b99b22464 | [
"BSD-2-Clause"
] | null | null | null | """XML helper functions"""
from xml.dom.minidom import parseString #pylint: disable=E0611,F0401
__all__ = ['NotTextNodeError', 'xml_to_dict', 'node_to_dict', 'get_node_text']
#
# Converting XML to a Dictionary
# Author: Christoph Dietze
# URL : http://code.activestate.com/recipes/116539/
#
class NotTextNodeError(E... | 27.728261 | 79 | 0.600941 |
9d8bdf974e696fbc4878ee884088c40fbd62f932 | 6,978 | py | Python | run_q_frozenlake.py | schuderer/bprl | e9820a7d0d8120776f4feac9776c66f205713075 | [
"MIT"
] | 2 | 2019-06-19T09:50:43.000Z | 2019-08-04T22:07:32.000Z | run_q_frozenlake.py | schuderer/bprl | e9820a7d0d8120776f4feac9776c66f205713075 | [
"MIT"
] | 11 | 2019-06-21T08:33:35.000Z | 2022-03-12T01:01:53.000Z | run_q_frozenlake.py | schuderer/bprl | e9820a7d0d8120776f4feac9776c66f205713075 | [
"MIT"
] | null | null | null | # Test code (simple q learner (discretized state & action space)):
#from envs.pension_env import PensionEnv
import gym
import random
import numpy as np
# todo: same as just log2-transforming, then splitting and exp2-ing?? Then maybe can handle bi-directional (0-centered) exp-splits...
def createExpSplits(high, bins, ... | 38.552486 | 150 | 0.642018 |
fa614ad8b1989eb4fc6d39b7584be2278f8cb0c1 | 8,324 | py | Python | my_own_messenger/my_own_client/client_gui.py | Rassoliny/MyOwnMess | 4a46a0738033cc952fbe6e734bc64ad24275c0ce | [
"MIT"
] | null | null | null | my_own_messenger/my_own_client/client_gui.py | Rassoliny/MyOwnMess | 4a46a0738033cc952fbe6e734bc64ad24275c0ce | [
"MIT"
] | null | null | null | my_own_messenger/my_own_client/client_gui.py | Rassoliny/MyOwnMess | 4a46a0738033cc952fbe6e734bc64ad24275c0ce | [
"MIT"
] | null | null | null | import sys
import os
from PyQt5 import QtWidgets, uic
from PyQt5.QtWidgets import (QMainWindow, QTextEdit, QLabel,
QAction, QFileDialog, QApplication)
from PyQt5.QtCore import Qt, QThread, pyqtSlot
from PyQt5.QtGui import QPixmap, QIcon
from client import User
from handlers import GuiReciever
# Получаем ... | 32.138996 | 121 | 0.70543 |
7edaf6ee1655b7eef789c124e17c2d6ca5c2b7bd | 2,200 | py | Python | config.py | Faisalsouz/PAN_OCR | 4dd6736c09015f211e7539135ef448d3919f6eac | [
"MIT"
] | 73 | 2019-07-17T08:27:27.000Z | 2022-03-12T09:50:35.000Z | config.py | Faisalsouz/PAN_OCR | 4dd6736c09015f211e7539135ef448d3919f6eac | [
"MIT"
] | 12 | 2019-08-13T20:32:31.000Z | 2022-01-10T17:05:35.000Z | config.py | Faisalsouz/PAN_OCR | 4dd6736c09015f211e7539135ef448d3919f6eac | [
"MIT"
] | 43 | 2019-05-16T10:02:27.000Z | 2022-03-18T03:06:52.000Z | import os
import argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('-d', '--darknet', dest='DARKNET', action='store_true', help="Specifies to use the Darknet classifier")
parser.add_argument('-t', '--tesseract', dest='TESSERACT', action='store_true', help="Use the local Tesseract O... | 33.846154 | 166 | 0.694545 |
c777b89eeaf12ae4b55d9af117b48c5a7f196b8f | 54,679 | py | Python | pandas/io/formats/format.py | zhezherun/pandas | 36c1104b7ad9761e020f7e8198eb60da4045d169 | [
"BSD-3-Clause"
] | 1 | 2018-12-07T18:33:30.000Z | 2018-12-07T18:33:30.000Z | pandas/io/formats/format.py | dkenward/pandas | 1f02bf240c3d0d3da338af868d056bfc169b28c2 | [
"BSD-3-Clause"
] | null | null | null | pandas/io/formats/format.py | dkenward/pandas | 1f02bf240c3d0d3da338af868d056bfc169b28c2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Internal module for formatting output data in csv, html,
and latex files. This module also applies to display formatting.
"""
from __future__ import print_function
from functools import partial
import numpy as np
from pandas._libs import lib
from pandas._libs.tslib import format_array_fr... | 34.281505 | 79 | 0.569433 |
9fac54448d0df771ce8ed78f7dd7fe2b68479f0a | 1,273 | py | Python | tdapi_test.py | KloudTrader/tdameritrade | 54097b616a496da0692c12bb9858f62163ee7909 | [
"MIT"
] | 31 | 2017-07-08T20:13:19.000Z | 2021-06-17T14:29:26.000Z | tdapi_test.py | KloudTrader/tdameritrade | 54097b616a496da0692c12bb9858f62163ee7909 | [
"MIT"
] | 5 | 2017-11-16T20:56:15.000Z | 2019-11-23T18:49:06.000Z | tdapi_test.py | dharmez/td-ameritrade | 9a2f59bb8bfb3c94c4184c862bbc8964f1e67fdf | [
"MIT"
] | 22 | 2017-02-22T00:31:13.000Z | 2021-09-21T07:57:53.000Z | from tdapi import TDAmeritradeAPI
import getpass
import argparse
import pandas as pd
import datetime
def main():
parser = argparse.ArgumentParser()
parser.add_argument('sourceid', help="API key provided by TD Ameritrade")
parser.add_argument('userid')
parser.add_argument('ticker', default='AMZN')
a... | 28.931818 | 104 | 0.684211 |
3185cd55bc768e5546f1aceb5ef627632892ce2a | 24,741 | py | Python | src/ralph/back_office/models.py | Russell-IO/ralph | 7c1f2369b39c894dce9cf511051f5593db452dc6 | [
"Apache-2.0"
] | 1 | 2019-04-15T04:10:21.000Z | 2019-04-15T04:10:21.000Z | src/ralph/back_office/models.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | null | null | null | src/ralph/back_office/models.py | hq-git/ralph | e2448caf02d6e5abfd81da2cff92aefe0a534883 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import logging
import os
import re
import tempfile
from functools import partial
from dj.choices import Choices, Country
from django import forms
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.exceptions import ImproperlyConfigur... | 33.845417 | 111 | 0.592498 |
fb091ad40b8b7523ea2848f9f06a3b58390a6b2b | 4,846 | py | Python | tests/test_pytest_zigzag_config.py | ryan-rs/pytest-zigzag | 7116357ab680a5a9bac47af3ac428f706cee0e93 | [
"Apache-2.0"
] | 1 | 2021-01-19T23:59:54.000Z | 2021-01-19T23:59:54.000Z | tests/test_pytest_zigzag_config.py | ryan-rs/pytest-zigzag | 7116357ab680a5a9bac47af3ac428f706cee0e93 | [
"Apache-2.0"
] | 3 | 2018-08-23T19:44:46.000Z | 2019-02-21T22:04:29.000Z | tests/test_pytest_zigzag_config.py | ryan-rs/pytest-zigzag | 7116357ab680a5a9bac47af3ac428f706cee0e93 | [
"Apache-2.0"
] | 3 | 2018-08-17T00:37:15.000Z | 2018-08-21T14:54:56.000Z | # -*- coding: utf-8 -*-
# ======================================================================================================================
# Imports
# ======================================================================================================================
from __future__ import absolute_import
impo... | 27.378531 | 120 | 0.570161 |
933e26062aa5bb046d16c7da89513e2bcde71391 | 1,742 | py | Python | salt/runners/diff.py | pwdng/salt | dea9cedfd6a78f810b0e51a9161bec9956379094 | [
"Apache-2.0"
] | 1 | 2019-04-16T11:09:50.000Z | 2019-04-16T11:09:50.000Z | salt/runners/diff.py | rakyll/salt | 63a497b9114784745712c77eeb3299d6e947c13f | [
"Apache-2.0"
] | null | null | null | salt/runners/diff.py | rakyll/salt | 63a497b9114784745712c77eeb3299d6e947c13f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
General map/reduce style salt-runner for aggregating identical results returned
by several different minions.
Aggregated results are sorted by the size of the minion pools which returned
identical results.
Useful for playing the game: " some of these things are not like the others... "
whe... | 27.650794 | 80 | 0.604478 |
fb7a25fb400c30b167cb946a64670900034b910c | 4,888 | py | Python | irishep/datasets/spark_dataset.py | lgray/spark-hep-query | 3157d31595da41e5eb0424b6e9c896a710fcfbd8 | [
"Apache-2.0"
] | null | null | null | irishep/datasets/spark_dataset.py | lgray/spark-hep-query | 3157d31595da41e5eb0424b6e9c896a710fcfbd8 | [
"Apache-2.0"
] | null | null | null | irishep/datasets/spark_dataset.py | lgray/spark-hep-query | 3157d31595da41e5eb0424b6e9c896a710fcfbd8 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, IRIS-HEP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the foll... | 38.793651 | 80 | 0.683101 |
f3dac2f604053314b3fda69799974b76479fdf43 | 460 | py | Python | tests/test_market.py | kt1202658/coincheck | 4e1062f1e564cddceec2f6fb4d70fe3a3ab645bc | [
"MIT"
] | 79 | 2015-04-07T03:42:18.000Z | 2022-03-19T12:53:36.000Z | tests/test_market.py | kt1202658/coincheck | 4e1062f1e564cddceec2f6fb4d70fe3a3ab645bc | [
"MIT"
] | 8 | 2015-04-07T09:00:47.000Z | 2017-08-25T13:07:29.000Z | tests/test_market.py | kt1202658/coincheck | 4e1062f1e564cddceec2f6fb4d70fe3a3ab645bc | [
"MIT"
] | 28 | 2015-09-28T14:03:08.000Z | 2021-04-12T09:57:21.000Z | import sys,os
current_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(current_dir, '../'))
from coincheck.market import Market
def test_ticker():
m1 = Market()
return m1.ticker()
def test_trades():
m1 = Market()
return m1.trades()
def test_orderbooks():... | 19.166667 | 73 | 0.673913 |
1620ef1f3003aec6dec22bd731cca77ef760e7cb | 356 | py | Python | soal_3.py | LeadyPramuditaPutri/Test-Arkademy-Batch-11 | d0ec41de86fc08b933ea5d905b50f9ee3e0b7738 | [
"Apache-2.0"
] | null | null | null | soal_3.py | LeadyPramuditaPutri/Test-Arkademy-Batch-11 | d0ec41de86fc08b933ea5d905b50f9ee3e0b7738 | [
"Apache-2.0"
] | null | null | null | soal_3.py | LeadyPramuditaPutri/Test-Arkademy-Batch-11 | d0ec41de86fc08b933ea5d905b50f9ee3e0b7738 | [
"Apache-2.0"
] | null | null | null | def segitiga(n) :
for i in range(1,n+1) :
for j in range(1,i) :
print (" ",end="")
for j in range(1,(n * 2 - (2 * i - 1)) +1) :
if (i == 1 or j == 1 or
j == (n * 2 - (2 * i - 1))) :
print ("*", end="")
else :
print(" ", end="")
print (""),
n = int(input("... | 19.777778 | 48 | 0.384831 |
2b1f1f4816cda178decd786c240be0c17ff5a3f0 | 345 | py | Python | Browser.py | kifner-mateusz/PipeSubs | c104c51f525770766697836896039d15f8f7f2cf | [
"MIT"
] | null | null | null | Browser.py | kifner-mateusz/PipeSubs | c104c51f525770766697836896039d15f8f7f2cf | [
"MIT"
] | null | null | null | Browser.py | kifner-mateusz/PipeSubs | c104c51f525770766697836896039d15f8f7f2cf | [
"MIT"
] | null | null | null | import webbrowser
class Browser:
""" obsługuje otwieranie przeglądarki (myslałem że będzie tu więcej) """
def __init__(self):
# TODO: możliwość wybrania przeglądarki
self._browser_path = ""
def open_webpage(self, url):
""" Otwiera przeglądarkę z podanym url """
webbrowse... | 24.642857 | 76 | 0.649275 |
32cc861728a1c05b199f2d471881dbc12b87489e | 9,084 | py | Python | app/settings.py | EncryptEx/myhackupc | 3b7c8bce8528e61aab65c976a3c9b4a700210c09 | [
"MIT"
] | null | null | null | app/settings.py | EncryptEx/myhackupc | 3b7c8bce8528e61aab65c976a3c9b4a700210c09 | [
"MIT"
] | null | null | null | app/settings.py | EncryptEx/myhackupc | 3b7c8bce8528e61aab65c976a3c9b4a700210c09 | [
"MIT"
] | null | null | null | """
Django settings for testP project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
... | 28.838095 | 91 | 0.677125 |
a9f6266ace3aa14efde1c2e7f7fec210d965847f | 9,360 | py | Python | saleor/product/utils/availability.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 1,392 | 2021-10-06T15:54:28.000Z | 2022-03-31T20:50:55.000Z | saleor/product/utils/availability.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 888 | 2021-10-06T10:48:54.000Z | 2022-03-31T11:00:30.000Z | saleor/product/utils/availability.py | victor-abz/saleor | f8e2b49703d995d4304d5a690dbe9c83631419d0 | [
"CC-BY-4.0"
] | 538 | 2021-10-07T16:21:27.000Z | 2022-03-31T22:58:57.000Z | from dataclasses import dataclass
from typing import TYPE_CHECKING, Iterable, List, Optional, Tuple, Union
import opentracing
from django.conf import settings
from django_countries.fields import Country
from prices import MoneyRange, TaxedMoney, TaxedMoneyRange
from ...channel.models import Channel
from ...core.utils... | 32.054795 | 88 | 0.674038 |
364ccca6ca5d09b9dade5a23afa8d9b6d3799c5f | 17,342 | py | Python | src/pip/_internal/vcs/git.py | belonesox/pip | ad9d492989bdfd351283cac7a9b33085c2732b41 | [
"MIT"
] | 1 | 2021-08-12T20:22:19.000Z | 2021-08-12T20:22:19.000Z | src/pip/_internal/vcs/git.py | smooth80/pip | 7c3abccd22c4bbd6c1da2ae41845ffbd26c1bb17 | [
"MIT"
] | null | null | null | src/pip/_internal/vcs/git.py | smooth80/pip | 7c3abccd22c4bbd6c1da2ae41845ffbd26c1bb17 | [
"MIT"
] | 1 | 2021-06-11T19:14:32.000Z | 2021-06-11T19:14:32.000Z | import logging
import os.path
import pathlib
import re
import urllib.parse
import urllib.request
from typing import List, Optional, Tuple
from pip._vendor.packaging.version import _BaseVersion
from pip._vendor.packaging.version import parse as parse_version
from pip._internal.exceptions import BadCommand, Installatio... | 34.40873 | 80 | 0.575712 |
1fa58558677f95b73e44cf60fa304b4a0992f3ca | 1,224 | py | Python | pos_order_cancel/tests/test_default.py | nahualventure/pos-addons | 3c911c28c259967fb74e311ddcc8e6ca032c005d | [
"MIT"
] | null | null | null | pos_order_cancel/tests/test_default.py | nahualventure/pos-addons | 3c911c28c259967fb74e311ddcc8e6ca032c005d | [
"MIT"
] | 1 | 2020-10-26T17:22:38.000Z | 2020-10-26T18:58:28.000Z | pos_order_cancel/tests/test_default.py | nahualventure/pos-addons | 3c911c28c259967fb74e311ddcc8e6ca032c005d | [
"MIT"
] | 1 | 2021-09-03T22:33:42.000Z | 2021-09-03T22:33:42.000Z | # Copyright 2017-2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2017 gaelTorrecillas <https://github.com/gaelTorrecillas>
# Copyright 2017 Gabbasov Dinar <https://it-projects.info/team/GabbasovDinar>
# Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# ... | 40.8 | 88 | 0.660131 |
e236b0d3dd05b90fe3756247da23607134e70515 | 1,493 | py | Python | ros/src/tl_detector/light_classification/tl_classifier_cv.py | KhardanOne/CarND-Capstone | 4a28a8031fcb65955673e1e5af018f0557c3452c | [
"MIT"
] | 1 | 2021-01-28T15:27:04.000Z | 2021-01-28T15:27:04.000Z | ros/src/tl_detector/light_classification/tl_classifier_cv.py | KhardanOne/CarND-Capstone | 4a28a8031fcb65955673e1e5af018f0557c3452c | [
"MIT"
] | 6 | 2021-01-12T20:57:07.000Z | 2021-01-28T16:40:22.000Z | ros/src/tl_detector/light_classification/tl_classifier_cv.py | KhardanOne/CarND-Capstone | 4a28a8031fcb65955673e1e5af018f0557c3452c | [
"MIT"
] | null | null | null | """
Non-neural-network traffic light detection algorithms.
1.) detect_red_lights_basic(): uses simple pixel counting to find vivid red colors that can be of any shape and size
2.) detect_red_lights_hough(): uses Hough method to identify circle shaped red areas
If both red and green are found, then they both take into a... | 31.104167 | 120 | 0.686537 |
ca2cc9521818b9abee1f2c021302f4d68fae2881 | 33,402 | py | Python | fig2cde_higgs_mnist_cifar10/model/latent_equilibrium_layers.py | unibe-cns/le_NeurIPS_code | 3744dd4c0c33ef4fcb9b89a77641f3bb248e0a15 | [
"MIT"
] | 1 | 2021-12-15T16:26:17.000Z | 2021-12-15T16:26:17.000Z | fig2cde_higgs_mnist_cifar10/model/latent_equilibrium_layers.py | unibe-cns/le_NeurIPS_code | 3744dd4c0c33ef4fcb9b89a77641f3bb248e0a15 | [
"MIT"
] | null | null | null | fig2cde_higgs_mnist_cifar10/model/latent_equilibrium_layers.py | unibe-cns/le_NeurIPS_code | 3744dd4c0c33ef4fcb9b89a77641f3bb248e0a15 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# PyTorch implementation of the Latent Equilibrium model for different layers.
# Authors: Benjamin Ellenberger (benelot@github)
from datetime import datetime
import random
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoad... | 37.072142 | 184 | 0.623615 |
90b8867be450ec5e8e39b1bf88f9f24feab20deb | 1,622 | py | Python | test/contrib/test_securetransport.py | venthur/urllib3 | 34e11a22fb9357c5c52705bf508982cc471d96cb | [
"MIT"
] | null | null | null | test/contrib/test_securetransport.py | venthur/urllib3 | 34e11a22fb9357c5c52705bf508982cc471d96cb | [
"MIT"
] | null | null | null | test/contrib/test_securetransport.py | venthur/urllib3 | 34e11a22fb9357c5c52705bf508982cc471d96cb | [
"MIT"
] | null | null | null | import base64
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
except Import... | 24.208955 | 88 | 0.697287 |
6f69fff85ffd17654e31cefcf736e6aea5f4f1c0 | 2,155 | py | Python | src/robot/libdocpkg/model.py | guykisel/robotframework | 495befccb8eec20a7c38d22bf0abcc8eda72582e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/libdocpkg/model.py | guykisel/robotframework | 495befccb8eec20a7c38d22bf0abcc8eda72582e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/libdocpkg/model.py | guykisel/robotframework | 495befccb8eec20a7c38d22bf0abcc8eda72582e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | 28.733333 | 75 | 0.641299 |
ce5660e274f8d93f97ff7a7b2619f412c2f60e88 | 30,303 | py | Python | bfxapi/websockets/bfx_websocket.py | krisuj/bitfinex-api-py | 5f27d5be0f616693e3cac381e7a45838080af1e5 | [
"Apache-2.0"
] | null | null | null | bfxapi/websockets/bfx_websocket.py | krisuj/bitfinex-api-py | 5f27d5be0f616693e3cac381e7a45838080af1e5 | [
"Apache-2.0"
] | null | null | null | bfxapi/websockets/bfx_websocket.py | krisuj/bitfinex-api-py | 5f27d5be0f616693e3cac381e7a45838080af1e5 | [
"Apache-2.0"
] | null | null | null | """
Module used to house the bitfine websocket client
"""
import asyncio
import json
import time
import random
from .generic_websocket import GenericWebsocket, AuthError
from .subscription_manager import SubscriptionManager
from .wallet_manager import WalletManager
from .order_manager import OrderManager
from ..utils... | 40.675168 | 147 | 0.636736 |
1ae1bafad2c4316d29529a8ecfc3bf8a3c17288b | 2,841 | py | Python | cuenca/http/client.py | paolodamico/cuenca-python | 0a29aa1a4acfd5325d375ca0afd69ea526a34699 | [
"MIT"
] | null | null | null | cuenca/http/client.py | paolodamico/cuenca-python | 0a29aa1a4acfd5325d375ca0afd69ea526a34699 | [
"MIT"
] | null | null | null | cuenca/http/client.py | paolodamico/cuenca-python | 0a29aa1a4acfd5325d375ca0afd69ea526a34699 | [
"MIT"
] | null | null | null | import os
from typing import Optional, Tuple
from urllib.parse import urljoin
import requests
from cuenca_validations.typing import (
ClientRequestParams,
DictStrAny,
OptionalDict,
)
from requests import Response
from ..exc import CuencaResponseException
from ..version import API_VERSION, CLIENT_VERSION
... | 29.28866 | 77 | 0.613516 |
cda1169c5fce84867df084ec3a99ff285f14f0bf | 550 | py | Python | src/jt/rubicon/java/_typehandler/__init__.py | karpierz/jtypes.rubicon | 8f8196e47de93183eb9728fec0d08725fc368ee0 | [
"BSD-3-Clause"
] | 2 | 2018-11-29T06:19:05.000Z | 2018-12-09T09:47:55.000Z | src/jt/rubicon/java/_typehandler/__init__.py | karpierz/jtypes.rubicon | 8f8196e47de93183eb9728fec0d08725fc368ee0 | [
"BSD-3-Clause"
] | null | null | null | src/jt/rubicon/java/_typehandler/__init__.py | karpierz/jtypes.rubicon | 8f8196e47de93183eb9728fec0d08725fc368ee0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016-2019, Adam Karpierz
# Licensed under the BSD license
# http://opensource.org/licenses/BSD-3-Clause
from .void_handler import * # noqa
from .boolean_handler import * # noqa
from .char_handler import * # noqa
from .byte_handler import * # noqa
from .short_handler import * # noqa
from... | 34.375 | 45 | 0.703636 |
bcbe91747c56b718f5c59008e62407a1dbc96c78 | 1,476 | py | Python | cadmus/retrieval/links_from_a_tags.py | biomedicalinformaticsgroup/cadmus | 004f8470c22c4df3699738be142b7079088b0c00 | [
"MIT"
] | 5 | 2021-05-04T19:57:45.000Z | 2022-03-22T16:38:18.000Z | cadmus/retrieval/links_from_a_tags.py | biomedicalinformaticsgroup/cadmus | 004f8470c22c4df3699738be142b7079088b0c00 | [
"MIT"
] | null | null | null | cadmus/retrieval/links_from_a_tags.py | biomedicalinformaticsgroup/cadmus | 004f8470c22c4df3699738be142b7079088b0c00 | [
"MIT"
] | 1 | 2021-07-29T11:22:59.000Z | 2021-07-29T11:22:59.000Z | from urllib.parse import urlparse
import re
# generic link parsing from the body of HTML
def links_from_a_tags(soup, base_url):
link_list = []
# build a compiled regex
regex = re.compile(r"/content/.*/pdf/|/content/.*/doi/|full-text|full.pdf|advance-article|articles-pdf")
# looks for all the 'a' ... | 46.125 | 108 | 0.584011 |
fe3bf75c281821db5e3bd3dac6f13cba0e42ecab | 15,914 | py | Python | examples/nested_decision_execution/workflow.py | Ian-Goodall-Halliwell/qlib | 38c411e905d9d4a54c5cdc84d63aea1f2d727d3a | [
"MIT"
] | null | null | null | examples/nested_decision_execution/workflow.py | Ian-Goodall-Halliwell/qlib | 38c411e905d9d4a54c5cdc84d63aea1f2d727d3a | [
"MIT"
] | null | null | null | examples/nested_decision_execution/workflow.py | Ian-Goodall-Halliwell/qlib | 38c411e905d9d4a54c5cdc84d63aea1f2d727d3a | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
The expect result of `backtest` is following in current version
'The following are analysis results of benchmark return(1day).'
risk
mean 0.000651
std 0.012472
annualized_return 0.154967
... | 40.085642 | 174 | 0.56598 |
ed7027e5fd887bb59c20942b584f267d8e5233c8 | 1,666 | py | Python | c4d/create_anim.py | avi-grtl/SimpleMimic | 1fe3325830f81347ef5b8217eda43fe803253730 | [
"MIT"
] | null | null | null | c4d/create_anim.py | avi-grtl/SimpleMimic | 1fe3325830f81347ef5b8217eda43fe803253730 | [
"MIT"
] | null | null | null | c4d/create_anim.py | avi-grtl/SimpleMimic | 1fe3325830f81347ef5b8217eda43fe803253730 | [
"MIT"
] | 1 | 2019-11-03T18:48:24.000Z | 2019-11-03T18:48:24.000Z |
import c4d.modules.character as c4dchar
import c4d.documents as c4ddoc
import c4d.utils as c4dutils
import c4d
import json
print "_____________"
anim_desc = {
"Loop": "wrap",
"Frames": []
}
# Recurses a hierarchy, starting from op
def recurse_hierarchy(op, parentID):
global depth
global globalID
... | 26.444444 | 89 | 0.606242 |
bcb11c0b20cb51f21c87bac47bff671930948e68 | 167 | py | Python | main.py | arteum33/Python_Lesson_1 | fd8a15bcddc49797e4e012614a0b6d7cf6098686 | [
"MIT"
] | null | null | null | main.py | arteum33/Python_Lesson_1 | fd8a15bcddc49797e4e012614a0b6d7cf6098686 | [
"MIT"
] | null | null | null | main.py | arteum33/Python_Lesson_1 | fd8a15bcddc49797e4e012614a0b6d7cf6098686 | [
"MIT"
] | null | null | null | import requests
import json
url= 'https://www.cbr-xml-daily.ru/daily_json.js'
response= requests.get(url)
print(response)
data= json.loads(response.text)
print(data)
| 18.555556 | 49 | 0.772455 |
4ab456260f6c742ad312aaa99e3e2590ddc0675c | 731 | py | Python | olamundo.py/exercicios_refeitos/ex029.py | gabrielviticov/exercicios-python | 4068cb0029513f8ab8bd12fa3a9055f37b4040d4 | [
"MIT"
] | null | null | null | olamundo.py/exercicios_refeitos/ex029.py | gabrielviticov/exercicios-python | 4068cb0029513f8ab8bd12fa3a9055f37b4040d4 | [
"MIT"
] | null | null | null | olamundo.py/exercicios_refeitos/ex029.py | gabrielviticov/exercicios-python | 4068cb0029513f8ab8bd12fa3a9055f37b4040d4 | [
"MIT"
] | null | null | null | '''
ex029: Escreva um programa que leia a velocidade de uma carro. Se ele ultrapassar 80 km/h, mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$ 7,00 por cada Km acima do limite.
'''
from colorise import set_color, reset_color
cor = {
'limpa':'\033[m',
'white':'\033[1;97m'
}
set_color(fg='... | 36.55 | 195 | 0.679891 |
dd1c6d7c1668febd90eec7f2a6522dfcabe096cf | 125,713 | py | Python | modules/templates/CCC/config.py | hallamoore/eden | c8e7483f153c80c269dc6ee7e720337323e6f574 | [
"MIT"
] | null | null | null | modules/templates/CCC/config.py | hallamoore/eden | c8e7483f153c80c269dc6ee7e720337323e6f574 | [
"MIT"
] | null | null | null | modules/templates/CCC/config.py | hallamoore/eden | c8e7483f153c80c269dc6ee7e720337323e6f574 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import OrderedDict
from gluon import current
from gluon.storage import Storage
def config(settings):
"""
Cumbria County Council extensions to the Volunteer Management template
- branding
- support Donations
- support Assessments
"""
... | 47.403092 | 288 | 0.396777 |
851e90dd1fdd9e76f494dac1f0636aee0b15bbab | 303 | py | Python | meridian/tst/acupoints/test_shouwuli333.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | 5 | 2015-12-14T15:14:23.000Z | 2022-02-09T10:15:33.000Z | meridian/tst/acupoints/test_shouwuli333.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | null | null | null | meridian/tst/acupoints/test_shouwuli333.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | 3 | 2015-11-27T05:23:49.000Z | 2020-11-28T09:01:56.000Z | #!/usr/bin/python
#coding=utf-8
'''
@author: sheng
@license:
'''
import unittest
from meridian.acupoints import shouwuli333
class TestShouwuli333Functions(unittest.TestCase):
def setUp(self):
pass
def test_xxx(self):
pass
if __name__ == '__main__':
unittest.main()
| 12.12 | 50 | 0.666667 |
2569cd02e95696a61029108a1784799566a4e1ac | 1,639 | py | Python | core/auth/serializers/__init__.py | Nathan-E-White/DjangoBackend-ReactFrontend | 64528a5d42c6b25347114bf5519d311ef65a5547 | [
"Apache-2.0"
] | null | null | null | core/auth/serializers/__init__.py | Nathan-E-White/DjangoBackend-ReactFrontend | 64528a5d42c6b25347114bf5519d311ef65a5547 | [
"Apache-2.0"
] | 1 | 2021-10-13T07:55:16.000Z | 2021-10-13T07:55:16.000Z | core/auth/serializers/__init__.py | Nathan-E-White/DjangoBackend-ReactFrontend | 64528a5d42c6b25347114bf5519d311ef65a5547 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
"""
------------------------------------------------------------------------------------------------------------------------
____ __ __ __ __ __
/ __ \__ __/ /_/ /_ ____ ____ / / / /__ ____ _____/ /__ _____
... | 60.703704 | 121 | 0.320927 |
524e3eb0973112e5200295a66018fe7aed58e72d | 3,555 | py | Python | Chapter9/Chapter9_2.py | ZFhuang/DiveIntoDLSketches | cf0654d06ab6eeaefc35fa3bebd4937f1cbbb165 | [
"BSD-2-Clause"
] | null | null | null | Chapter9/Chapter9_2.py | ZFhuang/DiveIntoDLSketches | cf0654d06ab6eeaefc35fa3bebd4937f1cbbb165 | [
"BSD-2-Clause"
] | null | null | null | Chapter9/Chapter9_2.py | ZFhuang/DiveIntoDLSketches | cf0654d06ab6eeaefc35fa3bebd4937f1cbbb165 | [
"BSD-2-Clause"
] | null | null | null | # coding=utf-8
# 导入自己的函数包d2lzh_pytorch,注意要先将目标包的父路径添加到系统路径中
import sys
sys.path.append(r".")
from d2lzh_pytorch import data_process, plot, train, rnn
import torch
import time
import os
import torchvision
from PIL import Image
from torch import nn, optim
from torch.utils.data import Dataset, DataLoader
from torchvisio... | 34.182692 | 87 | 0.695077 |
1001e598c51ec4fa28ad3bf7d517ffda0ebc8563 | 54,616 | py | Python | test/sql/test_operators.py | charlax/sqlalchemy | 6d0f734a3da78d213da0931531bbcfc781521ca7 | [
"MIT"
] | 1 | 2021-02-22T15:00:47.000Z | 2021-02-22T15:00:47.000Z | test/sql/test_operators.py | xqzhou/sqlalchemy | e21cd0d95fb6cdcb4e10ea78abd5626bb92c37c3 | [
"MIT"
] | null | null | null | test/sql/test_operators.py | xqzhou/sqlalchemy | e21cd0d95fb6cdcb4e10ea78abd5626bb92c37c3 | [
"MIT"
] | 1 | 2021-03-25T00:26:15.000Z | 2021-03-25T00:26:15.000Z | from sqlalchemy.testing import fixtures, eq_, is_
from sqlalchemy import testing
from sqlalchemy.testing import assert_raises_message
from sqlalchemy.sql import column, desc, asc, literal, collate, null, true, false
from sqlalchemy.sql.expression import BinaryExpression, \
ClauseList, Grouping, \
... | 33.080557 | 87 | 0.554837 |
e9bb72be124d35aae00a25c31b24b4e3fbd848e2 | 18,835 | py | Python | pandas/tests/io/parser/usecols.py | zhezherun/pandas | 36c1104b7ad9761e020f7e8198eb60da4045d169 | [
"BSD-3-Clause"
] | 1 | 2018-11-11T22:18:13.000Z | 2018-11-11T22:18:13.000Z | pandas/tests/io/parser/usecols.py | zhezherun/pandas | 36c1104b7ad9761e020f7e8198eb60da4045d169 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/io/parser/usecols.py | zhezherun/pandas | 36c1104b7ad9761e020f7e8198eb60da4045d169 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tests the usecols functionality during parsing
for all of the parsers defined in parsers.py
"""
import numpy as np
import pytest
from pandas._libs.tslib import Timestamp
from pandas.compat import StringIO
from pandas import DataFrame, Index
import pandas.util.testing as tm
class Usecol... | 34.183303 | 77 | 0.506132 |
63e24a66481f1bcafce2ed9ca938771762e79d3d | 2,526 | py | Python | backend/pyrogram/raw/functions/messages/report.py | appheap/social-media-analyzer | 0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c | [
"Apache-2.0"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/functions/messages/report.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/functions/messages/report.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 30.071429 | 110 | 0.616785 |
47811ed06b994d1d89f740b39ba5d834f0914fd7 | 3,582 | py | Python | live_object_detection.py | mepotts/Pill-Siamese-Network | 4f2a40b805cae13ea41101060d5c06b8f0031ff5 | [
"MIT"
] | 1 | 2020-04-30T08:21:07.000Z | 2020-04-30T08:21:07.000Z | live_object_detection.py | mepotts/Pill-Siamese-Network | 4f2a40b805cae13ea41101060d5c06b8f0031ff5 | [
"MIT"
] | null | null | null | live_object_detection.py | mepotts/Pill-Siamese-Network | 4f2a40b805cae13ea41101060d5c06b8f0031ff5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 7 22:43:38 2019
@author: katepotts
"""
import numpy as np
import os
import six.moves.urllib as urllib
import sys
import tarfile
import tensorflow as tf
import zipfile
from collections import defaultdict
from io import StringIO
from matplotlib im... | 37.3125 | 122 | 0.730597 |
4dae3bf1f2676275158c2f7709ddd9d7f841a107 | 3,618 | py | Python | examples/SQLtoDataFrame.py | gkuling/BIRADS_BERT | f218d05283df90e536b210efbb4fab1d6dff082d | [
"MIT"
] | 1 | 2021-11-08T15:14:26.000Z | 2021-11-08T15:14:26.000Z | examples/SQLtoDataFrame.py | gkuling/BIRADS_BERT | f218d05283df90e536b210efbb4fab1d6dff082d | [
"MIT"
] | null | null | null | examples/SQLtoDataFrame.py | gkuling/BIRADS_BERT | f218d05283df90e536b210efbb4fab1d6dff082d | [
"MIT"
] | 1 | 2022-03-11T15:59:58.000Z | 2022-03-11T15:59:58.000Z | '''
Copyright (c) 2020, Martel Lab, Sunnybrook Research Institute
Description: This code will convert an SQL .csv file that has reports
seperated into indidual text lines into a .csv of individual reports.
Input: saved .csv file of sql database needed to be converted.
Output: a .csv file of the input file with Lines ... | 40.2 | 94 | 0.638198 |
4cbfecfac8980b672abfd3d0a66a3ac771284cc1 | 696 | py | Python | bot/player_commands/invite.py | XIIIsiren/CommunityAPI | e665638d2800b71b3d32d49c6897901f4c49a9c5 | [
"Apache-2.0"
] | null | null | null | bot/player_commands/invite.py | XIIIsiren/CommunityAPI | e665638d2800b71b3d32d49c6897901f4c49a9c5 | [
"Apache-2.0"
] | null | null | null | bot/player_commands/invite.py | XIIIsiren/CommunityAPI | e665638d2800b71b3d32d49c6897901f4c49a9c5 | [
"Apache-2.0"
] | null | null | null | import discord
from discord.ext import commands
class invite_cog(commands.Cog):
def __init__(self, bot):
self.client = bot
@commands.command()
async def invite(self, ctx):
embed = discord.Embed(title=f"Want to invite this bot to your server?", description=f"Go to [this link](https://discor... | 53.538462 | 331 | 0.731322 |
73cd87883e38fcef3c866601e963a7b16cf1ef94 | 2,031 | py | Python | src/pretrained_word2vec/pretrained_word2vec.py | leeesangwon/CNN_sentence.pytorch | 512a1fe1de359f01557b6441a0571d7d98335716 | [
"MIT"
] | null | null | null | src/pretrained_word2vec/pretrained_word2vec.py | leeesangwon/CNN_sentence.pytorch | 512a1fe1de359f01557b6441a0571d7d98335716 | [
"MIT"
] | null | null | null | src/pretrained_word2vec/pretrained_word2vec.py | leeesangwon/CNN_sentence.pytorch | 512a1fe1de359f01557b6441a0571d7d98335716 | [
"MIT"
] | null | null | null | import numpy as np
import torch
def load_bin_word2vec(fname, vocab):
"""Loads (300,) np.array from Google (Mikolov) word2vec"""
vocab = set(vocab)
word_vecs = {}
with open(fname, 'rb') as f:
header = f.readline()
vocab_size, word_vec_size = map(int, header.split())
binary_len =... | 32.238095 | 84 | 0.558346 |
3415c1d6d4919cd33bc13b01948f35e3b5af0a55 | 1,001 | py | Python | Tree/delete-nodes-and-return-forest.py | PK-100/Competitive_Programming | d0863feaaa99462b2999e85dcf115f7a6c08bb8d | [
"MIT"
] | 70 | 2018-06-25T21:20:15.000Z | 2022-03-24T03:55:17.000Z | Tree/delete-nodes-and-return-forest.py | An3sha/Competitive_Programming | ee7eadf51939a360d0b004d787ebabda583e92f0 | [
"MIT"
] | 4 | 2018-09-04T13:12:20.000Z | 2021-06-20T08:29:12.000Z | Tree/delete-nodes-and-return-forest.py | An3sha/Competitive_Programming | ee7eadf51939a360d0b004d787ebabda583e92f0 | [
"MIT"
] | 24 | 2018-12-26T05:15:32.000Z | 2022-01-23T23:04:54.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# Author: @amitrajitbose
class Solution:
def delNodes(self, root: TreeNode, to_delete: List[int]) -> List[TreeNode]:
... | 37.074074 | 84 | 0.556444 |
1f93a94efbf19f7923aeeb55e206ea31586b054c | 2,671 | py | Python | services/web/project/auth/models.py | petervuyk456/persona_finance | 5c4c1bea0e176f37cc122571b846de1f020bdd92 | [
"MIT"
] | null | null | null | services/web/project/auth/models.py | petervuyk456/persona_finance | 5c4c1bea0e176f37cc122571b846de1f020bdd92 | [
"MIT"
] | null | null | null | services/web/project/auth/models.py | petervuyk456/persona_finance | 5c4c1bea0e176f37cc122571b846de1f020bdd92 | [
"MIT"
] | null | null | null | import datetime
from flask_login import UserMixin
from project import db, logger
from project.constants import ROLES
from project.auth import bcrypt, AnonymousUserMixin
from project.utils import _not_empty
from project.constants import ROLES
from project.tracker.models import Account, CashFlow
from project.utils impor... | 30.011236 | 86 | 0.621864 |
0ddfbc05f517573fe384e2028ed4c99bdd80276e | 2,663 | py | Python | magenta/models/polyphony_rnn/polyphony_encoder_decoder.py | cristianmtr/magenta | ac2d8ae455fdd07f4b46dec82aedab22fcb6bbbd | [
"Apache-2.0"
] | 1 | 2019-01-24T07:22:48.000Z | 2019-01-24T07:22:48.000Z | magenta/models/polyphony_rnn/polyphony_encoder_decoder.py | dkun7944/magenta | 8f930263b7cfd67f27eb12cd871b4e5fa87d382e | [
"Apache-2.0"
] | null | null | null | magenta/models/polyphony_rnn/polyphony_encoder_decoder.py | dkun7944/magenta | 8f930263b7cfd67f27eb12cd871b4e5fa87d382e | [
"Apache-2.0"
] | 1 | 2019-11-26T06:30:52.000Z | 2019-11-26T06:30:52.000Z | # Copyright 2018 The Magenta 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 or agreed to in ... | 33.2875 | 77 | 0.750657 |
0e33ee15cfff7fcf69112d68b515072149e2d5cb | 5,131 | py | Python | tpDcc/dccs/maya/core/viewport.py | tpoveda/tpMayaLib | fe570a2aef496c651f302ea2743c84fa4308c3d7 | [
"MIT"
] | 3 | 2021-04-30T03:47:39.000Z | 2021-06-22T09:15:33.000Z | tpDcc/dccs/maya/core/viewport.py | tpoveda/tpMayaLib | fe570a2aef496c651f302ea2743c84fa4308c3d7 | [
"MIT"
] | null | null | null | tpDcc/dccs/maya/core/viewport.py | tpoveda/tpMayaLib | fe570a2aef496c651f302ea2743c84fa4308c3d7 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module defines class for Maya viewport widgets
"""
from __future__ import print_function, division, absolute_import
import os
import logging
import tempfile
from Qt.QtWidgets import QWidget, QVBoxLayout
import maya.cmds
from tpDcc.dccs.maya.core import gui
... | 36.390071 | 117 | 0.650555 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.