hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f702088c09ef362dbf362546e58d15f744e9d59b
3,465
py
Python
great_expectations/render/renderer/content_block/exception_list_content_block.py
arunnthevapalan/great_expectations
97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1
[ "Apache-2.0" ]
1
2022-03-16T22:09:49.000Z
2022-03-16T22:09:49.000Z
great_expectations/render/renderer/content_block/exception_list_content_block.py
draev/great_expectations
317e15ee7e50f6e0d537b62154177440f33b795d
[ "Apache-2.0" ]
null
null
null
great_expectations/render/renderer/content_block/exception_list_content_block.py
draev/great_expectations
317e15ee7e50f6e0d537b62154177440f33b795d
[ "Apache-2.0" ]
null
null
null
from great_expectations.render.renderer.content_block.content_block import ( ContentBlockRenderer, ) from great_expectations.render.types import ( RenderedBulletListContent, RenderedStringTemplateContent, ) class ExceptionListContentBlockRenderer(ContentBlockRenderer): """Render a bullet list of excep...
35
95
0.529582
from great_expectations.render.renderer.content_block.content_block import ( ContentBlockRenderer, ) from great_expectations.render.types import ( RenderedBulletListContent, RenderedStringTemplateContent, ) class ExceptionListContentBlockRenderer(ContentBlockRenderer): _rendered_component_type = Rend...
true
true
f70209989cb8b53631a4098886ce234e8cb0bf20
7,330
py
Python
plugins/email_requests/qt.py
GetAywa/electrum-aywa
07a548bd14cdf563da49c1f1e52644b833ca972e
[ "MIT" ]
null
null
null
plugins/email_requests/qt.py
GetAywa/electrum-aywa
07a548bd14cdf563da49c1f1e52644b833ca972e
[ "MIT" ]
null
null
null
plugins/email_requests/qt.py
GetAywa/electrum-aywa
07a548bd14cdf563da49c1f1e52644b833ca972e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
34.413146
103
0.658663
import time import threading import base64 from functools import partial import smtplib import imaplib import email from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email.encoders import encode_base64 from PyQt5.QtGui import * from PyQt5.QtCore import *...
true
true
f70209b0d9d20aa5537d8749c49f57d989ad1359
8,688
py
Python
tests/test_manage.py
zhongtianxie/fm-orchestrator
5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f
[ "MIT" ]
null
null
null
tests/test_manage.py
zhongtianxie/fm-orchestrator
5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f
[ "MIT" ]
null
null
null
tests/test_manage.py
zhongtianxie/fm-orchestrator
5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT from __future__ import absolute_import from mock import patch import pytest from module_build_service import app from module_build_service.common import models from module_build_service.common.models import BUILD_STATES, ModuleBuild from module_build_service.mana...
37.938865
98
0.635474
from __future__ import absolute_import from mock import patch import pytest from module_build_service import app from module_build_service.common import models from module_build_service.common.models import BUILD_STATES, ModuleBuild from module_build_service.manage import manager_wrapper, retire from module_build_s...
true
true
f7020a1ad7976fedcd2915bb0bdd7f25195e1ef1
19,822
py
Python
python2.7/site-packages/twisted/internet/protocol.py
84KaliPleXon3/sslstrip-hsts-openwrt
f875ded48078a3ed84bffef1e69dcbeaf2e77ae3
[ "MIT" ]
4
2020-10-31T19:52:05.000Z
2021-09-22T11:39:27.000Z
python2.7/site-packages/twisted/internet/protocol.py
84KaliPleXon3/sslstrip-hsts-openwrt
f875ded48078a3ed84bffef1e69dcbeaf2e77ae3
[ "MIT" ]
null
null
null
python2.7/site-packages/twisted/internet/protocol.py
84KaliPleXon3/sslstrip-hsts-openwrt
f875ded48078a3ed84bffef1e69dcbeaf2e77ae3
[ "MIT" ]
2
2020-02-27T08:28:35.000Z
2020-09-13T12:39:26.000Z
# -*- test-case-name: twisted.test.test_factories -*- # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Standard implementations of Twisted protocol-related interfaces. Start here if you are looking to write a new protocol implementation for Twisted. The Protocol class contains ...
31.314376
104
0.644486
import random from zope.interface import implements from twisted.python import log, failure, components from twisted.internet import interfaces, error, defer class Factory: implements(interfaces.IProtocolFactory) protocol = None numPorts = 0 noisy = True def doStart(self): ...
true
true
f7020c7e44ed4271ac16291a8b653971cdef5868
1,944
py
Python
plugins/asciidoc_reader/asciidoc_reader.py
craigriley39/pelican-site
920d484feb67a2bd7bf9e3576edea7fa3325af2e
[ "MIT" ]
null
null
null
plugins/asciidoc_reader/asciidoc_reader.py
craigriley39/pelican-site
920d484feb67a2bd7bf9e3576edea7fa3325af2e
[ "MIT" ]
null
null
null
plugins/asciidoc_reader/asciidoc_reader.py
craigriley39/pelican-site
920d484feb67a2bd7bf9e3576edea7fa3325af2e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ AsciiDoc Reader =============== This plugin allows you to use AsciiDoc to write your posts. File extension should be ``.asc``, ``.adoc``, or ``asciidoc``. """ from pelican.readers import BaseReader from pelican.utils import pelican_open from pelican import signals import six try: # a...
29.454545
78
0.656893
from pelican.readers import BaseReader from pelican.utils import pelican_open from pelican import signals import six try: from .asciidocapi import AsciiDocAPI, AsciiDocError # AsciiDocAPI class checks for asciidoc.py AsciiDocAPI() except: asciidoc_enabled = False else: asciidoc_enabled = Tru...
true
true
f7020d0e7d8612087a21fa0bdd02292f49996850
487
py
Python
mysite/blog/migrations/0004_auto_20190813_2004.py
wuxiaobai24/django-blog
6247732f1a4666d18057bb1341a3d7f7e5685a07
[ "MIT" ]
null
null
null
mysite/blog/migrations/0004_auto_20190813_2004.py
wuxiaobai24/django-blog
6247732f1a4666d18057bb1341a3d7f7e5685a07
[ "MIT" ]
null
null
null
mysite/blog/migrations/0004_auto_20190813_2004.py
wuxiaobai24/django-blog
6247732f1a4666d18057bb1341a3d7f7e5685a07
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-13 12:04 from django.db import migrations import mdeditor.fields class Migration(migrations.Migration): dependencies = [ ('blog', '0003_post_clicks'), ] operations = [ migrations.RemoveField( model_name='post', name='excerpt...
20.291667
48
0.564682
from django.db import migrations import mdeditor.fields class Migration(migrations.Migration): dependencies = [ ('blog', '0003_post_clicks'), ] operations = [ migrations.RemoveField( model_name='post', name='excerpt', ), migrations.AlterField( ...
true
true
f7020d1de12f52758b00890d55a652104a297a62
1,163
py
Python
tests/urls.py
rcmarron/django-rest-framework-passwordless
869e9dfc6532071b5e64bff956ae9d2938ecf2bd
[ "MIT" ]
1
2018-06-07T19:51:53.000Z
2018-06-07T19:51:53.000Z
tests/urls.py
rcmarron/django-rest-framework-passwordless
869e9dfc6532071b5e64bff956ae9d2938ecf2bd
[ "MIT" ]
null
null
null
tests/urls.py
rcmarron/django-rest-framework-passwordless
869e9dfc6532071b5e64bff956ae9d2938ecf2bd
[ "MIT" ]
1
2019-07-01T13:59:51.000Z
2019-07-01T13:59:51.000Z
from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from drfpasswordless.views import (ObtainEmailCallbackToken, ObtainMobileCallbackToken, ObtainAuthTokenFromCallbackToken, ...
64.611111
111
0.648323
from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from drfpasswordless.views import (ObtainEmailCallbackToken, ObtainMobileCallbackToken, ObtainAuthTokenFromCallbackToken, ...
true
true
f7020d653fddccea65982e36062192b1b90e0f46
1,433
py
Python
scripts/get_relative_lib_dir.py
xiaobai/swift-lldb
9238527ce430e6837108a16d2a91b147551fb83c
[ "Apache-2.0" ]
765
2015-12-03T16:44:59.000Z
2022-03-07T12:41:10.000Z
scripts/get_relative_lib_dir.py
DalavanCloud/lldb
e913eaf2468290fb94c767d474d611b41a84dd69
[ "Apache-2.0" ]
1,815
2015-12-11T23:56:05.000Z
2020-01-10T19:28:43.000Z
scripts/get_relative_lib_dir.py
DalavanCloud/lldb
e913eaf2468290fb94c767d474d611b41a84dd69
[ "Apache-2.0" ]
284
2015-12-03T16:47:25.000Z
2022-03-12T05:39:48.000Z
import distutils.sysconfig import os import platform import re import sys def get_python_relative_libdir(): """Returns the appropropriate python libdir relative to the build directory. @param exe_path the path to the lldb executable @return the python path that needs to be added to sys.path (PYTHONPATH)...
31.844444
80
0.672017
import distutils.sysconfig import os import platform import re import sys def get_python_relative_libdir(): if platform.system() != 'Linux': return None arch_specific_libdir = distutils.sysconfig.get_python_lib(True, False) split_libdir = arch_specific_libdir.split(os.sep...
true
true
f7020d8b7d272efd930e45c2c083cb2f1069c47f
17,979
py
Python
tests/functional/test_host_functions.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
tests/functional/test_host_functions.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
tests/functional/test_host_functions.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
50.22067
100
0.647144
import json import os import random import allure import coreapi import pytest from adcm_client.objects import ADCMClient from adcm_pytest_plugin.utils import get_data_dir from adcm_pytest_plugin import utils from jsonschema import validate from tests.library import errorcodes as err from tests.library i...
true
true
f7020d9bd382de4a25582f4af06d4bd6d33c3802
200
py
Python
sdk/opendp/smartnoise/sql/reader/engine.py
Tecnarca/whitenoise-system
9dfc1425bca77f6e30afe1eea253a6b580bfa847
[ "MIT" ]
1
2021-08-25T09:11:12.000Z
2021-08-25T09:11:12.000Z
sdk/opendp/smartnoise/sql/reader/engine.py
Tecnarca/whitenoise-system
9dfc1425bca77f6e30afe1eea253a6b580bfa847
[ "MIT" ]
null
null
null
sdk/opendp/smartnoise/sql/reader/engine.py
Tecnarca/whitenoise-system
9dfc1425bca77f6e30afe1eea253a6b580bfa847
[ "MIT" ]
1
2021-06-22T15:13:47.000Z
2021-06-22T15:13:47.000Z
class Engine: PANDAS = "pandas" POSTGRES = "postgres" PRESTO = "Presto" SPARK = "Spark" SQL_SERVER = "SqlServer" known_engines = {PANDAS, POSTGRES, PRESTO, SPARK, SQL_SERVER}
22.222222
65
0.64
class Engine: PANDAS = "pandas" POSTGRES = "postgres" PRESTO = "Presto" SPARK = "Spark" SQL_SERVER = "SqlServer" known_engines = {PANDAS, POSTGRES, PRESTO, SPARK, SQL_SERVER}
true
true
f7020da7e2026b64986547ac7c2002542fae98b8
446
py
Python
testsuite/Werror/run.py
3delight/OpenShadingLanguage
74616c3707b2e1c3bd76341ab88c66326d87de13
[ "BSD-2-Clause", "BSD-3-Clause" ]
2
2019-06-19T17:52:37.000Z
2021-08-03T19:40:23.000Z
testsuite/Werror/run.py
3delight/OpenShadingLanguage
74616c3707b2e1c3bd76341ab88c66326d87de13
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
testsuite/Werror/run.py
3delight/OpenShadingLanguage
74616c3707b2e1c3bd76341ab88c66326d87de13
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/imageworks/OpenShadingLanguage # This shader would ordinarily issue a warning. # With -Werror, it should be upgraded to an error. failureok = 1 # this test is expected...
27.875
62
0.746637
failureok = 1 oslcargs = "-Werror"
true
true
f7020dae8a4e3ad127ef76a4e88a2c72338e8dc6
2,139
py
Python
deafwave/simulator/start_simulator.py
SparXalt/deafwave-blockchain
579eac55d55285f750c622bf66a1aa30ed6d949d
[ "Apache-2.0" ]
null
null
null
deafwave/simulator/start_simulator.py
SparXalt/deafwave-blockchain
579eac55d55285f750c622bf66a1aa30ed6d949d
[ "Apache-2.0" ]
null
null
null
deafwave/simulator/start_simulator.py
SparXalt/deafwave-blockchain
579eac55d55285f750c622bf66a1aa30ed6d949d
[ "Apache-2.0" ]
null
null
null
from multiprocessing import freeze_support from pathlib import Path from typing import Dict from deafwave.full_node.full_node import FullNode from deafwave.rpc.full_node_rpc_api import FullNodeRpcApi from deafwave.server.outbound_message import NodeType from deafwave.server.start_service import run_service from deafwa...
31
98
0.726975
from multiprocessing import freeze_support from pathlib import Path from typing import Dict from deafwave.full_node.full_node import FullNode from deafwave.rpc.full_node_rpc_api import FullNodeRpcApi from deafwave.server.outbound_message import NodeType from deafwave.server.start_service import run_service from deafwa...
true
true
f7020dff191d2596228363c19066ef1b0fd24c8b
11,542
py
Python
deepchem/dock/binding_pocket.py
ozgurozkan123/deepchem
7b6248db5f7172ff2a833a1c7c99f48565befe67
[ "MIT" ]
2
2017-10-28T04:21:31.000Z
2018-04-02T08:41:17.000Z
deepchem/dock/binding_pocket.py
ozgurozkan123/deepchem
7b6248db5f7172ff2a833a1c7c99f48565befe67
[ "MIT" ]
null
null
null
deepchem/dock/binding_pocket.py
ozgurozkan123/deepchem
7b6248db5f7172ff2a833a1c7c99f48565befe67
[ "MIT" ]
1
2019-09-03T18:36:31.000Z
2019-09-03T18:36:31.000Z
""" Computes putative binding pockets on protein. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals __author__ = "Bharath Ramsundar" __copyright__ = "Copyright 2017, Stanford University" __license__ = "MIT" import os import tempfile import numpy as np fr...
38.092409
122
0.692861
from __future__ import division from __future__ import print_function from __future__ import unicode_literals __author__ = "Bharath Ramsundar" __copyright__ = "Copyright 2017, Stanford University" __license__ = "MIT" import os import tempfile import numpy as np from subprocess import call from scipy.spatial import Co...
true
true
f7020e4a4571ee1d2ea14fbea0a4245dd8daf392
10,826
py
Python
tensorflow/python/saved_model/load_test.py
shanyi15/tensorflow
ebb3429856441149e41388dfbea59496f8dbf17b
[ "Apache-2.0" ]
1
2020-09-01T03:03:57.000Z
2020-09-01T03:03:57.000Z
tensorflow/python/saved_model/load_test.py
shanyi15/tensorflow
ebb3429856441149e41388dfbea59496f8dbf17b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/saved_model/load_test.py
shanyi15/tensorflow
ebb3429856441149e41388dfbea59496f8dbf17b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.044025
80
0.691391
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tempfile from tensorflow.python.eager import backprop from tensorflow.python.eager import def_function from tensorflow.python.eager import test from tensorflow.python.framework ...
true
true
f7020e785ead3105ee3e34b471b7a5fcf8a92780
1,322
py
Python
Login.py
npcoder2k14/Login-using-Selenium
047fa60e7705614d809314388591a9bd1ee68481
[ "MIT" ]
1
2016-05-28T06:51:16.000Z
2016-05-28T06:51:16.000Z
Login.py
npcoder2k14/Login-using-Selenium
047fa60e7705614d809314388591a9bd1ee68481
[ "MIT" ]
null
null
null
Login.py
npcoder2k14/Login-using-Selenium
047fa60e7705614d809314388591a9bd1ee68481
[ "MIT" ]
null
null
null
from selenium import webdriver import time from bs4 import BeautifulSoup import requests from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver = webdriver.PhantomJS() driver.set_window_size(1120,550) d...
30.045455
70
0.723147
from selenium import webdriver import time from bs4 import BeautifulSoup import requests from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver = webdriver.PhantomJS() driver.set_window_size(1120,550) d...
true
true
f7020e806b61d3b1b2fd2eb73b1d37b9c9465b3f
13,166
py
Python
zuo/bert/tokenization.py
joytianya/google_bert
0b6ef3ec27031928adb727ad3f53e47aea6954b6
[ "Apache-2.0" ]
438
2019-10-16T08:30:05.000Z
2022-03-30T07:59:52.000Z
PyCLUE/utils/classifier_utils/tokenization.py
yyht/PyCLUE
06f131241163a745747da33c5f563abe4413897b
[ "MIT" ]
37
2019-10-21T02:55:21.000Z
2021-09-27T02:18:36.000Z
PyCLUE/utils/classifier_utils/tokenization.py
yyht/PyCLUE
06f131241163a745747da33c5f563abe4413897b
[ "MIT" ]
110
2019-10-18T02:28:11.000Z
2022-03-18T16:40:08.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
32.751244
861
0.632159
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import re import unicodedata import six import tensorflow as tf def validate_case_matches_checkpoint(do_lower_case, init_checkpoint): # we have to heuristically d...
true
true
f7020e83e9b4b451e496d6aadff5e7867e1489d5
1,733
py
Python
matrix/inverse_of_matrix.py
hank-chou/python
a9f729fa263bce599d2774f3f6afb5a18bcc9862
[ "MIT" ]
11
2021-02-18T04:53:44.000Z
2022-01-16T10:57:39.000Z
matrix/inverse_of_matrix.py
hank-chou/python
a9f729fa263bce599d2774f3f6afb5a18bcc9862
[ "MIT" ]
162
2021-03-09T01:52:11.000Z
2022-03-12T01:09:07.000Z
matrix/inverse_of_matrix.py
hank-chou/python
a9f729fa263bce599d2774f3f6afb5a18bcc9862
[ "MIT" ]
8
2021-02-18T05:12:34.000Z
2022-03-06T19:02:14.000Z
from __future__ import annotations from decimal import Decimal def inverse_of_matrix(matrix: list[list[float]]) -> list[list[float]]: """ A matrix multiplied with its inverse gives the identity matrix. This function finds the inverse of a 2x2 matrix. If the determinant of a matrix is 0, its inverse d...
42.268293
96
0.639931
from __future__ import annotations from decimal import Decimal def inverse_of_matrix(matrix: list[list[float]]) -> list[list[float]]: D = Decimal determinant = D(matrix[0][0]) * D(matrix[1][1]) - D(matrix[1][0]) * D(matrix[0][1]) if determinant == 0: raise ValueError("This matrix has no i...
true
true
f7020f0b66f99dc8aa38190ae79b0a848af67220
289
py
Python
tests/test_binder.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
6
2021-03-27T15:25:00.000Z
2021-08-23T06:29:33.000Z
tests/test_binder.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
4
2020-10-23T09:15:09.000Z
2021-08-24T03:33:59.000Z
tests/test_binder.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
null
null
null
# Copyright (c) Ye Liu. All rights reserved. import nncore def test_bind_getter(): @nncore.bind_getter('name', 'depth') class Backbone: _name = 'ResNet' _depth = 50 backbone = Backbone() assert backbone.name == 'ResNet' assert backbone.depth == 50
18.0625
44
0.629758
import nncore def test_bind_getter(): @nncore.bind_getter('name', 'depth') class Backbone: _name = 'ResNet' _depth = 50 backbone = Backbone() assert backbone.name == 'ResNet' assert backbone.depth == 50
true
true
f7020f18b1fea83efb1c2d65e0ce4621434dafd7
3,395
py
Python
blog/apps/users/migrations/0001_initial.py
panchaoco/blog-py
ae4c66080c40024d5bef463c2827c5bf71881786
[ "Apache-2.0" ]
null
null
null
blog/apps/users/migrations/0001_initial.py
panchaoco/blog-py
ae4c66080c40024d5bef463c2827c5bf71881786
[ "Apache-2.0" ]
6
2021-03-18T23:09:11.000Z
2022-03-11T23:43:20.000Z
blog/apps/users/migrations/0001_initial.py
panchaoco/blog-py
ae4c66080c40024d5bef463c2827c5bf71881786
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.4 on 2019-03-24 19:19 import datetime import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_u...
67.9
329
0.658616
import datetime import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operatio...
true
true
f7020fc4a341db582d4d506879dfddefeb0bc378
1,773
py
Python
yoda/main.py
x0y-gt/yoda
1936d3cb93f4e7997bafbabeee62aebb875faace
[ "MIT" ]
null
null
null
yoda/main.py
x0y-gt/yoda
1936d3cb93f4e7997bafbabeee62aebb875faace
[ "MIT" ]
null
null
null
yoda/main.py
x0y-gt/yoda
1936d3cb93f4e7997bafbabeee62aebb875faace
[ "MIT" ]
null
null
null
import os import click from yoda.ssh.shell import Shell from yoda.ssh.config import importHost # Context obj class Cmd(): def __init__(self): self.verbose = False self.shell = None self.host = None pass_cmd = click.make_pass_decorator(Cmd, ensure=True) class CmdsLoader(click.MultiCommand): _cmdFolder...
26.863636
118
0.688663
import os import click from yoda.ssh.shell import Shell from yoda.ssh.config import importHost class Cmd(): def __init__(self): self.verbose = False self.shell = None self.host = None pass_cmd = click.make_pass_decorator(Cmd, ensure=True) class CmdsLoader(click.MultiCommand): _cmdFolder = os.path.ab...
true
true
f7021005377ccdda8d76009a04d71c7447d772fc
9,807
py
Python
grilops/shapes.py
jaylorch/grilops
6375f1061a4512e18bcee6662939d0e43404db36
[ "MIT" ]
2
2020-01-11T13:34:34.000Z
2021-12-03T02:14:10.000Z
grilops/shapes.py
Skynet0/grilops
7f8cea8fb2b2e7609fe9b5976de90fc2fc23ce13
[ "MIT" ]
null
null
null
grilops/shapes.py
Skynet0/grilops
7f8cea8fb2b2e7609fe9b5976de90fc2fc23ce13
[ "MIT" ]
null
null
null
"""This module supports puzzles that place fixed shape regions into the grid.""" from collections import defaultdict import sys from typing import Dict, List from z3 import ArithRef, Int, IntVal, Or, Solver, PbEq from .fastz3 import fast_and, fast_eq, fast_ne from .geometry import Lattice, Point, Vector from .quadtre...
36.457249
90
0.665239
from collections import defaultdict import sys from typing import Dict, List from z3 import ArithRef, Int, IntVal, Or, Solver, PbEq from .fastz3 import fast_and, fast_eq, fast_ne from .geometry import Lattice, Point, Vector from .quadtree import ExpressionQuadTree HAS_INSTANCE_ID, NOT_HAS_INSTANCE_ID, HAS_SHAPE_T...
true
true
f70211c77ad9a61fdf5449a9356c32742a4ff109
83
py
Python
Delivery Cost Project/venv/lib/python3.9/site-packages/qihoo/Test.py
AttiR/Python-Web_Programming
e2eee2ed829c939cc57fccfafc83c284829b2764
[ "MIT" ]
null
null
null
Delivery Cost Project/venv/lib/python3.9/site-packages/qihoo/Test.py
AttiR/Python-Web_Programming
e2eee2ed829c939cc57fccfafc83c284829b2764
[ "MIT" ]
null
null
null
Delivery Cost Project/venv/lib/python3.9/site-packages/qihoo/Test.py
AttiR/Python-Web_Programming
e2eee2ed829c939cc57fccfafc83c284829b2764
[ "MIT" ]
null
null
null
def Print(): print('you may want to install beautifulsoup4,not beautfulsoup4')
27.666667
69
0.746988
def Print(): print('you may want to install beautifulsoup4,not beautfulsoup4')
true
true
f7021220c83b998331014807d4c2b17801b886a1
299
py
Python
simple1/src/config.py
devvid/flask-boilplate
31310e07cc2db564ad342ea45210cb73dc0dcc54
[ "MIT" ]
null
null
null
simple1/src/config.py
devvid/flask-boilplate
31310e07cc2db564ad342ea45210cb73dc0dcc54
[ "MIT" ]
null
null
null
simple1/src/config.py
devvid/flask-boilplate
31310e07cc2db564ad342ea45210cb73dc0dcc54
[ "MIT" ]
null
null
null
from os.path import abspath, dirname, join from os import environ, path _cwd = dirname(abspath(__file__)) basedir = path.abspath(path.dirname(__file__)) class BaseConfiguration(object): DEBUG = True SECRET_KEY = 'Test' CORS = ["http://localhost:4200", "http://127.0.0.1:5000"]
29.9
61
0.688963
from os.path import abspath, dirname, join from os import environ, path _cwd = dirname(abspath(__file__)) basedir = path.abspath(path.dirname(__file__)) class BaseConfiguration(object): DEBUG = True SECRET_KEY = 'Test' CORS = ["http://localhost:4200", "http://127.0.0.1:5000"]
true
true
f702139ebf7fda464b890e2a2645a8000c100326
895
py
Python
google_safe_browsing/komand_google_safe_browsing/util/objects.py
GreyNoise-Intelligence/insightconnect-plugins
2ba3121d42fd96e1267bb095bc76b962678c1f56
[ "MIT" ]
null
null
null
google_safe_browsing/komand_google_safe_browsing/util/objects.py
GreyNoise-Intelligence/insightconnect-plugins
2ba3121d42fd96e1267bb095bc76b962678c1f56
[ "MIT" ]
null
null
null
google_safe_browsing/komand_google_safe_browsing/util/objects.py
GreyNoise-Intelligence/insightconnect-plugins
2ba3121d42fd96e1267bb095bc76b962678c1f56
[ "MIT" ]
null
null
null
# File to hold all objects to ease construction of JSON payload. # Non-PEP8 property declaration used as JSON serializing is 1:1, eg. "clientId = clientId", not "client_id = clientId" class Client(object): clientId = "" clientVersion = "0.0.1" def __init__(self, client_id, client_version="0.0.1"): ...
28.870968
118
0.697207
class Client(object): clientId = "" clientVersion = "0.0.1" def __init__(self, client_id, client_version="0.0.1"): self.clientId = client_id self.clientVersion = client_version class ThreatEntry(object): def __init__(self, url): self.url = url class ThreatInfo(object): ...
true
true
f70214d382ae03efdb4a7b2d43a33a02aafbf03c
16,363
py
Python
jill/install.py
KronosTheLate/jill.py
3b2a29e263ed712f54b0ad2a103083aa2f8045bb
[ "MIT" ]
162
2020-01-18T18:06:56.000Z
2022-03-28T22:55:15.000Z
jill/install.py
KronosTheLate/jill.py
3b2a29e263ed712f54b0ad2a103083aa2f8045bb
[ "MIT" ]
106
2020-01-20T05:24:19.000Z
2022-02-23T06:26:53.000Z
jill/install.py
KronosTheLate/jill.py
3b2a29e263ed712f54b0ad2a103083aa2f8045bb
[ "MIT" ]
19
2020-07-21T03:10:20.000Z
2022-03-22T17:30:28.000Z
from .utils.defaults import default_depot_path, default_install_dir, default_symlink_dir from .utils.filters import f_major_version, f_minor_version from .utils import query_yes_no from .utils import current_architecture, current_system, current_libc from .utils import latest_version from .utils import DmgMounter, TarM...
39.524155
103
0.610829
from .utils.defaults import default_depot_path, default_install_dir, default_symlink_dir from .utils.filters import f_major_version, f_minor_version from .utils import query_yes_no from .utils import current_architecture, current_system, current_libc from .utils import latest_version from .utils import DmgMounter, TarM...
true
true
f7021558695aa1fdcaa5b4d0bb723146eff9bfc1
9,127
py
Python
ec2_compare/internal/instance_type/a.py
weldpua2008/aws.ec2.compare
5149fc4c7cb42f4d7df1930ed8a06750155fe578
[ "Apache-2.0" ]
null
null
null
ec2_compare/internal/instance_type/a.py
weldpua2008/aws.ec2.compare
5149fc4c7cb42f4d7df1930ed8a06750155fe578
[ "Apache-2.0" ]
null
null
null
ec2_compare/internal/instance_type/a.py
weldpua2008/aws.ec2.compare
5149fc4c7cb42f4d7df1930ed8a06750155fe578
[ "Apache-2.0" ]
1
2021-12-15T11:58:22.000Z
2021-12-15T11:58:22.000Z
# Automatically generated # pylint: disable=all get = [{'SupportedArchitectures': ['arm64'], 'SustainedClockSpeedInGhz': 2.3, 'DefaultVCpus': 1, 'DefaultCores': 1, 'DefaultThreadsPerCore': 1, 'ValidCores': [1], 'ValidThreadsPerCore': [1], 'SizeInMiB': 2048, 'EbsOptimizedSupport': 'default', 'EncryptionSupport': 'supp...
760.583333
8,938
0.739016
get = [{'SupportedArchitectures': ['arm64'], 'SustainedClockSpeedInGhz': 2.3, 'DefaultVCpus': 1, 'DefaultCores': 1, 'DefaultThreadsPerCore': 1, 'ValidCores': [1], 'ValidThreadsPerCore': [1], 'SizeInMiB': 2048, 'EbsOptimizedSupport': 'default', 'EncryptionSupport': 'supported', 'NetworkPerformance': 'Up to 10 Gigabi...
true
true
f70215af683529cb3b43d00b6d7dc7a40230ca48
4,623
py
Python
rlpy/gradnet/samples/single_agent/single_agent_ttt_env.py
imandr/RLpy
f01cf7af47b6054e4e52d663ceafc463df6f6166
[ "BSD-3-Clause" ]
null
null
null
rlpy/gradnet/samples/single_agent/single_agent_ttt_env.py
imandr/RLpy
f01cf7af47b6054e4e52d663ceafc463df6f6166
[ "BSD-3-Clause" ]
null
null
null
rlpy/gradnet/samples/single_agent/single_agent_ttt_env.py
imandr/RLpy
f01cf7af47b6054e4e52d663ceafc463df6f6166
[ "BSD-3-Clause" ]
null
null
null
# # Tic Tac Toe # import numpy as np from gym import spaces WinMasks = [ [ [1,0,0], [1,0,0], [1,0,0], ], [ [0,1,0], [0,1,0], [0,1,0], ], [ [0,0,1], [0,0,1], [0,0,1], ], [ [1,1,1], [0,0,0], ...
24.590426
119
0.430889
import numpy as np from gym import spaces WinMasks = [ [ [1,0,0], [1,0,0], [1,0,0], ], [ [0,1,0], [0,1,0], [0,1,0], ], [ [0,0,1], [0,0,1], [0,0,1], ], [ [1,1,1], [0,0,0], [0,0,0], ],...
true
true
f7021680a650fbf392533e7a3c5f721b93c96e14
32,599
py
Python
contrib/script/py/mmp/mmp_mcss_objects.py
michaelweiss092/LillyMol
a2b7d1d8a07ef338c754a0a2e3b2624aac694cc9
[ "Apache-2.0" ]
53
2018-06-01T13:16:15.000Z
2022-02-23T21:04:28.000Z
contrib/script/py/mmp/mmp_mcss_objects.py
michaelweiss092/LillyMol
a2b7d1d8a07ef338c754a0a2e3b2624aac694cc9
[ "Apache-2.0" ]
19
2018-08-14T13:43:18.000Z
2021-09-24T12:53:11.000Z
contrib/script/py/mmp/mmp_mcss_objects.py
michaelweiss092/LillyMol
a2b7d1d8a07ef338c754a0a2e3b2624aac694cc9
[ "Apache-2.0" ]
19
2018-10-23T19:41:01.000Z
2022-02-17T08:14:00.000Z
################################################################### """ Summary: Class and Methods for deriving MCSS based MMP's About: Derive a matched pair based MCSS from a pair molecules To do: - extend the method enumerate_fragment_properties to also enumerate self.mol_smi_dict as this would allow th...
53.006504
183
0.573668
+ "," out_string = out_string + str(sum(input_list[0])) + "," + ctx_smi + "," out_string = out_string + str(self.refsmi_dict[input_list[2]]) + "," \ + str(self.refsmi_dict[input_list[3]]) out_string += "\n" return out_string ...
true
true
f702188d7b7bb22be9247c6cc3e29831e6c5e577
1,344
py
Python
scanner/actions/action.py
Eerovil/magic-cards
b4f18ae9656be58e99fc90146c8ac7473371ce55
[ "MIT" ]
null
null
null
scanner/actions/action.py
Eerovil/magic-cards
b4f18ae9656be58e99fc90146c8ac7473371ce55
[ "MIT" ]
null
null
null
scanner/actions/action.py
Eerovil/magic-cards
b4f18ae9656be58e99fc90146c8ac7473371ce55
[ "MIT" ]
null
null
null
import os import json CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) class Action: def __init__(self, card, config): config.pop("action", None) self.card = card self.config = config def env_vars_for_object(self, config, prefix): env_vars = {} config.pop("...
29.217391
76
0.590774
import os import json CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) class Action: def __init__(self, card, config): config.pop("action", None) self.card = card self.config = config def env_vars_for_object(self, config, prefix): env_vars = {} config.pop("...
true
true
f70218f2b4f389dac4b6b4a28a071cb1c97475d0
5,869
py
Python
office365/sharepoint/tenant/administration/tenant.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
office365/sharepoint/tenant/administration/tenant.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
office365/sharepoint/tenant/administration/tenant.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
from office365.runtime.client_value_collection import ClientValueCollection from office365.runtime.queries.service_operation_query import ServiceOperationQuery from office365.runtime.resource_path import ResourcePath from office365.sharepoint.base_entity import BaseEntity from office365.sharepoint.tenant.administration...
39.655405
116
0.679332
from office365.runtime.client_value_collection import ClientValueCollection from office365.runtime.queries.service_operation_query import ServiceOperationQuery from office365.runtime.resource_path import ResourcePath from office365.sharepoint.base_entity import BaseEntity from office365.sharepoint.tenant.administration...
true
true
f702195bb70c4dc9e85f7b299df907641db11dfa
12,564
py
Python
python/ccxt/async_support/base/exchange.py
roeiba/ccxt
01060e12b20925fe29f1485dcb21b8cf44326d2a
[ "MIT" ]
1
2019-10-30T13:32:54.000Z
2019-10-30T13:32:54.000Z
python/ccxt/async_support/base/exchange.py
roeiba/ccxt
01060e12b20925fe29f1485dcb21b8cf44326d2a
[ "MIT" ]
null
null
null
python/ccxt/async_support/base/exchange.py
roeiba/ccxt
01060e12b20925fe29f1485dcb21b8cf44326d2a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- __version__ = '1.18.1333' # ----------------------------------------------------------------------------- import asyncio import concurrent import socket import time import math import random import certifi import...
41.740864
355
0.610236
__version__ = '1.18.1333' import asyncio import concurrent import socket import time import math import random import certifi import aiohttp import ssl import sys import yarl from ccxt.async_support.base.throttle import throttle from ccxt.base.errors import ExchangeError from ccxt.base.errors import Exchan...
true
true
f70219fcb6e5ca2640cb076239567264444a0e4f
553
py
Python
src/CSVreader.py
Shannon-NJIT/Calculator-Individual
c7dcb961c0f1fa364f9eaa2e85fb371e74646e78
[ "MIT" ]
null
null
null
src/CSVreader.py
Shannon-NJIT/Calculator-Individual
c7dcb961c0f1fa364f9eaa2e85fb371e74646e78
[ "MIT" ]
null
null
null
src/CSVreader.py
Shannon-NJIT/Calculator-Individual
c7dcb961c0f1fa364f9eaa2e85fb371e74646e78
[ "MIT" ]
null
null
null
import csv def ClassFactory(class_name, dictionary): return type(class_name, (object,), dictionary) class CsvReader: def __init__(self, filepath): self.data = [] with open(filepath) as csv_files: csv_data = csv.DictReader(csv_files, delimiter=',') for row in csv_data...
23.041667
63
0.609403
import csv def ClassFactory(class_name, dictionary): return type(class_name, (object,), dictionary) class CsvReader: def __init__(self, filepath): self.data = [] with open(filepath) as csv_files: csv_data = csv.DictReader(csv_files, delimiter=',') for row in csv_data...
true
true
f7021b2241ee6f40086a774d14a70f8306e2ebd9
16,965
py
Python
dashboard/dashboard/pinpoint/models/quest/read_value_test.py
stefb965/catapult
93f9ef7fc26f0c4904ce691856ec579d2eeef824
[ "BSD-3-Clause" ]
null
null
null
dashboard/dashboard/pinpoint/models/quest/read_value_test.py
stefb965/catapult
93f9ef7fc26f0c4904ce691856ec579d2eeef824
[ "BSD-3-Clause" ]
null
null
null
dashboard/dashboard/pinpoint/models/quest/read_value_test.py
stefb965/catapult
93f9ef7fc26f0c4904ce691856ec579d2eeef824
[ "BSD-3-Clause" ]
1
2020-07-24T04:42:31.000Z
2020-07-24T04:42:31.000Z
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import unittest import mock from dashboard.pinpoint.models.quest import read_value from tracing.value import histogram_set from tracing.value i...
35.124224
80
0.696611
import json import unittest import mock from dashboard.pinpoint.models.quest import read_value from tracing.value import histogram_set from tracing.value import histogram as histogram_module from tracing.value.diagnostics import generic_set from tracing.value.diagnostics import reserved_infos _BASE_ARGUMENTS_H...
true
true
f7021c0fb6668b29ae4164901fe3e6cf9296fc62
2,637
py
Python
tests/components/fan/test_init.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/fan/test_init.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/fan/test_init.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for fan platforms.""" import pytest from homeassistant.components.fan import FanEntity class BaseFan(FanEntity): """Implementation of the abstract FanEntity.""" def __init__(self): """Initialize the fan.""" def test_fanentity(): """Test fan entity methods.""" fan = BaseFan() ...
31.023529
63
0.678043
import pytest from homeassistant.components.fan import FanEntity class BaseFan(FanEntity): def __init__(self): def test_fanentity(): fan = BaseFan() assert fan.state == "off" assert fan.preset_modes is None assert fan.supported_features == 0 assert fan.percentage_step == 1 assert fan....
true
true
f7021c9e32ae1eacec61afce8758e91751fe595e
89
py
Python
ynab-api/tests/test_ynab_api.py
mcbobke/python-fun
ecabf87b6d5983c6e2321a15d2f084bf83370b5d
[ "MIT" ]
null
null
null
ynab-api/tests/test_ynab_api.py
mcbobke/python-fun
ecabf87b6d5983c6e2321a15d2f084bf83370b5d
[ "MIT" ]
null
null
null
ynab-api/tests/test_ynab_api.py
mcbobke/python-fun
ecabf87b6d5983c6e2321a15d2f084bf83370b5d
[ "MIT" ]
null
null
null
from ynab_api import __version__ def test_version(): assert __version__ == '0.1.0'
14.833333
33
0.719101
from ynab_api import __version__ def test_version(): assert __version__ == '0.1.0'
true
true
f7021d261117c64403f6ac1fccc17613cd3488bb
4,198
py
Python
vkbottle/__init__.py
mironovmeow/vkbottle
46917c737fb5d3ef0530defe2b48d251e52478cb
[ "MIT" ]
98
2021-08-06T05:31:31.000Z
2022-03-26T03:00:08.000Z
vkbottle/__init__.py
mironovmeow/vkbottle
46917c737fb5d3ef0530defe2b48d251e52478cb
[ "MIT" ]
68
2021-08-04T09:56:12.000Z
2022-03-31T16:23:12.000Z
vkbottle/__init__.py
mironovmeow/vkbottle
46917c737fb5d3ef0530defe2b48d251e52478cb
[ "MIT" ]
66
2021-08-04T09:21:43.000Z
2022-03-15T14:34:56.000Z
from vkbottle_types import GroupTypes from vkbottle_types.events import GroupEventType, UserEventType from .api import ( ABCAPI, API, DEFAULT_REQUEST_VALIDATORS, DEFAULT_RESPONSE_VALIDATORS, ABCRequestRescheduler, ABCRequestValidator, ABCResponseValidator, ABCTokenGenerator, Blockin...
19.990476
67
0.662935
from vkbottle_types import GroupTypes from vkbottle_types.events import GroupEventType, UserEventType from .api import ( ABCAPI, API, DEFAULT_REQUEST_VALIDATORS, DEFAULT_RESPONSE_VALIDATORS, ABCRequestRescheduler, ABCRequestValidator, ABCResponseValidator, ABCTokenGenerator, Blockin...
true
true
f7021e2dd359a7348e9d9d8017c699383f32b80a
39
py
Python
Beginning.py
Vatsal101/AppleDetection
d828616355fe643980385bc4615f26659de28eaa
[ "MIT" ]
null
null
null
Beginning.py
Vatsal101/AppleDetection
d828616355fe643980385bc4615f26659de28eaa
[ "MIT" ]
null
null
null
Beginning.py
Vatsal101/AppleDetection
d828616355fe643980385bc4615f26659de28eaa
[ "MIT" ]
null
null
null
import cv2 as cv image = cv.imread()
13
19
0.666667
import cv2 as cv image = cv.imread()
true
true
f7022030fa7d56ca72d4ea7834e10aac5a5e2e8f
7,132
py
Python
SQLAlchemy-0.9.9/test/dialect/mssql/test_engine.py
Abi1ity/uniclust2.0
c1034eede2425a683712b449d78fdf4d2d5ab414
[ "BSD-3-Clause" ]
null
null
null
SQLAlchemy-0.9.9/test/dialect/mssql/test_engine.py
Abi1ity/uniclust2.0
c1034eede2425a683712b449d78fdf4d2d5ab414
[ "BSD-3-Clause" ]
null
null
null
SQLAlchemy-0.9.9/test/dialect/mssql/test_engine.py
Abi1ity/uniclust2.0
c1034eede2425a683712b449d78fdf4d2d5ab414
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 from sqlalchemy.testing import eq_, engines from sqlalchemy import * from sqlalchemy import exc from sqlalchemy.dialects.mssql import pyodbc, pymssql from sqlalchemy.engine import url from sqlalchemy.testing import fixtures from sqlalchemy import testing from sqlalchemy.testing import assert_raise...
40.522727
74
0.604459
from sqlalchemy.testing import eq_, engines from sqlalchemy import * from sqlalchemy import exc from sqlalchemy.dialects.mssql import pyodbc, pymssql from sqlalchemy.engine import url from sqlalchemy.testing import fixtures from sqlalchemy import testing from sqlalchemy.testing import assert_raises_message from sqlalc...
true
true
f7022071403d4a1eb56b5c1e65d4b9620305dec2
9,537
py
Python
wasd.py
Arisamiga/aiostreams
8f44410ce6c93ca968fed6f09eb71106e3ad200e
[ "BSD-2-Clause" ]
6
2019-09-29T15:01:27.000Z
2022-03-20T18:46:28.000Z
wasd.py
Arisamiga/aiostreams
8f44410ce6c93ca968fed6f09eb71106e3ad200e
[ "BSD-2-Clause" ]
3
2020-08-01T13:46:49.000Z
2021-09-06T18:17:18.000Z
wasd.py
Arisamiga/aiostreams
8f44410ce6c93ca968fed6f09eb71106e3ad200e
[ "BSD-2-Clause" ]
3
2021-03-24T12:31:37.000Z
2022-03-20T18:46:16.000Z
#!python # coding=utf-8 import cfg, cmn, vqw import cookielib, urllib, urllib2, sys, argparse, re, string import simplem3u8 as sm3u8 import simplejson as json from urllib2 import Request, urlopen, URLError from random import random cmnHandler = cmn.cmnHandler() _url_re = re.compile(r""" http(s)?://(\w+.)?wasd\.tv/...
35.719101
214
0.56328
import cfg, cmn, vqw import cookielib, urllib, urllib2, sys, argparse, re, string import simplem3u8 as sm3u8 import simplejson as json from urllib2 import Request, urlopen, URLError from random import random cmnHandler = cmn.cmnHandler() _url_re = re.compile(r""" http(s)?://(\w+.)?wasd\.tv/ (?: chann...
false
true
f70220a64f73af78d376a845924d9ae3730c7b57
589
py
Python
Datacamp Assignments/NLP Skills Track/1. NLP Fundamentals/14_ner_spacy.py
Ali-Parandeh/Data_Science_Playground
c529e9b3692381572de259e7c93938d6611d83da
[ "MIT" ]
null
null
null
Datacamp Assignments/NLP Skills Track/1. NLP Fundamentals/14_ner_spacy.py
Ali-Parandeh/Data_Science_Playground
c529e9b3692381572de259e7c93938d6611d83da
[ "MIT" ]
null
null
null
Datacamp Assignments/NLP Skills Track/1. NLP Fundamentals/14_ner_spacy.py
Ali-Parandeh/Data_Science_Playground
c529e9b3692381572de259e7c93938d6611d83da
[ "MIT" ]
1
2021-03-10T09:40:05.000Z
2021-03-10T09:40:05.000Z
# Import spacy import spacy # Instantiate the English model: nlp nlp = spacy.load('en', tagger=False, parser= False, matcher = False) # Create a new document: doc doc = nlp(article) # Print all of the found entities and their labels for ent in doc.ents: print(ent.label_, ent.text) """ <script.py> output: OR...
19.633333
68
0.665535
import spacy nlp = spacy.load('en', tagger=False, parser= False, matcher = False) doc = nlp(article) for ent in doc.ents: print(ent.label_, ent.text)
true
true
f7022105af9e830f0a6616acaa6e4add128f432c
1,166
py
Python
src/cv/movie_to_image.py
skiteta/processing-util
819637682695ed7a1cb5a5f35df56a487452252a
[ "MIT" ]
null
null
null
src/cv/movie_to_image.py
skiteta/processing-util
819637682695ed7a1cb5a5f35df56a487452252a
[ "MIT" ]
11
2021-12-15T12:09:02.000Z
2022-03-28T12:08:48.000Z
src/cv/movie_to_image.py
skiteta/processing-util
819637682695ed7a1cb5a5f35df56a487452252a
[ "MIT" ]
null
null
null
import glob import cv2 import os def extract_frame(movie_files_dir, out_dir): movie_files = glob.glob(movie_files_dir) if not movie_files: print('movie files are not found.') return for movie_file in movie_files: ext = movie_file.split('.')[-1] if not ext == 'mp4' or not ...
25.911111
77
0.569468
import glob import cv2 import os def extract_frame(movie_files_dir, out_dir): movie_files = glob.glob(movie_files_dir) if not movie_files: print('movie files are not found.') return for movie_file in movie_files: ext = movie_file.split('.')[-1] if not ext == 'mp4' or not ...
true
true
f702222d3dba2c9d49caadf65f84a04d301756c8
9,521
py
Python
ping360_sonar/ping360_sonar/sonar_interface.py
CentraleNantesRobotics/ping360_sonar_python
f461594aa0345a417f5bb711b8f4500fb4b4727d
[ "MIT" ]
4
2019-12-13T20:52:54.000Z
2019-12-20T12:33:03.000Z
ping360_sonar/ping360_sonar/sonar_interface.py
CentraleNantesRobotics/ping360_sonar_python
f461594aa0345a417f5bb711b8f4500fb4b4727d
[ "MIT" ]
9
2019-12-13T20:35:41.000Z
2020-01-09T19:27:56.000Z
ping360_sonar/ping360_sonar/sonar_interface.py
CentraleNantesRobotics/ping360_sonar_python
f461594aa0345a417f5bb711b8f4500fb4b4727d
[ "MIT" ]
1
2020-01-06T08:34:46.000Z
2020-01-06T08:34:46.000Z
#!/usr/bin/env python from ping360_sonar.sensor import Ping360 from numpy import pi, sqrt, tan, cos, sign from brping import definitions class SonarInterface: samplePeriodTickDuration = 25e-9 firmwareMinTransmitDuration = 5 firmwareMaxTransmitDuration = 500 firmwareMaxSamples = 1200 firmwareM...
37.191406
153
0.561286
from ping360_sonar.sensor import Ping360 from numpy import pi, sqrt, tan, cos, sign from brping import definitions class SonarInterface: samplePeriodTickDuration = 25e-9 firmwareMinTransmitDuration = 5 firmwareMaxTransmitDuration = 500 firmwareMaxSamples = 1200 firmwareMinSamplePeriod = 80 ...
true
true
f70222526f54560a524bad79199280aa1ec5f8cb
1,594
py
Python
stko/molecular/conversion/md_analysis.py
stevenbennett96/stko
ee340af4fc549d5a2c3e9cba8360661335efe0fd
[ "MIT" ]
null
null
null
stko/molecular/conversion/md_analysis.py
stevenbennett96/stko
ee340af4fc549d5a2c3e9cba8360661335efe0fd
[ "MIT" ]
null
null
null
stko/molecular/conversion/md_analysis.py
stevenbennett96/stko
ee340af4fc549d5a2c3e9cba8360661335efe0fd
[ "MIT" ]
2
2020-05-08T17:51:25.000Z
2020-05-11T09:03:24.000Z
""" MD Analysis =========== #. :class:`.MDAnalysis` Class for converting a molecule to and back from an MDAnalysis object. """ import logging from ...utilities import WrapperNotInstalledException try: import MDAnalysis as mda except ModuleNotFoundError: mda = None logger = logging.getLogger(__name__) c...
21.540541
70
0.593476
import logging from ...utilities import WrapperNotInstalledException try: import MDAnalysis as mda except ModuleNotFoundError: mda = None logger = logging.getLogger(__name__) class MDAnalysis: def __init__(self): if mda is None: raise WrapperNotInstalledException( ...
true
true
f70223428afca7ece72e103d8ae1e6f89b4c2b23
98
py
Python
Resions.py
alaminskaib/PythonPrograms
0112715d7700a4ebfd0da64a62f8ac20a43f7c79
[ "MIT" ]
2
2019-11-11T17:19:10.000Z
2019-11-11T17:22:46.000Z
Resions.py
alaminskaib/PythonPrograms
0112715d7700a4ebfd0da64a62f8ac20a43f7c79
[ "MIT" ]
null
null
null
Resions.py
alaminskaib/PythonPrograms
0112715d7700a4ebfd0da64a62f8ac20a43f7c79
[ "MIT" ]
null
null
null
def fact (n): if n == 1: return 1 else: return n*fact(n-1) print(fact(5))
14
26
0.469388
def fact (n): if n == 1: return 1 else: return n*fact(n-1) print(fact(5))
true
true
f702242582d845653ca4d57a968a9b4017cef70c
1,332
py
Python
torchlars/wrapper.py
aknckaan/scrl
bff485e27d8785628e35d2cb73dce06f10065b1f
[ "Apache-2.0" ]
null
null
null
torchlars/wrapper.py
aknckaan/scrl
bff485e27d8785628e35d2cb73dce06f10065b1f
[ "Apache-2.0" ]
null
null
null
torchlars/wrapper.py
aknckaan/scrl
bff485e27d8785628e35d2cb73dce06f10065b1f
[ "Apache-2.0" ]
null
null
null
import torch from torch.optim import Optimizer class OptimWrapper(Optimizer): # Mixin class that defines convenient functions for writing Optimizer Wrappers def __init__(self, optim): self.optim = optim def __getstate__(self): return self.optim.__getstate__() def __sets...
24.666667
83
0.643393
import torch from torch.optim import Optimizer class OptimWrapper(Optimizer): def __init__(self, optim): self.optim = optim def __getstate__(self): return self.optim.__getstate__() def __setstate__(self, state): self.optim.__setstate__(state) @property ...
true
true
f702245801d9c882c5f3432541c972a936bf876a
257
py
Python
tests/conftest.py
tonyseek/python-envcfg
bf95998681cb4215fb97810d476f1a2c5a0ed2e5
[ "MIT" ]
29
2015-01-14T06:19:47.000Z
2021-04-15T18:22:26.000Z
tests/conftest.py
tonyseek/python-envcfg
bf95998681cb4215fb97810d476f1a2c5a0ed2e5
[ "MIT" ]
2
2016-04-25T08:15:19.000Z
2016-07-07T09:04:44.000Z
tests/conftest.py
tonyseek/python-envcfg
bf95998681cb4215fb97810d476f1a2c5a0ed2e5
[ "MIT" ]
3
2016-07-07T08:19:31.000Z
2017-10-26T08:16:23.000Z
import os from pytest import fixture @fixture(scope='function') def environ(request): origin = dict(os.environ) @request.addfinalizer def restore_environ(): os.environ.clear() os.environ.update(origin) return os.environ
16.0625
33
0.677043
import os from pytest import fixture @fixture(scope='function') def environ(request): origin = dict(os.environ) @request.addfinalizer def restore_environ(): os.environ.clear() os.environ.update(origin) return os.environ
true
true
f70224df77f3865e09d7c348b171782f2f84676e
2,106
py
Python
src/tests/ftest/pool/destroy_rebuild.py
kmajzero/daos
286aee8fde0d77838be7c2405885a9958c085ffb
[ "BSD-2-Clause-Patent" ]
2
2021-07-14T12:21:50.000Z
2021-07-14T12:21:52.000Z
src/tests/ftest/pool/destroy_rebuild.py
kmajzero/daos
286aee8fde0d77838be7c2405885a9958c085ffb
[ "BSD-2-Clause-Patent" ]
null
null
null
src/tests/ftest/pool/destroy_rebuild.py
kmajzero/daos
286aee8fde0d77838be7c2405885a9958c085ffb
[ "BSD-2-Clause-Patent" ]
1
2021-11-03T05:00:42.000Z
2021-11-03T05:00:42.000Z
#!/usr/bin/python3 ''' (C) Copyright 2018-2021 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent ''' from apricot import TestWithServers from test_utils_pool import TestPool class DestroyRebuild(TestWithServers): """Test class for pool destroy tests. Test Class Description: This tes...
32.90625
83
0.647198
from apricot import TestWithServers from test_utils_pool import TestPool class DestroyRebuild(TestWithServers): CANCEL_FOR_TICKET = [["DAOS-4891", "rank_to_kill", "[0]"]] def test_destroy_while_rebuilding(self): self.pool = TestPool(self.context, self.get_dmg_command()) self.po...
true
true
f702253efe7970a3d73df3a90fcb9ef03d058f4f
1,692
py
Python
examples/protocols/asio/udp_echo_server/asio_udp_server_test.py
umarudy/esp-idf
5667124b60209fb7c04a400e9f3ae1c497ddcd88
[ "Apache-2.0" ]
1
2021-05-24T07:39:12.000Z
2021-05-24T07:39:12.000Z
examples/protocols/asio/udp_echo_server/asio_udp_server_test.py
umarudy/esp-idf
5667124b60209fb7c04a400e9f3ae1c497ddcd88
[ "Apache-2.0" ]
null
null
null
examples/protocols/asio/udp_echo_server/asio_udp_server_test.py
umarudy/esp-idf
5667124b60209fb7c04a400e9f3ae1c497ddcd88
[ "Apache-2.0" ]
3
2021-08-02T07:11:55.000Z
2021-11-09T06:02:05.000Z
import os import re import socket import ttfw_idf @ttfw_idf.idf_example_test(env_tag='Example_WIFI_Protocols') def test_examples_protocol_asio_udp_server(env, extra_data): """ steps: | 1. join AP 2. Start server 3. Test connects to server and sends a test message 4. Test evaluates rec...
36
113
0.688534
import os import re import socket import ttfw_idf @ttfw_idf.idf_example_test(env_tag='Example_WIFI_Protocols') def test_examples_protocol_asio_udp_server(env, extra_data): test_msg = b'echo message from client to server' dut1 = env.get_dut('udp_echo_server', 'examples/protocols/asio/udp_echo_server', dut_cla...
true
true
f70225bfe03aae6c356907a08cda096186636654
89,628
py
Python
plugins/slicer/MONAILabel/MONAILabel.py
hkethi002/MONAILabel
800dd637bf1825a183033faf3aecf62d4f26f491
[ "Apache-2.0" ]
null
null
null
plugins/slicer/MONAILabel/MONAILabel.py
hkethi002/MONAILabel
800dd637bf1825a183033faf3aecf62d4f26f491
[ "Apache-2.0" ]
null
null
null
plugins/slicer/MONAILabel/MONAILabel.py
hkethi002/MONAILabel
800dd637bf1825a183033faf3aecf62d4f26f491
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
44.370297
159
0.646383
import copy import json import logging import os import shutil import tempfile import time import traceback from collections import OrderedDict from urllib.parse import quote_plus import ctk import qt import SampleData import SimpleITK as sitk import sitkUtils import slicer import vtk import vtkSegmentation...
true
true
f702268e91a55f101ad2a75a044d59fb343445d7
1,636
py
Python
project_euler/017.letter_counts.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
1
2020-01-19T01:21:56.000Z
2020-01-19T01:21:56.000Z
project_euler/017.letter_counts.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
null
null
null
project_euler/017.letter_counts.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
1
2021-07-02T14:40:01.000Z
2021-07-02T14:40:01.000Z
''' Problem 017 If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? NOTE: Do not count spaces or hyphens. ...
27.266667
79
0.582518
ones_names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'] tens_names = ['zero', 'ten', 'twenty', 'thirty', 'forty',...
true
true
f70226d0a47419dc066e849b10f0909332f1ddd8
2,078
py
Python
packages/python/plotly/plotly/validators/scattergeo/marker/gradient/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
3
2020-02-04T21:39:20.000Z
2020-11-17T19:07:07.000Z
packages/python/plotly/plotly/validators/scattergeo/marker/gradient/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
12
2020-06-06T01:22:26.000Z
2022-03-12T00:13:42.000Z
packages/python/plotly/plotly/validators/scattergeo/marker/gradient/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
17
2019-11-21T14:11:29.000Z
2019-11-21T15:26:23.000Z
import _plotly_utils.basevalidators class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scattergeo.marker.gradient", **kwargs ): super(TypesrcValidator, self).__init__( plotly_name=plotly_name, paren...
31.484848
88
0.632339
import _plotly_utils.basevalidators class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scattergeo.marker.gradient", **kwargs ): super(TypesrcValidator, self).__init__( plotly_name=plotly_name, paren...
true
true
f7022769f7e9d35089cc3e3827278c2a72c45ec8
1,655
py
Python
src/yellowdog_client/model/aws_instance.py
yellowdog/yellowdog-sdk-python-public
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
[ "Apache-2.0" ]
null
null
null
src/yellowdog_client/model/aws_instance.py
yellowdog/yellowdog-sdk-python-public
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
[ "Apache-2.0" ]
null
null
null
src/yellowdog_client/model/aws_instance.py
yellowdog/yellowdog-sdk-python-public
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from datetime import datetime from typing import Optional from .cloud_provider import CloudProvider from .instance import Instance from .instance_status import InstanceStatus @dataclass class AwsInstance(Instance): """Extends Instance to add fields specific to the AWS com...
41.375
84
0.708157
from dataclasses import dataclass, field from datetime import datetime from typing import Optional from .cloud_provider import CloudProvider from .instance import Instance from .instance_status import InstanceStatus @dataclass class AwsInstance(Instance): type: str = field(default="co.yellowdog.platform.model.Aw...
true
true
f7022774264758dda80e7f7df5daa6745e8fb6c6
8,127
py
Python
zfit/models/basic.py
schmitse/zfit
d42588f1d43532a34a81f31e602d2471780690e2
[ "BSD-3-Clause" ]
null
null
null
zfit/models/basic.py
schmitse/zfit
d42588f1d43532a34a81f31e602d2471780690e2
[ "BSD-3-Clause" ]
null
null
null
zfit/models/basic.py
schmitse/zfit
d42588f1d43532a34a81f31e602d2471780690e2
[ "BSD-3-Clause" ]
null
null
null
"""Basic PDFs are provided here. Gauss, exponential... that can be used together with Functors to build larger models. """ # Copyright (c) 2021 zfit import contextlib import numpy as np import tensorflow as tf import zfit.z.numpy as znp from zfit import z from ..core.basepdf import BasePDF from ..core.space impor...
43.92973
119
0.648702
import contextlib import numpy as np import tensorflow as tf import zfit.z.numpy as znp from zfit import z from ..core.basepdf import BasePDF from ..core.space import ANY_LOWER, ANY_UPPER, Space from ..util import ztyping from ..util.exception import (AnalyticIntegralNotImplemented, B...
true
true
f70228d45f25247be7c181a695834dda94491b4d
6,195
py
Python
experiments/PV_noPV_7day_20k.py
DavidFellner/Malfunctions_in_LV_grid_datase
f92ca5e5ebc6e7d54c8e5c3d7d6e5c4e4c67fb5c
[ "MIT" ]
null
null
null
experiments/PV_noPV_7day_20k.py
DavidFellner/Malfunctions_in_LV_grid_datase
f92ca5e5ebc6e7d54c8e5c3d7d6e5c4e4c67fb5c
[ "MIT" ]
null
null
null
experiments/PV_noPV_7day_20k.py
DavidFellner/Malfunctions_in_LV_grid_datase
f92ca5e5ebc6e7d54c8e5c3d7d6e5c4e4c67fb5c
[ "MIT" ]
null
null
null
import os import math ''' Metric goal is reached ''' #Sytem settings dev_mode = False grid_data_folder = os.path.join(os.getcwd(), 'raw_data_generation', 'input') raw_data_folder = os.path.join(os.getcwd(), 'raw_data') datasets_folder = os.path.join(os.getcwd(), 'datasets') test_data_folder = os.path.join(os.getcwd()...
66.612903
187
0.652623
import os import math dev_mode = False grid_data_folder = os.path.join(os.getcwd(), 'raw_data_generation', 'input') raw_data_folder = os.path.join(os.getcwd(), 'raw_data') datasets_folder = os.path.join(os.getcwd(), 'datasets') test_data_folder = os.path.join(os.getcwd(), 'test') models_folder = os.path.join(os.getc...
true
true
f702297271349632584c3aeb49e40b474c6da936
18,867
py
Python
bin/lesson_check.py
kekoziar/lc-data-intro-archives
1307cdf22cf46a8e7656b642341781397b93116f
[ "CC-BY-4.0" ]
7
2019-05-15T18:30:43.000Z
2020-12-14T16:24:20.000Z
bin/lesson_check.py
kekoziar/lc-data-intro-archives
1307cdf22cf46a8e7656b642341781397b93116f
[ "CC-BY-4.0" ]
20
2019-04-16T21:45:29.000Z
2022-01-19T23:37:29.000Z
bin/lesson_check.py
kekoziar/lc-data-intro-archives
1307cdf22cf46a8e7656b642341781397b93116f
[ "CC-BY-4.0" ]
12
2018-04-27T18:50:31.000Z
2022-01-05T14:53:42.000Z
#!/usr/bin/env python3 """ Check lesson files and their contents. """ import os import glob import re from argparse import ArgumentParser from util import (Reporter, read_markdown, load_yaml, check_unwanted_files, require) __version__ = '0.3' # Where to look for source Markdown files. SOURCE_DIR...
33.39292
103
0.563842
import os import glob import re from argparse import ArgumentParser from util import (Reporter, read_markdown, load_yaml, check_unwanted_files, require) __version__ = '0.3' SOURCE_DIRS = ['', '_episodes', '_extras'] SOURCE_RMD_DIRS = ['_episodes_rmd'] REQUIRED_FILES = { '%/CODE_O...
true
true
f7022974d4d86de398d7c731c85dc7c61ca334bc
16,594
py
Python
distil_labse_repo/distil_funcs.py
bobub/distil_labse
ad587d7e4e49101a22fb1459b724b25733715caa
[ "Apache-2.0" ]
null
null
null
distil_labse_repo/distil_funcs.py
bobub/distil_labse
ad587d7e4e49101a22fb1459b724b25733715caa
[ "Apache-2.0" ]
null
null
null
distil_labse_repo/distil_funcs.py
bobub/distil_labse
ad587d7e4e49101a22fb1459b724b25733715caa
[ "Apache-2.0" ]
null
null
null
# Imports import torch from labml_nn.transformers.switch import SwitchTransformer, SwitchTransformerLayer, SwitchFeedForward from labml_nn.transformers import MultiHeadAttention from labml_nn.transformers.feed_forward import FeedForward import numpy as np from transformers import AutoConfig, AutoModel import torch.nn a...
44.368984
187
0.693142
import torch from labml_nn.transformers.switch import SwitchTransformer, SwitchTransformerLayer, SwitchFeedForward from labml_nn.transformers import MultiHeadAttention from labml_nn.transformers.feed_forward import FeedForward import numpy as np from transformers import AutoConfig, AutoModel import torch.nn as nn impo...
true
true
f7022a7f024c96d6c75b7c897d5507df75a22e08
647
py
Python
utilities/video_2_jpg.py
VEDANTGHODKE/Ikshana-Assistant-For-Specially-Visioned
64958296702b01e47bd2a26316b30b5e28d9b9ae
[ "BSD-2-Clause" ]
2
2020-10-19T09:34:09.000Z
2020-10-19T12:09:09.000Z
utilities/video_2_jpg.py
VEDANTGHODKE/Ikshana-Assistant-For-Specially-Visioned
64958296702b01e47bd2a26316b30b5e28d9b9ae
[ "BSD-2-Clause" ]
null
null
null
utilities/video_2_jpg.py
VEDANTGHODKE/Ikshana-Assistant-For-Specially-Visioned
64958296702b01e47bd2a26316b30b5e28d9b9ae
[ "BSD-2-Clause" ]
null
null
null
import cv2 import argparse parser = argparse.ArgumentParser() parser.add_argument('-p2', "--path", help="path to input video") parser.add_argument('-p1', "--spath", help="path where the images should be stored") parser.add_argument('-n', "--num", help="number from which image label naming starts", type=int) args = pars...
28.130435
96
0.658423
import cv2 import argparse parser = argparse.ArgumentParser() parser.add_argument('-p2', "--path", help="path to input video") parser.add_argument('-p1', "--spath", help="path where the images should be stored") parser.add_argument('-n', "--num", help="number from which image label naming starts", type=int) args = pars...
true
true
f7022b106191f7e769f494a9e9e6e19c38892823
1,472
py
Python
qnarre/doc/justifier.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
qnarre/doc/justifier.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
qnarre/doc/justifier.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
# Copyright 2019 Quantapix Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
35.902439
79
0.536005
class Justifier: def __init__(self, **kw): super().__init__(**kw) self.justs = [0] * 9 self.offsets = [(0, 0, 0, 1, 1, 1, 1, 1, 1), (0, -1, -2, 0, 0, 0, 1, 1, 1), (0, -1, -2, 0, -1, -2, 0, 0, 0)] def init_justs(self, justs)...
true
true
f7022b72854d8995d4771a29eac9e0ad3b7e4567
5,213
py
Python
examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_logging.py
StanfordVL/bullet3_ik
52da668d60b32bfe6eea96d3ef3b9d442b2b8926
[ "Zlib" ]
1
2019-08-24T09:06:26.000Z
2019-08-24T09:06:26.000Z
examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_logging.py
StanfordVL/bullet3_ik
52da668d60b32bfe6eea96d3ef3b9d442b2b8926
[ "Zlib" ]
null
null
null
examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_logging.py
StanfordVL/bullet3_ik
52da668d60b32bfe6eea96d3ef3b9d442b2b8926
[ "Zlib" ]
null
null
null
"""A proto buffer based logging system for minitaur experiments. The logging system records the time since reset, base position, orientation, angular velocity and motor information (joint angle, speed, and torque) into a proto buffer. See minitaur_logging.proto for more details. The episode_proto is updated per time s...
36.454545
79
0.730865
from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime import os import time import tensorflow as tf import minitaur_logging_pb2 NUM_MOTORS = 8 def _update_base_state(base_state, values): base_state.x = values[0] base_state.y = values[1] ...
true
true
f7022bfcbb871ca0f803248d774267f56badc709
3,062
py
Python
tests/test_area.py
everypolitician/everypolitician-popolo-python
21670d64f78ac33a088d9adc68006c355f21aa35
[ "MIT" ]
13
2017-02-27T16:06:47.000Z
2021-04-14T02:56:17.000Z
tests/test_area.py
everypolitician/everypolitician-popolo-python
21670d64f78ac33a088d9adc68006c355f21aa35
[ "MIT" ]
17
2016-10-12T17:14:47.000Z
2017-02-10T14:24:08.000Z
tests/test_area.py
everypolitician/everypolitician-popolo-python
21670d64f78ac33a088d9adc68006c355f21aa35
[ "MIT" ]
4
2016-10-20T16:20:31.000Z
2022-01-08T00:01:57.000Z
# -*- coding: utf-8 -*- from unittest import TestCase import six from popolo_data.importer import Popolo EXAMPLE_AREA = { "id": "area/tartu_linn", "identifiers": [ { "identifier": "Q3032626", "scheme": "wikidata" } ], "name": "Tartu linn", "other_names": ...
27.097345
72
0.506532
from unittest import TestCase import six from popolo_data.importer import Popolo EXAMPLE_AREA = { "id": "area/tartu_linn", "identifiers": [ { "identifier": "Q3032626", "scheme": "wikidata" } ], "name": "Tartu linn", "other_names": [ { ...
true
true
f7022c4c7c673a12cef7e81ed9dc5253eeaa03e2
1,614
py
Python
openiPrototype/appUI/importProductData.py
OPENi-ict/ntua_demo
104118fbe1f54db35386ca96286317ceb64cb658
[ "Apache-2.0" ]
null
null
null
openiPrototype/appUI/importProductData.py
OPENi-ict/ntua_demo
104118fbe1f54db35386ca96286317ceb64cb658
[ "Apache-2.0" ]
null
null
null
openiPrototype/appUI/importProductData.py
OPENi-ict/ntua_demo
104118fbe1f54db35386ca96286317ceb64cb658
[ "Apache-2.0" ]
null
null
null
__author__ = 'alvertisjo' from django.core.serializers import json import requests from requests.packages.urllib3 import Timeout from requests.packages.urllib3.exceptions import ConnectionError class OpenProductData(object): def getData(self): # rowStep=100 # currentPage=0 # #####document...
38.428571
231
0.607187
__author__ = 'alvertisjo' from django.core.serializers import json import requests from requests.packages.urllib3 import Timeout from requests.packages.urllib3.exceptions import ConnectionError class OpenProductData(object): def getData(self):
true
true
f7022e01c79532543261ecece3b5ec0bc00d2ef0
1,864
py
Python
src/aslc.py
ronsaldo/aslc
1c9570434c33b89ce7c238bee6e81dcde9c91daf
[ "MIT" ]
null
null
null
src/aslc.py
ronsaldo/aslc
1c9570434c33b89ce7c238bee6e81dcde9c91daf
[ "MIT" ]
null
null
null
src/aslc.py
ronsaldo/aslc
1c9570434c33b89ce7c238bee6e81dcde9c91daf
[ "MIT" ]
null
null
null
#!/usr/bin/python import argparse import subprocess import sys from aslc.Semantic import compileString from aslc.GLSLBackend import GLSLBackend Backend = GLSLBackend # Parse the command line argParser = argparse.ArgumentParser(description="AbstractGPU Shading Language Compiler") argParser.add_argument('inputFiles',...
30.064516
122
0.694742
 import argparse import subprocess import sys from aslc.Semantic import compileString from aslc.GLSLBackend import GLSLBackend Backend = GLSLBackend argParser = argparse.ArgumentParser(description="AbstractGPU Shading Language Compiler") argParser.add_argument('inputFiles', metavar='input file', type=str, nargs='+...
false
true
f7022e79616991d5da307aa7c60dcdfa477777ad
116
py
Python
pages/views.py
LombaAnderson/personalizar-user-django
b923587fd9e9cfc65224dd31f80621eb197a6098
[ "MIT" ]
null
null
null
pages/views.py
LombaAnderson/personalizar-user-django
b923587fd9e9cfc65224dd31f80621eb197a6098
[ "MIT" ]
null
null
null
pages/views.py
LombaAnderson/personalizar-user-django
b923587fd9e9cfc65224dd31f80621eb197a6098
[ "MIT" ]
null
null
null
from django.views.generic import TemplateView class HomePageView(TemplateView): template_name = "home.html"
14.5
45
0.775862
from django.views.generic import TemplateView class HomePageView(TemplateView): template_name = "home.html"
true
true
f7022f7075bdd6537b307688382d872a3f7fd177
53
py
Python
Interfaces/__init__.py
ahmadryan/TurbAn
b8866d103a2ca2f5fbad73bcd4416f19299f22b2
[ "BSD-2-Clause-Patent" ]
null
null
null
Interfaces/__init__.py
ahmadryan/TurbAn
b8866d103a2ca2f5fbad73bcd4416f19299f22b2
[ "BSD-2-Clause-Patent" ]
null
null
null
Interfaces/__init__.py
ahmadryan/TurbAn
b8866d103a2ca2f5fbad73bcd4416f19299f22b2
[ "BSD-2-Clause-Patent" ]
10
2019-03-22T15:30:12.000Z
2021-02-10T02:55:50.000Z
from . import Simulations from . import Spacecraft
17.666667
26
0.773585
from . import Simulations from . import Spacecraft
true
true
f7022ff2149a27035982e6b84787ca961a0ed00e
2,752
py
Python
bin/apps/py/lib/hhslib/tests/test_hhslib.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
34
2018-08-29T11:07:41.000Z
2022-03-31T12:18:39.000Z
bin/apps/py/lib/hhslib/tests/test_hhslib.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
22
2020-01-11T01:04:04.000Z
2020-03-05T17:27:12.000Z
bin/apps/py/lib/hhslib/tests/test_hhslib.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
4
2020-02-28T03:35:32.000Z
2020-06-05T15:09:55.000Z
""" @package: jsonutils @script: test_JsonUtils.py @purpose: Test Suite for JsonUtils. @created: Aug 26, 2017 @author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior @mailto: yorevs@hotmail.com @site: https://github.com/yorevs/homesetup @license: Please refer to <https://opensource.org/licenses/MIT> "...
33.560976
67
0.667515
import os import unittest from hhslib.security import * PASSPHRASE = '12345' SAMPLE_IN_FILE_NAME = "resources/secret.in" SAMPLE_OUT_FILE_NAME = "resources/secret.out" OUT_FILE = "resources/outfile.out" OUT_FILE_GPG = "resources/outfile.out.gpg" ORIGINAL_FILE_CONTENTS = "HomeSetup Secrets" ENCODED_FILE_CONTENTS = "...
true
true
f702305f7ba2cf5b92dd37e75253366482adb81d
19,015
py
Python
GUI_app.py
Howardlinsanity/CIS-433-Group-Project-W18
f821957e498a8062b4d9c90e0cef369851ae236e
[ "BSD-3-Clause" ]
null
null
null
GUI_app.py
Howardlinsanity/CIS-433-Group-Project-W18
f821957e498a8062b4d9c90e0cef369851ae236e
[ "BSD-3-Clause" ]
2
2021-03-31T18:28:55.000Z
2021-12-13T19:45:24.000Z
GUI_app.py
Howardlinsanity/CIS-433-Group-Project-W18
f821957e498a8062b4d9c90e0cef369851ae236e
[ "BSD-3-Clause" ]
null
null
null
import threading import requests # encryption import Encrypt import unicodedata from ttk import Style, Button, Label, Entry, Progressbar, Checkbutton from Tkinter import Tk, Frame, RIGHT, BOTH, RAISED from Tkinter import TOP, X, N, LEFT from Tkinter import END, Listbox, MULTIPLE from Tkinter import Toplevel, DISABLE...
35.278293
162
0.602892
import threading import requests import Encrypt import unicodedata from ttk import Style, Button, Label, Entry, Progressbar, Checkbutton from Tkinter import Tk, Frame, RIGHT, BOTH, RAISED from Tkinter import TOP, X, N, LEFT from Tkinter import END, Listbox, MULTIPLE from Tkinter import Toplevel, DISABLED from Tkin...
true
true
f7023321a26af3f421bcb7abd350b5d2520d5a0e
2,760
py
Python
data_collector/helper.py
cardwizard/vulnerable-python-ecosystem
582fda1f45bbe912352ed31a302d798365628713
[ "MIT" ]
null
null
null
data_collector/helper.py
cardwizard/vulnerable-python-ecosystem
582fda1f45bbe912352ed31a302d798365628713
[ "MIT" ]
null
null
null
data_collector/helper.py
cardwizard/vulnerable-python-ecosystem
582fda1f45bbe912352ed31a302d798365628713
[ "MIT" ]
null
null
null
from pipdeptree import get_installed_distributions, build_dist_index, construct_tree from bs4 import BeautifulSoup from json import dump, load from urllib.request import urlretrieve from pathlib import Path from unittest import mock from pkginfo import SDist from johnnydep.cli import JohnnyDist import requests import ...
29.677419
134
0.698188
from pipdeptree import get_installed_distributions, build_dist_index, construct_tree from bs4 import BeautifulSoup from json import dump, load from urllib.request import urlretrieve from pathlib import Path from unittest import mock from pkginfo import SDist from johnnydep.cli import JohnnyDist import requests import ...
true
true
f7023348f5b5d56b419a34ca4af3669c787d2364
575
py
Python
simulations/NewRochelle_population/sub_average_testing.py
Dynamical-Systems-Laboratory/ABM-COVID-DSL
bf1fcbbd7ae161f2a026335fa830cd21ccdf48f0
[ "MIT" ]
3
2020-11-04T03:58:49.000Z
2021-01-14T22:16:24.000Z
simulations/NewRochelle_population/sub_average_testing.py
atruszkowska/ABM-COVID-DSL
bf1fcbbd7ae161f2a026335fa830cd21ccdf48f0
[ "MIT" ]
1
2021-01-12T14:59:59.000Z
2021-01-12T14:59:59.000Z
simulations/NewRochelle_population/sub_average_testing.py
atruszkowska/ABM-COVID-DSL
bf1fcbbd7ae161f2a026335fa830cd21ccdf48f0
[ "MIT" ]
2
2020-11-03T17:18:41.000Z
2021-01-15T04:13:03.000Z
#!/usr/local/bin/python3.6 # Substitute average testing value from optimization import sys if len(sys.argv) != 2: sys.stderr.write('Usage: python3.X %s sy_fraction\n' % sys.argv[0]) raise SystemExit(1) sy_fraction = sys.argv[1] parameters = [] with open('input_data/infection_parameters.txt','r') as fin: paramete...
25
68
0.732174
import sys if len(sys.argv) != 2: sys.stderr.write('Usage: python3.X %s sy_fraction\n' % sys.argv[0]) raise SystemExit(1) sy_fraction = sys.argv[1] parameters = [] with open('input_data/infection_parameters.txt','r') as fin: parameters = fin.readlines() for ind,param in enumerate(parameters): if 'average fra...
true
true
f7023395c77fc980e89233ef8430c33af75e94f4
1,158
py
Python
functions_string.py
jhuboo/ROSbot
792c663d3da348a3c375d2aea0b879278451d7be
[ "MIT" ]
null
null
null
functions_string.py
jhuboo/ROSbot
792c663d3da348a3c375d2aea0b879278451d7be
[ "MIT" ]
null
null
null
functions_string.py
jhuboo/ROSbot
792c663d3da348a3c375d2aea0b879278451d7be
[ "MIT" ]
null
null
null
""" Simple functions to manipulate strings """ # Replace the functions below with your implementation as described in the assignment def is_rhyme(word1, word2, k): """ Returns True if the last k letters of the two words are the same (case sensitive). Automatically returns False if either word contains le...
36.1875
86
0.614853
def is_rhyme(word1, word2, k): if (k == 0): return False if (len(word1) < k or len(word2) < k): return False rev_word1 = word1[::-1] rev_word2 = word2[::-1] return rev_word1[:k] == rev_word2[:k]
true
true
f70233f09d4a5fd06d0484524a760dd01a14127a
1,318
py
Python
orgmybmarks.py
aihy/orgmybmarks
2e263a5ae3167c41d0d7495d2ae99f3d9f6ee256
[ "MIT" ]
null
null
null
orgmybmarks.py
aihy/orgmybmarks
2e263a5ae3167c41d0d7495d2ae99f3d9f6ee256
[ "MIT" ]
null
null
null
orgmybmarks.py
aihy/orgmybmarks
2e263a5ae3167c41d0d7495d2ae99f3d9f6ee256
[ "MIT" ]
null
null
null
import sys if len(sys.argv) != 2: print("Usage: python3 orgmybmarks.py bookmarks.html") quit() file = open(sys.argv[1]) # file = open("in.html") fileout = open("out.html", "w") hreflist = [] # 读到第一个链接 numm = 1 while True: line = file.readline() if not line: break if line.find("HREF") == -1:...
26.897959
106
0.616844
import sys if len(sys.argv) != 2: print("Usage: python3 orgmybmarks.py bookmarks.html") quit() file = open(sys.argv[1]) fileout = open("out.html", "w") hreflist = [] numm = 1 while True: line = file.readline() if not line: break if line.find("HREF") == -1: continue num = line....
true
true
f70235169294c1d9d15e2d05dddcff373f8b327f
84
py
Python
tests/test_execute.py
kevindiltinero/seass3
7b108cdf09d2600cab4dc20b069124492feb801a
[ "BSD-2-Clause" ]
1
2018-06-10T08:28:17.000Z
2018-06-10T08:28:17.000Z
tests/test_execute.py
kevindiltinero/seass3
7b108cdf09d2600cab4dc20b069124492feb801a
[ "BSD-2-Clause" ]
null
null
null
tests/test_execute.py
kevindiltinero/seass3
7b108cdf09d2600cab4dc20b069124492feb801a
[ "BSD-2-Clause" ]
null
null
null
import main def test_execute(): count = main.results assert count == 400410
16.8
26
0.690476
import main def test_execute(): count = main.results assert count == 400410
true
true
f70235171c12de4abc9cc41be600db803f93f97c
23,197
py
Python
pyburst/mcmc/mcmc_plot.py
zacjohnston/pyburst
f7d5ae9a229704d1cbcf656afb9fb3e29fb71c0c
[ "MIT" ]
4
2019-05-01T07:30:15.000Z
2021-08-04T15:04:38.000Z
pyburst/mcmc/mcmc_plot.py
zacjohnston/pyburst
f7d5ae9a229704d1cbcf656afb9fb3e29fb71c0c
[ "MIT" ]
null
null
null
pyburst/mcmc/mcmc_plot.py
zacjohnston/pyburst
f7d5ae9a229704d1cbcf656afb9fb3e29fb71c0c
[ "MIT" ]
4
2019-03-26T12:38:37.000Z
2022-03-09T05:30:18.000Z
import numpy as np import os import sys import matplotlib.pyplot as plt import chainconsumer from math import ceil # pyburst from . import mcmc_versions from . import mcmc_tools from . import burstfit from . import mcmc_params from pyburst.observations import obs_tools from pyburst.plotting import plot_tools from pybu...
40.839789
96
0.589516
import numpy as np import os import sys import matplotlib.pyplot as plt import chainconsumer from math import ceil from . import mcmc_versions from . import mcmc_tools from . import burstfit from . import mcmc_params from pyburst.observations import obs_tools from pyburst.plotting import plot_tools from pyburst.grids...
true
true
f70235e18bbc07ecaef1d55d58b7d01548f0b411
1,088
py
Python
tests/tests_timeout.py
gisce/xmlrpclib-to
c37db9eeff71f379d78ef97e5a206d4efede7821
[ "MIT" ]
1
2018-04-13T15:42:52.000Z
2018-04-13T15:42:52.000Z
tests/tests_timeout.py
gisce/xmlrpclib-to
c37db9eeff71f379d78ef97e5a206d4efede7821
[ "MIT" ]
null
null
null
tests/tests_timeout.py
gisce/xmlrpclib-to
c37db9eeff71f379d78ef97e5a206d4efede7821
[ "MIT" ]
null
null
null
import socket import time from xmlrpclib_to import ServerProxy import httpretty import pytest XML_RESPONSE = """<?xml version="1.0"?> <methodResponse> <params> <param> <value><string>Test</string></value> </param> </params> </methodResponse>""" def timeout(request, url, headers)...
19.428571
59
0.629596
import socket import time from xmlrpclib_to import ServerProxy import httpretty import pytest XML_RESPONSE = """<?xml version="1.0"?> <methodResponse> <params> <param> <value><string>Test</string></value> </param> </params> </methodResponse>""" def timeout(request, url, headers)...
true
true
f702369c720d1d7f21a51cf5907306bdf414098a
306
py
Python
bookmarks/images/signals.py
anilsaini10/django-bookmarks
9bb77aa73c35322f68873de0e8e4fb6f596465bf
[ "MIT" ]
5
2020-09-08T08:12:28.000Z
2020-09-09T20:50:26.000Z
bookmarks/images/signals.py
anilsaini10/django-bookmarks
9bb77aa73c35322f68873de0e8e4fb6f596465bf
[ "MIT" ]
1
2020-10-01T05:46:23.000Z
2020-10-01T05:46:23.000Z
bookmarks/images/signals.py
anilsaini10/django-bookmarks
9bb77aa73c35322f68873de0e8e4fb6f596465bf
[ "MIT" ]
1
2020-09-30T19:41:40.000Z
2020-09-30T19:41:40.000Z
from django.db.models.signals import m2m_changed from django.dispatch import receiver from .models import Image @receiver(m2m_changed, sender=Image.users_like.through) def users_like_changed(sender, instance, **kwargs): instance.total_likes = instance.users_like.count() instance.save()
30.6
56
0.77451
from django.db.models.signals import m2m_changed from django.dispatch import receiver from .models import Image @receiver(m2m_changed, sender=Image.users_like.through) def users_like_changed(sender, instance, **kwargs): instance.total_likes = instance.users_like.count() instance.save()
true
true
f70236de1aae5c90f06badde4d82b1d629d38b76
1,772
gyp
Python
binding.gyp
ivan/node-blake2
e0dd018a45bc4a792512b78066ea9378cb542549
[ "CC0-1.0" ]
34
2015-05-09T23:31:13.000Z
2019-07-16T17:00:37.000Z
binding.gyp
ludios/node-blake2
82c6cb2d4a3bdc43dbc382a56c8c15306b2abfd3
[ "CC0-1.0" ]
12
2016-07-27T09:16:56.000Z
2019-09-09T13:19:10.000Z
binding.gyp
ivan/node-blake2
e0dd018a45bc4a792512b78066ea9378cb542549
[ "CC0-1.0" ]
16
2015-08-02T05:45:52.000Z
2019-08-12T14:09:26.000Z
{ "targets": [ { "target_name": "binding", "win_delay_load_hook": "true", "conditions": [ ["target_arch == 'x64' or target_arch == 'ia32'", { "sources": [ "src/binding.cpp", "src/BLAKE2/sse/blake2b.c", "src/BLAKE2/sse/blake2bp.c", "src/BLAKE2/sse/blake2s.c", "src/BLAKE...
22.717949
83
0.520316
{ "targets": [ { "target_name": "binding", "win_delay_load_hook": "true", "conditions": [ ["target_arch == 'x64' or target_arch == 'ia32'", { "sources": [ "src/binding.cpp", "src/BLAKE2/sse/blake2b.c", "src/BLAKE2/sse/blake2bp.c", "src/BLAKE2/sse/blake2s.c", "src/BLAKE...
true
true
f7023897727aa90fe9eab96a3d2bdf6ea1371009
10,908
py
Python
tests/functions/test_process_text.py
vishalbelsare/pyjanitor
9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb
[ "MIT" ]
225
2021-04-01T13:57:39.000Z
2022-03-31T23:12:51.000Z
tests/functions/test_process_text.py
vishalbelsare/pyjanitor
9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb
[ "MIT" ]
251
2021-03-25T10:52:31.000Z
2022-03-31T01:46:29.000Z
tests/functions/test_process_text.py
vishalbelsare/pyjanitor
9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb
[ "MIT" ]
30
2021-03-25T20:35:43.000Z
2022-03-20T20:20:42.000Z
import numpy as np import pandas as pd import pytest from pandas.testing import assert_frame_equal @pytest.fixture def process_test_df(): "Base DataFrame" return pd.DataFrame( {"text": ["a_b_c", "c_d_e", np.nan, "f_g_h"], "numbers": range(1, 5)} ) @pytest.fixture def test_returns_dataframe(): ...
29.010638
79
0.641272
import numpy as np import pandas as pd import pytest from pandas.testing import assert_frame_equal @pytest.fixture def process_test_df(): return pd.DataFrame( {"text": ["a_b_c", "c_d_e", np.nan, "f_g_h"], "numbers": range(1, 5)} ) @pytest.fixture def test_returns_dataframe(): return pd.DataFrame...
true
true
f70239220de1326dc46870b4912397756fdb1361
18,427
py
Python
bin/Python27/Lib/site-packages/sympy/printing/tests/test_str.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/sympy/printing/tests/test_str.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/sympy/printing/tests/test_str.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
from __future__ import division from sympy import (Abs, Catalan, cos, Derivative, E, EulerGamma, exp, factorial, factorial2, Function, GoldenRatio, I, Integer, Integral, Interval, Lambda, Limit, log, Matrix, nan, O, oo, pi, Rational, Float, Rel, S, sin, SparseMatrix, sqrt, summation, Sum, Symbol, symbols, ...
33.023297
139
0.515168
from __future__ import division from sympy import (Abs, Catalan, cos, Derivative, E, EulerGamma, exp, factorial, factorial2, Function, GoldenRatio, I, Integer, Integral, Interval, Lambda, Limit, log, Matrix, nan, O, oo, pi, Rational, Float, Rel, S, sin, SparseMatrix, sqrt, summation, Sum, Symbol, symbols, ...
true
true
f702393d2ef35884c8d2fef7496ee40c1e76f58b
10,876
py
Python
configs/dsc/fast_dsc_r50_fpn_1x_coco.py
hding2455/DSC
a3f49f549fd569e3c22b6dadbee1013418b9716f
[ "BSD-2-Clause" ]
13
2021-04-26T08:33:00.000Z
2022-03-30T03:29:36.000Z
configs/dsc/fast_dsc_r50_fpn_1x_coco.py
hding2455/DSC
a3f49f549fd569e3c22b6dadbee1013418b9716f
[ "BSD-2-Clause" ]
14
2021-06-24T07:02:38.000Z
2022-03-18T21:25:47.000Z
configs/dsc/fast_dsc_r50_fpn_1x_coco.py
hding2455/DSC
a3f49f549fd569e3c22b6dadbee1013418b9716f
[ "BSD-2-Clause" ]
3
2021-10-21T11:42:32.000Z
2022-03-26T08:30:34.000Z
# model settings _base_ = [ '../_base_/datasets/coco_instance.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( type='DSC', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(...
33.88162
79
0.495954
_base_ = [ '../_base_/datasets/coco_instance.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( type='DSC', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), ...
true
true
f70239a34c06e8d819bab5fc729906e65d1d5260
420
py
Python
lists/migrations/0001_initial.py
migglu/todo-lists
1a9cbdd2b2ff5240ef40946f8e07d18537cd3a12
[ "MIT" ]
null
null
null
lists/migrations/0001_initial.py
migglu/todo-lists
1a9cbdd2b2ff5240ef40946f8e07d18537cd3a12
[ "MIT" ]
null
null
null
lists/migrations/0001_initial.py
migglu/todo-lists
1a9cbdd2b2ff5240ef40946f8e07d18537cd3a12
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Item', fields=[ ('id', models.AutoField(primary...
21
114
0.585714
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Item', fields=[ ('id', models.AutoField(primary_key=True, serialize=Fa...
true
true
f7023a346bd1023538bb62dbeaea32c222fa7d60
210
py
Python
setup.py
chrisjsewell/disk-objectstore
274c868ade18cb89a38690cb99a28f514aeacba1
[ "MIT" ]
6
2020-10-22T08:46:08.000Z
2022-01-27T06:50:07.000Z
setup.py
chrisjsewell/disk-objectstore
274c868ade18cb89a38690cb99a28f514aeacba1
[ "MIT" ]
89
2020-04-11T16:25:38.000Z
2020-07-20T14:52:38.000Z
setup.py
chrisjsewell/disk-objectstore
274c868ade18cb89a38690cb99a28f514aeacba1
[ "MIT" ]
5
2020-07-20T17:03:33.000Z
2022-01-10T13:48:55.000Z
"""This file is needed for editable installs (`pip install -e .`). Can be removed once the following is resolved https://github.com/pypa/packaging-problems/issues/256 """ from setuptools import setup setup()
23.333333
66
0.752381
from setuptools import setup setup()
true
true
f7023b9f4124b4ce5a8066663f7adc569a5ebde6
1,292
py
Python
examples/mpi/visualization/config.py
FTHPC/FlipIt
02882de89941d83f89c84856e307ec53c99cf7c0
[ "NCSA" ]
7
2017-02-20T21:39:33.000Z
2020-06-05T09:07:15.000Z
examples/mpi/visualization/config.py
FTHPC/FlipIt
02882de89941d83f89c84856e307ec53c99cf7c0
[ "NCSA" ]
3
2016-05-05T13:32:10.000Z
2016-05-29T14:33:07.000Z
examples/mpi/visualization/config.py
FTHPC/FlipIt
02882de89941d83f89c84856e307ec53c99cf7c0
[ "NCSA" ]
4
2015-08-27T11:19:53.000Z
2016-05-03T19:50:35.000Z
############### Injector Parameters ################## # # config - config file used by the compiler pass # funcList - list of functions that are faulty # prob - probability that instuction is faulty # byte - which byte is faulty (0-7) -1 random # singleInj - one injection per active rank (0 or 1) # p...
27.489362
57
0.537926
true
true
f7023be0695f3585c75bf0627f064210a96296ac
491
py
Python
python/stage_5/4673.py
smartx-jshan/Coding_Practice
bc7d485e7992031e55df62483818b721ad7d1d4f
[ "Apache-2.0" ]
null
null
null
python/stage_5/4673.py
smartx-jshan/Coding_Practice
bc7d485e7992031e55df62483818b721ad7d1d4f
[ "Apache-2.0" ]
null
null
null
python/stage_5/4673.py
smartx-jshan/Coding_Practice
bc7d485e7992031e55df62483818b721ad7d1d4f
[ "Apache-2.0" ]
null
null
null
def num(a): num = int(a) if (num < 10): return (num + num) elif (num <100): return (num + num //10 + num % 10) elif (num <1000): return (num + num //100 + ( (num //10) % 10) + num % 10) else: return (num + num //1000 + ((num //100) % 10) + ((num //10) % 10) + num %10) count = list(range(10000...
19.64
80
0.503055
def num(a): num = int(a) if (num < 10): return (num + num) elif (num <100): return (num + num //10 + num % 10) elif (num <1000): return (num + num //100 + ( (num //10) % 10) + num % 10) else: return (num + num //1000 + ((num //100) % 10) + ((num //10) % 10) + num %10) count = list(range(10000...
true
true
f7023be0b6c9bb5058c9f741b1eba904776dc433
9,753
py
Python
python/ccxt/virwox.py
wadaxofficial/ccxt
765aaa4cd83c1e2dc75717d49b50a55ac4dc0487
[ "MIT" ]
null
null
null
python/ccxt/virwox.py
wadaxofficial/ccxt
765aaa4cd83c1e2dc75717d49b50a55ac4dc0487
[ "MIT" ]
null
null
null
python/ccxt/virwox.py
wadaxofficial/ccxt
765aaa4cd83c1e2dc75717d49b50a55ac4dc0487
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError class virwox (Exchange): def describe(self): ...
36.122222
126
0.467138
ge import Exchange from ccxt.base.errors import ExchangeError class virwox (Exchange): def describe(self): return self.deep_extend(super(virwox, self).describe(), { 'id': 'virwox', 'name': 'VirWoX', 'countries': ['AT', 'EU'], 'rateLimit': 1000, ...
true
true
f7023d3f50a4bcdd656f0e33b9e318facfcd714f
892
py
Python
kubi_ecs_logger/models/fields/destination.py
kumina/kubi_ecs_logger
64d9519e0759a24253a4edc53e0c024675033d1c
[ "BSD-3-Clause" ]
6
2019-12-15T12:47:06.000Z
2022-01-11T08:54:58.000Z
kubi_ecs_logger/models/fields/destination.py
kumina/kubi_ecs_logger
64d9519e0759a24253a4edc53e0c024675033d1c
[ "BSD-3-Clause" ]
null
null
null
kubi_ecs_logger/models/fields/destination.py
kumina/kubi_ecs_logger
64d9519e0759a24253a4edc53e0c024675033d1c
[ "BSD-3-Clause" ]
null
null
null
from marshmallow import fields from .field_set import FieldSet, FieldSetSchema class Destination(FieldSet): def __init__(self, address: str = None, bytes: int = None, domain: str = None, ip: str = None, mac: str = None, ...
24.777778
47
0.533632
from marshmallow import fields from .field_set import FieldSet, FieldSetSchema class Destination(FieldSet): def __init__(self, address: str = None, bytes: int = None, domain: str = None, ip: str = None, mac: str = None, ...
true
true
f7023ee0d3ad1b30fdb112dd29346571bffa97ee
3,822
py
Python
python/TextMatch.py
indeshan/code
eb76edf54982d68ecec96664291ce3ce038e30c7
[ "MIT" ]
null
null
null
python/TextMatch.py
indeshan/code
eb76edf54982d68ecec96664291ce3ce038e30c7
[ "MIT" ]
null
null
null
python/TextMatch.py
indeshan/code
eb76edf54982d68ecec96664291ce3ce038e30c7
[ "MIT" ]
null
null
null
import nltk.corpus import nltk.tokenize.punkt import nltk.stem.snowball from nltk.corpus import wordnet import string paths = nltk.data.path #if '/var/nltk_data' not in paths: # nltk.data.path.append("/var/nltk_data"); # if '/mnt/vol1/nltk_data' not in paths: # nltk.data.path.append("/mnt/vol1/nltk_data"); #nltk.d...
35.719626
196
0.71821
import nltk.corpus import nltk.tokenize.punkt import nltk.stem.snowball from nltk.corpus import wordnet import string paths = nltk.data.path stopwords = nltk.corpus.stopwords.words('english') stopwords.extend(string.punctuation) stopwords.append('') wordnetConst = {"J":u'a',"V":u'v',"N":u'n',"R":u'r'}...
false
true
f70240c114506f9d8a93be31e8b4a574850c87da
545
py
Python
vespawatch/migrations/0053_managementaction_result.py
JWCook/vespa-watch
7b5fe7dfd3e897d99fd91c479346c89efd890d23
[ "MIT" ]
3
2019-01-17T09:22:13.000Z
2020-06-05T03:46:45.000Z
vespawatch/migrations/0053_managementaction_result.py
JWCook/vespa-watch
7b5fe7dfd3e897d99fd91c479346c89efd890d23
[ "MIT" ]
406
2018-06-13T18:36:53.000Z
2022-03-22T16:41:50.000Z
vespawatch/migrations/0053_managementaction_result.py
JWCook/vespa-watch
7b5fe7dfd3e897d99fd91c479346c89efd890d23
[ "MIT" ]
8
2019-02-12T10:05:08.000Z
2020-10-01T05:39:13.000Z
# Generated by Django 2.2.24 on 2021-08-24 10:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vespawatch', '0052_auto_20210824_1131'), ] operations = [ migrations.AddField( model_name='managementaction', name=...
28.684211
197
0.614679
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vespawatch', '0052_auto_20210824_1131'), ] operations = [ migrations.AddField( model_name='managementaction', name='result', field=models.CharField(cho...
true
true
f70240d38e81353f512252eb5825d0ca09406cdb
52,563
py
Python
py_insightvm_sdk/models/resources_vulnerability_validation_resource.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
2
2019-03-15T16:05:54.000Z
2020-07-19T18:37:50.000Z
py_insightvm_sdk/models/resources_vulnerability_validation_resource.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
1
2021-03-26T04:46:12.000Z
2021-03-26T04:51:23.000Z
py_insightvm_sdk/models/resources_vulnerability_validation_resource.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ InsightVM API # Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ...
352.771812
48,045
0.497403
import pprint import re import six from py_insightvm_sdk.models.link import Link from py_insightvm_sdk.models.vulnerability_validation_resource import VulnerabilityValidationResource class ResourcesVulnerabilityValidationResource(object): swagger_types = { 'links': 'list[Link]', 'reso...
true
true
f702411b146ade9a780b38d3042522f84e5f82cb
325
py
Python
pythonprog/code/12/12.2/logcall.py
davidyshuang/python3
5200638f6c4450998d97a9ac24bcba0872786fb2
[ "Unlicense" ]
null
null
null
pythonprog/code/12/12.2/logcall.py
davidyshuang/python3
5200638f6c4450998d97a9ac24bcba0872786fb2
[ "Unlicense" ]
null
null
null
pythonprog/code/12/12.2/logcall.py
davidyshuang/python3
5200638f6c4450998d97a9ac24bcba0872786fb2
[ "Unlicense" ]
null
null
null
# logcall.py from functools import wraps def logged(func): # Idea: Give me a function, I'll put logging # around it print('Adding logging to', func.__name__) @wraps(func) def wrapper(*args, **kwargs): print('You called', func.__name__) return func(*args, **kwargs) return wra...
19.117647
48
0.633846
from functools import wraps def logged(func): # around it print('Adding logging to', func.__name__) @wraps(func) def wrapper(*args, **kwargs): print('You called', func.__name__) return func(*args, **kwargs) return wrapper
true
true
f7024122a0575e48b00ab24490e91da345677693
21,119
py
Python
sympy/core/tests/test_relational.py
toolforger/sympy
adc391f00e1e35d27925efb0314ec8abde9d255d
[ "BSD-3-Clause" ]
1
2019-06-27T13:40:28.000Z
2019-06-27T13:40:28.000Z
sympy/core/tests/test_relational.py
toolforger/sympy
adc391f00e1e35d27925efb0314ec8abde9d255d
[ "BSD-3-Clause" ]
null
null
null
sympy/core/tests/test_relational.py
toolforger/sympy
adc391f00e1e35d27925efb0314ec8abde9d255d
[ "BSD-3-Clause" ]
null
null
null
from sympy.utilities.pytest import XFAIL, raises from sympy import (S, Symbol, symbols, nan, oo, I, pi, Float, And, Or, Not, Implies, Xor, zoo, sqrt, Rational, simplify, Function) from sympy.core.compatibility import range from sympy.core.relational import (Relational, Equality, Unequality, ...
32.341501
78
0.564373
from sympy.utilities.pytest import XFAIL, raises from sympy import (S, Symbol, symbols, nan, oo, I, pi, Float, And, Or, Not, Implies, Xor, zoo, sqrt, Rational, simplify, Function) from sympy.core.compatibility import range from sympy.core.relational import (Relational, Equality, Unequality, ...
true
true
f702418be4646ce2cca2d4d5e436f668865ba2a0
579
py
Python
chapter4/main.py
takapat/training-kit-3
3140b62a9d618a52d9c957927883255b60e27a0c
[ "Apache-2.0" ]
null
null
null
chapter4/main.py
takapat/training-kit-3
3140b62a9d618a52d9c957927883255b60e27a0c
[ "Apache-2.0" ]
1
2018-10-18T05:52:40.000Z
2018-10-18T10:38:58.000Z
chapter4/main.py
takapat/training-kit-3
3140b62a9d618a52d9c957927883255b60e27a0c
[ "Apache-2.0" ]
7
2018-10-19T05:33:26.000Z
2020-06-02T22:10:40.000Z
from flask import Flask, Response from camera import Camera import cv2 app = Flask(__name__) camera = Camera().start() def gen(camera): while True: frame = camera.read() _, jpeg = cv2.imencode('.jpg', frame) yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' + jpeg....
23.16
78
0.607945
from flask import Flask, Response from camera import Camera import cv2 app = Flask(__name__) camera = Camera().start() def gen(camera): while True: frame = camera.read() _, jpeg = cv2.imencode('.jpg', frame) yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' + jpeg....
true
true
f702419a1d1820b52591b3a643e27f680f9b94ef
485
py
Python
PFlib/setup.py
Rogue05/Praca-Magisterska
863a0522348eddd093b4de05d12c788ef5f2f520
[ "MIT" ]
null
null
null
PFlib/setup.py
Rogue05/Praca-Magisterska
863a0522348eddd093b4de05d12c788ef5f2f520
[ "MIT" ]
null
null
null
PFlib/setup.py
Rogue05/Praca-Magisterska
863a0522348eddd093b4de05d12c788ef5f2f520
[ "MIT" ]
null
null
null
from glob import glob from setuptools import setup from pybind11.setup_helpers import Pybind11Extension ext_modules = [ Pybind11Extension( "PFlib", # sorted(glob("*.cpp")), # Sort source files for reproducibility ["particle_filter.cpp",], swig_opts=['-ggdb',], include_dirs=...
24.25
73
0.63299
from glob import glob from setuptools import setup from pybind11.setup_helpers import Pybind11Extension ext_modules = [ Pybind11Extension( "PFlib", swig_opts=['-ggdb',], include_dirs=['include',] ), ] setup( name="PFlib", ext_modules=ext_modules, )
true
true
f702425a5ae41f02c61077b11e3cd43acf7df328
3,517
py
Python
comic_classify/comic_detect.py
docileninja/Calvin-and-Hobbes-Viewer
74ff2e090e040517e2b445432a5ea6c0f87df49b
[ "MIT" ]
2
2017-01-10T03:22:19.000Z
2017-02-14T02:57:21.000Z
comic_classify/comic_detect.py
sciencemanx/Calvin-and-Hobbes-Viewer
74ff2e090e040517e2b445432a5ea6c0f87df49b
[ "MIT" ]
null
null
null
comic_classify/comic_detect.py
sciencemanx/Calvin-and-Hobbes-Viewer
74ff2e090e040517e2b445432a5ea6c0f87df49b
[ "MIT" ]
3
2018-12-28T04:57:54.000Z
2020-06-24T04:11:48.000Z
from sklearn import svm, cluster from PIL import Image, ImageDraw import os import sys import random def load_images(dirname): images = [] for image_name in os.listdir(dirname): if image_name.startswith('.'): continue image = Image.open(dirname + '/' + image_name).convert('1') x, y = image.size image = ...
28.827869
99
0.67387
from sklearn import svm, cluster from PIL import Image, ImageDraw import os import sys import random def load_images(dirname): images = [] for image_name in os.listdir(dirname): if image_name.startswith('.'): continue image = Image.open(dirname + '/' + image_name).convert('1') x, y = image.size image = ...
true
true
f70242cd924626b37f0454ea32519e3c989f44e0
9,876
py
Python
python/handwritten_baseline/pipeline/data/loader/ecb_reader_utils.py
UKPLab/cdcr-beyond-corpus-tailored
52bf98692c7464f25628baea24addd1a988f9a1f
[ "Apache-2.0" ]
10
2020-11-28T05:01:04.000Z
2021-12-21T19:34:00.000Z
python/handwritten_baseline/pipeline/data/loader/ecb_reader_utils.py
UKPLab/cdcr-beyond-corpus-tailored
52bf98692c7464f25628baea24addd1a988f9a1f
[ "Apache-2.0" ]
1
2022-03-12T07:20:39.000Z
2022-03-16T05:11:38.000Z
python/handwritten_baseline/pipeline/data/loader/ecb_reader_utils.py
UKPLab/cdcr-beyond-corpus-tailored
52bf98692c7464f25628baea24addd1a988f9a1f
[ "Apache-2.0" ]
1
2021-12-21T19:34:08.000Z
2021-12-21T19:34:08.000Z
import logging import os import re import xml.etree.ElementTree as ET from pathlib import Path from typing import Any, Tuple, Optional import pandas as pd from python import TOPIC_ID, SUBTOPIC, DOCUMENT_NUMBER, DOCUMENT_ID, SENTENCE_IDX, TOKEN_IDX, TOKEN_IDX_TO, \ TOKEN_IDX_FROM, TOKEN, MENTION_ID, EVENT, MENTION...
50.13198
183
0.691272
import logging import os import re import xml.etree.ElementTree as ET from pathlib import Path from typing import Any, Tuple, Optional import pandas as pd from python import TOPIC_ID, SUBTOPIC, DOCUMENT_NUMBER, DOCUMENT_ID, SENTENCE_IDX, TOKEN_IDX, TOKEN_IDX_TO, \ TOKEN_IDX_FROM, TOKEN, MENTION_ID, EVENT, MENTION...
true
true
f70245611ab460b5a18c19a0fe4fb4223b15e2ca
3,343
py
Python
simplesocial/simplesocial/settings.py
Thesirloc/Stargazer-club-django
90d2d95f7bb282756582734c591b37b9473b992e
[ "MIT" ]
1
2022-02-06T06:26:23.000Z
2022-02-06T06:26:23.000Z
simplesocial/simplesocial/settings.py
Thesirloc/Stargazer-club-django
90d2d95f7bb282756582734c591b37b9473b992e
[ "MIT" ]
null
null
null
simplesocial/simplesocial/settings.py
Thesirloc/Stargazer-club-django
90d2d95f7bb282756582734c591b37b9473b992e
[ "MIT" ]
2
2018-12-30T12:59:11.000Z
2019-01-23T12:50:35.000Z
""" Django settings for simplesocial project. Generated by 'django-admin startproject' using Django 2.0.5. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import ...
25.914729
91
0.69668
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) TEMPLAE_DIR = os.path.join(BASE_DIR, 'templates') SECRET_KEY = '%2^#bfjd61932k^l^fz4ztt+e*9ahjda(7w3xaa0d+^@a&=-6*' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', '...
true
true
f7024605869dd7788905637cfccaa41707efb6c3
256
py
Python
data/scripts/reverse.py
levindu/OpenCC
345ea91303e5b3d9332dc51ea73370dac83e4c6b
[ "Apache-2.0" ]
43
2018-09-17T00:45:35.000Z
2021-11-14T23:56:45.000Z
data/scripts/reverse.py
levindu/OpenCC
345ea91303e5b3d9332dc51ea73370dac83e4c6b
[ "Apache-2.0" ]
7
2019-11-26T10:48:14.000Z
2021-06-13T04:49:58.000Z
data/scripts/reverse.py
levindu/OpenCC
345ea91303e5b3d9332dc51ea73370dac83e4c6b
[ "Apache-2.0" ]
6
2018-09-17T02:09:59.000Z
2020-08-15T13:57:44.000Z
#!/usr/bin/env python #coding: utf-8 import sys from common import reverse_items if len(sys.argv) != 3: print("Reverse key and value of all pairs") print(("Usage: ", sys.argv[0], "[input] [output]")) exit(1) reverse_items(sys.argv[1], sys.argv[2])
21.333333
53
0.671875
import sys from common import reverse_items if len(sys.argv) != 3: print("Reverse key and value of all pairs") print(("Usage: ", sys.argv[0], "[input] [output]")) exit(1) reverse_items(sys.argv[1], sys.argv[2])
true
true
f70246589eef38aa124a119a1dbb44c4c2cf9dfc
6,422
py
Python
docker/Dockerfile.py
danieldanciu/toil
5089ccd0ec9dc48e3b3947deabd67fbb8e667d39
[ "Apache-2.0" ]
null
null
null
docker/Dockerfile.py
danieldanciu/toil
5089ccd0ec9dc48e3b3947deabd67fbb8e667d39
[ "Apache-2.0" ]
null
null
null
docker/Dockerfile.py
danieldanciu/toil
5089ccd0ec9dc48e3b3947deabd67fbb8e667d39
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2015-2016 Regents of the University of California # # 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 app...
39.158537
194
0.618187
from __future__ import print_function import os import textwrap applianceSelf = os.environ['TOIL_APPLIANCE_SELF'] sdistName = os.environ['_TOIL_SDIST_NAME'] dependencies = ' '.join(['libffi-dev', 'python3.6', 'python3.6-dev', ...
true
true
f7024664218bf4abb7bd1e6581a318ef1357b07c
2,021
py
Python
tools/ci/tc/tests/test_decision.py
BasixKOR/wpt
aa27d567c10dcdb2aea6884d5155dfaaa177a800
[ "BSD-3-Clause" ]
null
null
null
tools/ci/tc/tests/test_decision.py
BasixKOR/wpt
aa27d567c10dcdb2aea6884d5155dfaaa177a800
[ "BSD-3-Clause" ]
59
2022-01-19T21:35:57.000Z
2022-03-30T21:35:27.000Z
tools/ci/tc/tests/test_decision.py
BasixKOR/wpt
aa27d567c10dcdb2aea6884d5155dfaaa177a800
[ "BSD-3-Clause" ]
null
null
null
# mypy: allow-untyped-defs from unittest import mock import pytest from tools.ci.tc import decision @pytest.mark.parametrize("run_jobs,tasks,expected", [ ([], {"task-no-schedule-if": {}}, ["task-no-schedule-if"]), ([], {"task-schedule-if-no-run-job": {"schedule-if": {}}}, []), (["job"], {"job-pres...
35.45614
85
0.562098
from unittest import mock import pytest from tools.ci.tc import decision @pytest.mark.parametrize("run_jobs,tasks,expected", [ ([], {"task-no-schedule-if": {}}, ["task-no-schedule-if"]), ([], {"task-schedule-if-no-run-job": {"schedule-if": {}}}, []), (["job"], {"job-present": {"schedule-if": {"ru...
true
true
f70247e814ef6527174be10cc686a320fe4b2b46
1,540
py
Python
ParameterFiles/params_en1_i.py
dunkenj/eazy-pype
9cb8ac765d659ace36c00293a5809fc4a066e1ec
[ "MIT" ]
1
2019-07-25T10:55:18.000Z
2019-07-25T10:55:18.000Z
ParameterFiles/params_en1_i.py
dunkenj/eazy-pype
9cb8ac765d659ace36c00293a5809fc4a066e1ec
[ "MIT" ]
null
null
null
ParameterFiles/params_en1_i.py
dunkenj/eazy-pype
9cb8ac765d659ace36c00293a5809fc4a066e1ec
[ "MIT" ]
1
2018-12-18T16:31:41.000Z
2018-12-18T16:31:41.000Z
""" Main inputs: (Change for all fields) """ eazypath = '/data2/ken/photoz/eazy-photoz/src/eazy ' working_folder = '/data2/ken/EN1_pani' photometry_catalog = 'en1_phot_with_zspec.fits' photometry_format = 'fits' filter_file = 'EN1_filters.res' translate_file = 'EN1.translate' zspec_col = 'z_spec' flux_col = 'flux' ...
18.333333
92
0.677273
eazypath = '/data2/ken/photoz/eazy-photoz/src/eazy ' working_folder = '/data2/ken/EN1_pani' photometry_catalog = 'en1_phot_with_zspec.fits' photometry_format = 'fits' filter_file = 'EN1_filters.res' translate_file = 'EN1.translate' zspec_col = 'z_spec' flux_col = 'flux' fluxerr_col ='fluxerr' do_zp = False do_zp_te...
true
true
f702480ed21c1be212847c37c1516de78ef6c252
3,071
py
Python
bfstpw/views.py
dkess/bfstpw
c1f4ca4126f33e16e756c109c3b0b34f68bbb351
[ "MIT" ]
null
null
null
bfstpw/views.py
dkess/bfstpw
c1f4ca4126f33e16e756c109c3b0b34f68bbb351
[ "MIT" ]
null
null
null
bfstpw/views.py
dkess/bfstpw
c1f4ca4126f33e16e756c109c3b0b34f68bbb351
[ "MIT" ]
null
null
null
from bfstpw.models import ForumThread, ForumPost from datetime import datetime from django.conf import settings from django.core.paginator import Paginator from django.core.urlresolvers import reverse from django.db.models import Count from django.http import HttpResponseRedirect from django.shortcuts import render, ge...
39.883117
102
0.674048
from bfstpw.models import ForumThread, ForumPost from datetime import datetime from django.conf import settings from django.core.paginator import Paginator from django.core.urlresolvers import reverse from django.db.models import Count from django.http import HttpResponseRedirect from django.shortcuts import render, ge...
true
true
f7024c75af5406622e35a63a1f78be3767533815
7,631
py
Python
Cream/lib/models/builders/build_childnet.py
wkcn/AutoML
106cb0fbc19fa116c4ef5caf232acaaea85822c8
[ "MIT" ]
307
2020-10-29T13:17:02.000Z
2022-03-30T09:55:49.000Z
Cream/lib/models/builders/build_childnet.py
QPC-database/AutoML
75d86a5e3366a6c9af6c2001ee1ba4fc41c5d6cb
[ "MIT" ]
42
2020-10-30T07:09:48.000Z
2022-03-29T13:54:56.000Z
Cream/lib/models/builders/build_childnet.py
QPC-database/AutoML
75d86a5e3366a6c9af6c2001ee1ba4fc41c5d6cb
[ "MIT" ]
64
2020-10-30T10:08:48.000Z
2022-03-30T06:51:01.000Z
from lib.utils.util import * from timm.models.efficientnet_blocks import * # ChildNet Builder definition. class ChildNetBuilder: def __init__( self, channel_multiplier=1.0, channel_divisor=8, channel_min=None, output_stride=32, pad_type='', ...
41.928571
103
0.538462
from lib.utils.util import * from timm.models.efficientnet_blocks import * class ChildNetBuilder: def __init__( self, channel_multiplier=1.0, channel_divisor=8, channel_min=None, output_stride=32, pad_type='', act_layer=None, ...
true
true