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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f71503d83257c56d9a08f215294410fe3f0189c1
4,679
py
Python
venv/Lib/site-packages/pyrogram/parser/markdown.py
D1ne2021/jjhhhjj
a090da30983b3ef276dfe4cef2ded4526f36002a
[ "MIT" ]
2
2021-12-13T07:09:55.000Z
2022-01-12T12:15:20.000Z
venv/Lib/site-packages/pyrogram/parser/markdown.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pyrogram/parser/markdown.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
# 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.986755
94
0.551186
import html import re from typing import Optional import pyrogram from . import utils from .html import HTML BOLD_DELIM = "**" ITALIC_DELIM = "__" UNDERLINE_DELIM = "--" STRIKE_DELIM = "~~" CODE_DELIM = "`" PRE_DELIM = "```" MARKDOWN_RE = re.compile(r"({d})|\[(.+?)\]\((.+?)\)".format( d="|".joi...
true
true
f715042ccd8dab4bb318453fc8081500dd54c9f3
6,397
py
Python
python_toolbox/combi/perming/_variation_adding_mixin.py
hboshnak/python_toolbox
cb9ef64b48f1d03275484d707dc5079b6701ad0c
[ "MIT" ]
119
2015-02-05T17:59:47.000Z
2022-02-21T22:43:40.000Z
python_toolbox/combi/perming/_variation_adding_mixin.py
hboshnak/python_toolbox
cb9ef64b48f1d03275484d707dc5079b6701ad0c
[ "MIT" ]
4
2019-04-24T14:01:14.000Z
2020-05-21T12:03:29.000Z
python_toolbox/combi/perming/_variation_adding_mixin.py
hboshnak/python_toolbox
cb9ef64b48f1d03275484d707dc5079b6701ad0c
[ "MIT" ]
14
2015-03-30T06:30:42.000Z
2021-12-24T23:45:11.000Z
# Copyright 2009-2017 Ram Rachum. # This program is distributed under the MIT license. from python_toolbox import caching from python_toolbox import sequence_tools # (`PermSpace` exported to here from `perm_space.py` to avoid import loop.) class _VariationAddingMixin: '''Mixin for `PermSpace` to add variations ...
41.00641
80
0.601688
from python_toolbox import caching from python_toolbox import sequence_tools class _VariationAddingMixin: def get_rapplied(self, sequence): if self.is_rapplied: raise TypeError('This space is already rapplied, to rapply it to a ' 'different sequence please use ...
true
true
f715048138799b0ac641454d95df68f3f905c56a
239
py
Python
Pwn/turbofastcrypto/bin/tfc.py
aliencaocao/Sieberrsec-CTF-3.0
9b27b11279a7529d3affd22bbd0399c22d24f977
[ "Apache-2.0" ]
7
2021-12-30T11:54:09.000Z
2022-01-31T09:11:04.000Z
Pwn/turbofastcrypto/bin/tfc.py
aliencaocao/Sieberrsec-CTF-3.0
9b27b11279a7529d3affd22bbd0399c22d24f977
[ "Apache-2.0" ]
1
2022-01-31T09:04:16.000Z
2022-01-31T09:04:16.000Z
Pwn/turbofastcrypto/bin/tfc.py
aliencaocao/Sieberrsec-CTF-3.0
9b27b11279a7529d3affd22bbd0399c22d24f977
[ "Apache-2.0" ]
3
2021-12-31T02:28:08.000Z
2022-02-24T13:11:09.000Z
import turbofastcrypto # The source code for this module is only available for part 2 of this challenge :) while 1: plaintext = input('> ') ciphertext = turbofastcrypto.encrypt(plaintext) print('Encrypted: ' + str(ciphertext))
39.833333
106
0.723849
import turbofastcrypto while 1: plaintext = input('> ') ciphertext = turbofastcrypto.encrypt(plaintext) print('Encrypted: ' + str(ciphertext))
true
true
f715058418459dfa648e6522e744f2a5b97481cd
1,225
py
Python
rastervision/augmentor/augmentor_config.py
Yochengliu/raster-vision
f5badc387df86ce02d84e0e274a08026dbf65bd6
[ "Apache-2.0" ]
1
2019-12-10T13:37:39.000Z
2019-12-10T13:37:39.000Z
rastervision/augmentor/augmentor_config.py
Yochengliu/raster-vision
f5badc387df86ce02d84e0e274a08026dbf65bd6
[ "Apache-2.0" ]
null
null
null
rastervision/augmentor/augmentor_config.py
Yochengliu/raster-vision
f5badc387df86ce02d84e0e274a08026dbf65bd6
[ "Apache-2.0" ]
null
null
null
from abc import abstractmethod import rastervision as rv from rastervision.core import (Config, ConfigBuilder) class AugmentorConfig(Config): def __init__(self, augmentor_type): self.augmentor_type = augmentor_type @abstractmethod def create_augmentor(self): """Create the Augmentor that ...
31.410256
84
0.663673
from abc import abstractmethod import rastervision as rv from rastervision.core import (Config, ConfigBuilder) class AugmentorConfig(Config): def __init__(self, augmentor_type): self.augmentor_type = augmentor_type @abstractmethod def create_augmentor(self): pass def to_builder(self...
true
true
f7150631edcb84ba360da036d61bdd309326a6e6
854
py
Python
test/scenarios/driver/linode/molecule/default/tests/test_default.py
dericcrago/molecule
cb4dec0a7d4993395f123b2c9b0590d41e9dd557
[ "MIT" ]
null
null
null
test/scenarios/driver/linode/molecule/default/tests/test_default.py
dericcrago/molecule
cb4dec0a7d4993395f123b2c9b0590d41e9dd557
[ "MIT" ]
null
null
null
test/scenarios/driver/linode/molecule/default/tests/test_default.py
dericcrago/molecule
cb4dec0a7d4993395f123b2c9b0590d41e9dd557
[ "MIT" ]
null
null
null
import os import pytest import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE'] ).get_hosts('all') @pytest.mark.skip(reason='Scenario tests not implemented yet') def test_hostname(host): assert 'instance' == host.check_outp...
24.4
63
0.723653
import os import pytest import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE'] ).get_hosts('all') @pytest.mark.skip(reason='Scenario tests not implemented yet') def test_hostname(host): assert 'instance' == host.check_outp...
true
true
f7150789857f831893207971e213c8b17f00080e
54,478
py
Python
megatron/arguments.py
deepakn94/Megatron-DeepSpeed
541b967fbf9fd97ce090ca464ccd205b55aae59c
[ "MIT" ]
null
null
null
megatron/arguments.py
deepakn94/Megatron-DeepSpeed
541b967fbf9fd97ce090ca464ccd205b55aae59c
[ "MIT" ]
null
null
null
megatron/arguments.py
deepakn94/Megatron-DeepSpeed
541b967fbf9fd97ce090ca464ccd205b55aae59c
[ "MIT" ]
null
null
null
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
52.28215
167
0.600169
import argparse import collections import os import re import time import torch import deepspeed from megatron.enums import PositionEmbeddingType import megatron from megatron.logging import log_levels def parse_args(extra_args_provider=None, defaults={}, ignore_unknown_args=False): ...
true
true
f71508036be54c36e5daf87e785d178e4ded75db
3,571
py
Python
openpyxlzip/packaging/tests/test_core.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
openpyxlzip/packaging/tests/test_core.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
openpyxlzip/packaging/tests/test_core.py
ankitJoshi03/openpyxlzip
f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647
[ "MIT" ]
null
null
null
# copyright openpyxlzip 2014 import datetime import pytest from openpyxlzip.tests.helper import compare_xml from openpyxlzip.xml.constants import DCTERMS_PREFIX, DCTERMS_NS, XSI_NS from openpyxlzip.xml.functions import ( fromstring, tostring, register_namespace, NS_REGEX, ) @pytest.fixture() def Sa...
32.761468
91
0.681322
import datetime import pytest from openpyxlzip.tests.helper import compare_xml from openpyxlzip.xml.constants import DCTERMS_PREFIX, DCTERMS_NS, XSI_NS from openpyxlzip.xml.functions import ( fromstring, tostring, register_namespace, NS_REGEX, ) @pytest.fixture() def SampleProperties(): from ....
true
true
f7150806ca03c83bb4c23c630e2ac8e54993a8f6
223
py
Python
gumo/task/bind.py
gumo-py/gumo-task
412c8351da206299ad2785963c8e7e6c7117e75c
[ "MIT" ]
null
null
null
gumo/task/bind.py
gumo-py/gumo-task
412c8351da206299ad2785963c8e7e6c7117e75c
[ "MIT" ]
54
2019-08-08T02:08:15.000Z
2022-02-11T02:55:47.000Z
gumo/task/bind.py
gumo-py/gumo-task
412c8351da206299ad2785963c8e7e6c7117e75c
[ "MIT" ]
1
2019-04-10T09:24:03.000Z
2019-04-10T09:24:03.000Z
from gumo.task.application.repository import GumoTaskRepository from gumo.task.infrastructure.repository import GumoTaskRepositoryImpl def task_bind(binder): binder.bind(GumoTaskRepository, to=GumoTaskRepositoryImpl)
31.857143
70
0.856502
from gumo.task.application.repository import GumoTaskRepository from gumo.task.infrastructure.repository import GumoTaskRepositoryImpl def task_bind(binder): binder.bind(GumoTaskRepository, to=GumoTaskRepositoryImpl)
true
true
f715095c652e3a7692eb07b19d8b2822fddca9ac
3,595
py
Python
practice contest 2018/Palindrome/solution2.py
robingan7/ACSL
3e1c35b0282e8317ff6820ae76ebcad6506a3b53
[ "MIT" ]
6
2018-11-05T22:59:42.000Z
2021-09-13T05:43:08.000Z
practice contest 2018/Palindrome/solution2.py
robin-gan/ACSL
3e1c35b0282e8317ff6820ae76ebcad6506a3b53
[ "MIT" ]
null
null
null
practice contest 2018/Palindrome/solution2.py
robin-gan/ACSL
3e1c35b0282e8317ff6820ae76ebcad6506a3b53
[ "MIT" ]
2
2020-01-12T17:46:37.000Z
2021-09-13T05:29:38.000Z
def main(): global originalNum global base ipl=input("Enter the input") originalNum=ipl[0:len(ipl)-3] base=ipl[len(ipl)-2:] def ABCD(num): num=str(num) if(num=='1'): return '1' if(num=='2'): return '2' if(num=='3'): return '3' if(num=='4'): retur...
21.526946
112
0.51516
def main(): global originalNum global base ipl=input("Enter the input") originalNum=ipl[0:len(ipl)-3] base=ipl[len(ipl)-2:] def ABCD(num): num=str(num) if(num=='1'): return '1' if(num=='2'): return '2' if(num=='3'): return '3' if(num=='4'): retur...
true
true
f7150987acbe3caf5f386ef1600ec19dfb6f7681
10,064
py
Python
WDL/runtime/download.py
TMiguelT/miniwdl
5a7724fbf1cbe7bd3b4f251994c83820646ecd9d
[ "MIT" ]
null
null
null
WDL/runtime/download.py
TMiguelT/miniwdl
5a7724fbf1cbe7bd3b4f251994c83820646ecd9d
[ "MIT" ]
null
null
null
WDL/runtime/download.py
TMiguelT/miniwdl
5a7724fbf1cbe7bd3b4f251994c83820646ecd9d
[ "MIT" ]
null
null
null
""" Downloading input files from URIs, with plugin modules for different URI schemes Download URI plugins are installed & registered using the setuptools entry point group "miniwdl.plugin.file_download", with name equal to the URI scheme (e.g. "gs" or "s3"). The plugin entry point should be a context manager, which t...
34.465753
101
0.588335
import os import logging import traceback import tempfile import hashlib import importlib_metadata from contextlib import ExitStack from typing import Optional, List, Generator, Dict, Any, Tuple, Callable from . import config from .cache import CallCache from .._util import compose_coroutines from .._util import Struct...
true
true
f7150a970357699aca9cf473334a78e6e5582097
130
py
Python
palindrome_string.py
arghya-007/collage_python_scripts
5260c30b86209293ba8caa2fbb1d8afdf5230519
[ "MIT" ]
3
2020-09-24T18:45:56.000Z
2020-10-02T02:28:42.000Z
palindrome_string.py
arghya-007/collage_python_scripts
5260c30b86209293ba8caa2fbb1d8afdf5230519
[ "MIT" ]
null
null
null
palindrome_string.py
arghya-007/collage_python_scripts
5260c30b86209293ba8caa2fbb1d8afdf5230519
[ "MIT" ]
null
null
null
s = input("Please enter your own String : ") if(s == s[:: - 1]): print("Palindrome") else: print("Not a Palindrome string")
21.666667
44
0.607692
s = input("Please enter your own String : ") if(s == s[:: - 1]): print("Palindrome") else: print("Not a Palindrome string")
true
true
f7150d2bc449be689d702bd308ab77339d0f7e3d
24,627
py
Python
xalpha/multiple.py
wxw-matt/xalpha
b142a5daebac5f1129ead0553efcd40cd471190c
[ "MIT" ]
null
null
null
xalpha/multiple.py
wxw-matt/xalpha
b142a5daebac5f1129ead0553efcd40cd471190c
[ "MIT" ]
null
null
null
xalpha/multiple.py
wxw-matt/xalpha
b142a5daebac5f1129ead0553efcd40cd471190c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ module for mul and mulfix class: fund combination management """ import logging import pandas as pd from pyecharts import options as opts from pyecharts.charts import Pie, ThemeRiver from xalpha.cons import convert_date, myround, yesterdaydash, yesterdayobj from xalpha.evaluate import eval...
36.538576
152
0.511999
import logging import pandas as pd from pyecharts import options as opts from pyecharts.charts import Pie, ThemeRiver from xalpha.cons import convert_date, myround, yesterdaydash, yesterdayobj from xalpha.evaluate import evaluate from xalpha.exceptions import FundTypeError, TradeBehaviorError from xalpha.record impo...
true
true
f7150d4f3994a0060df418ddb3fbabd3267a1aec
27,846
py
Python
tensorflow/python/ops/op_def_library.py
smrutiranjans/tensorflow
d8e8b872eae63188c75046d5bb068e03a81b3f85
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/op_def_library.py
smrutiranjans/tensorflow
d8e8b872eae63188c75046d5bb068e03a81b3f85
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/op_def_library.py
smrutiranjans/tensorflow
d8e8b872eae63188c75046d5bb068e03a81b3f85
[ "Apache-2.0" ]
1
2020-03-08T13:12:13.000Z
2020-03-08T13:12:13.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
39.666667
80
0.602097
from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib import six from tensorflow.core.framework import attr_value_pb2 from tensorflow.core.framework import op_def_pb2 from tensorflow.core.framework import tensor_pb2 from tensorf...
true
true
f7150df7efc2173d6fc9c35645e25cb08e4e030d
5,210
py
Python
tests/components/freebox/test_config_flow.py
miccico/core
14c205384171dee59c1a908f8449f9864778b2dc
[ "Apache-2.0" ]
6
2017-08-02T19:26:39.000Z
2020-03-14T22:47:41.000Z
tests/components/freebox/test_config_flow.py
miccico/core
14c205384171dee59c1a908f8449f9864778b2dc
[ "Apache-2.0" ]
54
2020-11-17T07:04:57.000Z
2022-03-31T06:45:39.000Z
tests/components/freebox/test_config_flow.py
miccico/core
14c205384171dee59c1a908f8449f9864778b2dc
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Tests for the Freebox config flow.""" from unittest.mock import AsyncMock, patch from aiofreepybox.exceptions import ( AuthorizationError, HttpRequestError, InvalidTokenError, ) import pytest from homeassistant import data_entry_flow from homeassistant.components.freebox.const import DOMAIN from homeas...
34.276316
86
0.673321
from unittest.mock import AsyncMock, patch from aiofreepybox.exceptions import ( AuthorizationError, HttpRequestError, InvalidTokenError, ) import pytest from homeassistant import data_entry_flow from homeassistant.components.freebox.const import DOMAIN from homeassistant.config_entries import SOURCE_DISC...
true
true
f7150e4ced48a3dd4e84f1e34c3cf0335508d142
620
py
Python
PythonModulo1/ex028.py
BossNX/ExerciciosDePython
27c79d284794f65f94d3a07de11429d665ec92da
[ "MIT" ]
null
null
null
PythonModulo1/ex028.py
BossNX/ExerciciosDePython
27c79d284794f65f94d3a07de11429d665ec92da
[ "MIT" ]
null
null
null
PythonModulo1/ex028.py
BossNX/ExerciciosDePython
27c79d284794f65f94d3a07de11429d665ec92da
[ "MIT" ]
null
null
null
from random import randint import playsound from time import sleep print('-=-' * 20) print('Vou pensar em um número entre 0 e 5. Tente advinhar... ') print('-=-' * 20) jogador = int(input('Em que número você pensou? ')) print('PROCESSANDO... ') sleep(3) computador = randint(0, 5) if jogador == computador: print('PA...
34.444444
106
0.695161
from random import randint import playsound from time import sleep print('-=-' * 20) print('Vou pensar em um número entre 0 e 5. Tente advinhar... ') print('-=-' * 20) jogador = int(input('Em que número você pensou? ')) print('PROCESSANDO... ') sleep(3) computador = randint(0, 5) if jogador == computador: print('PA...
true
true
f7150fdd54d3ad81b16118068731af80a1829d37
5,393
py
Python
picar.py
ElwinCabrera/picar
975a5c49ea4c12a0dd8faefb4e0a405d902ccd62
[ "MIT" ]
null
null
null
picar.py
ElwinCabrera/picar
975a5c49ea4c12a0dd8faefb4e0a405d902ccd62
[ "MIT" ]
null
null
null
picar.py
ElwinCabrera/picar
975a5c49ea4c12a0dd8faefb4e0a405d902ccd62
[ "MIT" ]
null
null
null
""" PI power 5V on pin GND on pin The GPIO mode is set to BCM H-Bridge Motor Driver Pin Configuration in1 -> BCM 05 (board pin 29 or GPIO 5) in2 -> BCM 06 (board pin 31 or GPIO 6) enable -> BCM 13 (board pin 33 or GPIO 13, PWM) PCA9685 (16-Channel Servo Driver) Pin Configuration SDA -> BCM 2 (board pin ...
29.79558
112
0.597627
from adafruit_servokit import ServoKit from gpiozero import Motor, PWMOutputDevice from time import sleep from enum import Enum class ServoCh(Enum): STEERING = 0 CAM_PAN = 1 CAM_TILT = 2 TRIGHT_HYDR = 4 TLEFT_HYDR = 5 BRIGHT_HYDR = 6 BLEFT_HYDR = 7 class PiCar: def __init__(self): ...
true
true
f7151043e58b5a9e39f8c3bb1497ebe774d3ce3c
11,345
py
Python
nltk/chat/zen.py
Pandinosaurus/nltk
53dbaa5591003f6764a3d69834e92bc83e3a754c
[ "Apache-2.0" ]
2
2021-12-06T04:28:18.000Z
2021-12-20T03:33:00.000Z
nltk/chat/zen.py
Pandinosaurus/nltk
53dbaa5591003f6764a3d69834e92bc83e3a754c
[ "Apache-2.0" ]
null
null
null
nltk/chat/zen.py
Pandinosaurus/nltk
53dbaa5591003f6764a3d69834e92bc83e3a754c
[ "Apache-2.0" ]
1
2021-12-29T16:44:59.000Z
2021-12-29T16:44:59.000Z
# Natural Language Toolkit: Zen Chatbot # # Copyright (C) 2001-2021 NLTK Project # Author: Amy Holland <amyrh@csse.unimelb.edu.au> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Zen Chatbot talks in gems of Zen wisdom. This is a sample conversation with Zen Chatbot: ZC: Welcome, my child....
34.378788
200
0.545439
from nltk.chat.util import Chat, reflections responses = ( ( r"(hello(.*))|(good [a-zA-Z]+)", ( "The path to enlightenment is often difficult to see.", "Greetings. I sense your mind is troubled. Tell me of your troubles.", "Ask the q...
true
true
f71511f5483a56d525eed60470acbd3271e7bc13
4,890
py
Python
doc/conf.py
kcleal/InSilicoSeqSplit
3ed2881570b3984c82a6e56200c5e6d0f9067e59
[ "MIT" ]
109
2017-09-06T00:46:07.000Z
2022-03-31T14:41:53.000Z
doc/conf.py
kcleal/InSilicoSeqSplit
3ed2881570b3984c82a6e56200c5e6d0f9067e59
[ "MIT" ]
210
2016-11-16T21:04:37.000Z
2022-03-25T16:37:05.000Z
doc/conf.py
kcleal/InSilicoSeqSplit
3ed2881570b3984c82a6e56200c5e6d0f9067e59
[ "MIT" ]
31
2017-05-23T11:53:52.000Z
2021-12-27T05:57:27.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # InSilicoSeq documentation build configuration file, created by # sphinx-quickstart on Tue May 30 11:45:01 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this ...
30.949367
79
0.684663
from iss.version import __version__ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'InSilicoSeq' copyright = '2017, Hadrien Gourle' author = 'H...
true
true
f71512a29b12796c7073840bf47222a9f69148b6
213
py
Python
donations/payment_gateways/offline/constants.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
1
2020-05-03T12:33:42.000Z
2020-05-03T12:33:42.000Z
donations/payment_gateways/offline/constants.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
14
2020-07-06T20:05:57.000Z
2022-03-12T00:39:11.000Z
donations/payment_gateways/offline/constants.py
diffractive/newstream
cf1a1f230e18d01c63b50ab9d360aa44ac5a486f
[ "MIT" ]
null
null
null
from site_settings.models import GATEWAY_CAN_EDIT_SUBSCRIPTION, GATEWAY_CAN_TOGGLE_SUBSCRIPTION, GATEWAY_CAN_CANCEL_SUBSCRIPTION API_CAPABILITIES = [GATEWAY_CAN_EDIT_SUBSCRIPTION, GATEWAY_CAN_CANCEL_SUBSCRIPTION]
71
128
0.920188
from site_settings.models import GATEWAY_CAN_EDIT_SUBSCRIPTION, GATEWAY_CAN_TOGGLE_SUBSCRIPTION, GATEWAY_CAN_CANCEL_SUBSCRIPTION API_CAPABILITIES = [GATEWAY_CAN_EDIT_SUBSCRIPTION, GATEWAY_CAN_CANCEL_SUBSCRIPTION]
true
true
f7151307628b5972cb55056043855b80acf50ddc
16,890
py
Python
var/spack/repos/builtin/packages/wrf/package.py
marcost2/spack
d23bb6b3af31186d3933b9946b5f4c5d97addf74
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/wrf/package.py
marcost2/spack
d23bb6b3af31186d3933b9946b5f4c5d97addf74
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/wrf/package.py
marcost2/spack
d23bb6b3af31186d3933b9946b5f4c5d97addf74
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 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) import glob import re import time from os.path import basename from subprocess import PIPE, Popen from sys import platform...
39.555035
161
0.60148
import glob import re import time from os.path import basename from subprocess import PIPE, Popen from sys import platform, stdout from llnl.util import tty from spack import * is_windows = platform == 'win32' if not is_windows: from fcntl import F_GETFL, F_SETFL, fcntl from os import O_NONBLOCK re_op...
true
true
f71513d9753f7f0ac33b142e11457712ae4430d5
6,367
py
Python
robel/components/tracking/group_config.py
Del9fina/robel
63dfac65932757134e5766f1e20a339efe281bc7
[ "Apache-2.0" ]
109
2019-08-29T22:55:41.000Z
2022-03-19T18:26:37.000Z
robel/components/tracking/group_config.py
Del9fina/robel
63dfac65932757134e5766f1e20a339efe281bc7
[ "Apache-2.0" ]
12
2019-11-14T05:16:00.000Z
2021-02-21T07:49:32.000Z
robel/components/tracking/group_config.py
Del9fina/robel
63dfac65932757134e5766f1e20a339efe281bc7
[ "Apache-2.0" ]
40
2019-09-29T06:50:44.000Z
2022-03-19T18:34:20.000Z
# Copyright 2019 The ROBEL 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 wr...
44.215278
79
0.613162
from typing import Iterable, Optional import numpy as np from transforms3d.euler import euler2mat, quat2euler from transforms3d.quaternions import quat2mat from robel.simulation.sim_scene import SimScene class TrackerGroupConfig: def __init__(self, sim_scene: SimScene, ...
true
true
f7151463007effd34f97b1411f3c8126fe6337ed
26,377
py
Python
geopandas/tests/test_geom_methods.py
raphacosta27/geopandas
2c22a26bd40ec48536026b160c54c6fe523d22d7
[ "BSD-3-Clause" ]
null
null
null
geopandas/tests/test_geom_methods.py
raphacosta27/geopandas
2c22a26bd40ec48536026b160c54c6fe523d22d7
[ "BSD-3-Clause" ]
null
null
null
geopandas/tests/test_geom_methods.py
raphacosta27/geopandas
2c22a26bd40ec48536026b160c54c6fe523d22d7
[ "BSD-3-Clause" ]
2
2020-02-18T13:25:58.000Z
2021-02-15T21:25:07.000Z
import string import numpy as np from numpy.testing import assert_array_equal from pandas import DataFrame, MultiIndex, Series from shapely.geometry import LinearRing, LineString, MultiPoint, Point, Polygon from shapely.geometry.collection import GeometryCollection from shapely.ops import unary_union from geopandas ...
37.627675
88
0.601812
import string import numpy as np from numpy.testing import assert_array_equal from pandas import DataFrame, MultiIndex, Series from shapely.geometry import LinearRing, LineString, MultiPoint, Point, Polygon from shapely.geometry.collection import GeometryCollection from shapely.ops import unary_union from geopandas ...
true
true
f71514719dd30abf00b523af63d90107b7beea30
111
py
Python
src/routes/donate.py
BuildForSDG/team-247
4115c32078189c581a6155f57a3f321eebe361a8
[ "MIT" ]
1
2020-05-11T07:33:03.000Z
2020-05-11T07:33:03.000Z
src/routes/donate.py
BuildForSDG/team-247
4115c32078189c581a6155f57a3f321eebe361a8
[ "MIT" ]
15
2020-05-03T10:44:22.000Z
2021-05-11T12:05:39.000Z
src/routes/donate.py
BuildForSDG/team-247
4115c32078189c581a6155f57a3f321eebe361a8
[ "MIT" ]
5
2020-05-01T16:38:47.000Z
2020-07-26T19:55:58.000Z
from flask import Blueprint, render_template from src.extensions import db from src.models import Donated
12.333333
44
0.810811
from flask import Blueprint, render_template from src.extensions import db from src.models import Donated
true
true
f71514d7bb61d91d8c7004b1e432aad584aeea1a
25,261
py
Python
tf_agents/policies/tf_policy.py
moesio-f/agents
53ce87c9203222585fdcd833e052fcdce1b6fa37
[ "Apache-2.0" ]
null
null
null
tf_agents/policies/tf_policy.py
moesio-f/agents
53ce87c9203222585fdcd833e052fcdce1b6fa37
[ "Apache-2.0" ]
null
null
null
tf_agents/policies/tf_policy.py
moesio-f/agents
53ce87c9203222585fdcd833e052fcdce1b6fa37
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
41.343699
118
0.702585
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc from typing import Optional, Text, Sequence import six import tensorflow as tf import tensorflow_probability as tfp from tf_agents.distributions import reparameterized_sampling from...
true
true
f71514f0dad88cf3e04985d36511d73d2b429e0f
2,737
py
Python
salt/modules/freebsdkmod.py
abh/salt
e8870573a2d3eca1a7794ce8340797fa487de04d
[ "Apache-2.0" ]
1
2017-09-09T11:21:13.000Z
2017-09-09T11:21:13.000Z
salt/modules/freebsdkmod.py
abh/salt
e8870573a2d3eca1a7794ce8340797fa487de04d
[ "Apache-2.0" ]
null
null
null
salt/modules/freebsdkmod.py
abh/salt
e8870573a2d3eca1a7794ce8340797fa487de04d
[ "Apache-2.0" ]
null
null
null
''' Module to manage FreeBSD kernel modules ''' import os def __virtual__(): ''' Only runs on FreeBSD systems ''' return 'kmod' if __grains__['kernel'] == 'FreeBSD' else False def _new_mods(pre_mods, post_mods): ''' Return a list of the new modules, pass an kldstat dict before running m...
21.896
79
0.569236
import os def __virtual__(): return 'kmod' if __grains__['kernel'] == 'FreeBSD' else False def _new_mods(pre_mods, post_mods): pre = set() post = set() for mod in pre_mods: pre.add(mod['module']) for mod in post_mods: post.add(mod['module']) return list(post - pre) def _rm...
true
true
f715150d07f9689d433e3b3d3176bd3af0b5ace6
72
py
Python
run.py
priscillapepe/News-API
7931edf4bac58fbc894f9007c91c0a55c480736d
[ "MIT" ]
null
null
null
run.py
priscillapepe/News-API
7931edf4bac58fbc894f9007c91c0a55c480736d
[ "MIT" ]
null
null
null
run.py
priscillapepe/News-API
7931edf4bac58fbc894f9007c91c0a55c480736d
[ "MIT" ]
null
null
null
# from app import app # if __name__ == "__main__": # app.run()
14.4
28
0.555556
true
true
f71515bd965b1d9750e3c8f9bcbd37c39cad5398
679
py
Python
aiogram/types/file.py
muhammedfurkan/aiogram
692c1340b4dda556da640e5f9ea2200848c06840
[ "MIT" ]
null
null
null
aiogram/types/file.py
muhammedfurkan/aiogram
692c1340b4dda556da640e5f9ea2200848c06840
[ "MIT" ]
4
2020-11-04T15:55:55.000Z
2020-11-08T21:36:02.000Z
aiogram/types/file.py
muhammedfurkan/aiogram
692c1340b4dda556da640e5f9ea2200848c06840
[ "MIT" ]
null
null
null
from . import base, fields, mixins class File(base.TelegramObject, mixins.Downloadable): """ This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1...
30.863636
97
0.705449
from . import base, fields, mixins class File(base.TelegramObject, mixins.Downloadable): file_id: base.String = fields.Field() file_unique_id: base.String = fields.Field() file_size: base.Integer = fields.Field() file_path: base.String = fields.Field()
true
true
f7151637a20ed087dc8cfe8bbbaa192496fb0745
13,806
py
Python
kinto/core/storage/__init__.py
taus-semmle/kinto
a4cd7c6413d1d7809fe02670c0224959390dc25d
[ "Apache-2.0" ]
null
null
null
kinto/core/storage/__init__.py
taus-semmle/kinto
a4cd7c6413d1d7809fe02670c0224959390dc25d
[ "Apache-2.0" ]
null
null
null
kinto/core/storage/__init__.py
taus-semmle/kinto
a4cd7c6413d1d7809fe02670c0224959390dc25d
[ "Apache-2.0" ]
null
null
null
import json import logging import random import warnings from collections import namedtuple from pyramid.settings import asbool import ujson from kinto.core.decorators import deprecate_kwargs from . import generators class Missing: """Dummy value to represent a value that is completely absent from an object. ...
33.028708
99
0.640519
import json import logging import random import warnings from collections import namedtuple from pyramid.settings import asbool import ujson from kinto.core.decorators import deprecate_kwargs from . import generators class Missing: pass MISSING = Missing() logger = logging.getLogger(__name__) Filter = na...
true
true
f715167091a8b5611e5d6929e5426cf12480693e
2,883
py
Python
coovie2/coovie2.py
deshi-basara/coovie2
07351aa9cc132d1bd95b02d37fc9230cc9f81b2c
[ "MIT" ]
null
null
null
coovie2/coovie2.py
deshi-basara/coovie2
07351aa9cc132d1bd95b02d37fc9230cc9f81b2c
[ "MIT" ]
null
null
null
coovie2/coovie2.py
deshi-basara/coovie2
07351aa9cc132d1bd95b02d37fc9230cc9f81b2c
[ "MIT" ]
null
null
null
import os import click from movie import Movie from scan import Scan from helper import Helper @click.command() @click.option('--endings', default='mp4, mkv', help='File-endings that are accepted as valid movie-files. ' + 'Default: [.mkv, .mp4]' ) @click.option...
32.761364
79
0.589317
import os import click from movie import Movie from scan import Scan from helper import Helper @click.command() @click.option('--endings', default='mp4, mkv', help='File-endings that are accepted as valid movie-files. ' + 'Default: [.mkv, .mp4]' ) @click.option...
true
true
f715167252441cd29ac5fc75d9b88326376c06e6
1,381
py
Python
strategic.py
rayanf/Liars-Dice
bf68d08eb2d48bbceca4c79a91c3b88054143305
[ "MIT" ]
1
2021-11-21T18:10:15.000Z
2021-11-21T18:10:15.000Z
strategic.py
rayanf/Liars-Dice
bf68d08eb2d48bbceca4c79a91c3b88054143305
[ "MIT" ]
null
null
null
strategic.py
rayanf/Liars-Dice
bf68d08eb2d48bbceca4c79a91c3b88054143305
[ "MIT" ]
null
null
null
import math class Player: def __init__(self): pass # self.most_common = lambda : self.numbers.index(max(self.numbers)) + 1 def initcards(self,num1,num2,num3,num4,num_all): self.numbers = [num1,num2,num3,num4] self.num_all = num_all self.common = self.numbers.index(...
23.016667
79
0.57929
import math class Player: def __init__(self): pass def initcards(self,num1,num2,num3,num4,num_all): self.numbers = [num1,num2,num3,num4] self.num_all = num_all self.common = self.numbers.index(max(self.numbers)) + 1 def guess(self): prob = self.num_a...
true
true
f715167bc39c8d99f903da2fe8c83bd99f51806e
20,547
py
Python
purity_fb/purity_fb_1dot3/apis/file_systems_api.py
mabdelhafez/purity_fb_python_client
a9856875b3df43b4302a2e4addd1a6b71f51f5ce
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot3/apis/file_systems_api.py
mabdelhafez/purity_fb_python_client
a9856875b3df43b4302a2e4addd1a6b71f51f5ce
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot3/apis/file_systems_api.py
mabdelhafez/purity_fb_python_client
a9856875b3df43b4302a2e4addd1a6b71f51f5ce
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Pure Storage FlashBlade REST 1.3 Python SDK Pure Storage FlashBlade REST 1.3 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/). OpenAPI spec version: 1.3 Contact: i...
41.847251
204
0.575607
from __future__ import absolute_import import sys import os import re from six import iteritems from ..configuration import Configuration from ..api_client import ApiClient class FileSystemsApi(object): def __init__(self, api_client=None): config = Configuration() if api_client: ...
true
true
f71516f50db00136d8aa0339afcc29694d8dbf29
131
py
Python
Exercises/Exercises Chapter 06/Question 01.py
tonysulfaro/CSE-231
0e3ff5422fe42624a90a17d7f33174346662a6fc
[ "MIT" ]
2
2021-09-23T19:17:24.000Z
2021-11-29T09:03:56.000Z
Exercises/Exercises Chapter 06/Question 01.py
tonysulfaro/CSE-231
0e3ff5422fe42624a90a17d7f33174346662a6fc
[ "MIT" ]
null
null
null
Exercises/Exercises Chapter 06/Question 01.py
tonysulfaro/CSE-231
0e3ff5422fe42624a90a17d7f33174346662a6fc
[ "MIT" ]
1
2020-10-25T13:03:18.000Z
2020-10-25T13:03:18.000Z
fp = open('test.txt') output = "" for line in fp: line = line.strip() line = line.replace(" ", "") output+=line print(output)
18.714286
30
0.603053
fp = open('test.txt') output = "" for line in fp: line = line.strip() line = line.replace(" ", "") output+=line print(output)
true
true
f71517a589dede7e1d422b652aa255171a8a9b17
27,911
py
Python
Lib/site-packages/plumber/tests/test_plumber.py
Dr8Ninja/ShareSpace
7b445783a313cbdebb1938e824e98370a42def5f
[ "MIT" ]
1
2022-02-10T03:44:55.000Z
2022-02-10T03:44:55.000Z
Lib/site-packages/plumber/tests/test_plumber.py
Dr8Ninja/ShareSpace
7b445783a313cbdebb1938e824e98370a42def5f
[ "MIT" ]
2
2022-01-29T15:29:19.000Z
2022-02-13T20:28:17.000Z
Lib/site-packages/plumber/tests/test_plumber.py
Dr8Ninja/ShareSpace
7b445783a313cbdebb1938e824e98370a42def5f
[ "MIT" ]
null
null
null
from plumber import Behavior from plumber import PlumbingCollision from plumber import default from plumber import finalize from plumber import override from plumber import plumb from plumber import plumber from plumber import plumbifexists from plumber import plumbing from plumber.behavior import behaviormetaclass fro...
30.076509
79
0.555802
from plumber import Behavior from plumber import PlumbingCollision from plumber import default from plumber import finalize from plumber import override from plumber import plumb from plumber import plumber from plumber import plumbifexists from plumber import plumbing from plumber.behavior import behaviormetaclass fro...
true
true
f71517dfa9159f9c8d86c55e1e9fd94923af99e2
2,797
py
Python
trajectoryPlugin/collate.py
zhangyuwangumass/General-Data-Driven-Adaptive-Learning
63c4ddef36b2b7bd7078cd9b431e3502c358915a
[ "MIT" ]
null
null
null
trajectoryPlugin/collate.py
zhangyuwangumass/General-Data-Driven-Adaptive-Learning
63c4ddef36b2b7bd7078cd9b431e3502c358915a
[ "MIT" ]
null
null
null
trajectoryPlugin/collate.py
zhangyuwangumass/General-Data-Driven-Adaptive-Learning
63c4ddef36b2b7bd7078cd9b431e3502c358915a
[ "MIT" ]
null
null
null
r""""Contains definitions of the methods used by the _DataLoaderIter workers to collate samples fetched from dataset into Tensor(s). These **needs** to be in global scope since Py2 doesn't support serializing static methods. """ import torch import re from torch._six import container_abcs, string_classes, int_classes...
39.957143
85
0.672506
import torch import re from torch._six import container_abcs, string_classes, int_classes _use_shared_memory = False np_str_obj_array_pattern = re.compile(r'[SaUO]') error_msg_fmt = "batch must contain tensors, numbers, dicts or lists; found {}" numpy_type_map = { 'float64': torch.DoubleTensor, 'float32': ...
true
true
f715180246192055bfecfdc8fa0f2adb72606868
793
py
Python
Day 9/Blind Auction.py
anti-batman/100-Days-of-Code
2ba087a8eacd86f23104349f3044baf9965d5073
[ "MIT" ]
72
2021-02-20T06:00:46.000Z
2022-03-29T21:54:01.000Z
Day 9/Blind Auction.py
anti-batman/100-Days-of-Code
2ba087a8eacd86f23104349f3044baf9965d5073
[ "MIT" ]
2
2021-06-05T17:39:16.000Z
2022-01-30T08:58:14.000Z
Day 9/Blind Auction.py
anti-batman/100-Days-of-Code
2ba087a8eacd86f23104349f3044baf9965d5073
[ "MIT" ]
21
2021-04-03T09:59:48.000Z
2022-01-30T20:24:43.000Z
from replit import clear from art import logo print(logo) bids = {} bidding_finished = False def find_highest_bidder(bidding_record): highest_bid = 0 winner = "" for bidder in bidding_record: bid_amount = bidding_record[bidder] if bid_amount > highest_bid: highest_bid = bid_...
24.78125
80
0.644388
from replit import clear from art import logo print(logo) bids = {} bidding_finished = False def find_highest_bidder(bidding_record): highest_bid = 0 winner = "" for bidder in bidding_record: bid_amount = bidding_record[bidder] if bid_amount > highest_bid: highest_bid = bid_...
true
true
f715181158ed97a842f823c3209fa5647bf6dec5
246
py
Python
lightning_plus/api_basebone/app/client_urls.py
twocucao/lightning-plus
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
1
2021-04-15T14:52:12.000Z
2021-04-15T14:52:12.000Z
lightning_plus/api_basebone/app/client_urls.py
twocucao/lightning
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
null
null
null
lightning_plus/api_basebone/app/client_urls.py
twocucao/lightning
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
null
null
null
from lightning_plus.api_basebone.drf.routers import SimpleRouter from .upload import views as upload_views router = SimpleRouter(custom_base_name="basebone-app") router.register("upload", upload_views.UploadViewSet) urlpatterns = router.urls
24.6
64
0.829268
from lightning_plus.api_basebone.drf.routers import SimpleRouter from .upload import views as upload_views router = SimpleRouter(custom_base_name="basebone-app") router.register("upload", upload_views.UploadViewSet) urlpatterns = router.urls
true
true
f715182910b4d2b719d57bc37051be59f816ba91
2,850
py
Python
curriculum/envs/maze/maze_swim/swimmer_env.py
coco-robotics/rllab-curriculum
f55b50224fcf5a9a5c064542eb0850a966cab223
[ "MIT" ]
115
2017-12-06T16:31:10.000Z
2022-03-01T13:13:55.000Z
curriculum/envs/maze/maze_swim/swimmer_env.py
coco-robotics/rllab-curriculum
f55b50224fcf5a9a5c064542eb0850a966cab223
[ "MIT" ]
21
2017-11-15T18:28:16.000Z
2021-04-22T15:26:45.000Z
curriculum/envs/maze/maze_swim/swimmer_env.py
coco-robotics/rllab-curriculum
f55b50224fcf5a9a5c064542eb0850a966cab223
[ "MIT" ]
46
2017-12-22T22:26:01.000Z
2022-02-17T06:34:15.000Z
from rllab.envs.base import Step from rllab.misc.overrides import overrides from rllab.envs.mujoco.mujoco_env import MujocoEnv import numpy as np from rllab.core.serializable import Serializable from rllab.misc import logger from rllab.misc import autoargs from contextlib import contextmanager class SwimmerEnv(MujocoE...
36.538462
92
0.626316
from rllab.envs.base import Step from rllab.misc.overrides import overrides from rllab.envs.mujoco.mujoco_env import MujocoEnv import numpy as np from rllab.core.serializable import Serializable from rllab.misc import logger from rllab.misc import autoargs from contextlib import contextmanager class SwimmerEnv(MujocoE...
true
true
f71519f0a0fdeeeaa35b6e3d88c07e3139a2deb6
24,935
py
Python
tests/core/test_task.py
dsaxton/prefect
2b7e9c33cfeedebdb6ce3a8e468ac130c3a48bbf
[ "Apache-2.0" ]
null
null
null
tests/core/test_task.py
dsaxton/prefect
2b7e9c33cfeedebdb6ce3a8e468ac130c3a48bbf
[ "Apache-2.0" ]
null
null
null
tests/core/test_task.py
dsaxton/prefect
2b7e9c33cfeedebdb6ce3a8e468ac130c3a48bbf
[ "Apache-2.0" ]
null
null
null
import inspect import logging from datetime import timedelta from typing import Any, Tuple import pytest import prefect from prefect.core import Edge, Flow, Parameter, Task from prefect.engine.cache_validators import all_inputs, duration_only, never_use from prefect.engine.results import PrefectResult, LocalResult fr...
29.404481
105
0.585121
import inspect import logging from datetime import timedelta from typing import Any, Tuple import pytest import prefect from prefect.core import Edge, Flow, Parameter, Task from prefect.engine.cache_validators import all_inputs, duration_only, never_use from prefect.engine.results import PrefectResult, LocalResult fr...
true
true
f7151a63c16bac48a603b6c0bc9d747a9402ec51
5,462
py
Python
openstates/openstates-master/openstates/wv/actions.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/wv/actions.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/wv/actions.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
''' ''' import re from billy.scrape.actions import Rule, BaseCategorizer committees = [ u"Veterans' Affairs", u'Agriculture and Agri-business Committee', u'Agriculture', u'Banking and Insurance', u'Banking', u'Children, Juveniles and Other Issues', u'Constitutional Revision', u'Counci...
36.413333
83
0.598499
import re from billy.scrape.actions import Rule, BaseCategorizer committees = [ u"Veterans' Affairs", u'Agriculture and Agri-business Committee', u'Agriculture', u'Banking and Insurance', u'Banking', u'Children, Juveniles and Other Issues', u'Constitutional Revision', u'Council of Fina...
true
true
f7151a7c2677a8ca25b3ce9f5abd7ef3436c4d4b
576
py
Python
demo/django/tutorial/polls/admin.py
sirex/htsql
52275f6a584b412c109822d2ed2a5e69ac522cdf
[ "Apache-2.0" ]
15
2020-02-11T11:24:34.000Z
2022-03-03T20:46:34.000Z
demo/django/tutorial/polls/admin.py
sirex/htsql
52275f6a584b412c109822d2ed2a5e69ac522cdf
[ "Apache-2.0" ]
1
2020-02-13T14:08:34.000Z
2020-02-13T14:16:04.000Z
demo/django/tutorial/polls/admin.py
sirex/htsql
52275f6a584b412c109822d2ed2a5e69ac522cdf
[ "Apache-2.0" ]
2
2020-02-13T14:10:06.000Z
2021-02-25T04:36:05.000Z
from polls.models import Poll, Choice from django.contrib import admin class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes':...
28.8
80
0.645833
from polls.models import Poll, Choice from django.contrib import admin class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes':...
true
true
f7151aa262aee8fc1d6bd3aea5334c778feb0cc4
219
py
Python
parsyfiles/profiling/exec_on_test_by_type.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
parsyfiles/profiling/exec_on_test_by_type.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
parsyfiles/profiling/exec_on_test_by_type.py
smarie/python-simple-file-collection-parsing-framework
344b37e1151e8d4e7c2ee49ae09d6568715ae64e
[ "BSD-3-Clause" ]
null
null
null
import os import pytest THIS_DIR = os.path.dirname(os.path.abspath(__file__)) if __name__ == '__main__': # for profiling purposes... pytest.main(os.path.join(THIS_DIR, '../tests/test_parsyfiles_by_type.py'))
21.9
78
0.721461
import os import pytest THIS_DIR = os.path.dirname(os.path.abspath(__file__)) if __name__ == '__main__': pytest.main(os.path.join(THIS_DIR, '../tests/test_parsyfiles_by_type.py'))
true
true
f7151ade5974d9fd42771cf7639194622d837538
5,015
py
Python
src/phoebe_shelves_clt/manage.py
anthony-agbay/owl_shelves_clt
da09e1579f8d134a585b50de2f8da38c889c23b9
[ "MIT" ]
1
2021-05-04T03:06:13.000Z
2021-05-04T03:06:13.000Z
src/phoebe_shelves_clt/manage.py
anthony-agbay/phoebe-shelves-clt
da09e1579f8d134a585b50de2f8da38c889c23b9
[ "MIT" ]
null
null
null
src/phoebe_shelves_clt/manage.py
anthony-agbay/phoebe-shelves-clt
da09e1579f8d134a585b50de2f8da38c889c23b9
[ "MIT" ]
null
null
null
""" Launching point and supporting functions for database management tools. This module serves as the launching point for the database management tools. Backend-specific implementations are located within their specific modules and common functions and methods are included in this file. """ import numpy as np from t...
36.079137
84
0.664008
import numpy as np from typing import Tuple, Dict from phoebe_shelves_clt.csv_backend import manage_csv from phoebe_shelves_clt.sql_backend import manage_sql from phoebe_shelves_clt.utils import data_model from phoebe_shelves_clt.utils import sql_api def prompt_for_rating(prompt: str): rating = input(prompt) ...
true
true
f7151b2281b1a36bdf79beb5dc8c7718f7a9c8cb
4,165
py
Python
ansible/roles/relay/files/fanout/hls.py
fkusei/cm
7a6b20f5c57bb90a3568cbbf67d72f3a41721c89
[ "MIT" ]
null
null
null
ansible/roles/relay/files/fanout/hls.py
fkusei/cm
7a6b20f5c57bb90a3568cbbf67d72f3a41721c89
[ "MIT" ]
null
null
null
ansible/roles/relay/files/fanout/hls.py
fkusei/cm
7a6b20f5c57bb90a3568cbbf67d72f3a41721c89
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import time import itertools import contextlib import fanout_utils def fanout_hls(context): context += { "starttime": int(time.time()), } cleanup(context) context += calculate_map_and_varmap(context) generate_master_playlists(context) fanout(context) print("Cleaning up")...
28.141892
188
0.693637
import os import time import itertools import contextlib import fanout_utils def fanout_hls(context): context += { "starttime": int(time.time()), } cleanup(context) context += calculate_map_and_varmap(context) generate_master_playlists(context) fanout(context) print("Cleaning up") cleanup(context) d...
true
true
f7151b5dd7ec24f50098503c2316a5b09f21b826
1,104
py
Python
tests/test_httpclient.py
singulret/pyrabbit
b7efb24e9f1da5ad903e6b8699f807a144acb1a0
[ "BSD-3-Clause" ]
41
2015-01-27T15:10:28.000Z
2021-11-03T17:57:49.000Z
tests/test_httpclient.py
singulret/pyrabbit
b7efb24e9f1da5ad903e6b8699f807a144acb1a0
[ "BSD-3-Clause" ]
34
2015-01-21T17:11:00.000Z
2022-01-07T15:21:36.000Z
tests/test_httpclient.py
singulret/pyrabbit
b7efb24e9f1da5ad903e6b8699f807a144acb1a0
[ "BSD-3-Clause" ]
58
2015-01-28T19:23:43.000Z
2022-03-20T08:14:05.000Z
try: import unittest2 as unittest except ImportError: import unittest import sys sys.path.append('..') from pyrabbit import http class TestHTTPClient(unittest.TestCase): """ Except for the init test, these are largely functional tests that require a RabbitMQ management API to be available on loc...
28.307692
77
0.707428
try: import unittest2 as unittest except ImportError: import unittest import sys sys.path.append('..') from pyrabbit import http class TestHTTPClient(unittest.TestCase): testhost = 'localhost:15672' testuser = 'guest' testpass = 'guest' def setUp(self): self.c = http.HTTPClient(self....
true
true
f7151c247a299ed10ae06ffcbdf0a28cce6a04c2
18,329
py
Python
src/olympia/editors/views_themes.py
mstriemer/olympia
2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7
[ "BSD-3-Clause" ]
1
2020-04-07T07:21:25.000Z
2020-04-07T07:21:25.000Z
src/olympia/editors/views_themes.py
mstriemer/olympia
2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7
[ "BSD-3-Clause" ]
null
null
null
src/olympia/editors/views_themes.py
mstriemer/olympia
2e700c20e0a8ed3f0dd389d1521c3798bf7ed7f7
[ "BSD-3-Clause" ]
2
2018-03-04T00:11:22.000Z
2019-12-14T09:45:55.000Z
import datetime import json from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.forms.formsets import formset_factory from django.shortcuts import get_object_or_404, redirect from django.utils.datastructures import MultiValueDictKeyError fro...
36.29505
79
0.634132
import datetime import json from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.forms.formsets import formset_factory from django.shortcuts import get_object_or_404, redirect from django.utils.datastructures import MultiValueDictKeyError fro...
true
true
f7151d1d59556e1af3df7bc93bfb1d6c1c861363
1,217
py
Python
django_2gis_maps/tests/test_widget.py
NursErgesh/django_2gis_maps
42f561519eeb769c8713fdb0cd394313a657eb9f
[ "MIT" ]
7
2018-07-30T03:20:33.000Z
2020-09-15T08:20:31.000Z
django_2gis_maps/tests/test_widget.py
NursErgesh/django-2gis-maps
42f561519eeb769c8713fdb0cd394313a657eb9f
[ "MIT" ]
4
2020-04-13T11:22:57.000Z
2020-09-16T00:24:54.000Z
django_2gis_maps/tests/test_widget.py
NursErgesh/django-2gis-maps
42f561519eeb769c8713fdb0cd394313a657eb9f
[ "MIT" ]
2
2018-07-29T17:55:12.000Z
2020-09-16T05:41:12.000Z
from django import test from django.conf import settings from django_2gis_maps.widgets import DoubleGisMapsAddressWidget class WidgetTests(test.TestCase): def test_render_returns_xxxxxxx(self): widget = DoubleGisMapsAddressWidget() results = widget.render('name', 'value', attrs={'a1': 1, 'a2': 2})...
45.074074
89
0.665571
from django import test from django.conf import settings from django_2gis_maps.widgets import DoubleGisMapsAddressWidget class WidgetTests(test.TestCase): def test_render_returns_xxxxxxx(self): widget = DoubleGisMapsAddressWidget() results = widget.render('name', 'value', attrs={'a1': 1, 'a2': 2})...
true
true
f7151d81ac3753cf1b8aa541756a774f0dd9b255
198
py
Python
Harvard's CS50/ints.py
RichelleT/Python
87aff2392964ca5630ffa44225f9e13d040cdd91
[ "MIT" ]
1
2019-03-04T05:43:35.000Z
2019-03-04T05:43:35.000Z
Harvard's CS50/ints.py
RichelleT/Python
87aff2392964ca5630ffa44225f9e13d040cdd91
[ "MIT" ]
null
null
null
Harvard's CS50/ints.py
RichelleT/Python
87aff2392964ca5630ffa44225f9e13d040cdd91
[ "MIT" ]
null
null
null
from cs50 import get_int x = get_int("x: ") y = get_int("y: ") print(f"x + y = {x + y}") print(f"x - y = {x - y}") print(f"x * y = {x * y}") print(f"x / y = {x / y}") print(f"x mod y = {x % y}")
16.5
27
0.464646
from cs50 import get_int x = get_int("x: ") y = get_int("y: ") print(f"x + y = {x + y}") print(f"x - y = {x - y}") print(f"x * y = {x * y}") print(f"x / y = {x / y}") print(f"x mod y = {x % y}")
true
true
f7151db4fc3ad6adda43fc7246c135eb4b5779ae
1,370
py
Python
cornflow-server/migrations/versions/a472b5ad50b7_.py
ggsdc/corn
4c17c46a70f95b8882bcb6a55ef7daa1f69e0456
[ "MIT" ]
2
2020-07-09T20:58:47.000Z
2020-07-20T20:40:46.000Z
cornflow-server/migrations/versions/a472b5ad50b7_.py
baobabsoluciones/cornflow
bd7cae22107e5fe148704d5f41d4f58f9c410b40
[ "Apache-2.0" ]
2
2022-03-31T08:42:10.000Z
2022-03-31T12:05:23.000Z
cornflow-server/migrations/versions/a472b5ad50b7_.py
ggsdc/corn
4c17c46a70f95b8882bcb6a55ef7daa1f69e0456
[ "MIT" ]
null
null
null
""" Modified state columns in executions table Revision ID: a472b5ad50b7 Revises: e1a50dae1ac9 Create Date: 2021-01-21 13:25:45.815775 """ import sqlalchemy as sa from alembic import op # TODO: import DEFAULT EXECUTION CODE HERE # revision identifiers, used by Alembic. revision = "a472b5ad50b7" down_revision = "e1a...
24.909091
85
0.621898
import sqlalchemy as sa from alembic import op revision = "a472b5ad50b7" down_revision = "e1a50dae1ac9" branch_labels = None depends_on = None def upgrade(): 0)), ), ) op.add_column("executions", sa.Column("state_message", sa.TEXT(), nullable=True)) with op.batch_alter_table("executi...
true
true
f7151e12353ec6f42deedb97b338a0018cfc050e
6,304
py
Python
sdk/python/pulumi_gcp/compute/route.py
stack72/pulumi-gcp
e63e4ed3129fe8e64e4869f4839ba2b20f57cb57
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_gcp/compute/route.py
stack72/pulumi-gcp
e63e4ed3129fe8e64e4869f4839ba2b20f57cb57
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_gcp/compute/route.py
stack72/pulumi-gcp
e63e4ed3129fe8e64e4869f4839ba2b20f57cb57
[ "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 .. import utilities, tables class Route(pulumi.CustomResource): ...
43.777778
372
0.682265
import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class Route(pulumi.CustomResource): description: pulumi.Output[str] dest_range: pulumi.Output[str] name: pulumi.Output[str] network: pulumi.Output[str] next_hop_gateway: pulumi.Output[str] next_...
true
true
f7151ede1353f7e6906097e8ade4346f2390410d
3,022
py
Python
code/main.py
ynandwan/step-function-approximator
7f4a59841d6d938e0cc97e726ce6ba6b65a6267f
[ "MIT" ]
null
null
null
code/main.py
ynandwan/step-function-approximator
7f4a59841d6d938e0cc97e726ce6ba6b65a6267f
[ "MIT" ]
null
null
null
code/main.py
ynandwan/step-function-approximator
7f4a59841d6d938e0cc97e726ce6ba6b65a6267f
[ "MIT" ]
null
null
null
from __future__ import print_function import os import utils import argparse import point import one_step_approximator from IPython.core.debugger import Pdb MAX = float('inf') def print_output(output,output_file): if output_file == '': fh = None else: fh = open(output_file,'w') # pri...
31.479167
91
0.603905
from __future__ import print_function import os import utils import argparse import point import one_step_approximator from IPython.core.debugger import Pdb MAX = float('inf') def print_output(output,output_file): if output_file == '': fh = None else: fh = open(output_file,'w') prin...
true
true
f71521568544b636c6596c9aea9ff6e5391602ad
27,240
py
Python
src/geopackage/_wkb.py
karmic-creditor/pygeopackage
13366d54f80bd827b84c6538b9b08b6656111ef4
[ "Apache-2.0" ]
null
null
null
src/geopackage/_wkb.py
karmic-creditor/pygeopackage
13366d54f80bd827b84c6538b9b08b6656111ef4
[ "Apache-2.0" ]
null
null
null
src/geopackage/_wkb.py
karmic-creditor/pygeopackage
13366d54f80bd827b84c6538b9b08b6656111ef4
[ "Apache-2.0" ]
null
null
null
""" This code has been a variation of geomet: https://github.com/geomet/geomet It has been modified under the Apache 2.0 license to fit the needs of the Esri JSON specificaction as defined here: https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm """ import binascii import struct from ._...
31.310345
124
0.615932
import binascii import struct from ._utils import block_splitter from ._utils import take from ._utils import as_bin_str from ._utils import flatten_multi_dim from itertools import chain BIG_ENDIAN = b'\x00' LITTLE_ENDIAN = b'\x01' SRID_FLAG = b'\x20' WKB_2D = { 'Point': b'\x00\x00\x00\x01', 'LineS...
true
true
f715225dc353f1b54d4a6b1bdb2fd62dea0595db
1,881
py
Python
alipay/aop/api/domain/ContentPrizeInfoModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/ContentPrizeInfoModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/ContentPrizeInfoModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class ContentPrizeInfoModel(object): def __init__(self): self._prize_id = None self._prize_logo = None self._prize_name = None @property def prize_id(self...
26.492958
71
0.585327
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class ContentPrizeInfoModel(object): def __init__(self): self._prize_id = None self._prize_logo = None self._prize_name = None @property def prize_id(self): return self._prize_id @prize...
true
true
f71522b5c9555ec99171925ed4d27c211020afac
28,605
py
Python
pandas/io/common.py
stragu/pandas
b8890eb33b40993da00656f16c65070c42429f0d
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/io/common.py
stragu/pandas
b8890eb33b40993da00656f16c65070c42429f0d
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/io/common.py
stragu/pandas
b8890eb33b40993da00656f16c65070c42429f0d
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
"""Common IO api utilities""" from __future__ import annotations import bz2 import codecs from collections import abc import dataclasses import gzip from io import BufferedIOBase, BytesIO, RawIOBase, StringIO, TextIOWrapper import mmap import os from typing import IO, Any, AnyStr, Dict, List, Mapping, Optional, Tuple,...
32.917146
87
0.635833
from __future__ import annotations import bz2 import codecs from collections import abc import dataclasses import gzip from io import BufferedIOBase, BytesIO, RawIOBase, StringIO, TextIOWrapper import mmap import os from typing import IO, Any, AnyStr, Dict, List, Mapping, Optional, Tuple, Union, cast from urllib.parse...
true
true
f715230aa02adaf67d5dae2703f0b43403c478f7
4,874
py
Python
pyhanabi/common_utils/helper.py
ravihammond/hanabi-convention-adaptation
5dafa91742de8e8d5810e8213e0e2771818b2f54
[ "MIT" ]
1
2022-03-24T19:41:22.000Z
2022-03-24T19:41:22.000Z
pyhanabi/common_utils/helper.py
ravihammond/hanabi-convention-adaptation
5dafa91742de8e8d5810e8213e0e2771818b2f54
[ "MIT" ]
null
null
null
pyhanabi/common_utils/helper.py
ravihammond/hanabi-convention-adaptation
5dafa91742de8e8d5810e8213e0e2771818b2f54
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import os import random import numpy as np import torch from torch import nn from typing import Dict def to_device(data...
26.48913
77
0.586992
import os import random import numpy as np import torch from torch import nn from typing import Dict def to_device(data, device): if isinstance(data, torch.Tensor): return data.to(device) elif isinstance(data, dict): return {k: to_device(v, device) for k, v in data.items()} elif isi...
true
true
f715230f4f2ce5d2a6cd06dbc6f0136712d5c553
4,871
py
Python
pymetalog/pdf_quantile_functions.py
gboehl/pymetalog
bcc1bfbf658f44f48d63a594d2b9de8b700a11a7
[ "MIT" ]
null
null
null
pymetalog/pdf_quantile_functions.py
gboehl/pymetalog
bcc1bfbf658f44f48d63a594d2b9de8b700a11a7
[ "MIT" ]
null
null
null
pymetalog/pdf_quantile_functions.py
gboehl/pymetalog
bcc1bfbf658f44f48d63a594d2b9de8b700a11a7
[ "MIT" ]
null
null
null
import numpy as np from .support import pdfMetalog, quantileMetalog def pdf_quantile_builder(temp, y, term_limit, bounds, boundedness): """Builds the metalog pdf and quantile arrays based on the a coefficients found by fitting metalog distribution. Args: temp (:obj: `numpy.ndarray` of type float): Ar...
39.282258
133
0.583453
import numpy as np from .support import pdfMetalog, quantileMetalog def pdf_quantile_builder(temp, y, term_limit, bounds, boundedness): q_dict = {} m = pdfMetalog(temp, y[0], term_limit, bounds=bounds, boundedness=boundedness) for j in range(2, len(y) + 1): tempPDF = pdfMetalog( ...
true
true
f7152491c656ec2239d0ca0d5473ee941e003d64
24,833
py
Python
airbyte-integrations/connectors/source-s3/source_s3/source_files_abstract/stream.py
Mu-L/airbyte
d6c684b3e495f1cb5c08d94e57ab55288ce47ea6
[ "MIT" ]
1
2022-02-02T20:42:41.000Z
2022-02-02T20:42:41.000Z
airbyte-integrations/connectors/source-s3/source_s3/source_files_abstract/stream.py
Mu-L/airbyte
d6c684b3e495f1cb5c08d94e57ab55288ce47ea6
[ "MIT" ]
2
2021-09-30T16:58:58.000Z
2021-11-26T17:58:59.000Z
airbyte-integrations/connectors/source-s3/source_s3/source_files_abstract/stream.py
Mu-L/airbyte
d6c684b3e495f1cb5c08d94e57ab55288ce47ea6
[ "MIT" ]
1
2022-03-18T21:58:33.000Z
2022-03-18T21:58:33.000Z
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import concurrent import json from abc import ABC, abstractmethod from copy import deepcopy from datetime import datetime from functools import lru_cache from operator import itemgetter from traceback import format_exc from typing import Any, Iterable, Iter...
51.951883
150
0.663432
import concurrent import json from abc import ABC, abstractmethod from copy import deepcopy from datetime import datetime from functools import lru_cache from operator import itemgetter from traceback import format_exc from typing import Any, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Tuple, Unio...
true
true
f715250228b280bbd2a5350070a71e1887f4c22e
36,247
py
Python
lib/python3.7/site-packages/boltons/funcutils.py
nguyentranhoan/uit-mobile
8546312b01373d94cf00c64f7eacb769e0f4ccce
[ "BSD-3-Clause" ]
null
null
null
lib/python3.7/site-packages/boltons/funcutils.py
nguyentranhoan/uit-mobile
8546312b01373d94cf00c64f7eacb769e0f4ccce
[ "BSD-3-Clause" ]
null
null
null
lib/python3.7/site-packages/boltons/funcutils.py
nguyentranhoan/uit-mobile
8546312b01373d94cf00c64f7eacb769e0f4ccce
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Python's built-in :mod:`functools` module builds several useful utilities on top of Python's first-class function support. ``funcutils`` generally stays in the same vein, adding to and correcting Python's standard metaprogramming facilities. """ from __future__ import print_function import s...
36.539315
118
0.585648
from __future__ import print_function import sys import re import inspect import functools import itertools from types import MethodType, FunctionType try: xrange make_method = MethodType except NameError: make_method = lambda desc, obj, obj_type: MethodType(desc, obj) basestring = (str, bytes) ...
true
true
f7152509f06d29375bdf82999b5fe6fe5470fe85
10,642
py
Python
deslib/dcs/a_posteriori.py
vishalbelsare/DESlib
64260ae7c6dd745ef0003cc6322c9f829c807708
[ "BSD-3-Clause" ]
310
2019-01-02T12:33:03.000Z
2022-03-30T08:35:24.000Z
deslib/dcs/a_posteriori.py
vishalbelsare/DESlib
64260ae7c6dd745ef0003cc6322c9f829c807708
[ "BSD-3-Clause" ]
95
2019-01-12T03:34:32.000Z
2022-02-22T18:35:46.000Z
deslib/dcs/a_posteriori.py
vishalbelsare/DESlib
64260ae7c6dd745ef0003cc6322c9f829c807708
[ "BSD-3-Clause" ]
51
2018-12-29T13:21:06.000Z
2022-03-25T22:56:27.000Z
# coding=utf-8 # Author: Rafael Menelau Oliveira e Cruz <rafaelmenelau@gmail.com> # # License: BSD 3 clause import numpy as np from deslib.dcs.base import BaseDCS class APosteriori(BaseDCS): """A Posteriori Dynamic classifier selection. The A Posteriori method uses the probability of correct classificatio...
44.157676
79
0.652603
import numpy as np from deslib.dcs.base import BaseDCS class APosteriori(BaseDCS): def __init__(self, pool_classifiers=None, k=7, DFP=False, with_IH=False, safe_k=None, IH_rate=0.30, selection_method='diff', diff_thresh=0.1, random_state=None, knn_classifier='knn', ...
true
true
f71525eb6d02c2219a98e137bacd9ff85536c953
838
py
Python
eventmanager/contacts/migrations/0001_initial.py
jasham/event2Backend
54e9945676458231cacb6fb8ad62a757a9547b63
[ "MIT" ]
null
null
null
eventmanager/contacts/migrations/0001_initial.py
jasham/event2Backend
54e9945676458231cacb6fb8ad62a757a9547b63
[ "MIT" ]
null
null
null
eventmanager/contacts/migrations/0001_initial.py
jasham/event2Backend
54e9945676458231cacb6fb8ad62a757a9547b63
[ "MIT" ]
1
2020-04-27T06:45:18.000Z
2020-04-27T06:45:18.000Z
# Generated by Django 2.2.5 on 2020-03-08 07:42 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('leads', '__first__'), ] operations = [ migrations.CreateModel( ...
31.037037
114
0.559666
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('leads', '__first__'), ] operations = [ migrations.CreateModel( name='Contacts', fields=[ ...
true
true
f71526b15e9dfaa84b99bbeb8e8827713bb52184
38,532
py
Python
topaz/utils/regexp.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
null
null
null
topaz/utils/regexp.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
null
null
null
topaz/utils/regexp.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
null
null
null
import sys from rpython.rlib.listsort import make_timsort_class from rpython.rlib.objectmodel import specialize from rpython.rlib.rstring import StringBuilder from rpython.rlib.rsre.rsre_core import ( OPCODE_LITERAL, OPCODE_LITERAL_IGNORE, OPCODE_SUCCESS, OPCODE_ASSERT, OPCODE_MARK, OPCODE_REPEAT, OPCODE_ANY, ...
29.190909
131
0.595116
import sys from rpython.rlib.listsort import make_timsort_class from rpython.rlib.objectmodel import specialize from rpython.rlib.rstring import StringBuilder from rpython.rlib.rsre.rsre_core import ( OPCODE_LITERAL, OPCODE_LITERAL_IGNORE, OPCODE_SUCCESS, OPCODE_ASSERT, OPCODE_MARK, OPCODE_REPEAT, OPCODE_ANY, ...
true
true
f71526c8cd11306936f07cf05d779b8768da4f48
2,661
py
Python
search_wizard/__init__.py
saptarshibasu15/search-wizard
bd2e84f1f5dbc9196b09ba62930970e364413ed7
[ "MIT" ]
2
2020-11-26T14:43:45.000Z
2021-02-15T07:34:45.000Z
search_wizard/__init__.py
saptarshibasu15/search_wizard
bd2e84f1f5dbc9196b09ba62930970e364413ed7
[ "MIT" ]
null
null
null
search_wizard/__init__.py
saptarshibasu15/search_wizard
bd2e84f1f5dbc9196b09ba62930970e364413ed7
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup import pandas as pd class SearchWizard: config = { "base": "https://www.google.com/search?q=", "query": None, "format": "json" } search_results = [] def __init__(self, query: str = None): if not query == None: ...
34.115385
143
0.516723
import requests from bs4 import BeautifulSoup import pandas as pd class SearchWizard: config = { "base": "https://www.google.com/search?q=", "query": None, "format": "json" } search_results = [] def __init__(self, query: str = None): if not query == None: ...
true
true
f71526d120aeaf83394faef2c80ab3eeb85fdce7
1,413
py
Python
setup.py
pmrowla/gumiyabot
5dd446342f129c8e8ddc4de044a7072a58ec7851
[ "MIT" ]
4
2019-03-19T00:25:44.000Z
2021-10-16T03:45:22.000Z
setup.py
pmrowla/gumiyabot
5dd446342f129c8e8ddc4de044a7072a58ec7851
[ "MIT" ]
5
2017-08-25T15:08:39.000Z
2021-06-11T09:15:00.000Z
setup.py
pmrowla/gumiyabot
5dd446342f129c8e8ddc4de044a7072a58ec7851
[ "MIT" ]
2
2017-10-04T19:30:08.000Z
2021-12-01T13:39:27.000Z
from setuptools import find_packages, setup from codecs import open from os import path version = '0.1.5' install_requires = ['aiohttp', 'irc3', 'osuapi'] here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='...
30.717391
88
0.644728
from setuptools import find_packages, setup from codecs import open from os import path version = '0.1.5' install_requires = ['aiohttp', 'irc3', 'osuapi'] here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='...
true
true
f715280a5f0f47e678d78c95f09a2e73a4da4522
5,503
py
Python
src/sentry/web/frontend/accept_organization_invite.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
1
2019-05-28T06:18:03.000Z
2019-05-28T06:18:03.000Z
src/sentry/web/frontend/accept_organization_invite.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
6
2018-10-19T10:04:23.000Z
2019-12-09T20:29:12.000Z
src/sentry/web/frontend/accept_organization_invite.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from django import forms from django.contrib import messages from django.core.urlresolvers import reverse from django.utils.crypto import constant_time_compare from django.utils.translation import ugettext_lazy as _ from sentry.models import AuditLogEntryEvent, Authenticator, Or...
34.39375
99
0.58459
from __future__ import absolute_import from django import forms from django.contrib import messages from django.core.urlresolvers import reverse from django.utils.crypto import constant_time_compare from django.utils.translation import ugettext_lazy as _ from sentry.models import AuditLogEntryEvent, Authenticator, Or...
true
true
f7152815b2e45bf057d62fc81d08199232df205f
591
py
Python
wildlifecompliance/migrations/0539_auto_20210317_1151.py
Djandwich/wildlifecompliance
ca296798526a56ce67ffc2f7e8ebdbae95077e6d
[ "Apache-2.0" ]
null
null
null
wildlifecompliance/migrations/0539_auto_20210317_1151.py
Djandwich/wildlifecompliance
ca296798526a56ce67ffc2f7e8ebdbae95077e6d
[ "Apache-2.0" ]
3
2020-03-12T00:45:31.000Z
2022-03-02T10:37:23.000Z
wildlifecompliance/migrations/0539_auto_20210317_1151.py
Djandwich/wildlifecompliance
ca296798526a56ce67ffc2f7e8ebdbae95077e6d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-03-17 03:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wildlifecompliance', '0538_auto_20210305_1140'), ] operations = [ migratio...
28.142857
172
0.637902
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wildlifecompliance', '0538_auto_20210305_1140'), ] operations = [ migrations.AlterField( model_name='classification', name...
true
true
f71528a738fc1065a84bb466471ea884e98dc377
3,768
py
Python
src/decode/decoder.py
Masao-Someki/CycleVAE_VC
be4a27637a3f8b6272d96105f9b3c9327f6c16f7
[ "MIT" ]
3
2020-06-03T08:29:49.000Z
2022-03-23T02:29:01.000Z
src/decode/decoder.py
Masao-Someki/CycleVAE_VC
be4a27637a3f8b6272d96105f9b3c9327f6c16f7
[ "MIT" ]
1
2020-06-07T23:06:10.000Z
2020-06-07T23:06:10.000Z
src/decode/decoder.py
Masao-Someki/CycleVAE_VC
be4a27637a3f8b6272d96105f9b3c9327f6c16f7
[ "MIT" ]
1
2020-06-03T09:41:42.000Z
2020-06-03T09:41:42.000Z
# Copyright 2020 Masao Someki # MIT License (https://opensource.org/licenses/MIT) import os import glob import h5py import logging import librosa import numpy as np from scipy.io import wavfile from speech import Synthesizer IRLEN = 1024 INTERVALS = 10 SEED = 1 LP_CUTOFF = 20 class Decoder(object): def __init...
31.4
97
0.52362
import os import glob import h5py import logging import librosa import numpy as np from scipy.io import wavfile from speech import Synthesizer IRLEN = 1024 INTERVALS = 10 SEED = 1 LP_CUTOFF = 20 class Decoder(object): def __init__(self, args, scaler, logger=None): self.save_dir = args.exp_di...
true
true
f7152949331934bec0c7d5505f3422644b6d6f4e
114,228
gyp
Python
grpc.gyp
stungkit/grpc
063c36cb46733c13d2ce8116b6af482c9bd832d6
[ "Apache-2.0" ]
null
null
null
grpc.gyp
stungkit/grpc
063c36cb46733c13d2ce8116b6af482c9bd832d6
[ "Apache-2.0" ]
null
null
null
grpc.gyp
stungkit/grpc
063c36cb46733c13d2ce8116b6af482c9bd832d6
[ "Apache-2.0" ]
null
null
null
# GRPC GYP build file # This file has been automatically generated from a template file. # Please look at the templates directory instead. # This file can be regenerated from the template by running # tools/buildgen/generate_projects.sh # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0...
54.73311
135
0.684683
{ 'variables': { 'openssl_gyp_target%': 'Please Define openssl_gyp_target variable', 'zlib_gyp_target%': 'Please Define zlib_gyp_target variable', 'grpc_gcov%': 'false', 'grpc_alpine%': 'false', }, 'target_defaults': { 'configurations': { 'Debug': { 'cfl...
true
true
f715296fb8250e6a9fc65fab4030ce645556e39d
30,603
py
Python
tests/httpwrappers/tests.py
ioinfinity/django
b6a0ab523751c13ae3eaec102de70f58f73a0d94
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/httpwrappers/tests.py
ioinfinity/django
b6a0ab523751c13ae3eaec102de70f58f73a0d94
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-07-02T21:10:44.000Z
2020-07-02T21:11:21.000Z
tests/httpwrappers/tests.py
ioinfinity/django
b6a0ab523751c13ae3eaec102de70f58f73a0d94
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-08-11T18:46:32.000Z
2020-08-11T18:46:32.000Z
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import copy import json import os import pickle import unittest import uuid from django.core.exceptions import SuspiciousOperation from django.core.serializers.json import DjangoJSONEncoder from django.core.signals import request_finished from django.d...
38.935115
118
0.60151
from __future__ import unicode_literals import copy import json import os import pickle import unittest import uuid from django.core.exceptions import SuspiciousOperation from django.core.serializers.json import DjangoJSONEncoder from django.core.signals import request_finished from django.db import close_old_connec...
true
true
f7152c01a06b1a8eea4ae4c08a05e1af35676efc
82
py
Python
pyrobolearn/states/generators/__init__.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
2
2021-01-21T21:08:30.000Z
2022-03-29T16:45:49.000Z
pyrobolearn/states/generators/__init__.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
null
null
null
pyrobolearn/states/generators/__init__.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
1
2020-09-29T21:25:39.000Z
2020-09-29T21:25:39.000Z
# -*- coding: utf-8 -*- # import state generators from .state_generator import *
16.4
30
0.682927
from .state_generator import *
true
true
f7152cd6c81c021fabfecc053762e195b6af37eb
493
py
Python
setup.py
knorth55/chainer-dense-fusion
8ff53173d7071fc2cfcd05b1e0b2c544aeed090b
[ "MIT" ]
22
2019-01-31T23:50:30.000Z
2021-09-13T09:41:00.000Z
setup.py
knorth55/chainer-dense-fusion
8ff53173d7071fc2cfcd05b1e0b2c544aeed090b
[ "MIT" ]
4
2019-07-31T14:40:06.000Z
2022-03-16T13:32:45.000Z
setup.py
knorth55/chainer-dense-fusion
8ff53173d7071fc2cfcd05b1e0b2c544aeed090b
[ "MIT" ]
3
2019-08-30T09:18:45.000Z
2020-03-03T16:07:51.000Z
from setuptools import find_packages from setuptools import setup version = '0.0.0' setup( name='chainer_dense_fusion', version=version, packages=find_packages(), install_requires=open('requirements.txt').readlines(), description='', long_description=open('README.md').read(), author='Shi...
23.47619
59
0.703854
from setuptools import find_packages from setuptools import setup version = '0.0.0' setup( name='chainer_dense_fusion', version=version, packages=find_packages(), install_requires=open('requirements.txt').readlines(), description='', long_description=open('README.md').read(), author='Shi...
true
true
f7152da2720cfd4a357ce9c5b71bde73ceb5bb7b
2,199
py
Python
year_2018/day_09.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
1
2020-04-12T16:14:29.000Z
2020-04-12T16:14:29.000Z
year_2018/day_09.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
year_2018/day_09.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
from __future__ import print_function import unittest class TestMarbleGame(unittest.TestCase): def test_starts_empty(self): game = MarbleGame(0, 0) self.assertListEqual([], game.scores) self.assertListEqual([0], game._circle) def test_play_examples(self): def high_score(player...
34.359375
77
0.626648
from __future__ import print_function import unittest class TestMarbleGame(unittest.TestCase): def test_starts_empty(self): game = MarbleGame(0, 0) self.assertListEqual([], game.scores) self.assertListEqual([0], game._circle) def test_play_examples(self): def high_score(player...
true
true
f7152e2178499fecdb9dce8c3f5d9bfbf5c3dfd6
297
py
Python
tests/test_modes.py
s-s-boika/obdlib
5b0b35276575a522d20858b6993a9bebf0acc968
[ "MIT" ]
9
2015-07-14T07:15:58.000Z
2021-06-03T01:42:19.000Z
tests/test_modes.py
s-s-boika/obdlib
5b0b35276575a522d20858b6993a9bebf0acc968
[ "MIT" ]
null
null
null
tests/test_modes.py
s-s-boika/obdlib
5b0b35276575a522d20858b6993a9bebf0acc968
[ "MIT" ]
4
2015-07-15T09:05:46.000Z
2022-02-06T04:28:53.000Z
import unittest import obdlib.obd.modes as modes class TestModes(unittest.TestCase): def test_init(self): m = modes.Modes(1) self.assertIsInstance(m.modes, dict) suite = unittest.TestLoader().loadTestsFromTestCase(TestModes) unittest.TextTestRunner(verbosity=2).run(suite)
22.846154
62
0.747475
import unittest import obdlib.obd.modes as modes class TestModes(unittest.TestCase): def test_init(self): m = modes.Modes(1) self.assertIsInstance(m.modes, dict) suite = unittest.TestLoader().loadTestsFromTestCase(TestModes) unittest.TextTestRunner(verbosity=2).run(suite)
true
true
f7152e96fcfdafb7945bd56df781ae2d29581903
4,319
py
Python
gbrarscrapy.py
wothard/scrapyfloat
ff0c6698a4732015358ed5e9a07e24dd212eaf7f
[ "MIT" ]
null
null
null
gbrarscrapy.py
wothard/scrapyfloat
ff0c6698a4732015358ed5e9a07e24dd212eaf7f
[ "MIT" ]
null
null
null
gbrarscrapy.py
wothard/scrapyfloat
ff0c6698a4732015358ed5e9a07e24dd212eaf7f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # encoding: utf-8 from lxml import html import requests import os import random import time from fake_agent import fakeagent class Gbrarscrapy(object): def __init__(self, url_li, proxy_single): self.title_xpa = '//a[@onmouseover]/text()' self.score_list_xpa = '//span[@style...
41.133333
249
0.508219
from lxml import html import requests import os import random import time from fake_agent import fakeagent class Gbrarscrapy(object): def __init__(self, url_li, proxy_single): self.title_xpa = '//a[@onmouseover]/text()' self.score_list_xpa = '//span[@style="color:DarkSlateGray"]/text()' ...
true
true
f7152ea08588300b8fbe747412eb41de76a983a8
456
py
Python
experiments/3_parallel_training.py
dddaga/word-tree
ed6c59c16feee04d5c6003b3f5f4df68e6808e04
[ "MIT" ]
null
null
null
experiments/3_parallel_training.py
dddaga/word-tree
ed6c59c16feee04d5c6003b3f5f4df68e6808e04
[ "MIT" ]
null
null
null
experiments/3_parallel_training.py
dddaga/word-tree
ed6c59c16feee04d5c6003b3f5f4df68e6808e04
[ "MIT" ]
1
2020-12-02T09:07:06.000Z
2020-12-02T09:07:06.000Z
import pymongo EXPERIMENT_NAME = 'EXP_3' CORPUS_PATH = 'data/pride_and_prejudice_cleaned.txt' TRAINING_WINDOW = 3 CONTEXT_DIMENSION = 64 CONTEXT_DECAY = 0.5 CONTRASTIVE_WEIGHT = 0.001 LEANING_RATE = 1 DROPOUT = 0.1 myclient = pymongo.MongoClient('mongodb://localhost:27017') mydb ...
14.709677
61
0.710526
import pymongo EXPERIMENT_NAME = 'EXP_3' CORPUS_PATH = 'data/pride_and_prejudice_cleaned.txt' TRAINING_WINDOW = 3 CONTEXT_DIMENSION = 64 CONTEXT_DECAY = 0.5 CONTRASTIVE_WEIGHT = 0.001 LEANING_RATE = 1 DROPOUT = 0.1 myclient = pymongo.MongoClient('mongodb://localhost:27017') mydb ...
true
true
f7152f1421c03597f5ecc2d6a08acdad363400e1
3,893
py
Python
deprecated/Imputation/GRUI/Run_GAN_imputed.py
srinivasans/DeepSepsis
8647a2ec93ad5a937638acfc279a756bbfa04f7f
[ "Apache-2.0" ]
2
2019-04-22T07:41:23.000Z
2019-04-23T02:45:06.000Z
deprecated/Imputation/GRUI/Run_GAN_imputed.py
srinivasans/DeepSepsis
8647a2ec93ad5a937638acfc279a756bbfa04f7f
[ "Apache-2.0" ]
null
null
null
deprecated/Imputation/GRUI/Run_GAN_imputed.py
srinivasans/DeepSepsis
8647a2ec93ad5a937638acfc279a756bbfa04f7f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Mar 26 10:47:41 2018 @author: yonghong """ from __future__ import print_function import sys sys.path.append("..") import argparse import os import tensorflow as tf from Physionet2019ImputedSepsisData import readImputed import gru_delta_forGAN if __name...
36.046296
130
0.625995
from __future__ import print_function import sys sys.path.append("..") import argparse import os import tensorflow as tf from Physionet2019ImputedSepsisData import readImputed import gru_delta_forGAN if __name__ == '__main__': parser = argparse.ArgumentParser(description='manual to this script') parser.add_a...
true
true
f7152f1b586fbf4b47b2c1084a5b2a3f185a8418
340
py
Python
apps/teams/adminx.py
slyslyme/CTF_AWD_Platform
6e9eec0a23a316aaf1927d4ec5be923ac26ff21e
[ "MIT" ]
85
2019-04-21T01:38:18.000Z
2022-03-22T08:06:21.000Z
apps/teams/adminx.py
xuchaoa/CTF_AWD_Platform
b2201f18677939442002e16e64280acd44f72bfe
[ "MIT" ]
12
2019-05-10T14:09:12.000Z
2022-03-11T23:45:35.000Z
apps/teams/adminx.py
slyslyme/CTF_AWD_Platform
6e9eec0a23a316aaf1927d4ec5be923ac26ff21e
[ "MIT" ]
21
2019-04-14T16:12:15.000Z
2022-03-22T08:06:22.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # Author: Archerx # @time: 2019/4/16 上午 11:35 from .models import TeamProfile import xadmin class TeamDispaly(object): list_display = ('id','team_name','team_captain','team_member1','team_member2','team_member3','competition','team_token') xadmin.site.register(TeamP...
28.333333
124
0.729412
from .models import TeamProfile import xadmin class TeamDispaly(object): list_display = ('id','team_name','team_captain','team_member1','team_member2','team_member3','competition','team_token') xadmin.site.register(TeamProfile, TeamDispaly)
true
true
f7152fae1381c42726a0ec3c4057ea6d2f710ce3
3,769
py
Python
kmip/core/messages/payloads/create.py
vbnmmnbv/PyKMIP
4617ae528006178c466fe3945a477f568b596940
[ "Apache-2.0" ]
12
2016-09-14T21:59:10.000Z
2020-03-11T07:37:25.000Z
kmip/core/messages/payloads/create.py
vbnmmnbv/PyKMIP
4617ae528006178c466fe3945a477f568b596940
[ "Apache-2.0" ]
1
2021-06-25T15:43:48.000Z
2021-06-25T15:43:48.000Z
kmip/core/messages/payloads/create.py
vbnmmnbv/PyKMIP
4617ae528006178c466fe3945a477f568b596940
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
32.491379
77
0.689573
from kmip.core import attributes from kmip.core import enums from kmip.core.enums import Tags from kmip.core.objects import TemplateAttribute from kmip.core.primitives import Struct from kmip.core.utils import BytearrayStream class CreateRequestPayload(Struct): def __init__(self, ...
true
true
f7152fd92189d41c2d60b2ab2fa4b993a10814c8
9,994
py
Python
torchtext/experimental/datasets/language_modeling.py
NicolasHug/text
651c1f70ee6e75705aa1c5e4d4cf86ff69b6cbed
[ "BSD-3-Clause" ]
null
null
null
torchtext/experimental/datasets/language_modeling.py
NicolasHug/text
651c1f70ee6e75705aa1c5e4d4cf86ff69b6cbed
[ "BSD-3-Clause" ]
null
null
null
torchtext/experimental/datasets/language_modeling.py
NicolasHug/text
651c1f70ee6e75705aa1c5e4d4cf86ff69b6cbed
[ "BSD-3-Clause" ]
null
null
null
import torch import logging from torchtext.data.utils import get_tokenizer from torchtext.vocab import build_vocab_from_iterator from torchtext.experimental.datasets.raw import language_modeling as raw from torchtext.experimental.datasets.raw.common import check_default_set from torchtext.experimental.datasets.raw.comm...
42.892704
111
0.662097
import torch import logging from torchtext.data.utils import get_tokenizer from torchtext.vocab import build_vocab_from_iterator from torchtext.experimental.datasets.raw import language_modeling as raw from torchtext.experimental.datasets.raw.common import check_default_set from torchtext.experimental.datasets.raw.comm...
true
true
f715303f7cff1a03797169fbe6f8d2773e09ef68
925
py
Python
challenge/urls.py
superdev0505/mtp-web
8288765a89daaa7b02dfd7e78cc51c4f12d7fcce
[ "MIT" ]
null
null
null
challenge/urls.py
superdev0505/mtp-web
8288765a89daaa7b02dfd7e78cc51c4f12d7fcce
[ "MIT" ]
null
null
null
challenge/urls.py
superdev0505/mtp-web
8288765a89daaa7b02dfd7e78cc51c4f12d7fcce
[ "MIT" ]
null
null
null
from django.urls import path, re_path from . import views urlpatterns = [ path('', views.index, name='challenge.index'), path('create', views.challenge_create, name='challenge.challenge_create'), path('<str:unique_id>/edit/', views.challenge_edit, name='challenge.my_challenge_edit'), re_path(r'^my-lis...
57.8125
124
0.740541
from django.urls import path, re_path from . import views urlpatterns = [ path('', views.index, name='challenge.index'), path('create', views.challenge_create, name='challenge.challenge_create'), path('<str:unique_id>/edit/', views.challenge_edit, name='challenge.my_challenge_edit'), re_path(r'^my-lis...
true
true
f7153249e54fec334ca1d518b4485c45f6ac4c7a
693
py
Python
osiris/vault/__init__.py
skadyan/aws-glue-python-kickstart
5e3228a0793188d248f801a2b5a522210048ccde
[ "Apache-2.0" ]
4
2020-04-23T18:43:27.000Z
2022-02-22T03:57:06.000Z
osiris/vault/__init__.py
skadyan/aws-glue-python-kickstart
5e3228a0793188d248f801a2b5a522210048ccde
[ "Apache-2.0" ]
1
2021-06-02T00:47:12.000Z
2021-06-02T00:47:12.000Z
osiris/vault/__init__.py
skadyan/aws-glue-python-kickstart
5e3228a0793188d248f801a2b5a522210048ccde
[ "Apache-2.0" ]
null
null
null
import abc from abc import abstractmethod from typing import Union from osiris.base.generalutils import instantiate class SecretVault(abc.ABC): @abstractmethod def get_secret(self, key: str, attr: str = None, **kwargs) -> Union[dict, str]: pass class NoopSecretVault(SecretVault): def get_secr...
24.75
83
0.688312
import abc from abc import abstractmethod from typing import Union from osiris.base.generalutils import instantiate class SecretVault(abc.ABC): @abstractmethod def get_secret(self, key: str, attr: str = None, **kwargs) -> Union[dict, str]: pass class NoopSecretVault(SecretVault): def get_secr...
true
true
f71533a0ade4d2a2240d14b32b74a3bbac06db98
7,949
py
Python
i2plib/tunnel.py
undecidedzogvisrainbowvitalispotent-360/i2plib
6edf51cd5d21cc745aa7e23cb98c582144884fa8
[ "MIT" ]
25
2018-09-05T16:44:05.000Z
2022-02-16T18:32:32.000Z
i2plib/tunnel.py
undecidedzogvisvitalispotent8stars360/i2plib
6edf51cd5d21cc745aa7e23cb98c582144884fa8
[ "MIT" ]
2
2018-10-24T19:57:16.000Z
2019-01-26T14:30:40.000Z
i2plib/tunnel.py
undecidedzogvisvitalispotent8stars360/i2plib
6edf51cd5d21cc745aa7e23cb98c582144884fa8
[ "MIT" ]
5
2018-10-24T18:01:46.000Z
2020-12-15T18:16:14.000Z
import logging import asyncio import argparse import i2plib.sam import i2plib.aiosam import i2plib.utils from i2plib.log import logger BUFFER_SIZE = 65536 async def proxy_data(reader, writer): """Proxy data from reader to writer""" try: while True: data = await reader.read(BUFFER_SIZE) ...
38.965686
85
0.603472
import logging import asyncio import argparse import i2plib.sam import i2plib.aiosam import i2plib.utils from i2plib.log import logger BUFFER_SIZE = 65536 async def proxy_data(reader, writer): try: while True: data = await reader.read(BUFFER_SIZE) if not data: bre...
true
true
f71535405665888b171719de9948f63f35341da0
948
py
Python
dune/gdt/test/linearelliptic/mpi_linearelliptic__block_swipdg_discretization.py
TiKeil/dune-gdt
25c8b987cc07a4b8b966c1a07ea21b78dba7852f
[ "BSD-2-Clause" ]
null
null
null
dune/gdt/test/linearelliptic/mpi_linearelliptic__block_swipdg_discretization.py
TiKeil/dune-gdt
25c8b987cc07a4b8b966c1a07ea21b78dba7852f
[ "BSD-2-Clause" ]
null
null
null
dune/gdt/test/linearelliptic/mpi_linearelliptic__block_swipdg_discretization.py
TiKeil/dune-gdt
25c8b987cc07a4b8b966c1a07ea21b78dba7852f
[ "BSD-2-Clause" ]
null
null
null
# ~~~ # This file is part of the dune-gdt project: # https://github.com/dune-community/dune-gdt # Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. # License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) # or GPL-2.0+ (http://opensource.org/lic...
39.5
110
0.696203
import itertools from dune.xt.codegen import typeid_to_typedef_name, la_backends grids = ['Yasp2Grid'] casenames = ['ESV2007DdSubdomainsTestCase',] testcases = ['Dune::GDT::LinearElliptic::{}<{}>'.format(c, g) for c, g in itertools.product(casenames, grids)] permutations = itertools.product(testcases, (...
true
true
f715368c12fac7bcd0f0179357f6b421ee70790a
795
py
Python
config_music.py
vincenzodentamaro/transformer-xl
61b76d783be49e409863667bba8576826bbf54df
[ "MIT" ]
16
2020-09-30T02:31:53.000Z
2022-03-09T10:27:25.000Z
config_music.py
vincenzodentamaro/transformer-xl
61b76d783be49e409863667bba8576826bbf54df
[ "MIT" ]
4
2020-11-09T03:58:04.000Z
2021-09-21T09:00:22.000Z
config_music.py
vincenzodentamaro/transformer-xl
61b76d783be49e409863667bba8576826bbf54df
[ "MIT" ]
5
2020-09-30T02:31:56.000Z
2021-10-06T15:50:18.000Z
import joblib tempo = 500000 ppq = 480 numerator = 4 denominator = 4 clocks_per_click = 24 notated_32nd_notes_per_beat = 8 cc_kept = [64, 67] cc_threshold = 64 cc_lower = 0 cc_upper = 127 vel_value = 64 n_notes = 128 n_cc = 2 * len(cc_kept) n_sounds = 2 * n_notes + n_cc + 1 n_deltas = 66 + 1 pad_idx = 0 n_jobs...
14.722222
106
0.735849
import joblib tempo = 500000 ppq = 480 numerator = 4 denominator = 4 clocks_per_click = 24 notated_32nd_notes_per_beat = 8 cc_kept = [64, 67] cc_threshold = 64 cc_lower = 0 cc_upper = 127 vel_value = 64 n_notes = 128 n_cc = 2 * len(cc_kept) n_sounds = 2 * n_notes + n_cc + 1 n_deltas = 66 + 1 pad_idx = 0 n_jobs...
true
true
f715368cd5d00722102b52900d74a1a59b5b3689
1,003
py
Python
loaf/projects/admin.py
Charles4th/Loaf
1a42fd7c1dc74a90231acfee0d65e235eb586ea3
[ "MIT" ]
1
2018-12-24T03:30:08.000Z
2018-12-24T03:30:08.000Z
loaf/projects/admin.py
Charles4th/Loaf
1a42fd7c1dc74a90231acfee0d65e235eb586ea3
[ "MIT" ]
2
2020-06-05T18:34:54.000Z
2022-02-10T11:23:33.000Z
loaf/projects/admin.py
Charles4th/Loaf
1a42fd7c1dc74a90231acfee0d65e235eb586ea3
[ "MIT" ]
1
2018-08-07T08:49:28.000Z
2018-08-07T08:49:28.000Z
from django.contrib import admin from . import models # Register your models here. @admin.register(models.Project) class ProjectAdmin(admin.ModelAdmin): list_display_links = ( 'title', ) search_fields = ( 'title', ) list_filter = ( 'title', 'creator', ) ...
17
37
0.540379
from django.contrib import admin from . import models @admin.register(models.Project) class ProjectAdmin(admin.ModelAdmin): list_display_links = ( 'title', ) search_fields = ( 'title', ) list_filter = ( 'title', 'creator', ) list_display = ( ...
true
true
f71537787e6f655fdc91b195e6460f7fc600f783
3,800
py
Python
src/solution/sdc_workspace/catkin_ws/src/sdc_package/scripts/mission_planner.py
coherentsolutionsinc/issoft-insights-2019-sdc-carla-ros
f6d3e162888bd79d59b771c82ff028df0f70ae11
[ "MIT" ]
8
2019-06-04T16:21:07.000Z
2021-09-05T07:24:20.000Z
src/solution/sdc_workspace/catkin_ws/src/sdc_package/scripts/mission_planner.py
coherentsolutionsinc/issoft-insights-2019-sdc-carla-ros
f6d3e162888bd79d59b771c82ff028df0f70ae11
[ "MIT" ]
null
null
null
src/solution/sdc_workspace/catkin_ws/src/sdc_package/scripts/mission_planner.py
coherentsolutionsinc/issoft-insights-2019-sdc-carla-ros
f6d3e162888bd79d59b771c82ff028df0f70ae11
[ "MIT" ]
1
2019-06-21T14:37:18.000Z
2019-06-21T14:37:18.000Z
#!/usr/bin/env python import os import csv import rospy # TODO: 1. Import waypoint messages from sdc_package.msg import BaseWaypoint, Path class MissionPlanner(object): def __init__(self): self.start_time = None # TODO: 2. Init mission planner node rospy.init_node('mission_planner') ...
40.425532
124
0.448947
import os import csv import rospy from sdc_package.msg import BaseWaypoint, Path class MissionPlanner(object): def __init__(self): self.start_time = None rospy.init_node('mission_planner') self.wait_master_initialization() self.wayp...
true
true
f71537954c3bd01d3b1211f2a051aa20670e6f9c
3,870
py
Python
run_local_mertric.py
middleprince/fashionAi
c512936b4983c2fb093008f06e04753180af0a90
[ "Apache-2.0" ]
316
2018-06-01T16:21:21.000Z
2022-03-22T03:25:20.000Z
run_local_mertric.py
middleprince/fashionAi
c512936b4983c2fb093008f06e04753180af0a90
[ "Apache-2.0" ]
8
2018-06-02T07:07:49.000Z
2019-07-11T06:55:43.000Z
run_local_mertric.py
middleprince/fashionAi
c512936b4983c2fb093008f06e04753180af0a90
[ "Apache-2.0" ]
91
2018-06-01T17:12:21.000Z
2022-03-19T06:54:34.000Z
import os import sys import time import numpy as np import pandas as pd import argparse import math import config as cfg def str2bool(v): return v.lower() in ("yes", "true", "t", "1") parser = argparse.ArgumentParser( description='The Normarlized Error Mertric Calculation For FashionAI Keypoint Detection Scr...
35.833333
148
0.582946
import os import sys import time import numpy as np import pandas as pd import argparse import math import config as cfg def str2bool(v): return v.lower() in ("yes", "true", "t", "1") parser = argparse.ArgumentParser( description='The Normarlized Error Mertric Calculation For FashionAI Keypoint Detection Scr...
true
true
f71538dd1163b1cc57d1780f5f59d458c6767583
5,306
py
Python
examples/plot_SimpleLineTest.py
aasensio/Lightweaver
9a261e72235f05df548148da140012f40dbd1e4b
[ "MIT" ]
13
2020-01-13T14:01:23.000Z
2022-03-11T08:36:45.000Z
examples/plot_SimpleLineTest.py
aasensio/Lightweaver
9a261e72235f05df548148da140012f40dbd1e4b
[ "MIT" ]
30
2020-01-17T13:00:37.000Z
2022-03-07T12:08:37.000Z
examples/plot_SimpleLineTest.py
aasensio/Lightweaver
9a261e72235f05df548148da140012f40dbd1e4b
[ "MIT" ]
4
2021-07-07T11:21:07.000Z
2021-11-23T06:52:02.000Z
""" =============================================================== Computing a simple NLTE 8542 line profile in a FAL C atmosphere =============================================================== """ #%% # First, we import everything we need. Lightweaver is typically imported as # `lw`, but things like the library of m...
38.729927
85
0.671692
from lightweaver.fal import Falc82 from lightweaver.rh_atoms import H_6_atom, C_atom, O_atom, Si_atom, Al_atom, \ CaII_atom, Fe_atom, He_9_atom, He_atom, MgII_atom, N_atom, Na_atom, S_atom import lightweaver as lw import matplotlib.pyplot as plt import time import numpy as np def synth_8542(atmos, conserve, u...
true
true
f7153948cabbb10fc8cd4bd9ce5fe812b7a32534
1,921
py
Python
rme/datasets/mnist.py
satishjasthi/convnet-study
ccd20c90e449fc8db694abf706db178e9413e57b
[ "MIT" ]
40
2016-09-17T00:57:42.000Z
2021-09-25T05:24:27.000Z
rme/datasets/mnist.py
satishjasthi/convnet-study
ccd20c90e449fc8db694abf706db178e9413e57b
[ "MIT" ]
1
2017-09-08T08:29:31.000Z
2017-09-13T23:21:09.000Z
rme/datasets/mnist.py
satishjasthi/convnet-study
ccd20c90e449fc8db694abf706db178e9413e57b
[ "MIT" ]
22
2016-11-06T03:57:22.000Z
2021-09-25T05:24:32.000Z
from __future__ import absolute_import import os import numpy as np import gzip import struct from .preprocessing import one_hotify def load(data_dir, valid_ratio=0.0, one_hot=True, shuffle=False, dtype='float32'): train_set, valid_set, test_set = {}, {}, {} # Get data from binary files for img_set, file_name...
33.12069
82
0.630401
from __future__ import absolute_import import os import numpy as np import gzip import struct from .preprocessing import one_hotify def load(data_dir, valid_ratio=0.0, one_hot=True, shuffle=False, dtype='float32'): train_set, valid_set, test_set = {}, {}, {} for img_set, file_name in zip((train_set, test_set...
true
true
f7153a02e898f5f116d487d957f85db359c928ad
5,631
py
Python
run_preprocessing_oggm.py
Wang518hongyu/PyGEM
1c9fa133133b3d463b1383d4792c535fa61c5b8d
[ "MIT" ]
null
null
null
run_preprocessing_oggm.py
Wang518hongyu/PyGEM
1c9fa133133b3d463b1383d4792c535fa61c5b8d
[ "MIT" ]
null
null
null
run_preprocessing_oggm.py
Wang518hongyu/PyGEM
1c9fa133133b3d463b1383d4792c535fa61c5b8d
[ "MIT" ]
null
null
null
""" PRE-PROCESSING FOR MODEL RUNS USING OGGM """ # Built-in libraries import argparse import collections import inspect import multiprocessing import os import time # External libraries import pandas as pd import pickle import matplotlib.pyplot as plt import numpy as np import xarray as xr # Local libraries import cl...
35.866242
129
0.74818
import argparse import collections import inspect import multiprocessing import os import time import pandas as pd import pickle import matplotlib.pyplot as plt import numpy as np import xarray as xr import class_climate import pygem.pygem_input as pygem_prms import pygemfxns_gcmbiasadj as gcmbiasadj import pygem...
true
true
f7153a70ee09cafbc4a4a4209f921a512961caf3
308
py
Python
aispace/datasets/tokenizer/__init__.py
SmileGoat/AiSpace
35fc120667e4263c99b300815e0bf018f5064a40
[ "Apache-2.0" ]
32
2020-01-16T07:59:03.000Z
2022-03-31T09:24:00.000Z
aispace/datasets/tokenizer/__init__.py
SmileGoat/AiSpace
35fc120667e4263c99b300815e0bf018f5064a40
[ "Apache-2.0" ]
9
2020-06-05T03:27:06.000Z
2022-03-12T01:00:17.000Z
aispace/datasets/tokenizer/__init__.py
SmileGoat/AiSpace
35fc120667e4263c99b300815e0bf018f5064a40
[ "Apache-2.0" ]
3
2020-06-09T02:22:50.000Z
2021-07-19T06:07:07.000Z
# -*- coding: utf-8 -*- # @Time : 2019-11-10 16:50 # @Author : yingyuankai # @Email : yingyuankai@aliyun.com # @File : __init__.py from .bert_tokenizer import BertTokenizer from .tokenizer_base import BaseTokenizer from .xlnet_tokenizer import XlnetTokenizer from .gpt_tokenizer import CPMTokenizer
30.8
43
0.746753
from .bert_tokenizer import BertTokenizer from .tokenizer_base import BaseTokenizer from .xlnet_tokenizer import XlnetTokenizer from .gpt_tokenizer import CPMTokenizer
true
true
f7153af43ab719b288088a86b292514bb5b4ec0a
2,233
py
Python
gcalcli/authorization.py
kdrabek/gcalcli
c05d84ea14a0e85f3689efc6ddd258de33c76e95
[ "MIT" ]
null
null
null
gcalcli/authorization.py
kdrabek/gcalcli
c05d84ea14a0e85f3689efc6ddd258de33c76e95
[ "MIT" ]
null
null
null
gcalcli/authorization.py
kdrabek/gcalcli
c05d84ea14a0e85f3689efc6ddd258de33c76e95
[ "MIT" ]
null
null
null
import json from pathlib import Path from google.oauth2.credentials import Credentials from google_auth_oauthlib.flow import Flow # set of permissions for particular API SCOPES = 'https://www.googleapis.com/auth/calendar' CONFIG_PATH = Path.home() / '.gcalcli' CREDENTIALS_PATH = CONFIG_PATH / 'credentials.json' TOKEN...
27.9125
74
0.695477
import json from pathlib import Path from google.oauth2.credentials import Credentials from google_auth_oauthlib.flow import Flow SCOPES = 'https://www.googleapis.com/auth/calendar' CONFIG_PATH = Path.home() / '.gcalcli' CREDENTIALS_PATH = CONFIG_PATH / 'credentials.json' TOKEN_PATH = CONFIG_PATH / 'token.json' de...
true
true
f7153b1e77bb06edb0103c75b470f2e4165017f6
4,895
py
Python
snpdb/views/views_autocomplete.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
5
2021-01-14T03:34:42.000Z
2022-03-07T15:34:18.000Z
snpdb/views/views_autocomplete.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
551
2020-10-19T00:02:38.000Z
2022-03-30T02:18:22.000Z
snpdb/views/views_autocomplete.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
null
null
null
from abc import ABC from django.contrib.auth.models import User from django.db.models.functions import Length from django.db.models.query_utils import Q from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from django.views.decorators.vary import vary_on_cookie fro...
37.083333
116
0.756486
from abc import ABC from django.contrib.auth.models import User from django.db.models.functions import Length from django.db.models.query_utils import Q from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from django.views.decorators.vary import vary_on_cookie fro...
true
true
f7153bf91286bae42e9a55fce4714d6889e21164
233
py
Python
conexao.py
gabrielmonzato20/ProjetoCp
a0d6a3204487d653669284f651c911c09386d626
[ "Apache-2.0" ]
null
null
null
conexao.py
gabrielmonzato20/ProjetoCp
a0d6a3204487d653669284f651c911c09386d626
[ "Apache-2.0" ]
null
null
null
conexao.py
gabrielmonzato20/ProjetoCp
a0d6a3204487d653669284f651c911c09386d626
[ "Apache-2.0" ]
1
2018-09-19T12:28:08.000Z
2018-09-19T12:28:08.000Z
def mensagem(): print('Criando no python') def tabuada(): n = int(input('Digite um número que deseja ver a tabuada: ')) for x in range (1,11): print('{} X {:2} = {:2}'.format(n, x, n*x)) mensagem() tabuada()
21.181818
65
0.562232
def mensagem(): print('Criando no python') def tabuada(): n = int(input('Digite um número que deseja ver a tabuada: ')) for x in range (1,11): print('{} X {:2} = {:2}'.format(n, x, n*x)) mensagem() tabuada()
true
true
f7153c21736cca53d92914b2228e578ffc94a1f1
13,114
py
Python
projects/g3h1-cp-fml-interpreter/src/lexer/dfa.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h1-cp-fml-interpreter/src/lexer/dfa.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h1-cp-fml-interpreter/src/lexer/dfa.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
from enum import unique, Enum class DFA: def __init__(self, source_data): if type(source_data) != dict: raise TypeError('第 1 个参数期望 {arg_type_expect} 类型,却接收到类型 {arg_type} '.format( arg_type_expect='dict', arg_type=str(type(source_data)) )) if type(source_da...
34.970667
108
0.416959
from enum import unique, Enum class DFA: def __init__(self, source_data): if type(source_data) != dict: raise TypeError('第 1 个参数期望 {arg_type_expect} 类型,却接收到类型 {arg_type} '.format( arg_type_expect='dict', arg_type=str(type(source_data)) )) if type(source_da...
true
true
f7153c4f5db58c6522a6d97004d7dcdde2bcc24c
262
py
Python
src/core/migrations/0050_merge_20190212_0720.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
src/core/migrations/0050_merge_20190212_0720.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
src/core/migrations/0050_merge_20190212_0720.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2019-02-12 07:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0049_merge_20190212_0544'), ('core', '0049_article_head'), ] operations = [ ]
17.466667
47
0.633588
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0049_merge_20190212_0544'), ('core', '0049_article_head'), ] operations = [ ]
true
true
f7153d3e5f303fac4afc1dc66b303035bd382d50
969
py
Python
doc/api/epydoc/build.py
swamper123/pymodbus
7dfac6f19c60d3aa50a168ff82db88204dfb3a30
[ "BSD-3-Clause" ]
null
null
null
doc/api/epydoc/build.py
swamper123/pymodbus
7dfac6f19c60d3aa50a168ff82db88204dfb3a30
[ "BSD-3-Clause" ]
1
2020-10-29T12:01:38.000Z
2022-03-21T02:39:59.000Z
doc/api/epydoc/build.py
swamper123/pymodbus
7dfac6f19c60d3aa50a168ff82db88204dfb3a30
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 ''' Epydoc API Runner ------------------ Using pkg_resources, we attempt to see if epydoc is installed, if so, we use its cli program to compile the documents ''' try: import sys, os, shutil import pkg_resources pkg_resources.require("epydoc") from epydoc.cli import cli sys....
24.846154
62
0.603715
try: import sys, os, shutil import pkg_resources pkg_resources.require("epydoc") from epydoc.cli import cli sys.argv = '''epydoc.py pymodbus --html --simple-term --quiet --include-log --graph=all --docformat=plaintext --debug --exclude=._ --e...
true
true
f7153eb3b8319ab7b8fbdefb6c2a256421b0226c
256
py
Python
submissions/joi2012yo/a.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
1
2021-05-10T01:16:28.000Z
2021-05-10T01:16:28.000Z
submissions/joi2012yo/a.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
3
2021-05-11T06:14:15.000Z
2021-06-19T08:18:36.000Z
submissions/joi2012yo/a.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
null
null
null
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) p = min([int(readline()) for _ in range(3)]) g = min([int(readline()) for _ in range(2)]) print(p + g - 50)
25.6
44
0.699219
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) p = min([int(readline()) for _ in range(3)]) g = min([int(readline()) for _ in range(2)]) print(p + g - 50)
true
true
f7153eeb0752afecb51dc681dd7cab991cb43202
1,722
py
Python
Model.py
Giorgiobientinesi/Workshop2
f454499d4befdb705b4672be25d8698ef2b37116
[ "MIT" ]
null
null
null
Model.py
Giorgiobientinesi/Workshop2
f454499d4befdb705b4672be25d8698ef2b37116
[ "MIT" ]
null
null
null
Model.py
Giorgiobientinesi/Workshop2
f454499d4befdb705b4672be25d8698ef2b37116
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.preprocessing import OneHotEncoder from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_absolute_error df = pd.read_csv("Airbnb-cleaned.csv") df.columns del df["Unnamed: 0"] df1 = df[['neighbourhood',...
31.309091
91
0.702091
import pandas as pd from sklearn.preprocessing import OneHotEncoder from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_absolute_error df = pd.read_csv("Airbnb-cleaned.csv") df.columns del df["Unnamed: 0"] df1 = df[['neighbourhood',...
true
true
f7153f357c7a65ac30f9f3d65e5017cda2f97c38
1,185
py
Python
scrython/rulings/arena.py
vtbassmatt/Scrython
49fd9bd112e0f552a4310ac81fdb3f2b9e2a3976
[ "MIT" ]
null
null
null
scrython/rulings/arena.py
vtbassmatt/Scrython
49fd9bd112e0f552a4310ac81fdb3f2b9e2a3976
[ "MIT" ]
null
null
null
scrython/rulings/arena.py
vtbassmatt/Scrython
49fd9bd112e0f552a4310ac81fdb3f2b9e2a3976
[ "MIT" ]
null
null
null
from .rulings_object import RulingsObject class Arena(RulingsObject): """ cards/mtgo/:id/rulings Gets the ruling of a card by the Arena Id. Args: id (string): The arena id of the card you want rulings for. format (string, optional): Returns data in the specified method. Defaults to JS...
33.857143
129
0.62616
from .rulings_object import RulingsObject class Arena(RulingsObject): def __init__(self, **kwargs): if kwargs.get('id') is None: raise TypeError('No id provided to search by') self.url = 'cards/arena/{}/rulings?'.format(str(kwargs.get('id'))) super(Arena, self).__init__(self.ur...
true
true
f715404495e00bc2fc41e3195c1aac56c832e314
2,319
py
Python
survos2/improc/regions/ccl.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
4
2017-10-10T14:47:16.000Z
2022-01-14T05:57:50.000Z
survos2/improc/regions/ccl.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
1
2022-01-11T21:11:12.000Z
2022-01-12T08:22:34.000Z
survos2/improc/regions/ccl.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
2
2018-03-06T06:31:29.000Z
2019-03-04T03:33:18.000Z
import logging import os.path as op import numpy as np import pycuda.driver as cuda import pycuda.gpuarray as gpuarray import pycuda.autoinit from pycuda.compiler import SourceModule from ..improc_types import int3 from ..utils import gpuregion, cpuregion from ..cuda import asgpuarray, grid_kernel_conf...
29.35443
88
0.675722
import logging import os.path as op import numpy as np import pycuda.driver as cuda import pycuda.gpuarray as gpuarray import pycuda.autoinit from pycuda.compiler import SourceModule from ..improc_types import int3 from ..utils import gpuregion, cpuregion from ..cuda import asgpuarray, grid_kernel_conf...
true
true
f71540c4bd66f93fc57f13dd1acee11e0731db26
1,753
py
Python
fyle/platform/platform.py
fylein/fyle-platform-sdk-py
dcf0f1de25e95e41ec213dc97c09196203090d01
[ "MIT" ]
1
2022-03-08T09:43:30.000Z
2022-03-08T09:43:30.000Z
fyle/platform/platform.py
fylein/fyle-platform-sdk-py
dcf0f1de25e95e41ec213dc97c09196203090d01
[ "MIT" ]
2
2021-11-22T09:12:12.000Z
2022-03-17T10:13:40.000Z
fyle/platform/platform.py
fylein/fyle-platform-sdk-py
dcf0f1de25e95e41ec213dc97c09196203090d01
[ "MIT" ]
null
null
null
""" Fyle Platform SDK Class """ from .apis import v1beta from .globals.config import config from .internals.auth import Auth class Platform(Auth): """The main class which creates a connection with Fyle APIs using OAuth2 authentication (refresh token grant type). Parameters: client_id (str): ...
27.390625
87
0.64575
from .apis import v1beta from .globals.config import config from .internals.auth import Auth class Platform(Auth): def __init__(self, server_url, token_url, client_id, client_secret, refresh_token): super().__init__() self.__server_url = server_url self.__token_url = token_url ...
true
true