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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796535ec640e08840e06baf639ab88d881c837f6 | 206 | py | Python | Server/app/views/__init__.py | JoMingyu/Flask-Serverless | 7af03376e6732ca5b9b6b5c05065bb62291f8e4f | [
"MIT"
] | 1 | 2018-04-12T10:51:11.000Z | 2018-04-12T10:51:11.000Z | Server/app/views/__init__.py | JoMingyu/Flask-Serverless | 7af03376e6732ca5b9b6b5c05065bb62291f8e4f | [
"MIT"
] | null | null | null | Server/app/views/__init__.py | JoMingyu/Flask-Serverless | 7af03376e6732ca5b9b6b5c05065bb62291f8e4f | [
"MIT"
] | null | null | null | from flask_restful import Api
class ViewInjector(object):
def __init__(self, app=None):
if app is not None:
self.init_app(app)
def init_app(self, app):
api = Api(app)
| 18.727273 | 33 | 0.616505 |
796536262585fbcb31f8ed695a27fa39c897596b | 10,050 | py | Python | SquigglePlot.py | nodrogluap/SquiggleKit | ad6d6b99f233666ddf58b1dd0fdbbebd70c1b37a | [
"MIT"
] | null | null | null | SquigglePlot.py | nodrogluap/SquiggleKit | ad6d6b99f233666ddf58b1dd0fdbbebd70c1b37a | [
"MIT"
] | null | null | null | SquigglePlot.py | nodrogluap/SquiggleKit | ad6d6b99f233666ddf58b1dd0fdbbebd70c1b37a | [
"MIT"
] | null | null | null | import os
import sys
import gzip
import io
import traceback
import argparse
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from matplotlib import rcParams
# rcParams.update({'figure.autolayout': True})
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
# matpl... | 32.95082 | 116 | 0.545572 |
7965368aa7edd3b02686216d9fe7797c4c1c75d7 | 3,914 | py | Python | Python/wildcard-matching.py | bssrdf/LeetCode-5 | 746df5cff523361145a74d9d429dc541a7b99910 | [
"MIT"
] | 68 | 2018-01-13T07:15:37.000Z | 2022-02-20T12:58:24.000Z | Python/wildcard-matching.py | ambershen/LeetCode | 0c53580697b05fadb3981d97bd25f1d9da65fd2f | [
"MIT"
] | 2 | 2021-12-10T01:43:37.000Z | 2021-12-14T21:48:53.000Z | Python/wildcard-matching.py | ambershen/LeetCode | 0c53580697b05fadb3981d97bd25f1d9da65fd2f | [
"MIT"
] | 63 | 2017-04-10T03:38:25.000Z | 2022-03-17T23:24:51.000Z | # Time: O(m + n)
# Space: O(1)
#
# Implement wildcard pattern matching with support for '?' and '*'.
#
# '?' Matches any single character.
# '*' Matches any sequence of characters (including the empty sequence).
#
# The matching should cover the entire input string (not partial).
#
# The function prototype should b... | 31.063492 | 101 | 0.462187 |
796537ada45fbc75cca932c5ad31de60e9ca989b | 5,119 | py | Python | pysnmp-with-texts/A3COM-HUAWEI-LPBKDT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/A3COM-HUAWEI-LPBKDT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/A3COM-HUAWEI-LPBKDT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module A3COM-HUAWEI-LPBKDT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-LPBKDT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:05:42 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... | 113.755556 | 477 | 0.770463 |
7965395cad78a6b9e2b7c98ada55b29c1d93d02c | 4,018 | py | Python | InverseKinematics/softwareDesign/fr_ik.py | tummalag/Controlled-Flight-of-High-DOF-Humanoid-Robot | 383f41c504b5a08ffd6d0b4c8f6013e4070d8458 | [
"MIT"
] | null | null | null | InverseKinematics/softwareDesign/fr_ik.py | tummalag/Controlled-Flight-of-High-DOF-Humanoid-Robot | 383f41c504b5a08ffd6d0b4c8f6013e4070d8458 | [
"MIT"
] | null | null | null | InverseKinematics/softwareDesign/fr_ik.py | tummalag/Controlled-Flight-of-High-DOF-Humanoid-Robot | 383f41c504b5a08ffd6d0b4c8f6013e4070d8458 | [
"MIT"
] | null | null | null | ###
#
###
import fr_fk as fk
import right_arm as rt
import numpy as np
from numpy.linalg import pinv
from time import time
#import plotting as p
import matplotlib.pyplot as plt
import matplotlib.animation as animation
def getDist(pos_cur, pos_des):
#
d = np.array(pos_cur) - np.array(pos_des)
c = np.sqrt(d[0]*d[... | 20.927083 | 98 | 0.63116 |
796539f8656f6bec07b8c788e652677ec94e3f59 | 218 | py | Python | Aula Python/Aula 11 ex4.py | ayresmajor/Curso-python | 006229cec38ea365bf43b19e3ce93fbd32e1dca6 | [
"MIT"
] | null | null | null | Aula Python/Aula 11 ex4.py | ayresmajor/Curso-python | 006229cec38ea365bf43b19e3ce93fbd32e1dca6 | [
"MIT"
] | null | null | null | Aula Python/Aula 11 ex4.py | ayresmajor/Curso-python | 006229cec38ea365bf43b19e3ce93fbd32e1dca6 | [
"MIT"
] | null | null | null | nome = 'Ayres'
cores = {'limpa': '\033[m',
'azul': '\033[34m',
'amarelo': '\033[33m',
'pretoebranco': '\033[7;30m'}
print('Olá! {}{}{}'.format(cores['pretoebranco'], nome, cores['limpa']))
| 24.222222 | 72 | 0.504587 |
79653ac44939ffd48c26d6ba3659f51e44a69d41 | 3,017 | py | Python | src/application/views/admin/page.py | koorukuroo/flask_admin_appengine | 825084a9bc73245191cd8d34e7f024ed52386ceb | [
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | src/application/views/admin/page.py | koorukuroo/flask_admin_appengine | 825084a9bc73245191cd8d34e7f024ed52386ceb | [
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | src/application/views/admin/page.py | koorukuroo/flask_admin_appengine | 825084a9bc73245191cd8d34e7f024ed52386ceb | [
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from flask.views import View
from flask import flash, redirect, url_for, render_template, request
from models import PageModel
from forms import PageForm
from google.appengine.api import users
from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError
from decorators impor... | 34.284091 | 97 | 0.627444 |
79653b5b1af4c2329e099a64cbb8b154621e0909 | 2,616 | py | Python | sa/profiles/UTST/ONU/get_interfaces.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/profiles/UTST/ONU/get_interfaces.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/profiles/UTST/ONU/get_interfaces.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# UTST.ONU.get_interfaces
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python ... | 34.88 | 90 | 0.3987 |
79653b97bdf1ad051ed5d6fbe89c10e57d5bba65 | 5,024 | py | Python | aiida_vasp/io/poscar.py | chrisjsewell/aiida-vasp | 11b6abf728efdba475c2fa24ede41c4ffe8fac64 | [
"MIT"
] | 1 | 2021-06-13T14:40:31.000Z | 2021-06-13T14:40:31.000Z | aiida_vasp/io/poscar.py | chrisjsewell/aiida-vasp | 11b6abf728efdba475c2fa24ede41c4ffe8fac64 | [
"MIT"
] | null | null | null | aiida_vasp/io/poscar.py | chrisjsewell/aiida-vasp | 11b6abf728efdba475c2fa24ede41c4ffe8fac64 | [
"MIT"
] | null | null | null | # pylint: disable=no-self-use
"""Tools for parsing POSCAR files."""
import numpy as np
from parsevasp.poscar import Poscar, Site
from aiida.common.constants import elements
from aiida_vasp.io.parser import BaseFileParser
from aiida_vasp.utils.aiida_utils import get_data_class
class PoscarParser(BaseFileParser):
... | 34.176871 | 138 | 0.662022 |
79653bb072f68fcdd86a0a017bd7aecd001ea057 | 19,620 | py | Python | pirates/piratesgui/QuestPage.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 3 | 2021-02-25T06:38:13.000Z | 2022-03-22T07:00:15.000Z | pirates/piratesgui/QuestPage.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | null | null | null | pirates/piratesgui/QuestPage.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 1 | 2021-02-25T06:38:17.000Z | 2021-02-25T06:38:17.000Z | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.piratesgui.QuestPage
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from pirates.piratesgui import Invento... | 56.057143 | 494 | 0.600714 |
79653c6ff3a3ab632556dfdfe33c114b8ed08f35 | 18,353 | py | Python | elastalert/test_rule.py | OpenCoreCH/elastalert | 28502d8e81e67649976a6a3d2ccc198a5dd60631 | [
"Apache-2.0"
] | null | null | null | elastalert/test_rule.py | OpenCoreCH/elastalert | 28502d8e81e67649976a6a3d2ccc198a5dd60631 | [
"Apache-2.0"
] | 1 | 2018-10-05T14:38:22.000Z | 2018-10-05T14:38:22.000Z | elastalert/test_rule.py | OpenCoreCH/elastalert | 28502d8e81e67649976a6a3d2ccc198a5dd60631 | [
"Apache-2.0"
] | 4 | 2018-10-05T12:11:42.000Z | 2022-01-31T10:31:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import copy
import datetime
import json
import logging
import random
import re
import string
import sys
import mock
from elastalert.config import load_conf
from elastalert.elastalert import ElastAlerter
from elastalert.util import EAException
from elastale... | 40.694013 | 133 | 0.564213 |
79653cab70934ce134454bd3fc67d49e4fa19dfa | 203 | py | Python | news/views/index.py | lynndotconfig/qnews | abfda5ea55a900e6a8088a76b46b5e9a75b49bab | [
"Apache-2.0"
] | null | null | null | news/views/index.py | lynndotconfig/qnews | abfda5ea55a900e6a8088a76b46b5e9a75b49bab | [
"Apache-2.0"
] | null | null | null | news/views/index.py | lynndotconfig/qnews | abfda5ea55a900e6a8088a76b46b5e9a75b49bab | [
"Apache-2.0"
] | null | null | null |
"""News detail view."""
from django.views.generic import TemplateView
# Create your views here.
class IndexView(TemplateView):
"""Detail view for news model."""
template_name = "index.html"
| 16.916667 | 45 | 0.704433 |
79653dbd8c51c480e75cb39de9746dac94e15352 | 1,755 | py | Python | calendareshop/shopping/migrations/0001_initial.py | Kaarhai/calendar-eshop | 4ba4141034fe0042f0b3eec6194efd4b5c815f66 | [
"BSD-3-Clause"
] | 1 | 2016-09-20T22:01:05.000Z | 2016-09-20T22:01:05.000Z | calendareshop/shopping/migrations/0001_initial.py | Kaarhai/calendar-eshop | 4ba4141034fe0042f0b3eec6194efd4b5c815f66 | [
"BSD-3-Clause"
] | 6 | 2016-10-08T09:57:49.000Z | 2022-03-11T23:16:41.000Z | calendareshop/shopping/migrations/0001_initial.py | Kaarhai/calendar-eshop | 4ba4141034fe0042f0b3eec6194efd4b5c815f66 | [
"BSD-3-Clause"
] | 2 | 2016-10-03T21:47:55.000Z | 2019-10-17T07:56:09.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('calendareshop', '0004_auto_20150918_1832'),
('shop', '__first__'),
]
operations = [
migrations.CreateModel(
... | 47.432432 | 150 | 0.594302 |
79653ed70ffc8c1b50bd5832c386ecb19e9970ea | 1,314 | py | Python | PythonExercicio/ex095.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex095.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | PythonExercicio/ex095.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | artilharia = list()
while True:
jogador = dict()
print("-"*30)
jogador['nome'] = str(input('Nome do Jogador: '))
gols = list()
total = 0
partidas = int(input(f"Quantas partidas {jogador['nome']} jogou? "))
for i in range(partidas):
valor = int(input(f'Quantos gols na partida {i+1}... | 27.375 | 94 | 0.550989 |
79653f8128acf7c2d83d4cecefe1f44d74a328af | 1,470 | py | Python | Turtle race.py | Arsa-py/Python_Projects | 21fc10e9a5d902c9a278530510a7f5cd220ea19f | [
"MIT"
] | null | null | null | Turtle race.py | Arsa-py/Python_Projects | 21fc10e9a5d902c9a278530510a7f5cd220ea19f | [
"MIT"
] | null | null | null | Turtle race.py | Arsa-py/Python_Projects | 21fc10e9a5d902c9a278530510a7f5cd220ea19f | [
"MIT"
] | null | null | null | from turtle import *
from random import *
bgcolor("sky blue")
title("Turtle Race")
speed(0)
penup()
goto(-140, 140)
for step in range(16):
write(step, align="center") # align= za centriranje brojeva iznad linije
right(90)
forward(10)
# isprekidane linije:
for dash in range(... | 16.896552 | 85 | 0.469388 |
796540116323275ec7b236e03132a1e64e67989d | 1,695 | py | Python | django/db/backends/postgresql/client.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 3 | 2021-01-24T15:30:13.000Z | 2021-02-11T04:12:30.000Z | django/db/backends/postgresql/client.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 14 | 2021-03-26T20:54:22.000Z | 2021-04-06T17:18:53.000Z | django/db/backends/postgresql/client.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 7 | 2021-04-26T15:52:19.000Z | 2021-05-04T02:18:56.000Z | import signal
from django.db.backends.base.client import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'psql'
@classmethod
def settings_to_cmd_args_env(cls, settings_dict, parameters):
args = [cls.executable_name]
options = settings_dict.get('OPTIONS', {}... | 30.818182 | 65 | 0.576401 |
7965405b7621aa9151b989e93542b7bf019b0125 | 1,437 | py | Python | script.module.streamlink.base/resources/lib/streamlink/plugins/qq.py | bobbybark/tantrumrepo | 1451c481254d3fedec9f430139d18db7312a9b1a | [
"Beerware"
] | 3 | 2020-03-03T13:21:44.000Z | 2021-07-21T09:53:31.000Z | script.module.streamlink.base/resources/lib/streamlink/plugins/qq.py | eggman19/tantrumrepo | 1451c481254d3fedec9f430139d18db7312a9b1a | [
"Beerware"
] | null | null | null | script.module.streamlink.base/resources/lib/streamlink/plugins/qq.py | eggman19/tantrumrepo | 1451c481254d3fedec9f430139d18db7312a9b1a | [
"Beerware"
] | 1 | 2018-08-30T20:04:34.000Z | 2018-08-30T20:04:34.000Z | # -*- coding: utf-8 -*-
import re
from streamlink.exceptions import NoStreamsError
from streamlink.plugin import Plugin
from streamlink.plugin.api import http
from streamlink.plugin.api import validate
from streamlink.plugin.api.utils import parse_json
from streamlink.stream import HLSStream
class QQ(Plugin):
""... | 26.127273 | 78 | 0.605428 |
79654073f24b942fd4970483361091c4173f41f2 | 7,311 | py | Python | test/functional/api/cas/cache.py | sirizhou/open-cas-linux | e623c44b3b637238a8c6041f8659d8eb3766b91c | [
"BSD-3-Clause-Clear"
] | null | null | null | test/functional/api/cas/cache.py | sirizhou/open-cas-linux | e623c44b3b637238a8c6041f8659d8eb3766b91c | [
"BSD-3-Clause-Clear"
] | null | null | null | test/functional/api/cas/cache.py | sirizhou/open-cas-linux | e623c44b3b637238a8c6041f8659d8eb3766b91c | [
"BSD-3-Clause-Clear"
] | null | null | null | #
# Copyright(c) 2019-2020 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
from api.cas.casadm_parser import *
from api.cas.cli import *
from api.cas.statistics import CacheStats, CacheIoClassStats
from storage_devices.device import Device
from test_utils.os_utils import *
class Cache:
def __in... | 38.888298 | 94 | 0.633019 |
796540f19a039618e43f3bf101ca8a1e7034f64b | 8,278 | py | Python | datar/dplyr/join.py | pdwaggoner/datar | a03f1c0ca0de1270059178e59cea151a51a6e7aa | [
"MIT"
] | null | null | null | datar/dplyr/join.py | pdwaggoner/datar | a03f1c0ca0de1270059178e59cea151a51a6e7aa | [
"MIT"
] | null | null | null | datar/dplyr/join.py | pdwaggoner/datar | a03f1c0ca0de1270059178e59cea151a51a6e7aa | [
"MIT"
] | null | null | null | """Mutating joins"""
from pipda import register_verb
from ..core.backends import pandas as pd
from ..core.backends.pandas import Categorical, DataFrame
from ..core.backends.pandas.api.types import is_scalar, is_categorical_dtype
from ..core.contexts import Context
from ..core.tibble import reconstruct_tibble
from ..c... | 23.994203 | 80 | 0.556777 |
79654101775d6701ee45857959c50baa403f87c3 | 267 | py | Python | content/en/api/synthetics/code_snippets/result.get_locations.py | wparth/documentation | 45246d61fe8a708e12152c7a76fea6e62730348d | [
"BSD-3-Clause"
] | 1 | 2020-04-09T01:40:33.000Z | 2020-04-09T01:40:33.000Z | content/en/api/synthetics/code_snippets/result.get_locations.py | wparth/documentation | 45246d61fe8a708e12152c7a76fea6e62730348d | [
"BSD-3-Clause"
] | null | null | null | content/en/api/synthetics/code_snippets/result.get_locations.py | wparth/documentation | 45246d61fe8a708e12152c7a76fea6e62730348d | [
"BSD-3-Clause"
] | null | null | null | {
"locations": [
{"is_active": True, "region": "Americas", "display_name": "Ohio (AWS)", "id": 30005, "name": "aws:us-east-2"},
{"is_active": True, "region": "Europe", "display_name": "Frankfurt (AWS)", "id": 3, "name": "aws:eu-central-1"}
]
} | 44.5 | 119 | 0.543071 |
796541e78e6c2b124b422fdc25ec03dd956fa1e9 | 7,788 | py | Python | language-tasks-fl/src/dataset/build_twitter_dataset.py | SanaAwan5/edgecase_backdoors | c892024242e45557fa94363ecadc355a9250bca0 | [
"MIT"
] | 8 | 2021-05-08T07:49:45.000Z | 2022-03-17T16:18:05.000Z | language-tasks-fl/src/dataset/build_twitter_dataset.py | SanaAwan5/edgecase_backdoors | c892024242e45557fa94363ecadc355a9250bca0 | [
"MIT"
] | 3 | 2021-05-19T14:58:53.000Z | 2022-01-13T15:53:19.000Z | language-tasks-fl/src/dataset/build_twitter_dataset.py | SanaAwan5/edgecase_backdoors | c892024242e45557fa94363ecadc355a9250bca0 | [
"MIT"
] | 5 | 2021-05-22T08:56:20.000Z | 2022-03-31T06:50:21.000Z | import sys
print(sys.path)
import numpy as np
from string import punctuation
from collections import Counter
from collections import defaultdict
from sklearn.model_selection import train_test_split
import torch
from torch.utils.data import TensorDataset, DataLoader
from nltk.corpus import stopwords
from nltk.tokenize i... | 30.421875 | 125 | 0.670647 |
796543711296bb20b3f8da4652f0c6abe79f2ea5 | 441 | py | Python | open_astral_engine/effects/buff.py | I-dan-mi-I/Open-Astral-Engine | 5f7c62521e852cde4ca0fb0668950ebb5b65dc2b | [
"MIT"
] | null | null | null | open_astral_engine/effects/buff.py | I-dan-mi-I/Open-Astral-Engine | 5f7c62521e852cde4ca0fb0668950ebb5b65dc2b | [
"MIT"
] | null | null | null | open_astral_engine/effects/buff.py | I-dan-mi-I/Open-Astral-Engine | 5f7c62521e852cde4ca0fb0668950ebb5b65dc2b | [
"MIT"
] | null | null | null | from .base_classes import EffectsDict
effects = EffectsDict()
@effects.append
class BuffExample:
__ename__ = "Название Бафф"
__description__ = """Описание"""
__fluttering__ = False
__event__ = False
__duration__ = 0
__eindex__ = -1
__type__ = "buff"
__synergy__ = """Синергии"""
... | 18.375 | 37 | 0.632653 |
7965438ef15a1d2e4ca399872e7fb61a34185c2d | 258 | py | Python | services/admin.py | asis2016/any-company-rest-api | a8f82325b1f1e5b45a14c9ce8500dcd59fdc2ae2 | [
"MIT"
] | null | null | null | services/admin.py | asis2016/any-company-rest-api | a8f82325b1f1e5b45a14c9ce8500dcd59fdc2ae2 | [
"MIT"
] | null | null | null | services/admin.py | asis2016/any-company-rest-api | a8f82325b1f1e5b45a14c9ce8500dcd59fdc2ae2 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Service
class ServiceAdmin(admin.ModelAdmin):
""" Service admin for http://127.0.0.1:8000/admin/services """
list_display = ('id', 'title', 'icon',)
admin.site.register(Service, ServiceAdmin)
| 21.5 | 66 | 0.713178 |
796543f603045396dd50f0135b64b58337bc884d | 35,267 | py | Python | Savethemblobs/PythonistaKit.framework/pylib/codecs.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 19 | 2017-05-17T16:48:02.000Z | 2020-08-18T18:21:45.000Z | Savethemblobs/PythonistaKit.framework/pylib/codecs.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 2 | 2017-05-17T06:41:47.000Z | 2017-05-17T17:27:13.000Z | Savethemblobs/PythonistaKit.framework/pylib/codecs.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 4 | 2017-05-17T03:56:25.000Z | 2018-11-09T00:00:20.000Z |
""" codecs -- Python Codec Registry, API and helpers.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import __builtin__, sys
### Registry and builtin stateless codec functions
try:
from _codecs import *
except ImportError, why:
raise SystemEr... | 32.060909 | 131 | 0.619758 |
7965442b080e9acf5e216d8d5d5764dc18f75551 | 1,665 | py | Python | imix/data/loaders/visualentailment_loader.py | linxi1158/iMIX | af87a17275f02c94932bb2e29f132a84db812002 | [
"Apache-2.0"
] | 23 | 2021-06-26T08:45:19.000Z | 2022-03-02T02:13:33.000Z | imix/data/loaders/visualentailment_loader.py | XChuanLee/iMIX | 99898de97ef8b45462ca1d6bf2542e423a73d769 | [
"Apache-2.0"
] | null | null | null | imix/data/loaders/visualentailment_loader.py | XChuanLee/iMIX | 99898de97ef8b45462ca1d6bf2542e423a73d769 | [
"Apache-2.0"
] | 9 | 2021-06-10T02:36:20.000Z | 2021-11-09T02:18:16.000Z | from .base_loader import BaseLoader
from ..builder import DATASETS
from ..infocomp import VisualEntailmentInfoCpler as InfoCpler
@DATASETS.register_module()
class VisualEntailmentDATASET(BaseLoader):
def __init__(self, reader, info_cpler, limit_nums=None):
super().__init__(Reader, reader, InfoCpler, info... | 34.6875 | 76 | 0.641441 |
796544365fbbc5619e21f55cb20b4a86875405c0 | 9,130 | py | Python | config/qutebrowser/scripts/dictcli.py | jansen-p/dotfiles | 78776dd2dc3499356368cc61eb79cc3d08c7839e | [
"MIT"
] | 1 | 2022-03-02T13:28:02.000Z | 2022-03-02T13:28:02.000Z | config/qutebrowser/scripts/dictcli.py | jansen-p/dotfiles | 78776dd2dc3499356368cc61eb79cc3d08c7839e | [
"MIT"
] | null | null | null | config/qutebrowser/scripts/dictcli.py | jansen-p/dotfiles | 78776dd2dc3499356368cc61eb79cc3d08c7839e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2017 Michal Siedlaczek <michal.siedlaczek@gmail.com>
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
... | 32.491103 | 95 | 0.65586 |
796545027fcbedab4e31d001163b882e3dae8a8c | 9,120 | py | Python | python/ray/experimental/packaging/load_package.py | kifarid/ray | 43c97c2afb979987be82fa50048674e9b6776d5d | [
"Apache-2.0"
] | 3 | 2021-08-29T20:41:21.000Z | 2022-01-31T18:47:51.000Z | python/ray/experimental/packaging/load_package.py | QPC-database/amazon-ray | 55aa4cac02a412b96252aea4e8c3f177a28324a1 | [
"Apache-2.0"
] | 70 | 2021-01-13T04:28:37.000Z | 2022-03-12T08:03:17.000Z | python/ray/experimental/packaging/load_package.py | majacQ/ray | bc08c6cdcc7ddf4da751ca2a972defd3db509061 | [
"Apache-2.0"
] | 1 | 2020-01-16T20:52:25.000Z | 2020-01-16T20:52:25.000Z | """Support for loading code packages into Ray at runtime.
Ray packages allow developers to define self-contained code modules that can
be imported reproducibly into any Ray cluster. Each package can define its own
runtime environment, which can include:
- Different versions of code (e.g., from different git commits).... | 38.158996 | 79 | 0.610965 |
796545729034a3bf1cdef5c7af455fcae7379fdd | 470 | py | Python | {{cookiecutter.slug}}/backend/example/views.py | UUDigitalHumanitieslab/cookiecutter-webapp-deluxe | 4327c435c3721dba49a81bdec3369edac83bb20e | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.slug}}/backend/example/views.py | UUDigitalHumanitieslab/cookiecutter-webapp-deluxe | 4327c435c3721dba49a81bdec3369edac83bb20e | [
"BSD-3-Clause"
] | 29 | 2019-04-17T09:49:07.000Z | 2022-03-24T15:55:35.000Z | {{cookiecutter.slug}}/backend/example/views.py | UUDigitalHumanitieslab/cookiecutter-webapp-deluxe | 4327c435c3721dba49a81bdec3369edac83bb20e | [
"BSD-3-Clause"
] | 1 | 2022-02-22T18:17:02.000Z | 2022-02-22T18:17:02.000Z | from rest_framework.decorators import api_view
from rest_framework.response import Response
# This a very basic View that servers as an example.
# Note that, when utilizing models and a database, etc, you would not have
# views like this, but rather Viewsets. See the Django Rest Framework (DRF) documentation.
@api_vi... | 39.166667 | 93 | 0.768085 |
796545970b114ddc9ca799eb780000d975934a26 | 8,816 | py | Python | extra_views/advanced.py | timgates42/django-extra-views | 63700e77a0a87e68ea0494101ca9868e46b2aa1c | [
"MIT"
] | null | null | null | extra_views/advanced.py | timgates42/django-extra-views | 63700e77a0a87e68ea0494101ca9868e46b2aa1c | [
"MIT"
] | 5 | 2021-05-28T19:38:28.000Z | 2022-03-12T00:45:39.000Z | extra_views/advanced.py | timgates42/django-extra-views | 63700e77a0a87e68ea0494101ca9868e46b2aa1c | [
"MIT"
] | null | null | null | from django.contrib import messages
from django.forms.formsets import all_valid
from django.views.generic.base import ContextMixin
from django.views.generic.detail import SingleObjectTemplateResponseMixin
from django.views.generic.edit import FormView, ModelFormMixin
from extra_views.formsets import BaseInlineFormSetF... | 33.018727 | 87 | 0.673775 |
7965462991763473342c44a631ca4d863e20b4bf | 3,365 | py | Python | probeye/definition/sensor.py | SMattfeldt/probeye | 3a1e236f1e389f4e775a1413a4cf173f39ab2f12 | [
"MIT"
] | null | null | null | probeye/definition/sensor.py | SMattfeldt/probeye | 3a1e236f1e389f4e775a1413a4cf173f39ab2f12 | [
"MIT"
] | null | null | null | probeye/definition/sensor.py | SMattfeldt/probeye | 3a1e236f1e389f4e775a1413a4cf173f39ab2f12 | [
"MIT"
] | null | null | null | # standard library
from typing import Union, List, Tuple, Optional
# third party imports
import numpy as np
# local imports
from probeye.subroutines import process_spatiotemporal_coordinates
class Sensor:
"""
Base class for a sensor of the forward model. In its simplest form just a class with
a 'name' a... | 38.238636 | 88 | 0.651412 |
79654686c8e1de9541cede5f18dcc313daf0deca | 2,835 | py | Python | conanfile.py | FiligreeTech/conan-arrow | b3d725caa1608d827812daeef4becbddb8e4d071 | [
"BSD-2-Clause"
] | null | null | null | conanfile.py | FiligreeTech/conan-arrow | b3d725caa1608d827812daeef4becbddb8e4d071 | [
"BSD-2-Clause"
] | 2 | 2019-09-23T05:56:22.000Z | 2020-03-27T14:26:48.000Z | conanfile.py | FiligreeTech/conan-arrow | b3d725caa1608d827812daeef4becbddb8e4d071 | [
"BSD-2-Clause"
] | 1 | 2019-09-20T05:57:29.000Z | 2019-09-20T05:57:29.000Z | from conans import ConanFile, CMake, tools
class ArrowConan(ConanFile):
name = "arrow"
version = "0.15.1"
license = "Apache-2.0"
url = "https://arrow.apache.org/"
description = "Apache arrow"
topics = ("apache", "arrow")
settings = "os", "compiler", "build_type", "arch"
options = {"shar... | 40.5 | 104 | 0.624339 |
796546dc8ba11c74b24c2758652f1b01d56f99a6 | 3,733 | py | Python | SmartDoctor/patient_new/tests.py | alirezadaghigh99/Software-Project | 8d54b4f2a2d07abea433a1a965c79f94b62f0911 | [
"MIT"
] | null | null | null | SmartDoctor/patient_new/tests.py | alirezadaghigh99/Software-Project | 8d54b4f2a2d07abea433a1a965c79f94b62f0911 | [
"MIT"
] | null | null | null | SmartDoctor/patient_new/tests.py | alirezadaghigh99/Software-Project | 8d54b4f2a2d07abea433a1a965c79f94b62f0911 | [
"MIT"
] | null | null | null | from django.test import TestCase
# Create your tests here.
from django.urls import reverse
from django.utils import timezone
from rest_framework import status
from rest_framework.test import APITestCase, APIClient
from patient.models import UserModel, UserRole, Visit, VisitStatus
class LoginAndSignupTest(APITestCas... | 39.712766 | 116 | 0.637021 |
7965471295bc34d0a22831c22ebb033423859fcb | 1,357 | py | Python | python_base/day_2/test_1.py | sven820/python | ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554 | [
"Apache-2.0"
] | null | null | null | python_base/day_2/test_1.py | sven820/python | ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554 | [
"Apache-2.0"
] | null | null | null | python_base/day_2/test_1.py | sven820/python | ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554 | [
"Apache-2.0"
] | null | null | null | __author__ = "JJ.sven"
product_list = [
["iPhone", 5000],
["mac pro", 10000],
["Watch", 3200],
["Book", 288],
["bike", 2889],
]
money = 0
shop_list = []
exit_step = "q"
money = input("your all money:")
if money.isdigit():
money = int(money)
else:
money = 0
print('输入金额不正确,程序退出')
if mo... | 25.603774 | 58 | 0.482682 |
796547e0144ac1f864134c15b02f1332506524af | 5,640 | py | Python | fewshot/models/modules/online_imp_memory.py | sebamenabar/oc-fewshot-public | 2dad8c9f24cb1bfe72d8b13b33d28f6788d86ca8 | [
"MIT"
] | 18 | 2020-07-12T11:07:27.000Z | 2022-02-06T04:17:23.000Z | fewshot/models/modules/online_imp_memory.py | renmengye/oc-fewshot | eb12bd5b426518fd8353304f0760f5c24f1b3c12 | [
"MIT"
] | 2 | 2021-10-14T17:38:50.000Z | 2021-11-10T14:07:04.000Z | fewshot/models/modules/online_imp_memory.py | renmengye/oc-fewshot | eb12bd5b426518fd8353304f0760f5c24f1b3c12 | [
"MIT"
] | 6 | 2020-11-11T19:18:28.000Z | 2021-06-04T14:20:03.000Z | """Online mixture memory that performs online clustering.
Author: Mengye Ren (mren@cs.toronto.edu)
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import tensorflow as tf
from fewshot.models.modules.example_memory import ExampleMemory
from fewshot.mode... | 35.031056 | 78 | 0.607979 |
796548b829f28813dbad09c01a852b02a1f6bb3d | 14,886 | py | Python | mayan/apps/document_states/urls.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 2 | 2021-09-12T19:41:19.000Z | 2021-09-12T19:41:20.000Z | mayan/apps/document_states/urls.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 37 | 2021-09-13T01:00:12.000Z | 2021-10-02T03:54:30.000Z | mayan/apps/document_states/urls.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 1 | 2021-09-22T13:17:30.000Z | 2021-09-22T13:17:30.000Z | from django.conf.urls import url
from .api_views import (
APIWorkflowInstanceListView,
APIWorkflowInstanceDetailView,
APIWorkflowInstanceLogEntryDetailView,
APIWorkflowInstanceLogEntryListView,
APIWorkflowTemplateDetailView,
APIWorkflowTemplateDocumentTypeAddView,
APIWorkflowTempla... | 41.697479 | 185 | 0.706704 |
79654988c4500f71db1c670ebdfebd41c735a4d9 | 402 | py | Python | setup.py | brennie/example-rb-oauth2-client | db539c142cba9cb372f28c7f608138932463e907 | [
"MIT"
] | null | null | null | setup.py | brennie/example-rb-oauth2-client | db539c142cba9cb372f28c7f608138932463e907 | [
"MIT"
] | null | null | null | setup.py | brennie/example-rb-oauth2-client | db539c142cba9cb372f28c7f608138932463e907 | [
"MIT"
] | null | null | null | """Setup example-rb-oauth2-client."""
from setuptools import setup, find_packages
setup(
name='example-rb-oauth2-client',
version='0.1.0',
description='An example OAuth2 client for Review Board',
license='MIT',
packages=find_packages(),
install_requires=[
'Django >=1.11,<1.12',
... | 21.157895 | 60 | 0.616915 |
79654a0816345693b257b23d681f22dd2d510ff3 | 4,697 | py | Python | GraphGenerator.py | neu-spiral/GraphMatching | 84729b9d793bf8d7aca99dcc1751b99222d8cdc9 | [
"MIT"
] | null | null | null | GraphGenerator.py | neu-spiral/GraphMatching | 84729b9d793bf8d7aca99dcc1751b99222d8cdc9 | [
"MIT"
] | null | null | null | GraphGenerator.py | neu-spiral/GraphMatching | 84729b9d793bf8d7aca99dcc1751b99222d8cdc9 | [
"MIT"
] | null | null | null | from networkx import Graph, DiGraph
import networkx
import logging,argparse
import topologies
import random
import numpy as np
def format(G):
''' Returns a sorted list with the edges in G formatted according to the following convention:
-Nodes are numbered 1,2,...,n, where n is the number of nodes in G
-Edges ar... | 43.490741 | 339 | 0.70726 |
79654a5812df5fa9c967b7fbf9464851cd4bb043 | 2,843 | py | Python | refnx/reflect/_app/_optimisation_parameters.py | ohcpaull/refnx | fc4d81a20c46b301dfd7ff4b068d0aef3cedba81 | [
"BSD-3-Clause"
] | null | null | null | refnx/reflect/_app/_optimisation_parameters.py | ohcpaull/refnx | fc4d81a20c46b301dfd7ff4b068d0aef3cedba81 | [
"BSD-3-Clause"
] | null | null | null | refnx/reflect/_app/_optimisation_parameters.py | ohcpaull/refnx | fc4d81a20c46b301dfd7ff4b068d0aef3cedba81 | [
"BSD-3-Clause"
] | null | null | null | import os.path
from PyQt5 import QtWidgets, uic
from PyQt5.QtCore import pyqtSlot
import numpy as np
UI_LOCATION = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ui")
class OptimisationParameterView(QtWidgets.QDialog):
def __init__(self, parent=None):
super().__init__(parent)
self.ui... | 33.845238 | 76 | 0.521984 |
79654b52143c8b9247a3a943c66955fb555e094d | 589 | py | Python | authentik/providers/oauth2/migrations/0015_auto_20210703_1313.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 15 | 2020-01-05T09:09:57.000Z | 2020-11-28T05:27:39.000Z | authentik/providers/oauth2/migrations/0015_auto_20210703_1313.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 302 | 2020-01-21T08:03:59.000Z | 2020-12-04T05:04:57.000Z | authentik/providers/oauth2/migrations/0015_auto_20210703_1313.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 3 | 2020-03-04T08:21:59.000Z | 2020-08-01T20:37:18.000Z | # Generated by Django 3.2.4 on 2021-07-03 13:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("authentik_providers_oauth2", "0014_alter_oauth2provider_rsa_key"),
]
operations = [
migrations.AddField(
model_name="authorizati... | 24.541667 | 76 | 0.609508 |
79654bd22c11887a46809537e13d08cc6bb45858 | 628 | py | Python | main/asgi.py | gtindo/django_startup | a8b0eaaa56d7ea7562cbf270987bb0226fbd6bb2 | [
"MIT"
] | null | null | null | main/asgi.py | gtindo/django_startup | a8b0eaaa56d7ea7562cbf270987bb0226fbd6bb2 | [
"MIT"
] | null | null | null | main/asgi.py | gtindo/django_startup | a8b0eaaa56d7ea7562cbf270987bb0226fbd6bb2 | [
"MIT"
] | null | null | null | """
ASGI config for the 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/4.0/howto/deployment/asgi/
"""
import os
# from channels.auth import AuthMiddlewareStack
# from channels.routing import ProtocolTyp... | 27.304348 | 78 | 0.783439 |
79654c71aad3e0a8c96da407a19faa678362ef94 | 1,105 | py | Python | applications/tagging/validators.py | twatson/django-plugables | bb14304456c9563f5e60f22d28763f6da6d04bb9 | [
"BSD-3-Clause"
] | 2 | 2016-05-08T10:55:20.000Z | 2020-03-29T09:30:21.000Z | applications/tagging/validators.py | twatson/django-plugables | bb14304456c9563f5e60f22d28763f6da6d04bb9 | [
"BSD-3-Clause"
] | null | null | null | applications/tagging/validators.py | twatson/django-plugables | bb14304456c9563f5e60f22d28763f6da6d04bb9 | [
"BSD-3-Clause"
] | null | null | null | """
Oldforms validators for tagging related fields - these are still
required for basic ``django.contrib.admin`` application field validation
until the ``newforms-admin`` branch lands in trunk.
"""
from django.core.validators import ValidationError
from django.utils.translation import ugettext as _
import settings
fro... | 35.645161 | 96 | 0.702262 |
79654ce2afdb49cb8616ca8bfd08150bd77e9da8 | 970 | py | Python | wufoo_scoring/apps/test_quizgrader.py | infomaven/wufoo_scoring | c316b2ae77c2be724a82725a57aa6f3b2b296e02 | [
"Unlicense"
] | null | null | null | wufoo_scoring/apps/test_quizgrader.py | infomaven/wufoo_scoring | c316b2ae77c2be724a82725a57aa6f3b2b296e02 | [
"Unlicense"
] | null | null | null | wufoo_scoring/apps/test_quizgrader.py | infomaven/wufoo_scoring | c316b2ae77c2be724a82725a57aa6f3b2b296e02 | [
"Unlicense"
] | null | null | null | import datetime
import Pyfoo *
from django.test import TestCase
from wufoo_responder.models import Entry, Item
class EntryTestCase(TestCase):
def setUp(self):
# todo: testCase for scoring methods
# todo: testCase for sending emails
"""
class BlogPostTestCase(TestCase):
def s... | 26.944444 | 65 | 0.634021 |
79654d75f74fef0b619d32f6c578d1a3afdb5b63 | 3,776 | py | Python | spikeinterface/toolkit/qualitymetrics/tests/test_quality_metric_calculator.py | vncntprvst/spikeinterface | dd5ae94f85fe5d9082b45321d2c96ba316eb4b77 | [
"MIT"
] | null | null | null | spikeinterface/toolkit/qualitymetrics/tests/test_quality_metric_calculator.py | vncntprvst/spikeinterface | dd5ae94f85fe5d9082b45321d2c96ba316eb4b77 | [
"MIT"
] | null | null | null | spikeinterface/toolkit/qualitymetrics/tests/test_quality_metric_calculator.py | vncntprvst/spikeinterface | dd5ae94f85fe5d9082b45321d2c96ba316eb4b77 | [
"MIT"
] | null | null | null | import pytest
import shutil
from pathlib import Path
import numpy as np
from spikeinterface import WaveformExtractor, load_extractor
from spikeinterface.extractors import toy_example
from spikeinterface.toolkit.postprocessing import WaveformPrincipalComponent
from spikeinterface.toolkit.preprocessing import scale
fro... | 35.622642 | 98 | 0.737553 |
79654e0f91c5d2c2ce867a4650f5b0c8aa8ac24a | 10,731 | py | Python | packages/python/plotly/plotly/validators/surface/_colorbar.py | benlindsay/plotly.py | 51ec6cb50d537a37da704ca74c07f11b62730110 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/surface/_colorbar.py | benlindsay/plotly.py | 51ec6cb50d537a37da704ca74c07f11b62730110 | [
"MIT"
] | 1 | 2022-01-22T14:39:41.000Z | 2022-01-22T14:39:41.000Z | packages/python/plotly/plotly/validators/surface/_colorbar.py | RARedeem/plotly.py | 8289eb1c85125e147c4ce14b56272ed50b99ef20 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="colorbar", parent_name="surface", **kwargs):
super(ColorbarValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 47.273128 | 80 | 0.525487 |
79654ef57eba2877e3d4e812b0c4e2d1cbb0d333 | 22,469 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_security_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_security_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_security_rules_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.065909 | 244 | 0.674841 |
79655004feb09b43d67710d8511f91338a13aea3 | 3,479 | py | Python | learning_log/settings.py | zShamu/plan-estudio | f8396c47a20b4cda2badfa90f1530e549b25340e | [
"Apache-2.0"
] | null | null | null | learning_log/settings.py | zShamu/plan-estudio | f8396c47a20b4cda2badfa90f1530e549b25340e | [
"Apache-2.0"
] | null | null | null | learning_log/settings.py | zShamu/plan-estudio | f8396c47a20b4cda2badfa90f1530e549b25340e | [
"Apache-2.0"
] | null | null | null | """
Django settings for learning_log project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pa... | 23.828767 | 91 | 0.693878 |
796550577a6537d1a38115cc015e465b15a38aa4 | 15,595 | py | Python | twisted/words/protocols/jabber/component.py | hawkowl/twisted | c413aac3888dea2202c0dc26f978d7f88b4b837a | [
"Unlicense",
"MIT"
] | 9,953 | 2019-04-03T23:41:04.000Z | 2022-03-31T11:54:44.000Z | stackoverflow/venv/lib/python3.6/site-packages/twisted/words/protocols/jabber/component.py | W4LKURE/learn_python3_spider | 98dd354a41598b31302641f9a0ea49d1ecfa0fb1 | [
"MIT"
] | 44 | 2019-05-27T10:59:29.000Z | 2022-03-31T14:14:29.000Z | stackoverflow/venv/lib/python3.6/site-packages/twisted/words/protocols/jabber/component.py | W4LKURE/learn_python3_spider | 98dd354a41598b31302641f9a0ea49d1ecfa0fb1 | [
"MIT"
] | 2,803 | 2019-04-06T13:15:33.000Z | 2022-03-31T07:42:01.000Z | # -*- test-case-name: twisted.words.test.test_jabbercomponent -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
External server-side components.
Most Jabber server implementations allow for add-on components that act as a
separate entity on the Jabber network, but use the server-to-ser... | 32.762605 | 79 | 0.653799 |
7965515108898ea57a769c52e0e122f2a867c412 | 5,779 | py | Python | project-alpha.py | mohammadzainabbas/Human-Detection-HOG | fba7f7c54db4d5862760b365cd85d8779973b21a | [
"MIT"
] | null | null | null | project-alpha.py | mohammadzainabbas/Human-Detection-HOG | fba7f7c54db4d5862760b365cd85d8779973b21a | [
"MIT"
] | null | null | null | project-alpha.py | mohammadzainabbas/Human-Detection-HOG | fba7f7c54db4d5862760b365cd85d8779973b21a | [
"MIT"
] | null | null | null | import cv2
import os
def extract_features():
des_type = 'HOG'
# If feature directories don't exist, create them
if not os.path.isdir(pos_feat_ph):
os.makedirs(pos_feat_ph)
# If feature directories don't exist, create them
if not os.path.isdir(neg_feat_ph):
os.makedirs(neg_feat_ph)... | 36.345912 | 125 | 0.634193 |
79655234d7e33c29660ec86bce2ca9bf1350f09d | 5,802 | py | Python | pyanchor/link_checker.py | rahulsinghsss/pyanchor | bd5c76f90f63bc4d99561c3a5192ee0cde48150d | [
"MIT"
] | 60 | 2020-09-01T07:07:09.000Z | 2022-03-30T11:59:39.000Z | pyanchor/link_checker.py | rahulsinghsss/pyanchor | bd5c76f90f63bc4d99561c3a5192ee0cde48150d | [
"MIT"
] | 24 | 2020-09-30T12:32:41.000Z | 2021-12-13T20:55:38.000Z | pyanchor/link_checker.py | rahulsinghsss/pyanchor | bd5c76f90f63bc4d99561c3a5192ee0cde48150d | [
"MIT"
] | 11 | 2020-09-12T22:29:11.000Z | 2021-11-05T04:35:34.000Z | """The main parser for finding and checking links
The LinkResults class expects a URL as its only argument. It will return a
dictionary of all links on the given html page which is stores in the object.results
attribute. The returning dictionary consists of the link (dict value) and the http
response (dict key).
... | 32.233333 | 96 | 0.599276 |
79655439f9f4056e304067390c170b02bc8da449 | 8,549 | py | Python | rqalpha/core/strategy_context.py | mysky528/rqalpha | ecd550fc30aee96f9995e8152e2c48f5512f8b11 | [
"Apache-2.0"
] | 3 | 2017-07-11T15:37:24.000Z | 2021-11-22T14:21:13.000Z | rqalpha/core/strategy_context.py | mysky528/rqalpha | ecd550fc30aee96f9995e8152e2c48f5512f8b11 | [
"Apache-2.0"
] | null | null | null | rqalpha/core/strategy_context.py | mysky528/rqalpha | ecd550fc30aee96f9995e8152e2c48f5512f8b11 | [
"Apache-2.0"
] | 2 | 2019-04-26T07:51:08.000Z | 2020-12-01T20:59:04.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, 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 ... | 31.546125 | 142 | 0.559949 |
7965556d3ed57a5c62ce0aaffa49805febf0571a | 7,959 | py | Python | splearn/naive_bayes.py | dtrckd/sparkit-learn | 0498502107c1f7dcf33cda0cdb6f5ba4b42524b7 | [
"Apache-2.0"
] | 1,219 | 2015-01-12T15:18:57.000Z | 2022-03-29T15:35:07.000Z | splearn/naive_bayes.py | dtrckd/sparkit-learn | 0498502107c1f7dcf33cda0cdb6f5ba4b42524b7 | [
"Apache-2.0"
] | 71 | 2015-05-05T09:13:40.000Z | 2022-01-09T15:27:08.000Z | splearn/naive_bayes.py | dtrckd/sparkit-learn | 0498502107c1f7dcf33cda0cdb6f5ba4b42524b7 | [
"Apache-2.0"
] | 270 | 2015-05-23T10:26:57.000Z | 2021-08-23T17:46:14.000Z | # -*- coding: utf-8 -*-
import operator
import numpy as np
import scipy.sparse as sp
from sklearn.base import copy
from sklearn.naive_bayes import (BaseDiscreteNB, BaseNB, BernoulliNB,
GaussianNB, MultinomialNB)
from splearn import BlockRDD
from splearn.base import SparkClassifierMix... | 31.963855 | 86 | 0.591029 |
796555b1737dcb29782e6de38c567a244df74ca4 | 2,886 | py | Python | trax/rl/__init__.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | null | null | null | trax/rl/__init__.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | null | null | null | trax/rl/__init__.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Trax 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 a... | 38.48 | 79 | 0.796604 |
796555b187af6c2e3586df1236567e895d5f09be | 13,991 | py | Python | src/herv_finder/blast/search.py | YU-Zhejian/HERVfinder | d01b8cdb88560e36ee92b69d62834f5d1a25d47a | [
"CC0-1.0",
"MIT"
] | null | null | null | src/herv_finder/blast/search.py | YU-Zhejian/HERVfinder | d01b8cdb88560e36ee92b69d62834f5d1a25d47a | [
"CC0-1.0",
"MIT"
] | null | null | null | src/herv_finder/blast/search.py | YU-Zhejian/HERVfinder | d01b8cdb88560e36ee92b69d62834f5d1a25d47a | [
"CC0-1.0",
"MIT"
] | null | null | null | import gc
import itertools
import logging
import multiprocessing
import os
import pickle
import queue
import tempfile
from collections import defaultdict
from typing import Optional, Iterable
import tqdm
from herv_finder.blast import indexer, DEFAULT_SCORE_CUTOFF_SLOPE, DEFAULT_SCORE_CUTOFF_INTERSECT, \
DEFAULT_E... | 48.244828 | 126 | 0.605318 |
796555b842ee8931a610a7478d04dcb230330ccc | 1,294 | py | Python | tests/e2e/executors/r.py | mrshu/m2cgen | d28cb0063ab047751bd72eb7788b109a629f9068 | [
"MIT"
] | 2 | 2020-01-16T23:58:39.000Z | 2020-04-11T21:17:41.000Z | tests/e2e/executors/r.py | eafpres/m2cgen | 03abb92b312612af122187c36bff8987417ba069 | [
"MIT"
] | null | null | null | tests/e2e/executors/r.py | eafpres/m2cgen | 03abb92b312612af122187c36bff8987417ba069 | [
"MIT"
] | null | null | null | import os
import string
from m2cgen import assemblers, interpreters
from tests import utils
from tests.e2e.executors import base
EXECUTOR_CODE_TPL = """
args = commandArgs(trailingOnly = TRUE)
input_array <- as.double(args)
${model_code}
res <- score(input_array)
cat(res, sep = " ")
"""
class RExecutor(base.BaseE... | 26.408163 | 70 | 0.623648 |
796555f87a399c0873366c15f45adae66ffda52d | 5,909 | py | Python | traffic_control/views/barrier.py | City-of-Helsinki/city-infrastructure-platform | c14513a9e54405412085f1047f91ec58b263eac0 | [
"CC0-1.0"
] | 2 | 2020-11-23T22:08:58.000Z | 2022-03-02T13:13:20.000Z | traffic_control/views/barrier.py | City-of-Helsinki/city-infrastructure-platform | c14513a9e54405412085f1047f91ec58b263eac0 | [
"CC0-1.0"
] | 170 | 2019-12-31T13:37:04.000Z | 2022-03-12T14:03:35.000Z | traffic_control/views/barrier.py | City-of-Helsinki/city-infrastructure-platform | c14513a9e54405412085f1047f91ec58b263eac0 | [
"CC0-1.0"
] | 3 | 2020-05-08T05:58:02.000Z | 2022-03-15T16:07:25.000Z | from django.utils.decorators import method_decorator
from drf_yasg.utils import swagger_auto_schema
from rest_framework.decorators import action
from rest_framework.parsers import MultiPartParser
from ..filters import BarrierPlanFilterSet, BarrierRealFilterSet
from ..models import BarrierPlan, BarrierPlanFile, Barrier... | 30.937173 | 88 | 0.693857 |
796556263e7c2d8f681ce2a692257b117fb5c42b | 2,015 | py | Python | benchmark/startPyquil3229.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil3229.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil3229.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=49
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += CNOT(0,3) # number=10
... | 25.506329 | 64 | 0.556824 |
7965565f5cf79fef34d69a3252b500c1df1d6402 | 29,788 | py | Python | Contents/Libraries/Shared/bs4/dammit.py | jippo015/Sub-Zero.bundle | 734e0f7128c05c0f639e11e7dfc77daa1014064b | [
"MIT"
] | 1,553 | 2015-11-09T02:17:06.000Z | 2022-03-31T20:24:52.000Z | Contents/Libraries/Shared/bs4/dammit.py | saiterlz/Sub-Zero.bundle | 1a0bb9c3e4be84be35d46672907783363fe5a87b | [
"MIT"
] | 691 | 2015-11-05T21:32:26.000Z | 2022-03-17T10:52:45.000Z | Contents/Libraries/Shared/bs4/dammit.py | saiterlz/Sub-Zero.bundle | 1a0bb9c3e4be84be35d46672907783363fe5a87b | [
"MIT"
] | 162 | 2015-11-06T19:38:55.000Z | 2022-03-16T02:42:41.000Z | # -*- coding: utf-8 -*-
"""Beautiful Soup bonus library: Unicode, Dammit
This library converts a bytestream to Unicode through any means
necessary. It is heavily based on code from Mark Pilgrim's Universal
Feed Parser. It works best on XML and HTML, but it does not rewrite the
XML or HTML to reflect a new encoding; th... | 35.335706 | 91 | 0.507083 |
796556bb96908be48fb4eca654c054b821da575f | 8,954 | py | Python | x2paddle/optimizer/fusion/static/tf_batchnorm_fuser.py | arogowie-intel/X2Paddle | 42dc4e92d0f190f61d0382589ec520106d974af8 | [
"Apache-2.0"
] | null | null | null | x2paddle/optimizer/fusion/static/tf_batchnorm_fuser.py | arogowie-intel/X2Paddle | 42dc4e92d0f190f61d0382589ec520106d974af8 | [
"Apache-2.0"
] | null | null | null | x2paddle/optimizer/fusion/static/tf_batchnorm_fuser.py | arogowie-intel/X2Paddle | 42dc4e92d0f190f61d0382589ec520106d974af8 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 appl... | 39.27193 | 82 | 0.551485 |
796556c614f1c5d88093802d470579fccd383e60 | 2,751 | py | Python | qiskit_aqua_interfaces/chemistry/user_interface/_chemsectionpropertiesview.py | mmcelaney/qiskit-aqua-interfaces | d062c77822f88594b73de3b0c83b9cb9374d1799 | [
"Apache-2.0"
] | 14 | 2019-05-06T13:51:06.000Z | 2022-02-28T05:48:16.000Z | qiskit_aqua_interfaces/chemistry/user_interface/_chemsectionpropertiesview.py | mmcelaney/qiskit-aqua-interfaces | d062c77822f88594b73de3b0c83b9cb9374d1799 | [
"Apache-2.0"
] | 2 | 2019-10-12T02:55:27.000Z | 2019-10-13T00:14:07.000Z | qiskit_aqua_interfaces/chemistry/user_interface/_chemsectionpropertiesview.py | mmcelaney/qiskit-aqua-interfaces | d062c77822f88594b73de3b0c83b9cb9374d1799 | [
"Apache-2.0"
] | 17 | 2019-06-04T08:53:44.000Z | 2022-01-02T22:22:38.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 42.323077 | 98 | 0.578699 |
796558d8e3010732fc3dd00150e4d32bd30e5fa7 | 5,435 | py | Python | ub/modules/fedstuff.py | parv779/javes-3.0 | d510717b2756a65b39ff18d9f53d4adc46d8e23f | [
"MIT"
] | 15 | 2020-12-13T17:37:05.000Z | 2021-06-23T00:00:49.000Z | ub/modules/fedstuff.py | parv779/javes-3.0 | d510717b2756a65b39ff18d9f53d4adc46d8e23f | [
"MIT"
] | 2 | 2021-01-11T16:39:31.000Z | 2021-01-25T22:35:28.000Z | ub/modules/fedstuff.py | parv779/javes-3.0 | d510717b2756a65b39ff18d9f53d4adc46d8e23f | [
"MIT"
] | 78 | 2020-12-13T17:52:51.000Z | 2022-03-24T03:43:09.000Z | import asyncio
# made by telebot
from telethon.errors.rpcerrorlist import YouBlockedUserError
from ub import CMD_HELP
from ub import bot
from ub import bot as borg
from ub.utils import admin_cmd
bot = "@MissRose_bot"
@borg.on(admin_cmd("fedstats ?(.*)"))
async def _(event):
if event.fwd_from:
return
... | 36.972789 | 126 | 0.562466 |
79655b44c693366679bb879c9aead5ab775eec77 | 2,551 | py | Python | excel.py | smithhmark/wahap-csv-to-sql | 7194fe14bcad0865e6746fe253461a3af338b188 | [
"MIT"
] | null | null | null | excel.py | smithhmark/wahap-csv-to-sql | 7194fe14bcad0865e6746fe253461a3af338b188 | [
"MIT"
] | null | null | null | excel.py | smithhmark/wahap-csv-to-sql | 7194fe14bcad0865e6746fe253461a3af338b188 | [
"MIT"
] | null | null | null | """
This module handles the work of interacting with MSExcel files.
"""
import openpyxl
def get_active_sheet(ipath, lang='EN'):
"""
opens the English language sheet
"""
workbook = openpyxl.load_workbook(filename=ipath)
return workbook[lang]
def get_link_target(sheet, cell):
"""Given a cell add... | 28.344444 | 75 | 0.638181 |
79655bf13e679a0fc8f3455cce655009c2e1eb88 | 344 | py | Python | hardhat/recipes/python/patsy.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/patsy.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/patsy.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | from .base import PipBaseRecipe
class PatsyRecipe(PipBaseRecipe):
def __init__(self, *args, **kwargs):
super(PatsyRecipe, self).__init__(*args, **kwargs)
self.sha256 = 'dc1cc280045b0e6e50c04706fd1e26d2' \
'a00ea400aa112f88e8142f88b0b7d3d4'
self.name = 'patsy'
... | 28.666667 | 58 | 0.639535 |
79655c70d3aea37695e65ca088e58e109bcad428 | 10,127 | py | Python | codecfactory/listcodec.py | shersonb/codecfactory | e869ef09b2942b9324e4f680ed65149a7aa4fc30 | [
"MIT"
] | null | null | null | codecfactory/listcodec.py | shersonb/codecfactory | e869ef09b2942b9324e4f680ed65149a7aa4fc30 | [
"MIT"
] | null | null | null | codecfactory/listcodec.py | shersonb/codecfactory | e869ef09b2942b9324e4f680ed65149a7aa4fc30 | [
"MIT"
] | null | null | null | from codecfactory.basecodec import (BaseCodec, ReadBuffer, skip_whitespace,
NOHOOK, SINGLE, ARGS, KWARGS)
from codecfactory.exc import (DecodeError, NoMatch, UnexpectedEndOfData, ExcessData,
EncodeError, EncodeMatchError)
import inspect
import types
from collections ... | 47.995261 | 139 | 0.601856 |
79655d2c55c7b44b353c149d3e252bd584369723 | 3,627 | py | Python | wandb/sdk/internal/update.py | BearerPipelineTest/client-2 | 2fc881cd72f79a44258f61f1c75c452ee1ff463f | [
"MIT"
] | null | null | null | wandb/sdk/internal/update.py | BearerPipelineTest/client-2 | 2fc881cd72f79a44258f61f1c75c452ee1ff463f | [
"MIT"
] | null | null | null | wandb/sdk/internal/update.py | BearerPipelineTest/client-2 | 2fc881cd72f79a44258f61f1c75c452ee1ff463f | [
"MIT"
] | null | null | null | from pkg_resources import parse_version
import requests
import wandb
def _find_available(current_version):
pypi_url = "https://pypi.org/pypi/%s/json" % wandb._wandb_module
yanked_dict = {}
try:
async_requests_get = wandb.util.async_call(requests.get, timeout=5)
data, thread = async_reques... | 33.897196 | 84 | 0.639096 |
79655e26ed985e72bf9e7652eb5a6523f7a12be7 | 6,056 | py | Python | L1Trigger/TrackTrigger/test/SLHC_PGUN_TkOnly.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | L1Trigger/TrackTrigger/test/SLHC_PGUN_TkOnly.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | L1Trigger/TrackTrigger/test/SLHC_PGUN_TkOnly.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | #########################
#
# Configuration file for simple PGUN events
# production in Tracker-Only geometry
#
# Author: S.Viret (viret@in2p3.fr)
# Date : 16/02/2017
#
# Script tested with release CMSSW_10_0_0_pre1
#
#########################
#
# Here you choose if you want flat (True) or tilted (False) geometry
#
f... | 40.10596 | 244 | 0.744386 |
79655e5e88cd4cd610ef5eda3396da461bb9e070 | 2,199 | py | Python | bioprocs/scripts/seq/pConsv.py | LeaveYeah/bioprocs | c5d2ddcc837f5baee00faf100e7e9bd84222cfbf | [
"MIT"
] | null | null | null | bioprocs/scripts/seq/pConsv.py | LeaveYeah/bioprocs | c5d2ddcc837f5baee00faf100e7e9bd84222cfbf | [
"MIT"
] | 2 | 2019-02-15T22:59:49.000Z | 2019-02-15T23:03:09.000Z | bioprocs/scripts/seq/pConsv.py | LeaveYeah/bioprocs | c5d2ddcc837f5baee00faf100e7e9bd84222cfbf | [
"MIT"
] | null | null | null | from os import path, makedirs
from glob import glob
{{runcmd}}
# split input bed file
beddir = path.join({{job.outdir | quote}}, 'chrom-regions')
if not path.isdir(beddir): makedirs(beddir)
bedfile = path.join({{job.outdir | quote}}, "{{i.bedfile | bn}}.sorted")
cmd = 'grep -v "^#" {{i.bedfile | quote}} | cut -f1,2,... | 27.4875 | 116 | 0.612551 |
79655ed8486d8e6f074a42182e948ed77d41c7f0 | 1,152 | py | Python | app/main.py | ascentcore/ml-blocks | 6c4d8eac9c95d518872861cfc9ea79b9e8f773a2 | [
"MIT"
] | null | null | null | app/main.py | ascentcore/ml-blocks | 6c4d8eac9c95d518872861cfc9ea79b9e8f773a2 | [
"MIT"
] | 11 | 2022-02-08T09:48:21.000Z | 2022-03-08T15:41:55.000Z | app/main.py | ascentcore/ml-blocks | 6c4d8eac9c95d518872861cfc9ea79b9e8f773a2 | [
"MIT"
] | null | null | null | import logging
import sqlite3 as sql
from fastapi import FastAPI, Depends
from fastapi.staticfiles import StaticFiles
from starlette.middleware.cors import CORSMiddleware
from app.flow import statics_folder
from app.deps import get_registry
from .api.v1 import api_router
from .config import settings
logging.config... | 22.588235 | 73 | 0.731771 |
79655ee872a268d7ef4550b9a161ea7a54cdd835 | 1,561 | py | Python | dbops_venv/lib/python3.5/site-packages/selenium/webdriver/android/webdriver.py | fractal520/dbops | 20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac | [
"MIT"
] | 15 | 2016-02-24T06:32:57.000Z | 2020-06-17T05:06:36.000Z | dbops_venv/lib/python3.5/site-packages/selenium/webdriver/android/webdriver.py | fractal520/dbops | 20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac | [
"MIT"
] | 5 | 2020-03-24T15:33:06.000Z | 2021-02-02T21:42:36.000Z | dbops_venv/lib/python3.5/site-packages/selenium/webdriver/android/webdriver.py | fractal520/dbops | 20c6b6b5669e09b43cd19e6f3fa0448bc7d5eaac | [
"MIT"
] | 14 | 2015-04-29T15:01:54.000Z | 2022-03-18T14:48:29.000Z | #!/usr/bin/python
#
# Copyright 2014 Software freedom conservancy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.166667 | 102 | 0.732223 |
79655ff51e19eefd834f1d962b42e87b69a8b1b2 | 1,667 | py | Python | initfiles/sbin/hpcc/cluster/thread.py | miguelvazq/HPCC-Platform | 22ad8e5fcb59626abfd8febecbdfccb1e9fb0aa5 | [
"Apache-2.0"
] | 1 | 2021-01-23T18:54:19.000Z | 2021-01-23T18:54:19.000Z | initfiles/sbin/hpcc/cluster/thread.py | miguelvazq/HPCC-Platform | 22ad8e5fcb59626abfd8febecbdfccb1e9fb0aa5 | [
"Apache-2.0"
] | 1 | 2018-03-01T18:15:12.000Z | 2018-03-01T18:15:12.000Z | initfiles/sbin/hpcc/cluster/thread.py | cloLN/HPCC-Platform | 42ffb763a1cdcf611d3900831973d0a68e722bbe | [
"Apache-2.0"
] | 3 | 2021-05-02T17:01:57.000Z | 2021-05-02T17:02:28.000Z | '''
/*#############################################################################
HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems(R).
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 Li... | 31.45283 | 98 | 0.570486 |
79656040df20e693a9608d7d8f7d4d562936e0c0 | 4,826 | py | Python | commands/room.py | pariahsoft/Dennis | b3e0f0804ee5fa3afe2ff5c3218179d25bb3e12c | [
"MIT"
] | 1 | 2017-01-11T10:23:03.000Z | 2017-01-11T10:23:03.000Z | commands/room.py | pariahsoft/Dennis | b3e0f0804ee5fa3afe2ff5c3218179d25bb3e12c | [
"MIT"
] | null | null | null | commands/room.py | pariahsoft/Dennis | b3e0f0804ee5fa3afe2ff5c3218179d25bb3e12c | [
"MIT"
] | null | null | null | ########################################
## Adventure Bot "Dennis" ##
## commands/room.py ##
## Copyright 2012-2013 PariahSoft LLC ##
########################################
## **********
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software... | 41.603448 | 125 | 0.623912 |
796560dbb3be18c5386c9d8f068d7d07c03e1506 | 34,845 | py | Python | guess_letter.py | OzRayan/Guess_Letter_-tk- | 7114dfce445fd5e5f2ff42c6b1f8eb4358848091 | [
"BSD-3-Clause"
] | null | null | null | guess_letter.py | OzRayan/Guess_Letter_-tk- | 7114dfce445fd5e5f2ff42c6b1f8eb4358848091 | [
"BSD-3-Clause"
] | 5 | 2018-06-19T08:01:28.000Z | 2022-03-11T23:30:19.000Z | guess_letter.py | OzRayan/Guess_Letter_-tk- | 7114dfce445fd5e5f2ff42c6b1f8eb4358848091 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import setup as st
import record as rc
from time import strftime, sleep
from tkinter import (Tk, Label, Button, Frame, StringVar, IntVar,
DISABLED, NORMAL, SUNKEN, SOLID,
RIGHT, LEFT, TOP, BOTTOM, BOTH, CENTER)
class Hangman:
"""Hangman class,
... | 38.249177 | 80 | 0.533821 |
7965614f416be613dca482b3c99b8f972bad90e8 | 862 | py | Python | isi_sdk_8_0_1/test/test_sync_report.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0_1/test/test_sync_report.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0_1/test/test_sync_report.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_0_1
from i... | 21.02439 | 79 | 0.691415 |
7965622917b382f30faca6912d89af89c4ce7219 | 406 | py | Python | backend/apps/accounts/migrations/0005_auto_20200211_1344.py | MgArreaza13/wonderhumans | 865b65e4afa1ac32976a8c53959a7c58543dbe60 | [
"MIT"
] | null | null | null | backend/apps/accounts/migrations/0005_auto_20200211_1344.py | MgArreaza13/wonderhumans | 865b65e4afa1ac32976a8c53959a7c58543dbe60 | [
"MIT"
] | null | null | null | backend/apps/accounts/migrations/0005_auto_20200211_1344.py | MgArreaza13/wonderhumans | 865b65e4afa1ac32976a8c53959a7c58543dbe60 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.1 on 2020-02-11 17:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0004_auto_20200206_1404'),
]
operations = [
migrations.AlterField(
model_name='homelessprofile',
name='a... | 21.368421 | 58 | 0.610837 |
7965624384da7a4e86dc2d3a969b081562f1f36a | 3,192 | py | Python | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeCommandsRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2021-03-08T02:59:17.000Z | 2021-03-08T02:59:17.000Z | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeCommandsRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeCommandsRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.571429 | 75 | 0.763784 |
79656281426296224e425b8761141e72f5bd6b16 | 3,705 | py | Python | generate_stubs.py | malja/zroya | 41830133a54528e9cd9ef43d9637a576ac849c11 | [
"MIT"
] | 164 | 2018-02-17T03:28:33.000Z | 2022-02-08T17:26:59.000Z | generate_stubs.py | malja/zroya | 41830133a54528e9cd9ef43d9637a576ac849c11 | [
"MIT"
] | 13 | 2018-02-17T08:38:50.000Z | 2020-09-17T19:46:32.000Z | generate_stubs.py | malja/zroya | 41830133a54528e9cd9ef43d9637a576ac849c11 | [
"MIT"
] | 14 | 2018-02-17T11:34:59.000Z | 2022-02-24T09:36:45.000Z | import inspect
import sys
# This script generates zroya stub file from documentation zroya C/C++ code.
# Stub file is a hint for IDE. It contains a list of all functions and methods in zroya with docstrings.
# TODO: Find better way for output formatting than this
def GenerateStubFile(path_to_pyd, path_to_python_fil... | 42.586207 | 141 | 0.503374 |
796562ffae594a0a0d6cbc0c21d7b43fb7b9bdda | 18,340 | py | Python | orig/scripts/eval_mlode_sync.py | IBM/oct-glaucoma-forecast | 760a6013ed6cfd8ba6954c708bb224541c002f7c | [
"Apache-2.0"
] | null | null | null | orig/scripts/eval_mlode_sync.py | IBM/oct-glaucoma-forecast | 760a6013ed6cfd8ba6954c708bb224541c002f7c | [
"Apache-2.0"
] | null | null | null | orig/scripts/eval_mlode_sync.py | IBM/oct-glaucoma-forecast | 760a6013ed6cfd8ba6954c708bb224541c002f7c | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from losses import mae_loss, mae_globalmean
from utils.oct_utils import get_mask_rnfl
from utils.utils import select_modalities, subsample
GPU = 0
device = torch.device('cuda:' + str(GPU) if torch.cuda.is_available() else 'cpu')
one_ = torch.tensor(1.0).to(device)
zero_ = torch.tensor... | 44.192771 | 136 | 0.614776 |
7965630863fe0e24b73d393372df5d423e1576e7 | 22,445 | py | Python | plugin/ppapi/ppapi/generators/idl_c_proto.py | Acidburn0zzz/NfWebCrypto | 0186e3ebde1779419053384983612d7d494e6bcc | [
"Apache-2.0"
] | 1 | 2018-03-10T13:08:49.000Z | 2018-03-10T13:08:49.000Z | plugin/ppapi/ppapi/generators/idl_c_proto.py | Acidburn0zzz/NfWebCrypto | 0186e3ebde1779419053384983612d7d494e6bcc | [
"Apache-2.0"
] | null | null | null | plugin/ppapi/ppapi/generators/idl_c_proto.py | Acidburn0zzz/NfWebCrypto | 0186e3ebde1779419053384983612d7d494e6bcc | [
"Apache-2.0"
] | 1 | 2020-11-04T07:25:45.000Z | 2020-11-04T07:25:45.000Z | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Generator for C style prototypes and definitions """
import glob
import os
import sys
from idl_log import ErrOut, InfoOut, Wa... | 30.372124 | 79 | 0.593183 |
7965630ec506a2de0b7ade0f26484a45db28d9e5 | 3,430 | py | Python | util/classifier.py | michael-kitchin/CarND-Vehicle-Detection | ad7167b8e6b1cfa993941ee39d3eb529ded2c394 | [
"MIT"
] | null | null | null | util/classifier.py | michael-kitchin/CarND-Vehicle-Detection | ad7167b8e6b1cfa993941ee39d3eb529ded2c394 | [
"MIT"
] | null | null | null | util/classifier.py | michael-kitchin/CarND-Vehicle-Detection | ad7167b8e6b1cfa993941ee39d3eb529ded2c394 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from skimage.feature import hog
from util import image
def get_hog_features(input_image,
orientation,
px_per_cell,
cell_per_blk,
visualize=False,
feature_vector=True):
"""
Au... | 34.3 | 93 | 0.557143 |
796564e640bc509c4a2f5ea36205e7a8be0b6fea | 334 | py | Python | 120/validate.py | alehpineda/bitesofpy | bfd319a606cd0b7b9bfb85a3e8942872a2d43c48 | [
"MIT"
] | null | null | null | 120/validate.py | alehpineda/bitesofpy | bfd319a606cd0b7b9bfb85a3e8942872a2d43c48 | [
"MIT"
] | 2 | 2020-09-24T11:25:29.000Z | 2021-06-25T15:43:35.000Z | 120/validate.py | alehpineda/bitesofpy | bfd319a606cd0b7b9bfb85a3e8942872a2d43c48 | [
"MIT"
] | null | null | null | from functools import wraps
def int_args(func):
@wraps(func)
# complete this decorator
def wrapper(*args):
if not all(isinstance(x, int) for x in args):
raise TypeError
if any(x < 0 for x in args):
raise ValueError
else:
return func(*args)
r... | 20.875 | 53 | 0.57485 |
796564e88c7c8236c4db32fbe72242d89ff39d0f | 12,363 | py | Python | examples/tensorflow/segmentation/evaluation.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 310 | 2020-10-29T09:22:42.000Z | 2022-03-31T04:53:34.000Z | examples/tensorflow/segmentation/evaluation.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 615 | 2020-10-28T10:22:25.000Z | 2022-03-29T18:09:23.000Z | examples/tensorflow/segmentation/evaluation.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 86 | 2020-10-28T11:34:34.000Z | 2022-03-31T08:00:35.000Z | """
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | 40.667763 | 115 | 0.672733 |
7965659315b8a236013598c04790f059bca31c90 | 10,747 | py | Python | maraboupy/DnCParallelSolver.py | muizzk/Marabou | b938c474bbf7820854822ca407b64b53dfcf6c7c | [
"BSD-3-Clause"
] | null | null | null | maraboupy/DnCParallelSolver.py | muizzk/Marabou | b938c474bbf7820854822ca407b64b53dfcf6c7c | [
"BSD-3-Clause"
] | null | null | null | maraboupy/DnCParallelSolver.py | muizzk/Marabou | b938c474bbf7820854822ca407b64b53dfcf6c7c | [
"BSD-3-Clause"
] | null | null | null | '''
/* ******************* */
/*! \file DnCParallelSolver.py
** \verbatim
** Top contributors (to current version):
** Haoze Wu
** This file is part of the Marabou project.
** Copyright (c) 2017-2019 by the authors listed in the file AUTHORS
** in the top-l... | 37.445993 | 97 | 0.53922 |
796565fc4908067fdceb20ddf23e99832bd757f2 | 18,304 | py | Python | venv/lib/python3.6/site-packages/celery/events/cursesmon.py | mattkantor/basic-flask-app | ec893ca44b1c9c4772c24b81394b58644fefd29a | [
"MIT"
] | 1 | 2015-08-04T19:41:53.000Z | 2015-08-04T19:41:53.000Z | microblog/flask/venv/lib/python2.7/site-packages/celery/events/cursesmon.py | johankaito/fufuka | 32a96ecf98ce305c2206c38443e58fdec88c788d | [
"Apache-2.0"
] | 4 | 2020-02-12T02:53:08.000Z | 2021-06-10T21:37:06.000Z | microblog/flask/venv/lib/python2.7/site-packages/celery/events/cursesmon.py | johankaito/fufuka | 32a96ecf98ce305c2206c38443e58fdec88c788d | [
"Apache-2.0"
] | 1 | 2020-11-01T20:40:01.000Z | 2020-11-01T20:40:01.000Z | # -*- coding: utf-8 -*-
"""
celery.events.cursesmon
~~~~~~~~~~~~~~~~~~~~~~~
Graphical monitor of Celery events using curses.
"""
from __future__ import absolute_import, print_function
import curses
import sys
import threading
from datetime import datetime
from itertools import count
from textwrap import... | 33.585321 | 78 | 0.516062 |
796565fe7b5d2c32401a8e047297a9207cade632 | 6,321 | py | Python | starthinker/task/dv_editor/patch.py | danieldjewell/starthinker | 3327d5874f01d7563603b8a82c1ecd6615b9768d | [
"Apache-2.0"
] | 1 | 2020-12-04T17:13:35.000Z | 2020-12-04T17:13:35.000Z | starthinker/task/dv_editor/patch.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | starthinker/task/dv_editor/patch.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/l... | 25.487903 | 85 | 0.523335 |
796566b17b4e3bf792e73a60fc2cba5a00946d80 | 9,505 | py | Python | rasa/core/channels/telegram.py | learnerzhang/rasa | 39300da9a5de7a3c7fd285519f9577466bfda8d5 | [
"Apache-2.0"
] | 1 | 2021-12-07T17:44:01.000Z | 2021-12-07T17:44:01.000Z | rasa/core/channels/telegram.py | learnerzhang/rasa | 39300da9a5de7a3c7fd285519f9577466bfda8d5 | [
"Apache-2.0"
] | 6 | 2020-01-28T23:04:20.000Z | 2022-02-10T00:43:04.000Z | rasa/core/channels/telegram.py | learnerzhang/rasa | 39300da9a5de7a3c7fd285519f9577466bfda8d5 | [
"Apache-2.0"
] | 1 | 2020-05-30T14:34:32.000Z | 2020-05-30T14:34:32.000Z | import logging
from copy import deepcopy
from sanic import Blueprint, response
from sanic.request import Request
from sanic.response import HTTPResponse
from telegram import (
Bot,
InlineKeyboardButton,
Update,
InlineKeyboardMarkup,
KeyboardButton,
ReplyKeyboardMarkup,
)
from typing import Dict,... | 34.81685 | 86 | 0.523514 |
7965671493636dc08364bb3c49b43c4b7ab17f52 | 1,165 | py | Python | scripts/us_epa/ejscreen/ejscreen_test.py | thejeshgn/data | 945af2e1269b914ff1e3169880169161f4137a58 | [
"Apache-2.0"
] | 25 | 2020-07-18T04:44:57.000Z | 2022-03-03T14:44:20.000Z | scripts/us_epa/ejscreen/ejscreen_test.py | thejeshgn/data | 945af2e1269b914ff1e3169880169161f4137a58 | [
"Apache-2.0"
] | 276 | 2020-05-09T00:57:50.000Z | 2022-03-29T23:27:38.000Z | scripts/us_epa/ejscreen/ejscreen_test.py | thejeshgn/data | 945af2e1269b914ff1e3169880169161f4137a58 | [
"Apache-2.0"
] | 59 | 2020-05-09T00:45:30.000Z | 2022-03-28T16:03:53.000Z | '''
Unit tests for ejscreen.py
Usage: python3 -m unittest discover -v -s ../ -p "ejscreen_test.py"
'''
import unittest
import os
import tempfile
import pandas as pd
from .ejscreen import write_csv
module_dir_ = os.path.dirname(__file__)
class TestEjscreen(unittest.TestCase):
def test_write_csv(self):
w... | 31.486486 | 78 | 0.561373 |
7965671ba04c0bd2cab75986c3ca03481987261e | 23,237 | py | Python | Functions/ASAXS/Cylinder_Uniform.py | nayanbera/SAXS_Drive | 1c5a83c6575fa888bfbcc3c34cedb38321bd5f92 | [
"MIT"
] | null | null | null | Functions/ASAXS/Cylinder_Uniform.py | nayanbera/SAXS_Drive | 1c5a83c6575fa888bfbcc3c34cedb38321bd5f92 | [
"MIT"
] | 2 | 2019-07-31T23:14:14.000Z | 2020-12-26T16:27:02.000Z | Functions/ASAXS/Cylinder_Uniform.py | nayanbera/SAXS_Drive | 1c5a83c6575fa888bfbcc3c34cedb38321bd5f92 | [
"MIT"
] | 2 | 2019-07-31T22:22:06.000Z | 2020-07-14T04:58:16.000Z | ####Please do not remove lines below####
from lmfit import Parameters
import numpy as np
import sys
import os
sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('./Functions'))
sys.path.append(os.path.abspath('./Fortran_routines'))
from functools import lru_cache
####Please do not remove lines above#... | 55.194774 | 225 | 0.532857 |
796567e9b7f3168045f997bb038ad93a34871ebd | 26 | py | Python | settings.py | abajaj945/Ship-Detection-using-Tensorflow | 5bf6a427df15e656f902c7cb0f04cc94f55c6117 | [
"Apache-2.0"
] | 3 | 2018-11-13T14:38:54.000Z | 2021-04-16T09:33:23.000Z | settings.py | abajaj945/Ship-Detection-using-Tensorflow | 5bf6a427df15e656f902c7cb0f04cc94f55c6117 | [
"Apache-2.0"
] | null | null | null | settings.py | abajaj945/Ship-Detection-using-Tensorflow | 5bf6a427df15e656f902c7cb0f04cc94f55c6117 | [
"Apache-2.0"
] | 1 | 2020-02-20T07:40:29.000Z | 2020-02-20T07:40:29.000Z | max_rois=50
tile_size=1.0
| 8.666667 | 13 | 0.807692 |
79656842972cfb5c6c0f9998281e6235fe4313f8 | 12,526 | py | Python | reflective_rectangle.py | fjanoos/python | d75d6159cbf3c91b1ca3507ee4bc45afc1ab85dc | [
"Unlicense"
] | 1 | 2020-02-12T02:34:35.000Z | 2020-02-12T02:34:35.000Z | reflective_rectangle.py | fjanoos/python | d75d6159cbf3c91b1ca3507ee4bc45afc1ab85dc | [
"Unlicense"
] | null | null | null | reflective_rectangle.py | fjanoos/python | d75d6159cbf3c91b1ca3507ee4bc45afc1ab85dc | [
"Unlicense"
] | null | null | null | # Problem Statement for ReflectiveRectangle: http://community.topcoder.com/stat?c=problem_statement&pm=13217
#
# Raymond has a rectangle with dimensions sideA times sideB. The sides of the rectangle are perfect mirrors.
# There is a directional light source in one corner of the rectangle.
# Raymond can point the li... | 34.506887 | 121 | 0.624541 |
796568794fadf8ec892f730c6c588578e709039a | 8,794 | py | Python | core/controllers/topics_and_skills_dashboard_test.py | jessicayu626/oppia | 8f3d11c1ff84f01a02ec0871382bac3895009ad0 | [
"Apache-2.0"
] | null | null | null | core/controllers/topics_and_skills_dashboard_test.py | jessicayu626/oppia | 8f3d11c1ff84f01a02ec0871382bac3895009ad0 | [
"Apache-2.0"
] | null | null | null | core/controllers/topics_and_skills_dashboard_test.py | jessicayu626/oppia | 8f3d11c1ff84f01a02ec0871382bac3895009ad0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Oppia 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 applicable ... | 43.320197 | 80 | 0.62952 |
796569f69dd6d07c94e531cef33ea57bf997d2a9 | 340 | py | Python | arcade_solutions/intro/avoid_obstacles.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/intro/avoid_obstacles.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/intro/avoid_obstacles.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | def avoid_obstactles(a):
a = sorted(a)
jump = 1
hit = True
while hit:
hit = False
jump +=1
for i in range(0, len(a)):
if a[i] % jump == 0:
hit = True
break
return jump
if __name__ == '__main__':
a = [5, 3, 6, 7, 9]
print(a... | 18.888889 | 34 | 0.452941 |
79656a1f88332235cdd0e893e22899659b57072e | 3,200 | py | Python | microbit_i2c_lcd.py | rhubarbdog/microbit-LCD-driver | d1a7f5cf3c4cfe825da873ae1a25b5765fe8ca3e | [
"MIT"
] | 2 | 2020-11-23T20:27:03.000Z | 2021-11-04T12:08:10.000Z | microbit_i2c_lcd.py | rhubarbdog/microbit-LCD-driver | d1a7f5cf3c4cfe825da873ae1a25b5765fe8ca3e | [
"MIT"
] | 1 | 2021-12-14T10:47:00.000Z | 2021-12-14T12:02:08.000Z | microbit_i2c_lcd.py | rhubarbdog/microbit-LCD-driver | d1a7f5cf3c4cfe825da873ae1a25b5765fe8ca3e | [
"MIT"
] | null | null | null | # This code began life as an Arduino driver in the public domain
# It was initially converted by a now unknown man from Amazon
# Credit for this code goes to "natbett" of the Raspberry Pi Forum 18/02/13
# https://www.raspberrypi.org/forums/viewtopic.php?t=34261&p=378524
# Before running this code make sure to run i2c ... | 29.357798 | 79 | 0.715313 |
79656a2e6b6020687dbaab7e9d4ecdcda3cbdd34 | 1,415 | py | Python | longest_common_prefix.py | KevinLuo41/LeetCodeInPython | 051e1aab9bab17b0d63b4ca73473a7a00899a16a | [
"Apache-2.0"
] | 19 | 2015-01-19T19:36:09.000Z | 2020-03-18T03:10:12.000Z | longest_common_prefix.py | CodingVault/LeetCodeInPython | 051e1aab9bab17b0d63b4ca73473a7a00899a16a | [
"Apache-2.0"
] | null | null | null | longest_common_prefix.py | CodingVault/LeetCodeInPython | 051e1aab9bab17b0d63b4ca73473a7a00899a16a | [
"Apache-2.0"
] | 12 | 2015-04-25T14:20:38.000Z | 2020-09-27T04:59:59.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
longest_common_prefix.py
Created by Shengwei on 2014-07-15.
"""
# https://oj.leetcode.com/problems/longest-common-prefix/
# tags: easy / medium, array, string, pointer, logest, D&C, edge cases
"""
Write a function to find the longest common prefix string amongst an array o... | 26.203704 | 86 | 0.568905 |
79656a3a2479e4d825b91760ee967dc45ede6fd6 | 58,342 | py | Python | keystone/tests/unit/test_v3.py | daespinel/keystone | dce45c96d6d6f5aee53e8ae5ee25ceaae026e6ca | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/test_v3.py | daespinel/keystone | dce45c96d6d6f5aee53e8ae5ee25ceaae026e6ca | [
"Apache-2.0"
] | 2 | 2021-03-31T19:39:56.000Z | 2021-12-13T20:32:15.000Z | keystone/tests/unit/test_v3.py | daespinel/keystone | dce45c96d6d6f5aee53e8ae5ee25ceaae026e6ca | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 38.307288 | 79 | 0.545062 |
79656a5aee68d43fab068f6be73a33b1b2e77dd6 | 5,277 | py | Python | wav/savedata/conversion.py | xi-studio/DiscreteNN | 85468da14bddfe4cbe2e07071454cdbc52ef915f | [
"MIT"
] | 1 | 2019-08-15T09:43:21.000Z | 2019-08-15T09:43:21.000Z | wav/savedata/conversion.py | xi-studio/DiscreteNN | 85468da14bddfe4cbe2e07071454cdbc52ef915f | [
"MIT"
] | null | null | null | wav/savedata/conversion.py | xi-studio/DiscreteNN | 85468da14bddfe4cbe2e07071454cdbc52ef915f | [
"MIT"
] | null | null | null | from __future__ import print_function
import argparse
import torch
import torch.utils.data
from torch import nn, optim
from torch.nn import functional as F
from torchvision import datasets, transforms
from torch.utils.data import DataLoader
from torchvision.utils import save_image
from vmodel import *
from vdataset imp... | 31.789157 | 97 | 0.54747 |
79656a7fe10a9f6b7edfb40f13d8aef6d471ca2c | 117 | py | Python | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/web_settings_dashboard/models/__init__.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/web_settings_dashboard/models/__init__.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/web_settings_dashboard/models/__init__.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import res_users
| 23.4 | 74 | 0.717949 |
79656a84065bda94f7dbfe4df9463a6a57fbb635 | 6,090 | py | Python | OldMoneyCalculator_v3.py | nicolamahon/OldIrishMoneyCalculator | 5f0d4d35c3aebf0b87134df82c075a51283763ac | [
"MIT"
] | null | null | null | OldMoneyCalculator_v3.py | nicolamahon/OldIrishMoneyCalculator | 5f0d4d35c3aebf0b87134df82c075a51283763ac | [
"MIT"
] | null | null | null | OldMoneyCalculator_v3.py | nicolamahon/OldIrishMoneyCalculator | 5f0d4d35c3aebf0b87134df82c075a51283763ac | [
"MIT"
] | null | null | null | """
Program to act as a calculator for Old Irish Money - Pounds, Shillings and Pence.
The program will add, subtract, multiply and divide values.
Author: Nicola Mahon
Created: 2018-09-06
"""
"""""""""""""""""""""""""""""""""
Imported Libraries
"""""""""""""""""""""""""""""""""
import time
import math
from os impor... | 26.710526 | 112 | 0.688342 |
79656c702e236a2fa4a35d27640e9bc298408234 | 9,835 | py | Python | evaluator/summary.py | giterator/PCCArena | 243841351e94baa9b0db126de49f2e251eacc83f | [
"MIT"
] | null | null | null | evaluator/summary.py | giterator/PCCArena | 243841351e94baa9b0db126de49f2e251eacc83f | [
"MIT"
] | null | null | null | evaluator/summary.py | giterator/PCCArena | 243841351e94baa9b0db126de49f2e251eacc83f | [
"MIT"
] | null | null | null | import re
import csv
import logging
import numpy as np
from pathlib import Path
from typing import Union
from collections import defaultdict
from scipy.io import savemat
from utils.file_io import glob_file
from utils._version import __version__
import os
import sys
logger = logging.getLogger(__name__)
... | 36.973684 | 86 | 0.448399 |
79656e7eeb2d2ae5bf5db1fee4a221d1cb871ed6 | 286 | py | Python | mediasetinfinity/support/monkey.py | typhoon51280/plugin.video.mediasetinfinity | 25311424e057fd4ad66ba97808db607b2c9c9fab | [
"MIT"
] | null | null | null | mediasetinfinity/support/monkey.py | typhoon51280/plugin.video.mediasetinfinity | 25311424e057fd4ad66ba97808db607b2c9c9fab | [
"MIT"
] | null | null | null | mediasetinfinity/support/monkey.py | typhoon51280/plugin.video.mediasetinfinity | 25311424e057fd4ad66ba97808db607b2c9c9fab | [
"MIT"
] | null | null | null |
from __future__ import absolute_import
from mediasetinfinity.support.routing import CallbackRef
def PatchCallbackRef(cls):
def __json__(self):
return self.path
cls.__json__ = __json__
def patch(cls):
if type(cls)==type(CallbackRef):
PatchCallbackRef(cls) | 22 | 56 | 0.734266 |
79656ebaf1ac037db0a5e28ba31e124523a6285b | 1,232 | py | Python | backend/fabfile.py | bertocarl/Bus-Monitoring-Ticketing-System | b5ead6085e5c698b8826704cd551306dc8f5249e | [
"MIT"
] | null | null | null | backend/fabfile.py | bertocarl/Bus-Monitoring-Ticketing-System | b5ead6085e5c698b8826704cd551306dc8f5249e | [
"MIT"
] | 13 | 2019-12-28T15:27:38.000Z | 2022-02-12T11:55:19.000Z | backend/fabfile.py | bertocarl/Bus-Monitoring-Ticketing-System | b5ead6085e5c698b8826704cd551306dc8f5249e | [
"MIT"
] | null | null | null | from fabric.api import run, cd, env, local
CONF = {
'backend': {
'hosts': ['edgica@142.93.235.78'],
'project': 'wishlist',
'root': '/home/edgica/edgica/backend',
'uwsgi_conf': '/etc/uwsgi/available/backend.ini',
}
}
def pull():
with cd('%(root)s/' % env):
run('git ... | 17.111111 | 97 | 0.603084 |
79656f3c5f51749329b28c5f22d40560d6486d6b | 980 | py | Python | src/sima/hydro/blueprints/coupledaddedmasszerofrequency.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/hydro/blueprints/coupledaddedmasszerofrequency.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/hydro/blueprints/coupledaddedmasszerofrequency.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | #
# Generated with CoupledAddedMassZeroFrequencyBlueprint
from dmt.blueprint import Blueprint
from dmt.dimension import Dimension
from dmt.attribute import Attribute
from dmt.enum_attribute import EnumAttribute
from dmt.blueprint_attribute import BlueprintAttribute
from .matrix6 import Matrix6Blueprint
class CoupledA... | 51.578947 | 121 | 0.754082 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.