hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
50cc25774ad7c70f901cc5d533d155db49ae90d8 | 4,590 | py | Python | accelbyte_py_sdk/api/lobby/models/models_profanity_filter.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/lobby/models/models_profanity_filter.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/lobby/models/models_profanity_filter.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | # Auto-generated at 2021-09-27T17:12:33.496089+08:00
# from: Justice Lobby Service (1.33.0)
# Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
# pylint: disable=duplicate-code
# pylin... | 31.875 | 109 | 0.580392 |
32ce052a3bc7516bd159f910902f2c10a17cf901 | 13,858 | py | Python | taskflow/engines/action_engine/runtime.py | mail2nsrajesh/taskflow | 306087839cdb616f6fde94d8748acd01e64d1a3c | [
"Apache-2.0"
] | null | null | null | taskflow/engines/action_engine/runtime.py | mail2nsrajesh/taskflow | 306087839cdb616f6fde94d8748acd01e64d1a3c | [
"Apache-2.0"
] | 1 | 2018-10-19T18:58:38.000Z | 2018-10-19T18:58:38.000Z | taskflow/engines/action_engine/runtime.py | jimbobhickville/taskflow | 6ea991ce94f5be46b7e4726b4c4f014e10407786 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Yahoo! 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... | 42.121581 | 79 | 0.634002 |
0cc31fd65e25fb78c6cd247c545d6a4cf3178582 | 782 | py | Python | cohesity_management_sdk/models/object_class_added_active_directory_principal_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 1 | 2019-11-07T23:19:32.000Z | 2019-11-07T23:19:32.000Z | cohesity_management_sdk/models/object_class_added_active_directory_principal_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | cohesity_management_sdk/models/object_class_added_active_directory_principal_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class ObjectClassAddedActiveDirectoryPrincipalEnum(object):
"""Implementation of the 'ObjectClass_AddedActiveDirectoryPrincipal' enum.
Specifies the type of the referenced Active Directory principal.
If 'kGroup', the referenced Active Directory princ... | 27.928571 | 78 | 0.704604 |
bd1aed3e21a7354d1e6d0e20be5c345e504e2636 | 638 | py | Python | 01-algorithm-design-and-techniques/4_divide_and_conquer/sorting.py | hamidgasmi/training.computerscience.algorithms-datastructures | bd156dd2e9ed5681d9f1e4a23f71a92d68d0db43 | [
"MIT"
] | 8 | 2020-11-15T13:55:27.000Z | 2022-03-15T00:30:10.000Z | 01-algorithm-design-and-techniques/4_divide_and_conquer/sorting.py | hamidgasmi/training.computerscience.algorithms-datastructures | bd156dd2e9ed5681d9f1e4a23f71a92d68d0db43 | [
"MIT"
] | 217 | 2020-02-28T03:09:05.000Z | 2020-10-29T13:19:12.000Z | 01-algorithm-design-and-techniques/4_divide_and_conquer/sorting.py | hamidgasmi/training.computerscience.algorithms-datastructures | bd156dd2e9ed5681d9f1e4a23f71a92d68d0db43 | [
"MIT"
] | 3 | 2021-07-04T06:42:14.000Z | 2021-11-20T17:56:48.000Z | import sys
import random
def partition2(a, l, r):
x = a[l]
j = l
for i in range(l + 1, r + 1):
if a[i] <= x:
j += 1
a[i], a[j] = a[j], a[i]
a[l], a[j] = a[j], a[l]
return j
def randomized_quick_sort(a, l, r):
if l >= r:
return
k = random.randint(l, ... | 20.580645 | 41 | 0.485893 |
31af299fc92936ff339b680f2b2c07c1715f53a5 | 11,147 | py | Python | wagtail/wagtailcore/south_migrations/0001_initial.py | willcodefortea/wagtail | 2723b85ed8f356bde89d9541105b8cea4812d6a1 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailcore/south_migrations/0001_initial.py | willcodefortea/wagtail | 2723b85ed8f356bde89d9541105b8cea4812d6a1 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailcore/south_migrations/0001_initial.py | willcodefortea/wagtail | 2723b85ed8f356bde89d9541105b8cea4812d6a1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
class Migration(SchemaMigration):
... | 70.106918 | 193 | 0.60366 |
d06a5181661f5f73feeb7820ddebac2f55560f7e | 3,491 | py | Python | src/models/markov_chain.py | dballesteros7/master-thesis-2015 | 8c0bf9a6eef172fc8167a30780ae0666f8ea2d88 | [
"MIT"
] | null | null | null | src/models/markov_chain.py | dballesteros7/master-thesis-2015 | 8c0bf9a6eef172fc8167a30780ae0666f8ea2d88 | [
"MIT"
] | null | null | null | src/models/markov_chain.py | dballesteros7/master-thesis-2015 | 8c0bf9a6eef172fc8167a30780ae0666f8ea2d88 | [
"MIT"
] | null | null | null | import itertools
import numpy as np
import constants
from utils import file
class MarkovChain:
def __init__(self, n_items: int, pseudo_count: int = 1,
use_rejection: bool = True):
self.n_items = n_items
self.counts = np.empty(n_items)
self.first_order_counts = np.empty((n... | 42.573171 | 80 | 0.593813 |
35ea3f9ea341c6518130c325a5265217fc73e6c6 | 1,645 | py | Python | juq/serializer/builder.py | inhzus/juq | 2721f1361eed3d4e7da36d67f924942faef24650 | [
"MIT"
] | 14 | 2019-04-09T23:34:56.000Z | 2022-01-17T14:19:51.000Z | juq/serializer/builder.py | inhzus/juq | 2721f1361eed3d4e7da36d67f924942faef24650 | [
"MIT"
] | null | null | null | juq/serializer/builder.py | inhzus/juq | 2721f1361eed3d4e7da36d67f924942faef24650 | [
"MIT"
] | 4 | 2020-03-29T15:29:59.000Z | 2022-01-17T14:19:44.000Z | # -*- coding: utf-8 -*-
# created by inhzus
import dataclasses
from juq.serializer import *
class SerializerBuilder:
STR_CLASS_MAP = {
'v2.book': RepoSerializer,
'v2.book_toc': RepoTocSerializer,
'v2.book_detail': RepoDetailSerializer,
'v2.doc': DocSerializer,
'v2.doc_det... | 33.571429 | 84 | 0.617629 |
5d8a318502396a8a6a524aa0f2c6a79a05fc153d | 6,961 | py | Python | models.py | vietnamican/Deep-Image-Matting-PyTorch | 3e5cbd5c1038e2bc864010b647522024a5ae4c8b | [
"MIT"
] | 1 | 2021-02-12T13:19:45.000Z | 2021-02-12T13:19:45.000Z | models.py | vietnamican/Deep-Image-Matting-PyTorch | 3e5cbd5c1038e2bc864010b647522024a5ae4c8b | [
"MIT"
] | null | null | null | models.py | vietnamican/Deep-Image-Matting-PyTorch | 3e5cbd5c1038e2bc864010b647522024a5ae4c8b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torchsummaryX import summary
from config import device, im_size
class conv2DBatchNormRelu(nn.Module):
def __init__(
self,
in_channels,
n_filters,
k_size,
stride,
padding,
bias=True,
... | 35.156566 | 110 | 0.591438 |
3c9e481eb32beede327227e8cfd4c2cb73a054d5 | 107 | py | Python | paranormal-pioneers/project/langs/forth/__init__.py | python-discord/code-jam-6 | a7eb3b1256ae113c93f0337892c667768e8bc199 | [
"MIT"
] | 76 | 2020-01-17T12:09:48.000Z | 2022-03-26T19:17:26.000Z | paranormal-pioneers/project/langs/forth/__init__.py | Hypertyz/code-jam-6 | a7eb3b1256ae113c93f0337892c667768e8bc199 | [
"MIT"
] | 17 | 2020-01-21T23:13:34.000Z | 2020-02-07T00:07:04.000Z | paranormal-pioneers/project/langs/forth/__init__.py | Hypertyz/code-jam-6 | a7eb3b1256ae113c93f0337892c667768e8bc199 | [
"MIT"
] | 91 | 2020-01-17T12:01:06.000Z | 2022-03-22T20:38:59.000Z | from project.langs.forth.forthimpl import create_forth, forth_compile, launch_repl
forth = create_forth()
| 26.75 | 82 | 0.831776 |
21f772022c4ddc7c10002db5adb9737e170442ba | 6,029 | py | Python | .history/src/Simulador_20200708133514.py | eduardodut/Trabalho_final_estatistica_cd | fbedbbea6bdd7a79e1d62030cde0fab4e93fc338 | [
"MIT"
] | null | null | null | .history/src/Simulador_20200708133514.py | eduardodut/Trabalho_final_estatistica_cd | fbedbbea6bdd7a79e1d62030cde0fab4e93fc338 | [
"MIT"
] | null | null | null | .history/src/Simulador_20200708133514.py | eduardodut/Trabalho_final_estatistica_cd | fbedbbea6bdd7a79e1d62030cde0fab4e93fc338 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from Matriz_esferica import Matriz_esferica
from Individuo import Individuo, Fabrica_individuo
import random
from itertools import permutations
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
class Simulador():
def __init__(
self,
... | 39.927152 | 134 | 0.663958 |
31d74902903d8bc61abdb777c98ea4416f0edd60 | 8,117 | py | Python | tensorflow/contrib/distribute/python/strategy_test_lib.py | Little-kangaroo/tensorflow | 8dd83e34a00d051bb444b0474096d4f468a13663 | [
"Apache-2.0"
] | 1 | 2019-09-15T09:42:06.000Z | 2019-09-15T09:42:06.000Z | tensorflow/contrib/distribute/python/strategy_test_lib.py | Little-kangaroo/tensorflow | 8dd83e34a00d051bb444b0474096d4f468a13663 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/distribute/python/strategy_test_lib.py | Little-kangaroo/tensorflow | 8dd83e34a00d051bb444b0474096d4f468a13663 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.929907 | 80 | 0.6957 |
e61eb819a6972dc05b4417e2c62e91fe48b9220a | 1,141 | py | Python | erp/management/commands/import_centres_vaccination.py | Foohx/acceslibre | 55135e096f2ec4e413ff991f01c17f5e0d5925c0 | [
"MIT"
] | null | null | null | erp/management/commands/import_centres_vaccination.py | Foohx/acceslibre | 55135e096f2ec4e413ff991f01c17f5e0d5925c0 | [
"MIT"
] | null | null | null | erp/management/commands/import_centres_vaccination.py | Foohx/acceslibre | 55135e096f2ec4e413ff991f01c17f5e0d5925c0 | [
"MIT"
] | null | null | null | import sys
from django.core.management.base import BaseCommand
from erp.jobs.import_centres_vaccination import ImportVaccinationsCenters
def fatal(msg):
print(msg)
sys.exit(1)
class Command(BaseCommand):
help = "Importe les centres de vaccination COVID"
def add_arguments(self, parser):
par... | 27.166667 | 73 | 0.583699 |
160bf7f5d19b6e05d504df90bca7be9ea7214f03 | 2,489 | py | Python | examples/spiral.py | miskcoo/kscore | 80aef7e2cab26c81392e2526437247e2a8c295e4 | [
"MIT"
] | 35 | 2020-05-21T16:55:32.000Z | 2022-03-25T02:54:11.000Z | examples/spiral.py | miskcoo/kscore | 80aef7e2cab26c81392e2526437247e2a8c295e4 | [
"MIT"
] | null | null | null | examples/spiral.py | miskcoo/kscore | 80aef7e2cab26c81392e2526437247e2a8c295e4 | [
"MIT"
] | 2 | 2021-06-14T21:32:57.000Z | 2021-06-29T18:29:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import seaborn as sns
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
import argparse
import sys
import kscore
from .utils import *
de... | 30.728395 | 82 | 0.682603 |
141914062467d4e7e29d5c548df2f0e66d757e0e | 3,145 | py | Python | openmdao/test_suite/test_examples/basic_opt_paraboloid.py | hwangjt/blue | 609defbe476c86a4a2eddd12977b47e649ea7f50 | [
"Apache-2.0"
] | null | null | null | openmdao/test_suite/test_examples/basic_opt_paraboloid.py | hwangjt/blue | 609defbe476c86a4a2eddd12977b47e649ea7f50 | [
"Apache-2.0"
] | null | null | null | openmdao/test_suite/test_examples/basic_opt_paraboloid.py | hwangjt/blue | 609defbe476c86a4a2eddd12977b47e649ea7f50 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function, division, absolute_import
import unittest
from openmdao.devtools.testutil import assert_rel_error
from openmdao.api import Problem, ScipyOptimizer, ExecComp, IndepVarComp
from openmdao.test_suite.components.paraboloid import Paraboloid
class BasicOptParaboloid(unittest.TestCa... | 33.457447 | 80 | 0.652782 |
6556182cd762cff3d6af86ccd335d67cf4438847 | 1,821 | py | Python | controller/_observer.py | adc21/snap-controller | e1c6131859d6ec602e5c8521de41e6e4c9608554 | [
"MIT"
] | 2 | 2021-04-21T15:22:23.000Z | 2021-05-12T01:45:43.000Z | controller/_observer.py | adc21/snap-controller | e1c6131859d6ec602e5c8521de41e6e4c9608554 | [
"MIT"
] | null | null | null | controller/_observer.py | adc21/snap-controller | e1c6131859d6ec602e5c8521de41e6e4c9608554 | [
"MIT"
] | null | null | null | import os
import time
from typing import Callable, List
from watchdog.events import FileSystemEventHandler, FileSystemEvent
from watchdog.observers import Observer
from .logger import logger
from .utils import get_dir_regex
from .types import SnapDirPrefixType
class FileEventHandler(FileSystemEventHandler):
def __... | 29.370968 | 104 | 0.695222 |
337ddae236738829f14eed3418d4a12fdf54477f | 194 | py | Python | Small Projects/Math/add.py | Sudo2td/Andromeda | aa34dea5ba99b510cb0645c835c4fce7f0407b80 | [
"MIT"
] | null | null | null | Small Projects/Math/add.py | Sudo2td/Andromeda | aa34dea5ba99b510cb0645c835c4fce7f0407b80 | [
"MIT"
] | null | null | null | Small Projects/Math/add.py | Sudo2td/Andromeda | aa34dea5ba99b510cb0645c835c4fce7f0407b80 | [
"MIT"
] | null | null | null | print("Add Numbers")
first_number = input("Enter First Number: ")
second_number = input("Enter Second Number: ")
print(float(first_number) + float(second_number))
input("Press Enter to Exit: ") | 32.333333 | 49 | 0.742268 |
72fe6c3a60af8d84132dbb43b76266a0ca6b27e8 | 7,173 | py | Python | modules/anidb.py | maciejzgadzaj/Plex-Meta-Manager | f25a13982d350d09ef18ec55dc93487676f5651a | [
"MIT"
] | null | null | null | modules/anidb.py | maciejzgadzaj/Plex-Meta-Manager | f25a13982d350d09ef18ec55dc93487676f5651a | [
"MIT"
] | null | null | null | modules/anidb.py | maciejzgadzaj/Plex-Meta-Manager | f25a13982d350d09ef18ec55dc93487676f5651a | [
"MIT"
] | null | null | null | import logging, requests
from lxml import html
from modules import util
from modules.util import Failed
from retrying import retry
logger = logging.getLogger("Plex Meta Manager")
class AniDBAPI:
def __init__(self, Cache=None, TMDb=None, Trakt=None):
self.Cache = Cache
self.TMDb = TMDb
self... | 56.480315 | 192 | 0.549003 |
92becfca505c22e7e22accda031a221e087d6d34 | 1,551 | py | Python | lib/python2.7/site-packages/numpy/distutils/__config__.py | vishwabasak41/praicopy2 | 45fca251608d1621e75bfcc963bf5ff29d695336 | [
"MIT"
] | 7 | 2017-10-26T00:23:17.000Z | 2021-01-21T06:27:46.000Z | lib/python2.7/site-packages/numpy/distutils/__config__.py | vishwabasak41/praicopy2 | 45fca251608d1621e75bfcc963bf5ff29d695336 | [
"MIT"
] | 12 | 2017-05-23T22:54:50.000Z | 2019-07-31T17:26:17.000Z | lib/python2.7/site-packages/numpy/distutils/__config__.py | vishwabasak41/praicopy2 | 45fca251608d1621e75bfcc963bf5ff29d695336 | [
"MIT"
] | 5 | 2017-05-23T00:44:10.000Z | 2019-10-23T14:57:35.000Z | # This file is generated by numpy's setup.py
# It contains system_info results at the time of building this package.
__all__ = ["get_info","show"]
import os
import sys
extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
if sys.platform == 'win32' and os.path.isdir(extra_dll_dir):
os.environ.setdefau... | 43.083333 | 154 | 0.607995 |
b07482791437554a019a5180bdcd3d417d94e483 | 103,021 | py | Python | src/sqlfluff/dialects/dialect_exasol.py | quannh-uet/sqlfluff | 982aef19ab537e256ddc7e6fb2ac095e30959e4b | [
"MIT"
] | 1 | 2021-12-23T06:39:14.000Z | 2021-12-23T06:39:14.000Z | src/sqlfluff/dialects/dialect_exasol.py | quannh-uet/sqlfluff | 982aef19ab537e256ddc7e6fb2ac095e30959e4b | [
"MIT"
] | 1 | 2021-09-15T18:20:39.000Z | 2021-09-15T18:20:39.000Z | src/sqlfluff/dialects/dialect_exasol.py | tunetheweb/sqlfluff | 9504fc28af3142f3e4915b0adf5e31746df06e43 | [
"MIT"
] | null | null | null | """The EXASOL dialect.
https://docs.exasol.com
https://docs.exasol.com/sql_references/sqlstandardcompliance.htm
"""
from sqlfluff.core.parser import (
AnyNumberOf,
Anything,
BaseSegment,
Bracketed,
OptionallyBracketed,
BaseFileSegment,
Dedent,
Delimited,
GreedyUntil,
Indent,
... | 27.545722 | 107 | 0.544549 |
95bb8eddb28a6ef920ed62f599ee10b3e6c61265 | 8,690 | py | Python | tests/forms_tests/widget_tests/test_checkboxselectmultiple.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/forms_tests/widget_tests/test_checkboxselectmultiple.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/forms_tests/widget_tests/test_checkboxselectmultiple.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | import datetime
from django import forms
from django.forms import CheckboxSelectMultiple
from django.test import override_settings
from .base import WidgetTest
class CheckboxSelectMultipleTest(WidgetTest):
widget = CheckboxSelectMultiple
def test_render_value(self):
self.check_html(
sel... | 35.761317 | 115 | 0.523936 |
426badcb4265d9e2dc3c669461097767254c2c46 | 1,474 | py | Python | elasticsearch.py | MingChen91/monitoring-scripts | acfe4bb74b90eef4112dbde9527db4cce90936be | [
"MIT"
] | null | null | null | elasticsearch.py | MingChen91/monitoring-scripts | acfe4bb74b90eef4112dbde9527db4cce90936be | [
"MIT"
] | null | null | null | elasticsearch.py | MingChen91/monitoring-scripts | acfe4bb74b90eef4112dbde9527db4cce90936be | [
"MIT"
] | null | null | null | import json
import subprocess
from collections import OrderedDict
from urllib import parse
import requests
class ElasticSearch:
def __init__(self, env: str):
"""
Connects to elastic search.
Args:
env (str): environment to connect to, dev, staging, prod
"""
sel... | 31.361702 | 130 | 0.643148 |
db3d070f287dcdcdf73733ba98058f8d08b8734f | 15,829 | py | Python | idiom/__init__.py | thorwhalen/idiom | 86789d3ec6061dcebc27273a116b914c0a900998 | [
"MIT"
] | 1 | 2022-01-19T13:15:23.000Z | 2022-01-19T13:15:23.000Z | idiom/__init__.py | thorwhalen/idiom | 86789d3ec6061dcebc27273a116b914c0a900998 | [
"MIT"
] | null | null | null | idiom/__init__.py | thorwhalen/idiom | 86789d3ec6061dcebc27273a116b914c0a900998 | [
"MIT"
] | null | null | null | """
Access to wordvec data and useful functions that use it.
"""
from functools import cached_property, partial, lru_cache
import re
from typing import Mapping, Any, Callable, Union, Iterable, Optional
from importlib_resources import files as package_files
from dataclasses import dataclass, field
from itertools import ... | 30.79572 | 119 | 0.660118 |
736f992e46d46718781517fc7d240e27e520ce3d | 11,134 | py | Python | fanficdownloader/adapters/adapter_onedirectionfanfictioncom.py | rodrigonz/rodrigodeoliveiracosta-clone | 5fb6d2a167e24199f8080ba78392821659575685 | [
"Apache-2.0"
] | null | null | null | fanficdownloader/adapters/adapter_onedirectionfanfictioncom.py | rodrigonz/rodrigodeoliveiracosta-clone | 5fb6d2a167e24199f8080ba78392821659575685 | [
"Apache-2.0"
] | null | null | null | fanficdownloader/adapters/adapter_onedirectionfanfictioncom.py | rodrigonz/rodrigodeoliveiracosta-clone | 5fb6d2a167e24199f8080ba78392821659575685 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2012 Fanficdownloader team
#
# 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 require... | 41.544776 | 162 | 0.567451 |
0e8e2f62ad1eee63c82df8f5cbc9a516f2de689f | 369 | py | Python | code/LTI/Basics/sum_series.py | chipmuenk/acoustics | c85ac95a10c09d7fa15d63b2bdb24acab89fec60 | [
"MIT"
] | null | null | null | code/LTI/Basics/sum_series.py | chipmuenk/acoustics | c85ac95a10c09d7fa15d63b2bdb24acab89fec60 | [
"MIT"
] | null | null | null | code/LTI/Basics/sum_series.py | chipmuenk/acoustics | c85ac95a10c09d7fa15d63b2bdb24acab89fec60 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Berechne endliche geometrische Reihe für a = 0.5 und N = 10
Drucke Ergebnisse mit Formatierung
Author: Christian Muenker
"""
summe = 0
for i in range(0,10):
summe += 0.5**i
# alte Syntax
print('i = %2d, Teilsumme: %f' %(i, summe))
# Python 3 Syntax
print('i = {0:2d}, ... | 20.5 | 59 | 0.609756 |
daffd2440350b91ff68f9650e8e347e5fb4a70d4 | 885 | py | Python | app/analyzers/informants/sma.py | ferreiramarcelo/telegram-crypto-signals | 321d9305de5b98cc1c70bec293cafd0ce7432db3 | [
"MIT"
] | 1,857 | 2020-09-03T16:15:27.000Z | 2022-03-31T23:08:43.000Z | app/analyzers/informants/sma.py | ExBotTrader/Crypto-Signal | 7c6871baa5023e0e4cc14f4cd5ae10ac5592698d | [
"MIT"
] | 154 | 2018-02-26T12:37:57.000Z | 2020-08-26T13:06:08.000Z | app/analyzers/informants/sma.py | ExBotTrader/Crypto-Signal | 7c6871baa5023e0e4cc14f4cd5ae10ac5592698d | [
"MIT"
] | 535 | 2020-09-04T22:49:14.000Z | 2022-03-27T16:52:07.000Z | """ SMA Indicator
"""
import math
import pandas
from talib import abstract
from analyzers.utils import IndicatorUtils
class SMA(IndicatorUtils):
def analyze(self, historical_data, period_count=15):
"""Performs a SMA analysis on the historical data
Args:
historical_data (list): A ma... | 28.548387 | 99 | 0.674576 |
24cde37eb1ae79fbf681c48181203b5742565388 | 5,709 | py | Python | paddlers/models/ppseg/models/losses/detail_aggregate_loss.py | huilin16/PaddleRS | ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a | [
"Apache-2.0"
] | 40 | 2022-02-28T02:07:28.000Z | 2022-03-31T09:54:29.000Z | paddlers/models/ppseg/models/losses/detail_aggregate_loss.py | huilin16/PaddleRS | ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a | [
"Apache-2.0"
] | 5 | 2022-03-15T12:13:33.000Z | 2022-03-31T15:54:08.000Z | paddlers/models/ppseg/models/losses/detail_aggregate_loss.py | huilin16/PaddleRS | ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a | [
"Apache-2.0"
] | 20 | 2022-02-28T02:07:31.000Z | 2022-03-31T11:40:40.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
#
# 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... | 39.10274 | 90 | 0.622876 |
f23a20395d9ed00d6ccb79d44268967facb21461 | 2,512 | py | Python | backend/stock/migrations/0001_initial.py | fengxia41103/stock | 1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1 | [
"MIT"
] | 1 | 2021-09-30T05:25:08.000Z | 2021-09-30T05:25:08.000Z | backend/stock/migrations/0001_initial.py | fengxia41103/stock | 1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1 | [
"MIT"
] | 8 | 2021-09-30T05:27:09.000Z | 2021-12-03T23:02:24.000Z | backend/stock/migrations/0001_initial.py | fengxia41103/stock | 1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1 | [
"MIT"
] | 3 | 2021-09-29T05:11:45.000Z | 2021-10-31T07:26:31.000Z | # Generated by Django 3.1.6 on 2021-02-09 00:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='MyStock',
fields=[
... | 41.866667 | 133 | 0.552946 |
e8b34896d5acdd076d4c1539ce60945d5dc8c319 | 1,009 | py | Python | test/programytest/storage/stores/sql/store/test_gender.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 5 | 2018-08-21T00:13:45.000Z | 2018-09-01T20:00:55.000Z | test/programytest/storage/stores/sql/store/test_gender.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 1 | 2018-09-12T18:30:17.000Z | 2018-09-12T18:30:17.000Z | test/programytest/storage/stores/sql/store/test_gender.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 5 | 2018-08-21T00:08:36.000Z | 2018-09-23T06:11:04.000Z | import unittest
from programytest.storage.asserts.store.assert_genders import GenderStoreAsserts
from programy.storage.stores.sql.store.lookups import SQLGenderStore
from programy.storage.stores.sql.engine import SQLStorageEngine
from programy.storage.stores.sql.config import SQLStorageConfiguration
import programyt... | 33.633333 | 80 | 0.765114 |
1faf75489c955330b8ef37634bf5dea45a13a46c | 66 | py | Python | tests/list_subscr.py | lazyxu/pythonvm | 8c25acc6ee1e01a0bb65bb35aae987264d6876aa | [
"MIT"
] | null | null | null | tests/list_subscr.py | lazyxu/pythonvm | 8c25acc6ee1e01a0bb65bb35aae987264d6876aa | [
"MIT"
] | null | null | null | tests/list_subscr.py | lazyxu/pythonvm | 8c25acc6ee1e01a0bb65bb35aae987264d6876aa | [
"MIT"
] | null | null | null | lst = ["hello", "world"]
print lst[0]
str = "hello"
print str[0] | 11 | 24 | 0.590909 |
b73a56069b2aac029ad8c40efe2c16e9561bb469 | 2,623 | py | Python | datalad_neuroimaging/extractors/tests/test_nidm.py | bpoldrack/datalad-medicalimaging | 2afd1314a4eef87015f1507094aead5c502724d7 | [
"MIT"
] | null | null | null | datalad_neuroimaging/extractors/tests/test_nidm.py | bpoldrack/datalad-medicalimaging | 2afd1314a4eef87015f1507094aead5c502724d7 | [
"MIT"
] | null | null | null | datalad_neuroimaging/extractors/tests/test_nidm.py | bpoldrack/datalad-medicalimaging | 2afd1314a4eef87015f1507094aead5c502724d7 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil; coding: utf-8 -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license ... | 39.149254 | 107 | 0.582158 |
f803dce75084e5f681a61886b132f24ad8716764 | 7,827 | py | Python | magenta/music/notebook_utils.py | cristianmtr/magenta | ac2d8ae455fdd07f4b46dec82aedab22fcb6bbbd | [
"Apache-2.0"
] | 1 | 2019-01-24T07:22:48.000Z | 2019-01-24T07:22:48.000Z | magenta/music/notebook_utils.py | dkun7944/magenta | 8f930263b7cfd67f27eb12cd871b4e5fa87d382e | [
"Apache-2.0"
] | null | null | null | magenta/music/notebook_utils.py | dkun7944/magenta | 8f930263b7cfd67f27eb12cd871b4e5fa87d382e | [
"Apache-2.0"
] | 1 | 2019-11-26T06:30:52.000Z | 2019-11-26T06:30:52.000Z | # Copyright 2018 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 ... | 38.180488 | 120 | 0.716622 |
7eb151bf06a181ed4bc6f54f562bffc49f35deaf | 3,127 | py | Python | Dassl/dassl/modeling/ops/mixstyle.py | xch-liu/geom-tex-dg | 59a93684ae13e7d962908e9971fcbfba66d90b80 | [
"MIT"
] | 160 | 2021-01-13T07:17:27.000Z | 2022-03-30T14:43:54.000Z | Dassl/dassl/modeling/ops/mixstyle.py | xch-liu/geom-tex-dg | 59a93684ae13e7d962908e9971fcbfba66d90b80 | [
"MIT"
] | 15 | 2021-03-23T22:30:20.000Z | 2022-03-29T03:04:33.000Z | Dassl/dassl/modeling/ops/mixstyle.py | xch-liu/geom-tex-dg | 59a93684ae13e7d962908e9971fcbfba66d90b80 | [
"MIT"
] | 22 | 2021-01-18T06:37:45.000Z | 2022-03-16T07:37:15.000Z | import random
from contextlib import contextmanager
import torch
import torch.nn as nn
def deactivate_mixstyle(m):
if type(m) == MixStyle:
m.set_activation_status(False)
def activate_mixstyle(m):
if type(m) == MixStyle:
m.set_activation_status(True)
def random_mixstyle(m):
if type(m) =... | 25.422764 | 90 | 0.587464 |
18171409a64f54c584a3509a99a7c76a99460e6b | 515 | py | Python | utils/getip.py | meta-chen/AdslProxy | 0e06da88c91750a128a2fc1d0291e8017346a377 | [
"MIT"
] | null | null | null | utils/getip.py | meta-chen/AdslProxy | 0e06da88c91750a128a2fc1d0291e8017346a377 | [
"MIT"
] | null | null | null | utils/getip.py | meta-chen/AdslProxy | 0e06da88c91750a128a2fc1d0291e8017346a377 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/9/28 12:30
# @Author : Meta_Chen
# @File : getip.py
# @Software: PyCharm
# @Target: 获取公网ip
import requests
import re
class GetIP:
'''
获取本机IP
'''
response = requests.get("http://txt.go.sohu.com/ip/soip")
def getip(self):
t... | 18.392857 | 61 | 0.565049 |
4550d3721ac11b953db2f52cf6705bb340e57160 | 17,716 | py | Python | sdk/python/pulumi_azure/automation/certificate.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/automation/certificate.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/automation/certificate.py | aangelisc/pulumi-azure | 71dd9c75403146e16f7480e5a60b08bc0329660e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 43.960298 | 237 | 0.66042 |
c41f9410283dfbbaf2f0f8fcdf2fbcc735347b24 | 5,484 | py | Python | lib/listeners/meterpreter.py | Gui-Luz/Empire | 6f5eeff5f46dd085e1317cb09b39853a2fce5d13 | [
"BSD-3-Clause"
] | 5,720 | 2017-02-02T13:59:40.000Z | 2022-03-31T09:50:10.000Z | lib/listeners/meterpreter.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 866 | 2017-02-02T10:56:31.000Z | 2020-01-17T07:47:05.000Z | lib/listeners/meterpreter.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 2,181 | 2017-02-04T10:28:41.000Z | 2022-03-31T04:36:56.000Z | # Empire imports
from lib.common import helpers
class Listener:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Meterpreter',
'Author': ['@harmj0y'],
'Description': ("Starts a 'foreign' http[s] Meterpreter listener."),
'Category' : ('cli... | 33.851852 | 213 | 0.555981 |
08c4207fe226851d2e25416a2676a2e5750f278b | 2,010 | py | Python | pymandel/howto_dialog.py | semuconsulting/PyMandel | 5827a1f598060482d59d46f53cc5bee6ad1a6d9c | [
"BSD-3-Clause"
] | 5 | 2021-03-05T07:37:53.000Z | 2022-03-10T22:42:39.000Z | pymandel/howto_dialog.py | semuconsulting/PyMandel | 5827a1f598060482d59d46f53cc5bee6ad1a6d9c | [
"BSD-3-Clause"
] | 1 | 2021-05-21T04:29:45.000Z | 2021-05-21T13:44:12.000Z | pymandel/howto_dialog.py | semuconsulting/PyMandel | 5827a1f598060482d59d46f53cc5bee6ad1a6d9c | [
"BSD-3-Clause"
] | 2 | 2021-04-23T11:13:09.000Z | 2021-08-15T07:22:17.000Z | """
How To Dialog Box class for tkinter application.
Created on 19 Apr 2020
@author: semuadmin
"""
from tkinter import Toplevel, Label, Button, LEFT
from webbrowser import open_new_tab
from pymandel.strings import HELPTXT, COPYRIGHTTXT, DLGHOWTO, GITHUBURL
class HowtoDialog:
"""
How To dialog box class
... | 28.309859 | 87 | 0.60995 |
8fc919f16bd8a2537f14121e5a3782149aa15e6b | 2,126 | py | Python | tests/test_utils.py | metasyn/scikeras | cb422fdd4f5c592feb71ce155fa25f26b25cdd82 | [
"MIT"
] | 111 | 2020-06-16T16:14:09.000Z | 2022-03-28T14:28:28.000Z | tests/test_utils.py | metasyn/scikeras | cb422fdd4f5c592feb71ce155fa25f26b25cdd82 | [
"MIT"
] | 240 | 2020-07-13T15:51:34.000Z | 2022-03-29T07:46:09.000Z | tests/test_utils.py | metasyn/scikeras | cb422fdd4f5c592feb71ce155fa25f26b25cdd82 | [
"MIT"
] | 16 | 2020-07-13T14:41:17.000Z | 2022-03-19T11:50:02.000Z | import numpy as np
import pytest
from tensorflow.keras import losses as losses_module
from tensorflow.keras import metrics as metrics_module
from scikeras.utils import loss_name, metric_name
class CustomLoss(losses_module.Loss):
pass
class CustomMetric(metrics_module.AUC):
pass
@pytest.mark.parametrize(... | 26.911392 | 78 | 0.718721 |
ee89243e8d1e3a7bb4b043e5b247159988ddb6ad | 12,865 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2020_08_01_preview/aio/operations/_management_policies_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2020_08_01_preview/aio/operations/_management_policies_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2020_08_01_preview/aio/operations/_management_policies_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"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 ... | 52.942387 | 225 | 0.691799 |
412b244d2e26056543472e9371dbc89632e32a4b | 87,357 | py | Python | build/lib/pymint/main/interpret_toolkit.py | monte-flora/py-mint | 0dd22a2e3dce68d1a12a6a99623cb4d4cb407b58 | [
"MIT"
] | 9 | 2021-04-12T16:11:38.000Z | 2022-03-18T09:03:58.000Z | build/lib/pymint/main/interpret_toolkit.py | monte-flora/py-mint | 0dd22a2e3dce68d1a12a6a99623cb4d4cb407b58 | [
"MIT"
] | 21 | 2021-04-13T01:17:40.000Z | 2022-03-11T16:06:50.000Z | build/lib/pymint/main/interpret_toolkit.py | monte-flora/mintpy | 23f9a952726dc0e69dfcdda2f8c7c27858aa9a11 | [
"MIT"
] | 1 | 2021-11-15T20:56:46.000Z | 2021-11-15T20:56:46.000Z | import numpy as np
import xarray as xr
import pandas as pd
import itertools
# Computation imports
from ..common.attributes import Attributes
from .local_interpret import LocalInterpret
from .global_interpret import GlobalInterpret
# Plotting imports
from ..plot.plot_interpret_curves import PlotInterpretCurves
from ..... | 43.569576 | 128 | 0.544364 |
ccb892af2b1e41f05f5e2b3b091e44e1919d2350 | 1,681 | py | Python | djangobench/benchmarks/template_render/benchmark.py | Bouke/djangobench | 94fc28d99f95c65d26d0fad8af44e46c49282220 | [
"BSD-3-Clause"
] | 3 | 2016-11-27T22:25:34.000Z | 2018-12-12T20:06:40.000Z | djangobench/benchmarks/template_render/benchmark.py | Bouke/djangobench | 94fc28d99f95c65d26d0fad8af44e46c49282220 | [
"BSD-3-Clause"
] | null | null | null | djangobench/benchmarks/template_render/benchmark.py | Bouke/djangobench | 94fc28d99f95c65d26d0fad8af44e46c49282220 | [
"BSD-3-Clause"
] | null | null | null | from django import VERSION
from django.shortcuts import render_to_response
from djangobench.utils import run_benchmark
#set up some vars
objects1 = [object(), object(), object(), object(), object()]
objects2 = [object(), object(), object(), object(), object()]
object1 = object()
object2 = object()
object3 = None
num1 ... | 28.982759 | 82 | 0.638905 |
aa7c54425adb83fb25e6262140bb2c969e86b364 | 791 | py | Python | setup.py | uebergucken/DECbot | fa259d47f901ca9187bff74f08e212739af7774f | [
"MIT"
] | 4 | 2019-10-22T13:34:54.000Z | 2021-06-25T11:43:33.000Z | setup.py | uebergucken/DECbot | fa259d47f901ca9187bff74f08e212739af7774f | [
"MIT"
] | 3 | 2020-11-24T03:10:47.000Z | 2021-07-03T08:54:00.000Z | setup.py | uebergucken/DECbot | fa259d47f901ca9187bff74f08e212739af7774f | [
"MIT"
] | 2 | 2021-06-25T19:42:50.000Z | 2021-06-30T08:09:30.000Z | from setuptools import setup, find_packages
setup(
name = "decbot",
version = "1.0.0",
author = 'Wyatt Lindquist',
author_email = 'git.wquist@gmail.com',
description = "a Discord bot that uses DECtalk text-to-speech",
long_description = open('./README.md').read(),
long_d... | 32.958333 | 76 | 0.596713 |
07fa5d844ffe981e17e8b1a976404874a4371baf | 7,858 | py | Python | continual/cnn/vgg.py | arthurdouillard/dytox | 1eebbd8cf5241ede593a5ba51a8c42284f43d1c0 | [
"Apache-2.0"
] | 31 | 2021-11-25T08:44:55.000Z | 2022-03-31T15:20:48.000Z | continual/cnn/vgg.py | arthurdouillard/dytox | 1eebbd8cf5241ede593a5ba51a8c42284f43d1c0 | [
"Apache-2.0"
] | 2 | 2022-03-25T13:06:21.000Z | 2022-03-31T08:58:34.000Z | continual/cnn/vgg.py | arthurdouillard/dytox | 1eebbd8cf5241ede593a5ba51a8c42284f43d1c0 | [
"Apache-2.0"
] | 4 | 2021-12-09T11:28:13.000Z | 2022-03-20T21:18:44.000Z | import torch
import torch.nn as nn
#from .utils import load_state_dict_from_url
from typing import Union, List, Dict, Any, cast
from continual.cnn import AbstractCNN
__all__ = [
'VGG', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn',
'vgg19_bn', 'vgg19',
]
model_urls = {
'vgg11': 'https://... | 40.297436 | 114 | 0.626368 |
fc00a50def2921734dd0d29f0825eb706eba6459 | 16,205 | py | Python | TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/quantsim.py | aaronkjones/aimet | 08feb34573281f87c53301935652a02f8d573858 | [
"BSD-3-Clause"
] | null | null | null | TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/quantsim.py | aaronkjones/aimet | 08feb34573281f87c53301935652a02f8d573858 | [
"BSD-3-Clause"
] | null | null | null | TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/quantsim.py | aaronkjones/aimet | 08feb34573281f87c53301935652a02f8d573858 | [
"BSD-3-Clause"
] | null | null | null | # /usr/bin/env python3.5
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... | 53.305921 | 120 | 0.671953 |
ecc3e1c7532f70f8908058c959250626aa73db90 | 139 | py | Python | Exercicios/ex115/ex115 - Criando um menu em Python.py | yurixf/Python | d1f91d52235dcba73deff281d80af0b44f028735 | [
"MIT"
] | null | null | null | Exercicios/ex115/ex115 - Criando um menu em Python.py | yurixf/Python | d1f91d52235dcba73deff281d80af0b44f028735 | [
"MIT"
] | null | null | null | Exercicios/ex115/ex115 - Criando um menu em Python.py | yurixf/Python | d1f91d52235dcba73deff281d80af0b44f028735 | [
"MIT"
] | null | null | null | import lib
arq = "teste.txt"
if not lib.arquivo.arquivoExiste(arq):
lib.arquivo.criarArquivo(arq)
opção=lib.interface.escolha(arq)
| 13.9 | 38 | 0.741007 |
e469f8492d6c01949735281f26ffee76fe6a6927 | 18,901 | py | Python | code/archive/cyipopt_and_jax/main-sparsify.py | uq-aibe/spir-oz | 4ae3ff6f230679f21b9c4072529df94187f9e098 | [
"MIT"
] | null | null | null | code/archive/cyipopt_and_jax/main-sparsify.py | uq-aibe/spir-oz | 4ae3ff6f230679f21b9c4072529df94187f9e098 | [
"MIT"
] | null | null | null | code/archive/cyipopt_and_jax/main-sparsify.py | uq-aibe/spir-oz | 4ae3ff6f230679f21b9c4072529df94187f9e098 | [
"MIT"
] | null | null | null | from jax.config import config
config.update("jax_enable_x64", True)
#-----------global modules
import jax.numpy as np
from jax import jit, grad, jacrev, jacfwd
from jax.experimental import sparse
from cyipopt import minimize_ipopt
#-----------local modules
#import economic_functions as efcn
#=========================... | 41.178649 | 85 | 0.475848 |
b939c65a3a37eeb72908f71023f4a5aba1fdae55 | 436 | py | Python | crawler/spiders/sitemapscrape/omicsdi.py | flaneuse/biothings.crawler | 70e4eec45e44fb7300643b1fb64b0824ed6e7df2 | [
"Apache-2.0"
] | null | null | null | crawler/spiders/sitemapscrape/omicsdi.py | flaneuse/biothings.crawler | 70e4eec45e44fb7300643b1fb64b0824ed6e7df2 | [
"Apache-2.0"
] | null | null | null | crawler/spiders/sitemapscrape/omicsdi.py | flaneuse/biothings.crawler | 70e4eec45e44fb7300643b1fb64b0824ed6e7df2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from scrapy.spiders import SitemapSpider
from ..helper import JsonLdMixin
class OmicsdiSpider(SitemapSpider, JsonLdMixin):
name = 'omicsdi'
sitemap_urls = ['http://www.omicsdi.org/sitemap.xml']
sitemap_rules = [('/dataset/', 'extract_jsonld')]
def extract_jsonld(self, resp... | 24.222222 | 67 | 0.681193 |
b4d8e8a4612873c1e2cc684daa4a3da24a5842a4 | 929 | py | Python | setup.py | koodaa-team/serializer | 4dc93195621b4ab0ddb86d71f319a41cb2c56340 | [
"BSD-3-Clause"
] | 3 | 2016-12-13T09:52:57.000Z | 2022-02-17T20:00:56.000Z | setup.py | koodaa-team/serializer | 4dc93195621b4ab0ddb86d71f319a41cb2c56340 | [
"BSD-3-Clause"
] | null | null | null | setup.py | koodaa-team/serializer | 4dc93195621b4ab0ddb86d71f319a41cb2c56340 | [
"BSD-3-Clause"
] | 1 | 2017-12-27T09:48:36.000Z | 2017-12-27T09:48:36.000Z | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='Serializer',
version='0.2.1',
description=(
'Easy object serialization. '
'Mimics RoR ActiveRecord serializer.'
),
long_description=__doc__,
author='Konsta Vesterinen',
... | 25.805556 | 70 | 0.625404 |
352c4e9149a636814fd4a346f34ccd5437e76805 | 32,800 | py | Python | Incident-Response/Tools/cyphon/cyphon/engines/tests/mixins.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 1 | 2021-07-24T17:22:50.000Z | 2021-07-24T17:22:50.000Z | Incident-Response/Tools/cyphon/cyphon/engines/tests/mixins.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-28T03:40:31.000Z | 2022-02-28T03:40:52.000Z | Incident-Response/Tools/cyphon/cyphon/engines/tests/mixins.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-25T08:34:51.000Z | 2022-03-16T17:29:44.000Z | # -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Cyphon En... | 32 | 84 | 0.517104 |
2ba895283ed55081e6d980725c75439a5723fef5 | 2,515 | py | Python | backend/openapi_server/models/action_call.py | tmdt-buw/gideon | b3e7d0614baf80c149d3ef7f1c80a94339feda4b | [
"Apache-2.0"
] | null | null | null | backend/openapi_server/models/action_call.py | tmdt-buw/gideon | b3e7d0614baf80c149d3ef7f1c80a94339feda4b | [
"Apache-2.0"
] | null | null | null | backend/openapi_server/models/action_call.py | tmdt-buw/gideon | b3e7d0614baf80c149d3ef7f1c80a94339feda4b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from openapi_server.models.base_model_ import Model
from openapi_server.models.application_action import ApplicationAction
from openapi_server.models.application_state ... | 26.473684 | 96 | 0.636978 |
b5f150e2aad0d7f6a828ef872d799287c6fb9d0c | 1,413 | py | Python | tests/test_base.py | mrtovsky/estimium | 66c8bf077c72d487fa937d28a482d36055d0c433 | [
"MIT"
] | 1 | 2020-04-01T16:29:10.000Z | 2020-04-01T16:29:10.000Z | tests/test_base.py | mrtovsky/estimium | 66c8bf077c72d487fa937d28a482d36055d0c433 | [
"MIT"
] | null | null | null | tests/test_base.py | mrtovsky/estimium | 66c8bf077c72d487fa937d28a482d36055d0c433 | [
"MIT"
] | null | null | null | import logging
from typing import Optional
from estimium.base import ClassLogger
class DummyClass(ClassLogger):
"""Dummy class for testing inheritance from ClassLogger."""
def __init__(self, logger: Optional[logging.Logger] = None):
super().__init__(logger=logger)
self.logger.info("Initializ... | 24.362069 | 64 | 0.598018 |
edb996bcacfd2204a4766218b03ccd7db781e4b4 | 240 | py | Python | src/gocept/objectquery/tests/objects2.py | gocept/gocept.objectquery | afe02ab029eb1291978ea84e2de1825adb7e5aec | [
"ZPL-2.1"
] | null | null | null | src/gocept/objectquery/tests/objects2.py | gocept/gocept.objectquery | afe02ab029eb1291978ea84e2de1825adb7e5aec | [
"ZPL-2.1"
] | null | null | null | src/gocept/objectquery/tests/objects2.py | gocept/gocept.objectquery | afe02ab029eb1291978ea84e2de1825adb7e5aec | [
"ZPL-2.1"
] | null | null | null | # Copyright (c) 2007-2009 gocept gmbh & co. kg
# See also LICENSE.txt
import persistent
# class definitions for the test db
class Library(persistent.Persistent):
"""This class is used to test querying for module names of classes."""
| 24 | 74 | 0.7375 |
c71b4e41395a8cb5f9c6cf0e5222c47291237334 | 601 | py | Python | risk_management/users/migrations/0004_auto_20180607_1413.py | justin441/risk_management | 2f5f0f62aae34998db7cf4155297ce4f6a8d774e | [
"MIT"
] | null | null | null | risk_management/users/migrations/0004_auto_20180607_1413.py | justin441/risk_management | 2f5f0f62aae34998db7cf4155297ce4f6a8d774e | [
"MIT"
] | null | null | null | risk_management/users/migrations/0004_auto_20180607_1413.py | justin441/risk_management | 2f5f0f62aae34998db7cf4155297ce4f6a8d774e | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2018-06-07 13:13
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20180607_1340'),
]
operations = [
migrations.RemoveField(
model_name='user',... | 25.041667 | 131 | 0.615641 |
69974ee0e31051a17146f07eb03e08b3c39d05b5 | 25,797 | py | Python | edk2basetools/Ecc/CParser4/CListener.py | YuweiChen1110/edk2-basetools | cfd05c928492b7ffd1329634cfcb089db995eeca | [
"BSD-2-Clause-Patent"
] | 7 | 2020-09-08T01:16:14.000Z | 2021-12-25T06:32:42.000Z | edk2basetools/Ecc/CParser4/CListener.py | YuweiChen1110/edk2-basetools | cfd05c928492b7ffd1329634cfcb089db995eeca | [
"BSD-2-Clause-Patent"
] | 25 | 2020-11-02T23:28:42.000Z | 2022-03-29T01:57:40.000Z | edk2basetools/Ecc/CParser4/CListener.py | matthewfcarlson/edk2-pytool-base | ddf78ca6e2110f03e020a5bd0ca32b2a463fecff | [
"BSD-2-Clause-Patent"
] | 18 | 2020-09-10T02:54:03.000Z | 2021-11-29T06:41:52.000Z | # Generated from C.g4 by ANTLR 4.7.1
from antlr4 import *
if __name__ is not None and "." in __name__:
from .CParser import CParser
else:
from CParser import CParser
## @file
# The file defines the parser for C source files.
#
# THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
# This file is gen... | 31.848148 | 78 | 0.720743 |
79a82a179ae9aba21609ecce90fc11f8aed3a291 | 2,533 | py | Python | qa/rpc-tests/pos-sync.py | JSKitty/QuantisNet-Core | 75c66b11e29ea0597965471505e5da552d900d49 | [
"MIT"
] | 21 | 2019-06-03T22:24:33.000Z | 2021-04-10T14:14:26.000Z | qa/rpc-tests/pos-sync.py | JSKitty/QuantisNet-Core | 75c66b11e29ea0597965471505e5da552d900d49 | [
"MIT"
] | 3 | 2019-08-22T16:21:45.000Z | 2020-02-26T15:19:21.000Z | qa/rpc-tests/pos-sync.py | JSKitty/QuantisNet-Core | 75c66b11e29ea0597965471505e5da552d900d49 | [
"MIT"
] | 4 | 2019-06-04T22:11:05.000Z | 2020-05-22T18:20:32.000Z | #!/usr/bin/env python3
# Copyright (c) 2019 The QuantisNet Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import log... | 38.378788 | 86 | 0.652191 |
50f918720a5e572acd4edb224aeeebcf7bbb3315 | 2,913 | py | Python | main.py | Jackson-Kang/Prosody-augmentation-for-Text-to-speech | 5407c20e59f0b5276d86f02f149aa02028f121b5 | [
"MIT"
] | 3 | 2020-12-21T19:08:50.000Z | 2021-06-05T09:27:49.000Z | main.py | Jackson-Kang/Prosody-augmentation-for-Text-to-speech | 5407c20e59f0b5276d86f02f149aa02028f121b5 | [
"MIT"
] | null | null | null | main.py | Jackson-Kang/Prosody-augmentation-for-Text-to-speech | 5407c20e59f0b5276d86f02f149aa02028f121b5 | [
"MIT"
] | null | null | null | from utils import *
from tuners import *
from configs import Arguments as args
from random import randrange
import ffmpeg
import sys
# [TO DO] rewrite metadata.csv to record metadata of augmented dataset
def change_sampling_rate():
save_dir = create_dir(args.save_dir)
resampled_wav_dir = create_dir(save_dir, "... | 45.515625 | 179 | 0.752832 |
b27c09b92a316e99fc41e18615536801c8a0635b | 300 | py | Python | examples/futures/account/brackets.py | leozaragoza/binance-connector-python | 3311d102c9e788e3d71047f0af103c00d1ae2162 | [
"MIT"
] | 3 | 2021-08-16T15:29:09.000Z | 2021-09-14T16:25:03.000Z | examples/futures/account/brackets.py | leozaragoza/binance-connector-python | 3311d102c9e788e3d71047f0af103c00d1ae2162 | [
"MIT"
] | null | null | null | examples/futures/account/brackets.py | leozaragoza/binance-connector-python | 3311d102c9e788e3d71047f0af103c00d1ae2162 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
from binance.futures import Futures as Client
from binance.lib.utils import config_logging
config_logging(logging, logging.DEBUG)
key = ""
secret = ""
client = Client(key, secret, base_url="https://testnet.binancefuture.com")
logging.info(client.brackets())
| 20 | 74 | 0.766667 |
5757600aad6de6927121532a0e38e9061fd17993 | 8,772 | py | Python | recipes/VoxCeleb/SpeakerRec/train_speaker_embeddings.py | Adel-Moumen/speechbrain | 1837bbdab24d40b73f3eb354db00fbb063e5aca4 | [
"Apache-2.0"
] | null | null | null | recipes/VoxCeleb/SpeakerRec/train_speaker_embeddings.py | Adel-Moumen/speechbrain | 1837bbdab24d40b73f3eb354db00fbb063e5aca4 | [
"Apache-2.0"
] | null | null | null | recipes/VoxCeleb/SpeakerRec/train_speaker_embeddings.py | Adel-Moumen/speechbrain | 1837bbdab24d40b73f3eb354db00fbb063e5aca4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
"""Recipe for training speaker embeddings (e.g, xvectors) using the VoxCeleb Dataset.
We employ an encoder followed by a speaker classifier.
To run this recipe, use the following command:
> python train_speaker_embeddings.py {hyperparameter_file}
Using your own hyperparameter file or one of the fol... | 34 | 85 | 0.646147 |
8a002813ec718f990c335a0eaf9b9b10703c3751 | 1,409 | py | Python | PARQUEIOT/apps/sistema/migrations/0003_auto_20160717_2239.py | Edwineverth/Parque-Inteligente-SD- | a25fe3e5ac974a151d2681a8001f2782747fb459 | [
"CC0-1.0"
] | null | null | null | PARQUEIOT/apps/sistema/migrations/0003_auto_20160717_2239.py | Edwineverth/Parque-Inteligente-SD- | a25fe3e5ac974a151d2681a8001f2782747fb459 | [
"CC0-1.0"
] | null | null | null | PARQUEIOT/apps/sistema/migrations/0003_auto_20160717_2239.py | Edwineverth/Parque-Inteligente-SD- | a25fe3e5ac974a151d2681a8001f2782747fb459 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('sistema', '0002_dispositivo_dis_nombre'),
]
operations = [
migrations.AlterField(
model_name='dispositivo',
... | 31.311111 | 114 | 0.587651 |
655c3545b94377f466d14883af33f5adad0c5743 | 3,754 | py | Python | Samples/MISP/script.py | OfficeGlobal/security-api-solutions | a19b412ae3aaff806d30197c19862017923398ba | [
"MIT"
] | null | null | null | Samples/MISP/script.py | OfficeGlobal/security-api-solutions | a19b412ae3aaff806d30197c19862017923398ba | [
"MIT"
] | null | null | null | Samples/MISP/script.py | OfficeGlobal/security-api-solutions | a19b412ae3aaff806d30197c19862017923398ba | [
"MIT"
] | null | null | null | from pymisp import PyMISP
import config
from collections import defaultdict
import datetime
from RequestManager import RequestManager
from RequestObject import RequestObject
from constants import *
import sys
from functools import reduce
def _get_events():
misp = PyMISP(config.misp_domain, config.misp_key, config... | 37.168317 | 107 | 0.661694 |
5d038469afe98dca5d4733e65d15dc53828be670 | 178 | py | Python | src/mard/brazilian_document/__init__.py | Mardoqueu-Pimentel/mard-py | c448cf5803291a6b711ad1ea6062cbab30dbfa0c | [
"MIT"
] | null | null | null | src/mard/brazilian_document/__init__.py | Mardoqueu-Pimentel/mard-py | c448cf5803291a6b711ad1ea6062cbab30dbfa0c | [
"MIT"
] | 1 | 2020-03-12T17:57:53.000Z | 2020-03-24T20:36:44.000Z | src/mard/brazilian_document/__init__.py | Mardoqueu-Pimentel/mard-py | c448cf5803291a6b711ad1ea6062cbab30dbfa0c | [
"MIT"
] | null | null | null | from mard.brazilian_document.cnpj import (
cnpj_pattern, cnpj_formatter, cnpj_validator
)
from mard.brazilian_document.cpf import (
cpf_pattern, cpf_formatter, cpf_validator
)
| 25.428571 | 45 | 0.831461 |
250e7cf87ac4038880a7d94b45ab58f827e7ee0e | 2,350 | py | Python | ctdvis/widgets/paragraph.py | JohannesSMHI/ctdvis | f51d472eb59c032abcbf598c94c4480d952ac30a | [
"MIT"
] | null | null | null | ctdvis/widgets/paragraph.py | JohannesSMHI/ctdvis | f51d472eb59c032abcbf598c94c4480d952ac30a | [
"MIT"
] | null | null | null | ctdvis/widgets/paragraph.py | JohannesSMHI/ctdvis | f51d472eb59c032abcbf598c94c4480d952ac30a | [
"MIT"
] | null | null | null | # Copyright (c) 2020 SMHI, Swedish Meteorological and Hydrological Institute.
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
"""
Created on 2020-09-11 15:33
@author: a002028
"""
from bokeh.models import Div
def header_line():
"""Return Div object."""
html_text = """
<html... | 27.647059 | 195 | 0.581277 |
263dc433ea89a49aa75961102c133aaa817bd99c | 9,395 | py | Python | dpgs_sandbox/tests/test_apps.py | ktowen/django-pgschemas | 5487c82d7a44297e12b80ef899a9aee0b6879bc5 | [
"MIT"
] | 85 | 2019-01-03T02:22:03.000Z | 2022-03-09T23:15:56.000Z | dpgs_sandbox/tests/test_apps.py | ktowen/django-pgschemas | 5487c82d7a44297e12b80ef899a9aee0b6879bc5 | [
"MIT"
] | 52 | 2019-02-12T21:04:43.000Z | 2022-03-05T15:20:16.000Z | dpgs_sandbox/tests/test_apps.py | ktowen/django-pgschemas | 5487c82d7a44297e12b80ef899a9aee0b6879bc5 | [
"MIT"
] | 12 | 2019-01-31T02:36:06.000Z | 2021-06-15T22:06:12.000Z | from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase, override_settings
BASE_DEFAULT = {"TENANT_MODEL": "shared_public.Tenant", "DOMAIN_MODEL": "shared_public.Domain", "URLCONF": ""}
class AppConfigTestCase(TestCase):
... | 51.059783 | 119 | 0.687174 |
639ffacbcf7c6da21fd6e0653441b1d73a3268fe | 4,332 | py | Python | sloeplugins/sloeyoutube/sloeyoutubetree.py | sloe/chan | df144f30edd33eb749e39ccdf64687cc22449bf5 | [
"Apache-2.0"
] | 1 | 2018-01-05T11:36:50.000Z | 2018-01-05T11:36:50.000Z | sloeplugins/sloeyoutube/sloeyoutubetree.py | sloe/chan | df144f30edd33eb749e39ccdf64687cc22449bf5 | [
"Apache-2.0"
] | null | null | null | sloeplugins/sloeyoutube/sloeyoutubetree.py | sloe/chan | df144f30edd33eb749e39ccdf64687cc22449bf5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import cPickle
import logging
import os
from pprint import pformat, pprint
import time
import sloelib
from sloeyoutubeitem import SloeYouTubeItem
class SloeYouTubeTree(object):
IDMAP_CACHE_FILENAME = "youtubetree_idmap_cache.pickle"
IDMAP_CACHE_VALID_FILENAME = "youtubetree_idmap_cache.val... | 34.656 | 175 | 0.605494 |
d5845d5a701ac065d07651ac164419ff0bceff2d | 515 | py | Python | server/src/tests/samples/tryExcept1.py | jhutchings1/pyright | 2b8593a58a2aecc95dac49cce92fc16678cd4e14 | [
"MIT"
] | 1 | 2019-09-14T06:02:16.000Z | 2019-09-14T06:02:16.000Z | server/src/tests/samples/tryExcept1.py | jhutchings1/pyright | 2b8593a58a2aecc95dac49cce92fc16678cd4e14 | [
"MIT"
] | 4 | 2021-03-11T07:03:36.000Z | 2021-10-06T22:27:25.000Z | server/src/tests/samples/tryExcept1.py | jhutchings1/pyright | 2b8593a58a2aecc95dac49cce92fc16678cd4e14 | [
"MIT"
] | null | null | null | # This sample tests the name binder's handling of
# try/except/raise statements
def func1():
try:
pass
except:
raise
# This should generate an error because it's
# a "naked" raise statement.
raise
def foo(x, y) -> bool:
try:
z = x / y
except Exception as... | 16.09375 | 49 | 0.576699 |
f80326043c617c93d131993981bedc2f630bf3c6 | 2,786 | py | Python | electrum_pac/plugins/labels/qt.py | PACCommunity/electrum-PAC | bde9018f026c950de16ddab96e4ef818ded52566 | [
"MIT"
] | 2 | 2018-05-12T19:55:42.000Z | 2019-09-04T12:14:40.000Z | electrum_pac/plugins/labels/qt.py | PACCommunity/electrum-PAC | bde9018f026c950de16ddab96e4ef818ded52566 | [
"MIT"
] | null | null | null | electrum_pac/plugins/labels/qt.py | PACCommunity/electrum-PAC | bde9018f026c950de16ddab96e4ef818ded52566 | [
"MIT"
] | 15 | 2018-04-02T11:21:43.000Z | 2020-08-14T20:27:29.000Z | from functools import partial
import traceback
import sys
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout)
from electrum_pac.plugin import hook
from electrum_pac.i18n import _
from electrum_pac.gui.qt import EnterButton
from electrum_pac.gui.qt.util i... | 35.265823 | 84 | 0.652548 |
ba94fe9a03c46edb200e124794ab920c585ba00f | 546 | py | Python | pyamf/adapters/_weakref.py | frewsxcv/pyamf2 | fcb61d2445b7e456121085320d1c713e33ae1f6a | [
"MIT"
] | null | null | null | pyamf/adapters/_weakref.py | frewsxcv/pyamf2 | fcb61d2445b7e456121085320d1c713e33ae1f6a | [
"MIT"
] | null | null | null | pyamf/adapters/_weakref.py | frewsxcv/pyamf2 | fcb61d2445b7e456121085320d1c713e33ae1f6a | [
"MIT"
] | null | null | null | # Copyright (c) The PyAMF Project.
# See LICENSE.txt for details.
"""
C{weakref} support.
@since: 0.6.2
"""
import weakref
import pyamf
from pyamf.adapters import util
class Foo(object):
pass
weakref_type = type(weakref.ref(Foo()))
def get_referent(reference, **kwargs):
return reference()
pyamf.add... | 14.756757 | 61 | 0.727106 |
484c1b9721dedd99be8602b3042b0f251c0dc82a | 1,070 | py | Python | src/core/src/tortuga/exceptions/invalidProfileCreationTemplate.py | sutasu/tortuga | 48d7cde4fa652346600b217043b4a734fa2ba455 | [
"Apache-2.0"
] | 33 | 2018-03-02T17:07:39.000Z | 2021-05-21T18:02:51.000Z | src/core/src/tortuga/exceptions/invalidProfileCreationTemplate.py | sutasu/tortuga | 48d7cde4fa652346600b217043b4a734fa2ba455 | [
"Apache-2.0"
] | 201 | 2018-03-05T14:28:24.000Z | 2020-11-23T19:58:27.000Z | src/core/src/tortuga/exceptions/invalidProfileCreationTemplate.py | sutasu/tortuga | 48d7cde4fa652346600b217043b4a734fa2ba455 | [
"Apache-2.0"
] | 23 | 2018-03-02T17:21:59.000Z | 2020-11-18T14:52:38.000Z | # Copyright 2008-2018 Univa Corporation
#
# 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... | 36.896552 | 74 | 0.752336 |
5394219197dc663d676f0610b2346a671b882a34 | 20,813 | py | Python | xonsh/base_shell.py | hemna/xonsh | 86c4dec1bb5df1905b65ef553b06fdb5c76b20a8 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2022-02-14T21:56:41.000Z | 2022-02-14T21:56:41.000Z | xonsh/base_shell.py | hemna/xonsh | 86c4dec1bb5df1905b65ef553b06fdb5c76b20a8 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xonsh/base_shell.py | hemna/xonsh | 86c4dec1bb5df1905b65ef553b06fdb5c76b20a8 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""The base class for xonsh shell"""
import io
import os
import sys
import time
import builtins
from xonsh.tools import (
XonshError,
print_exception,
DefaultNotGiven,
check_for_partial_string,
format_std_prepost,
get_line_continuation,
)
from xonsh.platform import HAS_P... | 34.401653 | 87 | 0.583001 |
5ce76ec1b408fa9703e3a3c2eaca22000db707c4 | 1,366 | py | Python | appengine/voter-info-gadget.py | geary/election-gadgets.egypt-staging | 80a8349cfea79a44af6ca123c190658b661b9fed | [
"Unlicense"
] | null | null | null | appengine/voter-info-gadget.py | geary/election-gadgets.egypt-staging | 80a8349cfea79a44af6ca123c190658b661b9fed | [
"Unlicense"
] | null | null | null | appengine/voter-info-gadget.py | geary/election-gadgets.egypt-staging | 80a8349cfea79a44af6ca123c190658b661b9fed | [
"Unlicense"
] | null | null | null | #print 'Content-Type: application/xml'
#print ''
#
#f = open( 'voter-info-gadget.xml', 'r' )
#xml = f.read()
#f.close()
#
#print xml
#import re
#from pprint import pformat, pprint
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
#def dumpRequest( req ):... | 26.269231 | 111 | 0.589312 |
69ead8fcd0b4db0e2eae00deec59f0c82ff12184 | 15,078 | py | Python | actingweb/handlers/subscription.py | gregertw/actingweb | e1c8f66451f547c920c64c4e2a702698e3a0d299 | [
"BSD-3-Clause"
] | null | null | null | actingweb/handlers/subscription.py | gregertw/actingweb | e1c8f66451f547c920c64c4e2a702698e3a0d299 | [
"BSD-3-Clause"
] | null | null | null | actingweb/handlers/subscription.py | gregertw/actingweb | e1c8f66451f547c920c64c4e2a702698e3a0d299 | [
"BSD-3-Clause"
] | null | null | null | from builtins import str
import json
import logging
from actingweb import auth
from actingweb.handlers import base_handler
class SubscriptionRootHandler(base_handler.BaseHandler):
"""Handles requests to /subscription"""
def get(self, actor_id):
if self.request.get('_method') == 'POST':
se... | 42.835227 | 119 | 0.523544 |
20e2f9eddb46477dd57563222eac66cbd1d46830 | 1,251 | py | Python | monk/system_unit_tests/pytorch/test_optimizer_adamax.py | Shreyashwaghe/monk_v1 | 4ee4d9483e8ffac9b73a41f3c378e5abf5fc799b | [
"Apache-2.0"
] | 7 | 2020-07-26T08:37:29.000Z | 2020-10-30T10:23:11.000Z | monk/system_unit_tests/pytorch/test_optimizer_adamax.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | 9 | 2020-01-28T21:40:39.000Z | 2022-02-10T01:24:06.000Z | monk/system_unit_tests/pytorch/test_optimizer_adamax.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | 1 | 2020-10-07T12:57:44.000Z | 2020-10-07T12:57:44.000Z | import os
import sys
sys.path.append("../../../monk/");
import psutil
from pytorch_prototype import prototype
from compare_prototype import compare
from common import print_start
from common import print_status
def test_optimizer_adamax(system_dict):
forward = True;
test = "test_optimizer_adamax";
syste... | 32.921053 | 98 | 0.64988 |
86973fd76bef29874d88f521cfbfb2e4054e46ec | 5,727 | py | Python | mmocr/core/evaluation/ocr_metric.py | zezeze97/image2latex | c745667cd1af91dbff2385dcf2f2b80b9a40adb6 | [
"Apache-2.0"
] | 4 | 2022-01-03T06:52:30.000Z | 2022-01-17T02:30:25.000Z | mmocr/core/evaluation/ocr_metric.py | zezeze97/image2latex | c745667cd1af91dbff2385dcf2f2b80b9a40adb6 | [
"Apache-2.0"
] | null | null | null | mmocr/core/evaluation/ocr_metric.py | zezeze97/image2latex | c745667cd1af91dbff2385dcf2f2b80b9a40adb6 | [
"Apache-2.0"
] | 1 | 2021-12-31T04:47:16.000Z | 2021-12-31T04:47:16.000Z | import re
from difflib import SequenceMatcher
from rapidfuzz import string_metric
from nltk.translate.bleu_score import sentence_bleu
import numpy as np
def cal_true_positive_char(pred, gt):
"""Calculate correct character number in prediction.
Args:
pred (str): Prediction text.
gt (str): Grou... | 36.477707 | 79 | 0.632094 |
1d6c853f0410688dcc4549d1e659b2ceab243495 | 1,199 | py | Python | Easy/169. Majority Element/solution (5).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 3 | 2020-05-09T12:55:09.000Z | 2022-03-11T18:56:05.000Z | Easy/169. Majority Element/solution (5).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | null | null | null | Easy/169. Majority Element/solution (5).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 1 | 2022-03-11T18:56:16.000Z | 2022-03-11T18:56:16.000Z | # 169. Majority Element
# Runtime: 316 ms, faster than 5.22% of Python3 online submissions for Majority Element.
# Memory Usage: 15.4 MB, less than 7.14% of Python3 online submissions for Majority Element.
class Solution:
# Divide and Conquer
def majorityElement(self, nums: list[int]) -> int:
def m... | 37.46875 | 92 | 0.599666 |
40783d19fb80f53608704a606da1618ffa30a13f | 5,189 | py | Python | openGaussBase/testcase/SQL/DML/copy/Opengauss_Function_DML_Copy_Case0013.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/DML/copy/Opengauss_Function_DML_Copy_Case0013.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/DML/copy/Opengauss_Function_DML_Copy_Case0013.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 42.186992 | 120 | 0.542494 |
25d9e55954f247f22c34f836b695731c6f3c13c2 | 57,725 | py | Python | tensorflow/python/distribute/mirrored_strategy_test.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 2 | 2020-09-22T17:41:12.000Z | 2021-03-14T20:40:59.000Z | tensorflow/python/distribute/mirrored_strategy_test.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 1 | 2021-03-23T03:25:15.000Z | 2021-03-23T03:25:15.000Z | tensorflow/python/distribute/mirrored_strategy_test.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 2 | 2021-03-16T02:21:33.000Z | 2021-11-08T21:24:51.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... | 39.18873 | 91 | 0.715669 |
d27fc11c83cfd912d163f06289825633042a3cfe | 213 | py | Python | repositories/session.py | jsmsalt/jobs-api | a2c26522bf7f997558f6c6608524187785c830e5 | [
"MIT"
] | null | null | null | repositories/session.py | jsmsalt/jobs-api | a2c26522bf7f997558f6c6608524187785c830e5 | [
"MIT"
] | 5 | 2021-11-29T04:40:14.000Z | 2021-11-29T12:33:44.000Z | repositories/session.py | jsmsalt/jobs-api | a2c26522bf7f997558f6c6608524187785c830e5 | [
"MIT"
] | null | null | null | from repositories.base import BaseRepository
from models.session import Session, SessionCreate, SessionUpdate
class SessionRepository(BaseRepository[Session, SessionCreate, SessionUpdate]):
entity = Session
| 30.428571 | 79 | 0.835681 |
7fac08a2a2203bfc19fbd54ef85b6df016377052 | 1,376 | py | Python | machine-learning-ex4/ex4/displayData.py | altermarkive/machine-learning-course | 2f0a2c2269dab2bd61d34d96a75ccdd8b87683c7 | [
"MIT"
] | 1 | 2018-05-11T20:58:03.000Z | 2018-05-11T20:58:03.000Z | machine-learning-ex4/ex4/displayData.py | altermarkive/Machine-Learning-Course | 2f0a2c2269dab2bd61d34d96a75ccdd8b87683c7 | [
"MIT"
] | null | null | null | machine-learning-ex4/ex4/displayData.py | altermarkive/Machine-Learning-Course | 2f0a2c2269dab2bd61d34d96a75ccdd8b87683c7 | [
"MIT"
] | 2 | 2016-11-04T13:40:31.000Z | 2018-05-11T20:58:05.000Z | #!/usr/bin/env python3
import numpy as np
import matplotlib
# Force matplotlib to not use any X Windows backend (must be called befor importing pyplot)
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def displayData(X, example_width=None):
#DISPLAYDATA Display 2D data in a nice grid
# [h, display_arr... | 28.666667 | 104 | 0.675872 |
08e9594be69ffb9d1d01e052b2c61482df6161da | 2,198 | py | Python | SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py | Polidea/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 427 | 2018-05-29T14:21:02.000Z | 2022-03-16T03:17:54.000Z | SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 25 | 2018-07-23T08:34:15.000Z | 2021-11-05T07:13:36.000Z | SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 52 | 2018-07-19T19:57:32.000Z | 2022-03-11T16:05:38.000Z | """
Test that objective-c expression parser continues to work for optimized build.
http://llvm.org/viewvc/llvm-project?rev=126973&view=rev
Fixed a bug in the expression parser where the 'this'
or 'self' variable was not properly read if the compiler
optimized it into a register.
"""
from __future__ import print_funct... | 28.545455 | 79 | 0.617834 |
82e3b7df8ee2491938e9799e144029492dbb5685 | 645 | py | Python | test/test_add_contact.py | 12ok/python_train | 436d6a02a83b3bcb6ff248968366dae0a9cafc2e | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | 12ok/python_train | 436d6a02a83b3bcb6ff248968366dae0a9cafc2e | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | 12ok/python_train | 436d6a02a83b3bcb6ff248968366dae0a9cafc2e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.contact import Contact
# test падает если есть символы ' \
# оставила полный вывод в repr для проверки какие данные указывались
def test_add_contact(app, json_contacts, db, check_ui):
contact = json_contacts
old_contacts = db.get_contact_list()
app.contact.create(contact)... | 40.3125 | 100 | 0.663566 |
a571c43154a87082374a795232b487c155d84487 | 127,749 | py | Python | paasta_tools/utils.py | cuza/paasta | 15d1b5b09f5d92e4619bf0f3eca70996d1be1639 | [
"Apache-2.0"
] | null | null | null | paasta_tools/utils.py | cuza/paasta | 15d1b5b09f5d92e4619bf0f3eca70996d1be1639 | [
"Apache-2.0"
] | null | null | null | paasta_tools/utils.py | cuza/paasta | 15d1b5b09f5d92e4619bf0f3eca70996d1be1639 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015-2017 Yelp 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 writin... | 33.742472 | 120 | 0.643167 |
b94b40136f494a017c13ffbbfb05cbe502e960da | 8,664 | py | Python | samples/python/57.teams-conversation-bot/bots/teams_conversation_bot.py | Aliacf21/BotBuilder-Samples | be48548edafd4efdc074f5a59ef2bb3af735ad9a | [
"MIT"
] | 1,998 | 2019-05-07T06:33:22.000Z | 2022-03-31T12:59:15.000Z | samples/python/57.teams-conversation-bot/bots/teams_conversation_bot.py | Aliacf21/BotBuilder-Samples | be48548edafd4efdc074f5a59ef2bb3af735ad9a | [
"MIT"
] | 1,303 | 2019-05-06T22:15:41.000Z | 2022-03-31T21:45:38.000Z | samples/python/57.teams-conversation-bot/bots/teams_conversation_bot.py | stevkan/BotBuilder-Samples | 75a21b412d8873906bed3460f7c5f0940a067d58 | [
"MIT"
] | 2,820 | 2016-09-21T03:47:43.000Z | 2019-05-03T15:12:46.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
import json
from typing import List
from botbuilder.core import CardFactory, TurnContext, MessageFactory
from botbuilder.core.teams import TeamsActivityHandler, TeamsInfo
from botbuilder.schema import CardAction, H... | 38 | 122 | 0.621884 |
0192df069ab62978917a3c80ec432603e42adae7 | 93 | py | Python | imdb_rating/dependencies/__init__.py | PeregHer/imdb-rating-predictions | 39c1730fc46449aeda6984c2bdec549e42092498 | [
"MIT"
] | null | null | null | imdb_rating/dependencies/__init__.py | PeregHer/imdb-rating-predictions | 39c1730fc46449aeda6984c2bdec549e42092498 | [
"MIT"
] | null | null | null | imdb_rating/dependencies/__init__.py | PeregHer/imdb-rating-predictions | 39c1730fc46449aeda6984c2bdec549e42092498 | [
"MIT"
] | null | null | null | from .models import Movie
from .spiders import IMDBSpider
__all__ = ["Movie", "IMDBSpider"]
| 18.6 | 33 | 0.752688 |
7558e11640c88a417fe12825f28debe391ebee2e | 20,196 | py | Python | src/satlas2/plotting.py | woutergins/satlas2 | 51afdc445c8c603372bb26abe19d1eb7bd3f3f24 | [
"MIT"
] | null | null | null | src/satlas2/plotting.py | woutergins/satlas2 | 51afdc445c8c603372bb26abe19d1eb7bd3f3f24 | [
"MIT"
] | null | null | null | src/satlas2/plotting.py | woutergins/satlas2 | 51afdc445c8c603372bb26abe19d1eb7bd3f3f24 | [
"MIT"
] | null | null | null | """
Functions for the generation of plots related to the fitting results.
.. moduleauthor:: Wouter Gins <wouter.a.gins@jyu.fi>
"""
import copy
import h5py
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import uncertainties as u
from scipy import optimize
from scipy.stats import chi2
impor... | 39.6 | 180 | 0.583284 |
a488a56d08886c8b69cff1bb580027a6c37eaca4 | 1,085 | py | Python | scrapy/commands/crawl.py | ZhiShiMao/scrapy | 04dd29257a81be0b1291db61dd880ef3dd96127d | [
"BSD-3-Clause"
] | null | null | null | scrapy/commands/crawl.py | ZhiShiMao/scrapy | 04dd29257a81be0b1291db61dd880ef3dd96127d | [
"BSD-3-Clause"
] | null | null | null | scrapy/commands/crawl.py | ZhiShiMao/scrapy | 04dd29257a81be0b1291db61dd880ef3dd96127d | [
"BSD-3-Clause"
] | null | null | null | from scrapy.commands import BaseRunSpiderCommand
from scrapy.exceptions import UsageError
class Command(BaseRunSpiderCommand):
requires_project = True
def syntax(self):
return "[options] <spider>"
def short_desc(self):
return "Run a spider"
def run(self, args, opts):
if len... | 27.820513 | 89 | 0.586175 |
41f193247bbfb9f7759ae522e3e6a47f40d8d379 | 3,800 | py | Python | rasa/cli/arguments/default_arguments.py | gthb/rasa | 9c3affff47496b6e8848d41acf5ab885b7037c30 | [
"Apache-2.0"
] | null | null | null | rasa/cli/arguments/default_arguments.py | gthb/rasa | 9c3affff47496b6e8848d41acf5ab885b7037c30 | [
"Apache-2.0"
] | null | null | null | rasa/cli/arguments/default_arguments.py | gthb/rasa | 9c3affff47496b6e8848d41acf5ab885b7037c30 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
from typing import Text, Union, Optional
from rasa.constants import (
DEFAULT_DATA_PATH,
DEFAULT_MODELS_PATH,
DEFAULT_DOMAIN_PATH,
DEFAULT_CONFIG_PATH,
)
def add_model_param(
parser: argparse.ArgumentParser,
model_name: Text = "Rasa",
add_positional_arg: boo... | 27.737226 | 87 | 0.66 |
2e5f87f573d4040bc53c23ab832fd34ae6dbe568 | 3,694 | py | Python | src/prefect/engine/results/local_result.py | louisditzel/prefect | b1a02fee623b965e756a38aa09059db780ab67eb | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/prefect/engine/results/local_result.py | louisditzel/prefect | b1a02fee623b965e756a38aa09059db780ab67eb | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/prefect/engine/results/local_result.py | louisditzel/prefect | b1a02fee623b965e756a38aa09059db780ab67eb | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import os
from typing import Any
import cloudpickle
from prefect import config
from prefect.engine.result import Result
class LocalResult(Result):
"""
Result that is written to and retrieved from the local file system.
Args:
- dir (str, optional): the _absolute_ path to a directory for storing
... | 34.203704 | 98 | 0.610179 |
82a9bbea57921a1e2e35c30897eab54f4e0ae832 | 266 | py | Python | project_b/project_b/urls.py | pdessauw/core-framework-demo | 27d2c1704b92e40220e062c30a4f40ff1f9ce674 | [
"MIT"
] | null | null | null | project_b/project_b/urls.py | pdessauw/core-framework-demo | 27d2c1704b92e40220e062c30a4f40ff1f9ce674 | [
"MIT"
] | null | null | null | project_b/project_b/urls.py | pdessauw/core-framework-demo | 27d2c1704b92e40220e062c30a4f40ff1f9ce674 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
import test_views
urlpatterns = [
url(r'^test$', test_views.template_test, name="test"),
url(r'^admin/', include(admin.site.urls)),
url(r'^', include("core_website.urls")),
]
| 20.461538 | 58 | 0.691729 |
832bb5583370dda17f42134290f455c1b2ae0ad3 | 697 | py | Python | set3/fixed_nonce_ctr_substitutions.py | adbforlife/cryptopals | 18bbc39e73f6a76725e792ec74b29cbcc8868409 | [
"MIT"
] | null | null | null | set3/fixed_nonce_ctr_substitutions.py | adbforlife/cryptopals | 18bbc39e73f6a76725e792ec74b29cbcc8868409 | [
"MIT"
] | null | null | null | set3/fixed_nonce_ctr_substitutions.py | adbforlife/cryptopals | 18bbc39e73f6a76725e792ec74b29cbcc8868409 | [
"MIT"
] | null | null | null | import sys
sys.path.append('/Users/ADB/Desktop/ /cryptopals')
from cryptotools import *
from base64 import b64decode
key = generate_key()
# Doing this by hand in an unsystematic way is worse than solving repeated key
# xors, which we use here.
if __name__ == '__main__':
ms = []
with open('set3/19.txt', 'r') as f:
... | 30.304348 | 78 | 0.681492 |
733d364c567f125eb68ce5e1331e4f94ac2d5ad3 | 427 | py | Python | mapr/ojai/ojai_query/QueryOp.py | mapr/maprdb-python-client | ea7b7f1fb6c212e76bd799867e272eafd345f2e2 | [
"Apache-2.0"
] | 3 | 2020-04-01T12:01:50.000Z | 2022-03-23T01:18:36.000Z | mapr/ojai/ojai_query/QueryOp.py | mapr/maprdb-python-client | ea7b7f1fb6c212e76bd799867e272eafd345f2e2 | [
"Apache-2.0"
] | 7 | 2019-02-10T19:31:09.000Z | 2022-02-08T17:04:17.000Z | mapr/ojai/ojai_query/QueryOp.py | mapr/maprdb-python-client | ea7b7f1fb6c212e76bd799867e272eafd345f2e2 | [
"Apache-2.0"
] | 3 | 2020-05-27T09:52:32.000Z | 2021-09-07T14:16:43.000Z | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import *
from aenum import Enum
class QueryOp(Enum):
LESS = "$lt"
LESS_OR_... | 17.791667 | 39 | 0.737705 |
6962bce14a1ad8fff06af0756f0987ee3db3a65b | 7,445 | py | Python | backbone_nets/mobilenetv2_backbone.py | david1309/SynergyNet_bonseyes | 9d675f6e0c78222e1fa55e6598c3d11aa5dc799b | [
"MIT"
] | null | null | null | backbone_nets/mobilenetv2_backbone.py | david1309/SynergyNet_bonseyes | 9d675f6e0c78222e1fa55e6598c3d11aa5dc799b | [
"MIT"
] | null | null | null | backbone_nets/mobilenetv2_backbone.py | david1309/SynergyNet_bonseyes | 9d675f6e0c78222e1fa55e6598c3d11aa5dc799b | [
"MIT"
] | null | null | null | import torch
from torch import nn
from torch.hub import load_state_dict_from_url
__all__ = ['MobileNetV2', 'mobilenet_v2']
model_urls = {
'mobilenet_v2': 'https://download.pytorch.org/models/mobilenet_v2-b0353104.pth',
}
def _make_divisible(v, divisor, min_value=None):
"""
This function is taken from t... | 35.117925 | 116 | 0.601343 |
fa3091a7e0aa94edcb8420e4aefae5bb2d85a8de | 4,041 | py | Python | timepiece/contracts/migrations/0001_initial.py | sha-red/django-timepiece | 52515dec027664890efbc535429e1ba1ee152f40 | [
"MIT"
] | 244 | 2015-01-08T11:06:52.000Z | 2022-03-24T14:59:26.000Z | timepiece/contracts/migrations/0001_initial.py | skampala1/django-timepiece | 52515dec027664890efbc535429e1ba1ee152f40 | [
"MIT"
] | 80 | 2015-01-23T13:45:02.000Z | 2021-11-25T09:17:05.000Z | timepiece/contracts/migrations/0001_initial.py | anfema/django-timepiece | c4594ae053bdb14c1dd7f17f32c6ef1bf0f3b453 | [
"MIT"
] | 109 | 2015-01-24T06:52:56.000Z | 2022-03-29T09:35:06.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='ContractAssignment',
fields=[
('id', models.Aut... | 44.406593 | 173 | 0.537491 |
157e0aebd49f783a4e748dadc160932bf847282f | 458 | py | Python | Scripts/single_points.py | matthewtoholland/Boronic-Acid-Catalysis | e2697831a0056b3aadf9e308d2fd4e0ed7a57bdf | [
"MIT"
] | null | null | null | Scripts/single_points.py | matthewtoholland/Boronic-Acid-Catalysis | e2697831a0056b3aadf9e308d2fd4e0ed7a57bdf | [
"MIT"
] | null | null | null | Scripts/single_points.py | matthewtoholland/Boronic-Acid-Catalysis | e2697831a0056b3aadf9e308d2fd4e0ed7a57bdf | [
"MIT"
] | null | null | null | import os
import glob
import pandas as pd
all_filenames = [i for i in glob.glob('/Users/matthewholland/OneDrive/Oxford/Amide Bond Formation/Data/single_points/*')]
combined_csv = pd.concat([pd.read_csv(f) for f in all_filenames])
combined_csv.to_csv('/Users/matthewholland/OneDrive/Oxford/Amide Bond Formation/Data/a... | 41.636364 | 223 | 0.796943 |
5172a299ee05d856db7e60dc39302a0384c3b014 | 59,854 | py | Python | tables/tests/test_attributes.py | joshmoore/PyTables | 5065497fdc04f07c551c56b8b0280892fcffad03 | [
"BSD-3-Clause"
] | 3 | 2016-03-14T07:49:32.000Z | 2019-08-26T03:10:21.000Z | tables/tests/test_attributes.py | joshmoore/PyTables | 5065497fdc04f07c551c56b8b0280892fcffad03 | [
"BSD-3-Clause"
] | null | null | null | tables/tests/test_attributes.py | joshmoore/PyTables | 5065497fdc04f07c551c56b8b0280892fcffad03 | [
"BSD-3-Clause"
] | 4 | 2020-06-19T00:11:13.000Z | 2021-02-23T09:25:35.000Z | """ This test unit checks node atributes that are persistent (AttributeSet).
"""
import sys
import unittest
import os
import tempfile
import numpy
from numpy.testing import assert_array_equal, assert_almost_equal
from tables.parameters import NODE_CACHE_SLOTS
from tables import *
from tables.tests import common
from ... | 37.130273 | 84 | 0.571791 |
cbe3c90697a8da3be7194240451dcd5c6f1ceea3 | 40,450 | py | Python | pynetstim/coordinates.py | EhsanTadayon/pynetstim | 775ff19a1f1a83d23218fee016a9e1bad5cc164f | [
"MIT"
] | 3 | 2019-09-03T21:08:01.000Z | 2021-05-22T18:41:12.000Z | pynetstim/coordinates.py | EhsanTadayon/pynetstim | 775ff19a1f1a83d23218fee016a9e1bad5cc164f | [
"MIT"
] | null | null | null | pynetstim/coordinates.py | EhsanTadayon/pynetstim | 775ff19a1f1a83d23218fee016a9e1bad5cc164f | [
"MIT"
] | 2 | 2020-02-28T15:59:56.000Z | 2021-02-11T21:07:37.000Z | """
classes to work with coordinates in native, freesurfer and MNI space
"""
import nibabel as nib
import numpy as np
import os
import nipype.pipeline.engine as pe
from nipype import Node, Workflow
from nipype.interfaces.fsl import WarpPoints, Reorient2Std, FLIRT,FNIRT
from nipype.interfaces.freesurfer import MRIConv... | 39.348249 | 226 | 0.563906 |
7b4bd8538a76e2e4eea9b3a1b2908f033206b438 | 6,383 | py | Python | theano/tensor/fourier.py | mdda/Theano | 6ca7b2b65000e371f009b617d41bc5a90f022d38 | [
"BSD-3-Clause"
] | 295 | 2015-09-25T21:15:04.000Z | 2022-01-13T01:16:18.000Z | libs/Theano/theano/tensor/fourier.py | shenshenzhanzhan/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 21 | 2015-10-28T19:06:32.000Z | 2022-03-11T23:13:05.000Z | libs/Theano/theano/tensor/fourier.py | shenshenzhanzhan/attention-lvcsr | 598d487c118e66875fdd625baa84ed29d283b800 | [
"MIT"
] | 114 | 2015-09-26T21:23:02.000Z | 2021-11-19T02:36:41.000Z | import numpy
import math
from theano import gof, tensor
class Fourier(gof.Op):
"""
An instance of this class returns a finite fourier transform calcutated
along one dimension of an input array.
inputs:
a : Array of at least one dimension. Can be complex.
n : Integer, optional. Length of the... | 44.636364 | 80 | 0.573085 |
b8152734b11bf7d14fdc6d71af65103a2719b4d7 | 23,145 | py | Python | depot_tools/recipe_modules/gclient/config.py | bopopescu/MQUIC | 703e944ec981366cfd2528943b1def2c72b7e49d | [
"MIT"
] | 1 | 2018-01-02T15:42:08.000Z | 2018-01-02T15:42:08.000Z | depot_tools/recipe_modules/gclient/config.py | bopopescu/MQUIC | 703e944ec981366cfd2528943b1def2c72b7e49d | [
"MIT"
] | null | null | null | depot_tools/recipe_modules/gclient/config.py | bopopescu/MQUIC | 703e944ec981366cfd2528943b1def2c72b7e49d | [
"MIT"
] | 1 | 2020-07-25T02:05:49.000Z | 2020-07-25T02:05:49.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import types
from recipe_engine.config import config_item_context, ConfigGroup, BadConf
from recipe_engine.config import ConfigList, Dict, Single, Static, S... | 35.498466 | 80 | 0.7027 |
afbc812ae578c1c777d968fd5d61fa0ec8298a1f | 30,167 | py | Python | tests/test_modeling_longformer.py | gp201/transformers | 89f2781e87e92b04303f7f128107718e44e755ed | [
"Apache-2.0"
] | 1 | 2020-11-14T06:08:38.000Z | 2020-11-14T06:08:38.000Z | tests/test_modeling_longformer.py | gp201/transformers | 89f2781e87e92b04303f7f128107718e44e755ed | [
"Apache-2.0"
] | null | null | null | tests/test_modeling_longformer.py | gp201/transformers | 89f2781e87e92b04303f7f128107718e44e755ed | [
"Apache-2.0"
] | 2 | 2020-11-13T09:07:09.000Z | 2020-11-27T01:46:46.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 42.850852 | 119 | 0.647462 |
74501855c5927294d55f392a675088ba65caa086 | 8,890 | py | Python | david/watermark.py | S-I-SVD/Randomized-SVD | 82108238a53c70938af87417f98aadc7f74b2a87 | [
"MIT"
] | 1 | 2021-12-09T13:34:44.000Z | 2021-12-09T13:34:44.000Z | david/watermark.py | S-I-SVD/Randomized-SVD | 82108238a53c70938af87417f98aadc7f74b2a87 | [
"MIT"
] | null | null | null | david/watermark.py | S-I-SVD/Randomized-SVD | 82108238a53c70938af87417f98aadc7f74b2a87 | [
"MIT"
] | null | null | null | import numpy as np
import numpy.linalg as la
import matplotlib.pyplot as plt
import svd_tools as svdt
import scipy as sp
import scipy.sparse
from PIL import Image
'''
Embed a watermark in using the Liu & Tan algorithm
'''
def embed_watermark_liutan(mat, watermark, scale=1):
'''
Embed a watermark in a matrix ... | 45.589744 | 163 | 0.713611 |
8e8ba19e85c168b8587f25848ffa7f4748858d55 | 264 | py | Python | hale_hub/entry_points.py | tantinlala/hale-hub | da2e6d24e3869ee533d2e272ce87b9e7eede9a79 | [
"MIT"
] | null | null | null | hale_hub/entry_points.py | tantinlala/hale-hub | da2e6d24e3869ee533d2e272ce87b9e7eede9a79 | [
"MIT"
] | null | null | null | hale_hub/entry_points.py | tantinlala/hale-hub | da2e6d24e3869ee533d2e272ce87b9e7eede9a79 | [
"MIT"
] | null | null | null | from hale_hub import create_app
from hale_hub.extensions import db
def hale_hub_run():
app = create_app()
app.run(host='0.0.0.0')
def hale_hub_setup():
app = create_app()
with app.app_context():
db.init_app(app)
db.create_all()
| 17.6 | 34 | 0.655303 |
c0831719df66f55a069b5f3626ffca4586cb1758 | 334 | py | Python | solutions/1614_maximum_nesting_depth_of_the_parentheses.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/1614_maximum_nesting_depth_of_the_parentheses.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/1614_maximum_nesting_depth_of_the_parentheses.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | class Solution:
def maxDepth(self, s: str) -> int:
"""String.
Running time: O(n) where n == len(s).
"""
res = 0
n = 0
for i in s:
if i == '(':
n += 1
res = max(res, n)
elif i == ')':
n -= 1
... | 20.875 | 45 | 0.323353 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.