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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1aea6fbd848c726e5b5cdb1953e414611ea0a6 | 5,954 | py | Python | models/user.py | jungor/android_final_project | 28fe804912d72935066c507ed2f2a5d05bf8eccc | [
"MIT"
] | null | null | null | models/user.py | jungor/android_final_project | 28fe804912d72935066c507ed2f2a5d05bf8eccc | [
"MIT"
] | 1 | 2015-12-05T11:25:59.000Z | 2015-12-05T11:25:59.000Z | models/user.py | jungor/android_final_project | 28fe804912d72935066c507ed2f2a5d05bf8eccc | [
"MIT"
] | null | null | null | # -*-coding:utf-8 -*-
import base64
import os
import re
from datetime import datetime
from consts import *
from bson.objectid import ObjectId
from db import get_db
IMG_DIR = os.path.join(os.path.dirname(__file__), os.pardir, "static", "img", "user")
class User(object):
@property
def uid(self):
retur... | 25.663793 | 92 | 0.466913 |
4a1aea710154c40b5236f835aee4867d3f950469 | 3,392 | py | Python | follow.py | ligongzzz/AC-SJTU-OJ | a6e3bffd1c025ac114dd9a6ebec9bafbf0b5360a | [
"MIT"
] | 1 | 2019-08-11T15:11:07.000Z | 2019-08-11T15:11:07.000Z | follow.py | ligongzzz/AC-SJTU-OJ | a6e3bffd1c025ac114dd9a6ebec9bafbf0b5360a | [
"MIT"
] | null | null | null | follow.py | ligongzzz/AC-SJTU-OJ | a6e3bffd1c025ac114dd9a6ebec9bafbf0b5360a | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import ActionChains
import time
import logging
logging.basicConfig(filename="test.log", filemode="w", format="%(asctime)s %(name)s:%(levelname)s:%(message)s",
datefmt="%d-%M-%Y %H:%M:%S", level=loggin... | 33.584158 | 111 | 0.6023 |
4a1aea946a5b4bcc07a470c873889b850e38bd82 | 14,026 | py | Python | networkx-1.8.1/networkx/readwrite/edgelist.py | lthurlow/Boolean-Constrained-Routing | d60a648d17d5dadaa0fb5ef9961fcea9d9784dfe | [
"MIT"
] | 12 | 2015-03-25T20:20:26.000Z | 2021-11-14T19:44:56.000Z | networkx-1.8.1/networkx/readwrite/edgelist.py | lthurlow/Boolean-Constrained-Routing | d60a648d17d5dadaa0fb5ef9961fcea9d9784dfe | [
"MIT"
] | 71 | 2015-01-05T16:50:55.000Z | 2020-09-30T19:17:47.000Z | networkx-1.8.1/networkx/readwrite/edgelist.py | lthurlow/Boolean-Constrained-Routing | d60a648d17d5dadaa0fb5ef9961fcea9d9784dfe | [
"MIT"
] | 14 | 2015-02-15T22:19:18.000Z | 2020-09-30T18:54:54.000Z | """
**********
Edge Lists
**********
Read and write NetworkX graphs as edge lists.
The multi-line adjacency list format is useful for graphs with nodes
that can be meaningfully represented as strings. With the edgelist
format simple edge data can be stored but node or graph data is not.
There is no way of representin... | 30.163441 | 85 | 0.578212 |
4a1aeb89360699c1e71483b2cd1eebf531596c0f | 5,331 | py | Python | src/data_management/tests.py | tee-huynh/pipeline-profiles | 1bdbe28f3d8d2d9b0be1546253a9af5e6cf95060 | [
"MIT"
] | null | null | null | src/data_management/tests.py | tee-huynh/pipeline-profiles | 1bdbe28f3d8d2d9b0be1546253a9af5e6cf95060 | [
"MIT"
] | null | null | null | src/data_management/tests.py | tee-huynh/pipeline-profiles | 1bdbe28f3d8d2d9b0be1546253a9af5e6cf95060 | [
"MIT"
] | null | null | null | import unittest
from incidents import process_incidents
from conditions import process_conditions
from util import most_common
import pandas as pd
class TestUtil(unittest.TestCase):
testData = {'row_1': [5, 3, 2, 1, 0, 0, 0, 1], 'row_2': ['e', 'a', 'b', 'c', 'd', 'e', 'e', 'c']}
df = pd.DataFrame.from_dict(te... | 48.027027 | 137 | 0.652035 |
4a1aebb48fc7d88ed33340ab791a35d1f3cf70d1 | 13,848 | py | Python | canvasapi/outcome.py | jessemcbride/canvasapi | a8f802f10ea372e8934ac0b51cef499c4fd4f172 | [
"MIT"
] | null | null | null | canvasapi/outcome.py | jessemcbride/canvasapi | a8f802f10ea372e8934ac0b51cef499c4fd4f172 | [
"MIT"
] | null | null | null | canvasapi/outcome.py | jessemcbride/canvasapi | a8f802f10ea372e8934ac0b51cef499c4fd4f172 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
from six import python_2_unicode_compatible
from canvasapi.canvas_object import CanvasObject
from canvasapi.paginated_list import PaginatedList
from canvasapi.util import combine_kwargs, obj_or_id
@python_2_unicode_compatible
class O... | 40.255814 | 110 | 0.635615 |
4a1aebd074cc9e878e1bd267603039b5dc94d4e2 | 2,495 | py | Python | sdk/python/pulumi_azure_native/fluidrelay/v20210312preview/get_fluid_relay_server_keys.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/fluidrelay/v20210312preview/get_fluid_relay_server_keys.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/fluidrelay/v20210312preview/get_fluid_relay_server_keys.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 31.582278 | 165 | 0.658116 |
4a1aec5d013f97ed9c394ca65e13fd219099c810 | 1,006 | py | Python | estrutura-repeticao-while/ex069.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | estrutura-repeticao-while/ex069.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | estrutura-repeticao-while/ex069.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | """
Crie um programa que leia a idade e o sexo de varias pessoas. A cada pessoa cadastrada,
o programa deverá perguntar se o usuario quer ou nao continuar. No final, mostre:
A) quantas pessoas tem mais de 18 anos
B) quantos homens foram cadastrados
C) quantas mulheres tem mais de 20 anos
Colocar validação para digita... | 27.944444 | 116 | 0.624254 |
4a1aed34058ac112f25c30aa936aae2040388c1e | 5,146 | py | Python | glue_astronomy/translators/tests/test_ccddata.py | ibusko/glue-astronomy | 42d4188eb7b4ac29be66a218168564425decadba | [
"BSD-3-Clause"
] | null | null | null | glue_astronomy/translators/tests/test_ccddata.py | ibusko/glue-astronomy | 42d4188eb7b4ac29be66a218168564425decadba | [
"BSD-3-Clause"
] | null | null | null | glue_astronomy/translators/tests/test_ccddata.py | ibusko/glue-astronomy | 42d4188eb7b4ac29be66a218168564425decadba | [
"BSD-3-Clause"
] | null | null | null | import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from astropy import units as u
from astropy.nddata import CCDData
from astropy.wcs import WCS
from glue.core import Data, DataCollection
from glue.core.component import Component
from glue.core.coordinates import Coordinates
WCS... | 31.187879 | 89 | 0.64691 |
4a1aed945c56c94672fdc7dc8dc7f64e3f1f4f80 | 2,696 | py | Python | esocial/__init__.py | alexdemari/libesocial | de095354c19c34995454b6781e7dd844732c8e05 | [
"Apache-2.0"
] | null | null | null | esocial/__init__.py | alexdemari/libesocial | de095354c19c34995454b6781e7dd844732c8e05 | [
"Apache-2.0"
] | null | null | null | esocial/__init__.py | alexdemari/libesocial | de095354c19c34995454b6781e7dd844732c8e05 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, Qualita Seguranca e Saude Ocupacional. 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 req... | 34.564103 | 147 | 0.642433 |
4a1aed974801cd5b46bcd9a954da90dfa7be5645 | 4,585 | py | Python | model_1/utils.py | narcomey/mri-superresolution | 2918dcd5bae93ab988961ee24b07e0dbd735f517 | [
"MIT"
] | 20 | 2019-01-22T01:30:39.000Z | 2021-09-02T09:46:52.000Z | model_1/utils.py | Edenkut/mri-superresolution | 2918dcd5bae93ab988961ee24b07e0dbd735f517 | [
"MIT"
] | 1 | 2020-10-28T14:48:09.000Z | 2020-10-28T14:48:09.000Z | model_1/utils.py | Edenkut/mri-superresolution | 2918dcd5bae93ab988961ee24b07e0dbd735f517 | [
"MIT"
] | 7 | 2019-03-04T01:51:32.000Z | 2021-02-25T16:49:23.000Z | import pydicom
import os
import math
import numpy as np
import png
from config import config
import tensorlayer as tl
import matplotlib.pyplot as plt
## Extra functions used in main.py ##
def load_info(path):
data = {}
all_patient_folders = tl.files.load_folder_list(path=path)
all_patient_folders = [folde... | 35.269231 | 125 | 0.652563 |
4a1aede361c118b119eeeebe7f7feea4c7a2d13f | 124 | py | Python | posthog/models/filters/__init__.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | posthog/models/filters/__init__.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | posthog/models/filters/__init__.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | # flake8: noqa
from .filter import Filter
from .path_filter import PathFilter
from .retention_filter import RetentionFilter
| 24.8 | 45 | 0.83871 |
4a1aeed41fcc319890a10778173fd9465196f61a | 8,214 | py | Python | backend/balance/utils.py | Kodeworks/budsjetteringssystem | 30b8c2ef0522847c316e466d299a59470e73f712 | [
"MIT"
] | 6 | 2019-06-14T08:25:49.000Z | 2019-09-18T18:38:04.000Z | backend/balance/utils.py | Kodeworks/liquidator-frontend | 30b8c2ef0522847c316e466d299a59470e73f712 | [
"MIT"
] | 113 | 2019-06-13T09:09:42.000Z | 2019-09-21T16:43:49.000Z | backend/balance/utils.py | Kodeworks/budsjetteringssystem | 30b8c2ef0522847c316e466d299a59470e73f712 | [
"MIT"
] | 2 | 2019-10-21T18:07:01.000Z | 2019-12-08T07:11:40.000Z | import datetime
from dateutil.relativedelta import relativedelta
from typing import Any
from dataclasses import dataclass
from django.db.models import Q
from transaction.models import Transaction, RecurringTransaction
from transaction.utils import RecurringTransactionOccurence
from .models import BankBalance
day = d... | 40.663366 | 119 | 0.603482 |
4a1aef934526bfa4bd4d257db171a95ca6fc835c | 807 | py | Python | ejabberd_python3d/defaults/arguments.py | Dedaldino3D/ejabberd-python3d | 4ff4474347b89ecfda48ff05b76d3a8b3c983046 | [
"MIT"
] | 4 | 2020-11-04T02:33:06.000Z | 2021-08-29T23:55:47.000Z | ejabberd_python3d/defaults/arguments.py | Dedaldino3D/ejabberd-python3d | 4ff4474347b89ecfda48ff05b76d3a8b3c983046 | [
"MIT"
] | null | null | null | ejabberd_python3d/defaults/arguments.py | Dedaldino3D/ejabberd-python3d | 4ff4474347b89ecfda48ff05b76d3a8b3c983046 | [
"MIT"
] | 1 | 2021-09-26T01:49:23.000Z | 2021-09-26T01:49:23.000Z | from __future__ import unicode_literals
from ..abc.api import APIArgument
from ..serializers import StringSerializer, IntegerSerializer, PositiveIntegerSerializer, BooleanSerializer, \
LogLevelSerializer, ListSerializer, GenericSerializer
class GenericArgument(APIArgument):
serializer_class = GenericSerializ... | 23.735294 | 110 | 0.825279 |
4a1af0b97095df4a8b9e51d9985d490e32a23d55 | 78 | py | Python | shellprofile.py | lambdamusic/scigraph-cli | ef5060e849ee9541f047f44c315833c9a2db2f9f | [
"Apache-2.0"
] | 2 | 2021-04-18T10:24:01.000Z | 2021-04-28T12:09:17.000Z | shellprofile.py | lambdamusic/PyScigraph | ef5060e849ee9541f047f44c315833c9a2db2f9f | [
"Apache-2.0"
] | 2 | 2019-07-04T09:21:59.000Z | 2019-07-04T17:03:07.000Z | shellprofile.py | lambdamusic/PyScigraph | ef5060e849ee9541f047f44c315833c9a2db2f9f | [
"Apache-2.0"
] | null | null | null | # startup file for ipython
# $ ipython startup.py -i
from pyscigraph import * | 19.5 | 26 | 0.74359 |
4a1af28d0a620d86e10b1d428db9eb9c79838f57 | 16,768 | py | Python | slowfast/utils/checkpoint.py | coldmanck/VidHOI | 523e9297202e869cfff70736336dabb35faf8d00 | [
"Apache-2.0"
] | 26 | 2021-05-26T12:17:46.000Z | 2022-03-24T10:30:22.000Z | slowfast/utils/checkpoint.py | coldmanck/VidHOI | 523e9297202e869cfff70736336dabb35faf8d00 | [
"Apache-2.0"
] | 4 | 2021-06-24T07:14:37.000Z | 2022-03-31T07:51:20.000Z | slowfast/utils/checkpoint.py | coldmanck/VidHOI | 523e9297202e869cfff70736336dabb35faf8d00 | [
"Apache-2.0"
] | 7 | 2021-05-31T14:43:13.000Z | 2022-03-03T13:32:18.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""Functions that handle saving and loading of checkpoints."""
import copy
import numpy as np
import os
import pickle
from collections import OrderedDict
import torch
from fvcore.common.file_io import PathManager
import sl... | 36.611354 | 102 | 0.594823 |
4a1af30560eb80ea58379dc76f0da7237be65b96 | 2,886 | py | Python | cymunk/examples/point_query.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | 18 | 2015-03-17T07:04:58.000Z | 2017-04-24T13:05:00.000Z | cymunk/examples/point_query.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | 10 | 2017-08-04T18:33:27.000Z | 2021-05-10T03:35:56.000Z | cymunk/examples/point_query.py | WeilerWebServices/Kivy | 54e3438156eb0c853790fd3cecc593f09123f892 | [
"MIT"
] | 13 | 2015-03-12T02:38:37.000Z | 2017-02-21T21:25:06.000Z | """This example showcase point queries by highlighting the shape under the
mouse pointer.
"""
__version__ = "$Id:$"
__docformat__ = "reStructuredText"
import random
import sys
import pygame
from pygame.locals import *
from pygame.color import *
import cymunk as pm
from cymunk import Vec2d
import pygame_util
def ... | 27.75 | 97 | 0.546085 |
4a1af4503d66c861611869f7c6048c9b9514c0e4 | 16,301 | py | Python | CAP-newCluster/train_cap.py | ZoRoronoa/Camera-Aware-Proxy | 352f900bbae330f18c2bfe2b3f2516fb4e31adea | [
"Apache-2.0"
] | null | null | null | CAP-newCluster/train_cap.py | ZoRoronoa/Camera-Aware-Proxy | 352f900bbae330f18c2bfe2b3f2516fb4e31adea | [
"Apache-2.0"
] | null | null | null | CAP-newCluster/train_cap.py | ZoRoronoa/Camera-Aware-Proxy | 352f900bbae330f18c2bfe2b3f2516fb4e31adea | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function, absolute_import
import argparse
import os.path as osp
import numpy as np
import sys
import torch
from torch import nn
from torch.backends import cudnn
from torch.utils.data import DataLoader
from reid.datasets.target_dataset import DA
from reid import models
from reid.models impor... | 43.469333 | 130 | 0.653886 |
4a1af489ef332b1169d5f2a65ae593761883ecb4 | 2,868 | py | Python | examples/addressable/plot_pairing.py | d-michail/python-jheaps | 65e1f4036b125dc065dc4398bf2eac0e95726f7a | [
"Apache-2.0"
] | null | null | null | examples/addressable/plot_pairing.py | d-michail/python-jheaps | 65e1f4036b125dc065dc4398bf2eac0e95726f7a | [
"Apache-2.0"
] | null | null | null | examples/addressable/plot_pairing.py | d-michail/python-jheaps | 65e1f4036b125dc065dc4398bf2eac0e95726f7a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Pairing Heap
============
In this example we create a pairing heap.
"""
# %%
# Start by importing the package.
import jheaps
# %%
# Create the pairing heap using the following factory method. By default all
# addressable heaps have `float` keys and `int` values. This can be adjusted by ... | 29.265306 | 96 | 0.703626 |
4a1af5b5d95dd5f188851af83e59e0a056cd8ace | 2,551 | py | Python | gdal/swig/python/samples/gdal_create_pdf.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 3,100 | 2015-01-02T10:33:40.000Z | 2022-03-31T02:06:51.000Z | gdal/swig/python/samples/gdal_create_pdf.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 3,496 | 2015-01-06T16:53:30.000Z | 2022-03-31T20:18:51.000Z | gdal/swig/python/samples/gdal_create_pdf.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 2,036 | 2015-01-08T20:22:12.000Z | 2022-03-31T10:24:08.000Z | #!/usr/bin/env python3
###############################################################################
# $Id$
#
# Project: GDAL samples
# Purpose: Create a PDF from a XML composition file
# Author: Even Rouault <even.rouault at spatialys.com>
#
####################################################################... | 33.565789 | 79 | 0.618581 |
4a1af670f8a09d280d6e32299623e0cec09043bc | 1,410 | py | Python | venv/Lib/site-packages/nbconvert/preprocessors/convertfigures.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1,367 | 2015-05-24T22:59:22.000Z | 2022-03-31T07:44:02.000Z | venv/Lib/site-packages/nbconvert/preprocessors/convertfigures.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1,534 | 2015-05-08T21:47:15.000Z | 2022-03-31T10:09:31.000Z | venv/Lib/site-packages/nbconvert/preprocessors/convertfigures.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 586 | 2015-05-17T01:21:02.000Z | 2022-03-24T17:06:05.000Z | """Module containing a preprocessor that converts outputs in the notebook from
one format to another.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from .base import Preprocessor
from traitlets import Unicode
class ConvertFiguresPreprocessor(Preprocessor)... | 28.77551 | 79 | 0.641844 |
4a1af6d2cced2568784ab2693ef705eaf738a125 | 357 | py | Python | setup.py | JKamlah/akf-dbTools | bd7b661485ba578b0a3e8ae6d1a0e1601b5dc0d6 | [
"Apache-2.0"
] | 1 | 2019-02-26T22:19:08.000Z | 2019-02-26T22:19:08.000Z | setup.py | JKamlah/akf-dbTools | bd7b661485ba578b0a3e8ae6d1a0e1601b5dc0d6 | [
"Apache-2.0"
] | null | null | null | setup.py | JKamlah/akf-dbTools | bd7b661485ba578b0a3e8ae6d1a0e1601b5dc0d6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3.6
import sys
assert sys.version_info[0]==3 and sys.version_info[1]>=6,\
"Ýou must install and use akf-dbTools with Python version 3.6 or higher"
from distutils.core import setup
setup(
name='akf_dbTools',
version='1.0',
author='jkamlah',
description='Tools for the Aktienfue... | 22.3125 | 76 | 0.691877 |
4a1af799308031e8c1a4337b9d991cb6bafb489f | 4,801 | py | Python | docs/conf.py | NullConvergence/pydriller | e75cbe1ce90e1d317973915cf79ed03fb09988a0 | [
"Apache-2.0"
] | 583 | 2018-04-09T09:48:47.000Z | 2022-03-23T17:27:10.000Z | docs/conf.py | NullConvergence/pydriller | e75cbe1ce90e1d317973915cf79ed03fb09988a0 | [
"Apache-2.0"
] | 195 | 2018-05-25T08:10:58.000Z | 2022-03-29T09:28:37.000Z | docs/conf.py | NullConvergence/pydriller | e75cbe1ce90e1d317973915cf79ed03fb09988a0 | [
"Apache-2.0"
] | 134 | 2018-04-10T12:57:34.000Z | 2022-03-29T13:40:35.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 31.175325 | 79 | 0.655905 |
4a1af7c9f88360ce23709ca597d7f49be82921e3 | 3,707 | py | Python | tests/test_connection.py | hulu316/zoonado | cb06102f95e7da9c0e418bb9e327045e012a1497 | [
"Apache-2.0"
] | 12 | 2016-04-14T09:55:38.000Z | 2018-01-07T13:12:47.000Z | tests/test_connection.py | hulu316/zoonado | cb06102f95e7da9c0e418bb9e327045e012a1497 | [
"Apache-2.0"
] | 16 | 2016-07-21T09:45:38.000Z | 2017-09-22T19:06:14.000Z | tests/test_connection.py | hulu316/zoonado | cb06102f95e7da9c0e418bb9e327045e012a1497 | [
"Apache-2.0"
] | 8 | 2016-07-21T09:06:37.000Z | 2019-07-26T05:48:00.000Z | from mock import patch, Mock, call
from tornado import testing, concurrent
from zoonado.protocol.connect import ConnectRequest, ConnectResponse
from zoonado import connection
class ConnectionTests(testing.AsyncTestCase):
def setUp(self):
super(ConnectionTests, self).setUp()
self.response_buffer... | 28.083333 | 79 | 0.602913 |
4a1af7e7bc6853ffea4aeb34caa943077cb20582 | 3,215 | py | Python | examples/pipelines/multiple_subjects_bold.py | salma1601/process-asl-old | eaafb0c46b132be14005b52eb54b86d30364ec32 | [
"BSD-3-Clause"
] | 1 | 2020-03-11T13:59:04.000Z | 2020-03-11T13:59:04.000Z | examples/pipelines/multiple_subjects_bold.py | salma1601/process-asl-old | eaafb0c46b132be14005b52eb54b86d30364ec32 | [
"BSD-3-Clause"
] | 4 | 2016-02-19T18:24:50.000Z | 2016-02-19T18:24:58.000Z | examples/pipelines/multiple_subjects_bold.py | salma1601/process-asl-old | eaafb0c46b132be14005b52eb54b86d30364ec32 | [
"BSD-3-Clause"
] | null | null | null | """
===============================
Multiple subjects pipeline demo
===============================
A basic multiple subjects pipeline for BOLD data.
"""
import os
import matplotlib.pylab as plt
import nipype.interfaces.spm as spm
from nipype.caching import Memory
from nilearn import plotting
from procasl import dat... | 32.806122 | 78 | 0.669673 |
4a1af8ca2063597c35f3eba72a5bbbf162a4176f | 633 | py | Python | manage.py | anonshubh/eCommerce-rostores- | 7503e855d650556e216c42fc1c5b95a42bb9c501 | [
"Apache-2.0"
] | null | null | null | manage.py | anonshubh/eCommerce-rostores- | 7503e855d650556e216c42fc1c5b95a42bb9c501 | [
"Apache-2.0"
] | null | null | null | manage.py | anonshubh/eCommerce-rostores- | 7503e855d650556e216c42fc1c5b95a42bb9c501 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerce_src.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ... | 28.772727 | 77 | 0.685624 |
4a1af93dd899de187ed6c5fef3691c8c6f5554f5 | 5,600 | py | Python | mmdet3d/models/model_utils/transformer.py | Guangyun-Xu/mmdetection3d | 75c5c6cd590386bd1539a686c5fd2cc45c5480d5 | [
"Apache-2.0"
] | 2,216 | 2020-07-09T19:10:11.000Z | 2022-03-31T12:39:26.000Z | mmdet3d/models/model_utils/transformer.py | Guangyun-Xu/mmdetection3d | 75c5c6cd590386bd1539a686c5fd2cc45c5480d5 | [
"Apache-2.0"
] | 1,174 | 2020-07-10T07:02:28.000Z | 2022-03-31T12:38:56.000Z | mmdet3d/models/model_utils/transformer.py | Guangyun-Xu/mmdetection3d | 75c5c6cd590386bd1539a686c5fd2cc45c5480d5 | [
"Apache-2.0"
] | 681 | 2020-07-09T19:40:06.000Z | 2022-03-31T11:02:24.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from mmcv.cnn.bricks.registry import ATTENTION
from mmcv.cnn.bricks.transformer import POSITIONAL_ENCODING, MultiheadAttention
from torch import nn as nn
@ATTENTION.register_module()
class GroupFree3DMHA(MultiheadAttention):
"""A warpper for torch.nn.MultiheadAttent... | 40.28777 | 79 | 0.591607 |
4a1af94e9c3ceea7bf149d4bea4c94ab708cbe53 | 911 | py | Python | problems/tests/test_container_with_most_water.py | vinta/fuck-coding-interviews | 915ff55963430e81134a35f65f511e5684c52f11 | [
"MIT"
] | 590 | 2020-06-17T08:26:47.000Z | 2022-03-30T18:47:32.000Z | problems/tests/test_container_with_most_water.py | parvathirajan/fuck-coding-interviews | 915ff55963430e81134a35f65f511e5684c52f11 | [
"MIT"
] | 12 | 2020-07-14T09:24:32.000Z | 2020-11-02T03:43:47.000Z | problems/tests/test_container_with_most_water.py | parvathirajan/fuck-coding-interviews | 915ff55963430e81134a35f65f511e5684c52f11 | [
"MIT"
] | 75 | 2020-07-29T06:50:13.000Z | 2022-03-13T16:14:57.000Z | # coding: utf-8
import unittest
from problems.container_with_most_water import Solution
from problems.container_with_most_water import Solution2
class TestCase(unittest.TestCase):
def setUp(self):
self.solution = Solution()
def test(self):
self.assertEqual(self.solution.maxArea([1, 8, 6, 2, ... | 30.366667 | 84 | 0.63337 |
4a1af99257d748ac15c2663d24dcc4f3108006b0 | 7,623 | py | Python | servicestack/utils.py | ServiceStack/servicestack-python | 57577d94e9c32334c9604e5881f9f96b93a0fddb | [
"BSD-3-Clause"
] | 3 | 2021-07-03T17:50:05.000Z | 2021-07-12T17:08:33.000Z | servicestack/utils.py | ServiceStack/servicestack-python | 57577d94e9c32334c9604e5881f9f96b93a0fddb | [
"BSD-3-Clause"
] | null | null | null | servicestack/utils.py | ServiceStack/servicestack-python | 57577d94e9c32334c9604e5881f9f96b93a0fddb | [
"BSD-3-Clause"
] | null | null | null | import base64
import json
import re
from datetime import datetime, timezone, timedelta
from typing import Optional, Any
from .log import Log
def lowercase(string): return str(string).lower()
def uppercase(string): return str(string).upper()
def snakecase(string):
string = re.sub(r"[\-\.\s]", '_', str(string)... | 26.747368 | 118 | 0.599239 |
4a1afa3059a4ff0d3f5701a8c02d7add860eb0bd | 1,094 | py | Python | transform_pdf2image/__init__.py | SilasPDJ/maeportifolios_desktop_etc | a341648c8161251d42055155f6fd99fd388d9f2d | [
"MIT"
] | null | null | null | transform_pdf2image/__init__.py | SilasPDJ/maeportifolios_desktop_etc | a341648c8161251d42055155f6fd99fd388d9f2d | [
"MIT"
] | null | null | null | transform_pdf2image/__init__.py | SilasPDJ/maeportifolios_desktop_etc | a341648c8161251d42055155f6fd99fd388d9f2d | [
"MIT"
] | null | null | null | from defs_utils import *
import pdf2image
import os
def transforma_pdf_em_img_por_materia(materia, pdf_path=None):
searched = materia
if pdf_path:
list_files = list_dir(complete_name(searched, pre=pdf_path), True)
else:
list_files = list_dir(complete_name(searched), True)
volta = os.ge... | 30.388889 | 74 | 0.546618 |
4a1afb0f9ebda44be292a02b42237425cbdf6b60 | 5,465 | py | Python | mediagoblin/tools/exif.py | stenwt/mediagoblin-quickstart-openshift | 4a728c4b3b988c59eb9a43ad1ae1ca5edf8bc3c2 | [
"CC0-1.0"
] | 1 | 2016-02-10T18:22:42.000Z | 2016-02-10T18:22:42.000Z | mediagoblin/tools/exif.py | stenwt/mediagoblin-quickstart-openshift | 4a728c4b3b988c59eb9a43ad1ae1ca5edf8bc3c2 | [
"CC0-1.0"
] | 1 | 2016-04-19T13:03:17.000Z | 2016-04-19T13:03:17.000Z | mediagoblin/tools/exif.py | stenwt/mediagoblin-quickstart-openshift | 4a728c4b3b988c59eb9a43ad1ae1ca5edf8bc3c2 | [
"CC0-1.0"
] | null | null | null | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either versio... | 27.462312 | 77 | 0.602013 |
4a1afb13d9994c623e04975e34046bc4e82b850a | 9,783 | py | Python | syft/grid/private_grid.py | shubhamsingh987/PySyft | ff967e3735bd7d47667d1d3e5038ba1493ca2e90 | [
"Apache-2.0"
] | 1 | 2020-05-25T13:44:29.000Z | 2020-05-25T13:44:29.000Z | syft/grid/private_grid.py | shubhamsingh987/PySyft | ff967e3735bd7d47667d1d3e5038ba1493ca2e90 | [
"Apache-2.0"
] | 2 | 2020-03-09T09:17:06.000Z | 2020-04-09T13:33:12.000Z | syft/grid/private_grid.py | shubhamsingh987/PySyft | ff967e3735bd7d47667d1d3e5038ba1493ca2e90 | [
"Apache-2.0"
] | null | null | null | import random
import torch
from typing import Any
from typing import Tuple
from typing import Dict
from typing import Union
# Syft imports
import syft
from syft.grid.abstract_grid import AbstractGrid
from syft.workers.node_client import NodeClient
from syft.execution.plan import Plan
from syft.frameworks.torch.tenso... | 37.626923 | 99 | 0.58295 |
4a1afba6eb93a9791748d83c20ca870bda2e06bb | 10,926 | py | Python | tests/test_checker/test_noqa.py | lensvol/wemake-python-styleguide | aec33f0855c6a6f0d853de37b958b9b33c4428d0 | [
"MIT"
] | null | null | null | tests/test_checker/test_noqa.py | lensvol/wemake-python-styleguide | aec33f0855c6a6f0d853de37b958b9b33c4428d0 | [
"MIT"
] | 15 | 2020-02-22T11:09:46.000Z | 2020-02-27T16:36:54.000Z | tests/test_checker/test_noqa.py | lensvol/wemake-python-styleguide | aec33f0855c6a6f0d853de37b958b9b33c4428d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Integration tests definition.
These are integration tests for several things:
1. that violation is active and enabled
2. that violation is raised for the bad code
3. that line number where violation is raised is correct
4. that `noqa` works
Docs: https://wemake-python-stylegui.de/en/late... | 24.013187 | 79 | 0.557295 |
4a1afc1740039135e924ff75b23e5ff08fc748ff | 14,018 | py | Python | crop_engine/nlde/operators/polybindjoin.py | Lars-H/slurp | 0c7c8a5ca62145bedaff5791d6f54337674da2ea | [
"MIT"
] | 1 | 2021-06-29T07:59:50.000Z | 2021-06-29T07:59:50.000Z | crop_engine/nlde/operators/polybindjoin.py | Lars-H/slurp | 0c7c8a5ca62145bedaff5791d6f54337674da2ea | [
"MIT"
] | null | null | null | crop_engine/nlde/operators/polybindjoin.py | Lars-H/slurp | 0c7c8a5ca62145bedaff5791d6f54337674da2ea | [
"MIT"
] | null | null | null | """
Created on Sep 4, 2020
Physical operator that implements a JOIN.
The intermediate results are stored in queues and processed incrementally.
@author: Lars Heling
"""
from multiprocessing import Queue, Value, Process
from Queue import Empty
import math
from operatorstructures import Tuple, Record, RJTTail
from tim... | 36.316062 | 119 | 0.561278 |
4a1afd48f810330751f66a32b111580451ef4b7a | 12,886 | py | Python | tests/objects/fibers_test.py | 3d-pli/fastpli | fe90ac53a7e78d122696bebb4816f4cb953cdb72 | [
"MIT"
] | 13 | 2020-03-21T10:40:36.000Z | 2022-03-20T17:27:56.000Z | tests/objects/fibers_test.py | 3d-pli/fastpli | fe90ac53a7e78d122696bebb4816f4cb953cdb72 | [
"MIT"
] | 11 | 2021-01-30T07:21:52.000Z | 2021-03-16T15:24:41.000Z | tests/objects/fibers_test.py | 3d-pli/fastpli | fe90ac53a7e78d122696bebb4816f4cb953cdb72 | [
"MIT"
] | 6 | 2020-08-27T07:19:30.000Z | 2021-07-20T08:49:11.000Z | import unittest
import numpy as np
import fastpli.objects
import fastpli.tools
class MainTest(unittest.TestCase):
def setUp(self):
self.fiber = fastpli.objects.Fiber([[0, 0, 0, 1], [1, 1, 1, 2]])
self.fiber_bundle = fastpli.objects.FiberBundle(self.fiber.copy())
self.fiber_bundles = fast... | 45.214035 | 80 | 0.489524 |
4a1afe6dc9e9e63e177b561ffba25552d61d05bc | 190 | py | Python | back/sales/serializers.py | Marthox1999/UV-Energy | 8827c4ff1ffae574d7f13ec6d733b3eda68424f9 | [
"MIT"
] | null | null | null | back/sales/serializers.py | Marthox1999/UV-Energy | 8827c4ff1ffae574d7f13ec6d733b3eda68424f9 | [
"MIT"
] | 58 | 2020-02-22T20:46:15.000Z | 2021-04-08T21:16:28.000Z | back/sales/serializers.py | MarthoxG/UV-Energy | 8827c4ff1ffae574d7f13ec6d733b3eda68424f9 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from sales.models import Bill
class BillSerializers(serializers.ModelSerializer):
class Meta:
model = Bill
fields = '__all__'
| 15.833333 | 51 | 0.721053 |
4a1afe722010932db730f3b81c3a3f0b99f086fc | 211,625 | py | Python | library/Box2D/Box2D.py | foxik/pybox2d | bdfd1d1120338b9e31615df25c4e4400cf9a42a4 | [
"Zlib"
] | null | null | null | library/Box2D/Box2D.py | foxik/pybox2d | bdfd1d1120338b9e31615df25c4e4400cf9a42a4 | [
"Zlib"
] | null | null | null | library/Box2D/Box2D.py | foxik/pybox2d | bdfd1d1120338b9e31615df25c4e4400cf9a42a4 | [
"Zlib"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise Runtime... | 44.116114 | 576 | 0.710994 |
4a1afe9231a6916c3253642209c929f2ccbc7138 | 25,335 | py | Python | sktime/benchmarking/evaluation.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-09-02T19:39:59.000Z | 2020-09-02T19:39:59.000Z | sktime/benchmarking/evaluation.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/benchmarking/evaluation.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T18:19:01.000Z | 2022-02-14T18:19:01.000Z | __author__ = ["Viktor Kazakov", "Markus Löning", "Aaron Bostrom"]
__all__ = ["Evaluator"]
import itertools
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import stats
from scipy.stats import ranksums
from scipy.stats import ttest_ind
from sktime.benchmarking.base import BaseResults
... | 40.536 | 79 | 0.552122 |
4a1aff91e7fac7cab3d7a78ff13185b5b0136043 | 920 | py | Python | docs/conf.py | sandialabs/ufjc | cfaaf3ccc5af7eefb2c3f8ffc0ee09523f24bd4a | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | sandialabs/ufjc | cfaaf3ccc5af7eefb2c3f8ffc0ee09523f24bd4a | [
"BSD-3-Clause"
] | 1 | 2022-03-22T16:22:05.000Z | 2022-03-22T16:22:05.000Z | docs/conf.py | sandialabs/ufjc | cfaaf3ccc5af7eefb2c3f8ffc0ee09523f24bd4a | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
sys.path.insert(0, os.path.abspath("../../"))
project = 'uFJC'
author = 'Michael R. Buche, Scott J. Grutzik'
copyright = '2022 National Technology & Engineering Solutions of Sandia, \
LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, \
the U.S. Government retains certain ri... | 29.677419 | 74 | 0.733696 |
4a1affea23e5fcddb4bb64d99df74bac6ccf77e9 | 3,174 | py | Python | sandbox/apps/python/multigrid/jacobi3D/builder.py | bollu/polymage | 517657142cc3ae74e9daff3b41a0257d6a4ce2b6 | [
"Apache-2.0"
] | 10 | 2016-07-22T06:53:11.000Z | 2021-02-19T06:22:00.000Z | sandbox/apps/python/multigrid/jacobi3D/builder.py | bollu/polymage | 517657142cc3ae74e9daff3b41a0257d6a4ce2b6 | [
"Apache-2.0"
] | null | null | null | sandbox/apps/python/multigrid/jacobi3D/builder.py | bollu/polymage | 517657142cc3ae74e9daff3b41a0257d6a4ce2b6 | [
"Apache-2.0"
] | 2 | 2017-11-21T20:29:36.000Z | 2021-05-21T01:52:05.000Z | from __init__ import *
import sys
import subprocess
sys.path.insert(0, ROOT+'apps/python/')
from cpp_compiler import c_compile
from loader import load_lib
from polymage_vcycle import v_cycle
from polymage_wcycle import w_cycle
from compiler import *
from constructs import *
def code_gen(pipe, file_name, app_data):... | 26.45 | 72 | 0.597984 |
4a1b001d2b36301f84ff069cca47108aaca79809 | 10,274 | py | Python | build/plugins/gobuild.py | notimesea/catboost | 1d3e0744f1d6c6d74d724878dc9fe92076c8b1ce | [
"Apache-2.0"
] | 2 | 2019-08-11T22:21:41.000Z | 2019-08-28T23:40:44.000Z | build/plugins/gobuild.py | TakeOver/stochasticrank | 45f9c701785bb952c59c704a2bfe878d5cbb01e4 | [
"Apache-2.0"
] | null | null | null | build/plugins/gobuild.py | TakeOver/stochasticrank | 45f9c701785bb952c59c704a2bfe878d5cbb01e4 | [
"Apache-2.0"
] | 1 | 2020-10-17T09:28:08.000Z | 2020-10-17T09:28:08.000Z | import base64
import itertools
import md5
import os
from _common import rootrel_arc_src, tobuilddir
import ymake
runtime_cgo_path = os.path.join('runtime', 'cgo')
runtime_msan_path = os.path.join('runtime', 'msan')
runtime_race_path = os.path.join('runtime', 'race')
arc_project_prefix = 'a.yandex-team.ru/'
import_run... | 38.051852 | 134 | 0.619233 |
4a1b007ac6101853ed6782014e9c1c301c76847a | 1,965 | py | Python | tesla_powerwall/error.py | bdraco/tesla_powerwall | dbf4493796c13e08fef2e8ddda547ad9ef1e2469 | [
"Apache-2.0"
] | null | null | null | tesla_powerwall/error.py | bdraco/tesla_powerwall | dbf4493796c13e08fef2e8ddda547ad9ef1e2469 | [
"Apache-2.0"
] | null | null | null | tesla_powerwall/error.py | bdraco/tesla_powerwall | dbf4493796c13e08fef2e8ddda547ad9ef1e2469 | [
"Apache-2.0"
] | null | null | null | class PowerwallError(Exception):
def __init__(self, msg):
super().__init__(msg)
class APIError(PowerwallError):
def __init__(self, error):
super().__init__("Powerwall api error: {}".format(error))
class MissingAttributeError(APIError):
def __init__(self, response: dict, attribute: str, u... | 31.190476 | 102 | 0.567939 |
4a1b007b3fe733e486c2f26f0976a154b8f3c152 | 3,239 | py | Python | example/pybbm_private_messages/settings.py | skolsuper/pybbm_private_messages | 0c89b5b0e07074902c51f7c85c418295118e5933 | [
"MIT"
] | 2 | 2015-08-30T08:44:05.000Z | 2015-08-30T08:44:13.000Z | example/pybbm_private_messages/settings.py | skolsuper/pybbm_private_messages | 0c89b5b0e07074902c51f7c85c418295118e5933 | [
"MIT"
] | 1 | 2015-08-29T09:55:28.000Z | 2015-08-29T09:55:28.000Z | example/pybbm_private_messages/settings.py | skolsuper/pybbm_private_messages | 0c89b5b0e07074902c51f7c85c418295118e5933 | [
"MIT"
] | null | null | null | """
Django settings for pybbm_private_messages project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
""... | 25.706349 | 71 | 0.702377 |
4a1b00bb2c504076f63b9f948855ea613e074a5f | 242 | py | Python | allauth/socialaccount/providers/auth0_provider/urls.py | Fuzzwah/django-allauth | 071cbef1388bb61a563d3e41197bd5b7c26664d2 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/auth0_provider/urls.py | Fuzzwah/django-allauth | 071cbef1388bb61a563d3e41197bd5b7c26664d2 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/auth0_provider/urls.py | Fuzzwah/django-allauth | 071cbef1388bb61a563d3e41197bd5b7c26664d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from allauth.socialaccount.providers.auth0_provider.provider import Auth0Provider
from allauth.socialaccount.providers.oauth2_provider.urls import default_urlpatterns
urlpatterns = default_urlpatterns(Auth0Provider)
| 34.571429 | 84 | 0.842975 |
4a1b028ae17a1b31ba2ea25ec82b164e403adb1a | 6,868 | py | Python | src/tests/TestJustIntonation.py | ytyaru/Python.MusicTheory.Temperament.JustIntonation.201709221413 | 0c4e24a2b35ef985ed3697659525b02667958b34 | [
"CC0-1.0"
] | null | null | null | src/tests/TestJustIntonation.py | ytyaru/Python.MusicTheory.Temperament.JustIntonation.201709221413 | 0c4e24a2b35ef985ed3697659525b02667958b34 | [
"CC0-1.0"
] | null | null | null | src/tests/TestJustIntonation.py | ytyaru/Python.MusicTheory.Temperament.JustIntonation.201709221413 | 0c4e24a2b35ef985ed3697659525b02667958b34 | [
"CC0-1.0"
] | null | null | null | #!python3.6
import unittest
import math
from MusicTheory.temperament.JustIntonation import JustIntonation
from MusicTheory.temperament.FundamentalTone import FundamentalTone
from MusicTheory.scale.Scale import Scale
from MusicTheory.scale.ScaleIntervals import ScaleIntervals
from MusicTheory.pitch.PitchClass import Pit... | 44.888889 | 121 | 0.660891 |
4a1b02a3d2b451a8c03590500003f7dfc339fa5b | 3,332 | py | Python | examples/ex_cnn_cascade_training_face_detection/preprocess_negative.py | KayaDevSolutions/deepgaze | a6d444c70bb75ffcfc23d3b31a0567711fb956a7 | [
"MIT"
] | 1,653 | 2016-05-06T02:56:08.000Z | 2022-03-26T16:34:30.000Z | examples/ex_cnn_cascade_training_face_detection/preprocess_negative.py | KayaDevSolutions/deepgaze | a6d444c70bb75ffcfc23d3b31a0567711fb956a7 | [
"MIT"
] | 94 | 2016-04-09T04:40:08.000Z | 2022-03-31T08:52:17.000Z | examples/ex_cnn_cascade_training_face_detection/preprocess_negative.py | KayaDevSolutions/deepgaze | a6d444c70bb75ffcfc23d3b31a0567711fb956a7 | [
"MIT"
] | 514 | 2016-08-28T01:47:56.000Z | 2022-01-30T13:42:39.000Z | #!/usr/bin/env python
# The MIT License (MIT)
# Copyright (c) 2017 Massimiliano Patacchiola
# https://mpatacchiola.github.io
# https://mpatacchiola.github.io/blog/
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, F... | 39.666667 | 141 | 0.602041 |
4a1b03043b73c3778abaa3869d3682c6dbd77061 | 1,153 | py | Python | parsers/pyBSRP/build/lib/bsrp/protocols/clearchanneljson.py | uky-transport-data-science/BSR_parsers | 2d3a34b76481b94c74df8ab406340eb62aac28ab | [
"Apache-2.0"
] | 4 | 2019-12-27T13:33:33.000Z | 2022-01-20T14:08:22.000Z | parsers/pyBSRP/build/lib/bsrp/protocols/clearchanneljson.py | uky-transport-data-science/BSR_parsers | 2d3a34b76481b94c74df8ab406340eb62aac28ab | [
"Apache-2.0"
] | null | null | null | parsers/pyBSRP/build/lib/bsrp/protocols/clearchanneljson.py | uky-transport-data-science/BSR_parsers | 2d3a34b76481b94c74df8ab406340eb62aac28ab | [
"Apache-2.0"
] | 1 | 2021-03-16T16:20:40.000Z | 2021-03-16T16:20:40.000Z | # Parser: bici (e.g., barcelona)
import json, re
def parse(df, data, utc):
# df is a dict with the following keys:
# [u'feedurl', u'feedname', u'bssid', u'format', u'feedurl2', u'keyreq', u'parsername', u'rid']
# parse out desired info
# does the file have valid content
try:
js... | 32.942857 | 180 | 0.570685 |
4a1b037f7bfb6c7698b71f965e6759fb806ae1ee | 17,221 | py | Python | kivymd/list.py | pigogames/KivyMD | 54767e9cd9552df19676af9d105700a06b2c8d71 | [
"MIT"
] | null | null | null | kivymd/list.py | pigogames/KivyMD | 54767e9cd9552df19676af9d105700a06b2c8d71 | [
"MIT"
] | null | null | null | kivymd/list.py | pigogames/KivyMD | 54767e9cd9552df19676af9d105700a06b2c8d71 | [
"MIT"
] | 1 | 2021-06-08T12:44:30.000Z | 2021-06-08T12:44:30.000Z | """
Lists
=====
Copyright (c) 2015 Andrés Rodríguez and KivyMD contributors -
KivyMD library up to version 0.1.2
Copyright (c) 2019 Ivanov Yuri and KivyMD contributors -
KivyMD library version 0.1.3 and higher
For suggestions and questions:
<kivydevelopment@gmail.com>
This file is distributed under the terms... | 29.897569 | 81 | 0.657976 |
4a1b0447bc6a57ace04a072cae09d8a467840072 | 965 | py | Python | sampler2.py | benthomasson/zeromq_capnproto_test | fc33f85f0c68148060fa78dc78edf7d334e1f791 | [
"Apache-2.0"
] | null | null | null | sampler2.py | benthomasson/zeromq_capnproto_test | fc33f85f0c68148060fa78dc78edf7d334e1f791 | [
"Apache-2.0"
] | null | null | null | sampler2.py | benthomasson/zeromq_capnproto_test | fc33f85f0c68148060fa78dc78edf7d334e1f791 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import capnp # noqa
import measurements_capnp
import psutil
import zmq
import time
import datetime
from itertools import count
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://*:5559")
counter = count(0)
d... | 24.74359 | 63 | 0.719171 |
4a1b0551137d80a5c0e2d4758d79fcdf2021ba87 | 535 | py | Python | django/djangoproject/burger_restaurant/migrations/0016_alter_order_order_status.py | Mango-Smoothie/Burger_Restaurant | 858ac08d0791a536993ce253c6741b4b073d4e84 | [
"MIT"
] | 1 | 2021-11-30T14:13:41.000Z | 2021-11-30T14:13:41.000Z | django/djangoproject/burger_restaurant/migrations/0016_alter_order_order_status.py | Mango-Smoothie/Burger_Restaurant | 858ac08d0791a536993ce253c6741b4b073d4e84 | [
"MIT"
] | null | null | null | django/djangoproject/burger_restaurant/migrations/0016_alter_order_order_status.py | Mango-Smoothie/Burger_Restaurant | 858ac08d0791a536993ce253c6741b4b073d4e84 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-29 13:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('burger_restaurant', '0015_alter_customer_options'),
]
operations = [
migrations.AlterField(
model_name='order',
name... | 28.157895 | 180 | 0.629907 |
4a1b05ca6d1001e5da9f3754ccd44ddc9731f7b1 | 1,926 | py | Python | tests/test_init_extra.py | google/evojax | d5b450b1834683e8b2196d081d8602fc14f262d9 | [
"Apache-2.0"
] | 365 | 2022-02-08T07:41:33.000Z | 2022-03-31T23:35:35.000Z | tests/test_init_extra.py | google/evojax | d5b450b1834683e8b2196d081d8602fc14f262d9 | [
"Apache-2.0"
] | 16 | 2022-02-13T11:29:53.000Z | 2022-03-31T11:00:34.000Z | tests/test_init_extra.py | google/evojax | d5b450b1834683e8b2196d081d8602fc14f262d9 | [
"Apache-2.0"
] | 24 | 2022-02-11T04:19:35.000Z | 2022-03-15T02:44:35.000Z | # Copyright 2022 The EvoJAX 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 in w... | 31.064516 | 107 | 0.646417 |
4a1b0632906bc73b224de08cf337f803b06ec06a | 263 | py | Python | django_fastapi/api/admin.py | sfcol/fast-api-django | 849f6055b580024f409a6a6e215284f818d57323 | [
"MIT"
] | null | null | null | django_fastapi/api/admin.py | sfcol/fast-api-django | 849f6055b580024f409a6a6e215284f818d57323 | [
"MIT"
] | null | null | null | django_fastapi/api/admin.py | sfcol/fast-api-django | 849f6055b580024f409a6a6e215284f818d57323 | [
"MIT"
] | null | null | null | from django.contrib import admin
from api.models import Item , User
@admin.register(Item)
class ItemAdmin(admin.ModelAdmin):
list_display = ("id", "title")
@admin.register(User)
class ItemAdmin(admin.ModelAdmin):
list_display = ("id", "name", "email") | 21.916667 | 42 | 0.718631 |
4a1b06b1db20c4fff4a19d1079b2dc471f00817e | 4,793 | py | Python | kubernetes/client/models/v1_label_selector.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_label_selector.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_label_selector.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.9.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | 30.922581 | 269 | 0.606718 |
4a1b08b538c2c588b39e1f8899c4466f64b04ffe | 9,525 | py | Python | xesmf/tests/test_backend.py | andersy005/xESMF | 3b23a7ee6b5a580882bd62cd1ef5bf7062f4ba4d | [
"MIT"
] | 1 | 2020-11-07T18:55:41.000Z | 2020-11-07T18:55:41.000Z | xesmf/tests/test_backend.py | andersy005/xESMF | 3b23a7ee6b5a580882bd62cd1ef5bf7062f4ba4d | [
"MIT"
] | null | null | null | xesmf/tests/test_backend.py | andersy005/xESMF | 3b23a7ee6b5a580882bd62cd1ef5bf7062f4ba4d | [
"MIT"
] | null | null | null | import os
import ESMF
import numpy as np
import pytest
import xarray as xr
from numpy.testing import assert_almost_equal, assert_equal
import xesmf as xe
from xesmf.backend import (
add_corner,
esmf_grid,
esmf_locstream,
esmf_regrid_apply,
esmf_regrid_build,
esmf_regrid_finalize,
warn_f_co... | 31.963087 | 108 | 0.704147 |
4a1b08c8b936516598b7726342a6673b22bfe56c | 906 | py | Python | tests/core/full_node/ram_db.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | null | null | null | tests/core/full_node/ram_db.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | null | null | null | tests/core/full_node/ram_db.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | null | null | null | from typing import Tuple
import aiosqlite
from littlelambocoin.consensus.blockchain import Blockchain
from littlelambocoin.consensus.constants import ConsensusConstants
from littlelambocoin.full_node.block_store import BlockStore
from littlelambocoin.full_node.coin_store import CoinStore
from littlelambocoin.full_nod... | 43.142857 | 116 | 0.833333 |
4a1b08de3dff2447956a0e48d01430ec0adb024f | 3,044 | py | Python | train.py | Stanford-ILIAD/RL_Routing | 309beadebad84ec46fdad75b688848e36f10b214 | [
"MIT"
] | 4 | 2021-07-23T01:14:36.000Z | 2022-03-05T06:24:57.000Z | train.py | Stanford-ILIAD/RL_Routing | 309beadebad84ec46fdad75b688848e36f10b214 | [
"MIT"
] | null | null | null | train.py | Stanford-ILIAD/RL_Routing | 309beadebad84ec46fdad75b688848e36f10b214 | [
"MIT"
] | 1 | 2021-10-04T20:38:17.000Z | 2021-10-04T20:38:17.000Z | import os
from baselines.common import tf_util as U
from baselines import logger
from baselines.common import set_global_seeds
import gym
import gym_trafficnetwork
from mpi4py import MPI
from baselines.bench import Monitor
sim_duration = 5.0 # hours
network_type = 'multiOD' # type 'parallel' or 'general' or 'multiOD'
... | 39.532468 | 162 | 0.672799 |
4a1b095a3afe086c3d2da056a45356bf53b3d58d | 166 | py | Python | habr_art_stat/exceptins.py | nikolnikon/otus_web_habr_art_stats | c53d03a481e666229ad998ee3f488d69972db820 | [
"MIT"
] | null | null | null | habr_art_stat/exceptins.py | nikolnikon/otus_web_habr_art_stats | c53d03a481e666229ad998ee3f488d69972db820 | [
"MIT"
] | null | null | null | habr_art_stat/exceptins.py | nikolnikon/otus_web_habr_art_stats | c53d03a481e666229ad998ee3f488d69972db820 | [
"MIT"
] | null | null | null | class ParseError(Exception):
def __init__(self, message=None):
super(ParseError, self).__init__('Ошибка при парсинге сайта habr.com. {}'.format(message))
| 41.5 | 98 | 0.716867 |
4a1b0babd7102c80c9c56c4f69d8a858ed32af90 | 1,211 | py | Python | A_Structured_Self-attentive_Sentence_Embedding_cls/build_vocab.py | aisolab/nlp_implementation | 21ea6e3f5737e7074bdd8dd190e5f5172f86f6bf | [
"MIT"
] | 181 | 2019-03-11T11:55:17.000Z | 2020-05-25T04:50:21.000Z | A_Structured_Self-attentive_Sentence_Embedding_cls/build_vocab.py | aisolab/nlp_implementation | 21ea6e3f5737e7074bdd8dd190e5f5172f86f6bf | [
"MIT"
] | 13 | 2019-06-28T02:39:20.000Z | 2020-05-12T07:10:14.000Z | Convolutional_Neural_Networks_for_Sentence_Classification/build_vocab.py | aisolab/nlp_implementation | 21ea6e3f5737e7074bdd8dd190e5f5172f86f6bf | [
"MIT"
] | 38 | 2019-03-13T00:57:28.000Z | 2020-05-21T09:45:03.000Z | import itertools
import pickle
import gluonnlp as nlp
import pandas as pd
from pathlib import Path
from model.utils import Vocab
from model.split import split_morphs
from utils import Config
from collections import Counter
# loading dataset
nsmc_dir = Path("nsmc")
config = Config("conf/dataset/nsmc.json")
tr = pd.read... | 26.911111 | 70 | 0.752271 |
4a1b0c5694ff2e41ac0bbffcd75eaa23ba0d26a3 | 4,551 | py | Python | src/modeline.py | tweakoz/zed64 | c0231444418999191182d53d9319bf7978422bfb | [
"CC-BY-3.0"
] | 4 | 2015-06-04T01:14:43.000Z | 2018-06-16T05:45:57.000Z | src/modeline.py | tweakoz/zed64 | c0231444418999191182d53d9319bf7978422bfb | [
"CC-BY-3.0"
] | null | null | null | src/modeline.py | tweakoz/zed64 | c0231444418999191182d53d9319bf7978422bfb | [
"CC-BY-3.0"
] | null | null | null | import os, sys
from myhdl import *
from stdlib import *
###########################################################
# pixelclocks
###########################################################
# pixel_clocks[6], // 148.5
# pixel_clocks[5], // 74.25
# pixel_clocks[4], // 108mhz
# pixel_clocks[3], // 40
# ... | 32.049296 | 82 | 0.511536 |
4a1b0da87656dc787def3e0421d400d2a72e7c03 | 3,774 | py | Python | core/confdb/syntax/virtualrouter/protocols/vrrp/base.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | core/confdb/syntax/virtualrouter/protocols/vrrp/base.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | core/confdb/syntax/virtualrouter/protocols/vrrp/base.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# ConfDB virtual-router <name> protocols vrrp syntax
# ----------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ---------------------------------------------------... | 39.726316 | 99 | 0.222576 |
4a1b0dcc53e4c376a7325c4a14a7d8d4bfe1cd94 | 9,927 | py | Python | Minesweeper.py | LuizHenriquePy/Minesweeper | 23e4d3a2bcb6ef6c0a05a14bd77ab66284c6a568 | [
"MIT"
] | null | null | null | Minesweeper.py | LuizHenriquePy/Minesweeper | 23e4d3a2bcb6ef6c0a05a14bd77ab66284c6a568 | [
"MIT"
] | null | null | null | Minesweeper.py | LuizHenriquePy/Minesweeper | 23e4d3a2bcb6ef6c0a05a14bd77ab66284c6a568 | [
"MIT"
] | null | null | null | from random import randint
from tkinter import *
from tkinter.messagebox import showinfo
from functools import partial
NEIGHBORS = [
lambda x, y: (x - 1, y - 1), # top left
lambda x, y: (x - 1, y), # top
lambda x, y: (x - 1, y + 1), # top right
lambda x, y: (x, y - 1), # left
lambda x, y:... | 30.925234 | 119 | 0.512642 |
4a1b0f518917525eb00db9f6a88103b2567315a8 | 1,327 | py | Python | goodline_iptv/xmltv.py | nsadovskiy/goodline_tv | 6f745ae05a22031a36cb5cedc6b627cbf7ba6512 | [
"MIT"
] | 1 | 2016-03-27T08:57:35.000Z | 2016-03-27T08:57:35.000Z | goodline_iptv/xmltv.py | nsadovskiy/goodline_tv | 6f745ae05a22031a36cb5cedc6b627cbf7ba6512 | [
"MIT"
] | null | null | null | goodline_iptv/xmltv.py | nsadovskiy/goodline_tv | 6f745ae05a22031a36cb5cedc6b627cbf7ba6512 | [
"MIT"
] | null | null | null | from xml.dom import minidom
from aiofiles import open as open_file
from xml.etree.ElementTree import Element, SubElement, tostring
class XmltvBuilder(object):
def __init__(self, timezone='+0700'):
self.timezone = timezone
self.root = Element('tv')
self.root.set('generator-info-name', 'P... | 32.365854 | 99 | 0.632253 |
4a1b116b628eb5ca05179824f1b5cc53db4e7f88 | 1,802 | py | Python | Source/Tests/index.py | JuanDiegoMontoya/2D_Game_Engine | b2b026de9d5e0953331cb5a4db55bb6cacf5b55e | [
"MIT"
] | 3 | 2021-07-12T08:06:13.000Z | 2021-12-22T15:03:09.000Z | Source/Tests/index.py | JuanDiegoMontoya/3D_Voxel_Engine | b2b026de9d5e0953331cb5a4db55bb6cacf5b55e | [
"MIT"
] | null | null | null | Source/Tests/index.py | JuanDiegoMontoya/3D_Voxel_Engine | b2b026de9d5e0953331cb5a4db55bb6cacf5b55e | [
"MIT"
] | 2 | 2021-02-07T04:20:51.000Z | 2021-07-12T08:06:14.000Z | # some coordinate tests (not unit tests)
import operator as op
from functools import reduce
SIZE = 32
def ID3D(x, y, z, h, w):
return (x + h * (y + w * z))
def TestID3D():
for z in range(SIZE):
for x in range(SIZE):
for y in range(SIZE):
print(ID3D(x, y, z, SIZE, SIZE))
def TestBitAnd():
... | 21.710843 | 62 | 0.54495 |
4a1b12414bcc56bf3d31c02cc2c8fad0676ad374 | 161,315 | py | Python | pandas/io/pytables.py | JimStearns206/pandas | ceaf85233d434a226b23f891465b4abfdc602e46 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/io/pytables.py | JimStearns206/pandas | ceaf85233d434a226b23f891465b4abfdc602e46 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/io/pytables.py | JimStearns206/pandas | ceaf85233d434a226b23f891465b4abfdc602e46 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | """
High level interface to PyTables for reading and writing pandas data structures
to disk
"""
# pylint: disable-msg=E1101,W0613,W0603
from datetime import datetime, date
import time
import re
import copy
import itertools
import warnings
import os
from pandas.core.dtypes.common import (
is_list_like,
is_cate... | 33.903951 | 104 | 0.555088 |
4a1b128fa7c0383970b67145023352fde31f964f | 246 | py | Python | test/tiles/npvector_test.py | liz-is/clodius | 7e4a0d5f646a9af625c97e07859d914e72c83f0e | [
"MIT"
] | null | null | null | test/tiles/npvector_test.py | liz-is/clodius | 7e4a0d5f646a9af625c97e07859d914e72c83f0e | [
"MIT"
] | 1 | 2019-03-28T20:08:01.000Z | 2019-03-28T20:08:01.000Z | test/tiles/npvector_test.py | 4dn-dcic/clodius | aa31b3d90a5a9fec883c20cab31ad4d347cd52cd | [
"MIT"
] | null | null | null | import numpy as np
import clodius.tiles.npvector as hgnv
def test_npvector():
array = np.array(range(100))
# print('ts:', hgnv.tileset_info(array))
assert('max_width' in hgnv.tileset_info(array))
tile = hgnv.tiles(array, 0, 0)
| 22.363636 | 51 | 0.686992 |
4a1b130dcb42bcbdeabcd4be51db950239cc2e9a | 187 | py | Python | deepspeed/module_inject/__init__.py | samyam/DeepSpeed | 22aca3694ad4f01d13813b9630caac8683bb22e9 | [
"MIT"
] | null | null | null | deepspeed/module_inject/__init__.py | samyam/DeepSpeed | 22aca3694ad4f01d13813b9630caac8683bb22e9 | [
"MIT"
] | null | null | null | deepspeed/module_inject/__init__.py | samyam/DeepSpeed | 22aca3694ad4f01d13813b9630caac8683bb22e9 | [
"MIT"
] | null | null | null | from .replace_module import replace_transformer_layer
from .module_quantize import quantize_transformer_layer
from .replace_policy import DSPolicy, HFBertLayerPolicy, MegatronLayerPolicy
| 46.75 | 76 | 0.898396 |
4a1b132a3c59cc1a84aeea9103440ad4c817f490 | 2,411 | py | Python | mmdet/cv_core/utils/coco_creator.py | Karybdis/mmdetection-mini | cf255db8037cfeecb7927268d018432f5771ab2e | [
"MIT"
] | 834 | 2020-09-08T08:00:04.000Z | 2022-03-29T01:25:55.000Z | mmdet/cv_core/utils/coco_creator.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | 44 | 2020-09-16T14:21:58.000Z | 2022-03-07T04:28:39.000Z | mmdet/cv_core/utils/coco_creator.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | 161 | 2020-09-10T03:26:35.000Z | 2022-03-22T11:25:04.000Z | import datetime
import json
import os
from .pycococreatortools import create_image_info, create_annotation_info
class CocoCreator(object):
def __init__(self, categories, year=2020, out_dir='./', save_name='temp.json'):
INFO = {
"description": "Dataset",
"url": "https://github.com/h... | 33.486111 | 115 | 0.546246 |
4a1b135ed6a6f15fe07a5f53af2739f8e8ddb5b4 | 181 | py | Python | automate.py | ismaelsadeeq/automate- | b0ad3cf055bab70340cb7973a3a4b0e25d8e3389 | [
"MIT"
] | null | null | null | automate.py | ismaelsadeeq/automate- | b0ad3cf055bab70340cb7973a3a4b0e25d8e3389 | [
"MIT"
] | null | null | null | automate.py | ismaelsadeeq/automate- | b0ad3cf055bab70340cb7973a3a4b0e25d8e3389 | [
"MIT"
] | null | null | null | import pyautogui
import time
text = input("Enter the text you want to send")
i=0
while True:
time.sleep(2)
pyautogui.typewrite(text)
time.sleep(1)
pyautogui.press('enter') | 16.454545 | 47 | 0.723757 |
4a1b13d1f570b83f38c360f22dbbe09c7ab748e3 | 6,527 | py | Python | minetest/mods/discordmt/server.py | ShadyFox2004/minetest-server | 1310fd2a8c0bee9e9e718257ed136040e34d213e | [
"MIT"
] | 1 | 2021-06-30T20:50:19.000Z | 2021-06-30T20:50:19.000Z | minetest/mods/discordmt/server.py | ShadyFox2004/minetest-server | 1310fd2a8c0bee9e9e718257ed136040e34d213e | [
"MIT"
] | null | null | null | minetest/mods/discordmt/server.py | ShadyFox2004/minetest-server | 1310fd2a8c0bee9e9e718257ed136040e34d213e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from aiohttp import web
import aiohttp
import discord
from discord.ext import commands
import asyncio
import json
import time
import configparser
import re
config = configparser.ConfigParser()
config.read('relay.conf')
class Queue():
def __init__(self):
self.queue = []
... | 31.531401 | 202 | 0.613452 |
4a1b1402b2afd8a02a9a80b11c173cb2aba193e7 | 7,567 | py | Python | run.py | Manasseh-Kinyua/passLocker | 09589628bbcda14cb59b1dc56a76eaf768a53760 | [
"MIT"
] | null | null | null | run.py | Manasseh-Kinyua/passLocker | 09589628bbcda14cb59b1dc56a76eaf768a53760 | [
"MIT"
] | null | null | null | run.py | Manasseh-Kinyua/passLocker | 09589628bbcda14cb59b1dc56a76eaf768a53760 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.9
from user import User
from user import Credentials
def logo():
print(" ____ _ _ ")
print(" | _ \ | | | | /\ ")
print(" | |_) ) ____ ___ ___ | | __... | 38.217172 | 255 | 0.556231 |
4a1b14534d4793e52e8e56632f5eb8427f4f2865 | 4,374 | py | Python | contrib/seeds/generate-seeds.py | 3mhuggu5hss/privat | 5f715576bf02497ac207f682dce7c3fb94682feb | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | 3mhuggu5hss/privat | 5f715576bf02497ac207f682dce7c3fb94682feb | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | 3mhuggu5hss/privat | 5f715576bf02497ac207f682dce7c3fb94682feb | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory tha... | 31.467626 | 98 | 0.582076 |
4a1b1550b262083f76b6182c347ceb7a949e58d0 | 737 | py | Python | predictPixelMovement.py | danieldrysn/opticalflow_backgroundestimation | fd73feb8473072e78a2b4fcf9da856c3e5e4f940 | [
"BSD-3-Clause"
] | null | null | null | predictPixelMovement.py | danieldrysn/opticalflow_backgroundestimation | fd73feb8473072e78a2b4fcf9da856c3e5e4f940 | [
"BSD-3-Clause"
] | null | null | null | predictPixelMovement.py | danieldrysn/opticalflow_backgroundestimation | fd73feb8473072e78a2b4fcf9da856c3e5e4f940 | [
"BSD-3-Clause"
] | null | null | null | # Predict Pixel Movement
# Daniel D. Doyle
# 2021-11-10
'''
Predict Pixel Movement umath.sing image rows and columns, focal length, pan, and tilt angles
'''
import math
# Returns predicted point based on size of the image, previous point, focal length, psi, and theta
def predictPixelMovement( rows, cols, ... | 38.789474 | 140 | 0.682497 |
4a1b15f9a70d87a992c2c88e96244f41b5ee7a9a | 1,340 | py | Python | cpl/math/prime_factorization_query.py | yaumu3/cpl-python3 | 903d73195ecf606af41fb22fb74282aaca63d33a | [
"MIT"
] | 1 | 2021-03-05T15:48:23.000Z | 2021-03-05T15:48:23.000Z | cpl/math/prime_factorization_query.py | yaumu3/cpl-python3 | 903d73195ecf606af41fb22fb74282aaca63d33a | [
"MIT"
] | null | null | null | cpl/math/prime_factorization_query.py | yaumu3/cpl-python3 | 903d73195ecf606af41fb22fb74282aaca63d33a | [
"MIT"
] | null | null | null | from typing import List
class SmallestPrimeFactors:
"""High speed prime factorizaton using smallest prime factors
Precompute the smallest prime factor for each integer less than or equal to `n`
by Eratosthenes sieve; tiem complexity O(n*log(log(n))).
Then, factorize integer `x` with time complexity O(... | 30.454545 | 88 | 0.535075 |
4a1b16f231b4739be1ffe9fc298e3644ca0ce81c | 391 | py | Python | Sritter/asgi.py | lllapukk/Sritter | 12eda47b56a0533dc6405dd5d37f903968ed624d | [
"MIT"
] | null | null | null | Sritter/asgi.py | lllapukk/Sritter | 12eda47b56a0533dc6405dd5d37f903968ed624d | [
"MIT"
] | null | null | null | Sritter/asgi.py | lllapukk/Sritter | 12eda47b56a0533dc6405dd5d37f903968ed624d | [
"MIT"
] | null | null | null | """
ASGI config for Sritter project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
4a1b16fdb0555e75119407ace00db7b9739e4490 | 6,615 | py | Python | mindspore/nn/metrics/mean_surface_distance.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | mindspore/nn/metrics/mean_surface_distance.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | mindspore/nn/metrics/mean_surface_distance.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.603774 | 119 | 0.636432 |
4a1b18af56e4410fa786f3e4e71e38fe55b3f495 | 5,789 | py | Python | old/main_original.py | i207M/pytorch-cifar | df4417b6d0a25515ac82b5aa6151ae2135b2cd5c | [
"MIT"
] | null | null | null | old/main_original.py | i207M/pytorch-cifar | df4417b6d0a25515ac82b5aa6151ae2135b2cd5c | [
"MIT"
] | null | null | null | old/main_original.py | i207M/pytorch-cifar | df4417b6d0a25515ac82b5aa6151ae2135b2cd5c | [
"MIT"
] | null | null | null | '''Train CIFAR10 with PyTorch.'''
import argparse
import os
import time
from pathlib import Path
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
import torchvision.transform... | 30.62963 | 105 | 0.643807 |
4a1b1a58925e03bd6db6d45cb4654b3c4f2ed010 | 631 | py | Python | src/data/727.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/727.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/727.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | n, q = list(map(int, input().split()))
g = [[] for _ in range(n)]
for i in range(n - 1):
a, b = list(map(lambda x: int(x) - 1, input().split()))
g[a].append(b)
g[b].append(a)
from collections import deque
def bfs(v):
q = deque()
q.append(v)
d = [-1] * n
d[v] = 0
while q:
v =... | 17.527778 | 59 | 0.448494 |
4a1b1abe425bc18341d285c25017526ccf41c439 | 714 | py | Python | recursion/tower_of_hanoi.py | Yasir323/Data-Structures-and-Algorithms-in-Python | b721d0ca0218b9665d4f6ca0bbfd4417244bcdf0 | [
"MIT"
] | null | null | null | recursion/tower_of_hanoi.py | Yasir323/Data-Structures-and-Algorithms-in-Python | b721d0ca0218b9665d4f6ca0bbfd4417244bcdf0 | [
"MIT"
] | null | null | null | recursion/tower_of_hanoi.py | Yasir323/Data-Structures-and-Algorithms-in-Python | b721d0ca0218b9665d4f6ca0bbfd4417244bcdf0 | [
"MIT"
] | null | null | null | """
Here is a high-level outline of how to move a tower
from the starting pole, to the goal pole, using an
intermediate pole:
1. Move a tower of height-1 to an intermediate pole,
using the final pole.
2. Move the remaining disk to the final pole.
3. Move the tower of height-1 from the intermediate
pole to t... | 24.62069 | 64 | 0.691877 |
4a1b1b684342a34256d9dead36e0fda2baf41185 | 50 | py | Python | maths/__init__.py | claywahlstrom/pack | 86b70198a4b185611c2ce3d29df99dd01233a6ac | [
"BSD-2-Clause"
] | 2 | 2019-05-04T09:32:15.000Z | 2021-02-08T08:38:23.000Z | maths/__init__.py | claywahlstrom/pack | 86b70198a4b185611c2ce3d29df99dd01233a6ac | [
"BSD-2-Clause"
] | null | null | null | maths/__init__.py | claywahlstrom/pack | 86b70198a4b185611c2ce3d29df99dd01233a6ac | [
"BSD-2-Clause"
] | null | null | null |
__all__ = ['core', 'matlab', 'stats', 'vectors']
| 16.666667 | 48 | 0.58 |
4a1b1b6cf30d59ed8421ffd58130b9d143d2c3b2 | 755 | py | Python | Listing_13-3.py | PrinceChou/Play-Python-with-Alisa | 808ab2744a99c548de4633b5707af27112bcdccf | [
"Apache-2.0"
] | null | null | null | Listing_13-3.py | PrinceChou/Play-Python-with-Alisa | 808ab2744a99c548de4633b5707af27112bcdccf | [
"Apache-2.0"
] | null | null | null | Listing_13-3.py | PrinceChou/Play-Python-with-Alisa | 808ab2744a99c548de4633b5707af27112bcdccf | [
"Apache-2.0"
] | null | null | null | # Listing_13-3
# Copyright Warren & Carter Sande, 2013
# Released under MIT license http://www.opensource.org/licenses/mit-license.php
# Version $version ----------------------------
# Function with two arguments
def printMyAddress(someName, houseNum):
print someName
print hous... | 37.75 | 90 | 0.569536 |
4a1b1c55564f1e2f33aba74778d6246888c5f918 | 79 | py | Python | Database/flask-sqlalchemy/models/__init__.py | amamov/cs001 | 5753f28e74e2330837d22142cff4713801c77a2d | [
"MIT"
] | 5 | 2021-02-21T17:10:03.000Z | 2022-03-04T21:17:50.000Z | flask-sqlalchemy/models/__init__.py | amamov/pythonic | 95f8f7dca9d01f11ecdf4b26b46afe41dc20b0d0 | [
"MIT"
] | null | null | null | flask-sqlalchemy/models/__init__.py | amamov/pythonic | 95f8f7dca9d01f11ecdf4b26b46afe41dc20b0d0 | [
"MIT"
] | 3 | 2021-02-25T17:53:57.000Z | 2021-06-25T17:25:44.000Z | from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from . import users | 15.8 | 39 | 0.797468 |
4a1b1e2716cdf57a8f63417cf8d3c97d71062eb5 | 2,577 | py | Python | tests/test_migrate.py | zalando-nakadi/bubuku | 5738cc9309ed46e86fcad41b6fb580ddd69af8fd | [
"MIT"
] | 32 | 2017-10-17T09:59:46.000Z | 2022-01-23T11:39:31.000Z | tests/test_migrate.py | zalando-nakadi/bubuku | 5738cc9309ed46e86fcad41b6fb580ddd69af8fd | [
"MIT"
] | 91 | 2017-07-13T15:43:15.000Z | 2022-02-21T13:06:35.000Z | tests/test_migrate.py | zalando-nakadi/bubuku | 5738cc9309ed46e86fcad41b6fb580ddd69af8fd | [
"MIT"
] | 3 | 2018-04-19T13:13:00.000Z | 2018-09-11T05:59:38.000Z | import unittest
from unittest.mock import MagicMock
from bubuku.features.migrate import MigrationChange
class TestMigrate(unittest.TestCase):
def test_migration_all_steps(self):
partitions = {
('test', 0): [1, 2, 3],
('test', 1): [2, 3, 1],
('test1', 0): [3, 2, 1],
... | 34.824324 | 95 | 0.523089 |
4a1b1e6a5c4183b5bcf79e1e184a2ac7bf214c26 | 903 | py | Python | settings/__init__.py | anchalghale/auto_disenchanter | 4edab1b72538b15bf8d665629f951db1612fa825 | [
"Apache-2.0"
] | 7 | 2021-04-07T17:44:42.000Z | 2022-02-13T05:47:11.000Z | settings/__init__.py | anchalghale/auto_disenchanter | 4edab1b72538b15bf8d665629f951db1612fa825 | [
"Apache-2.0"
] | 1 | 2021-08-20T09:11:38.000Z | 2022-02-11T12:54:38.000Z | settings/__init__.py | anchalghale/auto_disenchanter | 4edab1b72538b15bf8d665629f951db1612fa825 | [
"Apache-2.0"
] | 3 | 2019-11-22T06:21:17.000Z | 2020-06-16T07:25:23.000Z | ''' Configuration file for the program '''
import time
import json
from types import SimpleNamespace
from urllib.parse import urljoin
import requests
from server import SERVER_URL, SERVER_AUTH
from utils import get_base_dir
BASE_DIR = get_base_dir()
def get_settings(logger, debug=False):
''' Parses the setti... | 27.363636 | 87 | 0.632337 |
4a1b1eb34a118805355cfac526b9c9e62a90ebb8 | 1,228 | py | Python | controk_webservice/employees/migrations/0001_initial.py | controk-sys/http-server | 0be146140daab804fe2300678f5e69d1c9e292d8 | [
"MIT"
] | null | null | null | controk_webservice/employees/migrations/0001_initial.py | controk-sys/http-server | 0be146140daab804fe2300678f5e69d1c9e292d8 | [
"MIT"
] | 2 | 2016-10-25T23:31:58.000Z | 2016-10-27T02:10:41.000Z | controk_webservice/employees/migrations/0001_initial.py | jourdanrodrigues/controk-webservice | 0be146140daab804fe2300678f5e69d1c9e292d8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-16 16:01
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('addresses', '0001_initial'),
]
... | 34.111111 | 142 | 0.577362 |
4a1b209c89fc0dcd60563f637e02f0ea1e284eb0 | 1,361 | py | Python | radiomicsfeatureextractionpipeline/backend/src/logic/dicom_file_reader/dicom_file_reader.py | Maastro-CDS-Imaging-Group/SQLite4Radiomics | e3a7afc181eec0fe04c18da00edc3772064e6758 | [
"Apache-2.0"
] | null | null | null | radiomicsfeatureextractionpipeline/backend/src/logic/dicom_file_reader/dicom_file_reader.py | Maastro-CDS-Imaging-Group/SQLite4Radiomics | e3a7afc181eec0fe04c18da00edc3772064e6758 | [
"Apache-2.0"
] | 6 | 2021-06-09T19:39:27.000Z | 2021-09-30T16:41:40.000Z | radiomicsfeatureextractionpipeline/backend/src/logic/dicom_file_reader/dicom_file_reader.py | Maastro-CDS-Imaging-Group/SQLite4Radiomics | e3a7afc181eec0fe04c18da00edc3772064e6758 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from typing import List, Optional
from logic.entities.image import Image
class DicomFileReader(ABC):
"""
Abstract base class for implementation of the strategy pattern.
Used for reading DICOM files.
"""
def __init__(self, dicom_data_directory: str) -> None:
... | 32.404762 | 99 | 0.667157 |
4a1b209f0e107f59a7948e9169b0698d5ec0368e | 6,707 | py | Python | kubernetes/client/models/v1_env_var_source.py | dix000p/kubernetes-client-python | 22e473e02883aca1058606092c86311f02f42be2 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_env_var_source.py | dix000p/kubernetes-client-python | 22e473e02883aca1058606092c86311f02f42be2 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_env_var_source.py | dix000p/kubernetes-client-python | 22e473e02883aca1058606092c86311f02f42be2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | 31.78673 | 220 | 0.632175 |
4a1b2237594d65cbebbfa67e268dc53d2ca0644b | 13,965 | py | Python | neutron/tests/base.py | sajuptpm/notification_neutron | 45933f63c9eff0d2931a7209b040ff2dc69835c5 | [
"Apache-2.0"
] | null | null | null | neutron/tests/base.py | sajuptpm/notification_neutron | 45933f63c9eff0d2931a7209b040ff2dc69835c5 | [
"Apache-2.0"
] | null | null | null | neutron/tests/base.py | sajuptpm/notification_neutron | 45933f63c9eff0d2931a7209b040ff2dc69835c5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010-2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 34.825436 | 79 | 0.664805 |
4a1b22d8846974ad89a45d16482ba3fdfaee0673 | 2,645 | py | Python | foxlink/non_dimensionalizer.py | lamsoa729/FoXlink | 3c061b02968cdab1def752d5c145a6df4615504b | [
"BSD-3-Clause"
] | null | null | null | foxlink/non_dimensionalizer.py | lamsoa729/FoXlink | 3c061b02968cdab1def752d5c145a6df4615504b | [
"BSD-3-Clause"
] | null | null | null | foxlink/non_dimensionalizer.py | lamsoa729/FoXlink | 3c061b02968cdab1def752d5c145a6df4615504b | [
"BSD-3-Clause"
] | 2 | 2019-06-18T16:48:03.000Z | 2019-06-20T23:50:02.000Z | #!/usr/bin/env python
"""@package docstring
File: non_dimensionalizer.py
Author: Adam Lamson
Email: adam.lamson@colorado.edu
Description:
"""
import numpy as np
from copy import deepcopy as dcp
class NonDimensionalizer():
"""!Class to non-dimensionalize parameters."""
def __init__(self, **kwargs):
... | 31.86747 | 97 | 0.603403 |
4a1b231201c8658990c96bb22066f0532c85447b | 18,732 | py | Python | xor/symcollab/xor/xorhelper.py | symcollab/CryptoSolve | fc5c709cfeb9de7728b7baddc5d5da60d13ede0a | [
"BSD-3-Clause"
] | 1 | 2021-02-09T20:06:29.000Z | 2021-02-09T20:06:29.000Z | xor/symcollab/xor/xorhelper.py | symcollab/CryptoSolve | fc5c709cfeb9de7728b7baddc5d5da60d13ede0a | [
"BSD-3-Clause"
] | null | null | null | xor/symcollab/xor/xorhelper.py | symcollab/CryptoSolve | fc5c709cfeb9de7728b7baddc5d5da60d13ede0a | [
"BSD-3-Clause"
] | null | null | null | from copy import deepcopy
from symcollab.algebra import Constant, Variable, FuncTerm, Equation, SubstituteTerm
from symcollab.Unification.unif import unif
from .structure import Zero, XORTerm, Equations, Disequations, Disequation
from .xor import xor
def is_xor_term(t):
#return (isinstance(t, FuncTerm)) and (isins... | 33.873418 | 174 | 0.632928 |
4a1b242902e4f942b1ff3e2cab447ec387c49fb4 | 1,469 | py | Python | pbctf/2020/blacklist/genfiles.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 65 | 2019-10-07T01:29:16.000Z | 2022-03-18T14:20:40.000Z | pbctf/2020/blacklist/genfiles.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | pbctf/2020/blacklist/genfiles.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 12 | 2020-05-04T01:16:53.000Z | 2022-01-02T14:33:41.000Z | import string, random, os, sys
pool = string.ascii_letters + string.digits
random.seed(open('/dev/random', 'rb').read(16))
flag_parts = ['F', 'f', 'L', 'l', 'A', 'a', 'G', 'g', '70', '102', '76', '108',
'65', '97', '71', '103', '0x46', '0x66', '0x4c', '0x6c', '0x41', '0x61',
'0x47', '0x67', 'fl', 'la'... | 28.803922 | 80 | 0.456773 |
4a1b258e84b18cdb2108998a5759b3ae9338eeec | 1,380 | py | Python | boards/metro_m4_express/3.x/lib/adafruit_hid/__init__.py | jepler/circuitpython-default-files | 04a9134e41a8766fc7c5ce3666d433ddedfa6ed6 | [
"MIT"
] | 9 | 2019-03-15T02:47:49.000Z | 2022-01-20T05:54:08.000Z | infra/libs-400rc2-20190512/lib/adafruit_hid/__init__.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | 3 | 2019-11-07T03:37:40.000Z | 2021-02-09T20:09:39.000Z | lib/adafruit_hid/__init__.py | stoicsimian/gameclock | 3d22c5032dc0139d1ca2f3c29d4a425ed8521a3d | [
"MIT"
] | 14 | 2019-04-07T20:30:27.000Z | 2022-01-20T05:54:10.000Z | # The MIT License (MIT)
#
# Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitatio... | 44.516129 | 85 | 0.728261 |
4a1b274e1ae2fba791921111ffefa8e3eb237de0 | 826 | py | Python | Own/Python/Tutorials/Lists.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | Own/Python/Tutorials/Lists.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | Own/Python/Tutorials/Lists.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | #Cristian Chitiva
#cychitivav@unal.edu.co
#12/Sept/2018
myList = ['Hi', 5, 6 , 3.4, "i"] #Create the list
myList.append([4, 5]) #Add sublist [4, 5] to myList
myList.insert(2,"f") #Add "f" in the position 2
print(myList)
myList = [1, 3, 4, 5, 23, 4, 3, 222, 454, 6445, 6, 4654, 455]
myList.sort() #So... | 25.030303 | 68 | 0.641646 |
4a1b28f49024fb7770d30f0774f5dc01174781f6 | 14,545 | py | Python | droplet/server/executor/call.py | xcharleslin/droplet | 3124f60b3621df83a22e6dd14dce853330455340 | [
"Apache-2.0"
] | null | null | null | droplet/server/executor/call.py | xcharleslin/droplet | 3124f60b3621df83a22e6dd14dce853330455340 | [
"Apache-2.0"
] | null | null | null | droplet/server/executor/call.py | xcharleslin/droplet | 3124f60b3621df83a22e6dd14dce853330455340 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 U.C. Berkeley RISE Lab
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 36.27182 | 79 | 0.612994 |
4a1b291243be086e9c59052240b10109a46b89af | 5,147 | py | Python | configs/representation/uvc2_fpn/uvc2_r18-fpn_center_it_l1_video_2x8x1_sgd_cosine_10e_k400_rgb.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | configs/representation/uvc2_fpn/uvc2_r18-fpn_center_it_l1_video_2x8x1_sgd_cosine_10e_k400_rgb.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | configs/representation/uvc2_fpn/uvc2_r18-fpn_center_it_l1_video_2x8x1_sgd_cosine_10e_k400_rgb.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | # model settings
temperature = 0.01
with_norm = True
model = dict(
type='UVCTrackerV2',
backbone=dict(
type='ResNet',
pretrained=None,
depth=18,
out_indices=(1, 2, 3),
# strides=(1, 2, 1, 1),
norm_eval=False,
zero_init_residual=True),
neck=dict(
... | 30.636905 | 78 | 0.620167 |
4a1b2aa0c4ecd20fa968d891f736ed65bfa701b3 | 3,132 | py | Python | src/plugins/21_point/card_lib.py | NekoMashiro/water_spinach_bot | 52b805169bbf49ff167ee7eaf6fa477f8b8d1c99 | [
"MIT"
] | 1 | 2022-03-22T17:43:52.000Z | 2022-03-22T17:43:52.000Z | src/plugins/21_point/card_lib.py | NekoMashiro/water_spinach_bot | 52b805169bbf49ff167ee7eaf6fa477f8b8d1c99 | [
"MIT"
] | null | null | null | src/plugins/21_point/card_lib.py | NekoMashiro/water_spinach_bot | 52b805169bbf49ff167ee7eaf6fa477f8b8d1c99 | [
"MIT"
] | null | null | null | total_card = []
player = 0
finished_player = 0
every_player_card = {}
every_player_point = {}
def card_game_start():
global total_card
global player
global finished_player
player = 0
finished_player = 0
total_card = random_card_list()
every_player_card.clear()
every_player_card['bank... | 23.373134 | 63 | 0.574074 |
4a1b2b1013a8d5179765cd8d0f0ce23fc70cb883 | 8,281 | py | Python | sdk/python/pulumi_azure/compute/availability_set.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/availability_set.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/availability_set.py | adnang/pulumi-azure | 32360d2f1e41e27d7fdd6522cb26d65e531f279f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Availa... | 55.952703 | 280 | 0.709455 |
4a1b2baa9af6e1327dab212033d717281816cf22 | 3,853 | py | Python | tests/e2e/test_navigation_page_non_student.py | jaredsexton/Submitty | bcc778514299bfabf574131f5eacce3732c695e1 | [
"BSD-3-Clause"
] | null | null | null | tests/e2e/test_navigation_page_non_student.py | jaredsexton/Submitty | bcc778514299bfabf574131f5eacce3732c695e1 | [
"BSD-3-Clause"
] | null | null | null | tests/e2e/test_navigation_page_non_student.py | jaredsexton/Submitty | bcc778514299bfabf574131f5eacce3732c695e1 | [
"BSD-3-Clause"
] | null | null | null | from e2e.base_testcase import BaseTestCase
class TestNavigationPageNonStudent(BaseTestCase):
def __init__(self, testname):
super().__init__(testname, log_in=False)
def test_instructor(self):
self.log_in(user_id="instructor", user_name="Quinn")
self.click_class('sample', 'SAMPLE')
... | 52.780822 | 80 | 0.60135 |
4a1b2c2c57b9b53e7008f60e376ed021d3bc236b | 4,478 | py | Python | src/syntren.py | compmedlab/gGAN | e157bd76438ef6632ed59ea95677cd41136f84d1 | [
"MIT"
] | null | null | null | src/syntren.py | compmedlab/gGAN | e157bd76438ef6632ed59ea95677cd41136f84d1 | [
"MIT"
] | null | null | null | src/syntren.py | compmedlab/gGAN | e157bd76438ef6632ed59ea95677cd41136f84d1 | [
"MIT"
] | 1 | 2020-12-15T16:37:07.000Z | 2020-12-15T16:37:07.000Z | from data_pipeline import reg_network, get_gene_symbols
import numpy as np
import pandas as pd
DEFAULT_ROOT_GENE = 'CRP'
DEFAULT_EVIDENCE = 'Weak'
DEFAULT_DEPTH = np.inf
SYNTREN_DATA_DIR = '../data/syntren/' # '../../syntren1.2release/data/'
NETWORK_FILE = SYNTREN_DATA_DIR + 'source_networks/EColi_n{}_r{}_e{}_d{}.sif... | 48.150538 | 120 | 0.678205 |
4a1b2c8f1ecdcd2ed1bf83d185069db29b5692fb | 649 | py | Python | remoteweb/cli/keygen.py | hinihat/remoteweb | ae564a016e0bfa6c371385c53138652256c57bca | [
"MIT"
] | null | null | null | remoteweb/cli/keygen.py | hinihat/remoteweb | ae564a016e0bfa6c371385c53138652256c57bca | [
"MIT"
] | null | null | null | remoteweb/cli/keygen.py | hinihat/remoteweb | ae564a016e0bfa6c371385c53138652256c57bca | [
"MIT"
] | null | null | null | # Copyright (c) 2022 Shuhei Nitta. All rights reserved.
import click
from remoteweb import crypto
from remoteweb.cli import root
@root.main.command(
name="keygen",
help="Generate a pair of key"
)
@click.option(
"--bits", "-b",
type=int,
default=2048,
help="Bits of the key",
show_default=T... | 18.542857 | 55 | 0.619414 |
4a1b2cf382dea4aaec1c8644bfeffd058b478e8a | 114 | py | Python | keras_retinanet/layers/__init__.py | iver56/keras-retinanet | 83feca1aa49a8a75ed5d4a2ab43d8c18c6cce3f7 | [
"Apache-2.0"
] | 3 | 2020-08-28T11:25:41.000Z | 2022-01-16T08:09:15.000Z | keras_retinanet/layers/__init__.py | iver56/keras-retinanet | 83feca1aa49a8a75ed5d4a2ab43d8c18c6cce3f7 | [
"Apache-2.0"
] | 11 | 2020-01-28T22:29:48.000Z | 2022-03-11T23:29:39.000Z | keras_retinanet/layers/__init__.py | iver56/keras-retinanet | 83feca1aa49a8a75ed5d4a2ab43d8c18c6cce3f7 | [
"Apache-2.0"
] | 2 | 2021-12-03T17:23:21.000Z | 2021-12-04T11:50:12.000Z | from ._misc import RegressBoxes, UpsampleLike, Anchors, ClipBoxes
from .filter_detections import FilterDetections
| 38 | 65 | 0.859649 |
4a1b2d0c5b5ab32223ba87617f6b3acbd9f6d500 | 8,365 | py | Python | BSMDEMeasuresEstimation/MeasuresCode/CycleFailure/readlinks.py | OSADP/CVD-DME | 84e40c7c0105d90d9cf6392140101e6d5b88911e | [
"Apache-2.0"
] | null | null | null | BSMDEMeasuresEstimation/MeasuresCode/CycleFailure/readlinks.py | OSADP/CVD-DME | 84e40c7c0105d90d9cf6392140101e6d5b88911e | [
"Apache-2.0"
] | null | null | null | BSMDEMeasuresEstimation/MeasuresCode/CycleFailure/readlinks.py | OSADP/CVD-DME | 84e40c7c0105d90d9cf6392140101e6d5b88911e | [
"Apache-2.0"
] | null | null | null |
def all_links(bnlinks):
all_key_links = []
for bottleneck in bnlinks.keys():
for i, stem in enumerate(bnlinks[bottleneck].keys()):
for lnk in bnlinks[bottleneck][stem]:
all_key_links.append(lnk[0])
return all_key_links
def read_link_file(filename):
bnlinks ... | 30.867159 | 113 | 0.593425 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.