hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e33749578fdd9ea385b7341de972af59efa5bad | 13,852 | py | Python | examples/rough_translated1/translate_clang2.py | JaneliaSciComp/osgpyplusplus | a5ae3f69c7e9101a32d8cc95fe680dab292f75ac | [
"BSD-3-Clause"
] | 17 | 2015-06-01T12:19:46.000Z | 2022-02-12T02:37:48.000Z | examples/rough_translated1/translate_clang2.py | cmbruns/osgpyplusplus | f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75 | [
"BSD-3-Clause"
] | 7 | 2015-07-04T14:36:49.000Z | 2015-07-23T18:09:49.000Z | examples/rough_translated1/translate_clang2.py | cmbruns/osgpyplusplus | f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75 | [
"BSD-3-Clause"
] | 7 | 2015-11-28T17:00:31.000Z | 2020-01-08T07:00:59.000Z | #!/bin/env python
# Module to help convert OpenSceneGraph C++ examples to python
import clang.cindex
from clang.cindex import CursorKind, TokenKind
INDENT_SIZE = 4
# Conversion from C++ to python
punctuation_translator = {
'->': '.',
'::': '.',
'{': '',
'}': '',
',': ', ',
'&': '',
';': ... | 31.553531 | 119 | 0.605761 |
716d33e682a69aa4594ccde258dca526834b947e | 3,754 | py | Python | rest_framework_dynamicjwt/backends.py | harrytwigg/djangorestframework-simplejwt | 92ef223f273ea3d95bbfc8ea1280b629dfdb4425 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | rest_framework_dynamicjwt/backends.py | harrytwigg/djangorestframework-simplejwt | 92ef223f273ea3d95bbfc8ea1280b629dfdb4425 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | rest_framework_dynamicjwt/backends.py | harrytwigg/djangorestframework-simplejwt | 92ef223f273ea3d95bbfc8ea1280b629dfdb4425 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | import jwt
from django.utils.translation import gettext_lazy as _
from jwt import (
InvalidAlgorithmError, InvalidTokenError, PyJWKClient, algorithms,
)
from .exceptions import TokenBackendError
from .models import AuthenticationSettingsModel
from .utils import format_lazy
ALLOWED_ALGORITHMS = (
'HS256',
... | 35.752381 | 108 | 0.638519 |
bd53d9cd44a117de96d9fc088923d35716c46b34 | 2,789 | py | Python | uptrends/models/scheduled_report_file_type.py | hpcc-systems/uptrends-python | 2e05ba851a4e65bde3c40514f499c475465bef90 | [
"BSD-3-Clause"
] | null | null | null | uptrends/models/scheduled_report_file_type.py | hpcc-systems/uptrends-python | 2e05ba851a4e65bde3c40514f499c475465bef90 | [
"BSD-3-Clause"
] | null | null | null | uptrends/models/scheduled_report_file_type.py | hpcc-systems/uptrends-python | 2e05ba851a4e65bde3c40514f499c475465bef90 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Uptrends API v4
This document describes Uptrends API version 4. This Swagger environment also lets you execute API methods directly. Please note that this is not a sandbox environment: these API methods operate directly on your actual Uptrends account. For more information, please visit ... | 29.357895 | 321 | 0.574041 |
bf52663eef0400a16144a668b1ad068a979ca078 | 4,045 | py | Python | skrebate/multisurfstar.py | sauravbose/scikit-rebate | e620798ba5af5cf58fc58bed0e7ac83b12119b66 | [
"MIT"
] | null | null | null | skrebate/multisurfstar.py | sauravbose/scikit-rebate | e620798ba5af5cf58fc58bed0e7ac83b12119b66 | [
"MIT"
] | null | null | null | skrebate/multisurfstar.py | sauravbose/scikit-rebate | e620798ba5af5cf58fc58bed0e7ac83b12119b66 | [
"MIT"
] | 1 | 2018-08-14T00:06:37.000Z | 2018-08-14T00:06:37.000Z | # -*- coding: utf-8 -*-
"""
scikit-rebate was primarily developed at the University of Pennsylvania by:
- Randal S. Olson (rso@randalolson.com)
- Pete Schmitt (pschmitt@upenn.edu)
- Ryan J. Urbanowicz (ryanurb@upenn.edu)
- Weixuan Fu (weixuanf@upenn.edu)
- and many more generous open source contrib... | 42.578947 | 116 | 0.665019 |
c11e7ec0c5a28c1206735966ac190d52c9adf17a | 24,150 | py | Python | analyzer/libs/pygments/pygments/lexers/css.py | oslab-swrc/juxta | 481cd6f01e87790041a07379805968bcf57d75f4 | [
"MIT"
] | 182 | 2017-03-05T07:43:13.000Z | 2022-03-15T13:09:07.000Z | analyzer/libs/pygments/pygments/lexers/css.py | oslab-swrc/juxta | 481cd6f01e87790041a07379805968bcf57d75f4 | [
"MIT"
] | 3 | 2021-05-10T18:59:14.000Z | 2021-09-02T01:50:15.000Z | analyzer/libs/pygments/pygments/lexers/css.py | oslab-swrc/juxta | 481cd6f01e87790041a07379805968bcf57d75f4 | [
"MIT"
] | 16 | 2017-03-07T11:01:27.000Z | 2022-01-08T09:21:01.000Z | # -*- coding: utf-8 -*-
"""
pygments.lexers.css
~~~~~~~~~~~~~~~~~~~
Lexers for CSS and related stylesheet formats.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import copy
from pygments.lexer import ExtendedRegexLexer, R... | 48.396794 | 98 | 0.50323 |
5987dbfe83457f45086e74527842997f9318ece4 | 755 | py | Python | ckanext/qa/interfaces.py | salsadigitalauorg/ckanext-qa | a86f672bce59337daec197b9346ac850e7bdae21 | [
"MIT"
] | null | null | null | ckanext/qa/interfaces.py | salsadigitalauorg/ckanext-qa | a86f672bce59337daec197b9346ac850e7bdae21 | [
"MIT"
] | 4 | 2020-07-30T03:36:34.000Z | 2022-01-10T23:24:44.000Z | ckanext/qa/interfaces.py | salsadigitalauorg/ckanext-qa | a86f672bce59337daec197b9346ac850e7bdae21 | [
"MIT"
] | 1 | 2020-06-29T00:48:05.000Z | 2020-06-29T00:48:05.000Z | import logging
import ckan.plugins as plugins
from ckan.plugins.interfaces import Interface
log = logging.getLogger(__name__)
class IQA(Interface):
"""
Interface for other plugins to hook into and apply their own custom resource score before it's saved
"""
@classmethod
def custom_resource_score... | 29.038462 | 104 | 0.647682 |
c2249c2e5a777ea0ef453b7fb32a67aba038255c | 2,429 | py | Python | bin/basenji_hdf5_sample.py | AndyPJiang/basenji | 64e43570c8bece156b4ab926608014f489b7965e | [
"Apache-2.0"
] | 1 | 2020-05-22T20:53:37.000Z | 2020-05-22T20:53:37.000Z | bin/basenji_hdf5_sample.py | AndyPJiang/basenji | 64e43570c8bece156b4ab926608014f489b7965e | [
"Apache-2.0"
] | null | null | null | bin/basenji_hdf5_sample.py | AndyPJiang/basenji | 64e43570c8bece156b4ab926608014f489b7965e | [
"Apache-2.0"
] | 1 | 2021-02-05T21:01:05.000Z | 2021-02-05T21:01:05.000Z | #!/usr/bin/env python
# Copyright 2017 Calico 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 31.960526 | 132 | 0.568135 |
b02e9fb1a4986e4956f589b5247dddc98a4e5279 | 331 | py | Python | env/lib/python3.6/site-packages/scipy/_distributor_init.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | venv/lib/python3.7/site-packages/scipy/_distributor_init.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | venv/lib/python3.7/site-packages/scipy/_distributor_init.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | """ Distributor init file
Distributors: you can add custom code here to support particular distributions
of scipy.
For example, this is a good place to put any checks for hardware requirements.
The scipy standard source distribution will not put code in this file, so you
can safely replace this file with your own ve... | 30.090909 | 78 | 0.78852 |
c49fb3e4bdb69689e36863934818acfd4d7d8475 | 1,495 | py | Python | license_protected_downloads/tests/test_models.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | license_protected_downloads/tests/test_models.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | license_protected_downloads/tests/test_models.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | __author__ = 'dooferlad'
import unittest
import hashlib
from django.test import TestCase
from license_protected_downloads.models import License
class LicenseTestCase(TestCase):
def setUp(self):
lic1_text = 'Samsung License'
lic2_text = 'Stericsson License'
lic3_text = 'Linaro License'
... | 35.595238 | 74 | 0.669565 |
f6e52d5dda5e1504835139e490623d4cdb6454de | 9,148 | py | Python | blog/models.py | allink/allink-apps | 101a9e2e0129d932970e0ae89f790d2033a7c805 | [
"BSD-3-Clause"
] | 1 | 2017-03-13T08:49:49.000Z | 2017-03-13T08:49:49.000Z | blog/models.py | allink/allink-apps | 101a9e2e0129d932970e0ae89f790d2033a7c805 | [
"BSD-3-Clause"
] | null | null | null | blog/models.py | allink/allink-apps | 101a9e2e0129d932970e0ae89f790d2033a7c805 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from datetime import datetime
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django.core.cache import cache
from filer.fields.image import FilerImageField
from adminsortable.fields import SortableForeignKey
from parler.models import Transla... | 31.763889 | 166 | 0.64648 |
a13ba0ab7b10d29396c60d03d3eddd79945c9752 | 136,945 | py | Python | diana/classes/goatools/test_data/goids_GOATOOLS_Consistent_Increase.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | 3 | 2019-07-11T05:32:13.000Z | 2021-03-12T01:10:21.000Z | diana/classes/goatools/test_data/goids_GOATOOLS_Consistent_Increase.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | null | null | null | diana/classes/goatools/test_data/goids_GOATOOLS_Consistent_Increase.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | 1 | 2019-02-12T13:45:42.000Z | 2019-02-12T13:45:42.000Z | """GOATOOLS GOEA on 2015 Gjoneska data using go-basic.obo: fmt(1.2) rel(2017-01-12) 47,943 GO Terms"""
# Created: 2017-01-13
import collections as cx
nt_fields = [
"p_uncorrected",
"study_count",
"study_n",
"namespace",
"p_fdr_bh",
"study_items",
"NS",
"pop_items",
"pop_n",
"p_... | 1,304.238095 | 10,983 | 0.802687 |
81c2f0fbd5f3786cebea402de87eba7639135ebb | 2,594 | py | Python | tests/envs/test_luby.py | goktug97/DACBench | 953bc8efacdb993889b223110e25f7e453c86b2d | [
"Apache-2.0"
] | 1 | 2021-02-05T16:18:56.000Z | 2021-02-05T16:18:56.000Z | tests/envs/test_luby.py | goktug97/DACBench | 953bc8efacdb993889b223110e25f7e453c86b2d | [
"Apache-2.0"
] | null | null | null | tests/envs/test_luby.py | goktug97/DACBench | 953bc8efacdb993889b223110e25f7e453c86b2d | [
"Apache-2.0"
] | null | null | null | import pytest
import unittest
import numpy as np
from dacbench import AbstractEnv
from dacbench.envs import LubyEnv
from dacbench.benchmarks.luby_benchmark import LUBY_DEFAULTS
class TestLubyEnv(unittest.TestCase):
def make_env(self):
config = LUBY_DEFAULTS
config["instance_set"] = {0: [1, 1]}
... | 34.586667 | 81 | 0.616423 |
d25eaa0f9a4913052690cce737dc218b24b3fb80 | 374 | py | Python | hapi/networks.py | telegnom/pyhapi | 2124fbbf8d67313040bb96a2e2df0ec3cf1a3ab4 | [
"MIT"
] | null | null | null | hapi/networks.py | telegnom/pyhapi | 2124fbbf8d67313040bb96a2e2df0ec3cf1a3ab4 | [
"MIT"
] | null | null | null | hapi/networks.py | telegnom/pyhapi | 2124fbbf8d67313040bb96a2e2df0ec3cf1a3ab4 | [
"MIT"
] | null | null | null | networks = {
'RMV': {'accessId': True,
'longname': 'Rhein-Main-Verkehrsverbund',
'url': 'https://www.rmv.de/hapi/',
'name': 'RMV',
},
'VBB': {'accessId': True,
'longname': 'Verkehrsverbund Berlin-Brandenburg',
'url':'http://fahrinfo.vbb.de/... | 31.166667 | 61 | 0.462567 |
67fc4d3c2fe265db9d14057dbc35cdf3fb417578 | 21,594 | py | Python | synapse/handlers/device.py | Sorunome/synapse | 260b66c01c35d7a5a3c33e73f5b8c5a207cbb903 | [
"Apache-2.0"
] | null | null | null | synapse/handlers/device.py | Sorunome/synapse | 260b66c01c35d7a5a3c33e73f5b8c5a207cbb903 | [
"Apache-2.0"
] | null | null | null | synapse/handlers/device.py | Sorunome/synapse | 260b66c01c35d7a5a3c33e73f5b8c5a207cbb903 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 36.912821 | 88 | 0.599611 |
d319a3b28ec19ecd47d96ec842edd958fbbbea96 | 3,487 | py | Python | accounts/serializers.py | devmohamedwahba/Custom-Api-Login-register | 51ed3914cb16efb52dcb08a9918d5549ddb1afb4 | [
"MIT"
] | null | null | null | accounts/serializers.py | devmohamedwahba/Custom-Api-Login-register | 51ed3914cb16efb52dcb08a9918d5549ddb1afb4 | [
"MIT"
] | null | null | null | accounts/serializers.py | devmohamedwahba/Custom-Api-Login-register | 51ed3914cb16efb52dcb08a9918d5549ddb1afb4 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model, authenticate
from rest_framework import serializers
from rest_framework.exceptions import AuthenticationFailed
from rest_framework_simplejwt.tokens import RefreshToken, TokenError
from django.utils.text import gettext_lazy as _
from .models import PhoneOtp
from django.co... | 37.494624 | 136 | 0.611701 |
2a9b728e07280996bcf90e8237201d8389a11315 | 368 | py | Python | mpl_style_gallery/plot_scripts/streamplot.py | tonysyu/matplotlib-style-gallery | c5aa1164428a822a8898f01a7b6910d86dcddf73 | [
"BSD-3-Clause"
] | 68 | 2015-01-06T08:58:58.000Z | 2021-08-16T22:49:57.000Z | mpl_style_gallery/plot_scripts/streamplot.py | tonysyu/matplotlib-style-gallery | c5aa1164428a822a8898f01a7b6910d86dcddf73 | [
"BSD-3-Clause"
] | 3 | 2015-01-09T01:50:48.000Z | 2016-03-29T08:57:52.000Z | mpl_style_gallery/plot_scripts/streamplot.py | tonysyu/matplotlib-style-gallery | c5aa1164428a822a8898f01a7b6910d86dcddf73 | [
"BSD-3-Clause"
] | 14 | 2015-01-08T23:09:30.000Z | 2021-05-13T08:17:30.000Z | import numpy as np
import matplotlib.pyplot as plt
L = 3
Y, X = np.mgrid[-L:L:100j, -L:L:100j]
U = -1 - X**2 + Y
V = 1 + X - Y**2
speed = np.sqrt(U*U + V*V)
plt.imshow(speed, extent=[-L, L, -L, L], alpha=0.5)
plt.colorbar(label='speed')
plt.streamplot(X, Y, U, V, linewidth=0.2*speed)
plt.title('Streamlines')
plt.xl... | 18.4 | 51 | 0.622283 |
9ebfb1d202a8e12d5bc256f65e530274887cabd1 | 736 | py | Python | blog/migrations/0005_auto_20210629_2245.py | open-apprentice/ellieplatform-website | 3018feb05a2a44b916afba3e8e2eb71c18147117 | [
"MIT"
] | 1 | 2021-06-26T22:18:31.000Z | 2021-06-26T22:18:31.000Z | blog/migrations/0005_auto_20210629_2245.py | open-apprentice/ellieplatform-website | 3018feb05a2a44b916afba3e8e2eb71c18147117 | [
"MIT"
] | 12 | 2021-06-26T22:38:45.000Z | 2021-07-07T15:49:43.000Z | blog/migrations/0005_auto_20210629_2245.py | open-apprentice/ellieplatform-website | 3018feb05a2a44b916afba3e8e2eb71c18147117 | [
"MIT"
] | 1 | 2021-07-07T15:33:43.000Z | 2021-07-07T15:33:43.000Z | # Generated by Django 3.2.4 on 2021-06-29 20:45
from django.db import migrations, models
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '0003_taggeditem_add_unique_index'),
('blog', '0004_auto_20210629_2241'),
]
operations = [
migration... | 28.307692 | 162 | 0.619565 |
5242693e2b635502c04919aa7771f5a4788e0e16 | 985 | py | Python | src/test.py | PavelSurgai/Convolutional_cifar100 | bfaef779cc2a78f0d61407a5762b48e2bb565979 | [
"Unlicense"
] | null | null | null | src/test.py | PavelSurgai/Convolutional_cifar100 | bfaef779cc2a78f0d61407a5762b48e2bb565979 | [
"Unlicense"
] | null | null | null | src/test.py | PavelSurgai/Convolutional_cifar100 | bfaef779cc2a78f0d61407a5762b48e2bb565979 | [
"Unlicense"
] | null | null | null | import numpy
from keras.datasets import cifar100
from keras.models import Sequential
from keras.layers import Dense, Flatten
from keras.layers import Dropout
from keras.layers.convolutional import Conv2D
from keras.utils import np_utils
from keras.optimizers import SGD
import sys
from keras.models import load_model
# ... | 26.621622 | 69 | 0.737056 |
5874d1888597fc09b745d71222e2f7ad90ab51d3 | 1,851 | py | Python | src/tests/unit/security/session/manager.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/tests/unit/security/session/manager.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/tests/unit/security/session/manager.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
session manager module.
"""
from pyrin.security.session.manager import SessionManager as BaseSessionManager
from tests.unit.application.structs import CoreRequestMock
from tests.unit.security.session import SessionPackage
class SessionManager(BaseSessionManager):
"""
session mana... | 23.1375 | 79 | 0.638574 |
71786b2751fdc765f7483b98faf9c26897c6fbc7 | 3,230 | py | Python | app.py | Ho-Lab-Colostate/zhunt | d6277817d332e87f2b24a0a27f9f414d9a853365 | [
"MIT"
] | 4 | 2020-04-16T15:36:31.000Z | 2021-08-23T06:40:39.000Z | app.py | Ho-Lab-Colostate/zhunt | d6277817d332e87f2b24a0a27f9f414d9a853365 | [
"MIT"
] | 6 | 2020-04-16T16:42:54.000Z | 2020-04-28T19:03:38.000Z | app.py | Ho-Lab-Colostate/zhunt | d6277817d332e87f2b24a0a27f9f414d9a853365 | [
"MIT"
] | 1 | 2020-12-02T02:30:34.000Z | 2020-12-02T02:30:34.000Z | from flask import Flask, render_template, request, redirect, url_for, send_file, send_from_directory
import os #Needed for the GUI portion
import argparse
import subprocess #Needed to call on the C program
from werkzeug.utils import secure_filename
import smtplib
from string import Template
from datetime import date, ... | 35.108696 | 100 | 0.632198 |
24b1c75768a7f24fa25b7a3dbf332e302e284ec5 | 518 | py | Python | Gathered CTF writeups/ctf-7867/2020/cyber_security_rumble/babypwn/baby-pwn-for-download/docker/main_old.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:00:41.000Z | 2022-03-27T06:00:41.000Z | Gathered CTF writeups/ctf-7867/2020/cyber_security_rumble/babypwn/baby-pwn-for-download/docker/main_old.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | null | null | null | Gathered CTF writeups/ctf-7867/2020/cyber_security_rumble/babypwn/baby-pwn-for-download/docker/main_old.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:01:42.000Z | 2022-03-27T06:01:42.000Z | def jump_to_flag():
# This would work if PIE was disabled
total_padding = 120
flag_text_padding = 112
payload = b'12345678' + b'\0'
padding = flag_text_padding - len(payload)
payload += b'A' * padding
flag_text_addr = 0x7fffffffce6d # +1 byte because it may have been overwritten?
pay... | 23.545455 | 83 | 0.673745 |
59d3860032cfff509eae642aaba92608503d829a | 14,054 | py | Python | pandas/computation/ops.py | nipunreddevil/pandas | 08b1b3edf9d470e804226927701954a39a73ab98 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2021-07-06T23:36:28.000Z | 2021-07-06T23:36:28.000Z | pandas/computation/ops.py | zouguangxian/pandas | 034c99491eddaed6964be6aabb727a4bbc24a71c | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/computation/ops.py | zouguangxian/pandas | 034c99491eddaed6964be6aabb727a4bbc24a71c | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | """Operator classes for eval.
"""
import re
import operator as op
from functools import partial
from itertools import product, islice, chain
from datetime import datetime
import numpy as np
import pandas as pd
from pandas.compat import PY3, string_types, text_type
import pandas.core.common as com
from pandas.core.ba... | 28.623218 | 79 | 0.569944 |
66e01fc5601d631a0208749750d68aa4fb98894e | 2,099 | py | Python | Python/examples/AdvancedParallelPressureControl.py | william-richards-idexx/fgt-SDK | 674b572c714302be561b08ba63ff3358dfa13cea | [
"Apache-2.0"
] | 20 | 2019-05-21T17:43:07.000Z | 2022-03-22T16:38:59.000Z | Python/examples/AdvancedParallelPressureControl.py | william-richards-idexx/fgt-SDK | 674b572c714302be561b08ba63ff3358dfa13cea | [
"Apache-2.0"
] | 28 | 2019-05-21T17:36:24.000Z | 2022-03-21T07:21:51.000Z | Python/examples/AdvancedParallelPressureControl.py | william-richards-idexx/fgt-SDK | 674b572c714302be561b08ba63ff3358dfa13cea | [
"Apache-2.0"
] | 7 | 2020-09-18T23:47:25.000Z | 2022-03-03T09:36:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Advanced Parallel Pressure Control example
This example shows how to send concurrent pressure orders using threads.
The Dll handles parallel calls, functions can be called simultaneously.
This demonstrates thread handling, same result is obtained using
successive calls... | 33.854839 | 94 | 0.748928 |
bad184fde54486ffd714535f63c6d96a3f4a4732 | 14,674 | py | Python | util/topgen/merge.py | ladmangesh805/opentitan | f4126a4a2eab29f6621aced2bcfd912149ebdf2d | [
"Apache-2.0"
] | 1 | 2019-12-24T02:10:12.000Z | 2019-12-24T02:10:12.000Z | util/topgen/merge.py | BharathS11/opentitan | bfaf88058776f23428b317aad90ae93b822d6747 | [
"Apache-2.0"
] | null | null | null | util/topgen/merge.py | BharathS11/opentitan | bfaf88058776f23428b317aad90ae93b822d6747 | [
"Apache-2.0"
] | null | null | null | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import logging as log
from copy import deepcopy
from functools import partial
from .lib import *
import hjson
def amend_ip(top, ip):
""" Amend additional informati... | 33.578947 | 82 | 0.54893 |
3a3a0ea1ef3c2497ce3d433d0c7a93e58357790b | 30,913 | py | Python | alembic/versions/1c7c31b1c31d_cbs_modify_tables_and_add_dictionaries.py | idosavion/anyway | ad88df478946722a95379eb85ba4b913de38111a | [
"BSD-3-Clause"
] | 1 | 2020-07-16T16:51:17.000Z | 2020-07-16T16:51:17.000Z | alembic/versions/1c7c31b1c31d_cbs_modify_tables_and_add_dictionaries.py | idosavion/anyway | ad88df478946722a95379eb85ba4b913de38111a | [
"BSD-3-Clause"
] | 5 | 2020-07-30T08:30:04.000Z | 2021-06-25T15:39:48.000Z | alembic/versions/1c7c31b1c31d_cbs_modify_tables_and_add_dictionaries.py | idosavion/anyway | ad88df478946722a95379eb85ba4b913de38111a | [
"BSD-3-Clause"
] | null | null | null | """cbs_modify_tables_and_add_dictionaries
Revision ID: 1c7c31b1c31d
Revises: 56b95d5826c
Create Date: 2018-09-30 01:10:18.193297
"""
# revision identifiers, used by Alembic.
revision = '1c7c31b1c31d'
down_revision = '56b95d5826c'
branch_labels = None
depends_on = None
import sqlalchemy as sa
from alembic import op... | 56.930018 | 116 | 0.622392 |
3628ecfddbb23bb365f08b2666afe97661500eb4 | 9,351 | py | Python | rads/utility.py | ccarocean/python-rads | fec1cfccbdafb7e372b66a76132c59f3d2a6beb3 | [
"MIT"
] | null | null | null | rads/utility.py | ccarocean/python-rads | fec1cfccbdafb7e372b66a76132c59f3d2a6beb3 | [
"MIT"
] | 3 | 2019-06-27T19:00:35.000Z | 2020-03-07T09:43:24.000Z | rads/utility.py | ccarocean/python-rads | fec1cfccbdafb7e372b66a76132c59f3d2a6beb3 | [
"MIT"
] | 1 | 2019-05-31T01:04:26.000Z | 2019-05-31T01:04:26.000Z | """Utility functions."""
import datetime
import io
import os
from typing import IO, Any, List, Optional, Union, cast
from wrapt import ObjectProxy # type: ignore
from .constants import EPOCH
from .typing import PathLike, PathLikeOrFile
__all__ = [
"ensure_open",
"filestring",
"isio",
"xor",
"co... | 28.509146 | 79 | 0.595551 |
9d7d4763ff5bcc621d4fd625be1835d42698db6e | 6,866 | py | Python | antistasi_logbook/gui/widgets/data_view_widget/type_fields/standard_type_fields.py | Giddius/Antistasi_Logbook | b2b520db1a54df484984876c7dfdb724703fed77 | [
"MIT"
] | 2 | 2022-01-12T22:45:56.000Z | 2022-03-10T14:23:36.000Z | antistasi_logbook/gui/widgets/data_view_widget/type_fields/standard_type_fields.py | Giddius/Antistasi_Logbook | b2b520db1a54df484984876c7dfdb724703fed77 | [
"MIT"
] | null | null | null | antistasi_logbook/gui/widgets/data_view_widget/type_fields/standard_type_fields.py | Giddius/Antistasi_Logbook | b2b520db1a54df484984876c7dfdb724703fed77 | [
"MIT"
] | null | null | null | """
WiP.
Soon.
"""
# region [Imports]
# * Standard Library Imports ---------------------------------------------------------------------------->
from typing import Mapping, Iterable
from pathlib import Path
from functools import cached_property
# * Qt Imports --------------------------------------------------------... | 30.114035 | 106 | 0.601078 |
b25cf9e04d7613b3566d3f034e53f3a9e08950eb | 280 | py | Python | tools/telemetry/unittest_data/discoverable_classes/discover_dummyclass.py | nagineni/chromium-crosswalk | 5725642f1c67d0f97e8613ec1c3e8107ab53fdf8 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | tools/telemetry/unittest_data/discoverable_classes/discover_dummyclass.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2017-02-14T21:55:58.000Z | 2017-02-14T21:55:58.000Z | tools/telemetry/unittest_data/discoverable_classes/discover_dummyclass.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # Copyright (c) 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.
"""A dummy exception subclass used by core/discover.py's unit tests."""
class DummyException(Exception):
pass
| 31.111111 | 72 | 0.753571 |
0378f19db9f04c5185639e004ae917f3d9e2c2c0 | 1,056 | py | Python | scripts/merge_gps.py | hyaguchi947d/gopro_gps_ui | 3e9184ec0f47193eb3a48485784033ec33bef33e | [
"MIT"
] | 1 | 2019-12-23T10:11:56.000Z | 2019-12-23T10:11:56.000Z | scripts/merge_gps.py | hyaguchi947d/gopro_gps_ui | 3e9184ec0f47193eb3a48485784033ec33bef33e | [
"MIT"
] | null | null | null | scripts/merge_gps.py | hyaguchi947d/gopro_gps_ui | 3e9184ec0f47193eb3a48485784033ec33bef33e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import os
import json
if __name__ == "__main__":
if len(sys.argv) < 4:
print("usage: merge_gps.py <DIR> <PREFIX> <POSTFIX>")
sys.exit(1)
dirname = sys.argv[1]
prefix = sys.argv[2]
postfix = sys.argv[3]
gps_data = {"1":{"streams":{"GPS5":{"samples":[... | 27.789474 | 107 | 0.549242 |
87b717d73ebc4d7fe995ff0dee159c0c7ee3a8a8 | 37 | py | Python | avalon/tools/html_server/__init__.py | Yowza-Animation/avalon-core | 0a423bfb6c92e8c06dcf5cc61ba04494fb0bac85 | [
"MIT"
] | null | null | null | avalon/tools/html_server/__init__.py | Yowza-Animation/avalon-core | 0a423bfb6c92e8c06dcf5cc61ba04494fb0bac85 | [
"MIT"
] | null | null | null | avalon/tools/html_server/__init__.py | Yowza-Animation/avalon-core | 0a423bfb6c92e8c06dcf5cc61ba04494fb0bac85 | [
"MIT"
] | null | null | null | from . import app
__all__ = ["app"]
| 9.25 | 17 | 0.621622 |
41f17858a786f548f26fb87802ac3e2fb2d4d2a3 | 547 | py | Python | manage.py | Madjura/text-entailment | efaf5bd369971f5742eb3bad9ca998af402d0bcb | [
"MIT"
] | null | null | null | manage.py | Madjura/text-entailment | efaf5bd369971f5742eb3bad9ca998af402d0bcb | [
"MIT"
] | null | null | null | manage.py | Madjura/text-entailment | efaf5bd369971f5742eb3bad9ca998af402d0bcb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "text_entailment.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Djan... | 34.1875 | 79 | 0.691042 |
0ef0896df8d4460a8c3426fcb91a208a7c6850d6 | 76,989 | py | Python | pandas/core/window/rolling.py | faisal-deepsource/pandas | df91d4a9c9fee61591ebeecc851b50f7df79c83b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-06-01T15:28:21.000Z | 2021-06-01T15:28:21.000Z | pandas/core/window/rolling.py | faisal-deepsource/pandas | df91d4a9c9fee61591ebeecc851b50f7df79c83b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/window/rolling.py | faisal-deepsource/pandas | df91d4a9c9fee61591ebeecc851b50f7df79c83b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
Provide a generic structure to support window functions,
similar to how we have a Groupby object.
"""
from __future__ import annotations
import copy
from datetime import timedelta
from functools import partial
import inspect
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,... | 32.859155 | 100 | 0.561834 |
ae5ff9ef0b8bd7c7c40d733b287bf4ed468292d5 | 5,459 | py | Python | python_modules/dagster/dagster/core/storage/runs/sqlite/sqlite_run_storage.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/dagster/dagster/core/storage/runs/sqlite/sqlite_run_storage.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/dagster/dagster/core/storage/runs/sqlite/sqlite_run_storage.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | import os
from contextlib import contextmanager
from urllib.parse import urljoin, urlparse
import sqlalchemy as db
from dagster import StringSource, check
from dagster.core.storage.sql import (
check_alembic_revision,
create_engine,
get_alembic_config,
handle_schema_errors,
run_alembic_downgrade,
... | 37.390411 | 99 | 0.680528 |
23df582f4ff9b49741bd1a233f57e131163ddf47 | 36,541 | py | Python | TradeAPI.py | Lavabar/rl_trading | 0f021bb348d748e1c4dc04b972c40f9fd7081eed | [
"MIT"
] | 2 | 2018-10-24T17:13:30.000Z | 2021-12-14T17:31:18.000Z | TradeAPI.py | Lavabar/rl_trading | 0f021bb348d748e1c4dc04b972c40f9fd7081eed | [
"MIT"
] | null | null | null | TradeAPI.py | Lavabar/rl_trading | 0f021bb348d748e1c4dc04b972c40f9fd7081eed | [
"MIT"
] | null | null | null | # Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#... | 32.625893 | 143 | 0.64741 |
3fe934c43886f457a7fa86e22a558d84fdaa563f | 7,613 | py | Python | client_turnin.py | bmwanz/cs176bFinal | 08f218621382b2b939d3dbcb5fed5f2a9bd74a8e | [
"Apache-2.0"
] | null | null | null | client_turnin.py | bmwanz/cs176bFinal | 08f218621382b2b939d3dbcb5fed5f2a9bd74a8e | [
"Apache-2.0"
] | null | null | null | client_turnin.py | bmwanz/cs176bFinal | 08f218621382b2b939d3dbcb5fed5f2a9bd74a8e | [
"Apache-2.0"
] | null | null | null | #Chien Kai Wang, Brian Wan, William Chen
#TCP CHAT CLIENT
import pyaudio
import sys
import socket
import select
import time
from array import array
from struct import pack
msgType = 0
check = 0
receive = 0
ALPHA_LOWER = ['a', 'b', 'c', 'd', 'e', 'f', 'g', ' ', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', ... | 32.67382 | 469 | 0.442795 |
d766adc9be5d559e1bebe0ae8ac2f5371a406d53 | 2,643 | py | Python | repos/system_upgrade/el7toel8/actors/checkbtrfs/actor.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | 21 | 2018-11-20T15:58:39.000Z | 2022-03-15T19:57:24.000Z | repos/system_upgrade/el7toel8/actors/checkbtrfs/actor.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | 732 | 2018-11-21T18:33:26.000Z | 2022-03-31T16:16:24.000Z | repos/system_upgrade/el7toel8/actors/checkbtrfs/actor.py | sm00th/leapp-repository | 1c171ec3a5f9260a3c6f84a9b15cad78a875ac61 | [
"Apache-2.0"
] | 85 | 2018-11-20T17:55:00.000Z | 2022-03-29T09:40:31.000Z | from leapp.actors import Actor
from leapp.models import ActiveKernelModulesFacts
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
from leapp import reporting
from leapp.reporting import Report, create_report
class CheckBtrfs(Actor):
"""
Check if Btrfs filesystem is in use. If yes, inhibit the upgrade pro... | 51.823529 | 297 | 0.601589 |
58b9bbf71a6f16dee4cfca5d095669e15471c7af | 504 | py | Python | src/gen_lookup_table.py | nico/n2 | 788c128ab0d570a6957209f922c0e56b848995e3 | [
"Apache-2.0"
] | null | null | null | src/gen_lookup_table.py | nico/n2 | 788c128ab0d570a6957209f922c0e56b848995e3 | [
"Apache-2.0"
] | null | null | null | src/gen_lookup_table.py | nico/n2 | 788c128ab0d570a6957209f922c0e56b848995e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# See parse.rs: is_ident_char().
ident_chars = ['az', 'AZ', '09', '_', '-', '.']
path_chars = ['az', 'AZ', '09', '_', '-', '.', '/', ',', '+']
chars = path_chars
tab = [0 for _ in range(256)]
for span in path_chars:
if len(span) > 1:
for c in range(ord(span[0]), ord(span[1])+1):
ta... | 24 | 61 | 0.519841 |
645ce217ded40c43b9220911d845c80030f3ca90 | 30,229 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_public_ip_prefixes_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_public_ip_prefixes_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_public_ip_prefixes_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 50.214286 | 200 | 0.670912 |
fd474499b8fc98b4cec0f3e514df02e6695a3827 | 160,204 | py | Python | odoo/custom/src/private/purchase_product_uos/_patch/addons/stock/stock.py | ecosoft-odoo/mh-doodba | 093f14850aaff337951b4829b24bf32eee6e6d40 | [
"BSL-1.0"
] | 1 | 2021-10-03T08:11:18.000Z | 2021-10-03T08:11:18.000Z | odoo/custom/src/private/purchase_product_uos/_patch/addons/stock/stock.py | ecosoft-odoo/mh-doodba | 093f14850aaff337951b4829b24bf32eee6e6d40 | [
"BSL-1.0"
] | null | null | null | odoo/custom/src/private/purchase_product_uos/_patch/addons/stock/stock.py | ecosoft-odoo/mh-doodba | 093f14850aaff337951b4829b24bf32eee6e6d40 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | 51.795668 | 343 | 0.588281 |
12db7730b345b452b1854f30af2881dd6d72ee41 | 1,180 | py | Python | apps/iam/serializers.py | iSecloud/bk-process-config-manager | f44c01b7a28dd9328cce6e6066eae42d5365070d | [
"MIT"
] | 8 | 2021-07-08T06:53:57.000Z | 2022-03-14T04:05:27.000Z | apps/iam/serializers.py | iSecloud/bk-process-config-manager | f44c01b7a28dd9328cce6e6066eae42d5365070d | [
"MIT"
] | 107 | 2021-07-22T02:20:07.000Z | 2022-03-14T08:37:23.000Z | apps/iam/serializers.py | iSecloud/bk-process-config-manager | f44c01b7a28dd9328cce6e6066eae42d5365070d | [
"MIT"
] | 12 | 2021-07-09T08:59:01.000Z | 2022-03-08T13:40:41.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸 (Blueking) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may... | 53.636364 | 115 | 0.779661 |
80d17aa8059814956657ca819147673516cfdb52 | 13,211 | py | Python | niftynet/application/autoencoder_application.py | Min-Sheng/NiftyNet | 13ff54018d3ea282b94af94b6bce7bd67c0d7cc5 | [
"Apache-2.0"
] | null | null | null | niftynet/application/autoencoder_application.py | Min-Sheng/NiftyNet | 13ff54018d3ea282b94af94b6bce7bd67c0d7cc5 | [
"Apache-2.0"
] | null | null | null | niftynet/application/autoencoder_application.py | Min-Sheng/NiftyNet | 13ff54018d3ea282b94af94b6bce7bd67c0d7cc5 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from niftynet.application.base_application import BaseApplication
from niftynet.engine.application_factory import ApplicationNetFactory
from niftynet.engine.application_factory import OptimiserFactory
from niftynet.engine.application_variables import CONSOLE
from niftynet.engine.application_var... | 47.351254 | 81 | 0.604118 |
708951979ca90ab8aaf18154481b00b683ee195d | 4,575 | py | Python | featuremap/featuremap_hd2.py | tshuangbl/kite_hd2 | d9ea96b57e1244de4c8c84e20f3be217d97235d4 | [
"BSD-2-Clause"
] | null | null | null | featuremap/featuremap_hd2.py | tshuangbl/kite_hd2 | d9ea96b57e1244de4c8c84e20f3be217d97235d4 | [
"BSD-2-Clause"
] | null | null | null | featuremap/featuremap_hd2.py | tshuangbl/kite_hd2 | d9ea96b57e1244de4c8c84e20f3be217d97235d4 | [
"BSD-2-Clause"
] | null | null | null | import argparse
import csv
import os
from collections import OrderedDict
parser=argparse.ArgumentParser()
parser.add_argument("FeatureRefCSV", help="path to csv file with whitelist Feature Barcodes")
parser.add_argument("--t2g", help="path to output t2g file, default ./FeaturesMismatch.t2g", default="./FeaturesMismatc... | 41.590909 | 138 | 0.574863 |
7d3dea5cb0522d983b9934647f8d4b38f6f2c435 | 3,471 | py | Python | node/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py | Smohamedl/hospitalsystem | 499179ea1a79ad3edb1127a774ef1b8c7bbd9b94 | [
"MIT"
] | null | null | null | node/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py | Smohamedl/hospitalsystem | 499179ea1a79ad3edb1127a774ef1b8c7bbd9b94 | [
"MIT"
] | 2 | 2020-03-31T03:57:26.000Z | 2022-01-21T23:34:00.000Z | node/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py | Smohamedl/hospitalsystem | 499179ea1a79ad3edb1127a774ef1b8c7bbd9b94 | [
"MIT"
] | null | null | null | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""gypd output module
This module produces gyp input as its output. Output files are given the
.gypd extension to avoid overwriting the .gyp files that they are ... | 36.536842 | 78 | 0.755978 |
873914076cc3f270264886e30a2ef0b53410b761 | 51 | py | Python | src/external/__init__.py | atonlife/aTeam | fac686c3a746e80f1978fee72d1c0c346f620f85 | [
"Apache-2.0"
] | null | null | null | src/external/__init__.py | atonlife/aTeam | fac686c3a746e80f1978fee72d1c0c346f620f85 | [
"Apache-2.0"
] | 1 | 2021-04-09T07:20:04.000Z | 2021-04-23T08:18:39.000Z | src/external/__init__.py | atonlife/ateam | fac686c3a746e80f1978fee72d1c0c346f620f85 | [
"Apache-2.0"
] | null | null | null | __all__ = [
'cli',
'config',
'jira',
]
| 8.5 | 13 | 0.392157 |
638bd96c0de26fe078992983fe229b1cab585ede | 1,875 | py | Python | salt/states/disk.py | Achimh3011/salt | b6e6968c22f840df0d43bea7e99c188c623b850b | [
"Apache-2.0"
] | null | null | null | salt/states/disk.py | Achimh3011/salt | b6e6968c22f840df0d43bea7e99c188c623b850b | [
"Apache-2.0"
] | null | null | null | salt/states/disk.py | Achimh3011/salt | b6e6968c22f840df0d43bea7e99c188c623b850b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Disk monitoring state
Monitor the state of disk resources
'''
from __future__ import absolute_import
# Import salt libs
from six import string_types
__monitor__ = [
'status',
]
def status(name, maximum=None, minimum=None):
'''
Return the current disk usage stats ... | 28.846154 | 75 | 0.5472 |
5727a4f16a4551bce49f1f3308a9dd7f9e63795d | 494 | py | Python | examples/the_weather.py | louisronron/ColorFunk | aef341bed941b2e9d63abc64ab7b02348a271583 | [
"MIT"
] | null | null | null | examples/the_weather.py | louisronron/ColorFunk | aef341bed941b2e9d63abc64ab7b02348a271583 | [
"MIT"
] | null | null | null | examples/the_weather.py | louisronron/ColorFunk | aef341bed941b2e9d63abc64ab7b02348a271583 | [
"MIT"
] | 1 | 2020-05-30T08:26:46.000Z | 2020-05-30T08:26:46.000Z | # import modules
from colorexlib.colorex import ColorExGrid
# set tile grid options
options = dict()
options['source'] = ['data\\the_weather.csv', 'csv']
options['title'] = 'Weather Data 2017'
options['subtitle'] = 'The general weather data for year 2017'
options['theme'] = 'themes\\barbie.cxt'
# create Co... | 29.058824 | 63 | 0.714575 |
e7d8054be978b8c41cd948b8c248fe8209556b71 | 684 | py | Python | model_training.py | avaidsr/WOTBot | 1d4d4d39859470d8ab032a5641d369f6cb919f94 | [
"MIT"
] | null | null | null | model_training.py | avaidsr/WOTBot | 1d4d4d39859470d8ab032a5641d369f6cb919f94 | [
"MIT"
] | null | null | null | model_training.py | avaidsr/WOTBot | 1d4d4d39859470d8ab032a5641d369f6cb919f94 | [
"MIT"
] | null | null | null |
from model import load_data, NeuralNetwork
input_size = 120 * 320
data_path = "training_data/*.npz"
X_train, X_valid, y_train, y_valid = load_data(input_size, data_path)
# train a neural network
layer_sizes = [input_size, 32, 4]
nn = NeuralNetwork()
nn.create(layer_sizes)
nn.train(X_train, y_train)
# evaluate on t... | 26.307692 | 76 | 0.755848 |
605aef78222041530639c99acbacb9ac3603c918 | 14,816 | py | Python | EPro-PnP-6DoF/lib/test.py | Lakonik/EPro-PnP | 931df847190ce10eddd1dc3e3168ce1a2f295ffa | [
"Apache-2.0"
] | 19 | 2022-03-21T10:22:24.000Z | 2022-03-30T15:43:46.000Z | EPro-PnP-6DoF/lib/test.py | Lakonik/EPro-PnP | 931df847190ce10eddd1dc3e3168ce1a2f295ffa | [
"Apache-2.0"
] | null | null | null | EPro-PnP-6DoF/lib/test.py | Lakonik/EPro-PnP | 931df847190ce10eddd1dc3e3168ce1a2f295ffa | [
"Apache-2.0"
] | 3 | 2022-03-26T08:08:24.000Z | 2022-03-30T11:17:11.000Z | """
Copyright (C) 2010-2021 Alibaba Group Holding Limited.
This file is modified from
https://github.com/LZGMatrix/CDPN_ICCV2019_ZhigangLi
"""
import math
import torch
import numpy as np
import os, sys
from utils.utils import AverageMeter
from utils.eval import calc_all_errs, Evaluation
from utils.img import im_norm_2... | 47.793548 | 174 | 0.592333 |
767877fadf66cdcee14de25694d09ceac5742333 | 9,000 | py | Python | segmentation_models/models/unet.py | AllWashedOut/segmentation_models | af85e3130195d3058f8d78cbdc521be84fdc7b16 | [
"MIT"
] | null | null | null | segmentation_models/models/unet.py | AllWashedOut/segmentation_models | af85e3130195d3058f8d78cbdc521be84fdc7b16 | [
"MIT"
] | null | null | null | segmentation_models/models/unet.py | AllWashedOut/segmentation_models | af85e3130195d3058f8d78cbdc521be84fdc7b16 | [
"MIT"
] | 2 | 2021-04-09T10:31:21.000Z | 2021-09-06T09:38:29.000Z | from keras_applications import get_submodules_from_kwargs
from ._common_blocks import Conv2dBn
from ._utils import freeze_model, filter_keras_submodules
from ..backbones.backbones_factory import Backbones
backend = None
layers = None
models = None
keras_utils = None
# -----------------------------------------------... | 34.090909 | 122 | 0.607778 |
6bdc658add03d8cea96ca87f7fbefbb86dc859f2 | 9,968 | py | Python | Lib/code.py | jasonadu/Python-2.5 | 93e24b88564de120b1296165b5c55975fdcb8a3c | [
"PSF-2.0"
] | 69 | 2015-01-16T13:12:55.000Z | 2022-02-14T12:55:27.000Z | Lib/code.py | jasonadu/Python-2.5 | 93e24b88564de120b1296165b5c55975fdcb8a3c | [
"PSF-2.0"
] | 3 | 2019-07-19T18:02:02.000Z | 2021-04-25T06:35:42.000Z | Lib/code.py | jasonadu/Python-2.5 | 93e24b88564de120b1296165b5c55975fdcb8a3c | [
"PSF-2.0"
] | 32 | 2015-02-06T12:10:32.000Z | 2019-06-18T03:21:36.000Z | """Utilities needed to emulate Python's interactive interpreter.
"""
# Inspired by similar code by Jeff Epler and Fredrik Lundh.
import sys
import traceback
from codeop import CommandCompiler, compile_command
__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact",
"compile_command"]
def ... | 32.363636 | 87 | 0.607043 |
cf76beb2ad88dab5fe01827897783ef548087649 | 131,881 | py | Python | cinder/tests/test_vmware_vmdk.py | yanheven/cinder | 89797971f30d547acbf715fea099c52d90966d1f | [
"Apache-2.0"
] | null | null | null | cinder/tests/test_vmware_vmdk.py | yanheven/cinder | 89797971f30d547acbf715fea099c52d90966d1f | [
"Apache-2.0"
] | null | null | null | cinder/tests/test_vmware_vmdk.py | yanheven/cinder | 89797971f30d547acbf715fea099c52d90966d1f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 46.160658 | 79 | 0.633988 |
84d9dd396156f2c7d2b6b9402c6d03729e7f2a63 | 1,214 | py | Python | Codes/python/py1/exsaula3 (2)/ex6.py | Gaazedo/portfolio | 4b09b6fffc6947375a20fee1c5523a12cbcbe970 | [
"MIT"
] | null | null | null | Codes/python/py1/exsaula3 (2)/ex6.py | Gaazedo/portfolio | 4b09b6fffc6947375a20fee1c5523a12cbcbe970 | [
"MIT"
] | null | null | null | Codes/python/py1/exsaula3 (2)/ex6.py | Gaazedo/portfolio | 4b09b6fffc6947375a20fee1c5523a12cbcbe970 | [
"MIT"
] | null | null | null | import random
def contem(v, qtd, e):
for i in range(qtd):
if v[i] == e:
return True
return False
def gerar(v1, v2):
qtd_v1 = 0
qtd_v2 = 0
n = (len(v1) + len(v2)) * 5
while (qtd_v1 < len(v1)):
e = random.randint(1, n)
if not contem(v1, qtd_v1, e) and not contem(v2, qtd_v2, e):
v1[q... | 19.580645 | 81 | 0.558484 |
e0f532152f049941c23edc3f8751b666ecd68277 | 45,226 | py | Python | lib/sqlalchemy/ext/automap.py | josteinl/sqlalchemy | 9e7c068d669b209713da62da5748579f92d98129 | [
"MIT"
] | null | null | null | lib/sqlalchemy/ext/automap.py | josteinl/sqlalchemy | 9e7c068d669b209713da62da5748579f92d98129 | [
"MIT"
] | null | null | null | lib/sqlalchemy/ext/automap.py | josteinl/sqlalchemy | 9e7c068d669b209713da62da5748579f92d98129 | [
"MIT"
] | null | null | null | # ext/automap.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
r"""Define an extension to the :mod:`sqlalchemy.ext.declarative` system
which automa... | 36.88907 | 84 | 0.663004 |
c376e76dbdcf98412097511fdc5487daecfc3483 | 2,026 | py | Python | ifttt_bme280.py | KeitetsuWorks/ifttt_bme280 | b4d27a444d09a1a60eca8b0322eff41396ea9970 | [
"MIT"
] | null | null | null | ifttt_bme280.py | KeitetsuWorks/ifttt_bme280 | b4d27a444d09a1a60eca8b0322eff41396ea9970 | [
"MIT"
] | null | null | null | ifttt_bme280.py | KeitetsuWorks/ifttt_bme280 | b4d27a444d09a1a60eca8b0322eff41396ea9970 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
## @file ifttt_bme280.py
## @brief Script to send BME280 data to IFTTT server
## @author Keitetsu
## @date 2018/12/02
## @copyright Copyright (c) 2018 Keitetsu
## @par License
## This software is released under the MIT Lic... | 26.311688 | 90 | 0.633761 |
b71622eb2aef9f4cb99810b841bd3e3859fba695 | 483 | py | Python | api/migrations/0003_container_prev_art.py | maravger/edgy-controller | 140bf952fcc43bbba344f169c782132d500e1343 | [
"MIT"
] | 1 | 2021-01-10T22:16:10.000Z | 2021-01-10T22:16:10.000Z | api/migrations/0003_container_prev_art.py | maravger/edgy-controller | 140bf952fcc43bbba344f169c782132d500e1343 | [
"MIT"
] | 8 | 2018-05-10T13:27:47.000Z | 2022-01-13T00:42:56.000Z | api/migrations/0003_container_prev_art.py | maravger/edgy-controller | 140bf952fcc43bbba344f169c782132d500e1343 | [
"MIT"
] | 2 | 2018-03-26T15:08:19.000Z | 2019-05-13T18:03:24.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-04-24 14:31
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0002_auto_20180424_1428'),
]
operations = [
migrations.AddField(
... | 23 | 83 | 0.627329 |
b7c181c137e3cd0ed9d11de8bcc904ee3a943755 | 139 | py | Python | filepart/split.py | UnknownPlayer78/filepart | 0ebb3a4428b1d415185b13be24034f688ac6185b | [
"MIT"
] | 1 | 2020-01-18T14:13:43.000Z | 2020-01-18T14:13:43.000Z | filepart/split.py | UnknownPlayer78/filepart | 0ebb3a4428b1d415185b13be24034f688ac6185b | [
"MIT"
] | null | null | null | filepart/split.py | UnknownPlayer78/filepart | 0ebb3a4428b1d415185b13be24034f688ac6185b | [
"MIT"
] | null | null | null | class Splitter:
def __init__(self, file, parts, output="./"):
print(file, parts, output)
def split(self):
pass | 23.166667 | 49 | 0.568345 |
ab39ff63d5bbe250f778c31a4e286c2515c48934 | 1,683 | py | Python | spyne/test/interop/test_msgpackrpc_client_http.py | edustaff/spyne | 27f2061325d29a55803fb47b1b37978ab21ea240 | [
"BSD-3-Clause"
] | 786 | 2015-01-04T10:46:28.000Z | 2022-03-31T19:24:35.000Z | spyne/test/interop/test_msgpackrpc_client_http.py | edustaff/spyne | 27f2061325d29a55803fb47b1b37978ab21ea240 | [
"BSD-3-Clause"
] | 248 | 2015-01-01T21:52:47.000Z | 2022-03-09T08:55:04.000Z | spyne/test/interop/test_msgpackrpc_client_http.py | edustaff/spyne | 27f2061325d29a55803fb47b1b37978ab21ea240 | [
"BSD-3-Clause"
] | 210 | 2015-01-10T14:20:31.000Z | 2022-03-09T08:38:43.000Z | #!/usr/bin/env python
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | 36.586957 | 88 | 0.733214 |
59d20cc5b8d7daa3488a2f9023ebed0ef2a79c69 | 20,101 | py | Python | src/lib/opts.py | nrupatunga/CenterNet | 53806f68295062868953081063cd2f82e92f3d4a | [
"MIT"
] | null | null | null | src/lib/opts.py | nrupatunga/CenterNet | 53806f68295062868953081063cd2f82e92f3d4a | [
"MIT"
] | null | null | null | src/lib/opts.py | nrupatunga/CenterNet | 53806f68295062868953081063cd2f82e92f3d4a | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import argparse
import os
import sys
class opts(object):
def __init__(self):
self.parser = argparse.ArgumentParser()
# basic experiment setting
self.parser.add_argument('task', default='ctdet',
... | 55.071233 | 120 | 0.518631 |
6cf6bd8bcffd0df7b1b160f84783f1c11483d17b | 5,446 | py | Python | mezzanine/conf/forms.py | duboviy/mezzanine | cf6c79cd8f1c817416cc210c22232fa6ecc7dd82 | [
"BSD-2-Clause"
] | 3 | 2019-05-14T13:43:26.000Z | 2021-11-09T11:27:16.000Z | mezzanine/conf/forms.py | duboviy/mezzanine | cf6c79cd8f1c817416cc210c22232fa6ecc7dd82 | [
"BSD-2-Clause"
] | 9 | 2020-03-24T16:20:31.000Z | 2022-03-11T23:32:38.000Z | mezzanine/conf/forms.py | duboviy/mezzanine | cf6c79cd8f1c817416cc210c22232fa6ecc7dd82 | [
"BSD-2-Clause"
] | 2 | 2019-11-12T14:09:39.000Z | 2019-11-12T14:11:16.000Z | from __future__ import unicode_literals
from future.builtins import int
from collections import defaultdict
from django import forms
from django.utils.safestring import mark_safe
from django.utils.translation import activate, get_language, ugettext_lazy as _
from django.template.defaultfilters import urlize
from mez... | 37.558621 | 79 | 0.557657 |
0605a016075ad9e31c2542854fe316da9272399c | 709 | py | Python | SearchFunctions/virustotal.py | semustafacevik/SearchDomainDH | dc2409c42f6749b5e7f2373c60c21d463531a507 | [
"bzip2-1.0.6"
] | null | null | null | SearchFunctions/virustotal.py | semustafacevik/SearchDomainDH | dc2409c42f6749b5e7f2373c60c21d463531a507 | [
"bzip2-1.0.6"
] | null | null | null | SearchFunctions/virustotal.py | semustafacevik/SearchDomainDH | dc2409c42f6749b5e7f2373c60c21d463531a507 | [
"bzip2-1.0.6"
] | null | null | null | from Extensions.functions import *
import requests
class VirusTotalSearch:
def __init__(self, word):
self.word = word
self.results = ''
self.total_results = ''
def do_search_virustotal(self):
print('\nSearching VirusTotal...')
base_url = f'https://www.virustotal.com... | 30.826087 | 135 | 0.662906 |
79dac6716cb26b7e840ea05ce70b8e46d804effc | 1,370 | py | Python | python/paddle/distributed/fleet/base/runtime_factory.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/distributed/fleet/base/runtime_factory.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/distributed/fleet/base/runtime_factory.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-09-24T11:23:36.000Z | 2021-09-24T11:23:36.000Z | # Copyright (c) 2020 PaddlePaddle 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 app... | 36.052632 | 74 | 0.729197 |
32eb7d910fa0fd865aaca51af7eaf41889871f79 | 2,256 | py | Python | visualization.py | sonomarina/Stock-sentiment-analysis | 2b3ddd88c73916ea06d39ef5d455f9220c69fdf7 | [
"Unlicense"
] | null | null | null | visualization.py | sonomarina/Stock-sentiment-analysis | 2b3ddd88c73916ea06d39ef5d455f9220c69fdf7 | [
"Unlicense"
] | null | null | null | visualization.py | sonomarina/Stock-sentiment-analysis | 2b3ddd88c73916ea06d39ef5d455f9220c69fdf7 | [
"Unlicense"
] | null | null | null | # =============================================================================
# Import OHLCV data and perform basic visualizations
# Author : Mayank Rasu
# Please report bug/issues in the Q&A section
# =============================================================================
# Import necesary libraries
... | 42.566038 | 124 | 0.656028 |
a829c687f1208a0f6888e659c43a1c70eb8af998 | 2,044 | py | Python | html_parsing/get_video_list__xcadr.com.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | html_parsing/get_video_list__xcadr.com.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | html_parsing/get_video_list__xcadr.com.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
def get_video_list(url):
import requests
rs = requests.get(url)
from bs4 import BeautifulSoup
root = BeautifulSoup(rs.content, 'lxml')
import re
pattern_get_duration = re.compile('(\d+).:(\d+).')
items = []
for... | 28.388889 | 112 | 0.598337 |
3e1795a2e00c7d3c1ac50842486f291421933de3 | 179 | py | Python | scatter_plot.py | AbhigyanRanjan0505/vwh4qtc893uo | fcc0ff2d5e23ac2322e4c5afe7b6ed8c54c62a84 | [
"MIT"
] | null | null | null | scatter_plot.py | AbhigyanRanjan0505/vwh4qtc893uo | fcc0ff2d5e23ac2322e4c5afe7b6ed8c54c62a84 | [
"MIT"
] | null | null | null | scatter_plot.py | AbhigyanRanjan0505/vwh4qtc893uo | fcc0ff2d5e23ac2322e4c5afe7b6ed8c54c62a84 | [
"MIT"
] | null | null | null | import pandas as pd
import plotly.express as px
df = pd.read_csv("covid.csv")
fig = px.scatter(df, x="Date", y="Cases", color="Country",
size_max=60)
fig.show()
| 22.375 | 58 | 0.631285 |
58236057f47d5ddb7aa7f77d27b96998051159c1 | 9,423 | py | Python | src/lib/past/builtins/noniterators.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 17 | 2017-08-04T15:41:05.000Z | 2020-10-16T18:02:41.000Z | src/lib/past/builtins/noniterators.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 3 | 2017-08-04T23:37:37.000Z | 2017-08-04T23:38:34.000Z | src/lib/past/builtins/noniterators.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 3 | 2017-12-07T16:30:59.000Z | 2019-06-16T02:48:28.000Z | """
This module is designed to be used as follows::
from past.builtins.noniterators import filter, map, range, reduce, zip
And then, for example::
assert isinstance(range(5), list)
The list-producing functions this brings in are::
- ``filter``
- ``map``
- ``range``
- ``reduce``
- ``zip``
"""
from __f... | 33.653571 | 83 | 0.448583 |
f4bc9f37ecfb32b5ab94788f97e628c120dcf0f3 | 3,022 | py | Python | test/model/seq2seq/test_forking_sequence_splitter.py | ykaitao/gluon-ts | 9622550974e9e0819e25438fc45353f8a6474b55 | [
"Apache-2.0"
] | 1 | 2020-01-19T13:27:51.000Z | 2020-01-19T13:27:51.000Z | test/model/seq2seq/test_forking_sequence_splitter.py | ykaitao/gluon-ts | 9622550974e9e0819e25438fc45353f8a6474b55 | [
"Apache-2.0"
] | null | null | null | test/model/seq2seq/test_forking_sequence_splitter.py | ykaitao/gluon-ts | 9622550974e9e0819e25438fc45353f8a6474b55 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 30.22 | 77 | 0.590999 |
8c848a163ebf0546511813f26bbd32aabe642a8e | 4,052 | py | Python | 2021/src/Pre-processing/Isotropic/Noise/src/modules/CheckSize.py | tansyab1/PhD-project | 15f170c1976e58697454cd992687d808d1b2284a | [
"MIT"
] | null | null | null | 2021/src/Pre-processing/Isotropic/Noise/src/modules/CheckSize.py | tansyab1/PhD-project | 15f170c1976e58697454cd992687d808d1b2284a | [
"MIT"
] | null | null | null | 2021/src/Pre-processing/Isotropic/Noise/src/modules/CheckSize.py | tansyab1/PhD-project | 15f170c1976e58697454cd992687d808d1b2284a | [
"MIT"
] | null | null | null | # import numpy as np
import cv2
# import math
import matplotlib.pyplot as plt
# import os
# import pandas as pd
import glob
import seaborn as sns
from tqdm import tqdm
import matplotlib as mpl
# import warnings; warnings.filterwarnings(action='once')
large = 22
med = 16
small = 12
params = {'legend.fontsize': med,
... | 32.677419 | 134 | 0.644373 |
97aab32fbc538ca0395639ff1f27b2a77b7f0e7d | 162,950 | py | Python | resqpy/well/_blocked_well.py | poc11/resqpy | 5dfbfb924f8ee9b2712fb8e38bff96ee8ee9d8e2 | [
"MIT"
] | null | null | null | resqpy/well/_blocked_well.py | poc11/resqpy | 5dfbfb924f8ee9b2712fb8e38bff96ee8ee9d8e2 | [
"MIT"
] | null | null | null | resqpy/well/_blocked_well.py | poc11/resqpy | 5dfbfb924f8ee9b2712fb8e38bff96ee8ee9d8e2 | [
"MIT"
] | null | null | null | """_blocked_well.py: resqpy well module providing blocked well class"""
# Nexus is a registered trademark of the Halliburton Company
# RMS and ROXAR are registered trademarks of Roxar Software Solutions AS, an Emerson company
import logging
log = logging.getLogger(__name__)
import math as maths
import numpy as np
... | 53.078176 | 206 | 0.559705 |
0275515053ff051f95f0054bde1bd90d1fadcdbf | 1,305 | py | Python | handlers/isapiwsgihandler.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 21 | 2018-02-16T17:43:59.000Z | 2021-12-29T12:08:28.000Z | handlers/isapiwsgihandler.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 26 | 2015-01-02T13:35:48.000Z | 2015-06-10T14:39:07.000Z | handlers/isapiwsgihandler.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 8 | 2018-10-08T03:48:00.000Z | 2022-03-31T12:13:01.000Z | """
web2py handler for isapi-wsgi for IIS. Requires:
http://code.google.com/p/isapi-wsgi/
"""
# The entry point for the ISAPI extension.
def __ExtensionFactory__():
import os
import sys
path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
if not os.path.isdir('applications'):
r... | 32.625 | 75 | 0.661303 |
794a960100de33c9c7bb87c0c9b32b283a91d6a4 | 5,753 | py | Python | utils/helpers.py | dgriffiths3/mononet3d | 4505234025efaee727d4bb4bb3f013fee8dc65b4 | [
"MIT"
] | 9 | 2020-08-24T17:48:33.000Z | 2021-01-29T17:26:51.000Z | utils/helpers.py | dgriffiths3/mononet3d | 4505234025efaee727d4bb4bb3f013fee8dc65b4 | [
"MIT"
] | 1 | 2021-01-15T10:51:06.000Z | 2021-01-21T10:39:15.000Z | utils/helpers.py | dgriffiths3/mononet3d | 4505234025efaee727d4bb4bb3f013fee8dc65b4 | [
"MIT"
] | 1 | 2021-02-18T14:06:16.000Z | 2021-02-18T14:06:16.000Z | import os
import numpy as np
import progressbar
import pyvista as pv
import toml
import tensorflow as tf
import colorsys
class EvalProgBar():
def __init__(self):
self.widgets = [progressbar.FormatLabel('')]
self.bar = progressbar.ProgressBar(widgets=self.widgets)
self.bar.start(max_value=progressbar.Unknown... | 20.620072 | 101 | 0.58665 |
5c4c260604b7616b99b8ab0f16d8325c72e4f5e5 | 40,712 | py | Python | src/skmultiflow/trees/multi_target_regression_hoeffding_tree.py | mertozer94/scikit-multiflow | a6e719cad900805a85d17143c05a3da9dd4987e8 | [
"BSD-3-Clause"
] | null | null | null | src/skmultiflow/trees/multi_target_regression_hoeffding_tree.py | mertozer94/scikit-multiflow | a6e719cad900805a85d17143c05a3da9dd4987e8 | [
"BSD-3-Clause"
] | null | null | null | src/skmultiflow/trees/multi_target_regression_hoeffding_tree.py | mertozer94/scikit-multiflow | a6e719cad900805a85d17143c05a3da9dd4987e8 | [
"BSD-3-Clause"
] | null | null | null | from operator import attrgetter
import numpy as np
from skmultiflow.core import MultiOutputMixin
from skmultiflow.trees import RegressionHoeffdingTree
from skmultiflow.trees.numeric_attribute_regression_observer_multi_target \
import NumericAttributeRegressionObserverMultiTarget
from skmultiflow.trees.nominal_at... | 41.585291 | 118 | 0.57133 |
03e5b2542b95177719e1241413072e4dd6904afd | 11,128 | py | Python | tensorflow/python/training/ftrl_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | 6 | 2016-09-07T18:38:41.000Z | 2020-01-12T23:01:03.000Z | tensorflow/python/training/ftrl_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | 1 | 2021-04-12T03:51:59.000Z | 2021-04-12T03:51:59.000Z | tensorflow/python/training/ftrl_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | 8 | 2017-06-08T09:46:06.000Z | 2021-06-20T14:03:19.000Z | # Copyright 2015 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... | 41.677903 | 80 | 0.571891 |
97903c0e71455a9185571bf556e47480c76ddb72 | 3,954 | py | Python | hashr.py | joetache4/md5r | 9efdd09263ff024caae9a1ad0386be6c96dbc06b | [
"MIT"
] | null | null | null | hashr.py | joetache4/md5r | 9efdd09263ff024caae9a1ad0386be6c96dbc06b | [
"MIT"
] | null | null | null | hashr.py | joetache4/md5r | 9efdd09263ff024caae9a1ad0386be6c96dbc06b | [
"MIT"
] | null | null | null | '''
Recursively compute hashes for all files in a directory.
Hash options include MD5, SHA1, SHA256, and SHA512.
author: Joe Tacheron
'''
from pathlib import Path
from fnmatch import fnmatch
import argparse
import hashlib
class PathType(object):
'''Used with argparse as a type indicating a file or directory.'''
... | 35.945455 | 150 | 0.68867 |
586507f28cb91f7b0fd020a26e5cba1f2e2e68b1 | 650 | py | Python | backend/db_select.py | mario21ic/api-demo | 10c7cab2f01ba786fea8888246d0ab200477352f | [
"MIT"
] | null | null | null | backend/db_select.py | mario21ic/api-demo | 10c7cab2f01ba786fea8888246d0ab200477352f | [
"MIT"
] | null | null | null | backend/db_select.py | mario21ic/api-demo | 10c7cab2f01ba786fea8888246d0ab200477352f | [
"MIT"
] | 3 | 2019-03-14T03:03:02.000Z | 2019-11-25T00:31:20.000Z | import datetime
import mysql.connector
cnx = mysql.connector.connect(host='db',
database='api_db',
user='root',
password='myclave')
cursor = cnx.cursor()
query = ("SELECT first_name, last_name, hire_date FROM employees "
"... | 27.083333 | 66 | 0.609231 |
4d8ff6189d54d7d4e5efcfe5b7650163b7503dab | 1,440 | py | Python | Practica6/variablesglobales.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | 1 | 2021-09-30T20:05:41.000Z | 2021-09-30T20:05:41.000Z | Practica6/variablesglobales.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | Practica6/variablesglobales.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | #Análisis de Algoritmos 3CV2
# Alan Romero Lucero
# Josué David Hernández Ramírez
# Práctica 6 Divide y vencerás
"""
Descripción: este módulo solo almacena las variables globales del programa:
parámetros_1: Lista que almacena los parámetros de los puntos a trazar
para el algoritmo de sub... | 48 | 89 | 0.638194 |
01d3681f355817eae7d2cd623241235669c727f4 | 2,323 | py | Python | starvine/bvcopula/tests/test_copula_cdf.py | wgurecky/StarVine | b952a88eeaff476484ba6a26420cfe4ef575d162 | [
"BSD-3-Clause"
] | 12 | 2018-10-04T06:15:13.000Z | 2020-01-08T03:32:30.000Z | starvine/bvcopula/tests/test_copula_cdf.py | wgurecky/StarVine | b952a88eeaff476484ba6a26420cfe4ef575d162 | [
"BSD-3-Clause"
] | 25 | 2017-08-29T06:28:37.000Z | 2020-10-16T23:56:57.000Z | starvine/bvcopula/tests/test_copula_cdf.py | wgurecky/StarVine | b952a88eeaff476484ba6a26420cfe4ef575d162 | [
"BSD-3-Clause"
] | 3 | 2017-04-08T20:19:09.000Z | 2020-01-09T20:01:02.000Z | ##
# \brief Test copula CDF's to ensure integral on [0,1]^2 is 1
from __future__ import print_function, division
# COPULA IMPORTS
from starvine.bvcopula.copula.t_copula import StudentTCopula
from starvine.bvcopula.copula.gauss_copula import GaussCopula
from starvine.bvcopula.copula.frank_copula import FrankCopula
from ... | 35.19697 | 84 | 0.643134 |
cb67548e06f0c14c0b9adc3e6667a1115a4871db | 560 | py | Python | python/clear.py | bmccafferty/ping-pong-led-wall | 41eed47aa50c053a8b4ad508611093b12984d48c | [
"CC0-1.0"
] | 1 | 2020-11-26T22:28:23.000Z | 2020-11-26T22:28:23.000Z | python/clear.py | bmccafferty/ping-pong-led-wall | 41eed47aa50c053a8b4ad508611093b12984d48c | [
"CC0-1.0"
] | null | null | null | python/clear.py | bmccafferty/ping-pong-led-wall | 41eed47aa50c053a8b4ad508611093b12984d48c | [
"CC0-1.0"
] | 1 | 2021-04-29T15:18:25.000Z | 2021-04-29T15:18:25.000Z | #!/usr/bin/python3
# Clear all pixels currently lit (Reset)
import time
import board
import neopixel
# NeoPixels must be connected to D10, D12, D18 or D21 to work.
pixel_pin = board.D18
# The number of NeoPixels
num_pixels = 256
# The order of the pixel colors - RGB or GRB. Some NeoPixels have red and green reve... | 23.333333 | 89 | 0.739286 |
a4ee3bcb17de74d867b34df6246d80b9da2a6176 | 2,905 | py | Python | starlette_plugins.py | klen/starlette-plugins | 5ca24ddc1ade331e30e83272fe5e5703d2fd35fb | [
"MIT"
] | 1 | 2020-10-21T21:56:28.000Z | 2020-10-21T21:56:28.000Z | starlette_plugins.py | klen/starlette-plugins | 5ca24ddc1ade331e30e83272fe5e5703d2fd35fb | [
"MIT"
] | null | null | null | starlette_plugins.py | klen/starlette-plugins | 5ca24ddc1ade331e30e83272fe5e5703d2fd35fb | [
"MIT"
] | null | null | null | __version__ = "0.0.7"
__license__ = "MIT"
import threading
setup_lock = threading.Lock()
class PluginException(Exception):
pass
class PluginMiddleware:
__slots__ = 'app',
plugin = None
def __init__(self, app):
self.app = app
def __call__(self, scope, receive, send) -> None:
... | 24.82906 | 94 | 0.585542 |
789275e423d8cc0bae85b361325d5b0b242f06a9 | 3,850 | py | Python | python/se4-w3c/tests/test_native_app.py | saucelabs-training/platform-config-tests | 11dfab8f9be2fe118ed0b0fa4adebb75a5f1a64c | [
"MIT"
] | 1 | 2021-11-17T22:29:42.000Z | 2021-11-17T22:29:42.000Z | python/se3last-w3c/tests/test_native_app.py | saucelabs-training/platform-config-tests | 11dfab8f9be2fe118ed0b0fa4adebb75a5f1a64c | [
"MIT"
] | null | null | null | python/se3last-w3c/tests/test_native_app.py | saucelabs-training/platform-config-tests | 11dfab8f9be2fe118ed0b0fa4adebb75a5f1a64c | [
"MIT"
] | 1 | 2021-11-17T22:29:35.000Z | 2021-11-17T22:29:35.000Z | import pytest
iOS = "https://github.com/saucelabs/sample-app-mobile/releases/download/2.7.1/iOS.Simulator.SauceLabs.Mobile.Sample.app.2.7.1.zip"
android = "https://github.com/saucelabs/sample-app-mobile/releases/download/2.7.1/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk"
def test_latest_android_latest_appium(helpe... | 33.478261 | 130 | 0.683117 |
f269bac529ca4247a34f1f985b407ef282c57941 | 784 | py | Python | tests/experiment/test_rotation_matrix.py | ccechatelier/bcdi | cbe3b7960414b03f8e98336c3fcd7b367de441ca | [
"CECILL-B"
] | 18 | 2020-04-30T08:48:39.000Z | 2022-03-30T14:42:01.000Z | tests/experiment/test_rotation_matrix.py | ccechatelier/bcdi | cbe3b7960414b03f8e98336c3fcd7b367de441ca | [
"CECILL-B"
] | 78 | 2019-06-30T03:45:58.000Z | 2022-03-23T15:04:44.000Z | tests/experiment/test_rotation_matrix.py | ccechatelier/bcdi | cbe3b7960414b03f8e98336c3fcd7b367de441ca | [
"CECILL-B"
] | 16 | 2019-07-03T17:18:53.000Z | 2022-01-12T15:54:56.000Z | # -*- coding: utf-8 -*-
# BCDI: tools for pre(post)-processing Bragg coherent X-ray diffraction imaging data
# (c) 07/2017-06/2019 : CNRS UMR 7344 IM2NP
# (c) 07/2019-05/2021 : DESY PHOTON SCIENCE
# authors:
# Jerome Carnis, carnis_jerome@yahoo.fr
import unittest
from bcdi.experiment.rotation_matrix... | 27.034483 | 84 | 0.714286 |
ea4a4facfed697e9b6e329989be333b938308ec9 | 1,291 | py | Python | script/convert.py | wjc852456/pytorch-quant | e4096ce9ae59cd9029b543edff631f1a6d00008a | [
"MIT"
] | 22 | 2019-05-10T18:14:35.000Z | 2022-02-13T20:26:32.000Z | script/convert.py | wjgaas/pytorch-quant | 1a1610dff0327932a16a1e176a739d9e3bdc4e61 | [
"MIT"
] | 3 | 2019-09-25T06:35:53.000Z | 2019-11-13T07:08:13.000Z | script/convert.py | wjgaas/pytorch-quant | 1a1610dff0327932a16a1e176a739d9e3bdc4e61 | [
"MIT"
] | 11 | 2018-09-27T03:53:17.000Z | 2022-01-21T09:25:18.000Z | import sys
sys.path.append("..")
import os
import numpy as np
import tqdm
from utee import misc
import argparse
import cv2
imagenet_urls = [
'http://ml.cs.tsinghua.edu.cn/~chenxi/dataset/val224_compressed.pkl'
]
parser = argparse.ArgumentParser(description='Extract the ILSVRC2012 val dataset')
parser.add_argument('... | 26.346939 | 91 | 0.694036 |
0c3f7cd7ab83ff6bf1d9df31744618215544db52 | 1,722 | py | Python | vendor/google/cloud/WebSecurityScanner/synth.py | dof-005/JobPortal-Laravel-Vue | 3049d7aa45b87f9d2926203394f523a8a09584cb | [
"MIT"
] | 6 | 2020-10-14T12:52:01.000Z | 2021-07-30T18:53:22.000Z | vendor/google/cloud/WebSecurityScanner/synth.py | dof-005/JobPortal-Laravel-Vue | 3049d7aa45b87f9d2926203394f523a8a09584cb | [
"MIT"
] | null | null | null | vendor/google/cloud/WebSecurityScanner/synth.py | dof-005/JobPortal-Laravel-Vue | 3049d7aa45b87f9d2926203394f523a8a09584cb | [
"MIT"
] | 4 | 2020-12-19T19:34:27.000Z | 2022-02-28T17:28:49.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, s... | 30.210526 | 90 | 0.730546 |
4ae8d95a505a9505c2c12f681d2f143e95c3a854 | 32,197 | py | Python | src/sentry/interfaces/stacktrace.py | detouched/sentry | 1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd | [
"BSD-3-Clause"
] | null | null | null | src/sentry/interfaces/stacktrace.py | detouched/sentry | 1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd | [
"BSD-3-Clause"
] | null | null | null | src/sentry/interfaces/stacktrace.py | detouched/sentry | 1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd | [
"BSD-3-Clause"
] | null | null | null | """
sentry.interfaces.stacktrace
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
__all__ = ('Stacktrace', )
import re
import six
import posixpath
from itertools import isl... | 34.361793 | 112 | 0.589465 |
00d2a0eec9c5915ce0b5b7910efd4a79e80bfb0e | 7,240 | py | Python | metrics.py | mikelmh025/self-conditioned-gan | 51713879893b34879a106d6ac964de653c6191e0 | [
"MIT"
] | 145 | 2020-06-18T23:53:42.000Z | 2022-03-29T12:07:16.000Z | metrics.py | mikelmh025/self-conditioned-gan | 51713879893b34879a106d6ac964de653c6191e0 | [
"MIT"
] | 9 | 2020-06-29T06:19:58.000Z | 2022-01-25T13:24:31.000Z | metrics.py | mikelmh025/self-conditioned-gan | 51713879893b34879a106d6ac964de653c6191e0 | [
"MIT"
] | 18 | 2020-06-19T01:41:20.000Z | 2021-10-11T06:19:52.000Z | import argparse
import os
import json
from tqdm import tqdm
import numpy as np
import torch
from gan_training.config import load_config
from seeded_sampler import SeededSampler
parser = argparse.ArgumentParser('Computes numbers used in paper and caches them to a result files. Examples include FID, IS, reverse-KL, # ... | 47.320261 | 174 | 0.58163 |
33b332e600af4a4e3d16ef99bf8cfc98dbcef4a1 | 1,346 | py | Python | interpret.py | amirfarhat/give-py | 4d0285e412d86cc72ca578c282253d7735210e42 | [
"MIT"
] | null | null | null | interpret.py | amirfarhat/give-py | 4d0285e412d86cc72ca578c282253d7735210e42 | [
"MIT"
] | null | null | null | interpret.py | amirfarhat/give-py | 4d0285e412d86cc72ca578c282253d7735210e42 | [
"MIT"
] | null | null | null | import sys
# syntax to swap out for python3
SYNTAX_KEYWORD_MAP = {
# synonyms for def
'make' : 'def',
# synonyms for return
'give' : 'return',
# synonyms for print
'show' : 'print',
# synonyms for append
'.also' : '.append',
# synonyms for impor... | 22.813559 | 65 | 0.560921 |
d45644f580e906bb284d19da2d40cd0de09daf94 | 2,301 | py | Python | tests/integration/modules/test_localemod.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 2 | 2020-11-02T22:08:26.000Z | 2020-11-14T13:44:46.000Z | tests/integration/modules/test_localemod.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 3 | 2021-03-31T19:54:10.000Z | 2021-12-13T20:47:12.000Z | tests/integration/modules/test_localemod.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 2 | 2020-11-04T06:32:02.000Z | 2020-11-06T11:01:18.000Z | import pytest
import salt.utils.platform
from tests.support.case import ModuleCase
from tests.support.helpers import destructiveTest, requires_salt_modules, slowTest
from tests.support.unit import skipIf
def _find_new_locale(current_locale):
for locale in ["en_US.UTF-8", "de_DE.UTF-8", "fr_FR.UTF-8"]:
if ... | 39.672414 | 88 | 0.696219 |
8054f33277eb509921b95ff2b360be646e075446 | 10,862 | py | Python | clevercsv/detect_type.py | baldurmen/CleverCSV | a7c7c812f2dc220b8f45f3409daac6e933bc44a2 | [
"MIT"
] | 989 | 2019-02-22T12:14:17.000Z | 2022-03-28T01:33:20.000Z | clevercsv/detect_type.py | baldurmen/CleverCSV | a7c7c812f2dc220b8f45f3409daac6e933bc44a2 | [
"MIT"
] | 27 | 2019-12-22T00:09:28.000Z | 2022-03-30T22:45:50.000Z | clevercsv/detect_type.py | baldurmen/CleverCSV | a7c7c812f2dc220b8f45f3409daac6e933bc44a2 | [
"MIT"
] | 55 | 2019-10-22T13:09:53.000Z | 2022-01-03T04:28:26.000Z | # -*- coding: utf-8 -*-
"""
Code for computing the type score.
Author: Gertjan van den Burg
"""
import json
import regex
from .cparser_util import parse_string
DEFAULT_EPS_TYPE = 1e-10
# Used this site: https://unicode-search.net/unicode-namesearch.pl
# Specials allowed in unicode_alphanum regex if is_quoted = ... | 31.853372 | 621 | 0.509114 |
37e90da79928915f3423bb4d366932e0343e80e1 | 8,701 | py | Python | autobahntestsuite/autobahntestsuite/wampcase/wampcase3_1_x_x.py | rishabh-bector/autobahn-testsuite | 57030060630c10b22be44774973eaa61987b716c | [
"Apache-2.0"
] | 595 | 2015-10-20T09:01:18.000Z | 2022-03-28T08:48:27.000Z | autobahntestsuite/autobahntestsuite/wampcase/wampcase3_1_x_x.py | rishabh-bector/autobahn-testsuite | 57030060630c10b22be44774973eaa61987b716c | [
"Apache-2.0"
] | 73 | 2015-12-03T14:21:56.000Z | 2022-02-05T01:53:05.000Z | autobahntestsuite/autobahntestsuite/wampcase/wampcase3_1_x_x.py | rishabh-bector/autobahn-testsuite | 57030060630c10b22be44774973eaa61987b716c | [
"Apache-2.0"
] | 65 | 2015-11-04T15:58:37.000Z | 2022-02-09T03:49:24.000Z | ###############################################################################
##
## Copyright (c) Crossbar.io Technologies GmbH
##
## 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
##
##... | 30.211806 | 220 | 0.580048 |
1d4583f28811a490ee5161c593b14c27acf88c50 | 4,539 | py | Python | GraphSAGE/eval/eval.py | chinthakarukshan/jasminegraph | 14d2934a3be71024343e02570fb3bc1d92e73de8 | [
"Apache-2.0"
] | 10 | 2019-02-12T16:13:18.000Z | 2021-05-23T04:57:54.000Z | GraphSAGE/eval/eval.py | chinthakarukshan/jasminegraph | 14d2934a3be71024343e02570fb3bc1d92e73de8 | [
"Apache-2.0"
] | 23 | 2019-02-03T10:52:44.000Z | 2021-09-11T17:13:36.000Z | GraphSAGE/eval/eval.py | chinthakarukshan/jasminegraph | 14d2934a3be71024343e02570fb3bc1d92e73de8 | [
"Apache-2.0"
] | 15 | 2018-11-25T10:47:34.000Z | 2020-10-03T16:48:30.000Z | import tensorflow as tf
import numpy as np
import networkx as nx
import json
import random
from networkx.readwrite import json_graph
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_string('graph_id','3', 'specify the graphID')
flags.DEFINE_string('path', '/var/tmp/jasminegraph-localstore/jasminegraph-local_trai... | 34.648855 | 181 | 0.644195 |
21b7771b6cb48069d1c5fc6d6378ffae51c03fe8 | 4,639 | py | Python | siliconcompiler/tools/netgen/count_lvs.py | mfkiwl/siliconcompiler | 49a16d9a07c526821afe1ce2f2d77394e439ca05 | [
"Apache-2.0"
] | 424 | 2021-12-04T15:45:12.000Z | 2022-03-31T20:27:55.000Z | siliconcompiler/tools/netgen/count_lvs.py | mfkiwl/siliconcompiler | 49a16d9a07c526821afe1ce2f2d77394e439ca05 | [
"Apache-2.0"
] | 105 | 2021-12-03T21:25:29.000Z | 2022-03-31T22:36:59.000Z | siliconcompiler/tools/netgen/count_lvs.py | mfkiwl/siliconcompiler | 49a16d9a07c526821afe1ce2f2d77394e439ca05 | [
"Apache-2.0"
] | 38 | 2021-12-04T21:26:20.000Z | 2022-03-21T02:39:29.000Z | #!/usr/bin/python3
# SPDX-FileCopyrightText: 2020 Efabless 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 ... | 34.879699 | 87 | 0.547101 |
a7faf5c556bca16b4cc56eefd55a52e3871019a8 | 504 | py | Python | subsync/suboffset.py | hswmartin/subsync-1 | d9798a5d47e1a921c178b8922b7e30374b186e12 | [
"MIT"
] | 1 | 2020-03-29T09:24:24.000Z | 2020-03-29T09:24:24.000Z | subsync/suboffset.py | xiaopinggai-webrtc/subsync | 691c387c808bcf81a2afd4ca8b666df6346ff634 | [
"MIT"
] | null | null | null | subsync/suboffset.py | xiaopinggai-webrtc/subsync | 691c387c808bcf81a2afd4ca8b666df6346ff634 | [
"MIT"
] | 1 | 2019-09-14T17:56:00.000Z | 2019-09-14T17:56:00.000Z | #!/usr/bin/env python
import logging
import sys
from sklearn.pipeline import Pipeline
from .subtitle_parsers import SrtParser, SrtOffseter
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def main():
td = float(sys.argv[3])
pipe = Pipeline([
('parse', SrtParser()),
... | 19.384615 | 52 | 0.668651 |
571a930edb82c9112daae9c08e64ae03eb47dff5 | 3,616 | py | Python | benchmarking/bench_format.py | troxel/TemplateRex-Python | 69982c34bcdff3787ce0681e22a3c47a1f40c79d | [
"MIT"
] | null | null | null | benchmarking/bench_format.py | troxel/TemplateRex-Python | 69982c34bcdff3787ce0681e22a3c47a1f40c79d | [
"MIT"
] | 1 | 2018-12-17T01:47:00.000Z | 2018-12-17T01:47:00.000Z | benchmarking/bench_format.py | troxel/TemplateRex-Python | 69982c34bcdff3787ce0681e22a3c47a1f40c79d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Benchmark against Jinja2 template engine to gauge the effect of
various coding changes.
"""
import sys
from os.path import join, dirname, abspath
try:
from cProfile import Profile
except ImportError:
from profile import Profile
from pstats import Stats
from datetime impor... | 28.472441 | 138 | 0.550332 |
6c5fba03fb705aeec1385acf7d805b94a54c4f1c | 97,367 | py | Python | scripts/layer_chassis_generator.py | AndrewFobelAMD/Vulkan-ValidationLayers | 46093fc92ada4d876c13023bdece1a25829597e0 | [
"Apache-2.0"
] | null | null | null | scripts/layer_chassis_generator.py | AndrewFobelAMD/Vulkan-ValidationLayers | 46093fc92ada4d876c13023bdece1a25829597e0 | [
"Apache-2.0"
] | null | null | null | scripts/layer_chassis_generator.py | AndrewFobelAMD/Vulkan-ValidationLayers | 46093fc92ada4d876c13023bdece1a25829597e0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3 -i
#
# Copyright (c) 2015-2020 Valve Corporation
# Copyright (c) 2015-2020 LunarG, Inc.
# Copyright (c) 2015-2020 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 a... | 50.344881 | 292 | 0.707385 |
0328723c51029c8c0b88585bdf6581734bf35922 | 149 | py | Python | Aulas de Python Mundo 3/Curso Python - #17 - Tuplas - Part 2.py | ErikDMCosta/CEV-Praticas_Python-Mundo_3 | 9669fe1647ec5effd0b1c4a576aa670107657a77 | [
"MIT"
] | null | null | null | Aulas de Python Mundo 3/Curso Python - #17 - Tuplas - Part 2.py | ErikDMCosta/CEV-Praticas_Python-Mundo_3 | 9669fe1647ec5effd0b1c4a576aa670107657a77 | [
"MIT"
] | null | null | null | Aulas de Python Mundo 3/Curso Python - #17 - Tuplas - Part 2.py | ErikDMCosta/CEV-Praticas_Python-Mundo_3 | 9669fe1647ec5effd0b1c4a576aa670107657a77 | [
"MIT"
] | null | null | null | # num = (2, 5, 9, 7)
num = [2, 5, 9, 7]
# num(2) = 3 # NÃO PODE POIS TUPLAS SÃO IMUTAVEIS
num[2] = 3 # TROCA ELEMENTO DO INDICE DOIS
print(num)
| 24.833333 | 54 | 0.577181 |
0e39c65b0d28b206b19077e46a2f4457920dac41 | 44,825 | py | Python | mesonbuild/backend/xcodebackend.py | jonaslb/meson | 8133a7b9a4b8f0686fbc479aa2d64e41c85a979b | [
"Apache-2.0"
] | null | null | null | mesonbuild/backend/xcodebackend.py | jonaslb/meson | 8133a7b9a4b8f0686fbc479aa2d64e41c85a979b | [
"Apache-2.0"
] | null | null | null | mesonbuild/backend/xcodebackend.py | jonaslb/meson | 8133a7b9a4b8f0686fbc479aa2d64e41c85a979b | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2016 The Meson development 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 required by applicable law or agree... | 48.93559 | 272 | 0.569972 |
611a191d50cdd22d9fe1e7e3cb1730ca9447941d | 2,559 | py | Python | test/unit/data/test_supplementary_data.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | test/unit/data/test_supplementary_data.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | test/unit/data/test_supplementary_data.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | from fedot.core.data.data import OutputData
from fedot.core.data.supplementary_data import SupplementaryData
from fedot.core.pipelines.node import PrimaryNode, SecondaryNode
from fedot.core.pipelines.pipeline import Pipeline
from fedot.core.repository.dataset_types import DataTypesEnum
from fedot.core.repository.tasks ... | 40.619048 | 99 | 0.724893 |
ffcd10a406c5b40eb5476b2bbaae8f6185d1c22d | 6,975 | py | Python | python/build.py | strongoier/test_actions | 0373e78f139b66c69861fce1cf1efa7e60ddeb00 | [
"MIT"
] | 1 | 2022-01-29T11:59:50.000Z | 2022-01-29T11:59:50.000Z | python/build.py | strongoier/test_actions | 0373e78f139b66c69861fce1cf1efa7e60ddeb00 | [
"MIT"
] | null | null | null | python/build.py | strongoier/test_actions | 0373e78f139b66c69861fce1cf1efa7e60ddeb00 | [
"MIT"
] | null | null | null | import argparse
import os
import platform
import re
import shutil
import sys
import taichi as ti
def get_os_name():
name = platform.platform()
# in python 3.8, platform.platform() uses mac_ver() on macOS
# it will return 'macOS-XXXX' instead of 'Darwin-XXXX'
if name.lower().startswith('darwin') or na... | 34.529703 | 89 | 0.590108 |
06c2b20a1de74f33dbdffe6b8104f9c080bdf429 | 4,184 | py | Python | backend/functions/byu-covid-scraping/lambda_function.py | eabrouwer3/ebrouwer.dev | a7c51de7afaac6a2e5e550abb7d0435bc392cb4f | [
"MIT"
] | null | null | null | backend/functions/byu-covid-scraping/lambda_function.py | eabrouwer3/ebrouwer.dev | a7c51de7afaac6a2e5e550abb7d0435bc392cb4f | [
"MIT"
] | null | null | null | backend/functions/byu-covid-scraping/lambda_function.py | eabrouwer3/ebrouwer.dev | a7c51de7afaac6a2e5e550abb7d0435bc392cb4f | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import re
import datetime
from itertools import accumulate
from toolz.curried import assoc
import os
from decimal import Decimal
import boto3
from dateutil import parser
DDB = boto3.client('dynamodb')
TOTAL_TABLE = os.environ.get('TOTAL_TABLE')
AVERAGE_TABLE = os.environ.g... | 26.820513 | 99 | 0.503107 |
95d4fa6cbf876ddc4e0ad77dbaa0fdfa28f1bd43 | 2,083 | py | Python | spark_scripts/rabbitmq_to_kafka.py | LSS-USP/interscity-traffic-anomaly-experiment | 8f218ab7b9ff0e065323162d1580e00543e9ebb2 | [
"Apache-2.0"
] | null | null | null | spark_scripts/rabbitmq_to_kafka.py | LSS-USP/interscity-traffic-anomaly-experiment | 8f218ab7b9ff0e065323162d1580e00543e9ebb2 | [
"Apache-2.0"
] | 1 | 2018-06-05T12:58:12.000Z | 2018-06-05T12:58:12.000Z | spark_scripts/rabbitmq_to_kafka.py | LSS-USP/interscity-traffic-anomaly-experiment | 8f218ab7b9ff0e065323162d1580e00543e9ebb2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from kafka import KafkaProducer
import pika
from xml.dom import minidom
import json
producer = KafkaProducer(bootstrap_servers='localhost:9092')
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel = connection.channel()
channel.exchange_declare(exchange='dat... | 28.148649 | 81 | 0.610658 |
260fe596a39f28c22f0328d1dea9752e20ae124f | 4,403 | py | Python | lldb/test/API/functionalities/thread/exit_during_expression/TestExitDuringExpression.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 305 | 2019-09-14T17:16:05.000Z | 2022-03-31T15:05:20.000Z | lldb/test/API/functionalities/thread/exit_during_expression/TestExitDuringExpression.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 11 | 2019-10-17T21:11:52.000Z | 2022-02-17T20:10:00.000Z | lldb/test/API/functionalities/thread/exit_during_expression/TestExitDuringExpression.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 24 | 2019-10-03T11:22:11.000Z | 2022-01-25T09:59:30.000Z | """
Make sure that we handle an expression on a thread, if
the thread exits while the expression is running.
"""
import lldb
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *
class TestExitDuringExpression(TestBase):
mydir = TestBase.compute_... | 40.768519 | 126 | 0.690893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.