hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a16a16890b44f8d9db7270239aa01481187f4cc | 3,863 | py | Python | tests/unit/test_v3bw.py | pastly/flashflow | b7f53f71683fc2e9a6456c04aab110c843baf182 | [
"CC0-1.0"
] | null | null | null | tests/unit/test_v3bw.py | pastly/flashflow | b7f53f71683fc2e9a6456c04aab110c843baf182 | [
"CC0-1.0"
] | null | null | null | tests/unit/test_v3bw.py | pastly/flashflow | b7f53f71683fc2e9a6456c04aab110c843baf182 | [
"CC0-1.0"
] | null | null | null | import unittest
from flashflow import v3bw
import os
import time
from typing import Tuple
from tempfile import TemporaryDirectory
def touch(fname: str, times: Tuple[float, float] = None):
''' Update ``fname``\'s last access and modified times to now. If it does
not exist, create it first. If ``times`` are spe... | 37.504854 | 79 | 0.592286 |
4a16a1c69888efa81b8c70c771541fbaa972f03d | 1,510 | py | Python | s5_scatter.py | grmagicdog/ChIP-seq-Correlation | c869692ac281c49bd71920490bbbc94341014e67 | [
"MIT"
] | 2 | 2019-05-29T06:56:38.000Z | 2020-09-18T12:44:26.000Z | s6_scatter.py | gramgicdog/ChIP-seq-Correlation | c869692ac281c49bd71920490bbbc94341014e67 | [
"MIT"
] | null | null | null | s6_scatter.py | gramgicdog/ChIP-seq-Correlation | c869692ac281c49bd71920490bbbc94341014e67 | [
"MIT"
] | 1 | 2019-05-29T06:56:40.000Z | 2019-05-29T06:56:40.000Z | #!/usr/bin/python3
# encoding=utf-8
from config import *
import matplotlib.pyplot as plt
from scipy.stats import linregress
from table import *
import numpy as np
def draw(x, y=None):
x, y = np.array(x), np.array(y)
slope, intercept, rvalue, pvalue, stderr = linregress(x, y)
fig, axs = plt.subplots(1, 2)
... | 27.454545 | 83 | 0.562914 |
4a16a2b8ef002b629ac348ec880b026c50c0b853 | 7,874 | py | Python | VocCode/Model/Deeplabv3_plus/Backbones/resnet.py | yyliu01/PS-MT | 91268eaca383d7956f5f4cdf7135256e9bbfa04c | [
"MIT"
] | 7 | 2022-03-28T04:07:17.000Z | 2022-03-31T13:49:04.000Z | VocCode/Model/Deeplabv3_plus/Backbones/resnet.py | yyliu01/PS-MT | 91268eaca383d7956f5f4cdf7135256e9bbfa04c | [
"MIT"
] | null | null | null | VocCode/Model/Deeplabv3_plus/Backbones/resnet.py | yyliu01/PS-MT | 91268eaca383d7956f5f4cdf7135256e9bbfa04c | [
"MIT"
] | null | null | null | import functools
import torch.nn as nn
from Utils.pyt_utils import load_model
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152']
def conv3x3(in_planes, out_planes, stride=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3,... | 34.995556 | 83 | 0.567818 |
4a16a2c4aa678336a518c175b2e638a333138ae0 | 187 | py | Python | apptheme_mezzanine/__init__.py | cedadev/apptheme-mezzanine | fab3e373687f01de3b1edcc7c752297a302b8986 | [
"MIT"
] | null | null | null | apptheme_mezzanine/__init__.py | cedadev/apptheme-mezzanine | fab3e373687f01de3b1edcc7c752297a302b8986 | [
"MIT"
] | 5 | 2018-04-10T16:00:56.000Z | 2019-11-25T16:52:42.000Z | apptheme_mezzanine/__init__.py | cedadev/apptheme-mezzanine | fab3e373687f01de3b1edcc7c752297a302b8986 | [
"MIT"
] | null | null | null | """
Main module for the Django framework theme app.
"""
__author__ = "Matt Pritchard"
__copyright__ = "Copyright 2018 UK Science and Technology Facilities Council"
__version__ = "0.4a"
| 20.777778 | 77 | 0.754011 |
4a16a2eac0a4ada33073fdd28e08b9378f2a86b7 | 471 | py | Python | list_remove_duplicates.py | Johne-DuChene/python_practice | 108582743b2e37e4e47fcea7611837f6ef2997e4 | [
"MIT"
] | null | null | null | list_remove_duplicates.py | Johne-DuChene/python_practice | 108582743b2e37e4e47fcea7611837f6ef2997e4 | [
"MIT"
] | null | null | null | list_remove_duplicates.py | Johne-DuChene/python_practice | 108582743b2e37e4e47fcea7611837f6ef2997e4 | [
"MIT"
] | null | null | null | '''Write a program that takes a list
and returns a new list that contains
all the same elements but with
duplicates removed.
Write two functions to do this, one
with a loop, and one with a set.'''
rand = [0, 1, 1, 2, 3, 3, 4, 4, 5]
def rem_dupes(items):
return set(items)
print(rem_dupes(rand))
def loop_rem_dupes(... | 23.55 | 36 | 0.673036 |
4a16a34cd3cf2e1d3f18257ec4ffa8e75bd93ef5 | 2,141 | py | Python | src/oic/extension/heart.py | layoaster/pyoidc | 6b03b8a285c3f4652dea474df4429d8ee6e5298b | [
"Apache-2.0"
] | null | null | null | src/oic/extension/heart.py | layoaster/pyoidc | 6b03b8a285c3f4652dea474df4429d8ee6e5298b | [
"Apache-2.0"
] | 1 | 2019-02-08T09:11:49.000Z | 2019-02-08T09:11:49.000Z | src/oic/extension/heart.py | layoaster/pyoidc | 6b03b8a285c3f4652dea474df4429d8ee6e5298b | [
"Apache-2.0"
] | 1 | 2019-02-25T10:08:48.000Z | 2019-02-25T10:08:48.000Z | from urllib.parse import urlparse
from oic.oauth2.message import REQUIRED_LIST_OF_STRINGS
from oic.oauth2.message import SINGLE_REQUIRED_STRING
from oic.oic.message import SINGLE_REQUIRED_INT
from oic.oic.message import JasonWebToken
from oic.utils.keyio import KeyBundle
__author__ = 'roland'
class PrivateKeyJWT(Ja... | 29.736111 | 79 | 0.648762 |
4a16a44f46d16c2d46259661b176cd15b045261c | 1,221 | py | Python | settings/common.py | egemsoft/esef-yawd-translation | 7a104d02be8dc6794f9bc48e7db14078449a0a11 | [
"BSD-3-Clause"
] | null | null | null | settings/common.py | egemsoft/esef-yawd-translation | 7a104d02be8dc6794f9bc48e7db14078449a0a11 | [
"BSD-3-Clause"
] | null | null | null | settings/common.py | egemsoft/esef-yawd-translation | 7a104d02be8dc6794f9bc48e7db14078449a0a11 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import os
__author__ = 'cenk'
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3.db'),
}
}
# SECURITY WARNING: don't run with debug turned on in production!... | 23.037736 | 69 | 0.72154 |
4a16a4c6472e001dc1d1d919c395cded91d59b55 | 2,901 | py | Python | dev/Editor/Scripts/viewmodes.py | BadDevCode/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 2 | 2020-06-27T12:13:44.000Z | 2020-06-27T12:13:46.000Z | dev/Editor/Scripts/viewmodes.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | null | null | null | dev/Editor/Scripts/viewmodes.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | null | null | null | #
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | 44.630769 | 85 | 0.705274 |
4a16a657d30ff31425d313e75e50dc53f8d48982 | 587 | py | Python | stanford/sms-tools/lectures/04-STFT/plots-code/hanning.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | 1 | 2021-03-12T18:32:06.000Z | 2021-03-12T18:32:06.000Z | stanford/sms-tools/lectures/04-STFT/plots-code/hanning.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | null | null | null | stanford/sms-tools/lectures/04-STFT/plots-code/hanning.py | phunc20/dsp | e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from scipy.fftpack import fft
M = 64
N = 512
hN = N//2
hM = M//2
fftbuffer = np.zeros(N)
mX1 = np.zeros(N)
plt.figure(1, figsize=(7.5, 3.5))
fftbuffer[hN-hM:hN+hM]=np.hanning(M)
plt.subplot(2,1,1)
plt.plot(np.arange(-hN, hN), fftbuffer, 'b', lw=1.5)
plt.axis([-h... | 18.935484 | 54 | 0.623509 |
4a16a7a1544a120c8896407e46f69e66f1a57596 | 765 | py | Python | proto/rpc/service/rpcservice_stub.py | ptsurko/coursera_cloud | ed34a409034e2b7a85c6a3d5700c621fcabe8bde | [
"MIT"
] | null | null | null | proto/rpc/service/rpcservice_stub.py | ptsurko/coursera_cloud | ed34a409034e2b7a85c6a3d5700c621fcabe8bde | [
"MIT"
] | null | null | null | proto/rpc/service/rpcservice_stub.py | ptsurko/coursera_cloud | ed34a409034e2b7a85c6a3d5700c621fcabe8bde | [
"MIT"
] | null | null | null | from proto.rpc._method_descriptor import _MethodDescriptor
from proto.rpc._service_descriptor import _ServiceDescriptor
class RpcServiceStub(object):
_descriptor = None
@classmethod
def get_descriptor(cls):
return cls._descriptor
def handler(request_class, response_class=None):
def f... | 29.423077 | 109 | 0.734641 |
4a16a8011c18bbe3e224396f296ebbc079c749e1 | 7,525 | py | Python | lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 305 | 2019-09-14T17:16:05.000Z | 2022-03-31T15:05:20.000Z | lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 11 | 2019-10-17T21:11:52.000Z | 2022-02-17T20:10:00.000Z | lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 24 | 2019-10-03T11:22:11.000Z | 2022-01-25T09:59:30.000Z | """Test that hidden ivars in a shared library are visible from the main executable."""
import unittest2
import subprocess
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class HiddenIvarsTestCase(TestBase):
mydir = TestBase.compute... | 32.575758 | 86 | 0.546179 |
4a16a838416b993ec70c8b656fb3be854ce7ef51 | 637 | py | Python | hsapp/migrations/0037_auto_20171105_1901.py | jkbm/playesports | 1e01c909f183499906b26858fc54735dba5409d9 | [
"MIT"
] | null | null | null | hsapp/migrations/0037_auto_20171105_1901.py | jkbm/playesports | 1e01c909f183499906b26858fc54735dba5409d9 | [
"MIT"
] | 12 | 2019-11-04T13:36:37.000Z | 2022-03-11T23:32:50.000Z | hsapp/migrations/0037_auto_20171105_1901.py | jkbm/playesports | 1e01c909f183499906b26858fc54735dba5409d9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-05 17:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hsapp', '0036_post_image'),
]
operations = [
migrations.Alter... | 24.5 | 75 | 0.562009 |
4a16a9306780447674f4703cb900b6410a722e1f | 7,560 | py | Python | Scripts/GoogleChrome-postinstall.py | apizz/autopkg-mac-recipes | 509591779e3766b2daf35da5a650481f48388052 | [
"Apache-2.0"
] | 3 | 2021-04-10T05:43:54.000Z | 2021-12-21T00:56:56.000Z | Scripts/GoogleChrome-postinstall.py | apizz/autopkg-mac-recipes | 509591779e3766b2daf35da5a650481f48388052 | [
"Apache-2.0"
] | 6 | 2021-01-14T09:10:17.000Z | 2021-03-02T14:15:55.000Z | Scripts/GoogleChrome-postinstall.py | apizz/autopkg-mac-recipes | 509591779e3766b2daf35da5a650481f48388052 | [
"Apache-2.0"
] | 3 | 2020-12-08T12:21:28.000Z | 2021-03-02T05:13:24.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
chrome-enable-autoupdates.py
This script enables system wide automatic updates for Google Chrome.
It should work for Chrome versions 18 and later. No configuration needed
as this is originally intended as a munki postinstall script.
Created by Hannes Juutilainen, hjuutilain... | 31.239669 | 103 | 0.65119 |
4a16aa2a7f1baf50b2e51d614dbf11b7e73bbae3 | 4,076 | py | Python | dashboards/image_label_grid/ui.py | lichili233/dashboard_templates | 2b8c0383cb117edeb26525e7d722f59c051531b2 | [
"Apache-2.0"
] | null | null | null | dashboards/image_label_grid/ui.py | lichili233/dashboard_templates | 2b8c0383cb117edeb26525e7d722f59c051531b2 | [
"Apache-2.0"
] | null | null | null | dashboards/image_label_grid/ui.py | lichili233/dashboard_templates | 2b8c0383cb117edeb26525e7d722f59c051531b2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 dashboard_templates 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 ap... | 36.720721 | 108 | 0.64107 |
4a16ab5d56f81ac3526d4709b48782f32530968e | 1,531 | py | Python | dribdat/user/forms.py | open-network-infrastructure/dribdat | dae13e630908a6ddaacbeba84c35f4b9d820eecb | [
"MIT"
] | 5 | 2017-10-16T14:17:20.000Z | 2018-10-22T06:56:38.000Z | dribdat/user/forms.py | open-network-infrastructure/dribdat | dae13e630908a6ddaacbeba84c35f4b9d820eecb | [
"MIT"
] | 18 | 2019-02-19T12:50:52.000Z | 2019-02-20T13:08:46.000Z | dribdat/user/forms.py | hackathons-ftw/dribdat2 | 379568b540bea2f01a9bdd37f9e8b37844100579 | [
"MIT"
] | 1 | 2018-09-13T11:06:50.000Z | 2018-09-13T11:06:50.000Z | # -*- coding: utf-8 -*-
from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField
from wtforms.validators import DataRequired, Email, EqualTo, Length
from .models import User
class RegisterForm(FlaskForm):
"""Register form."""
username = StringField('Username',
... | 37.341463 | 98 | 0.615284 |
4a16ab7f70edce1142aa9244e84de210e4a1b1f4 | 2,101 | py | Python | download_signatures.py | ScatteredInk/dbpedia-datset-creator | fc5265d0209b8f6355446e0fa9c97bf8fc65988f | [
"MIT"
] | null | null | null | download_signatures.py | ScatteredInk/dbpedia-datset-creator | fc5265d0209b8f6355446e0fa9c97bf8fc65988f | [
"MIT"
] | null | null | null | download_signatures.py | ScatteredInk/dbpedia-datset-creator | fc5265d0209b8f6355446e0fa9c97bf8fc65988f | [
"MIT"
] | null | null | null | import os
import mwclient
import logging
import requests
from csv import DictWriter
from utf8_csv import UnicodeReader, UnicodeWriter
from collections import OrderedDict
logging.basicConfig(filename='downloads.log',level=logging.DEBUG)
def main():
#login using mwclient and env variables
WIKI_MEDIA_SITE = 'common... | 26.2625 | 69 | 0.710614 |
4a16abd119570b7e91879a09d0c65b352c45ee9a | 1,659 | py | Python | sdk/python/pulumi_azure_native/devices/v20170701/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devices/v20170701/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devices/v20170701/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from ._enums import *
from .certificate import *
from .get_certificate import *
from .get_iot_hub_resource ... | 37.704545 | 98 | 0.7173 |
4a16ac8c1233d38c3ba789fcb5f57aa92691ed0d | 5,779 | py | Python | cpmpy/nontransitive_dice.py | tias/hakank | 87b7f180c9393afce440864eb9e5fb119bdec1a4 | [
"MIT"
] | null | null | null | cpmpy/nontransitive_dice.py | tias/hakank | 87b7f180c9393afce440864eb9e5fb119bdec1a4 | [
"MIT"
] | null | null | null | cpmpy/nontransitive_dice.py | tias/hakank | 87b7f180c9393afce440864eb9e5fb119bdec1a4 | [
"MIT"
] | null | null | null | """
Nontransitive dice in cpmpy.
From
http://en.wikipedia.org/wiki/Nontransitive_dice
""
A set of nontransitive dice is a set of dice for which the relation
"is more likely to roll a higher number" is not transitive. See also
intransitivity.
This situation is similar to that in the game Rock, Pape... | 28.895 | 113 | 0.521024 |
4a16ac8f684328007bd4700e62cf311c55fda8e5 | 13,819 | py | Python | src/pyxer/routing.py | tml/pyxer | 4e3677b3f2c7f23ebf039a9ba9733f68a8460189 | [
"MIT"
] | 2 | 2016-01-25T06:01:14.000Z | 2016-02-07T20:30:25.000Z | src/pyxer/routing.py | tml/pyxer | 4e3677b3f2c7f23ebf039a9ba9733f68a8460189 | [
"MIT"
] | 2 | 2018-03-21T06:27:50.000Z | 2018-03-22T12:57:58.000Z | src/pyxer/routing.py | tml/pyxer | 4e3677b3f2c7f23ebf039a9ba9733f68a8460189 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
#############################################
## (C)opyright by Dirk Holtwick, 2008 ##
## All rights reserved ##
#############################################
from webob import Request
from webob import exc
from pyxer.controller import \
Controller, isController, c... | 34.634085 | 105 | 0.522541 |
4a16aca81fe762cb9d203c8a36be4f65121fa05e | 23,995 | py | Python | geo/bms/tax.py | Tamlyn78/geo | dd63372acdd1fe8b744c05eca5ad23836e6a1604 | [
"MIT"
] | null | null | null | geo/bms/tax.py | Tamlyn78/geo | dd63372acdd1fe8b744c05eca5ad23836e6a1604 | [
"MIT"
] | null | null | null | geo/bms/tax.py | Tamlyn78/geo | dd63372acdd1fe8b744c05eca5ad23836e6a1604 | [
"MIT"
] | null | null | null | """A script to first delete the contents of the new jobs module and then import data from the old jobs module"""
from os import getcwd, listdir
from os.path import isfile, join
from importlib import import_module
import psycopg2
from datetime import datetime
import pytz
import numpy as np
import pandas as pd
old_job_... | 29.770471 | 166 | 0.537612 |
4a16ad0aa82c52f8be640b25a18f464209687b13 | 5,605 | py | Python | codes/inertial_conversion.py | preetham-ganesh/multi-sensor-human-activity-recognition | 42b491fa39fee36870e48960b96af01b836e2e9f | [
"MIT"
] | 1 | 2022-01-12T05:08:57.000Z | 2022-01-12T05:08:57.000Z | codes/inertial_conversion.py | preetham-ganesh/multi-sensor-human-activity-recognition | 42b491fa39fee36870e48960b96af01b836e2e9f | [
"MIT"
] | null | null | null | codes/inertial_conversion.py | preetham-ganesh/multi-sensor-human-activity-recognition | 42b491fa39fee36870e48960b96af01b836e2e9f | [
"MIT"
] | null | null | null | # authors_name = 'Preetham Ganesh'
# project_title = 'Multi Sensor-based Human Activity Recognition using OpenCV and Sensor Fusion'
# email = 'preetham.ganesh2015@gmail.com'
import pandas as pd
import numpy as np
from scipy.io import loadmat
from skeleton_points_extraction import choose_caffe_model_files
from skeleto... | 47.5 | 120 | 0.62355 |
4a16ae1c0277205d1d71010d18149d292fe2ab71 | 10,115 | py | Python | contrib/status_testing/piped_status_testing/statustest.py | alexbrasetvik/Piped | 0312c14d6c4c293df378c915cc9787bcc7faed36 | [
"MIT"
] | 3 | 2015-02-12T20:34:30.000Z | 2016-08-06T06:54:48.000Z | contrib/status_testing/piped_status_testing/statustest.py | alexbrasetvik/Piped | 0312c14d6c4c293df378c915cc9787bcc7faed36 | [
"MIT"
] | null | null | null | contrib/status_testing/piped_status_testing/statustest.py | alexbrasetvik/Piped | 0312c14d6c4c293df378c915cc9787bcc7faed36 | [
"MIT"
] | 2 | 2015-12-16T14:18:14.000Z | 2019-04-12T01:43:10.000Z | # Copyright (c) 2010-2011, Found IT A/S and Piped Project Contributors.
# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
#
# See LICENSE for details.
""" Status tests are tests that run inside a live process to do
system-/health-checks, etc --- possibly being re-run at arbitrary
intervals.
This module is heavily... | 37.742537 | 137 | 0.644093 |
4a16af0d9af19f3ead6082b972d434aaef66203a | 11,517 | py | Python | pyabsa/core/apc/classic/__bert__/dataset_utils/data_utils_for_training.py | froth-synthesio/PyABSA | 61406e7a49f93f6c986dfd7e583d730b69c2861c | [
"MIT"
] | 199 | 2021-06-07T15:07:28.000Z | 2022-03-31T11:53:28.000Z | pyabsa/core/apc/classic/__bert__/dataset_utils/data_utils_for_training.py | froth-synthesio/PyABSA | 61406e7a49f93f6c986dfd7e583d730b69c2861c | [
"MIT"
] | 98 | 2021-06-06T06:01:02.000Z | 2022-03-31T15:48:28.000Z | pyabsa/core/apc/classic/__bert__/dataset_utils/data_utils_for_training.py | froth-synthesio/PyABSA | 61406e7a49f93f6c986dfd7e583d730b69c2861c | [
"MIT"
] | 55 | 2021-06-10T08:52:17.000Z | 2022-03-31T11:08:58.000Z | # -*- coding: utf-8 -*-
# file: data_utils.py
# author: songyouwei <youwei0314@gmail.com>
# Copyright (C) 2018. All Rights Reserved.
import os
import pickle
import numpy as np
import tqdm
from findfile import find_file
from google_drive_downloader.google_drive_downloader import GoogleDriveDownloader as gdd
from termc... | 42.655556 | 148 | 0.623339 |
4a16b0f32a9f7a00b33ac69168b9a736901bb1cf | 7,678 | py | Python | basenji/dna_io.py | lisabang/basenji | f91bb195b4062c55e487a4091e13a0e813ef07d6 | [
"Apache-2.0"
] | null | null | null | basenji/dna_io.py | lisabang/basenji | f91bb195b4062c55e487a4091e13a0e813ef07d6 | [
"Apache-2.0"
] | null | null | null | basenji/dna_io.py | lisabang/basenji | f91bb195b4062c55e487a4091e13a0e813ef07d6 | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing, sof... | 24.767742 | 80 | 0.514327 |
4a16b1186f2e79e8075d6a6092e5cf9132f104d8 | 703 | py | Python | build/android/pylib/instrumentation/test_options.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5 | 2015-04-30T00:13:21.000Z | 2019-07-10T02:17:24.000Z | build/android/pylib/instrumentation/test_options.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | build/android/pylib/instrumentation/test_options.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2015-03-27T11:15:39.000Z | 2016-08-17T14:19:56.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.
"""Defines the InstrumentationOptions named tuple."""
import collections
InstrumentationOptions = collections.namedtuple('InstrumentationOptions', [
't... | 25.107143 | 75 | 0.70128 |
4a16b1cf96bae1d59ead4e12a91c74461571e7d8 | 16,134 | py | Python | nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py | fedorovgv/NeMo | 48ff3dc75b21b09ac55d114abde2bc880c4104da | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py | fedorovgv/NeMo | 48ff3dc75b21b09ac55d114abde2bc880c4104da | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py | fedorovgv/NeMo | 48ff3dc75b21b09ac55d114abde2bc880c4104da | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022, NVIDIA CORPORATION. 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 appli... | 43.139037 | 127 | 0.653217 |
4a16b256216f86f940637176366668d99c000ed1 | 292 | py | Python | script1.py | jackomo007/PortfolioFlask | e3b755ac6ffc98816404331270a861e5832170f7 | [
"MIT"
] | 1 | 2020-07-07T17:19:59.000Z | 2020-07-07T17:19:59.000Z | script1.py | jackomo007/PortfolioFlask | e3b755ac6ffc98816404331270a861e5832170f7 | [
"MIT"
] | null | null | null | script1.py | jackomo007/PortfolioFlask | e3b755ac6ffc98816404331270a861e5832170f7 | [
"MIT"
] | null | null | null | from flask import Flask, render_template
app = Flask(__name__)
@app.route("/flask")
def home():
return render_template("home.html")
@app.route("/flask/about")
def about():
return render_template("about.html")
if __name__ == "__main__":
app.run(debug=True)
| 16.222222 | 41 | 0.64726 |
4a16b28e99883740e2ff5f9f4425d18caded6e43 | 1,174 | py | Python | src/package_controller/library/utils/git/gitignore.py | alexseitsinger/package_controller | 0ee896986cfa17a96bf9fb6afff35dd97f0b1211 | [
"BSD-2-Clause"
] | 2 | 2020-11-24T14:16:38.000Z | 2021-03-16T19:29:45.000Z | src/package_controller/library/utils/git/gitignore.py | alexseitsinger/package_controller | 0ee896986cfa17a96bf9fb6afff35dd97f0b1211 | [
"BSD-2-Clause"
] | 2 | 2020-11-25T01:00:45.000Z | 2020-11-25T01:59:58.000Z | src/package_controller/library/utils/git/gitignore.py | alexseitsinger/package_controller | 0ee896986cfa17a96bf9fb6afff35dd97f0b1211 | [
"BSD-2-Clause"
] | null | null | null | import requests
import os
GITHUB_URL = "https://raw.githubusercontent.com/github/gitignore/{}.gitignore"
def get_gitignore_for_language(language, timeout=5.0):
try:
language = language.capitalize()
url = GITHUB_URL.format(language)
response = requests.get(url, timeout=timeout)
if... | 32.611111 | 78 | 0.623509 |
4a16b43c52af654be4aa50d3d44dbfd167b20896 | 9,683 | py | Python | docs/source/conf.py | KnowEnG-Research/Feature_Prioritization_Pipeline | 6185dfb70c8941e0526026a063a2caf4f0a071d4 | [
"MIT"
] | null | null | null | docs/source/conf.py | KnowEnG-Research/Feature_Prioritization_Pipeline | 6185dfb70c8941e0526026a063a2caf4f0a071d4 | [
"MIT"
] | 1 | 2019-01-24T14:47:59.000Z | 2019-01-24T18:00:24.000Z | docs/source/conf.py | KnowEnG-Research/Feature_Prioritization_Pipeline | 6185dfb70c8941e0526026a063a2caf4f0a071d4 | [
"MIT"
] | 3 | 2017-12-13T17:06:38.000Z | 2019-01-23T18:30:36.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# feature_prioritization_pipeline documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 17 13:35:39 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values ... | 33.274914 | 108 | 0.724259 |
4a16b59798e5030a2a2f4f0b6c83e7526f2f199c | 1,485 | py | Python | 2021/day09/python/part2.py | jmkacz/practice-advent-of-code | c06f474576e91ed0778c8a30a51bad848a602eb6 | [
"MIT"
] | null | null | null | 2021/day09/python/part2.py | jmkacz/practice-advent-of-code | c06f474576e91ed0778c8a30a51bad848a602eb6 | [
"MIT"
] | null | null | null | 2021/day09/python/part2.py | jmkacz/practice-advent-of-code | c06f474576e91ed0778c8a30a51bad848a602eb6 | [
"MIT"
] | null | null | null | import math
from typing import List, Tuple
def find_low_points(lines: List[str]) -> List[Tuple[int, int]]:
result = []
rows = len(lines)
cols = len(lines[0])
for r in range(rows):
for c in range(cols):
# up
if r > 0 and lines[r - 1][c] <= lines[r][c]:
co... | 26.517857 | 70 | 0.453199 |
4a16b5b91287a989b08f209fcba004257d253c02 | 1,694 | py | Python | python/caffe/test/test_io.py | Jiawei-Gu/caffe_gu | 4b14878abf6cc9c73bdcc88245d546d2512429df | [
"BSD-2-Clause"
] | 36,275 | 2015-01-01T01:59:21.000Z | 2022-03-31T22:23:56.000Z | python/caffe/test/test_io.py | wangrui1996/caffeface | feeb1d7c40e4a065c947933d6fab6fb218449551 | [
"Intel",
"BSD-2-Clause"
] | 5,493 | 2015-01-01T09:07:53.000Z | 2022-03-31T10:19:53.000Z | python/caffe/test/test_io.py | wangrui1996/caffeface | feeb1d7c40e4a065c947933d6fab6fb218449551 | [
"Intel",
"BSD-2-Clause"
] | 18,620 | 2015-01-01T01:40:01.000Z | 2022-03-31T11:17:59.000Z | import numpy as np
import unittest
import caffe
class TestBlobProtoToArray(unittest.TestCase):
def test_old_format(self):
data = np.zeros((10,10))
blob = caffe.proto.caffe_pb2.BlobProto()
blob.data.extend(list(data.flatten()))
shape = (1,1,10,10)
blob.num, blob.channels, b... | 29.719298 | 65 | 0.621015 |
4a16b67dbc05077a122bacdd72ef56f78bf961bc | 8,108 | py | Python | create_template.py | DJClean/vmware_ipxe | 1c5f4c7abfe7b968460ebdf82d5640ac62aea193 | [
"MIT"
] | null | null | null | create_template.py | DJClean/vmware_ipxe | 1c5f4c7abfe7b968460ebdf82d5640ac62aea193 | [
"MIT"
] | null | null | null | create_template.py | DJClean/vmware_ipxe | 1c5f4c7abfe7b968460ebdf82d5640ac62aea193 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import sys
import sqlite3
import re
from string import Template
import ipaddress
inputfile = None
templatefolder = None
outputfolder = None
def main(arguments):
global inputfile
global templatefolder
global outputfolder
inputfile = arguments.inputfile... | 27.958621 | 104 | 0.575234 |
4a16b834be526461d1aa961bbd85cbd58928e855 | 905 | py | Python | src/lightmlboard/metrics/__init__.py | sdpython/lightmlboard | 15e3f9522e2b5f5ef9d358d2d42b9c1f271fc143 | [
"MIT"
] | null | null | null | src/lightmlboard/metrics/__init__.py | sdpython/lightmlboard | 15e3f9522e2b5f5ef9d358d2d42b9c1f271fc143 | [
"MIT"
] | 1 | 2018-04-19T19:58:08.000Z | 2021-12-29T10:58:07.000Z | src/lightmlboard/metrics/__init__.py | sdpython/lightmlboard | 15e3f9522e2b5f5ef9d358d2d42b9c1f271fc143 | [
"MIT"
] | null | null | null | """
@file
@brief Implements metrics.
"""
import sklearn.metrics as skmetrics
from .classification import roc_auc_score_micro, roc_auc_score_macro, reshape, multi_label_jaccard
from .regression import mse
from .regression_custom import l1_reg_max
def sklearn_metric(met, exp, val):
"""
Looks into metrics availa... | 29.193548 | 98 | 0.651934 |
4a16b9101a16587e7a3cb0f1054b536c88f74db2 | 14,611 | py | Python | src/utils/fixtures_utils.py | maticardenas/football_api_notif | 81f9e265d4effb7545e3d9ad80ee1109cd9b8edf | [
"MIT"
] | null | null | null | src/utils/fixtures_utils.py | maticardenas/football_api_notif | 81f9e265d4effb7545e3d9ad80ee1109cd9b8edf | [
"MIT"
] | null | null | null | src/utils/fixtures_utils.py | maticardenas/football_api_notif | 81f9e265d4effb7545e3d9ad80ee1109cd9b8edf | [
"MIT"
] | null | null | null | import re
import urllib
from datetime import datetime
from typing import Any, Dict, List, Optional, Tuple
from urllib.error import HTTPError
from deep_translator import GoogleTranslator
from sqlmodel import select
from src.api.fixtures_client import FixturesClient
from src.api.images_search_client import ImagesSearch... | 31.763043 | 88 | 0.63856 |
4a16b9cf893176c6475514978ce377419db8fe72 | 1,677 | py | Python | apps/webapp/__init__.py | mbuciora/DevOps | 9f5010ae3ed0c29d1fe2ef0fbbca9d55a6406374 | [
"MIT"
] | 1 | 2018-02-22T21:22:32.000Z | 2018-02-22T21:22:32.000Z | apps/webapp/__init__.py | mbuciora/DevOps | 9f5010ae3ed0c29d1fe2ef0fbbca9d55a6406374 | [
"MIT"
] | null | null | null | apps/webapp/__init__.py | mbuciora/DevOps | 9f5010ae3ed0c29d1fe2ef0fbbca9d55a6406374 | [
"MIT"
] | 3 | 2017-05-08T10:52:02.000Z | 2020-02-05T17:01:00.000Z | import os
import sys
from os import path
from flask import Flask
from flask.ext.login import LoginManager
from flask_sqlalchemy import SQLAlchemy
from flask_recaptcha import ReCaptcha
app = Flask(__name__)
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
#config for Forms, Register and FCM tokens
a... | 34.9375 | 476 | 0.80322 |
4a16b9dd83944034ce337dd4ce4315329240ee85 | 2,213 | py | Python | restplus/api/v1/auth/login.py | davenmathews/Restplus | 6a77c3eeccdec51d6109c7015bebe888a477343a | [
"MIT"
] | null | null | null | restplus/api/v1/auth/login.py | davenmathews/Restplus | 6a77c3eeccdec51d6109c7015bebe888a477343a | [
"MIT"
] | null | null | null | restplus/api/v1/auth/login.py | davenmathews/Restplus | 6a77c3eeccdec51d6109c7015bebe888a477343a | [
"MIT"
] | null | null | null | from flask_login import login_user, LoginManager, current_user
from flask_restplus import Resource, fields
from flask_restplus.namespace import Namespace
from restplus.api.v1.auth.helpers import extract_auth_data, generate_auth_output
from restplus.models import users_list
auth_ns = Namespace('auth')
login_manager =... | 34.046154 | 116 | 0.633529 |
4a16ba1fef960cdb08c40046752f55ace9a5b9df | 2,646 | py | Python | 20211127/e/union-find.py | seigot/atcoder | 6c2da684c75b7c5de162de3713a13507aeecce1d | [
"MIT"
] | 2 | 2021-12-28T11:43:47.000Z | 2022-02-20T14:41:27.000Z | 20211127/e/union-find.py | seigot/atcoder | 6c2da684c75b7c5de162de3713a13507aeecce1d | [
"MIT"
] | null | null | null | 20211127/e/union-find.py | seigot/atcoder | 6c2da684c75b7c5de162de3713a13507aeecce1d | [
"MIT"
] | null | null | null | #!/bin/python
n, m = map(int, input().split())
l = [list(map(int, input().split())) for l in range(m)]
# https://at274.hatenablog.com/entry/2018/02/02/173000
#class UnionFind:
# def __init__(self, n):
# self.par = [i for i in range(n+1)]
# self.rank = [0] * (n+1)
#
# # 検索
# def find(self, x):
#... | 23.210526 | 67 | 0.47997 |
4a16baec4d5caea2c0aad5fa922768d468550bdc | 544 | py | Python | buggy/migrations/0005_add_bug_index.py | fusionbox/buggy | fb6f4a34f6896b65c843ebe711f5bf3279d33049 | [
"BSD-3-Clause"
] | 2 | 2017-05-08T23:11:41.000Z | 2017-05-22T19:27:36.000Z | buggy/migrations/0005_add_bug_index.py | fusionbox/buggy | fb6f4a34f6896b65c843ebe711f5bf3279d33049 | [
"BSD-3-Clause"
] | 4 | 2017-05-03T17:46:47.000Z | 2017-05-08T17:13:57.000Z | buggy/migrations/0005_add_bug_index.py | fusionbox/buggy | fb6f4a34f6896b65c843ebe711f5bf3279d33049 | [
"BSD-3-Clause"
] | 2 | 2017-05-22T19:28:21.000Z | 2017-05-26T17:24:51.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-03 16:22
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('buggy', '0004_bug_fulltext'),
]
operations = [
migrations.RunSQL(
"""
... | 22.666667 | 109 | 0.580882 |
4a16bc7499ab5db7ae78ab512a6fd916a56badd8 | 3,479 | py | Python | berts/berts.py | yhyu/berts | ca1d6917cdba2aa7de611fe7aafb30d4c6d310b3 | [
"Apache-2.0"
] | null | null | null | berts/berts.py | yhyu/berts | ca1d6917cdba2aa7de611fe7aafb30d4c6d310b3 | [
"Apache-2.0"
] | null | null | null | berts/berts.py | yhyu/berts | ca1d6917cdba2aa7de611fe7aafb30d4c6d310b3 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import tensorflow.keras as keras
import tensorflow_hub as hub
def BertClassificationModel(
pretrain_url,
classes,
return_sequences=False,
max_seq_length=None,
dropout_rate=0.1,
train_bert=True):
# inputs
input_words_seq = keras.layers.Input(shape=(max_seq_length... | 39.988506 | 115 | 0.702788 |
4a16bcac184934b74355f570b954bbb1bb1f08b3 | 914 | py | Python | metaclasses/avoid_init_using_metaclass.py | imsurinder90/metaclasses_and_patterns_in_python | 456a2d25eb1a46f9029fe83ed7d2ed14919beaa5 | [
"MIT"
] | null | null | null | metaclasses/avoid_init_using_metaclass.py | imsurinder90/metaclasses_and_patterns_in_python | 456a2d25eb1a46f9029fe83ed7d2ed14919beaa5 | [
"MIT"
] | null | null | null | metaclasses/avoid_init_using_metaclass.py | imsurinder90/metaclasses_and_patterns_in_python | 456a2d25eb1a46f9029fe83ed7d2ed14919beaa5 | [
"MIT"
] | null | null | null | """
With the help of metaclass we can make our class look
simple. Metaclass creates a class object and assigns
_fields to it.
"""
from inspect import Parameter, Signature
def make_signature(args):
return Signature(
Parameter(name, Parameter.POSITIONAL_OR_KEYWORD)
for name in args)
class AnimalMeta(type):
def... | 25.388889 | 56 | 0.714442 |
4a16bdd8ece06ec13e9f9fa51c20f250498fa510 | 961 | py | Python | widgets/spacer/spacer_base.py | ardovm/wxGlade | a4cf8e65bcc6df5f65cf8ca5c49b9a628bf1e8eb | [
"MIT"
] | 225 | 2018-03-26T11:23:22.000Z | 2022-03-24T09:44:08.000Z | widgets/spacer/spacer_base.py | ardovm/wxGlade | a4cf8e65bcc6df5f65cf8ca5c49b9a628bf1e8eb | [
"MIT"
] | 403 | 2018-01-03T19:47:28.000Z | 2018-03-23T17:43:39.000Z | widgets/spacer/spacer_base.py | ardovm/wxGlade | a4cf8e65bcc6df5f65cf8ca5c49b9a628bf1e8eb | [
"MIT"
] | 47 | 2018-04-08T16:48:38.000Z | 2021-12-21T20:08:44.000Z | """\
Code generator functions for spacers
@copyright: 2019 Dietmar Schwertberger
@license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY
"""
class SpacerMixin(object):
"Generic code to handle spacer code in all language code generators"
def get_code(self, obj):
sizer = obj.parent # pa... | 38.44 | 125 | 0.656608 |
4a16beee133acb7ab138d995a268a5128522b4ea | 67,669 | py | Python | bleak/backends/_manufacturers.py | pjbosco/bleak | 7c65d74e7dda14d130de4065eb33d1ca20553adf | [
"MIT"
] | 753 | 2018-08-01T08:46:21.000Z | 2022-03-31T22:58:12.000Z | bleak/backends/_manufacturers.py | pjbosco/bleak | 7c65d74e7dda14d130de4065eb33d1ca20553adf | [
"MIT"
] | 587 | 2018-04-27T09:47:58.000Z | 2022-03-31T14:55:57.000Z | bleak/backends/_manufacturers.py | pjbosco/bleak | 7c65d74e7dda14d130de4065eb33d1ca20553adf | [
"MIT"
] | 180 | 2018-09-28T09:34:58.000Z | 2022-03-30T19:19:34.000Z | """
Manufacturer data retrieved from https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
"""
MANUFACTURERS = {
0x0000: "Ericsson Technology Licensing",
0x0001: "Nokia Mobile Phones",
0x0002: "Intel Corp.",
0x0003: "IBM Corp.",
0x0004: "Toshiba Corp.",
0x0005: "3Com",
... | 34.934951 | 408 | 0.639303 |
4a16bef545b1bc3507ccc9c979d368101f6dde1f | 1,943 | py | Python | toggl_extra/nubia_wiring/nubia_context.py | oshev/toggl-extra | f187dee850eada14c99d0d76ddac20a5d824f9d8 | [
"MIT"
] | null | null | null | toggl_extra/nubia_wiring/nubia_context.py | oshev/toggl-extra | f187dee850eada14c99d0d76ddac20a5d824f9d8 | [
"MIT"
] | 1 | 2019-07-01T10:20:51.000Z | 2019-07-07T19:59:43.000Z | toggl_extra/nubia_wiring/nubia_context.py | oshev/toggl-extra | f187dee850eada14c99d0d76ddac20a5d824f9d8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# This class was largely borrowed from
# https://github.com/facebookincubator/python-nubia/tree/master/example
# so the original copyright is kept untouched.
#
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license f... | 33.5 | 102 | 0.709727 |
4a16bf692c3493cd5c391fd838c9332b0bbdc25f | 200 | py | Python | SUYI/final/FullEducationData/test.py | caHaber/cahaber2019 | d11dd4b448659af7d8927cc9dbf44d66343743bc | [
"Apache-2.0"
] | 1 | 2020-07-28T20:15:42.000Z | 2020-07-28T20:15:42.000Z | SUYI/final/FullEducationData/test.py | caHaber/oldwebsite | d11dd4b448659af7d8927cc9dbf44d66343743bc | [
"Apache-2.0"
] | null | null | null | SUYI/final/FullEducationData/test.py | caHaber/oldwebsite | d11dd4b448659af7d8927cc9dbf44d66343743bc | [
"Apache-2.0"
] | null | null | null | import anaconda2
import pandas as pd
import matplotlib.pyplot as plt
s = pd.read_csv('SUYI Proxy Data 2012-2013.csv');
df = pd.DataFrame(s);
df.sort('School', ascending=False);
print(df.head(30));
| 18.181818 | 49 | 0.73 |
4a16bfe50043500b36068815b37d036fb2f9859d | 14,057 | py | Python | homeassistant/components/zha/core/gateway.py | maexono/home-assistant | c174b83f5408124fc7834e8282969a1e8f9cca16 | [
"Apache-2.0"
] | 2 | 2019-02-04T15:05:30.000Z | 2019-03-04T16:31:32.000Z | homeassistant/components/zha/core/gateway.py | maexono/home-assistant | c174b83f5408124fc7834e8282969a1e8f9cca16 | [
"Apache-2.0"
] | 1 | 2017-12-15T12:45:32.000Z | 2018-05-19T09:48:30.000Z | homeassistant/components/zha/core/gateway.py | maexono/home-assistant | c174b83f5408124fc7834e8282969a1e8f9cca16 | [
"Apache-2.0"
] | 3 | 2019-04-28T16:35:45.000Z | 2020-05-28T15:21:59.000Z | """
Virtual gateway for Zigbee Home Automation.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/zha/
"""
import asyncio
import collections
import itertools
import logging
import os
import traceback
from homeassistant.components.system_log import LogEnt... | 37.286472 | 79 | 0.636053 |
4a16c0283c13e780bcbe5889bd97e6a1a6913734 | 652 | py | Python | zen/api/quotes/viewer.py | ymussi/zen_quotes_of_python | 2d6fa9cd7a1d20eee8e84b284f182ec89364b190 | [
"MIT"
] | null | null | null | zen/api/quotes/viewer.py | ymussi/zen_quotes_of_python | 2d6fa9cd7a1d20eee8e84b284f182ec89364b190 | [
"MIT"
] | null | null | null | zen/api/quotes/viewer.py | ymussi/zen_quotes_of_python | 2d6fa9cd7a1d20eee8e84b284f182ec89364b190 | [
"MIT"
] | null | null | null | from flask_restplus import Resource
from flask import request, jsonify
from zen.api import api
from zen.api.quotes import Quotes
import logging
import json
log = logging.getLogger(__name__)
ns = api.namespace(
'/', description='List Zen Quotes')
@ns.route('/')
@ns.route('/<int:number>')
@ns.route('/<string:lan... | 23.285714 | 61 | 0.653374 |
4a16c06ab9e3957ba7e0ce0b676153fc4856f649 | 1,046 | py | Python | src/rules/intention/dispatch.py | FrozenYogurtPuff/iStar-pipeline | aff129d201673925255890e06123798603b9163d | [
"MIT"
] | null | null | null | src/rules/intention/dispatch.py | FrozenYogurtPuff/iStar-pipeline | aff129d201673925255890e06123798603b9163d | [
"MIT"
] | null | null | null | src/rules/intention/dispatch.py | FrozenYogurtPuff/iStar-pipeline | aff129d201673925255890e06123798603b9163d | [
"MIT"
] | null | null | null | from __future__ import annotations
import logging
import spacy_alignments as tokenizations
from src.deeplearning.infer.result import BertResult
from src.rules.dispatch import dispatch
from src.rules.intention.aux_slice.dispatch import dispatch as dispatch_slice
from src.utils.spacy import get_spacy
from src.utils.ty... | 28.27027 | 79 | 0.717973 |
4a16c25be8925f9c84bdf980193258a577e0879d | 5,881 | py | Python | evennia/utils/tests/test_validatorfuncs.py | bradley-evans/evennia | 4ad54ffd7ce5755454551dd26a2a410b3e417345 | [
"BSD-3-Clause"
] | null | null | null | evennia/utils/tests/test_validatorfuncs.py | bradley-evans/evennia | 4ad54ffd7ce5755454551dd26a2a410b3e417345 | [
"BSD-3-Clause"
] | null | null | null | evennia/utils/tests/test_validatorfuncs.py | bradley-evans/evennia | 4ad54ffd7ce5755454551dd26a2a410b3e417345 | [
"BSD-3-Clause"
] | null | null | null | """Tests for validatorfuncs """
from django.test import TestCase
from evennia.utils import validatorfuncs
import mock
import datetime
import pytz
class TestValidatorFuncs(TestCase):
def test_text_ok(self):
for val in [None, -123, 'abc', 1.234, {1:True, 2:False}, ['a', 1]]:
self.assertEqual(s... | 38.690789 | 80 | 0.600408 |
4a16c260f33c800a2f7f166b5ac402a88624ffc9 | 53,225 | py | Python | Allura/allura/tests/functional/test_neighborhood.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 113 | 2015-03-25T10:33:37.000Z | 2022-02-16T20:55:06.000Z | Allura/allura/tests/functional/test_neighborhood.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 4 | 2017-08-04T16:19:07.000Z | 2020-06-08T19:01:33.000Z | Allura/allura/tests/functional/test_neighborhood.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 36 | 2015-08-14T16:27:39.000Z | 2022-02-16T20:54:35.000Z | # coding=utf-8
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License,... | 47.821204 | 120 | 0.546999 |
4a16c28859465e18f6edc7a3e5586d1acbc0267c | 863 | py | Python | data_structures/math/geometry/2D/segment.py | Pysics/Algorithm | 223f618e3e6d96e15091783b81b90ee00c771e8f | [
"MIT"
] | null | null | null | data_structures/math/geometry/2D/segment.py | Pysics/Algorithm | 223f618e3e6d96e15091783b81b90ee00c771e8f | [
"MIT"
] | 3 | 2022-03-30T01:30:32.000Z | 2022-03-31T12:52:04.000Z | data_structures/math/geometry/2D/segment.py | Pysics/Algorithm | 223f618e3e6d96e15091783b81b90ee00c771e8f | [
"MIT"
] | 4 | 2022-03-29T12:27:48.000Z | 2022-03-30T05:02:31.000Z | from __future__ import annotations
import typing
import sympy
from polygon import Polygon
from sector import Sector
if typing.TYPE_CHECKING:
from circle import Circle
from point import Point
class Segment:
def __init__(self, circle: Circle, point_1: Point, point_2: Point) -> None:
self.circle =... | 27.83871 | 116 | 0.668598 |
4a16c2943bfb5d21c8f72a5228178edbbefe75df | 11,505 | py | Python | code/python/SecuritizedDerivativesAPIforDigitalPortals/v2/fds/sdk/SecuritizedDerivativesAPIforDigitalPortals/model/inline_response2005_data_key_figures_delta_unadjusted.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/SecuritizedDerivativesAPIforDigitalPortals/v2/fds/sdk/SecuritizedDerivativesAPIforDigitalPortals/model/inline_response2005_data_key_figures_delta_unadjusted.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/SecuritizedDerivativesAPIforDigitalPortals/v2/fds/sdk/SecuritizedDerivativesAPIforDigitalPortals/model/inline_response2005_data_key_figures_delta_unadjusted.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Prime Developer Trial
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.S... | 44.25 | 124 | 0.576271 |
4a16c2dcafbd6362e28db11c64dc9014984059d0 | 48,758 | py | Python | test/unit/data/test_galaxy_mapping.py | yvanlebras/galaxy | 6b8489ca866825bcdf033523120a8b24ea6e6342 | [
"CC-BY-3.0"
] | null | null | null | test/unit/data/test_galaxy_mapping.py | yvanlebras/galaxy | 6b8489ca866825bcdf033523120a8b24ea6e6342 | [
"CC-BY-3.0"
] | 2 | 2017-05-18T16:12:55.000Z | 2022-03-08T12:08:43.000Z | test/unit/data/test_galaxy_mapping.py | yvanlebras/galaxy | 6b8489ca866825bcdf033523120a8b24ea6e6342 | [
"CC-BY-3.0"
] | null | null | null | import collections
import os
import random
import unittest
import uuid
from tempfile import NamedTemporaryFile
from typing import List
import pytest
from sqlalchemy import (
inspect,
select,
)
import galaxy.datatypes.registry
import galaxy.model
import galaxy.model.mapping as mapping
from galaxy import model
... | 44.365787 | 150 | 0.677591 |
4a16c3ff5b4bb345b435c1e276048a7adbfb2d5c | 148 | py | Python | cython/setup.py | brittainhard/py | aede05530ad05a8319fef7e76b49e4bf3cebebac | [
"MIT"
] | null | null | null | cython/setup.py | brittainhard/py | aede05530ad05a8319fef7e76b49e4bf3cebebac | [
"MIT"
] | null | null | null | cython/setup.py | brittainhard/py | aede05530ad05a8319fef7e76b49e4bf3cebebac | [
"MIT"
] | null | null | null | from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules=cythonize("hello_world.pyx"),
name="Hello World"
)
| 16.444444 | 45 | 0.75 |
4a16c43a8600aa1e30ebe5fa8cf96b0046ee3b14 | 2,906 | py | Python | tensor2tensor/utils/video2gif.py | repoloper/tensor2tensor | 2fd91d34b8e6d79599c0612e446175174e838b9d | [
"Apache-2.0"
] | 61 | 2018-06-23T01:40:58.000Z | 2021-06-07T09:33:38.000Z | tensor2tensor/utils/video2gif.py | zhaopufeng/tensor2tensor | 7bb67a18e1e4a0cddd1d61c65c937f14c1c124e3 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/utils/video2gif.py | zhaopufeng/tensor2tensor | 7bb67a18e1e4a0cddd1d61c65c937f14c1c124e3 | [
"Apache-2.0"
] | 8 | 2018-10-23T13:10:12.000Z | 2019-07-31T05:53:08.000Z | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | 31.247312 | 82 | 0.718169 |
4a16c4d40226b0c455b3cbcfd51a9789fdd5e258 | 7,594 | py | Python | gans/cgan.py | er-Bot/gans | fc19446750e10896dd3b1746b0ccb3c4d3b5ed8d | [
"MIT"
] | null | null | null | gans/cgan.py | er-Bot/gans | fc19446750e10896dd3b1746b0ccb3c4d3b5ed8d | [
"MIT"
] | null | null | null | gans/cgan.py | er-Bot/gans | fc19446750e10896dd3b1746b0ccb3c4d3b5ed8d | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from tqdm.auto import tqdm
from torchvision.utils import make_grid
import matplotlib.pyplot as plt
__all__ = ["Discriminator", "Generator", "CGAN"]
criterion = nn.BCEWithLogitsLoss()
hidden_dim = 128
class Discriminator(nn.Module):
def __init__... | 37.97 | 111 | 0.564393 |
4a16c50ac67ab1d7846d6e1d5c5e6c9ff2749df8 | 8,546 | py | Python | UnityEngine/UI/GraphicRaycaster/__init__.py | Grim-es/udon-pie-auto-completion | c2cd86554ed615cdbbb01e19fa40665eafdfaedc | [
"MIT"
] | null | null | null | UnityEngine/UI/GraphicRaycaster/__init__.py | Grim-es/udon-pie-auto-completion | c2cd86554ed615cdbbb01e19fa40665eafdfaedc | [
"MIT"
] | null | null | null | UnityEngine/UI/GraphicRaycaster/__init__.py | Grim-es/udon-pie-auto-completion | c2cd86554ed615cdbbb01e19fa40665eafdfaedc | [
"MIT"
] | null | null | null | from typing import overload
from UdonPie import System
from UdonPie import UnityEngine
from UdonPie.Undefined import *
class GraphicRaycaster:
def __new__(cls, arg1=None):
'''
:returns: GraphicRaycaster
:rtype: UnityEngine.UI.GraphicRaycaster
'''
pass
@staticmethod
... | 20.742718 | 77 | 0.540838 |
4a16c5db35587459a30c9c56b88a1572f07adc02 | 1,755 | py | Python | setup.py | vincentxavier/sphinx-proof | e400bd95a21159cd6cabe2026d53eb807df2d675 | [
"MIT"
] | 12 | 2020-11-17T02:39:50.000Z | 2022-02-16T21:14:01.000Z | setup.py | vincentxavier/sphinx-proof | e400bd95a21159cd6cabe2026d53eb807df2d675 | [
"MIT"
] | 33 | 2020-10-09T14:10:22.000Z | 2022-03-20T05:47:30.000Z | setup.py | executablebooks/sphinxcontrib-prettyproof | e400bd95a21159cd6cabe2026d53eb807df2d675 | [
"MIT"
] | 6 | 2021-03-05T16:38:47.000Z | 2022-02-04T11:19:05.000Z | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = "v0.1.3"
LONG_DESCRIPTION = """
This package contains a [Sphinx](http://www.sphinx-doc.org/en/master/) extension
for producing proof, theorem, axiom, lemma, definition, criterion, remark, conjecture,
corollary, algorithm, example, property... | 27.421875 | 86 | 0.649003 |
4a16c697b6ae42e609288f0f91f2273bd8318a59 | 946 | py | Python | caption.py | skypher/python-imagemagick-annotations | f2914bdfbc98a42b905664b903f9de4dd4a82199 | [
"MIT"
] | null | null | null | caption.py | skypher/python-imagemagick-annotations | f2914bdfbc98a42b905664b903f9de4dd4a82199 | [
"MIT"
] | null | null | null | caption.py | skypher/python-imagemagick-annotations | f2914bdfbc98a42b905664b903f9de4dd4a82199 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import re
import os
with open('desc.txt', 'r') as f:
while 1:
line = f.readline()
if line == '': # EOF
break
sys.stdout.write(line)
if re.match('^\s$', line, re.UNICODE): # skip empty lines
continue
line2 = f.readline()
... | 30.516129 | 246 | 0.504228 |
4a16c77e6374f70e58259a4d2b5c01d14770a76b | 1,376 | py | Python | common/src/stack/command/stack/commands/add/box/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/add/box/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/add/box/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | # @copyright@
# Copyright (c) 2006 - 2019 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
#
# @rocks@
# Copyright (c) 2000 - 2010 The Regents of the University of California
# All rights reserved. Rocks(r) v5.4 www.rocksclusters.org
# ... | 25.962264 | 79 | 0.692587 |
4a16c9161e12e4eb6feb73ab75a868f8f12686f2 | 2,628 | py | Python | pychron/graph/tools/cursor_tool_overlay.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | 1 | 2019-02-27T21:57:44.000Z | 2019-02-27T21:57:44.000Z | pychron/graph/tools/cursor_tool_overlay.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | 80 | 2018-07-17T20:10:20.000Z | 2021-08-17T15:38:24.000Z | pychron/graph/tools/cursor_tool_overlay.py | AGESLDEO/pychron | 1a81e05d9fba43b797f335ceff6837c016633bcf | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2014 Jake Ross
#
# 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/licens... | 36 | 88 | 0.578767 |
4a16c93817e37a847ee921257e7a72097321518e | 1,122 | py | Python | kodi_library_update.py | joshlapham/py-misc-scripts | 67495e1551ec2151be9179b619a3f31ddcd784ba | [
"Beerware"
] | null | null | null | kodi_library_update.py | joshlapham/py-misc-scripts | 67495e1551ec2151be9179b619a3f31ddcd784ba | [
"Beerware"
] | null | null | null | kodi_library_update.py | joshlapham/py-misc-scripts | 67495e1551ec2151be9179b619a3f31ddcd784ba | [
"Beerware"
] | null | null | null | #!/usr/bin python
from requests import post
from json import dumps
import kodi_cfg as cfg
HEADERS = {'content-type': 'application/json'}
KODI_JSON_RPC_URL = "http://" + cfg.KODI_USERNAME + ":" + cfg.KODI_PASSWORD + "@" + cfg.KODI_HOST + ":" + str(cfg.KODI_PORT) + "/jsonrpc"
def do_video_library_scan(logger=None):
... | 30.324324 | 137 | 0.655971 |
4a16ca356345208b67264313cae7afce6c8e20a1 | 1,369 | py | Python | silver/migrations/0054_auto_20210109_1153.py | truehostcloud/silver | dd60ea476f0c7c6055df32669fcba9f0bf70d8da | [
"Apache-2.0"
] | null | null | null | silver/migrations/0054_auto_20210109_1153.py | truehostcloud/silver | dd60ea476f0c7c6055df32669fcba9f0bf70d8da | [
"Apache-2.0"
] | null | null | null | silver/migrations/0054_auto_20210109_1153.py | truehostcloud/silver | dd60ea476f0c7c6055df32669fcba9f0bf70d8da | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-09 11:53
from django.db import migrations, models
import django_fsm
class Migration(migrations.Migration):
dependencies = [
("silver", "0053_auto_20191028_1254"),
]
operations = [
migrations.AlterField(
model_name="transaction",
... | 34.225 | 85 | 0.514244 |
4a16ca9fb7d2ea279c4488dc30f32d38b95f9b7f | 2,367 | py | Python | server/apps/api/migrations/0005_auto_20200813_1806.py | efojs/censortracker_backend | 1654e86a5f9004c9ddd13886c4d1e0ce7276f1cd | [
"MIT"
] | 8 | 2020-08-17T09:12:21.000Z | 2022-03-05T09:25:29.000Z | server/apps/api/migrations/0005_auto_20200813_1806.py | efojs/censortracker_backend | 1654e86a5f9004c9ddd13886c4d1e0ce7276f1cd | [
"MIT"
] | 17 | 2020-06-30T08:55:00.000Z | 2021-12-12T01:25:56.000Z | server/apps/api/migrations/0005_auto_20200813_1806.py | efojs/censortracker_backend | 1654e86a5f9004c9ddd13886c4d1e0ce7276f1cd | [
"MIT"
] | 3 | 2020-07-29T04:51:31.000Z | 2021-08-01T12:37:32.000Z | # Generated by Django 3.0.5 on 2020-08-13 18:06
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("api", "0004_auto_20200729_0752"),
]
operations = [
migrations.RemoveField(model_name="domain", name="client... | 32.424658 | 84 | 0.393325 |
4a16caa396c1fcc5cf15b52f12be4973d5d147ca | 20,211 | py | Python | tensorflow_federated/python/learning/federated_evaluation_test.py | teo-milea/federated | ce0707a954a531860eb38864b44d7b748fd62aa7 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/learning/federated_evaluation_test.py | teo-milea/federated | ce0707a954a531860eb38864b44d7b748fd62aa7 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/learning/federated_evaluation_test.py | teo-milea/federated | ce0707a954a531860eb38864b44d7b748fd62aa7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, The TensorFlow Federated 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 o... | 39.168605 | 84 | 0.694424 |
4a16cae940bf12c336e4a3857f5de4224329148d | 5,929 | py | Python | flaskr/docs.py | amarabuco/celia | 8c278662c3e6e44442affc0aa481363023541c8a | [
"Apache-2.0"
] | 2 | 2020-09-29T14:33:06.000Z | 2021-06-15T13:34:38.000Z | flaskr/docs.py | amarabuco/celia | 8c278662c3e6e44442affc0aa481363023541c8a | [
"Apache-2.0"
] | null | null | null | flaskr/docs.py | amarabuco/celia | 8c278662c3e6e44442affc0aa481363023541c8a | [
"Apache-2.0"
] | null | null | null | import os
import textract
import re
from difflib import Differ, SequenceMatcher, HtmlDiff
from collections import Counter, OrderedDict
from operator import itemgetter, attrgetter
from flask import (
Flask, Blueprint, flash, g, redirect, render_template, request, url_for, send_from_directory, send_file
)
from werkz... | 28.233333 | 109 | 0.594873 |
4a16cb6116d4e9c10e194b94c7d7304bb414fea2 | 5,494 | py | Python | urlreduce/settings.py | jesuejunior/urlreduce | cefd59e6242366bc790f0a258707af5dd4df3fe3 | [
"BSD-3-Clause"
] | null | null | null | urlreduce/settings.py | jesuejunior/urlreduce | cefd59e6242366bc790f0a258707af5dd4df3fe3 | [
"BSD-3-Clause"
] | null | null | null | urlreduce/settings.py | jesuejunior/urlreduce | cefd59e6242366bc790f0a258707af5dd4df3fe3 | [
"BSD-3-Clause"
] | null | null | null | #encoding: utf-8
# Django settings for urlreduce project.
import os
import sys
PROJECT_DIR = os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Jesue Junior', 'talkto@jesuejunior.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # A... | 30.865169 | 127 | 0.67055 |
4a16cbc7c3df76c45a87d0b959a005a00b8268cb | 4,742 | py | Python | wintria/lib/source_data.py | codelucas/wintria.com | 99c3f20d64e6ecf3d02cf0117233de349274a607 | [
"MIT"
] | 2 | 2017-10-04T20:53:09.000Z | 2021-11-12T10:02:32.000Z | wintria/lib/source_data.py | codelucas/wintria.com | 99c3f20d64e6ecf3d02cf0117233de349274a607 | [
"MIT"
] | null | null | null | wintria/lib/source_data.py | codelucas/wintria.com | 99c3f20d64e6ecf3d02cf0117233de349274a607 | [
"MIT"
] | null | null | null | """
"""
import re
import urllib2
import urllib
import os
from urlparse import urlparse
from BeautifulSoup import BeautifulSoup
from wintria.lib.bing_logo_extract import extract_bing_url
from wintria.lib import s3
from wintria.lib.imaging import thumbnail
from wintria.article.models import NO_DESC
from wintria.wintria... | 33.871429 | 128 | 0.549768 |
4a16cc4b8683d37f62318e6e3843142281e2d115 | 6,248 | py | Python | tensorflow_addons/utils/test_utils.py | henry-eigen/addons | 6c2869c1d6e413f39cb5a8404b3315a9ba6eeaa4 | [
"Apache-2.0"
] | null | null | null | tensorflow_addons/utils/test_utils.py | henry-eigen/addons | 6c2869c1d6e413f39cb5a8404b3315a9ba6eeaa4 | [
"Apache-2.0"
] | null | null | null | tensorflow_addons/utils/test_utils.py | henry-eigen/addons | 6c2869c1d6e413f39cb5a8404b3315a9ba6eeaa4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 29.060465 | 86 | 0.652369 |
4a16cca1b50574c78bb0e0c3dbf83aebfa0246c3 | 20,400 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/bgpmvpnsendersitesipv4_4fb28863ad3595e11a7fecc4fbb6ec9d.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/bgpmvpnsendersitesipv4_4fb28863ad3595e11a7fecc4fbb6ec9d.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/bgpmvpnsendersitesipv4_4fb28863ad3595e11a7fecc4fbb6ec9d.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 40.39604 | 367 | 0.66348 |
4a16cec95774839629ddbe1e2618c188c56ee882 | 14,400 | py | Python | Policy_Gradient_with_Continuous_action.py | hoseinkh/Policy_Gradient_with_Continuous_action | ade61687675309a505e6db1f8ac975fc272ab5c4 | [
"MIT"
] | null | null | null | Policy_Gradient_with_Continuous_action.py | hoseinkh/Policy_Gradient_with_Continuous_action | ade61687675309a505e6db1f8ac975fc272ab5c4 | [
"MIT"
] | null | null | null | Policy_Gradient_with_Continuous_action.py | hoseinkh/Policy_Gradient_with_Continuous_action | ade61687675309a505e6db1f8ac975fc272ab5c4 | [
"MIT"
] | null | null | null | ###############################################################################
# For more info, see https://hoseinkh.github.io/
###############################################################################
import gym
import os
import sys
import numpy as np
"""
# if using tensorflow v1:
import tensorflow as tf
"""
im... | 43.243243 | 165 | 0.645486 |
4a16cf0d6c7c60c8368ea5f570b4765d18cb55e3 | 46,566 | py | Python | tests/data_context/test_data_context_test_yaml_config.py | Calvo94/great_expectations | bcb73249d5d6ab2dc94246fc09b046764778774d | [
"Apache-2.0"
] | 1 | 2021-12-20T22:16:03.000Z | 2021-12-20T22:16:03.000Z | tests/data_context/test_data_context_test_yaml_config.py | Calvo94/great_expectations | bcb73249d5d6ab2dc94246fc09b046764778774d | [
"Apache-2.0"
] | null | null | null | tests/data_context/test_data_context_test_yaml_config.py | Calvo94/great_expectations | bcb73249d5d6ab2dc94246fc09b046764778774d | [
"Apache-2.0"
] | null | null | null | import datetime
import json
import os
import tempfile
from unittest import mock
import pytest
import great_expectations.exceptions as ge_exceptions
from great_expectations import DataContext
from great_expectations.core import ExpectationSuite
from great_expectations.data_context.store import CheckpointStore
from gre... | 35.223903 | 125 | 0.624812 |
4a16cfa31e4fc43a957504472884ec1782b7ce2c | 308 | py | Python | hackerrank/Algorithms/Tower Breakers - The Final Battle/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerrank/Algorithms/Tower Breakers - The Final Battle/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerrank/Algorithms/Tower Breakers - The Final Battle/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | import unittest
import solution
class TestQ(unittest.TestCase):
def test_case_0(self):
self.assertEqual(solution.towerBreakers(4), 6)
self.assertEqual(solution.towerBreakers(2), 4)
self.assertEqual(solution.towerBreakers(7), 8)
if __name__ == '__main__':
unittest.main()
| 20.533333 | 54 | 0.701299 |
4a16d1d626fb18f550fabd509da30d0c50a20dcd | 1,176 | py | Python | src/olympia/amo/urls.py | anik31/addons-server | cecb61da98d6e830fb45a2b1d61b41e72812137e | [
"BSD-3-Clause"
] | null | null | null | src/olympia/amo/urls.py | anik31/addons-server | cecb61da98d6e830fb45a2b1d61b41e72812137e | [
"BSD-3-Clause"
] | 760 | 2021-05-17T07:59:30.000Z | 2022-03-31T11:14:15.000Z | src/olympia/amo/urls.py | championshuttler/addons-server | 5d4c1bfbed2fc509ecc1f3f5065955996e057eeb | [
"BSD-3-Clause"
] | null | null | null | from django.urls import include, path, re_path
from django.views.decorators.cache import never_cache
from . import views
from .utils import render_xml
services_patterns = [
re_path(r'^monitor\.json$', never_cache(views.monitor), name='amo.monitor'),
re_path(r'^loaded$', never_cache(views.loaded), name='amo.l... | 30.947368 | 80 | 0.659864 |
4a16d1dc520c72759cb9231b9921c8eaeb0c8304 | 9,525 | py | Python | Python/tdw/object_init_data.py | tljstewart/tdw | 61d8afd765c5fd861681bbadaf6c19040b4e2d67 | [
"BSD-2-Clause"
] | 1 | 2021-02-21T19:53:22.000Z | 2021-02-21T19:53:22.000Z | Python/tdw/object_init_data.py | tljstewart/tdw | 61d8afd765c5fd861681bbadaf6c19040b4e2d67 | [
"BSD-2-Clause"
] | null | null | null | Python/tdw/object_init_data.py | tljstewart/tdw | 61d8afd765c5fd861681bbadaf6c19040b4e2d67 | [
"BSD-2-Clause"
] | null | null | null | from typing import Dict, List, Tuple
from tdw.tdw_utils import TDWUtils
from tdw.controller import Controller
from tdw.librarian import ModelLibrarian
from tdw.py_impact import AudioMaterial, PyImpact, ObjectInfo
class TransformInitData:
"""
Basic initialization parameters for an object. Can be converted to a... | 53.212291 | 306 | 0.608819 |
4a16d215c42b856a2c4670de2cbb11acedf7528e | 3,167 | py | Python | code/correlation_analysis_scripts.py | berkeley-stat159/project-zeta-2 | 7c35423fbc1407751e1aea6aac99d5d02a82dfdc | [
"BSD-3-Clause"
] | null | null | null | code/correlation_analysis_scripts.py | berkeley-stat159/project-zeta-2 | 7c35423fbc1407751e1aea6aac99d5d02a82dfdc | [
"BSD-3-Clause"
] | null | null | null | code/correlation_analysis_scripts.py | berkeley-stat159/project-zeta-2 | 7c35423fbc1407751e1aea6aac99d5d02a82dfdc | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import os
import matplotlib.pyplot as plt
from matplotlib import colors
import pandas as pd
# from matplotlib import rcParams
# rcParams.update({'figure.autolayout': True})
#object_list
object_list = ["bottle", "cat", "chair", "face", "house", "scissors", "scrambledpix", "shoe"]
# important path:
b... | 33.691489 | 118 | 0.672245 |
4a16d241dfbd79d7309ea1fc7a183cbd1ece3c91 | 593 | py | Python | tests/__init__.py | farsightsec/axamd_client | 560dfe9a8e23163597bf4efddfa5843669ec4ba5 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2016-11-01T21:52:14.000Z | 2016-11-01T21:52:14.000Z | tests/__init__.py | farsightsec/axamd_client | 560dfe9a8e23163597bf4efddfa5843669ec4ba5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/__init__.py | farsightsec/axamd_client | 560dfe9a8e23163597bf4efddfa5843669ec4ba5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 by Farsight Security, 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 agre... | 42.357143 | 74 | 0.76054 |
4a16d280dbb9b3db7677ff1b3a70fdc5c64c3090 | 5,539 | py | Python | misc/tools/statserver/settings.py | zeehio/META-SHARE | b796769629734353a63d98db72c84617f725e544 | [
"BSD-3-Clause"
] | 11 | 2015-07-13T13:36:44.000Z | 2021-11-15T08:07:25.000Z | misc/tools/statserver/settings.py | zeehio/META-SHARE | b796769629734353a63d98db72c84617f725e544 | [
"BSD-3-Clause"
] | 13 | 2015-03-21T14:08:31.000Z | 2021-05-18T18:47:58.000Z | misc/tools/statserver/settings.py | zeehio/META-SHARE | b796769629734353a63d98db72c84617f725e544 | [
"BSD-3-Clause"
] | 12 | 2015-01-07T02:16:50.000Z | 2021-05-18T08:25:31.000Z | # META-SHARE statistics server
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
ROOT_PATH = os.getcwd()
DEBUG = False
TEMPLATE_DEBUG = DEBUG
# the server checks every CHECKINGTIME seconds the daily statistics of the nodes
CHECKINGTIME = 300.0
ADMINS = (
# ('Your Name', 'your_email@examp... | 34.61875 | 143 | 0.693808 |
4a16d31c9135edad239080d82cb5d6208877d8fa | 687 | py | Python | pos/webpos/migrations/0009_auto_20141229_1626.py | NonnEmilia/OpenGenfri | 7061957fb13ef824763922e1891cb72f7d51bb0f | [
"MIT"
] | null | null | null | pos/webpos/migrations/0009_auto_20141229_1626.py | NonnEmilia/OpenGenfri | 7061957fb13ef824763922e1891cb72f7d51bb0f | [
"MIT"
] | null | null | null | pos/webpos/migrations/0009_auto_20141229_1626.py | NonnEmilia/OpenGenfri | 7061957fb13ef824763922e1891cb72f7d51bb0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('webpos', '0008_bill_date'),
]
op... | 25.444444 | 76 | 0.622999 |
4a16d34cbb523ee887ae1f3de5697e98b06cfab2 | 3,798 | py | Python | tests/unit_tests/test_redis_database.py | Curtis241/taskmgr | ac485395d189e0c150e87bab8807b42d341545ed | [
"MIT"
] | null | null | null | tests/unit_tests/test_redis_database.py | Curtis241/taskmgr | ac485395d189e0c150e87bab8807b42d341545ed | [
"MIT"
] | 4 | 2021-03-25T22:39:57.000Z | 2021-07-19T05:46:38.000Z | tests/unit_tests/test_redis_database.py | Curtis241/taskmgr | ac485395d189e0c150e87bab8807b42d341545ed | [
"MIT"
] | null | null | null | import unittest
from taskmgr.lib.model.database import RedisDatabase, DatabaseObject
from taskmgr.lib.model.snapshot import Snapshot
from taskmgr.lib.model.task import Task
from taskmgr.lib.presenter.snapshots import Snapshots
class MissingIterMethod(DatabaseObject):
def deserialize(self, obj_dict):
pas... | 33.910714 | 89 | 0.64297 |
4a16d3cf936f3f26a471b142eab5b6cfc523cb12 | 4,249 | py | Python | iogt/settings/base.py | michaelclapham/iogt | faf0fd0444da9f08f3488fd52a93c89c307ab728 | [
"BSD-2-Clause"
] | null | null | null | iogt/settings/base.py | michaelclapham/iogt | faf0fd0444da9f08f3488fd52a93c89c307ab728 | [
"BSD-2-Clause"
] | null | null | null | iogt/settings/base.py | michaelclapham/iogt | faf0fd0444da9f08f3488fd52a93c89c307ab728 | [
"BSD-2-Clause"
] | null | null | null | """
Django settings for iogt project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
# Build paths i... | 26.067485 | 95 | 0.699694 |
4a16d5c5716483a211d32bf2539080ad90eb3095 | 546 | py | Python | server/src/project_n/app/net/initconfig.py | isuhao/gamein9miao | df8624b0e3223a12eb1dc833ce8fa89fd715aa5b | [
"MIT"
] | 1 | 2018-04-18T02:38:14.000Z | 2018-04-18T02:38:14.000Z | server/src/project_n/app/net/initconfig.py | isuhao/gamein9miao | df8624b0e3223a12eb1dc833ce8fa89fd715aa5b | [
"MIT"
] | null | null | null | server/src/project_n/app/net/initconfig.py | isuhao/gamein9miao | df8624b0e3223a12eb1dc833ce8fa89fd715aa5b | [
"MIT"
] | null | null | null | #coding:utf8
'''
Created on 2013-10-25
@author: lan (www.9miao.com)
'''
from firefly.server.globalobject import GlobalObject
from firefly.netconnect.datapack import DataPackProtoc
def callWhenConnLost(conn):
dynamicId = conn.transport.sessionno
GlobalObject().remote['gate'].callRemote("netconnlost",dynamicId... | 23.73913 | 69 | 0.782051 |
4a16d5c9de2203f1cb6df0ad45e83ccc5b56ea13 | 29,787 | py | Python | pcdet/models/bbox_heads/anchor_target_assigner.py | charlesyz/PCDet | 1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80 | [
"Apache-2.0"
] | null | null | null | pcdet/models/bbox_heads/anchor_target_assigner.py | charlesyz/PCDet | 1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80 | [
"Apache-2.0"
] | null | null | null | pcdet/models/bbox_heads/anchor_target_assigner.py | charlesyz/PCDet | 1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80 | [
"Apache-2.0"
] | null | null | null | # This file is modified from https://github.com/traveller59/second.pytorch
import numpy as np
import numpy.random as npr
import numba
from ...utils import common_utils
def unmap(data, count, inds, fill=0):
'''Unmap a subset of item (data) back to the original set of items (of
size count)'''
if count == l... | 46.253106 | 120 | 0.610501 |
4a16d61fb40258b5aef9131ce3172defc1d50346 | 1,943 | py | Python | zeeguu_core/util/text.py | simonchristensen1/Zeeguu-Core | 76f0e4a73676e00e6023ccbb2017210982670da2 | [
"MIT"
] | 1 | 2018-03-22T12:29:49.000Z | 2018-03-22T12:29:49.000Z | zeeguu_core/util/text.py | simonchristensen1/Zeeguu-Core | 76f0e4a73676e00e6023ccbb2017210982670da2 | [
"MIT"
] | 82 | 2017-12-09T16:15:02.000Z | 2020-11-12T11:34:09.000Z | zeeguu_core/util/text.py | simonchristensen1/Zeeguu-Core | 76f0e4a73676e00e6023ccbb2017210982670da2 | [
"MIT"
] | 9 | 2017-11-25T11:32:05.000Z | 2020-10-26T15:50:13.000Z | import math
import nltk
import pyphen
import regex
from collections import Counter
from nltk import SnowballStemmer
from zeeguu_core.model import Language
AVERAGE_SYLLABLE_LENGTH = 2.5
"""
Collection of simple text processing functions
"""
def split_words_from_text(text):
words = regex.findall(r'(\b\p{L}+\... | 28.15942 | 90 | 0.73649 |
4a16d6f33efe015adbbfc0a90a806578192f0c5f | 542 | py | Python | fizzbuzz.py | Magicianred/Projects | 7cd00b4e24a325c7cdca28dde7fe7c04e55b4773 | [
"MIT"
] | 2 | 2021-04-08T01:36:07.000Z | 2021-06-03T04:21:31.000Z | fizzbuzz.py | Magicianred/Projects | 7cd00b4e24a325c7cdca28dde7fe7c04e55b4773 | [
"MIT"
] | null | null | null | fizzbuzz.py | Magicianred/Projects | 7cd00b4e24a325c7cdca28dde7fe7c04e55b4773 | [
"MIT"
] | 1 | 2020-12-03T07:00:39.000Z | 2020-12-03T07:00:39.000Z | '''
Write a program that prints the numbers 1-100, each on a new line
For each number that is a multiple of 3, print “Fizz” instead of the number
For each number that is a multiple of 5, print “Buzz” instead of the number
For each number that is a multiple of both 3 and 5, print “FizzBuzz” instead of the number
'''
fo... | 31.882353 | 90 | 0.640221 |
4a16d70f8a3f6fb8992297215ff96b20edce633e | 21,726 | py | Python | espnet/nets/pytorch_backend/e2e_asr.py | Pranavs05/espnet | 6830cb683b2c4dbb823b24ae865ac976dd0047fe | [
"Apache-2.0"
] | 4 | 2020-10-28T00:34:21.000Z | 2021-08-02T05:43:59.000Z | espnet/nets/pytorch_backend/e2e_asr.py | Pranavs05/espnet | 6830cb683b2c4dbb823b24ae865ac976dd0047fe | [
"Apache-2.0"
] | 1 | 2019-10-24T06:21:21.000Z | 2019-10-24T06:21:21.000Z | espnet/nets/pytorch_backend/e2e_asr.py | Pranavs05/espnet | 6830cb683b2c4dbb823b24ae865ac976dd0047fe | [
"Apache-2.0"
] | 5 | 2019-07-19T16:40:57.000Z | 2020-11-05T20:09:44.000Z | #!/usr/bin/env python3
# Copyright 2017 Johns Hopkins University (Shinji Watanabe)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from __future__ import division
import argparse
import logging
import math
import os
import editdistance
import chainer
import numpy as np
import six
import torch
from it... | 40.233333 | 119 | 0.576958 |
4a16d84ecb4a879f4960913d0b475910964171af | 1,114 | py | Python | opensearch.py | datalogics-cgreen/server_core | 4459314cd2cdb92b7cabeed8fd1125d8c5cb7941 | [
"Apache-2.0"
] | null | null | null | opensearch.py | datalogics-cgreen/server_core | 4459314cd2cdb92b7cabeed8fd1125d8c5cb7941 | [
"Apache-2.0"
] | 1 | 2017-05-12T22:14:16.000Z | 2017-05-12T22:14:16.000Z | opensearch.py | datalogics-cgreen/server_core | 4459314cd2cdb92b7cabeed8fd1125d8c5cb7941 | [
"Apache-2.0"
] | 2 | 2017-05-12T21:27:53.000Z | 2021-08-04T12:27:25.000Z | class OpenSearchDocument(object):
"""Generates OpenSearch documents."""
TEMPLATE = """<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>%(name)s</ShortName>
<Description>%(description)s</Description>
<Tags>%(tags)s</Tags>
<Url ty... | 33.757576 | 96 | 0.603232 |
4a16d8a579a1f45ed4279095bccd74131c047ea5 | 12,913 | py | Python | ppcls/arch/backbone/model_zoo/ghostnet.py | TxT1212/PaddleClas | 5a24c8700f738f036bf27f80ca12dbe8471a11b0 | [
"Apache-2.0"
] | 3,763 | 2020-04-10T04:48:11.000Z | 2022-03-31T13:24:37.000Z | ppcls/arch/backbone/model_zoo/ghostnet.py | TxT1212/PaddleClas | 5a24c8700f738f036bf27f80ca12dbe8471a11b0 | [
"Apache-2.0"
] | 633 | 2020-04-08T18:27:31.000Z | 2022-03-31T01:09:43.000Z | ppcls/arch/backbone/model_zoo/ghostnet.py | TxT1212/PaddleClas | 5a24c8700f738f036bf27f80ca12dbe8471a11b0 | [
"Apache-2.0"
] | 846 | 2020-04-08T08:13:18.000Z | 2022-03-31T12:28:37.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... | 35.671271 | 105 | 0.574847 |
4a16d8d3c0f3aa5aff4101c9da1abfe8fe857ebe | 2,321 | py | Python | src/gui/components/edit.py | Epihaius/panda3dstudio | f5c62ca49617cae1aa5aa5b695200027da99e242 | [
"BSD-3-Clause"
] | 63 | 2016-01-02T16:28:47.000Z | 2022-01-19T11:29:51.000Z | src/gui/components/edit.py | Epihaius/panda3dstudio | f5c62ca49617cae1aa5aa5b695200027da99e242 | [
"BSD-3-Clause"
] | 12 | 2016-06-12T14:14:15.000Z | 2020-12-18T16:11:45.000Z | src/gui/components/edit.py | Epihaius/panda3dstudio | f5c62ca49617cae1aa5aa5b695200027da99e242 | [
"BSD-3-Clause"
] | 17 | 2016-05-23T00:02:27.000Z | 2021-04-25T17:48:27.000Z | from ..base import *
class EditManager:
def __init__(self, menubar, uv_edit_command):
self._menu = menu = menubar.add_menu("edit", "Edit")
mod_key_codes = GD["mod_key_codes"]
handler = lambda: Mgr.update_app("history", "undo")
menu.add("undo", "Undo", handler)
hotkey = (... | 33.157143 | 79 | 0.603188 |
4a16d8e8b44044e96e1ba797482d96f01b44eb4c | 3,883 | py | Python | benchmark/startQiskit1985.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1985.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1985.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=31
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | 34.061404 | 140 | 0.649498 |
4a16d8f489b9953e3f6a5e998a0657ab7c3c2617 | 2,882 | py | Python | compressible_rk/simulation.py | SebastianoF/pyro2 | 9d1787c2ee25d735a414db3da8c00287743a6fde | [
"BSD-3-Clause"
] | 151 | 2018-08-14T12:52:22.000Z | 2022-03-29T07:57:01.000Z | compressible_rk/simulation.py | SebastianoF/pyro2 | 9d1787c2ee25d735a414db3da8c00287743a6fde | [
"BSD-3-Clause"
] | 40 | 2015-03-25T15:45:44.000Z | 2018-07-30T18:48:47.000Z | compressible_rk/simulation.py | SebastianoF/pyro2 | 9d1787c2ee25d735a414db3da8c00287743a6fde | [
"BSD-3-Clause"
] | 56 | 2018-10-10T16:54:59.000Z | 2022-02-06T08:48:52.000Z | from __future__ import print_function
import numpy as np
import mesh.integration as integration
import compressible
import compressible_rk.fluxes as flx
class Simulation(compressible.Simulation):
"""The main simulation class for the method of lines compressible
hydrodynamics solver"""
def substep(self,... | 28.534653 | 71 | 0.572866 |
4a16d914eec860e87698700fed4e1eb47c4c7f70 | 1,102 | py | Python | Global.py | giorgosdrainakis/dml | 2c9bd589d2fb36f971a63256699ce16adbbc684d | [
"CC0-1.0"
] | null | null | null | Global.py | giorgosdrainakis/dml | 2c9bd589d2fb36f971a63256699ce16adbbc684d | [
"CC0-1.0"
] | null | null | null | Global.py | giorgosdrainakis/dml | 2c9bd589d2fb36f971a63256699ce16adbbc684d | [
"CC0-1.0"
] | null | null | null | # Root
_ROOT='C:\Pycharm\Projects\\fl_tests\\'
_MODELS_FOLDER='outcome_models\\'
_DATASETS_FOLDER='training_datasets\\'
_MOBILITY_FOLDER='mobility_datasets\\'
_LOGS_FOLDER='logs\\'
_END_CSV_NAME='end_csv.txt'
_QMNIST_DATASET_PATH='QMNIST\\processed\\train.pt'
_INFIMNIST_DATASET_PATH='MNIST\\processed\\training.pt'
_CIF... | 22.489796 | 81 | 0.774955 |
4a16d9efbffe83a3aa204a76f316d67146d8beb2 | 1,233 | py | Python | dvxplorer_ros_driver/scripts/scripts_extra/save_pytorch_model_example.py | ziimiin14/rpg_dvs_ros_modifed | da63b163e5d7ee7ccb8335050d3a3303193d9d3a | [
"MIT"
] | null | null | null | dvxplorer_ros_driver/scripts/scripts_extra/save_pytorch_model_example.py | ziimiin14/rpg_dvs_ros_modifed | da63b163e5d7ee7ccb8335050d3a3303193d9d3a | [
"MIT"
] | null | null | null | dvxplorer_ros_driver/scripts/scripts_extra/save_pytorch_model_example.py | ziimiin14/rpg_dvs_ros_modifed | da63b163e5d7ee7ccb8335050d3a3303193d9d3a | [
"MIT"
] | null | null | null | # Define model
import torch.nn as nn
import torch.functional as F
import torch
import torch.optim as optim
class TheModelClass(nn.Module):
def __init__(self):
super(TheModelClass, self).__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(6... | 28.022727 | 70 | 0.636659 |
4a16dd7a202fdecf75417d011a9dd6c212b07e3d | 738 | py | Python | v11.py | senthilkumarIRTT/Image-and-Video-Processing-using-Python | 8733010828d0bf8efaaf91776df5f68089f562bd | [
"BSD-2-Clause"
] | 1 | 2020-10-31T22:02:45.000Z | 2020-10-31T22:02:45.000Z | v11.py | senthilkumarIRTT/Image-and-Video-Processing-using-Python | 8733010828d0bf8efaaf91776df5f68089f562bd | [
"BSD-2-Clause"
] | null | null | null | v11.py | senthilkumarIRTT/Image-and-Video-Processing-using-Python | 8733010828d0bf8efaaf91776df5f68089f562bd | [
"BSD-2-Clause"
] | null | null | null | #Edge Detection
import cv2
import numpy as np
# Creating a VideoCapture object to read the video
cap = cv2.VideoCapture('Blackbird.mp4')
# Loop untill the end of the video
while (cap.isOpened()):
# Capture frame-by-frame
ret, frame = cap.read()
# Display the resulting frame ... | 25.448276 | 52 | 0.638211 |
4a16de6666971a29d443302260ff9b7bc7249f7b | 22,041 | py | Python | 6_py/get.py | noisesesame/XFFF | 7a46c634f1d40aeeed3dd8a9c0708a8e22641052 | [
"MIT"
] | null | null | null | 6_py/get.py | noisesesame/XFFF | 7a46c634f1d40aeeed3dd8a9c0708a8e22641052 | [
"MIT"
] | null | null | null | 6_py/get.py | noisesesame/XFFF | 7a46c634f1d40aeeed3dd8a9c0708a8e22641052 | [
"MIT"
] | null | null | null | #-*- coding:utf-8 -*-
from socket import *
from ast import literal_eval
import os
import random
s = socket(AF_INET, SOCK_STREAM)
s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
s.bind(('', 80))
s.listen(1)
while 1:
try:
os.fork()
c, addr = s.accept()
rsp_200 = '''HTTP/1.1 200 OK\r\nContent-Type: text/html; ch... | 20.911765 | 718 | 0.481965 |
4a16df5a52c48a4598757c3988248a613812eae6 | 647 | py | Python | trend_django/trend/models.py | csbok/github-trending | 596c1663eb7644b17bccaad25ff795f4e61c8cbc | [
"MIT"
] | 7 | 2017-06-14T11:43:45.000Z | 2021-11-20T08:16:17.000Z | trend_django/trend/models.py | csbok/github-trending | 596c1663eb7644b17bccaad25ff795f4e61c8cbc | [
"MIT"
] | null | null | null | trend_django/trend/models.py | csbok/github-trending | 596c1663eb7644b17bccaad25ff795f4e61c8cbc | [
"MIT"
] | 2 | 2018-05-06T19:57:20.000Z | 2020-06-27T07:35:08.000Z | from django.db import models
# Create your models here.
from django.utils import timezone
class TodayTrend(models.Model):
rank = models.IntegerField()
url = models.CharField(max_length=2000)
desc = models.TextField()
language = models.CharField(max_length=250)
star_count = models.IntegerField()
... | 30.809524 | 116 | 0.683153 |
4a16df61cdedf12a764a33284afa676d0a1fe119 | 3,266 | py | Python | mot_api/app.py | Artas03/Project-2 | dc44519e9a3b832184c02ba0751b013c8a890b90 | [
"ADSL"
] | null | null | null | mot_api/app.py | Artas03/Project-2 | dc44519e9a3b832184c02ba0751b013c8a890b90 | [
"ADSL"
] | null | null | null | mot_api/app.py | Artas03/Project-2 | dc44519e9a3b832184c02ba0751b013c8a890b90 | [
"ADSL"
] | null | null | null | from flask import Flask, request, Response
app = Flask(__name__)
@app.route('/get_mot', methods=['GET','POST'])
def get_mot():
item = request.get_json()
if item['make'] == 'BMW' and item['model'] == '4 series':
mot = '3'
elif item['make'] == 'BMW' and item['model'] == 'C63s':
mot = '0'
... | 37.54023 | 70 | 0.489896 |
4a16e065700d38bea203286614ffaf8d5a73d0be | 414 | py | Python | djangogram/users/migrations/0004_alter_user_name.py | HaewonSon/djangoInstagram | dde98d95dc59f44b62efb90007556447eb59acda | [
"MIT"
] | null | null | null | djangogram/users/migrations/0004_alter_user_name.py | HaewonSon/djangoInstagram | dde98d95dc59f44b62efb90007556447eb59acda | [
"MIT"
] | null | null | null | djangogram/users/migrations/0004_alter_user_name.py | HaewonSon/djangoInstagram | dde98d95dc59f44b62efb90007556447eb59acda | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-13 10:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20211206_1056'),
]
operations = [
migrations.AlterField(
model_name='user',
name='name',
... | 21.789474 | 84 | 0.60628 |
4a16e11d30299b47c532f821fca2dd6ace937154 | 63 | py | Python | enthought/logger/log_queue_handler.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/logger/log_queue_handler.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/logger/log_queue_handler.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from apptools.logger.log_queue_handler import *
| 21 | 47 | 0.825397 |
4a16e18bdf461f34154a931737503511f44368f1 | 4,249 | py | Python | company/serializers.py | skyydq/GreaterWMS | e14014a73b36ec0f0df03712a229b0931cb388fb | [
"Apache-2.0"
] | null | null | null | company/serializers.py | skyydq/GreaterWMS | e14014a73b36ec0f0df03712a229b0931cb388fb | [
"Apache-2.0"
] | null | null | null | company/serializers.py | skyydq/GreaterWMS | e14014a73b36ec0f0df03712a229b0931cb388fb | [
"Apache-2.0"
] | 1 | 2021-07-01T03:05:21.000Z | 2021-07-01T03:05:21.000Z | from rest_framework import serializers
from .models import ListModel
from userprofile.models import Users
import re
from rest_framework.exceptions import APIException
def data_validate(data):
script_obj = re.findall(r'script', str(data), re.IGNORECASE)
select_obj = re.findall(r'select', str(data), re.IGNORECAS... | 53.78481 | 107 | 0.746529 |
4a16e2371f7bb7468ba1e021370b848d50a1ec70 | 3,127 | py | Python | bench/benchmark_fuzz.py | hugolmn/RapidFuzz | 81ac43cbf28f5c002f7c4c522a263f5042ed7f25 | [
"MIT"
] | 554 | 2020-03-19T13:46:16.000Z | 2020-04-07T13:42:55.000Z | bench/benchmark_fuzz.py | hugolmn/RapidFuzz | 81ac43cbf28f5c002f7c4c522a263f5042ed7f25 | [
"MIT"
] | 104 | 2020-11-30T09:34:33.000Z | 2022-03-17T21:03:22.000Z | bench/benchmark_fuzz.py | hugolmn/RapidFuzz | 81ac43cbf28f5c002f7c4c522a263f5042ed7f25 | [
"MIT"
] | 32 | 2020-12-16T13:49:56.000Z | 2022-02-17T12:31:28.000Z | # todo combine benchmarks of scorers into common code base
import timeit
import pandas
import numpy as np
def benchmark(name, func, setup, lengths, count):
print(f"starting {name}")
start = timeit.default_timer()
results = []
for length in lengths:
test = timeit.Timer(func, setup=setup.format(l... | 34.744444 | 136 | 0.713463 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.