hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16d2ceeba676dbb491a1206466347e8ee17c6418 | 2,485 | py | Python | source/code/build-instance-scheduler-template.py | liangruibupt/aws-instance-scheduler | a4e46eec9f39c2e3b95c5bcbe32c036e239d6066 | [
"Apache-2.0"
] | null | null | null | source/code/build-instance-scheduler-template.py | liangruibupt/aws-instance-scheduler | a4e46eec9f39c2e3b95c5bcbe32c036e239d6066 | [
"Apache-2.0"
] | null | null | null | source/code/build-instance-scheduler-template.py | liangruibupt/aws-instance-scheduler | a4e46eec9f39c2e3b95c5bcbe32c036e239d6066 | [
"Apache-2.0"
] | 1 | 2021-04-09T15:01:49.000Z | 2021-04-09T15:01:49.000Z | ######################################################################################################################
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 59.166667 | 118 | 0.464789 |
16d306bdfaed88804b418d267e2c9f7fdd6fab73 | 7,965 | py | Python | src/parse.py | StanfordAHA/Configuration | a5d404433d32b0ac20544d5bafa9422c979afc16 | [
"BSD-3-Clause"
] | null | null | null | src/parse.py | StanfordAHA/Configuration | a5d404433d32b0ac20544d5bafa9422c979afc16 | [
"BSD-3-Clause"
] | null | null | null | src/parse.py | StanfordAHA/Configuration | a5d404433d32b0ac20544d5bafa9422c979afc16 | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# file -- parse.py --
# Top contributors (to current version):
# Nestan Tsiskaridze
# This file is part of the configuration finder for the Stanford AHA project.
# Copyright (c) 2021 by the authors listed in the file AUTHORS
# in th... | 40.431472 | 129 | 0.417075 |
16d35857ae1d82e14e5940b8e5331b8a6a44ca39 | 2,177 | py | Python | neyesem/main.py | omerfarukbaysal/neyesem | f69bf4446ce902f00389c8d71f68e1b7db05f86d | [
"MIT"
] | null | null | null | neyesem/main.py | omerfarukbaysal/neyesem | f69bf4446ce902f00389c8d71f68e1b7db05f86d | [
"MIT"
] | null | null | null | neyesem/main.py | omerfarukbaysal/neyesem | f69bf4446ce902f00389c8d71f68e1b7db05f86d | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template, redirect, url_for, request, flash, make_response
from werkzeug.security import generate_password_hash
from flask_login import login_required, current_user
from . import db
import datetime
from .models import Visitor, User
main = Blueprint('main', __name__)
| 33.492308 | 120 | 0.692237 |
16d397fdfd404f351b1fb42cfa6cff5538a49320 | 790 | py | Python | 00-Aulas/Aula007_2.py | AmandaRH07/Python_Entra21 | 4084962508f1597c0498d8b329e0f45e2ac55302 | [
"MIT"
] | null | null | null | 00-Aulas/Aula007_2.py | AmandaRH07/Python_Entra21 | 4084962508f1597c0498d8b329e0f45e2ac55302 | [
"MIT"
] | null | null | null | 00-Aulas/Aula007_2.py | AmandaRH07/Python_Entra21 | 4084962508f1597c0498d8b329e0f45e2ac55302 | [
"MIT"
] | null | null | null | # Funes
cabecalho = "SISTEMA DE CADASTRO DE FUNCIONARIO\n\n\n"
rodape = "\n\n\n Obrigada pela preferencia" | 27.241379 | 70 | 0.655696 |
16d47d0537155255ce27cd3c3479b098ca6ecf13 | 665 | py | Python | ast_version/src/binop.py | lucassa3/CCompiler | ad788f692dc2863da9111b4a42f54277ac29d5ae | [
"MIT"
] | 1 | 2020-04-29T21:30:11.000Z | 2020-04-29T21:30:11.000Z | ast_version/src/binop.py | lucassa3/CCompiler | ad788f692dc2863da9111b4a42f54277ac29d5ae | [
"MIT"
] | 10 | 2018-08-20T18:10:56.000Z | 2019-04-05T14:45:11.000Z | ast_version/src/binop.py | lucassa3/CCompiler | ad788f692dc2863da9111b4a42f54277ac29d5ae | [
"MIT"
] | null | null | null | from node import Node
| 19.558824 | 32 | 0.542857 |
16d53c81f0a6c59b031bb33f8b48778a56657258 | 7,180 | py | Python | aqt/installer.py | pylipp/aqtinstall | e08667cb5c9ced27994c4cde16d0c1b4a4386455 | [
"MIT"
] | null | null | null | aqt/installer.py | pylipp/aqtinstall | e08667cb5c9ced27994c4cde16d0c1b4a4386455 | [
"MIT"
] | null | null | null | aqt/installer.py | pylipp/aqtinstall | e08667cb5c9ced27994c4cde16d0c1b4a4386455 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (C) 2018 Linus Jahn <lnj@kaidan.im>
# Copyright (C) 2019,2020 Hiroshi Miura <miurahr@linux.com>
# Copyright (C) 2020, Aurlien Gteau
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software")... | 40.111732 | 110 | 0.608635 |
16d55202daea41a875b382f2393a76063d29376b | 4,865 | py | Python | lib/django-0.96/django/views/generic/list_detail.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/lib/django-0.96/django/views/generic/list_detail.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/lib/django-0.96/django/views/generic/list_detail.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | from django.template import loader, RequestContext
from django.http import Http404, HttpResponse
from django.core.xheaders import populate_xheaders
from django.core.paginator import ObjectPaginator, InvalidPage
from django.core.exceptions import ObjectDoesNotExist
def object_list(request, queryset, paginate_by=None, p... | 36.856061 | 113 | 0.623227 |
16d68949a023a20451569c4bd42476cab180bd99 | 5,398 | py | Python | pax/_src/core/utility_modules.py | NTT123/pax | b80e1e4b6bfb763afd6b4fdefa31a051ca8a3335 | [
"MIT"
] | 11 | 2021-08-28T17:45:38.000Z | 2022-01-26T17:50:03.000Z | pax/_src/core/utility_modules.py | NTT123/pax | b80e1e4b6bfb763afd6b4fdefa31a051ca8a3335 | [
"MIT"
] | 1 | 2021-09-13T17:29:33.000Z | 2021-09-13T21:50:34.000Z | pax/_src/core/utility_modules.py | NTT123/pax | b80e1e4b6bfb763afd6b4fdefa31a051ca8a3335 | [
"MIT"
] | null | null | null | """Utility Modules."""
from typing import Any, Callable, Dict, List, Optional, Sequence, TypeVar, Union
import jax
import jax.numpy as jnp
from .module import Module, parameters_method
T = TypeVar("T", bound=Module)
O = TypeVar("O")
| 29.659341 | 91 | 0.582994 |
16d79dca474781cfacdcca9ed1544b5e9e33234c | 2,612 | py | Python | src/richie/apps/courses/lms/edx.py | kernicPanel/richie | 803deda3e29383ce85593e1836a3cf4efc6b847e | [
"MIT"
] | null | null | null | src/richie/apps/courses/lms/edx.py | kernicPanel/richie | 803deda3e29383ce85593e1836a3cf4efc6b847e | [
"MIT"
] | null | null | null | src/richie/apps/courses/lms/edx.py | kernicPanel/richie | 803deda3e29383ce85593e1836a3cf4efc6b847e | [
"MIT"
] | null | null | null | """
Backend to connect Open edX richie with an LMS
"""
import logging
import re
import requests
from requests.auth import AuthBase
from ..serializers import SyncCourseRunSerializer
from .base import BaseLMSBackend
logger = logging.getLogger(__name__)
def split_course_key(key):
"""Split an OpenEdX course key by... | 32.246914 | 88 | 0.68683 |
16d7b7c1c6e2def8cf0c9ec10f6916a0a8cf367f | 4,106 | py | Python | BitTorrent-5.2.2/BTL/brpclib.py | jpabb7/p2pScrapper | 0fd57049606864223eb45f956a58adda1231af88 | [
"MIT"
] | 4 | 2016-04-26T03:43:54.000Z | 2016-11-17T08:09:04.000Z | BitTorrent-5.2.2/BTL/brpclib.py | jpabb7/p2pScrapper | 0fd57049606864223eb45f956a58adda1231af88 | [
"MIT"
] | 17 | 2015-01-05T21:06:22.000Z | 2015-12-07T20:45:44.000Z | BitTorrent-5.2.2/BTL/brpclib.py | jpabb7/p2pScrapper | 0fd57049606864223eb45f956a58adda1231af88 | [
"MIT"
] | 7 | 2015-07-28T09:17:17.000Z | 2021-11-07T02:29:41.000Z | # by Greg Hazel
import xmlrpclib
from xmlrpclib2 import *
from BTL import brpc
old_PyCurlTransport = PyCurlTransport
# --------------------------------------------------------------------
# request dispatcher
# Double underscore is BAD!
def new_server_proxy(url):
c = cache_set.get_cache(PyCURL_Cache, url)... | 30.641791 | 74 | 0.605212 |
16d7e9187801937282012d38f8b28fd55938bd25 | 1,207 | py | Python | database_files/views.py | den-gts/django-database-files-3000 | 0a135004427c021944b30ef8aace844ab20b9cfb | [
"BSD-3-Clause"
] | 8 | 2016-12-11T02:24:21.000Z | 2020-08-07T10:02:32.000Z | database_files/views.py | den-gts/django-database-files-3000 | 0a135004427c021944b30ef8aace844ab20b9cfb | [
"BSD-3-Clause"
] | 41 | 2015-08-11T16:57:21.000Z | 2022-01-18T19:19:41.000Z | database_files/views.py | den-gts/django-database-files-3000 | 0a135004427c021944b30ef8aace844ab20b9cfb | [
"BSD-3-Clause"
] | 7 | 2015-08-02T05:32:41.000Z | 2019-06-17T11:53:14.000Z | import base64
import mimetypes
import os
from django.conf import settings
from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_control
from django.views.static import serve as django_serve
from database_files.models import File
... | 29.439024 | 74 | 0.724109 |
16d80d08df5b20660db28d091611ed67b6dfa076 | 2,026 | py | Python | NoiseFiltersPy/Injector.py | TVect/NoiseFiltersPy | fff1f3113cf9b3e7b8de65421ab9951fd3cb11e5 | [
"MIT"
] | 6 | 2019-11-20T19:32:41.000Z | 2021-06-25T19:47:26.000Z | NoiseFiltersPy/Injector.py | TVect/NoiseFiltersPy | fff1f3113cf9b3e7b8de65421ab9951fd3cb11e5 | [
"MIT"
] | null | null | null | NoiseFiltersPy/Injector.py | TVect/NoiseFiltersPy | fff1f3113cf9b3e7b8de65421ab9951fd3cb11e5 | [
"MIT"
] | 1 | 2021-06-25T19:47:34.000Z | 2021-06-25T19:47:34.000Z | import numpy as np
import pandas as pd
from abc import ABC
def _gen_random(self, seed: int = None):
"""[summary]
Args:
seed (int, optional): [description]. Defaults to 123.
"""
rng = np.random.default_rng(seed)
for example in self._new_noise:
se... | 30.238806 | 110 | 0.600197 |
16d81711460bcdde5df04988352f117c180dbed8 | 19,516 | py | Python | application/mod_user/forms.py | hackBCA/hackbcafour | 971120ff88423cc660f92985790cddf9939838bf | [
"MIT"
] | 2 | 2016-11-13T21:32:51.000Z | 2017-03-22T02:50:26.000Z | application/mod_user/forms.py | hackBCA/hackbcafour | 971120ff88423cc660f92985790cddf9939838bf | [
"MIT"
] | 1 | 2021-02-08T20:18:59.000Z | 2021-02-08T20:18:59.000Z | application/mod_user/forms.py | hackBCA/hackbcafour | 971120ff88423cc660f92985790cddf9939838bf | [
"MIT"
] | null | null | null | from wtforms import Form, TextField, PasswordField, SelectField, TextAreaField, BooleanField, validators, ValidationError, RadioField
import re
phone_regex = "(\+\d+-?)?((\(?\d{3}\)?)|(\d{3}))-?\d{3}-?\d{4}$"
gender_choices = [
("", "Gender"),
("male", "Male"),
("female", "Female"),
("other", "Other"... | 45.071594 | 269 | 0.645522 |
16d86786252483bb0df3775ba6255b1dd3edd2a1 | 2,181 | py | Python | src/app.py | gh640/coding-challenge | 3be31d643ac081bfec3495cb8f705c400be82553 | [
"MIT"
] | null | null | null | src/app.py | gh640/coding-challenge | 3be31d643ac081bfec3495cb8f705c400be82553 | [
"MIT"
] | 2 | 2017-11-17T03:14:45.000Z | 2019-10-19T07:17:22.000Z | src/app.py | gh640/coding-challenge | 3be31d643ac081bfec3495cb8f705c400be82553 | [
"MIT"
] | 1 | 2017-11-16T09:33:38.000Z | 2017-11-16T09:33:38.000Z | # coding: utf-8
'''
'''
from math import ceil
import os
from flask import json
from flask import Flask
from flask import request
from flask import send_from_directory
from flask import render_template
# from json_loader import load_locations
# from json_loader import prepare_locations
from models import Location
... | 23.706522 | 79 | 0.629069 |
16d86a94620baf9944e6bd338662eefcd3ab573e | 2,180 | py | Python | corkus/objects/dungeon.py | MrBartusek/corkus.py | 031c11e3e251f0bddbcb67415564357460fe7fea | [
"MIT"
] | 5 | 2021-09-10T14:20:15.000Z | 2022-01-09T11:27:49.000Z | corkus/objects/dungeon.py | MrBartusek/corkus.py | 031c11e3e251f0bddbcb67415564357460fe7fea | [
"MIT"
] | 11 | 2021-08-15T09:39:09.000Z | 2022-01-12T14:11:24.000Z | corkus/objects/dungeon.py | MrBartusek/corkus.py | 031c11e3e251f0bddbcb67415564357460fe7fea | [
"MIT"
] | 2 | 2021-12-01T23:33:14.000Z | 2022-01-12T11:08:18.000Z | from __future__ import annotations
from .base import CorkusBase
from enum import Enum
| 34.0625 | 113 | 0.580734 |
16d935b63ca1c52fcdad82da9c168df67d096ff5 | 527 | py | Python | src/brisk.py | chaoer/brisk-descriptor | 140b08539768b8038680fd86d7fda9688dd5b908 | [
"BSD-3-Clause"
] | 18 | 2015-02-05T00:44:24.000Z | 2018-11-30T03:20:51.000Z | src/brisk.py | chaoer/brisk-descriptor | 140b08539768b8038680fd86d7fda9688dd5b908 | [
"BSD-3-Clause"
] | 4 | 2016-06-25T20:04:59.000Z | 2019-01-29T19:34:24.000Z | src/brisk.py | chaoer/brisk-descriptor | 140b08539768b8038680fd86d7fda9688dd5b908 | [
"BSD-3-Clause"
] | 14 | 2015-11-15T05:20:28.000Z | 2019-01-02T12:50:44.000Z |
import pybrisk
| 26.35 | 57 | 0.648956 |
16dc5aa7f7c7413a9e340c8bb600ebd849d60e67 | 2,897 | py | Python | hale_hub/outlet_interface.py | tantinlala/hale-hub | da2e6d24e3869ee533d2e272ce87b9e7eede9a79 | [
"MIT"
] | null | null | null | hale_hub/outlet_interface.py | tantinlala/hale-hub | da2e6d24e3869ee533d2e272ce87b9e7eede9a79 | [
"MIT"
] | null | null | null | hale_hub/outlet_interface.py | tantinlala/hale-hub | da2e6d24e3869ee533d2e272ce87b9e7eede9a79 | [
"MIT"
] | null | null | null | import serial
import serial.tools.list_ports
from hale_hub.constants import STARTING_OUTLET_COMMAND, SERIAL_BAUD_RATE, SERIAL_TIMEOUT
from hale_hub.ifttt_logger import send_ifttt_log
_outlet_interface = _OutletInterface()
set_outlet_serial_interface = _outlet_interface.set_serial_interface
toggle_outlet = _outlet_i... | 41.385714 | 123 | 0.706593 |
16dcdf8ea3ba055a8650580e31092f4149c84a27 | 3,233 | py | Python | helix/core.py | carbonscott/helix | e2ee6e1293cae4f0bd1220ed5a41268d20a095db | [
"MIT"
] | null | null | null | helix/core.py | carbonscott/helix | e2ee6e1293cae4f0bd1220ed5a41268d20a095db | [
"MIT"
] | null | null | null | helix/core.py | carbonscott/helix | e2ee6e1293cae4f0bd1220ed5a41268d20a095db | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
def measure_twocores(core_xyz_ref, core_xyz_tar):
''' Measure the following aspects of two helical cores.
- Interhelical distance vector between the centers.
- Interhelical angle (0-90 degree)
'''
# Obtain the centers...
... | 33.677083 | 78 | 0.683266 |
16dd18d4c9d6b529392f25ddf3a0704445995def | 675 | py | Python | matury/2011/6.py | bartekpacia/informatyka-frycz | 6fdbbdea0c6b6a710378f22e90d467c9f91e64aa | [
"MIT"
] | 2 | 2021-03-06T22:09:44.000Z | 2021-03-14T14:41:03.000Z | matury/2011/6.py | bartekpacia/informatyka-frycz | 6fdbbdea0c6b6a710378f22e90d467c9f91e64aa | [
"MIT"
] | 1 | 2020-03-25T15:42:47.000Z | 2020-10-06T21:41:14.000Z | matury/2011/6.py | bartekpacia/informatyka-frycz | 6fdbbdea0c6b6a710378f22e90d467c9f91e64aa | [
"MIT"
] | null | null | null | from typing import List
with open("dane/liczby.txt") as f:
nums: List[int] = []
nums_9_chars: List[int] = []
for line in f:
sline = line.strip()
num = int(sline, 2)
if len(sline) == 9:
nums_9_chars.append(num)
nums.append(num)
count_even = 0
max_num = 0
for n... | 20.454545 | 96 | 0.58963 |
16de03e641bb707c0257c647f4e57b0375e2b543 | 668 | py | Python | Python/fibs.py | familug/FAMILUG | ef8c11d92f4038d80f3f1a24cbab022c19791acf | [
"BSD-2-Clause"
] | 5 | 2015-10-13T04:13:04.000Z | 2020-12-23T13:47:43.000Z | Python/fibs.py | familug/FAMILUG | ef8c11d92f4038d80f3f1a24cbab022c19791acf | [
"BSD-2-Clause"
] | null | null | null | Python/fibs.py | familug/FAMILUG | ef8c11d92f4038d80f3f1a24cbab022c19791acf | [
"BSD-2-Clause"
] | 8 | 2015-07-20T15:37:38.000Z | 2021-04-14T07:18:10.000Z |
if __name__ == "__main__":
print_fib(10)
print
print_fib2(10)
| 15.904762 | 35 | 0.438623 |
16de052924f6b7a0503a267b4aaeda1587303cff | 3,681 | py | Python | src/model/ParseInput.py | slavi010/polyhash-2020 | a11aa694fbf901be4f4db565cb09800f8f57eae7 | [
"MIT"
] | null | null | null | src/model/ParseInput.py | slavi010/polyhash-2020 | a11aa694fbf901be4f4db565cb09800f8f57eae7 | [
"MIT"
] | null | null | null | src/model/ParseInput.py | slavi010/polyhash-2020 | a11aa694fbf901be4f4db565cb09800f8f57eae7 | [
"MIT"
] | null | null | null | import os
from typing import List
from src.model.Etape import Etape
from src.model.Grille import Grille
from src.model.ItemCase import ItemCase
from src.model.PointMontage import PointMontage
from src.model.Robot import Robot
from src.model.Tache import Tache
| 40.9 | 123 | 0.594947 |
16df196ac8b1d19487d9f38ab432516956acf44f | 13,440 | py | Python | test.py | UnKafkaesque/Sentiment-Analysis | bd8517420534bcfe76f2f60a4f178d1dac540075 | [
"MIT"
] | null | null | null | test.py | UnKafkaesque/Sentiment-Analysis | bd8517420534bcfe76f2f60a4f178d1dac540075 | [
"MIT"
] | null | null | null | test.py | UnKafkaesque/Sentiment-Analysis | bd8517420534bcfe76f2f60a4f178d1dac540075 | [
"MIT"
] | null | null | null | import os
import sys
import time
import traceback
import project1_Copy as p1
import numpy as np
verbose = False
if __name__ == "__main__":
main()
| 29.154013 | 165 | 0.564658 |
16e1f96bcb5b1ba1faf14b289b7309040c63b043 | 1,619 | py | Python | homework_1/tests/test_3.py | mag-id/epam_python_autumn_2020 | 2488817ba039f5722030a23edc97abe9f70a9a30 | [
"MIT"
] | null | null | null | homework_1/tests/test_3.py | mag-id/epam_python_autumn_2020 | 2488817ba039f5722030a23edc97abe9f70a9a30 | [
"MIT"
] | null | null | null | homework_1/tests/test_3.py | mag-id/epam_python_autumn_2020 | 2488817ba039f5722030a23edc97abe9f70a9a30 | [
"MIT"
] | null | null | null | """
Unit tests for module `homework_1.tasks.task_3`.
"""
from tempfile import NamedTemporaryFile
from typing import Tuple
import pytest
from homework_1.tasks.task_3 import find_maximum_and_minimum
| 29.436364 | 87 | 0.542928 |
16e3d9c0e2f0128dd26f1a69eb5d1f88d973387a | 16,524 | py | Python | sdk/python/pulumi_azure_native/storage/v20181101/blob_container.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/storage/v20181101/blob_container.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/storage/v20181101/blob_container.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"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
fro... | 50.53211 | 1,363 | 0.676834 |
16e4af35a62847ccd702cb32c6b8a27f27bee59d | 129 | py | Python | app/admin/views/__init__.py | CAUCHY2932/Northern_Hemisphere | 06e5b3e3f0b47940d5b4549899d062373b019579 | [
"BSD-3-Clause"
] | null | null | null | app/admin/views/__init__.py | CAUCHY2932/Northern_Hemisphere | 06e5b3e3f0b47940d5b4549899d062373b019579 | [
"BSD-3-Clause"
] | 8 | 2021-03-19T03:28:32.000Z | 2022-03-11T23:59:00.000Z | app/admin/views/__init__.py | CAUCHY2932/Northern_Hemisphere | 06e5b3e3f0b47940d5b4549899d062373b019579 | [
"BSD-3-Clause"
] | null | null | null | # coding:utf-8
import app.admin.views.start
import app.admin.views.book
import app.admin.views.user
import app.admin.views.site
| 18.428571 | 28 | 0.79845 |
16e4dfbf8bd61eccd8ee52165a28c0666d169326 | 840 | py | Python | test_mnist.py | aidiary/chainer-siamese | 6abce9192298e14682a7c766e2a5cdd10f519193 | [
"MIT"
] | null | null | null | test_mnist.py | aidiary/chainer-siamese | 6abce9192298e14682a7c766e2a5cdd10f519193 | [
"MIT"
] | null | null | null | test_mnist.py | aidiary/chainer-siamese | 6abce9192298e14682a7c766e2a5cdd10f519193 | [
"MIT"
] | null | null | null | import os
import chainer
import chainer.links as L
from net import SiameseNetwork
import numpy as np
import matplotlib.pyplot as plt
#
model = SiameseNetwork()
chainer.serializers.load_npz(os.path.join('result', 'model.npz'), model)
#
_, test = chainer.datasets.get_mnist(ndim=3)
test_data, test_label = test._data... | 24.705882 | 72 | 0.667857 |
16e5abfcca6728651310e1b9d7d20815d0685476 | 5,535 | py | Python | TwoFeetTempoMove.py | b0nz0/TwisterTempo | fc975af4095509d8ec4fe2f84313fe152577bed2 | [
"MIT"
] | null | null | null | TwoFeetTempoMove.py | b0nz0/TwisterTempo | fc975af4095509d8ec4fe2f84313fe152577bed2 | [
"MIT"
] | null | null | null | TwoFeetTempoMove.py | b0nz0/TwisterTempo | fc975af4095509d8ec4fe2f84313fe152577bed2 | [
"MIT"
] | null | null | null | from random import randrange, random
from time import time
import logging
from TwisterTempoGUI import TwisterTempoGUI
| 45.368852 | 106 | 0.592954 |
16e6fb3c075a8554e7e6d5fe5397106b44ef9bf3 | 311 | py | Python | plugins/panorama/panorama/__init__.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | 13 | 2020-01-27T09:02:25.000Z | 2022-01-20T07:45:26.000Z | plugins/panorama/panorama/__init__.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | 29 | 2020-03-22T06:57:57.000Z | 2022-01-24T22:46:42.000Z | plugins/panorama/panorama/__init__.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | 6 | 2020-07-10T00:13:30.000Z | 2022-01-26T08:22:33.000Z | # -*- coding: utf-8 -*-
"""
Panorama is a Pelican plugin to generate statistics from blog posts
(number of posts per month, categories and so on) display them as beautiful charts.
Project location: https://github.com/romainx/panorama
"""
__version__ = "0.2.0"
__author__ = "romainx"
from .panorama import *
| 22.214286 | 83 | 0.726688 |
16e747bd6febb0a03dbe8fb17268efc47ff0c0ee | 7,999 | py | Python | transitfeed/transfer.py | cclauss/transitfeed | 54a4081b59bfa015d5f0405b68203e61762d4a52 | [
"Apache-2.0"
] | 9 | 2015-07-21T17:41:25.000Z | 2020-08-26T13:37:08.000Z | transitfeed/transfer.py | cclauss/transitfeed | 54a4081b59bfa015d5f0405b68203e61762d4a52 | [
"Apache-2.0"
] | 4 | 2015-06-11T18:40:16.000Z | 2020-04-03T20:31:40.000Z | transitfeed/transfer.py | cclauss/transitfeed | 54a4081b59bfa015d5f0405b68203e61762d4a52 | [
"Apache-2.0"
] | 4 | 2016-02-09T21:45:50.000Z | 2020-07-30T21:52:50.000Z | #!/usr/bin/python2.5
# Copyright (C) 2007 Google 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 la... | 40.811224 | 91 | 0.665833 |
16e7d64f5a23705a73ced1fae75f2e7697ae34b2 | 2,067 | py | Python | social/urls.py | Kizito-Alberrt/insta-social | c632e901cd81b0b139f88ad55236efd6c7ddbef1 | [
"MIT"
] | null | null | null | social/urls.py | Kizito-Alberrt/insta-social | c632e901cd81b0b139f88ad55236efd6c7ddbef1 | [
"MIT"
] | null | null | null | social/urls.py | Kizito-Alberrt/insta-social | c632e901cd81b0b139f88ad55236efd6c7ddbef1 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
from . views import UserPostListView, PostDetailView, PostDeleteview, PostCreateView, PostUpdateView,CommentUpdateView, VideoCreateView, video_update
urlpatterns = [
path('',views.base, name='base'),
path('login',views.login, name='login'),
path('register',v... | 43.0625 | 149 | 0.701016 |
16e8783047883ecc17068c1f63c87b161a271a5f | 1,054 | py | Python | vtkplotter_examples/other/dolfin/collisions.py | ismarou/vtkplotter-examples | 1eefcc026be169ab7a77a5bce6dec8044c33b554 | [
"MIT"
] | 4 | 2020-07-30T02:38:29.000Z | 2021-09-12T14:30:18.000Z | vtkplotter_examples/other/dolfin/collisions.py | ismarou/vtkplotter-examples | 1eefcc026be169ab7a77a5bce6dec8044c33b554 | [
"MIT"
] | null | null | null | vtkplotter_examples/other/dolfin/collisions.py | ismarou/vtkplotter-examples | 1eefcc026be169ab7a77a5bce6dec8044c33b554 | [
"MIT"
] | null | null | null | '''
compute_collision() will compute the collision of all the entities with
a Point while compute_first_collision() will always return its first entry.
Especially if a point is on an element edge this can be tricky.
You may also want to compare with the Cell.contains(Point) tool.
'''
# Script by Rudy at https://fenicsp... | 35.133333 | 75 | 0.705882 |
16e8943240219eac91364d8b6c27599e32680763 | 622 | py | Python | alice_check_train/__main__.py | AsciiShell/Alice-Check-Train | 49d5804d28a237756a7cf27e451ff56166fbee5c | [
"MIT"
] | null | null | null | alice_check_train/__main__.py | AsciiShell/Alice-Check-Train | 49d5804d28a237756a7cf27e451ff56166fbee5c | [
"MIT"
] | null | null | null | alice_check_train/__main__.py | AsciiShell/Alice-Check-Train | 49d5804d28a237756a7cf27e451ff56166fbee5c | [
"MIT"
] | null | null | null | import datetime
import os
from alice_check_train.main import rasp_to_text
from alice_check_train.rasp_api import get_rasp, filter_rasp
if __name__ == '__main__':
main()
| 25.916667 | 65 | 0.688103 |
16e89821c774aa40fe5b74ea387488fc99280078 | 7,309 | py | Python | aws-KNN-RESTful.py | cakebytheoceanLuo/k-NN | 52c66b5e38490431b3079c2baaad38785802f4e5 | [
"Apache-2.0"
] | 1 | 2021-11-16T13:22:09.000Z | 2021-11-16T13:22:09.000Z | aws-KNN-RESTful.py | cakebytheoceanLuo/k-NN | 52c66b5e38490431b3079c2baaad38785802f4e5 | [
"Apache-2.0"
] | null | null | null | aws-KNN-RESTful.py | cakebytheoceanLuo/k-NN | 52c66b5e38490431b3079c2baaad38785802f4e5 | [
"Apache-2.0"
] | null | null | null | # https://medium.com/@kumon/how-to-realize-similarity-search-with-elasticsearch-3dd5641b9adb
# https://docs.aws.amazon.com/opensearch-service/latest/developerguide/knn.html
import sys
import requests
import h5py
import numpy as np
import json
import aiohttp
import asyncio
import time
import httpx
from requests.auth imp... | 33.374429 | 142 | 0.675332 |
16ea2d8be166b5650aea4af33dbde9040a41f768 | 1,438 | py | Python | test/test_docker_images.py | bauerj/cibuildwheel | b4addbf4a94daa76769d4f779e169406b0ef99ae | [
"BSD-2-Clause"
] | null | null | null | test/test_docker_images.py | bauerj/cibuildwheel | b4addbf4a94daa76769d4f779e169406b0ef99ae | [
"BSD-2-Clause"
] | null | null | null | test/test_docker_images.py | bauerj/cibuildwheel | b4addbf4a94daa76769d4f779e169406b0ef99ae | [
"BSD-2-Clause"
] | null | null | null | import platform
import textwrap
import pytest
from . import test_projects, utils
dockcross_only_project = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
import os, sys
# check that we're running in the correct docker image as specified in the
# environment options CIBW_MA... | 35.073171 | 116 | 0.672462 |
16eb07b6e691db19202917b717c2ccb87df9fd9d | 32,556 | py | Python | real_trade/MoveAverageTradePosition.py | taka-mochi/cryptocurrency-autotrading | 16677018c793d7bd3fffdcd3575aecb3535dbd04 | [
"BSD-3-Clause"
] | 3 | 2018-05-22T22:45:23.000Z | 2020-02-13T16:45:03.000Z | real_trade/MoveAverageTradePosition.py | taka-mochi/cryptocurrency-autotrading | 16677018c793d7bd3fffdcd3575aecb3535dbd04 | [
"BSD-3-Clause"
] | null | null | null | real_trade/MoveAverageTradePosition.py | taka-mochi/cryptocurrency-autotrading | 16677018c793d7bd3fffdcd3575aecb3535dbd04 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
import math
import dateutil
import dateutil.parser
import json
from ChartBars import Chart
from ChartUpdaterByCCWebsocket import ChartUpdaterByCoincheckWS
from Util import BitcoinUtil
# a class for one position
| 40.593516 | 189 | 0.593593 |
16ebc077aad6a4dd684131dc7271bbdbd5696af9 | 743 | py | Python | test.py | sbcshop/PiRelay-8 | 4d881f259c07cd4fdf3c57431feb1587aaa0e861 | [
"MIT"
] | 2 | 2021-09-07T03:25:00.000Z | 2021-09-07T17:28:46.000Z | test.py | sbcshop/PiRelay-8 | 4d881f259c07cd4fdf3c57431feb1587aaa0e861 | [
"MIT"
] | null | null | null | test.py | sbcshop/PiRelay-8 | 4d881f259c07cd4fdf3c57431feb1587aaa0e861 | [
"MIT"
] | null | null | null | from PiRelay8 import Relay
import time
r1 = Relay("RELAY1")
r2 = Relay("RELAY2")
r3 = Relay("RELAY3")
r4 = Relay("RELAY4")
r5 = Relay("RELAY5")
r6 = Relay("RELAY6")
r7 = Relay("RELAY7")
r8 = Relay("RELAY8")
r1.off()
r2.off()
r3.off()
r4.off()
r5.off()
r6.off()
r7.off()
r8.off()
r1.on()
time.s... | 11.983871 | 27 | 0.572005 |
16ebce5b29644a3fdd8bee60c8ef43a322219b10 | 9,086 | py | Python | bot/cogs/clan.py | johnvictorfs/atlantisbot-rewrite | ac6887f91438206ba926be59d8fd2bedd07923ad | [
"MIT"
] | null | null | null | bot/cogs/clan.py | johnvictorfs/atlantisbot-rewrite | ac6887f91438206ba926be59d8fd2bedd07923ad | [
"MIT"
] | 5 | 2018-09-28T18:01:28.000Z | 2019-02-12T18:49:06.000Z | bot/cogs/clan.py | johnvictorfs/atlantisbot-rewrite | ac6887f91438206ba926be59d8fd2bedd07923ad | [
"MIT"
] | 1 | 2018-10-15T22:41:47.000Z | 2018-10-15T22:41:47.000Z | import rs3clans
import discord
from discord.ext import commands
from bot.bot_client import Bot
from bot.utils.tools import separator
from bot.utils.context import Context
| 42.064815 | 115 | 0.569117 |
16ec4bab280bd7d838f873bdb4d147f41ca2f107 | 2,539 | py | Python | otcextensions/tests/functional/osclient/vpc/v2/common.py | zsoltn/python-otcextensions | 4c0fa22f095ebd5f9636ae72acbae5048096822c | [
"Apache-2.0"
] | 10 | 2018-03-03T17:59:59.000Z | 2020-01-08T10:03:00.000Z | otcextensions/tests/functional/osclient/vpc/v2/common.py | zsoltn/python-otcextensions | 4c0fa22f095ebd5f9636ae72acbae5048096822c | [
"Apache-2.0"
] | 208 | 2020-02-10T08:27:46.000Z | 2022-03-29T15:24:21.000Z | otcextensions/tests/functional/osclient/vpc/v2/common.py | zsoltn/python-otcextensions | 4c0fa22f095ebd5f9636ae72acbae5048096822c | [
"Apache-2.0"
] | 15 | 2020-04-01T20:45:54.000Z | 2022-03-23T12:45:43.000Z | # 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
# distrib... | 33.853333 | 77 | 0.639228 |
16ef740b41f41832481d4956834bb037ddc3b7b6 | 2,614 | py | Python | tests/test_nested_structures_inside_structure_values.py | Robinson04/StructNoSQL | 335c63593025582336bb67ad0b0ed39d30800b74 | [
"MIT"
] | 3 | 2020-10-30T23:31:26.000Z | 2022-03-30T21:48:40.000Z | tests/test_nested_structures_inside_structure_values.py | Robinson04/StructNoSQL | 335c63593025582336bb67ad0b0ed39d30800b74 | [
"MIT"
] | 42 | 2020-09-16T15:23:11.000Z | 2021-09-20T13:00:50.000Z | tests/test_nested_structures_inside_structure_values.py | Robinson04/StructNoSQL | 335c63593025582336bb67ad0b0ed39d30800b74 | [
"MIT"
] | 2 | 2021-01-03T21:37:22.000Z | 2021-08-12T20:28:52.000Z | import unittest
from typing import Set, Optional, Dict, List
from uuid import uuid4
from StructNoSQL import BaseField, MapModel, TableDataModel
from tests.components.playground_table_clients import PlaygroundDynamoDBBasicTable, TEST_ACCOUNT_ID
if __name__ == '__main__':
unittest.main()
| 38.441176 | 114 | 0.704285 |
16f050092210b638486f36ba124add5847de3ce7 | 9,390 | py | Python | test/cpython/test_base64.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | test/cpython/test_base64.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/cpython/test_base64.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | import unittest
from test import test_support
import base64
def test_main():
test_support.run_unittest(__name__)
if __name__ == '__main__':
test_main()
| 43.271889 | 81 | 0.587859 |
16f095ebea3707b39efe449bdb8d248fee8a8b6e | 7,154 | py | Python | src/Path.py | gabbonj/Workbench | 86bbb2e3184e0f2fc5e9ac6dc7cfec86473fb7b9 | [
"MIT"
] | 2 | 2020-08-06T12:20:24.000Z | 2020-08-06T12:20:43.000Z | src/Path.py | gabbonj/Workbench | 86bbb2e3184e0f2fc5e9ac6dc7cfec86473fb7b9 | [
"MIT"
] | null | null | null | src/Path.py | gabbonj/Workbench | 86bbb2e3184e0f2fc5e9ac6dc7cfec86473fb7b9 | [
"MIT"
] | null | null | null | import numpy as np
from ctypes import c_void_p
from .Shader import Shader
from .transforms import *
from OpenGL.GL import *
| 46.75817 | 131 | 0.643836 |
bc3fd4c771ec63f015857f770191b3f22d0f45f1 | 1,406 | py | Python | icfree/echo_instructor/args.py | brsynth/icfree-ml | 7f6c67f26bf60e9cadd59855aebb6bdb5bd64fda | [
"MIT"
] | 1 | 2022-01-13T17:54:12.000Z | 2022-01-13T17:54:12.000Z | icfree/echo_instructor/args.py | brsynth/icfree-ml | 7f6c67f26bf60e9cadd59855aebb6bdb5bd64fda | [
"MIT"
] | null | null | null | icfree/echo_instructor/args.py | brsynth/icfree-ml | 7f6c67f26bf60e9cadd59855aebb6bdb5bd64fda | [
"MIT"
] | null | null | null | from argparse import (
ArgumentParser
)
from os import getcwd as os_getcwd
DEFAULT_OUTPUT_FOLDER = os_getcwd()
DEFAULT_SAMPLE_VOLUME = 10000
| 20.985075 | 75 | 0.600996 |
bc4085bfce6da5fce4ce47af500b1138fc887137 | 246 | py | Python | ex1_01.py | sitdh/59.com-prog | 24f536a72b0467ff3ee1615f515ecff9fbf36bb3 | [
"MIT"
] | 1 | 2021-04-25T14:46:12.000Z | 2021-04-25T14:46:12.000Z | ex1_01.py | sitdh/com-prog | 24f536a72b0467ff3ee1615f515ecff9fbf36bb3 | [
"MIT"
] | null | null | null | ex1_01.py | sitdh/com-prog | 24f536a72b0467ff3ee1615f515ecff9fbf36bb3 | [
"MIT"
] | null | null | null | import math
x = float(input())
prop_2 = -(x**2) / math.factorial(2)
prop_3 = (x**4) / math.factorial(4)
prop_4 = -(x**6) / math.factorial(6)
cos_x = float(1 + prop_2 + prop_3 + prop_4)
print(prop_2)
print(prop_3)
print(prop_4)
print(cos_x)
| 14.470588 | 43 | 0.646341 |
bc41a5fa588f792a592b96d3c6500dbf29045ec5 | 3,211 | py | Python | test/datagateway_api/icat/filters/test_where_filter.py | MRichards99/datagateway-api | 2e6133636fed950a16190d2f703f152c73bb5b1b | [
"Apache-2.0"
] | 2 | 2022-02-10T17:47:53.000Z | 2022-02-10T19:04:02.000Z | test/datagateway_api/icat/filters/test_where_filter.py | MRichards99/datagateway-api | 2e6133636fed950a16190d2f703f152c73bb5b1b | [
"Apache-2.0"
] | 183 | 2020-12-02T11:34:18.000Z | 2022-03-29T15:19:23.000Z | test/datagateway_api/icat/filters/test_where_filter.py | MRichards99/datagateway-api | 2e6133636fed950a16190d2f703f152c73bb5b1b | [
"Apache-2.0"
] | 7 | 2021-04-13T17:26:05.000Z | 2021-11-22T14:24:24.000Z | import pytest
from datagateway_api.src.common.exceptions import BadRequestError, FilterError
from datagateway_api.src.datagateway_api.filter_order_handler import FilterOrderHandler
from datagateway_api.src.datagateway_api.icat.filters import PythonICATWhereFilter
| 43.391892 | 87 | 0.617253 |
bc43defd49d4ea43585c8d3910e9622ef8bc8d38 | 1,099 | py | Python | scrapy/spider/spider/items.py | huobingli/splider | a62f0553160531a0735b249b0dc49747e9c821f9 | [
"MIT"
] | null | null | null | scrapy/spider/spider/items.py | huobingli/splider | a62f0553160531a0735b249b0dc49747e9c821f9 | [
"MIT"
] | null | null | null | scrapy/spider/spider/items.py | huobingli/splider | a62f0553160531a0735b249b0dc49747e9c821f9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy.loader import ItemLoader
from scrapy.loader.processors import TakeFirst
# class SpiderItem(scrapy.Item):
# # define the fields for your... | 24.977273 | 52 | 0.66424 |
bc441b2065c8199c0dd4d1448231c084f1b1cfa3 | 7,160 | py | Python | codetools/contexts/multi_context.py | enthought/codetools | 20d8bb1eba68145750a1b689655b839078121474 | [
"BSD-3-Clause"
] | 29 | 2015-08-10T20:25:00.000Z | 2021-11-30T23:34:24.000Z | codetools/contexts/multi_context.py | enthought/codetools | 20d8bb1eba68145750a1b689655b839078121474 | [
"BSD-3-Clause"
] | 40 | 2015-01-05T15:01:37.000Z | 2022-03-11T13:47:06.000Z | codetools/contexts/multi_context.py | enthought/codetools | 20d8bb1eba68145750a1b689655b839078121474 | [
"BSD-3-Clause"
] | 4 | 2015-04-14T10:06:26.000Z | 2021-01-19T16:46:48.000Z | #
# (C) Copyright 2013 Enthought, Inc., Austin, TX
# All right reserved.
#
# This file is open source software distributed according to the terms in
# LICENSE.txt
#
""" Context holding multiple subcontexts.
"""
from __future__ import absolute_import
from itertools import chain
from collections import MutableMapping ... | 30.468085 | 85 | 0.557682 |
bc447d214c0f2c389991fd5918f6f13fed4aaf6b | 634 | py | Python | line_counter/TestCodes/python_test.py | FMoller/coding-auxiliary-tools | 21784f01731404f33059f3a8c4e73a104709ffe9 | [
"MIT"
] | null | null | null | line_counter/TestCodes/python_test.py | FMoller/coding-auxiliary-tools | 21784f01731404f33059f3a8c4e73a104709ffe9 | [
"MIT"
] | null | null | null | line_counter/TestCodes/python_test.py | FMoller/coding-auxiliary-tools | 21784f01731404f33059f3a8c4e73a104709ffe9 | [
"MIT"
] | null | null | null | """A simple file to test the line_counter performance in python
This is a multiline doctest
"""
__author__ = "Frederico Moeller"
__copyright__ = ""
__credits__ = ["Frederico Moeller"]
__license__ = "MIT"
__version__ = "1.0.1"
__maintainer__ = "Frederico Moeller"
__email__ = ""
__status__ = ""
#import things
import ma... | 21.133333 | 63 | 0.641956 |
bc44b8524b66c7a720d547f156846ae7572f5832 | 4,602 | py | Python | causal_attribution/data.py | VaniW/deconfounded-lexicon-induction | 419ecf717f51cfd1741732ca3191b36b565bd1a4 | [
"MIT"
] | 25 | 2020-11-03T16:38:51.000Z | 2022-03-28T11:53:08.000Z | causal_attribution/data.py | VaniW/deconfounded-lexicon-induction | 419ecf717f51cfd1741732ca3191b36b565bd1a4 | [
"MIT"
] | 1 | 2019-12-15T08:33:47.000Z | 2019-12-16T17:33:15.000Z | causal_attribution/data.py | VaniW/deconfounded-lexicon-induction | 419ecf717f51cfd1741732ca3191b36b565bd1a4 | [
"MIT"
] | 7 | 2021-05-03T01:01:28.000Z | 2022-02-19T04:06:20.000Z | """Data pipelines."""
from collections import defaultdict, OrderedDict
from tqdm import tqdm
from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler
import torch
def get_info(examples, vocab=None, max_seq_len=256):
"""Gathers info on and creats a featurized example generator for... | 35.674419 | 93 | 0.612994 |
bc44f25c8ff96beccbbd3fbaa05ae2dcf6790cc6 | 576 | py | Python | fopp/Chapter 12. Functions/get_num_digits.py | H2u-Hwng/EVC | c650fe7356a333011514cf9025dfd97bf71b1de3 | [
"MIT"
] | null | null | null | fopp/Chapter 12. Functions/get_num_digits.py | H2u-Hwng/EVC | c650fe7356a333011514cf9025dfd97bf71b1de3 | [
"MIT"
] | null | null | null | fopp/Chapter 12. Functions/get_num_digits.py | H2u-Hwng/EVC | c650fe7356a333011514cf9025dfd97bf71b1de3 | [
"MIT"
] | null | null | null | # Take number, and convert integer to string
# Calculate and return number of digits
# Define main function
# Call main function
main()
| 20.571429 | 70 | 0.647569 |
bc450f5f688b95fda7b269a4ca568c7ecc5143ca | 4,992 | py | Python | whois/__init__.py | mzpqnxow/whois-1 | b5623ed25cfa58d9457d30dae640e69b9e530b23 | [
"MIT"
] | null | null | null | whois/__init__.py | mzpqnxow/whois-1 | b5623ed25cfa58d9457d30dae640e69b9e530b23 | [
"MIT"
] | null | null | null | whois/__init__.py | mzpqnxow/whois-1 | b5623ed25cfa58d9457d30dae640e69b9e530b23 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
from future import standard_library
standard_library.install_aliases()
from builtins import *
import re
import sys
import os
import subprocess
imp... | 42.305085 | 1,227 | 0.55629 |
bc45c15aebfb0da618b90f3884eb8a545e0f2823 | 3,255 | py | Python | app/dialog/avatar_picture_dialog.py | tirinox/alphavatarbot | 5adac8c9c4534206eaf6c146f6e194ed5951d055 | [
"MIT"
] | 1 | 2021-03-18T15:35:15.000Z | 2021-03-18T15:35:15.000Z | app/dialog/avatar_picture_dialog.py | tirinox/alphavatarbot | 5adac8c9c4534206eaf6c146f6e194ed5951d055 | [
"MIT"
] | null | null | null | app/dialog/avatar_picture_dialog.py | tirinox/alphavatarbot | 5adac8c9c4534206eaf6c146f6e194ed5951d055 | [
"MIT"
] | 1 | 2021-03-18T15:35:51.000Z | 2021-03-18T15:35:51.000Z | import asyncio
from contextlib import AsyncExitStack
from aiogram.dispatcher.filters.state import StatesGroup, State
from aiogram.dispatcher.storage import FSMContextProxy
from aiogram.types import Message, PhotoSize, ReplyKeyboardRemove, ContentTypes
from aiogram.utils.helper import HelperMode
from dialog.avatar_ima... | 39.695122 | 119 | 0.677112 |
bc498b7d39a14ae7cd3ad1e6341af40bb6279e72 | 5,144 | py | Python | image_store_processing.py | olubiyiontheweb/digid_websearch_flask | 181107eaa60faff9429b754236406eed56e3c1ec | [
"MIT"
] | 1 | 2021-12-15T18:56:05.000Z | 2021-12-15T18:56:05.000Z | image_store_processing.py | olubiyiontheweb/similar_image_websearch | ddb79a3e627c1143ff7f64e6d82f0d8b9dcd8047 | [
"MIT"
] | null | null | null | image_store_processing.py | olubiyiontheweb/similar_image_websearch | ddb79a3e627c1143ff7f64e6d82f0d8b9dcd8047 | [
"MIT"
] | null | null | null | from skimage.metrics import structural_similarity as ssim
from glob import glob
from PIL import Image
import numpy as np
import ntpath
import dhash
import cv2
from database_structure import database_migrations
IMAGE_FOLDER = "./image_store"
ALLOWED_EXTENSIONS = ['png', 'jpg', 'jpeg']
image_store_hash = dict()
db_ops ... | 36.742857 | 79 | 0.631221 |
bc49a143fb9688648101a0602142d480263709b3 | 8,823 | py | Python | cogs/jpserv.py | elthorito/Rai | a6f05567a0d4ed98a09676e507c478a27630bf1c | [
"MIT"
] | null | null | null | cogs/jpserv.py | elthorito/Rai | a6f05567a0d4ed98a09676e507c478a27630bf1c | [
"MIT"
] | null | null | null | cogs/jpserv.py | elthorito/Rai | a6f05567a0d4ed98a09676e507c478a27630bf1c | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import os
import json
from datetime import date, datetime, timedelta
from .utils import helper_functions as hf
from copy import deepcopy
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))).replace('\\', '/')
| 45.715026 | 120 | 0.572821 |
bc4baf04ed5a5ebda75a1b19ad254a0f725f6190 | 2,027 | py | Python | nehebn2.py | psifertex/nehebn2 | 8b62a88a9d06624dbb62b8b74cc0566172fba970 | [
"MIT"
] | null | null | null | nehebn2.py | psifertex/nehebn2 | 8b62a88a9d06624dbb62b8b74cc0566172fba970 | [
"MIT"
] | null | null | null | nehebn2.py | psifertex/nehebn2 | 8b62a88a9d06624dbb62b8b74cc0566172fba970 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from components import ProgramState
import binaryninja as binja
import argparse
import os.path
import curses
# TODO...impliment live-refreashing the settings.json during run (add the keybinding and check for it here in the global input loop)
# TODO...support multi-key presses? Not sure if this ... | 28.957143 | 138 | 0.644795 |
bc4d5b7bde1ce5d45b97c67684a8f6c61429eb5b | 5,144 | py | Python | keras/layers/pooling/base_pooling3d.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | keras/layers/pooling/base_pooling3d.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | keras/layers/pooling/base_pooling3d.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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... | 37.823529 | 80 | 0.623639 |
bc4d689703a555cde99de572dc764b14b5f45f70 | 726 | py | Python | main.py | lucastan96/video2bitmap | 8a54f33af92b5088d29322abf936a6ce2ecc0ac4 | [
"MIT"
] | 1 | 2020-12-30T00:57:38.000Z | 2020-12-30T00:57:38.000Z | main.py | lucastan96/video2bitmap | 8a54f33af92b5088d29322abf936a6ce2ecc0ac4 | [
"MIT"
] | null | null | null | main.py | lucastan96/video2bitmap | 8a54f33af92b5088d29322abf936a6ce2ecc0ac4 | [
"MIT"
] | null | null | null | import moviepy.editor as mpy
import moviepy.video.fx.all as vfx
import subprocess as sp
# Crop and resize video
clip = mpy.VideoFileClip("smoke.mp4")
(w, h) = clip.size
cropped_clip = vfx.crop(clip, width=(h/128)*64, height=h, x1=w/4*3-100, y1=0).resize((64, 128))
cropped_clip.write_videofile('smoke-cropped.mp4')
# C... | 34.571429 | 95 | 0.688705 |
bc4dbd4536189e5c83cb95261570c971ee7df77f | 336 | py | Python | ghostwriter/rolodex/apps.py | bbhunter/Ghostwriter | 1b684ddd119feed9891e83b39c9b314b41d086ca | [
"BSD-3-Clause"
] | 601 | 2019-07-30T17:06:37.000Z | 2022-03-31T00:55:31.000Z | ghostwriter/rolodex/apps.py | chrismaddalena/Ghostwriter | 5a938358450cd0e69a42883b1b18e067644744a8 | [
"BSD-3-Clause"
] | 150 | 2019-08-01T07:20:22.000Z | 2022-03-29T19:18:02.000Z | ghostwriter/rolodex/apps.py | chrismaddalena/Ghostwriter | 5a938358450cd0e69a42883b1b18e067644744a8 | [
"BSD-3-Clause"
] | 126 | 2019-07-30T17:42:49.000Z | 2022-03-21T20:43:35.000Z | """This contains the configuration of the Rolodex application."""
# Django Imports
from django.apps import AppConfig
| 22.4 | 70 | 0.672619 |
bc4f1db83b181105ad1b030028d4a99321957de7 | 560 | py | Python | boards/migrations/0024_boardpreferences_moderators.py | oscarsiles/jotlet | 361f7ad0d32ea96d012020a67493931482207036 | [
"BSD-3-Clause"
] | null | null | null | boards/migrations/0024_boardpreferences_moderators.py | oscarsiles/jotlet | 361f7ad0d32ea96d012020a67493931482207036 | [
"BSD-3-Clause"
] | 2 | 2022-03-21T22:22:33.000Z | 2022-03-28T22:18:33.000Z | boards/migrations/0024_boardpreferences_moderators.py | oscarsiles/jotlet | 361f7ad0d32ea96d012020a67493931482207036 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-01 14:42
from django.conf import settings
from django.db import migrations, models
| 26.666667 | 115 | 0.673214 |
bc4f5018d00b3586d20735c150c38e4b306f48f3 | 325 | py | Python | models/minimize_model.py | MichalBusta/OpenCitiesAIC | 2358118a782edde27a588d6adaf79941cbd90de6 | [
"MIT"
] | 7 | 2020-03-23T21:43:32.000Z | 2021-03-30T09:11:45.000Z | models/minimize_model.py | MichalBusta/OpenCitiesAIC | 2358118a782edde27a588d6adaf79941cbd90de6 | [
"MIT"
] | 4 | 2020-05-09T01:13:24.000Z | 2022-01-13T02:24:14.000Z | models/minimize_model.py | MichalBusta/OpenCitiesAIC | 2358118a782edde27a588d6adaf79941cbd90de6 | [
"MIT"
] | 4 | 2020-04-17T15:06:36.000Z | 2021-03-30T09:11:47.000Z | '''
Created on Mar 22, 2020
@author: Michal.Busta at gmail.com
'''
#get rid of the optimizer state ...
import torch
MODEL_PATH = '/models/model-b2-2.pth'
state = torch.load(MODEL_PATH, map_location=lambda storage, loc: storage)
state_out = {
"state_dict": state["state_dict"],
}
torch.save(state_out, 'model-b2-2.... | 20.3125 | 73 | 0.707692 |
bc4fb0ed6bbdc4f3f5e43225548f14915b084779 | 1,125 | py | Python | setup.py | thomas-kloeber/braumeister | 1045df0ad95eb6a4b9b16bb91ece64b09ff1b1f7 | [
"MIT"
] | 6 | 2018-02-09T15:03:12.000Z | 2021-02-18T07:21:34.000Z | setup.py | thomas-kloeber/braumeister | 1045df0ad95eb6a4b9b16bb91ece64b09ff1b1f7 | [
"MIT"
] | 17 | 2018-03-20T09:28:32.000Z | 2022-01-27T08:48:41.000Z | setup.py | thomas-kloeber/braumeister | 1045df0ad95eb6a4b9b16bb91ece64b09ff1b1f7 | [
"MIT"
] | 7 | 2018-02-09T15:06:11.000Z | 2020-03-02T10:23:10.000Z | import os
import re
from setuptools import setup
version = re.search(
'^__version__\s*=\s*"(.*)"',
open('braumeister/braumeister.py').read(),
re.M
).group(1)
setup(
name="braumeister",
packages=["braumeister", "braumeister.actions"],
version=version,
author="Marcel Steffen",
author_... | 26.162791 | 73 | 0.639111 |
bc500a982cb78bb46e6aa705ee116eae36444405 | 3,493 | py | Python | modules/inference.py | rubelchowdhury20/wuton-with-densepose | 5485f1f311724d8f8b887d669a8b55c73849eb98 | [
"MIT"
] | 12 | 2020-11-13T01:51:24.000Z | 2022-03-17T03:14:27.000Z | modules/inference.py | rubelchowdhury20/wuton-with-densepose | 5485f1f311724d8f8b887d669a8b55c73849eb98 | [
"MIT"
] | 1 | 2021-10-12T06:10:22.000Z | 2021-10-12T06:10:22.000Z | modules/inference.py | rubelchowdhury20/wuton-with-densepose | 5485f1f311724d8f8b887d669a8b55c73849eb98 | [
"MIT"
] | 2 | 2021-01-10T17:51:34.000Z | 2022-03-02T10:53:11.000Z | # standard library imports
import os
# third party imports
import numpy as np
from PIL import Image
import torch.nn as nn
from torchvision import transforms
# local imports
import config
from . import utils
from . import geometric_transformer
| 41.094118 | 178 | 0.742056 |
bc50340e05b5a45da8fec5c4d61ac3cccc89e3f0 | 6,577 | py | Python | imggen/fonts.py | p-lambda/unlabeled_outputs | 18cda9e922591ec99d70caaa173abbb049ef274b | [
"MIT"
] | 4 | 2021-07-02T03:08:29.000Z | 2022-03-12T07:13:13.000Z | imggen/fonts.py | p-lambda/unlabeled_outputs | 18cda9e922591ec99d70caaa173abbb049ef274b | [
"MIT"
] | 1 | 2021-12-25T21:24:23.000Z | 2021-12-25T21:24:23.000Z | imggen/fonts.py | p-lambda/unlabeled_outputs | 18cda9e922591ec99d70caaa173abbb049ef274b | [
"MIT"
] | 1 | 2021-12-26T07:33:45.000Z | 2021-12-26T07:33:45.000Z | from pathlib import Path
import h5py
import numpy as np
from torchvision.datasets.vision import VisionDataset
from PIL import Image
import requests
import zipfile
from tqdm import tqdm
| 35.939891 | 149 | 0.614414 |
bc511f5404ed81ec6c064f4f97b303375361769d | 774 | py | Python | leetcode/47.py | windniw/just-for-fun | 54e5c2be145f3848811bfd127f6a89545e921570 | [
"Apache-2.0"
] | 1 | 2019-08-28T23:15:25.000Z | 2019-08-28T23:15:25.000Z | leetcode/47.py | windniw/just-for-fun | 54e5c2be145f3848811bfd127f6a89545e921570 | [
"Apache-2.0"
] | null | null | null | leetcode/47.py | windniw/just-for-fun | 54e5c2be145f3848811bfd127f6a89545e921570 | [
"Apache-2.0"
] | null | null | null | """
link: https://leetcode.com/problems/permutations-ii
problem: nums
solution: 46
"""
| 28.666667 | 73 | 0.529716 |
bc535e8c70a7ae7d8c05a67decf44c291034483f | 2,406 | py | Python | adminmgr/media/code/A3/task3/T1_ocefXVJ.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 9 | 2019-11-08T02:05:27.000Z | 2021-12-13T12:06:35.000Z | adminmgr/media/code/A3/task3/T1_ocefXVJ.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 6 | 2019-11-27T03:23:16.000Z | 2021-06-10T19:15:13.000Z | adminmgr/media/code/A3/task3/T1_ocefXVJ.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 4 | 2019-11-26T17:04:27.000Z | 2021-12-13T11:57:03.000Z | import findspark
findspark.init()
from pyspark import SparkConf,SparkContext
from pyspark.streaming import StreamingContext
from pyspark.sql import Row,SQLContext
import sys
import requests
conf=SparkConf()
conf.setAppName("BigData")
sc=SparkContext(conf=conf)
ssc=StreamingContext(sc,int(sys.argv[1]))
ssc.checkpo... | 24.804124 | 86 | 0.741895 |
bc53c586e44516a506fdeff0f180d92c8730dd5b | 908 | py | Python | courses/migrations/0003_alter_content_options_alter_module_options_and_more.py | antonnifo/E-Soma | 93d49b27dedbff58d19f8245a79693762fc819d5 | [
"MIT"
] | 1 | 2022-02-09T06:28:04.000Z | 2022-02-09T06:28:04.000Z | courses/migrations/0003_alter_content_options_alter_module_options_and_more.py | antonnifo/E-Soma | 93d49b27dedbff58d19f8245a79693762fc819d5 | [
"MIT"
] | null | null | null | courses/migrations/0003_alter_content_options_alter_module_options_and_more.py | antonnifo/E-Soma | 93d49b27dedbff58d19f8245a79693762fc819d5 | [
"MIT"
] | 1 | 2022-02-09T06:29:11.000Z | 2022-02-09T06:29:11.000Z | # Generated by Django 4.0.1 on 2022-01-20 13:10
import courses.fields
from django.db import migrations
| 25.942857 | 67 | 0.562775 |
bc5478846dead2384e17349d8f75968c543992de | 407 | py | Python | pkg/maths/maths.py | prateekdegaons1991/experiment-loadtest | b53c70fac5b2f7d37df77844b26f79741c74c1b6 | [
"Apache-2.0"
] | 8 | 2020-04-17T06:34:30.000Z | 2021-12-18T10:54:50.000Z | pkg/maths/maths.py | oumkale/test-python | 1f3d3e42ffbe1bf5ed9df8a0c6038e50129b2c4d | [
"Apache-2.0"
] | 15 | 2020-04-18T06:01:53.000Z | 2022-02-15T08:56:25.000Z | pkg/maths/maths.py | oumkale/test-python | 1f3d3e42ffbe1bf5ed9df8a0c6038e50129b2c4d | [
"Apache-2.0"
] | 12 | 2020-04-17T05:14:27.000Z | 2022-03-29T19:24:20.000Z | #Atoi stands for ASCII to Integer Conversion
#Adjustment contains rule of three for calculating an integer given another integer representing a percentage
| 27.133333 | 109 | 0.673219 |
bc562cc6c9b35189e9adc0f9ba37a99ec2138c03 | 3,672 | py | Python | google_compute_engine/config_manager.py | redoxdrh/GCP-Flask | 34af307df541edca4eee58b1d8be64888550a674 | [
"Apache-2.0"
] | 2 | 2017-05-04T08:05:29.000Z | 2019-02-08T21:36:11.000Z | google_compute_engine/config_manager.py | redoxdrh/GCP-Flask | 34af307df541edca4eee58b1d8be64888550a674 | [
"Apache-2.0"
] | null | null | null | google_compute_engine/config_manager.py | redoxdrh/GCP-Flask | 34af307df541edca4eee58b1d8be64888550a674 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.381818 | 78 | 0.699891 |
bc56aa53a834b83d16f942b242b5f67998363eda | 22,135 | py | Python | mscreen/autodocktools_prepare_py3k/mglutil/web/services/AppService_services.py | e-mayo/mscreen | a50f0b2f7104007c730baa51b4ec65c891008c47 | [
"MIT"
] | 9 | 2021-03-06T04:24:28.000Z | 2022-01-03T09:53:07.000Z | mglutil/web/services/AppService_services.py | e-mayo/autodocktools-prepare-py3k | 2dd2316837bcb7c19384294443b2855e5ccd3e01 | [
"BSD-3-Clause"
] | 3 | 2021-03-07T05:37:16.000Z | 2021-09-19T15:06:54.000Z | mglutil/web/services/AppService_services.py | e-mayo/autodocktools-prepare-py3k | 2dd2316837bcb7c19384294443b2855e5ccd3e01 | [
"BSD-3-Clause"
] | 4 | 2019-08-28T23:11:39.000Z | 2021-11-27T08:43:36.000Z | ##################################################
# ./AppService_services.py
# generated by ZSI.wsdl2python
#
#
##################################################
from .AppService_services_types import *
from .AppService_services_types import \
nbcr_sdsc_edu_opal_types as ns1
import urllib.parse, types
from... | 41.296642 | 136 | 0.651096 |
bc56ca67cc1e81684bbce0d45386183e51cffb90 | 10,340 | py | Python | examples/pytorch/swin/checkpoint_quantization.py | hieuhoang/FasterTransformer | 440695ccac874574b1d2e1121788e8fa674b4381 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/swin/checkpoint_quantization.py | hieuhoang/FasterTransformer | 440695ccac874574b1d2e1121788e8fa674b4381 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/swin/checkpoint_quantization.py | hieuhoang/FasterTransformer | 440695ccac874574b1d2e1121788e8fa674b4381 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 47.214612 | 137 | 0.562186 |
bc57b1f771495cf5ea069e99b2859a0f3795d393 | 6,608 | py | Python | mars/deploy/kubernetes/core.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | null | null | null | mars/deploy/kubernetes/core.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | null | null | null | mars/deploy/kubernetes/core.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 1999-2020 Alibaba Group Holding 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 require... | 39.333333 | 100 | 0.628783 |
bc58243dff3b67ec29b9366a2531008a83301c24 | 767 | py | Python | tests/tests_model/tests_bert_model.py | elangovana/gene_normalisation | 9152298e951cd968ee516815c7fa11f1ceabca51 | [
"MIT"
] | 1 | 2020-10-21T06:01:28.000Z | 2020-10-21T06:01:28.000Z | tests/tests_model/tests_bert_model.py | elangovana/gene_normalisation | 9152298e951cd968ee516815c7fa11f1ceabca51 | [
"MIT"
] | null | null | null | tests/tests_model/tests_bert_model.py | elangovana/gene_normalisation | 9152298e951cd968ee516815c7fa11f1ceabca51 | [
"MIT"
] | null | null | null | from unittest import TestCase
import torch
import transformers
from model.bert_model import BertModel
| 26.448276 | 144 | 0.688396 |
bc583d8b5318b12422c378e8c294b322b7118447 | 1,593 | py | Python | tests/renderer_test.py | tmcclintock/PyDonJuan | ab6d567b568c3e0dd976b10c2628ad99ca81b953 | [
"CC0-1.0"
] | 2 | 2020-12-14T20:50:57.000Z | 2021-05-26T04:32:24.000Z | tests/renderer_test.py | tmcclintock/PyDonJuan | ab6d567b568c3e0dd976b10c2628ad99ca81b953 | [
"CC0-1.0"
] | 29 | 2020-12-18T15:56:14.000Z | 2021-01-12T01:17:48.000Z | tests/renderer_test.py | tmcclintock/donjuan | ab6d567b568c3e0dd976b10c2628ad99ca81b953 | [
"CC0-1.0"
] | null | null | null | import json
import os
import tempfile
from unittest import TestCase
import pytest
from donjuan import Dungeon, DungeonRandomizer, Renderer
| 28.963636 | 68 | 0.622724 |
bc5a20c1be48c7dd2648cc88a86c05d54e4b6c1c | 612 | py | Python | src/foremast/validate.py | dnava013/foremast | 9849821b5bb3cd67b438c5adeaa0e42f86e9eaf8 | [
"Apache-2.0"
] | 157 | 2016-09-12T16:24:14.000Z | 2018-06-02T15:40:38.000Z | src/foremast/validate.py | dnava013/foremast | 9849821b5bb3cd67b438c5adeaa0e42f86e9eaf8 | [
"Apache-2.0"
] | 206 | 2016-09-12T16:41:31.000Z | 2018-06-04T21:50:29.000Z | src/foremast/validate.py | dnava013/foremast | 9849821b5bb3cd67b438c5adeaa0e42f86e9eaf8 | [
"Apache-2.0"
] | 34 | 2016-09-12T16:37:57.000Z | 2018-06-04T18:37:52.000Z | """Spinnaker validate functions."""
import logging
from .consts import API_URL
from .utils.credentials import get_env_credential
LOG = logging.getLogger(__name__)
def validate_gate():
"""Check Gate connection."""
try:
credentials = get_env_credential()
LOG.debug('Found credentials: %s', cred... | 23.538462 | 69 | 0.673203 |
bc5ad874ef55f36dd52e0759ceb93fea5f606b23 | 2,437 | py | Python | constellation_forms/migrations/0001_initial.py | ConstellationApps/Forms | 5d2bacf589c1a473cf619f34d569d33191b11285 | [
"ISC"
] | 2 | 2017-04-18T02:41:00.000Z | 2017-04-18T02:51:39.000Z | constellation_forms/migrations/0001_initial.py | ConstellationApps/Forms | 5d2bacf589c1a473cf619f34d569d33191b11285 | [
"ISC"
] | 33 | 2017-03-03T06:16:44.000Z | 2019-08-20T23:06:21.000Z | constellation_forms/migrations/0001_initial.py | ConstellationApps/Forms | 5d2bacf589c1a473cf619f34d569d33191b11285 | [
"ISC"
] | 1 | 2017-02-22T18:48:04.000Z | 2017-02-22T18:48:04.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-15 00:56
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
| 37.492308 | 142 | 0.552318 |
bc5ae8aa40e31ef7936556c55251ff7ab9886286 | 2,258 | py | Python | src/webpy1/src/borough/dbsqli.py | ptphp/PyLib | 07ac99cf2deb725475f5771b123b9ea1375f5e65 | [
"Apache-2.0"
] | 1 | 2020-02-17T08:18:29.000Z | 2020-02-17T08:18:29.000Z | src/webpy1/src/borough/dbsqli.py | ptphp/PyLib | 07ac99cf2deb725475f5771b123b9ea1375f5e65 | [
"Apache-2.0"
] | null | null | null | src/webpy1/src/borough/dbsqli.py | ptphp/PyLib | 07ac99cf2deb725475f5771b123b9ea1375f5e65 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sqlite3 as sqlite
import os.path as osp
import sys
| 27.204819 | 79 | 0.529672 |
bc5b677ed37d940fc02b036d43d53f7c6322c3f1 | 599 | py | Python | losses/all_lost.py | Liudzz/loss-chapter | 22359b92ca5e155d5af32ef2f22eeddf0483b947 | [
"Apache-2.0"
] | 2 | 2020-07-07T00:03:31.000Z | 2020-07-08T09:58:48.000Z | losses/all_lost.py | Liudzz/loss-chapter | 22359b92ca5e155d5af32ef2f22eeddf0483b947 | [
"Apache-2.0"
] | null | null | null | losses/all_lost.py | Liudzz/loss-chapter | 22359b92ca5e155d5af32ef2f22eeddf0483b947 | [
"Apache-2.0"
] | 2 | 2020-07-08T09:58:56.000Z | 2020-07-11T13:43:53.000Z | """
easy way to use losses
"""
from center_loss import Centerloss
import torch.nn as nn
from FocalLoss import FocalLoss
| 22.185185 | 55 | 0.729549 |
bc5b680a2cd25d3fd6125ee9f9722bc8e692640b | 7,320 | py | Python | nova/tests/functional/test_metadata.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-08-14T02:20:59.000Z | 2020-08-14T02:20:59.000Z | nova/tests/functional/test_metadata.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:04:16.000Z | 2021-12-13T20:45:03.000Z | nova/tests/functional/test_metadata.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-07-24T02:31:45.000Z | 2020-07-24T02:31:45.000Z | # Copyright 2016 Rackspace Australia
# 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... | 37.927461 | 78 | 0.639617 |
bc5dd6bb126db54b8402ce56f75664e9271f9ace | 8,889 | py | Python | openue/sequence_labeling/subject_labeling_data_manager.py | zxlzr/OpenUE | a49f8950dc2b93a489bb8ce0d40abb26c2c0f347 | [
"MIT"
] | 8 | 2020-01-08T13:05:35.000Z | 2021-12-20T09:43:57.000Z | openue/sequence_labeling/subject_labeling_data_manager.py | zxlzr/OpenUE | a49f8950dc2b93a489bb8ce0d40abb26c2c0f347 | [
"MIT"
] | 9 | 2020-09-25T22:36:51.000Z | 2022-02-10T01:50:44.000Z | openue/sequence_labeling/subject_labeling_data_manager.py | zxlzr/OpenUE | a49f8950dc2b93a489bb8ce0d40abb26c2c0f347 | [
"MIT"
] | null | null | null | import os
import sys
import json
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../bert")))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../")))
import tokenization
from config import config
if __name__=="__main__":
DATA_INPUT_DIR = config.data_dir
D... | 49.938202 | 186 | 0.582068 |
bc5ea97eac050b419965fd5ba95918dc58fe5bee | 3,222 | py | Python | clarifai/rest/grpc/custom_converters/custom_message_to_dict.py | Taik/clarifai-python | c3b66b84cb348d3cb1edff958f561a4734b78650 | [
"Apache-2.0"
] | 322 | 2015-08-25T03:16:11.000Z | 2021-11-08T09:36:50.000Z | clarifai/rest/grpc/custom_converters/custom_message_to_dict.py | Taik/clarifai-python | c3b66b84cb348d3cb1edff958f561a4734b78650 | [
"Apache-2.0"
] | 76 | 2015-10-25T13:03:47.000Z | 2022-02-19T09:36:10.000Z | clarifai/rest/grpc/custom_converters/custom_message_to_dict.py | Taik/clarifai-python | c3b66b84cb348d3cb1edff958f561a4734b78650 | [
"Apache-2.0"
] | 136 | 2015-09-04T13:48:27.000Z | 2021-06-12T16:48:36.000Z | import typing # noqa
from google.protobuf import descriptor
from google.protobuf.json_format import _IsMapEntry, _Printer
from google.protobuf.message import Message # noqa
from clarifai.rest.grpc.proto.clarifai.api.utils import extensions_pb2
| 36.202247 | 97 | 0.71198 |
bc5ea9e7a84513ea2108b53d14947d94915f3a05 | 26 | py | Python | __init__.py | mschrimpf/CapsNetKeras | 4c514860bf6689fb1772a7bd858638cd538ff22f | [
"MIT"
] | null | null | null | __init__.py | mschrimpf/CapsNetKeras | 4c514860bf6689fb1772a7bd858638cd538ff22f | [
"MIT"
] | null | null | null | __init__.py | mschrimpf/CapsNetKeras | 4c514860bf6689fb1772a7bd858638cd538ff22f | [
"MIT"
] | null | null | null | from .capsulenet import *
| 13 | 25 | 0.769231 |
bc5eeaf616c5264490632d3b43d2af7080e1aea8 | 28,625 | py | Python | gate/mate_ksx3267v2.py | mrchoi87/IRSOSv4 | 886c3dcbeb64c3a8cc257b58692946fd5462312e | [
"BSD-3-Clause"
] | null | null | null | gate/mate_ksx3267v2.py | mrchoi87/IRSOSv4 | 886c3dcbeb64c3a8cc257b58692946fd5462312e | [
"BSD-3-Clause"
] | null | null | null | gate/mate_ksx3267v2.py | mrchoi87/IRSOSv4 | 886c3dcbeb64c3a8cc257b58692946fd5462312e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018 JiNong, Inc.
# All right reserved.
#
import struct
import time
import socket
import select
import traceback
import hashlib
import json
from enum import IntEnum
from threading import Thread, Lock
from mate import Mate, ThreadMate, DevType
from mbloc... | 40.71835 | 212 | 0.516681 |
bc60aeeb26d899f8ba324554b05c50b567a13167 | 6,525 | py | Python | CircleciScripts/run_integrationtests.py | aimalygin/aws-sdk-ios | 6cfaa3c56296300499f4885e9039c2dd24624cfa | [
"Apache-2.0"
] | 17 | 2018-02-19T16:29:51.000Z | 2020-04-03T13:52:52.000Z | CircleciScripts/run_integrationtests.py | aimalygin/aws-sdk-ios | 6cfaa3c56296300499f4885e9039c2dd24624cfa | [
"Apache-2.0"
] | 2 | 2019-11-07T15:23:33.000Z | 2020-03-12T18:46:47.000Z | CircleciScripts/run_integrationtests.py | aimalygin/aws-sdk-ios | 6cfaa3c56296300499f4885e9039c2dd24624cfa | [
"Apache-2.0"
] | 10 | 2018-03-06T14:27:12.000Z | 2020-10-20T22:01:30.000Z | import demjson
import sys
from subprocess import Popen, PIPE
import subprocess
import xml.etree.ElementTree as ET
import os
from datetime import datetime
from functions import runcommand
#from sets import Set
#run test
########################## main function ###############################
# a command will like ... | 42.927632 | 222 | 0.632337 |
bc60d0aa50b7ae50518bf50520f50484fbc32b50 | 572 | py | Python | seagrass/hooks/__init__.py | kernelmethod/Seagrass | 52c5f1852fb2d52b3d94411c2a49c3da6fab6c6c | [
"BSD-2-Clause"
] | null | null | null | seagrass/hooks/__init__.py | kernelmethod/Seagrass | 52c5f1852fb2d52b3d94411c2a49c3da6fab6c6c | [
"BSD-2-Clause"
] | 21 | 2021-06-07T20:10:46.000Z | 2021-07-07T22:14:25.000Z | seagrass/hooks/__init__.py | kernelmethod/Seagrass | 52c5f1852fb2d52b3d94411c2a49c3da6fab6c6c | [
"BSD-2-Clause"
] | null | null | null | # flake8: noqa: F401
from .context_manager_hook import ContextManagerHook
from .counter_hook import CounterHook
from .file_open_hook import FileOpenHook
from .logging_hook import LoggingHook
from .profiler_hook import ProfilerHook
from .runtime_audit_hook import RuntimeAuditHook
from .stack_trace_hook import StackTrace... | 26 | 52 | 0.783217 |
bc613b321946268bd365a901afc58d30c0ee1a72 | 3,549 | py | Python | tests/test_internal.py | aschleg/hypy | d5b8451dcd24b803bbf2eebc46bc3acfd64d8edc | [
"MIT"
] | 40 | 2018-08-04T15:36:31.000Z | 2022-03-12T02:06:28.000Z | tests/test_internal.py | aschleg/hypy | d5b8451dcd24b803bbf2eebc46bc3acfd64d8edc | [
"MIT"
] | 5 | 2018-06-17T12:44:59.000Z | 2021-09-28T01:10:26.000Z | tests/test_internal.py | aschleg/hypy | d5b8451dcd24b803bbf2eebc46bc3acfd64d8edc | [
"MIT"
] | 8 | 2018-08-19T14:28:44.000Z | 2021-12-20T18:52:07.000Z | import pytest
import numpy as np
import pandas as pd
from hypothetical._lib import _build_des_mat
| 39.876404 | 112 | 0.412511 |
bc633f72ddfead99679ba43f47af451833e0fa30 | 3,563 | py | Python | download.py | JamesWang007/Open3D-PointNet | 402847ceef8d364672ca7d81e0afebcb445cceb5 | [
"MIT"
] | 120 | 2019-04-06T16:04:01.000Z | 2021-07-22T17:07:51.000Z | test/Open3D-PointNet-master/download.py | AhsanulIslam/Thesis_Computer_Vision | c308cce15146a33a3e474790b0f9535ee9e41eb7 | [
"MIT"
] | null | null | null | test/Open3D-PointNet-master/download.py | AhsanulIslam/Thesis_Computer_Vision | c308cce15146a33a3e474790b0f9535ee9e41eb7 | [
"MIT"
] | 25 | 2019-04-08T09:39:47.000Z | 2021-05-12T15:39:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""Download big files from Google Drive."""
import shutil
import sys
import... | 31.8125 | 115 | 0.646646 |
bc63b363d6718bb79d14c412bc96475ee3170b28 | 763 | py | Python | ls12/demo5.py | cklwblove/python-100-days-source-code | 5d66c7708047f0d7bac0ce05d21834bbbfa6ccf1 | [
"MIT"
] | null | null | null | ls12/demo5.py | cklwblove/python-100-days-source-code | 5d66c7708047f0d7bac0ce05d21834bbbfa6ccf1 | [
"MIT"
] | null | null | null | ls12/demo5.py | cklwblove/python-100-days-source-code | 5d66c7708047f0d7bac0ce05d21834bbbfa6ccf1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
"""
import time
import tkinter
import tkinter.messagebox
if __name__ == '__main__':
main()
| 20.078947 | 67 | 0.621232 |
bc652014fdf4755fbb2d576c8ff7469edba046ae | 3,250 | py | Python | hangupsbot/sinks/gitlab/simplepush.py | mygreentour/hangoutsbot | 9ea2da10f546e6f1dd06c8240187049501c5452a | [
"Unlicense"
] | null | null | null | hangupsbot/sinks/gitlab/simplepush.py | mygreentour/hangoutsbot | 9ea2da10f546e6f1dd06c8240187049501c5452a | [
"Unlicense"
] | null | null | null | hangupsbot/sinks/gitlab/simplepush.py | mygreentour/hangoutsbot | 9ea2da10f546e6f1dd06c8240187049501c5452a | [
"Unlicense"
] | null | null | null | """
GitLab webhook receiver - see http://doc.gitlab.com/ee/web_hooks/web_hooks.html
"""
import asyncio
import json
import logging
from sinks.base_bot_request_handler import AsyncRequestHandler
logger = logging.getLogger(__name__)
try:
import dateutil.parser
except ImportError:
logger.error("missing module p... | 37.790698 | 99 | 0.577538 |
bc6537e769f6b3ef7aa9a2e3afa098d8b075693f | 1,220 | py | Python | evsim/assessor.py | cbchoi/nppsim | 4d096f9d2fdb5ebf3e3e83be7b1974bfc92554c1 | [
"MIT"
] | 3 | 2020-01-21T13:06:37.000Z | 2021-03-01T23:35:20.000Z | evsim/assessor.py | cbchoi/pohangsim | e978ff39ec94413ae44129510c56acb134770298 | [
"MIT"
] | null | null | null | evsim/assessor.py | cbchoi/pohangsim | e978ff39ec94413ae44129510c56acb134770298 | [
"MIT"
] | null | null | null | from evsim.system_simulator import SystemSimulator
from evsim.behavior_model_executor import BehaviorModelExecutor
from evsim.system_message import SysMessage
from evsim.definition import *
import os
import subprocess as sp
| 34.857143 | 126 | 0.657377 |
bc65af7557f0841ee2695968775683b6f5578bc6 | 19,786 | py | Python | tei_entity_enricher/interface/postprocessing/gnd_connector.py | NEISSproject/TEIEntityEnricher | 09a4a932b30886e50965959935dc803b36063e36 | [
"Apache-2.0"
] | null | null | null | tei_entity_enricher/interface/postprocessing/gnd_connector.py | NEISSproject/TEIEntityEnricher | 09a4a932b30886e50965959935dc803b36063e36 | [
"Apache-2.0"
] | null | null | null | tei_entity_enricher/interface/postprocessing/gnd_connector.py | NEISSproject/TEIEntityEnricher | 09a4a932b30886e50965959935dc803b36063e36 | [
"Apache-2.0"
] | 1 | 2021-04-27T13:55:29.000Z | 2021-04-27T13:55:29.000Z | import os
from typing import Union, List
from tei_entity_enricher.interface.postprocessing.io import FileReader, FileWriter
from tei_entity_enricher.util.helper import local_save_path, makedir_if_necessary
from tei_entity_enricher.util.exceptions import FileNotFound
| 58.712166 | 347 | 0.564237 |
bc669999ddb0624f8b1b18f8677a007603269fec | 122 | py | Python | neslter/workflow/__init__.py | WHOIGit/nes-lter-ims | d4cc96c10da56ca33286af84d669625b67170522 | [
"MIT"
] | 3 | 2019-01-24T16:32:50.000Z | 2021-11-05T02:18:12.000Z | neslter/workflow/__init__.py | WHOIGit/nes-lter-ims | d4cc96c10da56ca33286af84d669625b67170522 | [
"MIT"
] | 45 | 2019-05-23T15:15:32.000Z | 2022-03-15T14:09:20.000Z | neslter/workflow/__init__.py | WHOIGit/nes-lter-ims | d4cc96c10da56ca33286af84d669625b67170522 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
logger.level = logging.DEBUG | 24.4 | 40 | 0.819672 |
bc66bbff24da2cc4aab8ede584053c2dba3e5cf5 | 440 | py | Python | inference/_archive/render_section.py | emitch/SEAMLeSS | cae21c67316ed36529fdc2e470a105a9f847975c | [
"MIT"
] | 4 | 2018-12-17T18:45:57.000Z | 2021-04-29T16:30:42.000Z | inference/_archive/render_section.py | emitch/SEAMLeSS | cae21c67316ed36529fdc2e470a105a9f847975c | [
"MIT"
] | 19 | 2019-01-02T19:09:12.000Z | 2020-12-14T18:50:47.000Z | inference/_archive/render_section.py | emitch/SEAMLeSS | cae21c67316ed36529fdc2e470a105a9f847975c | [
"MIT"
] | 2 | 2020-03-18T01:24:03.000Z | 2022-01-06T06:19:58.000Z | from args import get_argparser, parse_args, get_aligner, get_bbox
if __name__ == '__main__':
parser = get_argparser()
args = parse_args(parser)
a = get_aligner(args)
bbox = get_bbox(args)
for z in range(args.bbox_start[2], args.bbox_stop[2]):
print('Rendering z={0}'.format(z))
render(a, bbox, z)
... | 24.444444 | 66 | 0.697727 |
bc6934a711c5b2c64314e9faedf3a6f0838f298a | 52,806 | py | Python | venv/lib/python3.9/site-packages/google/cloud/spanner_admin_instance_v1/gapic/instance_admin_client.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/google/cloud/spanner_admin_instance_v1/gapic/instance_admin_client.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/google/cloud/spanner_admin_instance_v1/gapic/instance_admin_client.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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... | 43.142157 | 165 | 0.613926 |
bc69b9f3ab057490f4ec7854149028c2c310ae9c | 31,196 | py | Python | src/ScaleHD/__backend.py | helloabunai/ScaleHD | b48c1a1ed742bdbda0a4cd42555d1e12d2e3024d | [
"MIT"
] | 3 | 2017-07-03T19:45:13.000Z | 2020-05-12T16:56:19.000Z | src/ScaleHD/__backend.py | helloabunai/ScaleHD | b48c1a1ed742bdbda0a4cd42555d1e12d2e3024d | [
"MIT"
] | 1 | 2019-06-21T14:49:50.000Z | 2019-06-24T08:24:37.000Z | src/ScaleHD/__backend.py | helloabunai/ScaleHD | b48c1a1ed742bdbda0a4cd42555d1e12d2e3024d | [
"MIT"
] | 2 | 2017-06-05T21:56:36.000Z | 2021-03-22T20:34:13.000Z | #/usr/bin/python
__version__ = '1.0'
__author__ = 'alastair.maxwell@glasgow.ac.uk'
##
## Imports
import string
import os
import errno
import shutil
import sys
import glob
import datetime
import subprocess
import logging as log
import numpy as np
import csv
from io import StringIO
import PyPDF2
from sklearn import prep... | 38.277301 | 155 | 0.702526 |
bc6acbe604cb779e768957863e598871559e6e15 | 3,966 | py | Python | tests/test_models/test_backbones/test_encoder_decoders/test_deepfill_encoder.py | Jian137/mmediting-1 | e1ac6c93441ec96696d0b530f040b91b809015b6 | [
"Apache-2.0"
] | 1,884 | 2020-07-09T18:53:43.000Z | 2022-03-31T12:06:18.000Z | tests/test_models/test_backbones/test_encoder_decoders/test_deepfill_encoder.py | Jian137/mmediting-1 | e1ac6c93441ec96696d0b530f040b91b809015b6 | [
"Apache-2.0"
] | 622 | 2020-07-09T18:52:27.000Z | 2022-03-31T14:41:09.000Z | tests/test_models/test_backbones/test_encoder_decoders/test_deepfill_encoder.py | Jian137/mmediting-1 | e1ac6c93441ec96696d0b530f040b91b809015b6 | [
"Apache-2.0"
] | 361 | 2020-07-09T19:21:47.000Z | 2022-03-31T09:58:27.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmedit.models.backbones import ContextualAttentionNeck, DeepFillEncoder
from mmedit.models.common import SimpleGatedConvModule
| 35.72973 | 76 | 0.620524 |
bc6c634a8700c04a493d0272caa915d4e9038c51 | 580 | py | Python | mvp/migrations/0004_auto_20201127_0649.py | Wastecoinng/mvp_beta | 2faa4b9eeac99b2c284bafad955b90f9951991fc | [
"MIT"
] | null | null | null | mvp/migrations/0004_auto_20201127_0649.py | Wastecoinng/mvp_beta | 2faa4b9eeac99b2c284bafad955b90f9951991fc | [
"MIT"
] | null | null | null | mvp/migrations/0004_auto_20201127_0649.py | Wastecoinng/mvp_beta | 2faa4b9eeac99b2c284bafad955b90f9951991fc | [
"MIT"
] | null | null | null | # Generated by Django 2.2.13 on 2020-11-27 05:49
from django.db import migrations, models
| 24.166667 | 105 | 0.591379 |
bc6daca01b612effa21edcc2bb7e569ddcd2750f | 751 | py | Python | adminapp/migrations/0012_auto_20210714_1155.py | mofresh27/MuseumExperience-Group2-Python-BE-1 | d6ca7aceeddfcfdefdf112ab5e40cf74d6b472ce | [
"MIT"
] | null | null | null | adminapp/migrations/0012_auto_20210714_1155.py | mofresh27/MuseumExperience-Group2-Python-BE-1 | d6ca7aceeddfcfdefdf112ab5e40cf74d6b472ce | [
"MIT"
] | 1 | 2021-07-19T14:27:28.000Z | 2021-07-19T14:27:28.000Z | adminapp/migrations/0012_auto_20210714_1155.py | mofresh27/MuseumExperience-Group2-Python-BE-1 | d6ca7aceeddfcfdefdf112ab5e40cf74d6b472ce | [
"MIT"
] | 2 | 2021-07-14T21:56:46.000Z | 2021-07-15T16:11:41.000Z | # Generated by Django 3.2.4 on 2021-07-14 11:55
from django.db import migrations, models
import uuid
| 25.033333 | 78 | 0.565912 |
bc6de8ef28a6c9ca4fc7727dee2d21bb765f85a1 | 1,585 | py | Python | scripts/json_parse.py | andrewsimonds14/Capstone | 5ae56b9be40846e9993a8f23aaa8e1ef92cd9ea3 | [
"MIT"
] | null | null | null | scripts/json_parse.py | andrewsimonds14/Capstone | 5ae56b9be40846e9993a8f23aaa8e1ef92cd9ea3 | [
"MIT"
] | null | null | null | scripts/json_parse.py | andrewsimonds14/Capstone | 5ae56b9be40846e9993a8f23aaa8e1ef92cd9ea3 | [
"MIT"
] | null | null | null | import json
import os
import nibabel as nib
import csv
from operator import itemgetter
# PATH TO PREPROCESSED DATA
raw_data_path = '/home/lab/nnUNet_data/nnUNet_raw_data_base/nnUNet_raw_data/Task500_BrainMets'
pixdim_ind = [1,2,3] # Indexes at which the voxel size [x,y,z] is stored
# PATH TO JSON FILE
with open('/h... | 36.860465 | 162 | 0.683281 |
bc6e15840fb47699b6ed6ae5254ac356715fcfad | 2,794 | py | Python | tests/gen_test.py | tinylambda/tornadio2 | 7b112e2e207bd7500288b42896f9970c16e623ad | [
"Apache-2.0"
] | null | null | null | tests/gen_test.py | tinylambda/tornadio2 | 7b112e2e207bd7500288b42896f9970c16e623ad | [
"Apache-2.0"
] | null | null | null | tests/gen_test.py | tinylambda/tornadio2 | 7b112e2e207bd7500288b42896f9970c16e623ad | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
tornadio2.tests.gen
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2011 by the Serge S. Koval, see AUTHORS for more details.
:license: Apache, see LICENSE for more details.
"""
from collections import deque
from nose.tools import eq_
from tornadio2 import gen
_queue = None
... | 17.910256 | 77 | 0.598067 |
bc6e2a6ace5b77db9c88569ae6f6456c11dc1f48 | 21,122 | py | Python | DeepBrainSeg/tumor/Tester.py | JordanMicahBennett/DeepBrainSeg | 659dd439d20d4c024fe337874eadb90deffc40a4 | [
"MIT"
] | 1 | 2021-01-01T18:06:50.000Z | 2021-01-01T18:06:50.000Z | DeepBrainSeg/tumor/Tester.py | JordanMicahBennett/DeepBrainSeg | 659dd439d20d4c024fe337874eadb90deffc40a4 | [
"MIT"
] | null | null | null | DeepBrainSeg/tumor/Tester.py | JordanMicahBennett/DeepBrainSeg | 659dd439d20d4c024fe337874eadb90deffc40a4 | [
"MIT"
] | 1 | 2021-01-01T18:06:52.000Z | 2021-01-01T18:06:52.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# author: Avinash Kori
# contact: koriavinash1@gmail.com
import torch
import SimpleITK as sitk
import numpy as np
import nibabel as nib
from torch.autograd import Variable
from skimage.transform import resize
from torchvision import transforms
from time import gmtime, ... | 46.937778 | 168 | 0.548717 |
bc6e8fa55969e186c06ce2946db2244dfbf09a10 | 7,334 | py | Python | statsmodels/discrete/tests/test_conditional.py | porcpine1967/statsmodels | db4900056d80732ffff2733454fac88781ced8d2 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/discrete/tests/test_conditional.py | porcpine1967/statsmodels | db4900056d80732ffff2733454fac88781ced8d2 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/discrete/tests/test_conditional.py | porcpine1967/statsmodels | db4900056d80732ffff2733454fac88781ced8d2 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from statsmodels.discrete.conditional_models import (
ConditionalLogit, ConditionalPoisson)
from statsmodels.tools.numdiff import approx_fprime
from numpy.testing import assert_allclose
import pandas as pd
| 30.558333 | 78 | 0.587947 |