hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c46640f92964d3b0eb444b0e03fd6c6ff9d1033
9,349
py
Python
platformio/commands/check.py
xeno010/platformio-core
94f8afec38fc8d35db1055368f5fbe4e67c89e7e
[ "Apache-2.0" ]
null
null
null
platformio/commands/check.py
xeno010/platformio-core
94f8afec38fc8d35db1055368f5fbe4e67c89e7e
[ "Apache-2.0" ]
null
null
null
platformio/commands/check.py
xeno010/platformio-core
94f8afec38fc8d35db1055368f5fbe4e67c89e7e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
31.90785
87
0.587656
import os from collections import Counter from os.path import basename, dirname, isfile, join from time import time import click from tabulate import tabulate from platformio import exception, fs, util from platformio.check.defect import DefectItem from platformio.check.tools import CheckToolFactory from platformio...
true
true
1c46642673cb78f0a633c5d3ee8ef83f7a8d8c9d
3,761
py
Python
python/spidriver.py
boxofrox/spidriver
4e4cf254f1ad337fb299e3c08eb105ae13fa081f
[ "BSD-3-Clause" ]
4
2021-04-21T21:37:57.000Z
2022-02-10T06:56:01.000Z
python/spidriver.py
boxofrox/spidriver
4e4cf254f1ad337fb299e3c08eb105ae13fa081f
[ "BSD-3-Clause" ]
null
null
null
python/spidriver.py
boxofrox/spidriver
4e4cf254f1ad337fb299e3c08eb105ae13fa081f
[ "BSD-3-Clause" ]
5
2019-09-25T15:19:48.000Z
2021-09-08T10:33:31.000Z
# coding=utf-8 import sys import serial __version__ = '0.0.2' PYTHON2 = (sys.version_info < (3, 0)) class SPIDriver: """ SPIDriver interface. The following variables are available: product product code e.g. 'spidriver1' serial serial string of SPIDriver uptime ti...
26.864286
70
0.488168
import sys import serial __version__ = '0.0.2' PYTHON2 = (sys.version_info < (3, 0)) class SPIDriver: def __init__(self, port="/dev/ttyUSB0"): self.ser = serial.Serial(port, 460800, timeout=1) self.ser.write(b'@' * 64) while self.ser.inWaiting(): self.ser.read(1) ...
true
true
1c46646062a09d65a5e7407db23335596075f971
5,160
py
Python
docs/source/conf.py
Zhiwei-Lu/pyvaspflow
b80eab3e8bfc52aed6a2459dd32655f1075d9058
[ "MIT" ]
13
2019-06-03T11:41:35.000Z
2022-03-04T07:45:42.000Z
docs/source/conf.py
Zhiwei-Lu/pyvaspflow
b80eab3e8bfc52aed6a2459dd32655f1075d9058
[ "MIT" ]
2
2019-03-12T10:51:15.000Z
2019-03-14T02:18:18.000Z
docs/source/conf.py
Zhiwei-Lu/pyvaspflow
b80eab3e8bfc52aed6a2459dd32655f1075d9058
[ "MIT" ]
8
2019-06-03T03:20:20.000Z
2021-01-06T11:48:37.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
30.352941
79
0.645543
import os import sys sys.path.insert(0, os.path.abspath('../..')) autodoc_mock_imports = ['spglib', 'ase'] project = 'pyvaspflowdoc' copyright = '2019, ChangChun He' author = 'ChangChun He' version = '0.0.1' release = '0.1.0' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.math...
true
true
1c4665040f1d2e9fa827001815877d94a40df77a
4,964
py
Python
pypureclient/flasharray/FA_2_7/models/policy_rule_snapshot_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_7/models/policy_rule_snapshot_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_7/models/policy_rule_snapshot_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ....
38.184615
524
0.615834
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_7 import models class PolicyRuleSnapshotGetResponse(object): swagger_types = { 'more_items_remaining': 'bool', 'total_item_count': 'int', ...
true
true
1c466520334bf6074bf6400dd3e06d73f8b1465a
6,434
py
Python
electroncash_plugins/fusion/connection.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
208
2017-07-25T19:52:15.000Z
2018-09-21T13:44:58.000Z
electroncash_plugins/fusion/connection.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
1,478
2018-09-24T09:30:13.000Z
2022-03-29T15:48:17.000Z
electroncash_plugins/fusion/connection.py
christroutner/Electron-Cash
d5217ed3e878bd56977181f022f9e5c43f449241
[ "MIT" ]
159
2018-09-24T12:56:47.000Z
2022-03-28T23:52:17.000Z
#!/usr/bin/env python3 # # Electron Cash - a lightweight Bitcoin Cash client # CashFusion - an advanced coin anonymizer # # Copyright (C) 2020 Mark B. Lundeberg # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to d...
35.744444
124
0.639882
import certifi import socket import socks import ssl import time from contextlib import suppress sslcontext = ssl.create_default_context(cafile=certifi.where()) class BadFrameError(Exception): pass def open_connection(host, port, conn_timeout = 5.0, default_timeout = 5.0, ssl = False, socks_opts=None): if ...
true
true
1c46653ea6548a2a103e0f864db3564637b4a532
6,220
py
Python
tests/test_validators.py
wigeria/selenium-yaml-core
9f953a24ad6f47d0a8423ec78f2e8d29babff89a
[ "Apache-2.0" ]
2
2020-06-28T11:08:20.000Z
2021-12-01T13:12:11.000Z
tests/test_validators.py
wigeria/selenium-yaml-core
9f953a24ad6f47d0a8423ec78f2e8d29babff89a
[ "Apache-2.0" ]
5
2020-10-12T13:02:20.000Z
2021-05-20T14:04:14.000Z
tests/test_validators.py
wigeria/selenium-yaml-core
9f953a24ad6f47d0a8423ec78f2e8d29babff89a
[ "Apache-2.0" ]
null
null
null
""" Contains tests for the base Validators included in selenium_yaml.validators """ from selenium_yaml import validators import os class ValidationTestMixin: """ Contains basic methods for checking whether a validation was a success or a failure """ def is_successful_validation(self, validator, ...
39.119497
79
0.671383
from selenium_yaml import validators import os class ValidationTestMixin: def is_successful_validation(self, validator, value): assert validator.is_valid(value) is True assert isinstance(validator.error, str) assert len(validator.error) == 0 def is_unsuccessful_validation(self, vali...
true
true
1c46658b4f19b64b4fc2645b72a26baec8f56676
1,490
py
Python
examples/python-guide/sklearn_example.py
harunpehlivan/LightGBM
8ba65be9c93b79c095ea06e74de2cc5bf35ab169
[ "MIT" ]
59
2017-03-09T15:33:52.000Z
2021-09-16T05:47:10.000Z
examples/python-guide/sklearn_example.py
harunpehlivan/LightGBM
8ba65be9c93b79c095ea06e74de2cc5bf35ab169
[ "MIT" ]
1
2017-03-09T07:43:02.000Z
2017-04-09T19:34:06.000Z
examples/python-guide/sklearn_example.py
harunpehlivan/LightGBM
8ba65be9c93b79c095ea06e74de2cc5bf35ab169
[ "MIT" ]
17
2017-03-27T06:37:47.000Z
2020-05-28T09:17:38.000Z
# coding: utf-8 # pylint: disable = invalid-name, C0111 import lightgbm as lgb import pandas as pd from sklearn.metrics import mean_squared_error from sklearn.model_selection import GridSearchCV # load or create your dataset print('Load data...') df_train = pd.read_csv('../regression/regression.train', header=None, se...
28.653846
79
0.699329
import lightgbm as lgb import pandas as pd from sklearn.metrics import mean_squared_error from sklearn.model_selection import GridSearchCV print('Load data...') df_train = pd.read_csv('../regression/regression.train', header=None, sep='\t') df_test = pd.read_csv('../regression/regression.test', header=None, sep='\t') ...
true
true
1c4665f87ee43e6b0bf3543beac6d08684c8b95e
1,638
py
Python
examples/01-filter/decimate.py
sthagen/pyvista-pyvista
450db9a8d8ad2feea78e10368c47d9aa0e575e65
[ "MIT" ]
25
2018-12-03T18:22:58.000Z
2019-02-26T01:30:35.000Z
examples/01-filter/decimate.py
sthagen/pyvista
ffba268b285925eb6103c8ff5072fcf1c0212c53
[ "MIT" ]
108
2019-02-27T19:52:12.000Z
2019-05-08T02:15:21.000Z
examples/01-filter/decimate.py
pyvista/vista
c49a6abae7cc62d242f12ec45a6b22b524db1ec8
[ "MIT" ]
8
2019-03-02T13:41:48.000Z
2019-04-22T16:57:44.000Z
""" .. _decimate_example: Decimation ~~~~~~~~~~ Decimate a mesh """ # sphinx_gallery_thumbnail_number = 4 import pyvista as pv from pyvista import examples mesh = examples.download_face() # Define a camera position that shows this mesh properly cpos = [(0.4, -0.07, -0.31), (0.05, -0.13, -0.06), (-0.1, 1, 0.08)] da...
26.419355
79
0.589133
import pyvista as pv from pyvista import examples mesh = examples.download_face() cpos = [(0.4, -0.07, -0.31), (0.05, -0.13, -0.06), (-0.1, 1, 0.08)] dargs = dict(show_edges=True, color=True) mesh.plot(cpos=cpos, **dargs) # :func:`pyvista.PolyData.decimate` and :func:`pyvista.PolyData.decimate_pro` # filters. targe...
true
true
1c46662dc412d1a358e2418e8c957b2eb8513589
1,984
py
Python
whitetube/migrations/0001_initial.py
AmanGiri007/youtube
b58009581378bf74cabfd791691dee65c9516685
[ "MIT" ]
null
null
null
whitetube/migrations/0001_initial.py
AmanGiri007/youtube
b58009581378bf74cabfd791691dee65c9516685
[ "MIT" ]
null
null
null
whitetube/migrations/0001_initial.py
AmanGiri007/youtube
b58009581378bf74cabfd791691dee65c9516685
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-07-31 15:45 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
41.333333
118
0.602319
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
1c4666b57524192be8803ca0b7c97e5673ce1bbb
7,276
py
Python
telethon/password.py
bb010g/Telethon
278f0e9e983d938589b6d541e71135ad5b6857c5
[ "MIT" ]
2
2021-04-29T14:19:25.000Z
2021-09-17T07:13:49.000Z
telethon/password.py
exceloo/Telethon
30a0e390603072d3ec57a2f0eef0a297a9b0321b
[ "MIT" ]
5
2021-04-30T21:14:18.000Z
2022-03-12T00:21:58.000Z
telethon/password.py
exceloo/Telethon
30a0e390603072d3ec57a2f0eef0a297a9b0321b
[ "MIT" ]
1
2020-04-16T22:02:26.000Z
2020-04-16T22:02:26.000Z
import hashlib import os from .crypto import factorization from .tl import types def check_prime_and_good_check(prime: int, g: int): good_prime_bits_count = 2048 if prime < 0 or prime.bit_length() != good_prime_bits_count: raise ValueError('bad prime count {}, expected {}' .f...
36.562814
141
0.617097
import hashlib import os from .crypto import factorization from .tl import types def check_prime_and_good_check(prime: int, g: int): good_prime_bits_count = 2048 if prime < 0 or prime.bit_length() != good_prime_bits_count: raise ValueError('bad prime count {}, expected {}' .f...
true
true
1c46679f018a8751f25fbf73754145fb78d2528e
982
py
Python
controller/liff_controller.py
louis70109/LIFF-to-LIFF-Example
1e3d90f7989b5b69090a7b2e3a41c74b3ae3c90b
[ "MIT" ]
null
null
null
controller/liff_controller.py
louis70109/LIFF-to-LIFF-Example
1e3d90f7989b5b69090a7b2e3a41c74b3ae3c90b
[ "MIT" ]
null
null
null
controller/liff_controller.py
louis70109/LIFF-to-LIFF-Example
1e3d90f7989b5b69090a7b2e3a41c74b3ae3c90b
[ "MIT" ]
null
null
null
import os from flask import request, render_template, Response from flask_restful import Resource LIFF_A = os.getenv('LIFF_SHARE_A') LIFF_B = os.getenv('LIFF_SHARE_B') SHARE_A = f"https://liff.line.me/{LIFF_A}" SHARE_B = f"https://liff.line.me/{LIFF_B}" class LiffAController(Resource): def __init__(self, *args, ...
33.862069
99
0.689409
import os from flask import request, render_template, Response from flask_restful import Resource LIFF_A = os.getenv('LIFF_SHARE_A') LIFF_B = os.getenv('LIFF_SHARE_B') SHARE_A = f"https://liff.line.me/{LIFF_A}" SHARE_B = f"https://liff.line.me/{LIFF_B}" class LiffAController(Resource): def __init__(self, *args, ...
true
true
1c4667e358c0ed6a68e36d3ec4c4fde1c83f9ab6
2,831
py
Python
members_only/views.py
TamasPalfi/FixedDB
be3e4e830b05099d33031759f4a7fc8a42f1e733
[ "BSD-2-Clause" ]
null
null
null
members_only/views.py
TamasPalfi/FixedDB
be3e4e830b05099d33031759f4a7fc8a42f1e733
[ "BSD-2-Clause" ]
null
null
null
members_only/views.py
TamasPalfi/FixedDB
be3e4e830b05099d33031759f4a7fc8a42f1e733
[ "BSD-2-Clause" ]
null
null
null
from django.shortcuts import render from rest_framework import viewsets from rest_framework.response import Response from rest_framework.decorators import action from members_only.models import User, Post, Comment, Photo, ShortLink from members_only.serializers import UserSerializer, UserSetupSerializer, PostSerializer...
37.746667
145
0.741434
from django.shortcuts import render from rest_framework import viewsets from rest_framework.response import Response from rest_framework.decorators import action from members_only.models import User, Post, Comment, Photo, ShortLink from members_only.serializers import UserSerializer, UserSetupSerializer, PostSerializer...
true
true
1c46683814368973d3a6672199085b7f7bf2c538
335
py
Python
challenge/D09/Point.py
pengfei99/AdventOfCode2021
7aeaf417521fc3acf6b34259b78b9534e1c9f912
[ "Apache-2.0" ]
1
2022-03-27T09:48:34.000Z
2022-03-27T09:48:34.000Z
challenge/D09/Point.py
pengfei99/AdventOfCode2021
7aeaf417521fc3acf6b34259b78b9534e1c9f912
[ "Apache-2.0" ]
null
null
null
challenge/D09/Point.py
pengfei99/AdventOfCode2021
7aeaf417521fc3acf6b34259b78b9534e1c9f912
[ "Apache-2.0" ]
null
null
null
class Point: def __init__(self, value): self.value = value self.mark = False def __str__(self): return f"value: {self.value}, marked: {self.mark}" def get_value(self): return self.value def get_mark(self): return self.mark def mark_point(self): se...
18.611111
58
0.58209
class Point: def __init__(self, value): self.value = value self.mark = False def __str__(self): return f"value: {self.value}, marked: {self.mark}" def get_value(self): return self.value def get_mark(self): return self.mark def mark_point(self): se...
true
true
1c46686d9bf0cf7f5d046349ac7a9f5fc444fa5e
2,984
py
Python
openslides_backend/action/actions/committee/update.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
openslides_backend/action/actions/committee/update.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
openslides_backend/action/actions/committee/update.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
from typing import Any, Dict from ....models.models import Committee from ....permissions.management_levels import ( CommitteeManagementLevel, OrganizationManagementLevel, ) from ....permissions.permission_helper import ( has_committee_management_level, has_organization_management_level, ) from ....sha...
33.155556
88
0.632373
from typing import Any, Dict from ....models.models import Committee from ....permissions.management_levels import ( CommitteeManagementLevel, OrganizationManagementLevel, ) from ....permissions.permission_helper import ( has_committee_management_level, has_organization_management_level, ) from ....sha...
true
true
1c4668cd01cebff276c684dd00b647ddfd8b4381
40,948
py
Python
venv/lib/python2.7/site-packages/cffi/vengine_cpy.py
deandunbar/html2bwml
32c06a93c8daf6a26c89c0de58fd39859d1ddb1e
[ "MIT" ]
4
2017-09-17T03:27:47.000Z
2020-04-29T00:10:20.000Z
venv/lib/python2.7/site-packages/cffi/vengine_cpy.py
deandunbar/html2bwml
32c06a93c8daf6a26c89c0de58fd39859d1ddb1e
[ "MIT" ]
null
null
null
venv/lib/python2.7/site-packages/cffi/vengine_cpy.py
deandunbar/html2bwml
32c06a93c8daf6a26c89c0de58fd39859d1ddb1e
[ "MIT" ]
5
2017-09-20T08:08:43.000Z
2022-02-02T08:19:30.000Z
import sys, imp from . import model, ffiplatform class VCPythonEngine(object): _class_key = 'x' _gen_python_module = True def __init__(self, verifier): self.verifier = verifier self.ffi = verifier.ffi self._struct_pending_verification = {} self._types_of_builtin_functions ...
40.988989
79
0.546962
import sys, imp from . import model, ffiplatform class VCPythonEngine(object): _class_key = 'x' _gen_python_module = True def __init__(self, verifier): self.verifier = verifier self.ffi = verifier.ffi self._struct_pending_verification = {} self._types_of_builtin_functions ...
true
true
1c46691999965d62eea11bab0f726d607f2615d6
5,738
py
Python
iot/main.py
jonDufty/snsrpi-device
0e2d8023093385e1ec457560e8880c43036c73dc
[ "MIT" ]
null
null
null
iot/main.py
jonDufty/snsrpi-device
0e2d8023093385e1ec457560e8880c43036c73dc
[ "MIT" ]
null
null
null
iot/main.py
jonDufty/snsrpi-device
0e2d8023093385e1ec457560e8880c43036c73dc
[ "MIT" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. import argparse from ShadowHandler import SensorShadowHandler, GlobalShadowHandler from awscrt import io, mqtt, auth, http from awsiot import mqtt_connection_builder, iotshadow import sys import os import signal...
34.154762
111
0.729697
import argparse from ShadowHandler import SensorShadowHandler, GlobalShadowHandler from awscrt import io, mqtt, auth, http from awsiot import mqtt_connection_builder, iotshadow import sys import os import signal import threading import json import time from datetime import datetime, timedelta from uuid import uuid4 fr...
true
true
1c466940b6dc99ba7aabaaea9b7a0414ef2ddf39
13,009
py
Python
formfactory/tests/test_base.py
AltusBarry/django-formfactory
8da378d0952bfd0eb9a08d49b17b5b95ee7e607d
[ "BSD-3-Clause" ]
null
null
null
formfactory/tests/test_base.py
AltusBarry/django-formfactory
8da378d0952bfd0eb9a08d49b17b5b95ee7e607d
[ "BSD-3-Clause" ]
null
null
null
formfactory/tests/test_base.py
AltusBarry/django-formfactory
8da378d0952bfd0eb9a08d49b17b5b95ee7e607d
[ "BSD-3-Clause" ]
null
null
null
import os import shutil import uuid from django.conf import settings from formfactory import models from formfactory.tests.models import Enum, EnumItem def cleanup_files(): test_file_dir = os.path.join(settings.MEDIA_ROOT, "uploads/test") shutil.rmtree(test_file_dir, ignore_errors=True) def load_fixtures(...
30.609412
82
0.568376
import os import shutil import uuid from django.conf import settings from formfactory import models from formfactory.tests.models import Enum, EnumItem def cleanup_files(): test_file_dir = os.path.join(settings.MEDIA_ROOT, "uploads/test") shutil.rmtree(test_file_dir, ignore_errors=True) def load_fixtures(...
true
true
1c466974e1deea98828676448579173ed8d0bcef
357
py
Python
rusel/config.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
rusel/config.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
rusel/config.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
from task.const import * app_config = { 'name': APP_ALL, 'app_title': 'search results', 'icon': 'search', 'role': ROLE_SEARCH_RESULTS, 'sort': [ ('name', 'name'), ('created', 'create date'), ], 'views': { 'search': { 'icon': 'search', 'title':...
19.833333
38
0.456583
from task.const import * app_config = { 'name': APP_ALL, 'app_title': 'search results', 'icon': 'search', 'role': ROLE_SEARCH_RESULTS, 'sort': [ ('name', 'name'), ('created', 'create date'), ], 'views': { 'search': { 'icon': 'search', 'title':...
true
true
1c466c2eb51ca67b46ef055458e6f5edc433953f
8,546
py
Python
handler.py
abizerlokhandwala/Cowin-Notification-Service
4fd7fd9c3cfab37502ad4135007a6127ca4cc15f
[ "MIT" ]
14
2021-05-07T13:09:03.000Z
2022-01-10T23:24:42.000Z
handler.py
abizerlokhandwala/Cowin-Notification-Service
4fd7fd9c3cfab37502ad4135007a6127ca4cc15f
[ "MIT" ]
16
2021-05-10T16:41:21.000Z
2021-06-09T14:49:03.000Z
handler.py
abizerlokhandwala/Cowin-Notification-Service
4fd7fd9c3cfab37502ad4135007a6127ca4cc15f
[ "MIT" ]
5
2021-05-09T12:14:03.000Z
2021-06-08T13:56:55.000Z
import asyncio import json import logging import random from datetime import date import boto3 from helpers.constants import ISSUE_MSG, DB_NAME from helpers.cowin_sdk import CowinAPI from helpers.db_handler import DBHandler, get_pin_code_location from helpers.notificationHandler import NotifHandler from helpers.queri...
38.845455
118
0.662064
import asyncio import json import logging import random from datetime import date import boto3 from helpers.constants import ISSUE_MSG, DB_NAME from helpers.cowin_sdk import CowinAPI from helpers.db_handler import DBHandler, get_pin_code_location from helpers.notificationHandler import NotifHandler from helpers.queri...
true
true
1c466c5148c6b829d6eaaf73cbd026659824bb69
1,098
py
Python
2021/25/day25.py
AlbertVeli/AdventOfCode
3d3473695318a0686fac720a1a21dd3629f09e33
[ "Unlicense" ]
null
null
null
2021/25/day25.py
AlbertVeli/AdventOfCode
3d3473695318a0686fac720a1a21dd3629f09e33
[ "Unlicense" ]
null
null
null
2021/25/day25.py
AlbertVeli/AdventOfCode
3d3473695318a0686fac720a1a21dd3629f09e33
[ "Unlicense" ]
1
2021-12-04T10:37:09.000Z
2021-12-04T10:37:09.000Z
#!/usr/bin/env python3 import sys import numpy as np if len(sys.argv) != 2: print('Usage:', sys.argv[0], '<input.txt>') sys.exit(1) a = [] for line in open(sys.argv[1]): a.append(list(line.rstrip())) a = np.array(a) sy, sx = a.shape # Could probably move without copying a # but logic is simpler if keepi...
21.115385
47
0.441712
import sys import numpy as np if len(sys.argv) != 2: print('Usage:', sys.argv[0], '<input.txt>') sys.exit(1) a = [] for line in open(sys.argv[1]): a.append(list(line.rstrip())) a = np.array(a) sy, sx = a.shape def move(a): moved = False a_org = np.array(a) for y in range(sy): ny ...
true
true
1c466c8c0bd43fad411e356a53e99baf9f31c048
987
py
Python
2019/25_Josepus_Survivor/my_solution.py
erik-kristofer-anderson/codewars
fda780f40d1a2d8c5210cfd6ccf81148444bc9e8
[ "MIT" ]
null
null
null
2019/25_Josepus_Survivor/my_solution.py
erik-kristofer-anderson/codewars
fda780f40d1a2d8c5210cfd6ccf81148444bc9e8
[ "MIT" ]
1
2019-07-27T15:42:25.000Z
2019-07-27T15:42:25.000Z
2019/25_Josepus_Survivor/my_solution.py
erik-kristofer-anderson/Codewars
fda780f40d1a2d8c5210cfd6ccf81148444bc9e8
[ "MIT" ]
null
null
null
def josephus_survivor(n,k): my_array = list(range(1, n+1)) # print(my_array) i = 0 while len(my_array) > 1: length = len(my_array) # print(my_array) # print(length) # print('i', i) while not i < length: i -= length i += k - 1 while not ...
22.953488
38
0.449848
def josephus_survivor(n,k): my_array = list(range(1, n+1)) i = 0 while len(my_array) > 1: length = len(my_array) while not i < length: i -= length i += k - 1 while not i < length: i -= length ...
true
true
1c466d37b86970653faf38b62fdf0da523eb0c8b
284
py
Python
src/Distiller/textbrewer/distillers.py
haroldNLP/Distiller
f3ab5f94a9092fca1e2bdb9f486e66fd0b24bcfd
[ "MIT" ]
2
2022-03-21T08:02:02.000Z
2022-03-21T08:29:07.000Z
src/Distiller/textbrewer/distillers.py
haroldNLP/Distiller
f3ab5f94a9092fca1e2bdb9f486e66fd0b24bcfd
[ "MIT" ]
null
null
null
src/Distiller/textbrewer/distillers.py
haroldNLP/Distiller
f3ab5f94a9092fca1e2bdb9f486e66fd0b24bcfd
[ "MIT" ]
null
null
null
from .distiller_train import BasicTrainer from .distiller_basic import BasicDistiller from .distiller_general import GeneralDistiller from .distiller_multitask import MultiTaskDistiller from .distiller_multiteacher import MultiTeacherDistiller from .distiller_emd import EMDDistiller
40.571429
57
0.894366
from .distiller_train import BasicTrainer from .distiller_basic import BasicDistiller from .distiller_general import GeneralDistiller from .distiller_multitask import MultiTaskDistiller from .distiller_multiteacher import MultiTeacherDistiller from .distiller_emd import EMDDistiller
true
true
1c466db29b0f06ae975488369e9165135775e8e7
4,842
py
Python
src/models/sp_classifier_model_test.py
bartek-wojcik/graph_agregations
12305e4ffdf4db60da041689f04d96b48e9e72e5
[ "MIT" ]
null
null
null
src/models/sp_classifier_model_test.py
bartek-wojcik/graph_agregations
12305e4ffdf4db60da041689f04d96b48e9e72e5
[ "MIT" ]
null
null
null
src/models/sp_classifier_model_test.py
bartek-wojcik/graph_agregations
12305e4ffdf4db60da041689f04d96b48e9e72e5
[ "MIT" ]
null
null
null
from typing import Any, List import torch from pytorch_lightning import LightningModule from pytorch_lightning.metrics.classification import Accuracy from src.models.modules import gat, jumping_knowledge, graph_sage, gcn, vector_sage_module, jumping_knowledge_test class SuperpixelClassifierModelTest(LightningModule):...
42.104348
114
0.644981
from typing import Any, List import torch from pytorch_lightning import LightningModule from pytorch_lightning.metrics.classification import Accuracy from src.models.modules import gat, jumping_knowledge, graph_sage, gcn, vector_sage_module, jumping_knowledge_test class SuperpixelClassifierModelTest(LightningModule):...
true
true
1c466dc07772bb7c04ea801073ca12ed12884e52
7,794
py
Python
torchvision/datasets/celeba.py
kirilkoroves/torchvision-0.3.0
39f46d141f6a7ac2b094545c33936ad4500d3c7d
[ "BSD-3-Clause" ]
125
2020-06-17T19:58:56.000Z
2022-03-28T12:54:43.000Z
datasets/celeba.py
ANLGBOY/ddim
34d640e5180cc5ab378f84af6ed596cb0c810e6c
[ "MIT" ]
6
2021-03-19T15:30:28.000Z
2022-03-12T00:51:16.000Z
datasets/celeba.py
ANLGBOY/ddim
34d640e5180cc5ab378f84af6ed596cb0c810e6c
[ "MIT" ]
29
2020-06-18T19:24:04.000Z
2022-03-11T11:20:47.000Z
import torch import os import PIL from .vision import VisionDataset from .utils import download_file_from_google_drive, check_integrity class CelebA(VisionDataset): """`Large-scale CelebFaces Attributes (CelebA) Dataset <http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html>`_ Dataset. Args: root (string)...
47.52439
120
0.628689
import torch import os import PIL from .vision import VisionDataset from .utils import download_file_from_google_drive, check_integrity class CelebA(VisionDataset): base_folder = "celeba" file_list = [ ("0B7EVK8r0v71pZjFTYXZWM3FlRnM", "00d2c5bc6d35e252742224ab0c1e8fcb", "img_align...
true
true
1c466ddb0d67ce19e3f6d28c4f2f173c575e35e2
16,649
py
Python
netapp/santricity/api/symbol/p_api.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
netapp/santricity/api/symbol/p_api.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
netapp/santricity/api/symbol/p_api.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ PApi.py The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following condit...
41.210396
845
0.568983
from __future__ import absolute_import import sys import os from six import iteritems from ....santricity.configuration import Configuration from ....santricity.api_client import ApiClient class PApi(object): def __init__(self, api_client=None): config = Configuration() if api_client: ...
true
true
1c466e24cb956d06875072696560d66b6ce8e400
4,071
py
Python
alipay/aop/api/request/KoubeiMarketingCampaignItemBatchqueryRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/KoubeiMarketingCampaignItemBatchqueryRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/KoubeiMarketingCampaignItemBatchqueryRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiMarketingCampaignItemBatchqueryModel import KoubeiMarketingCampaignItemBatchqueryModel class KoubeiMarketingCamp...
28.075862
166
0.651437
import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiMarketingCampaignItemBatchqueryModel import KoubeiMarketingCampaignItemBatchqueryModel class KoubeiMarketingCampaignItemBatchqueryRequest(object): def __...
true
true
1c466e5cad5ca16ff031b3575687a75e615161ff
1,926
py
Python
tests/terraform/checks/resource/aws/test_S3MFADelete.py
cclauss/checkov
60a385fcaff1499cf00c2d0018575fe5ab71f556
[ "Apache-2.0" ]
5
2021-07-29T18:08:40.000Z
2022-03-21T04:39:32.000Z
tests/terraform/checks/resource/aws/test_S3MFADelete.py
cclauss/checkov
60a385fcaff1499cf00c2d0018575fe5ab71f556
[ "Apache-2.0" ]
16
2021-03-09T07:38:38.000Z
2021-06-09T03:53:55.000Z
tests/terraform/checks/resource/aws/test_S3MFADelete.py
cclauss/checkov
60a385fcaff1499cf00c2d0018575fe5ab71f556
[ "Apache-2.0" ]
2
2021-08-23T13:25:36.000Z
2021-11-05T21:44:52.000Z
import unittest from checkov.terraform.checks.resource.aws.S3MFADelete import scanner from checkov.common.models.enums import CheckResult class TestS3MFADelete(unittest.TestCase): def test_failure(self): resource_conf = {"region": ["us-west-2"], "bucket": ["my_bucket"], ...
40.125
72
0.475597
import unittest from checkov.terraform.checks.resource.aws.S3MFADelete import scanner from checkov.common.models.enums import CheckResult class TestS3MFADelete(unittest.TestCase): def test_failure(self): resource_conf = {"region": ["us-west-2"], "bucket": ["my_bucket"], ...
true
true
1c46706d423b7f39a9afbea8fb6279b3a302d7b9
3,384
py
Python
test/functional/test_framework/coverage.py
AlvaStudio/vtl2
0d0eeeaeb45d841086a9fabaeb77d3cad14c5f87
[ "MIT" ]
null
null
null
test/functional/test_framework/coverage.py
AlvaStudio/vtl2
0d0eeeaeb45d841086a9fabaeb77d3cad14c5f87
[ "MIT" ]
null
null
null
test/functional/test_framework/coverage.py
AlvaStudio/vtl2
0d0eeeaeb45d841086a9fabaeb77d3cad14c5f87
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Utilities for doing coverage analysis on the RPC interface. Provides a way to track which RPC commands...
30.763636
87
0.661052
import os REFERENCE_FILENAME = 'rpc_interface.txt' class AuthServiceProxyWrapper(): def __init__(self, auth_service_proxy_instance, coverage_logfile=None): self.auth_service_proxy_instance = auth_service_proxy_instance self.coverage_logfile = coverage_logfile def __getattr__(self, name): ...
true
true
1c467098f9187f933e5f2190a330b0d788c96cba
524
py
Python
lib/gensim/summarization/commons.py
duyetdev/api.duyetdev.com
4c33cc2cfb43ad6c4089873230e7b657659bff15
[ "MIT" ]
4
2018-11-27T01:35:30.000Z
2022-01-27T01:17:11.000Z
lib/gensim/summarization/commons.py
duyetdev/api.duyetdev.com
4c33cc2cfb43ad6c4089873230e7b657659bff15
[ "MIT" ]
12
2020-07-11T01:42:51.000Z
2020-08-12T17:17:35.000Z
lib/gensim/summarization/commons.py
duyetdev/api.duyetdev.com
4c33cc2cfb43ad6c4089873230e7b657659bff15
[ "MIT" ]
1
2018-11-27T01:35:33.000Z
2018-11-27T01:35:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html from gensim.summarization.graph import Graph def build_graph(sequence): graph = Graph() for item in sequence: if not graph.has_node(item): graph.add_node(item) re...
24.952381
89
0.658397
from gensim.summarization.graph import Graph def build_graph(sequence): graph = Graph() for item in sequence: if not graph.has_node(item): graph.add_node(item) return graph def remove_unreachable_nodes(graph): for node in graph.nodes(): if sum(graph.edge_weight((node, ot...
true
true
1c467153e4dd6d941d4fa3ba61730d6360584541
271
py
Python
lab_6.py
goni21-meet/meet2019y1lab6
c75fab3b544a13d1ad8bef13e5675ff5ea165a0d
[ "MIT" ]
null
null
null
lab_6.py
goni21-meet/meet2019y1lab6
c75fab3b544a13d1ad8bef13e5675ff5ea165a0d
[ "MIT" ]
null
null
null
lab_6.py
goni21-meet/meet2019y1lab6
c75fab3b544a13d1ad8bef13e5675ff5ea165a0d
[ "MIT" ]
null
null
null
#import turtle #x = 0 #while x<300: # y = x**2/300 # turtle.goto(x,y) # print( turtle.pos()) #x = x+100 #turtle.mainloop() import turtle num_pts = 5 for i in range(num_pts): turtle.left(360/num_pts) turtle.forward(100) turtle.mainloop()
11.291667
28
0.597786
import turtle num_pts = 5 for i in range(num_pts): turtle.left(360/num_pts) turtle.forward(100) turtle.mainloop()
true
true
1c46723f0a2b6f567ce353e54cc92039a142acf3
119
py
Python
h/groups/__init__.py
ssin122/test-h
c10062ae23b690afaac0ab4af7b9a5a5e4b686a9
[ "MIT" ]
2
2021-11-07T23:14:54.000Z
2021-11-17T10:11:55.000Z
h/groups/__init__.py
ssin122/test-h
c10062ae23b690afaac0ab4af7b9a5a5e4b686a9
[ "MIT" ]
null
null
null
h/groups/__init__.py
ssin122/test-h
c10062ae23b690afaac0ab4af7b9a5a5e4b686a9
[ "MIT" ]
1
2017-03-12T00:18:33.000Z
2017-03-12T00:18:33.000Z
# -*- coding: utf-8 -*- def includeme(config): config.memex_add_search_filter('h.groups.search.GroupAuthFilter')
19.833333
69
0.714286
def includeme(config): config.memex_add_search_filter('h.groups.search.GroupAuthFilter')
true
true
1c467277bdb5e4e30d2dce15c741769d571a9408
3,454
py
Python
lines/Segment.py
AlexTaguchi/lines
d091d52350d0bedc3c8af0aa5438b6a1da95151d
[ "MIT" ]
null
null
null
lines/Segment.py
AlexTaguchi/lines
d091d52350d0bedc3c8af0aa5438b6a1da95151d
[ "MIT" ]
null
null
null
lines/Segment.py
AlexTaguchi/lines
d091d52350d0bedc3c8af0aa5438b6a1da95151d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 class EvalPointError(ValueError): pass class Segment: def __init__(self): self.a = 0.0 # y = a.x + b self.b = 0.0 self._points = [] self._rss = 0.0 # Residual sum of squares self._wixiyi = 0.0 self._wixi = 0.0 self._wiyi = 0.0 ...
29.271186
77
0.486972
class EvalPointError(ValueError): pass class Segment: def __init__(self): self.a = 0.0 self.b = 0.0 self._points = [] self._rss = 0.0 self._wixiyi = 0.0 self._wixi = 0.0 self._wiyi = 0.0 self._wixi2 = 0.0 self._wi = 0.0 def getLe...
true
true
1c46739728bc3decdb8284725d1278b660ceff72
826
py
Python
pirates/creature/Monstrous.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
3
2021-02-25T06:38:13.000Z
2022-03-22T07:00:15.000Z
pirates/creature/Monstrous.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
null
null
null
pirates/creature/Monstrous.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
1
2021-02-25T06:38:17.000Z
2021-02-25T06:38:17.000Z
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.creature.Monstrous class Monstrous: __module__ = __name__ def initializeMonstrousTags(self, rootNodePath): fr...
37.545455
104
0.728814
class Monstrous: __module__ = __name__ def initializeMonstrousTags(self, rootNodePath): from pirates.piratesbase import PiratesGlobals rootNodePath.setPythonTag('MonstrousObject', self) self.setPythonTag('MonstrousObject', self) rootNodePath.setTag('objType', str(PiratesGlobal...
true
true
1c4674db514b2fd6be335133809c409cc899a512
6,171
py
Python
gpgrouper/containers.py
malovannaya-lab/gpgrouper
45cb948bfa9ed256e450ad8f257ec24324f786ca
[ "BSD-3-Clause" ]
5
2018-08-10T17:10:08.000Z
2020-05-21T08:09:45.000Z
gpgrouper/containers.py
malovannaya-lab/gpgrouper
45cb948bfa9ed256e450ad8f257ec24324f786ca
[ "BSD-3-Clause" ]
null
null
null
gpgrouper/containers.py
malovannaya-lab/gpgrouper
45cb948bfa9ed256e450ad8f257ec24324f786ca
[ "BSD-3-Clause" ]
null
null
null
"""Container for each experiment, has a dataframe and metadata""" import os import re from datetime import datetime import traceback import pandas as pd from . import _version class UserData: def __init__(self, recno=None, datafile=None, runno=1, searchno=1, no_taxa_redistrib=0, addedby='', in...
36.087719
133
0.577702
import os import re from datetime import datetime import traceback import pandas as pd from . import _version class UserData: def __init__(self, recno=None, datafile=None, runno=1, searchno=1, no_taxa_redistrib=0, addedby='', indir = '.', outdir='.', rawfiledir='.', labeltype=...
true
true
1c4675f61a8598c7f8758a842b5965aa6ce62daf
1,319
py
Python
Python Programs/The-Imvisible-Man/opcv.py
Chibi-Shem/Hacktoberfest2020-Expert
324843464aec039e130e85a16e74b76d310f1497
[ "MIT" ]
77
2020-10-01T10:06:59.000Z
2021-11-08T08:57:18.000Z
Python Programs/The-Imvisible-Man/opcv.py
Chibi-Shem/Hacktoberfest2020-Expert
324843464aec039e130e85a16e74b76d310f1497
[ "MIT" ]
46
2020-09-27T04:55:36.000Z
2021-05-14T18:49:06.000Z
Python Programs/The-Imvisible-Man/opcv.py
Chibi-Shem/Hacktoberfest2020-Expert
324843464aec039e130e85a16e74b76d310f1497
[ "MIT" ]
327
2020-09-26T17:06:03.000Z
2021-10-09T06:04:39.000Z
import numpy as np import cv2 import time cap = cv2.VideoCapture(0) time.sleep(2) background=0 #capture the background for i in range(30): ret,background = cap.read() while(cap.isOpened()): ret , img = cap.read() if not ret: break hsv = cv2.cvtColor(img , cv2.COLOR_BGR2HSV) lower_red ...
26.918367
88
0.634572
import numpy as np import cv2 import time cap = cv2.VideoCapture(0) time.sleep(2) background=0 for i in range(30): ret,background = cap.read() while(cap.isOpened()): ret , img = cap.read() if not ret: break hsv = cv2.cvtColor(img , cv2.COLOR_BGR2HSV) lower_red = np.array([0,120,70]) ...
true
true
1c4676525bfb0f4f935ed4c6103fd5be72db5498
9,215
py
Python
salt/modules/s3.py
herlo/salt
10ffb8315559c0cfbc10b4adc26cd62ebc462851
[ "Apache-2.0" ]
null
null
null
salt/modules/s3.py
herlo/salt
10ffb8315559c0cfbc10b4adc26cd62ebc462851
[ "Apache-2.0" ]
null
null
null
salt/modules/s3.py
herlo/salt
10ffb8315559c0cfbc10b4adc26cd62ebc462851
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Connection module for Amazon S3 :configuration: This module accepts explicit s3 credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessar...
30.819398
87
0.58166
from __future__ import absolute_import import logging import salt.utils import salt.utils.s3 log = logging.getLogger(__name__) def __virtual__(): return True def delete(bucket, path=None, action=None, key=None, keyid=None, service_url=None, verify_ssl=None, kms_keyid=None, location=None, ...
true
true
1c4676e95a1de5936f6b8382b6bdae4774211922
3,598
py
Python
yt_dlp/extractor/joj.py
YuanHsing/yt-dlp
38d86f4d45cf2b764f79141c602356fbb426a4b6
[ "Unlicense" ]
1
2021-12-13T14:12:47.000Z
2021-12-13T14:12:47.000Z
yt_dlp/extractor/joj.py
YuanHsing/yt-dlp
38d86f4d45cf2b764f79141c602356fbb426a4b6
[ "Unlicense" ]
null
null
null
yt_dlp/extractor/joj.py
YuanHsing/yt-dlp
38d86f4d45cf2b764f79141c602356fbb426a4b6
[ "Unlicense" ]
null
null
null
import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( format_field, int_or_none, js_to_json, try_get, ) class JojIE(InfoExtractor): _VALID_URL = r'''(?x) (?: joj:| https?://media\.joj\....
33.626168
105
0.472763
import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( format_field, int_or_none, js_to_json, try_get, ) class JojIE(InfoExtractor): _VALID_URL = r'''(?x) (?: joj:| https?://media\.joj\....
true
true
1c46778f48f486ad8a9dd24ae5c1193ee12576be
246
py
Python
manage.py
fndomariano/prototipo-rbc
72b48a2cdc5d5072d09b20cb7311df50ea5161bb
[ "MIT" ]
null
null
null
manage.py
fndomariano/prototipo-rbc
72b48a2cdc5d5072d09b20cb7311df50ea5161bb
[ "MIT" ]
6
2021-03-19T01:32:29.000Z
2021-09-22T18:50:40.000Z
manage.py
fndomariano/prototype-cbr
72b48a2cdc5d5072d09b20cb7311df50ea5161bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tcc.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
22.363636
67
0.768293
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tcc.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
1c467887b365f7e063283d64aeac5d205b2dbc04
905
py
Python
services/python/app/lib/modules/detections/keybase.py
seanmcfeely/eventsentry
afa4f7c3797a5b3cd96511064f58eb375ca73848
[ "Apache-2.0" ]
4
2018-08-17T16:51:46.000Z
2020-05-05T21:27:18.000Z
services/python/app/lib/modules/detections/keybase.py
seanmcfeely/eventsentry
afa4f7c3797a5b3cd96511064f58eb375ca73848
[ "Apache-2.0" ]
6
2018-08-06T20:40:22.000Z
2019-01-17T15:04:31.000Z
services/python/app/lib/modules/detections/keybase.py
seanmcfeely/eventsentry
afa4f7c3797a5b3cd96511064f58eb375ca73848
[ "Apache-2.0" ]
4
2018-08-06T14:59:09.000Z
2019-08-30T18:03:45.000Z
from lib.modules.DetectionModule import * class Module(DetectionModule): def __init__(self, name, event_json): super().__init__(name=name, event_json=event_json) def run(self): self.logger.debug('Running the {} detection module'.format(self.name)) # Loop over each sandboxed sample in...
37.708333
116
0.609945
from lib.modules.DetectionModule import * class Module(DetectionModule): def __init__(self, name, event_json): super().__init__(name=name, event_json=event_json) def run(self): self.logger.debug('Running the {} detection module'.format(self.name)) for sample in self.event_jso...
true
true
1c46789dc107becd64aab237d7fbcb37ef2c7d33
3,658
py
Python
assets/pinyin-python-server/server.py
admpub/AreaCity-JsSpider-StatsGov
c677db485d33a479ffb2bb28da8fc377a56d9ec9
[ "MIT" ]
3,332
2018-11-28T07:11:37.000Z
2022-03-31T18:54:17.000Z
assets/pinyin-python-server/server.py
xlehehe/AreaCity-JsSpider-StatsGov
c36f95ed88bc24469a10fca7959d0350117e57dc
[ "MIT" ]
21
2019-03-26T06:54:26.000Z
2022-02-12T05:03:36.000Z
assets/pinyin-python-server/server.py
xlehehe/AreaCity-JsSpider-StatsGov
c36f95ed88bc24469a10fca7959d0350117e57dc
[ "MIT" ]
663
2018-11-28T10:32:56.000Z
2022-03-29T15:00:00.000Z
# -*- coding:utf-8 -*- """ GitHub: https://github.com/xiangyuecn/AreaCity-JsSpider-StatsGov/assets/pinyin-python-server 使用的HanLP (https://github.com/hankcs/HanLP) 语言处理库 【1】安装Miniconda conda版本随意 【2】安装pyhanlp https://github.com/hankcs/pyhanlp/wiki/Windows 测试发现python3.7.1 windows下ssl有问题无法安装,conda切换成python 3.6.4测试安装正常 安...
30.483333
92
0.52269
import sys if sys.version_info.major < 3: print("Require python3 environment!") exit(1) from pyhanlp import * import traceback import time import json import urllib from http.server import HTTPServer, BaseHTTPRequestHandler class HttpHandler(BaseHTTPRequestHandler): def _response(self, path, args):...
true
true
1c467a246f902e6c48bf43554502bd3ba0323cb2
7,868
py
Python
supervisor/bootstrap.py
pssc/supervisor
2f09ee05c52e255fbdd8b795451d39b24278ef35
[ "Apache-2.0" ]
24
2020-03-08T21:13:00.000Z
2020-03-11T06:18:43.000Z
supervisor/bootstrap.py
pssc/supervisor
2f09ee05c52e255fbdd8b795451d39b24278ef35
[ "Apache-2.0" ]
null
null
null
supervisor/bootstrap.py
pssc/supervisor
2f09ee05c52e255fbdd8b795451d39b24278ef35
[ "Apache-2.0" ]
null
null
null
"""Bootstrap Supervisor.""" import logging import os from pathlib import Path import shutil import signal from colorlog import ColoredFormatter from .addons import AddonManager from .api import RestAPI from .arch import CpuArch from .auth import Auth from .audio import Audio from .const import SOCKET_DOCKER, UpdateCh...
31.098814
88
0.680859
import logging import os from pathlib import Path import shutil import signal from colorlog import ColoredFormatter from .addons import AddonManager from .api import RestAPI from .arch import CpuArch from .auth import Auth from .audio import Audio from .const import SOCKET_DOCKER, UpdateChannels from .core import Cor...
true
true
1c467a33edb77eed8083f7b4d9221ac4d6a5fbee
6,264
py
Python
marshmallow_oneofschema/one_of_schema.py
misterflop/marshmallow-oneofschema
64f836d7c332b515e3e4c956683366fa11d17966
[ "MIT" ]
null
null
null
marshmallow_oneofschema/one_of_schema.py
misterflop/marshmallow-oneofschema
64f836d7c332b515e3e4c956683366fa11d17966
[ "MIT" ]
null
null
null
marshmallow_oneofschema/one_of_schema.py
misterflop/marshmallow-oneofschema
64f836d7c332b515e3e4c956683366fa11d17966
[ "MIT" ]
null
null
null
from marshmallow import Schema, ValidationError class OneOfSchema(Schema): """ This is a special kind of schema that actually multiplexes other schemas based on object type. When serializing values, it uses get_obj_type() method to get object type name. Then it uses `type_schemas` name-to-Schema mappi...
36.208092
88
0.566252
from marshmallow import Schema, ValidationError class OneOfSchema(Schema): type_field = "type" type_field_remove = True type_schemas = [] def get_obj_type(self, obj): return obj.__class__.__name__ def dump(self, obj, *, many=None, **kwargs): errors = {} result_data = [] ...
true
true
1c467bde363eec1247fd8544df7541fa713b274f
197
py
Python
code/example1.py
ThomasHuke/knowPython
0a9d3c224b36416b7eaa9d664e145bc0f2a63df2
[ "MIT" ]
4
2017-06-20T10:42:45.000Z
2017-10-24T09:19:27.000Z
code/example1.py
ThomasHuke/knowPython
0a9d3c224b36416b7eaa9d664e145bc0f2a63df2
[ "MIT" ]
null
null
null
code/example1.py
ThomasHuke/knowPython
0a9d3c224b36416b7eaa9d664e145bc0f2a63df2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def file(): for x, y in [[1, 3], [1, 4]]: print('x , y ', x, y) file() # x , y 1 3 # x , y 1 4 print([x + x for x in range(1, 12)])
14.071429
36
0.436548
def file(): for x, y in [[1, 3], [1, 4]]: print('x , y ', x, y) file() print([x + x for x in range(1, 12)])
true
true
1c467e126304bcb3bd6860b417e50dc19d57f51d
12,032
py
Python
dpmModule/jobs/cannonshooter.py
Jeongwoo-KGI/maplestory_dpm_calc
c474419146e377a05a724e9975a047649b7effa7
[ "MIT" ]
2
2020-12-18T17:02:21.000Z
2021-02-01T04:16:33.000Z
dpmModule/jobs/cannonshooter.py
Jeongwoo-KGI/maplestory_dpm_calc
c474419146e377a05a724e9975a047649b7effa7
[ "MIT" ]
null
null
null
dpmModule/jobs/cannonshooter.py
Jeongwoo-KGI/maplestory_dpm_calc
c474419146e377a05a724e9975a047649b7effa7
[ "MIT" ]
null
null
null
from ..kernel import core from ..character import characterKernel as ck from ..status.ability import Ability_tool from ..execution.rules import RuleSet, ConditionRule from . import globalSkill from .jobbranch import pirates from .jobclass import adventurer from . import jobutils from math import ceil from typing import...
31.170984
85
0.499668
from ..kernel import core from ..character import characterKernel as ck from ..status.ability import Ability_tool from ..execution.rules import RuleSet, ConditionRule from . import globalSkill from .jobbranch import pirates from .jobclass import adventurer from . import jobutils from math import ceil from typing import...
true
true
1c4680a5dd30a51494fef98f8426f5bccd4e47a7
1,264
py
Python
frontend/tool/a.py
yinzhangyue/PDF_tool
ff1c689478e0d40370724ad88da78ef8bd0bf3d1
[ "MIT" ]
3
2021-12-07T06:19:12.000Z
2022-03-30T13:45:34.000Z
frontend/tool/a.py
yinzhangyue/PDF_tool
ff1c689478e0d40370724ad88da78ef8bd0bf3d1
[ "MIT" ]
null
null
null
frontend/tool/a.py
yinzhangyue/PDF_tool
ff1c689478e0d40370724ad88da78ef8bd0bf3d1
[ "MIT" ]
2
2022-02-27T16:15:05.000Z
2022-03-19T07:35:38.000Z
# -*- coding: utf-8 -*- import numpy as np import cv2.cv2 as cv2 from numpy import float32 if __name__ == "__main__": # Read image img = cv2.imread("./c73.png") a = np.array([[ 1458.4429931640625, 145.316650390625, 1554.5313720703125, 176.924560546875, 1 ]], dtype=float...
28.727273
78
0.492089
import numpy as np import cv2.cv2 as cv2 from numpy import float32 if __name__ == "__main__": img = cv2.imread("./c73.png") a = np.array([[ 1458.4429931640625, 145.316650390625, 1554.5313720703125, 176.924560546875, 1 ]], dtype=float32) b = np.array([[ 1734....
true
true
1c4680c58421b1abc945fead1a676d7387f98adb
3,191
py
Python
tests/test_roi_pooling.py
scilicet64/keras-spp
23da20561fe92c585208af9bf3e0ef8f51bc5dcc
[ "MIT" ]
null
null
null
tests/test_roi_pooling.py
scilicet64/keras-spp
23da20561fe92c585208af9bf3e0ef8f51bc5dcc
[ "MIT" ]
null
null
null
tests/test_roi_pooling.py
scilicet64/keras-spp
23da20561fe92c585208af9bf3e0ef8f51bc5dcc
[ "MIT" ]
null
null
null
import keras.backend as K import numpy as np from keras.layers import Input from keras.models import Model from spp.RoiPooling import RoiPooling dim_ordering = K.image_data_format() assert dim_ordering in {'channels_last','channels_first'}, 'dim_ordering must be in {channels_last,channels_first}' pooling_regions = [...
40.392405
115
0.596365
import keras.backend as K import numpy as np from keras.layers import Input from keras.models import Model from spp.RoiPooling import RoiPooling dim_ordering = K.image_data_format() assert dim_ordering in {'channels_last','channels_first'}, 'dim_ordering must be in {channels_last,channels_first}' pooling_regions = [...
true
true
1c46810f9df9a321d810630eb9522ae322eae9a2
2,102
py
Python
tests/testproject/testapp/models.py
allenling/django-easy-fixtures
cf6e0abff83565e5bf106e388922a31feb288ee9
[ "MIT" ]
2
2016-09-19T12:53:44.000Z
2016-09-25T05:14:15.000Z
tests/testproject/testapp/models.py
allenling/django-easy-fixture
cf6e0abff83565e5bf106e388922a31feb288ee9
[ "MIT" ]
null
null
null
tests/testproject/testapp/models.py
allenling/django-easy-fixture
cf6e0abff83565e5bf106e388922a31feb288ee9
[ "MIT" ]
null
null
null
from django.db import models class TestAbstractModel(models.Model): postive_integer = models.PositiveIntegerField() postive_small_integer = models.PositiveSmallIntegerField() file_path_field = models.FilePathField() float_field = models.FloatField() ip = models.GenericIPAddressField() slug_fie...
33.903226
122
0.744053
from django.db import models class TestAbstractModel(models.Model): postive_integer = models.PositiveIntegerField() postive_small_integer = models.PositiveSmallIntegerField() file_path_field = models.FilePathField() float_field = models.FloatField() ip = models.GenericIPAddressField() slug_fie...
true
true
1c4681245bdc3eedb5787d6a299414db6b6e6a58
4,237
py
Python
ch05/timsort.py
laszlokiraly/LearningAlgorithms
032a3cc409546619cf41220821d081cde54bbcce
[ "MIT" ]
74
2021-05-06T22:03:18.000Z
2022-03-25T04:37:51.000Z
ch05/timsort.py
laszlokiraly/LearningAlgorithms
032a3cc409546619cf41220821d081cde54bbcce
[ "MIT" ]
null
null
null
ch05/timsort.py
laszlokiraly/LearningAlgorithms
032a3cc409546619cf41220821d081cde54bbcce
[ "MIT" ]
19
2021-07-16T11:42:00.000Z
2022-03-22T00:25:49.000Z
""" Simplistic non-optimized, native Python implementation showing the mechanics of TimSort. This code is designed to show how TimSort uses Insertion Sort and Merge Sort as its constituent building blocks. It is not the actual sorting algorithm, because of extra complexities that optimize this base algorithm even furt...
32.098485
93
0.621194
import timeit from algs.table import DataTable def merge(A, lo, mid, hi, aux): aux[lo:hi+1] = A[lo:hi+1] left = lo right = mid + 1 for i in range(lo, hi+1): if left > mid: A[i] = aux[right] right += 1 elif right > hi: A[i] = aux[left] lef...
true
true
1c46821305f403db023274e47c9b4a630caf9c77
4,807
py
Python
src/azure-cli/azure/cli/command_modules/search/tests/latest/test_shared_private_link_resource.py
ZengTaoxu/azure-cli
6be96de450da5ac9f07aafb22dd69880bea04792
[ "MIT" ]
4
2022-01-25T07:33:15.000Z
2022-03-24T05:15:13.000Z
src/azure-cli/azure/cli/command_modules/search/tests/latest/test_shared_private_link_resource.py
ZengTaoxu/azure-cli
6be96de450da5ac9f07aafb22dd69880bea04792
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/search/tests/latest/test_shared_private_link_resource.py
ZengTaoxu/azure-cli
6be96de450da5ac9f07aafb22dd69880bea04792
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
66.763889
308
0.68317
from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer import unittest class AzureSearchServicesTests(ScenarioTest): @ResourceGroupPreparer(name_prefix='azure_search_cli_test') @StorageAccountPreparer(name_prefix='satest', kind='StorageV2') def test_shared_private_link...
true
true
1c4682ad9a9b67315be210907787728e1c713657
61,319
py
Python
tests/integration_tests/core_tests.py
akashkj/superset
8a157d8446780e4e71550405cbedde8a4d64d92a
[ "Apache-2.0" ]
1
2022-01-23T17:08:13.000Z
2022-01-23T17:08:13.000Z
tests/integration_tests/core_tests.py
akashkj/superset
8a157d8446780e4e71550405cbedde8a4d64d92a
[ "Apache-2.0" ]
19
2022-01-29T03:16:22.000Z
2022-03-25T23:50:16.000Z
tests/integration_tests/core_tests.py
akashkj/superset
8a157d8446780e4e71550405cbedde8a4d64d92a
[ "Apache-2.0" ]
1
2022-02-02T19:59:50.000Z
2022-02-02T19:59:50.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.228803
103
0.606566
import csv import datetime import doctest import html import io import json import logging from typing import Dict, List from urllib.parse import quote import superset.utils.database from tests.integration_tests.fixtures.birth_names_dashboard import ( load_birth_names_dashboard_with_slices, load_birth_names_da...
true
true
1c4683a2b04793b6517763584a3577a7502613a2
620
py
Python
adv/pia.py
mattkw/dl
45bfc28ad9ff827045a3734730deb893a2436c09
[ "Apache-2.0" ]
null
null
null
adv/pia.py
mattkw/dl
45bfc28ad9ff827045a3734730deb893a2436c09
[ "Apache-2.0" ]
null
null
null
adv/pia.py
mattkw/dl
45bfc28ad9ff827045a3734730deb893a2436c09
[ "Apache-2.0" ]
null
null
null
import adv_test from adv import * from module import energy def module(): return Pia class Pia(Adv): def pre(this): if this.condition('energy'): this.init = this.c_init def init(this): this.conf['acl'] = """ `s1, seq=5 and cancel `s3, seq=5 and cancel...
16.756757
45
0.485484
import adv_test from adv import * from module import energy def module(): return Pia class Pia(Adv): def pre(this): if this.condition('energy'): this.init = this.c_init def init(this): this.conf['acl'] = """ `s1, seq=5 and cancel `s3, seq=5 and cancel...
true
true
1c4683a648d2c1ac36ba542e426f889e72d0b473
1,925
py
Python
medexbot/spiders/dosage_form_spider.py
ahmedshahriar/bd-medicine-scraper
ea97d929fc9cdcbdde2602827cdc3d12709e2ca9
[ "Apache-2.0" ]
1
2022-03-17T03:02:49.000Z
2022-03-17T03:02:49.000Z
medexbot/spiders/dosage_form_spider.py
ahmedshahriar/bd-medicine-scraper
ea97d929fc9cdcbdde2602827cdc3d12709e2ca9
[ "Apache-2.0" ]
null
null
null
medexbot/spiders/dosage_form_spider.py
ahmedshahriar/bd-medicine-scraper
ea97d929fc9cdcbdde2602827cdc3d12709e2ca9
[ "Apache-2.0" ]
null
null
null
import re import scrapy from django.utils.text import slugify from medexbot.items import DosageFormItem class DosageFormSpider(scrapy.Spider): name = "dosage" allowed_domains = ['medex.com.bd'] start_urls = ['https://medex.com.bd/dosage-forms'] def parse(self, response, **kwargs): for dosag...
48.125
120
0.628571
import re import scrapy from django.utils.text import slugify from medexbot.items import DosageFormItem class DosageFormSpider(scrapy.Spider): name = "dosage" allowed_domains = ['medex.com.bd'] start_urls = ['https://medex.com.bd/dosage-forms'] def parse(self, response, **kwargs): for dosag...
true
true
1c4684004d467ca7f02daba2bde3f7b30970341c
2,502
py
Python
velkoz_web_packages/objects_base/db_orm_models_base.py
MatthewTe/velkoz-web-data-extraction-library
d6acb8bd86106a6ab754be99488436eb37037e54
[ "MIT" ]
null
null
null
velkoz_web_packages/objects_base/db_orm_models_base.py
MatthewTe/velkoz-web-data-extraction-library
d6acb8bd86106a6ab754be99488436eb37037e54
[ "MIT" ]
2
2021-03-31T20:12:25.000Z
2021-12-13T20:48:22.000Z
velkoz_web_packages/objects_base/db_orm_models_base.py
MatthewTe/velkoz-web-data-extraction-library
d6acb8bd86106a6ab754be99488436eb37037e54
[ "MIT" ]
null
null
null
# Importing the database orm management packages: from sqlalchemy import Column, Integer, String, Text, DateTime, LargeBinary from sqlalchemy.ext.declarative import declarative_base # Creating the declarative base object used to create base database orm models: Base = declarative_base() class BaseWebPageResponseModel...
36.26087
92
0.71303
from sqlalchemy import Column, Integer, String, Text, DateTime, LargeBinary from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class BaseWebPageResponseModel(Base): __tablename__ = "default_web_obj_tbl" date = Column( "date_initialized", DateTime, ...
true
true
1c46857cccde346eb4a78768c8061b11e696ca88
4,379
py
Python
contrib/seeds/generate-seeds.py
behi11/vectorium-plus
fb9c68db8e2450c949d75bff9e737562f125be27
[ "MIT" ]
5
2019-07-09T02:06:22.000Z
2021-08-08T18:48:03.000Z
contrib/seeds/generate-seeds.py
behi11/vectorium-plus
fb9c68db8e2450c949d75bff9e737562f125be27
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
behi11/vectorium-plus
fb9c68db8e2450c949d75bff9e737562f125be27
[ "MIT" ]
6
2019-07-09T02:02:14.000Z
2021-08-06T16:01:01.000Z
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
31.503597
98
0.582553
from __future__ import print_function, division from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith('.oni...
true
true
1c46866d970d2c1b41f7f0473196477642241b48
5,200
py
Python
src/python/dxpy/scripts/dx_reads_to_fastq.py
psung/dx-toolkit
f3a430c5e24184215eb4a9883a179edf07bfa08b
[ "Apache-2.0" ]
null
null
null
src/python/dxpy/scripts/dx_reads_to_fastq.py
psung/dx-toolkit
f3a430c5e24184215eb4a9883a179edf07bfa08b
[ "Apache-2.0" ]
null
null
null
src/python/dxpy/scripts/dx_reads_to_fastq.py
psung/dx-toolkit
f3a430c5e24184215eb4a9883a179edf07bfa08b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright (C) 2013-2014 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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 a...
38.518519
194
0.603846
import sys, argparse import dxpy arg_parser = argparse.ArgumentParser(description="Download a reads table into a FASTQ file") arg_parser.add_argument("reads_table", help="ID of the reads GTable object") arg_parser.add_argument("--output", help="Name of the output file", required=True) arg_parser.add_argument("--outpu...
true
true
1c468a5f559d58aac8a33d2176a44891f8e19041
88
py
Python
hibiapi/api/tieba/net.py
cleoold/HibiAPI
d997c5a2bf3cdbccc758d7036447e443c6b6f0ff
[ "Apache-2.0" ]
394
2020-12-19T05:51:02.000Z
2022-03-30T07:44:42.000Z
hibiapi/api/tieba/net.py
cleoold/HibiAPI
d997c5a2bf3cdbccc758d7036447e443c6b6f0ff
[ "Apache-2.0" ]
208
2020-12-20T14:47:31.000Z
2022-03-31T11:11:00.000Z
hibiapi/api/tieba/net.py
cleoold/HibiAPI
d997c5a2bf3cdbccc758d7036447e443c6b6f0ff
[ "Apache-2.0" ]
93
2020-12-29T08:19:04.000Z
2022-03-30T06:08:16.000Z
from hibiapi.utils.net import BaseNetClient class NetRequest(BaseNetClient): pass
14.666667
43
0.795455
from hibiapi.utils.net import BaseNetClient class NetRequest(BaseNetClient): pass
true
true
1c468a5f5e92b0751d052266b0d99570a56f5837
2,539
py
Python
Normal_Equation/prep.py
Globe-Eater/Geographic-Duplicate-Detection-
ec467fc41cb456959da87fd913465dc9daa27d80
[ "MIT" ]
null
null
null
Normal_Equation/prep.py
Globe-Eater/Geographic-Duplicate-Detection-
ec467fc41cb456959da87fd913465dc9daa27d80
[ "MIT" ]
null
null
null
Normal_Equation/prep.py
Globe-Eater/Geographic-Duplicate-Detection-
ec467fc41cb456959da87fd913465dc9daa27d80
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def start(): '''This method is designed to read input in from the user.''' df = pd.read_excel("datasets/unprepared_data/" + input("Please enter the path for the data:")) return df def fill_empty(df): '''fill_empty takes the arugment df (dataframe) This should...
34.310811
98
0.633714
import numpy as np import pandas as pd def start(): df = pd.read_excel("datasets/unprepared_data/" + input("Please enter the path for the data:")) return df def fill_empty(df): df = df.replace(r'^\s*$', np.nan, regex=True) df = df.fillna(value="No Data") return df def check_numbers(lat, long): ...
true
true
1c468cbad038e07db05af79f02c42510983d4d81
5,341
py
Python
sdk/python/pulumi_kubernetes/rbac/v1/ClusterRole.py
Carlangueitor/pulumi-kubernetes
859ccaaeb8291de49128dbc202fbac1358b2a25a
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1/ClusterRole.py
Carlangueitor/pulumi-kubernetes
859ccaaeb8291de49128dbc202fbac1358b2a25a
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1/ClusterRole.py
Carlangueitor/pulumi-kubernetes
859ccaaeb8291de49128dbc202fbac1358b2a25a
[ "Apache-2.0" ]
null
null
null
# *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings from typing import Optional import pulumi import pulumi.runtime from pulumi import Input, ResourceOptions from ... import tables, version ...
42.728
135
0.683767
import warnings from typing import Optional import pulumi import pulumi.runtime from pulumi import Input, ResourceOptions from ... import tables, version class ClusterRole(pulumi.CustomResource): apiVersion: pulumi.Output[str] kind: pulumi.Output[str] aggregation_rule: pulumi.Output[dict] metad...
true
true
1c468d4a46a3aba4597155860cda3864d9364bfc
3,145
py
Python
test/functional/mining_getblocktemplate_longpoll.py
denofdevscrypto/Topaz2.0
34ca0e644a6b5d9524a06156568fc11c89dcffed
[ "MIT" ]
null
null
null
test/functional/mining_getblocktemplate_longpoll.py
denofdevscrypto/Topaz2.0
34ca0e644a6b5d9524a06156568fc11c89dcffed
[ "MIT" ]
null
null
null
test/functional/mining_getblocktemplate_longpoll.py
denofdevscrypto/Topaz2.0
34ca0e644a6b5d9524a06156568fc11c89dcffed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test longpolling with getblocktemplate.""" from decimal import Decimal from test_framework.test_frame...
42.5
112
0.686169
from decimal import Decimal from test_framework.test_framework import TOPAZTestFramework from test_framework.util import get_rpc_proxy, random_transaction import threading class LongpollThread(threading.Thread): def __init__(self, node): threading.Thread.__init__(self) templat = node.get...
true
true
1c468d8b2783656346e7be58ba7b95f781ed035f
4,896
py
Python
2019_noe_deep_boltzmann_tfv2/deep_boltzmann/networks/noninvertible.py
zierenberg/machine_learning_muca
6fcca12ccda7680ea4cb0e1f10bb53a68b6b0a02
[ "CC0-1.0" ]
null
null
null
2019_noe_deep_boltzmann_tfv2/deep_boltzmann/networks/noninvertible.py
zierenberg/machine_learning_muca
6fcca12ccda7680ea4cb0e1f10bb53a68b6b0a02
[ "CC0-1.0" ]
null
null
null
2019_noe_deep_boltzmann_tfv2/deep_boltzmann/networks/noninvertible.py
zierenberg/machine_learning_muca
6fcca12ccda7680ea4cb0e1f10bb53a68b6b0a02
[ "CC0-1.0" ]
null
null
null
import keras import tensorflow as tf import numpy as np from deep_boltzmann.networks import nonlinear_transform from deep_boltzmann.networks import connect as _connect class NormalTransformer(object): def __init__(self, mu_layers, sigma_layers): self.mu_layers = mu_layers self.sigma_layers = sigm...
39.168
145
0.62643
import keras import tensorflow as tf import numpy as np from deep_boltzmann.networks import nonlinear_transform from deep_boltzmann.networks import connect as _connect class NormalTransformer(object): def __init__(self, mu_layers, sigma_layers): self.mu_layers = mu_layers self.sigma_layers = sigm...
true
true
1c468d98816f3a6edf4390c586235b73703529fd
2,298
py
Python
src/07 - Blurring And Smoothing/01-img_analysis.py
hritik5102/Awesome-Computer-Vision-Guide
005cd96f6d6c7dacdf1b9b5f5bf56cae3d6cea18
[ "MIT" ]
null
null
null
src/07 - Blurring And Smoothing/01-img_analysis.py
hritik5102/Awesome-Computer-Vision-Guide
005cd96f6d6c7dacdf1b9b5f5bf56cae3d6cea18
[ "MIT" ]
null
null
null
src/07 - Blurring And Smoothing/01-img_analysis.py
hritik5102/Awesome-Computer-Vision-Guide
005cd96f6d6c7dacdf1b9b5f5bf56cae3d6cea18
[ "MIT" ]
null
null
null
import cv2 import numpy as np def nothing(x): pass #img = cv2.imread('img.jpeg',-1) cap=cv2.VideoCapture(0) cv2.namedWindow('image') cv2.resizeWindow('image',600,350) #Creating trackbar cv2.createTrackbar('lh','image',0,255,nothing) cv2.createTrackbar('uh','image',0,255,nothing) cv2.createTrackbar('ls','image'...
21.679245
64
0.64839
import cv2 import numpy as np def nothing(x): pass cap=cv2.VideoCapture(0) cv2.namedWindow('image') cv2.resizeWindow('image',600,350) cv2.createTrackbar('lh','image',0,255,nothing) cv2.createTrackbar('uh','image',0,255,nothing) cv2.createTrackbar('ls','image',0,255,nothing) cv2.createTrackbar('us','image',0,25...
true
true
1c468dca7335ecf4d19068d904ca06e6efdee798
18,712
py
Python
leanerp/helpdesk/management/commands/get_email.py
seLain/Leaf
f02e15576071429a29f76a06328d024b58a2d69e
[ "Apache-2.0" ]
null
null
null
leanerp/helpdesk/management/commands/get_email.py
seLain/Leaf
f02e15576071429a29f76a06328d024b58a2d69e
[ "Apache-2.0" ]
6
2018-02-20T13:59:07.000Z
2018-03-06T17:35:41.000Z
leanerp/helpdesk/management/commands/get_email.py
seLain/Leaf
f02e15576071429a29f76a06328d024b58a2d69e
[ "Apache-2.0" ]
1
2018-03-06T17:28:07.000Z
2018-03-06T17:28:07.000Z
#!/usr/bin/python """ Jutda Helpdesk - A Django powered ticket tracker for small enterprise. (c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details. scripts/get_email.py - Designed to be run from cron, this script checks the POP and IMAP boxes, or a local mailbox directory, ...
38.502058
125
0.595981
from __future__ import unicode_literals from datetime import timedelta import email import imaplib import mimetypes from os import listdir, unlink from os.path import isfile, join import poplib import re import socket from time import ctime from email_reply_parser import EmailReplyParser from django.core.files.base ...
true
true
1c468e275b37e8f12a979296a79fb4db9882c0cd
838
py
Python
lib/colors.py
Saveurian/Cleartext_Scanner
c54828fc6321b8549245f7914b4749b9114df7e0
[ "Unlicense" ]
null
null
null
lib/colors.py
Saveurian/Cleartext_Scanner
c54828fc6321b8549245f7914b4749b9114df7e0
[ "Unlicense" ]
null
null
null
lib/colors.py
Saveurian/Cleartext_Scanner
c54828fc6321b8549245f7914b4749b9114df7e0
[ "Unlicense" ]
null
null
null
class Colors: """ Provides ANSI terminal colors helping the eyes identify potential clear-text passwords. """ NONE = "\033[0m" RED = "\033[31m" GREEN = "\033[32m" LIGHT_GRAY = "\033[37m" LIGHT_BLUE = "\033[34m" YELLOW = "\033[33m" def __init__(self): return # Re...
23.942857
59
0.608592
class Colors: NONE = "\033[0m" RED = "\033[31m" GREEN = "\033[32m" LIGHT_GRAY = "\033[37m" LIGHT_BLUE = "\033[34m" YELLOW = "\033[33m" def __init__(self): return def red(self, text): return self.RED + text + self.NONE def green(self, text): return s...
true
true
1c468f73f1203314d42997ed056bf5f884a64d3b
2,065
py
Python
pytorch/poly/polygonize.py
IUResearchApplications/BuildingFootprints
97dc2ba9303bb5fdfd1c357c94b9e1e903a52ebe
[ "MIT" ]
2
2020-05-01T15:41:14.000Z
2020-05-27T20:49:09.000Z
pytorch/poly/polygonize.py
IUResearchApplications/BuildingFootprints
97dc2ba9303bb5fdfd1c357c94b9e1e903a52ebe
[ "MIT" ]
null
null
null
pytorch/poly/polygonize.py
IUResearchApplications/BuildingFootprints
97dc2ba9303bb5fdfd1c357c94b9e1e903a52ebe
[ "MIT" ]
1
2020-05-01T15:41:15.000Z
2020-05-01T15:41:15.000Z
import sys import subprocess import os import ogr import glob from setup import setup_run def call_gdal_polygonize(input_file, output_file): # If the file already exists, delete it first or additional polygons will be saved to the # files if this is ran more than once. if os.path.isfile(output_file): ...
30.820896
94
0.678935
import sys import subprocess import os import ogr import glob from setup import setup_run def call_gdal_polygonize(input_file, output_file): if os.path.isfile(output_file): os.remove(output_file) subprocess.call(['gdal_polygonize.py', input_file, '-b', '1', '-q', '-f','GeoJSON', ...
true
true
1c46914d8a6cc3062ee889cf79e110b85a8762f3
938
py
Python
pycrypt.py
o0void0o/pycrypt
46ea779f2de983a9d6caa974a3b932590af5c156
[ "MIT" ]
null
null
null
pycrypt.py
o0void0o/pycrypt
46ea779f2de983a9d6caa974a3b932590af5c156
[ "MIT" ]
null
null
null
pycrypt.py
o0void0o/pycrypt
46ea779f2de983a9d6caa974a3b932590af5c156
[ "MIT" ]
null
null
null
from Crypto.Random import get_random_bytes from Crypto.Cipher import AES key = get_random_bytes(32) # 32 bytes * 8 = 256 bits (1 byte = 8 bits) print(key) output_file = 'enc/encrypted.bin' file = open("supernoooichFile.adoc", "rb") data = file.read(-1) cipher = AES.new(key, AES.MODE_CFB) # CFB mode ciphered_data ...
24.684211
103
0.744136
from Crypto.Random import get_random_bytes from Crypto.Cipher import AES key = get_random_bytes(32) print(key) output_file = 'enc/encrypted.bin' file = open("supernoooichFile.adoc", "rb") data = file.read(-1) cipher = AES.new(key, AES.MODE_CFB) ciphered_data = cipher.encrypt(data) file_out = open(output_file, "w...
true
true
1c4691903b60395ec59f186203e784ee1996ad0a
1,966
py
Python
ex35.py
Zinmarlwin711/python-exercises
361cb426a8bc03760906e25b6cb6a4a458260bfc
[ "MIT" ]
null
null
null
ex35.py
Zinmarlwin711/python-exercises
361cb426a8bc03760906e25b6cb6a4a458260bfc
[ "MIT" ]
null
null
null
ex35.py
Zinmarlwin711/python-exercises
361cb426a8bc03760906e25b6cb6a4a458260bfc
[ "MIT" ]
null
null
null
from sys import exit def gold_room(): print("This room is full of gold. How much do you take?") choice = input("> ") if "0" in choice or "1" in choice: how_much = int (choice) else: dead("Man, learn to type a number.") if how_much < 50: print("Nice, you're not greedy, y...
26.931507
65
0.571719
from sys import exit def gold_room(): print("This room is full of gold. How much do you take?") choice = input("> ") if "0" in choice or "1" in choice: how_much = int (choice) else: dead("Man, learn to type a number.") if how_much < 50: print("Nice, you're not greedy, y...
true
true
1c4691faed7347e61b1a3bcb8447db2c3d16ec2e
801
py
Python
DataMining/Stats/coord_bounds.py
CKPalk/SeattleCrime_DM
0bfbf597ef7c4e87a4030e1c03f62b2f4c9f3c5b
[ "MIT" ]
null
null
null
DataMining/Stats/coord_bounds.py
CKPalk/SeattleCrime_DM
0bfbf597ef7c4e87a4030e1c03f62b2f4c9f3c5b
[ "MIT" ]
null
null
null
DataMining/Stats/coord_bounds.py
CKPalk/SeattleCrime_DM
0bfbf597ef7c4e87a4030e1c03f62b2f4c9f3c5b
[ "MIT" ]
null
null
null
''' Work of Cameron Palk ''' import sys import pandas as pd def main( argv ): try: csv_filepath = argv[ 0 ] output_filepath = argv[ 1 ] except IndexError: print( "Error, usage: \"python3 coord_bounds.py <CSV> <output_file>\"" ) return training_data = pd.read_csv( csv_filepath ) training_data[ 'clean_...
23.558824
95
0.66417
import sys import pandas as pd def main( argv ): try: csv_filepath = argv[ 0 ] output_filepath = argv[ 1 ] except IndexError: print( "Error, usage: \"python3 coord_bounds.py <CSV> <output_file>\"" ) return training_data = pd.read_csv( csv_filepath ) training_data[ 'clean_Latitude' ] = training_data[...
true
true
1c4691ff67ef169df40aa3167b4cbb97f94211d2
1,425
py
Python
dufi/gui/boxes/ttkstyles.py
Shura1oplot/dufi
c9c25524020e57d3670c298acca305900b6490e7
[ "MIT" ]
null
null
null
dufi/gui/boxes/ttkstyles.py
Shura1oplot/dufi
c9c25524020e57d3670c298acca305900b6490e7
[ "MIT" ]
null
null
null
dufi/gui/boxes/ttkstyles.py
Shura1oplot/dufi
c9c25524020e57d3670c298acca305900b6490e7
[ "MIT" ]
null
null
null
# [SublimeLinter @python:3] # -*- coding: utf-8 -*- from __future__ import unicode_literals, division, print_function, absolute_import try: from tkinter import ttk from tkinter import font as tk_font except ImportError: import ttk import tkFont as tk_font _ttk_styles = set() _ttk_style_customizers =...
25.909091
86
0.716491
from __future__ import unicode_literals, division, print_function, absolute_import try: from tkinter import ttk from tkinter import font as tk_font except ImportError: import ttk import tkFont as tk_font _ttk_styles = set() _ttk_style_customizers = set() def create_ttk_styles(): for func in _t...
true
true
1c4692d5cb27e6291a7c4ae6d099c67074bc40ee
5,735
py
Python
src/web-application/app.py
hitesh009911/thrain
2535cddb8908772cbac3ba9fed194623aa9334d6
[ "MIT" ]
null
null
null
src/web-application/app.py
hitesh009911/thrain
2535cddb8908772cbac3ba9fed194623aa9334d6
[ "MIT" ]
null
null
null
src/web-application/app.py
hitesh009911/thrain
2535cddb8908772cbac3ba9fed194623aa9334d6
[ "MIT" ]
null
null
null
import os import os.path from flask import Flask, request, redirect, url_for, render_template, session, send_from_directory, send_file from werkzeug.utils import secure_filename import DH import pickle import random UPLOAD_FOLDER = './media/text-files/' UPLOAD_KEY = './media/public-keys/' ALLOWED_EXTENSIONS = set(['tx...
33.735294
109
0.6551
import os import os.path from flask import Flask, request, redirect, url_for, render_template, session, send_from_directory, send_file from werkzeug.utils import secure_filename import DH import pickle import random UPLOAD_FOLDER = './media/text-files/' UPLOAD_KEY = './media/public-keys/' ALLOWED_EXTENSIONS = set(['tx...
true
true
1c4694493a461d612c26de35ae341c0d3a012bea
4,594
py
Python
plasmapy/utils/roman/tests/test_roman.py
KhalilBryant/PlasmaPy
05f7cb60348c7048fb3b8fbaf25985f2fba47fb7
[ "MIT", "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
1
2020-02-14T16:35:02.000Z
2020-02-14T16:35:02.000Z
plasmapy/utils/roman/tests/test_roman.py
KhalilBryant/PlasmaPy
05f7cb60348c7048fb3b8fbaf25985f2fba47fb7
[ "MIT", "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
plasmapy/utils/roman/tests/test_roman.py
KhalilBryant/PlasmaPy
05f7cb60348c7048fb3b8fbaf25985f2fba47fb7
[ "MIT", "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
import pytest import numpy as np import plasmapy.utils.roman as roman from plasmapy.utils.pytest_helpers import run_test ints_and_roman_numerals = [ (1, "I"), (2, "II"), (3, "III"), (4, "IV"), (5, "V"), (6, "VI"), (7, "VII"), (8, "VIII"), (9, "IX"), (10, "X"), (11, "XI"), ...
22.300971
86
0.529822
import pytest import numpy as np import plasmapy.utils.roman as roman from plasmapy.utils.pytest_helpers import run_test ints_and_roman_numerals = [ (1, "I"), (2, "II"), (3, "III"), (4, "IV"), (5, "V"), (6, "VI"), (7, "VII"), (8, "VIII"), (9, "IX"), (10, "X"), (11, "XI"), ...
true
true
1c46946534565ded99af86b7fdb56b8971f0ef04
3,778
py
Python
apps/Todo/tests/TodoModelTests.py
Eduardo-RFarias/DjangoReactBackend
b8183ea4b24be5c0aa557ffbc79fc23e0777b8ad
[ "MIT" ]
null
null
null
apps/Todo/tests/TodoModelTests.py
Eduardo-RFarias/DjangoReactBackend
b8183ea4b24be5c0aa557ffbc79fc23e0777b8ad
[ "MIT" ]
null
null
null
apps/Todo/tests/TodoModelTests.py
Eduardo-RFarias/DjangoReactBackend
b8183ea4b24be5c0aa557ffbc79fc23e0777b8ad
[ "MIT" ]
null
null
null
from apps.User.models import User from django.test import RequestFactory from django.utils import timezone from rest_framework import status from ..models import Todo from ..serializers import TodoSerializer from .BaseAuthenticatedTest import BaseAuthenticatedTest name = "Test todo" description = "This is an auto gen...
34.345455
87
0.647697
from apps.User.models import User from django.test import RequestFactory from django.utils import timezone from rest_framework import status from ..models import Todo from ..serializers import TodoSerializer from .BaseAuthenticatedTest import BaseAuthenticatedTest name = "Test todo" description = "This is an auto gen...
true
true
1c469501b5b017b977afe49a3917b281287e2777
1,611
py
Python
src/web/monitorforms/heroku-dyno-status-single/__init__.py
anderson-attilio/runbook
7b68622f75ef09f654046f0394540025f3ee7445
[ "Apache-2.0" ]
155
2015-07-15T14:06:06.000Z
2021-03-31T01:41:44.000Z
src/web/monitorforms/heroku-dyno-status-single/__init__.py
anderson-attilio/runbook
7b68622f75ef09f654046f0394540025f3ee7445
[ "Apache-2.0" ]
78
2015-01-01T05:49:20.000Z
2015-07-12T01:48:44.000Z
src/web/monitorforms/heroku-dyno-status-single/__init__.py
Runbook/runbook
7b68622f75ef09f654046f0394540025f3ee7445
[ "Apache-2.0" ]
36
2015-07-20T22:42:23.000Z
2021-12-05T10:00:44.000Z
###################################################################### # Cloud Routes Web Application # ------------------------------------------------------------------- # Health Check - Forms Class ###################################################################### from wtforms import TextField from wtforms.vali...
38.357143
236
0.590317
from wtforms import TextField from wtforms.validators import DataRequired from ..datacenter import DatacenterCheckForm class CheckForm(DatacenterCheckForm): title = "Heroku: Dyno Status" description = """ This monitor will query the status of a specified Dyno within the specified Application. If the Dyn...
true
true
1c469515024b2146bc7f69544490c4e70ded4e10
15,622
py
Python
tests/admin_checks/tests.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
1
2015-05-16T13:13:06.000Z
2015-05-16T13:13:06.000Z
tests/admin_checks/tests.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
null
null
null
tests/admin_checks/tests.py
PirosB3/django
9b729ddd8f2040722971ccfb3b12f7d8162633d1
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import warnings from django import forms from django.contrib import admin from django.core import checks from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from .models import Song, Book, Album, TwoAlbumFKAndAnE, City, State class SongFo...
31.244
104
0.563692
from __future__ import unicode_literals import warnings from django import forms from django.contrib import admin from django.core import checks from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from .models import Song, Book, Album, TwoAlbumFKAndAnE, City, State class SongFo...
true
true
1c4695708c7b41b299a783d8c3a65e327eb9a2a5
2,240
py
Python
cekit/test/behave_tester.py
stephengaito/cekit
d6d254af6bb6820e5c725680bd77b6c195636cf6
[ "MIT" ]
59
2018-03-01T14:32:17.000Z
2022-03-31T12:18:05.000Z
cekit/test/behave_tester.py
stephengaito/cekit
d6d254af6bb6820e5c725680bd77b6c195636cf6
[ "MIT" ]
446
2018-03-02T08:20:49.000Z
2022-03-20T10:10:42.000Z
cekit/test/behave_tester.py
stephengaito/cekit
d6d254af6bb6820e5c725680bd77b6c195636cf6
[ "MIT" ]
29
2018-03-01T13:27:55.000Z
2022-02-08T08:15:39.000Z
import logging import os from cekit.builder import Command from cekit.generator.base import Generator from cekit.test.collector import BehaveTestCollector from cekit.test.behave_runner import BehaveTestRunner LOGGER = logging.getLogger('cekit') class BehaveTester(Command): """ Tester implementation for the ...
32.941176
110
0.647768
import logging import os from cekit.builder import Command from cekit.generator.base import Generator from cekit.test.collector import BehaveTestCollector from cekit.test.behave_runner import BehaveTestRunner LOGGER = logging.getLogger('cekit') class BehaveTester(Command): def __init__(self, params): s...
true
true
1c4696b02290e4a4e51e7a76e7e5bf7ddffbc1f9
2,567
py
Python
tests/test_io.py
nthndy/BayesianTracker
443f984ce830373e140f744a27179debdf34ae58
[ "MIT" ]
null
null
null
tests/test_io.py
nthndy/BayesianTracker
443f984ce830373e140f744a27179debdf34ae58
[ "MIT" ]
null
null
null
tests/test_io.py
nthndy/BayesianTracker
443f984ce830373e140f744a27179debdf34ae58
[ "MIT" ]
null
null
null
import os from pathlib import Path import numpy as np import pytest from _utils import ( create_test_object, create_test_properties, simple_tracker_example, ) import btrack def test_hdf5_write(tmp_path): """Test writing an HDF5 file with some objects.""" fn = os.path.join(tmp_path, "test.h5") ...
29.848837
81
0.66342
import os from pathlib import Path import numpy as np import pytest from _utils import ( create_test_object, create_test_properties, simple_tracker_example, ) import btrack def test_hdf5_write(tmp_path): fn = os.path.join(tmp_path, "test.h5") objects = [] for i in range(10): obj, _ ...
true
true
1c46971c776696ac88b0afdf08de5e2e9aa0b53e
4,999
py
Python
modules/tools/rosbag/extract_images.py
seeclong/apollo
99c8afb5ebcae2a3c9359a156a957ff03944b27b
[ "Apache-2.0" ]
27
2019-04-06T02:27:14.000Z
2021-11-27T13:47:06.000Z
modules/tools/rosbag/extract_images.py
seeclong/apollo
99c8afb5ebcae2a3c9359a156a957ff03944b27b
[ "Apache-2.0" ]
5
2021-10-06T22:57:52.000Z
2022-02-27T14:04:05.000Z
modules/tools/rosbag/extract_images.py
seeclong/apollo
99c8afb5ebcae2a3c9359a156a957ff03944b27b
[ "Apache-2.0" ]
38
2019-04-15T10:58:37.000Z
2022-01-27T08:52:39.000Z
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo 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 ...
34.475862
79
0.640928
import os import sys import cv2 import cv_bridge import gflags import glog import rosbag import yaml gflags.DEFINE_string('input_bag', None, 'Input bag path.') gflags.DEFINE_string('output_path', './', 'Output path.') gflags.DEFINE_string('weather', 'CLEAR', 'Options: CLEAR, SUNNY, RAINY.') gflags.DEFINE_string('s...
true
true
1c46987bff6123b37edc08ade402cc724f07010b
9,073
py
Python
weechat/python/grep_filter.py
TyranicMoron/dotfiles
277b85c84cc2d0ed542175db218fc6313b3d85c0
[ "MIT" ]
1
2017-04-18T20:05:22.000Z
2017-04-18T20:05:22.000Z
weechat/python/grep_filter.py
TyranicMoron/dotfiles
277b85c84cc2d0ed542175db218fc6313b3d85c0
[ "MIT" ]
2
2015-06-26T10:53:57.000Z
2015-06-26T11:22:56.000Z
weechat/python/grep_filter.py
MatthewCox/dotfiles
277b85c84cc2d0ed542175db218fc6313b3d85c0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2015 by Simmo Saan <simmo.saan@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any l...
30.548822
183
0.721922
from __future__ import print_function SCRIPT_NAME = "grep_filter" SCRIPT_AUTHOR = "Simmo Saan <simmo.saan@gmail.com>" SCRIPT_VERSION = "0.10" SCRIPT_LICENSE = "GPL3" SCRIPT_DESC = "Filter buffers automatically while searching them" SCRIPT_REPO = "https://github.com/sim642/grep_filter" SCRIPT_COMMAND = SCRIPT_NAME...
true
true
1c46996f63d32c290afa2e3cc34a753d12d8719d
3,601
py
Python
tricks/lsh_pp_pretaining.py
yanzhoupan/dlrm_ssm
49ca1e4487ff0e148065c0a133acb078835a9b86
[ "MIT" ]
3
2021-03-16T03:33:44.000Z
2022-03-14T08:48:01.000Z
tricks/lsh_pp_pretaining.py
yanzhoupan/dlrm_ssm
49ca1e4487ff0e148065c0a133acb078835a9b86
[ "MIT" ]
2
2021-03-25T08:19:25.000Z
2021-04-10T16:43:45.000Z
tricks/lsh_pp_pretaining.py
yanzhoupan/dlrm_ssm
49ca1e4487ff0e148065c0a133acb078835a9b86
[ "MIT" ]
1
2021-09-08T21:47:06.000Z
2021-09-08T21:47:06.000Z
# data preprocessing for LSH embedding import numpy as np import torch from min_hash_generator import SparseBitVectorMinHashGenerator from collections import defaultdict # import multiprocessing from tqdm import tqdm import time import random import concurrent.futures import pdb seed = 123 random.seed(seed) np.random....
35.303922
159
0.67759
import numpy as np import torch from min_hash_generator import SparseBitVectorMinHashGenerator from collections import defaultdict from tqdm import tqdm import time import random import concurrent.futures import pdb seed = 123 random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) min_hash_gen = None val_indi...
true
true
1c469984e0ce27e7f993f3a5fceabf990b93bb2c
1,686
py
Python
eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-i686-ucs4.egg/EGG-INFO/scripts/maf_split_by_src.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
null
null
null
eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-i686-ucs4.egg/EGG-INFO/scripts/maf_split_by_src.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
null
null
null
eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-i686-ucs4.egg/EGG-INFO/scripts/maf_split_by_src.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
1
2020-07-25T21:03:18.000Z
2020-07-25T21:03:18.000Z
#!/afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.7 """ Read a MAF from stdin and break into several mafs based on the source of each block. If the `component` option is provided then only that component will be used to determine the new file for each block, otherwise the src for *all* components will be ...
27.639344
96
0.640569
import sys, string import bx.align.maf from optparse import OptionParser import psyco_full INF="inf" def __main__(): parser = OptionParser() parser.add_option( "-o", "--outprefix", action="store", default="" ) parser.add_option( "-c", "--component", action="store", default=None ) ( options, a...
true
true
1c469a53f45b615fde86d33a3918d754e428abba
1,474
py
Python
src/simgnn.py
pulkit1joshi/SimGNN
199b6014482a1dc8719394de4fc17f03c1b7192c
[ "MIT" ]
22
2020-10-09T13:36:57.000Z
2022-02-10T04:07:54.000Z
src/simgnn.py
kartiklucky9n/SimGNN
199b6014482a1dc8719394de4fc17f03c1b7192c
[ "MIT" ]
8
2020-10-10T11:02:39.000Z
2021-12-29T17:45:05.000Z
src/simgnn.py
kartiklucky9n/SimGNN
199b6014482a1dc8719394de4fc17f03c1b7192c
[ "MIT" ]
11
2020-10-11T03:58:36.000Z
2022-03-30T09:54:55.000Z
from tensorflow import keras from tensorflow.keras import layers from keras_gcn import GraphConv from keras.models import Model from keras.layers import Input from custom_layers import Attention, NeuralTensorLayer """ Main model : Node-to-Node interaction not implemented. Functional API : Shared layers are shared_gcn1...
36.85
82
0.705563
from tensorflow import keras from tensorflow.keras import layers from keras_gcn import GraphConv from keras.models import Model from keras.layers import Input from custom_layers import Attention, NeuralTensorLayer def simgnn(parser): inputA = Input(shape=(None,16)) GinputA = Input(shape=(None,None)) inputB ...
true
true
1c469b82d550b35023a31690c11f6d79e68fe635
3,452
py
Python
testing/modules/args.py
marshallmidden/m4
8ff1cb050efdefe6963c6d7f459fd6f3d25eea94
[ "BSD-2-Clause" ]
null
null
null
testing/modules/args.py
marshallmidden/m4
8ff1cb050efdefe6963c6d7f459fd6f3d25eea94
[ "BSD-2-Clause" ]
null
null
null
testing/modules/args.py
marshallmidden/m4
8ff1cb050efdefe6963c6d7f459fd6f3d25eea94
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 #----------------------------------------------------------------------------- import argparse import sys #----------------------------------------------------------------------------- # Global option variables follow. #--------------------------...
41.095238
135
0.503476
import argparse import sys def parse_args(values): global args, initiator, target, qla2xxx init = ('i', 'in', 'ini', 'init', 'initi', 'initia', 'initiat', 'initiato', 'initiator', 'initiators') targ = ('t', 'ta', 'tar', 'targ', 'targe', 'target', 'targets') qla2 = ('q', 'ql', 'qla', 'qla2', 'qla2x', '...
true
true
1c469ce9ba3bc866b5d62e0d55297ba6728a69f8
275
py
Python
flaskblog/App/models/__init__.py
riverstation/project-all
c56f1879e1303d561e95a3ff3a70f94fb5fa2191
[ "Apache-2.0" ]
null
null
null
flaskblog/App/models/__init__.py
riverstation/project-all
c56f1879e1303d561e95a3ff3a70f94fb5fa2191
[ "Apache-2.0" ]
null
null
null
flaskblog/App/models/__init__.py
riverstation/project-all
c56f1879e1303d561e95a3ff3a70f94fb5fa2191
[ "Apache-2.0" ]
null
null
null
from .user import User from .posts import Posts from App.extensions import db #创建一个关联模型和用户 存储id 多对多的个关系模型中间表 collections = db.Table('collections', db.Column('user_id',db.Integer,db.ForeignKey('user.id')), db.Column('posts_id',db.Integer,db.ForeignKey('posts.id')) )
30.555556
62
0.745455
from .user import User from .posts import Posts from App.extensions import db collections = db.Table('collections', db.Column('user_id',db.Integer,db.ForeignKey('user.id')), db.Column('posts_id',db.Integer,db.ForeignKey('posts.id')) )
true
true
1c469d46abeed2c741846f66801fcc1ae85fbd0c
1,407
py
Python
pyproc/views/message.py
cmin764/pyproc
be69b5a35fbe3818accea472735effec0825f17c
[ "MIT" ]
null
null
null
pyproc/views/message.py
cmin764/pyproc
be69b5a35fbe3818accea472735effec0825f17c
[ "MIT" ]
null
null
null
pyproc/views/message.py
cmin764/pyproc
be69b5a35fbe3818accea472735effec0825f17c
[ "MIT" ]
null
null
null
"""Handle /message page.""" from flask import ( abort, request, ) from pyproc import app, tasks from pyproc.views.base import responsify @app.route("/message", methods=["POST"]) @responsify def message(): """Messaging page available for users/clients submitting tasks.""" # Retrieve JSON parameters ...
25.125
71
0.633262
from flask import ( abort, request, ) from pyproc import app, tasks from pyproc.views.base import responsify @app.route("/message", methods=["POST"]) @responsify def message(): data = request.get_json() or {} data.update(dict(request.values)) msg = data.get("msg") if not msg: ra...
true
true
1c469feaecafc257a8d704b752cfef5883265ac6
291
py
Python
random/agent.py
iejMac/TTTArena
056636f064769c3251fb2448e7487b4fa8394733
[ "MIT" ]
3
2021-05-23T23:55:03.000Z
2021-07-09T16:01:10.000Z
random/agent.py
iejMac/TTTArena
056636f064769c3251fb2448e7487b4fa8394733
[ "MIT" ]
null
null
null
random/agent.py
iejMac/TTTArena
056636f064769c3251fb2448e7487b4fa8394733
[ "MIT" ]
2
2021-07-09T11:44:09.000Z
2021-07-11T12:32:58.000Z
from agent import Agent from numpy.random import randint class RandomAgent(Agent): def __init__(self, name): super().__init__(name) def make_action(self, state): movex = randint(0, state.shape[1]) movey = randint(0, state.shape[0]) return (movey, movex)
20.785714
39
0.659794
from agent import Agent from numpy.random import randint class RandomAgent(Agent): def __init__(self, name): super().__init__(name) def make_action(self, state): movex = randint(0, state.shape[1]) movey = randint(0, state.shape[0]) return (movey, movex)
true
true
1c46a09640f355fa068c98b298841bc96a9474b0
1,533
py
Python
count_zeroavg.py
Renata1995/Topic-Distance-and-Coherence
d567d5b3ef71ea5654f214aa3736add7f3ac94bc
[ "Apache-2.0" ]
5
2018-08-25T07:16:31.000Z
2020-11-12T00:36:15.000Z
count_zeroavg.py
Renata1995/Topic-Distance-and-Coherence
d567d5b3ef71ea5654f214aa3736add7f3ac94bc
[ "Apache-2.0" ]
1
2018-09-24T16:17:47.000Z
2018-09-24T16:17:47.000Z
count_zeroavg.py
Renata1995/Topic-Distance-and-Coherence
d567d5b3ef71ea5654f214aa3736add7f3ac94bc
[ "Apache-2.0" ]
4
2018-05-07T07:52:10.000Z
2020-11-12T00:36:18.000Z
import sys import utils.name_convention as name import numpy as np if len(sys.argv) <= 1: corpus_type = "bow" else: if sys.argv[1] == "t": corpus_type = "tfidf" elif sys.argv[1] == "b": corpus_type = "binary" else: corpus_type = "bow" if len(sys.argv) <= 2: topics_count = 3...
27.375
116
0.580561
import sys import utils.name_convention as name import numpy as np if len(sys.argv) <= 1: corpus_type = "bow" else: if sys.argv[1] == "t": corpus_type = "tfidf" elif sys.argv[1] == "b": corpus_type = "binary" else: corpus_type = "bow" if len(sys.argv) <= 2: topics_count = 3...
true
true
1c46a1195f1820aed9bcbc13e7c2b5fa70a3462e
2,788
py
Python
06-About_json/qq_geci.py
jiaxiaochu/Crawler
bb54d515dc217c27574b36124e16fd5b993775bd
[ "MIT" ]
null
null
null
06-About_json/qq_geci.py
jiaxiaochu/Crawler
bb54d515dc217c27574b36124e16fd5b993775bd
[ "MIT" ]
1
2020-08-27T10:25:38.000Z
2020-08-27T10:25:38.000Z
06-About_json/qq_geci.py
jiaxiaochu/Crawler
bb54d515dc217c27574b36124e16fd5b993775bd
[ "MIT" ]
null
null
null
# !/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 # @blog : www.jiazhixiang.xyz # @Author : Jiazhixiang # -*- coding:utf-8 -*- import requests url_song = 'https://c.y.qq.com/soso/fcgi-bin/client_search_cp' for x in range(1, 4): params_song = { 'ct': '24', 'qqmusic_ver': '1298', ...
33.190476
142
0.51901
import requests url_song = 'https://c.y.qq.com/soso/fcgi-bin/client_search_cp' for x in range(1, 4): params_song = { 'ct': '24', 'qqmusic_ver': '1298', 'new_json': '1', 'remoteplace': 'sizer.yqq.song_next', 'searchid': '64405487069162918', 't': '0', 'aggr': '1...
true
true
1c46a149c4c1484cee731d07530a6c9bf4e29a18
2,633
py
Python
dstream_excel/tracker/files.py
nickderobertis/datastream-excel-downloader-py
3407decdf27da117758ce5ecc538d9f65c6ad5f6
[ "MIT" ]
1
2019-10-14T10:36:18.000Z
2019-10-14T10:36:18.000Z
dstream_excel/tracker/files.py
whoopnip/datastream-excel-downloader-py
3407decdf27da117758ce5ecc538d9f65c6ad5f6
[ "MIT" ]
4
2020-03-24T17:45:15.000Z
2021-06-02T00:20:24.000Z
dstream_excel/tracker/files.py
whoopnip/datastream-excel-downloader-py
3407decdf27da117758ce5ecc538d9f65c6ad5f6
[ "MIT" ]
null
null
null
import ast import os import time from dstream_excel.tracker.timing import TimeTracker class FileProcessTracker: def __init__(self, folder=None, restart=False, file_types=('csv',)): if folder is None: self.folder = os.getcwd() else: self.folder = os.path.abspath(folder) ...
30.976471
111
0.713635
import ast import os import time from dstream_excel.tracker.timing import TimeTracker class FileProcessTracker: def __init__(self, folder=None, restart=False, file_types=('csv',)): if folder is None: self.folder = os.getcwd() else: self.folder = os.path.abspath(folder) ...
true
true
1c46a17bd0d5d84ec22deeb07d1811a1fdd110c1
37,607
py
Python
msgraph-cli-extensions/v1_0/notes_v1_0/azext_notes_v1_0/vendored_sdks/notes/aio/operations/_sites_onenote_sections_parent_section_group_parent_notebook_operations.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/v1_0/notes_v1_0/azext_notes_v1_0/vendored_sdks/notes/aio/operations/_sites_onenote_sections_parent_section_group_parent_notebook_operations.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
22
2022-03-29T22:54:37.000Z
2022-03-29T22:55:27.000Z
msgraph-cli-extensions/v1_0/notes_v1_0/azext_notes_v1_0/vendored_sdks/notes/aio/operations/_sites_onenote_sections_parent_section_group_parent_notebook_operations.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.275995
183
0.653416
from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.c...
true
true
1c46a26fe64a116c11f1bc95d480deebd0f970c0
5,517
py
Python
docs/source/conf.py
zeromake/restful-model
f2bed56a2aa23ade4a7882296c41222a64dc24f2
[ "MIT" ]
8
2018-08-09T10:03:53.000Z
2020-03-03T11:02:11.000Z
docs/source/conf.py
zeromake/restful-model
f2bed56a2aa23ade4a7882296c41222a64dc24f2
[ "MIT" ]
null
null
null
docs/source/conf.py
zeromake/restful-model
f2bed56a2aa23ade4a7882296c41222a64dc24f2
[ "MIT" ]
2
2019-08-12T20:53:46.000Z
2021-11-04T06:01:23.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
31.169492
79
0.64691
project = 'restful_model' copyright = '2018, zeromake <a390720046@gmail.com>' author = 'zeromake <a390720046@gmail.com>' version = '' release = '' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext....
true
true
1c46a40c89f7ba576f27e1b22089cb2513eaa2c5
31,354
py
Python
usaspending_api/spending_explorer/tests/integration/test_spending_explorer.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
null
null
null
usaspending_api/spending_explorer/tests/integration/test_spending_explorer.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
null
null
null
usaspending_api/spending_explorer/tests/integration/test_spending_explorer.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
null
null
null
import copy import json import pytest from datetime import datetime, timezone from model_mommy import mommy from rest_framework import status from usaspending_api.awards.models import FinancialAccountsByAwards from usaspending_api.financial_activities.models import ( FinancialAccountsByProgramActivityObjectClass,...
34.607064
120
0.574919
import copy import json import pytest from datetime import datetime, timezone from model_mommy import mommy from rest_framework import status from usaspending_api.awards.models import FinancialAccountsByAwards from usaspending_api.financial_activities.models import ( FinancialAccountsByProgramActivityObjectClass,...
true
true
1c46a526cd71a1a644839ed9cdd68a4e1e211d57
15,561
py
Python
examples/tsunami/eta_init_force_dry/setrun.py
AsianHam/geoclaw
b5f9ee8cd6e64d107ba8bba1e6d588aa7bf6d417
[ "BSD-3-Clause" ]
51
2015-07-01T13:39:17.000Z
2022-03-07T16:13:17.000Z
examples/tsunami/eta_init_force_dry/setrun.py
AsianHam/geoclaw
b5f9ee8cd6e64d107ba8bba1e6d588aa7bf6d417
[ "BSD-3-Clause" ]
274
2015-02-20T18:25:04.000Z
2022-03-09T23:51:47.000Z
examples/tsunami/eta_init_force_dry/setrun.py
AsianHam/geoclaw
b5f9ee8cd6e64d107ba8bba1e6d588aa7bf6d417
[ "BSD-3-Clause" ]
66
2015-01-10T00:05:00.000Z
2022-02-24T22:05:16.000Z
""" Module to set up run time parameters for Clawpack. The values set in the function setrun are then written out to data files that will be read in by the Fortran code. """ from __future__ import absolute_import from __future__ import print_function import os, sys import numpy as np try: CLAW = os.environ['CL...
30.998008
92
0.620911
from __future__ import absolute_import from __future__ import print_function import os, sys import numpy as np try: CLAW = os.environ['CLAW'] except: raise Exception("*** Must first set CLAW enviornment variable") from clawpack.geoclaw.data import ForceDry from clawpack.amrclaw.data import FlagRegion def ...
true
true
1c46a52971174cbf30b7942c93c8d2e79189a054
4,037
py
Python
django_opentracing/tracer.py
dudymas/opentracing-django
3ad67f5c28f7eb36df558dc9e5e171e960afd9cb
[ "BSD-3-Clause" ]
null
null
null
django_opentracing/tracer.py
dudymas/opentracing-django
3ad67f5c28f7eb36df558dc9e5e171e960afd9cb
[ "BSD-3-Clause" ]
null
null
null
django_opentracing/tracer.py
dudymas/opentracing-django
3ad67f5c28f7eb36df558dc9e5e171e960afd9cb
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings import opentracing try: from threading import local except ImportError: from django.utils._threading_local import local _thread_locals = local() django_tracer = None def get_tracer(): return opentracing.tracer def get_current_span(request=None): if request is None: ...
35.104348
101
0.628685
from django.conf import settings import opentracing try: from threading import local except ImportError: from django.utils._threading_local import local _thread_locals = local() django_tracer = None def get_tracer(): return opentracing.tracer def get_current_span(request=None): if request is None: ...
true
true
1c46a5e42c962596d622b69453575d9dba1e629a
291
py
Python
manage.py
cron-ooo/django-influxdb-metrics
7cecc315e12219897d941a6c02eac8ffc182b645
[ "MIT" ]
54
2016-11-25T10:00:23.000Z
2022-03-17T09:27:49.000Z
manage.py
cron-ooo/django-influxdb-metrics
7cecc315e12219897d941a6c02eac8ffc182b645
[ "MIT" ]
27
2016-12-01T17:35:37.000Z
2021-03-30T16:37:49.000Z
manage.py
cron-ooo/django-influxdb-metrics
7cecc315e12219897d941a6c02eac8ffc182b645
[ "MIT" ]
23
2016-11-22T09:26:28.000Z
2022-03-14T11:34:33.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'influxdb_metrics.tests.settings') from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
24.25
64
0.71134
import os import sys if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'influxdb_metrics.tests.settings') from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
1c46a757bacabb1d955e01d6573c009ce4f99f02
1,247
py
Python
airflow/utils/types.py
shashijangra/airflow-1
c3e340584bf1892c4f73aa9e7495b5823dab0c40
[ "Apache-2.0" ]
2
2021-07-30T17:25:56.000Z
2021-08-03T13:51:09.000Z
airflow/utils/types.py
shashijangra/airflow-1
c3e340584bf1892c4f73aa9e7495b5823dab0c40
[ "Apache-2.0" ]
14
2019-12-03T02:54:42.000Z
2020-02-27T16:08:10.000Z
airflow/utils/types.py
shashijangra/airflow-1
c3e340584bf1892c4f73aa9e7495b5823dab0c40
[ "Apache-2.0" ]
1
2021-07-02T04:23:18.000Z
2021-07-02T04:23:18.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.638889
67
0.709703
import enum class DagRunType(enum.Enum): BACKFILL_JOB = "backfill" SCHEDULED = "scheduled" MANUAL = "manual" @staticmethod def from_run_id(run_id: str) -> "DagRunType": for run_type in DagRunType: if run_id and run_id.startswith(f"{run_type.value}__"): return ...
true
true
1c46a76ba0a8d816e3975d24a0ab719d4db28b66
1,038
py
Python
Download/PythonExercicios/ex028.py
r-luis/Python-CursoemVideo
f978b2f4ab8444ebb746b4c85bd6db6d7775cbb4
[ "MIT" ]
null
null
null
Download/PythonExercicios/ex028.py
r-luis/Python-CursoemVideo
f978b2f4ab8444ebb746b4c85bd6db6d7775cbb4
[ "MIT" ]
null
null
null
Download/PythonExercicios/ex028.py
r-luis/Python-CursoemVideo
f978b2f4ab8444ebb746b4c85bd6db6d7775cbb4
[ "MIT" ]
null
null
null
'''Escreva um programa que faça o computador "pensar" em um número inteiro entre 0 e 5 e peça para o usuário tentar descobrir o número escolhido pelo computador. O programa deverá escrever na tela se o usuário venceu ou perdeu.''' from random import randint from time import sleep comp = randint(0, 5) #Computador pensa ...
43.25
98
0.662813
from random import randint from time import sleep comp = randint(0, 5) cores = {'limpa':'\033[m', 'azul':'\033[34m', 'vermelho':'\033[31m', 'roxo':'\033[1;35m'} print('{}-*{}'.format(cores['azul'], cores['limpa'])*12) txt = '{}JOGO DA ADVINHAÇÃO 1.0v{}'.format(cores['vermelho'], cores['limpa...
true
true
1c46a7ad97f59fed8090c80f1a79ff7c63808989
1,479
py
Python
test/tests/16_view-status/hooks.py
airtower-luna/mod_gnutls
b6ce8add210095b2b983f63a818f5d157aff9f89
[ "Apache-2.0" ]
2
2015-04-06T11:28:40.000Z
2021-07-11T12:34:53.000Z
test/tests/16_view-status/hooks.py
airtower-luna/mod_gnutls
b6ce8add210095b2b983f63a818f5d157aff9f89
[ "Apache-2.0" ]
4
2020-09-07T19:27:20.000Z
2021-07-29T19:29:40.000Z
test/tests/16_view-status/hooks.py
airtower-luna/mod_gnutls
b6ce8add210095b2b983f63a818f5d157aff9f89
[ "Apache-2.0" ]
1
2022-01-26T12:17:17.000Z
2022-01-26T12:17:17.000Z
from mgstest import require_match, TestExpectationFailed import re def post_check(conn_log, response_log): """Compare the TLS session information reported by gnutls-cli and the mod_gnutls status listing.""" # Group 1 is the TLS version, group 2 the ciphers. The certificate # type that may be enclosed...
41.083333
79
0.646383
from mgstest import require_match, TestExpectationFailed import re def post_check(conn_log, response_log): re_session = r'\((TLS[\d\.]+).*?\)-(.*)' re_cli = re.compile(r'(?<=^-\sDescription:\s)' + re_session + '$') re_status = re.compile(r'(?<=^Current TLS session:\s)' + re_session +...
true
true
1c46a7d2b1edab1bb3265dfd5cfcfa7042f23663
3,389
py
Python
test/functional/test_framework/coverage.py
bitcoinexodus/bitcoinexodus-source
742661b3dc9abce61c05fa1561b7fd9496629866
[ "MIT" ]
null
null
null
test/functional/test_framework/coverage.py
bitcoinexodus/bitcoinexodus-source
742661b3dc9abce61c05fa1561b7fd9496629866
[ "MIT" ]
null
null
null
test/functional/test_framework/coverage.py
bitcoinexodus/bitcoinexodus-source
742661b3dc9abce61c05fa1561b7fd9496629866
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Utilities for doing coverage analysis on the RPC interface. Provides a way to track which RPC commands...
30.809091
87
0.661552
import os REFERENCE_FILENAME = 'rpc_interface.txt' class AuthServiceProxyWrapper(): def __init__(self, auth_service_proxy_instance, coverage_logfile=None): self.auth_service_proxy_instance = auth_service_proxy_instance self.coverage_logfile = coverage_logfile def __getattr__(self, name): ...
true
true
1c46a823ab8bfa1ba9d65641cad3d178ad45586f
902
py
Python
psx/_dump_/33/_dump_ida_/overlay_3/set_funcs.py
maoa3/scalpel
2e7381b516cded28996d290438acc618d00b2aa7
[ "Unlicense" ]
15
2018-06-28T01:11:25.000Z
2021-09-27T15:57:18.000Z
psx/_dump_/33/_dump_ida_/overlay_3/set_funcs.py
maoa3/scalpel
2e7381b516cded28996d290438acc618d00b2aa7
[ "Unlicense" ]
7
2018-06-29T04:08:23.000Z
2019-10-17T13:57:22.000Z
psx/_dump_/33/_dump_ida_/overlay_3/set_funcs.py
maoa3/scalpel
2e7381b516cded28996d290438acc618d00b2aa7
[ "Unlicense" ]
7
2018-06-28T01:11:34.000Z
2020-05-23T09:21:48.000Z
del_items(0x800A1608) SetType(0x800A1608, "void VID_OpenModule__Fv()") del_items(0x800A16C8) SetType(0x800A16C8, "void InitScreens__Fv()") del_items(0x800A17B8) SetType(0x800A17B8, "void MEM_SetupMem__Fv()") del_items(0x800A17E4) SetType(0x800A17E4, "void SetupWorkRam__Fv()") del_items(0x800A1874) SetType(0x800A1874, "...
33.407407
72
0.805987
del_items(0x800A1608) SetType(0x800A1608, "void VID_OpenModule__Fv()") del_items(0x800A16C8) SetType(0x800A16C8, "void InitScreens__Fv()") del_items(0x800A17B8) SetType(0x800A17B8, "void MEM_SetupMem__Fv()") del_items(0x800A17E4) SetType(0x800A17E4, "void SetupWorkRam__Fv()") del_items(0x800A1874) SetType(0x800A1874, "...
true
true
1c46a948950c865d0aa8057ce1992e94cb642566
816
py
Python
ta/tests/__init__.py
levelvc/ta
69aa29f60c691f1628a62e480cfd6bfb3a5c1793
[ "MIT" ]
2
2020-04-13T03:34:01.000Z
2020-06-01T14:41:26.000Z
ta/tests/__init__.py
Glyphack/ta
ff46a2cb64f7446921bb3c47c882105a16f9d4f9
[ "MIT" ]
null
null
null
ta/tests/__init__.py
Glyphack/ta
ff46a2cb64f7446921bb3c47c882105a16f9d4f9
[ "MIT" ]
null
null
null
from ta.tests.momentum import (TestKAMAIndicator, TestRateOfChangeIndicator, TestRSIIndicator, TestStochasticOscillator, TestTSIIndicator, TestUltimateOscillator, TestWilliamsRIndicator) from ta.tests.trend import (TestADXIndic...
58.285714
76
0.629902
from ta.tests.momentum import (TestKAMAIndicator, TestRateOfChangeIndicator, TestRSIIndicator, TestStochasticOscillator, TestTSIIndicator, TestUltimateOscillator, TestWilliamsRIndicator) from ta.tests.trend import (TestADXIndic...
true
true
1c46aa65d6d2fd5ed331e10e2a59dc999d7176c4
2,420
py
Python
experiments/actions/action_utils.py
Tobias-Fischer/dreyeve
a65342d9c503ce3ec932e2229b90aaeebfd82944
[ "MIT" ]
83
2017-05-29T04:16:42.000Z
2022-03-03T08:09:22.000Z
experiments/actions/action_utils.py
ashinmarin/dreyeve
d73979d738e706d90a8aa9d696c6e4dcb19c1134
[ "MIT" ]
26
2017-11-09T23:35:52.000Z
2022-03-11T03:22:57.000Z
experiments/actions/action_utils.py
ashinmarin/dreyeve
d73979d738e706d90a8aa9d696c6e4dcb19c1134
[ "MIT" ]
36
2017-09-23T02:48:41.000Z
2022-03-11T01:34:23.000Z
""" Utilities for improve code readability in `predict_actions_with_SVM.py` """ import itertools import numpy as np import matplotlib.pyplot as plt from os.path import join, exists class DreyeveRun: """ Single run of the DR(eye)VE dataset. """ def __init__(self, dataset_data_root, num_run): ...
33.150685
110
0.645868
import itertools import numpy as np import matplotlib.pyplot as plt from os.path import join, exists class DreyeveRun: def __init__(self, dataset_data_root, num_run): self.num_run = num_run self.file_course = join(dataset_data_root, '{:02d}'.format(self.num_run), 'speed_course_coord.txt') ...
true
true