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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7969d6bf2354f959ca149244cd301629c6bf2b85 | 1,826 | py | Python | smop/solver.py | danielfsribeiro/smop | 6ca18e23963a13daafb2d35dd857af0acffddebb | [
"MIT"
] | null | null | null | smop/solver.py | danielfsribeiro/smop | 6ca18e23963a13daafb2d35dd857af0acffddebb | [
"MIT"
] | null | null | null | smop/solver.py | danielfsribeiro/smop | 6ca18e23963a13daafb2d35dd857af0acffddebb | [
"MIT"
] | null | null | null | # Generated with SMOP 0.41-beta
from libsmop import *
#
@function
def solver(ai=None,af=None,w=None,*args,**kwargs):
varargin = solver.varargin
nargin = solver.nargin
rand(1,2,3)
# Copyright 2004 The MathWorks, Inc.
nBlocks=max(ravel(ai))
# smop/solver.m:6
m,n=size(ai,nargout=... | 22.825 | 56 | 0.514786 |
7969d71098781a44933d29e76c045eecce486fc4 | 2,334 | py | Python | Code/tweet_gen_app/app.py | UPstartDeveloper/CS-1.2-Intro-Data-Structures | d36ee5ff4496315f07deb748c06afb043bd97c41 | [
"MIT"
] | 1 | 2020-06-05T19:08:45.000Z | 2020-06-05T19:08:45.000Z | Code/tweet_gen_app/app.py | UPstartDeveloper/CS-1.2-Intro-Data-Structures | d36ee5ff4496315f07deb748c06afb043bd97c41 | [
"MIT"
] | 7 | 2019-11-07T03:13:52.000Z | 2019-12-16T16:49:00.000Z | Code/tweet_gen_app/app.py | UPstartDeveloper/adam-smith-tweet-generator | d36ee5ff4496315f07deb748c06afb043bd97c41 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, redirect, url_for, request
from dictogram import Dictogram
from stochastic_sampling import stochastic_sample
from clean_words import get_clean_words
from higher_order import HigherMarkovChain
from pymongo import MongoClient
import os
import twitter
# Flask app for tweet genera... | 30.311688 | 79 | 0.698372 |
7969d870f17384d0e7a4210dfd9d4b6fe13827fa | 3,731 | tac | Python | src/Cool/Cool/Tester/Parsing/Success/fibo.tac | matcom-compilers-2019/cool-compiler-olivia-vivian | 4ca07a75ac293f512e00fe3328fdf1be2c77cd61 | [
"MIT"
] | null | null | null | src/Cool/Cool/Tester/Parsing/Success/fibo.tac | matcom-compilers-2019/cool-compiler-olivia-vivian | 4ca07a75ac293f512e00fe3328fdf1be2c77cd61 | [
"MIT"
] | null | null | null | src/Cool/Cool/Tester/Parsing/Success/fibo.tac | matcom-compilers-2019/cool-compiler-olivia-vivian | 4ca07a75ac293f512e00fe3328fdf1be2c77cd61 | [
"MIT"
] | null | null | null | Call start;Object.constructor:PARAM t0;// Method: Object.abort*(t0 + 3) = Label "Object.abort"// Method: Object.type_name*(t0 + 4) = Label "Object.type_name"// Method: Object.copy*(t0 + 5) = Label "Object.copy"// Class Name is Object*(t0 + 0) = "Object"// Class Large: 6*(t0 + 1) = 6Return ;
IO.constructor:PARAM t0;Push... | 207.277778 | 755 | 0.714018 |
7969d97bcac58e22455d3611fa79a285849cc05e | 229 | py | Python | Parte1/Cap4/exercicios/animais.py | fabianoflorentino/python-CursoIntensivoDePython | 822288cc4b382936dde1bc647e3f8c2b925ced70 | [
"Apache-2.0"
] | null | null | null | Parte1/Cap4/exercicios/animais.py | fabianoflorentino/python-CursoIntensivoDePython | 822288cc4b382936dde1bc647e3f8c2b925ced70 | [
"Apache-2.0"
] | null | null | null | Parte1/Cap4/exercicios/animais.py | fabianoflorentino/python-CursoIntensivoDePython | 822288cc4b382936dde1bc647e3f8c2b925ced70 | [
"Apache-2.0"
] | 1 | 2020-02-05T13:07:08.000Z | 2020-02-05T13:07:08.000Z | bichos = [
'cachorro', 'gato', 'passaro', 'lagarto', 'cavalo'
]
print('')
for bicho in bichos:
print(f'Eu já tive um ' + str(bicho.title()) + '.')
print('')
print(f'Todos tinham uma calda muito bonita!.')
print('')
| 19.083333 | 55 | 0.585153 |
7969d98315c8bae81de70616f85989223989fad6 | 2,624 | py | Python | src/json_schema_validator.py | hubmapconsortium/ingest-api | 8f360cc9c728baf55e74bef471f4e3630feb7777 | [
"MIT"
] | null | null | null | src/json_schema_validator.py | hubmapconsortium/ingest-api | 8f360cc9c728baf55e74bef471f4e3630feb7777 | [
"MIT"
] | 67 | 2021-02-26T02:06:42.000Z | 2022-03-25T12:45:27.000Z | src/json_schema_validator.py | hubmapconsortium/ingest-api | 8f360cc9c728baf55e74bef471f4e3630feb7777 | [
"MIT"
] | null | null | null | from os.path import join, dirname
from jsonschema import validate, ValidationError, SchemaError
import jsonref
import json
def assert_valid_schema(data, schema_file):
""" Checks whether the given data matches the schema """
schema = _load_json_schema(schema_file)
return validate(data, schema)
def _load... | 39.164179 | 120 | 0.737043 |
7969dba1ec36aaaf1c3e2d990d03d9878390981e | 1,918 | py | Python | sshserveraudit/validator/__init__.py | zwiazeksyndykalistowpolski/ssh-server-audit | b493f3ea6117d9567310857cdf567c159f848cf8 | [
"Apache-2.0"
] | 2 | 2018-11-13T17:05:26.000Z | 2019-04-14T08:07:02.000Z | sshserveraudit/validator/__init__.py | zwiazeksyndykalistowpolski/ssh-server-audit | b493f3ea6117d9567310857cdf567c159f848cf8 | [
"Apache-2.0"
] | 4 | 2018-11-05T06:31:22.000Z | 2019-02-10T16:19:23.000Z | sshserveraudit/validator/__init__.py | zwiazeksyndykalistowpolski/ssh-server-audit | b493f3ea6117d9567310857cdf567c159f848cf8 | [
"Apache-2.0"
] | null | null | null |
from ..entity.host import Node
from ..valueobject.validator import ValidatorResult
import time
import datetime
import tornado.log
class Validator:
max_cache_time = 120.0
# static
cache = {}
def __init__(self, max_cache_time: int):
self.max_cache_time = max_cache_time
def _get_cache_ide... | 29.96875 | 113 | 0.645985 |
7969dbb61261d005bc2ef11b8199eb3049a8264e | 15,460 | py | Python | examples/self_distribution_distillation/self_distribution_distillation_src/criterions/distillation.py | yassirf/sequence-training | a7cd7a9bb2f4f1d76c4f62a62704e396ad029540 | [
"MIT"
] | null | null | null | examples/self_distribution_distillation/self_distribution_distillation_src/criterions/distillation.py | yassirf/sequence-training | a7cd7a9bb2f4f1d76c4f62a62704e396ad029540 | [
"MIT"
] | null | null | null | examples/self_distribution_distillation/self_distribution_distillation_src/criterions/distillation.py | yassirf/sequence-training | a7cd7a9bb2f4f1d76c4f62a62704e396ad029540 | [
"MIT"
] | null | null | null | import math
from dataclasses import dataclass, field
import torch
from fairseq import metrics, utils
from fairseq.criterions import register_criterion
from fairseq.criterions.label_smoothed_cross_entropy import LabelSmoothedCrossEntropyCriterion
from fairseq.dataclass import FairseqDataclass
from omegaconf import II
... | 35.787037 | 123 | 0.626391 |
7969dbc8040206aacd8003ac7e73af2cdf1da435 | 960 | py | Python | tests/integration/test_logging.py | izi-core/izi-core | 21176be2d41f0cf54ca954f294209c585f643dba | [
"BSD-3-Clause"
] | null | null | null | tests/integration/test_logging.py | izi-core/izi-core | 21176be2d41f0cf54ca954f294209c585f643dba | [
"BSD-3-Clause"
] | null | null | null | tests/integration/test_logging.py | izi-core/izi-core | 21176be2d41f0cf54ca954f294209c585f643dba | [
"BSD-3-Clause"
] | null | null | null | from logging import LogRecord
from django.test import TestCase
from izi.core.logging.formatters import PciFormatter
class TestLogging(TestCase):
data = [
('some string', 'some string'),
('here is my bankcard 1000010000000007', 'here is my bankcard XXXX-XXXX-XXXX-XXXX'),
('here is my ban... | 36.923077 | 98 | 0.641667 |
7969dc12d7770ba0e2bf631ff6671472dd357fc2 | 539 | py | Python | betdaq/errorparsers/betting.py | ScoreX/betdaq | 408ccb6f2e3ebf9acc4dc585d6b9092d6ae615f0 | [
"MIT"
] | 13 | 2017-07-17T22:57:09.000Z | 2022-03-25T05:19:04.000Z | betdaq/errorparsers/betting.py | liampauling/betdaq | 4b09c4b979665e1841de42ee3c4fe154ba3e3966 | [
"MIT"
] | 10 | 2017-07-25T12:01:30.000Z | 2021-08-03T15:17:03.000Z | betdaq/errorparsers/betting.py | liampauling/betdaq | 4b09c4b979665e1841de42ee3c4fe154ba3e3966 | [
"MIT"
] | 11 | 2017-09-04T18:30:48.000Z | 2021-07-26T09:04:50.000Z |
from betdaq.classifiers.marketdata import parse_classifier
from betdaq.utils import get_tag, get_attribs, listy_mc_list
def err_cancel_market(response):
err_data = parse_classifier(response.get('_raw_elements', []), 'Order')
response['Order'] = listy_mc_list(response.get('Order', [])) + err_data
return r... | 33.6875 | 77 | 0.74026 |
7969dc7536720f72adae771ab92970b5056664d5 | 11,705 | py | Python | assets/src/ba_data/python/bastd/actor/playerspaz.py | nitingupta910/ballistica | 7c8c645592ac184e80e409c14c7607f91fcc89df | [
"MIT"
] | 317 | 2020-04-04T00:33:10.000Z | 2022-03-28T01:07:09.000Z | assets/src/ba_data/python/bastd/actor/playerspaz.py | Alshahriah/ballistica | 326f6677a0118667e93ce9034849622ebef706fa | [
"MIT"
] | 315 | 2020-04-04T22:33:10.000Z | 2022-03-31T22:50:02.000Z | assets/src/ba_data/python/bastd/actor/playerspaz.py | Alshahriah/ballistica | 326f6677a0118667e93ce9034849622ebef706fa | [
"MIT"
] | 97 | 2020-04-04T01:32:17.000Z | 2022-03-16T19:02:59.000Z | # Released under the MIT License. See LICENSE for details.
#
"""Functionality related to player-controlled Spazzes."""
from __future__ import annotations
from typing import TYPE_CHECKING, TypeVar, overload
import ba
from bastd.actor.spaz import Spaz
if TYPE_CHECKING:
from typing import Any, Sequence, Optional, ... | 40.362069 | 79 | 0.585135 |
7969dd48696c5f3b334b995307509a4bdbae3084 | 540 | py | Python | .nix/pkgs/tools/admin/nsf-data-deploy-tools/test_lib/env.py | jraygauthier/nixos_secure_factory | 67adb93b153902226301d4a68e7b6e3a0af660c2 | [
"Apache-2.0"
] | 1 | 2021-04-17T10:13:42.000Z | 2021-04-17T10:13:42.000Z | .nix/pkgs/tools/admin/nsf-data-deploy-tools/test_lib/env.py | jraygauthier/nixos_secure_factory | 67adb93b153902226301d4a68e7b6e3a0af660c2 | [
"Apache-2.0"
] | 4 | 2019-10-21T17:40:17.000Z | 2021-11-11T13:46:20.000Z | .nix/pkgs/tools/admin/nsf-data-deploy-tools/test_lib/env.py | jraygauthier/nixos_secure_factory | 67adb93b153902226301d4a68e7b6e3a0af660c2 | [
"Apache-2.0"
] | 2 | 2019-10-10T18:32:01.000Z | 2021-08-24T16:02:09.000Z | import shutil
from nsft_shell_utils.permissions import has_admin_priviledges
from nsft_system_utils.os import get_os_groups, get_os_users
def is_package_installed():
return shutil.which("pkg-nsf-data-deploy-tools-get-sh-lib-dir") is not None
def from_nixos_test_machine():
return (
has_admin_priviled... | 30 | 79 | 0.725926 |
7969dd7139bb066b22538eb826cc20060f4ed143 | 31,976 | py | Python | deprecated/dem_tiler.py | alex-ip/agdc | 9e9eb556c33792440a3736f64cd5f628cf3a1385 | [
"BSD-3-Clause"
] | null | null | null | deprecated/dem_tiler.py | alex-ip/agdc | 9e9eb556c33792440a3736f64cd5f628cf3a1385 | [
"BSD-3-Clause"
] | null | null | null | deprecated/dem_tiler.py | alex-ip/agdc | 9e9eb556c33792440a3736f64cd5f628cf3a1385 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#===============================================================================
# Copyright (c) 2014 Geoscience Australia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... | 41.206186 | 133 | 0.559982 |
7969dd8b3d0b6f65a92450ab838d360cd8a47070 | 24,378 | py | Python | python/pyarrow/tests/test_types.py | mgmarino/arrow | 96a252290714000c3c9136955c850e2c287e4a51 | [
"Apache-2.0"
] | null | null | null | python/pyarrow/tests/test_types.py | mgmarino/arrow | 96a252290714000c3c9136955c850e2c287e4a51 | [
"Apache-2.0"
] | null | null | null | python/pyarrow/tests/test_types.py | mgmarino/arrow | 96a252290714000c3c9136955c850e2c287e4a51 | [
"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... | 29.371084 | 77 | 0.608335 |
7969ddda6ce415e3d17454aa977a29169c67edf2 | 5,021 | py | Python | docs/conf.py | eytanhanig/pr-hedwig-python | 972cf918101db7ed2cd980450f76216a77b448c6 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | eytanhanig/pr-hedwig-python | 972cf918101db7ed2cd980450f76216a77b448c6 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | eytanhanig/pr-hedwig-python | 972cf918101db7ed2cd980450f76216a77b448c6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 29.886905 | 79 | 0.641307 |
7969dddd522ac8f8a26e03715bbd8f75caf89493 | 18,038 | py | Python | horizon/openstack_dashboard/test/api_tests/fwaas_tests.py | sreenathmenon/openstackTFA | 8c765f2728b82cf78c4d2bfd5c6a36ebf9302f2b | [
"Apache-2.0"
] | null | null | null | horizon/openstack_dashboard/test/api_tests/fwaas_tests.py | sreenathmenon/openstackTFA | 8c765f2728b82cf78c4d2bfd5c6a36ebf9302f2b | [
"Apache-2.0"
] | null | null | null | horizon/openstack_dashboard/test/api_tests/fwaas_tests.py | sreenathmenon/openstackTFA | 8c765f2728b82cf78c4d2bfd5c6a36ebf9302f2b | [
"Apache-2.0"
] | 15 | 2017-01-12T10:40:00.000Z | 2019-04-19T08:28:05.000Z | # Copyright 2013, Big Switch Networks, 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 applic... | 42.14486 | 78 | 0.640204 |
7969de13d08c0c2c2026a5c83ec669b9826546a7 | 2,857 | py | Python | setup.py | alvistack/zopefoundation-zc.lockfile | 2e9545afb4141d60d707a25f28f66d33a74e7fe5 | [
"ZPL-2.1"
] | 18 | 2016-07-21T06:47:25.000Z | 2022-02-25T15:19:41.000Z | setup.py | alvistack/zopefoundation-zc.lockfile | 2e9545afb4141d60d707a25f28f66d33a74e7fe5 | [
"ZPL-2.1"
] | 20 | 2015-04-11T07:22:15.000Z | 2021-01-07T11:30:15.000Z | setup.py | alvistack/zopefoundation-zc.lockfile | 2e9545afb4141d60d707a25f28f66d33a74e7fe5 | [
"ZPL-2.1"
] | 9 | 2015-04-03T06:37:47.000Z | 2022-02-25T15:19:48.000Z | ##############################################################################
#
# Copyright (c) Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWAR... | 35.271605 | 78 | 0.589429 |
7969de743053c3b106e92c31c92e577996063ab5 | 245 | py | Python | solutions/single_number.py | LauraRakiewicz/leet-code | b6e9e9ec7e286462a017ac8a27a1dacbeac8c05d | [
"MIT"
] | null | null | null | solutions/single_number.py | LauraRakiewicz/leet-code | b6e9e9ec7e286462a017ac8a27a1dacbeac8c05d | [
"MIT"
] | null | null | null | solutions/single_number.py | LauraRakiewicz/leet-code | b6e9e9ec7e286462a017ac8a27a1dacbeac8c05d | [
"MIT"
] | null | null | null | import numpy as np
class Solution(object):
def singleNumber(self, nums):
hash_table = {}
for i in nums:
hash_table[i] += 1
for i in hash_table:
hash_table[i] == 1:
return i | 22.272727 | 33 | 0.506122 |
7969de8692c2f0a688d9554acf61508d05870a7f | 1,330 | py | Python | app/main/forms.py | Victoria045/ForkFull | fdb4fd7ada29fa1192799e2088e2e659f9f6f754 | [
"MIT"
] | null | null | null | app/main/forms.py | Victoria045/ForkFull | fdb4fd7ada29fa1192799e2088e2e659f9f6f754 | [
"MIT"
] | 5 | 2021-11-15T04:52:16.000Z | 2021-11-19T08:00:52.000Z | app/main/forms.py | Victoria045/ForkFull | fdb4fd7ada29fa1192799e2088e2e659f9f6f754 | [
"MIT"
] | 1 | 2021-11-19T08:03:27.000Z | 2021-11-19T08:03:27.000Z | from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed
from wtforms import StringField,IntegerField,SelectField,TextAreaField,SubmitField, FileField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError
from wtforms.validators import DataRequired
from flask_lo... | 47.5 | 114 | 0.720301 |
7969deb05da8f3d7ad6213ff6f48121add02ba52 | 2,474 | py | Python | apps/reader/tasks.py | daanzu/NewsBlur | 44f6d66dc2be17f2dbdeb222788d66eecfa19612 | [
"MIT"
] | 1 | 2016-10-12T18:35:54.000Z | 2016-10-12T18:35:54.000Z | apps/reader/tasks.py | kzwa/NewsBlur | ec668638117c3155c938bab92e0c6e1acb43008d | [
"MIT"
] | null | null | null | apps/reader/tasks.py | kzwa/NewsBlur | ec668638117c3155c938bab92e0c6e1acb43008d | [
"MIT"
] | null | null | null | import datetime
from celery.task import Task
from utils import log as logging
from django.contrib.auth.models import User
from django.conf import settings
from apps.reader.models import UserSubscription, MUserStory
from apps.social.models import MSocialSubscription
class FreshenHomepage(Task):
name = 'freshen-hom... | 39.269841 | 104 | 0.625303 |
7969dfada3e7ae0ac04ade83c604355a8f2eeda1 | 342 | py | Python | python/py_speed/func.py | edjdavid/adventures | d5a3ea161cf090b8b7e34c251ab99b5f6bc4ef79 | [
"MIT"
] | null | null | null | python/py_speed/func.py | edjdavid/adventures | d5a3ea161cf090b8b7e34c251ab99b5f6bc4ef79 | [
"MIT"
] | null | null | null | python/py_speed/func.py | edjdavid/adventures | d5a3ea161cf090b8b7e34c251ab99b5f6bc4ef79 | [
"MIT"
] | null | null | null |
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
def func_slow(N):
d = 0.0
for i in range(N):
d += (i % 3 - 1) * i
return d
def grouper(iterable, n, fillvalue=None):
args = [iter(iterable)] * n
return zip_longest(*args,... | 19 | 53 | 0.649123 |
7969dfb5444e1caa6bb228404f22269cd02d236f | 14,486 | py | Python | Main_Files/V5_Dev/V5-1.py | Fionnoch/TV-Relay-PyQt5 | 657d4cfe5626364db68d6ca530ebef4ed4381a15 | [
"MIT"
] | null | null | null | Main_Files/V5_Dev/V5-1.py | Fionnoch/TV-Relay-PyQt5 | 657d4cfe5626364db68d6ca530ebef4ed4381a15 | [
"MIT"
] | null | null | null | Main_Files/V5_Dev/V5-1.py | Fionnoch/TV-Relay-PyQt5 | 657d4cfe5626364db68d6ca530ebef4ed4381a15 | [
"MIT"
] | null | null | null | ##
# V1 - a window with a button which opens up another window with a video playing
# V2 - the basic interface works with buttons which link to video streams
# - way found to change button focus
# V3 - added keyboard navigation
# V4 - need to create IR interface - micropython
# V5 - need ip connection -
# V6 - nee... | 38.94086 | 119 | 0.637029 |
7969e0ec9ac3a74c01457ded4a75a95d2fefbd14 | 13,905 | py | Python | test/2to2.py | LedgerHQ/ledger-app-decred | 8be3c28466671f9e2306f06cedcf13b63af8013c | [
"Apache-2.0"
] | 1 | 2020-09-07T15:32:39.000Z | 2020-09-07T15:32:39.000Z | test/2to2.py | LedgerHQ/ledger-app-decred | 8be3c28466671f9e2306f06cedcf13b63af8013c | [
"Apache-2.0"
] | 1 | 2022-03-06T07:17:02.000Z | 2022-03-06T07:17:02.000Z | test/2to2.py | LedgerHQ/ledger-app-decred | 8be3c28466671f9e2306f06cedcf13b63af8013c | [
"Apache-2.0"
] | 1 | 2022-03-06T07:02:37.000Z | 2022-03-06T07:02:37.000Z | #!/usr/bin/env python
#*******************************************************************************
#* Ledger App
#* (c) 2016-2019 Ledger
#*
#* 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... | 44.003165 | 239 | 0.753901 |
7969e112b10ad095d56da9cc7097a7d50b86ce9c | 2,559 | py | Python | AtomFeed.py | freifunkh/hostwatch | 621d93d5e49a61c36b6cb8fa1b385854b77a449b | [
"MIT"
] | 1 | 2017-06-28T03:29:38.000Z | 2017-06-28T03:29:38.000Z | AtomFeed.py | freifunkh/hostwatch | 621d93d5e49a61c36b6cb8fa1b385854b77a449b | [
"MIT"
] | 1 | 2021-01-25T23:55:59.000Z | 2021-01-26T09:46:04.000Z | AtomFeed.py | freifunkh/hostwatch | 621d93d5e49a61c36b6cb8fa1b385854b77a449b | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import datetime
import xml.etree.ElementTree as ET
class AtomFeed():
def __init__( self, filePath=None, maxEntries=2, title=None, author=None, link=None ):
ET.register_namespace( '', 'http://www.w3.org/2005/Atom' )
self.maxEntries = maxEntries
self.root = None
se... | 36.557143 | 384 | 0.5678 |
7969e564c490e35de57bac9a887753f8dad4cdc0 | 1,144 | py | Python | fixture/application.py | Bozmanok/python_training | 2d6c1dbfd873301c17e12e938b22e4abd33bf18e | [
"Apache-2.0"
] | null | null | null | fixture/application.py | Bozmanok/python_training | 2d6c1dbfd873301c17e12e938b22e4abd33bf18e | [
"Apache-2.0"
] | null | null | null | fixture/application.py | Bozmanok/python_training | 2d6c1dbfd873301c17e12e938b22e4abd33bf18e | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.microsoft import IEDriverManager
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self, browser,... | 28.6 | 71 | 0.644231 |
7969e58836d08b418b53d46eecb8848a95253ba1 | 77,219 | py | Python | nova/virt/libvirt/config.py | nelsnelson/nova | 826fe1cc6af2df291d5aaafdc5d498d626475d19 | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/config.py | nelsnelson/nova | 826fe1cc6af2df291d5aaafdc5d498d626475d19 | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/config.py | nelsnelson/nova | 826fe1cc6af2df291d5aaafdc5d498d626475d19 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2012-2013 Red Hat, 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... | 33.399221 | 79 | 0.570365 |
7969e5cf2274b4155f74a48f08527221189da11b | 2,482 | py | Python | octoprint_dashboard/api/printerSettings.py | meadowfrey/OctoPrint-Dashboard | b5568efc35a903a3075f79a0914020b1bfb5c9a6 | [
"MIT"
] | 5 | 2017-05-18T08:04:04.000Z | 2020-01-05T17:55:35.000Z | octoprint_dashboard/api/printerSettings.py | meadowfrey/OctoPrint-Dashboard | b5568efc35a903a3075f79a0914020b1bfb5c9a6 | [
"MIT"
] | 6 | 2017-05-15T14:17:42.000Z | 2017-10-30T21:54:50.000Z | octoprint_dashboard/api/printerSettings.py | meadowfrey/OctoPrint-Dashboard | b5568efc35a903a3075f79a0914020b1bfb5c9a6 | [
"MIT"
] | 2 | 2017-05-21T17:21:36.000Z | 2017-07-24T12:48:54.000Z | from urllib import parse as urlparse
import requests
from flask import g, request
from flask_restful import Resource, reqparse, fields
from octoprint_dashboard.app import socketio
from octoprint_dashboard.login import login_required
from octoprint_dashboard.services import OctoprintService
from .decorators import sel... | 31.820513 | 116 | 0.615633 |
7969e771b4c59eae28c60aa26e604aa0167a8e42 | 6,357 | py | Python | examples/keystore/keystore_test_scenario.py | armory-io/citest | 56f2dfa991a377519e9be4c7f472fb9c80ec9fac | [
"Apache-2.0"
] | 69 | 2016-04-05T15:15:49.000Z | 2021-10-21T01:29:36.000Z | examples/keystore/keystore_test_scenario.py | armory-io/citest | 56f2dfa991a377519e9be4c7f472fb9c80ec9fac | [
"Apache-2.0"
] | 95 | 2016-04-06T13:31:09.000Z | 2020-08-13T22:53:40.000Z | examples/keystore/keystore_test_scenario.py | armory-io/citest | 56f2dfa991a377519e9be4c7f472fb9c80ec9fac | [
"Apache-2.0"
] | 50 | 2016-04-05T14:10:57.000Z | 2021-10-21T01:29:26.000Z | # 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 applicable law or a... | 37.394118 | 81 | 0.705521 |
7969e7d9ac17712b1d1a8c0558a310f6d0a1d213 | 15,866 | py | Python | seasonal-flu-nextstrain/scripts/cross_validation.py | blab/cartography | 36ef6408e7bdb73b59003166ad7725662fd8fbe6 | [
"MIT"
] | 1 | 2021-11-19T14:23:29.000Z | 2021-11-19T14:23:29.000Z | seasonal-flu-nextstrain/scripts/cross_validation.py | blab/cartography | 36ef6408e7bdb73b59003166ad7725662fd8fbe6 | [
"MIT"
] | 17 | 2021-07-14T17:44:02.000Z | 2022-02-11T18:43:46.000Z | seasonal-flu-nextstrain/scripts/cross_validation.py | blab/cartography | 36ef6408e7bdb73b59003166ad7725662fd8fbe6 | [
"MIT"
] | 1 | 2020-04-11T15:23:09.000Z | 2020-04-11T15:23:09.000Z | """Exhastuve grid search for parameters for TSNE and UMAP"""
import argparse
import Bio.SeqIO
from collections import OrderedDict
import itertools
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.gridspec as gridspec
import re
import numpy as np
import pandas as pd
import seaborn as sns
from s... | 47.789157 | 190 | 0.661856 |
7969e82758573456b026755236c8780bbfa7ecfd | 17,182 | py | Python | models/nae.py | Neural-Diffusion-Research/normalized-autoencoders | 0c77f7e29289e336c0fe5e941aaec8baa4a4fb82 | [
"MIT"
] | 30 | 2021-06-23T10:46:45.000Z | 2022-03-13T04:00:58.000Z | models/nae.py | Neural-Diffusion-Research/normalized-autoencoders | 0c77f7e29289e336c0fe5e941aaec8baa4a4fb82 | [
"MIT"
] | 12 | 2021-06-30T01:27:25.000Z | 2022-02-10T02:59:42.000Z | models/nae.py | Neural-Diffusion-Research/normalized-autoencoders | 0c77f7e29289e336c0fe5e941aaec8baa4a4fb82 | [
"MIT"
] | 10 | 2021-06-24T23:29:46.000Z | 2022-02-04T09:56:09.000Z | import numpy as np
import torch
from torch import nn
from torchvision.utils import make_grid
from models.ae import AE
from models.modules import IsotropicLaplace, DummyDistribution
from models.energybased import SampleBuffer, SampleBufferV2
from models.langevin import sample_langevin, sample_langevin_v2
class FFEBM(n... | 39.773148 | 122 | 0.599523 |
7969e8469b533bcf43f9318c3cc4067d0d7c32e5 | 2,088 | py | Python | mimecast/komand_mimecast/actions/add_group_member/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | mimecast/komand_mimecast/actions/add_group_member/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | mimecast/komand_mimecast/actions/add_group_member/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Component:
DESCRIPTION = "Add an email address or domain to a group"
class Input:
DOMAIN = "domain"
EMAIL_ADDRESS = "email_address"
ID = "id"
class Output:
EMAIL_ADDRESS = "email_address"
FOLDER_ID = "folder_id"
... | 22.212766 | 104 | 0.561782 |
7969e8d675785f69900cc2a6a889549fcbe5ddaf | 19,246 | py | Python | init_inference.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | 1 | 2021-11-15T19:07:13.000Z | 2021-11-15T19:07:13.000Z | init_inference.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | null | null | null | init_inference.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | null | null | null | # Copyright 2020-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list o... | 36.940499 | 170 | 0.643614 |
7969e957d8d51fa25ff169514d930c7a8272eb51 | 2,963 | py | Python | tensorflow/python/layers/utils_test.py | xincao79/tensorflow | 7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64 | [
"Apache-2.0"
] | 3 | 2018-08-16T22:45:00.000Z | 2021-11-09T11:27:06.000Z | tensorflow/python/layers/utils_test.py | xincao79/tensorflow | 7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64 | [
"Apache-2.0"
] | 3 | 2020-03-24T18:15:52.000Z | 2021-02-02T22:28:38.000Z | tensorflow/python/layers/utils_test.py | xincao79/tensorflow | 7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64 | [
"Apache-2.0"
] | 2 | 2017-10-03T18:22:53.000Z | 2020-03-17T12:44:05.000Z | # 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... | 39.506667 | 80 | 0.712116 |
7969e9bb12fa624ec6af686a6bbbffa5d1f5a6ea | 36,315 | py | Python | keystone/federation/utils.py | mmskv/keystone | 9550a78a2423770685d6369206352a6aec0153f5 | [
"Apache-2.0"
] | null | null | null | keystone/federation/utils.py | mmskv/keystone | 9550a78a2423770685d6369206352a6aec0153f5 | [
"Apache-2.0"
] | null | null | null | keystone/federation/utils.py | mmskv/keystone | 9550a78a2423770685d6369206352a6aec0153f5 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 36.607863 | 79 | 0.506072 |
7969ea4c053cbd0c7dbf9b0473128cf585f65031 | 2,713 | py | Python | pysprint/tests/test_spp_features.py | kingablgh/PySprint | c3e76fbf1287d18d78699145f5301593aff47ba0 | [
"MIT"
] | null | null | null | pysprint/tests/test_spp_features.py | kingablgh/PySprint | c3e76fbf1287d18d78699145f5301593aff47ba0 | [
"MIT"
] | null | null | null | pysprint/tests/test_spp_features.py | kingablgh/PySprint | c3e76fbf1287d18d78699145f5301593aff47ba0 | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from pysprint.core.methods import SPPMethod
from pysprint.core.bases import Dataset
@pytest.fixture()
def construct_ifg_sequence():
x = np.arange(1000)
y = np.sin(x)
# setting multiple SPP
d1 = Dataset(x, y)
d1.set_SPP_data(10, [40, 45])
# simple
d2 = D... | 28.861702 | 87 | 0.672687 |
7969eb1adad979d05bcea060cc3e6ad0689f5a21 | 2,459 | py | Python | tests/test_config.py | propublica/cookcountyjail2 | 190a5d4d2bcf4c667e899b125428d97f3dda6772 | [
"MIT"
] | 25 | 2017-06-08T21:43:40.000Z | 2022-02-09T05:26:55.000Z | tests/test_config.py | propublica/cookcountyjail2 | 190a5d4d2bcf4c667e899b125428d97f3dda6772 | [
"MIT"
] | 54 | 2017-06-08T21:11:12.000Z | 2022-03-02T14:54:28.000Z | tests/test_config.py | propublica/cookcountyjail2 | 190a5d4d2bcf4c667e899b125428d97f3dda6772 | [
"MIT"
] | 9 | 2017-06-10T18:57:25.000Z | 2021-02-27T17:46:04.000Z | import os
import pytest
from imp import reload
from jailscraper import app_config
def test_disable_local_storage_with_string(monkeypatch):
monkeypatch.setenv('{0}_USE_LOCAL_STORAGE'.format(app_config.PROJECT_SLUG), 'fAlse')
reload(app_config)
assert not app_config.USE_LOCAL_STORAGE
def test_disable_loc... | 31.525641 | 98 | 0.769418 |
7969eed545417de7a48320b0a1d2757ed3544b94 | 44,073 | py | Python | src/python/bezier/triangle.py | kianmeng/bezier | de7365258ed693539891e90906a763acf01195a6 | [
"Apache-2.0"
] | 165 | 2017-05-27T08:22:12.000Z | 2022-03-22T17:31:41.000Z | src/python/bezier/triangle.py | kianmeng/bezier | de7365258ed693539891e90906a763acf01195a6 | [
"Apache-2.0"
] | 254 | 2016-11-18T02:43:26.000Z | 2022-03-07T15:43:07.000Z | src/python/bezier/triangle.py | kianmeng/bezier | de7365258ed693539891e90906a763acf01195a6 | [
"Apache-2.0"
] | 35 | 2017-06-19T07:14:18.000Z | 2022-03-13T15:54:46.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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 35.145933 | 79 | 0.547319 |
7969eef166b22e9c461b76fc6699d68e69a86e1b | 650 | py | Python | kedro/fda_inspections/src/fda_inspections/pipelines/data_processing/pipeline.py | mjplacroix/mjplacroix.github.io | 061a374f2fca5e9e9715ff034f91e070058b2028 | [
"MIT"
] | null | null | null | kedro/fda_inspections/src/fda_inspections/pipelines/data_processing/pipeline.py | mjplacroix/mjplacroix.github.io | 061a374f2fca5e9e9715ff034f91e070058b2028 | [
"MIT"
] | 3 | 2022-02-07T22:24:22.000Z | 2022-02-22T14:19:09.000Z | kedro/fda_inspections/src/fda_inspections/pipelines/data_processing/pipeline.py | mjplacroix/mjplacroix.github.io | 061a374f2fca5e9e9715ff034f91e070058b2028 | [
"MIT"
] | null | null | null | """
This is a boilerplate pipeline 'data_processing'
generated using Kedro 0.17.7
"""
from kedro.pipeline import Pipeline, node, pipeline
def create_pipeline(**kwargs) -> Pipeline:
return pipeline(
[
node(
func=preprocess_companies,
inputs="companies",
... | 26 | 51 | 0.54 |
7969ef7e33219e1e726f9e19bde59e772fd2cd15 | 445 | py | Python | examples/rabbitmq/02-work-queues/new_task.py | luafran/ubp-lab4 | da9accdc1b589edf7e67218ffff219e5ec9ffb92 | [
"MIT"
] | null | null | null | examples/rabbitmq/02-work-queues/new_task.py | luafran/ubp-lab4 | da9accdc1b589edf7e67218ffff219e5ec9ffb92 | [
"MIT"
] | null | null | null | examples/rabbitmq/02-work-queues/new_task.py | luafran/ubp-lab4 | da9accdc1b589edf7e67218ffff219e5ec9ffb92 | [
"MIT"
] | null | null | null | import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters(host='127.0.0.1'))
channel = connection.channel()
channel.queue_declare(queue='task_queue', durable=True)
message = ' '.join(sys.argv[1:]) or "Hello World!"
channel.basic_publish(exchange='', routing_key='task_queue',
... | 29.666667 | 85 | 0.723596 |
7969f0321896595c5419af4781fc10148b551659 | 10,052 | py | Python | scripts/image_segmentation/classification_models/models/resnext.py | alallala/MAML2 | 6f79426b5449f1fc7a66e0182913329c486e4b86 | [
"MIT"
] | null | null | null | scripts/image_segmentation/classification_models/models/resnext.py | alallala/MAML2 | 6f79426b5449f1fc7a66e0182913329c486e4b86 | [
"MIT"
] | null | null | null | scripts/image_segmentation/classification_models/models/resnext.py | alallala/MAML2 | 6f79426b5449f1fc7a66e0182913329c486e4b86 | [
"MIT"
] | null | null | null | import os
import collections
from classification_models.weights import get_submodules_from_kwargs
from classification_models.models._common_blocks import GroupConv2D
from classification_models.weights import load_model_weights
backend = None
layers = None
models = None
keras_utils = None
ModelParams = collections.na... | 36.028674 | 113 | 0.614107 |
7969f12f7e222492f7056b4a6ebbc06d1621d692 | 5,390 | py | Python | highway_env/envs/lane_keeping_env.py | liuyuqi123/highway-env | a0dd65efb5cbd9737d04cce2688abd5d9ddbd8fc | [
"MIT"
] | null | null | null | highway_env/envs/lane_keeping_env.py | liuyuqi123/highway-env | a0dd65efb5cbd9737d04cce2688abd5d9ddbd8fc | [
"MIT"
] | null | null | null | highway_env/envs/lane_keeping_env.py | liuyuqi123/highway-env | a0dd65efb5cbd9737d04cce2688abd5d9ddbd8fc | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import copy
import numpy as np
from gym import spaces
from gym.envs.registration import register
from highway_env.envs.common.abstract import AbstractEnv
from highway_env.road.lane import LineType, SineLane, StraightLane
from highway_env.road.road impo... | 36.174497 | 145 | 0.579406 |
7969f138e6ad0e97ab24b3370fb0920c88e310a9 | 2,837 | py | Python | otp/uberdog/AccountDetailRecord.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 99 | 2019-11-02T22:25:00.000Z | 2022-02-03T03:48:00.000Z | otp/uberdog/AccountDetailRecord.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 42 | 2019-11-03T05:31:08.000Z | 2022-03-16T22:50:32.000Z | otp/uberdog/AccountDetailRecord.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 57 | 2019-11-03T07:47:37.000Z | 2022-03-22T00:41:49.000Z | from otp.otpbase import OTPGlobals
class SubDetailRecord:
def __init__(self):
self.subId = 0
self.subOwnerId = 0
self.subName = ''
self.subActive = ''
self.subAccess = ''
self.subLevel = 0
self.subNumAvatars = 0
self.subNumConcur = 0
self.sub... | 35.024691 | 71 | 0.567148 |
7969f1b4af756a47ddbe13c60fb9f71821ba61a7 | 1,319 | py | Python | cogs/extra.py | bismuthfoundation/Pawer-discord-bot | 4701afaae61d657758bb714769f739113f6928a1 | [
"MIT"
] | 14 | 2018-11-26T17:00:38.000Z | 2021-09-13T11:12:16.000Z | cogs/extra.py | bismuthfoundation/Pawer-discord-bot | 4701afaae61d657758bb714769f739113f6928a1 | [
"MIT"
] | 18 | 2019-06-23T14:02:01.000Z | 2020-09-27T06:30:32.000Z | cogs/extra.py | bismuthfoundation/Pawer-discord-bot | 4701afaae61d657758bb714769f739113f6928a1 | [
"MIT"
] | 11 | 2019-06-22T22:15:01.000Z | 2021-09-13T11:14:10.000Z | """
Extra cogs
"""
import discord
from discord.ext import commands
from modules.helpers import async_get
from json import loads as json_loads
class Extra(commands.Cog):
"""Useful cogs not Bismuth specific"""
def __init__(self, bot):
self.bot = bot
@commands.command()
async def ping(self, ct... | 28.673913 | 75 | 0.59439 |
7969f2f4e9dc89419f77033b73384560f6255c4b | 1,726 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/models/prediction.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/models/prediction.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/models/prediction.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 33.192308 | 79 | 0.592121 |
7969f51a4e81db965e678d219d162463be8b7d39 | 1,911 | py | Python | tests/query/bugs/fixed_issue2020.py | liuqian1990/nebula | ff202e2a1860cc10e7757afc02e683f0e2d4b09a | [
"Apache-2.0"
] | 8,586 | 2019-05-15T07:25:51.000Z | 2022-03-31T13:49:27.000Z | tests/query/bugs/fixed_issue2020.py | liuqian1990/nebula | ff202e2a1860cc10e7757afc02e683f0e2d4b09a | [
"Apache-2.0"
] | 3,078 | 2019-05-15T08:14:02.000Z | 2022-03-31T11:39:51.000Z | tests/query/bugs/fixed_issue2020.py | liuqian1990/nebula | ff202e2a1860cc10e7757afc02e683f0e2d4b09a | [
"Apache-2.0"
] | 880 | 2019-05-15T07:36:10.000Z | 2022-03-31T03:43:02.000Z | # Copyright (c) 2020 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License.
import time
from tests.common.nebula_test_suite import NebulaTestSuite
class TestSimpleQuery(NebulaTestSuite):
@classmethod
def prepare(self):
resp = self.execute(
'CREATE SPAC... | 39.8125 | 125 | 0.672946 |
7969f5948967abe2694bc219dc8d14292a90160d | 536 | py | Python | led.py | mikemccllstr/omada-api | 96a41e07ba9b02208a92d6a7f79f39991e25fde1 | [
"MIT"
] | 24 | 2021-06-13T17:09:08.000Z | 2022-03-30T06:35:41.000Z | led.py | mikemccllstr/omada-api | 96a41e07ba9b02208a92d6a7f79f39991e25fde1 | [
"MIT"
] | 4 | 2021-09-29T19:57:08.000Z | 2022-02-02T13:37:45.000Z | led.py | mikemccllstr/omada-api | 96a41e07ba9b02208a92d6a7f79f39991e25fde1 | [
"MIT"
] | 13 | 2021-08-12T15:57:18.000Z | 2022-03-19T19:25:37.000Z | # -*- coding: future_fstrings -*-
import sys
from omada import Omada
def main():
if len(sys.argv) > 1 and sys.argv[1] not in ('on','off'):
print( f"usage: {sys.argv[0]} [on|off]" )
return
omada = Omada()
omada.login()
settings = omada.getSiteSettings()
if len(sys.argv) > 1:
settings['led']['enable'] ... | 19.851852 | 64 | 0.628731 |
7969f70f74ea41b19f29c5c8c8496143a05c8e2c | 3,158 | py | Python | Lib/site-packages/plotly/validators/layout/_title.py | tytanya/my-first-blog | 2b40adb0816c3546e90ad6ca1e7fb50d924c1536 | [
"bzip2-1.0.6"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/layout/_title.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/layout/_title.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class TitleValidator(_plotly_utils.basevalidators.TitleValidator):
def __init__(self, plotly_name='title', parent_name='layout', **kwargs):
super(TitleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_... | 45.768116 | 76 | 0.549082 |
7969f8c4ba950b5e227fe70ff0b2ff44b2080999 | 230 | py | Python | projects/views.py | MAX-EINSTEIN/django_portfolio | b8aa4d522f8e50a289aa3e92ce7a016c10dd0d84 | [
"MIT"
] | null | null | null | projects/views.py | MAX-EINSTEIN/django_portfolio | b8aa4d522f8e50a289aa3e92ce7a016c10dd0d84 | [
"MIT"
] | null | null | null | projects/views.py | MAX-EINSTEIN/django_portfolio | b8aa4d522f8e50a289aa3e92ce7a016c10dd0d84 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Project
# Create your views here.
def projects_index(request):
projects = Project.objects.all()
return render(request, 'projects/index.html', {'projects': projects}) | 32.857143 | 73 | 0.756522 |
7969f907220678446677cdadbe8175b67c1a56f1 | 2,703 | py | Python | ShapeRecognition.py | JoeWolf92/DMD-PyCalibration | 30969a85a335e24bc184d8eec9e81174e22b9c4a | [
"Apache-2.0"
] | 1 | 2020-11-09T09:24:19.000Z | 2020-11-09T09:24:19.000Z | ShapeRecognition.py | JoeWolf92/DMD-PyCalibration | 30969a85a335e24bc184d8eec9e81174e22b9c4a | [
"Apache-2.0"
] | null | null | null | ShapeRecognition.py | JoeWolf92/DMD-PyCalibration | 30969a85a335e24bc184d8eec9e81174e22b9c4a | [
"Apache-2.0"
] | 2 | 2020-11-09T09:24:21.000Z | 2021-10-06T11:20:09.000Z | # import the necessary packages
import cv2
import numpy as np
class ShapeDetector:
def __init__(self, filename, shapeColour, calibrationThreshold):
# Initiate image containing shapes to be identified
if shapeColour:
self.shapeColour = 1
else:
self.shapeColour = 0
... | 47.421053 | 159 | 0.63485 |
7969f91389b28b829d72979d94af560ad66020f9 | 30,572 | py | Python | karp5/server/translator/parser.py | spraakbanken/karp-backend-v5 | bfca9d0f29a1243ee8d817c6a7db8b30a7da1097 | [
"MIT"
] | 4 | 2018-01-09T10:20:22.000Z | 2019-11-21T12:26:56.000Z | karp5/server/translator/parser.py | spraakbanken/karp-backend-v5 | bfca9d0f29a1243ee8d817c6a7db8b30a7da1097 | [
"MIT"
] | 44 | 2018-03-23T13:59:13.000Z | 2022-03-29T06:03:17.000Z | karp5/server/translator/parser.py | spraakbanken/karp-backend-v5 | bfca9d0f29a1243ee8d817c6a7db8b30a7da1097 | [
"MIT"
] | 2 | 2018-01-07T12:08:32.000Z | 2019-08-21T08:05:17.000Z | # -*- coding: utf-8 -*-
""" Responsible for the translation from the query api to elastic queries """
from collections import defaultdict
import itertools
import logging
import re
from typing import Dict, List, Any
import elasticsearch_dsl as es_dsl
from elasticsearch import helpers as EShelpers
from flask import req... | 35.507549 | 100 | 0.592994 |
7969f9890ccde04b0acc8563768342640cef0282 | 104,759 | py | Python | salt/master.py | Jiaion/salt | a7d2444a60f33942a293680a41e894eec98f5707 | [
"Apache-2.0"
] | null | null | null | salt/master.py | Jiaion/salt | a7d2444a60f33942a293680a41e894eec98f5707 | [
"Apache-2.0"
] | null | null | null | salt/master.py | Jiaion/salt | a7d2444a60f33942a293680a41e894eec98f5707 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
This module contains all of the routines needed to set up a master server, this
involves preparing the three listeners and the workers needed by the master.
'''
# Import python libs
import os
import re
import time
import errno
import signal
import shutil
import stat
import logging
import ha... | 39.147608 | 194 | 0.498239 |
7969f9e242ae27c1e736c57a7d44f84a656b81c0 | 2,632 | py | Python | share/qt/extract_strings_qt.py | eskal/Alterdot | 67db6f7e59da6aac84d92db85964b1c4fd5d419d | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | eskal/Alterdot | 67db6f7e59da6aac84d92db85964b1c4fd5d419d | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | eskal/Alterdot | 67db6f7e59da6aac84d92db85964b1c4fd5d419d | [
"MIT"
] | 2 | 2021-07-12T13:05:39.000Z | 2021-07-27T18:54:28.000Z | #!/usr/bin/env python3
# Copyright (c) 2012-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Extract _("...") strings for translation and convert to Qt stringdefs so that
they can be picked up by... | 29.573034 | 105 | 0.635258 |
7969fad761e14b43ce0a92d5604a6395e09cd944 | 5,579 | py | Python | applications/tasks/sequence_labeling/trainer/custom_dynamic_trainer.py | PaddlePaddle/LARK | 94a2367ba7f0f83b48330233450ea095d8dc9382 | [
"Apache-2.0"
] | 1,552 | 2019-03-03T19:52:07.000Z | 2019-07-19T06:47:57.000Z | applications/tasks/sequence_labeling/trainer/custom_dynamic_trainer.py | PaddlePaddle/LARK | 94a2367ba7f0f83b48330233450ea095d8dc9382 | [
"Apache-2.0"
] | 154 | 2019-03-06T08:19:57.000Z | 2019-07-19T02:52:22.000Z | applications/tasks/sequence_labeling/trainer/custom_dynamic_trainer.py | PaddlePaddle/LARK | 94a2367ba7f0f83b48330233450ea095d8dc9382 | [
"Apache-2.0"
] | 382 | 2019-03-04T13:37:01.000Z | 2019-07-19T06:33:44.000Z | # -*- coding: utf-8 -*
"""DyGraphTrainer
"""
import collections
import logging
import time
import paddle
from paddle.distributed import fleet
from erniekit.common.register import RegisterSet
from erniekit.common.rule import InstanceName
from erniekit.controller.dynamic_trainer import BaseDynamicTrainer
@RegisterSet.t... | 40.427536 | 112 | 0.593476 |
7969faf62569378480bc7db15c427e1602879a8c | 1,375 | py | Python | examples/manual/commit_result.py | etano/whiplash | ba7d28ce5642eac69cd514f6450f9bd4cd5a2c4b | [
"MIT"
] | null | null | null | examples/manual/commit_result.py | etano/whiplash | ba7d28ce5642eac69cd514f6450f9bd4cd5a2c4b | [
"MIT"
] | null | null | null | examples/manual/commit_result.py | etano/whiplash | ba7d28ce5642eac69cd514f6450f9bd4cd5a2c4b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys, json
import whiplash
try:
assert len(sys.argv) == 4
except:
print("Usage: ./commit_result.py input.json executable_id output.json")
sys.exit()
# Login as test user
db = whiplash.db("localhost", 1337, username="test", password="test")
# Split input into model and propert... | 26.442308 | 102 | 0.697455 |
7969fb09dfb0cb9c7249df5fa885d3854f0c1ae9 | 1,050 | py | Python | lang/Python/terminal-control-clear-the-screen-3.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | lang/Python/terminal-control-clear-the-screen-3.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/terminal-control-clear-the-screen-3.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | from ctypes import *
STD_OUTPUT_HANDLE = -11
class COORD(Structure):
pass
COORD._fields_ = [("X", c_short), ("Y", c_short)]
class SMALL_RECT(Structure):
pass
SMALL_RECT._fields_ = [("Left", c_short), ("Top", c_short), ("Right", c_short), ("Bottom", c_short)]
class CONSOLE_SCREEN_BUFFER_INFO(Structure):
... | 26.923077 | 103 | 0.709524 |
7969fbd392fc52850b2c4ff10c2c8f753467dc55 | 8,856 | py | Python | network/YoloV2V3/yolo/region_layer.py | ma3252788/detection_template | 0079e8e40c59c1b0c9b868e9a361bd0cc232a583 | [
"MIT"
] | 113 | 2020-09-24T09:31:41.000Z | 2021-07-05T02:16:50.000Z | network/YoloV2V3/yolo/region_layer.py | ma3252788/detection_template | 0079e8e40c59c1b0c9b868e9a361bd0cc232a583 | [
"MIT"
] | 15 | 2020-12-16T09:31:32.000Z | 2021-06-22T05:06:06.000Z | network/YoloV2V3/yolo/region_layer.py | ma3252788/detection_template | 0079e8e40c59c1b0c9b868e9a361bd0cc232a583 | [
"MIT"
] | 19 | 2020-12-16T07:15:16.000Z | 2021-07-03T18:24:21.000Z | import math
import numpy as np
import sys
import time
import torch
import torch.nn as nn
import torch.nn.functional as F
from .utils import bbox_iou, multi_bbox_ious, convert2cpu
class RegionLayer(nn.Module):
def __init__(self, num_classes=0, anchors=[1.0], num_anchors=1, device=None):
super(RegionLayer, s... | 47.106383 | 136 | 0.564928 |
7969fdb034c8ecd1231025e766a95573dd8af004 | 14,072 | py | Python | tests/copp/test_copp.py | gechiang/sonic-mgmt | d85c668dccd731a14b416fce476c3ccda7a177ac | [
"Apache-2.0"
] | null | null | null | tests/copp/test_copp.py | gechiang/sonic-mgmt | d85c668dccd731a14b416fce476c3ccda7a177ac | [
"Apache-2.0"
] | null | null | null | tests/copp/test_copp.py | gechiang/sonic-mgmt | d85c668dccd731a14b416fce476c3ccda7a177ac | [
"Apache-2.0"
] | null | null | null | """
Tests the COPP feature in SONiC.
Notes:
These test cases require that a special RPC syncd image is installed on the
DUT. You can either pre-install this image and run the test normally, or
specify the `--swap-syncd` flag from the command line to have the test fetch
the RPC i... | 43.975 | 149 | 0.652075 |
7969fddcd5ad9c087dce96975182cacff48b1144 | 751 | py | Python | outputs/migrations/0003_init_emails.py | jayvdb/django-outputs | fcd1386b5dd95d71655e44fa49b766941bbcad43 | [
"Apache-2.0"
] | null | null | null | outputs/migrations/0003_init_emails.py | jayvdb/django-outputs | fcd1386b5dd95d71655e44fa49b766941bbcad43 | [
"Apache-2.0"
] | null | null | null | outputs/migrations/0003_init_emails.py | jayvdb/django-outputs | fcd1386b5dd95d71655e44fa49b766941bbcad43 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.10 on 2019-12-22 23:14
from bulk_update.helper import bulk_update
from django.db import migrations
from outputs.models import Export
def set_metadata(*args, **kwargs):
print('Init emails in Exports ...')
exports = Export.objects.all()
for export in exports:
emails = lis... | 25.033333 | 72 | 0.673768 |
7969fe1b8bd9cf48c72e497956b0736540e52e82 | 1,996 | py | Python | setup.py | ZirrusOne/z1n-frappe | c5a266d8dc1dbed077d2356bf189ba1fc3fa7497 | [
"MIT"
] | null | null | null | setup.py | ZirrusOne/z1n-frappe | c5a266d8dc1dbed077d2356bf189ba1fc3fa7497 | [
"MIT"
] | null | null | null | setup.py | ZirrusOne/z1n-frappe | c5a266d8dc1dbed077d2356bf189ba1fc3fa7497 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
# imports - standard imports
import os, shutil
from distutils.command.clean import clean as Clean
from setuptools import setup, find_packages
import re, ast
# get version from __version__ variable in frappe/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with ... | 28.927536 | 99 | 0.717435 |
7969fe5ada1475c60f976e32bb4b67561434c97e | 5,169 | py | Python | orders/views.py | azhelezo/smw-docs | 51e79437e9d16a721dd622046338d7143999239d | [
"MIT"
] | null | null | null | orders/views.py | azhelezo/smw-docs | 51e79437e9d16a721dd622046338d7143999239d | [
"MIT"
] | null | null | null | orders/views.py | azhelezo/smw-docs | 51e79437e9d16a721dd622046338d7143999239d | [
"MIT"
] | null | null | null | from django.contrib.auth.decorators import login_required, user_passes_test
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect, render
from .decorators import user_can_access
from .forms import OrderForm
from .models import Order
from users.models import User, Profile, ... | 35.40411 | 104 | 0.672857 |
7969ff28267dd7a60a86a4635a4bcf8f63df0845 | 4,910 | py | Python | ezsub/const.py | 7aman/ezsub | f32e760071bb81b402bba5de6e93ec4182829d50 | [
"MIT"
] | 4 | 2020-02-21T14:35:31.000Z | 2021-08-11T18:02:46.000Z | ezsub/const.py | 7aman/ezsub | f32e760071bb81b402bba5de6e93ec4182829d50 | [
"MIT"
] | null | null | null | ezsub/const.py | 7aman/ezsub | f32e760071bb81b402bba5de6e93ec4182829d50 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import platform
from pathlib import Path
from datetime import datetime
# setup.py and pypi will remove leading zero in month and day.
# But we keep leading zeroes in calver like YYYY.MM.DD also in changelog and tags.
# In what's new this format is tested
__vers... | 21.725664 | 82 | 0.578411 |
7969ff8c4760caef4e55770a5b87bfddbd643de6 | 1,943 | py | Python | headers/accept.py | k4r4koyun/HeadFuzz | efb3481e55e48102fd8c8329328b233ac62f2af7 | [
"MIT"
] | null | null | null | headers/accept.py | k4r4koyun/HeadFuzz | efb3481e55e48102fd8c8329328b233ac62f2af7 | [
"MIT"
] | null | null | null | headers/accept.py | k4r4koyun/HeadFuzz | efb3481e55e48102fd8c8329328b233ac62f2af7 | [
"MIT"
] | 1 | 2019-07-21T01:31:40.000Z | 2019-07-21T01:31:40.000Z | from headers.static_values import *
from worker import *
from utils import *
import requests
class Accept():
def __init__(self, destination):
self.destination = destination
self.mime_types = MimeTypes.get_mime_list()
self.payloads = Payloads.get_payload_list(Config.re... | 34.696429 | 119 | 0.510551 |
7969fff9a6aadf24e5eaab1305530f3928f9dd61 | 1,454 | py | Python | setup.py | fishilico/autoneighxy | cdd3d8b77f33ae6a84b25df4aa9bb023e1f4ad87 | [
"Apache-2.0"
] | 10 | 2017-01-18T02:48:12.000Z | 2021-02-25T22:09:41.000Z | setup.py | fishilico/autoneighxy | cdd3d8b77f33ae6a84b25df4aa9bb023e1f4ad87 | [
"Apache-2.0"
] | null | null | null | setup.py | fishilico/autoneighxy | cdd3d8b77f33ae6a84b25df4aa9bb023e1f4ad87 | [
"Apache-2.0"
] | 3 | 2017-10-07T17:26:14.000Z | 2018-09-11T07:36:05.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
import re
root_dir = os.path.abspath(os.path.dirname(__file__))
def get_version(package_name):
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
package_components = package_name.split('.')
... | 27.433962 | 68 | 0.616919 |
796a00037305814a3112db820cde17d6d768f762 | 149 | py | Python | tex/code/robrank/configs/__init__.py | cdluminate/robdml | 51ffcdbd2b316b0550a073f4c19edbef7bbbe704 | [
"Apache-2.0"
] | 5 | 2021-10-29T20:24:03.000Z | 2022-03-23T11:35:09.000Z | tex/code/robrank/configs/__init__.py | cdluminate/robdml | 51ffcdbd2b316b0550a073f4c19edbef7bbbe704 | [
"Apache-2.0"
] | null | null | null | tex/code/robrank/configs/__init__.py | cdluminate/robdml | 51ffcdbd2b316b0550a073f4c19edbef7bbbe704 | [
"Apache-2.0"
] | null | null | null | from .configs_dataset import *
from .configs_loss import *
from .configs_classify import *
from .configs_rank import *
from .configs_hybrid import *
| 24.833333 | 31 | 0.798658 |
796a016a8828899ecb6fa7b3fd6edbb8a6164a89 | 2,860 | py | Python | discord_bot.py | uzair754/twewy-discord-chatbot | 3b5401d3f1dbd21246ed9d06956189fdc664e6fc | [
"MIT"
] | 150 | 2021-06-01T10:40:00.000Z | 2022-03-21T05:59:40.000Z | discord_bot.py | Abbhiishek/twewy-discord-chatbot | d4c9e9e5180177f86e51c2a55c168703c782f3da | [
"MIT"
] | 9 | 2021-06-06T09:15:40.000Z | 2022-02-11T08:33:18.000Z | discord_bot.py | Abbhiishek/twewy-discord-chatbot | d4c9e9e5180177f86e51c2a55c168703c782f3da | [
"MIT"
] | 105 | 2021-06-04T02:47:36.000Z | 2022-03-30T08:53:48.000Z | # the os module helps us access environment variables
# i.e., our API keys
import os
# these modules are for querying the Hugging Face model
import json
import requests
# the Discord Python API
import discord
# this is my Hugging Face profile link
API_URL = 'https://api-inference.huggingface.co/models/r3dhummingbird... | 34.878049 | 76 | 0.611189 |
796a030871ce8bb9ce5cf56107406114a015ded4 | 137 | py | Python | vit/formatter/until_iso.py | kinifwyne/vit | e2cbafce922b1e09c4a66e7dc9592c51fe628e9d | [
"MIT"
] | 179 | 2020-07-28T08:21:51.000Z | 2022-03-30T21:39:37.000Z | vit/formatter/until_iso.py | kinifwyne/vit | e2cbafce922b1e09c4a66e7dc9592c51fe628e9d | [
"MIT"
] | 255 | 2017-02-01T11:49:12.000Z | 2020-07-26T22:31:25.000Z | vit/formatter/until_iso.py | kinifwyne/vit | e2cbafce922b1e09c4a66e7dc9592c51fe628e9d | [
"MIT"
] | 26 | 2017-01-17T20:31:13.000Z | 2020-06-17T13:09:01.000Z | from vit.formatter.until import Until
class UntilIso(Until):
def format_datetime(self, until, task):
return self.iso(until)
| 22.833333 | 43 | 0.722628 |
796a03c3984fa5360cdc6b0494d896a8b1801962 | 10,903 | py | Python | Utils/NN/TorchModels.py | MaurizioFD/recsys-challenge-2020-twitter | 95dc024fb4f8777aa62e1304536daece640428de | [
"Apache-2.0"
] | 44 | 2020-07-09T11:31:17.000Z | 2022-03-04T05:50:48.000Z | Utils/NN/TorchModels.py | kiminh/recsys-challenge-2020-twitter | 567f0db40be7db3d21c360f2ca6cdf2addc7c698 | [
"Apache-2.0"
] | 3 | 2020-10-02T18:55:21.000Z | 2020-10-13T22:13:58.000Z | Utils/NN/TorchModels.py | kiminh/recsys-challenge-2020-twitter | 567f0db40be7db3d21c360f2ca6cdf2addc7c698 | [
"Apache-2.0"
] | 9 | 2020-08-08T14:55:59.000Z | 2021-09-06T09:17:03.000Z | import torch
from torch import nn
from torch.nn import BCEWithLogitsLoss
from transformers import DistilBertModel
from Utils.Eval.Metrics import ComputeMetrics as CoMe
class FFNNMulti(nn.Module):
def __init__(self, input_size, hidden_size_1, hidden_size_2, hidden_dropout_prob_1, hidden_dropout_prob_2):
s... | 35.514658 | 227 | 0.631294 |
796a0689bef54dae716f7f1778554ec560f89e51 | 1,332 | py | Python | test/vms/components/avax/test_utxo.py | jgeofil/avax-python | b09e78e3d7e1c35db5ae42e3918e960e775f2d45 | [
"MIT"
] | 25 | 2021-05-16T23:43:47.000Z | 2022-03-29T03:08:30.000Z | test/vms/components/avax/test_utxo.py | zefonseca/ava-python | 9c72af7c720edfab9c73379a102cf6a11d864ebd | [
"MIT"
] | 2 | 2021-04-26T11:43:22.000Z | 2021-06-04T07:55:22.000Z | test/vms/components/avax/test_utxo.py | jgeofil/avax-python | b09e78e3d7e1c35db5ae42e3918e960e775f2d45 | [
"MIT"
] | 4 | 2021-08-06T10:55:58.000Z | 2022-03-29T08:03:05.000Z | # avax-python : Python tools for the exploration of the Avalanche AVAX network.
#
# Documentation at https://crypto.bi
"""
Copyright © 2021 ojrdev
Support this Open Source project!
Donate to X-avax1qr6yzjykcjmeflztsgv6y88dl0xnlel3chs3r4
Permission is hereby granted, free of charge, to any person obtaining a copy of... | 60.545455 | 463 | 0.793544 |
796a07953830dd622fe87c3bc3d37082da3f9941 | 30,095 | py | Python | fhirclient/models/measurereport_tests.py | zzhou41/client-py | cbfa8d7c7f1bad233b237b7c5582fc0577b21f70 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/measurereport_tests.py | zzhou41/client-py | cbfa8d7c7f1bad233b237b7c5582fc0577b21f70 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/measurereport_tests.py | zzhou41/client-py | cbfa8d7c7f1bad233b237b7c5582fc0577b21f70 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-07-29.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import measurereport
from .fhirdate import FHIRDate
class MeasureReportTests(unittest.TestCase):
def instantiate_from(self, file... | 83.597222 | 124 | 0.698654 |
796a07ea554b83f4db711db32c4c507bdb112aa4 | 5,287 | py | Python | python3/koans/about_methods.py | mmadil/python-koans | dadf97a4efe800f39fed395fee89f122b340c8be | [
"MIT"
] | 3,164 | 2015-01-02T17:48:40.000Z | 2022-03-31T20:29:05.000Z | python3/koans/about_methods.py | mmadil/python-koans | dadf97a4efe800f39fed395fee89f122b340c8be | [
"MIT"
] | 111 | 2015-01-09T17:44:52.000Z | 2022-02-28T00:06:08.000Z | python3/koans/about_methods.py | mmadil/python-koans | dadf97a4efe800f39fed395fee89f122b340c8be | [
"MIT"
] | 2,336 | 2015-01-01T14:35:18.000Z | 2022-03-28T08:04:06.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Partially based on AboutMethods in the Ruby Koans
#
from runner.koan import *
def my_global_function(a,b):
return a + b
class AboutMethods(Koan):
def test_calling_a_global_function(self):
self.assertEqual(__, my_global_function(2,3))
# NOTE: Wro... | 32.435583 | 91 | 0.59599 |
796a08418eb92c438e539ca496875e3817040498 | 20,212 | py | Python | src/streamlink/plugin/plugin.py | kyldery/streamlink | ef36240408c194a543557fb31e4535b0426ec153 | [
"BSD-2-Clause"
] | 1 | 2022-02-25T20:14:03.000Z | 2022-02-25T20:14:03.000Z | src/streamlink/plugin/plugin.py | kyldery/streamlink | ef36240408c194a543557fb31e4535b0426ec153 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugin/plugin.py | kyldery/streamlink | ef36240408c194a543557fb31e4535b0426ec153 | [
"BSD-2-Clause"
] | 12 | 2022-01-30T23:34:18.000Z | 2022-03-26T17:09:43.000Z | import ast
import logging
import operator
import re
import time
from functools import partial
from typing import Any, Callable, ClassVar, Dict, List, Match, NamedTuple, Optional, Pattern, Sequence, Type
import requests.cookies
from streamlink.cache import Cache
from streamlink.exceptions import FatalPluginError, NoSt... | 33.298188 | 123 | 0.597071 |
796a08972110838af209cf4781f635dd4373d044 | 20,687 | py | Python | ucsmsdk/mometa/extvmm/ExtvmmNetworkSets.py | Curlyfingers/ucsmsdk | 982ff2d8faa12ffb88e1f8cba98cf5749f05c93d | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/extvmm/ExtvmmNetworkSets.py | Curlyfingers/ucsmsdk | 982ff2d8faa12ffb88e1f8cba98cf5749f05c93d | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/extvmm/ExtvmmNetworkSets.py | Curlyfingers/ucsmsdk | 982ff2d8faa12ffb88e1f8cba98cf5749f05c93d | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for ExtvmmNetworkSets ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class ExtvmmNetworkSetsConsts:
FSM_PREV_DEPLOY_BEGIN = "DeployBegin"
FSM_PREV_DEPLOY_FAIL = "DeployFa... | 92.766816 | 3,748 | 0.768792 |
796a08a2e2f5c3b0247bb4a1f54d3e8befe4315e | 3,823 | py | Python | tools/accuracy_checker/accuracy_checker/annotation_converters/image_retrieval.py | bosques-urbanos/open_model_zoo | c1deee7b0707621c248e6d74b43b1564e94cf001 | [
"Apache-2.0"
] | 4 | 2019-09-17T13:11:02.000Z | 2021-02-22T15:39:15.000Z | tools/accuracy_checker/accuracy_checker/annotation_converters/image_retrieval.py | bosques-urbanos/open_model_zoo | c1deee7b0707621c248e6d74b43b1564e94cf001 | [
"Apache-2.0"
] | 1 | 2021-11-15T15:52:24.000Z | 2021-11-15T15:52:24.000Z | tools/accuracy_checker/accuracy_checker/annotation_converters/image_retrieval.py | bosques-urbanos/open_model_zoo | c1deee7b0707621c248e6d74b43b1564e94cf001 | [
"Apache-2.0"
] | 1 | 2020-12-11T03:01:50.000Z | 2020-12-11T03:01:50.000Z | """
Copyright (c) 2018-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 wri... | 42.955056 | 117 | 0.670939 |
796a08f2e59f14d4299177089a4856bc2763826f | 3,376 | py | Python | tests/test_convert.py | eyeseast/sqlite-utils | 93fa79d30b1531bea281d0eb6b925c4e61bc1aa6 | [
"Apache-2.0"
] | 729 | 2018-07-15T02:13:50.000Z | 2022-03-28T21:54:15.000Z | tests/test_convert.py | eyeseast/sqlite-utils | 93fa79d30b1531bea281d0eb6b925c4e61bc1aa6 | [
"Apache-2.0"
] | 396 | 2018-08-12T22:50:57.000Z | 2022-03-29T23:52:39.000Z | tests/test_convert.py | eyeseast/sqlite-utils | 93fa79d30b1531bea281d0eb6b925c4e61bc1aa6 | [
"Apache-2.0"
] | 65 | 2019-02-01T17:32:18.000Z | 2022-03-10T09:55:46.000Z | from sqlite_utils.db import BadMultiValues
import pytest
@pytest.mark.parametrize(
"columns,fn,expected",
(
(
"title",
lambda value: value.upper(),
{"title": "MIXED CASE", "abstract": "Abstract"},
),
(
["title", "abstract"],
l... | 28.610169 | 85 | 0.557761 |
796a0907dc8465099189dd975316f06e8fd6f309 | 25,950 | py | Python | userbot/plugins/sing.py | Aliensuniquebot/CatUserbot | 93561a620fc1198c6fe6c259412088f4bc81d97b | [
"MIT"
] | 8 | 2020-08-02T10:55:14.000Z | 2021-11-26T14:32:39.000Z | userbot/plugins/sing.py | praveen368/CatUserbot | 4b0cd970551ffaf86b9fdd5da584c1b3882821ff | [
"MIT"
] | 4 | 2020-11-07T07:39:51.000Z | 2020-11-10T03:46:41.000Z | userbot/plugins/sing.py | praveen368/CatUserbot | 4b0cd970551ffaf86b9fdd5da584c1b3882821ff | [
"MIT"
] | 17 | 2020-08-09T02:22:23.000Z | 2022-02-21T14:16:25.000Z | from telethon import events
import asyncio
import os
import sys
import random
from userbot.utils import admin_cmd
@borg.on(admin_cmd(pattern=r"msing$", outgoing=True))
async def _(event):
if event.fwd_from:
return
await event.edit("Singing...")
await asyncio.sleep(2)
x=(random.randrange(1,44))
... | 106.790123 | 613 | 0.607746 |
796a0a2487702b85739b2b46cb385e521668ee92 | 2,032 | py | Python | make_map_cl.py | frongk/sa-air | 4def5f7734a73e6be03ad842e9eb15275c063ab1 | [
"MIT"
] | null | null | null | make_map_cl.py | frongk/sa-air | 4def5f7734a73e6be03ad842e9eb15275c063ab1 | [
"MIT"
] | null | null | null | make_map_cl.py | frongk/sa-air | 4def5f7734a73e6be03ad842e9eb15275c063ab1 | [
"MIT"
] | null | null | null | import pandas
import plotly
import plotly.graph_objs as go
from SECRETS import mapbox_token
MAP_DATA_FILE = 'data/map_data.csv'
LAT_NAME = 'Latitude'
LON_NAME = 'Longitude'
CENTER = (29.419795,-98.4978487)
X_DIFF =
Y_DIFF = 0.018435000000000
PLOT_OUTPUT_NAME = 'plots/test_map.html'
def make_boxes(idx, gps_coord,... | 29.882353 | 74 | 0.498524 |
796a0a6bc062b6f7192ffc2d81edaebcde7576e7 | 1,585 | py | Python | py/acc-client.py/start.py | giuliobosco/domotics | b327a94e319c379148b3a0ec1d840d820bb1c4bd | [
"MIT"
] | 2 | 2019-05-09T14:04:30.000Z | 2019-05-10T07:29:07.000Z | py/acc-client.py/start.py | giuliobosco/domotics | b327a94e319c379148b3a0ec1d840d820bb1c4bd | [
"MIT"
] | null | null | null | py/acc-client.py/start.py | giuliobosco/domotics | b327a94e319c379148b3a0ec1d840d820bb1c4bd | [
"MIT"
] | 1 | 2018-05-29T20:49:50.000Z | 2018-05-29T20:49:50.000Z | """
The MIT License
Copyright 2019 giuliobosco.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... | 41.710526 | 116 | 0.793691 |
796a0b450add0c6724d9a5ee51ed49932e269100 | 14,387 | py | Python | docs/target/sphinx/docutils/writers/s5_html/__init__.py | SergeyParamoshkin/sqoop2 | 504ad690617d570483e5693464e73aa641f61fb0 | [
"Apache-2.0"
] | 1 | 2015-03-22T16:49:07.000Z | 2015-03-22T16:49:07.000Z | docs/target/sphinx/docutils/writers/s5_html/__init__.py | SergeyParamoshkin/sqoop2 | 504ad690617d570483e5693464e73aa641f61fb0 | [
"Apache-2.0"
] | null | null | null | docs/target/sphinx/docutils/writers/s5_html/__init__.py | SergeyParamoshkin/sqoop2 | 504ad690617d570483e5693464e73aa641f61fb0 | [
"Apache-2.0"
] | null | null | null | # $Id: __init__.py 7025 2011-05-05 23:19:51Z milde $
# Authors: Chris Liechti <cliechti@gmx.net>;
# David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
S5/HTML Slideshow Writer.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import re
import do... | 41.341954 | 80 | 0.578717 |
796a0b8231a1ba5e94e84bb083a60a754bda986f | 177 | py | Python | pyxrd/__version.py | Haiqian-MA/PyXRD | 27966da2270310ced9cce8c25c5b7c9d8de301dc | [
"BSD-2-Clause"
] | null | null | null | pyxrd/__version.py | Haiqian-MA/PyXRD | 27966da2270310ced9cce8c25c5b7c9d8de301dc | [
"BSD-2-Clause"
] | null | null | null | pyxrd/__version.py | Haiqian-MA/PyXRD | 27966da2270310ced9cce8c25c5b7c9d8de301dc | [
"BSD-2-Clause"
] | null | null | null | # coding=UTF-8
# ex:ts=4:sw=4:et=on
# Copyright (c) 2013, Mathijs Dumon
# All rights reserved.
# Complete license can be found in the LICENSE file.
__version__ = "0.8.2"
| 12.642857 | 52 | 0.677966 |
796a0c542e6230603a78d755d00239a52d43226d | 687 | py | Python | {{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name }}/base/arch.py | gpnlab/cookiecutter-gpnlab | dd6e949fe2a203c77f6ea30e84c95f0306c7b64e | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name }}/base/arch.py | gpnlab/cookiecutter-gpnlab | dd6e949fe2a203c77f6ea30e84c95f0306c7b64e | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name }}/base/arch.py | gpnlab/cookiecutter-gpnlab | dd6e949fe2a203c77f6ea30e84c95f0306c7b64e | [
"MIT"
] | null | null | null | import torch.nn as nn
import numpy as np
__all__ = ['BaseArch']
class BaseArch(nn.Module):
"""
Base class for all models
"""
def __init__(self):
super().__init__()
def forward(self, *input):
"""
Forward pass logic
Returns
-------
Model output
... | 21.46875 | 79 | 0.573508 |
796a0ccd87412333de6c4b3f696bdf2d4145a572 | 138 | py | Python | delivery-wp/delivery/ext/hooks.py | Wprosdocimo/curso-flask | d7093793bdd4a9da236ab1766606e46d5e4c7369 | [
"Unlicense"
] | null | null | null | delivery-wp/delivery/ext/hooks.py | Wprosdocimo/curso-flask | d7093793bdd4a9da236ab1766606e46d5e4c7369 | [
"Unlicense"
] | null | null | null | delivery-wp/delivery/ext/hooks.py | Wprosdocimo/curso-flask | d7093793bdd4a9da236ab1766606e46d5e4c7369 | [
"Unlicense"
] | null | null | null | def init_app(app):
@app.before_first_request
def init_everything():
print("Isto roda sempre antes do primeiro request!!" ) | 34.5 | 62 | 0.695652 |
796a0cce3506f275a0cc85e563707510fd5f3181 | 337 | py | Python | wafw00f/plugins/cdnns.py | biscuitehh/wafw00f | b1a08122ea3d65e2aaaa5120231cca6c37851c5b | [
"BSD-3-Clause"
] | 1 | 2020-01-17T08:09:48.000Z | 2020-01-17T08:09:48.000Z | wafw00f/plugins/cdnns.py | tlsloves/wafw00f | 9682cdbdffc78150719b58390f8c5552b40a40b6 | [
"BSD-3-Clause"
] | null | null | null | wafw00f/plugins/cdnns.py | tlsloves/wafw00f | 9682cdbdffc78150719b58390f8c5552b40a40b6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
'''
Copyright (C) 2019, WAFW00F Developers.
See the LICENSE file for copying permission.
'''
NAME = 'CdnNS Application Gateway (CdnNs/WdidcNet)'
def is_waf(self):
schemes = [
self.matchContent(r'cdnnswaf application gateway')
]
if any(i for i in schemes):
return True... | 21.0625 | 58 | 0.670623 |
796a0d9f32f082d4449acdd2f9addd8f5584c7b6 | 14,945 | py | Python | agar/image.py | Khan/agar | 77ff2ccd79001630f74f04ce252faa408e7686a6 | [
"MIT"
] | 1 | 2015-07-22T15:58:06.000Z | 2015-07-22T15:58:06.000Z | agar/image.py | agostodev/agar | 66b7937a35ae93717d5e9683c7dc7c80c4bcc5d6 | [
"MIT"
] | null | null | null | agar/image.py | agostodev/agar | 66b7937a35ae93717d5e9683c7dc7c80c4bcc5d6 | [
"MIT"
] | null | null | null | """
The ``agar.image`` module contains classes to help work with images stored in the `Blobstore`_.
"""
from __future__ import with_statement
import logging
import mimetypes
import urlparse
from google.appengine.api import images, memcache, files, urlfetch
from google.appengine.api.images import NotImageError
from ... | 41.513889 | 125 | 0.63098 |
796a0e6d39b0a5574f2af7e850242d54dbc652c7 | 883 | py | Python | webapp/database/postgresql_search.py | lucuma/vd-flask | 4b545f02e0fed4d981c1e99d727d89f3826cf3ab | [
"BSD-3-Clause"
] | 4 | 2015-08-08T20:42:35.000Z | 2015-08-27T14:22:31.000Z | webapp/database/postgresql_search.py | lucuma/vd-flask | 4b545f02e0fed4d981c1e99d727d89f3826cf3ab | [
"BSD-3-Clause"
] | null | null | null | webapp/database/postgresql_search.py | lucuma/vd-flask | 4b545f02e0fed4d981c1e99d727d89f3826cf3ab | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
from sqlalchemy_searchable import search, make_searchable
from ..import config
from ..helpers.slugify import slugify
PLURALS = (u'as', u'es', u'is', u'os', u'us')
def prepare_term(term):
if term.endswith(PLURALS):
term = term[:-2]
elif len(term) > 4:
term = term[:-1]
retu... | 22.641026 | 57 | 0.651189 |
796a0f225f99793bd26e5857ec800d0b75b20c01 | 1,291 | py | Python | apache_spark/sparkflow_test.py | maksymx/ml_dl_ds_cv_snippets | ebb4ec5e97f52e55e97f3c8c71cf375da7a30dc5 | [
"MIT"
] | null | null | null | apache_spark/sparkflow_test.py | maksymx/ml_dl_ds_cv_snippets | ebb4ec5e97f52e55e97f3c8c71cf375da7a30dc5 | [
"MIT"
] | null | null | null | apache_spark/sparkflow_test.py | maksymx/ml_dl_ds_cv_snippets | ebb4ec5e97f52e55e97f3c8c71cf375da7a30dc5 | [
"MIT"
] | null | null | null | import tensorflow as tf
from pyspark.ml.feature import VectorAssembler, OneHotEncoder
from pyspark.ml.pipeline import Pipeline
from sparkflow.graph_utils import build_graph
from sparkflow.tensorflow_async import SparkAsyncDL
# simple tensorflow network
def small_model():
x = tf.placeholder(tf.float32, shape=[None... | 31.487805 | 75 | 0.71495 |
796a0f57e447fe3e814d1495a9c1ada6275d07e1 | 19,250 | py | Python | rpython/rlib/rfile.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 34 | 2015-07-09T04:53:27.000Z | 2021-07-19T05:22:27.000Z | rpython/rlib/rfile.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 6 | 2015-05-30T17:20:45.000Z | 2017-06-12T14:29:23.000Z | rpython/rlib/rfile.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 11 | 2015-09-07T14:26:08.000Z | 2020-04-10T07:20:41.000Z | """ This file makes open() and friends RPython. Note that RFile should not
be used directly and instead it's magically appearing each time you call
python builtin open()
"""
import os, stat, errno, sys
from rpython.rlib import rposix
from rpython.rlib.objectmodel import enforceargs
from rpython.rlib.rarithmetic import... | 34.375 | 92 | 0.536468 |
796a102d9a22e96ae62a29511b725bb8a817e7c3 | 14,650 | py | Python | torch/distributed/fsdp/flatten_params_wrapper.py | VincentLeeMax/pytorch | 5e6f29661254e5ebc97fac3d829e5d455cda5864 | [
"Intel"
] | 1 | 2022-02-11T22:13:17.000Z | 2022-02-11T22:13:17.000Z | torch/distributed/fsdp/flatten_params_wrapper.py | VincentLeeMax/pytorch | 5e6f29661254e5ebc97fac3d829e5d455cda5864 | [
"Intel"
] | null | null | null | torch/distributed/fsdp/flatten_params_wrapper.py | VincentLeeMax/pytorch | 5e6f29661254e5ebc97fac3d829e5d455cda5864 | [
"Intel"
] | 1 | 2022-02-10T15:00:33.000Z | 2022-02-10T15:00:33.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright (c) Tongzhou Wang
# Licensed under the MIT License.
from itertools import accumulate
from typing import (
Any,
Dict,
... | 39.918256 | 110 | 0.622184 |
796a125755a85e69c4b6e449309ffc7765c67c91 | 36,233 | py | Python | dohq_artifactory/admin.py | milanbalazs/artifactory | 312fa461126f55536841fbcbc233ce685f222751 | [
"MIT"
] | null | null | null | dohq_artifactory/admin.py | milanbalazs/artifactory | 312fa461126f55536841fbcbc233ce685f222751 | [
"MIT"
] | null | null | null | dohq_artifactory/admin.py | milanbalazs/artifactory | 312fa461126f55536841fbcbc233ce685f222751 | [
"MIT"
] | null | null | null | import logging
import random
import re
import string
import sys
import time
import jwt
import requests
from dateutil.parser import isoparse
from dohq_artifactory.exception import ArtifactoryException
def rest_delay():
time.sleep(0.5)
def raise_errors(r):
try:
r.raise_for_status()
except reques... | 30.576371 | 193 | 0.572489 |
796a1291903108fb07705d51e6b36899f9f64669 | 6,807 | py | Python | genespector/app.py | Iwo-K/genespector | 58881e3cb12ddbb78fae4f12ce35c5ada34b8a36 | [
"MIT"
] | null | null | null | genespector/app.py | Iwo-K/genespector | 58881e3cb12ddbb78fae4f12ce35c5ada34b8a36 | [
"MIT"
] | null | null | null | genespector/app.py | Iwo-K/genespector | 58881e3cb12ddbb78fae4f12ce35c5ada34b8a36 | [
"MIT"
] | 1 | 2020-05-26T16:12:49.000Z | 2020-05-26T16:12:49.000Z | # Importing modules
import dash
from dash import html
from dash import dcc
import pandas as pd
import plotly.graph_objs as go
import numpy as np
from .import_fun import import_adata
import sys
from .layout import make_layout
import scanpy as sc
from pathlib import Path
from anndata import AnnData
# Function for runnin... | 31.808411 | 85 | 0.492728 |
796a132e383168c98ba62d76c073030d6d51be0b | 9,237 | py | Python | thesis/src/scripts/scope_postprocess_32.py | gmonce/bioscope | b5ad3b5a769b92ef071954c6ff9fc0ebf5b6d4e3 | [
"MIT"
] | 1 | 2022-03-30T09:24:01.000Z | 2022-03-30T09:24:01.000Z | thesis/src/scripts/scope_postprocess_32.py | gmonce/bioscope | b5ad3b5a769b92ef071954c6ff9fc0ebf5b6d4e3 | [
"MIT"
] | 1 | 2020-04-07T20:42:23.000Z | 2020-04-11T17:06:53.000Z | thesis/src/scripts/scope_postprocess_32.py | gmonce/bioscope | b5ad3b5a769b92ef071954c6ff9fc0ebf5b6d4e3 | [
"MIT"
] | 1 | 2022-03-30T09:24:04.000Z | 2022-03-30T09:24:04.000Z | # -*- coding: utf-8 -*-
# Script que lee un archivo en formato conll y le modifica la últimas columna, asumiendo que tiene un scope en formato
# Para eso aplica las reglas de morante2009 y lo pasa a formato bio
# al final hay un valor /num que indica la confianza
# También asume que el campo -2 es la hedge cue (esto ... | 26.543103 | 144 | 0.708888 |
796a141619ef3f9b63e4144ae9201bbd49f807fa | 2,491 | py | Python | pythononwheels/start/generate_observer.py | rosegold-byte/pow_devel | d983fec72724ede13a9ff587cfba39fc2d6d0d8b | [
"MIT"
] | 24 | 2015-08-06T07:32:00.000Z | 2022-03-24T22:05:01.000Z | pythononwheels/start/generate_observer.py | rosegold-byte/pow_devel | d983fec72724ede13a9ff587cfba39fc2d6d0d8b | [
"MIT"
] | 37 | 2017-04-14T19:16:40.000Z | 2021-08-17T21:05:51.000Z | pythononwheels/start/generate_observer.py | rosegold-byte/pow_devel | d983fec72724ede13a9ff587cfba39fc2d6d0d8b | [
"MIT"
] | 2 | 2016-05-25T08:29:32.000Z | 2020-11-21T10:44:31.000Z | #
# generate model observer
#
import argparse
import tornado.template as template
import os
from {{appname}}.conf.config import templates
from {{appname}}.lib.powlib import pluralize
from pydoc import locate
def camel_case(name):
"""
converts this_is_new to ThisIsNew
and this in This
"""
r... | 30.753086 | 104 | 0.563228 |
796a152ba5082c9b14cba66c0d20cb4e36e94812 | 1,138 | py | Python | legipy/services/law_service.py | nicolasleger/legipy | dc7c36fc225baba4142b720926c0cdf7db156e00 | [
"MIT"
] | null | null | null | legipy/services/law_service.py | nicolasleger/legipy | dc7c36fc225baba4142b720926c0cdf7db156e00 | [
"MIT"
] | null | null | null | legipy/services/law_service.py | nicolasleger/legipy | dc7c36fc225baba4142b720926c0cdf7db156e00 | [
"MIT"
] | null | null | null | # coding: utf-8
import requests
from ..common import servlet_url
from ..parsers import (parse_pending_law_list, parse_published_law_list,
parse_law)
class LawService:
pub_url = servlet_url('affichLoiPubliee')
pend_url = servlet_url('affichLoiPreparation')
def pending_laws(self, l... | 28.45 | 72 | 0.595782 |
796a1697e2b97fa191fcaa56cba2d6a46aa265a8 | 967 | py | Python | academics/migrations/0008_auto_20151203_0906.py | rectory-school/rectory-apps | 184021529ac9cadc3b7c0fbf93a023c82fc76b91 | [
"MIT"
] | null | null | null | academics/migrations/0008_auto_20151203_0906.py | rectory-school/rectory-apps | 184021529ac9cadc3b7c0fbf93a023c82fc76b91 | [
"MIT"
] | 5 | 2020-06-05T17:33:12.000Z | 2021-06-10T19:04:41.000Z | academics/migrations/0008_auto_20151203_0906.py | rectory-school/rectory-apps | 184021529ac9cadc3b7c0fbf93a023c82fc76b91 | [
"MIT"
] | 1 | 2016-02-08T15:53:28.000Z | 2016-02-08T15:53:28.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('academics', '0007_auto_20151203_0903'),
]
operations = [
migrations.RemoveField(
model_name='dorm',
... | 24.794872 | 62 | 0.537746 |
796a1784c3c9045b66a1d5fdd8411a27fa1ce24a | 1,339 | py | Python | src/TheLanguage/Parser/Statements/UnitTests/ScopedRefStatementParserInfo_UnitTest.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | null | null | null | src/TheLanguage/Parser/Statements/UnitTests/ScopedRefStatementParserInfo_UnitTest.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | null | null | null | src/TheLanguage/Parser/Statements/UnitTests/ScopedRefStatementParserInfo_UnitTest.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | 1 | 2021-06-18T18:58:57.000Z | 2021-06-18T18:58:57.000Z | # ----------------------------------------------------------------------
# |
# | ScopedRefStatementParserInfo_UnitTest.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2021-10-04 09:10:56
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2... | 36.189189 | 103 | 0.465273 |
796a1a4d4c865ad560be9167f117b3e393ebbbd2 | 2,676 | py | Python | data/cirq_new/cirq_program/startCirq_pragma359.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_pragma359.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_pragma359.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=16
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
class Opty(cirq.PointOptimizer):
def optimization_at(
... | 32.634146 | 92 | 0.64574 |
796a1b2a58d353fd31a20bf343fc7f4cee86d77b | 2,559 | py | Python | regression_model_1.py | sahilsngh/hackthon.py | 12c75d6fe30527e7f15aab3ca4bb50d5abe9ff1d | [
"MIT"
] | 3 | 2020-11-02T07:58:22.000Z | 2021-09-13T19:40:15.000Z | regression_model_1.py | sahilsngh/hackthon.py | 12c75d6fe30527e7f15aab3ca4bb50d5abe9ff1d | [
"MIT"
] | null | null | null | regression_model_1.py | sahilsngh/hackthon.py | 12c75d6fe30527e7f15aab3ca4bb50d5abe9ff1d | [
"MIT"
] | 2 | 2020-11-02T07:58:29.000Z | 2020-12-12T08:26:03.000Z | ''' This model is trained on SciLearn in python by Sahil Chauhan.
In this model python uses its pandas library to extract the data_frame.
The data_frame consist of more than 50k entries over time of features
Diamond and also consist of its price in Rupeees (was in USD).
The data_frame is provided by... | 32.807692 | 132 | 0.665494 |
796a1bc7c30da5691ad05b919e45b606014cd2ac | 1,922 | py | Python | statzcw/stats.py | tianxianglan01/Py21-BasicStats | a8c86afc62bdc8174b3c12fe646c3a6a6bd94d7c | [
"MIT"
] | null | null | null | statzcw/stats.py | tianxianglan01/Py21-BasicStats | a8c86afc62bdc8174b3c12fe646c3a6a6bd94d7c | [
"MIT"
] | null | null | null | statzcw/stats.py | tianxianglan01/Py21-BasicStats | a8c86afc62bdc8174b3c12fe646c3a6a6bd94d7c | [
"MIT"
] | null | null | null |
from typing import List
import math
# ./tt runs the test
def zcount(list: List[float]) -> float:
return len(list)
# print("stats test")
# print("zcount should be 5 ==", zcount([1.0,2.0,3.0,4.0,5.0]))
def zmean(list: List[float]) -> float:
return sum(list) / zcount(list)
def zmode(list: List[float]) -> fl... | 24.641026 | 65 | 0.574922 |
796a1c1ecc298866aba86a76283fd36a20ac46bc | 4,304 | py | Python | backend/src/neurodex/data/schema.py | jonas-jonas/neurodex | 77e5ce924ec6926de652a80efcbf61844cb13de8 | [
"MIT"
] | 3 | 2019-12-20T14:07:58.000Z | 2020-03-11T09:11:12.000Z | backend/src/neurodex/data/schema.py | jonas-jonas/neurodex | 77e5ce924ec6926de652a80efcbf61844cb13de8 | [
"MIT"
] | 33 | 2019-12-16T20:18:55.000Z | 2022-02-27T03:41:25.000Z | backend/src/neurodex/data/schema.py | jonas-jonas/neurodex | 77e5ce924ec6926de652a80efcbf61844cb13de8 | [
"MIT"
] | null | null | null | from neurodex import ma
from neurodex.util import camelcase
from .models import (Function, FunctionParameter, LayerType,
LayerTypeParameter, Model, ModelActivator, ModelLayer,
ModelLayerParameterData, Role, User, Value)
class CamelCaseSchema(ma.SQLAlchemyAutoSchema):
"""... | 27.948052 | 97 | 0.685874 |
796a1c364ad364eb27feb0352073665587c4dd32 | 1,777 | py | Python | Algorithms/Strings/RichieRich.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Strings/RichieRich.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Strings/RichieRich.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
n, k = map(int, raw_input().split())
num = raw_input()
if n == 1:
if k:
print 9
else:
print num
else:
cha_set = set()
is_possible = 1
half = n / 2
mid = num[half] if n%2 != 0 else ''
left = list(num[:half])
right = list(num[-half:])
if k >= n:
... | 27.765625 | 53 | 0.315138 |
796a1c3a4af8164e1ecac1514267dbb907b0ba8b | 1,963 | py | Python | entry/settings_dev.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | entry/settings_dev.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | entry/settings_dev.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | """
Django settings for flex travels activity project.
Generated by 'django-admin startproject' using Django 2.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""... | 24.848101 | 107 | 0.623026 |
796a1c3f8af66cc464093dd3cd15dd24d726e476 | 30,395 | py | Python | src/_pytest/logging.py | SauravMaheshkar/pytest | 96376ac79c7d3c087eba8b33e30d15586fa55296 | [
"MIT"
] | 9,225 | 2015-06-15T21:56:14.000Z | 2022-03-31T20:47:38.000Z | src/_pytest/logging.py | SauravMaheshkar/pytest | 96376ac79c7d3c087eba8b33e30d15586fa55296 | [
"MIT"
] | 7,794 | 2015-06-15T21:06:34.000Z | 2022-03-31T10:56:54.000Z | src/_pytest/logging.py | asottile/pytest | fc0cf2fe710f699d6b34284ec4a1b6361b91e679 | [
"MIT"
] | 2,598 | 2015-06-15T21:42:39.000Z | 2022-03-29T13:48:22.000Z | """Access and control log capturing."""
import io
import logging
import os
import re
import sys
from contextlib import contextmanager
from io import StringIO
from pathlib import Path
from typing import AbstractSet
from typing import Dict
from typing import Generator
from typing import List
from typing import Mapping
fr... | 36.314217 | 118 | 0.643329 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.