hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f799eeb2aa84e006cb19e0e34d6774307fb2e355 | 997 | py | Python | clif/testing/python/t10_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 966 | 2017-04-18T04:14:04.000Z | 2022-03-03T21:22:44.000Z | clif/testing/python/t10_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 48 | 2017-05-02T23:51:29.000Z | 2021-12-06T19:10:11.000Z | clif/testing/python/t10_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 135 | 2017-04-26T06:15:30.000Z | 2022-01-07T02:17:20.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 27.694444 | 74 | 0.726179 |
f79a00620af76df9e99ac26f67392086f18f28ac | 520 | py | Python | openstack-dashboard/openstack_dashboard/dashboards/project/pertino/urls.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/pertino/urls.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/pertino/urls.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null |
from django.conf.urls import include # noqa
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.pertino import views
urlpatterns = patterns('',
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^display_list/(?P<display_type>[^/]+)/$', ... | 37.142857 | 97 | 0.703846 |
f79a0287e1563574a271c2597dd8eb550b4e8ace | 1,910 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1306_pillow_clock.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 185 | 2017-01-11T06:43:38.000Z | 2022-03-26T12:58:02.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1306_pillow_clock.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 49 | 2017-03-21T12:59:01.000Z | 2022-01-27T01:36:24.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1306_pillow_clock.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 71 | 2017-12-09T15:16:06.000Z | 2022-02-05T11:34:58.000Z | # SPDX-FileCopyrightText: Melissa LeBlanc-Williams for Adafruit Industries
# SPDX-License-Identifier: MIT
# This example is for use on (Linux) computers that are using CPython with
# Adafruit Blinka to support CircuitPython libraries. CircuitPython does
# not support PIL/pillow (python imaging library)!
#
# Ported to ... | 33.508772 | 94 | 0.719895 |
f79a1205ffb215a0925e4abc76055f72ce552c82 | 1,305 | py | Python | wizard_builder/migrations/0006_many_sites.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 16 | 2016-06-21T04:05:24.000Z | 2017-09-26T15:40:24.000Z | wizard_builder/migrations/0006_many_sites.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 141 | 2016-06-21T20:46:46.000Z | 2017-09-28T00:20:49.000Z | wizard_builder/migrations/0006_many_sites.py | project-callisto/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 7 | 2017-10-04T22:52:18.000Z | 2018-05-31T17:14:39.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-06-12 20:49
from __future__ import unicode_literals
from django.db import migrations, models
def copy_site_to_sites(apps, schema_editor):
current_database = schema_editor.connection.alias
PageBase = apps.get_model('wizard_builder.PageBase')
for... | 29 | 69 | 0.662069 |
f79a40f731a98ee1b5289a9f88c59c18f2ec792e | 4,633 | py | Python | tests/test_lib_payload.py | kusanagi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | 1 | 2022-02-24T19:02:28.000Z | 2022-02-24T19:02:28.000Z | tests/test_lib_payload.py | jeronimoalbi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | null | null | null | tests/test_lib_payload.py | jeronimoalbi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | 1 | 2021-05-16T17:40:21.000Z | 2021-05-16T17:40:21.000Z | # Python 3 SDK for the KUSANAGI(tm) framework (http://kusanagi.io)
# Copyright (c) 2016-2021 KUSANAGI S.L. All rights reserved.
#
# Distributed under the MIT license.
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
def test_lib_payload():
... | 34.834586 | 73 | 0.611699 |
f79a56f4ed3ccc117bb99478f74a2e9120e91f64 | 3,342 | py | Python | tests/wait_condition_tests.py | alisaifee/holmium.core | 026441584537b83e8a2743490be78a4c8f07a510 | [
"MIT"
] | 38 | 2015-03-12T05:23:26.000Z | 2021-11-18T09:26:25.000Z | tests/wait_condition_tests.py | alisaifee/holmium.core | 026441584537b83e8a2743490be78a4c8f07a510 | [
"MIT"
] | 16 | 2015-02-17T01:07:32.000Z | 2021-07-10T15:47:26.000Z | tests/wait_condition_tests.py | alisaifee/holmium.core | 026441584537b83e8a2743490be78a4c8f07a510 | [
"MIT"
] | 25 | 2015-03-24T21:45:50.000Z | 2021-07-05T07:29:54.000Z | import time
import unittest
import hiro
from holmium.core import Page, Element, Locators, ElementMap
from holmium.core.conditions import (
ALL, MATCHES_TEXT, VISIBLE, INVISIBLE, ANY
)
from tests.utils import make_temp_page, get_driver
class WaitConditionTests(unittest.TestCase):
def setUp(self):
sel... | 32.764706 | 79 | 0.59994 |
f79a579960580aaf6e7d94c497d5255d411933e2 | 4,406 | py | Python | rbac/common/role/confirm_owner.py | Nonj/sawtooth-next-directory | 32b3de8efca89b4485af785fe955974e76c093db | [
"Apache-2.0"
] | null | null | null | rbac/common/role/confirm_owner.py | Nonj/sawtooth-next-directory | 32b3de8efca89b4485af785fe955974e76c093db | [
"Apache-2.0"
] | null | null | null | rbac/common/role/confirm_owner.py | Nonj/sawtooth-next-directory | 32b3de8efca89b4485af785fe955974e76c093db | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 35.532258 | 82 | 0.653654 |
f79a6c345ea5f6df1baab9e2f7e7760dda185962 | 2,139 | py | Python | tests/test_cpu_flags.py | garybake/gbakeboy | f24d3d96c3e6c89446c2ef6645668fa8a1ccf506 | [
"MIT"
] | 1 | 2018-01-05T13:54:24.000Z | 2018-01-05T13:54:24.000Z | tests/test_cpu_flags.py | garybake/gbakeboy | f24d3d96c3e6c89446c2ef6645668fa8a1ccf506 | [
"MIT"
] | null | null | null | tests/test_cpu_flags.py | garybake/gbakeboy | f24d3d96c3e6c89446c2ef6645668fa8a1ccf506 | [
"MIT"
] | 1 | 2019-12-31T05:16:38.000Z | 2019-12-31T05:16:38.000Z | import unittest
from gbakeboy import Cpu
from gbakeboy import Memory
from gbakeboy import hex2int as h2i
from gbakeboy import print_bin_8
class test_cpu_flags(unittest.TestCase):
def setUp(self):
mem = Memory()
self.cpu = Cpu(mem)
self.cpu.set_register_16('AF', 0)
def test_flags(sel... | 27.075949 | 50 | 0.604956 |
f79a7870a2a463ab7662b20b3f50e9c355b44faa | 426 | py | Python | blousebrothers/app.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/app.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/app.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from oscar import app
class BBShop(app.Shop):
# Override get_urls method
def get_urls(self):
"""
Replace catalogue URL (first one in original func)
"""
urls = [url(r'^ecni/catalogue/', self.catalogue_app.urls),
url(r'^ecni/catalo... | 26.625 | 95 | 0.622066 |
f79a925fb6a96136111e1dd8dff85e6d8c4c5bbe | 455 | py | Python | slavdict/dictionary/migrations/0082_auto_20211002_1548.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 1 | 2022-01-17T17:26:25.000Z | 2022-01-17T17:26:25.000Z | slavdict/dictionary/migrations/0082_auto_20211002_1548.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 8 | 2020-02-12T13:26:05.000Z | 2022-02-10T19:28:07.000Z | slavdict/dictionary/migrations/0082_auto_20211002_1548.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | null | null | null | # Generated by Django 2.2.23 on 2021-10-02 15:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dictionary', '0081_auto_20210925_1123'),
]
operations = [
migrations.AlterField(
model_name='entry',
name='template... | 23.947368 | 106 | 0.637363 |
f79acf625cd5a010e6a7c54c64eb635ab0e88566 | 1,913 | py | Python | src/spaceone/inventory/manager/server_manager.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/manager/server_manager.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/manager/server_manager.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | import logging
from spaceone.core import utils
from spaceone.core.manager import BaseManager
from spaceone.inventory.model.server_model import Server
from spaceone.inventory.lib.resource_manager import ResourceManager
from spaceone.inventory.error import *
_LOGGER = logging.getLogger(__name__)
class ServerManager(B... | 34.160714 | 105 | 0.706221 |
f79b4a2c189223f39b0ef69a3af00296bf356bfb | 4,088 | py | Python | horizon/utils/memoized.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | null | null | null | horizon/utils/memoized.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | null | null | null | horizon/utils/memoized.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 Nebula, Inc.
#
# 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
#
#... | 39.68932 | 79 | 0.653376 |
f79b4bd74e70d947b16ded60dd1b86a9c9ed4ea5 | 9,239 | py | Python | src/python/tests/core/system/new_process_test.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 3 | 2020-12-30T07:00:55.000Z | 2021-03-16T10:55:05.000Z | src/python/tests/core/system/new_process_test.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/python/tests/core/system/new_process_test.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2020-04-25T16:37:10.000Z | 2020-04-25T16:37:10.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.231373 | 80 | 0.652993 |
f79b7e12d74e3deaad4d5fe239931d34069fd819 | 5,689 | py | Python | yearn/v1/vaults.py | 0xean/yearn-exporter | 4afe6cd8d2342bf63e0e9a6a45f6f4531b46903c | [
"MIT"
] | 64 | 2021-03-14T22:10:08.000Z | 2022-03-30T17:41:11.000Z | yearn/v1/vaults.py | mariuspod/yearn-exporter | 9140038ef8c208f409ad83358e2e1ba395cc5094 | [
"MIT"
] | 130 | 2021-03-03T17:11:51.000Z | 2022-03-30T22:51:17.000Z | yearn/v1/vaults.py | mariuspod/yearn-exporter | 9140038ef8c208f409ad83358e2e1ba395cc5094 | [
"MIT"
] | 74 | 2021-03-03T17:06:39.000Z | 2022-03-30T11:28:09.000Z | import logging
from dataclasses import dataclass
from functools import cached_property
from typing import Optional
from brownie import ZERO_ADDRESS, interface
from brownie.network.contract import InterfaceContainer
from yearn import apy, constants
from yearn.apy.common import ApySamples
from yearn.common import Tvl
f... | 38.181208 | 105 | 0.625593 |
f79b8753b385c3ae605883e6c5e54ff494df7d95 | 1,771 | py | Python | src/factory/loss.py | leelew/HRSEPP | b841b1abe529e66b428bd7a265292cc1746b431d | [
"MIT"
] | 1 | 2021-09-26T10:01:37.000Z | 2021-09-26T10:01:37.000Z | src/factory/loss.py | leelew/HRSEPP | b841b1abe529e66b428bd7a265292cc1746b431d | [
"MIT"
] | 6 | 2021-09-26T09:35:06.000Z | 2021-11-15T07:26:16.000Z | src/factory/loss.py | leelew/HRSEPP | b841b1abe529e66b428bd7a265292cc1746b431d | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras import losses
import tensorflow.python.keras.backend as K
class ImageGradientDifferenceLoss(losses.Loss):
def __init__(self):
super().__init__()
def call(self, y_true, y_pred):
# for 5D inputs
gdl = 0
for i in range(y_true.shape[1])... | 30.534483 | 76 | 0.631282 |
f79b8ff5fad29e56bb99c048deba7dd2f83ce9a4 | 408 | py | Python | onadata/apps/main/tests/test_style.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/main/tests/test_style.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/main/tests/test_style.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
from subprocess import call
import unittest
from django.test import TestCase
class TestStyle(TestCase):
@unittest.skip('Fails under Django 1.6')
def test_flake8(self):
result = call(['flake8', '--exclu... | 27.2 | 82 | 0.715686 |
f79bc3010ec37a7dc29bd6c02c4e7ae64517dd2b | 14,263 | py | Python | toontown/pickatoon/ShardPicker.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2018-06-16T23:06:38.000Z | 2018-06-16T23:06:38.000Z | toontown/pickatoon/ShardPicker.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/pickatoon/ShardPicker.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | '''
Created on Nov 16, 2016
@author: Drew
'''
from direct.directnotify import DirectNotifyGlobal
from direct.gui.DirectGui import *
from direct.interval.IntervalGlobal import *
from direct.task.Task import Task
from otp.ai.MagicWordGlobal import *
from panda3d.core import *
from toontown.distributed import ToontownDis... | 43.221212 | 524 | 0.631144 |
f79c02a19519dcac9ec72cca3e3d81bfe6887937 | 8,430 | py | Python | models/model_zoo/model_conv4.py | jonasrothfuss/DeepEpisodicMemory | 1095315a5d75a4840ef4017af70432e2dd535e4c | [
"MIT"
] | 13 | 2017-02-03T17:17:04.000Z | 2021-01-27T09:29:53.000Z | models/model_zoo/model_conv4.py | jonasrothfuss/DeepEpisodicMemory | 1095315a5d75a4840ef4017af70432e2dd535e4c | [
"MIT"
] | 1 | 2019-01-07T23:53:51.000Z | 2019-01-07T23:53:51.000Z | models/model_zoo/model_conv4.py | jonasrothfuss/DeepEpisodicMemory | 1095315a5d75a4840ef4017af70432e2dd535e4c | [
"MIT"
] | 8 | 2017-02-03T17:17:41.000Z | 2021-01-13T10:53:39.000Z | import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
import tensorflow.contrib.layers
from tensorflow.contrib.layers.python import layers as tf_layers
from models.conv_lstm import basic_conv_lstm_cell
# Amount to use when lower bounding tensors
RELU_SHIFT = 1e-12
FC_LAYER_SIZE = 512
# ke... | 48.728324 | 167 | 0.708304 |
f79c23d02c14b1e5b2f316bf9e82032ecea233dc | 778 | py | Python | transaction.py | screwyterror83/python_blockchain_learning_1 | 850135724fe811a841baf581814dfe69e0ac1fb7 | [
"MIT"
] | null | null | null | transaction.py | screwyterror83/python_blockchain_learning_1 | 850135724fe811a841baf581814dfe69e0ac1fb7 | [
"MIT"
] | null | null | null | transaction.py | screwyterror83/python_blockchain_learning_1 | 850135724fe811a841baf581814dfe69e0ac1fb7 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from utility.printable import Printable
class Transaction(Printable):
"""A transaction which can be added to a block in the blockchain.
Attributes:
:sender: The sender of the coins.
:recipient: The recipient of the coins.
:signature: The signature o... | 31.12 | 69 | 0.64653 |
f79c45c96fef5084d6ab2c6f722c4a039cf3c3f4 | 66,264 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 41.623116 | 240 | 0.672054 |
f79c51ada896c8b0e1b995347b059277db215513 | 8,832 | py | Python | cibuildwheel/logger.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 371 | 2021-05-19T18:48:06.000Z | 2022-03-31T11:31:41.000Z | cibuildwheel/logger.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 234 | 2021-05-19T19:25:42.000Z | 2022-03-29T19:03:00.000Z | cibuildwheel/logger.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 56 | 2021-05-25T19:59:54.000Z | 2022-03-26T13:49:14.000Z | import codecs
import os
import re
import sys
import time
from typing import IO, AnyStr, Optional, Union
from cibuildwheel.util import CIProvider, detect_ci_provider
DEFAULT_FOLD_PATTERN = ("{name}", "")
FOLD_PATTERNS = {
"azure": ("##[group]{name}", "##[endgroup]"),
"travis": ("travis_fold:start:{identifier}\... | 32.711111 | 98 | 0.630435 |
f79c6005b1b8486392288ad4fb198e4ce35ecf33 | 1,325 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 33.125 | 94 | 0.699623 |
f79c864973a8e60ef1c88c9733d2a37b41eb36a0 | 43,583 | py | Python | round01/30_11_dDQN_light_tweak73.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | round01/30_11_dDQN_light_tweak73.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | 1 | 2022-02-10T02:27:10.000Z | 2022-02-10T02:27:10.000Z | round01/30_11_dDQN_light_tweak73.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | ########################################
# Changes compared to 30_11_dDQN_light_tweak71.py
# 01.
# lr_optimizer = 7.3e-4
########################################
import sys
import numpy as np
#import pandas as pd
import datetime
import json
from array import *
import os
import math
from random import randrange
imp... | 37.865334 | 271 | 0.576624 |
f79cb955531c361bcfd691bee7de90430088b049 | 8,840 | py | Python | ssda_nlp/model_performance_utils.py | slavesocieties/ssda-nlp | 8764d2f928ca0fe4e5737fbea4dcd518b8b804f6 | [
"MIT"
] | null | null | null | ssda_nlp/model_performance_utils.py | slavesocieties/ssda-nlp | 8764d2f928ca0fe4e5737fbea4dcd518b8b804f6 | [
"MIT"
] | 21 | 2021-02-23T22:31:04.000Z | 2022-01-27T22:51:18.000Z | ssda_nlp/model_performance_utils.py | slavesocieties/ssda-nlp | 8764d2f928ca0fe4e5737fbea4dcd518b8b804f6 | [
"MIT"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 42-initial-model.ipynb (unless otherwise specified).
__all__ = ['model_meta_training', 'get_ner_df', 'get_corrects_df', 'get_fns_df', 'get_fps_df']
# Cell
#export
#data structure imports
import pandas as pd
import numpy as np
#python imports
import random
#modeling import... | 47.783784 | 157 | 0.673416 |
f79cdcdc53ba2fa5360bd39aaaca0191a2c56070 | 3,522 | py | Python | src/sentry/api/endpoints/relay_projectconfigs.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/relay_projectconfigs.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/relay_projectconfigs.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import six
from rest_framework.response import Response
from sentry_sdk import Hub
from sentry_sdk.tracing import Span
from sentry.api.base import Endpoint
from sentry.api.permissions import RelayPermission
from sentry.api.authentication import RelayAuthentication
from sentry.r... | 40.022727 | 92 | 0.647643 |
f79cfe7933ba05947ee0be2878b61e34347b2d92 | 2,110 | py | Python | acq4/util/imaging/frame.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | acq4/util/imaging/frame.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | acq4/util/imaging/frame.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | from acq4.pyqtgraph import Vector, SRTTransform3D
class Frame(object):
"""A single frame of imaging data including meta information.
Expects *info* to be a dictionary with some minimal information:
* 'frameTransform' maps from the image coordinates (0,0 at top-left) to
the coordinate system of the... | 34.032258 | 94 | 0.641232 |
f79d23d66240b8eaebd31af8b136607359ab62b2 | 78 | py | Python | src/somfy_controller/somfy/__init__.py | matanrak/somfy-controller | 0f2f4a8108453f2ff57dbfa59010e1986e56acae | [
"MIT"
] | 1 | 2020-07-10T10:59:19.000Z | 2020-07-10T10:59:19.000Z | src/somfy_controller/somfy/__init__.py | matanrak/somfy-controller | 0f2f4a8108453f2ff57dbfa59010e1986e56acae | [
"MIT"
] | null | null | null | src/somfy_controller/somfy/__init__.py | matanrak/somfy-controller | 0f2f4a8108453f2ff57dbfa59010e1986e56acae | [
"MIT"
] | null | null | null | #! /usr/bin/python3.7
from src.somfy_controller.somfy.shutter import Shutter
| 19.5 | 54 | 0.794872 |
f79d245d35ce8662501ff867bcb164c89c1e1ffe | 6,391 | py | Python | tests/unit/bokeh/command/subcommands/test_png.py | ivan-usov/bokeh | ec3295c4e6027864db4821b59d1a423bf4a1245f | [
"BSD-3-Clause"
] | null | null | null | tests/unit/bokeh/command/subcommands/test_png.py | ivan-usov/bokeh | ec3295c4e6027864db4821b59d1a423bf4a1245f | [
"BSD-3-Clause"
] | null | null | null | tests/unit/bokeh/command/subcommands/test_png.py | ivan-usov/bokeh | ec3295c4e6027864db4821b59d1a423bf4a1245f | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 33.994681 | 141 | 0.480989 |
f79d297a3e25be8d59c2a0c21c914f7f2126297a | 1,488 | py | Python | plugins/maya/publish/validate_mesh_no_more_than_4_sides.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/publish/validate_mesh_no_more_than_4_sides.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/publish/validate_mesh_no_more_than_4_sides.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import pyblish.api
from reveries import plugins
class ValidateMeshNoMoreThan4Sides(pyblish.api.Validator):
"""Ensure that meshes don't have face that is more than 4 sides
To debug the problem on the meshes you can use Maya's modeling
tool: "Mesh > Cleanup..."
"""
order = pyblish.api.ValidatorO... | 26.105263 | 79 | 0.596774 |
f79d38f8f6c1541beccef240a27cf9363057a858 | 5,979 | py | Python | myia/debug/label.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | myia/debug/label.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | myia/debug/label.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Utilities to generate or map labels for nodes and graphs."""
from types import FunctionType
from ..abstract import AbstractValue
from ..info import DebugInfo
from ..ir import MetaGraph
from ..ir.anf import ANFNode, Graph
from ..operations import Operation, Primitive
from ..utils import (
EnvInstance,
Hand... | 28.607656 | 80 | 0.530356 |
f79d77f952d128ac5842ac26b024d715b75038d2 | 2,481 | py | Python | core/argo/core/network/GaussianDiagonalPlusMinusOne.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 4 | 2020-12-07T19:13:13.000Z | 2022-01-30T18:52:18.000Z | core/argo/core/network/GaussianDiagonalPlusMinusOne.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 12 | 2020-09-25T22:41:28.000Z | 2022-02-09T23:46:34.000Z | core/argo/core/network/GaussianDiagonalPlusMinusOne.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 2 | 2021-03-02T18:31:04.000Z | 2021-03-02T21:56:43.000Z | import tensorflow as tf
import sonnet as snt
import numpy as np
from tensorflow_probability import distributions as tfd
from tensorflow_probability import bijectors as tfb
from .AbstractGaussian import AbstractGaussian
import types
class GaussianDiagonalPlusMinusOne(AbstractGaussian):
def __init__(self, m... | 40.672131 | 120 | 0.614672 |
f79d7989e06fb61065453d83cb7c9c7ac597e3b5 | 675 | py | Python | tests/data/expected/parser/openapi/openapi_parser_parse_modular/collections.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 891 | 2019-07-23T04:23:32.000Z | 2022-03-31T13:36:33.000Z | tests/data/expected/parser/openapi/openapi_parser_parse_modular/collections.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 663 | 2019-07-23T09:50:26.000Z | 2022-03-29T01:56:55.000Z | tests/data/expected/parser/openapi/openapi_parser_parse_modular/collections.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 108 | 2019-07-23T08:50:37.000Z | 2022-03-09T10:50:22.000Z | from __future__ import annotations
from enum import Enum
from typing import List, Optional
from pydantic import AnyUrl, BaseModel
from . import models
class Pets(BaseModel):
__root__: List[models.Pet]
class Users(BaseModel):
__root__: List[models.User]
class Rules(BaseModel):
__root__: List[str]
... | 16.875 | 48 | 0.691852 |
f79d8d3cddba3af176bf3cbc9b86fc228df3bd95 | 391 | py | Python | libsoft/libsoft/asgi.py | akhil4rajan/library_management | 3c8031ba6c8237c26358097005f60cd57b8a0c3f | [
"MIT"
] | null | null | null | libsoft/libsoft/asgi.py | akhil4rajan/library_management | 3c8031ba6c8237c26358097005f60cd57b8a0c3f | [
"MIT"
] | null | null | null | libsoft/libsoft/asgi.py | akhil4rajan/library_management | 3c8031ba6c8237c26358097005f60cd57b8a0c3f | [
"MIT"
] | null | null | null | """
ASGI config for libsoft project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
f79d97898cb2616c001addfd4b61d5764cb060c2 | 1,298 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_GI.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_GI.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_GI.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. GI metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_GI = PhoneMetadata(id='GI', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[158]\\d{2,5}', possible_length=(3,... | 99.846154 | 262 | 0.694145 |
f79de717953d92b557b86e5fd69c116f2a6a6dac | 1,002 | py | Python | mi/dataset/driver/wc_wm/cspp/test/test_wc_wm_cspp_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/wc_wm/cspp/test/test_wc_wm_cspp_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/wc_wm/cspp/test/test_wc_wm_cspp_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null |
__author__ = 'jroy'
from mi.core.log import get_logger
log = get_logger()
from mi.idk.config import Config
import unittest
import os
from mi.dataset.driver.wc_wm.cspp.wc_wm_cspp_recovered_driver import parse
from mi.dataset.dataset_driver import ParticleDataHandler
class DriverTest(unittest.TestCase):
def s... | 24.439024 | 99 | 0.688623 |
f79df39fa36db36b651ed36c4301a723be5adca7 | 204 | py | Python | moto/emr/__init__.py | argos83/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:01:41.000Z | 2021-03-06T22:01:41.000Z | moto/emr/__init__.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | null | null | null | moto/emr/__init__.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2017-10-19T00:53:28.000Z | 2017-10-19T00:53:28.000Z | from __future__ import unicode_literals
from .models import emr_backends
from ..core.models import MockAWS, base_decorator
emr_backend = emr_backends['us-east-1']
mock_emr = base_decorator(emr_backends)
| 29.142857 | 49 | 0.828431 |
f79e0ebfd1d1b228393c57881a9481423621710a | 262 | py | Python | onyx/models/Tokens.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-14T21:16:07.000Z | 2020-07-09T07:30:44.000Z | onyx/models/Tokens.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-01T12:33:36.000Z | 2020-04-01T12:33:49.000Z | onyx/models/Tokens.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | null | null | null | from onyx.extensions import db
class Tokens(db.Model):
__tablename__ = 'tokens'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(), nullable=False, unique=True)
token = db.Column(db.String(), nullable=False, unique=True)
| 29.111111 | 63 | 0.70229 |
f79e0f45c429be77a1e55c6456f0d7b02c17dd05 | 955 | py | Python | appengine/predator/scripts/setup.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/scripts/setup.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/scripts/setup.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Shared setup and configuration code for Predator scripts."""
from datetime import date
from datetime import timedelta
import os
from analysis.type_enums... | 34.107143 | 76 | 0.788482 |
f79e1ea855d56bc687129b5fa118241da9fef640 | 18,353 | py | Python | configs/config-sentQEbRNN.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | configs/config-sentQEbRNN.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | configs/config-sentQEbRNN.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | def load_parameters():
"""
Loads the defined hyperparameters
:return parameters: Dictionary of loaded parameters
"""
# Input data params
TASK_NAME = 'qe-2016' # Task name
DATASET_NAME = TASK_NAME # Dataset name
SRC_LAN = 'src' ... | 65.313167 | 175 | 0.569771 |
f79e49618eb3f68b2e028e3224b1b4a8186a382c | 5,456 | py | Python | docs/conf.py | holonomicjl/PyMethylProcess | 782a57751ae0326fb7d9c347149dd39461dba867 | [
"MIT"
] | 20 | 2019-05-08T16:12:00.000Z | 2021-11-23T16:38:30.000Z | docs/conf.py | holonomicjl/PyMethylProcess | 782a57751ae0326fb7d9c347149dd39461dba867 | [
"MIT"
] | 12 | 2019-06-12T10:34:50.000Z | 2021-07-29T15:45:30.000Z | docs/conf.py | holonomicjl/PyMethylProcess | 782a57751ae0326fb7d9c347149dd39461dba867 | [
"MIT"
] | 6 | 2019-04-22T01:22:00.000Z | 2021-01-24T16:11:57.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 ------------------------------------------------------------... | 29.652174 | 79 | 0.652676 |
f79e4c6bbe6ac1f5de8e5021c8f55017d6ce3098 | 2,108 | py | Python | doc/source/conf.py | microchip-pic-avr-tools/pyawsutils | 8dd72e8cc8d55f6a65a38695cdacdab4bb727bf8 | [
"MIT"
] | null | null | null | doc/source/conf.py | microchip-pic-avr-tools/pyawsutils | 8dd72e8cc8d55f6a65a38695cdacdab4bb727bf8 | [
"MIT"
] | null | null | null | doc/source/conf.py | microchip-pic-avr-tools/pyawsutils | 8dd72e8cc8d55f6a65a38695cdacdab4bb727bf8 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 38.327273 | 124 | 0.672676 |
f79e4cf52af1d2b5051f219d59f42a2584471e20 | 17,924 | py | Python | deepxde/optimizers/tensorflow_compat_v1/external_optimizer.py | blutjens/deepxde | 19855bb7790d0a9a327d4cc6921e6bc7a3c4c8cd | [
"Apache-2.0"
] | null | null | null | deepxde/optimizers/tensorflow_compat_v1/external_optimizer.py | blutjens/deepxde | 19855bb7790d0a9a327d4cc6921e6bc7a3c4c8cd | [
"Apache-2.0"
] | 1 | 2022-03-02T03:50:18.000Z | 2022-03-02T03:50:18.000Z | deepxde/optimizers/tensorflow_compat_v1/external_optimizer.py | ZongrenZou/deepxde | f74b9a48165eee1984f4b43dec05f1129f77200f | [
"Apache-2.0"
] | null | null | null | """TensorFlow interface for third-party optimizers.
Code below is taken from https://github.com/tensorflow/tensorflow/blob/v1.15.2/tensorflow/contrib/opt/python/training/external_optimizer.py,
because the ``tf.contrib`` module is not included in TensorFlow 2.
Another solution is using TensorFlow Probability, see the ... | 40.188341 | 140 | 0.640147 |
f79e67f31667336a9a0048a7beefb5f2a348faa6 | 692 | py | Python | app/__init__.py | Sirlord-Sen/highlighted-text-extraction-service | e7ba728a624cbe10104423393784047026edd4d5 | [
"Apache-2.0"
] | null | null | null | app/__init__.py | Sirlord-Sen/highlighted-text-extraction-service | e7ba728a624cbe10104423393784047026edd4d5 | [
"Apache-2.0"
] | null | null | null | app/__init__.py | Sirlord-Sen/highlighted-text-extraction-service | e7ba728a624cbe10104423393784047026edd4d5 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from config.config import config_by_name
def create_app(config_name):
app = Flask(__name__)
app.config['JSON_SORT_KEYS'] = False
app.config.from_object(config_by_name[config_name])
from app.highlight.controllers.controllers import api as textdetect_route
from app.highlight.... | 31.454545 | 93 | 0.786127 |
f79e92dd170b147560d18037900d421da05c2106 | 5,515 | py | Python | modules/la_mapping.py | mysociety/la_distance | 350658b2fc0bb7250efd9e2a3b56751386484559 | [
"MIT"
] | 1 | 2021-11-23T09:17:26.000Z | 2021-11-23T09:17:26.000Z | modules/la_mapping.py | mysociety/la_distance | 350658b2fc0bb7250efd9e2a3b56751386484559 | [
"MIT"
] | 1 | 2021-12-15T15:55:28.000Z | 2021-12-15T15:55:28.000Z | modules/la_mapping.py | mysociety/la_distance | 350658b2fc0bb7250efd9e2a3b56751386484559 | [
"MIT"
] | null | null | null | """
Helpers to construct maps in altair of local authorities
"""
import json
from functools import lru_cache
from pathlib import Path
import altair as alt
import geopandas
from notebook_helper import *
from . import la
pd.options.mode.chained_assignment = None
top_level = Path(__file__).parent.parent
lower_tier = ... | 32.063953 | 83 | 0.673255 |
f79e9ab1e4503b3ccbc28be1fc82da9a121e6e39 | 846 | py | Python | var/spack/repos/builtin/packages/py-uhi/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/py-uhi/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/py-uhi/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyUhi(PythonPackage):
"""Unified Histogram Interface:
tools to help library authors... | 36.782609 | 95 | 0.679669 |
f79e9c69cd01cf87948c0a7d77dcc2128a78ef6e | 45,978 | py | Python | Scripts/modules/project.py | joaohenggeler/software-vulnerability-collection-scripts | 4719f8c279ebd6b879b7d8bce2a2789cd28c6929 | [
"Apache-2.0"
] | null | null | null | Scripts/modules/project.py | joaohenggeler/software-vulnerability-collection-scripts | 4719f8c279ebd6b879b7d8bce2a2789cd28c6929 | [
"Apache-2.0"
] | null | null | null | Scripts/modules/project.py | joaohenggeler/software-vulnerability-collection-scripts | 4719f8c279ebd6b879b7d8bce2a2789cd28c6929 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
This module defines a class that represents a C/C++ project and that contains methods for interfacing with its vulnerabilities and source files.
"""
import glob
import json
import os
import random
import re
import sys
from collections import defaultdict, namedtuple
from typing import Calla... | 38.898477 | 283 | 0.700444 |
f79ea23dd94cdd7012164259e125d540a6e2601c | 5,260 | py | Python | src/CryptoPlus/SelfTest/Cipher/test_ARC2.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 64 | 2015-01-15T10:41:41.000Z | 2022-01-10T23:51:42.000Z | src/CryptoPlus/SelfTest/Cipher/test_ARC2.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 5 | 2016-01-05T17:48:22.000Z | 2018-02-22T04:32:17.000Z | src/CryptoPlus/SelfTest/Cipher/test_ARC2.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 53 | 2015-04-14T00:17:02.000Z | 2022-03-12T05:32:05.000Z | # -*- coding: utf-8 -*-
#
# SelfTest/Cipher/ARC2.py: Self-test for the Alleged-RC2 cipher
#
# =======================================================================
# Copyright (C) 2008 Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this... | 50.095238 | 106 | 0.710076 |
f79ea619360ffe7e6af8ad467575eb3bdd59c026 | 1,146 | py | Python | src/hermes_audio_server/exceptions.py | djvl/hermes-audio-server | 1f7b9d30f1323f7041ffe013020d97ccaefea860 | [
"MIT"
] | 23 | 2019-05-10T20:46:57.000Z | 2021-05-30T00:41:25.000Z | src/hermes_audio_server/exceptions.py | djvl/hermes-audio-server | 1f7b9d30f1323f7041ffe013020d97ccaefea860 | [
"MIT"
] | 3 | 2019-05-17T19:39:30.000Z | 2019-11-22T07:56:57.000Z | src/hermes_audio_server/exceptions.py | djvl/hermes-audio-server | 1f7b9d30f1323f7041ffe013020d97ccaefea860 | [
"MIT"
] | 12 | 2019-11-21T23:11:16.000Z | 2021-10-31T09:12:52.000Z | """This module contains exceptions defined for Hermes Audio Server."""
class HermesAudioServerError(Exception):
"""Base class for exceptions raised by Hermes Audio Server code.
By catching this exception type, you catch all exceptions that are
defined by the Hermes Audio Server code."""
class Configura... | 32.742857 | 79 | 0.722513 |
f79eb27435cc954cebde4357c1d946a320f4ed75 | 4,895 | py | Python | tensorflow/compiler/tests/while_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/compiler/tests/while_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/compiler/tests/while_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.366412 | 80 | 0.688866 |
f79ec6187ee4ed05a7115a001f734b883f5c4e88 | 1,447 | py | Python | noggin/form/register_user.py | mohanboddu/noggin | 933d97b1c06db3f37acfeb86c32b45171f4e80b0 | [
"MIT"
] | null | null | null | noggin/form/register_user.py | mohanboddu/noggin | 933d97b1c06db3f37acfeb86c32b45171f4e80b0 | [
"MIT"
] | null | null | null | noggin/form/register_user.py | mohanboddu/noggin | 933d97b1c06db3f37acfeb86c32b45171f4e80b0 | [
"MIT"
] | null | null | null | from flask_babel import lazy_gettext as _
from wtforms import StringField, PasswordField
from wtforms.fields.html5 import EmailField
from wtforms.validators import DataRequired, EqualTo, Email
from .base import ModestForm, SubmitButtonField, strip
class RegisterUserForm(ModestForm):
firstname = StringField(
... | 28.94 | 77 | 0.628887 |
f79ede180c4261fe8ad74058ff694ef36319bc2a | 5,506 | py | Python | google/colab/drive.py | nersusurya/colabtools | 75bf78e1e50ed644f3f744a3b6d7cf94f0480827 | [
"Apache-2.0"
] | 5 | 2019-06-06T14:24:10.000Z | 2020-05-01T15:12:06.000Z | google/colab/drive.py | srikanthlakkoju/colabtools | 75bf78e1e50ed644f3f744a3b6d7cf94f0480827 | [
"Apache-2.0"
] | null | null | null | google/colab/drive.py | srikanthlakkoju/colabtools | 75bf78e1e50ed644f3f744a3b6d7cf94f0480827 | [
"Apache-2.0"
] | 2 | 2019-01-25T13:43:17.000Z | 2020-01-07T10:28:13.000Z | # Copyright 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.236111 | 79 | 0.675808 |
f79ee20d3b0140e6d4b20df0830d371b9b77967a | 3,715 | py | Python | data/voc.py | pengyuanzhuo/Detection | 18ac491a41f31978216e198c4d3bf4862564789a | [
"MIT"
] | null | null | null | data/voc.py | pengyuanzhuo/Detection | 18ac491a41f31978216e198c4d3bf4862564789a | [
"MIT"
] | null | null | null | data/voc.py | pengyuanzhuo/Detection | 18ac491a41f31978216e198c4d3bf4862564789a | [
"MIT"
] | null | null | null | """VOC Dataset Classes
Original author: Francisco Massa
https://github.com/fmassa/vision/blob/voc_dataset/torchvision/datasets/voc.py
Updated by: Ellis Brown, Max deGroot
"""
import os
import torch
import torch.utils.data as data
import cv2
import numpy as np
import sys
if sys.version_info[0] == 2:
import xml.etr... | 34.398148 | 90 | 0.560162 |
f79ee70dcdf24497681c57e8a22b9127b050db0f | 106 | py | Python | configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py | ddayzzz/mmdetection | b9940c56cc19b3dda7468a5fd858b9683e93a486 | [
"Apache-2.0"
] | 426 | 2020-10-16T08:09:27.000Z | 2022-03-30T03:36:04.000Z | configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py | Oz-art/mmdetection | d3cf38d91c454b1a6881e8c36c1e4a66dc5521b8 | [
"Apache-2.0"
] | 136 | 2021-07-11T11:26:54.000Z | 2022-03-31T02:45:34.000Z | configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py | Oz-art/mmdetection | d3cf38d91c454b1a6881e8c36c1e4a66dc5521b8 | [
"Apache-2.0"
] | 84 | 2021-05-29T06:58:14.000Z | 2022-03-31T07:44:10.000Z | _base_ = './faster_rcnn_r50_fpn_1x_coco.py'
train_cfg = dict(rcnn=dict(sampler=dict(type='OHEMSampler')))
| 35.333333 | 61 | 0.773585 |
f79f031c24d347aefb02fa4aed9bb3f172c14219 | 2,202 | py | Python | kuku/cli.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 42 | 2018-09-27T23:11:27.000Z | 2022-02-27T19:23:16.000Z | kuku/cli.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 3 | 2018-10-12T00:56:27.000Z | 2020-01-08T00:40:58.000Z | kuku/cli.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 8 | 2018-09-27T23:44:22.000Z | 2021-04-20T04:06:57.000Z | import sys
from docopt import docopt
from kubernetes import config
from kuku.__version__ import __version__
from kuku.dump import dump
from kuku.render import render
from kuku.templates import find
from kuku.values import resolve
def cli():
"""kuku: Kubernetes templating tool.
Usage:
kuku apply [... | 28.230769 | 153 | 0.60445 |
f79f4d7d421992190794b00a1ff0c72fa35f06f5 | 2,143 | py | Python | dfi/train.py | nicemanis/deep-focus-interpolation | 1df772fdb9a7c9c0813a3d1d6948a07dedb4384b | [
"MIT"
] | null | null | null | dfi/train.py | nicemanis/deep-focus-interpolation | 1df772fdb9a7c9c0813a3d1d6948a07dedb4384b | [
"MIT"
] | null | null | null | dfi/train.py | nicemanis/deep-focus-interpolation | 1df772fdb9a7c9c0813a3d1d6948a07dedb4384b | [
"MIT"
] | null | null | null | import os
import time
import pickle
import datetime
from keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping
from dfi.test import test
from dfi.data import load_data
from dfi.utils import reset_seeds
def train(model, hparams, session_name: str = None):
reset_seeds(hparams.training.seed)
star... | 30.614286 | 103 | 0.646757 |
f79f606e5f3371876271a0ca83fb1ae3164bc0f6 | 2,201 | py | Python | modules/templates/DRKCM/customise/project.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/templates/DRKCM/customise/project.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/templates/DRKCM/customise/project.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | """
PROJECT module customisations for DRKCM
License: MIT
"""
from gluon import current, IS_EMPTY_OR
from core import IS_ONE_OF
# -------------------------------------------------------------------------
#def project_home():
# """ Always go to task list """
#
# from core import s3_redirect_default
# ... | 31 | 79 | 0.4607 |
f79f644903a8df7f2730bcdecc570a848d80265c | 524 | py | Python | paw/tests/base.py | tehw0lf/paw | adc2b11d102b8ff9acf7763a7f2e65c21b38283d | [
"MIT"
] | 9 | 2017-10-29T17:53:34.000Z | 2021-07-19T14:39:42.000Z | paw/tests/base.py | tehw0lf/paw | adc2b11d102b8ff9acf7763a7f2e65c21b38283d | [
"MIT"
] | 18 | 2017-10-15T12:17:11.000Z | 2020-05-13T14:01:22.000Z | paw/tests/base.py | tehw0lf/paw | adc2b11d102b8ff9acf7763a7f2e65c21b38283d | [
"MIT"
] | 6 | 2017-10-15T13:10:21.000Z | 2020-08-01T11:52:44.000Z | import unittest
import paw
import wlgen
class paw_test(unittest.TestCase):
def setUp(self):
self.gen_wordlist = wlgen.gen_wordlist_iter
self.paw = paw.Paw()
self.w1 = [["A", "B", "C"], ["1", "2", "3"]]
self.w2 = [["A"], ["1", "2", "3"]]
self.w3 = "a"
sel... | 29.111111 | 54 | 0.507634 |
f79f64d99d5a980c2feaf69bb5f9caa9d8ef041c | 12,980 | py | Python | Games_On_Graphs_1904342/reachability.py | giannetti1904342/-EAI-_Reasoning_agents | 750b8cf2c7677b51097dc5847cc489ba56e5a02e | [
"MIT"
] | null | null | null | Games_On_Graphs_1904342/reachability.py | giannetti1904342/-EAI-_Reasoning_agents | 750b8cf2c7677b51097dc5847cc489ba56e5a02e | [
"MIT"
] | null | null | null | Games_On_Graphs_1904342/reachability.py | giannetti1904342/-EAI-_Reasoning_agents | 750b8cf2c7677b51097dc5847cc489ba56e5a02e | [
"MIT"
] | null | null | null | from typing import Set
import time
from graph import GameGraph
from graph_simple import GameGraphSimple
from draw_graph import draw_graph
#Improved backward algorithm implementation. Please refer the documentation for further details.
def reachability_game(G: GameGraph, target: Set[int], draw=False, image_name="smart... | 47.028986 | 136 | 0.661556 |
f79fbe63ea4db8513ec467496893f41af71cd1c4 | 18,455 | py | Python | src/simulator/cache/algorithms/eva.py | pskopnik/htc-cache-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | 1 | 2020-12-15T16:09:31.000Z | 2020-12-15T16:09:31.000Z | src/simulator/cache/algorithms/eva.py | pskopnik/htc-cache-system-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | null | null | null | src/simulator/cache/algorithms/eva.py | pskopnik/htc-cache-system-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | null | null | null | from apq import KeyedItem, KeyedPQ
from array import array
from dataclasses import dataclass, field
from enum import auto, Enum
import itertools
from typing import (
Callable,
cast,
DefaultDict,
Dict,
Hashable,
Iterable,
Optional,
Reversible,
Tuple,
TypeVar,
)
from ..classification import Classifier, Combine... | 33.493648 | 128 | 0.706909 |
f79fc2d372c3df1fdde7c18972ca3320a20cf65a | 2,220 | py | Python | umbrella.py | zacharycohn/pants | 6d7b0d8aa3de02414f06e063310694fc8910e52f | [
"CC0-1.0"
] | 49 | 2015-08-24T14:25:16.000Z | 2020-05-07T13:41:26.000Z | umbrella.py | zacharycohn/AutoAPI | 6d7b0d8aa3de02414f06e063310694fc8910e52f | [
"CC0-1.0"
] | 91 | 2015-08-04T18:18:12.000Z | 2017-09-15T23:33:49.000Z | umbrella.py | zacharycohn/AutoAPI | 6d7b0d8aa3de02414f06e063310694fc8910e52f | [
"CC0-1.0"
] | 21 | 2016-01-29T20:39:31.000Z | 2021-08-29T02:27:19.000Z | """Helpers for configuring API backends on API Umbrella."""
import os
import requests
headers = {
'X-Api-Key': os.environ.get('AUTOAPI_UMBRELLA_KEY'),
'X-Admin-Auth-Token': os.environ.get('AUTOAPI_UMBRELLA_TOKEN'),
}
base = 'https://api.data.gov/api-umbrella/v1'
endpoints = {
'apis': os.path.join(base, '... | 29.6 | 91 | 0.567117 |
f7a00ad99bda72c7b6ef9aa193e9e906e6b320f3 | 3,802 | py | Python | 4_nlp_processing/1_cnn_text_classify/text_cnn.py | eubchain/tfdistributedtestcase | a81f99e051537fcd860de28587f0ab2bd9b1b5d4 | [
"MIT"
] | 6 | 2018-07-30T08:47:25.000Z | 2019-01-13T16:17:31.000Z | 4_nlp_processing/1_cnn_text_classify/text_cnn.py | eubchain/tfdistributedtestcase | a81f99e051537fcd860de28587f0ab2bd9b1b5d4 | [
"MIT"
] | null | null | null | 4_nlp_processing/1_cnn_text_classify/text_cnn.py | eubchain/tfdistributedtestcase | a81f99e051537fcd860de28587f0ab2bd9b1b5d4 | [
"MIT"
] | 2 | 2018-11-28T09:37:26.000Z | 2018-11-29T02:51:20.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import tensorflow as tf
import numpy as np
class TextCNN(object):
"""
A CNN for text classification.
Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer.
"""
def __init__(
self, sequence_length, num_classes, voca... | 43.204545 | 101 | 0.588375 |
f7a02cbe4cf88c94fbdc0ceef234a123ebebf95e | 2,372 | py | Python | srfnef/functions/crystal_to_id.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/functions/crystal_to_id.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/functions/crystal_to_id.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
'''
@author: Minghao Guo
@contact: mh.guo0111@gmail.com
@software: nef
@file: crystal_to_id.py
@date: 6/14/2019
@desc:
'''
import numpy as np
from srfnef import nef_class
from srfnef.geometry import PetEcatScanner
@nef_class
class CrystalToId:
def __call__(self, crystal_pos: np.ndarray, scanner... | 32.944444 | 99 | 0.669477 |
f7a04db018001540d83a8319bc67d9b1008ddbbc | 1,097 | py | Python | src/common/migrations/0002_client.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | src/common/migrations/0002_client.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | src/common/migrations/0002_client.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-29 13:40
import common.fileds
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('common', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Client',
fields=[
... | 33.242424 | 114 | 0.549681 |
f7a063911f760d82d239ab406b2d78dd3cb91863 | 2,140 | py | Python | hackerearth/disjoint_set/disjoint.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | hackerearth/disjoint_set/disjoint.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | hackerearth/disjoint_set/disjoint.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | class disjoint_set:
def __init__(self):
self.parents = {}
self.ranks = {}
self.count = {}
def add_node(self,key):
self.parents[key] = key
self.ranks[key] = 0
self.count[key] = 1
def make_child(self,child,parent):
self.parents[child] = parent
def fi... | 31.940299 | 79 | 0.590654 |
f7a086db8a923571e4b1865af7f5a9539511a1f9 | 4,095 | py | Python | Tests/test_SVDSuperimposer.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:32:44.000Z | 2020-02-13T14:32:44.000Z | Tests/test_SVDSuperimposer.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_SVDSuperimposer.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | # Copyright 2017 by Maximilian Greil. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SVDSuperimposer module."""
import unittest
try:
from numpy import array
... | 38.632075 | 99 | 0.590476 |
f7a08d217ec688d708423924059ff0ed9a15722a | 734 | py | Python | tests/torchutils/io/test_saver.py | lzcn/torchutils | 8dc78ddcde72f27758e9774f3d1f5f6172e1a5e9 | [
"MIT"
] | 2 | 2021-01-15T03:13:46.000Z | 2021-04-20T16:20:52.000Z | tests/torchutils/io/test_saver.py | lzcn/torchutils | 8dc78ddcde72f27758e9774f3d1f5f6172e1a5e9 | [
"MIT"
] | null | null | null | tests/torchutils/io/test_saver.py | lzcn/torchutils | 8dc78ddcde72f27758e9774f3d1f5f6172e1a5e9 | [
"MIT"
] | null | null | null | import os
import torch.nn as nn
from torchutils.io import ModelSaver
model = nn.Linear(1, 1)
def test_saver_epoch(tmp_path):
n_saved = 5
num_epochs = 10
saver = ModelSaver(tmp_path, filename_prefix="net", score_name="score", n_saved=n_saved)
for epoch in range(num_epochs):
score = 1.0 * epoc... | 31.913043 | 92 | 0.666213 |
f7a09d88bf723648bd1407833b84973c91222781 | 3,801 | py | Python | syndicate/core/resources/s3_resource.py | Vyhrovyk/aws-syndicate | ee86eb102fe2d86b660e5d3162f286f2e173bc7a | [
"Apache-2.0"
] | 1 | 2020-08-29T16:38:50.000Z | 2020-08-29T16:38:50.000Z | syndicate/core/resources/s3_resource.py | Vyhrovyk/aws-syndicate | ee86eb102fe2d86b660e5d3162f286f2e173bc7a | [
"Apache-2.0"
] | null | null | null | syndicate/core/resources/s3_resource.py | Vyhrovyk/aws-syndicate | ee86eb102fe2d86b660e5d3162f286f2e173bc7a | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018 EPAM Systems, Inc.
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... | 34.554545 | 76 | 0.667982 |
f7a0a24fd66486fb3cc117de5278fb3cb88b1bef | 3,567 | py | Python | analysis_collection/tracing_sim/results_deleting_edges_30_N_meas_100/FigS7_1.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | null | null | null | analysis_collection/tracing_sim/results_deleting_edges_30_N_meas_100/FigS7_1.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | null | null | null | analysis_collection/tracing_sim/results_deleting_edges_30_N_meas_100/FigS7_1.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | 1 | 2021-07-12T13:50:35.000Z | 2021-07-12T13:50:35.000Z | import numpy as np
import matplotlib.pyplot as pl
import pickle
from epipack.plottools import plot
import qsuite_config as cf
import matplotlib.ticker as mtick
with open('_qsuite/results_deleting_edges_30_N_meas_100/results_mean_std.p','rb') as f:
data = pickle.load(f)
means = data['means']
stds = data['stds']
d... | 30.228814 | 119 | 0.590692 |
f7a0b02333a94ad401235719cc06ba613ef5b224 | 24,680 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 ... | 42.405498 | 133 | 0.651216 |
f7a0bfb718c466402d5cd687e2c52020ff30ed52 | 1,958 | py | Python | test/integration/ggrc/models/model_factory.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/models/model_factory.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | test/integration/ggrc/models/model_factory.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Factories for ggrc models.
These are factories for generating regular ggrc models. The factories create a
model and log a post event with the model revision. These do not however
trigger signals. For tes... | 29.223881 | 79 | 0.703779 |
f7a0c25b60428b6dafcbbafd831279ddde8cfbf2 | 23,095 | py | Python | ironic_inspector/test/test_introspect.py | NaohiroTamura/ironic-inspector | 7b7fba72de46806ce84d6d4758a2343b52b0c96d | [
"Apache-2.0"
] | null | null | null | ironic_inspector/test/test_introspect.py | NaohiroTamura/ironic-inspector | 7b7fba72de46806ce84d6d4758a2343b52b0c96d | [
"Apache-2.0"
] | null | null | null | ironic_inspector/test/test_introspect.py | NaohiroTamura/ironic-inspector | 7b7fba72de46806ce84d6d4758a2343b52b0c96d | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 44.413462 | 79 | 0.622342 |
f7a0ec8d07429c4c9b179c80aa403f8785cb56be | 6,099 | py | Python | connector/setup.py | nhattrinh/yang | 733009580723909e7ef5eecde304e2873907366b | [
"Apache-2.0"
] | null | null | null | connector/setup.py | nhattrinh/yang | 733009580723909e7ef5eecde304e2873907366b | [
"Apache-2.0"
] | null | null | null | connector/setup.py | nhattrinh/yang | 733009580723909e7ef5eecde304e2873907366b | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
"""Setup file for yang package
See:
https://packaging.python.org/en/latest/distributing.html
"""
import os
import re
import sys
import shlex
import unittest
import subprocess
from setuptools import setup, find_packages, Command
from setuptools.command.test import test
pkg_name = 'yang.con... | 28.236111 | 95 | 0.596163 |
f7a0f5c965b1f67843d5fdd3d4a15dc388241f8e | 1,773 | py | Python | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/pages/dropdown_page.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/pages/dropdown_page.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | 51 | 2021-04-08T11:39:59.000Z | 2021-05-07T12:01:27.000Z | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/pages/dropdown_page.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | """
@author: Anuj Kumar
@email: cdac.anuj@gmail.com
@date: 16-Apr-18
"""
import logging
from utility.services import Services
logging.basicConfig(format='%(asctime)s - %(levelname)s: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p',
level=logging.INFO)
from selenium.webdriver.support.select import Sel... | 32.833333 | 111 | 0.642978 |
f7a10540d579d5f05aac8f0fb2fc7c430f071f52 | 885 | py | Python | aea/protocols/generator/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | aea/protocols/generator/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | aea/protocols/generator/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2020 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 40.227273 | 80 | 0.59209 |
f7a10f4d7fde004cb181941646e89910c490b437 | 13 | py | Python | Problem sets/PS2/circuit/allo.py | overlord1109/mit-6.006-solutions | 85577adf672e5827294408180172d129afd9fdfd | [
"MIT"
] | null | null | null | Problem sets/PS2/circuit/allo.py | overlord1109/mit-6.006-solutions | 85577adf672e5827294408180172d129afd9fdfd | [
"MIT"
] | null | null | null | Problem sets/PS2/circuit/allo.py | overlord1109/mit-6.006-solutions | 85577adf672e5827294408180172d129afd9fdfd | [
"MIT"
] | null | null | null | print("allo") | 13 | 13 | 0.692308 |
f7a11a9517c7badfade19a18a9cb790436c395a2 | 3,279 | py | Python | common/testing.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | common/testing.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | common/testing.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''Common library with references to all the functions'''
__author__ = 'Mark Zwaving'
__email__ = 'markzwaving@gmail.com'
__copyright__ = 'Copyright (C) Mark Zwaving. All rights reserved.'
__license__ = 'MIT License'
__version__ = '0.0.1'
__maintainer__ = 'Mark Zwaving'
__s... | 39.987805 | 93 | 0.642269 |
f7a1231e5ca25cb855f87d50eb014c851eddf4e0 | 1,253 | py | Python | ML/Minor/code/common/generate_images_labels.py | SIgnlngX/Minor-Project | f000e16c67f8ce738af96556c161e9087d7bee0f | [
"MIT"
] | 4 | 2017-10-09T19:00:08.000Z | 2019-02-04T14:05:58.000Z | ML/Minor/code/common/generate_images_labels.py | SIgnlngX/Minor-Project | f000e16c67f8ce738af96556c161e9087d7bee0f | [
"MIT"
] | 6 | 2017-10-07T05:46:59.000Z | 2017-12-17T06:57:43.000Z | ML/Minor/code/common/generate_images_labels.py | SIgnlngX/sign-language-interpreter | f000e16c67f8ce738af96556c161e9087d7bee0f | [
"MIT"
] | 8 | 2017-10-06T11:21:07.000Z | 2021-05-02T18:40:41.000Z | #!/usr/bin/env python
from os import walk
from os.path import join, splitext
from ntpath import basename
def get_images_labels_list(images_dir_path):
"""
Recursively iterates through a directory and its subdirectories to list the info all the images found in it.
Returns a list of dictionary where each dic... | 36.852941 | 112 | 0.676776 |
f7a1243dab6024b750127b9e1967f6efc8e97aaa | 12,894 | py | Python | src/SALib/analyze/sobol.py | QianWanghhu/SALib | 95a3371e503f9253cb917b8f0101c0202b969c2b | [
"MIT"
] | 1 | 2019-12-20T00:32:45.000Z | 2019-12-20T00:32:45.000Z | src/SALib/analyze/sobol.py | QianWanghhu/SALib | 95a3371e503f9253cb917b8f0101c0202b969c2b | [
"MIT"
] | null | null | null | src/SALib/analyze/sobol.py | QianWanghhu/SALib | 95a3371e503f9253cb917b8f0101c0202b969c2b | [
"MIT"
] | null | null | null | from scipy.stats import norm
import numpy as np
import pandas as pd
from . import common_args
from ..util import (read_param_file, compute_groups_matrix, ResultDict,
extract_group_names, _check_groups)
from types import MethodType
from multiprocessing import Pool, cpu_count
from funct... | 34.021108 | 80 | 0.558632 |
f7a12b40e703c0a4bf2dc4f62a5a323ddfa9ab86 | 1,120 | py | Python | leetcode/medium/230-Kth_smallest_BST.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/230-Kth_smallest_BST.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/230-Kth_smallest_BST.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode 230
"""
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def kthSmallest(self, root: TreeNode, k: int) -> int:
if not root:
retu... | 20 | 57 | 0.557143 |
f7a13bce66ec273969c0e296ec582dfeb8b96323 | 27,695 | py | Python | helmnet/hybridnet.py | sio13/helmnet | 514a2035b4e043825d444496eda375b3d954f853 | [
"MIT"
] | null | null | null | helmnet/hybridnet.py | sio13/helmnet | 514a2035b4e043825d444496eda375b3d954f853 | [
"MIT"
] | null | null | null | helmnet/hybridnet.py | sio13/helmnet | 514a2035b4e043825d444496eda375b3d954f853 | [
"MIT"
] | null | null | null | from helmnet.source_module import SourceModule
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from torch.nn.functional import hardtanh
from random import choice
import pytorch_lightning as pl
from torchmetrics.regression import MeanAbsoluteError
import numpy as np
from helmnet.architectures ... | 36.682119 | 180 | 0.567575 |
f7a14a0e011e85abafa40bd6609f7d2f84560879 | 15,086 | py | Python | salt/pillar/git_pillar.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | salt/pillar/git_pillar.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | 1 | 2015-09-02T12:49:48.000Z | 2015-09-02T19:22:58.000Z | salt/pillar/git_pillar.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Use a git repository as a Pillar source
---------------------------------------
.. note::
This external pillar has been rewritten for the :doc:`2015.8.0
</topics/releases/2015.8.0>` release. The old method of configuring this
external pillar will be maintained for a couple relea... | 33.156044 | 79 | 0.630452 |
f7a14e19f6e8801f4ce2ee30f9976239ccb56dbb | 546 | py | Python | python/twisted/finger_plugin/finger/tap.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | python/twisted/finger_plugin/finger/tap.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | python/twisted/finger_plugin/finger/tap.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | # coding=utf8
from twisted.application import internet, service
from twisted.internet import interfaces
from twisted.python import usage
from finger import fingercore
class Options(usage.Options):
optParameters = [
['file', 'f', '/etc/users'],
['templates', 't', '/usr/share/finger/templates'],
... | 24.818182 | 58 | 0.631868 |
f7a1501397d9e0556998fbc6e28ae2caf0ca4e5b | 1,834 | py | Python | trac/upgrades/db30.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | null | null | null | trac/upgrades/db30.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | null | null | null | trac/upgrades/db30.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.com/license.html.
#
# This software consists of vo... | 37.428571 | 78 | 0.73337 |
f7a159d0bac324e5ce2f5a7882c361fd0727e887 | 11,173 | py | Python | flexget/plugins/input/discover.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/input/discover.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/input/discover.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import datetime
import logging
import random
from sqlalchemy import Column, Integer, DateTime, Unicode, Index
from flexget import options, plugin
from flexget.event import event
from flexget.plugin import get_plugin_by_name, PluginError, PluginWarning... | 42.003759 | 120 | 0.572272 |
f7a1b07029f2a63c7525d2ada22598b41877a9dc | 6,174 | py | Python | src/Application/PythonScriptModule/pymodules_old/localscene/sceneactions.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/localscene/sceneactions.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/localscene/sceneactions.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2021-09-04T12:37:34.000Z | 2021-09-04T12:37:34.000Z |
# Class handling other actions than scene uploading, which is done in sceneuploader.py
import rexviewer as r
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import urllib2
import sceneactionsxml
class SceneActions:
def __init__(self, cap_url, controller):
... | 34.685393 | 98 | 0.546323 |
f7a1b74455c1bdbcf41b7a5ef8581b3f36625e42 | 3,644 | py | Python | osmmodelconfig.py | leidix/images-to-osm | 5375d69c0f78aba9c153b0ada7ef7d6b8fb87b13 | [
"MIT"
] | 487 | 2017-12-21T09:23:42.000Z | 2022-03-27T09:10:12.000Z | osmmodelconfig.py | leidix/images-to-osm | 5375d69c0f78aba9c153b0ada7ef7d6b8fb87b13 | [
"MIT"
] | 23 | 2018-01-02T17:07:17.000Z | 2022-03-11T23:19:28.000Z | osmmodelconfig.py | leidix/images-to-osm | 5375d69c0f78aba9c153b0ada7ef7d6b8fb87b13 | [
"MIT"
] | 89 | 2018-01-02T17:59:56.000Z | 2021-12-10T09:00:50.000Z | import sys
sys.path.append("Mask_RCNN")
import os
import random
import math
import re
import time
import numpy as np
import cv2
import matplotlib
import random
import glob
import skimage
from config import Config
import imagestoosm.config as osmcfg
import utils
import model as modellib
import visualize
from model imp... | 30.621849 | 197 | 0.641054 |
f7a1d5479c1e9d93e5d44c0b8a236c61d66abd44 | 29,375 | py | Python | plugins/helpers/writer.py | tajatwal/mac_apt | 7d8d61933e3240af3def1422179eb3f48ecb84f1 | [
"MIT"
] | 1 | 2020-05-27T12:53:59.000Z | 2020-05-27T12:53:59.000Z | plugins/helpers/writer.py | tajatwal/mac_apt | 7d8d61933e3240af3def1422179eb3f48ecb84f1 | [
"MIT"
] | null | null | null | plugins/helpers/writer.py | tajatwal/mac_apt | 7d8d61933e3240af3def1422179eb3f48ecb84f1 | [
"MIT"
] | null | null | null | '''
Copyright (c) 2017 Yogesh Khatri
This file is part of mac_apt (macOS Artifact Parsing Tool).
Usage or distribution of this software/code is subject to the
terms of the MIT License.
'''
import binascii
import codecs
import collections
import logging
import os
import sqlite3
import sys
import xlsx... | 44.440242 | 224 | 0.589106 |
f7a1d6fbbfdca9f78dcd50cacb077aa663d3fa10 | 5,238 | py | Python | hallo/test/modules/math/test_simplify_fraction.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/test/modules/math/test_simplify_fraction.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/test/modules/math/test_simplify_fraction.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from hallo.events import EventMessage
def test_fraction_simple(hallo_getter):
test_hallo = hallo_getter({"math"})
test_hallo.function_dispatcher.dispatch(
EventMessage(test_hallo.test_server, None, test_hallo.test_user, "fraction 6/4")
)
data = test_hallo.test_server.get_send_data(1, test_hall... | 41.904 | 96 | 0.720122 |
f7a1e56a7f142758802203690f6e91d1db463a3d | 21,466 | py | Python | guillotina_elasticsearch/utility.py | plone/guillotina_elasticsearch | 539996e9f4f6c9312503bd55613ff8b052a49657 | [
"BSD-2-Clause"
] | 4 | 2019-04-27T14:40:24.000Z | 2021-03-02T18:10:07.000Z | guillotina_elasticsearch/utility.py | plone/guillotina_elasticsearch | 539996e9f4f6c9312503bd55613ff8b052a49657 | [
"BSD-2-Clause"
] | 21 | 2019-04-05T19:20:44.000Z | 2021-07-14T17:07:30.000Z | guillotina_elasticsearch/utility.py | plone/guillotina_elasticsearch | 539996e9f4f6c9312503bd55613ff8b052a49657 | [
"BSD-2-Clause"
] | 2 | 2019-04-04T08:36:50.000Z | 2021-03-26T19:59:29.000Z | # -*- coding: utf-8 -*-
from elasticsearch import AsyncElasticsearch
from guillotina import app_settings
from guillotina import configure
from guillotina.catalog.catalog import DefaultSearchUtility
from guillotina.component import get_adapter
from guillotina.component import get_utility
from guillotina.event import not... | 36.631399 | 95 | 0.607472 |
f7a1e8b28f752a522fa41feaadf859033d7c278d | 1,409 | py | Python | chris_cunningham/day11.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | chris_cunningham/day11.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | chris_cunningham/day11.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | from typing import Iterable
EMPTY = "L"
FLOOR = "."
OCCUPIED = "#"
DIRECTIONS = [(-1-1j), (-1+0j), (-1+1j), -1j, 1j, (1-1j), (1+0j), (1+1j)]
with open("inputs/day11.txt", 'r') as f:
input_grid = {x + y*1j: s for y, line in enumerate(f.read().splitlines()) for x, s in enumerate(line)}
def get_adjacent(coord:... | 30.630435 | 134 | 0.550035 |
f7a1e9761dea1eb886a52e0cb1586ad8e2cb39de | 8,759 | py | Python | python_modules/dagster-graphql/dagster_graphql/schema/partition_sets.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql/schema/partition_sets.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql/schema/partition_sets.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import graphene
from dagster_graphql.implementation.fetch_partition_sets import (
get_partition_by_name,
get_partition_config,
get_partition_set_partition_statuses,
get_partition_tags,
get_partitions,
)
from dagster_graphql.implementation.fetch_runs import get_runs
from dagster import check
from da... | 33.304183 | 99 | 0.723256 |
f7a217de944b2513992ce36b6143cfd81a0a4f51 | 16,871 | py | Python | comics/models.py | mwschall/dcdb | 0c650b9bfd877ffaf8023b8207ad6a54411c7bc5 | [
"0BSD"
] | 1 | 2017-06-15T23:27:14.000Z | 2017-06-15T23:27:14.000Z | comics/models.py | mwschall/dcdb | 0c650b9bfd877ffaf8023b8207ad6a54411c7bc5 | [
"0BSD"
] | null | null | null | comics/models.py | mwschall/dcdb | 0c650b9bfd877ffaf8023b8207ad6a54411c7bc5 | [
"0BSD"
] | null | null | null | import re
from io import BytesIO
from itertools import chain
from pathlib import Path
import shortuuid
from PIL import Image
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.db import models
from django.db.models import Q, OuterRef
from django.db.models.signals import pre_save
from django.di... | 27.932119 | 96 | 0.591488 |
f7a2456169ebfd40ad424d8ca3ed2811f2ff0fd1 | 1,426 | py | Python | code/preprocessing/stemmer.py | jlinkemeyer/MLinPractice | ef96888ef0565b84fece4283fe8dd8dc809c5e99 | [
"MIT"
] | 1 | 2021-10-04T11:49:51.000Z | 2021-10-04T11:49:51.000Z | code/preprocessing/stemmer.py | jlinkemeyer/MLinPractice | ef96888ef0565b84fece4283fe8dd8dc809c5e99 | [
"MIT"
] | null | null | null | code/preprocessing/stemmer.py | jlinkemeyer/MLinPractice | ef96888ef0565b84fece4283fe8dd8dc809c5e99 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Create the word stems of the individual words of the tweet.
Created on Wed Oct 6 16:32:45 2021
@author: laura
"""
from code.preprocessing.preprocessor import Preprocessor
from code.util import TOKEN_DELIMITER
from nltk.stem import PorterStemmer
class Stemmer(Prepr... | 32.409091 | 94 | 0.608696 |
f7a267bea19fb7a01bddbdaccf38d1fedec7080a | 662 | py | Python | swarm_ws/src/cmake-build-debug/swarm_robot/cmake/swarm_robot-genmsg-context.py | Wei-Fan/SJTU-swarm | 95b93fa020a5168f150c6430cbc25884e03c22db | [
"MIT"
] | 2 | 2019-03-23T03:03:13.000Z | 2019-10-07T08:21:46.000Z | swarm_ws/src/cmake-build-debug/swarm_robot/cmake/swarm_robot-genmsg-context.py | Wei-Fan/SJTU-swarm | 95b93fa020a5168f150c6430cbc25884e03c22db | [
"MIT"
] | null | null | null | swarm_ws/src/cmake-build-debug/swarm_robot/cmake/swarm_robot-genmsg-context.py | Wei-Fan/SJTU-swarm | 95b93fa020a5168f150c6430cbc25884e03c22db | [
"MIT"
] | null | null | null | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/wade/SJTU-swarm/swarm_ws/src/swarm_robot/msg/pos_info.msg"
services_str = ""
pkg_name = "swarm_robot"
dependencies_str = "geometry_msgs;std_msgs"
langs = "gencpp;geneus;genlisp;gennodejs;genpy"
dep_include_paths_str = "swarm_robot;/home/wade/SJT... | 55.166667 | 206 | 0.787009 |
f7a28f4a8b7250a7886daad6ed865f476d332ab6 | 668 | py | Python | 2019/8/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | 2 | 2020-12-04T09:45:38.000Z | 2020-12-07T14:06:12.000Z | 2019/8/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | 2019/8/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | width = 25
height = 6
img_len = width * height
with open("input.txt") as input_file:
strings = [c.strip() for c in input_file.readlines()[0]]
digits = [int(c) for c in strings if c != ""]
n_layers = len(digits) / img_len
layers = [digits[x:x+img_len] for x in range(0, len(digits), img_len)]
min_zeros = None... | 27.833333 | 70 | 0.678144 |
f7a29c43c9119c25e8c26611a4b789e7ca694747 | 1,845 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines_unittest.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines_unittest.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines_unittest.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer
from webkitpy.layout_tests.controllers.test_result_writer import TestResultWriter
fr... | 42.906977 | 123 | 0.685637 |
f7a29edec538dad5bc002d55c0a0900f107b364d | 2,538 | py | Python | heat/tests/functional/test_WordPress_With_LB.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | 1 | 2020-08-15T14:29:15.000Z | 2020-08-15T14:29:15.000Z | heat/tests/functional/test_WordPress_With_LB.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | heat/tests/functional/test_WordPress_With_LB.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 applicabl... | 36.782609 | 78 | 0.667061 |
f7a2a4100e1eb90558494d73365c12747a1ab8c3 | 2,443 | py | Python | ice_validator/tests/utils/nested_dict.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2018-08-29T19:33:22.000Z | 2018-08-29T19:33:22.000Z | ice_validator/tests/utils/nested_dict.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | ice_validator/tests/utils/nested_dict.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2019-07-23T15:47:43.000Z | 2021-07-02T15:04:19.000Z | # -*- coding: utf8 -*-
# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ===========================================... | 36.462687 | 79 | 0.632828 |
f7a2a9f072c5e011c52d53c3528db875b431b518 | 7,212 | py | Python | Parser-hybrid/nparser/misc/mst.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 12 | 2020-03-04T17:36:12.000Z | 2021-09-26T14:02:49.000Z | Parser-hybrid/nparser/misc/mst.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 1 | 2020-12-09T08:21:11.000Z | 2020-12-09T08:21:11.000Z | Parser-hybrid/nparser/misc/mst.py | sb-b/BOUN-PARSE | 2b529924897d8e2613c4d2193a67796a895da40b | [
"Apache-2.0"
] | 3 | 2020-11-18T09:53:42.000Z | 2020-12-17T23:04:59.000Z | # !/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
import numpy as np
#***************************************************************
#===============================================================
def find_cycles(edges):
""" """
vertices = np.arange(len(edges))
indices = np.zeros_like(vertice... | 33.544186 | 116 | 0.580283 |
f7a2ae5f06d9c234babdb433849545194571c940 | 717 | py | Python | catkin_ws/build/beginner_tutorials/cmake/beginner_tutorials-genmsg-context.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | 1 | 2021-09-19T07:51:23.000Z | 2021-09-19T07:51:23.000Z | catkin_ws/build/beginner_tutorials/cmake/beginner_tutorials-genmsg-context.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | catkin_ws/build/beginner_tutorials/cmake/beginner_tutorials-genmsg-context.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/yildiz/GitRepos/ROS_Samples/catkin_ws/src/beginner_tutorials/msg/Num.msg"
services_str = "/home/yildiz/GitRepos/ROS_Samples/catkin_ws/src/beginner_tutorials/srv/AddTwoInts.srv"
pkg_name = "beginner_tutorials"
dependencies_str = "std_msgs"
langs ... | 59.75 | 168 | 0.807531 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.