hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7957be7789dfa9e8117e2d80e97257197db65655 | 2,235 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/minimum-cost-to-make-at-least-one-valid-path-in-a-grid.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/minimum-cost-to-make-at-least-one-valid-path-in-a-grid.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/minimum-cost-to-make-at-least-one-valid-path-in-a-grid.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: O(m * n)
# Space: O(m * n)
import collections
# A* Search Algorithm without heap
class Solution(object):
def minCost(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
directions = [(0, 1), (0, -1), (1, 0), (-1, 0)]
def a_star(grid, b, t):
... | 31.041667 | 84 | 0.391946 |
7957be7daea50274a7d064e78a2d83718f8b0438 | 7,401 | py | Python | cohesity_management_sdk/models/register_application_servers_parameters.py | cohesity/management-sdk-python | 867d8c0c40dd317cdb017902c895527da7ae31c0 | [
"Apache-2.0"
] | 18 | 2019-09-24T17:35:53.000Z | 2022-03-25T08:08:47.000Z | cohesity_management_sdk/models/register_application_servers_parameters.py | cohesity/management-sdk-python | 867d8c0c40dd317cdb017902c895527da7ae31c0 | [
"Apache-2.0"
] | 18 | 2019-03-29T19:32:29.000Z | 2022-01-03T23:16:45.000Z | cohesity_management_sdk/models/register_application_servers_parameters.py | cohesity/management-sdk-python | 867d8c0c40dd317cdb017902c895527da7ae31c0 | [
"Apache-2.0"
] | 16 | 2019-02-27T06:54:12.000Z | 2021-11-16T18:10:24.000Z | # -*- coding: utf-8 -*-
# Copyright 2021 Cohesity Inc.
class RegisterApplicationServersParameters(object):
"""Implementation of the 'RegisterApplicationServersParameters' model.
Specifies the parameters required to register Application Servers
running in a Protection Source.
Attributes:
app... | 50.006757 | 81 | 0.673558 |
7957bec8d86fcab916e8f424b809bcfe5e9b42b4 | 16,811 | py | Python | oslo_messaging/tests/drivers/pika/test_poller.py | ox12345/oslo.messaging | bdb21c0bcddfb2dac1e0f4d926e7df53d975bf0c | [
"Apache-1.1"
] | null | null | null | oslo_messaging/tests/drivers/pika/test_poller.py | ox12345/oslo.messaging | bdb21c0bcddfb2dac1e0f4d926e7df53d975bf0c | [
"Apache-1.1"
] | null | null | null | oslo_messaging/tests/drivers/pika/test_poller.py | ox12345/oslo.messaging | bdb21c0bcddfb2dac1e0f4d926e7df53d975bf0c | [
"Apache-1.1"
] | null | null | null | # Copyright 2015 Mirantis, 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 ... | 34.805383 | 79 | 0.619178 |
7957bee9e2d547669d8f4cccf3172443848683df | 399 | py | Python | Backend/open_garden/open_garden/wsgi.py | nananananate/open-garden-py | c0d729f99f3c73e43b22f373b54e170374f0d057 | [
"MIT"
] | 7 | 2020-10-02T22:08:48.000Z | 2022-01-29T17:09:25.000Z | Backend/open_garden/open_garden/wsgi.py | nananananate/open-garden-py | c0d729f99f3c73e43b22f373b54e170374f0d057 | [
"MIT"
] | 12 | 2020-09-30T21:49:06.000Z | 2020-11-01T06:52:49.000Z | Backend/open_garden/open_garden/wsgi.py | nananananate/open-garden-py | c0d729f99f3c73e43b22f373b54e170374f0d057 | [
"MIT"
] | 7 | 2020-10-01T04:07:23.000Z | 2022-01-29T17:09:26.000Z | """
WSGI config for open_garden project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | 23.470588 | 78 | 0.789474 |
7957bf64e90b18c27c69f1bab344da305b36b946 | 2,450 | py | Python | var/spack/repos/builtin/packages/tioga/package.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-10T13:47:48.000Z | 2019-04-17T13:05:17.000Z | var/spack/repos/builtin/packages/tioga/package.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 17 | 2019-03-21T15:54:00.000Z | 2022-03-29T19:34:28.000Z | var/spack/repos/builtin/packages/tioga/package.py | Kerilk/spack | e027942b55407a4a5fe323b93d8e57200c873a43 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-04-06T09:04:11.000Z | 2020-01-24T12:52:12.000Z | # Copyright 2013-2021 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)
import sys
from spack import *
class Tioga(CMakePackage, CudaPackage):
"""Topology Independent Overset Grid Assembly ... | 37.121212 | 81 | 0.647755 |
7957bf8c8d9186e9d93c7d17b03384f70ac3f03c | 7,234 | py | Python | vedaseg/models/utils/conv_module.py | E18301194/vedaseg | c62c8ea46dbba12f03262452dd7bed22969cfe4e | [
"Apache-2.0"
] | 2 | 2020-07-15T02:36:46.000Z | 2021-03-08T03:18:26.000Z | vedaseg/models/utils/conv_module.py | E18301194/vedaseg | c62c8ea46dbba12f03262452dd7bed22969cfe4e | [
"Apache-2.0"
] | null | null | null | vedaseg/models/utils/conv_module.py | E18301194/vedaseg | c62c8ea46dbba12f03262452dd7bed22969cfe4e | [
"Apache-2.0"
] | 1 | 2021-09-16T09:40:12.000Z | 2021-09-16T09:40:12.000Z | # modify from mmcv and mmdetection
import warnings
import torch.nn as nn
from .norm import build_norm_layer
from .act import build_act_layer
from .registry import UTILS
conv_cfg = {
'Conv': nn.Conv2d,
# TODO: octave conv
}
def build_conv_layer(cfg, *args, **kwargs):
""" Build convolution layer
Ar... | 33.962441 | 88 | 0.545065 |
7957bfdafbb2e97e18b76a15e3314af9f0bf1aef | 656 | py | Python | Tests/JsonProcTest.py | RippeR37/PyPong | 601db4346f7c27c88226ce79317008941cbc5754 | [
"MIT"
] | 1 | 2018-12-06T06:16:49.000Z | 2018-12-06T06:16:49.000Z | Tests/JsonProcTest.py | RippeR37/PyPong | 601db4346f7c27c88226ce79317008941cbc5754 | [
"MIT"
] | 10 | 2016-01-07T19:22:44.000Z | 2016-01-10T14:32:37.000Z | Tests/JsonProcTest.py | RippeR37/PyPong | 601db4346f7c27c88226ce79317008941cbc5754 | [
"MIT"
] | null | null | null | from Systems.Network.Messages.JsonProc import JsonProc
import unittest
import json
class JsonProcTest(unittest.TestCase):
def test_constructor(self):
proc = "proc_name"
jp = JsonProc(proc)
self.assertEqual(jp.proc, proc)
def test_to_json(self):
proc = "proc_name"
jp ... | 23.428571 | 58 | 0.629573 |
7957c111fda9814e04db2b546ea80f028575d9ae | 936 | py | Python | access360/api/model/payment/paymentModel.py | Kokoserver/ac | 8226a7e212aef60c0903204ca2b0602fef06f133 | [
"MIT"
] | null | null | null | access360/api/model/payment/paymentModel.py | Kokoserver/ac | 8226a7e212aef60c0903204ca2b0602fef06f133 | [
"MIT"
] | null | null | null | access360/api/model/payment/paymentModel.py | Kokoserver/ac | 8226a7e212aef60c0903204ca2b0602fef06f133 | [
"MIT"
] | null | null | null | from datetime import datetime
from mongoengine import *
class Invoice(Document):
userId = ObjectIdField(required=True)
courseList = ListField(ObjectIdField(), required=True)
total_price = DecimalField(default=0, required=True)
paymentStatus = StringField(choices=("success", "pending", "failed"), requ... | 26 | 88 | 0.655983 |
7957c220e3eb1147a1407779a291f94997729e47 | 31,713 | py | Python | main.py | yukuzntcva/Denoising-drone-rotors | 0122b020fc959dd3869b3863989fee3520aede73 | [
"MIT"
] | 19 | 2018-10-02T02:11:16.000Z | 2021-05-14T12:39:38.000Z | main.py | yukuzntcva/Denoising-drone-rotors | 0122b020fc959dd3869b3863989fee3520aede73 | [
"MIT"
] | 1 | 2018-10-23T02:43:18.000Z | 2018-10-23T02:43:18.000Z | main.py | yukuzntcva/Denoising-drone-rotors | 0122b020fc959dd3869b3863989fee3520aede73 | [
"MIT"
] | 5 | 2019-04-11T13:40:31.000Z | 2020-07-19T14:44:12.000Z | import argparse
import csv
import logging
import os
import sys
from ast import literal_eval
from datetime import datetime
import time
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.switch_backend('agg')
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn ... | 46.228863 | 162 | 0.61634 |
7957c2823e86b078434e2c853af14fbd9e713d31 | 1,803 | py | Python | test/test_command_graph.py | Fuhrmann/qtile | 9760feed411582eeb0379afe7b4b54f73220c1ad | [
"MIT"
] | null | null | null | test/test_command_graph.py | Fuhrmann/qtile | 9760feed411582eeb0379afe7b4b54f73220c1ad | [
"MIT"
] | null | null | null | test/test_command_graph.py | Fuhrmann/qtile | 9760feed411582eeb0379afe7b4b54f73220c1ad | [
"MIT"
] | null | null | null | import pytest
from libqtile.command_graph import CommandGraphCall, CommandGraphObject, CommandGraphRoot
def test_root_path():
node = CommandGraphRoot()
assert node.selectors == []
assert node.selector is None
assert node.parent is None
def test_resolve_nodes():
root_node = CommandGraphRoot()
... | 32.196429 | 95 | 0.636717 |
7957c2facbc963da74787115fc05601d2956fda0 | 33,768 | py | Python | Lib/asyncio/tasks.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2021-11-04T07:39:43.000Z | 2021-11-04T07:39:43.000Z | Lib/asyncio/tasks.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/asyncio/tasks.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2021-05-11T05:20:30.000Z | 2021-05-11T05:20:30.000Z | """Support for tasks, coroutines and the scheduler."""
__all__ = (
'Task', 'create_task',
'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED',
'wait', 'wait_for', 'as_completed', 'sleep',
'gather', 'shield', 'ensure_future', 'run_coroutine_threadsafe',
'current_task', 'all_tasks',
'_register_... | 34.212766 | 93 | 0.618574 |
7957c3305b1c939ecb79fdaeed8f9867f6248db9 | 2,661 | py | Python | utils/input_pipeline.py | TropComplique/trained-ternary-quantization | 4cd4132124c30e0e868a78eb1b2a2798df5e2a90 | [
"MIT"
] | 97 | 2017-11-06T10:12:44.000Z | 2022-02-09T04:14:29.000Z | utils/input_pipeline.py | ljh-xjtu/trained-ternary-quantization | 4cd4132124c30e0e868a78eb1b2a2798df5e2a90 | [
"MIT"
] | 8 | 2017-09-25T03:49:51.000Z | 2019-02-14T07:04:05.000Z | utils/input_pipeline.py | ljh-xjtu/trained-ternary-quantization | 4cd4132124c30e0e868a78eb1b2a2798df5e2a90 | [
"MIT"
] | 24 | 2017-11-08T12:45:43.000Z | 2021-09-24T05:53:27.000Z | import numpy as np
from PIL import Image, ImageEnhance
from torchvision.datasets import ImageFolder
import torchvision.transforms as transforms
TRAIN_DIR = '/home/ubuntu/data/tiny-imagenet-200/training'
VAL_DIR = '/home/ubuntu/data/tiny-imagenet-200/validation'
"""It assumes that training image data is in the follo... | 29.566667 | 70 | 0.639233 |
7957c3564d52a828fd4f7e5d954eef2ec2b984a5 | 1,796 | py | Python | app/user/serializers.py | ricardolira/recipe-app-api | 749c39af92383ecfa208636fc2b09deaaefeeb2a | [
"MIT"
] | null | null | null | app/user/serializers.py | ricardolira/recipe-app-api | 749c39af92383ecfa208636fc2b09deaaefeeb2a | [
"MIT"
] | null | null | null | app/user/serializers.py | ricardolira/recipe-app-api | 749c39af92383ecfa208636fc2b09deaaefeeb2a | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate, get_user_model
# This is for easing translation if page is going live in several languages
# from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""Serializer for the users ... | 31.508772 | 75 | 0.653118 |
7957c429e51a0b6b30c40826e2cebec4afbc7b05 | 9,429 | py | Python | redash/query_runner/mysql.py | keywoshilishuang/redash | 7def30435e7c09c1bb76286f11ebafb3ad34e204 | [
"BSD-2-Clause"
] | null | null | null | redash/query_runner/mysql.py | keywoshilishuang/redash | 7def30435e7c09c1bb76286f11ebafb3ad34e204 | [
"BSD-2-Clause"
] | null | null | null | redash/query_runner/mysql.py | keywoshilishuang/redash | 7def30435e7c09c1bb76286f11ebafb3ad34e204 | [
"BSD-2-Clause"
] | null | null | null | import logging
import os
import threading
import json
import time
from redash.query_runner import TYPE_FLOAT, TYPE_INTEGER, TYPE_DATETIME, TYPE_STRING, TYPE_DATE, BaseSQLQueryRunner, InterruptException, register
from redash.settings import parse_boolean
from redash.utils import json_dumps, json_loads
try:
import ... | 29.012308 | 145 | 0.467918 |
7957c4950a679af57f45732c7facc114468d171a | 1,476 | py | Python | setup.py | JunShern/lm-evaluation-harness | 84aa15c6e4cb65adf39c2dccf91a799cc7e6440a | [
"MIT"
] | 203 | 2021-01-08T16:39:09.000Z | 2022-03-31T06:03:16.000Z | setup.py | JunShern/lm-evaluation-harness | 84aa15c6e4cb65adf39c2dccf91a799cc7e6440a | [
"MIT"
] | 183 | 2020-12-27T03:41:08.000Z | 2022-03-19T21:56:53.000Z | setup.py | JunShern/lm-evaluation-harness | 84aa15c6e4cb65adf39c2dccf91a799cc7e6440a | [
"MIT"
] | 73 | 2021-01-05T22:37:01.000Z | 2022-03-29T10:14:53.000Z | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="lm_eval",
version="0.0.1",
author="Leo Gao",
author_email="lg@eleuther.ai",
description="A framework for evaluating autoregressive language models",
long_description=... | 30.122449 | 122 | 0.573171 |
7957c5ca8fe5a8ee76cc88bf7c396e587883e694 | 8,566 | py | Python | PixivBatchHandler.py | itskenny0/PixivUtil2 | 3ff352b18800a129db77715882d61dd78798a428 | [
"BSD-2-Clause"
] | null | null | null | PixivBatchHandler.py | itskenny0/PixivUtil2 | 3ff352b18800a129db77715882d61dd78798a428 | [
"BSD-2-Clause"
] | null | null | null | PixivBatchHandler.py | itskenny0/PixivUtil2 | 3ff352b18800a129db77715882d61dd78798a428 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import demjson
import PixivArtistHandler
import PixivHelper
import PixivImageHandler
import PixivTagsHandler
import PixivUtil2
_default_batch_filename = "./batch_job.json"
class JobOption(object):
filenameFormat = ""
filenameMangaFormat = ""
filenameInfoFormat = ""
... | 37.735683 | 175 | 0.576815 |
7957c5f1a19a83c4ab3f87a3d345f55baffab2ef | 2,647 | py | Python | surveys/forms/users.py | GeorgeVelikov/Surffee | 1d89f423d9275aa34c5b51ebbf5457078cdc4d71 | [
"MIT"
] | null | null | null | surveys/forms/users.py | GeorgeVelikov/Surffee | 1d89f423d9275aa34c5b51ebbf5457078cdc4d71 | [
"MIT"
] | null | null | null | surveys/forms/users.py | GeorgeVelikov/Surffee | 1d89f423d9275aa34c5b51ebbf5457078cdc4d71 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from ..models import Researcher
class ResearcherCreationForm(UserCreationForm):
"""
* Form to create a Researcher type user
*
"""
password1 = forms.CharField(label='Password', widget=forms.PasswordInpu... | 34.828947 | 90 | 0.653948 |
7957c7418d536c63c3c424f2bdcd96d23b2f14c6 | 264 | py | Python | Pacote de Conteudo/Mundo 02/Exercicios/ex027.py | Michelle-On/ExerciciosPython_2020-21 | 61615237a310c15923138575ebc65f6a15b301ab | [
"MIT"
] | null | null | null | Pacote de Conteudo/Mundo 02/Exercicios/ex027.py | Michelle-On/ExerciciosPython_2020-21 | 61615237a310c15923138575ebc65f6a15b301ab | [
"MIT"
] | null | null | null | Pacote de Conteudo/Mundo 02/Exercicios/ex027.py | Michelle-On/ExerciciosPython_2020-21 | 61615237a310c15923138575ebc65f6a15b301ab | [
"MIT"
] | null | null | null | nome = str(input('Digite seu nome completo: ')).strip()
n = nome.split()
print('Prazer em te conhecer {}'.format(nome))
print('Seu primeiro nome é {}'.format(n[0]))
print('Seu ultimo nome é {} '.format(n[len(n)-1]))
#ou print('Seu ultimo nome é {} '.format(n[-1])) | 44 | 55 | 0.643939 |
7957c79b2b10df815f54dcda10f1d4a016e54093 | 7,617 | py | Python | wb_animation_action/competition.py | cesc-folch/webots-animation-action | fb0636b88413bc04963f55484f9a9e180c8bccd8 | [
"Apache-2.0"
] | 11 | 2020-12-14T10:22:06.000Z | 2022-01-03T09:41:06.000Z | wb_animation_action/competition.py | cesc-folch/webots-animation-action | fb0636b88413bc04963f55484f9a9e180c8bccd8 | [
"Apache-2.0"
] | 12 | 2020-10-05T16:04:09.000Z | 2021-09-03T13:33:46.000Z | wb_animation_action/competition.py | cesc-folch/webots-animation-action | fb0636b88413bc04963f55484f9a9e180c8bccd8 | [
"Apache-2.0"
] | 2 | 2021-04-15T07:04:20.000Z | 2021-05-19T10:39:24.000Z | #!/usr/bin/env python3
#
# Copyright 1996-2020 Cyberbotics 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 appli... | 36.444976 | 114 | 0.642641 |
7957c79ec717a3f40f22ff057c0191968712aee4 | 6,360 | py | Python | cvxpy/constraints/constraint.py | Hennich/cvxpy | 4dfd6d69ace76abf57d8b1d63db0556dee96e24f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cvxpy/constraints/constraint.py | Hennich/cvxpy | 4dfd6d69ace76abf57d8b1d63db0556dee96e24f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cvxpy/constraints/constraint.py | Hennich/cvxpy | 4dfd6d69ace76abf57d8b1d63db0556dee96e24f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """
Copyright 2013 Steven Diamond
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... | 28.520179 | 80 | 0.59827 |
7957c7ba4ce6a5d34fa81576399cf0d5958e2a63 | 805 | py | Python | StudentManager/student.py | sudeep0901/python | 7a50af12e72d21ca4cad7f2afa4c6f929552043f | [
"MIT"
] | null | null | null | StudentManager/student.py | sudeep0901/python | 7a50af12e72d21ca4cad7f2afa4c6f929552043f | [
"MIT"
] | 3 | 2019-12-26T05:13:55.000Z | 2020-03-07T06:59:56.000Z | StudentManager/student.py | sudeep0901/python | 7a50af12e72d21ca4cad7f2afa4c6f929552043f | [
"MIT"
] | null | null | null | students = []
# all methods are public no access modifiers
class Student:
pass
# Class Attribute
schoolName = "New Delhli Public School"
# adding methods to classs
# Constructer Method
def __init__(self, name, student_id=1000):
# student = {"name": name, "student_id": student_id}
... | 25.967742 | 87 | 0.645963 |
7957c7d80674027cca9cf267e8c49474d9fc1c49 | 1,401 | py | Python | stac_fastapi_sqlalchemy/setup.py | TomAugspurger/stac-fastapi | d660438dd0f6d4e0ecb69bf806d6af07fb31fc7f | [
"MIT"
] | null | null | null | stac_fastapi_sqlalchemy/setup.py | TomAugspurger/stac-fastapi | d660438dd0f6d4e0ecb69bf806d6af07fb31fc7f | [
"MIT"
] | null | null | null | stac_fastapi_sqlalchemy/setup.py | TomAugspurger/stac-fastapi | d660438dd0f6d4e0ecb69bf806d6af07fb31fc7f | [
"MIT"
] | null | null | null | """stac-fastapi sqlalchemy submodule."""
import os
from glob import glob
from imp import load_source
from os.path import basename, splitext
from setuptools import find_namespace_packages, setup
name = "stac-sqlalchemy-sqlalchemy"
description = "Sqlalchemy subpackage of fastapi-stac, contains a postgres backend implem... | 29.808511 | 115 | 0.723769 |
7957c979266bb6a6d63c2167ad4118516aef6a89 | 1,282 | py | Python | web_app/fta_solutions_app/migrations/0025_auto_20170620_1508.py | mycyzs/fta | a50a3c498c39b14e7df4a0a960c2a1499b1ec6bb | [
"Apache-2.0"
] | null | null | null | web_app/fta_solutions_app/migrations/0025_auto_20170620_1508.py | mycyzs/fta | a50a3c498c39b14e7df4a0a960c2a1499b1ec6bb | [
"Apache-2.0"
] | null | null | null | web_app/fta_solutions_app/migrations/0025_auto_20170620_1508.py | mycyzs/fta | a50a3c498c39b14e7df4a0a960c2a1499b1ec6bb | [
"Apache-2.0"
] | 2 | 2020-02-12T03:59:28.000Z | 2021-05-27T05:34:01.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 47.481481 | 305 | 0.728549 |
7957ca04f58a8d32518e92aabb7f3bb03f95c425 | 26,053 | py | Python | falcon/api.py | swistakm/falcon | 229918c6e34aece9234466fa255ae8ac2d4a7c16 | [
"Apache-2.0"
] | null | null | null | falcon/api.py | swistakm/falcon | 229918c6e34aece9234466fa255ae8ac2d4a7c16 | [
"Apache-2.0"
] | null | null | null | falcon/api.py | swistakm/falcon | 229918c6e34aece9234466fa255ae8ac2d4a7c16 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 by Rackspace Hosting, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 40.963836 | 79 | 0.577784 |
7957ca11dfd6c1bf7c370652ff5f3778d4bde7fe | 23,849 | py | Python | e2e_tests/E2ETests.py | ucgmsim/slurm_gm_workflow | 6fd7e11f3c3163dbd219b6783c32fa8085db5d35 | [
"MIT"
] | null | null | null | e2e_tests/E2ETests.py | ucgmsim/slurm_gm_workflow | 6fd7e11f3c3163dbd219b6783c32fa8085db5d35 | [
"MIT"
] | 114 | 2018-10-11T02:49:32.000Z | 2022-03-30T01:28:21.000Z | e2e_tests/E2ETests.py | ucgmsim/slurm_gm_workflow | 6fd7e11f3c3163dbd219b6783c32fa8085db5d35 | [
"MIT"
] | 2 | 2021-10-05T07:10:20.000Z | 2022-03-16T23:26:51.000Z | """Contains class and helper functions for end to end test"""
import signal
import sys
import os
import json
import shutil
import time
import glob
import subprocess
from collections import namedtuple
from typing import List
from threading import Thread
from queue import Queue, Empty
import numpy.random as nprdm
import... | 33.685028 | 93 | 0.554195 |
7957cbd5fa9a03fb753bb79313289edb105db546 | 10,229 | py | Python | cirq/ops/controlled_operation.py | matpompili/Cirq | b9ce387a7fc1f571b3d6e903c46543c3578677cb | [
"Apache-2.0"
] | 1 | 2020-07-16T07:09:10.000Z | 2020-07-16T07:09:10.000Z | cirq/ops/controlled_operation.py | matpompili/Cirq | b9ce387a7fc1f571b3d6e903c46543c3578677cb | [
"Apache-2.0"
] | 1 | 2020-08-11T15:45:17.000Z | 2020-08-11T15:45:17.000Z | cirq/ops/controlled_operation.py | matpompili/Cirq | b9ce387a7fc1f571b3d6e903c46543c3578677cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 41.922131 | 80 | 0.607586 |
7957cc1fcde3dd32c7088f4c41669dfe7081f00a | 453 | py | Python | project/urls.py | flarno11/teslarent | 388b5fefdc7bca0a460c5db5ea24b233467e5183 | [
"Apache-2.0"
] | null | null | null | project/urls.py | flarno11/teslarent | 388b5fefdc7bca0a460c5db5ea24b233467e5183 | [
"Apache-2.0"
] | 13 | 2020-02-11T21:56:50.000Z | 2022-02-17T14:37:34.000Z | project/urls.py | flarno11/teslarent | 388b5fefdc7bca0a460c5db5ea24b233467e5183 | [
"Apache-2.0"
] | 2 | 2019-06-27T20:38:48.000Z | 2019-06-27T21:15:54.000Z | from django.contrib import admin
from django.urls import include, path
import teslarent.urls
from teslarent import manage_views
admin.autodiscover()
urlpatterns = [
path('', teslarent.views.index, name='index'),
path('metrics', manage_views.metrics, name='metrics'),
path('rental/', include('teslarent.ur... | 26.647059 | 86 | 0.706402 |
7957cd26f88f86e7c40e18ba368caa1460c41045 | 85,283 | py | Python | src/encoded/vis_defines.py | utsw-bicf/cognitionexplorer | df7cbca95870d3776d5b22d062b6a5be864f0948 | [
"MIT"
] | 1 | 2019-07-18T21:57:10.000Z | 2019-07-18T21:57:10.000Z | src/encoded/vis_defines.py | utsw-bicf/pandiseased | ecb2c305a5c4bf468b0964137984d1800c798f01 | [
"MIT"
] | 321 | 2019-08-20T19:32:17.000Z | 2021-10-15T20:00:02.000Z | src/encoded/vis_defines.py | Lattice-Data/encoded | 94bb4f7cb51970523715e0598d84699a28f90861 | [
"MIT"
] | 2 | 2019-09-20T19:58:08.000Z | 2020-01-28T15:04:31.000Z | from pyramid.response import Response
from pyramid.view import view_config
from pyramid.compat import bytes_
from snovault import Item
from collections import OrderedDict
from copy import deepcopy
import json
import os
from urllib.parse import (
parse_qs,
urlencode,
)
from snovault.elasticsearch.interfaces impo... | 47.353137 | 170 | 0.539099 |
7957cd7cfef0c97e81e31844b6ae37001b015c9b | 3,379 | py | Python | reddit_pocket_sync.py | vihanggodbole/reddit-pocket-sync | 773eefc9fc652af46764f09a54958623df9034e5 | [
"MIT"
] | 43 | 2017-02-08T14:05:11.000Z | 2022-03-01T02:10:37.000Z | reddit_pocket_sync.py | vihanggodbole/reddit-pocket-sync | 773eefc9fc652af46764f09a54958623df9034e5 | [
"MIT"
] | 1 | 2018-03-28T05:02:07.000Z | 2018-03-28T17:38:24.000Z | reddit_pocket_sync.py | vihanggodbole/reddit-pocket-sync | 773eefc9fc652af46764f09a54958623df9034e5 | [
"MIT"
] | 4 | 2017-02-09T15:00:20.000Z | 2018-02-11T03:09:55.000Z | import praw
import prawcore
import argparse
import sys
from PocketUser import PocketUser
consumer_key = ''
def parse_args():
parser = argparse.ArgumentParser(
description='Sync your reddit account with Pocket.')
parser.add_argument(
'--consumer', type=str, help='Consumer key for your Pocket a... | 33.79 | 124 | 0.645753 |
7957cddeb86d26c034dd25acbf7ccd0a14590c29 | 175 | py | Python | models/state.py | Hezbon12/AirBnB_clone | c6a8b52a2d1279baef09245dcafd16ae1c87260c | [
"MIT"
] | null | null | null | models/state.py | Hezbon12/AirBnB_clone | c6a8b52a2d1279baef09245dcafd16ae1c87260c | [
"MIT"
] | null | null | null | models/state.py | Hezbon12/AirBnB_clone | c6a8b52a2d1279baef09245dcafd16ae1c87260c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from models import *
class State(BaseModel):
name = ""
def __init__(self, *args, **kwargs):
super(State, self).__init__(*args, **kwargs)
| 17.5 | 52 | 0.622857 |
7957cf1d5942a505c6b0057854adbc84b207ebca | 25,532 | py | Python | ocio/museos/views.py | AntonioMelgar/X-Serv-Practica-Museos | 6423c2d17173035efeaa493b10a69be279c774ad | [
"Apache-2.0"
] | null | null | null | ocio/museos/views.py | AntonioMelgar/X-Serv-Practica-Museos | 6423c2d17173035efeaa493b10a69be279c774ad | [
"Apache-2.0"
] | null | null | null | ocio/museos/views.py | AntonioMelgar/X-Serv-Practica-Museos | 6423c2d17173035efeaa493b10a69be279c774ad | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
from django.shortcuts import render
from django.http import HttpResponseRedirect, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from .models import Museo, Usuario, Comentario, Pagina_Personal
from lxml import etree
from django.template.loader import get_template
from django.templa... | 36.164306 | 922 | 0.707739 |
7957cfb121776e34b4910ec717268648c282bbf1 | 516 | py | Python | rx/operators/observable/thendo.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-16T09:07:13.000Z | 2018-11-16T09:07:13.000Z | rx/operators/observable/thendo.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/operators/observable/thendo.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-08T08:23:08.000Z | 2020-05-08T08:23:08.000Z | from rx.core.typing import Mapper
from rx.core import ObservableBase
from rx.joins import Pattern
def then_do(source: ObservableBase, mapper: Mapper) -> ObservableBase:
"""Matches when the observable sequence has an available value and
projects the value.
mapper -- Mapper that will be invoked for values ... | 27.157895 | 70 | 0.728682 |
7957d036c2359d6180f85f64417914f452fed423 | 48,589 | py | Python | tests/integration/test_api_gateway.py | jaume-pinyol/localstack | a7eb1ef9c992dde53e2f3abe27d3fab94ba40bde | [
"Apache-2.0"
] | null | null | null | tests/integration/test_api_gateway.py | jaume-pinyol/localstack | a7eb1ef9c992dde53e2f3abe27d3fab94ba40bde | [
"Apache-2.0"
] | null | null | null | tests/integration/test_api_gateway.py | jaume-pinyol/localstack | a7eb1ef9c992dde53e2f3abe27d3fab94ba40bde | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import re
import json
import base64
import unittest
import xmltodict
from botocore.exceptions import ClientError
from jsonpatch import apply_patch
from requests.models import Response
from requests.structures import CaseInsensitiveDict
from localstack import config
from localstack.util... | 42.032007 | 119 | 0.638828 |
7957d045aef512b56c642005e8a4bb6b9407701e | 1,769 | py | Python | django_blog/blog/views.py | IvanSEfimov/django-blog | bcf49fdb59aaad5db622e10cc5e7ceed575a0c85 | [
"MIT"
] | null | null | null | django_blog/blog/views.py | IvanSEfimov/django-blog | bcf49fdb59aaad5db622e10cc5e7ceed575a0c85 | [
"MIT"
] | null | null | null | django_blog/blog/views.py | IvanSEfimov/django-blog | bcf49fdb59aaad5db622e10cc5e7ceed575a0c85 | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.contrib.auth.models import User
from django.views.generic import (
ListView,
DetailView,
CreateView,
UpdateView,
DeleteView
)
from .models import Post
c... | 24.915493 | 78 | 0.695873 |
7957d07a1220b313a0591e35c41e974e21c0768b | 606 | py | Python | potions/migrations/0002_potion_user.py | NievesBorrero/potionlab | 2ce4c97906bd6d8ea84e1d6e2a5afdad68182bd2 | [
"MIT"
] | 11 | 2020-01-28T10:46:13.000Z | 2020-02-10T20:20:08.000Z | potions/migrations/0002_potion_user.py | NievesBorrero/potionlab | 2ce4c97906bd6d8ea84e1d6e2a5afdad68182bd2 | [
"MIT"
] | null | null | null | potions/migrations/0002_potion_user.py | NievesBorrero/potionlab | 2ce4c97906bd6d8ea84e1d6e2a5afdad68182bd2 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2020-01-21 09:49
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('potions', '0001_initial'),... | 27.545455 | 154 | 0.674917 |
7957d1b1ab9c83bd79151c1a498645588e0563a3 | 1,062 | py | Python | h2o-py/h2o/model/anomaly_detection.py | koniecsveta/h2o-3 | b672bd80a08b0c899086b0ae24985ddb1c537de0 | [
"Apache-2.0"
] | null | null | null | h2o-py/h2o/model/anomaly_detection.py | koniecsveta/h2o-3 | b672bd80a08b0c899086b0ae24985ddb1c537de0 | [
"Apache-2.0"
] | null | null | null | h2o-py/h2o/model/anomaly_detection.py | koniecsveta/h2o-3 | b672bd80a08b0c899086b0ae24985ddb1c537de0 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from .model_base import ModelBase
from h2o.utils.shared_utils import can_use_pandas
class H2OAnomalyDetectionModel(ModelBase):
def varsplits(self, use_pandas=False):
"""
Retrieve per-varia... | 36.62069 | 101 | 0.660075 |
7957d33b4ebd365066ed8e2758ede568260257a7 | 25,342 | py | Python | neutron/agent/linux/iptables_firewall.py | venkataanil/juno_neutron | 2e62e150c264ccae2dd75fb78caae453eaa77e9f | [
"Apache-2.0"
] | null | null | null | neutron/agent/linux/iptables_firewall.py | venkataanil/juno_neutron | 2e62e150c264ccae2dd75fb78caae453eaa77e9f | [
"Apache-2.0"
] | null | null | null | neutron/agent/linux/iptables_firewall.py | venkataanil/juno_neutron | 2e62e150c264ccae2dd75fb78caae453eaa77e9f | [
"Apache-2.0"
] | null | null | null | # Copyright 2012, Nachi Ueno, NTT MCL, 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
#
# Unles... | 44.381786 | 79 | 0.599913 |
7957d447ebe05304fae6f654848e2cce0c44d7c2 | 9,049 | py | Python | SPViT_Swin/data/cached_image_folder.py | zhuang-group/SPViT | 74f08c6e55fb6adc0322722cedfd2c25ebdee999 | [
"Apache-2.0"
] | 69 | 2021-11-23T23:44:38.000Z | 2022-03-15T01:27:30.000Z | SPViT_Swin/data/cached_image_folder.py | zip-group/SPViT | 74f08c6e55fb6adc0322722cedfd2c25ebdee999 | [
"Apache-2.0"
] | null | null | null | SPViT_Swin/data/cached_image_folder.py | zip-group/SPViT | 74f08c6e55fb6adc0322722cedfd2c25ebdee999 | [
"Apache-2.0"
] | 10 | 2021-11-25T01:26:38.000Z | 2022-03-14T04:59:42.000Z | # --------------------------------------------------------
# Swin Transformer
# Copyright (c) 2021 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ze Liu
# --------------------------------------------------------
# Modifications copyright (c) 2021 Zhuang AI Group, Haoyu He
import io
i... | 35.766798 | 115 | 0.590452 |
7957d44ea5c7acf1ec7c8b324c4d11a2df58fc2a | 550 | py | Python | emu/tests/test_wps_wordcounter.py | Ouranosinc/emu | f3b92f44555b9e85f8c62e8e34a8a59d420a1c67 | [
"Apache-2.0"
] | null | null | null | emu/tests/test_wps_wordcounter.py | Ouranosinc/emu | f3b92f44555b9e85f8c62e8e34a8a59d420a1c67 | [
"Apache-2.0"
] | 1 | 2020-11-11T03:21:22.000Z | 2020-11-11T03:21:22.000Z | emu/tests/test_wps_wordcounter.py | Ouranosinc/emu | f3b92f44555b9e85f8c62e8e34a8a59d420a1c67 | [
"Apache-2.0"
] | null | null | null | import pytest
from pywps import Service
from emu.tests.common import client_for, assert_response_success
from emu.processes.wps_wordcounter import WordCounter
@pytest.mark.online
def test_wps_wordcount():
client = client_for(Service(processes=[WordCounter()]))
datainputs = "text={0}".format(
"https:... | 28.947368 | 64 | 0.727273 |
7957d46cc9e244284883b5ead689554d76a74d9f | 2,698 | py | Python | tools/crawl_page/parse.py | willdonetang/taisi360 | 1b7dbc5269bc2ed87f59eab0bfa5c0f85db27072 | [
"Apache-2.0"
] | null | null | null | tools/crawl_page/parse.py | willdonetang/taisi360 | 1b7dbc5269bc2ed87f59eab0bfa5c0f85db27072 | [
"Apache-2.0"
] | null | null | null | tools/crawl_page/parse.py | willdonetang/taisi360 | 1b7dbc5269bc2ed87f59eab0bfa5c0f85db27072 | [
"Apache-2.0"
] | null | null | null | #!/bin/env
# -*- coding: utf-8 -*-
from langconv import *
from bs4 import BeautifulSoup
import re
import os
import json
# 输入Unicode编辑,输出Unicode
def big2simple(line):
# 转换繁体到简体
line = Converter('zh-hans').convert(line)
return line
def save_img_url(img_url, num):
img_url_file = open("img_url.txt", "a... | 24.527273 | 67 | 0.577094 |
7957d50969335a074a1d08c82d184c3fd9655994 | 8,607 | py | Python | Classifier.py | marcus-deans/Animal10-VGG-Classification | 84e3ea0dbfda277ff907b370f8659e7be39aed02 | [
"MIT"
] | 1 | 2021-12-30T17:37:41.000Z | 2021-12-30T17:37:41.000Z | Classifier.py | marcus-deans/Animal10-VGG-Classification | 84e3ea0dbfda277ff907b370f8659e7be39aed02 | [
"MIT"
] | null | null | null | Classifier.py | marcus-deans/Animal10-VGG-Classification | 84e3ea0dbfda277ff907b370f8659e7be39aed02 | [
"MIT"
] | 1 | 2021-04-29T14:06:48.000Z | 2021-04-29T14:06:48.000Z |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import tensorflow as tf
import keras
from keras import layers, applications, optimizers
from keras.layers import Input, Dense, Activation, MaxPool2D, ZeroPadding2D, BatchNormalization, Flatten, Conv2D, Dropout
... | 59.770833 | 214 | 0.765191 |
7957d6b0fbe90506c98074f57a7b7a5098b84346 | 983 | py | Python | test/test_resources_web_form_authentication.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 61 | 2018-05-17T05:57:09.000Z | 2022-03-08T13:59:21.000Z | test/test_resources_web_form_authentication.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 33 | 2018-06-26T16:21:14.000Z | 2022-03-03T20:55:47.000Z | test/test_resources_web_form_authentication.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 43 | 2018-02-24T05:45:53.000Z | 2022-03-31T22:15:16.000Z | # coding: utf-8
"""
Python InsightVM API Client
OpenAPI spec version: 3
Contact: support@rapid7.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.models.resources_web_form_authen... | 25.205128 | 120 | 0.748728 |
7957d7138c48071e39967039cf986988f790d46c | 2,900 | py | Python | momba/engine/time.py | koehlma/momba | 68d6431d2732570696d3c67a9e23006e6e3a7740 | [
"MIT"
] | 12 | 2021-01-18T14:38:32.000Z | 2022-01-17T09:16:52.000Z | momba/engine/time.py | koehlma/momba | 68d6431d2732570696d3c67a9e23006e6e3a7740 | [
"MIT"
] | 3 | 2021-05-16T15:26:34.000Z | 2022-02-21T20:46:55.000Z | momba/engine/time.py | koehlma/momba | 68d6431d2732570696d3c67a9e23006e6e3a7740 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
#
# Copyright (C) 2021, Saarland University
# Copyright (C) 2021, Maximilian Köhl <koehl@cs.uni-saarland.de>
from __future__ import annotations
import dataclasses as d
import typing as t
import abc
from .. import model
from ._engine import engine as _engine
from . import zones
from .transl... | 24.786325 | 83 | 0.674483 |
7957d905f901c651a7ce6d385402c67a6204cf77 | 15,144 | py | Python | tests/chainer_tests/test_reporter.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | tests/chainer_tests/test_reporter.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | 2 | 2018-01-09T23:05:30.000Z | 2018-01-19T01:19:34.000Z | tests/chainer_tests/test_reporter.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | import contextlib
import tempfile
import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import configuration
from chainer import functions
from chainer import testing
from chainer.testing import attr
class TestReporter(unittest.TestCase):
def test_empty_reporter(self):
... | 33.578714 | 79 | 0.573098 |
7957da5fd4b96ccfe2b3dc87c7af58ca04ac649b | 488 | py | Python | infodesk/migrations/0003_auto_20201103_1816.py | richardkefa/myneighbourhood | 2e07dd15a0eb717788f6e6426e06e0dcc5f639b0 | [
"MIT"
] | null | null | null | infodesk/migrations/0003_auto_20201103_1816.py | richardkefa/myneighbourhood | 2e07dd15a0eb717788f6e6426e06e0dcc5f639b0 | [
"MIT"
] | null | null | null | infodesk/migrations/0003_auto_20201103_1816.py | richardkefa/myneighbourhood | 2e07dd15a0eb717788f6e6426e06e0dcc5f639b0 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-03 15:16
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('infodesk', '0002_profiles_user'),
]
operations = [
migrations.AlterField(
model_name='user',
... | 24.4 | 127 | 0.641393 |
7957db23bf0389a90dc666573a959676ca69d0b2 | 4,017 | py | Python | spockbot/mcp/mcpacket.py | SpockBotMC/SpockBot | f89911551f18357720034fbaa52837a0d09f66ea | [
"MIT"
] | 171 | 2015-02-04T00:24:15.000Z | 2022-03-06T10:23:47.000Z | spockbot/mcp/mcpacket.py | SpockBotMC/SpockBot | f89911551f18357720034fbaa52837a0d09f66ea | [
"MIT"
] | 142 | 2015-02-04T02:17:51.000Z | 2021-11-07T22:37:27.000Z | spockbot/mcp/mcpacket.py | SpockBotMC/SpockBot | f89911551f18357720034fbaa52837a0d09f66ea | [
"MIT"
] | 60 | 2015-02-06T01:19:29.000Z | 2022-03-18T18:01:42.000Z | try:
basestring
except NameError:
basestring = str
import copy
import logging
import zlib
from time import gmtime, strftime
from spockbot.mcp import datautils, proto
from spockbot.mcp.bbuff import BoundBuffer, BufferUnderflowException
from spockbot.mcp.extensions import hashed_extensions
from spockbot.mcp.pro... | 35.548673 | 77 | 0.59771 |
7957ddd48f597afda38daa1b553440df15930cb1 | 345 | py | Python | .history/my_classes/FunctionParameters/default_values_20210702195552.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FunctionParameters/default_values_20210702195552.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/FunctionParameters/default_values_20210702195552.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """[Default values]
What happens at run time...
When modules are loaded: All the code is executed immediately.
Module Code
a = 10 the interger object 10 is created and a references it.
def func(a): the function object is created, and func references it.
print(a)
... | 24.642857 | 79 | 0.591304 |
7957de4df1581483516658db0927a49be0f1e6a4 | 25 | py | Python | Week 1: Integers, I-O, simple string operations/06.py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | Week 1: Integers, I-O, simple string operations/06.py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | Week 1: Integers, I-O, simple string operations/06.py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | print(int(input()) % 10)
| 12.5 | 24 | 0.6 |
7957de945d11b8d54044a2e93884cd29db7b2956 | 26,456 | py | Python | corehq/apps/couch_sql_migration/tests/test_casediff.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/couch_sql_migration/tests/test_casediff.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/couch_sql_migration/tests/test_casediff.py | tstalka/commcare-hq | 902412b0f97ba0daac173fe284f3adc4c01bcd76 | [
"BSD-3-Clause"
] | null | null | null | import logging
import os
from collections import defaultdict
from contextlib import contextmanager
from copy import deepcopy
from glob import glob
from inspect import signature
from signal import SIGINT
from django.test import SimpleTestCase
import attr
import gevent
from gevent.event import Event
from gevent.queue i... | 35.13413 | 95 | 0.578168 |
7957df8072452549aa57d86e28163a17abbfbd4e | 1,218 | py | Python | env/lib/python3.6/site-packages/django/core/cache/backends/dummy.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 58 | 2018-10-03T19:41:36.000Z | 2022-03-14T21:24:43.000Z | env/lib/python3.6/site-packages/django/core/cache/backends/dummy.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | env/lib/python3.6/site-packages/django/core/cache/backends/dummy.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | "Dummy cache backend"
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
class DummyCache(BaseCache):
def __init__(self, host, *args, **kwargs):
BaseCache.__init__(self, *args, **kwargs)
def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
key = self.make_key... | 27.681818 | 70 | 0.648604 |
7957dfd5618f3270e52b372743b25f721b495a05 | 42 | py | Python | api/__init__.py | derekmerck/DixelKit | 7a3e613deed647a3cef7d3e1fe0d521d827b6ee3 | [
"MIT"
] | null | null | null | api/__init__.py | derekmerck/DixelKit | 7a3e613deed647a3cef7d3e1fe0d521d827b6ee3 | [
"MIT"
] | null | null | null | api/__init__.py | derekmerck/DixelKit | 7a3e613deed647a3cef7d3e1fe0d521d827b6ee3 | [
"MIT"
] | null | null | null | __all__ = ["Montage", "Orthanc", "Splunk"] | 42 | 42 | 0.642857 |
7957e089e31a6ac793238a86fb36207d61d9bb47 | 1,908 | py | Python | tensorflow/python/kernel_tests/strings_ops/string_upper_op_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 190,993 | 2015-11-09T13:17:30.000Z | 2022-03-31T23:05:27.000Z | tensorflow/python/kernel_tests/strings_ops/string_upper_op_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 48,461 | 2015-11-09T14:21:11.000Z | 2022-03-31T23:17:33.000Z | tensorflow/python/kernel_tests/strings_ops/string_upper_op_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 104,981 | 2015-11-09T13:40:17.000Z | 2022-03-31T19:51:54.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 36 | 80 | 0.658281 |
7957e11196ebc0fd698e754b65e942e2b8b463fe | 680 | bzl | Python | cuda/private/toolchain/cuda_configure.bzl | neilisaac/rules_cuda | 5355abe64c9cdbd9fb2ce9c2b12987a9ade7996b | [
"Apache-2.0"
] | 4 | 2021-08-18T12:18:01.000Z | 2022-03-21T09:44:51.000Z | cuda/private/toolchain/cuda_configure.bzl | neilisaac/rules_cuda | 5355abe64c9cdbd9fb2ce9c2b12987a9ade7996b | [
"Apache-2.0"
] | 1 | 2022-02-22T06:46:32.000Z | 2022-02-22T06:46:33.000Z | cuda/private/toolchain/cuda_configure.bzl | neilisaac/rules_cuda | 5355abe64c9cdbd9fb2ce9c2b12987a9ade7996b | [
"Apache-2.0"
] | 1 | 2022-03-24T09:00:36.000Z | 2022-03-24T09:00:36.000Z | load("//cuda:private/toolchain/cuda_configure_windows.bzl", "configure_windows_toolchain")
load("//cuda:private/toolchain/cuda_configure_linux.bzl", "configure_linux_toolchain")
load("//cuda:private/toolchain/lib_cuda_configure.bzl",
"get_cpu_value",
"auto_configure_fail"
)
def _cuda_configure_impl(repo... | 34 | 91 | 0.738235 |
7957e19767d3f8f570e3fd168c8a6b470699c9eb | 4,539 | py | Python | venv/Lib/site-packages/tklib37/Table.py | GabrielAmare/Darts | 182748d821b8c1838071f3b28724d0d9b095dcf9 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tklib37/Table.py | GabrielAmare/Darts | 182748d821b8c1838071f3b28724d0d9b095dcf9 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tklib37/Table.py | GabrielAmare/Darts | 182748d821b8c1838071f3b28724d0d9b095dcf9 | [
"MIT"
] | null | null | null | from tkinter import Frame, NSEW
class Table(Frame):
def __init__(self, root, **cfg):
super().__init__(root, **cfg)
self.widgets = {}
self.row_weights, self.col_weights = {}, {}
@property
def n_cols(self):
return max((col for row, col in self.widgets.keys()), default=-1) + ... | 33.873134 | 129 | 0.614453 |
7957e1be9b787c120719d95738be37e66741b96b | 4,202 | py | Python | Python/Product/TestAdapter.Executor/PythonFiles/testing_tools/adapter/pytest/_discovery.py | techkey/PTVS | 8355e67eedd8e915ca49bd38a2f36172696fd903 | [
"Apache-2.0"
] | 404 | 2019-05-07T02:21:57.000Z | 2022-03-31T17:03:04.000Z | Python/Product/TestAdapter.Executor/PythonFiles/testing_tools/adapter/pytest/_discovery.py | techkey/PTVS | 8355e67eedd8e915ca49bd38a2f36172696fd903 | [
"Apache-2.0"
] | 1,672 | 2019-05-06T21:09:38.000Z | 2022-03-31T23:16:04.000Z | Python/Product/TestAdapter.Executor/PythonFiles/testing_tools/adapter/pytest/_discovery.py | techkey/PTVS | 8355e67eedd8e915ca49bd38a2f36172696fd903 | [
"Apache-2.0"
] | 186 | 2019-05-13T03:17:37.000Z | 2022-03-31T16:24:05.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from __future__ import absolute_import, print_function
import sys
import pytest
from .. import util, discovery
from ._pytest_item import parse_item
#note: this must match testlauncher.py
def patch_translate_non_printable()... | 36.53913 | 117 | 0.649215 |
7957e1f970d03281921a94fec1f0395c7ffb5438 | 32,522 | py | Python | cabot3/cabotapp/views.py | senzil/cabot | a5d609b815d01dfac85f38e3fee6bc65d962e8bc | [
"MIT"
] | 3 | 2021-07-24T05:49:32.000Z | 2021-09-13T13:59:12.000Z | cabot3/cabotapp/views.py | senzil/cabot | a5d609b815d01dfac85f38e3fee6bc65d962e8bc | [
"MIT"
] | 5 | 2021-08-31T00:07:39.000Z | 2021-08-31T01:43:55.000Z | cabot3/cabotapp/views.py | senzil/cabot | a5d609b815d01dfac85f38e3fee6bc65d962e8bc | [
"MIT"
] | null | null | null | import json
import re
from datetime import date, datetime, timedelta
from itertools import dropwhile, groupby, zip_longest
import os
import requests
from .alert import AlertPlugin, AlertPluginUserData
from cabot3.cabotapp import alert
from cabot3.cabotapp.utils import cabot_needs_setup
from dateutil.relativedelta impor... | 33.458848 | 118 | 0.625392 |
7957e34a33360ba1d6953ee06f37f4d191ff2d53 | 11,929 | py | Python | rasa_nlu_gao/models/nlp_architect/utils/text.py | azuredsky/rasa_nlu_gq | fee512aa34d5b091d6ce988f1e2901df2ee0a4fc | [
"Apache-2.0"
] | 1 | 2019-03-12T09:46:37.000Z | 2019-03-12T09:46:37.000Z | rasa_nlu_gao/models/nlp_architect/utils/text.py | azuredsky/rasa_nlu_gq | fee512aa34d5b091d6ce988f1e2901df2ee0a4fc | [
"Apache-2.0"
] | null | null | null | rasa_nlu_gao/models/nlp_architect/utils/text.py | azuredsky/rasa_nlu_gq | fee512aa34d5b091d6ce988f1e2901df2ee0a4fc | [
"Apache-2.0"
] | null | null | null | # ******************************************************************************
# Copyright 2017-2018 Intel 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://... | 30.2 | 99 | 0.559142 |
7957e371bf22b7587c0aa49a6fc0674156883f1e | 2,676 | py | Python | setup.py | sj6077/DeepSpeed | c70b472a68bc9ca387b14a1b35814c582d0ec94b | [
"MIT"
] | 1 | 2020-05-11T03:24:15.000Z | 2020-05-11T03:24:15.000Z | setup.py | sj6077/DeepSpeed | c70b472a68bc9ca387b14a1b35814c582d0ec94b | [
"MIT"
] | null | null | null | setup.py | sj6077/DeepSpeed | c70b472a68bc9ca387b14a1b35814c582d0ec94b | [
"MIT"
] | null | null | null | """
Copyright 2020 The Microsoft DeepSpeed Team
DeepSpeed library
Create a new wheel via the following command: python setup.py bdist_wheel
The wheel will be located at: dist/*.whl
"""
import os
import torch
from deepspeed import __version__ as ds_version
from setuptools import setup, find_packages
from torch.utils... | 36.657534 | 107 | 0.626682 |
7957e492189fddd46325789ca2dbdc47922b7552 | 1,468 | py | Python | guts/i18n.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | null | null | null | guts/i18n.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | null | null | null | guts/i18n.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | 1 | 2022-03-03T05:41:31.000Z | 2022-03-03T05:41:31.000Z | # Copyright (c) 2015 Aptira Pty Ltd.
# 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 requi... | 28.230769 | 78 | 0.746594 |
7957e49539d2b504a28ba959e0d1750f21d0a871 | 687 | py | Python | runscript_weak.py | SudeepDasari/video_prediction-1 | ef0953b514aa1b7a1f5e96fd30aebef01334fb2d | [
"MIT"
] | null | null | null | runscript_weak.py | SudeepDasari/video_prediction-1 | ef0953b514aa1b7a1f5e96fd30aebef01334fb2d | [
"MIT"
] | null | null | null | runscript_weak.py | SudeepDasari/video_prediction-1 | ef0953b514aa1b7a1f5e96fd30aebef01334fb2d | [
"MIT"
] | null | null | null | # strong scaling
import numpy as np
import os
ngpus = np.array([1,2,4,8])
bsizes = 16*ngpus
for i, g in enumerate(ngpus):
indexlist = [str(i_gpu) for i_gpu in range(g)]
gpustr = ','.join(indexlist)
bsize = bsizes[i]
cmd = 'CUDA_VISIBLE_DEVICES={} python scripts/train.py --input_dir /mnt/pushing_data/c... | 45.8 | 422 | 0.746725 |
7957e54dd8866aacb1eb46f69bf327bdcab0f6b9 | 108 | py | Python | frameworks/hdfs/tests/config.py | krisis/dcos-commons | 715d27f3e43a5e25b8ecb4beed97333b136fdd9a | [
"Apache-2.0"
] | 1 | 2021-01-06T21:14:00.000Z | 2021-01-06T21:14:00.000Z | frameworks/hdfs/tests/config.py | krisis/dcos-commons | 715d27f3e43a5e25b8ecb4beed97333b136fdd9a | [
"Apache-2.0"
] | null | null | null | frameworks/hdfs/tests/config.py | krisis/dcos-commons | 715d27f3e43a5e25b8ecb4beed97333b136fdd9a | [
"Apache-2.0"
] | null | null | null | PACKAGE_NAME = 'hdfs'
DEFAULT_TASK_COUNT = 10 # 3 data nodes, 3 journal nodes, 2 name nodes, 2 zkfc nodes
| 27 | 84 | 0.731481 |
7957e54efa843c2addec78cb6665162d571cf950 | 691 | py | Python | brainstorm/all.py | PyCN/brainstorm | 8f1fc886faf268b25085fa5c95bf106b1805d766 | [
"MIT"
] | 1,473 | 2015-10-25T19:12:45.000Z | 2022-03-13T01:00:51.000Z | brainstorm/all.py | PyCN/brainstorm | 8f1fc886faf268b25085fa5c95bf106b1805d766 | [
"MIT"
] | 50 | 2015-10-25T19:14:17.000Z | 2018-10-03T07:48:25.000Z | brainstorm/all.py | PyCN/brainstorm | 8f1fc886faf268b25085fa5c95bf106b1805d766 | [
"MIT"
] | 209 | 2015-10-25T20:22:06.000Z | 2021-07-23T00:00:39.000Z | #!/usr/bin/env python
# coding=utf-8
"""
Convenience namespace containing all relevant brainstorm objects and functions.
"""
from __future__ import division, print_function, unicode_literals
from brainstorm.data_iterators import *
from brainstorm.describable import create_from_description, get_description
from brainst... | 34.55 | 79 | 0.837916 |
7957e59ae2ae56c3acf5d1d1eaec63c0a260530c | 403 | py | Python | integration/data/util.py | MalibuKoKo/longhorn-engine | b31b3f177ebaadb222f733073ca6015ad01ae3ef | [
"Apache-2.0"
] | null | null | null | integration/data/util.py | MalibuKoKo/longhorn-engine | b31b3f177ebaadb222f733073ca6015ad01ae3ef | [
"Apache-2.0"
] | null | null | null | integration/data/util.py | MalibuKoKo/longhorn-engine | b31b3f177ebaadb222f733073ca6015ad01ae3ef | [
"Apache-2.0"
] | null | null | null | import os
import hashlib
def file(f):
return os.path.join(_base(), '../../{}'.format(f))
def _base():
return os.path.dirname(__file__)
def read_file(file_path, offset, length):
assert os.path.exists(file_path)
f = open(file_path, 'r')
f.seek(offset)
data = f.read(length)
f.close()
... | 16.791667 | 54 | 0.647643 |
7957e6dee1c7e20c491b7717c253307ccd8c663f | 1,653 | py | Python | util/canvas_api_extension.py | adgj-1/cs221bot | de6867b6eb97bc45148f6c8dd4f71ba553baf1d7 | [
"Unlicense"
] | null | null | null | util/canvas_api_extension.py | adgj-1/cs221bot | de6867b6eb97bc45148f6c8dd4f71ba553baf1d7 | [
"Unlicense"
] | null | null | null | util/canvas_api_extension.py | adgj-1/cs221bot | de6867b6eb97bc45148f6c8dd4f71ba553baf1d7 | [
"Unlicense"
] | null | null | null | from typing import List
from canvasapi.course import Course
from canvasapi.requester import Requester
from canvasapi.util import combine_kwargs, get_institution_url
def get_course_stream(course_id: int, base_url, access_token, **kwargs):
"""
Parameters
----------
course_id : `int`
Course id
... | 22.04 | 72 | 0.62069 |
7957e71e5127b1f2c8d0aaece9157e181c25f1e6 | 1,450 | py | Python | bespin/task_finder.py | delfick/bespin | 4fa21875f0cdc32a70b33cdc90ce5196c0a2cbcd | [
"MIT"
] | 5 | 2017-04-05T00:46:41.000Z | 2017-11-09T01:21:44.000Z | bespin/task_finder.py | delfick/bespin | 4fa21875f0cdc32a70b33cdc90ce5196c0a2cbcd | [
"MIT"
] | 69 | 2016-10-11T04:40:09.000Z | 2022-01-12T23:57:27.000Z | bespin/task_finder.py | delfick/bespin | 4fa21875f0cdc32a70b33cdc90ce5196c0a2cbcd | [
"MIT"
] | 7 | 2016-10-11T04:32:21.000Z | 2017-12-18T05:59:17.000Z | """
Responsible for finding tasks in the configuration and executing them
"""
from bespin.actions import available_actions, default_actions
from bespin.option_spec.task_objs import Task
from bespin.errors import BadTask
class TaskFinder(object):
def __init__(self, collector):
self.tasks = {}
self.... | 35.365854 | 117 | 0.670345 |
7957e776bd689135b16f01ee8b510c69dc04336a | 10,980 | py | Python | dhl_delivery/pickup.py | ivangsm/dhl_delivery | aa7ae5251715350a1ffa3ecbc96c8ac233f5dd21 | [
"MIT"
] | null | null | null | dhl_delivery/pickup.py | ivangsm/dhl_delivery | aa7ae5251715350a1ffa3ecbc96c8ac233f5dd21 | [
"MIT"
] | null | null | null | dhl_delivery/pickup.py | ivangsm/dhl_delivery | aa7ae5251715350a1ffa3ecbc96c8ac233f5dd21 | [
"MIT"
] | null | null | null | import dhl_delivery
import dhl_delivery.config
import dhl_delivery.common
import dhl_delivery.dhl_process
import xmltodict
import datetime
import random
class Pickup:
def __init__(self):
self.date_now = datetime.datetime.now()
def schedule_pickup(self, dict_param):
return_status = True
... | 42.068966 | 150 | 0.528506 |
7957e777486bcb995d1c62c383c546ba04ce3643 | 227 | py | Python | feder/letters/logs/apps.py | dzemeuksis/feder | 32ef7793af6256d4ecada61505c7baf334b34419 | [
"MIT"
] | 16 | 2015-08-11T17:20:26.000Z | 2022-02-11T20:15:41.000Z | feder/letters/logs/apps.py | dzemeuksis/feder | 32ef7793af6256d4ecada61505c7baf334b34419 | [
"MIT"
] | 534 | 2015-08-04T00:10:54.000Z | 2022-03-17T10:44:47.000Z | feder/letters/logs/apps.py | dzemeuksis/feder | 32ef7793af6256d4ecada61505c7baf334b34419 | [
"MIT"
] | 10 | 2017-08-30T13:34:32.000Z | 2022-02-18T13:00:35.000Z | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class LogsConfig(AppConfig):
name = "feder.letters.logs"
verbose_name = _("Logs of letter")
def ready(self):
pass
| 20.636364 | 55 | 0.713656 |
7957e84148b391409ec52964b9df28d896ff0582 | 29 | py | Python | Server/app/models/MongoDB/__init__.py | Jaws-bar/Entry3.0-InterviewSystem | 15385f9982c0c4e9aed970263b7ea1e50d6163ca | [
"MIT"
] | null | null | null | Server/app/models/MongoDB/__init__.py | Jaws-bar/Entry3.0-InterviewSystem | 15385f9982c0c4e9aed970263b7ea1e50d6163ca | [
"MIT"
] | null | null | null | Server/app/models/MongoDB/__init__.py | Jaws-bar/Entry3.0-InterviewSystem | 15385f9982c0c4e9aed970263b7ea1e50d6163ca | [
"MIT"
] | null | null | null | from .interview_data import * | 29 | 29 | 0.827586 |
7957e880de5bf42cfa98c523d38828ff2a8f80b0 | 15,338 | py | Python | shap/_explanation.py | regev-lab/shap | 3e822194c83c327320f70e9a836294f768ebf468 | [
"MIT"
] | 1 | 2020-08-31T02:46:13.000Z | 2020-08-31T02:46:13.000Z | shap/_explanation.py | WisePanda007/shap | 13c6141ebe459f34c0b69293135124eca1211fa1 | [
"MIT"
] | null | null | null | shap/_explanation.py | WisePanda007/shap | 13c6141ebe459f34c0b69293135124eca1211fa1 | [
"MIT"
] | 2 | 2020-12-06T22:39:08.000Z | 2021-12-25T01:10:16.000Z |
import pandas as pd
import numpy as np
import scipy as sp
import sys
import warnings
import copy
from slicer import Slicer, Alias
# from ._order import Order
from .utils._general import OpChain
# slicer confuses pylint...
# pylint: disable=no-member
op_chain_root = OpChain("shap.Explanation")
class MetaExplanation(... | 31.954167 | 122 | 0.5858 |
7957e95ff85ad978cca910a65d00a3494cc9567b | 1,897 | py | Python | example/example_python_api_extended.py | maxipi/kostra | c3b58518b04a9d5b804cbd17cc67dcedf9970fb1 | [
"MIT"
] | 20 | 2018-11-09T17:35:12.000Z | 2022-03-30T18:27:03.000Z | example/example_python_api_extended.py | maxipi/kostra | c3b58518b04a9d5b804cbd17cc67dcedf9970fb1 | [
"MIT"
] | 3 | 2021-03-07T13:09:00.000Z | 2021-10-15T13:26:48.000Z | example/example_python_api_extended.py | maxipi/kostra | c3b58518b04a9d5b804cbd17cc67dcedf9970fb1 | [
"MIT"
] | 8 | 2018-11-13T07:14:13.000Z | 2021-12-03T06:48:20.000Z | from idf_analysis import IntensityDurationFrequencyAnalyse
from idf_analysis.definitions import *
import pandas as pd
from os import path
# sub-folder for the results
output_directory = path.join('ehyd_112086_idf_data')
# initialize of the analysis class
idf = IntensityDurationFrequencyAnalyse(series_kind=SERIES.PART... | 33.280702 | 135 | 0.768055 |
7957ea89b762763566139edfbf0a75401dc4e268 | 11,487 | py | Python | mmcv/utils/misc.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | 1 | 2022-03-18T02:41:11.000Z | 2022-03-18T02:41:11.000Z | mmcv/utils/misc.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | 1 | 2022-01-23T13:28:49.000Z | 2022-01-23T13:28:49.000Z | mmcv/utils/misc.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import collections.abc
import functools
import itertools
import subprocess
import warnings
from collections import abc
from importlib import import_module
from inspect import getfullargspec
from itertools import repeat
# From PyTorch internals
def _ntuple(n):
def p... | 30.388889 | 79 | 0.60538 |
7957eb4f7134f636027b9ff69b04071e4507f9dc | 612 | py | Python | scripts/inspect_docker_network.py | giavac/docker-scripts | a8ec3e3bce63593f3393bb34610940c73f9c6386 | [
"MIT"
] | 3 | 2016-02-06T12:45:21.000Z | 2016-08-24T16:01:55.000Z | scripts/inspect_docker_network.py | giavac/docker-scripts | a8ec3e3bce63593f3393bb34610940c73f9c6386 | [
"MIT"
] | null | null | null | scripts/inspect_docker_network.py | giavac/docker-scripts | a8ec3e3bce63593f3393bb34610940c73f9c6386 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Get the output of 'docker network inspect' for a given network
# and return containers names and their IP address
import json
import subprocess
import sys
network_name = sys.argv[1]
network_json = subprocess.check_output(["docker", "network", "inspect", network_name])
network = json.loads(network... | 34 | 110 | 0.730392 |
7957ec2e9a2f4dbb69131b0e7e49c4edfaf32c42 | 855 | py | Python | cog_translator/scripts/cli.py | vincentsarago/cog-translator | 46499244b81bb5df044e90c47cceb4a5daeeecaa | [
"BSD-2-Clause"
] | 5 | 2018-11-04T14:18:01.000Z | 2019-11-14T08:05:10.000Z | cog_translator/scripts/cli.py | vincentsarago/cog-translator | 46499244b81bb5df044e90c47cceb4a5daeeecaa | [
"BSD-2-Clause"
] | 1 | 2018-11-02T15:22:11.000Z | 2018-11-02T15:22:11.000Z | cog_translator/scripts/cli.py | vincentsarago/cog-translator | 46499244b81bb5df044e90c47cceb4a5daeeecaa | [
"BSD-2-Clause"
] | 1 | 2021-01-30T14:40:21.000Z | 2021-01-30T14:40:21.000Z | """Worker."""
import os
import json
import sys
import logging
from cog_translator import process
logger = logging.getLogger("cog_translator")
logger.setLevel(logging.INFO)
def main():
"""Load message and start process."""
try:
message = json.loads(os.environ["Message"])
logger.info(message... | 19.883721 | 51 | 0.583626 |
7957ecb5bc5fbcd7568be172a943dccb826568e9 | 3,696 | py | Python | Validation/EcalRecHits/test/Pion_Pt60GeV_all_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/EcalRecHits/test/Pion_Pt60GeV_all_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/EcalRecHits/test/Pion_Pt60GeV_all_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("EcalHitsValid")
# initialize MessageLogger
process.load("FWCore.MessageLogger.MessageLogger_cfi")
# initialize magnetic field
process.load("Configuration.StandardSequences.MagneticField_cff")
# geometry (Only Ecal)
process.load("Geometry.EcalCommonData... | 35.538462 | 103 | 0.802219 |
7957edf68cc8a1461fccfc2de93ad5250dc9fdb5 | 21,833 | py | Python | tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 24 | 2018-02-01T15:49:22.000Z | 2021-01-11T16:31:18.000Z | tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 2 | 2018-09-09T07:29:07.000Z | 2019-03-11T07:14:45.000Z | tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 7 | 2019-05-31T02:57:03.000Z | 2020-08-09T20:15:25.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.134191 | 80 | 0.637292 |
7957ee9c298fe3d0525e4f5ee664e0469349cd20 | 4,591 | py | Python | contrib/testgen/gen_base58_test_vectors.py | ecryptoproject/bitcoinreco | 82ba8f9b62b5398ff82a244e81fe5639933e8567 | [
"MIT"
] | null | null | null | contrib/testgen/gen_base58_test_vectors.py | ecryptoproject/bitcoinreco | 82ba8f9b62b5398ff82a244e81fe5639933e8567 | [
"MIT"
] | null | null | null | contrib/testgen/gen_base58_test_vectors.py | ecryptoproject/bitcoinreco | 82ba8f9b62b5398ff82a244e81fe5639933e8567 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2012-2017 The Bitcoinreco Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Generate valid and invalid base58 address and private key test vectors.
Usage:
gen_base58_tes... | 34.518797 | 91 | 0.614027 |
7957ef32dd29a6497a901b44a59be90800ea46cd | 820 | py | Python | ou_noise.py | TitovaEkaterina/Snake_RL | 883cd560c008f7f7351d5c5e87f7ea5732a8fbfa | [
"MIT"
] | null | null | null | ou_noise.py | TitovaEkaterina/Snake_RL | 883cd560c008f7f7351d5c5e87f7ea5732a8fbfa | [
"MIT"
] | null | null | null | ou_noise.py | TitovaEkaterina/Snake_RL | 883cd560c008f7f7351d5c5e87f7ea5732a8fbfa | [
"MIT"
] | null | null | null | import numpy as np
import numpy.random as nr
class OUNoise:
"""docstring for OUNoise"""
def __init__(self,action_dimension,mu=0, theta=0.3, sigma=0.2):
self.action_dimension = action_dimension
self.mu = mu
self.theta = theta
self.sigma = sigma
self.state = np.ones(self.a... | 25.625 | 71 | 0.6 |
7957efae53cc1d4551244cca2c8efd8c5f01c911 | 14,639 | py | Python | history/management/commands/triggers.py | lbrant1/django-history-triggers | d955be0ffaf28e006e0fe5f4bc078364b336ccd8 | [
"BSD-2-Clause"
] | null | null | null | history/management/commands/triggers.py | lbrant1/django-history-triggers | d955be0ffaf28e006e0fe5f4bc078364b336ccd8 | [
"BSD-2-Clause"
] | null | null | null | history/management/commands/triggers.py | lbrant1/django-history-triggers | d955be0ffaf28e006e0fe5f4bc078364b336ccd8 | [
"BSD-2-Clause"
] | null | null | null | from django.core.management.base import BaseCommand
from django.db import connections, transaction
from six import string_types
from django.utils.encoding import force_bytes
from history import conf
import hashlib
def truncate_long_name(name):
# This is copied from django to shorten names that would exceed post... | 41.353107 | 146 | 0.614045 |
7957efbac9aebc86f25f6565c80d21f727899e79 | 43,249 | py | Python | vrotas_tsp_opensource.py | victorccaldas/vrotas_tsp_pcv | 0d68e54aa3edf9b07e553f5f76c206c2588acf1b | [
"MIT"
] | null | null | null | vrotas_tsp_opensource.py | victorccaldas/vrotas_tsp_pcv | 0d68e54aa3edf9b07e553f5f76c206c2588acf1b | [
"MIT"
] | null | null | null | vrotas_tsp_opensource.py | victorccaldas/vrotas_tsp_pcv | 0d68e54aa3edf9b07e553f5f76c206c2588acf1b | [
"MIT"
] | null | null | null | from tkinter.scrolledtext import ScrolledText
from geopy.geocoders import Nominatim
from datetime import timedelta
from datetime import datetime
from tkinter import *
import webbrowser
import googlemaps
import requests
import polyline
import folium
import psutil
import time
import sys
import os
#c... | 46.206197 | 224 | 0.664085 |
7957f02e6de61c5c0b9a34d31923a99bf138fd55 | 2,657 | py | Python | backend/products/tests/test_models.py | waterunder/dashboard | 3790537ce29f83d631e0c14c12fff77515759e5b | [
"MIT"
] | null | null | null | backend/products/tests/test_models.py | waterunder/dashboard | 3790537ce29f83d631e0c14c12fff77515759e5b | [
"MIT"
] | 75 | 2020-08-17T15:22:42.000Z | 2021-12-09T09:11:37.000Z | backend/products/tests/test_models.py | waterunder/dashboard | 3790537ce29f83d631e0c14c12fff77515759e5b | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.utils import timezone
from products.factories import ProductFactory
from products.models import Product
from sellers.factories import SellerFactory, UserFactory
class ProductModelTests(TestCase):
def setUp(self):
... | 39.073529 | 67 | 0.728641 |
7957f0783e40964525b6ca1ce55159c5aed7de0a | 1,629 | py | Python | libioc/Config/Host/__init__.py | himrock922/libioc | 83111de2320c96946234eec852c00de72482ea0f | [
"BSD-2-Clause"
] | 37 | 2016-09-15T12:23:39.000Z | 2018-11-16T15:43:00.000Z | libioc/Config/Host/__init__.py | himrock922/libioc | 83111de2320c96946234eec852c00de72482ea0f | [
"BSD-2-Clause"
] | 351 | 2017-08-19T16:45:44.000Z | 2018-12-30T15:21:17.000Z | libioc/Config/Host/__init__.py | himrock922/libioc | 83111de2320c96946234eec852c00de72482ea0f | [
"BSD-2-Clause"
] | 10 | 2016-10-10T02:10:59.000Z | 2018-11-15T13:06:45.000Z | # Copyright (c) 2017-2019, Stefan Grönke
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted providing that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions... | 41.769231 | 73 | 0.7655 |
7957f0abbebee332784c717aaa05fb6cc799657b | 1,146 | py | Python | HttpRunnerManager/urls.py | zhouhuiyin/HttpRunnerNewManager | 5cbee907cf1bbe358e106f61b4aae0ee3f2ec04e | [
"MIT"
] | 5 | 2020-04-29T06:17:08.000Z | 2020-07-07T11:52:47.000Z | HttpRunnerManager/urls.py | zhouhuiyin/HttpRunnerNewManager | 5cbee907cf1bbe358e106f61b4aae0ee3f2ec04e | [
"MIT"
] | 3 | 2020-04-29T06:57:36.000Z | 2020-05-19T00:58:30.000Z | HttpRunnerManager/urls.py | zhouhuiyin/HttpRunnerNewManager | 5cbee907cf1bbe358e106f61b4aae0ee3f2ec04e | [
"MIT"
] | 1 | 2020-07-07T11:53:21.000Z | 2020-07-07T11:53:21.000Z | """HttpRunnerManager URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'... | 39.517241 | 87 | 0.684991 |
7957f0d384986c7c176fde9208f13d792e96282d | 3,860 | py | Python | scripts/utils/check-kube-config.py | acmenezes/community-operators | 9e33ce298168d4f0e319b95c8c05b2c3191b1b52 | [
"Apache-2.0"
] | null | null | null | scripts/utils/check-kube-config.py | acmenezes/community-operators | 9e33ce298168d4f0e319b95c8c05b2c3191b1b52 | [
"Apache-2.0"
] | 5 | 2019-05-07T00:09:05.000Z | 2019-11-04T18:51:35.000Z | scripts/utils/check-kube-config.py | acmenezes/community-operators | 9e33ce298168d4f0e319b95c8c05b2c3191b1b52 | [
"Apache-2.0"
] | 2 | 2020-03-04T11:13:17.000Z | 2020-04-06T08:54:17.000Z | import yaml
import re
from sys import exit
from lib import pick
from os import path, environ, system, WEXITSTATUS
from pathlib import Path
class bcolors:
OK = "\033[0;32m"
WARN = "\033[0;33m"
ERR = "\033[0;31m"
NC = "\033[0m"
class messages:
CONFIG = 'Find kube config \t [%s %s %s]'
CLUSTER ... | 33.565217 | 127 | 0.624611 |
7957f16952fec8e0a077def861ec87ef3e6fbbac | 18,827 | py | Python | venv/Lib/site-packages/sklearn/linear_model/_passive_aggressive.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/sklearn/linear_model/_passive_aggressive.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/sklearn/linear_model/_passive_aggressive.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | # Authors: Rob Zinkov, Mathieu Blondel
# License: BSD 3 clause
from ._stochastic_gradient import BaseSGDClassifier
from ._stochastic_gradient import BaseSGDRegressor
from ._stochastic_gradient import DEFAULT_EPSILON
class PassiveAggressiveClassifier(BaseSGDClassifier):
"""Passive Aggressive Classifier.
... | 34.168784 | 81 | 0.597759 |
7957f256cb6812f2483d1008e33e8ffdb1c20da5 | 6,153 | py | Python | dragonfly/exd/unittest_domains.py | anonymous-submission000/mobo | 090f774d742c7155c5e5ba01c10e7db7b93b6a0a | [
"MIT"
] | 1 | 2022-02-17T08:50:47.000Z | 2022-02-17T08:50:47.000Z | dragonfly/exd/unittest_domains.py | anonymous-submission000/mobo | 090f774d742c7155c5e5ba01c10e7db7b93b6a0a | [
"MIT"
] | null | null | null | dragonfly/exd/unittest_domains.py | anonymous-submission000/mobo | 090f774d742c7155c5e5ba01c10e7db7b93b6a0a | [
"MIT"
] | null | null | null | """
Unit tests for domains.py
-- kandasamy@cs.cmu.edu
"""
# pylint: disable=invalid-name
from __future__ import absolute_import
import numpy as np
# Local imports
from . import domains
from ..utils.base_test_class import BaseTestClass, execute_tests
from ..utils.general_utils import map_to_bounds
class Domain... | 36.625 | 90 | 0.561515 |
7957f28c7459bb90c718ea2ebc120bf9c36783cb | 2,165 | py | Python | hazelcast/protocol/codec/custom/sql_error_codec.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | null | null | null | hazelcast/protocol/codec/custom/sql_error_codec.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | null | null | null | hazelcast/protocol/codec/custom/sql_error_codec.py | tonytheonlypony/hazelcast-python-client | 3aafeaf2ebc05aee4f2386c62c079db496a7c81f | [
"Apache-2.0"
] | null | null | null | from hazelcast.protocol.builtin import FixSizedTypesCodec, CodecUtil
from hazelcast.serialization.bits import *
from hazelcast.protocol.client_message import END_FRAME_BUF, END_FINAL_FRAME_BUF, SIZE_OF_FRAME_LENGTH_AND_FLAGS, create_initial_buffer_custom
from hazelcast.sql import _SqlError
from hazelcast.protocol.built... | 51.547619 | 142 | 0.787991 |
7957f441c17b9fd1e9decb076fdf49b6a82b349e | 1,426 | py | Python | truffe2/truffe/management/commands/export_users.py | JonathanCollaud/truffe2 | 5cbb055ac1acf7e7dc697340618fcb56c67fbd91 | [
"BSD-2-Clause"
] | 9 | 2016-09-14T02:19:19.000Z | 2020-10-18T14:52:14.000Z | truffe2/truffe/management/commands/export_users.py | JonathanCollaud/truffe2 | 5cbb055ac1acf7e7dc697340618fcb56c67fbd91 | [
"BSD-2-Clause"
] | 19 | 2016-11-09T21:28:51.000Z | 2021-02-10T22:37:31.000Z | truffe2/truffe/management/commands/export_users.py | JonathanCollaud/truffe2 | 5cbb055ac1acf7e7dc697340618fcb56c67fbd91 | [
"BSD-2-Clause"
] | 13 | 2016-12-31T14:22:09.000Z | 2020-12-27T19:43:19.000Z | from django.core.management.base import BaseCommand, CommandError
from users.models import TruffeUser, UserPrivacy
import json
class Command(BaseCommand):
help = 'Dump users'
def handle(self, *args, **options):
LEVEL_MAPPING = {
'prive': 'private',
'groupe': 'com',
... | 32.409091 | 113 | 0.56662 |
7957f46d33d06e1035bb35e0662a475e8b8dddeb | 6,275 | py | Python | marshmallow_oneofschema/one_of_schema.py | sjhewitt/marshmallow-oneofschema | 40af0fa74bbf41a6a1fe0a288f5062b527f1acfd | [
"MIT"
] | null | null | null | marshmallow_oneofschema/one_of_schema.py | sjhewitt/marshmallow-oneofschema | 40af0fa74bbf41a6a1fe0a288f5062b527f1acfd | [
"MIT"
] | null | null | null | marshmallow_oneofschema/one_of_schema.py | sjhewitt/marshmallow-oneofschema | 40af0fa74bbf41a6a1fe0a288f5062b527f1acfd | [
"MIT"
] | null | null | null | from marshmallow import Schema, ValidationError
class OneOfSchema(Schema):
"""
This is a special kind of schema that actually multiplexes other schemas
based on object type. When serializing values, it uses get_obj_type() method
to get object type name. Then it uses `type_schemas` name-to-Schema mappi... | 34.103261 | 88 | 0.565259 |
7957f5b70c449781911e8a7cbd5e8c9bd1c80ec7 | 12,012 | py | Python | tests/custom_object_test.py | mbmccoy/jax | 74346f464bc8369d81964305fcf05f95f43fb2d3 | [
"Apache-2.0"
] | 2 | 2021-09-27T06:33:20.000Z | 2022-01-08T10:03:33.000Z | tests/custom_object_test.py | mbmccoy/jax | 74346f464bc8369d81964305fcf05f95f43fb2d3 | [
"Apache-2.0"
] | null | null | null | tests/custom_object_test.py | mbmccoy/jax | 74346f464bc8369d81964305fcf05f95f43fb2d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.946809 | 87 | 0.724609 |
7957f5e03f21eb1e5224521fe823be8e36583956 | 842 | py | Python | sa/migrations/0171_lowercase_stencil_filenames.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | sa/migrations/0171_lowercase_stencil_filenames.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | sa/migrations/0171_lowercase_stencil_filenames.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# lowercase stencil filenames
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# --------------------------------------------------... | 36.608696 | 111 | 0.480998 |
7957f5f52a93c5c82fdd6cf48296325945a16c5c | 821 | py | Python | app/model/spec.py | melphi/kafkaform | 391c4c70b6aff9fd5ad703dcf4b6e863e92d53b6 | [
"MIT"
] | null | null | null | app/model/spec.py | melphi/kafkaform | 391c4c70b6aff9fd5ad703dcf4b6e863e92d53b6 | [
"MIT"
] | null | null | null | app/model/spec.py | melphi/kafkaform | 391c4c70b6aff9fd5ad703dcf4b6e863e92d53b6 | [
"MIT"
] | null | null | null | import enum
from dataclasses import dataclass
from typing import List, Optional
class FieldType(enum.Enum):
"""Supported field types"""
BIGINT = "BIGINT"
BOOLEAN = "BOOLEAN"
DECIMAL = "DECIMAL"
DOUBLE = "DOUBLE"
DYNAMIC = "DYNAMIC" # Dynamic type leads to different outcomes depending on the ... | 19.093023 | 91 | 0.658952 |
7957f7452cb30a9f0b4e1171ceeb81f34e22e768 | 2,514 | py | Python | AI 이노베이션 스퀘어 언어지능 과정/assignments/daumnewstesting.py | donddog/AI_Innovation_Square_Codes | a04d50db011d25e00d8486146c24124c50242aa7 | [
"MIT"
] | 1 | 2021-02-11T16:45:21.000Z | 2021-02-11T16:45:21.000Z | AI 이노베이션 스퀘어 언어지능 과정/assignments/daumnewstesting.py | donddog/AI_Innovation_Square_Codes | a04d50db011d25e00d8486146c24124c50242aa7 | [
"MIT"
] | null | null | null | AI 이노베이션 스퀘어 언어지능 과정/assignments/daumnewstesting.py | donddog/AI_Innovation_Square_Codes | a04d50db011d25e00d8486146c24124c50242aa7 | [
"MIT"
] | null | null | null | <<<<<<< HEAD
from newspaper import Article
from bs4 import BeautifulSoup
import requests
def download(url, params={}, retries=3):
resp = None
header = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36"}
try:
... | 26.744681 | 140 | 0.616547 |
7957f8b48da54a2de7c3540987a5e8e3a4570504 | 978 | py | Python | c2_1_data/s4_barriers.py | zhou-zhenyi/sicp | ee6475d79a486a3bdc458378c55d0721195ea7d6 | [
"MIT"
] | null | null | null | c2_1_data/s4_barriers.py | zhou-zhenyi/sicp | ee6475d79a486a3bdc458378c55d0721195ea7d6 | [
"MIT"
] | null | null | null | c2_1_data/s4_barriers.py | zhou-zhenyi/sicp | ee6475d79a486a3bdc458378c55d0721195ea7d6 | [
"MIT"
] | null | null | null | from util_pair import cons, car, cdr
from util import gcd
def make_rat(n, d):
return cons(n, d)
def numer(x):
g = gcd(car(x), cdr(x))
return int(car(x) / g)
def denom(x):
g = gcd(car(x), cdr(x))
return int(cdr(x) / g)
def add_rat(x, y):
return make_rat(numer(x) * denom(y) + numer(y) * ... | 22.744186 | 83 | 0.630879 |
7957f91db718714b598b0acdaf25f3ca0c66c91e | 5,176 | py | Python | libcloud/test/loadbalancer/test_brightbox.py | pquerna/libcloud | 85cccf53235e081a5ed737f12f0c2c70908a3332 | [
"Apache-2.0"
] | 1 | 2015-11-05T15:37:04.000Z | 2015-11-05T15:37:04.000Z | libcloud/test/loadbalancer/test_brightbox.py | pquerna/libcloud | 85cccf53235e081a5ed737f12f0c2c70908a3332 | [
"Apache-2.0"
] | null | null | null | libcloud/test/loadbalancer/test_brightbox.py | pquerna/libcloud | 85cccf53235e081a5ed737f12f0c2c70908a3332 | [
"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 use ... | 38.917293 | 78 | 0.672141 |
7957f94e2ec99a61f261e70c0ae4305ee268f90c | 1,803 | py | Python | GUI/Generic/GRadioGroups.py | gcewing/PyGUI | 58c6c38ccb8e66acdf98dea6b24bef1d9a03147c | [
"MIT"
] | 9 | 2019-07-15T19:03:27.000Z | 2021-11-24T19:50:02.000Z | GUI/Generic/GRadioGroups.py | mnabeelp/PyGUI | 58c6c38ccb8e66acdf98dea6b24bef1d9a03147c | [
"MIT"
] | 3 | 2019-09-11T13:22:10.000Z | 2020-08-19T20:13:00.000Z | GUI/Generic/GRadioGroups.py | mnabeelp/PyGUI | 58c6c38ccb8e66acdf98dea6b24bef1d9a03147c | [
"MIT"
] | 4 | 2020-02-23T16:50:06.000Z | 2022-02-10T07:15:35.000Z | #
# Python GUI - Radio groups - Generic
#
from GUI.Properties import Properties, overridable_property
from GUI.Actions import Action
class RadioGroup(Properties, Action):
"""A RadioGroup coordinates a group of RadioButtons.
It has a 'value' property which is equal to the value
of the currently selected RadioButto... | 20.488636 | 68 | 0.712701 |
7957f9a135c8ca7f49b9050e1320196ddac684e5 | 8,178 | py | Python | app/main/routes.py | Bobw147/Microblog2 | 03b8b5784aed41e4da4c7f218dc973703ccf7166 | [
"MIT"
] | null | null | null | app/main/routes.py | Bobw147/Microblog2 | 03b8b5784aed41e4da4c7f218dc973703ccf7166 | [
"MIT"
] | 3 | 2020-03-19T22:08:50.000Z | 2021-06-02T00:55:10.000Z | app/main/routes.py | Bobw147/Microblog2 | 03b8b5784aed41e4da4c7f218dc973703ccf7166 | [
"MIT"
] | null | null | null | from datetime import datetime
from flask import render_template, flash, redirect, url_for, request, g, \
jsonify, current_app
from flask_login import current_user, login_required
from flask_babel import _, get_locale
from guess_language import guess_language
from app import db
from app.main.forms import EditProfile... | 39.699029 | 78 | 0.664099 |
7957faf05c2a3d1bc2d5f71dff6759c0cf771c81 | 38,386 | py | Python | Scripts/sims4communitylib/utils/common_log_registry.py | ColonolNutty/Sims4CommunityLibrary | 684f28dc3c7deb4d9fd520e21e63942b65a91d31 | [
"CC-BY-4.0"
] | 118 | 2019-08-31T04:33:18.000Z | 2022-03-28T21:12:14.000Z | Scripts/sims4communitylib/utils/common_log_registry.py | ColonolNutty/Sims4CommunityLibrary | 684f28dc3c7deb4d9fd520e21e63942b65a91d31 | [
"CC-BY-4.0"
] | 15 | 2019-12-05T01:29:46.000Z | 2022-02-18T17:13:46.000Z | Scripts/sims4communitylib/utils/common_log_registry.py | ColonolNutty/Sims4CommunityLibrary | 684f28dc3c7deb4d9fd520e21e63942b65a91d31 | [
"CC-BY-4.0"
] | 28 | 2019-09-07T04:11:05.000Z | 2022-02-07T18:31:40.000Z | """
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0).
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/legalcode
Copyright (c) COLONOLNUTTY
"""
import os
import sims4.commands
from typing import List, Di... | 49.149808 | 259 | 0.669749 |
7957fbe3e5149f9aaed3fac4bc134bbdc43833b6 | 5,433 | py | Python | model/seg/nets/deeplabv3.py | jessemelpolio/torchcv | 09bd5c80a2b4b869f4e23881cbe5b8b3bb462f7a | [
"Apache-2.0"
] | 1 | 2020-10-08T00:51:46.000Z | 2020-10-08T00:51:46.000Z | model/seg/nets/deeplabv3.py | jessemelpolio/torchcv | 09bd5c80a2b4b869f4e23881cbe5b8b3bb462f7a | [
"Apache-2.0"
] | null | null | null | model/seg/nets/deeplabv3.py | jessemelpolio/torchcv | 09bd5c80a2b4b869f4e23881cbe5b8b3bb462f7a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Donny You(youansheng@gmail.com)
# deeplabv3 res101 (synchronized BN version)
import torch
import torch.nn as nn
import torch.nn.functional as F
from model.backbones.backbone_selector import BackboneSelector
from model.tools.module_helper import ModuleHelper
from... | 43.464 | 120 | 0.614578 |
7957fc1c523f65009a271e510270cda2d5298d0c | 879 | py | Python | tests/syntax/GeneratorReturn_2.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | tests/syntax/GeneratorReturn_2.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | tests/syntax/GeneratorReturn_2.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python tests originally created or extracted from other peoples work. The
# parts were too small to be protected.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the ... | 33.807692 | 79 | 0.696246 |
7957fcaa847a4955bb34c1b99f0242f177f125a8 | 6,852 | py | Python | nnlib/data/iterator.py | huzecong/nnlib | fd68abc51028444ce7c789642e2a7b8ed1853255 | [
"MIT"
] | 1 | 2019-01-08T03:55:23.000Z | 2019-01-08T03:55:23.000Z | nnlib/data/iterator.py | huzecong/nnlib | fd68abc51028444ce7c789642e2a7b8ed1853255 | [
"MIT"
] | null | null | null | nnlib/data/iterator.py | huzecong/nnlib | fd68abc51028444ce7c789642e2a7b8ed1853255 | [
"MIT"
] | null | null | null | import math
import random
from collections import defaultdict
from typing import Dict, Iterator, List, Mapping, Optional, Sequence, Tuple, TypeVar
__all__ = ['bucketed_bitext_iterator', 'sorted_bitext_iterator', 'bitext_index_iterator', 'bitext_iterator',
'multi_dataset_iterator']
Token = TypeVar('Token', ... | 44.493506 | 118 | 0.676299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.