hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bed94396a482917e16322543e53b9186da1d4c36 | 931 | py | Python | examples/enforce_branch.py | Deca-Technologies/cargo-parse | 2263f55f40adc22f797fb7514818753e84dc5887 | [
"MIT"
] | 1 | 2021-12-10T18:22:57.000Z | 2021-12-10T18:22:57.000Z | examples/enforce_branch.py | Deca-Technologies/cargo-parse | 2263f55f40adc22f797fb7514818753e84dc5887 | [
"MIT"
] | null | null | null | examples/enforce_branch.py | Deca-Technologies/cargo-parse | 2263f55f40adc22f797fb7514818753e84dc5887 | [
"MIT"
] | null | null | null | """
Example script to demonstrate the usefulness of `cargo-parse`.
In this script, which could run as a GitHub Action, we assert that all Git
dependencies in `Cargo.toml` are using the `master` branch. This check could
run whenever a PR targets the `master` branch.
"""
from pathlib import Path
from cargo_parse impor... | 32.103448 | 78 | 0.685285 |
03d1d0f1e56ce38b0df28a6d4f5b602f61b33052 | 470 | py | Python | src/aiomongoengine/fields/dict_field.py | wangjiancn/aiomongoengine | d73e576e0d564b6f741bbc00cadd5285e44d30f9 | [
"MIT"
] | 6 | 2020-02-09T03:13:20.000Z | 2021-05-25T07:03:16.000Z | src/aiomongoengine/fields/dict_field.py | wangjiancn/aiomongoengine | d73e576e0d564b6f741bbc00cadd5285e44d30f9 | [
"MIT"
] | null | null | null | src/aiomongoengine/fields/dict_field.py | wangjiancn/aiomongoengine | d73e576e0d564b6f741bbc00cadd5285e44d30f9 | [
"MIT"
] | null | null | null | from .base_field import BaseField
class DictField(BaseField):
""" Field responsible for storing dict objects. """
def validate(self, value):
if not isinstance(value, dict):
self.error("StringField only accepts dict values.")
def is_empty(self, value) -> bool:
return value is ... | 26.111111 | 63 | 0.625532 |
00f402297c3b4da78b868c1d41419e2e9e489fa5 | 7,696 | py | Python | kratos/tests/test_function_parser_utility.py | hbayraktaroglu/Kratos | 6b71869ca7adb36a798e0cb11b34287fdc482590 | [
"BSD-4-Clause"
] | null | null | null | kratos/tests/test_function_parser_utility.py | hbayraktaroglu/Kratos | 6b71869ca7adb36a798e0cb11b34287fdc482590 | [
"BSD-4-Clause"
] | null | null | null | kratos/tests/test_function_parser_utility.py | hbayraktaroglu/Kratos | 6b71869ca7adb36a798e0cb11b34287fdc482590 | [
"BSD-4-Clause"
] | null | null | null | import KratosMultiphysics.KratosUnittest as KratosUnittest
import KratosMultiphysics as KM
import math
import os
import sys
def GetFilePath(fileName):
return os.path.join(os.path.dirname(os.path.realpath(__file__)), fileName)
class TestGenericFunctionUtility(KratosUnittest.TestCase):
def test_GenericFunctio... | 42.755556 | 232 | 0.652547 |
7deef52697006affcb92053ef90382c42d0f4898 | 1,923 | py | Python | sdxdatamodel/parsing/linkhandler.py | atlanticwave-sdx/datamodel | f0ca36d45525b37b25357842744b0c300e9246b4 | [
"MIT"
] | null | null | null | sdxdatamodel/parsing/linkhandler.py | atlanticwave-sdx/datamodel | f0ca36d45525b37b25357842744b0c300e9246b4 | [
"MIT"
] | 6 | 2021-07-20T16:15:48.000Z | 2021-10-14T13:51:46.000Z | sdxdatamodel/parsing/linkhandler.py | atlanticwave-sdx/datamodel | f0ca36d45525b37b25357842744b0c300e9246b4 | [
"MIT"
] | null | null | null | import json
from sdxdatamodel.models.link import Link
from .exceptions import MissingAttributeException
class LinkHandler():
""""
Handler for parsing the connection request descritpion in json
"""
def __init__(self):
super().__init__()
self.link = None
def import_link_data(self,... | 35.611111 | 134 | 0.592304 |
58c448a8a36ff18c978dead8021d0bd8df14ada2 | 3,172 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SMHoleMag/PHoleM53/Gen_PHoleM53.py | helene-t/pyleecan | 8362de9b0e32b346051b38192e07f3a6974ea9aa | [
"Apache-2.0"
] | 1 | 2021-02-26T12:28:45.000Z | 2021-02-26T12:28:45.000Z | GUI/Dialog/DMachineSetup/SMHoleMag/PHoleM53/Gen_PHoleM53.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | null | null | null | GUI/Dialog/DMachineSetup/SMHoleMag/PHoleM53/Gen_PHoleM53.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""File generated according to PHoleM53/gen_list.json
WARNING! All changes made in this file will be lost!
"""
from pyleecan.GUI.Dialog.DMachineSetup.SMHoleMag.PHoleM53.Ui_PHoleM53 import Ui_PHoleM53
class Gen_PHoleM53(Ui_PHoleM53):
def setupUi(self, PHoleM53):
"""Abstract class t... | 31.405941 | 88 | 0.600252 |
cb942f6553951b93431cc830d90d85bc87e96cfd | 7,449 | py | Python | mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py | fengyouliang/wheat_detection | d056123426a1260c29b486cbb8e44a88a0a3c5bc | [
"Apache-2.0"
] | null | null | null | mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py | fengyouliang/wheat_detection | d056123426a1260c29b486cbb8e44a88a0a3c5bc | [
"Apache-2.0"
] | null | null | null | mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py | fengyouliang/wheat_detection | d056123426a1260c29b486cbb8e44a88a0a3c5bc | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from ..builder import BBOX_CODERS
from .base_bbox_coder import BaseBBoxCoder
@BBOX_CODERS.register_module()
class LegacyDeltaXYWHBBoxCoder(BaseBBoxCoder):
"""Legacy Delta XYWH BBox coder used in MMDet V1.x
Following the practice in R-CNN [1]_, this coder encodes bb... | 39.205263 | 80 | 0.534703 |
c7759dca474e5d1aeb4740ecd875244a1cbfc513 | 3,476 | py | Python | filter.py | navin-bhaskar/GuitarTuner_EdisonGalileo | 20e31da5f1b395e8405a19f670644b4a2d909ecd | [
"BSD-2-Clause"
] | null | null | null | filter.py | navin-bhaskar/GuitarTuner_EdisonGalileo | 20e31da5f1b395e8405a19f670644b4a2d909ecd | [
"BSD-2-Clause"
] | null | null | null | filter.py | navin-bhaskar/GuitarTuner_EdisonGalileo | 20e31da5f1b395e8405a19f670644b4a2d909ecd | [
"BSD-2-Clause"
] | 1 | 2020-03-17T05:54:20.000Z | 2020-03-17T05:54:20.000Z | #!/usr/bin/env python
from scipy import signal
"""
This script generates the c function template for a given cuttof
frequency. Note that this script will use butterworth filter to
generate the differnce equations.
"""
# Define your filter parameters here
Fs = 44100 # Sampling frequency in Hz
Fc = 8000 ... | 22 | 82 | 0.564442 |
69544afab18defc139311bea075a73e30a48249d | 3,163 | py | Python | word_language_model/generate.py | manna/pytorch-examples | 659e11ac42fe46ea09bcaf8424ed5404fae7407d | [
"BSD-3-Clause"
] | null | null | null | word_language_model/generate.py | manna/pytorch-examples | 659e11ac42fe46ea09bcaf8424ed5404fae7407d | [
"BSD-3-Clause"
] | null | null | null | word_language_model/generate.py | manna/pytorch-examples | 659e11ac42fe46ea09bcaf8424ed5404fae7407d | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# Language Modeling on Penn Tree Bank
#
# This file generates new sentences sampled from the language model
#
###############################################################################
import argparse
import torch
from torch.autograd... | 38.573171 | 124 | 0.606386 |
5afb3c1cdcb33f01f49d9b9751845396ec41aa76 | 87 | py | Python | tests/periodicities/Second/Cycle_Second_1600_S_5.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/periodicities/Second/Cycle_Second_1600_S_5.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/periodicities/Second/Cycle_Second_1600_S_5.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.periodicities.period_test as per
per.buildModel((5 , 'S' , 1600));
| 17.4 | 50 | 0.724138 |
6b9a2af2893514a1813cbe2dfb590a11af5b04e0 | 689 | py | Python | src/wellsfargo/templatetags/wfrs_filters.py | thelabnyc/django-oscar-wfrs | 9abd4ecbdafd597407fdf60657103cb5d29c4c8b | [
"0BSD"
] | 1 | 2021-02-08T05:54:56.000Z | 2021-02-08T05:54:56.000Z | src/wellsfargo/templatetags/wfrs_filters.py | thelabnyc/django-oscar-wfrs | 9abd4ecbdafd597407fdf60657103cb5d29c4c8b | [
"0BSD"
] | 24 | 2019-12-04T21:37:01.000Z | 2022-03-11T23:16:20.000Z | src/wellsfargo/templatetags/wfrs_filters.py | thelabnyc/django-oscar-wfrs | 9abd4ecbdafd597407fdf60657103cb5d29c4c8b | [
"0BSD"
] | 2 | 2016-05-31T10:02:35.000Z | 2016-12-19T11:29:37.000Z | from django.utils.translation import ugettext as _
from django import template
import pytz
register = template.Library()
@register.filter(name="timeat")
def timeat(value):
try:
return _("%(years)s years, %(months)s months") % dict(
years=int(value[2:]), months=int(value[:2])
)
ex... | 22.225806 | 62 | 0.66328 |
db71a7c87f0878c7a4975f501b0574afdd082384 | 530 | py | Python | example_project/testapp/tests.py | lincolnloop/django-activity-stream | b1b4884624fab982b35fbcbd28ed321d12e3d054 | [
"BSD-3-Clause"
] | null | null | null | example_project/testapp/tests.py | lincolnloop/django-activity-stream | b1b4884624fab982b35fbcbd28ed321d12e3d054 | [
"BSD-3-Clause"
] | null | null | null | example_project/testapp/tests.py | lincolnloop/django-activity-stream | b1b4884624fab982b35fbcbd28ed321d12e3d054 | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime
from django.test import TestCase
from django.contrib.auth.models import User
from actstream.models import Action
from actstream.signals import action
class TestAppTests(TestCase):
def setUp(self):
self.user = User.objects.create(username='test')
action.send(self.use... | 31.176471 | 89 | 0.732075 |
f45cd58c3abf6095cc23977e04ce5a1f9a6f2d03 | 14,054 | py | Python | example.py | fdkz/libcopengl | e796abd7d8cede5b5f7aff92b815bd2b6f29b1da | [
"MIT"
] | null | null | null | example.py | fdkz/libcopengl | e796abd7d8cede5b5f7aff92b815bd2b6f29b1da | [
"MIT"
] | null | null | null | example.py | fdkz/libcopengl | e796abd7d8cede5b5f7aff92b815bd2b6f29b1da | [
"MIT"
] | 1 | 2021-12-14T11:32:20.000Z | 2021-12-14T11:32:20.000Z | import logging
logg = logging.getLogger(__name__)
if __name__ == "__main__":
logging.basicConfig(level=logging.NOTSET, format="%(asctime)s %(name)s %(levelname)-5s: %(message)s")
import sys
import time
import math
import random
import ctypes
from sdl2 import *
# uncomment these to use pyopengl
#from OpenGL.GL impor... | 27.395712 | 129 | 0.636118 |
5a47fb075db191bc26a3f88ceb30acf3f7f8420c | 1,334 | py | Python | splitwise/picture.py | aayaffe/splitwise | 477e0477bea9fc74693669c68431fe5ea0b08ef3 | [
"MIT"
] | 105 | 2016-08-01T02:46:49.000Z | 2022-02-11T21:08:48.000Z | splitwise/picture.py | aayaffe/splitwise | 477e0477bea9fc74693669c68431fe5ea0b08ef3 | [
"MIT"
] | 47 | 2016-08-27T05:09:52.000Z | 2022-03-20T06:30:46.000Z | splitwise/picture.py | aayaffe/splitwise | 477e0477bea9fc74693669c68431fe5ea0b08ef3 | [
"MIT"
] | 43 | 2016-08-15T18:50:58.000Z | 2022-03-27T19:45:03.000Z | class Picture(object):
""" Profile picture of the user.
Attributes:
small(str, optional): Link to small size picture
medium(str, optional): Link to medium size picture
large(str, optional): Link to large size picture
"""
def __init__(self, data=None):
"""
Args:... | 26.68 | 82 | 0.532234 |
dcace7933866c4c8afa23c4b0e9e0f6e6b4c0fac | 36,817 | py | Python | sdk/python/pulumi_libvirt/outputs.py | pulumi/pulumi-libvirt | 0a190bfea0981aff9e4bc0e1bfa91ee16c54bb38 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2021-04-29T14:33:35.000Z | 2022-03-31T21:59:48.000Z | sdk/python/pulumi_libvirt/outputs.py | pulumi/pulumi-libvirt | 0a190bfea0981aff9e4bc0e1bfa91ee16c54bb38 | [
"ECL-2.0",
"Apache-2.0"
] | 28 | 2021-08-15T07:46:26.000Z | 2022-03-31T15:30:59.000Z | sdk/python/pulumi_libvirt/outputs.py | pulumi/pulumi-libvirt | 0a190bfea0981aff9e4bc0e1bfa91ee16c54bb38 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-12-17T23:11:19.000Z | 2021-12-17T23:11:19.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 34.153061 | 147 | 0.604422 |
b80c67f324021a48a1067013612fc07c23a75fa8 | 10,851 | py | Python | research/astronet/astronet/ops/dataset_ops.py | kopankom/models | 3f78f4cfd21c786c62bf321c07830071027ebb5e | [
"Apache-2.0"
] | 5 | 2018-04-03T15:54:54.000Z | 2020-02-01T08:19:38.000Z | research/astronet/astronet/ops/dataset_ops.py | kopankom/models | 3f78f4cfd21c786c62bf321c07830071027ebb5e | [
"Apache-2.0"
] | 1 | 2021-03-31T19:32:00.000Z | 2021-03-31T19:32:00.000Z | research/astronet/astronet/ops/dataset_ops.py | kopankom/models | 3f78f4cfd21c786c62bf321c07830071027ebb5e | [
"Apache-2.0"
] | 3 | 2018-04-27T15:37:08.000Z | 2021-12-06T12:00:53.000Z | # Copyright 2018 The TensorFlow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 37.808362 | 80 | 0.70611 |
5789496a8ac6fb61595bc6316ec1ded1d17e600e | 9,020 | py | Python | tests/test_utils_check_copies.py | uunal/adapter-transformers | 73a95a75f803e8fd243fc3d55ff3a9d557891377 | [
"Apache-2.0"
] | 723 | 2020-07-16T13:02:25.000Z | 2022-03-31T21:03:55.000Z | tests/test_utils_check_copies.py | uunal/adapter-transformers | 73a95a75f803e8fd243fc3d55ff3a9d557891377 | [
"Apache-2.0"
] | 170 | 2020-07-16T14:39:11.000Z | 2022-03-31T13:02:11.000Z | tests/test_utils_check_copies.py | uunal/adapter-transformers | 73a95a75f803e8fd243fc3d55ff3a9d557891377 | [
"Apache-2.0"
] | 131 | 2020-07-16T14:38:16.000Z | 2022-03-29T19:43:18.000Z | # Copyright 2020 The HuggingFace Team. 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 applicabl... | 61.780822 | 1,434 | 0.729601 |
cfd8f61e110768742cbc25d98e9a940cb421373f | 1,682 | py | Python | test/system/bench/cloudstone1/cloudstone1.py | 24601/accumulo | b32dd4906a83c065cdbd54df2c600a9e92f584af | [
"BSD-3-Clause"
] | null | null | null | test/system/bench/cloudstone1/cloudstone1.py | 24601/accumulo | b32dd4906a83c065cdbd54df2c600a9e92f584af | [
"BSD-3-Clause"
] | null | null | null | test/system/bench/cloudstone1/cloudstone1.py | 24601/accumulo | b32dd4906a83c065cdbd54df2c600a9e92f584af | [
"BSD-3-Clause"
] | 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 use ... | 37.377778 | 96 | 0.69679 |
e29a97d9f4db08f2e846450c7cba04a1d951a0a4 | 14,733 | py | Python | WebBrickGateway/WebBrickGateway/Media.py | AndyThirtover/wb_gateway | 69f9c870369085f4440033201e2fb263a463a523 | [
"BSD-3-Clause"
] | null | null | null | WebBrickGateway/WebBrickGateway/Media.py | AndyThirtover/wb_gateway | 69f9c870369085f4440033201e2fb263a463a523 | [
"BSD-3-Clause"
] | null | null | null | WebBrickGateway/WebBrickGateway/Media.py | AndyThirtover/wb_gateway | 69f9c870369085f4440033201e2fb263a463a523 | [
"BSD-3-Clause"
] | null | null | null | # Copyright L.P.Klyne 2013
# Licenced under 3 clause BSD licence
# $Id: Media.py 3138 2009-04-15 10:17:29Z philipp.schuster $
import sys, logging, string
from urlparse import urlparse, urljoin
from urllib import unquote, quote
import turbogears
import cherrypy
import ClientProfiles
from EventLib.Event im... | 35.673123 | 137 | 0.594923 |
d99d055e5010e28bd0adae4347e9ea5800041f33 | 10,544 | py | Python | deps/v8/tools/test-wrapper-gypbuild.py | racker/node | 7338d9b66ee8b15aeb38d0bb3f03861f2458b10b | [
"BSD-2-Clause"
] | 5 | 2015-05-03T23:44:46.000Z | 2020-01-04T22:20:56.000Z | deps/v8/tools/test-wrapper-gypbuild.py | trojanspike/node | 2d0011f53256e7a1a707a6672772d36260f81691 | [
"BSD-2-Clause"
] | null | null | null | deps/v8/tools/test-wrapper-gypbuild.py | trojanspike/node | 2d0011f53256e7a1a707a6672772d36260f81691 | [
"BSD-2-Clause"
] | 1 | 2020-04-14T16:40:28.000Z | 2020-04-14T16:40:28.000Z | #!/usr/bin/env python
#
# Copyright 2012 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# noti... | 39.639098 | 102 | 0.638657 |
aff7ad795d84b58d719703f2d3322affb0aab5f8 | 9,522 | py | Python | grr/checks/services_test.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | grr/checks/services_test.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | grr/checks/services_test.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for service state checks."""
from grr.lib import flags
from grr.lib import test_lib
from grr.lib.checks import checks_test_lib
from grr.lib.rdfvalues import client as rdf_client
from grr.parsers import linux_service_parser
from grr.parsers import linux_service_par... | 38.865306 | 80 | 0.584016 |
84986dba79fc0c9f5b7e05abdc15e14e487abe70 | 3,377 | py | Python | REST_vs_AMQP/REST/DefaultHTTPRequestHandler.py | James-Chapman/python-code-snippets | 9d3678055dc0d9ef2d5f10da6673477e64ba7b48 | [
"BSD-2-Clause"
] | null | null | null | REST_vs_AMQP/REST/DefaultHTTPRequestHandler.py | James-Chapman/python-code-snippets | 9d3678055dc0d9ef2d5f10da6673477e64ba7b48 | [
"BSD-2-Clause"
] | null | null | null | REST_vs_AMQP/REST/DefaultHTTPRequestHandler.py | James-Chapman/python-code-snippets | 9d3678055dc0d9ef2d5f10da6673477e64ba7b48 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#===============================================================================
# Author : J.Chapman
# License : BSD
# Date : 4 August 2013
# Description : Python 3 Default HTTP Request Handler
#===============================================================================
imp... | 29.884956 | 102 | 0.561149 |
1988a925da1ac98ecdee2533ec29863a23d6c060 | 905 | py | Python | allennlp/data/fields/__init__.py | tianjianjiang/allennlp | 0839f5c263911ec5ff04a2ebe575493c7e0436ef | [
"Apache-2.0"
] | 2 | 2019-12-03T20:04:56.000Z | 2021-03-29T10:38:06.000Z | allennlp/data/fields/__init__.py | tianjianjiang/allennlp | 0839f5c263911ec5ff04a2ebe575493c7e0436ef | [
"Apache-2.0"
] | 5 | 2021-05-03T14:40:33.000Z | 2021-05-03T14:40:34.000Z | allennlp/data/fields/__init__.py | tianjianjiang/allennlp | 0839f5c263911ec5ff04a2ebe575493c7e0436ef | [
"Apache-2.0"
] | 2 | 2019-12-21T05:58:44.000Z | 2021-08-16T07:41:21.000Z | """
A :class:`~allennlp.data.fields.field.Field` is some piece of data instance
that ends up as an array in a model.
"""
from allennlp.data.fields.field import Field
from allennlp.data.fields.array_field import ArrayField
from allennlp.data.fields.adjacency_field import AdjacencyField
from allennlp.data.fields.index_f... | 47.631579 | 80 | 0.859669 |
18de46a67e368cc641ee87ec1bd201dd0ecb8e0a | 4,164 | py | Python | lib/squidlog.py | mnot/squidpeek | 9479f4791f56ffe3d3465b6d515c802b9c6cb1a1 | [
"Unlicense"
] | 2 | 2016-02-04T07:34:32.000Z | 2016-04-03T19:58:09.000Z | lib/squidlog.py | mnot/squidpeek | 9479f4791f56ffe3d3465b6d515c802b9c6cb1a1 | [
"Unlicense"
] | null | null | null | lib/squidlog.py | mnot/squidpeek | 9479f4791f56ffe3d3465b6d515c802b9c6cb1a1 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
'''
Squid Web proxy cache log parsing classes.
'''
# (c) 1998-2007 Copyright Mark Nottingham
# <mnot@pobox.com>
#
# This software may be freely distributed, modified and used,
# provided that this copyright notice remain intact.
#
# This software is provided 'as is' without warranty of any kin... | 28.326531 | 102 | 0.513929 |
d50ef794e919c65ee51955b99bc1bb9db1a2eea4 | 1,958 | py | Python | algotrader/trading/subscription.py | alexcwyu/python-trading | a494f602411a3ebfdecae002a16a5ea93fc7a046 | [
"Apache-2.0"
] | 17 | 2016-03-30T21:52:30.000Z | 2021-05-01T18:21:48.000Z | algotrader/trading/subscription.py | ajmal017/python-trading | a494f602411a3ebfdecae002a16a5ea93fc7a046 | [
"Apache-2.0"
] | 2 | 2016-10-04T19:29:05.000Z | 2017-02-01T19:24:39.000Z | algotrader/trading/subscription.py | ajmal017/python-trading | a494f602411a3ebfdecae002a16a5ea93fc7a046 | [
"Apache-2.0"
] | 9 | 2016-04-24T05:05:26.000Z | 2020-05-03T13:01:34.000Z | from algotrader.model.market_data_pb2 import MarketDataSubscriptionRequest
from algotrader.model.model_factory import ModelFactory
from algotrader.utils.market_data import get_subscription_type, get_bar_size, get_bar_type
class MarketDataSubscriber(object):
def subscript_market_data(self, feed, instruments, subsc... | 65.266667 | 120 | 0.533197 |
b45fde003be43a9cd530f2545f36a3fa7bdb7ed1 | 2,411 | py | Python | exercise5.py | regsevillasibal/FTW3_Webscrapping | ed64cd866858e612e3a99f9144e6967c687e057f | [
"Apache-2.0"
] | null | null | null | exercise5.py | regsevillasibal/FTW3_Webscrapping | ed64cd866858e612e3a99f9144e6967c687e057f | [
"Apache-2.0"
] | null | null | null | exercise5.py | regsevillasibal/FTW3_Webscrapping | ed64cd866858e612e3a99f9144e6967c687e057f | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
import os
import pymysql
conn = pymysql.connect(host='127.0.0.1',u... | 34.942029 | 142 | 0.685193 |
39d7f09f68fd7f6a6c5fe1af6ef7c2ed4bb2fc10 | 4,011 | py | Python | plato/clients/simple.py | iQua/plato | 76fdac06af8b4d85922cd12749b4a687e3161745 | [
"Apache-2.0"
] | null | null | null | plato/clients/simple.py | iQua/plato | 76fdac06af8b4d85922cd12749b4a687e3161745 | [
"Apache-2.0"
] | null | null | null | plato/clients/simple.py | iQua/plato | 76fdac06af8b4d85922cd12749b4a687e3161745 | [
"Apache-2.0"
] | 1 | 2021-05-18T15:03:32.000Z | 2021-05-18T15:03:32.000Z | """
A basic federated learning client who sends weight updates to the server.
"""
import logging
import time
from dataclasses import dataclass
from plato.algorithms import registry as algorithms_registry
from plato.config import Config
from plato.datasources import registry as datasources_registry
from plato.samplers... | 34.878261 | 83 | 0.665171 |
6e634f814e10c50d15e1259dc87340997f502b49 | 34,155 | py | Python | virtual/lib/python3.6/site-packages/pip/_vendor/requests/models.py | EugeneZnm/LEVELS | 21874a7585b559795d49b3334e7bb9907af7888a | [
"Unlicense"
] | null | null | null | virtual/lib/python3.6/site-packages/pip/_vendor/requests/models.py | EugeneZnm/LEVELS | 21874a7585b559795d49b3334e7bb9907af7888a | [
"Unlicense"
] | 4 | 2020-06-05T19:28:58.000Z | 2021-09-08T00:33:00.000Z | virtual/lib/python3.6/site-packages/pip/_vendor/requests/models.py | EugeneZnm/LEVELS | 21874a7585b559795d49b3334e7bb9907af7888a | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import datetime
import sys
# Import encoding now, to avoid implicit import later.
# Implicit import within threads may cause LookupError when standard library is in a ZIP,
# such as in Embed... | 35.839454 | 119 | 0.59312 |
af7d671e295ab2a8935288375e10a9cc64e567dc | 4,940 | py | Python | heat_integrationtests/functional/test_software_config.py | maestro-hybrid-cloud/heat | 91a4bb3170bd81b1c67a896706851e55709c9b5a | [
"Apache-2.0"
] | null | null | null | heat_integrationtests/functional/test_software_config.py | maestro-hybrid-cloud/heat | 91a4bb3170bd81b1c67a896706851e55709c9b5a | [
"Apache-2.0"
] | null | null | null | heat_integrationtests/functional/test_software_config.py | maestro-hybrid-cloud/heat | 91a4bb3170bd81b1c67a896706851e55709c9b5a | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 33.378378 | 78 | 0.637045 |
606f6e8d8255af7dd2d10cd0f1a51655719e2c7a | 31,751 | py | Python | lib/cvsdb.py | infamous19/viewvc | b54b7f9cd64b25ff5d95389fe15d510600218f22 | [
"BSD-2-Clause"
] | null | null | null | lib/cvsdb.py | infamous19/viewvc | b54b7f9cd64b25ff5d95389fe15d510600218f22 | [
"BSD-2-Clause"
] | null | null | null | lib/cvsdb.py | infamous19/viewvc | b54b7f9cd64b25ff5d95389fe15d510600218f22 | [
"BSD-2-Clause"
] | null | null | null | # -*-python-*-
#
# Copyright (C) 1999-2020 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit h... | 32.201826 | 79 | 0.565998 |
5f1710116d618a1f2c843a26b2cfab775e662153 | 515 | py | Python | SearchAPI/CMR/Health.py | asfadmin/Discovery-SearchAPI | d5e0b3d3a6a74c7f243ddc74a2316cd7b7380edd | [
"BSD-3-Clause"
] | null | null | null | SearchAPI/CMR/Health.py | asfadmin/Discovery-SearchAPI | d5e0b3d3a6a74c7f243ddc74a2316cd7b7380edd | [
"BSD-3-Clause"
] | null | null | null | SearchAPI/CMR/Health.py | asfadmin/Discovery-SearchAPI | d5e0b3d3a6a74c7f243ddc74a2316cd7b7380edd | [
"BSD-3-Clause"
] | null | null | null | import requests
import logging
import json
from SearchAPI.asf_env import get_config
def get_cmr_health():
cfg = get_config()
try:
r = requests.get(cfg['cmr_base'] + cfg['cmr_health'], timeout=10)
d = {'host': cfg['cmr_base'], 'health': json.loads(r.text)}
except Exception as e:
logg... | 30.294118 | 91 | 0.603883 |
de160c5607417762d7f9b804b462182469cb1b31 | 449 | py | Python | creme/ensemble/__init__.py | Raul9595/creme | 39cec7ac27ccd40ff0a7bdd6bceaf7ce25c1a8da | [
"BSD-3-Clause"
] | 1 | 2020-07-27T03:06:46.000Z | 2020-07-27T03:06:46.000Z | creme/ensemble/__init__.py | 2torus/creme | bcc5e2a0155663a1f0ba779c68f23456695bcb54 | [
"BSD-3-Clause"
] | 1 | 2022-02-10T06:24:42.000Z | 2022-02-10T06:24:42.000Z | creme/ensemble/__init__.py | igorol/creme | 60977c4accfdca08cfd76a162095ff738ef87281 | [
"BSD-3-Clause"
] | 1 | 2021-04-16T08:27:14.000Z | 2021-04-16T08:27:14.000Z | """
A module for ensemble learning.
"""
from .bagging import BaggingClassifier
from .bagging import BaggingRegressor
from .grouping import GroupRegressor
from .hedging import HedgeBinaryClassifier
from .hedging import HedgeRegressor
from .stacking import StackingBinaryClassifier
__all__ = [
'BaggingClassifier',
... | 22.45 | 46 | 0.777283 |
695526854b3bdc830a9a9b1e14624a183c8db031 | 1,269 | py | Python | modules/face_morphs/face_finder.py | GrzegorzKrug/face_morph | 64e5e47207d30ac8968a0b1b73e11a8ae74b3fec | [
"Apache-2.0"
] | null | null | null | modules/face_morphs/face_finder.py | GrzegorzKrug/face_morph | 64e5e47207d30ac8968a0b1b73e11a8ae74b3fec | [
"Apache-2.0"
] | null | null | null | modules/face_morphs/face_finder.py | GrzegorzKrug/face_morph | 64e5e47207d30ac8968a0b1b73e11a8ae74b3fec | [
"Apache-2.0"
] | null | null | null | import numpy as np
import glob
import cv2
import os
eye_cascade = cv2.CascadeClassifier("haarcascade_eye.xml")
face_cascade = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
avatars = glob.glob("avatars/*png")
avatars.sort()
export_dir = "exports"
face_count = 0
MAX_SIZE = 256
os.makedirs(export_dir, exi... | 28.2 | 76 | 0.651694 |
417dd3e9f81bfa959c226606727b4d97df184ef0 | 4,798 | py | Python | tests/unittests/services/utils/test_db.py | hackaugusto/scenario-player | 0701bb986f47e1ec4a4fb7a469157826da1993e2 | [
"MIT"
] | null | null | null | tests/unittests/services/utils/test_db.py | hackaugusto/scenario-player | 0701bb986f47e1ec4a4fb7a469157826da1993e2 | [
"MIT"
] | null | null | null | tests/unittests/services/utils/test_db.py | hackaugusto/scenario-player | 0701bb986f47e1ec4a4fb7a469157826da1993e2 | [
"MIT"
] | null | null | null | import json
from unittest import mock
import pytest
from scenario_player.services.utils.factories import construct_flask_app
from scenario_player.services.utils.db import JSONRedis
from scenario_player.exceptions.db import CorruptedDBEntry
db_import_path = 'scenario_player.services.utils.db'
@pytest.fixture
def a... | 48.464646 | 153 | 0.708003 |
04a6dff3f9df32462662b508919ebd8776d83ce5 | 447 | py | Python | 30 Days of Code/Day 17 More Exceptions/Solution.py | iamnambiar/HackerRank-Solutions | 6fdcab79b18e66a6d7278b979a8be087f8f6c696 | [
"MIT"
] | 2 | 2020-04-06T10:32:08.000Z | 2021-04-23T04:32:45.000Z | 30 Days of Code/Day 17 More Exceptions/Solution.py | iamnambiar/HackerRank-Solutions | 6fdcab79b18e66a6d7278b979a8be087f8f6c696 | [
"MIT"
] | null | null | null | 30 Days of Code/Day 17 More Exceptions/Solution.py | iamnambiar/HackerRank-Solutions | 6fdcab79b18e66a6d7278b979a8be087f8f6c696 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/30-more-exceptions/problem
#Write your code here
class Calculator:
def power(self, n, p):
if n<0 or p<0:
raise Exception("n and p should be non-negative")
return n**p
myCalculator=Calculator()
T=int(input())
for i in range(T):
n,p = map(int, ... | 24.833333 | 66 | 0.608501 |
282bef162a1e3575d46faa964f5eb67bf834654a | 6,956 | py | Python | mazegame/mazegame2.py | kantel/pygamezero | 93c202a2bd5bcc827eabe952575b7714b36e4b9d | [
"MIT"
] | 1 | 2020-06-29T00:36:07.000Z | 2020-06-29T00:36:07.000Z | mazegame/mazegame2.py | kantel/pygamezero | 93c202a2bd5bcc827eabe952575b7714b36e4b9d | [
"MIT"
] | null | null | null | mazegame/mazegame2.py | kantel/pygamezero | 93c202a2bd5bcc827eabe952575b7714b36e4b9d | [
"MIT"
] | null | null | null | # Simple Maze Game with Pygame Zero (v 1.2) , Python 3
# Stage 2 (Objektorientierung)
# Assets: DawnLike-Tileset (CC BY 4.0) by DawnBringer und DragonDePlatino
# (https://opengameart.org/content/dawnlike-16x16-universal-rogue-like-tileset-v181)
# Jörg Kantel 2022 (MIT-Lizenz)
import pgzrun
# WIDTH: 25 Tiles á 16 Pix... | 35.671795 | 89 | 0.502156 |
dc8a2fdf395d3f8c44d35ad89a5b0b3e05b5b6b9 | 19,904 | py | Python | pywaffle/waffle.py | tweakimp/PyWaffle | 8c5611221e27f941dd1539147127d73fc6575c64 | [
"MIT"
] | null | null | null | pywaffle/waffle.py | tweakimp/PyWaffle | 8c5611221e27f941dd1539147127d73fc6575c64 | [
"MIT"
] | null | null | null | pywaffle/waffle.py | tweakimp/PyWaffle | 8c5611221e27f941dd1539147127d73fc6575c64 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*-coding: utf-8 -*-
from matplotlib.pyplot import cm
from matplotlib.figure import Figure
from matplotlib.patches import Rectangle, Patch
import matplotlib.font_manager as fm
from matplotlib.text import Text
from matplotlib.legend_handler import HandlerBase
import copy
import os
import font
from i... | 40.537678 | 143 | 0.600834 |
0b4850c4686e6283e180dd8204017aaedd1c4634 | 9,096 | py | Python | nnsvs/bin/synthesis.py | r9y9/dnnsvs | b028f76fd4f081859ec99a2034e0e0dc8ce1a409 | [
"MIT"
] | 72 | 2020-04-19T16:14:09.000Z | 2020-05-02T04:02:05.000Z | nnsvs/bin/synthesis.py | r9y9/dnnsvs | b028f76fd4f081859ec99a2034e0e0dc8ce1a409 | [
"MIT"
] | 1 | 2020-04-19T16:28:03.000Z | 2020-05-02T13:49:13.000Z | nnsvs/bin/synthesis.py | r9y9/dnnsvs | b028f76fd4f081859ec99a2034e0e0dc8ce1a409 | [
"MIT"
] | 3 | 2020-04-20T02:34:31.000Z | 2020-04-26T01:04:35.000Z | import os
from os.path import exists, join
import hydra
import joblib
import numpy as np
import pysptk
import pyworld
import torch
from hydra.utils import to_absolute_path
from nnmnkwii.io import hts
from nnmnkwii.postfilters import merlin_post_filter
from nnsvs.gen import (
gen_spsvs_static_features,
gen_worl... | 31.915789 | 88 | 0.645119 |
0ed88cc85dc69ea210a47756ab3eb4c478e9882e | 1,497 | py | Python | api/addresses/migrations/0002_auto_20200326_1420.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | null | null | null | api/addresses/migrations/0002_auto_20200326_1420.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | null | null | null | api/addresses/migrations/0002_auto_20200326_1420.py | django-doctor/lite-api | 1ba278ba22ebcbb977dd7c31dd3701151cd036bf | [
"MIT"
] | null | null | null | # Generated by Django 2.2.11 on 2020-03-26 14:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("addresses", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="address",
name="address",
... | 33.266667 | 113 | 0.585838 |
be7ccf7dcce0254ee4c379415b2784bd6fc85edc | 357 | py | Python | mayan/apps/documents/tests/base.py | sophiawa/Mayan-EDMS | 42f20576d0c690b645a60bf53c5169cda4264231 | [
"Apache-2.0"
] | null | null | null | mayan/apps/documents/tests/base.py | sophiawa/Mayan-EDMS | 42f20576d0c690b645a60bf53c5169cda4264231 | [
"Apache-2.0"
] | 10 | 2021-03-19T23:48:12.000Z | 2022-03-12T00:41:49.000Z | mayan/apps/documents/tests/base.py | sophiawa/Mayan-EDMS | 42f20576d0c690b645a60bf53c5169cda4264231 | [
"Apache-2.0"
] | 1 | 2020-12-17T02:35:09.000Z | 2020-12-17T02:35:09.000Z | from mayan.apps.common.tests.base import BaseTestCase, GenericViewTestCase
from .mixins import DocumentTestMixin
class GenericDocumentTestCase(DocumentTestMixin, BaseTestCase):
"""Base test case when testing models or classes"""
class GenericDocumentViewTestCase(DocumentTestMixin, GenericViewTestCase):
"""... | 29.75 | 74 | 0.809524 |
205434e509ff3c8a8b9e92e31c8d11260d548367 | 897 | py | Python | open-hackathon/src/hackathon/admin/admin_mgr.py | Fendoe/LABOSS | 7f90e4627196ada7caf235115c0cc6fbd183c379 | [
"Apache-2.0"
] | null | null | null | open-hackathon/src/hackathon/admin/admin_mgr.py | Fendoe/LABOSS | 7f90e4627196ada7caf235115c0cc6fbd183c379 | [
"Apache-2.0"
] | null | null | null | open-hackathon/src/hackathon/admin/admin_mgr.py | Fendoe/LABOSS | 7f90e4627196ada7caf235115c0cc6fbd183c379 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append("..")
from hackathon.database.models import *
from hackathon.log import log
from hackathon.database import db_adapter
from datetime import datetime, timedelta
from hackathon.constants import HTTP_HEADER
from flask import request, g
class AdminManager(object):
def __init__(self, db_ad... | 24.243243 | 73 | 0.690078 |
d6b7dbaf5e43b0d5b627baca1d0c2f6cadbbc9ce | 10,078 | py | Python | model_pytorch.py | sohuren/pytorch-openai-transformer-lm | 55ba4d78407ae12c7454dc8f3342f476be3dece5 | [
"MIT"
] | 1 | 2018-07-08T19:18:44.000Z | 2018-07-08T19:18:44.000Z | model_pytorch.py | sohuren/pytorch-openai-transformer-lm | 55ba4d78407ae12c7454dc8f3342f476be3dece5 | [
"MIT"
] | null | null | null | model_pytorch.py | sohuren/pytorch-openai-transformer-lm | 55ba4d78407ae12c7454dc8f3342f476be3dece5 | [
"MIT"
] | null | null | null | import copy
import json
import math
import re
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
def gelu(x):
return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3))))
def swish(x):
return x * tor... | 32.827362 | 117 | 0.583052 |
21d82f22a9d26170891ff7c50f456ea5e5870f65 | 2,455 | py | Python | .history/src/data/data_20191018132944.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191018132944.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191018132944.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | import pandas as pd
from typing import Union
from pathlib import Path
from nameparser import HumanName
class ExtractData:
title_translator = {
"Mlle.": "Mrs.",
"Mme.": "Mrs.",
"Sir.": "Mr.",
"Ms.": "Mrs.",
"": "Mr.",
"Col.": "Mr.",
"Capt.": "Mr.",
"... | 26.978022 | 114 | 0.524644 |
3666c993ff811cb5f245c2bc6e0c20a84885f945 | 6,082 | py | Python | CheckSubscription.py | SaiVikhyath/FitnessGarage | e345d295e13f6ba307d324203c9c62e7ea2f79e7 | [
"MIT"
] | 1 | 2021-12-20T21:00:07.000Z | 2021-12-20T21:00:07.000Z | CheckSubscription.py | SaiVikhyath/FitnessGarage | e345d295e13f6ba307d324203c9c62e7ea2f79e7 | [
"MIT"
] | null | null | null | CheckSubscription.py | SaiVikhyath/FitnessGarage | e345d295e13f6ba307d324203c9c62e7ea2f79e7 | [
"MIT"
] | null | null | null | import psycopg2
import smtplib
import logging
import datetime
import requests
import json
from dateutil.relativedelta import relativedelta
SERVER = "smtp.gmail.com"
PORT = 587
FROM = "fitnessgaragehyd@gmail.com"
SUBJECT = "GYM SUBSCRIPTION ENDING"
smsURL = "https://www.fast2sms.com/dev/bulkV2"
numbersList = ""
aboutT... | 41.37415 | 214 | 0.603256 |
b2790878b2079935af79aebec00dc82ff33bb3eb | 6,378 | py | Python | platform/gsutil/gslib/addlhelp/command_opts.py | IsaacHuang/google-cloud-sdk | 52afa5d1a75dff08f4f5380c5cccc015bf796ca5 | [
"Apache-2.0"
] | null | null | null | platform/gsutil/gslib/addlhelp/command_opts.py | IsaacHuang/google-cloud-sdk | 52afa5d1a75dff08f4f5380c5cccc015bf796ca5 | [
"Apache-2.0"
] | null | null | null | platform/gsutil/gslib/addlhelp/command_opts.py | IsaacHuang/google-cloud-sdk | 52afa5d1a75dff08f4f5380c5cccc015bf796ca5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 44.915493 | 80 | 0.657259 |
86a112eaa41860f75b974e7275f9eea83ca37199 | 2,414 | py | Python | corescrape/proxy/proxy.py | anewmanvs/corescrape | 3162f7f29ca2fe1786a28e05864c3099a7a19ae0 | [
"MIT"
] | null | null | null | corescrape/proxy/proxy.py | anewmanvs/corescrape | 3162f7f29ca2fe1786a28e05864c3099a7a19ae0 | [
"MIT"
] | null | null | null | corescrape/proxy/proxy.py | anewmanvs/corescrape | 3162f7f29ca2fe1786a28e05864c3099a7a19ae0 | [
"MIT"
] | null | null | null | """
Proxy
IMPORTANT:
* Make sure you ALWAYS use ELITE proxies, otherwise you are exposed
"""
# pylint: disable=invalid-name, too-many-instance-attributes
from core.exceptions import CoreScrapeInvalidProxy
class Proxy:
"""Defines a proxy and its useful methods"""
def __init__(self, address):
"""Cons... | 24.383838 | 81 | 0.600249 |
101e13aa6d0f1dd3929809231f4c1322759ccbd8 | 2,102 | py | Python | demo_joystick01.py | svdmaar/pygame_demos | 8fb599134ba9db7c833a53fdc152ef0784f6c4b9 | [
"MIT"
] | null | null | null | demo_joystick01.py | svdmaar/pygame_demos | 8fb599134ba9db7c833a53fdc152ef0784f6c4b9 | [
"MIT"
] | null | null | null | demo_joystick01.py | svdmaar/pygame_demos | 8fb599134ba9db7c833a53fdc152ef0784f6c4b9 | [
"MIT"
] | null | null | null | import Demo
import pygame
# https://www.pygame.org/docs/ref/joystick.html
# TODO: "hats"
class Demo_Joystick01(Demo.Demo):
def setup(self, screen):
super().setup(screen)
self.joystickCount = pygame.joystick.get_count()
defaultFontName = pygame.font.get_default_font()
fontSize = 30
... | 41.215686 | 113 | 0.620837 |
075a96e3e1cafb4f4ce71ec323a328a775945e80 | 5,840 | py | Python | src/graficos/graficar_vecinos_10_a_100.py | ilebrero/Metodos-TP2 | e44a6538cfec5eb16b294cd2371870c265dba451 | [
"MIT"
] | null | null | null | src/graficos/graficar_vecinos_10_a_100.py | ilebrero/Metodos-TP2 | e44a6538cfec5eb16b294cd2371870c265dba451 | [
"MIT"
] | null | null | null | src/graficos/graficar_vecinos_10_a_100.py | ilebrero/Metodos-TP2 | e44a6538cfec5eb16b294cd2371870c265dba451 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from math import log
y_f1 = []
y_f1_promedio = []
y_hitrate = []
y_hitrate_promedio = []
y_recalls = []
y_recalls_promedio_iteracion = []
y_recalls_promedio_clase = []
y_precision = []
y_precision_promedio_iteracion = ... | 25.955556 | 119 | 0.702226 |
8c09c9d4e928a8018caea654581182fda804df43 | 3,548 | py | Python | cride/circles/admin.py | blueleus/cride | 8723fc9eeda540b8b7b377270479bc4ae2969ad5 | [
"MIT"
] | null | null | null | cride/circles/admin.py | blueleus/cride | 8723fc9eeda540b8b7b377270479bc4ae2969ad5 | [
"MIT"
] | null | null | null | cride/circles/admin.py | blueleus/cride | 8723fc9eeda540b8b7b377270479bc4ae2969ad5 | [
"MIT"
] | null | null | null | """Circle models admin."""
# Django
from django.contrib import admin
from django.http import HttpResponse
# Models
from cride.circles.models import Circle
from cride.rides.models import Ride
# Forms
from .forms import UploadFileForm
# Utilities
# Utilities
import csv
from django.utils import timezone
from datetime ... | 29.566667 | 110 | 0.610203 |
6f7e365a4d32d5ec9d122d369fd1cf9fed9d671e | 6,398 | py | Python | configs/detr/detr_r50_4x16_5e_output_heads_only.py | colinski/mmdetection | c1526855590c33886c52f8651dad86a32c0f38fd | [
"Apache-2.0"
] | null | null | null | configs/detr/detr_r50_4x16_5e_output_heads_only.py | colinski/mmdetection | c1526855590c33886c52f8651dad86a32c0f38fd | [
"Apache-2.0"
] | null | null | null | configs/detr/detr_r50_4x16_5e_output_heads_only.py | colinski/mmdetection | c1526855590c33886c52f8651dad86a32c0f38fd | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py'
]
#import os
#checkpoint = '%s/checkpoints/detr_r50_8x2_150e_coco_no_output_heads.pth' % os.environ['WORK']
#checkpoint = '/work/mvadera_umass_edu/checkpoints/detr_r50_8x2_150e_coco_no_output_heads.pth'
checkpoint = '/work/csamplaws... | 39.012195 | 97 | 0.527352 |
30d656ad469e17fbcc09ac5b61fb35bd1ab10514 | 5,574 | py | Python | tests/dot11/test_FrameManagementDisassociation.py | S3bastian/impacket | 6da655ca9ac4f9c2a207ea47e79d089044accd78 | [
"Apache-1.1"
] | 23 | 2020-02-21T02:44:21.000Z | 2022-03-03T23:40:32.000Z | tests/dot11/test_FrameManagementDisassociation.py | cipher9rat/impacket | 142cacb649b8c6441df9330ac22fe4d15a0d1bbc | [
"Apache-1.1"
] | null | null | null | tests/dot11/test_FrameManagementDisassociation.py | cipher9rat/impacket | 142cacb649b8c6441df9330ac22fe4d15a0d1bbc | [
"Apache-1.1"
] | 21 | 2021-06-29T23:14:54.000Z | 2022-03-24T13:13:58.000Z | #!/usr/bin/env python
# sorry, this is very ugly, but I'm in python 2.5
import sys
sys.path.insert(0,"../..")
from impacket.dot11 import Dot11Types
from impacket.ImpactDecoder import RadioTapDecoder
import unittest
from six import PY2
class TestDot11ManagementDisassociationFrames(unittest.TestCase):
def setUp(se... | 42.549618 | 257 | 0.690527 |
838fd1a86ffe51d69bfad262ca4dd73cd1660324 | 22,567 | py | Python | scenic/projects/mbt/datasets/audiovisual_tfrecord_dataset.py | techthiyanes/scenic | 05585b1189364e29d82413b9d4a50ffa8c246f0c | [
"Apache-2.0"
] | null | null | null | scenic/projects/mbt/datasets/audiovisual_tfrecord_dataset.py | techthiyanes/scenic | 05585b1189364e29d82413b9d4a50ffa8c246f0c | [
"Apache-2.0"
] | null | null | null | scenic/projects/mbt/datasets/audiovisual_tfrecord_dataset.py | techthiyanes/scenic | 05585b1189364e29d82413b9d4a50ffa8c246f0c | [
"Apache-2.0"
] | null | null | null | """TFRecords data-loader for audiovisual datasets."""
import functools
from typing import Dict, Iterator, List, Optional, Text, Tuple, Union
from absl import logging
from dmvr import modalities as load_modalities
from flax import jax_utils
import jax
import jax.numpy as jnp
import ml_collections
import numpy as np
fro... | 41.559853 | 84 | 0.679488 |
613ff0d284b7b4fd287b982c6c03d0da800fb217 | 1,671 | py | Python | server/model/tilemap.py | jpsachse/megajules3000 | 26ae071cf6456e96d042eaa2239cbaa65113f903 | [
"CC-BY-3.0",
"CC-BY-4.0"
] | null | null | null | server/model/tilemap.py | jpsachse/megajules3000 | 26ae071cf6456e96d042eaa2239cbaa65113f903 | [
"CC-BY-3.0",
"CC-BY-4.0"
] | null | null | null | server/model/tilemap.py | jpsachse/megajules3000 | 26ae071cf6456e96d042eaa2239cbaa65113f903 | [
"CC-BY-3.0",
"CC-BY-4.0"
] | null | null | null | from tile import Tile, SIZE as tile_size
from PIL import Image
class TileMap():
def __init__(self, width, height, name="No Name", startX = -1, startY = -1, entity="Jules_Verne"):
self.name = name
self.entity = entity
self.matrix = list()
self.actions = list()
self.generate_... | 37.977273 | 102 | 0.564333 |
89d141018b6eba227a583b418bdcc23a95a2495e | 1,853 | py | Python | tests_old/test_api/test_view/test_modelAliases.py | appukuttan-shailesh/hbp-validation-framework | 852cf57ad664aa6d7ba8f2551153b62a342e7727 | [
"Apache-2.0"
] | 5 | 2020-11-25T08:26:20.000Z | 2022-02-04T18:56:34.000Z | tests_old/test_api/test_view/test_modelAliases.py | HumanBrainProject/hbp-validation-framework | 975c5311539ec0b8ac1db1be1a1006e6f847fa78 | [
"Apache-2.0"
] | 146 | 2018-03-23T10:09:55.000Z | 2022-01-03T10:51:00.000Z | tests_old/test_api/test_view/test_modelAliases.py | appukuttan-shailesh/hbp-validation-framework | 852cf57ad664aa6d7ba8f2551153b62a342e7727 | [
"Apache-2.0"
] | 8 | 2018-03-20T14:07:05.000Z | 2020-07-23T10:11:42.000Z | """
Tests of the ValidationFramework TestsView.
"""
from test_base import *
class ModelAliasesTest(TestCase):
@classmethod
def setUpTestData(cls):
cls.data = DataForTests()
def setUp(self):
#Setup run before every test method.
pass
def test_get_no_param (self):
... | 33.690909 | 131 | 0.658931 |
2c324cda23adbb7ee62688675fbc0114ab9575b2 | 1,754 | py | Python | src/MS-C2/c2_evaluation/c2ev/testbase/aaa.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 300 | 2019-01-28T07:37:53.000Z | 2022-03-09T02:17:28.000Z | src/MS-C2/c2_evaluation/c2ev/testbase/aaa.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 15 | 2019-04-22T14:23:01.000Z | 2021-11-24T09:52:32.000Z | src/MS-C2/c2_evaluation/c2ev/testbase/aaa.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 67 | 2019-01-29T05:42:09.000Z | 2021-12-28T11:09:44.000Z | import scipy.io as sio
import numpy as np
import matplotlib.pyplot as plt
gndTruth = list(sio.loadmat('noveltest.mat')['label'])
lblist = list(sio.loadmat('base1.mat')['label'])
predresult = []
prednum = np.array(sio.loadmat('novel1testresrdcp2.mat')['data'])[0]
scr = np.array(sio.loadmat('novel1testr... | 23.702703 | 69 | 0.63512 |
d3734d0ff090072286066e28a24700088c620859 | 184 | py | Python | PyMOTW/source/os/os_exec_example.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2019-01-04T05:47:50.000Z | 2019-01-04T05:47:50.000Z | PyMOTW/source/os/os_exec_example.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2020-07-18T03:52:03.000Z | 2020-07-18T04:18:01.000Z | PyMOTW/source/os/os_exec_example.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 2 | 2021-03-06T04:28:32.000Z | 2021-03-06T04:59:17.000Z | #!/usr/bin/env python3
"""Using os.exec*().
"""
#end_pymotw_header
import os
child_pid = os.fork()
if child_pid:
os.waitpid(child_pid, 0)
else:
os.execlp('pwd', 'pwd', '-P')
| 14.153846 | 33 | 0.630435 |
ed072b01a86a33d6ff8c32739da6539343044321 | 17,303 | py | Python | Lib/site-packages/pip/_vendor/urllib3/poolmanager.py | ldepaula3/TextAnalyticsApp | cd87f2017cf301266a82355d4c781de67b9c6ac9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/pip/_vendor/urllib3/poolmanager.py | ldepaula3/TextAnalyticsApp | cd87f2017cf301266a82355d4c781de67b9c6ac9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/pip/_vendor/urllib3/poolmanager.py | ldepaula3/TextAnalyticsApp | cd87f2017cf301266a82355d4c781de67b9c6ac9 | [
"bzip2-1.0.6"
] | null | null | null | from __future__ import absolute_import
import collections
import functools
import logging
from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from .connectionpool import port_by_scheme
from .exceptions import LocationValueError, MaxRetryError, Pro... | 38.365854 | 93 | 0.626886 |
8c4792a378b1ddb48550ec9e599160ffe40c7742 | 23,991 | py | Python | ipet/evaluation/IPETFilter.py | 1hoen/ipet | e4135ff936d3aa447a960d854f9c51554e5ba7dc | [
"MIT"
] | 14 | 2016-12-20T06:49:32.000Z | 2021-05-12T11:17:27.000Z | ipet/evaluation/IPETFilter.py | 1hoen/ipet | e4135ff936d3aa447a960d854f9c51554e5ba7dc | [
"MIT"
] | 69 | 2016-12-15T16:37:27.000Z | 2021-08-16T10:12:36.000Z | ipet/evaluation/IPETFilter.py | 1hoen/ipet | e4135ff936d3aa447a960d854f9c51554e5ba7dc | [
"MIT"
] | 11 | 2016-12-30T07:46:18.000Z | 2021-10-09T02:34:45.000Z | """
The MIT License (MIT)
Copyright (c) 2018 Zuse Institute Berlin, www.zib.de
Permissions are granted as stated in the license file you have obtained
with this software. If you find the library useful for your purpose,
please refer to README.md for how to cite IPET.
@author: Gregor Hendel
"""
import xml.etree.Eleme... | 32.909465 | 187 | 0.605852 |
cec70524cb9b90ca20f49ec70b6193209fc3e3fb | 184 | py | Python | turtle/exemplo turtle.py | LC-ardovino/INFNET | 3c485f122820f549f6a3c315fe09a537411bea7c | [
"MIT"
] | null | null | null | turtle/exemplo turtle.py | LC-ardovino/INFNET | 3c485f122820f549f6a3c315fe09a537411bea7c | [
"MIT"
] | null | null | null | turtle/exemplo turtle.py | LC-ardovino/INFNET | 3c485f122820f549f6a3c315fe09a537411bea7c | [
"MIT"
] | 1 | 2022-03-31T11:47:02.000Z | 2022-03-31T11:47:02.000Z | import turtle
turtle.title("Bem vindo ao curso de desenvolvimento python!")
turtle.shape("turtle")
distancia = int(input("Digite a distância da tartaruga:"))
turtle.forward(distancia) | 30.666667 | 61 | 0.782609 |
1c28da05f18750e69a4499fd9b9574f15d267cee | 1,726 | py | Python | src/primaires/objet/types/clef.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/objet/types/clef.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/objet/types/clef.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# l... | 41.095238 | 79 | 0.75956 |
cc44f245ecfa52f04753837ac46d0c1dfdd6c373 | 9,368 | py | Python | drone/8_facedtect_webcamera/36_face_detect/droneapp/models/drone_manager.py | onselaydin/pytry | 314aa50b6f8535e275dc8a2edd0c21637fb5a745 | [
"Apache-2.0"
] | null | null | null | drone/8_facedtect_webcamera/36_face_detect/droneapp/models/drone_manager.py | onselaydin/pytry | 314aa50b6f8535e275dc8a2edd0c21637fb5a745 | [
"Apache-2.0"
] | null | null | null | drone/8_facedtect_webcamera/36_face_detect/droneapp/models/drone_manager.py | onselaydin/pytry | 314aa50b6f8535e275dc8a2edd0c21637fb5a745 | [
"Apache-2.0"
] | null | null | null | import logging
import contextlib
import os
import socket
import subprocess
import threading
import time
import cv2 as cv
import numpy as np
from droneapp.models.base import Singleton
logger = logging.getLogger(__name__)
DEFAULT_DISTANCE = 0.30
DEFAULT_SPEED = 10
DEFAULT_DEGREE = 10
FRAME_X = int(960/3)
FRAME_Y = i... | 32.19244 | 79 | 0.568638 |
2608581b7e83b8558c298c7d0b6b338364685ede | 712 | py | Python | qac/test/test_storage.py | jantrienes/ecir2019-qac | 7d6dea5af85fc97d115cbf804365e04c8eed1111 | [
"MIT"
] | 11 | 2019-03-06T06:49:10.000Z | 2020-01-16T06:53:54.000Z | qac/test/test_storage.py | jantrienes/ecir2019-qac | 7d6dea5af85fc97d115cbf804365e04c8eed1111 | [
"MIT"
] | null | null | null | qac/test/test_storage.py | jantrienes/ecir2019-qac | 7d6dea5af85fc97d115cbf804365e04c8eed1111 | [
"MIT"
] | 3 | 2019-04-26T06:49:20.000Z | 2020-06-05T12:35:02.000Z | # pylint: disable=protected-access
from qac.storage import base
class TestStorage(object):
storage = base.Storage(db='stackexchange_test')
@classmethod
def setup_class(cls):
cls.storage._db['users'].delete_many({})
@classmethod
def teardown_class(cls):
cls.storage._db['users'].de... | 26.37037 | 75 | 0.622191 |
980f174acd23503df9eca5d886065699d610a75c | 24,199 | py | Python | kubespec/openshift/console/v1.py | machinezone/kubespec | 0d493d8d834643968d7c852c561e6c634c8c1556 | [
"BSD-3-Clause"
] | 7 | 2019-10-22T14:21:16.000Z | 2021-03-18T15:57:41.000Z | kubespec/openshift/console/v1.py | machinezone/kubespec | 0d493d8d834643968d7c852c561e6c634c8c1556 | [
"BSD-3-Clause"
] | null | null | null | kubespec/openshift/console/v1.py | machinezone/kubespec | 0d493d8d834643968d7c852c561e6c634c8c1556 | [
"BSD-3-Clause"
] | null | null | null | # Code is generated: DO NOT EDIT
# Copyright 2019 Machine Zone, Inc. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from kubespec import context
from kubespec import types
from kubespec.k8s import base
from kubespec.k8s.meta import v1 as met... | 33.103967 | 160 | 0.620356 |
bf89f791a5068233a584dbf1f3f6bd57faa9490b | 3,781 | py | Python | citeproc/frontend.py | phfaist/citeproc-py | 3748be5bb945e5d7e47579a619dd49a1f039f075 | [
"BSD-2-Clause-FreeBSD"
] | 84 | 2015-01-03T15:06:06.000Z | 2022-02-12T09:57:41.000Z | citeproc/frontend.py | phfaist/citeproc-py | 3748be5bb945e5d7e47579a619dd49a1f039f075 | [
"BSD-2-Clause-FreeBSD"
] | 96 | 2015-01-16T14:57:47.000Z | 2022-02-25T13:47:09.000Z | citeproc/frontend.py | phfaist/citeproc-py | 3748be5bb945e5d7e47579a619dd49a1f039f075 | [
"BSD-2-Clause-FreeBSD"
] | 37 | 2015-01-28T21:55:56.000Z | 2021-11-15T02:12:40.000Z |
import os
from warnings import warn
from lxml import etree
from . import SCHEMA_PATH, LOCALES_PATH, STYLES_PATH
from .model import CitationStylesElement
from .formatter import html
class CitationStylesXML(object):
def __init__(self, f, validate=True):
lookup = etree.ElementNamespaceClassLookup()
... | 37.068627 | 85 | 0.626025 |
f96af9a0c348f9f4aa9dbd7d04c1359ad1322266 | 15,360 | py | Python | adnc/model/mann.py | carusyte/ADNC | 4a5dfa5be1aca9f815794c2c276ec220a1eb591d | [
"Apache-2.0"
] | 62 | 2018-07-05T13:55:13.000Z | 2019-01-03T15:58:07.000Z | adnc/model/mann.py | carusyte/ADNC | 4a5dfa5be1aca9f815794c2c276ec220a1eb591d | [
"Apache-2.0"
] | 1 | 2018-12-26T18:59:32.000Z | 2019-01-02T15:32:40.000Z | adnc/model/mann.py | carusyte/ADNC | 4a5dfa5be1aca9f815794c2c276ec220a1eb591d | [
"Apache-2.0"
] | 8 | 2019-02-03T03:14:54.000Z | 2020-07-17T22:33:41.000Z | # Copyright 2018 Jörg Franke
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 44.651163 | 120 | 0.618685 |
c4f6ab7acce5ccebaffba5ca96bedf61f289e3f8 | 1,033 | py | Python | kitsune/search/v2/signals/wiki.py | anthonymark33/kitsune | 488a690ca63db0217dc9f3ede88b78db257699a3 | [
"BSD-3-Clause"
] | 1 | 2020-12-14T09:51:32.000Z | 2020-12-14T09:51:32.000Z | kitsune/search/v2/signals/wiki.py | anthonymark33/kitsune | 488a690ca63db0217dc9f3ede88b78db257699a3 | [
"BSD-3-Clause"
] | null | null | null | kitsune/search/v2/signals/wiki.py | anthonymark33/kitsune | 488a690ca63db0217dc9f3ede88b78db257699a3 | [
"BSD-3-Clause"
] | null | null | null | from django.db.models.signals import post_save, m2m_changed, post_delete
from kitsune.search.v2.es7_utils import (
index_object,
delete_object,
remove_from_field,
)
from kitsune.search.v2.decorators import search_receiver
from kitsune.wiki.models import Document
from kitsune.products.models import Product, ... | 32.28125 | 72 | 0.802517 |
0b66da63babd20bf57e7991cebcff1e6e75a2ddc | 13,958 | py | Python | src/sqlfluff/dialects/exasol_keywords.py | netlify/sqlfluff | 6f22eb08a0701f41132ee4847ddf1a64ca79da80 | [
"MIT"
] | 2 | 2021-08-04T08:58:33.000Z | 2021-08-04T18:54:06.000Z | src/sqlfluff/dialects/exasol_keywords.py | netlify/sqlfluff | 6f22eb08a0701f41132ee4847ddf1a64ca79da80 | [
"MIT"
] | 1 | 2020-04-02T09:05:39.000Z | 2020-12-10T14:42:59.000Z | src/sqlfluff/dialects/exasol_keywords.py | netlify/sqlfluff | 6f22eb08a0701f41132ee4847ddf1a64ca79da80 | [
"MIT"
] | 1 | 2021-07-03T12:56:56.000Z | 2021-07-03T12:56:56.000Z | """A list of all SQL key words."""
RESERVED_KEYWORDS = [
"ABSOLUTE",
"ACTION",
"ADD",
"AFTER",
"ALL",
"ALLOCATE",
"ALTER",
"AND",
"ANY",
"APPEND",
"ARE",
"ARRAY",
"AS",
"ASC",
"ASENSITIVE",
"ASSERTION",
"AT",
"ATTRIBUTE",
"AUTHID",
"AUTHOR... | 15.970252 | 68 | 0.502221 |
c7ed458a812f289003ac710bd37482747e3b2ae9 | 1,001 | py | Python | main.py | guard-project/lcp | 1e003bde5323325aaab9b72912481661808fc33b | [
"MIT"
] | 1 | 2020-05-14T00:32:44.000Z | 2020-05-14T00:32:44.000Z | main.py | guard-project/lcp | 1e003bde5323325aaab9b72912481661808fc33b | [
"MIT"
] | 6 | 2020-10-30T12:08:16.000Z | 2021-07-04T14:21:51.000Z | main.py | guard-project/lcp | 1e003bde5323325aaab9b72912481661808fc33b | [
"MIT"
] | 3 | 2020-11-07T12:45:25.000Z | 2021-02-10T09:59:52.000Z | import os
Import_Error = ImportError
path = os.path.abspath(__file__)
dir_path = os.path.dirname(path)
os.chdir(dir_path)
import waitress # noqa: E402
from rich import pretty, traceback # noqa: E402
from rich.console import Console # noqa: E402
from rich.panel import Panel # noqa: E402
pretty.install()
traceback... | 29.441176 | 69 | 0.712288 |
44d43b16fd6b9b02b6cc3ebc93a719bad47192f1 | 9,670 | py | Python | neutron/tests/unit/objects/test_common_types.py | brandonlogan/neutron | 57364544aa8b0e7cd9d73550f287bcad574ba08c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/objects/test_common_types.py | brandonlogan/neutron | 57364544aa8b0e7cd9d73550f287bcad574ba08c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/objects/test_common_types.py | brandonlogan/neutron | 57364544aa8b0e7cd9d73550f287bcad574ba08c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 OpenStack Foundation
# 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... | 40.124481 | 79 | 0.646329 |
1a9c2c04bf12b2920e934f51b349c02c17433afc | 408 | py | Python | pyripple/__init__.py | nkgilley/python-ripple-api | 180af1cee5f7a71e6ee0c0e854ff21c77bed5704 | [
"MIT"
] | 1 | 2017-07-05T08:56:27.000Z | 2017-07-05T08:56:27.000Z | pyripple/__init__.py | nkgilley/python-ripple-api | 180af1cee5f7a71e6ee0c0e854ff21c77bed5704 | [
"MIT"
] | null | null | null | pyripple/__init__.py | nkgilley/python-ripple-api | 180af1cee5f7a71e6ee0c0e854ff21c77bed5704 | [
"MIT"
] | null | null | null | """Python API for using ripple.com."""
import requests
BASE_URL = 'https://data.ripple.com/v2/accounts/'
def get_balance(address):
req_url = BASE_URL + address + '/balances'
response = requests.get(req_url)
if response.status_code == 200 and response.json().get('result'):
if response.json().get('r... | 34 | 69 | 0.656863 |
98eb7edeb67ec2b893c06821d9b57395d56cfe2c | 11,192 | py | Python | main/ncmagics/worldmap.py | RyosukeDTomita/gcmPlot | 430f8af353daf464b5c5566f1c163d5bef63f584 | [
"MIT"
] | null | null | null | main/ncmagics/worldmap.py | RyosukeDTomita/gcmPlot | 430f8af353daf464b5c5566f1c163d5bef63f584 | [
"MIT"
] | null | null | null | main/ncmagics/worldmap.py | RyosukeDTomita/gcmPlot | 430f8af353daf464b5c5566f1c163d5bef63f584 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Name: japanmap.py
Plot japan map using cartopy.
Usage: This is the module.
Author: Ryosuke Tomita
Date: 2021/09/08
"""
from typing import Union
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
from matplotlib... | 33.812689 | 121 | 0.498302 |
347c25efe562e0fa3c64395004c7a36d953a7c9d | 862 | py | Python | onlinecourse/urls.py | pavloteyfel/ibm-online-course-app | f167839bad82fc270f4a192b94dd38ac7bd287b6 | [
"Apache-2.0"
] | null | null | null | onlinecourse/urls.py | pavloteyfel/ibm-online-course-app | f167839bad82fc270f4a192b94dd38ac7bd287b6 | [
"Apache-2.0"
] | null | null | null | onlinecourse/urls.py | pavloteyfel/ibm-online-course-app | f167839bad82fc270f4a192b94dd38ac7bd287b6 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
from . import views
app_name = "onlinecourse"
urlpatterns = [
path(route="", view=views.CourseListView.as_view(), name="index"),
path("registration/", views.registration_request, name="registration"),
... | 39.181818 | 79 | 0.700696 |
493c8d6743bf833fbb115e451642d9eab4bd6de2 | 958 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure/cognitiveservices/formrecognizer/models/keys_result_py3.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure/cognitiveservices/formrecognizer/models/keys_result_py3.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure/cognitiveservices/formrecognizer/models/keys_result_py3.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 31.933333 | 76 | 0.574113 |
1368954bc60e065630359696cf32a7b91d3495c4 | 7,778 | py | Python | yt_dlp/extractor/adultswim.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 11 | 2022-01-06T22:09:50.000Z | 2022-03-12T22:26:22.000Z | yt_dlp/extractor/adultswim.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 4 | 2022-02-25T08:20:18.000Z | 2022-03-17T16:16:20.000Z | yt_dlp/extractor/adultswim.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 3 | 2022-02-19T08:59:13.000Z | 2022-03-06T16:11:21.000Z | import json
from .turner import TurnerBaseIE
from ..utils import (
determine_ext,
float_or_none,
int_or_none,
mimetype2ext,
parse_age_limit,
parse_iso8601,
strip_or_none,
try_get,
)
class AdultSwimIE(TurnerBaseIE):
_VALID_URL = r'https?://(?:www\.)?adultswim\.com/videos/(?P<show_p... | 39.085427 | 249 | 0.521599 |
c47ce68f5c0901a7506193083fcd50148ff15cf1 | 42,501 | py | Python | reana_cluster/backends/kubernetes/k8s.py | BenGalewsky/reana-cluster | b631360d92886b760d56d47686774537aa4b1db5 | [
"MIT"
] | 1 | 2019-06-27T01:21:02.000Z | 2019-06-27T01:21:02.000Z | reana_cluster/backends/kubernetes/k8s.py | BenGalewsky/reana-cluster | b631360d92886b760d56d47686774537aa4b1db5 | [
"MIT"
] | null | null | null | reana_cluster/backends/kubernetes/k8s.py | BenGalewsky/reana-cluster | b631360d92886b760d56d47686774537aa4b1db5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2017, 2018, 2019 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Abstract Base Class representing REANA cluster backend."""
import json
import l... | 42.247515 | 118 | 0.557563 |
dc0a7136ea574c4f8738e38e209e8a83cbfa3d62 | 1,023 | py | Python | Python/leetcode/PermutationSequence.py | darrencheng0817/AlgorithmLearning | aec1ddd0c51b619c1bae1e05f940d9ed587aa82f | [
"MIT"
] | 2 | 2015-12-02T06:44:01.000Z | 2016-05-04T21:40:54.000Z | Python/leetcode/PermutationSequence.py | darrencheng0817/AlgorithmLearning | aec1ddd0c51b619c1bae1e05f940d9ed587aa82f | [
"MIT"
] | null | null | null | Python/leetcode/PermutationSequence.py | darrencheng0817/AlgorithmLearning | aec1ddd0c51b619c1bae1e05f940d9ed587aa82f | [
"MIT"
] | null | null | null | '''
Created on 1.12.2016
@author: Darren
''''''
The set [1,2,3,…,n] contains a total of n! unique permutation
By listing and labeling all of the permutations in order,
We get the following sequence (ie, for n = 3):
"123"
"132"
"213"
"231"
"312"
"321"
Given n and k, return the kth permutatio... | 25.575 | 70 | 0.609971 |
ec854d4f82afdf4e3d4618df2093e9f5e72c16b0 | 790 | py | Python | 05_for_in_python.py | nagasudhirpulla/python_wrldc_training | c3a3216c0a11e1dac03d4637b4b59b28f1bb83c6 | [
"MIT"
] | null | null | null | 05_for_in_python.py | nagasudhirpulla/python_wrldc_training | c3a3216c0a11e1dac03d4637b4b59b28f1bb83c6 | [
"MIT"
] | null | null | null | 05_for_in_python.py | nagasudhirpulla/python_wrldc_training | c3a3216c0a11e1dac03d4637b4b59b28f1bb83c6 | [
"MIT"
] | 2 | 2020-09-30T16:32:18.000Z | 2020-10-23T01:13:51.000Z | '''
'for' statement in python and using it with 'range' function
'''
# looping for 10 times
for itr in range(10):
print('executing...')
print('x is {0}'.format(itr))
print('execution complete with range(10)...\n\n')
# looping with each element of an array
for itr in [1,5,8,7,45]:
print('executing...')
... | 23.939394 | 60 | 0.643038 |
9823b7bd6365413f348b2c9191e41c14f498024a | 297 | py | Python | demo/image_classification/predict.py | brooklet/PaddleHub | 9e6251481fad9de25cea917d24e519e0cd376f5b | [
"Apache-2.0"
] | null | null | null | demo/image_classification/predict.py | brooklet/PaddleHub | 9e6251481fad9de25cea917d24e519e0cd376f5b | [
"Apache-2.0"
] | null | null | null | demo/image_classification/predict.py | brooklet/PaddleHub | 9e6251481fad9de25cea917d24e519e0cd376f5b | [
"Apache-2.0"
] | null | null | null | import paddle
import paddlehub as hub
if __name__ == '__main__':
model = hub.Module(
name='resnet50_vd_imagenet_ssld',
label_list=["roses", "tulips", "daisy", "sunflowers", "dandelion"],
oad_checkpoint='/PATH/TO/CHECKPOINT')
result = model.predict(['flower.jpg'])
| 29.7 | 75 | 0.656566 |
0da1e9a7fce0d8eb322de0dbcb680c85d9edbaca | 795 | py | Python | update_version.py | Manny27nyc/BitcoinArmory | 1d02a6640d6257ab0c37013e5cd4b99681a5cfc3 | [
"MIT"
] | 505 | 2016-02-04T15:54:46.000Z | 2022-03-27T18:43:01.000Z | update_version.py | jimmysong/BitcoinArmory | 1c7190176897a2e0f3e4e198ab2f199059bb2402 | [
"MIT"
] | 528 | 2016-02-06T19:50:12.000Z | 2022-01-15T10:21:16.000Z | update_version.py | jimmysong/BitcoinArmory | 1c7190176897a2e0f3e4e198ab2f199059bb2402 | [
"MIT"
] | 208 | 2015-01-02T10:31:40.000Z | 2021-12-14T07:37:36.000Z | import os
script_dir = os.path.dirname(os.path.realpath(__file__))
os.chdir(script_dir)
if os.path.exists('.git') \
and os.path.exists(os.path.join("armoryengine", "ArmoryUtils.py")):
current_head = os.path.join(".git", "HEAD")
f = open(current_head, "r")
ref = f.read()
f.close()
path_parts = r... | 27.413793 | 74 | 0.626415 |
b8b6e5b215080e5dfb7856c1912ca93fa6a3d505 | 454 | py | Python | turling.py | zh2209645/Sample-Raspberry-Chatbot | a5315d4ccd1b3be64b44af545c12664e24c8d25e | [
"MIT"
] | 1 | 2018-12-11T09:38:42.000Z | 2018-12-11T09:38:42.000Z | turling.py | zh2209645/Sample-Raspberry-Chatbot | a5315d4ccd1b3be64b44af545c12664e24c8d25e | [
"MIT"
] | null | null | null | turling.py | zh2209645/Sample-Raspberry-Chatbot | a5315d4ccd1b3be64b44af545c12664e24c8d25e | [
"MIT"
] | 1 | 2018-12-11T09:38:44.000Z | 2018-12-11T09:38:44.000Z | import sys, json, requests
def tuling(words):
Tuling_API_KEY = "ad65aaa7e97e4d28bdb3c34fbabf4259"
body = {
"key": Tuling_API_KEY,
"info": words.encode("utf-8")
}
url = "http://www.tuling123.com/openapi/api"
resp = requests.post(url=url, data=body, verify=True)
if... | 23.894737 | 58 | 0.57489 |
9b6cc73d2ad3327a58c74c9d0f7c427c145b4293 | 5,797 | py | Python | python/GafferUI/UserPlugValueWidget.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | python/GafferUI/UserPlugValueWidget.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | python/GafferUI/UserPlugValueWidget.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | 42.007246 | 134 | 0.678282 |
d79537c50f59b10ee438fa1d72f815e07e3af076 | 2,337 | py | Python | Reverse_Backdoor/Client.py | Rutherford-sudo/BasicPentestTools | 3a2f5e6b9b2bea8521efad1eecccf236b2572981 | [
"MIT"
] | 1 | 2021-02-18T10:43:45.000Z | 2021-02-18T10:43:45.000Z | Reverse_Backdoor/Client.py | Rutherford-sudo/BasicPentestTools | 3a2f5e6b9b2bea8521efad1eecccf236b2572981 | [
"MIT"
] | null | null | null | Reverse_Backdoor/Client.py | Rutherford-sudo/BasicPentestTools | 3a2f5e6b9b2bea8521efad1eecccf236b2572981 | [
"MIT"
] | 1 | 2020-05-26T14:51:03.000Z | 2020-05-26T14:51:03.000Z | import socket
import subprocess
import os
import platform
import colorama
from colorama import Fore, Style
from time import sleep
import getpass
import base64
import shutil
import sys
colorama.init()
RHOST = "127.0.0.1"
RPORT = 8080
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((RHOST,RPORT))... | 29.582278 | 140 | 0.551134 |
c66ddcac90d0b1e9541a38c81485f2408b268aee | 238 | py | Python | pydp/algorithms/laplacian/_count.py | Vishwaak/PyDP | 408384534843bd297ec7d59ce820c7099a80d848 | [
"Apache-2.0"
] | null | null | null | pydp/algorithms/laplacian/_count.py | Vishwaak/PyDP | 408384534843bd297ec7d59ce820c7099a80d848 | [
"Apache-2.0"
] | null | null | null | pydp/algorithms/laplacian/_count.py | Vishwaak/PyDP | 408384534843bd297ec7d59ce820c7099a80d848 | [
"Apache-2.0"
] | null | null | null | from .._algorithm import MetaAlgorithm
class Count(MetaAlgorithm):
"""
Count Explanation
TODO
"""
def __init__(self, epsilon: float = 1.0, dtype: str = "int"):
super().__init__(epsilon=epsilon, dtype=dtype)
| 19.833333 | 65 | 0.642857 |
d782949a5ee986ef87749dd5976862a10f6b654f | 1,015 | py | Python | rplugin/python3/denite/source/defx/history.py | sanfusu/defx.nvim | 8678b1ac3389f84aa64125f15ebfd6ba87f10b12 | [
"MIT"
] | null | null | null | rplugin/python3/denite/source/defx/history.py | sanfusu/defx.nvim | 8678b1ac3389f84aa64125f15ebfd6ba87f10b12 | [
"MIT"
] | null | null | null | rplugin/python3/denite/source/defx/history.py | sanfusu/defx.nvim | 8678b1ac3389f84aa64125f15ebfd6ba87f10b12 | [
"MIT"
] | null | null | null | # ============================================================================
# FILE: defx/history.py
# AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
# License: MIT license
# ============================================================================
from defx.util import Nvim
from denite.source.base import ... | 29.852941 | 78 | 0.499507 |
53a9050c454c60659f3effd5475616c0016ad2b7 | 25,249 | py | Python | machine_translation_vision/models/NMT_AttentionImagine_Seq2Seq_Beam_V10.py | Eurus-Holmes/VAG-NMT | 38095c4a5477a0e7e2fa1592e8401aa9cddf2beb | [
"Apache-2.0"
] | 12 | 2019-12-28T12:55:27.000Z | 2022-02-10T00:19:53.000Z | machine_translation_vision/models/NMT_AttentionImagine_Seq2Seq_Beam_V10.py | Eurus-Holmes/VAG-NMT | 38095c4a5477a0e7e2fa1592e8401aa9cddf2beb | [
"Apache-2.0"
] | 1 | 2020-01-07T12:13:03.000Z | 2020-01-30T10:45:00.000Z | machine_translation_vision/models/NMT_AttentionImagine_Seq2Seq_Beam_V10.py | Eurus-Holmes/VAG-NMT | 38095c4a5477a0e7e2fa1592e8401aa9cddf2beb | [
"Apache-2.0"
] | 3 | 2020-05-07T19:13:41.000Z | 2021-02-19T11:26:00.000Z | #Implements a new Model where we project the stacked Hidden States from decoder to the Shared Space.
import torch
from torch.autograd import Variable
import torch.nn as nn
from torch import optim
import torch.nn.functional as F
import math
import random
import sys
from ..layers import LIUMCVC_Encoder
from ..layers im... | 44.609541 | 188 | 0.633768 |
24932860fce2a2298cd7875fad10db12ef2aab1a | 1,344 | py | Python | corefacility/roi/entity/rectangular_roi/rectangular_roi_provider.py | serik1987/corefacility | 78d84e19403361e83ef562e738473849f9133bef | [
"RSA-MD"
] | null | null | null | corefacility/roi/entity/rectangular_roi/rectangular_roi_provider.py | serik1987/corefacility | 78d84e19403361e83ef562e738473849f9133bef | [
"RSA-MD"
] | null | null | null | corefacility/roi/entity/rectangular_roi/rectangular_roi_provider.py | serik1987/corefacility | 78d84e19403361e83ef562e738473849f9133bef | [
"RSA-MD"
] | null | null | null | from core.entity.entity_providers.model_providers.model_provider import ModelProvider
from imaging.entity.map.map_provider import MapProvider
class RectangularRoiProvider(ModelProvider):
"""
Exchanges information between the Django model layer and the RectangularRoi entity.
"""
_entity_model = "roi.... | 32 | 108 | 0.704613 |
fb0b0e74eff6cc09fb644379c76141501b2d86a5 | 2,881 | py | Python | stdplugins/karbon3.py | sharath-git1/mybothubbot | 1c78c0dfdf38ae7ae52d5fabdfadd69e184af66d | [
"Apache-2.0"
] | 1 | 2020-04-18T13:42:34.000Z | 2020-04-18T13:42:34.000Z | stdplugins/karbon3.py | sharath-git1/mybothubbot | 1c78c0dfdf38ae7ae52d5fabdfadd69e184af66d | [
"Apache-2.0"
] | 1 | 2021-02-08T20:44:42.000Z | 2021-02-08T20:44:42.000Z | stdplugins/karbon3.py | hansari97/Tg-Bot | 8fdf535c8df2c73d2ba762bc61464f106dc8f549 | [
"Apache-2.0"
] | null | null | null | """Carbon Scraper Plugin for Userbot. //text in creative way.
usage: .kar3 //as a reply to any text message
Thanks to @r4v4n4 for vars"""
from selenium.webdriver.support.ui import Select
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
from telethon import events
from urllib.parse ... | 40.577465 | 238 | 0.695939 |
f4f096759ff7faf205826e5b94fd8a4964d7c718 | 6,234 | py | Python | ml_service/pipelines/titanic_build_train_pipeline.py | memasanz/02_MLOpsPython | 23fa96a70a58ad6a25642b20486e94080a5ea580 | [
"MIT"
] | 1 | 2022-03-28T17:31:02.000Z | 2022-03-28T17:31:02.000Z | ml_service/pipelines/titanic_build_train_pipeline.py | memasanz/02_MLOpsPython | 23fa96a70a58ad6a25642b20486e94080a5ea580 | [
"MIT"
] | null | null | null | ml_service/pipelines/titanic_build_train_pipeline.py | memasanz/02_MLOpsPython | 23fa96a70a58ad6a25642b20486e94080a5ea580 | [
"MIT"
] | null | null | null | from azureml.pipeline.core.graph import PipelineParameter
from azureml.pipeline.steps import PythonScriptStep
from azureml.pipeline.core import Pipeline, PipelineData
from azureml.core import Workspace, Dataset, Datastore
from azureml.core.runconfig import RunConfiguration
from ml_service.pipelines.load_sample_data imp... | 34.441989 | 138 | 0.665544 |
56a621c94f3ffef4d52910f2b0a75113269a1d83 | 1,119 | py | Python | .tox/scenario/lib/python2.7/site-packages/testrepository/arguments/path.py | bdrich/neutron-lbaas | b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd | [
"Apache-2.0"
] | 14 | 2015-03-31T16:30:51.000Z | 2022-01-06T02:54:42.000Z | .tox/scenario/lib/python2.7/site-packages/testrepository/arguments/path.py | bdrich/neutron-lbaas | b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd | [
"Apache-2.0"
] | 32 | 2015-01-14T01:46:29.000Z | 2021-12-27T00:01:14.000Z | .tox/scenario/lib/python2.7/site-packages/testrepository/arguments/path.py | bdrich/neutron-lbaas | b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd | [
"Apache-2.0"
] | 35 | 2015-03-04T04:33:01.000Z | 2022-02-22T04:31:24.000Z | #
# Copyright (c) 2012 Testrepository Contributors
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two lic... | 36.096774 | 78 | 0.722967 |
f57dc0161bebf47a1b92fa2912a637ecbbe98751 | 50 | py | Python | model/__init__.py | Thanatoz-1/VoxAvium | 5716da378ae9a54c6f7b826c6e47b0c20633c3e1 | [
"BSD-3-Clause"
] | null | null | null | model/__init__.py | Thanatoz-1/VoxAvium | 5716da378ae9a54c6f7b826c6e47b0c20633c3e1 | [
"BSD-3-Clause"
] | null | null | null | model/__init__.py | Thanatoz-1/VoxAvium | 5716da378ae9a54c6f7b826c6e47b0c20633c3e1 | [
"BSD-3-Clause"
] | null | null | null | from .model import PANNsCNN14Att, PANNsResNet38Att | 50 | 50 | 0.88 |
8c84ac9a422ed3a53f0c3391ff3abf831fb515d0 | 21,000 | py | Python | rasa/engine/graph.py | dangnguyenngochai/rasa | 538849e0eef0044c9f62799ce944cc54ad2d2c36 | [
"Apache-2.0"
] | 1 | 2022-03-03T16:11:02.000Z | 2022-03-03T16:11:02.000Z | rasa/engine/graph.py | dangnguyenngochai/rasa | 538849e0eef0044c9f62799ce944cc54ad2d2c36 | [
"Apache-2.0"
] | 250 | 2020-08-14T13:41:26.000Z | 2022-03-28T12:10:13.000Z | rasa/engine/graph.py | goitf/rasa | 0b87727fb40d22822ccf4539a34f0ab3c58e3c85 | [
"Apache-2.0"
] | 1 | 2021-12-03T13:04:55.000Z | 2021-12-03T13:04:55.000Z | from __future__ import annotations
import dataclasses
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
import logging
from typing import Any, Callable, Dict, List, Optional, Text, Type, Tuple
from rasa.engine.exceptions import (
GraphComponentException,
GraphSchemaException,
)
impo... | 37.366548 | 88 | 0.619048 |
107168387754e1511c26a0a770806d3e86278691 | 16,951 | py | Python | sfa_api/utils/request_handling.py | SolarArbiter/solarforecastarbiter-api | 280800c73eb7cfd49029462b352887e78f1ff91b | [
"MIT"
] | 7 | 2018-12-07T22:05:36.000Z | 2020-05-03T03:20:50.000Z | sfa_api/utils/request_handling.py | SolarArbiter/solarforecastarbiter-api | 280800c73eb7cfd49029462b352887e78f1ff91b | [
"MIT"
] | 220 | 2018-11-01T23:33:19.000Z | 2021-12-02T21:06:38.000Z | sfa_api/utils/request_handling.py | SolarArbiter/solarforecastarbiter-api | 280800c73eb7cfd49029462b352887e78f1ff91b | [
"MIT"
] | 3 | 2018-10-31T20:55:07.000Z | 2021-11-10T22:51:43.000Z | from collections import defaultdict
from io import StringIO
import json
import re
import string
from flask import request, current_app
import numpy as np
import pandas as pd
from solarforecastarbiter.datamodel import Forecast, Site
from solarforecastarbiter.reference_forecasts import utils as fx_utils
from werkzeug.e... | 31.332717 | 79 | 0.613238 |
587d371a4ef1b63fa00833efae81fb1010f6b3ab | 5,828 | py | Python | pororo/models/brainbert/criterions/dependency_parse.py | jayten42/pororo | 0b02e6a633b9a32ec4241b8ed96745e6592db317 | [
"Apache-2.0"
] | 1,137 | 2021-02-02T02:09:06.000Z | 2022-03-29T03:10:40.000Z | pororo/models/brainbert/criterions/dependency_parse.py | jayten42/pororo | 0b02e6a633b9a32ec4241b8ed96745e6592db317 | [
"Apache-2.0"
] | 57 | 2021-02-02T03:29:54.000Z | 2022-03-31T16:20:00.000Z | pororo/models/brainbert/criterions/dependency_parse.py | jayten42/pororo | 0b02e6a633b9a32ec4241b8ed96745e6592db317 | [
"Apache-2.0"
] | 216 | 2021-02-02T02:49:02.000Z | 2022-03-28T01:19:58.000Z | # Copyright (c) Facebook, Inc. and its affiliates and Kakao Brain. All Rights Reserved
import math
import torch
import torch.nn.functional as F
from fairseq import utils
from fairseq.criterions import FairseqCriterion, register_criterion
@register_criterion("dependency_parse")
class DependencyParseLabelCriterion(Fa... | 36.198758 | 98 | 0.622169 |
60f2be95a6973df01fb504c83bffb400ffb91254 | 1,324 | py | Python | neutron/db/subnet_service_type_db_models.py | MultipleCrashes/neutron | fb268d7e91b22192a6e42f78b0057b4ebd3033ef | [
"Apache-2.0"
] | 1 | 2019-06-02T06:15:39.000Z | 2019-06-02T06:15:39.000Z | neutron/db/subnet_service_type_db_models.py | MultipleCrashes/neutron | fb268d7e91b22192a6e42f78b0057b4ebd3033ef | [
"Apache-2.0"
] | null | null | null | neutron/db/subnet_service_type_db_models.py | MultipleCrashes/neutron | fb268d7e91b22192a6e42f78b0057b4ebd3033ef | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Hewlett Packard Enterprise Development Company, LP
# 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/... | 40.121212 | 78 | 0.712991 |
11638d56f883607eac81074f3f11f6bf4d2aea1f | 5,715 | py | Python | .ipynb_checkpoints/test-checkpoint.py | ymoisan/GeoSim | 84f1482c885d7d3b1e07b92dee9580e4bcacf9cb | [
"MIT"
] | null | null | null | .ipynb_checkpoints/test-checkpoint.py | ymoisan/GeoSim | 84f1482c885d7d3b1e07b92dee9580e4bcacf9cb | [
"MIT"
] | null | null | null | .ipynb_checkpoints/test-checkpoint.py | ymoisan/GeoSim | 84f1482c885d7d3b1e07b92dee9580e4bcacf9cb | [
"MIT"
] | null | null | null | from shapely.geometry import LineString, Point, Polygon, MultiLineString
from shapely.strtree import STRtree
#import random, time
#from rtree import index
from cmath import rect, phase
from math import radians, degrees
from shapely.ops import polygonize, polygonize_full, split
line = LineString(((0,0),(5,0),(10,0)))
... | 26.830986 | 135 | 0.59825 |
303121c189311850a6b0aaba7bf2fa8a68b516a6 | 19,860 | py | Python | tests/test_client.py | highker/presto-python-client | 4f5be9c81950cbddd4579a9e55dfce6db54fb8b2 | [
"Apache-2.0"
] | null | null | null | tests/test_client.py | highker/presto-python-client | 4f5be9c81950cbddd4579a9e55dfce6db54fb8b2 | [
"Apache-2.0"
] | null | null | null | tests/test_client.py | highker/presto-python-client | 4f5be9c81950cbddd4579a9e55dfce6db54fb8b2 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 32.292683 | 121 | 0.620493 |
be0a8311d1c083503acc97fd3cdf6cfc9ded10ed | 24,756 | py | Python | datahub/omis/order/test/test_validators.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | datahub/omis/order/test/test_validators.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | datahub/omis/order/test/test_validators.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | from unittest import mock
import pytest
from django.db.models import Sum
from rest_framework.exceptions import ValidationError
from datahub.core.exceptions import APIConflictException
from datahub.omis.order.constants import OrderStatus, VATStatus
from datahub.omis.order.models import Order
from datahub.omis.order.te... | 32.876494 | 97 | 0.605025 |
f2ebd39d561cc31e1ad600b9e13e6f9160415c77 | 6,382 | py | Python | figures/fig1_iso.py | aneeshnaik/HernquistFlows | 7f81f9b47297b115ae6b593593aac59afafc48b3 | [
"MIT"
] | null | null | null | figures/fig1_iso.py | aneeshnaik/HernquistFlows | 7f81f9b47297b115ae6b593593aac59afafc48b3 | [
"MIT"
] | null | null | null | figures/fig1_iso.py | aneeshnaik/HernquistFlows | 7f81f9b47297b115ae6b593593aac59afafc48b3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Figure 1: Isotropic Hernquist DF.
Created: May 2021
Author: A. P. Naik
"""
import sys
import numpy as np
import matplotlib.pyplot as plt
import copy
from os.path import exists
sys.path.append("../src")
from constants import M_sun, kpc, G, pi
from hernquist import cal... | 29.275229 | 79 | 0.56205 |
890be8cb708e51757880132205b02b1b17afa102 | 1,555 | py | Python | django_1.8_tutorial/mysite/polls/views.py | TecKnow/learning | 71d1ddf9d580027ecc62a067581da378a9e85f6d | [
"BSD-3-Clause"
] | null | null | null | django_1.8_tutorial/mysite/polls/views.py | TecKnow/learning | 71d1ddf9d580027ecc62a067581da378a9e85f6d | [
"BSD-3-Clause"
] | null | null | null | django_1.8_tutorial/mysite/polls/views.py | TecKnow/learning | 71d1ddf9d580027ecc62a067581da378a9e85f6d | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.utils import timezone
from django.views import generic
from .models import Choice, Question
class IndexView(generic.ListView):
template_name = 'polls/index.... | 31.1 | 69 | 0.649518 |
293f83cbe614908d50284bb095b8cc08b77023d8 | 1,618 | py | Python | tool/testspec_1c718d7f2bdb95d407b27412b25471c762355832.py | uiuc-arc/tera | 9ceece9aa29fd58903c6e8fa5e65fce555f55d7c | [
"MIT"
] | 2 | 2021-07-01T11:57:28.000Z | 2022-03-29T19:29:01.000Z | tool/testspec_c21120ffd974029485877dcebafb2c0b930e1f16.py | uiuc-arc/tera | 9ceece9aa29fd58903c6e8fa5e65fce555f55d7c | [
"MIT"
] | null | null | null | tool/testspec_c21120ffd974029485877dcebafb2c0b930e1f16.py | uiuc-arc/tera | 9ceece9aa29fd58903c6e8fa5e65fce555f55d7c | [
"MIT"
] | null | null | null | from src.lib.TestSpec import Spec
from src.lib.AssertSpec import AssertSpec
from src.lib.AssertType import AssertType
from src.lib.Param import Param
from src.lib.ParamType import ParamType
from src.lib.Test import Test
import libraries
testspecs = [Spec(
repo="pyGPGO",
filename="{0}/projects/pyGPGO/te... | 30.528302 | 86 | 0.495674 |
07b9d0bdcfb8330466edea9deb7cfc89c37bf0c0 | 2,985 | py | Python | textkind/classify.py | caltechlibrary/documentarist | 055ad42f623c7affb584a6004e1bdba73d6312ac | [
"BSD-3-Clause"
] | 10 | 2020-04-27T19:12:14.000Z | 2022-02-11T07:06:17.000Z | textkind/classify.py | caltechlibrary/documentarist | 055ad42f623c7affb584a6004e1bdba73d6312ac | [
"BSD-3-Clause"
] | null | null | null | textkind/classify.py | caltechlibrary/documentarist | 055ad42f623c7affb584a6004e1bdba73d6312ac | [
"BSD-3-Clause"
] | 2 | 2020-04-27T19:12:21.000Z | 2021-03-15T10:47:16.000Z | '''
classify.py: interface to classifier engine
Authors
-------
Michael Hucka <mhucka@caltech.edu> -- Caltech Library
Copyright
---------
Copyright (c) 2020 by the California Institute of Technology. This code
is open-source software released under a 3-clause BSD license. Please see the
file "LICENSE" for more in... | 31.421053 | 106 | 0.621776 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.