hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795b45763754ac21f407eb47726a3677aaaf0223 | 86,079 | py | Python | python3/html5lib/constants.py | gsnedders/html5lib | a426e4a96f0660b83f3f0bbe6c8160c6f625f199 | [
"MIT"
] | 6 | 2015-04-17T02:33:56.000Z | 2021-07-02T02:38:23.000Z | python3/html5lib/constants.py | gsnedders/html5lib | a426e4a96f0660b83f3f0bbe6c8160c6f625f199 | [
"MIT"
] | null | null | null | python3/html5lib/constants.py | gsnedders/html5lib | a426e4a96f0660b83f3f0bbe6c8160c6f625f199 | [
"MIT"
] | 3 | 2015-05-23T04:49:48.000Z | 2021-02-02T21:12:20.000Z | from __future__ import absolute_import, division, unicode_literals
import string, gettext
_ = gettext.gettext
EOF = None
E = {
"null-character":
_("Null character in input stream, replaced with U+FFFD."),
"invalid-codepoint":
_("Invalid codepoint in stream."),
"incorrectly-placed-solidus"... | 27.938656 | 94 | 0.500854 |
795b4589aeb6804e3122d17892260955d8405ad2 | 8,755 | py | Python | deltaframe/core.py | tkanngiesser/deltaframe | 3311bef620a4142a6557eea16594926fa95f7ef6 | [
"Apache-2.0"
] | null | null | null | deltaframe/core.py | tkanngiesser/deltaframe | 3311bef620a4142a6557eea16594926fa95f7ef6 | [
"Apache-2.0"
] | 2 | 2021-09-28T05:45:27.000Z | 2022-02-26T10:21:18.000Z | deltaframe/core.py | tkanngiesser/deltaframe | 3311bef620a4142a6557eea16594926fa95f7ef6 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
__all__ = ['get_added', 'get_deleted', 'get_modified', 'get_delta', 'log_delta', 'build_latest']
# Cell
import pandas as pd
import numpy as np
# Cell
def get_added(df_old, df_new, unique_id, trans_col="transaction", trans_vaL="ad... | 39.436937 | 173 | 0.665448 |
795b465bcb51c2910c5308939543f4972d14743b | 1,628 | py | Python | tests/test_prometheus_server.py | MetaRed/qualified | 5045316000b1009dfb6d76e495c190b68a0902fa | [
"MIT"
] | 1 | 2018-03-20T15:04:23.000Z | 2018-03-20T15:04:23.000Z | tests/test_prometheus_server.py | MetaRed/qualified | 5045316000b1009dfb6d76e495c190b68a0902fa | [
"MIT"
] | null | null | null | tests/test_prometheus_server.py | MetaRed/qualified | 5045316000b1009dfb6d76e495c190b68a0902fa | [
"MIT"
] | null | null | null | import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'.molecule/ansible_inventory').get_hosts('all')
def test_prometheus_user(User):
u = User("prometheus")
assert u.exists
assert u.group == 'prometheus'
assert u.shell == '/sbin/nologin'
assert ... | 22.30137 | 63 | 0.706388 |
795b46f82c68b034858c2f67679c2dce2d022082 | 567 | py | Python | examples/pyboost_dev/crc_example.py | electronicvisions/pyplusplus | 4d88bb8754d22654a61202ae8adc222807953e38 | [
"BSL-1.0"
] | 9 | 2016-06-07T19:14:53.000Z | 2020-02-28T09:06:19.000Z | examples/pyboost_dev/crc_example.py | electronicvisions/pyplusplus | 4d88bb8754d22654a61202ae8adc222807953e38 | [
"BSL-1.0"
] | 1 | 2018-08-15T11:33:40.000Z | 2018-08-15T11:33:40.000Z | examples/pyboost_dev/crc_example.py | electronicvisions/pyplusplus | 4d88bb8754d22654a61202ae8adc222807953e38 | [
"BSL-1.0"
] | 5 | 2016-06-23T09:37:00.000Z | 2019-12-18T13:51:29.000Z | import os
import sys
from pyboost import crc
if __name__ == '__main__':
if sys.argv:
files = sys.argv
else:
files = [ sys.executable ]
try:
result = crc.crc_32_type()
for file_name in files:
ifs = file( file_name, 'rb' )
for lin... | 28.35 | 90 | 0.530864 |
795b4853a025e9da889ea4061504b5850c414b7f | 1,726 | py | Python | tests/test_vcs_show.py | scottwittenburg/vcs | 5b9f17fb78f7ab186fc0132ab81ada043a7ba348 | [
"BSD-3-Clause"
] | 11 | 2018-10-10T03:14:33.000Z | 2022-01-05T14:18:15.000Z | tests/test_vcs_show.py | scottwittenburg/vcs | 5b9f17fb78f7ab186fc0132ab81ada043a7ba348 | [
"BSD-3-Clause"
] | 196 | 2018-03-21T19:44:56.000Z | 2021-12-21T21:56:24.000Z | tests/test_vcs_show.py | scottwittenburg/vcs | 5b9f17fb78f7ab186fc0132ab81ada043a7ba348 | [
"BSD-3-Clause"
] | 5 | 2019-12-09T21:54:45.000Z | 2022-03-20T04:22:14.000Z | import basevcstest
class TestVCS(basevcstest.VCSBaseTest):
def testShowElements(self):
self.x.show("taylordiagram")
assert(self.x.listelements("taylordiagram") == ["default"])
assert(
self.x.listelements() == [
'1d',
'3d_dual_scalar',
... | 26.96875 | 67 | 0.348204 |
795b488460817bcb551f236154dfa3e3feb94742 | 27,797 | py | Python | plotly_study/validators/barpolar/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | plotly_study/validators/barpolar/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | plotly_study/validators/barpolar/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="widthsrc", parent_name="barpolar", **kwargs):
super(WidthsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 35.230672 | 87 | 0.615894 |
795b492ec09fefe907b0105451569890dc0511f9 | 10,776 | py | Python | q2_phylogenomics/tests/test_assemble.py | gregcaporaso/q2-phylogenomics | 2a9f953f6142b110dde2a7b26f34c42fe7d2f8ed | [
"BSD-3-Clause"
] | null | null | null | q2_phylogenomics/tests/test_assemble.py | gregcaporaso/q2-phylogenomics | 2a9f953f6142b110dde2a7b26f34c42fe7d2f8ed | [
"BSD-3-Clause"
] | 4 | 2020-04-10T18:17:39.000Z | 2020-04-15T14:40:09.000Z | q2_phylogenomics/tests/test_assemble.py | gregcaporaso/q2-phylogenomics | 2a9f953f6142b110dde2a7b26f34c42fe7d2f8ed | [
"BSD-3-Clause"
] | 3 | 2020-03-24T16:31:49.000Z | 2020-04-06T21:12:17.000Z | # ----------------------------------------------------------------------------
# Copyright (c) 2020, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------... | 42.592885 | 79 | 0.58454 |
795b49fc9a8c3749f2052b1b30f93998884e9321 | 495 | py | Python | setup.py | aurieh/ircproto | 2053e1795a6937ee2a780bddd31ec73e5d5fefc6 | [
"BSD-3-Clause"
] | 2 | 2018-04-05T17:35:24.000Z | 2018-04-06T03:28:34.000Z | setup.py | aurieh/ircproto | 2053e1795a6937ee2a780bddd31ec73e5d5fefc6 | [
"BSD-3-Clause"
] | null | null | null | setup.py | aurieh/ircproto | 2053e1795a6937ee2a780bddd31ec73e5d5fefc6 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(
name='ircproto',
description='ircproto - protocol-only IRC library',
long_description='Protocol-only, bring your own IO IRC library for Python.',
license='BSD',
author='Aurieh',
url='https://github.com/aurieh/ircproto',
packages=['ircproto'],
classifi... | 30.9375 | 80 | 0.642424 |
795b4a3e83912e109adfc86e6793b2291c92c1c9 | 13,312 | py | Python | tests/test_fields.py | kkszysiu/restea | 34ef2ee683a259a05e530514e743a9f69fa5e663 | [
"MIT"
] | null | null | null | tests/test_fields.py | kkszysiu/restea | 34ef2ee683a259a05e530514e743a9f69fa5e663 | [
"MIT"
] | null | null | null | tests/test_fields.py | kkszysiu/restea | 34ef2ee683a259a05e530514e743a9f69fa5e663 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import mock
import pytest
import datetime
from restea.fields import (
Boolean,
Dict,
Field,
FieldSet,
Integer,
List,
String,
Regex,
URL,
Email,
DateTime,
CommaSeparatedListField,
)
def create_field_set_helper(no_fields=False):
... | 27.849372 | 78 | 0.668645 |
795b4aff0a0fc4f3af01aa38c585c7745e6fe11b | 5,350 | py | Python | test/Deprecated/Options/help.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | 1 | 2019-09-18T06:37:02.000Z | 2019-09-18T06:37:02.000Z | test/Deprecated/Options/help.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | test/Deprecated/Options/help.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to us... | 31.28655 | 111 | 0.68729 |
795b4c298d996e5d00615cd780e95a48e81bf9be | 2,096 | py | Python | tests/config/test_generate.py | cleveritcz/synapse | caead3e45968a9f753da7bc11ee588ab4efda858 | [
"Apache-2.0"
] | 1 | 2019-05-01T11:05:51.000Z | 2019-05-01T11:05:51.000Z | tests/config/test_generate.py | cleveritcz/synapse | caead3e45968a9f753da7bc11ee588ab4efda858 | [
"Apache-2.0"
] | null | null | null | tests/config/test_generate.py | cleveritcz/synapse | caead3e45968a9f753da7bc11ee588ab4efda858 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 29.942857 | 74 | 0.589218 |
795b4c95cc9451afdaef545a8359749eec195110 | 9,520 | py | Python | r2r_src/param.py | ZhuFengdaaa/MG-AuxRN | 3dee0b6c1293dd521a53e95b0cbed696ceaa93f9 | [
"MIT-0",
"MIT"
] | 22 | 2020-09-20T02:54:11.000Z | 2022-01-18T16:24:59.000Z | r2r_src/param.py | ZhuFengdaaa/MG-AuxRN | 3dee0b6c1293dd521a53e95b0cbed696ceaa93f9 | [
"MIT-0",
"MIT"
] | 3 | 2020-10-04T03:50:15.000Z | 2021-12-13T05:15:22.000Z | r2r_src/param.py | ZhuFengdaaa/MG-AuxRN | 3dee0b6c1293dd521a53e95b0cbed696ceaa93f9 | [
"MIT-0",
"MIT"
] | 3 | 2021-02-06T06:47:19.000Z | 2021-12-10T19:27:23.000Z | import argparse
import os
import torch
class Param:
def __init__(self):
self.parser = argparse.ArgumentParser(description="")
# General
self.parser.add_argument('--iters', type=int, default=80000)
self.parser.add_argument('--name', type=str, default='default')
self.parser.... | 59.130435 | 125 | 0.673004 |
795b4d0fd4efa5d1fc51341c288f83324f613c2f | 314 | py | Python | setup.py | LuckyScott/pg-es-fdw | 8d0ecd6b3cade0e985718057868c0de970b107d3 | [
"MIT"
] | 102 | 2015-07-08T09:53:22.000Z | 2021-03-19T02:20:42.000Z | setup.py | LuckyScott/pg-es-fdw | 8d0ecd6b3cade0e985718057868c0de970b107d3 | [
"MIT"
] | 6 | 2016-06-17T20:42:10.000Z | 2018-02-07T13:02:55.000Z | setup.py | LuckyScott/pg-es-fdw | 8d0ecd6b3cade0e985718057868c0de970b107d3 | [
"MIT"
] | 34 | 2015-09-29T15:03:23.000Z | 2019-11-22T06:33:00.000Z | ###
### Author:
### Time-stamp: <2010-03-04 23:04:21 dwa>
from setuptools import setup
if __name__ == '__main__':
setup(
name='dite',
version='0.0.1',
author='Mikulas Dite',
license='Postgresql',
packages=['dite']
)
## Local Variables: ***
## mode:python ***
## coding: utf-8 ***
## End: ***
| 16.526316 | 41 | 0.576433 |
795b4d1d687858ccb68f5f6d5375fe2a2c077080 | 6,445 | py | Python | molecule/common/tests/test_instances.py | tarantool/ansible-cartridge | 14d86752d582f43f0d8efb27dbaa1175ff6e8ac2 | [
"BSD-2-Clause"
] | 17 | 2019-09-02T15:31:56.000Z | 2022-03-29T18:49:59.000Z | molecule/common/tests/test_instances.py | tarantool/ansible-cartridge | 14d86752d582f43f0d8efb27dbaa1175ff6e8ac2 | [
"BSD-2-Clause"
] | 171 | 2019-10-24T15:34:34.000Z | 2022-03-29T09:18:46.000Z | molecule/common/tests/test_instances.py | tarantool/ansible-cartridge | 14d86752d582f43f0d8efb27dbaa1175ff6e8ac2 | [
"BSD-2-Clause"
] | 14 | 2019-12-23T08:27:06.000Z | 2021-07-06T15:53:49.000Z | import os
from yaml import CLoader as Loader
import utils
testinfra_hosts = utils.get_testinfra_hosts()
def check_conf_file(conf_file, instance_id, conf):
assert conf_file is not None, 'Config file should exists'
assert conf_file.exists
assert conf_file.user == 'tarantool'
assert conf_file.group ==... | 36.005587 | 108 | 0.691699 |
795b4f8386af37e5e59146042a94c0fee32016bc | 1,277 | py | Python | tests/test_collection_crs.py | hobu/Fiona | d6ec15f1c2e7a860bc57d35a51e36aeb48377a1a | [
"BSD-3-Clause"
] | null | null | null | tests/test_collection_crs.py | hobu/Fiona | d6ec15f1c2e7a860bc57d35a51e36aeb48377a1a | [
"BSD-3-Clause"
] | null | null | null | tests/test_collection_crs.py | hobu/Fiona | d6ec15f1c2e7a860bc57d35a51e36aeb48377a1a | [
"BSD-3-Clause"
] | null | null | null | import os
import re
import fiona
import fiona.crs
from .conftest import WGS84PATTERN, requires_gdal2
def test_collection_crs_wkt(path_coutwildrnp_shp):
with fiona.open(path_coutwildrnp_shp) as src:
assert re.match(WGS84PATTERN, src.crs_wkt)
def test_collection_no_crs_wkt(tmpdir, path_coutwildrnp_shp):... | 34.513514 | 176 | 0.697729 |
795b4fb75e8cd8b10fadb9bf387c63ba3cbf2c1a | 442 | py | Python | angr/procedures/libc/vsnprintf.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 2 | 2018-05-02T17:41:36.000Z | 2020-05-18T02:49:16.000Z | angr/procedures/libc/vsnprintf.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | null | null | null | angr/procedures/libc/vsnprintf.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 1 | 2022-02-10T02:29:38.000Z | 2022-02-10T02:29:38.000Z | import angr
######################################
# __vsnprintf
######################################
class vsnprintf(angr.SimProcedure):
#pylint:disable=arguments-differ
def run(self, str_ptr, size, fmt, ap): #pylint:disable=unused-argument
# This function returns
# Add another exit to the... | 26 | 79 | 0.558824 |
795b506687de7bde60ac9026adfa7d5cbb35cd58 | 2,334 | py | Python | products/views.py | pythonmentor/teiva-p11 | 4be26edbad6e490c3991ca1ce5680e889b2ab75a | [
"MIT",
"Unlicense"
] | null | null | null | products/views.py | pythonmentor/teiva-p11 | 4be26edbad6e490c3991ca1ce5680e889b2ab75a | [
"MIT",
"Unlicense"
] | null | null | null | products/views.py | pythonmentor/teiva-p11 | 4be26edbad6e490c3991ca1ce5680e889b2ab75a | [
"MIT",
"Unlicense"
] | null | null | null | from django.contrib.auth.decorators import login_required
from django.http import Http404
from django.shortcuts import render
from products.forms import SearchForm
from products.managers import ProductManager
from favoritecart.helpers import redirect_to_login
from favoritecart.cart import FavoriteCart
def sub_list(... | 31.540541 | 74 | 0.600257 |
795b50d5f50cec669b015ad0f905961876d8082c | 5,094 | py | Python | RESTful_Face_Web/RESTful_Face_Web/runtime_db/runtime_database.py | luzhoutao/face | ae5910f57ae86412e8a56adbefe4f260dde216f0 | [
"MIT"
] | null | null | null | RESTful_Face_Web/RESTful_Face_Web/runtime_db/runtime_database.py | luzhoutao/face | ae5910f57ae86412e8a56adbefe4f260dde216f0 | [
"MIT"
] | null | null | null | RESTful_Face_Web/RESTful_Face_Web/runtime_db/runtime_database.py | luzhoutao/face | ae5910f57ae86412e8a56adbefe4f260dde216f0 | [
"MIT"
] | null | null | null | # retrieve project path settings
# database connections
from django.db import connections
# system operation
import os
# logging
import logging, traceback
log = logging.getLogger(__name__)
# abstract class
from abc import ABCMeta, abstractmethod
from RESTful_Face_Web import settings
# database manager to create on th... | 34.653061 | 116 | 0.647821 |
795b522afd082ec065eaf754b6cc531182ba2051 | 9,669 | py | Python | neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | null | null | null | neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-27T00:48:55.000Z | 2015-04-21T05:29:37.000Z | neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-26T00:55:17.000Z | 2020-03-01T17:05:40.000Z | # Copyright (c) 2013 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 44.353211 | 79 | 0.600165 |
795b536ba1f9fda7e28b8e0347967f98446cd5f2 | 6,831 | py | Python | bnpy/viz/ProposalViz.py | zhaottcrystal/bnpy | 0195a0228e9e698799e52a6dfa1d051e82b43fd0 | [
"BSD-3-Clause"
] | 1 | 2019-05-14T19:56:53.000Z | 2019-05-14T19:56:53.000Z | bnpy/viz/ProposalViz.py | zhaottcrystal/bnpy | 0195a0228e9e698799e52a6dfa1d051e82b43fd0 | [
"BSD-3-Clause"
] | null | null | null | bnpy/viz/ProposalViz.py | zhaottcrystal/bnpy | 0195a0228e9e698799e52a6dfa1d051e82b43fd0 | [
"BSD-3-Clause"
] | 1 | 2020-09-01T13:21:18.000Z | 2020-09-01T13:21:18.000Z | import numpy as np
import os
import sys
import glob
from birthmove import BLogger
from viz.PlotUtil import pylab
CELL_WIDTH = 200
SQIMG_WIDTH = 200
WIDEIMG_WIDTH = 600
htmlstart = """
<html>
<style>
td.comment {
border: 0px;
width: %dpx;
text-align: center;
padding-bottom: ... | 29.7 | 79 | 0.563168 |
795b5380472dd5d180ef97d5cb9cfc6952e5fec9 | 24,485 | py | Python | lib/sqlalchemy/testing/assertions.py | lvillis/sqlalchemy | 889d05c444264bf1b6d11386459d3360cc529d27 | [
"MIT"
] | null | null | null | lib/sqlalchemy/testing/assertions.py | lvillis/sqlalchemy | 889d05c444264bf1b6d11386459d3360cc529d27 | [
"MIT"
] | null | null | null | lib/sqlalchemy/testing/assertions.py | lvillis/sqlalchemy | 889d05c444264bf1b6d11386459d3360cc529d27 | [
"MIT"
] | null | null | null | # testing/assertions.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
import contextlib
from itertools import filterfalse
import re
import sys
impo... | 31.391026 | 81 | 0.592526 |
795b53c65f620b1767c05c6b1c48a7f42790874a | 1,993 | py | Python | tests/test_config.py | infrascloudy/acme | 5e0ffe29f8fc8008662f511de3e6cfaf9049b74e | [
"MIT"
] | null | null | null | tests/test_config.py | infrascloudy/acme | 5e0ffe29f8fc8008662f511de3e6cfaf9049b74e | [
"MIT"
] | null | null | null | tests/test_config.py | infrascloudy/acme | 5e0ffe29f8fc8008662f511de3e6cfaf9049b74e | [
"MIT"
] | null | null | null | from unittest import TestCase
import os
import sys
import ConfigParser
import cStringIO
import tempfile
import shutil
import acme
from acme import metadata
__author__ = metadata.authors
__copyright__ = metadata.copyright
__license__ = metadata.license
def setenv(name, value):
os.environ[name] = value
def unse... | 18.453704 | 78 | 0.687908 |
795b54755163de077676dd4aba3eb5a3457ea329 | 4,677 | py | Python | tests/snappy_pipeline/workflows/test_workflows_somatic_msi_calling.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 5 | 2021-02-26T10:39:56.000Z | 2021-12-23T07:53:26.000Z | tests/snappy_pipeline/workflows/test_workflows_somatic_msi_calling.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 93 | 2021-02-22T11:23:59.000Z | 2022-03-31T09:58:39.000Z | tests/snappy_pipeline/workflows/test_workflows_somatic_msi_calling.py | PotatoThrone/snappy-pipeline | 31200eba84bff8e459e9e210d6d95e2984627f5c | [
"MIT"
] | 3 | 2021-02-22T11:44:59.000Z | 2021-06-21T19:33:53.000Z | # -*- coding: utf-8 -*-
"""Tests for the somatic_msi_calling workflow module code"""
import textwrap
import pytest
import ruamel.yaml as yaml
from snakemake.io import Wildcards
from snappy_pipeline.workflows.somatic_msi_calling import SomaticMsiCallingWorkflow
from .conftest import patch_module_fs
__author__ = "Cl... | 36.255814 | 100 | 0.668805 |
795b548761b1c07cb92bc8835aaaa00ac9a7d887 | 12,529 | py | Python | artemis/core/algo.py | artemis-analytics/artemis | 3e1eebdd4628145ee7d8923567b5e6f53a2e5244 | [
"Apache-2.0"
] | 4 | 2020-02-29T15:02:05.000Z | 2021-05-13T18:50:58.000Z | artemis/core/algo.py | artemis-analytics/artemis | 3e1eebdd4628145ee7d8923567b5e6f53a2e5244 | [
"Apache-2.0"
] | 25 | 2020-02-25T19:29:21.000Z | 2020-04-03T15:06:59.000Z | artemis/core/algo.py | ryanmwhitephd/artemis | 3e1eebdd4628145ee7d8923567b5e6f53a2e5244 | [
"Apache-2.0"
] | 2 | 2021-08-12T09:40:51.000Z | 2021-08-12T09:42:09.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © Her Majesty the Queen in Right of Canada, as represented
# by the Minister of Statistics Canada, 2019.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 30.708333 | 88 | 0.600447 |
795b54b528f702318074d84677f9fed5ea4117d0 | 526 | py | Python | ci_testbed/project_template/leetlib/checkVersion.py | monsdar/docker-testbed | 618a1d69b857ec9afed0dbb6849a4cd4f4140115 | [
"MIT"
] | null | null | null | ci_testbed/project_template/leetlib/checkVersion.py | monsdar/docker-testbed | 618a1d69b857ec9afed0dbb6849a4cd4f4140115 | [
"MIT"
] | null | null | null | ci_testbed/project_template/leetlib/checkVersion.py | monsdar/docker-testbed | 618a1d69b857ec9afed0dbb6849a4cd4f4140115 | [
"MIT"
] | null | null | null |
import re
import subprocess
import sys
INSPECTCMD = "conan inspect conanfile.py -a version" #TODO: Use --raw (or whatever #3913 comes up with)
SEMVER_SHORT_REGEX = re.compile("[0-9]*\.[0-9]*\.[0-9]*")
SEMVER_LONG_REGEX = re.compile("[0-9]*\.[0-9]*\.[0-9]*-[a-zA-Z0-9]*")
output = subprocess.check_output(INSPECTCMD, s... | 30.941176 | 103 | 0.695817 |
795b554bca5a81e6db64269c6ec43391198555c5 | 2,299 | py | Python | pixivpy_async/client.py | LXY1226/pixivpy-async | c417cd838d198ce5c360ea63a6248844dbecd542 | [
"Unlicense"
] | 106 | 2019-09-15T02:58:37.000Z | 2022-03-22T00:52:05.000Z | pixivpy_async/client.py | ethpch/pixivpy-async | 0df6755c4167d30ce189c4c4385e1de80b72dcf4 | [
"Unlicense"
] | 23 | 2020-01-07T23:29:11.000Z | 2022-03-02T11:42:05.000Z | pixivpy_async/client.py | ethpch/pixivpy-async | 0df6755c4167d30ce189c4c4385e1de80b72dcf4 | [
"Unlicense"
] | 21 | 2019-10-29T19:02:50.000Z | 2022-03-01T01:09:59.000Z | import asyncio
import aiohttp
class PixivClient:
def __init__(self, limit=30, timeout=10, env=False, internal=False, proxy=None, bypass=False):
"""
When 'env' is True and 'proxy' is None, possible proxies will be
obtained automatically (wrong proxy may be obtained).
Wh... | 31.067568 | 98 | 0.575033 |
795b55e771d5e833b8c0b9adcaeb971a0a3363ab | 4,898 | py | Python | tests/apollo/test_skvbc_auto_view_change.py | evdzhurov/concord-bft | 2e4fdabe0228b51d4d43398158e97d4e36ff974a | [
"Apache-2.0"
] | null | null | null | tests/apollo/test_skvbc_auto_view_change.py | evdzhurov/concord-bft | 2e4fdabe0228b51d4d43398158e97d4e36ff974a | [
"Apache-2.0"
] | null | null | null | tests/apollo/test_skvbc_auto_view_change.py | evdzhurov/concord-bft | 2e4fdabe0228b51d4d43398158e97d4e36ff974a | [
"Apache-2.0"
] | null | null | null | # Concord
#
# Copyright (c) 2019 VMware, Inc. All Rights Reserved.
#
# This product is licensed to you under the Apache 2.0 license (the "License").
# You may not use this product except in compliance with the Apache 2.0 License.
#
# This product may include a number of subcomponents with separate copyright
# notices a... | 37.106061 | 90 | 0.679869 |
795b565ebc3e8bb41454c6c140a653fbd5978669 | 4,520 | py | Python | code/save_specific/covid19_data.py | ajoer/Newswork-on-Wikipedia | cba1aeffade8cccb0782c856128719ca904a6779 | [
"MIT"
] | 1 | 2020-02-21T10:14:04.000Z | 2020-02-21T10:14:04.000Z | code/save_specific/covid19_data.py | ankajor/Newswork-on-Wikipedia | cba1aeffade8cccb0782c856128719ca904a6779 | [
"MIT"
] | null | null | null | code/save_specific/covid19_data.py | ankajor/Newswork-on-Wikipedia | cba1aeffade8cccb0782c856128719ca904a6779 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Calls the WikiRevParser and extracts information per revision.
This file does *not* save the entire revisions, but rather specific informations per revision:
- timestamp
- size of content
- editor (name or IP adress)
- edit type (e.g. content or style edit)
Output... | 29.542484 | 244 | 0.715487 |
795b569a8dce9b5452193d865310227756c358cd | 9,101 | py | Python | server/api/resources/source/warehouse/support/discover.py | nwfsc-fram/Warehouse | c1a06ab7bacd6c15ab5fe2bb6076e3ea3c95757d | [
"BSD-3-Clause"
] | 5 | 2019-02-27T03:06:02.000Z | 2021-11-15T20:12:50.000Z | server/api/resources/source/warehouse/support/discover.py | nwfsc-fram/Warehouse | c1a06ab7bacd6c15ab5fe2bb6076e3ea3c95757d | [
"BSD-3-Clause"
] | 48 | 2019-02-14T21:15:18.000Z | 2021-10-02T01:18:49.000Z | server/api/resources/source/warehouse/support/discover.py | nwfsc-fram/Warehouse | c1a06ab7bacd6c15ab5fe2bb6076e3ea3c95757d | [
"BSD-3-Clause"
] | 1 | 2021-03-22T23:47:54.000Z | 2021-03-22T23:47:54.000Z | """
Module providing Data Access Object api to discover Warehouse metadata.
Metadata describes the structure and contents of the datawarehouse, enabling
access to the contained data.
Copyright (C) 2016 ERT Inc.
"""
from api.resources.source.warehouse.support.dto import (
association
,table
)
from api.resourc... | 47.649215 | 112 | 0.626634 |
795b5784db8e6ed6f85dc75068a1ac73d7cbafeb | 89 | py | Python | mainweb/apps.py | gregbuaa/influxweb | 16c7ace0c8f9cbb4fc92204181dd8e46665f76ce | [
"MIT"
] | null | null | null | mainweb/apps.py | gregbuaa/influxweb | 16c7ace0c8f9cbb4fc92204181dd8e46665f76ce | [
"MIT"
] | null | null | null | mainweb/apps.py | gregbuaa/influxweb | 16c7ace0c8f9cbb4fc92204181dd8e46665f76ce | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MainwebConfig(AppConfig):
name = 'mainweb'
| 14.833333 | 33 | 0.752809 |
795b5ac12c7ee05d34d84c3333e44b16ad746467 | 783 | py | Python | weblog/blog/adminforms.py | Family-TreeSY/WeBlog | cc26d604caa39f7237788873e8460bae8dff197e | [
"MIT"
] | null | null | null | weblog/blog/adminforms.py | Family-TreeSY/WeBlog | cc26d604caa39f7237788873e8460bae8dff197e | [
"MIT"
] | null | null | null | weblog/blog/adminforms.py | Family-TreeSY/WeBlog | cc26d604caa39f7237788873e8460bae8dff197e | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
from dal import autocomplete
from django import forms
from ckeditor_uploader.widgets import CKEditorUploadingWidget
from .models import Category, Tag
class PostAdminForm(forms.ModelForm):
desc = forms.CharField(widget=forms.Textarea, label='摘要', req... | 34.043478 | 77 | 0.706258 |
795b5b93e3b3f8a093889743436344a342ebba39 | 7,046 | py | Python | timesketch/app.py | ramo-j/timesketch | 5d4d8d1b42944f9cb41a40eb642a9d0b2339a9a6 | [
"Apache-2.0"
] | 1 | 2022-01-14T13:38:02.000Z | 2022-01-14T13:38:02.000Z | timesketch/app.py | ramo-j/timesketch | 5d4d8d1b42944f9cb41a40eb642a9d0b2339a9a6 | [
"Apache-2.0"
] | null | null | null | timesketch/app.py | ramo-j/timesketch | 5d4d8d1b42944f9cb41a40eb642a9d0b2339a9a6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.925234 | 79 | 0.661652 |
795b5d3943531996bcd1d77480d4b31cc6d6ef77 | 771 | py | Python | agro_site/sales_backend/migrations/0003_auto_20220216_2328.py | Mortjke/agro_site | c517979220f805b1c4527bbf40575b45acad4758 | [
"MIT"
] | null | null | null | agro_site/sales_backend/migrations/0003_auto_20220216_2328.py | Mortjke/agro_site | c517979220f805b1c4527bbf40575b45acad4758 | [
"MIT"
] | null | null | null | agro_site/sales_backend/migrations/0003_auto_20220216_2328.py | Mortjke/agro_site | c517979220f805b1c4527bbf40575b45acad4758 | [
"MIT"
] | 2 | 2022-03-11T19:05:36.000Z | 2022-03-11T19:07:14.000Z | # Generated by Django 2.2.16 on 2022-02-16 20:28
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('sales_backend', '0002_p... | 28.555556 | 152 | 0.654994 |
795b5e1a10d4f0fb26bf97a3d98212df515f90fa | 19,388 | py | Python | tests/test_table_layout.py | radjkarl/reportlab | 48cafb6d64ff92fd9d4f9a4dd888be6f7d55b765 | [
"BSD-3-Clause"
] | 51 | 2015-01-20T19:50:34.000Z | 2022-03-05T21:23:32.000Z | tests/test_table_layout.py | radjkarl/reportlab | 48cafb6d64ff92fd9d4f9a4dd888be6f7d55b765 | [
"BSD-3-Clause"
] | 16 | 2015-11-15T04:23:43.000Z | 2021-09-27T14:14:20.000Z | tests/test_table_layout.py | radjkarl/reportlab | 48cafb6d64ff92fd9d4f9a4dd888be6f7d55b765 | [
"BSD-3-Clause"
] | 46 | 2015-03-28T10:18:14.000Z | 2021-12-16T15:57:47.000Z | from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation
setOutDir(__name__)
import operator, string
from reportlab.platypus import *
#from reportlab import rl_config
from reportlab.lib.styles import PropertySet, getSampleStyleSheet, ParagraphStyle
from reportlab.lib import colors
fr... | 46.272076 | 156 | 0.569012 |
795b5e67f482b28e7d2caf13015d3ae2c574099c | 1,014 | py | Python | valence/scripts/feature_extraction/tfidf_extractor.py | gizemsogancioglu/elderly-emotion-SC | b8f371e0df6e4aa8b680d59995cd18d52f591466 | [
"MIT"
] | 2 | 2020-08-05T11:44:30.000Z | 2021-02-19T15:46:10.000Z | valence/scripts/feature_extraction/tfidf_extractor.py | gizemsogancioglu/elderly-emotion-SC | b8f371e0df6e4aa8b680d59995cd18d52f591466 | [
"MIT"
] | null | null | null | valence/scripts/feature_extraction/tfidf_extractor.py | gizemsogancioglu/elderly-emotion-SC | b8f371e0df6e4aa8b680d59995cd18d52f591466 | [
"MIT"
] | 2 | 2020-08-31T02:42:15.000Z | 2020-10-29T15:39:48.000Z | from sklearn.feature_extraction.text import TfidfVectorizer
import pandas as pd
import nltk
from nltk.stem.porter import PorterStemmer
nltk.download('punkt')
def set_vectorizer(text_f):
vectorizer = get_tfidf_vector(text_f)
return vectorizer
def get_tfidf_vector(X_all):
vectorizer = TfidfVectorizer(stop_w... | 28.971429 | 99 | 0.714004 |
795b60eb47b9c4b232b637d26972189d72a87438 | 1,937 | py | Python | scrapy/spidermiddlewares/depth.py | michaelgilmore/scrapy | 5a2a6bf6fc8861f00c0875659db11ba4d72406cd | [
"BSD-3-Clause"
] | 2 | 2015-05-27T02:06:18.000Z | 2015-05-27T02:06:37.000Z | scrapy/spidermiddlewares/depth.py | michaelgilmore/scrapy | 5a2a6bf6fc8861f00c0875659db11ba4d72406cd | [
"BSD-3-Clause"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scrapy/spidermiddlewares/depth.py | michaelgilmore/scrapy | 5a2a6bf6fc8861f00c0875659db11ba4d72406cd | [
"BSD-3-Clause"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | """
Depth Spider Middleware
See documentation in docs/topics/spider-middleware.rst
"""
import logging
from scrapy.http import Request
logger = logging.getLogger(__name__)
class DepthMiddleware(object):
def __init__(self, maxdepth, stats=None, verbose_stats=False, prio=1):
self.maxdepth = maxdepth
... | 35.218182 | 93 | 0.584409 |
795b627ba1d6d23d842abfd36a889157e0442bde | 395 | py | Python | parcellearning/utilities/__init__.py | kristianeschenburg/parcellearning | 93811f7d11c1c5583d8f541c7629dbbaa1785304 | [
"BSD-3-Clause"
] | 6 | 2017-07-03T23:11:29.000Z | 2022-01-04T16:41:57.000Z | parcellearning/utilities/__init__.py | kristianeschenburg/parcellearning | 93811f7d11c1c5583d8f541c7629dbbaa1785304 | [
"BSD-3-Clause"
] | null | null | null | parcellearning/utilities/__init__.py | kristianeschenburg/parcellearning | 93811f7d11c1c5583d8f541c7629dbbaa1785304 | [
"BSD-3-Clause"
] | 1 | 2018-04-24T18:01:19.000Z | 2018-04-24T18:01:19.000Z | from .batch import partition_graphs
from .downsample import GraphSampler
from .early_stop import EarlyStopping
from .gnnio import (GCNData, standardize, dataset)
from .load import (load_model, load_schema)
__all__ = ['partition_graphs',
'GraphSampler',
'EarlyStopping',
'GCNData',
... | 28.214286 | 50 | 0.64557 |
795b62dfaa665a4e6e53e517776aeb0a215344ce | 959 | py | Python | examples/simple_client/user/src/user/__init__.py | mardiros/pyramid-blacksmith | ff338776fc8802c9f46475fba619aa1f9413aba0 | [
"BSD-3-Clause"
] | 15 | 2022-01-16T15:23:23.000Z | 2022-01-20T21:42:53.000Z | examples/consul_template_sd/user/src/user/__init__.py | mardiros/blacksmith | c86a870da04b0d916f243cb51f8861529284337d | [
"BSD-3-Clause"
] | 9 | 2022-01-11T19:42:42.000Z | 2022-01-26T20:24:23.000Z | examples/unittesting/user/src/user/__init__.py | mardiros/blacksmith | c86a870da04b0d916f243cb51f8861529284337d | [
"BSD-3-Clause"
] | null | null | null | from typing import cast
import uvicorn
from asgiref.typing import ASGI3Application
from starlette.applications import Starlette
from starlette.responses import JSONResponse
app = Starlette(debug=True)
USERS = {
"naruto": {
"username": "naruto",
"firstname": "Naruto",
"lastname": "Uzumaki"... | 24.589744 | 74 | 0.618352 |
795b63217586ae3e49ef3775e7261d0488e95a25 | 3,755 | py | Python | console_gateway_sdk/model/metadata_center/stream_translate_states_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | console_gateway_sdk/model/metadata_center/stream_translate_states_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | console_gateway_sdk/model/metadata_center/stream_translate_states_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: stream_translate_states.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from goo... | 42.191011 | 434 | 0.796272 |
795b64b87d35bf39a72b12cedb3ff5862b104852 | 3,176 | py | Python | SysInfo.py | dawidePl/Linux-SysInfo | bcacd6a9c64e81f2e708ae3d9385a10bdce7af72 | [
"MIT"
] | null | null | null | SysInfo.py | dawidePl/Linux-SysInfo | bcacd6a9c64e81f2e708ae3d9385a10bdce7af72 | [
"MIT"
] | null | null | null | SysInfo.py | dawidePl/Linux-SysInfo | bcacd6a9c64e81f2e708ae3d9385a10bdce7af72 | [
"MIT"
] | null | null | null | import psutil
import platform
from datetime import datetime
class SysInfo(object):
def __init__(self):
self.units = ["", "K", "M", "G", "T", "P"]
self.factor = 1024
self.func_dict = {
'system': self.get_system,
'uptime': self.get_uptime,
'cpu': self.get_cpu_data,
'ram': self.get_ram_data,
'disk':... | 27.617391 | 106 | 0.666877 |
795b64d969b1a3dded532cf0509ed7d8de4b0812 | 1,787 | py | Python | setup.py | yanorestes/crypyto | 612e494e2f9e35a4d54f5f961e10edf1d9f407ae | [
"MIT"
] | 2 | 2018-07-26T18:20:40.000Z | 2019-08-31T22:23:31.000Z | setup.py | yyyyyyyyyyan/crypyto | 612e494e2f9e35a4d54f5f961e10edf1d9f407ae | [
"MIT"
] | 1 | 2018-12-02T13:45:24.000Z | 2019-05-02T19:59:46.000Z | setup.py | yyyyyyyyyyan/crypyto | 612e494e2f9e35a4d54f5f961e10edf1d9f407ae | [
"MIT"
] | 1 | 2018-07-26T18:20:48.000Z | 2018-07-26T18:20:48.000Z | import os
from setuptools import setup
base_dir = os.path.dirname(os.path.realpath(__file__))
data_files = []
package_data = []
for d in os.listdir(os.path.join(base_dir, 'crypyto/static')):
real_dir = os.path.join(base_dir, 'crypyto/static', d)
dir_name = 'static/{}'.format(d)
file_list = []
for image... | 35.039216 | 125 | 0.646894 |
795b6616ca390dde8cde40f1e47e50a81e46b28d | 1,351 | bzl | Python | libs/barista-components/config.bzl | dt-mafe/barista | d70b2ee7fb9f666668ac5d975a3bd7672459242e | [
"Apache-2.0"
] | null | null | null | libs/barista-components/config.bzl | dt-mafe/barista | d70b2ee7fb9f666668ac5d975a3bd7672459242e | [
"Apache-2.0"
] | null | null | null | libs/barista-components/config.bzl | dt-mafe/barista | d70b2ee7fb9f666668ac5d975a3bd7672459242e | [
"Apache-2.0"
] | null | null | null | COMPONENTS = [
"alert",
"assets",
"autocomplete",
"bar-indicator",
"breadcrumbs",
"button",
"button-group",
"card",
"chart",
"checkbox",
"confirmation-dialog",
"consumption",
"container-breakpoint-observer",
"context-dialog",
"copy-to-clipboard",
"core",
... | 19.3 | 76 | 0.562546 |
795b66b3c9ef3917b32288cdaa8e7b514d39685c | 28,357 | py | Python | modi_firmware_updater/core/esp32_updater.py | LUXROBO/modi-firmware-updater | f6f5412cd5eed54aa90bdaa4216a4d932fd2a1fd | [
"MIT"
] | 1 | 2021-04-22T12:03:48.000Z | 2021-04-22T12:03:48.000Z | modi_firmware_updater/core/esp32_updater.py | LUXROBO/modi-firmware-updater | f6f5412cd5eed54aa90bdaa4216a4d932fd2a1fd | [
"MIT"
] | 6 | 2021-05-06T12:25:58.000Z | 2022-03-31T07:18:37.000Z | modi_firmware_updater/core/esp32_updater.py | LUXROBO/modi-firmware-updater | f6f5412cd5eed54aa90bdaa4216a4d932fd2a1fd | [
"MIT"
] | 1 | 2021-04-07T02:14:34.000Z | 2021-04-07T02:14:34.000Z | import io
import json
import pathlib
import sys
import threading as th
import time
from base64 import b64decode, b64encode
from io import open
from os import path
import serial
import serial.tools.list_ports as stl
from modi_firmware_updater.util.connection_util import list_modi_ports
from modi_firmware_updater.util.... | 41.701471 | 136 | 0.558063 |
795b676c15059daf2abcf751df728f684412fee5 | 456 | py | Python | __init__.py | aphi/pyflip | 20472e2dbc5e8d0b0c84167e83c80b41b45dc74e | [
"MIT"
] | 9 | 2019-08-26T21:19:02.000Z | 2022-01-10T18:26:43.000Z | __init__.py | aphi/PyFlip | 20472e2dbc5e8d0b0c84167e83c80b41b45dc74e | [
"MIT"
] | null | null | null | __init__.py | aphi/PyFlip | 20472e2dbc5e8d0b0c84167e83c80b41b45dc74e | [
"MIT"
] | 1 | 2021-10-01T16:29:57.000Z | 2021-10-01T16:29:57.000Z | """
Modern library for Linear and Integer Programming with Python 3
"""
# import into root namespace
from .src.model import *
from .src.solution import *
from .src.file_io import *
from .src.run import *
from .src.expression import *
from .src.parameter import *
# keep relative namespace
from .src import variable
fro... | 21.714286 | 63 | 0.77193 |
795b67a29dccd5d228023b232596755503d6e707 | 2,542 | py | Python | guided_model/guided_parts.py | naivete5656/BFP | 74c5604a9ba4eaa3ec3e2c76ef5e1282d7d10f18 | [
"MIT"
] | 8 | 2020-07-31T15:20:01.000Z | 2021-09-18T08:42:07.000Z | guided_model/guided_parts.py | naivete5656/BFP | 74c5604a9ba4eaa3ec3e2c76ef5e1282d7d10f18 | [
"MIT"
] | null | null | null | guided_model/guided_parts.py | naivete5656/BFP | 74c5604a9ba4eaa3ec3e2c76ef5e1282d7d10f18 | [
"MIT"
] | 5 | 2020-10-04T02:02:13.000Z | 2021-11-14T23:37:08.000Z | import torch
from torch.autograd import Function
import numpy as np
class GuidedBackpropReLU(Function):
@staticmethod
def forward(ctx, input):
positive_mask = (input > 0).type_as(input)
output = torch.addcmul(
torch.zeros(input.size()).type_as(input), input, positive_mask
)... | 31 | 86 | 0.59284 |
795b67af80523221a035b02afc8c26f5af32d550 | 44,526 | py | Python | src/oci/core/models/instance_configuration_launch_instance_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/core/models/instance_configuration_launch_instance_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/core/models/instance_configuration_launch_instance_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 43.02029 | 245 | 0.708013 |
795b68083931d595ec6a4ff8b5164bf60a023a58 | 4,339 | py | Python | NNet_Core/NN_Analyzer.py | mingrui/Deep_MRI_brain_extraction | 96690eaddef28de5a2d0e896d2a524f17245c16e | [
"MIT"
] | 1 | 2021-07-17T08:19:42.000Z | 2021-07-17T08:19:42.000Z | NNet_Core/NN_Analyzer.py | neurofractal/Deep_MRI_brain_extraction | 96690eaddef28de5a2d0e896d2a524f17245c16e | [
"MIT"
] | null | null | null | NNet_Core/NN_Analyzer.py | neurofractal/Deep_MRI_brain_extraction | 96690eaddef28de5a2d0e896d2a524f17245c16e | [
"MIT"
] | 1 | 2019-10-22T20:21:10.000Z | 2019-10-22T20:21:10.000Z | """
This software is an implementation of
Deep MRI brain extraction: A 3D convolutional neural network for skull stripping
You can download the paper at http://dx.doi.org/10.1016/j.neuroimage.2016.01.024
If you use this software for your projects please cite:
Kleesiek and Urban et al, Deep MRI brain extraction: A 3... | 37.730435 | 162 | 0.608666 |
795b68f81bf3aadbdcd53d9aa1794185f7218f31 | 2,037 | py | Python | saleor/graphql/shop/schema.py | eanknd/saleor | 08aa724176be00d7aaf654f14e9ae99dd4327f97 | [
"CC-BY-4.0"
] | 1,392 | 2021-10-06T15:54:28.000Z | 2022-03-31T20:50:55.000Z | saleor/graphql/shop/schema.py | eanknd/saleor | 08aa724176be00d7aaf654f14e9ae99dd4327f97 | [
"CC-BY-4.0"
] | 888 | 2021-10-06T10:48:54.000Z | 2022-03-31T11:00:30.000Z | saleor/graphql/shop/schema.py | gustavoarmoa/saleor | f81b2f347e4c7a624cd68a1eca3b0a5611498f6e | [
"CC-BY-4.0"
] | 538 | 2021-10-07T16:21:27.000Z | 2022-03-31T22:58:57.000Z | import graphene
from ...core.permissions import GiftcardPermissions, OrderPermissions
from ..core.fields import PermissionsField
from ..translations.mutations import ShopSettingsTranslate
from .mutations import (
GiftCardSettingsUpdate,
OrderSettingsUpdate,
ShopAddressUpdate,
ShopDomainUpdate,
Shop... | 33.393443 | 82 | 0.762887 |
795b693640b8ecd8555953c652b9f9b700e5c9dc | 14,181 | py | Python | servertools/camera.py | barretobrock/server-tools | 2f2b899994df90817686b2232d3d65e53defd8c2 | [
"MIT"
] | null | null | null | servertools/camera.py | barretobrock/server-tools | 2f2b899994df90817686b2232d3d65e53defd8c2 | [
"MIT"
] | null | null | null | servertools/camera.py | barretobrock/server-tools | 2f2b899994df90817686b2232d3d65e53defd8c2 | [
"MIT"
] | null | null | null | import os
import re
from datetime import (
datetime as dt,
timedelta
)
import requests
from requests.auth import HTTPDigestAuth
from requests.exceptions import ConnectionError
from typing import (
Optional,
List,
Dict,
Union
)
import amcrest
from loguru import logger
from reolink_api import Came... | 42.713855 | 104 | 0.549044 |
795b698a88fe41e8570294c07c5926f21800b84d | 4,770 | py | Python | euler54.py | dchourasia/euler-solutions | e20cbf016a9ea601fcce928d9690930c9a498837 | [
"Apache-2.0"
] | null | null | null | euler54.py | dchourasia/euler-solutions | e20cbf016a9ea601fcce928d9690930c9a498837 | [
"Apache-2.0"
] | null | null | null | euler54.py | dchourasia/euler-solutions | e20cbf016a9ea601fcce928d9690930c9a498837 | [
"Apache-2.0"
] | null | null | null | '''
The file, poker.txt, contains one-thousand random hands dealt to two players. Each line of the file contains ten cards (separated by a single space): the first five are Player 1's cards and the last five are Player 2's cards. You can assume that all hands are valid (no invalid characters or repeated cards), each pl... | 24.587629 | 394 | 0.622642 |
795b69bed0b2d43cbae29793112fbf19ca9b8c92 | 416 | py | Python | sponsors/migrations/0002_auto_20190726_1556.py | pyladiesghana/PyLadies-Website | 558f436f20a6de6e6b5947432f888212d05e1ab6 | [
"MIT"
] | 2 | 2019-08-02T09:39:27.000Z | 2019-12-15T18:49:26.000Z | sponsors/migrations/0002_auto_20190726_1556.py | pyladiesghana/PyLadies-Website | 558f436f20a6de6e6b5947432f888212d05e1ab6 | [
"MIT"
] | 10 | 2020-05-03T07:41:56.000Z | 2022-03-12T00:34:34.000Z | sponsors/migrations/0002_auto_20190726_1556.py | pyladiesghana/PyLadies-Website | 558f436f20a6de6e6b5947432f888212d05e1ab6 | [
"MIT"
] | 1 | 2019-12-27T15:24:24.000Z | 2019-12-27T15:24:24.000Z | # Generated by Django 2.2 on 2019-07-26 15:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sponsors', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='sponsor',
name='sponsor_logo',
... | 21.894737 | 85 | 0.610577 |
795b6acc7da0caa16448fbb541c11a70f057703e | 11,604 | py | Python | kickass/tests/functional_tests/proofs.py | trublud/KickAss-Gui | ddbce9cea11a73594b12d020bf4c2935f01e9d88 | [
"BSD-3-Clause"
] | null | null | null | kickass/tests/functional_tests/proofs.py | trublud/KickAss-Gui | ddbce9cea11a73594b12d020bf4c2935f01e9d88 | [
"BSD-3-Clause"
] | null | null | null | kickass/tests/functional_tests/proofs.py | trublud/KickAss-Gui | ddbce9cea11a73594b12d020bf4c2935f01e9d88 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019 The KickAssCoin Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright noti... | 40.013793 | 186 | 0.663909 |
795b6b62f9d9f7a6733f199a7ad298536ecc5d7b | 33,877 | py | Python | src/wormhole/test/test_wormhole.py | kneufeld/magic-wormhole | 0977ef02c4e47f278b1d89b12fe36f327da366e0 | [
"MIT"
] | 1 | 2021-06-28T08:12:43.000Z | 2021-06-28T08:12:43.000Z | src/wormhole/test/test_wormhole.py | kneufeld/magic-wormhole | 0977ef02c4e47f278b1d89b12fe36f327da366e0 | [
"MIT"
] | null | null | null | src/wormhole/test/test_wormhole.py | kneufeld/magic-wormhole | 0977ef02c4e47f278b1d89b12fe36f327da366e0 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os, json, re, gc
from binascii import hexlify, unhexlify
import mock
from twisted.trial import unittest
from twisted.internet import reactor
from twisted.internet.defer import Deferred, gatherResults, inlineCallbacks
from .common import ServerBase
from .. import wormhole
fro... | 37.809152 | 80 | 0.614458 |
795b6bb7249b3b27ae2a19005ca4c04fbff28e19 | 2,260 | py | Python | mldp/tests/transformers/test_chunk_sorter.py | prashantlv/mltoolkit | acc192bafc66b7661d541ef4f604b5e5ab7df5ca | [
"MIT"
] | 1 | 2020-10-03T05:23:31.000Z | 2020-10-03T05:23:31.000Z | mldp/tests/transformers/test_chunk_sorter.py | prashantlv/mltoolkit | acc192bafc66b7661d541ef4f604b5e5ab7df5ca | [
"MIT"
] | null | null | null | mldp/tests/transformers/test_chunk_sorter.py | prashantlv/mltoolkit | acc192bafc66b7661d541ef4f604b5e5ab7df5ca | [
"MIT"
] | null | null | null | import unittest
from mldp.steps.transformers.general import ChunkSorter
from mldp.utils.tools import DataChunk
import numpy as np
class TestChunkSorter(unittest.TestCase):
def setUp(self):
self.ints_fn = "ints"
self.strings_fn = "strings"
self.floats_fn = "floats"
def test_sorting_by_... | 34.769231 | 76 | 0.582301 |
795b6cf71c2304801047cc848c17f9b578d0e72c | 9,242 | py | Python | projects/nerf/train_nerf.py | shubham-goel/pytorch3d | e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21 | [
"BSD-3-Clause"
] | 1 | 2021-07-22T08:42:09.000Z | 2021-07-22T08:42:09.000Z | projects/nerf/train_nerf.py | shubham-goel/pytorch3d | e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21 | [
"BSD-3-Clause"
] | null | null | null | projects/nerf/train_nerf.py | shubham-goel/pytorch3d | e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import collections
import os
import pickle
import warnings
import hydra
import numpy as np
import torch
from nerf.dataset import get_nerf_datasets, trivial_collate
from nerf.nerf_renderer import RadianceFieldRenderer, visual... | 34.614232 | 87 | 0.615235 |
795b6e7173a24724f844d5e22b324258df0d8872 | 5,811 | py | Python | util.py | blackoutjack/ExTRA | b9179eaa667cc2bd11d002b7b4ae9cdca37feac5 | [
"BSD-3-Clause"
] | null | null | null | util.py | blackoutjack/ExTRA | b9179eaa667cc2bd11d002b7b4ae9cdca37feac5 | [
"BSD-3-Clause"
] | null | null | null | util.py | blackoutjack/ExTRA | b9179eaa667cc2bd11d002b7b4ae9cdca37feac5 | [
"BSD-3-Clause"
] | null | null | null |
#
# This file contains some general-purpose utility functions that can be
# used by other Python scripts. It is not meant to be run on its own.
#
import sys
MAJOR = sys.version_info[0]
if MAJOR >= 3:
import urllib.parse as urlparse
else:
import urlparse
from config import *
def get_unique_filename(origpath):
d... | 26.294118 | 71 | 0.657546 |
795b6fe54b68282d1af73d66ad0864345852f2f0 | 1,660 | py | Python | examples/Ch02/ex_triple_barrier.py | cw-jang/adv_finance | 240ce03e53fc6eead469a1ce7a220510a78c437e | [
"BSD-3-Clause"
] | 15 | 2019-05-20T04:28:38.000Z | 2021-12-11T06:50:52.000Z | examples/Ch02/ex_triple_barrier.py | cw-jang/adv_finance | 240ce03e53fc6eead469a1ce7a220510a78c437e | [
"BSD-3-Clause"
] | null | null | null | examples/Ch02/ex_triple_barrier.py | cw-jang/adv_finance | 240ce03e53fc6eead469a1ce7a220510a78c437e | [
"BSD-3-Clause"
] | 2 | 2020-05-16T13:23:30.000Z | 2020-08-13T22:58:08.000Z | import pandas as pd
import numpy as np
from datetime import datetime
from adv_finance import stats, labeling
if __name__ == "__main__":
print("main started")
df = pd.read_csv("..\\TRADE_A233740_2019_DV.csv")
df.timestamp = df.timestamp.apply(lambda x: datetime.strptime(x, '%Y-%m-%d %H:%M:%S.%f'))
df... | 37.727273 | 107 | 0.553614 |
795b7016b905f45fabd05c9ada18567120914ecf | 1,474 | py | Python | Code/batch_feature_extraction.py | RickyMexx/3D-Sound-Localization | 43fd4d2f341fea91ba48f82cd519a65c82ec1cb2 | [
"Apache-2.0"
] | 13 | 2020-03-27T10:33:17.000Z | 2022-02-05T09:44:07.000Z | batch_feature_extraction.py | FedericaCoppa/Neural-Network-Project-QUATERNION-SELD-TCN | 8ba9a05e52fecce68864919464f1d495aed31896 | [
"RSA-MD"
] | 4 | 2020-09-25T22:38:22.000Z | 2022-02-09T23:37:53.000Z | batch_feature_extraction.py | FedericaCoppa/Neural-Network-Project-QUATERNION-SELD-TCN | 8ba9a05e52fecce68864919464f1d495aed31896 | [
"RSA-MD"
] | 1 | 2020-03-28T10:52:24.000Z | 2020-03-28T10:52:24.000Z | # Extracts the features, labels, and normalizes the training and test split features. Make sure you update the location
# of the downloaded datasets before in the cls_feature_class.py
import cls_feature_class
import cls_feature_extr
import parameter
params = parameter.get_params('1')
dataset_name = params['da... | 38.789474 | 127 | 0.671642 |
795b706059574c57faeac17c987bb50f517947fa | 1,415 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/ModifySecurityGroupRules.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/ModifySecurityGroupRules.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/ModifySecurityGroupRules.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 37.236842 | 112 | 0.70742 |
795b70613496a6f922d59700fb35f60ee5441ef7 | 1,050 | py | Python | src/billing/migrations/0001_initial.py | HuyNguyen260398/python-ecommerce | 609600058bf4268f4dbe00e179bf3fd75e9a3a79 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | src/billing/migrations/0001_initial.py | HuyNguyen260398/python-ecommerce | 609600058bf4268f4dbe00e179bf3fd75e9a3a79 | [
"bzip2-1.0.6",
"MIT"
] | 6 | 2021-03-19T02:41:46.000Z | 2022-01-13T01:31:12.000Z | src/billing/migrations/0001_initial.py | HuyNguyen260398/python-ecommerce | 609600058bf4268f4dbe00e179bf3fd75e9a3a79 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-07-22 13:25
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrati... | 33.870968 | 154 | 0.64 |
795b717ee02811cf932cfbaf45686cd081fb32fb | 3,020 | py | Python | src/OTLMOW/OTLModel/Datatypes/KlExternedetectieAangeslotentoestel.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Datatypes/KlExternedetectieAangeslotentoestel.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Datatypes/KlExternedetectieAangeslotentoestel.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField
from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde
# Generated with OTLEnumerationCreator. To modify: extend, do not edit
class KlExternedetectieAangeslotentoestel(KeuzelijstField):
"""Keuzelijst met de voork... | 73.658537 | 166 | 0.638079 |
795b71cf209564842f3640eae90c1d3482afa3fb | 1,079 | py | Python | ghidra_plugins/FullAnalysis.py | ogre2007/Ghidraaas | f3af11f2c605cb2f8d0594d786f91c6a4618f868 | [
"Apache-2.0"
] | 2 | 2021-12-30T06:41:30.000Z | 2022-03-12T09:19:10.000Z | ghidra_plugins/FullAnalysis.py | ogre2007/Ghidraaas | f3af11f2c605cb2f8d0594d786f91c6a4618f868 | [
"Apache-2.0"
] | null | null | null | ghidra_plugins/FullAnalysis.py | ogre2007/Ghidraaas | f3af11f2c605cb2f8d0594d786f91c6a4618f868 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import sys
try:
args = getScriptArgs()
response_dict = dict()
if len(args) < 1:
print("usage: ./FullAnalysis.py output_path")
sys.exit(0)
# output_path of the json file (should terminate with ".json")
outpu... | 26.975 | 67 | 0.601483 |
795b71f3c7c859148863477bfdfd49ff79ceeba9 | 6,773 | py | Python | docs/conf.py | vishalbelsare/pyjanitor | 9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb | [
"MIT"
] | 674 | 2018-03-04T22:59:51.000Z | 2021-03-22T10:08:58.000Z | docs/conf.py | vishalbelsare/pyjanitor | 9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb | [
"MIT"
] | 737 | 2018-03-05T01:03:15.000Z | 2021-03-22T23:55:27.000Z | docs/conf.py | vishalbelsare/pyjanitor | 9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb | [
"MIT"
] | 176 | 2018-03-14T23:00:56.000Z | 2021-03-24T19:32:34.000Z | """Sphinx configuration."""
# -*- 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/stable/config
# -- Path setup -------------------------------... | 30.372197 | 79 | 0.637827 |
795b7274d82484140a514a069d0fb2f53083f877 | 12,816 | py | Python | model/rnn.py | frankxu2004/tacred-relation-cotrain | 005dd0cf27d6a68fcf3cbef736de3fe9759ce6b4 | [
"Apache-2.0"
] | null | null | null | model/rnn.py | frankxu2004/tacred-relation-cotrain | 005dd0cf27d6a68fcf3cbef736de3fe9759ce6b4 | [
"Apache-2.0"
] | null | null | null | model/rnn.py | frankxu2004/tacred-relation-cotrain | 005dd0cf27d6a68fcf3cbef736de3fe9759ce6b4 | [
"Apache-2.0"
] | null | null | null | """
A rnn model for relation extraction, written in pytorch.
"""
import math
import numpy as np
import torch
from torch import nn
from torch.nn import init
from torch.autograd import Variable
import torch.nn.functional as F
from utils import constant, torch_utils
from model import layers
class RelationModel(object):... | 41.341935 | 137 | 0.584582 |
795b72b52e689067995b55b47b45f3f4a613a7c4 | 11,394 | py | Python | django/contrib/auth/tests/test_management.py | pegler/django | e9c6d0422422d7ea5ff3be8992ca73b5ba73bd0c | [
"BSD-3-Clause"
] | 1 | 2017-02-21T09:06:04.000Z | 2017-02-21T09:06:04.000Z | django/contrib/auth/tests/test_management.py | rogerhu/django | 317fd13c7ac25db94d3dabf8ee115acbfbd3e5a7 | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/tests/test_management.py | rogerhu/django | 317fd13c7ac25db94d3dabf8ee115acbfbd3e5a7 | [
"BSD-3-Clause"
] | 1 | 2020-12-24T01:28:30.000Z | 2020-12-24T01:28:30.000Z | from __future__ import unicode_literals
from datetime import date
from django.contrib.auth import models, management
from django.contrib.auth.management import create_permissions
from django.contrib.auth.management.commands import changepassword
from django.contrib.auth.models import User
from django.contrib.auth.test... | 41.736264 | 150 | 0.692119 |
795b731a4534953f505a457f7280ffd094ed3477 | 925 | py | Python | yatube/posts/migrations/0010_follow.py | Andr3w-k/yatube_final | 940266c92eae10edf94692263ab1552afe5f6363 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0010_follow.py | Andr3w-k/yatube_final | 940266c92eae10edf94692263ab1552afe5f6363 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0010_follow.py | Andr3w-k/yatube_final | 940266c92eae10edf94692263ab1552afe5f6363 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.16 on 2022-01-24 20:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('posts', '0009_auto_2022... | 37 | 169 | 0.671351 |
795b763fb0304f66a2a13e54a0743e566eab26a9 | 3,190 | py | Python | books/books/settings.py | pjloveshiphop/from-scrapy-to-mongodb | 81f62c4576056fd1bab0d13f9bcd91aee512001b | [
"MIT"
] | null | null | null | books/books/settings.py | pjloveshiphop/from-scrapy-to-mongodb | 81f62c4576056fd1bab0d13f9bcd91aee512001b | [
"MIT"
] | null | null | null | books/books/settings.py | pjloveshiphop/from-scrapy-to-mongodb | 81f62c4576056fd1bab0d13f9bcd91aee512001b | [
"MIT"
] | null | null | null | # Scrapy settings for books project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/topics/downloader-middleware.h... | 34.301075 | 103 | 0.775235 |
795b78746a8bba52316b00c2ebfd2a9bb1543aca | 1,183 | py | Python | vote/app.py | jamesongithub/example-voting-app | 67b6f7b08f890753ede42745090444acedcfa2d2 | [
"Apache-2.0"
] | null | null | null | vote/app.py | jamesongithub/example-voting-app | 67b6f7b08f890753ede42745090444acedcfa2d2 | [
"Apache-2.0"
] | 1 | 2020-09-08T07:01:17.000Z | 2020-09-08T07:01:17.000Z | vote/app.py | jamesongithub/example-voting-app | 67b6f7b08f890753ede42745090444acedcfa2d2 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, render_template, request, make_response, g
from redis import Redis
import os
import socket
import random
import json
option_a = os.getenv('OPTION_A', "Portland")
option_b = os.getenv('OPTION_B', "Kings Island")
hostname = socket.gethostname()
app = Flask(__name__)
def get_redis():
if not... | 25.170213 | 67 | 0.641589 |
795b78da7eddece26ba5930675629117b737c119 | 40,954 | py | Python | magenta/music/encoder_decoder.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/music/encoder_decoder.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/music/encoder_decoder.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | 1 | 2021-09-09T15:30:36.000Z | 2021-09-09T15:30:36.000Z | # Copyright 2020 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 39.416747 | 89 | 0.658324 |
795b79295ec920b1e525b5e6e9eb0d82d927a6f4 | 2,405 | py | Python | training/src/tests/tests/python/RMSprop.py | steelONIONknight/bolt | 9bd3d08f2abb14435ca3ad0179889e48fa7e9b47 | [
"MIT"
] | null | null | null | training/src/tests/tests/python/RMSprop.py | steelONIONknight/bolt | 9bd3d08f2abb14435ca3ad0179889e48fa7e9b47 | [
"MIT"
] | null | null | null | training/src/tests/tests/python/RMSprop.py | steelONIONknight/bolt | 9bd3d08f2abb14435ca3ad0179889e48fa7e9b47 | [
"MIT"
] | null | null | null | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation the rights to use, c... | 37 | 148 | 0.728067 |
795b7943291eb62c6f3b8a12a366541c850ae4fc | 2,281 | py | Python | exasol_integration_test_docker_environment/lib/test_environment/database_setup/populate_data.py | exasol/integration-test-docker-environment | 35850f67cd4cde010f03dd556d1a0f74b3291eb8 | [
"MIT"
] | 4 | 2020-06-25T20:47:31.000Z | 2021-09-10T15:22:51.000Z | exasol_integration_test_docker_environment/lib/test_environment/database_setup/populate_data.py | exasol/integration-test-docker-environment | 35850f67cd4cde010f03dd556d1a0f74b3291eb8 | [
"MIT"
] | 113 | 2020-06-02T08:51:08.000Z | 2022-03-31T08:47:41.000Z | exasol_integration_test_docker_environment/lib/test_environment/database_setup/populate_data.py | exasol/integration-test-docker-environment | 35850f67cd4cde010f03dd556d1a0f74b3291eb8 | [
"MIT"
] | 2 | 2020-05-19T10:57:47.000Z | 2020-06-22T13:32:20.000Z | import logging
from pathlib import Path
import luigi
from exasol_integration_test_docker_environment.lib.base.docker_base_task import DockerBaseTask
from exasol_integration_test_docker_environment.lib.base.json_pickle_parameter import JsonPickleParameter
from exasol_integration_test_docker_environment.lib.data.databa... | 46.55102 | 213 | 0.724244 |
795b798c24001be92eb5943ca15d79967e02e838 | 4,182 | py | Python | dbbudget/settings.py | rwa-django/dbbudget | 5bcf1ac557513bd233b27e7d993ef1542d704b1e | [
"Apache-2.0"
] | null | null | null | dbbudget/settings.py | rwa-django/dbbudget | 5bcf1ac557513bd233b27e7d993ef1542d704b1e | [
"Apache-2.0"
] | null | null | null | dbbudget/settings.py | rwa-django/dbbudget | 5bcf1ac557513bd233b27e7d993ef1542d704b1e | [
"Apache-2.0"
] | null | null | null | """
Django settings for dbbudget project.
Generated by 'django-admin startproject' using Django 2.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
... | 29.450704 | 101 | 0.718077 |
795b7990318a1bab50ed45772abf34f17e5ba70a | 114 | py | Python | exercises/while_loops.py | noor19-meet/y2s18-python_review | de4033492983a3c7c9019a710c26953426c1e250 | [
"MIT"
] | null | null | null | exercises/while_loops.py | noor19-meet/y2s18-python_review | de4033492983a3c7c9019a710c26953426c1e250 | [
"MIT"
] | null | null | null | exercises/while_loops.py | noor19-meet/y2s18-python_review | de4033492983a3c7c9019a710c26953426c1e250 | [
"MIT"
] | null | null | null | # Write your solution for 1.3 here!
n = 1
sum = 0
while sum < 10000:
sum+=n
n+=2
print (sum)
print (n) | 14.25 | 35 | 0.570175 |
795b7b747d06c7ab3d6d0382330ec76cd112ba65 | 3,375 | py | Python | ibmsecurity/isam/web/authorization_server/logs.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 46 | 2017-03-21T21:08:59.000Z | 2022-02-20T22:03:46.000Z | ibmsecurity/isam/web/authorization_server/logs.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 201 | 2017-03-21T21:25:52.000Z | 2022-03-30T21:38:20.000Z | ibmsecurity/isam/web/authorization_server/logs.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 91 | 2017-03-22T16:25:36.000Z | 2022-02-04T04:36:29.000Z | import logging
import os.path
from ibmsecurity.utilities import tools
logger = logging.getLogger(__name__)
uri = "/isam/authzserver"
requires_modules = None
requires_version = None
requires_model = "Appliance"
def get_all(isamAppliance, id, check_mode=False, force=False):
"""
Retrieve the log file names of a... | 38.352273 | 120 | 0.60237 |
795b7caf130aa1c6bc9e37e1f6515000ee1ddd41 | 3,156 | py | Python | testing/test_truncable_steps.py | vincent-antaki/Neuraxle | cef1284a261010c655f8ef02b4fca5b8bb45850c | [
"Apache-2.0"
] | 5 | 2019-07-30T21:35:17.000Z | 2020-02-25T09:08:09.000Z | testing/test_truncable_steps.py | Tubbz-alt/Neuraxle | 308f24248cdb242b7e2f6ec7c51daf2ee3e38834 | [
"Apache-2.0"
] | 1 | 2020-02-07T15:08:42.000Z | 2020-02-07T15:08:42.000Z | testing/test_truncable_steps.py | Tubbz-alt/Neuraxle | 308f24248cdb242b7e2f6ec7c51daf2ee3e38834 | [
"Apache-2.0"
] | null | null | null | from neuraxle.pipeline import Pipeline
from testing.mocks.step_mocks import SomeSplitStep, SomeStep, SomeTruncableStep
EXPECTED_STR_OUTPUT = """SomeTruncableStep
(
SomeTruncableStep(
name=SomeTruncableStep,
hyperparameters=HyperparameterSamples([('learning_rate', 0.1),
('l2_weight_reg', 0.001... | 29.773585 | 79 | 0.56052 |
795b7cb1e2fd4ffd03d4ef47854d5864a0b956ad | 10,872 | py | Python | methods/GMAN/METR/model.py | kevin-xuan/Traffic-Benchmark | b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228 | [
"MIT"
] | 120 | 2021-05-12T01:55:31.000Z | 2022-03-31T09:26:07.000Z | methods/GMAN/METR/model.py | swjtuer0/Traffic-Benchmark | b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228 | [
"MIT"
] | 11 | 2021-05-14T00:57:58.000Z | 2022-03-08T05:54:45.000Z | methods/GMAN/METR/model.py | swjtuer0/Traffic-Benchmark | b9f8e40b4df9b58f5ad88432dc070cbbbcdc0228 | [
"MIT"
] | 40 | 2021-05-12T02:13:56.000Z | 2022-03-24T14:38:31.000Z | import tf_utils
# import tensorflow as tf
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
def placeholder(P, Q, N):
X = tf.placeholder(
shape = (None, P, N), dtype = tf.float32, name = 'X')
TE = tf.placeholder(
shape = (None, P + Q, 2), dtype = tf.int32, name = 'TE')
label = tf.... | 38.553191 | 87 | 0.57018 |
795b7cd018647055ae4d502676067aded917f140 | 619 | py | Python | podcasts/migrations/0001_initial.py | cyanidesayonara/dop3pod | 987d7d51321a75c1b78d220768ffe3b178d05a6b | [
"MIT"
] | null | null | null | podcasts/migrations/0001_initial.py | cyanidesayonara/dop3pod | 987d7d51321a75c1b78d220768ffe3b178d05a6b | [
"MIT"
] | 7 | 2020-10-10T16:22:50.000Z | 2021-07-14T18:36:47.000Z | podcasts/migrations/0001_initial.py | cyanidesayonara/dop3pod | 987d7d51321a75c1b78d220768ffe3b178d05a6b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-11 00:45
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Podcast',
fields=[
('id', models.AutoField(... | 25.791667 | 114 | 0.575121 |
795b7cd946059676eb469fbf9d5e22a92e1fb64d | 2,620 | py | Python | model/Gradients.py | BhasherBEL/ComposIm | 719424862bb92682b9d5c3ff22aa92f4c0b1f28f | [
"MIT"
] | null | null | null | model/Gradients.py | BhasherBEL/ComposIm | 719424862bb92682b9d5c3ff22aa92f4c0b1f28f | [
"MIT"
] | null | null | null | model/Gradients.py | BhasherBEL/ComposIm | 719424862bb92682b9d5c3ff22aa92f4c0b1f28f | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
# coding: utf-8
import numpy as np
import operator
from PIL import Image
import scipy
import scipy.cluster
import random
colors = {'black': np.array([0, 0, 0]),
'white': np.array([255, 255, 255]),
'red': np.array([255, 0, 0]),
'green': np.array([0, 255, 0]),
... | 28.478261 | 81 | 0.580153 |
795b7e2765e6e9f32519298f4e8b12a8d16fbda6 | 3,643 | py | Python | build_msvc/msvc-autogen.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | build_msvc/msvc-autogen.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | build_msvc/msvc-autogen.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The Gold BCR Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import os
import re
import argparse
from shutil import copyfile
SOURCE_DIR = os.path.abspath(os.path.jo... | 41.873563 | 141 | 0.623113 |
795b7eadc29bbde4f897fbeabaf17d1b8f1fb3e8 | 94,416 | py | Python | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2020_03_01/aio/operations/_iot_hub_resource_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2020_03_01/aio/operations/_iot_hub_resource_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2020_03_01/aio/operations/_iot_hub_resource_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.035676 | 254 | 0.671179 |
795b7ec3f68905e94f2adadab671114b364e8197 | 9,910 | py | Python | ihaleGozlemevi/lib/legacy_pdf_parser.py | efebarlas/ihale | 4cd647e1048287e0e106a961f1e360a9c44de0c8 | [
"MIT"
] | null | null | null | ihaleGozlemevi/lib/legacy_pdf_parser.py | efebarlas/ihale | 4cd647e1048287e0e106a961f1e360a9c44de0c8 | [
"MIT"
] | null | null | null | ihaleGozlemevi/lib/legacy_pdf_parser.py | efebarlas/ihale | 4cd647e1048287e0e106a961f1e360a9c44de0c8 | [
"MIT"
] | null | null | null | from pdfminer.high_level import extract_pages as pdf_extract_pages
from pdfminer.layout import LTText, LTTextContainer
# # import-time monkey patching of LTTextContainer
# # so we can easily retrieve the text color
# # there's a chance that the text has characters with
# # different colors. so we just look at three ch... | 36.433824 | 144 | 0.636024 |
795b7f5d25933e9510d742b68271568ffb44414c | 22,147 | py | Python | test/functional/test_framework/util.py | ComputerCraftr/peps-new | e92cc732a96a567b66c0ce665a03496e15b2702d | [
"MIT"
] | 2 | 2021-09-23T17:35:44.000Z | 2021-09-23T17:35:56.000Z | test/functional/test_framework/util.py | theabundancecoin/TACC | fd7d38c6a04dcb2da3b2755879b153b4731cddb2 | [
"MIT"
] | null | null | null | test/functional/test_framework/util.py | theabundancecoin/TACC | fd7d38c6a04dcb2da3b2755879b153b4731cddb2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-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.
"""Helpful routines for regression testing."""
from base64 import b64encode
from binascii import hexlify,... | 37.601019 | 142 | 0.650291 |
795b8085b923811263343e965e46d664e9b5bc4f | 1,460 | py | Python | icubam/messaging/server.py | Inria-Chile/icubam | 96df2c54976d1b7bc25732c8a5f67fafa0adffab | [
"Apache-2.0"
] | null | null | null | icubam/messaging/server.py | Inria-Chile/icubam | 96df2c54976d1b7bc25732c8a5f67fafa0adffab | [
"Apache-2.0"
] | null | null | null | icubam/messaging/server.py | Inria-Chile/icubam | 96df2c54976d1b7bc25732c8a5f67fafa0adffab | [
"Apache-2.0"
] | null | null | null | from absl import logging # noqa: F401
from tornado import queues
import tornado.routing
import tornado.web
from icubam import base_server
from icubam.messaging import sms_sender
from icubam.messaging import scheduler
from icubam.messaging.handlers import onoff, schedule
class MessageServer(base_server.BaseServer):
... | 31.73913 | 79 | 0.713014 |
795b82199727337979ceef30de24f1e28d59c72a | 12,222 | py | Python | dags/ethereumetl_airflow/build_parse_dag.py | Falcon77/ethereum-etl-airflow | 2fe30ceb14e76bfc51b35f25af50027b210db75d | [
"MIT"
] | null | null | null | dags/ethereumetl_airflow/build_parse_dag.py | Falcon77/ethereum-etl-airflow | 2fe30ceb14e76bfc51b35f25af50027b210db75d | [
"MIT"
] | null | null | null | dags/ethereumetl_airflow/build_parse_dag.py | Falcon77/ethereum-etl-airflow | 2fe30ceb14e76bfc51b35f25af50027b210db75d | [
"MIT"
] | null | null | null | from __future__ import print_function
import json
import logging
import os
import time
from datetime import datetime, timedelta
from glob import glob
from airflow import models
from airflow.contrib.operators.bigquery_operator import BigQueryOperator
from airflow.operators.python_operator import PythonOperator
from ai... | 39.425806 | 125 | 0.660367 |
795b823f275b320e0d756250769abfd82cc394a7 | 22,449 | py | Python | python/jdspider/JDSpider/spiders/JDSpider.py | mrlittlenew/springboot-webmagic | fd4ef5a7a7dad931a551e57552f6ae2b9dbb5f74 | [
"Apache-2.0"
] | null | null | null | python/jdspider/JDSpider/spiders/JDSpider.py | mrlittlenew/springboot-webmagic | fd4ef5a7a7dad931a551e57552f6ae2b9dbb5f74 | [
"Apache-2.0"
] | null | null | null | python/jdspider/JDSpider/spiders/JDSpider.py | mrlittlenew/springboot-webmagic | fd4ef5a7a7dad931a551e57552f6ae2b9dbb5f74 | [
"Apache-2.0"
] | 1 | 2019-08-24T10:17:53.000Z | 2019-08-24T10:17:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__author__ = 'Kandy.Ye'
__mtime__ = '2017/4/12'
"""
import re
import logging
import json
import requests
from scrapy import Spider
from scrapy.selector import Selector
from scrapy.http import Request
from JDSpider.items import *
key_word = ['book', 'e', 'channel', '... | 52.697183 | 126 | 0.612366 |
795b830c6839a5075003cf65bdd61c8840332721 | 520 | py | Python | Chatbot_Model/Text_Similarity/test.py | guci314/Chatbot_CN | 02044eed4a141aa8c61d6064c166f95dbdae894c | [
"Apache-2.0"
] | 8 | 2019-08-12T12:38:35.000Z | 2022-02-21T03:25:04.000Z | Chatbot_Model/Text_Similarity/test.py | JianboTang/Chatbot_CN | a0f7194252a189f8bc2b62fd16eb2abe432c0bf9 | [
"Apache-2.0"
] | null | null | null | Chatbot_Model/Text_Similarity/test.py | JianboTang/Chatbot_CN | a0f7194252a189f8bc2b62fd16eb2abe432c0bf9 | [
"Apache-2.0"
] | 5 | 2020-01-08T15:30:38.000Z | 2022-02-15T02:39:46.000Z | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: test.py
Description :
Author : charl
date: 2018/11/27
-------------------------------------------------
Change Activity: 2018/11/27:
-------------------------------------------------
"""
import r... | 26 | 78 | 0.313462 |
795b834e229f484b2777e3dde64e6efd9b1ae8d7 | 1,166 | py | Python | AlphaDDA1/Othello/ringbuffer.py | KazuhisaFujita/AlphaDDA | 664742567883cf3e08c2c53b3bce3112b8cc0560 | [
"MIT"
] | 11 | 2021-11-13T01:43:28.000Z | 2021-12-19T06:40:34.000Z | AlphaZero/Othello66/ringbuffer.py | KazuhisaFujita/AlphaDDA | 664742567883cf3e08c2c53b3bce3112b8cc0560 | [
"MIT"
] | null | null | null | AlphaZero/Othello66/ringbuffer.py | KazuhisaFujita/AlphaDDA | 664742567883cf3e08c2c53b3bce3112b8cc0560 | [
"MIT"
] | null | null | null | #---------------------------------------
#Since : 2019/04/24
#Update: 2019/07/25
# -*- coding: utf-8 -*-
#---------------------------------------
import numpy as np
class RingBuffer:
def __init__(self, buf_size):
self.size = buf_size
self.buf = []
for i in range(self.size):
self... | 26.5 | 53 | 0.482847 |
795b83c59c07689c2b839af48e13fdce0b8a212a | 1,514 | py | Python | venv/lib/python3.6/site-packages/click/globals.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/click/globals.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | 1 | 2021-06-01T23:32:38.000Z | 2021-06-01T23:32:38.000Z | venv/lib/python3.6/site-packages/click/globals.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | from threading import local
_local = local()
def get_current_context(silent=False):
"""Returns the current click context. This can be used as a way to
access the current context object from anywhere. This is a more implicit
alternative to the :func:`pass_context` decorator. This function is
prima... | 30.897959 | 77 | 0.669749 |
795b83ef1f6e7c7f8c9def970422a5d9e17362db | 504 | py | Python | nevergrad/instrumentation/__init__.py | vishalshar/nevergrad | 07b5b332786ce5ff831dfabee892bb9397838f70 | [
"MIT"
] | 1 | 2021-07-22T16:18:01.000Z | 2021-07-22T16:18:01.000Z | nevergrad/instrumentation/__init__.py | akhti/nevergrad | 98a4ca92dff704f9df0bc58554bd51e5fa477362 | [
"MIT"
] | null | null | null | nevergrad/instrumentation/__init__.py | akhti/nevergrad | 98a4ca92dff704f9df0bc58554bd51e5fa477362 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .instantiate import register_file_type, FolderFunction
from . import variables
from . import variables as var
from .... | 38.769231 | 73 | 0.797619 |
795b84e95c3276ba53c01d072c06e293591cc54c | 783 | py | Python | rest_framework/__init__.py | sanoma/django-rest-framework | 45e90c3398e326b10e3c5522a2e9ea765786ca08 | [
"BSD-2-Clause"
] | 1 | 2020-03-18T22:31:29.000Z | 2020-03-18T22:31:29.000Z | rest_framework/__init__.py | sanoma/django-rest-framework | 45e90c3398e326b10e3c5522a2e9ea765786ca08 | [
"BSD-2-Clause"
] | 3 | 2020-03-23T18:01:51.000Z | 2021-03-19T23:15:15.000Z | pyenv/lib/python3.6/site-packages/rest_framework/__init__.py | ronald-rgr/ai-chatbot-smartguide | c9c830feb6b66c2e362f8fb5d147ef0c4f4a08cf | [
"Apache-2.0"
] | 1 | 2019-06-26T15:51:46.000Z | 2019-06-26T15:51:46.000Z | """
______ _____ _____ _____ __
| ___ \ ___/ ___|_ _| / _| | |
| |_/ / |__ \ `--. | | | |_ _ __ __ _ _ __ ___ _____ _____ _ __| |__
| /| __| `--. \ | | | _| '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ /
| |\ \| |___/\__/ / | | | | | | | (_| | | | ... | 32.625 | 80 | 0.484036 |
795b8558cc34eb007597a86f3c85f23982339fec | 1,736 | py | Python | protocols/telnetAPI.py | Diapolo10/Grail-0.6 | 3e7b42f105546132f7a6bbe7751a82c9bcc76dd5 | [
"CNRI-Jython"
] | 8 | 2015-02-18T18:50:50.000Z | 2022-03-15T22:21:03.000Z | protocols/telnetAPI.py | SimiCode/Grail-Web-Browser | 16b86d3215068d334eacf6153b71a748eed53d3d | [
"CNRI-Jython"
] | null | null | null | protocols/telnetAPI.py | SimiCode/Grail-Web-Browser | 16b86d3215068d334eacf6153b71a748eed53d3d | [
"CNRI-Jython"
] | 3 | 2016-04-04T23:54:07.000Z | 2020-10-29T04:25:42.000Z | """Telnet protocol handler for URLs of the form telnet://host[:port]
For Unix only; requires xterm in your $PATH.
"""
import os, urllib
from nullAPI import null_access
class telnet_access(null_access):
def __init__(self, url, method, params):
null_access.__init__(self, url, method, params)
host... | 32.754717 | 70 | 0.565092 |
795b8595131718dadc74a32e7ebb9bbebbe1fb69 | 434 | py | Python | lab7/l7z1.py | pawelgalka/AGH_Operational_Research | f1962f1bf93099b4ded734533a297c92e4f28283 | [
"MIT"
] | null | null | null | lab7/l7z1.py | pawelgalka/AGH_Operational_Research | f1962f1bf93099b4ded734533a297c92e4f28283 | [
"MIT"
] | null | null | null | lab7/l7z1.py | pawelgalka/AGH_Operational_Research | f1962f1bf93099b4ded734533a297c92e4f28283 | [
"MIT"
] | null | null | null | #Zadanie 1 Paweł Gałka
from scipy.optimize import linprog
import numpy as np
np.set_printoptions(precision=3)
#f(x) = 2*x_1 + x_2 + 3*x_3 -> max więc -f(x) -> min
# A*x <= b
goal_function_coeff = [-2,-1,-3]
constraints_matrix = [[1,1,1],[-1,-1,-1],[-1,-2,-1],[0,2,1]]
constraints_values = [30, -30,-10,20]
result = li... | 28.933333 | 87 | 0.693548 |
795b8676d58c59dcb82a7c7d168c9f1151f49357 | 8,233 | py | Python | test/toolset-mock/src/MockProgram.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 1 | 2020-04-28T15:15:28.000Z | 2020-04-28T15:15:28.000Z | test/toolset-mock/src/MockProgram.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 2 | 2017-05-23T08:01:11.000Z | 2019-09-06T20:49:05.000Z | test/toolset-mock/src/MockProgram.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 8 | 2015-11-03T14:12:19.000Z | 2020-09-22T19:20:54.000Z | # Copyright 2017 Steven Watanabe
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
from __future__ import print_function
import sys
import os
import re
import fnmatch
# Represents a sequence of arguments that mus... | 29.938182 | 100 | 0.612049 |
795b867aa37bf8efe3a09c8b27f356e7f2f971a3 | 1,276 | py | Python | assertions/dictionary/assert_dictionary_keys.py | snafis/Utils | 37998a3a253b7fdee52f5f79cf9c02ec2a3363d4 | [
"MIT"
] | 3 | 2019-02-14T21:16:15.000Z | 2020-05-05T20:20:42.000Z | assertions/dictionary/assert_dictionary_keys.py | snafis/Utils | 37998a3a253b7fdee52f5f79cf9c02ec2a3363d4 | [
"MIT"
] | null | null | null | assertions/dictionary/assert_dictionary_keys.py | snafis/Utils | 37998a3a253b7fdee52f5f79cf9c02ec2a3363d4 | [
"MIT"
] | 1 | 2019-07-11T02:06:49.000Z | 2019-07-11T02:06:49.000Z | def assert_dictionary_keys(dictionary, required_keys, verbose=0):
missing_keys = []
for key in required_keys:
if key not in dictionary.keys():
missing_keys.append(key)
if missing_keys:
if verbose > 0:
print(
f'Missing keys {missing_keys} not found in d... | 34.486486 | 101 | 0.619122 |
795b876c2e612caf05b8e9c3a224bd416b664419 | 121 | py | Python | apps/exploit/admin.py | macdaliot/exist | 65244f79c602c5a00c3ea6a7eef512ce9c21e60a | [
"MIT"
] | 159 | 2019-03-15T10:46:19.000Z | 2022-03-12T09:19:31.000Z | apps/exploit/admin.py | macdaliot/exist | 65244f79c602c5a00c3ea6a7eef512ce9c21e60a | [
"MIT"
] | 6 | 2019-03-16T12:51:24.000Z | 2020-07-09T02:25:42.000Z | apps/exploit/admin.py | macdaliot/exist | 65244f79c602c5a00c3ea6a7eef512ce9c21e60a | [
"MIT"
] | 36 | 2019-03-16T10:37:14.000Z | 2021-11-14T21:04:18.000Z | from django.contrib import admin
# Register your models here.
from .models import Exploit
admin.site.register(Exploit)
| 17.285714 | 32 | 0.801653 |
795b880ae6cbef48fe3affc1f39e448407e13c50 | 766 | py | Python | example/bpapi/app.py | rog-works/lambda-fw | 715b36fc2d8d0ea0388aa4ac1336dc8cd5543778 | [
"CNRI-Python"
] | null | null | null | example/bpapi/app.py | rog-works/lambda-fw | 715b36fc2d8d0ea0388aa4ac1336dc8cd5543778 | [
"CNRI-Python"
] | 15 | 2020-12-05T13:52:13.000Z | 2020-12-19T10:14:40.000Z | example/bpapi/app.py | rog-works/lambda-fw | 715b36fc2d8d0ea0388aa4ac1336dc8cd5543778 | [
"CNRI-Python"
] | null | null | null | from logging import Logger
from typing import Optional
from lf3py.app.webapp import WebApp
from lf3py.i18n.i18n import I18n
from lf3py.lang.cache import Cache
from lf3py.lang.di import DI
class MyApp(WebApp):
__instance: Optional['MyApp'] = None
@classmethod
def get(cls) -> 'MyApp':
if cls.__ins... | 21.885714 | 40 | 0.651436 |
795b8810f951610c5666fdfdd13ab3c85f0e5ab2 | 4,037 | py | Python | pcap_bw.py | Cjen1/haoc21-ae | 59f9f790a75048bae86e43ee912844115a226dcb | [
"MIT"
] | null | null | null | pcap_bw.py | Cjen1/haoc21-ae | 59f9f790a75048bae86e43ee912844115a226dcb | [
"MIT"
] | null | null | null | pcap_bw.py | Cjen1/haoc21-ae | 59f9f790a75048bae86e43ee912844115a226dcb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (C) 2020 Richard Mortier <mort@cantab.net>. All Rights Reserved.
#
# Licensed under the GPL v3; see LICENSE.md in the root of this distribution or
# the full text at https://opensource.org/licenses/GPL-3.0
# Computes total and all (src, dst) pairs bandwidth given a PCAP trace.
# Cur... | 37.37963 | 142 | 0.539014 |
795b88a0cacf2fe5986e31ce7fe03c40a635c6c8 | 3,951 | py | Python | Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/timeperiod_parser_config.py | ahmedabuamra/Recognizers-Text | 31193d89d3532839742992a2755c1d8539c68116 | [
"MIT"
] | 10 | 2019-05-11T18:07:14.000Z | 2021-08-20T03:02:47.000Z | Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/timeperiod_parser_config.py | ahmedabuamra/Recognizers-Text | 31193d89d3532839742992a2755c1d8539c68116 | [
"MIT"
] | 1 | 2020-07-10T08:25:36.000Z | 2020-07-10T08:25:36.000Z | Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/timeperiod_parser_config.py | ahmedabuamra/Recognizers-Text | 31193d89d3532839742992a2755c1d8539c68116 | [
"MIT"
] | 18 | 2019-08-19T12:11:00.000Z | 2021-10-12T09:36:27.000Z | from typing import Pattern, Dict
from recognizers_text.utilities import RegExpUtility
from recognizers_text.extractor import Extractor
from recognizers_number.number.spanish.extractors import SpanishIntegerExtractor
from ...resources.spanish_date_time import SpanishDateTime
from ..extractors import DateTimeExtractor
f... | 35.918182 | 87 | 0.698304 |
795b8a75dafe25c3b8202c1e8dc16828c8ee1f8f | 13,525 | py | Python | FastText/train_fast.py | ssbuild/Multi-Label-Text-Classification | 65c67e7a3b69cc3f015c7c3822cbb89ae887c6fb | [
"Apache-2.0"
] | 524 | 2017-10-19T14:18:45.000Z | 2022-03-21T18:25:48.000Z | FastText/train_fast.py | ssbuild/Multi-Label-Text-Classification | 65c67e7a3b69cc3f015c7c3822cbb89ae887c6fb | [
"Apache-2.0"
] | 26 | 2018-05-27T01:19:19.000Z | 2022-03-24T10:17:49.000Z | FastText/train_fast.py | ssbuild/Multi-Label-Text-Classification | 65c67e7a3b69cc3f015c7c3822cbb89ae887c6fb | [
"Apache-2.0"
] | 133 | 2017-11-10T10:51:21.000Z | 2022-03-26T11:41:47.000Z | # -*- coding:utf-8 -*-
__author__ = 'Randolph'
import os
import sys
import time
import logging
sys.path.append('../')
logging.getLogger('tensorflow').disabled = True
import numpy as np
import tensorflow as tf
from tensorboard.plugins import projector
from text_fast import TextFAST
from utils import checkmate as cm
f... | 50.655431 | 120 | 0.574713 |
795b8ab1c03a5b6d6d2448ddb57a60fa6f5bd3de | 3,099 | py | Python | backend/core/services/security/auth.py | devalv/yawm | 9f91b96cf6b9a9a1f2026d514ea24edda117e1ba | [
"MIT"
] | 1 | 2021-12-26T00:10:15.000Z | 2021-12-26T00:10:15.000Z | backend/core/services/security/auth.py | devalv/yawm | 9f91b96cf6b9a9a1f2026d514ea24edda117e1ba | [
"MIT"
] | 7 | 2020-11-07T16:42:47.000Z | 2022-01-21T23:51:38.000Z | backend/core/services/security/auth.py | devalv/yawm | 9f91b96cf6b9a9a1f2026d514ea24edda117e1ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Authentication system."""
from fastapi import Depends
from fastapi.security.oauth2 import OAuth2AuthorizationCodeBearer
from jose import JWTError
from pydantic import UUID4
from core.config import LOGIN_ENDPOINT, SWAP_TOKEN_ENDPOINT
from core.database import ProductGinoModel, UserGinoModel,... | 33.322581 | 80 | 0.716683 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.