hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33ae339f5bcba3599b4069ed1772bb380926fda8 | 822 | py | Python | publish-scripts/shared/constants.py | Zimmergren/azure-functions-core-tools | ca6c315c3f1a8c73cc6449dcdd07b58a07bce098 | [
"MIT"
] | 814 | 2018-02-05T22:13:20.000Z | 2022-03-30T13:01:58.000Z | publish-scripts/shared/constants.py | rlane2126/azure-functions-core-tools | 177dd3586c29984215c4f9df738310d8f6788729 | [
"MIT"
] | 2,137 | 2018-02-02T23:02:29.000Z | 2022-03-31T15:18:54.000Z | publish-scripts/shared/constants.py | rlane2126/azure-functions-core-tools | 177dd3586c29984215c4f9df738310d8f6788729 | [
"MIT"
] | 290 | 2018-02-06T01:23:25.000Z | 2022-03-29T13:22:26.000Z | #! /usr/bin/env python3.6
# same for all different OSes
PACKAGENAME_BASE = "azure-functions-core-tools"
CMD = "func"
ARTIFACTFOLDER = "artifact"
BUILDFOLDER = "build"
TESTFOLDER = "test"
# to be set in driver.py
# do not use it as default argument!!
VERSION = NotImplementedError
DRIVERROOTDIR = NotImplementedError
#... | 41.1 | 162 | 0.743309 |
c1d89b937442e027c77e0ab6688c0fc079b2c493 | 516 | py | Python | my_forum/boards/forms.py | sheepxiaozi/forum | e364165caca8bc05adafb3a30d94f7e7c204b8fc | [
"MIT"
] | 2 | 2018-12-14T11:15:50.000Z | 2019-12-09T00:26:08.000Z | my_forum/boards/forms.py | sheepxiaozi/forum | e364165caca8bc05adafb3a30d94f7e7c204b8fc | [
"MIT"
] | null | null | null | my_forum/boards/forms.py | sheepxiaozi/forum | e364165caca8bc05adafb3a30d94f7e7c204b8fc | [
"MIT"
] | null | null | null | from django import forms
from .models import Topic, Comment
class NewTopicForm(forms.ModelForm):
message = forms.CharField(
widget=forms.Textarea(
attrs={'rows': 5, 'placeholder': 'What is on your mind?'}
),
max_length=4000,
help_text='The max length of the text is 4000... | 20.64 | 69 | 0.594961 |
e4766ed0ed071dc6744afcfe347f7d3de2466f01 | 151 | py | Python | dev/modules/plotting-12.py | willtryagain/sympy_doc | ec1b7285b5fc5b3ba2eafa32470066122ae84b52 | [
"BSD-3-Clause"
] | 20 | 2015-01-28T01:08:13.000Z | 2021-12-19T04:03:28.000Z | dev/modules/plotting-12.py | willtryagain/sympy_doc | ec1b7285b5fc5b3ba2eafa32470066122ae84b52 | [
"BSD-3-Clause"
] | 31 | 2015-01-27T07:16:19.000Z | 2021-11-15T10:58:15.000Z | dev/modules/plotting-12.py | willtryagain/sympy_doc | ec1b7285b5fc5b3ba2eafa32470066122ae84b52 | [
"BSD-3-Clause"
] | 38 | 2015-01-08T18:48:27.000Z | 2021-12-02T13:19:43.000Z | from sympy import pi
expr1 = (u, cos(2*pi*u)/2 + 1/2)
expr2 = (u, sin(2*pi*u)/2 + 1/2)
p = plot_parametric(expr1, expr2, (u, 0, 1), line_color='blue')
| 30.2 | 63 | 0.609272 |
2c5f8b4ebad464430f1c663883d09ada5ca4ae51 | 1,103 | py | Python | watch/migrations/0008_healthdepartment_policeauthorities.py | msyoki/Neighborhood | d7eb55ba7772388850d8bcf04a867aba3fa81665 | [
"Unlicense"
] | null | null | null | watch/migrations/0008_healthdepartment_policeauthorities.py | msyoki/Neighborhood | d7eb55ba7772388850d8bcf04a867aba3fa81665 | [
"Unlicense"
] | null | null | null | watch/migrations/0008_healthdepartment_policeauthorities.py | msyoki/Neighborhood | d7eb55ba7772388850d8bcf04a867aba3fa81665 | [
"Unlicense"
] | 1 | 2021-02-08T10:27:06.000Z | 2021-02-08T10:27:06.000Z | # Generated by Django 2.0.2 on 2020-11-01 16:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('watch', '0007_business'),
]
operations = [
migrations.CreateModel(
name='HealthDepartment',
... | 35.580645 | 133 | 0.601995 |
2581c0abef5b790c10c33cb9fab459224e3f0aca | 2,667 | py | Python | rptree/rptree.py | realpython/dirtree | 08dcb019aea6e3e326c39be9741e52adb77a2c19 | [
"MIT"
] | 11 | 2021-03-04T09:31:47.000Z | 2022-03-10T15:03:35.000Z | rptree/rptree.py | realpython/dirtree | 08dcb019aea6e3e326c39be9741e52adb77a2c19 | [
"MIT"
] | 3 | 2021-03-02T00:36:31.000Z | 2021-05-25T18:36:09.000Z | rptree/rptree.py | realpython/dirtree | 08dcb019aea6e3e326c39be9741e52adb77a2c19 | [
"MIT"
] | 9 | 2021-01-23T21:28:49.000Z | 2022-01-29T15:12:33.000Z | """This module provides RP Tree main module."""
import os
import pathlib
import sys
from collections import deque
PIPE = "│"
ELBOW = "└──"
TEE = "├──"
PIPE_PREFIX = "│ "
SPACE_PREFIX = " "
class DirectoryTree:
def __init__(self, root_dir, dir_only=False, output_file=sys.stdout):
self._output_file =... | 30.655172 | 74 | 0.584177 |
481aaad3c2703c0f2289bd88c75476afc8661d89 | 3,773 | py | Python | envsubst.py | daxxog/python-envsubst | 12fc81a071793ae3be985ceaa53ea91ce880c695 | [
"MIT"
] | 4 | 2019-12-19T11:02:00.000Z | 2022-02-09T23:01:12.000Z | envsubst.py | daxxog/python-envsubst | 12fc81a071793ae3be985ceaa53ea91ce880c695 | [
"MIT"
] | null | null | null | envsubst.py | daxxog/python-envsubst | 12fc81a071793ae3be985ceaa53ea91ce880c695 | [
"MIT"
] | 2 | 2020-11-25T16:33:27.000Z | 2021-01-27T08:09:41.000Z | """
Substitute environment variables in a string.
For more info:
>>> from envsubst import envsubst
>>> help(envsubst)
"""
# MIT License
#
# Copyright (c) 2019 Alex Shafer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Softw... | 28.801527 | 82 | 0.641664 |
2ec7df5a6a1aabc564a5441d9f4218ed537fc669 | 254 | py | Python | mccole/__main__.py | yabellini/mccole | c122db14f2c7231a9c158f8e217eeb6bd2341d49 | [
"MIT"
] | 1 | 2022-01-08T04:10:46.000Z | 2022-01-08T04:10:46.000Z | mccole/__main__.py | yabellini/mccole | c122db14f2c7231a9c158f8e217eeb6bd2341d49 | [
"MIT"
] | 43 | 2022-01-21T11:04:39.000Z | 2022-02-11T21:11:54.000Z | mccole/__main__.py | gvwilson/mccole-old | 5d724a64e7e91d39d72947798f5ee38bfdf96a23 | [
"MIT"
] | 1 | 2022-01-23T18:52:23.000Z | 2022-01-23T18:52:23.000Z | """Make McCole module runnable."""
import sys
from .mccole import main
from .util import McColeExc
if __name__ == "__main__":
try:
main(sys.argv[1:])
except McColeExc as exc:
print(exc.msg, file=sys.stderr)
sys.exit(1)
| 18.142857 | 39 | 0.633858 |
9557120597691919accf670fea4c3a0269ff2b3d | 366 | py | Python | atbr_updater/test/main.py | shelley-barfoot/ATB_repository | bfa680db0009233e0e2b46d45bd12665def35e8a | [
"MIT"
] | null | null | null | atbr_updater/test/main.py | shelley-barfoot/ATB_repository | bfa680db0009233e0e2b46d45bd12665def35e8a | [
"MIT"
] | null | null | null | atbr_updater/test/main.py | shelley-barfoot/ATB_repository | bfa680db0009233e0e2b46d45bd12665def35e8a | [
"MIT"
] | 1 | 2021-12-03T02:20:24.000Z | 2021-12-03T02:20:24.000Z | import os
from atbr_updater.parse_control_files import *
directory = 'test_files'
file_parameters = {}
i = 0
for file in os.listdir(directory):
file_path = os.path.join(directory, file)
current_file = Amber_Data(file_path)
file_parameters[i] = current_file.get_parameters()
i += 1
for key in file_par... | 21.529412 | 54 | 0.73224 |
7ddcabc88be5bc6838e20913b0bfc3b858be1fac | 520 | py | Python | menpo/io/output/image.py | jacksoncsy/menpo | 3cac491fe30454935ed12fcaa89f453c5f6ec878 | [
"BSD-3-Clause"
] | null | null | null | menpo/io/output/image.py | jacksoncsy/menpo | 3cac491fe30454935ed12fcaa89f453c5f6ec878 | [
"BSD-3-Clause"
] | null | null | null | menpo/io/output/image.py | jacksoncsy/menpo | 3cac491fe30454935ed12fcaa89f453c5f6ec878 | [
"BSD-3-Clause"
] | null | null | null | def PILExporter(image, file_handle):
r"""
Given a file handle to write in to (which should act like a Python `file`
object), write out the image data. No value is returned.
Uses PIL to save the image and so supports most commonly used image
formats.
Parameters
----------
image : map:`I... | 28.888889 | 77 | 0.651923 |
a11aa1d2640285c276bd8d0d08caa35877c0cdd4 | 662 | py | Python | appengine/findit/util_scripts/__init__.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/findit/util_scripts/__init__.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/util_scripts/__init__.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
_THIS_DIR = os.path.dirname(os.path.realpath(__file__))
# TODO(katesonia): Figure out why os.getenv('APPLICATION_ID') always return
#... | 33.1 | 78 | 0.770393 |
667d387b48d24191d1c9ad7e3285dcb4af5e14bb | 2,329 | py | Python | ajax_views/urls.py | dldevinc/ajax-views | f6bc9aef3c53b2dd740977f55b99126233b92517 | [
"BSD-3-Clause"
] | 4 | 2020-02-03T19:46:07.000Z | 2021-02-15T14:50:11.000Z | ajax_views/urls.py | dldevinc/ajax-views | f6bc9aef3c53b2dd740977f55b99126233b92517 | [
"BSD-3-Clause"
] | null | null | null | ajax_views/urls.py | dldevinc/ajax-views | f6bc9aef3c53b2dd740977f55b99126233b92517 | [
"BSD-3-Clause"
] | 1 | 2020-09-02T15:36:50.000Z | 2020-09-02T15:36:50.000Z | import django
from .registry import registry
from .views import router
if django.VERSION >= (2, 2): # noqa
from django.urls import URLPattern, ResolverMatch
from django.urls.resolvers import RegexPattern
class AjaxURLPattern(URLPattern):
def resolve(self, path):
match = self.pattern.... | 33.271429 | 82 | 0.589523 |
866de2342599d6f67c099f2a80cb5ccd26b6253c | 46,020 | py | Python | models/networks.py | mythody/CycleGAN | a5beb51601cc1e0b9468e117bbf090b838ce40bb | [
"BSD-3-Clause"
] | null | null | null | models/networks.py | mythody/CycleGAN | a5beb51601cc1e0b9468e117bbf090b838ce40bb | [
"BSD-3-Clause"
] | null | null | null | models/networks.py | mythody/CycleGAN | a5beb51601cc1e0b9468e117bbf090b838ce40bb | [
"BSD-3-Clause"
] | null | null | null | from unittest import result
import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.optim import lr_scheduler
###############################################################################
# Helper Functions
############################################################################... | 47.394439 | 167 | 0.623598 |
af729abbc2dd9d309a45b5c3a96b3b05465a856c | 669 | py | Python | docs/spark/advanced-use.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 27 | 2021-05-27T00:01:24.000Z | 2022-01-30T19:55:24.000Z | docs/spark/advanced-use.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 284 | 2021-05-12T22:26:41.000Z | 2022-02-23T21:18:34.000Z | docs/spark/advanced-use.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 5 | 2021-06-02T04:51:47.000Z | 2021-12-20T17:07:41.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Demonstrate advanced use of the Spark .NET runner functionality.
"""
import argparse
from pyspark.sql import SparkSession
from shrike.spark import run_spark_net_from_known_assembly
def main(args):
spark = SparkSession.builder.appName(a... | 24.777778 | 82 | 0.726457 |
7ce64ff0a94c2ce51a9a09c595e1acd368bbc10c | 2,705 | py | Python | DQM/TrackingMonitorClient/python/TrackingClientConfigP5_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | DQM/TrackingMonitorClient/python/TrackingClientConfigP5_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | DQM/TrackingMonitorClient/python/TrackingClientConfigP5_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
#from DQM.TrackingMonitorSummary.OnDemandMonitoring_cfi import *
# TrackingMonitorAnalyser ####
TrackingAnalyser = DQMEDHarvester("TrackingAnalyser",
nFEDinfoDir = cms.string("SiStrip/FEDIntegrity_SM")... | 42.936508 | 104 | 0.561922 |
2b6232cf10a20272496dc0409ae206bbc5dbc674 | 14,510 | py | Python | ckan/lib/base.py | smartlane/ckan | e7b0f15408e6eacf7998b25e60d6edba34255327 | [
"Apache-2.0"
] | null | null | null | ckan/lib/base.py | smartlane/ckan | e7b0f15408e6eacf7998b25e60d6edba34255327 | [
"Apache-2.0"
] | null | null | null | ckan/lib/base.py | smartlane/ckan | e7b0f15408e6eacf7998b25e60d6edba34255327 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
"""The base Controller API
Provides the BaseController class for subclassing.
"""
import logging
import time
from paste.deploy.converters import asbool
from pylons import cache, session
from pylons.controllers import WSGIController
from pylons.controllers.util import abort as _abort
from pylons.dec... | 38.386243 | 79 | 0.614128 |
7e2ab19b089e8e15c8f3d9495bb99f408ff609ad | 661 | py | Python | phenocube/lib/python3.8/site-packages/pkg_resources/py2_warn.py | phenocube/phenocube-py | cb262aef1c0925efd2e955170bacd2989da03769 | [
"MIT"
] | null | null | null | phenocube/lib/python3.8/site-packages/pkg_resources/py2_warn.py | phenocube/phenocube-py | cb262aef1c0925efd2e955170bacd2989da03769 | [
"MIT"
] | null | null | null | phenocube/lib/python3.8/site-packages/pkg_resources/py2_warn.py | phenocube/phenocube-py | cb262aef1c0925efd2e955170bacd2989da03769 | [
"MIT"
] | null | null | null | import sys
import warnings
import textwrap
msg = textwrap.dedent(
"""
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release (no sooner than 2020-04-20).
Please ensure you are installing
Setuptools using pip 9.x... | 27.541667 | 74 | 0.683812 |
a8151e2b6629087ebe608be321e7bf2573265144 | 1,460 | py | Python | torch_glow/tests/nodes/size_test.py | aksingh-fb/glow | c50603a1885c9bffd935fbd1c7c10766b062cef9 | [
"Apache-2.0"
] | 1 | 2021-04-10T09:05:08.000Z | 2021-04-10T09:05:08.000Z | torch_glow/tests/nodes/size_test.py | aksingh-fb/glow | c50603a1885c9bffd935fbd1c7c10766b062cef9 | [
"Apache-2.0"
] | null | null | null | torch_glow/tests/nodes/size_test.py | aksingh-fb/glow | c50603a1885c9bffd935fbd1c7c10766b062cef9 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
import torch
from parameterized import parameterized
from tests import utils
class SimpleSizeModel(torch.nn.Module):
def __init__(self, dimension):
super(SimpleSizeModel, self).__init__()
self.dime... | 31.73913 | 85 | 0.669178 |
42e28bf1a1eb4b0d5096eed40c66c8e7469de2a0 | 8,806 | py | Python | src/streamlink/plugins/filmon.py | sn4kebite/streamlink | 054b760ce7e9f43451eed08e9f39de440c3e5add | [
"BSD-2-Clause"
] | 5 | 2017-03-21T19:43:17.000Z | 2018-10-03T14:04:29.000Z | src/streamlink/plugins/filmon.py | sn4kebite/streamlink | 054b760ce7e9f43451eed08e9f39de440c3e5add | [
"BSD-2-Clause"
] | 7 | 2016-10-13T23:29:31.000Z | 2018-06-28T14:04:32.000Z | src/streamlink/plugins/filmon.py | sn4kebite/streamlink | 054b760ce7e9f43451eed08e9f39de440c3e5add | [
"BSD-2-Clause"
] | 2 | 2016-11-24T18:37:33.000Z | 2017-03-21T19:43:49.000Z | import logging
import re
import time
from urllib.parse import urlparse, urlunparse
from streamlink.exceptions import PluginError, StreamError
from streamlink.plugin import Plugin
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream, hls_playlist
from streamlink.stream.hls import HLSStream... | 33.48289 | 108 | 0.561776 |
51244d9d82a6907847b1ac05fb7288b04297fe41 | 1,304 | py | Python | lbng/vm.py | adrian15/live-wrapper | 4c908cd1682f5d15912810a33c71c35a54fc7115 | [
"BSD-2-Clause"
] | 1 | 2016-01-05T17:29:13.000Z | 2016-01-05T17:29:13.000Z | lbng/vm.py | adrian15/live-wrapper | 4c908cd1682f5d15912810a33c71c35a54fc7115 | [
"BSD-2-Clause"
] | null | null | null | lbng/vm.py | adrian15/live-wrapper | 4c908cd1682f5d15912810a33c71c35a54fc7115 | [
"BSD-2-Clause"
] | null | null | null | # live-build-ng - Live-Build NG
# (C) Iain R. Learmonth 2015 <irl@debian.org>
# See COPYING for terms of usage, modification and redistribution.
#
# lbng/vm.py - vmdebootstrap helpers
"""
The lbng.vm module provides helpers for calling vmdebootstrap as part of the
image creation process.
.. note::
This module req... | 29.636364 | 76 | 0.611963 |
963a02d3b58013474be0ba844eef7718557780d4 | 3,955 | py | Python | GPflow/_settings.py | dalnoguer/my-GPflow | 2a18db0f2cffb7d20888a44bd4e4c74f207908b2 | [
"Apache-2.0"
] | 12 | 2017-07-19T20:54:49.000Z | 2022-01-06T15:03:18.000Z | GPflow/_settings.py | dalnoguer/my-GPflow | 2a18db0f2cffb7d20888a44bd4e4c74f207908b2 | [
"Apache-2.0"
] | null | null | null | GPflow/_settings.py | dalnoguer/my-GPflow | 2a18db0f2cffb7d20888a44bd4e4c74f207908b2 | [
"Apache-2.0"
] | 5 | 2019-03-03T08:28:07.000Z | 2020-04-29T00:40:42.000Z | from six.moves import configparser
import copy
import os
import collections
import tensorflow as tf
from collections import OrderedDict
class SettingsContextManager(object):
def __init__(self, manager, tmp_settings):
self._manager = manager
self._tmp_settings = tmp_settings
def __enter__(self... | 29.736842 | 93 | 0.620986 |
c944e6173b7fe2dc7e6aab14d948b29b898aa1a3 | 5,539 | py | Python | redex_gdb_hooks.py | srivastavaayu/redex | 0440e2badcc6c503b14ca734f1c09b7f41cb97ec | [
"MIT"
] | null | null | null | redex_gdb_hooks.py | srivastavaayu/redex | 0440e2badcc6c503b14ca734f1c09b7f41cb97ec | [
"MIT"
] | null | null | null | redex_gdb_hooks.py | srivastavaayu/redex | 0440e2badcc6c503b14ca734f1c09b7f41cb97ec | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Defines GDB Pretty printing support for Redex
import gdb
class CallableBase(object):
def __init__(self, val, cmd, reftype):
se... | 32.391813 | 85 | 0.635494 |
3872800561f34d19bd25bef7ad58457f36ebf65f | 10,674 | py | Python | virtual/lib/python3.9/site-packages/pyuploadcare/transformations/image.py | alex-mu/Neighborhood-watch | 13a4926a59a924f84c5560966ca686168efa054e | [
"MIT"
] | 85 | 2015-01-14T21:37:58.000Z | 2022-03-16T07:15:41.000Z | virtual/lib/python3.9/site-packages/pyuploadcare/transformations/image.py | alex-mu/Neighborhood-watch | 13a4926a59a924f84c5560966ca686168efa054e | [
"MIT"
] | 78 | 2015-01-15T23:44:15.000Z | 2022-03-21T12:05:26.000Z | virtual/lib/python3.9/site-packages/pyuploadcare/transformations/image.py | alex-mu/Neighborhood-watch | 13a4926a59a924f84c5560966ca686168efa054e | [
"MIT"
] | 34 | 2015-01-13T16:06:29.000Z | 2021-08-09T12:38:06.000Z | from typing import List, Optional, Union
from pyuploadcare.transformations.base import BaseTransformation, StrEnum
class StretchMode(StrEnum):
on = "on"
off = "off"
fill = "fill"
class CropAlignment(StrEnum):
center = "center" # type: ignore
top = "top"
right = "right"
bottom = "bottom... | 27.439589 | 77 | 0.590875 |
4fc685fea69231aa89c7c486a694304576ad757b | 661 | py | Python | maildump/web_realtime.py | burhan/maildump | 46578a6b30e49407d88c11de40b8299321e900d8 | [
"MIT"
] | null | null | null | maildump/web_realtime.py | burhan/maildump | 46578a6b30e49407d88c11de40b8299321e900d8 | [
"MIT"
] | 1 | 2018-01-30T07:38:26.000Z | 2018-01-30T07:40:51.000Z | maildump/web_realtime.py | burhan/maildump | 46578a6b30e49407d88c11de40b8299321e900d8 | [
"MIT"
] | null | null | null | from flask import current_app, request
from socketio import socketio_manage
from socketio.namespace import BaseNamespace
def broadcast(event, *args):
from maildump import socketio_server # avoid circular import
pkt = dict(type='event', name=event, args=args, endpoint='')
for sessid, socket in socketio_se... | 33.05 | 84 | 0.744327 |
831329eafb3efb069fd3834ded580f57221fa6fb | 842 | py | Python | var/spack/repos/builtin/packages/blat/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/blat/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/blat/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Blat(Package):
"""BLAT (BLAST-like alignment tool) is a pairwise sequence
alignment... | 31.185185 | 92 | 0.686461 |
b5cae86923313d26ec3b8e341704f498b372ab7a | 21,145 | py | Python | flytekit/core/condition.py | bstadlbauer/flytekit | 12ef34d7b6d777088ab87f9cf0d5c32355895852 | [
"Apache-2.0"
] | null | null | null | flytekit/core/condition.py | bstadlbauer/flytekit | 12ef34d7b6d777088ab87f9cf0d5c32355895852 | [
"Apache-2.0"
] | null | null | null | flytekit/core/condition.py | bstadlbauer/flytekit | 12ef34d7b6d777088ab87f9cf0d5c32355895852 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import datetime
import typing
from typing import Optional, Tuple, Union, cast
from flytekit.core.context_manager import ExecutionState, FlyteContextManager
from flytekit.core.node import Node
from flytekit.core.promise import (
ComparisonExpression,
ComparisonOps,
Conjun... | 42.29 | 120 | 0.655994 |
65c9a3567aa9e23b19278bae06ff217622e89e0c | 4,396 | py | Python | superset/views/base_schemas.py | ayuanty/superset | 132a8ef2cb55fa6692ea31d5c278f102d6c2886b | [
"Apache-2.0"
] | 19 | 2018-09-02T10:52:23.000Z | 2022-03-24T09:43:48.000Z | superset/views/base_schemas.py | ayuanty/superset | 132a8ef2cb55fa6692ea31d5c278f102d6c2886b | [
"Apache-2.0"
] | 63 | 2021-06-12T18:25:14.000Z | 2022-03-21T07:57:02.000Z | superset/views/base_schemas.py | ayuanty/superset | 132a8ef2cb55fa6692ea31d5c278f102d6c2886b | [
"Apache-2.0"
] | 15 | 2019-04-29T05:38:31.000Z | 2022-02-12T10:47:54.000Z | # 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, Version 2.0 (the
# "License"); you may not u... | 35.451613 | 85 | 0.652184 |
ce9b6d273abd14808ce88c847bdf4582c6fb6555 | 1,576 | py | Python | rtutil/data_manager.py | RT-Team/rt-bot | 39698efb6b2465de1e84063cba9d207a5bf07fa5 | [
"BSD-4-Clause"
] | 26 | 2021-11-30T02:48:16.000Z | 2022-03-26T04:47:25.000Z | rtutil/data_manager.py | RT-Team/rt-bot | 39698efb6b2465de1e84063cba9d207a5bf07fa5 | [
"BSD-4-Clause"
] | 143 | 2021-11-04T07:47:53.000Z | 2022-03-31T23:13:33.000Z | rtutil/data_manager.py | RT-Team/rt-bot | 39698efb6b2465de1e84063cba9d207a5bf07fa5 | [
"BSD-4-Clause"
] | 14 | 2021-11-12T15:32:27.000Z | 2022-03-28T04:04:44.000Z | # RT Util - Data Manager
from collections.abc import Callable, Coroutine
from inspect import iscoroutinefunction, signature, Parameter
from functools import wraps
from aiomysql import Cursor
class _Dummy:
default = Parameter.empty
class DatabaseManager:
def __init_subclass__(cls):
for key in dir(... | 34.26087 | 98 | 0.557107 |
8dd975b1b1d6743ad4f7fa41fa82949688c056e0 | 6,985 | py | Python | log_caspase/model_207.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_caspase/model_207.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_caspase/model_207.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('C6A', ['C8pro'])
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C3ub')
Monomer('C3A', ['Xiap', 'ParpU', 'C6pro'])
Mo... | 69.85 | 296 | 0.818039 |
c8c56ef0cfba2d4afaa07cc8d0e6577a1fceefe2 | 1,569 | py | Python | alipay/aop/api/response/AlipayMobilePublicMessageMatcherSendResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayMobilePublicMessageMatcherSendResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayMobilePublicMessageMatcherSendResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayMobilePublicMessageMatcherSendResponse(AlipayResponse):
def __init__(self):
super(AlipayMobilePublicMessageMatcherSendResponse, self).__init__()
s... | 28.017857 | 117 | 0.664117 |
7667025d07cbd14ad7464dcf96eb0ca64877dcb0 | 15,774 | py | Python | examples-master/python_examples/md_npt_lj.py | JungHoonJung/2021MD | 29bfae7a750217d50654e4973a2be6fb0d968bdf | [
"MIT"
] | 186 | 2017-04-30T18:11:12.000Z | 2022-03-31T18:35:09.000Z | examples-master/python_examples/md_npt_lj.py | JungHoonJung/2021MD | 29bfae7a750217d50654e4973a2be6fb0d968bdf | [
"MIT"
] | 17 | 2017-02-09T11:08:49.000Z | 2022-01-29T14:40:09.000Z | examples-master/python_examples/md_npt_lj.py | JungHoonJung/2021MD | 29bfae7a750217d50654e4973a2be6fb0d968bdf | [
"MIT"
] | 92 | 2017-09-13T05:20:40.000Z | 2022-03-19T16:17:02.000Z | #!/usr/bin/env python3
# md_npt_lj.py
#------------------------------------------------------------------------------------------------#
# This software was written in 2016/17 #
# by Michael P. Allen <m.p.allen@warwick.ac.uk>/<m.p.allen@bristol.ac.uk> ... | 42.51752 | 114 | 0.607202 |
cce9912b21cf45d6900912d03bf4d50a918b2f45 | 1,086 | py | Python | image_play.py | beepscore/image_play | b00bf57d7813a72430e65c682a23bf1a7c2e4248 | [
"MIT"
] | null | null | null | image_play.py | beepscore/image_play | b00bf57d7813a72430e65c682a23bf1a7c2e4248 | [
"MIT"
] | null | null | null | image_play.py | beepscore/image_play | b00bf57d7813a72430e65c682a23bf1a7c2e4248 | [
"MIT"
] | null | null | null | # http://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_adapt_rgb.html#sphx-glr-auto-examples-color-exposure-plot-adapt-rgb-py
import os
import matplotlib.pyplot as plt
# scikit-image package contains skimage
from skimage import color
from skimage import data
from skimage import filters
from skimage impo... | 30.166667 | 139 | 0.779006 |
28034c322df3af8b50a5466173425ee98e2e4b20 | 15,069 | py | Python | LuciferMoringstar_Robot/modules/autofilterGP.py | PR0FESS0R-99/LuciferMoringstar-Robot | d4864b7be54f066e8241e7067eb086f835d3ec9d | [
"MIT"
] | 20 | 2022-02-05T17:35:24.000Z | 2022-03-31T12:23:29.000Z | LuciferMoringstar_Robot/modules/autofilterGP.py | PR0FESS0R-99/LuciferMoringstar-Robot | d4864b7be54f066e8241e7067eb086f835d3ec9d | [
"MIT"
] | 8 | 2022-02-07T17:29:39.000Z | 2022-03-18T17:30:31.000Z | LuciferMoringstar_Robot/modules/autofilterGP.py | PR0FESS0R-99/LuciferMoringstar-Robot | d4864b7be54f066e8241e7067eb086f835d3ec9d | [
"MIT"
] | 137 | 2022-02-05T14:50:15.000Z | 2022-03-31T12:23:42.000Z | # MIT License
# Copyright (c) 2022 Muhammed
# 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, merge, publi... | 77.276923 | 408 | 0.63833 |
49590016700ad27045f0d2bd0f5dd010b70a9177 | 1,762 | py | Python | app/editor/ai_editor/ai_model.py | ViolaBuddy/EscapeFromPlegia | 5228b42e8525b445854d742dccf85ca65b320d70 | [
"MIT"
] | null | null | null | app/editor/ai_editor/ai_model.py | ViolaBuddy/EscapeFromPlegia | 5228b42e8525b445854d742dccf85ca65b320d70 | [
"MIT"
] | null | null | null | app/editor/ai_editor/ai_model.py | ViolaBuddy/EscapeFromPlegia | 5228b42e8525b445854d742dccf85ca65b320d70 | [
"MIT"
] | null | null | null | from PyQt5.QtCore import Qt
from app.data.database import DB
from app.extensions.custom_gui import DeletionDialog
from app.editor.custom_widgets import AIBox
from app.editor.base_database_gui import DragDropCollectionModel
from app.data.ai import AIPrefab
from app.utilities import str_utils
class AIModel(D... | 35.24 | 121 | 0.597616 |
530496e3902c27ceeea56a3f077327455e603a71 | 3,270 | py | Python | textdect/s1train.py | bshao001/DmsMsgRcg | 888eb17207e8e02b19c3eb2025bd10b326654a6b | [
"Apache-2.0"
] | 19 | 2017-11-22T18:52:57.000Z | 2019-09-25T08:15:09.000Z | textdect/s1train.py | bshao001/DmsMsgRcg | 888eb17207e8e02b19c3eb2025bd10b326654a6b | [
"Apache-2.0"
] | null | null | null | textdect/s1train.py | bshao001/DmsMsgRcg | 888eb17207e8e02b19c3eb2025bd10b326654a6b | [
"Apache-2.0"
] | 12 | 2017-11-01T03:46:12.000Z | 2020-06-16T04:25:28.000Z | # Copyright 2017 Bo Shao. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 37.159091 | 99 | 0.602141 |
35f84671dd1d26b9b6a48abbdfb66fec0eb71553 | 1,397 | py | Python | get_palette/get_colours.py | pguarnieri/get-palette-app | 44a8a533de36e07730c6712f5616d851d5131325 | [
"MIT"
] | 1 | 2021-01-21T18:59:20.000Z | 2021-01-21T18:59:20.000Z | get_palette/get_colours.py | pguarnieri/get-palette-app | 44a8a533de36e07730c6712f5616d851d5131325 | [
"MIT"
] | null | null | null | get_palette/get_colours.py | pguarnieri/get-palette-app | 44a8a533de36e07730c6712f5616d851d5131325 | [
"MIT"
] | null | null | null | import numpy as np
import PIL.Image
from sklearn.cluster import KMeans
import colorsys
def make_image_array(img):
# resize image to keep size relatively small and keep calculations running quickly
basewidth = 100
wpercent = (basewidth / float(img.size[0]))
hsize = int((float(img.size[1]) * float(wpercent)))
img ... | 24.946429 | 144 | 0.722978 |
29978d028dda70eae3bf7532aaf5120a621884db | 114 | py | Python | secretballot/settings.py | radiocutfm/django-secretballot | 593e5e9f1aab7e8c749f4db27e1a7c105ba980a8 | [
"BSD-2-Clause"
] | null | null | null | secretballot/settings.py | radiocutfm/django-secretballot | 593e5e9f1aab7e8c749f4db27e1a7c105ba980a8 | [
"BSD-2-Clause"
] | null | null | null | secretballot/settings.py | radiocutfm/django-secretballot | 593e5e9f1aab7e8c749f4db27e1a7c105ba980a8 | [
"BSD-2-Clause"
] | null | null | null | from django.conf import settings
MODEL_VOTE = getattr(settings, 'SECRETBALLOT_VOTE_MODEL', 'secretballot.Vote')
| 22.8 | 78 | 0.807018 |
a8a5b8cb1c9d8541d5c85964d22ca4db38371a8a | 5,104 | py | Python | main.py | tallCoder02/NumberBaseConverter | f3dd5558605e8fe2d3ffec7d9d4a9c33572bc9b7 | [
"MIT"
] | null | null | null | main.py | tallCoder02/NumberBaseConverter | f3dd5558605e8fe2d3ffec7d9d4a9c33572bc9b7 | [
"MIT"
] | null | null | null | main.py | tallCoder02/NumberBaseConverter | f3dd5558605e8fe2d3ffec7d9d4a9c33572bc9b7 | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets as qtw
from PyQt5 import QtGui as qtg
class MainWindow(qtw.QWidget):
def __init__(self):
super().__init__()
# Title
self.setWindowTitle("Simple Number Base Converter")
# Layout
self.setLayout(qtw.QVBoxLayout())
# Label
label = q... | 40.507937 | 98 | 0.488636 |
732e32d792a6ec48e492669d4918e07260ce0e09 | 4,760 | py | Python | metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_ownership.py | zhoxie-cisco/datahub | 254a73e6ca9b1ec6002fcf013ed42cb6a754d1ad | [
"Apache-2.0"
] | 3,586 | 2020-01-27T11:09:57.000Z | 2022-03-15T16:13:30.000Z | metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_ownership.py | zhoxie-cisco/datahub | 254a73e6ca9b1ec6002fcf013ed42cb6a754d1ad | [
"Apache-2.0"
] | 1,678 | 2020-01-27T20:51:01.000Z | 2022-03-15T15:22:02.000Z | metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_ownership.py | zhoxie-cisco/datahub | 254a73e6ca9b1ec6002fcf013ed42cb6a754d1ad | [
"Apache-2.0"
] | 924 | 2020-01-28T20:10:50.000Z | 2022-03-15T10:01:23.000Z | from typing import Callable, List, Optional, Union
import datahub.emitter.mce_builder as builder
from datahub.configuration.common import ConfigModel, KeyValuePattern
from datahub.configuration.import_resolver import pydantic_resolve_key
from datahub.ingestion.api.common import PipelineContext
from datahub.ingestion.t... | 34 | 87 | 0.683613 |
e764eebe6d25b264e008bc70792b34c7dcb4c0c8 | 674 | py | Python | benchmarks/collect_app_benchmarks.py | pyronia-sys/pyronia-cpython | 29e726a7c4df062a9bfd345cd3cfcae147fb3d9c | [
"PSF-2.0"
] | null | null | null | benchmarks/collect_app_benchmarks.py | pyronia-sys/pyronia-cpython | 29e726a7c4df062a9bfd345cd3cfcae147fb3d9c | [
"PSF-2.0"
] | null | null | null | benchmarks/collect_app_benchmarks.py | pyronia-sys/pyronia-cpython | 29e726a7c4df062a9bfd345cd3cfcae147fb3d9c | [
"PSF-2.0"
] | 1 | 2021-12-05T19:53:08.000Z | 2021-12-05T19:53:08.000Z | # Run 10 trials for a given application, and collect the end-to-end latency for each run
import os
import sys
import subprocess
runs = 1
if len(sys.argv) != 2:
print('Usage: python collect_app_benchmarks.py <benchmark type>')
exit(0)
bench_type = sys.argv[1]
apps = ['alexa', '... | 28.083333 | 114 | 0.608309 |
df915a6897d71f194475a25dff43de174366587f | 3,894 | py | Python | DTL/api/bases.py | rocktavious/DevToolsLib | 117200c91a3361e04f7c8e07d2ed4999bbcfc469 | [
"MIT"
] | 1 | 2015-03-23T18:52:12.000Z | 2015-03-23T18:52:12.000Z | DTL/api/bases.py | rocktavious/DevToolsLib | 117200c91a3361e04f7c8e07d2ed4999bbcfc469 | [
"MIT"
] | null | null | null | DTL/api/bases.py | rocktavious/DevToolsLib | 117200c91a3361e04f7c8e07d2ed4999bbcfc469 | [
"MIT"
] | 2 | 2017-05-21T12:50:41.000Z | 2021-10-17T03:32:45.000Z | import inspect
#------------------------------------------------------------
#------------------------------------------------------------
class BaseStruct(object):
#------------------------------------------------------------
def __init__(self, *args, **kwds):
self.deserialize(*args, **kwds)
... | 39.333333 | 112 | 0.384951 |
8c05d2213ab18cc5e2d78c9f039463afc2766fe2 | 393 | py | Python | PycharmProjects/pythonteste/ex052.py | caioalexleme/Curso_Python | 6394f60689531c7431765538f1b699aabbf4acb2 | [
"MIT"
] | 3 | 2021-07-09T20:41:47.000Z | 2021-11-17T10:25:01.000Z | PycharmProjects/pythonteste/ex052.py | caioalexleme/Curso_Python | 6394f60689531c7431765538f1b699aabbf4acb2 | [
"MIT"
] | null | null | null | PycharmProjects/pythonteste/ex052.py | caioalexleme/Curso_Python | 6394f60689531c7431765538f1b699aabbf4acb2 | [
"MIT"
] | 1 | 2021-09-09T20:24:07.000Z | 2021-09-09T20:24:07.000Z | núm = int(input('Digite um número: '))
tot = 0
for c in range(1, núm + 1):
if núm % c == 0:
print('\033[33m', end='')
tot += 1
else:
print('\033[31m', end='')
print('{}'.format(c), end=' ')
print('\n\033[mO número {} foi divisível {} vezes!'.format(núm, tot))
if tot == 2:
print('... | 26.2 | 69 | 0.524173 |
a251b0dba5a75306b7890cf356ced8ed6d152722 | 152 | py | Python | solution-4.py | robbyorsag/pands-problem-set | d62016b40b82e1bcec0378199e3f9f3ab7f6d6c6 | [
"Apache-2.0"
] | null | null | null | solution-4.py | robbyorsag/pands-problem-set | d62016b40b82e1bcec0378199e3f9f3ab7f6d6c6 | [
"Apache-2.0"
] | null | null | null | solution-4.py | robbyorsag/pands-problem-set | d62016b40b82e1bcec0378199e3f9f3ab7f6d6c6 | [
"Apache-2.0"
] | null | null | null | n = int(input("Please enter a positive integer : "))
print(n)
while n != 1:
n = n // 2 if n % 2 == 0 else 3*n + 1
print(n)
| 13.818182 | 52 | 0.460526 |
b599ec5c151dd6f4a42254e26ead8708ede8ac1e | 30,855 | py | Python | python/ray/tests/test_actor_advanced.py | tahentx/ray | 1a1ff28d18f293cef6fb231e673ebfec5ae0328d | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_actor_advanced.py | tahentx/ray | 1a1ff28d18f293cef6fb231e673ebfec5ae0328d | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_actor_advanced.py | tahentx/ray | 1a1ff28d18f293cef6fb231e673ebfec5ae0328d | [
"Apache-2.0"
] | 1 | 2021-10-11T22:53:49.000Z | 2021-10-11T22:53:49.000Z | import numpy as np
import os
import pytest
try:
import pytest_timeout
except ImportError:
pytest_timeout = None
import sys
import time
import ray
import ray.test_utils
import ray.cluster_utils
from ray.test_utils import (run_string_as_driver, get_non_head_nodes,
wait_for_condition)
... | 29.725434 | 79 | 0.644693 |
d9d4716c4cee11f7bba52c8b99a6aee4f3e5c33a | 3,597 | py | Python | configs/ttflevelnet/ttflnet_r18_enh_mdcns8_mdconv64_wh32_hm64_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/ttflevelnet/ttflnet_r18_enh_mdcns8_mdconv64_wh32_hm64_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/ttflevelnet/ttflnet_r18_enh_mdcns8_mdconv64_wh32_hm64_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='TTFNet',
pretrained='modelzoo://resnet18',
backbone=dict(
type='ResNet',
depth=18,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_eval=False,
style='pytorch'),
neck=None,
bbox_head=dict(
... | 29.727273 | 86 | 0.623019 |
f198cdc83c773e398c29b8497b3218ff6677b657 | 408 | py | Python | web_app/client_code/Form1/__init__.py | theneuralbeing/apprentice | a7f0e506a95757a1646f2f8e1302581ee9d59e89 | [
"MIT"
] | null | null | null | web_app/client_code/Form1/__init__.py | theneuralbeing/apprentice | a7f0e506a95757a1646f2f8e1302581ee9d59e89 | [
"MIT"
] | null | null | null | web_app/client_code/Form1/__init__.py | theneuralbeing/apprentice | a7f0e506a95757a1646f2f8e1302581ee9d59e89 | [
"MIT"
] | null | null | null | from ._anvil_designer import Form1Template
from anvil import *
import anvil.server
class Form1(Form1Template):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
def check_click(self, **event_args):
result = anvil.server.call... | 22.666667 | 81 | 0.696078 |
2a0f8b4604f3f1e4ce956cdd9a1b4248796499e8 | 1,035 | py | Python | src/core/src/tortuga/exceptions/adminAlreadyExists.py | sutasu/tortuga | 48d7cde4fa652346600b217043b4a734fa2ba455 | [
"Apache-2.0"
] | 33 | 2018-03-02T17:07:39.000Z | 2021-05-21T18:02:51.000Z | src/core/src/tortuga/exceptions/adminAlreadyExists.py | sutasu/tortuga | 48d7cde4fa652346600b217043b4a734fa2ba455 | [
"Apache-2.0"
] | 201 | 2018-03-05T14:28:24.000Z | 2020-11-23T19:58:27.000Z | src/core/src/tortuga/exceptions/adminAlreadyExists.py | sutasu/tortuga | 48d7cde4fa652346600b217043b4a734fa2ba455 | [
"Apache-2.0"
] | 23 | 2018-03-02T17:21:59.000Z | 2020-11-18T14:52:38.000Z | # Copyright 2008-2018 Univa Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.964286 | 74 | 0.745894 |
6a517597c4fbaec71234cf059336d46d7feb080e | 344 | py | Python | app/tasks/templatetags/format_ru.py | ugractf/ctfboard | a293689658a3af092dbc964334340811c92e2233 | [
"MIT"
] | null | null | null | app/tasks/templatetags/format_ru.py | ugractf/ctfboard | a293689658a3af092dbc964334340811c92e2233 | [
"MIT"
] | null | null | null | app/tasks/templatetags/format_ru.py | ugractf/ctfboard | a293689658a3af092dbc964334340811c92e2233 | [
"MIT"
] | null | null | null | from django import template
register = template.Library()
@register.filter
def formatru(endings, number):
endings = endings.split(",")
if number % 100 // 10 == 1:
return endings[2]
if number % 10 == 1:
return endings[0]
if 2 <= number % 10 <= 4:
return endings[1]
... | 21.5 | 33 | 0.572674 |
899bcf68978c560d23b1a51ef951b97e4344f49b | 24,802 | py | Python | numexpr/necompiler.py | eleddy/numexpr | 3726845ad94e7c3f571a06f0735023cdf2385701 | [
"MIT"
] | 1 | 2019-03-04T17:44:19.000Z | 2019-03-04T17:44:19.000Z | numexpr/necompiler.py | eleddy/numexpr | 3726845ad94e7c3f571a06f0735023cdf2385701 | [
"MIT"
] | null | null | null | numexpr/necompiler.py | eleddy/numexpr | 3726845ad94e7c3f571a06f0735023cdf2385701 | [
"MIT"
] | null | null | null | ###################################################################
# Numexpr - Fast numerical array expression evaluator for NumPy.
#
# License: MIT
# Author: See AUTHORS.txt
#
# See LICENSE.txt and LICENSES/*.txt for details about copyright and
# rights to use.
##########################################... | 34.591353 | 80 | 0.588501 |
877f2c27475a3c9d9fa72defcac230adb76758c4 | 23,177 | py | Python | imagenet/Train_CoMatch.py | CanItRun/CoMatch | 748645d531787502340977e75b48049b629f9e97 | [
"BSD-3-Clause"
] | 84 | 2021-03-04T01:39:53.000Z | 2022-03-31T08:50:58.000Z | imagenet/Train_CoMatch.py | CanItRun/CoMatch | 748645d531787502340977e75b48049b629f9e97 | [
"BSD-3-Clause"
] | 7 | 2021-07-22T12:37:35.000Z | 2022-02-26T14:19:29.000Z | imagenet/Train_CoMatch.py | CanItRun/CoMatch | 748645d531787502340977e75b48049b629f9e97 | [
"BSD-3-Clause"
] | 12 | 2021-03-04T03:52:49.000Z | 2022-03-31T07:57:31.000Z | '''
* Copyright (c) 2018, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
'''
import argparse
import os
import random
import shutil
import time
import warnings
import bu... | 41.610413 | 122 | 0.623592 |
e265bd61678668bf09a159ccccdbdba72248e0d2 | 2,397 | py | Python | custom_components/palgate/cover.py | ShonP40/ha-palgate | b7d3dccdfe09c4e23c7fb8894d0ba4693411d8e0 | [
"Apache-2.0"
] | null | null | null | custom_components/palgate/cover.py | ShonP40/ha-palgate | b7d3dccdfe09c4e23c7fb8894d0ba4693411d8e0 | [
"Apache-2.0"
] | null | null | null | custom_components/palgate/cover.py | ShonP40/ha-palgate | b7d3dccdfe09c4e23c7fb8894d0ba4693411d8e0 | [
"Apache-2.0"
] | null | null | null | """Sensor file for Palgate."""
from typing import Any, Optional
from homeassistant.components.cover import (
CoverEntity,
CoverEntityDescription,
CoverDeviceClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_TOKEN
from homeassistant.core i... | 27.238636 | 72 | 0.66917 |
0e9dcb9c99e402d623c90e959e08b87c18b532d8 | 2,160 | py | Python | python/src/iceberg/io/memory.py | felixYyu/iceberg | 120cbe9a5db4cedec76d2a7f097ec67de9c25c96 | [
"Apache-2.0"
] | 1 | 2021-11-18T02:27:29.000Z | 2021-11-18T02:27:29.000Z | python/src/iceberg/io/memory.py | felixYyu/iceberg | 120cbe9a5db4cedec76d2a7f097ec67de9c25c96 | [
"Apache-2.0"
] | null | null | null | python/src/iceberg/io/memory.py | felixYyu/iceberg | 120cbe9a5db4cedec76d2a7f097ec67de9c25c96 | [
"Apache-2.0"
] | null | null | null | # 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, Version 2.0 (the
# "License"); you may not u... | 28.421053 | 68 | 0.621759 |
ec97dfdd32f35175efe745c6dc578eb8874e00d4 | 4,893 | py | Python | leapp/repository/manager.py | pirat89/leapp | 135f178b335738d8dccfb6f0b4fd020cb7432828 | [
"Apache-2.0"
] | null | null | null | leapp/repository/manager.py | pirat89/leapp | 135f178b335738d8dccfb6f0b4fd020cb7432828 | [
"Apache-2.0"
] | null | null | null | leapp/repository/manager.py | pirat89/leapp | 135f178b335738d8dccfb6f0b4fd020cb7432828 | [
"Apache-2.0"
] | null | null | null | import itertools
from leapp.models import resolve_model_references
from leapp.repository import _LoadStage
class RepositoryManager(object):
"""
Handles multiple loaded repositories
"""
def __init__(self):
self._repos = {}
def lookup_actor(self, name):
"""
Find actor in a... | 29.299401 | 119 | 0.601267 |
53a298bd92bd805de5add1247d87d9213ffaa8ae | 205 | py | Python | aerie/__init__.py | pkhuong/aerie | 5c9ece4b27c64f0775da14aee960a43a0c3e2a83 | [
"BSD-2-Clause"
] | 13 | 2018-02-28T14:31:41.000Z | 2020-11-27T20:06:30.000Z | aerie/__init__.py | pkhuong/aerie | 5c9ece4b27c64f0775da14aee960a43a0c3e2a83 | [
"BSD-2-Clause"
] | 1 | 2018-03-06T10:53:08.000Z | 2018-03-06T10:53:08.000Z | aerie/__init__.py | pkhuong/aerie | 5c9ece4b27c64f0775da14aee960a43a0c3e2a83 | [
"BSD-2-Clause"
] | null | null | null | from .sregex import compile, convert, match, Matcher, Pattern, Empty, Any, Nest, Literal, Regex, Function, Maybe, Alt, Star, Plus, Seq
from .plexer import Dispatch, plex
from .nwa import NWA
__all__ = []
| 34.166667 | 134 | 0.736585 |
cb53cfb7c7767240f81769e4c2487ff3f1a05d78 | 1,136 | py | Python | word2vec/main.py | asuka1211/ComputationalLinguistics | 4b96d8a393745bb1bcd1af1bf4148100dfd8af27 | [
"Apache-2.0"
] | 1 | 2021-11-13T08:08:48.000Z | 2021-11-13T08:08:48.000Z | word2vec/main.py | asuka1211/ComputationalLinguistics | 4b96d8a393745bb1bcd1af1bf4148100dfd8af27 | [
"Apache-2.0"
] | 1 | 2020-10-27T22:38:27.000Z | 2020-10-27T22:38:27.000Z | word2vec/main.py | asuka1211/ComputationalLinguistics | 4b96d8a393745bb1bcd1af1bf4148100dfd8af27 | [
"Apache-2.0"
] | null | null | null | import pymongo
import json
import re
from pymongo import MongoClient
import os
import datetime
import glob
import app
from pyspark.sql import SparkSession
from pyspark.ml.feature import Tokenizer
from pyspark.ml.feature import StopWordsRemover
from pyspark.ml.feature import CountVectorizer
from pyspark.ml.feature im... | 23.666667 | 86 | 0.683099 |
071f410b19848f380d5e0fe884e6a5af038c330a | 939 | py | Python | nginx/__init__.py | lbhsot/nginxpy | 105d9d13701bf4bba3afc4bd3cb509f9a52b02e1 | [
"Apache-2.0"
] | null | null | null | nginx/__init__.py | lbhsot/nginxpy | 105d9d13701bf4bba3afc4bd3cb509f9a52b02e1 | [
"Apache-2.0"
] | null | null | null | nginx/__init__.py | lbhsot/nginxpy | 105d9d13701bf4bba3afc4bd3cb509f9a52b02e1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for NGINXpy."""
__author__ = """DecentFoX Studio"""
__email__ = 'foss@decentfox.com'
__version__ = '0.1.0'
try:
from ._nginx import (
Cycle, Log, get_current_cycle,
NginxEventLoop, NginxEventLoopPolicy, Event,
)
except ImportError:
import sys
... | 28.454545 | 78 | 0.615548 |
5b326e938e565ff5539e4845114977d574af5470 | 2,647 | py | Python | pennylane/templates/state_preparations/basis.py | ryanlevy/pennylane | fb03b09d17267ebd0b9050432f9eeb84b5dff200 | [
"Apache-2.0"
] | null | null | null | pennylane/templates/state_preparations/basis.py | ryanlevy/pennylane | fb03b09d17267ebd0b9050432f9eeb84b5dff200 | [
"Apache-2.0"
] | 1 | 2021-05-27T05:36:41.000Z | 2021-05-27T05:36:41.000Z | pennylane/templates/state_preparations/basis.py | ryanlevy/pennylane | fb03b09d17267ebd0b9050432f9eeb84b5dff200 | [
"Apache-2.0"
] | 1 | 2021-05-15T03:25:40.000Z | 2021-05-15T03:25:40.000Z | # Copyright 2018-2021 Xanadu Quantum Technologies 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... | 32.679012 | 97 | 0.657726 |
7c6c6f749b51d1779c47db6544a0c77b7e1a14f1 | 861 | py | Python | pierwsze_selenium.py | swyrwa/zadaniePoranne | 0a351e8ff98d0b5a45ee4930f3fa35e4a1aeaa6f | [
"MIT"
] | null | null | null | pierwsze_selenium.py | swyrwa/zadaniePoranne | 0a351e8ff98d0b5a45ee4930f3fa35e4a1aeaa6f | [
"MIT"
] | null | null | null | pierwsze_selenium.py | swyrwa/zadaniePoranne | 0a351e8ff98d0b5a45ee4930f3fa35e4a1aeaa6f | [
"MIT"
] | null | null | null | # from selenium import webdriver
# from selenium.webdriver.common.keys import Keys
# driver = webdriver.Chrome()
# driver.get("http://www.python.org")
# assert "Python" in driver.title
# elem = driver.find_element_by_name("q")
# elem.clear()
# elem.send_keys("pycon")
# elem.send_keys(Keys.RETURN)
# assert "No results f... | 24.6 | 54 | 0.751452 |
d669261a85b259290967aa801b334f714efe9199 | 396 | py | Python | catch/datasets/ekpoma_1_tibrovirus.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 58 | 2018-01-24T16:31:37.000Z | 2022-02-25T07:46:35.000Z | catch/datasets/ekpoma_1_tibrovirus.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 29 | 2018-04-17T17:36:06.000Z | 2022-02-25T11:48:58.000Z | catch/datasets/ekpoma_1_tibrovirus.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 16 | 2018-05-23T12:19:41.000Z | 2021-08-09T04:16:00.000Z | """Dataset with 'Ekpoma 1 tibrovirus' sequences.
A dataset with 1 'Ekpoma 1 tibrovirus' genomes.
THIS PYTHON FILE WAS GENERATED BY A COMPUTER PROGRAM! DO NOT EDIT!
"""
import sys
from catch.datasets import GenomesDatasetSingleChrom
ds = GenomesDatasetSingleChrom(__name__, __file__, __spec__)
ds.add_fasta_path("da... | 24.75 | 69 | 0.790404 |
f35e2424d67c6f9c41fa26d4a88b314c85307f4f | 5,813 | py | Python | composer/core/logging/logger.py | stanford-crfm/composer | 4996fbd818971afd6439961df58b531d9b47a37b | [
"Apache-2.0"
] | null | null | null | composer/core/logging/logger.py | stanford-crfm/composer | 4996fbd818971afd6439961df58b531d9b47a37b | [
"Apache-2.0"
] | null | null | null | composer/core/logging/logger.py | stanford-crfm/composer | 4996fbd818971afd6439961df58b531d9b47a37b | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
"""Base classes, functions, and variables for logger.
Attributes:
TLogDataValue: Data value(s) to be logged. Can be any of the following types:
``str``; ``float``; ``int``; :class:`torch.Tensor`; ``Sequence[TLogDataValue]``;
``Mapping[str, TLogDa... | 39.277027 | 123 | 0.645794 |
09185d8b1d717255d5c867ce857542617b3a10a3 | 1,688 | py | Python | scripts/git-report.py | jRimbault/rc | 0a8bbf125a1c3f6d3fc9fe0535b08f7b92c1d1cb | [
"MIT"
] | null | null | null | scripts/git-report.py | jRimbault/rc | 0a8bbf125a1c3f6d3fc9fe0535b08f7b92c1d1cb | [
"MIT"
] | null | null | null | scripts/git-report.py | jRimbault/rc | 0a8bbf125a1c3f6d3fc9fe0535b08f7b92c1d1cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import subprocess
import sys
from contextlib import contextmanager
try:
from tqdm import tqdm
except ImportError:
def tqdm(iterable):
def report(i):
print(f"{i+1:>{formatter}}/{total}", file=sys.stderr, end="\r")
total = len(iterable)
... | 22.506667 | 75 | 0.633294 |
fc9bc7572c657af062b6043bd1d842e82fd1df68 | 1,144 | py | Python | Thesis/cluster/CassandraCluster.py | arnaudsjs/YCSB-1 | dc557d209244df72d68c9cb0a048d54e7bd72637 | [
"Apache-2.0"
] | null | null | null | Thesis/cluster/CassandraCluster.py | arnaudsjs/YCSB-1 | dc557d209244df72d68c9cb0a048d54e7bd72637 | [
"Apache-2.0"
] | null | null | null | Thesis/cluster/CassandraCluster.py | arnaudsjs/YCSB-1 | dc557d209244df72d68c9cb0a048d54e7bd72637 | [
"Apache-2.0"
] | null | null | null | import subprocess;
from Thesis.delete_data.deleteAllCassandraData import clearCassandraColumnFamily;
from Thesis.cluster.Cluster import Cluster;
from Thesis.util.util import executeCommandOverSsh;
class CassandraCluster(Cluster):
def __init__(self, normalBinding, consistencyBinding, nodesInCluster):
... | 45.76 | 213 | 0.746503 |
2433f1ef5d3d17ef566007710c8520b24b73ad4a | 1,669 | py | Python | setup.py | varnav/filmcompress | 4c6181974a4249c8a573df0e91dbfdfa3ea5fe7b | [
"MIT"
] | 4 | 2020-12-12T22:30:35.000Z | 2021-12-23T08:18:41.000Z | setup.py | varnav/filmcompress | 4c6181974a4249c8a573df0e91dbfdfa3ea5fe7b | [
"MIT"
] | null | null | null | setup.py | varnav/filmcompress | 4c6181974a4249c8a573df0e91dbfdfa3ea5fe7b | [
"MIT"
] | null | null | null | import setuptools
import os
import shutil
import filmcompress
if not os.path.exists('filmcompress'):
os.mkdir('filmcompress')
shutil.copyfile('filmcompress.py', 'filmcompress/__init__.py')
with open("README.md", "r") as fh:
long_description = fh.read()
install_requires = [
'click>=7.1.2',
'termcolor>... | 32.096154 | 172 | 0.645896 |
f5d078075385934b29e1ae4e847c3f31c86f3e1a | 473 | py | Python | signbank/contentpages/translation.py | ljsharp/GhSL_signbank | 27dc2909b1861463241d723b45bfbe809c404f82 | [
"BSD-3-Clause"
] | 7 | 2016-09-29T09:18:46.000Z | 2020-10-17T04:32:39.000Z | signbank/contentpages/translation.py | ljsharp/GhSL_signbank | 27dc2909b1861463241d723b45bfbe809c404f82 | [
"BSD-3-Clause"
] | 144 | 2016-01-23T12:39:59.000Z | 2022-02-09T02:13:18.000Z | signbank/contentpages/translation.py | ljsharp/GhSL_signbank | 27dc2909b1861463241d723b45bfbe809c404f82 | [
"BSD-3-Clause"
] | 6 | 2018-03-09T12:07:37.000Z | 2021-08-29T04:54:22.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from modeltranslation.translator import translator, TranslationOptions
from django.contrib.flatpages.models import FlatPage
# This file lists settings for django-modeltranslation.
# Define here which fields from which models you want to add to translati... | 31.533333 | 76 | 0.807611 |
7f94babc1022e2b366fd663e9b430470b51f3405 | 9,746 | py | Python | actforce/apps/mover/views.py | neworganizing/actforce | a47ac6f85ea3ff521d7b27731904fce07c34f450 | [
"Apache-2.0"
] | 1 | 2017-10-11T11:41:31.000Z | 2017-10-11T11:41:31.000Z | actforce/apps/mover/views.py | neworganizing/actforce | a47ac6f85ea3ff521d7b27731904fce07c34f450 | [
"Apache-2.0"
] | null | null | null | actforce/apps/mover/views.py | neworganizing/actforce | a47ac6f85ea3ff521d7b27731904fce07c34f450 | [
"Apache-2.0"
] | null | null | null | from django.views.generic.base import View, TemplateView
from django.utils.decorators import method_decorator
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404, redirect
from django.contrib import messages
from django.core.cache... | 44.3 | 244 | 0.632259 |
7b74ab3ebf77c0c4b0a8e4eb16d016e123d37dc3 | 1,991 | py | Python | sydent/http/servlets/pubkeyservlets.py | jp-modernisation-gouv-fr/sydent | 4a64a89a6850a5a94ee756d8eeaaf7ad01ac442f | [
"Apache-2.0"
] | null | null | null | sydent/http/servlets/pubkeyservlets.py | jp-modernisation-gouv-fr/sydent | 4a64a89a6850a5a94ee756d8eeaaf7ad01ac442f | [
"Apache-2.0"
] | 1 | 2020-07-21T14:37:16.000Z | 2020-07-21T14:37:16.000Z | sydent/http/servlets/pubkeyservlets.py | jp-modernisation-gouv-fr/sydent | 4a64a89a6850a5a94ee756d8eeaaf7ad01ac442f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014 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 l... | 29.279412 | 79 | 0.692115 |
01db7e71fa50679f831f273ce486d03dea368db5 | 2,273 | py | Python | smother/tests/test_git.py | blueyed/smother | 65d1ea6ae0060d213b0dcbb983c5aa8e7fee07bb | [
"MIT"
] | 42 | 2016-07-20T20:11:45.000Z | 2021-11-13T18:24:26.000Z | smother/tests/test_git.py | blueyed/smother | 65d1ea6ae0060d213b0dcbb983c5aa8e7fee07bb | [
"MIT"
] | 17 | 2016-07-20T19:44:40.000Z | 2021-11-25T08:54:53.000Z | smother/tests/test_git.py | blueyed/smother | 65d1ea6ae0060d213b0dcbb983c5aa8e7fee07bb | [
"MIT"
] | 8 | 2016-07-27T17:52:33.000Z | 2021-11-27T01:30:10.000Z | from subprocess import CalledProcessError
import pytest
from mock import patch
from unidiff import PatchSet
from smother import git
def test_execute():
git.execute(['echo', 'test']) == 'test\n'
with pytest.raises(CalledProcessError):
git.execute(['ls', 'does_not_exist'])
# Need to put as list to ... | 26.430233 | 75 | 0.645842 |
36a32bdb1bf488ef9fb62cb854d6d3a6bca65854 | 1,937 | py | Python | gg-exporter.py | Nircek/gg-exporter | 86d15103508202f2aaf690ed592117c303625660 | [
"MIT"
] | null | null | null | gg-exporter.py | Nircek/gg-exporter | 86d15103508202f2aaf690ed592117c303625660 | [
"MIT"
] | null | null | null | gg-exporter.py | Nircek/gg-exporter | 86d15103508202f2aaf690ed592117c303625660 | [
"MIT"
] | null | null | null | import json
import requests
import time
import sys
import os
def url(uri):
#s = time.time()
#while s+5>time.time():
# pass
try:
r = requests.get(uri, cookies = {#there your cookies
})
return json.loads(r.text)
except Exception as e:
print(e, file=sf)
return url(uri)
try:
of = open(sys.... | 30.746032 | 159 | 0.584409 |
1e0062c648bd537ed79e9e0dc5dbd9089ef794a1 | 460 | py | Python | challenges/c4.py | GunshipPenguin/prospector | fd760dd7f8eff684aa9022cc6c5a8febfaba3ebd | [
"MIT"
] | null | null | null | challenges/c4.py | GunshipPenguin/prospector | fd760dd7f8eff684aa9022cc6c5a8febfaba3ebd | [
"MIT"
] | 1 | 2017-01-21T22:54:37.000Z | 2017-01-21T22:54:37.000Z | challenges/c4.py | GunshipPenguin/prospector | fd760dd7f8eff684aa9022cc6c5a8febfaba3ebd | [
"MIT"
] | null | null | null | from challenge import Challenge
import flask
class c4(Challenge):
'''
Challenge 4
Cookies
'''
def __init__(self):
super()
self._id = '94fe6a3196c44b2cd7c2ea7776add10deb1fd968'
self._hints = {1: 'Exactly what the picture is'}
def get_response(self, app):
resp = ... | 24.210526 | 81 | 0.658696 |
31300ec3f06374ead845820470a6fce690d2dafc | 2,560 | py | Python | azure-keyvault/azure/keyvault/v7_0/models/deleted_key_bundle_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-keyvault/azure/keyvault/v7_0/models/deleted_key_bundle_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-keyvault/azure/keyvault/v7_0/models/deleted_key_bundle_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 41.290323 | 105 | 0.632422 |
cf9f1037f48dfe43bc6962b5763d0dafa0ee0667 | 838 | py | Python | challenges/ll_merge/test_ll_merge.py | seattlechem/data-structures-and-algorithms | 376e465c0a5529ea7c5c4e972a9852b6340251ff | [
"MIT"
] | null | null | null | challenges/ll_merge/test_ll_merge.py | seattlechem/data-structures-and-algorithms | 376e465c0a5529ea7c5c4e972a9852b6340251ff | [
"MIT"
] | null | null | null | challenges/ll_merge/test_ll_merge.py | seattlechem/data-structures-and-algorithms | 376e465c0a5529ea7c5c4e972a9852b6340251ff | [
"MIT"
] | null | null | null | from .ll_merge import merge_lists
def test_simple_merge_true(ll1, ll2):
"""
test for merging two linked list and
assert its return head value
"""
head = merge_lists(ll1, ll2)
assert head.val == 1
def test_merge_ll1_only_head(ll1_one, ll2):
"""
test to confirm if the merge_lists func... | 24.647059 | 76 | 0.677804 |
bf746a9d7032417563307ba7ad4e86db1ea9f668 | 11,052 | py | Python | train.py | aalennku/CSFF | 4630e4b6e3f1649dc62e889f02f6bc8e86a8bfaa | [
"MIT"
] | 6 | 2019-06-01T10:00:28.000Z | 2020-07-07T09:22:47.000Z | train.py | aalennku/CSFF | 4630e4b6e3f1649dc62e889f02f6bc8e86a8bfaa | [
"MIT"
] | 1 | 2021-05-15T08:01:44.000Z | 2021-05-15T08:54:48.000Z | train.py | aalennku/CSFF | 4630e4b6e3f1649dc62e889f02f6bc8e86a8bfaa | [
"MIT"
] | 2 | 2019-08-31T05:30:03.000Z | 2020-06-04T03:39:52.000Z | import tensorflow as tf
import numpy as np
import math
I_VAL = 1
# Using the model structure of PPF, see
# [1] Li, Wei, et al. "Hyperspectral image classification using deep pixel-pair features." IEEE Transactions on Geoscience and Remote Sensing 55.2 (2017): 844-853.
fea1 = 10
fea2 = fea1
fea3 = int(2*fea2)
fea4 =... | 42.344828 | 163 | 0.661871 |
36e26ed001e903e23119ed1cffa593508196ca40 | 589 | py | Python | abc/232/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/232/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/232/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import itertools
n, m = map(int, input().split())
a = [[False] * n for _ in range(n)]
b = [[False] * n for _ in range(n)]
for _ in range(m):
u, v = map(int, input().split())
u -= 1
v -= 1
a[u][v] = a[v][u] = True
for _ in range(m):
u, v = map(int, input().split())
u -= 1
v -= 1
b[u][... | 19 | 42 | 0.470289 |
ae93f7f247815b1856b9a16d29f821378d7d78c0 | 146 | py | Python | django_gvar/__init__.py | callat-qcd/django-gvar | ae4a6153573653cd913be5642b02d0c4dbdc86db | [
"BSD-3-Clause"
] | null | null | null | django_gvar/__init__.py | callat-qcd/django-gvar | ae4a6153573653cd913be5642b02d0c4dbdc86db | [
"BSD-3-Clause"
] | 8 | 2020-06-08T11:01:33.000Z | 2021-09-22T19:11:21.000Z | django_gvar/__init__.py | callat-qcd/django-gvar | ae4a6153573653cd913be5642b02d0c4dbdc86db | [
"BSD-3-Clause"
] | null | null | null | """Module provides django model field for storing GVars."""
from django_gvar.fields import GVarField
from django_gvar._version import __version__
| 36.5 | 59 | 0.828767 |
b44b8e6e22c2f5c0d03ba493e63381ef3fb81f9f | 1,493 | py | Python | tests/misc/run.py | sedonasys/pyangbind | e0fa0df59550711c576d769683a8490fe4ef2ebd | [
"Apache-2.0"
] | null | null | null | tests/misc/run.py | sedonasys/pyangbind | e0fa0df59550711c576d769683a8490fe4ef2ebd | [
"Apache-2.0"
] | null | null | null | tests/misc/run.py | sedonasys/pyangbind | e0fa0df59550711c576d769683a8490fe4ef2ebd | [
"Apache-2.0"
] | 1 | 2019-11-06T09:48:06.000Z | 2019-11-06T09:48:06.000Z | #!/usr/bin/env python
from __future__ import unicode_literals
import unittest
import six
from pyangbind.lib.xpathhelper import YANGPathHelper
from tests.base import PyangBindTestCase
class MiscTests(PyangBindTestCase):
yang_files = ["misc.yang"]
split_class_dir = True
pyang_flags = ["--use-extmethods",... | 27.145455 | 86 | 0.667113 |
cff685956386b07e875cf7d1cf4a1206247d13ac | 603 | py | Python | analysis/pull_data_from_phone.py | nesl/MyoBuddy | 787cf88070184acdf37a42ee8d495b2703c457b4 | [
"BSD-3-Clause"
] | null | null | null | analysis/pull_data_from_phone.py | nesl/MyoBuddy | 787cf88070184acdf37a42ee8d495b2703c457b4 | [
"BSD-3-Clause"
] | null | null | null | analysis/pull_data_from_phone.py | nesl/MyoBuddy | 787cf88070184acdf37a42ee8d495b2703c457b4 | [
"BSD-3-Clause"
] | null | null | null | import os
import subprocess
ANDROID_IN_DIR = '/sdcard/Documents/'
LOCAL_OUT_DIR = 'data/waiting_zone/'
process = subprocess.Popen(['adb', 'shell', 'ls', ANDROID_IN_DIR], stdout=subprocess.PIPE)
(output, _) = process.communicate()
file_names = [n.strip() for n in output.decode().split('\n') if n.startswith('log')]
... | 31.736842 | 90 | 0.713101 |
c4c95c1682152772483fe7fb3e657c077fa0e68b | 4,645 | py | Python | Israel/Entregable2B/Entregable2D.py | speed676/algoritmia_2018-2019 | db7c233420cc13c3d089f4aaeebf3cc1f6e2dfa2 | [
"MIT"
] | null | null | null | Israel/Entregable2B/Entregable2D.py | speed676/algoritmia_2018-2019 | db7c233420cc13c3d089f4aaeebf3cc1f6e2dfa2 | [
"MIT"
] | null | null | null | Israel/Entregable2B/Entregable2D.py | speed676/algoritmia_2018-2019 | db7c233420cc13c3d089f4aaeebf3cc1f6e2dfa2 | [
"MIT"
] | null | null | null | import sys
from typing import *
from sys import argv
Folleto = Tuple[int, int, int]
PosicionFolleto = Tuple[int,int,int,int]
def lee_fichero_imprenta(nombreFichero: str) -> Tuple[int, List[Folleto]]:
folletos = []
with open(nombreFichero) as fichero:
m = int(fichero.readline())
for folleto ... | 29.03125 | 111 | 0.588805 |
0db65b51d3ae344e527ebba8c60e6169c3ab7b8f | 10,913 | py | Python | tests/test_basic_api.py | beasleyr-vmw/pygments | bd166a3bb5452efd3a37a52d4847cae96d3d45e2 | [
"BSD-2-Clause"
] | null | null | null | tests/test_basic_api.py | beasleyr-vmw/pygments | bd166a3bb5452efd3a37a52d4847cae96d3d45e2 | [
"BSD-2-Clause"
] | null | null | null | tests/test_basic_api.py | beasleyr-vmw/pygments | bd166a3bb5452efd3a37a52d4847cae96d3d45e2 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Pygments basic API tests
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import print_function
import random
from os import path
import pytest
from pygments import lex... | 34.31761 | 84 | 0.609457 |
303393dfbbeef284c0398d39f4d9c1e7bc83184b | 1,777 | py | Python | src/deezer_oauth/client.py | browniebroke/deezer-oauth-cli | 96898a6c593ae067610618c03984958847198a01 | [
"MIT"
] | null | null | null | src/deezer_oauth/client.py | browniebroke/deezer-oauth-cli | 96898a6c593ae067610618c03984958847198a01 | [
"MIT"
] | 43 | 2022-01-19T09:57:57.000Z | 2022-03-29T14:22:18.000Z | src/deezer_oauth/client.py | browniebroke/deezer-oauth-cli | 96898a6c593ae067610618c03984958847198a01 | [
"MIT"
] | null | null | null | from __future__ import annotations
from urllib.parse import parse_qsl, urlencode
import requests
from deezer_oauth.constants import HOST_NAME, OAUTH_RETURN_PATH, SERVER_PORT
class OAuthDancer:
"""A class to help with completing the OAuth dance."""
base_url: str = "https://connect.deezer.com"
app_id: s... | 31.732143 | 78 | 0.541362 |
925c4610f83ae9df679077db8e66ca7ebae3558b | 6,486 | py | Python | thesis_visfunc.py | EloyRD/ThesisExp | dfb890708e95d23cc68ff79b0858630c12aa940d | [
"Unlicense"
] | null | null | null | thesis_visfunc.py | EloyRD/ThesisExp | dfb890708e95d23cc68ff79b0858630c12aa940d | [
"Unlicense"
] | null | null | null | thesis_visfunc.py | EloyRD/ThesisExp | dfb890708e95d23cc68ff79b0858630c12aa940d | [
"Unlicense"
] | null | null | null | from matplotlib import cm
from matplotlib import gridspec
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
def EA_fitn_dev(fitness_res, run_s, min_f=0):
fitness_s = fitness_res.copy()
fitness_s.reset_index()
fitness_s = fitness_s[fitness_s['run'] == run_s]
fi... | 32.592965 | 123 | 0.629356 |
57076c2a90bab9e573045a53257c73984a606e47 | 3,790 | py | Python | homeassistant/components/speedtestdotnet/config_flow.py | squirrel289/core | 6c5bcbfc3ee40927458e9188d6b79bf63933d3f9 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/speedtestdotnet/config_flow.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 47 | 2020-07-23T07:13:11.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/speedtestdotnet/config_flow.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 3 | 2020-10-18T07:08:40.000Z | 2021-06-21T02:26:00.000Z | """Config flow for Speedtest.net."""
import logging
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_MONITORED_CONDITIONS, CONF_SCAN_INTERVAL
from homeassistant.core import callback
from . import server_id_valid
from .const import (
CONF_MANUAL,
CONF_SERV... | 32.118644 | 86 | 0.638786 |
bc1770ae4f9fbba244c89fc6325c0d6af58d57bf | 2,873 | py | Python | ceo/symbolic_execution.py | trailofbits/ceo | d6a1ed729f8a1e400147b99dfcb65934e1924891 | [
"Apache-2.0"
] | 3 | 2020-05-05T13:08:53.000Z | 2022-02-25T02:08:13.000Z | ceo/symbolic_execution.py | trailofbits/ceo | d6a1ed729f8a1e400147b99dfcb65934e1924891 | [
"Apache-2.0"
] | null | null | null | ceo/symbolic_execution.py | trailofbits/ceo | d6a1ed729f8a1e400147b99dfcb65934e1924891 | [
"Apache-2.0"
] | 1 | 2022-02-25T02:10:20.000Z | 2022-02-25T02:10:20.000Z | from random import randint, sample
from manticore.core.smtlib import ConstraintSet
from manticore.core.state import State
from manticore.platforms import linux, decree, evm
def make_initial_symbolic_state(binary_path, concrete_data, dist_symb_bytes, rand_symb_bytes):
magic = file(binary_path).read(4)
if magic... | 36.367089 | 102 | 0.677689 |
a9e9b27b27fd6d6a1a8e005dd2caf3bee8fc7618 | 1,134 | py | Python | kattis/circuitmath.py | btjanaka/competitive-programming-solutions | e3df47c18451802b8521ebe61ca71ee348e5ced7 | [
"MIT"
] | 3 | 2020-06-25T21:04:02.000Z | 2021-05-12T03:33:19.000Z | kattis/circuitmath.py | btjanaka/competitive-programming-solutions | e3df47c18451802b8521ebe61ca71ee348e5ced7 | [
"MIT"
] | null | null | null | kattis/circuitmath.py | btjanaka/competitive-programming-solutions | e3df47c18451802b8521ebe61ca71ee348e5ced7 | [
"MIT"
] | 1 | 2020-06-25T21:04:06.000Z | 2020-06-25T21:04:06.000Z | # Author: btjanaka (Bryon Tjanaka)
# Problem: (Kattis) circuitmath
# Title: Circuit Math
# Link: https://open.kattis.com/problems/circuitmath
# Idea: Use a stack to keep track of operators, just like in an RPN calculator.
# Difficulty: easy
# Tags: stack, rpn
n = int(input())
# Map between characters and Boolean valu... | 27 | 79 | 0.565256 |
a0cae9a671807cef84b5818a6d776e60414b3e0d | 1,549 | py | Python | sahara_plugins/plugins/cdh/v5_13_0/versionhandler.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | sahara_plugins/plugins/cdh/v5_13_0/versionhandler.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | sahara_plugins/plugins/cdh/v5_13_0/versionhandler.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Intel Corporation
# Copyright (c) 2015 ISPRAS
#
# 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... | 40.763158 | 69 | 0.778567 |
e470de1c5391a8d9f18e914eb50690b9da66bc2a | 1,836 | py | Python | AlphaCodeServer/accounts/views.py | sheminanto/Alpha-Code | 5e6cebbfcd59300dd1558bcb8f49c40c4dd79759 | [
"MIT"
] | 6 | 2020-06-02T12:41:04.000Z | 2020-09-29T17:50:27.000Z | AlphaCodeServer/accounts/views.py | sheminanto/Alpha-Code | 5e6cebbfcd59300dd1558bcb8f49c40c4dd79759 | [
"MIT"
] | 2 | 2020-11-08T05:28:39.000Z | 2020-12-15T23:58:20.000Z | AlphaCodeServer/accounts/views.py | sheminanto/Alpha-Code | 5e6cebbfcd59300dd1558bcb8f49c40c4dd79759 | [
"MIT"
] | 3 | 2020-05-31T06:14:48.000Z | 2020-11-07T03:06:31.000Z | from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm
from django.shortcuts import render, redirect
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
# from contest.models import Participant
from django.views.decorators.csrf imp... | 41.727273 | 100 | 0.65305 |
c9609f6e9a724756962e31f801529bdf0ef66bd3 | 7,092 | py | Python | utils/setup.py | VITA-Group/PrAC-LTH | c65fd67b06da3e870ac4087d3820ad07a23e1405 | [
"MIT"
] | 18 | 2021-06-07T09:26:18.000Z | 2022-03-31T10:19:56.000Z | utils/setup.py | VITA-Group/PrAC-LTH | c65fd67b06da3e870ac4087d3820ad07a23e1405 | [
"MIT"
] | null | null | null | utils/setup.py | VITA-Group/PrAC-LTH | c65fd67b06da3e870ac4087d3820ad07a23e1405 | [
"MIT"
] | 4 | 2021-06-16T20:56:04.000Z | 2022-03-20T00:31:55.000Z | import copy
import torch
import numpy as np
from dataset import *
from models.vgg import vgg16_bn
from models.resnet import resnet18, resnet50
from models.resnets import resnet20, resnet56
from advertorch.utils import NormalizeByChannelMeanStd
__all__ = ['setup_model_dataset', 'setup_model_dataset_PIE',
... | 34.096154 | 183 | 0.665116 |
504afd0dd2f2ece3116d732d344126ac10101d17 | 57 | py | Python | config.py | ukkdae5/Telegram-bot-Google-Drive | 738d7a464be68e40c3f986b78caba315f42b34bd | [
"MIT"
] | null | null | null | config.py | ukkdae5/Telegram-bot-Google-Drive | 738d7a464be68e40c3f986b78caba315f42b34bd | [
"MIT"
] | null | null | null | config.py | ukkdae5/Telegram-bot-Google-Drive | 738d7a464be68e40c3f986b78caba315f42b34bd | [
"MIT"
] | null | null | null | TOKEN = "1817094534:AAFDPBfqCZhaSrDsp3k0s1VLP1xksnROuJk"
| 28.5 | 56 | 0.877193 |
8c49f647efe7714930dce79dd248aebf8421c70f | 2,410 | py | Python | accounts/forms.py | kritebh/django-blog | 5b3d76e4b41735368169cbd7ef54f32c233160d4 | [
"Apache-2.0"
] | null | null | null | accounts/forms.py | kritebh/django-blog | 5b3d76e4b41735368169cbd7ef54f32c233160d4 | [
"Apache-2.0"
] | null | null | null | accounts/forms.py | kritebh/django-blog | 5b3d76e4b41735368169cbd7ef54f32c233160d4 | [
"Apache-2.0"
] | null | null | null | from django.forms import fields
from accounts.models import Profile
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django import forms
from .models import Profile
from django.contrib.auth.forms import UserCreationForm,UserChangeForm,PasswordChangeForm
from django... | 50.208333 | 128 | 0.723237 |
eec20a61667f8eb0b055192c8cb536da41afcd39 | 3,348 | py | Python | yearn/partners/partners.py | deusfinance/yearn-exporter | 1a4686eef77ce27d735ed9053985d707ea6432a2 | [
"MIT"
] | 1 | 2022-01-11T12:56:45.000Z | 2022-01-11T12:56:45.000Z | yearn/partners/partners.py | deusfinance/yearn-exporter | 1a4686eef77ce27d735ed9053985d707ea6432a2 | [
"MIT"
] | null | null | null | yearn/partners/partners.py | deusfinance/yearn-exporter | 1a4686eef77ce27d735ed9053985d707ea6432a2 | [
"MIT"
] | null | null | null | from yearn.partners.snapshot import Partner, Wrapper
partners = [
Partner(
name='alchemix',
treasury='0x8392F6669292fA56123F71949B52d883aE57e225',
wrappers=[
Wrapper(
name='dai',
vault='0x19D3364A399d251E894aC732651be8B0E4e85001',
... | 32.823529 | 69 | 0.554062 |
b45730c5880bf2dac62ee9ed13282ccaca641435 | 214 | py | Python | src/util/pycaffe_test.py | KAIST-NCL/IDLE | e88aef411ba43a42487202286d743486484f5e17 | [
"BSD-2-Clause"
] | 7 | 2018-11-21T09:19:51.000Z | 2022-01-27T11:55:43.000Z | src/util/pycaffe_test.py | KAIST-NCL/IDLE | e88aef411ba43a42487202286d743486484f5e17 | [
"BSD-2-Clause"
] | null | null | null | src/util/pycaffe_test.py | KAIST-NCL/IDLE | e88aef411ba43a42487202286d743486484f5e17 | [
"BSD-2-Clause"
] | 3 | 2019-03-11T11:10:29.000Z | 2021-04-16T16:07:17.000Z | import caffe
from caffe import layers as L
temp_image, temp_label = L.Data(name='tw', source='/home/ncl/caffe/examples/mnist/mnist_leveldb', batch_size=128, include=dict(phase=caffe.TRAIN), ntop=2, backend=0)
| 42.8 | 166 | 0.757009 |
da113aa4c501abb8ffda3ddffe33bb207d89fd7a | 981 | py | Python | zcls/data/datasets/build.py | likyoo/ZCls | 568621aca3a8b090c93345f0858d52c5757f2f0e | [
"Apache-2.0"
] | 1 | 2021-05-07T12:54:03.000Z | 2021-05-07T12:54:03.000Z | zcls/data/datasets/build.py | likyoo/ZCls | 568621aca3a8b090c93345f0858d52c5757f2f0e | [
"Apache-2.0"
] | null | null | null | zcls/data/datasets/build.py | likyoo/ZCls | 568621aca3a8b090c93345f0858d52c5757f2f0e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@date: 2020/8/22 下午9:21
@file: trainer.py
@author: zj
@description:
"""
from .cifar import CIFAR
from .fashionmnist import FashionMNIST
from .imagenet import ImageNet
def build_dataset(cfg, transform=None, is_train=True, download=True):
dataset_name = cfg.DATASET.NAME
data_dir =... | 31.645161 | 108 | 0.716616 |
94ef32966b5b131e0031a8610b1d97c47024d3f7 | 994 | py | Python | pynet/vision/data/iris.py | akman-wyk/my_alexnet | 868d53048165ce7f083b3b8549e9c969e3adaba8 | [
"Apache-2.0"
] | null | null | null | pynet/vision/data/iris.py | akman-wyk/my_alexnet | 868d53048165ce7f083b3b8549e9c969e3adaba8 | [
"Apache-2.0"
] | null | null | null | pynet/vision/data/iris.py | akman-wyk/my_alexnet | 868d53048165ce7f083b3b8549e9c969e3adaba8 | [
"Apache-2.0"
] | 1 | 2022-03-28T07:23:56.000Z | 2022-03-28T07:23:56.000Z | # -*- coding: utf-8 -*-
# @Time : 19-6-20 下午4:25
# @Author : zj
import pandas as pd
from my_import import np
from sklearn import utils
from sklearn.model_selection import train_test_split
# iris_path = '/home/zj/data/iris-species/Iris.csv'
def load_iris(iris_path, shuffle=True, tsize=0.8):
"""
加载iris数... | 25.487179 | 112 | 0.608652 |
084c04a5fb77adb3f4e33f8ada2ba622d7c377df | 1,377 | py | Python | app/app.py | jeffykle/jeffkelly-dev-flask | 16b523de8f96a5544cd35b46680217cb062b2910 | [
"MIT"
] | null | null | null | app/app.py | jeffykle/jeffkelly-dev-flask | 16b523de8f96a5544cd35b46680217cb062b2910 | [
"MIT"
] | null | null | null | app/app.py | jeffykle/jeffkelly-dev-flask | 16b523de8f96a5544cd35b46680217cb062b2910 | [
"MIT"
] | null | null | null | import hashlib
import hmac
import os
import git
from flask import Flask, render_template, request
app = Flask(__name__)
def is_valid_signature(x_hub_signature, data, private_key):
# x_hub_signature and data are from the webhook payload
# private key is your webhook secret
hash_algorithm, github_signatur... | 27.54 | 68 | 0.691358 |
ec85ef4135addc95fa3025a9dd159a330af23558 | 673 | py | Python | Trakttv.bundle/Contents/Libraries/Shared/plugin/models/migrations/008_plex_basic_credential.py | disrupted/Trakttv.bundle | 24712216c71f3b22fd58cb5dd89dad5bb798ed60 | [
"RSA-MD"
] | 1,346 | 2015-01-01T14:52:24.000Z | 2022-03-28T12:50:48.000Z | Trakttv.bundle/Contents/Libraries/Shared/plugin/models/migrations/008_plex_basic_credential.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 474 | 2015-01-01T10:27:46.000Z | 2022-03-21T12:26:16.000Z | Trakttv.bundle/Contents/Libraries/Shared/plugin/models/migrations/008_plex_basic_credential.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 191 | 2015-01-02T18:27:22.000Z | 2022-03-29T10:49:48.000Z | from exception_wrappers.libraries.playhouse.apsw_ext import *
def migrate(migrator, database):
# PlexBasicCredential
migrator.rename_column('plex.credential.basic', 'token', 'token_plex')
migrator.add_column('plex.credential.basic', 'token_server', CharField(null=True))
#
# Schema specification (for migr... | 28.041667 | 86 | 0.58841 |
268497f786d789c369f56ce3e76a6bd4b48e8d97 | 307 | py | Python | sushi_api/urls.py | sushi-store/server | e72d805df0c5b202b91a474cac36a9abdd48bc43 | [
"MIT"
] | null | null | null | sushi_api/urls.py | sushi-store/server | e72d805df0c5b202b91a474cac36a9abdd48bc43 | [
"MIT"
] | null | null | null | sushi_api/urls.py | sushi-store/server | e72d805df0c5b202b91a474cac36a9abdd48bc43 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'sushi_api'
urlpatterns = [
path('', views.SushiList.as_view()),
path('<int:pk>/', views.SushiDetailId.as_view()),
path('slug/<slug:slug>/', views.SushiDetailSlug.as_view()),
path('categories/', views.CategoryList.as_view()),
]
| 23.615385 | 63 | 0.674267 |
937c4e2d130ca0c2f29745c6469be3bffe850247 | 12,477 | py | Python | initiate.py | ShenoudaGergis/IR-models | 13b16366c1ab824e213425f51965f67e5a246014 | [
"MIT"
] | null | null | null | initiate.py | ShenoudaGergis/IR-models | 13b16366c1ab824e213425f51965f67e5a246014 | [
"MIT"
] | null | null | null | initiate.py | ShenoudaGergis/IR-models | 13b16366c1ab824e213425f51965f67e5a246014 | [
"MIT"
] | null | null | null | from tkinter import Tk , LabelFrame , Frame , Label , Entry , Button , Scrollbar , Text , Menu , ttk;
from tkinter.filedialog import askopenfile;
from tkinter import messagebox as msg;
from model import BooleanModel , InvertedIndex , VectorSpaceModel;
from tools import minePdf , mineSite;
from contractions import fix;
... | 33.450402 | 149 | 0.660976 |
f5a88ebeb28cc3162b304ddd4735738fbbc8e5b5 | 1,831 | py | Python | src/robusta/core/playbooks/common.py | pavangudiwada/robusta | cc1cb8a2e198f404e275a3947cf64e9f700f56f4 | [
"MIT"
] | 273 | 2021-12-28T20:48:48.000Z | 2022-03-31T16:03:13.000Z | src/robusta/core/playbooks/common.py | pavangudiwada/robusta | cc1cb8a2e198f404e275a3947cf64e9f700f56f4 | [
"MIT"
] | 103 | 2022-01-10T11:45:47.000Z | 2022-03-31T16:31:11.000Z | src/robusta/core/playbooks/common.py | pavangudiwada/robusta | cc1cb8a2e198f404e275a3947cf64e9f700f56f4 | [
"MIT"
] | 35 | 2021-12-30T15:30:14.000Z | 2022-03-28T11:43:57.000Z | from typing import Optional
from hikaru.model import EventList, Event
from ..reporting import TableBlock
from ..reporting.custom_rendering import RendererType
from ...integrations.kubernetes.api_client_utils import parse_kubernetes_datetime_to_ms
def get_resource_events_table(table_name: str, kind: str, name: str, n... | 33.290909 | 116 | 0.684872 |
4e6e3574819adc1ddce6003e85de13403b871ecf | 7,256 | py | Python | api_logic_server_cli/project_prototype/api_logic_server_run.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 71 | 2021-01-23T17:34:33.000Z | 2022-03-29T13:11:29.000Z | api_logic_server_cli/project_prototype/api_logic_server_run.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 38 | 2021-01-24T21:56:30.000Z | 2022-03-08T18:49:00.000Z | api_logic_server_cli/project_prototype/api_logic_server_run.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 14 | 2021-01-23T16:20:44.000Z | 2022-03-24T10:48:28.000Z | #!/usr/bin/env python3
"""
ApiLogicServer v api_logic_server_version
Created on api_logic_server_created_on
$ python3 api_logic_server_run.py [Listener-IP]
This will run on http://Listener-Ip:5000
"""
import os
import sys
if len(sys.argv) > 1 and sys.argv[1].__contains__("help"):
print("")
print("AP... | 35.743842 | 115 | 0.703969 |
6ed4e2ac1be96fb05e7b40f30f807acd9a049708 | 412 | py | Python | socket_interface/socketer.py | ArtisticZhao/udp | 1a2a65d0a3a714de8f94e81d5e524a37224e5bca | [
"MIT"
] | 1 | 2022-02-08T06:14:24.000Z | 2022-02-08T06:14:24.000Z | src/outdoor_navi/src/socketer.py | HST94/SLAM | 257b9baf49c9f53a220b9f6aa349a76a22d39528 | [
"MIT"
] | null | null | null | src/outdoor_navi/src/socketer.py | HST94/SLAM | 257b9baf49c9f53a220b9f6aa349a76a22d39528 | [
"MIT"
] | null | null | null | # coding:utf-8
from socket import socket, AF_INET, SOCK_DGRAM
class socket_sender(object):
def __init__(self, addr, port):
self.sock = socket(AF_INET, SOCK_DGRAM)
self.addr = addr
self.port = port
def send_data(self, data):
self.sock.sendto(data, (self.addr, self.port))
if _... | 22.888889 | 54 | 0.650485 |
35cacd70bb072f2e3fd42fd5b10854228c689543 | 9,228 | py | Python | touvlo/nnet/sgl_parm.py | Benardi/ml_algorithms | 95661123a33a6da330bd236fbc6f52f925439429 | [
"MIT"
] | 18 | 2019-10-03T00:57:53.000Z | 2021-11-08T09:00:14.000Z | touvlo/nnet/sgl_parm.py | Benardi/touvlo | 95661123a33a6da330bd236fbc6f52f925439429 | [
"MIT"
] | 29 | 2019-10-03T17:53:02.000Z | 2019-12-30T23:53:08.000Z | touvlo/nnet/sgl_parm.py | Benardi/touvlo | 95661123a33a6da330bd236fbc6f52f925439429 | [
"MIT"
] | 22 | 2019-10-03T11:48:35.000Z | 2021-11-26T12:41:18.000Z | """
.. module:: sgl_parm
:synopsis: Provides routines to construct a Single Parameter based
Classification Neural Network.
.. moduleauthor:: Benardi Nunes <benardinunes@gmail.com>
"""
from math import sqrt
from numpy.random import uniform
from numpy import (float64, ones, append, sum, dot, log,
... | 34.304833 | 79 | 0.63795 |
bb5871c5f603657c4995a1cac9bb13617015eec5 | 15,412 | py | Python | python/services/assuredworkloads/alpha/workload.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | python/services/assuredworkloads/alpha/workload.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | python/services/assuredworkloads/alpha/workload.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 37.682152 | 96 | 0.689528 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.