hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cd2e19109854e4ff0e813ff50d354be4abb8b912 | 3,502 | py | Python | sdks/python/http_client/v1/polyaxon_sdk/models/spark_deploy_mode.py | vishalbelsare/polyaxon | aa02c6a62f7c0ef64eed048d9f3ba2be92984b6c | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/spark_deploy_mode.py | vishalbelsare/polyaxon | aa02c6a62f7c0ef64eed048d9f3ba2be92984b6c | [
"Apache-2.0"
] | 51 | 2021-04-06T07:59:21.000Z | 2022-03-29T01:08:22.000Z | sdks/python/http_client/v1/polyaxon_sdk/models/spark_deploy_mode.py | vishalbelsare/polyaxon | aa02c6a62f7c0ef64eed048d9f3ba2be92984b6c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | 29.428571 | 74 | 0.611936 |
d4dfc40677b7887d648818b64cba3852a7720177 | 14,840 | py | Python | test.py | EthanHaque/image_augmentor | 1c471d1ddc9d40ae4e8a255c76055f95bcba9895 | [
"BSD-2-Clause"
] | 1 | 2021-04-11T22:07:02.000Z | 2021-04-11T22:07:02.000Z | test.py | EthanHaque/image_augmentor | 1c471d1ddc9d40ae4e8a255c76055f95bcba9895 | [
"BSD-2-Clause"
] | null | null | null | test.py | EthanHaque/image_augmentor | 1c471d1ddc9d40ae4e8a255c76055f95bcba9895 | [
"BSD-2-Clause"
] | null | null | null | import augmentor
import os
import numpy as np
from matplotlib import pyplot as plt
import cv2
def get_directory_contents(directory_path):
"""
Gets the file paths of all the items in a directory.
:param directory_path: Path to the directory.
:return: The list of the absolute file paths to the files in... | 25.853659 | 118 | 0.674191 |
671b5b0e11d18f552b57678e1c67f6a745d46d93 | 79 | py | Python | shopify/resources/location.py | SachinTitus/shopify_python_api | 134de8e61639957050c73da1eddbaec847c4b8cd | [
"MIT"
] | null | null | null | shopify/resources/location.py | SachinTitus/shopify_python_api | 134de8e61639957050c73da1eddbaec847c4b8cd | [
"MIT"
] | null | null | null | shopify/resources/location.py | SachinTitus/shopify_python_api | 134de8e61639957050c73da1eddbaec847c4b8cd | [
"MIT"
] | null | null | null | from ..base import ShopifyResource
class Location(ShopifyResource):
pass
| 13.166667 | 34 | 0.772152 |
2508db7701f3f1c23523236935f7594cef469267 | 334 | py | Python | Exercicios-Python/CursoEmVideo/ex011.py | bruno1906/ExerciciosPython | af657fb8083bc60b80d35d0d9f66495a2f1e3b43 | [
"MIT"
] | null | null | null | Exercicios-Python/CursoEmVideo/ex011.py | bruno1906/ExerciciosPython | af657fb8083bc60b80d35d0d9f66495a2f1e3b43 | [
"MIT"
] | null | null | null | Exercicios-Python/CursoEmVideo/ex011.py | bruno1906/ExerciciosPython | af657fb8083bc60b80d35d0d9f66495a2f1e3b43 | [
"MIT"
] | null | null | null | print('Quantos litros de tinta vc precisa para pintar uma parede?')
#Levando em conta que para cada 2 metros quadrados é necessario um litro de tinta
l=float(input('Qual a largura da parede?'))
a=float(input('Qual a altura da parede?'))
ar=l*a
t=ar/2
print('Para pintar essa parede vc vai precisar de {} litros de tinta!... | 37.111111 | 81 | 0.742515 |
19af5d5604c9f5cc87c564167bd6ab52897504ec | 3,279 | py | Python | contrib/zmq/zmq_sub3.4.py | danigarcia3k/Sikacoin | 82ef600cfeed1d8f163df6071d8d080fb9dac6b0 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_sub3.4.py | danigarcia3k/Sikacoin | 82ef600cfeed1d8f163df6071d8d080fb9dac6b0 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_sub3.4.py | danigarcia3k/Sikacoin | 82ef600cfeed1d8f163df6071d8d080fb9dac6b0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Sikacoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Sikacoin should be started with the command line argume... | 36.433333 | 109 | 0.649283 |
43c7454e5c9b63eff6612433cf15e464f3062b55 | 36,087 | py | Python | test/functional/rpc_psbt.py | TalerCash/taler | 56d8e0115c167d7e1627785fc9b98fab9053341e | [
"MIT"
] | 5 | 2020-12-07T20:09:55.000Z | 2021-01-23T17:31:43.000Z | test/functional/rpc_psbt.py | TalerCash/taler | 56d8e0115c167d7e1627785fc9b98fab9053341e | [
"MIT"
] | null | null | null | test/functional/rpc_psbt.py | TalerCash/taler | 56d8e0115c167d7e1627785fc9b98fab9053341e | [
"MIT"
] | 4 | 2021-01-30T03:08:16.000Z | 2021-06-25T10:31:02.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the Partially Signed Transaction RPCs.
"""
from decimal import Decimal
from test_framework.test_f... | 61.477002 | 584 | 0.675922 |
6160f4f680a600df7c42734612f05c071d77be2c | 1,036 | py | Python | App_directory/AdlyApp.py | sebcampos/Adly | 13a0eacb52f13f42e7fba5f1e53d1bd4980eec60 | [
"MIT"
] | null | null | null | App_directory/AdlyApp.py | sebcampos/Adly | 13a0eacb52f13f42e7fba5f1e53d1bd4980eec60 | [
"MIT"
] | null | null | null | App_directory/AdlyApp.py | sebcampos/Adly | 13a0eacb52f13f42e7fba5f1e53d1bd4980eec60 | [
"MIT"
] | null | null | null | #!/usr/local/Caskroom/miniconda/base/envs/adly_venv/bin/python
#imported dependancies
from kivy.app import App
from kivy.lang import Builder
from kivy.config import Config
#Our objects for Adly
from AdlyObjs import *
#Set out App to resizeable for Mobile functionality
Config.set("graphics", "resizable", True)
#... | 25.268293 | 89 | 0.67471 |
482dc7f8b92eeaa3edd194682b07c9c41dd40c62 | 1,449 | py | Python | models/node.py | daniyalahmad358/Wordy | e957e742327010ce3ca133c9e1d1557b673e6d8f | [
"Unlicense"
] | null | null | null | models/node.py | daniyalahmad358/Wordy | e957e742327010ce3ca133c9e1d1557b673e6d8f | [
"Unlicense"
] | null | null | null | models/node.py | daniyalahmad358/Wordy | e957e742327010ce3ca133c9e1d1557b673e6d8f | [
"Unlicense"
] | null | null | null | class Node:
def __init__(self, val, parent=None) -> None:
self.__data = val
self.__parent = parent
self.__left = None
self.__right = None
self.__height = 0
def get_data(self):
return self.__data
def set_data(self, val) -> None:
self.__data = val
... | 23.754098 | 68 | 0.584541 |
e84a41132a54d413ce10ddff5208f73fd503e4b9 | 437 | py | Python | lcd/pin_mapping.py | maystar/I2C_HD77480_LCD | caa3922a37bca4aaa87c999352f37468980d6884 | [
"MIT"
] | null | null | null | lcd/pin_mapping.py | maystar/I2C_HD77480_LCD | caa3922a37bca4aaa87c999352f37468980d6884 | [
"MIT"
] | null | null | null | lcd/pin_mapping.py | maystar/I2C_HD77480_LCD | caa3922a37bca4aaa87c999352f37468980d6884 | [
"MIT"
] | null | null | null | from enum import Enum
class PinMapping(Enum):
"""
Supports two variants of pin mappings:
| | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| -------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| Variant 1 | D7 | D6 | D5 | D4 | BL | EN | RW | RS |... | 31.214286 | 73 | 0.322654 |
7fd716856be8ce979cc8407fea13a3fcf359c8e8 | 1,960 | py | Python | docs/tutorial_Ni.py | ornlneutronimaging/braggedgemodeling | 6bf49b008cae5707f3c950e4a4d574211f201976 | [
"MIT"
] | 1 | 2019-03-27T13:38:24.000Z | 2019-03-27T13:38:24.000Z | docs/tutorial_Ni.py | ornlneutronimaging/braggedgemodeling | 6bf49b008cae5707f3c950e4a4d574211f201976 | [
"MIT"
] | 32 | 2018-02-15T18:03:34.000Z | 2022-02-09T14:59:55.000Z | docs/tutorial_Ni.py | ornlneutronimaging/braggedgemodeling | 6bf49b008cae5707f3c950e4a4d574211f201976 | [
"MIT"
] | null | null | null | from bem.matter import Atom, Lattice, Structure
atoms = [Atom('Ni', (0,0,0)), Atom('Ni', (0.5, 0.5, 0)),
Atom('Ni', (0.5,0,0.5)), Atom('Ni', (0, 0.5, 0.5))]
a=3.5238
alpha = 90.
lattice = Lattice(a=a, b=a, c=a, alpha=alpha, beta=alpha, gamma=alpha)
fccNi = Structure(atoms, lattice, sgid=225)
# define waveleng... | 35 | 85 | 0.754592 |
e65b6b6ba7611ac173fa54d46271beea0c356a87 | 9,646 | py | Python | util/tlgen/elaborate.py | wxjstz/opentitan | 6ff4397bac9c07373d735bd859c7ef8de39c2af8 | [
"Apache-2.0"
] | null | null | null | util/tlgen/elaborate.py | wxjstz/opentitan | 6ff4397bac9c07373d735bd859c7ef8de39c2af8 | [
"Apache-2.0"
] | 1 | 2020-10-30T06:30:51.000Z | 2020-10-30T06:30:51.000Z | util/tlgen/elaborate.py | wxjstz/opentitan | 6ff4397bac9c07373d735bd859c7ef8de39c2af8 | [
"Apache-2.0"
] | 1 | 2019-12-13T00:52:40.000Z | 2019-12-13T00:52:40.000Z | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import logging as log
from .item import Node, NodeType
from .xbar import Xbar
def elaborate(xbar: Xbar) -> bool:
"""elaborate reads all nodes and edges then
cons... | 38.430279 | 90 | 0.590608 |
2b0e33f4d77c89b608b07ea57cf6b6e9232bc81a | 2,122 | py | Python | neighbour/migrations/0001_initial.py | njoroge-jane/neighbourhood | 18d6c10aaa2242964bfb09a8d7f76b9db2158f1b | [
"MIT"
] | null | null | null | neighbour/migrations/0001_initial.py | njoroge-jane/neighbourhood | 18d6c10aaa2242964bfb09a8d7f76b9db2158f1b | [
"MIT"
] | null | null | null | neighbour/migrations/0001_initial.py | njoroge-jane/neighbourhood | 18d6c10aaa2242964bfb09a8d7f76b9db2158f1b | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-21 19:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 45.148936 | 188 | 0.613572 |
cc61e2e6b9f458492792354f242cc0e1f8ccc802 | 7,146 | py | Python | obsidian/find_rings.py | jmp1985/obsidian | b1e1fb117aca6b027cdae4115a27c6cd6012c90a | [
"BSD-2-Clause"
] | null | null | null | obsidian/find_rings.py | jmp1985/obsidian | b1e1fb117aca6b027cdae4115a27c6cd6012c90a | [
"BSD-2-Clause"
] | null | null | null | obsidian/find_rings.py | jmp1985/obsidian | b1e1fb117aca6b027cdae4115a27c6cd6012c90a | [
"BSD-2-Clause"
] | null | null | null | '''
Process data and search for rings
'''
import os, sys, getopt, pickle, time, datetime
from glob import glob
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from obsidian.utils.imgdisp import ImgDisp
from obsidian.utils.data_handling import make_frame
from obsidian.oimp.oimp_main import pipe, ... | 34.028571 | 95 | 0.673104 |
df3494e7cfddbefb264044508e73e0c3d2e4d4c8 | 1,484 | py | Python | src/sw/allotmentclub/alembic/versions/update_member_chaos_5fe4feac157.py | sweh/sw.allotmentclub.backend | 77344045e29c2b173d635e9e20a0ca556161888e | [
"ZPL-2.1"
] | 1 | 2019-11-12T08:13:18.000Z | 2019-11-12T08:13:18.000Z | src/sw/allotmentclub/alembic/versions/update_member_chaos_5fe4feac157.py | sweh/sw.allotmentclub.backend | 77344045e29c2b173d635e9e20a0ca556161888e | [
"ZPL-2.1"
] | 26 | 2020-05-16T12:08:25.000Z | 2022-03-12T00:53:57.000Z | src/sw/allotmentclub/alembic/versions/update_member_chaos_5fe4feac157.py | sweh/sw.allotmentclub.backend | 77344045e29c2b173d635e9e20a0ca556161888e | [
"ZPL-2.1"
] | null | null | null | """Update member chaos
Revision ID: 5fe4feac157
Revises: 17b7b9cfd7e8
Create Date: 2015-04-01 12:41:15.669249
"""
# revision identifiers, used by Alembic.
from alembic import op
revision = '5fe4feac157'
down_revision = '17b7b9cfd7e8'
def upgrade():
op.execute("""UPDATE allotment SET member_id = 186 WHERE id =... | 39.052632 | 76 | 0.646226 |
5e5ad33097269818b04e85373bda42f1c45d497f | 7,419 | py | Python | models_jittor/wave_mlp.py | liuruiyang98/Jittor-MLP | b86656b65cf5f18ba9eb760d1f7565ed95e7e96e | [
"MIT"
] | 49 | 2021-10-06T11:22:19.000Z | 2022-03-25T03:01:10.000Z | models_jittor/wave_mlp.py | liuruiyang98/Jittor-MLP | b86656b65cf5f18ba9eb760d1f7565ed95e7e96e | [
"MIT"
] | 2 | 2021-11-08T08:06:35.000Z | 2022-02-18T09:23:07.000Z | models_jittor/wave_mlp.py | liuruiyang98/Jittor-MLP | b86656b65cf5f18ba9eb760d1f7565ed95e7e96e | [
"MIT"
] | 7 | 2021-10-10T03:25:27.000Z | 2022-03-08T10:44:15.000Z | import jittor as jt
from jittor import nn
from jittor import Module
from jittor import init
from .utils import trunc_normal_
############################################## Drop Path ##############################################
def drop_path(x, drop_prob: float = 0., training: bool = False):
"""
Obtained fr... | 33.722727 | 120 | 0.56881 |
9b2c4aadfad3f4410aee6beec10752e66711cc5c | 23,973 | py | Python | test/test_util.py | Kerilk/ConfigSpace | b2fe51e7f03cc080640093d30bbaaa76a11a3b59 | [
"BSD-3-Clause"
] | null | null | null | test/test_util.py | Kerilk/ConfigSpace | b2fe51e7f03cc080640093d30bbaaa76a11a3b59 | [
"BSD-3-Clause"
] | null | null | null | test/test_util.py | Kerilk/ConfigSpace | b2fe51e7f03cc080640093d30bbaaa76a11a3b59 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2014-2016, ConfigSpace developers
# Matthias Feurer
# Katharina Eggensperger
# and others (see commit history).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributi... | 48.626775 | 99 | 0.630209 |
2bb05e79ae215e0ae1d86c0349312a87f27c261b | 399 | py | Python | nearbyshops/wsgi.py | kurniantoska/geodjangostart | 91defa1093e13d4e71fe28de7b11e380ab697079 | [
"MIT"
] | null | null | null | nearbyshops/wsgi.py | kurniantoska/geodjangostart | 91defa1093e13d4e71fe28de7b11e380ab697079 | [
"MIT"
] | null | null | null | nearbyshops/wsgi.py | kurniantoska/geodjangostart | 91defa1093e13d4e71fe28de7b11e380ab697079 | [
"MIT"
] | null | null | null | """
WSGI config for nearbyshops project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_S... | 23.470588 | 78 | 0.789474 |
361ab4163388ce8ed1e4fdf16329f5f6da3adaf8 | 5,165 | py | Python | scripts/create_split.py | yanzhicong/mixmatch | 4903dcc10ce73f3afc9c9c1b1392cc6def7f83bc | [
"Apache-2.0"
] | null | null | null | scripts/create_split.py | yanzhicong/mixmatch | 4903dcc10ce73f3afc9c9c1b1392cc6def7f83bc | [
"Apache-2.0"
] | null | null | null | scripts/create_split.py | yanzhicong/mixmatch | 4903dcc10ce73f3afc9c9c1b1392cc6def7f83bc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 35.868056 | 117 | 0.606196 |
0fc704ebd63fe976817b08f19201daa5243b4272 | 2,994 | py | Python | Winston/boilerplate-arithmetic-formatter/test_module.py | gfoo003/programming-together | 225e0a2255dd8da1f1ef32d2a88deea27c050f10 | [
"MIT"
] | 2 | 2021-03-20T02:07:19.000Z | 2021-03-20T02:07:26.000Z | Winston/boilerplate-arithmetic-formatter/test_module.py | gfoo003/programming-together | 225e0a2255dd8da1f1ef32d2a88deea27c050f10 | [
"MIT"
] | null | null | null | Winston/boilerplate-arithmetic-formatter/test_module.py | gfoo003/programming-together | 225e0a2255dd8da1f1ef32d2a88deea27c050f10 | [
"MIT"
] | 8 | 2021-02-20T03:10:50.000Z | 2021-03-20T02:42:45.000Z | import unittest
from arithmetic_arranger import arithmetic_arranger
# the test case
class UnitTests(unittest.TestCase):
def test_arrangement(self):
actual = arithmetic_arranger(["3 + 855", "3801 - 2", "45 + 43", "123 + 49"])
expected = " 3 3801 45 123\n+ 855 - 2 ... | 68.045455 | 202 | 0.589846 |
89b7c2182d2d1ae8ed3c5dd6c5ee7b9a1316f9cd | 211,879 | py | Python | python/pyspark/sql/tests.py | andrewmzhang/spark-custom | 15606ff602dc3939ef499b2400d7385f75e56a29 | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | null | null | null | python/pyspark/sql/tests.py | andrewmzhang/spark-custom | 15606ff602dc3939ef499b2400d7385f75e56a29 | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | null | null | null | python/pyspark/sql/tests.py | andrewmzhang/spark-custom | 15606ff602dc3939ef499b2400d7385f75e56a29 | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# 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 ... | 43.27594 | 100 | 0.596024 |
d9a3bfc5b93109ab1abc0d8434f50511f02ecbf7 | 893 | py | Python | examples/redirect_requests.py | devasia1000/anti_adblock | 4538f053e2341ceb5a41867b07f95f3a37e1d792 | [
"MIT"
] | 1 | 2020-02-07T10:26:41.000Z | 2020-02-07T10:26:41.000Z | examples/redirect_requests.py | huyphan/mitmproxy | 5259aeb3264423204e84072d9e1b3ace4f6e6031 | [
"MIT"
] | 4 | 2016-01-07T17:08:27.000Z | 2016-06-12T21:12:59.000Z | examples/redirect_requests.py | huyphan/mitmproxy | 5259aeb3264423204e84072d9e1b3ace4f6e6031 | [
"MIT"
] | null | null | null | from libmproxy.protocol.http import HTTPResponse
from netlib.odict import ODictCaseless
"""
This example shows two ways to redirect flows to other destinations.
"""
def request(context, flow):
# pretty_host(hostheader=True) takes the Host: header of the request into account,
# which is useful in transparent ... | 35.72 | 86 | 0.692049 |
091f082bd07c4c9de2a5ff11786d7eb98a5ee0ee | 6,995 | py | Python | panel/util.py | monocilindro/panel | 6dc72b692f41f1ae51e8e2d66c3d1334c73c8cc6 | [
"BSD-3-Clause"
] | null | null | null | panel/util.py | monocilindro/panel | 6dc72b692f41f1ae51e8e2d66c3d1334c73c8cc6 | [
"BSD-3-Clause"
] | null | null | null | panel/util.py | monocilindro/panel | 6dc72b692f41f1ae51e8e2d66c3d1334c73c8cc6 | [
"BSD-3-Clause"
] | null | null | null | """
Various general utilities used in the panel codebase.
"""
from __future__ import absolute_import, division, unicode_literals
import datetime as dt
import inspect
import numbers
import os
import re
import sys
from collections import defaultdict, OrderedDict
from datetime import datetime
from six import string_type... | 27.648221 | 83 | 0.62559 |
43ad175ffac92938ed72d80fbbe5cd9f7dac9067 | 2,305 | py | Python | appmap/test/test_generation.py | calvinsomething/appmap-python | 7234f7cdb240eadfa74a1e6021bc8695ceb60179 | [
"MIT"
] | 34 | 2020-12-08T20:57:11.000Z | 2022-01-31T09:45:03.000Z | appmap/test/test_generation.py | calvinsomething/appmap-python | 7234f7cdb240eadfa74a1e6021bc8695ceb60179 | [
"MIT"
] | 105 | 2020-12-02T14:29:43.000Z | 2022-02-02T10:00:04.000Z | appmap/test/test_generation.py | calvinsomething/appmap-python | 7234f7cdb240eadfa74a1e6021bc8695ceb60179 | [
"MIT"
] | 5 | 2020-11-30T01:18:17.000Z | 2021-08-04T10:30:36.000Z | from functools import partialmethod
import pytest
import appmap
from appmap._implementation import generation
@pytest.fixture(name='verify_appmap')
def fixture_verify_appmap(monkeypatch):
def _generate(check_fn, method_name):
monkeypatch.setattr(generation.FuncEntry, 'to_dict',
... | 33.405797 | 80 | 0.611714 |
20b525382e274b81a35b5799823543d2c395d9a6 | 73,406 | py | Python | sdks/python/apache_beam/io/gcp/bigquery_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-12-29T09:01:21.000Z | 2022-02-26T14:32:16.000Z | sdks/python/apache_beam/io/gcp/bigquery_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2021-12-21T21:15:41.000Z | 2022-02-15T19:21:28.000Z | sdks/python/apache_beam/io/gcp/bigquery_test.py | diegomez17/beam | 29dea08c873abc75871674762e68fd5b29b8052b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2018-01-25T23:26:58.000Z | 2018-01-25T23:26:58.000Z | #
# 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 us... | 37.432942 | 88 | 0.635793 |
ab0846ce35d49a53475bfbbf19d3e93e811b0005 | 2,115 | py | Python | experiments/karla/diplomski-rad/blade/ont/datasets/n20-s-cerevisiae-racon-hax/finished-experiments/model-n20-ont-racon-hax-12.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | null | null | null | experiments/karla/diplomski-rad/blade/ont/datasets/n20-s-cerevisiae-racon-hax/finished-experiments/model-n20-ont-racon-hax-12.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | null | null | null | experiments/karla/diplomski-rad/blade/ont/datasets/n20-s-cerevisiae-racon-hax/finished-experiments/model-n20-ont-racon-hax-12.py | lvrcek/consensus-net | 560957f315751822e1ddf8c097eb7b712ceadff3 | [
"MIT"
] | 1 | 2018-12-23T13:50:29.000Z | 2018-12-23T13:50:29.000Z | from comet_ml import Experiment
experiment = Experiment(api_key="oda8KKpxlDgWmJG5KsYrrhmIV", project_name="consensusnet")
import numpy as np
from keras.models import Model
from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization, Input
from keras.layers import Conv1D, MaxPooling1D, Conv2D, Max... | 31.567164 | 132 | 0.707801 |
2c90695afff7e5d096447f5b80cc242dc63483c3 | 15,471 | py | Python | tests/pedal_pi.py | mpi3d/pedal-pi | a44dfef7f58f94eb8318391ae333ed9d4f50aef5 | [
"MIT"
] | null | null | null | tests/pedal_pi.py | mpi3d/pedal-pi | a44dfef7f58f94eb8318391ae333ed9d4f50aef5 | [
"MIT"
] | null | null | null | tests/pedal_pi.py | mpi3d/pedal-pi | a44dfef7f58f94eb8318391ae333ed9d4f50aef5 | [
"MIT"
] | null | null | null | from http.server import BaseHTTPRequestHandler, HTTPServer
from os import system, curdir, path, walk
from json import load
from pexpect import spawn
from paho.mqtt.client import Client
print("Starting...")
class Page(BaseHTTPRequestHandler):
def do_GET(self):
if "paho-mqtt.js" in self.path:
s... | 39.366412 | 100 | 0.424536 |
4460929ece9dc0e0749e96cdcb15796004709858 | 20,700 | py | Python | relevanceai/dataset/series.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 21 | 2021-11-23T13:01:36.000Z | 2022-03-23T03:45:30.000Z | relevanceai/dataset/series.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 217 | 2021-11-23T00:11:01.000Z | 2022-03-30T08:11:49.000Z | relevanceai/dataset/series.py | RelevanceAI/RelevanceAI | a0542f35153d9c842f3d2cd0955d6b07f6dfc07b | [
"Apache-2.0"
] | 4 | 2022-01-04T01:48:30.000Z | 2022-02-11T03:19:32.000Z | import math
import warnings
from relevanceai.constants.warning import Warning
import pandas as pd
import numpy as np
from typing import Any, Dict, List, Union, Callable, Optional
from tqdm import tqdm
from relevanceai.client.helpers import Credentials
from relevanceai.constants import MAX_CACHESIZE
from relevanceai... | 30.307467 | 309 | 0.563913 |
916dfdb5fff4258822863653e7b4a2cf5e4f430e | 7,092 | py | Python | tweetdl.py | decimoll/tweetdl | f565e44713c6ccbefa361727ce91c7191491d2da | [
"WTFPL"
] | null | null | null | tweetdl.py | decimoll/tweetdl | f565e44713c6ccbefa361727ce91c7191491d2da | [
"WTFPL"
] | null | null | null | tweetdl.py | decimoll/tweetdl | f565e44713c6ccbefa361727ce91c7191491d2da | [
"WTFPL"
] | null | null | null | import tweepy
import json
import time
import argparse
import sys
import os
import pprint
import urllib.error
import urllib.request
os.getcwd()
with open(os.path.dirname(os.path.abspath(__file__)) + '/conf.json', 'r') as j:
json_load = json.load(j)
CONSUMER_KEY = json_load['api_key']
CONSUMER_SECRET = json_... | 33.140187 | 143 | 0.607727 |
a92f1f664e6c2448a41e9c7f7a5233c691ae6c98 | 11,601 | py | Python | lemur/certificates/schemas.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/certificates/schemas.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/certificates/schemas.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | """
.. module: lemur.certificates.schemas
:platform: unix
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from flask import current_app
from marshmallow import fields, validate, validates_sc... | 40.421603 | 116 | 0.736833 |
a833b34f1d36420f1af4572a52dd1f2288b578d3 | 5,131 | py | Python | src/sima/post/integrationoperation.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/post/integrationoperation.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/post/integrationoperation.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | # This an autogenerated file
#
# Generated with IntegrationOperation
from typing import Dict,Sequence,List
from dmt.entity import Entity
from dmt.blueprint import Blueprint
from .blueprints.integrationoperation import IntegrationOperationBlueprint
from typing import Dict
from sima.post.controlsignalinputslot import Co... | 26.585492 | 106 | 0.603586 |
1db2de6a8a26482ad752e3d2df5b9d8474c8de86 | 66,837 | py | Python | pecos/xmc/xtransformer/matcher.py | cjhsieh/pecos | 22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pecos/xmc/xtransformer/matcher.py | cjhsieh/pecos | 22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pecos/xmc/xtransformer/matcher.py | cjhsieh/pecos | 22e88ee544d5a5e891a1d23a578881fdf26dfcf7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright 2021 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file acco... | 44.469062 | 138 | 0.574981 |
0072811df091913b942a26f85e5ee50d806ab93a | 21,342 | py | Python | PythonClient/AirSimClient.py | b1skit/AirSim | 4c05663f01eb4ac81b1c808d0b4d8d2558cafb5b | [
"MIT"
] | 1 | 2019-01-08T21:05:42.000Z | 2019-01-08T21:05:42.000Z | PythonClient/AirSimClient.py | phildue/AirSim | 01e5587cb458bb664b740072ea47527c3081a38a | [
"MIT"
] | null | null | null | PythonClient/AirSimClient.py | phildue/AirSim | 01e5587cb458bb664b740072ea47527c3081a38a | [
"MIT"
] | null | null | null | from __future__ import print_function
import msgpackrpc #install as admin: pip install msgpack-rpc-python
import numpy as np #pip install numpy
import msgpack
import math
import time
import sys
import os
import inspect
import types
import re
class MsgpackMixin:
def __repr__(self):
from pprint import pform... | 35.044335 | 194 | 0.623653 |
56712c25ca66c3770a375b168a1e18f2fa2ad01d | 10,750 | py | Python | platformio/maintenance.py | ysoyipek/platformio-core | 1b2e410f12bd7770d6415264d750e2fd63f697b7 | [
"Apache-2.0"
] | null | null | null | platformio/maintenance.py | ysoyipek/platformio-core | 1b2e410f12bd7770d6415264d750e2fd63f697b7 | [
"Apache-2.0"
] | 1 | 2021-06-02T00:23:58.000Z | 2021-06-02T00:23:58.000Z | platformio/maintenance.py | ysoyipek/platformio-core | 1b2e410f12bd7770d6415264d750e2fd63f697b7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.68942 | 79 | 0.61507 |
088d6ca29ab5f6496a554ab31ac1d7fbdb5917be | 8,970 | py | Python | sahara/plugins/cdh/client/clusters.py | ksshanam/sahara | 0d259f7a71447cd0cefe4f11184cc2ee335f4e33 | [
"Apache-2.0"
] | null | null | null | sahara/plugins/cdh/client/clusters.py | ksshanam/sahara | 0d259f7a71447cd0cefe4f11184cc2ee335f4e33 | [
"Apache-2.0"
] | 1 | 2020-10-06T07:50:12.000Z | 2020-10-06T07:50:12.000Z | sahara/plugins/cdh/client/clusters.py | ksshanam/sahara | 0d259f7a71447cd0cefe4f11184cc2ee335f4e33 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 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... | 37.219917 | 79 | 0.647157 |
1eb3d697a98987a5b5657dd7a6a2e9852872a57f | 3,741 | py | Python | ppci/lang/llvmir/lexer.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 161 | 2020-05-31T03:29:42.000Z | 2022-03-07T08:36:19.000Z | ppci/lang/llvmir/lexer.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 74 | 2020-05-26T18:05:48.000Z | 2021-02-13T21:55:39.000Z | ppci/lang/llvmir/lexer.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 19 | 2020-05-27T19:22:11.000Z | 2022-02-17T18:53:52.000Z | import re
# from ...common import make_num
from ..tools.baselex import BaseLexer
from . import nodes
class LlvmIrLexer(BaseLexer):
types = [
"void",
"double",
"float",
"label",
"i64",
"i32",
"i16",
"i8",
"i1",
"f32",
"f16",
... | 25.107383 | 73 | 0.380647 |
48b6716fbe3bb9a0c4c36ac7bcf3241dd72f23b2 | 1,008 | py | Python | installation/prefs.py | kolorowestudio/critic | db3b4909e15835be2009395b1541dea896d249c9 | [
"Apache-2.0",
"MIT"
] | null | null | null | installation/prefs.py | kolorowestudio/critic | db3b4909e15835be2009395b1541dea896d249c9 | [
"Apache-2.0",
"MIT"
] | null | null | null | installation/prefs.py | kolorowestudio/critic | db3b4909e15835be2009395b1541dea896d249c9 | [
"Apache-2.0",
"MIT"
] | null | null | null | # -*- mode: python; encoding: utf-8 -*-
#
# Copyright 2012 Jens Lindström, Opera Software ASA
#
# 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... | 32.516129 | 202 | 0.746032 |
3b9282a90bdeb1c65498b459fe5b971779e96b97 | 26,823 | py | Python | dql/cli.py | jspreddy/dql | 9666cfba19773c20c7b4be29adc7d6179cf00d44 | [
"MIT"
] | null | null | null | dql/cli.py | jspreddy/dql | 9666cfba19773c20c7b4be29adc7d6179cf00d44 | [
"MIT"
] | null | null | null | dql/cli.py | jspreddy/dql | 9666cfba19773c20c7b4be29adc7d6179cf00d44 | [
"MIT"
] | null | null | null | """ Interative DQL client """
import cmd
import functools
import json
import os
import random
import shlex
import subprocess
from builtins import input
from collections import OrderedDict
from contextlib import contextmanager
from fnmatch import fnmatch
from typing import Any, Callable, ContextManager, Dict, Optional, ... | 30.902074 | 88 | 0.556351 |
e8159147def0ba3fcbdb3a47f05b70a0c21fabde | 607 | py | Python | MatplotLib/4_StackPlots.py | ErfanRasti/PythonCodes | 5e4569b760b60c9303d5cc68650a2448c9065b6d | [
"MIT"
] | 1 | 2021-10-01T09:59:22.000Z | 2021-10-01T09:59:22.000Z | MatplotLib/4_StackPlots.py | ErfanRasti/PythonCodes | 5e4569b760b60c9303d5cc68650a2448c9065b6d | [
"MIT"
] | null | null | null | MatplotLib/4_StackPlots.py | ErfanRasti/PythonCodes | 5e4569b760b60c9303d5cc68650a2448c9065b6d | [
"MIT"
] | null | null | null | """."""
from matplotlib import pyplot as plt
plt.style.use("fivethirtyeight")
minutes = [1, 2, 3, 4, 5, 6, 7, 8, 9]
player1 = [8, 6, 5, 5, 4, 2, 1, 1, 0]
player2 = [0, 1, 2, 2, 2, 4, 4, 4, 4]
player3 = [0, 1, 1, 1, 2, 2, 3, 3, 4]
labels = ['player1', 'player2', 'player3']
colors = ['#6d904f', '#fc4f30... | 20.931034 | 80 | 0.576606 |
b540d120e691d04f2c59763bd1dbfd96f1ceaf95 | 6,003 | py | Python | tests/test_datapipeline/test_datapipeline.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 1 | 2021-12-12T04:23:06.000Z | 2021-12-12T04:23:06.000Z | tests/test_datapipeline/test_datapipeline.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 17 | 2020-08-28T12:53:56.000Z | 2020-11-10T01:04:46.000Z | tests/test_datapipeline/test_datapipeline.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 2 | 2021-11-24T08:05:43.000Z | 2021-11-25T16:18:48.000Z | from __future__ import unicode_literals
import boto.datapipeline
import sure # noqa
from moto import mock_datapipeline_deprecated
from moto.datapipeline.utils import remove_capitalization_of_dict_keys
def get_value_from_fields(key, fields):
for field in fields:
if field["key"] == key:
... | 32.803279 | 80 | 0.653007 |
27c9bcb011e55aaf7fcfb1d9ff6b538161391db6 | 2,226 | py | Python | Python/307.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 1 | 2020-12-10T05:36:15.000Z | 2020-12-10T05:36:15.000Z | Python/307.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | null | null | null | Python/307.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 3 | 2020-04-06T05:55:08.000Z | 2021-08-29T14:26:54.000Z | class Node:
def __init__(self, start, end):
self.start = start
self.end = end
self.total = 0
self.left = None
self.right = None
class NumArray:
def __init__(self, nums: List[int]):
self.root = self.buildTree(nums, 0, len(nums) - 1)
def bu... | 30.081081 | 106 | 0.521563 |
be506d2c9db3d52fb5f9e7c8cb538eb5ae1a2975 | 7,609 | py | Python | plugin/references.py | kaste/LSP | aaab8145652821e45838b199b9e1eb2a95b7ad15 | [
"MIT"
] | null | null | null | plugin/references.py | kaste/LSP | aaab8145652821e45838b199b9e1eb2a95b7ad15 | [
"MIT"
] | null | null | null | plugin/references.py | kaste/LSP | aaab8145652821e45838b199b9e1eb2a95b7ad15 | [
"MIT"
] | null | null | null | import os
import sublime
import linecache
from .core.panels import ensure_panel
from .core.protocol import Request, Point
from .core.registry import get_position
from .core.registry import LspTextCommand
from .core.registry import windows
from .core.settings import PLUGIN_NAME
from .core.settings import userprefs
from... | 40.908602 | 113 | 0.612564 |
eadeeecdaf845791d93026d8b032c38671825969 | 2,369 | py | Python | DddScanLaserCtrlWorkspace/arm-kgp-eabi/lib/thumb/armv7/libstdc++.a-gdb.py | mmMikeKn/ScanerAndroidPhone3D | 298b7cff9697abf2c490438b9b952af9c7667f54 | [
"MIT"
] | 21 | 2018-05-22T15:45:32.000Z | 2021-08-21T07:44:10.000Z | DddScanLaserCtrlWorkspace/arm-kgp-eabi/lib/thumb/armv7/libstdc++.a-gdb.py | mmMikeKn/ScanerAndroidPhone3D | 298b7cff9697abf2c490438b9b952af9c7667f54 | [
"MIT"
] | null | null | null | DddScanLaserCtrlWorkspace/arm-kgp-eabi/lib/thumb/armv7/libstdc++.a-gdb.py | mmMikeKn/ScanerAndroidPhone3D | 298b7cff9697abf2c490438b9b952af9c7667f54 | [
"MIT"
] | 5 | 2018-05-23T17:20:07.000Z | 2020-12-06T15:56:49.000Z | # -*- python -*-
# Copyright (C) 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
... | 38.836066 | 74 | 0.719291 |
52e870e2d8204e207d64e001c3b300f0130031e3 | 6,863 | py | Python | sdk/lusid/models/resource_list_of_get_index_convention_response.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | sdk/lusid/models/resource_list_of_get_index_convention_response.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | sdk/lusid/models/resource_list_of_get_index_convention_response.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3192
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class ResourceListOfGetIndexConventionResponse(object):... | 28.836134 | 111 | 0.604546 |
3d61e93cd50c798c3dc55cd266f8d611a7b0eadc | 502 | py | Python | examples/icaes/single_cycle.py | EnergyModels/caes | 7bb3e7f9cfbfcc2e781918333f6be3b718ca0743 | [
"MIT"
] | 1 | 2022-03-30T07:40:45.000Z | 2022-03-30T07:40:45.000Z | examples/icaes/single_cycle.py | EnergyModels/caes | 7bb3e7f9cfbfcc2e781918333f6be3b718ca0743 | [
"MIT"
] | null | null | null | examples/icaes/single_cycle.py | EnergyModels/caes | 7bb3e7f9cfbfcc2e781918333f6be3b718ca0743 | [
"MIT"
] | 1 | 2021-11-02T17:02:27.000Z | 2021-11-02T17:02:27.000Z | from caes import ICAES, plot_series
import matplotlib.pyplot as plt
# create system
inputs = ICAES.get_default_inputs()
inputs['depth'] = 5550.0
system = ICAES(inputs=inputs)
# system.debug_perf()
#
# # run single cycle and analyze
system.single_cycle()
results = system.analyze_performance()
results.to_csv('single_cy... | 22.818182 | 49 | 0.790837 |
469e8372d7a82bbdfe24c020ad40c4b28caf700a | 10,618 | py | Python | examples/samrdump.py | S3bastian/impacket | 6da655ca9ac4f9c2a207ea47e79d089044accd78 | [
"Apache-1.1"
] | 23 | 2020-02-21T02:44:21.000Z | 2022-03-03T23:40:32.000Z | examples/samrdump.py | cipher9rat/impacket | 142cacb649b8c6441df9330ac22fe4d15a0d1bbc | [
"Apache-1.1"
] | null | null | null | examples/samrdump.py | cipher9rat/impacket | 142cacb649b8c6441df9330ac22fe4d15a0d1bbc | [
"Apache-1.1"
] | 21 | 2021-06-29T23:14:54.000Z | 2022-03-24T13:13:58.000Z | #!/usr/bin/env python
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Description: DCE/RPC SAMR dumper.
#
# Author:
# Javi... | 41.155039 | 161 | 0.609719 |
68dc4d9cdd7135e2891c52a871f699aabfea14f3 | 17,153 | py | Python | tests/events/test_events.py | zhangshoug/czipline | 6bce0abd4772443547f44669c0adb2b5c63f64db | [
"Apache-2.0"
] | 9 | 2019-05-18T10:44:48.000Z | 2022-01-01T15:12:49.000Z | tests/events/test_events.py | yuanyichuangzhi/czipline | 6bce0abd4772443547f44669c0adb2b5c63f64db | [
"Apache-2.0"
] | null | null | null | tests/events/test_events.py | yuanyichuangzhi/czipline | 6bce0abd4772443547f44669c0adb2b5c63f64db | [
"Apache-2.0"
] | 10 | 2019-05-18T10:58:55.000Z | 2022-03-24T13:37:17.000Z | #
# Copyright 2016 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 33.966337 | 79 | 0.610914 |
94e07646ae1f8013c4283993300dd2f1f8fe6bdc | 12,476 | py | Python | cime/scripts/lib/get_tests.py | cjvogl/E3SM | d8990bc2efda76b6f9096f989eed46bd3ab87463 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | 1 | 2019-12-11T16:41:13.000Z | 2019-12-11T16:41:13.000Z | cime/scripts/lib/get_tests.py | cjvogl/E3SM | d8990bc2efda76b6f9096f989eed46bd3ab87463 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | cime/scripts/lib/get_tests.py | cjvogl/E3SM | d8990bc2efda76b6f9096f989eed46bd3ab87463 | [
"FTL",
"zlib-acknowledgement",
"RSA-MD"
] | null | null | null | import CIME.utils
from CIME.utils import expect, convert_to_seconds, parse_test_name, get_cime_root, get_model
from CIME.XML.machines import Machines
import six, sys, os
# Expect that, if a model wants to use python-based test lists, they will have a file
# config/$model/tests.py , containing a test dictionary called ... | 43.470383 | 550 | 0.555226 |
cdfa91fd866c529dab2f9f1c127264762720dacb | 6,805 | py | Python | tests/pyposmat/visualization/PyposmatRugplots/pca_analysis.py | eragasa/pypospack | 21cdecaf3b05c87acc532d992be2c04d85bfbc22 | [
"MIT"
] | 4 | 2018-01-18T19:59:56.000Z | 2020-08-25T11:56:52.000Z | tests/pyposmat/visualization/PyposmatRugplots/pca_analysis.py | eragasa/pypospack | 21cdecaf3b05c87acc532d992be2c04d85bfbc22 | [
"MIT"
] | 1 | 2018-04-22T23:02:13.000Z | 2018-04-22T23:02:13.000Z | tests/pyposmat/visualization/PyposmatRugplots/pca_analysis.py | eragasa/pypospack | 21cdecaf3b05c87acc532d992be2c04d85bfbc22 | [
"MIT"
] | 1 | 2019-09-14T07:04:42.000Z | 2019-09-14T07:04:42.000Z | import pandas as pd
import numpy as np
from sklearn.decomposition import PCA
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
from pypospack.pyposmat.data import PyposmatDataFile
class PcaAnalysis(object):
def __init__(self):
self.df = copy.deepcopy(self.df)
se... | 32.716346 | 138 | 0.756062 |
4ef99ff2e84c31564368dd1033a0b5a8c69941fa | 8,527 | py | Python | accelbyte_py_sdk/api/achievement/operations/achievements/import_achievements.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/achievement/operations/achievements/import_achievements.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/achievement/operations/achievements/import_achievements.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# pylint: disable=duplicate-code
# pylint: disable=li... | 30.024648 | 166 | 0.624252 |
2a3c2fcc859a7f19e6a2913388b5a88e2da3e6cb | 121 | py | Python | basic/practice_1/gym_maze/envs/__init__.py | link-kut/e_learning_rl | d35a359c84994268531429b51b8c78577b284f9c | [
"MIT"
] | null | null | null | basic/practice_1/gym_maze/envs/__init__.py | link-kut/e_learning_rl | d35a359c84994268531429b51b8c78577b284f9c | [
"MIT"
] | 8 | 2020-11-13T18:59:22.000Z | 2022-03-12T00:41:04.000Z | basic/practice_1/gym_maze/envs/__init__.py | link-kut/e_learning_rl | d35a359c84994268531429b51b8c78577b284f9c | [
"MIT"
] | null | null | null | from basic.practice_1.gym_maze.envs.maze_env import *
from basic.practice_1.gym_maze.envs.maze_view_2d import MazeView2D
| 40.333333 | 66 | 0.859504 |
677daf78a89f927f909dee277584c4f25e2a4fd4 | 26,886 | py | Python | src/graph_notebook/neptune/client.py | Sam-Martin/graph-notebook | e7a8cefb93891ea19d6df4f17fe0acca3e223ae9 | [
"ISC",
"Apache-2.0",
"CC0-1.0"
] | 378 | 2020-11-02T23:44:37.000Z | 2022-03-31T17:07:16.000Z | src/graph_notebook/neptune/client.py | Sam-Martin/graph-notebook | e7a8cefb93891ea19d6df4f17fe0acca3e223ae9 | [
"ISC",
"Apache-2.0",
"CC0-1.0"
] | 124 | 2020-11-07T14:35:28.000Z | 2022-03-29T21:07:09.000Z | src/graph_notebook/neptune/client.py | Sam-Martin/graph-notebook | e7a8cefb93891ea19d6df4f17fe0acca3e223ae9 | [
"ISC",
"Apache-2.0",
"CC0-1.0"
] | 76 | 2020-11-04T03:52:08.000Z | 2022-03-31T17:17:06.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
"""
import json
import logging
import requests
from SPARQLWrapper import SPARQLWrapper
from boto3 import Session
from botocore.session import Session as botocoreSession
from botocore.auth import SigV4Auth
from b... | 39.94948 | 118 | 0.621104 |
8443998092fef3ede5b1537d679e9b0322fd368e | 1,886 | py | Python | examples/python/red_green_multiple.py | eeryinkblot/psmoveapi | 9df875d5e8f28de9ecce195d58d4910b8e5fbee8 | [
"BSD-2-Clause"
] | 306 | 2015-01-06T07:28:34.000Z | 2022-02-16T03:45:17.000Z | examples/python/red_green_multiple.py | eeryinkblot/psmoveapi | 9df875d5e8f28de9ecce195d58d4910b8e5fbee8 | [
"BSD-2-Clause"
] | 239 | 2015-01-04T10:43:59.000Z | 2022-03-31T23:21:12.000Z | examples/python/red_green_multiple.py | eeryinkblot/psmoveapi | 9df875d5e8f28de9ecce195d58d4910b8e5fbee8 | [
"BSD-2-Clause"
] | 131 | 2015-01-23T13:16:40.000Z | 2022-03-24T21:19:23.000Z |
#
# PS Move API - An interface for the PS Move Motion Controller
# Copyright (c) 2011 Thomas Perl <m@thp.io>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source co... | 34.925926 | 80 | 0.735949 |
f9bc3bed2348c3ce37eba39373b650f108c4e33a | 140 | py | Python | countdown.py | Athenian-ComputerScience-Fall2020/for-loop-practice-parkerS123 | 137502f12966712b5105aac54d4e99103b8e3e10 | [
"Apache-2.0"
] | null | null | null | countdown.py | Athenian-ComputerScience-Fall2020/for-loop-practice-parkerS123 | 137502f12966712b5105aac54d4e99103b8e3e10 | [
"Apache-2.0"
] | 1 | 2020-09-12T02:38:11.000Z | 2020-09-12T02:38:11.000Z | countdown.py | Athenian-ComputerScience-Fall2020/for-loop-practice-parkerS123 | 137502f12966712b5105aac54d4e99103b8e3e10 | [
"Apache-2.0"
] | null | null | null | # Collaborators (including web sites where you got help: (enter none if you didn't need help)
# none
for x in range(20,9,-1):
print(x) | 28 | 93 | 0.692857 |
0f3bd9fc23f96b2e64b01efa383a4aa7de4dd8e8 | 488 | py | Python | scorer/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | null | null | null | scorer/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | null | null | null | scorer/modify_filesprocessed.py | KevinQian97/diva_toolbox | de83de7f7602665c92dca943ab2a0b4c1b2fdfde | [
"Apache-2.0"
] | 1 | 2021-09-29T04:10:10.000Z | 2021-09-29T04:10:10.000Z | import os
import json
js = json.load(open("/data/kevinq/exps/1596299960.369978/output.json","r"))
findex = list(json.load(open("/data/kevinq/exps/1596299960.369978/file-index.json")).keys())
jname = "/data/kevinq/exps/1596299960.369978/output_mod.json"
new_dict = {}
new_dict["filesProcessed"] = findex
new_dict["activi... | 37.538462 | 92 | 0.743852 |
7a0ca2d0611469048bedeb005dd01616155155ff | 2,915 | py | Python | fetch.py | yutianqi/renrenBackup | 499124027cfc4d60f8e8697c862192e08fffaacf | [
"MIT"
] | 324 | 2018-07-31T10:56:26.000Z | 2022-03-26T15:36:12.000Z | fetch.py | lszbao/renrenBackup | 14fd1621f47c95aa50d2b32eae5460d4da5d802e | [
"MIT"
] | 45 | 2018-07-31T16:45:18.000Z | 2022-02-14T09:04:31.000Z | fetch.py | lszbao/renrenBackup | 14fd1621f47c95aa50d2b32eae5460d4da5d802e | [
"MIT"
] | 74 | 2018-08-07T13:49:52.000Z | 2022-01-31T05:07:37.000Z | # coding: utf8
import logging
import logging.config
from playhouse.shortcuts import model_to_dict
from config import config
logging.config.dictConfig(config.LOGGING_CONF)
logger = logging.getLogger(__name__)
def prepare_db():
from models import database, FetchedUser, User, Comment, Like
f... | 28.300971 | 92 | 0.664151 |
ac83fd2cdc51127ee3a30a18b0b7299692da8fe6 | 4,999 | py | Python | src/sentry/interfaces/debug_meta.py | practo/sentry | 82f530970ce205696469fa702246396acfd947a1 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/interfaces/debug_meta.py | practo/sentry | 82f530970ce205696469fa702246396acfd947a1 | [
"BSD-3-Clause"
] | 1 | 2019-03-13T06:05:24.000Z | 2019-03-13T06:05:24.000Z | src/sentry/interfaces/debug_meta.py | practo/sentry | 82f530970ce205696469fa702246396acfd947a1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import six
import uuid
__all__ = ('DebugMeta', )
from sentry.interfaces.base import Interface, InterfaceValidationError, prune_empty_keys
from symbolic import parse_addr, normalize_debug_id
image_types = {}
def imagetype(name):
def decorator(f):
image_types[name... | 31.24375 | 97 | 0.604521 |
38d64841d102ba69bc95e11d0df0f90a3a85651f | 4,631 | py | Python | aioredis_models/redis_hash.py | qcrisw/aio-redis-models | 28d6d8acab90efec11b68594eb6dcaa6832c1a8f | [
"MIT"
] | null | null | null | aioredis_models/redis_hash.py | qcrisw/aio-redis-models | 28d6d8acab90efec11b68594eb6dcaa6832c1a8f | [
"MIT"
] | null | null | null | aioredis_models/redis_hash.py | qcrisw/aio-redis-models | 28d6d8acab90efec11b68594eb6dcaa6832c1a8f | [
"MIT"
] | 1 | 2021-02-23T17:47:44.000Z | 2021-02-23T17:47:44.000Z | """
This module contains the following classes:
- RedisHash: Represents a hash map stored in Redis.
"""
from typing import List, Any, Awaitable, AsyncIterator
from .redis_key import RedisKey
from .asyncio_utils import noop
class RedisHash(RedisKey):
"""
Represents a hash map stored in Redis.
"""
def... | 28.58642 | 99 | 0.565968 |
b230953caabec81d5488b5ddc7b0f91a11a29ec7 | 49 | py | Python | excecao/testeInvalidoException.py | Castagnna/dungeons-and-dragons | 9821a47febb0669ff0a073585e53f286fe27bf0a | [
"CC0-1.0"
] | null | null | null | excecao/testeInvalidoException.py | Castagnna/dungeons-and-dragons | 9821a47febb0669ff0a073585e53f286fe27bf0a | [
"CC0-1.0"
] | null | null | null | excecao/testeInvalidoException.py | Castagnna/dungeons-and-dragons | 9821a47febb0669ff0a073585e53f286fe27bf0a | [
"CC0-1.0"
] | null | null | null | class TesteInvalidoException(Exception):
pass | 24.5 | 40 | 0.816327 |
82725c2c50b054944e76c63bdca985edc93bfb4b | 4,074 | py | Python | mysql_python_factory.py | WallaceLiu/obdtool | bc299eddda7b9d1f49e40d2c76b7d8598c697f83 | [
"Apache-2.0"
] | 1 | 2018-05-02T15:02:55.000Z | 2018-05-02T15:02:55.000Z | mysql_python_factory.py | WallaceLiu/obdtool | bc299eddda7b9d1f49e40d2c76b7d8598c697f83 | [
"Apache-2.0"
] | null | null | null | mysql_python_factory.py | WallaceLiu/obdtool | bc299eddda7b9d1f49e40d2c76b7d8598c697f83 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import mysql.connector
from collections import OrderedDict
class MysqlPythonFacotry(object):
"""
Python Class for connecting with MySQL server.
"""
__instance = None
__host = None
__user = None
__password = None
__database = None
__sess... | 29.955882 | 126 | 0.514482 |
577f609cb1d5f9c87da6210eb643669a362f70f9 | 411 | py | Python | drainers/__init__.py | nvie/python-drainers | 7facdb2ba3693d5da1ce9bb8c4808c12a8874e24 | [
"BSD-3-Clause"
] | 1 | 2018-11-02T02:20:00.000Z | 2018-11-02T02:20:00.000Z | drainers/__init__.py | nvie/python-drainers | 7facdb2ba3693d5da1ce9bb8c4808c12a8874e24 | [
"BSD-3-Clause"
] | null | null | null | drainers/__init__.py | nvie/python-drainers | 7facdb2ba3693d5da1ce9bb8c4808c12a8874e24 | [
"BSD-3-Clause"
] | null | null | null | """
drainers -- Event-based process monitoring.
"""
VERSION = (0, 0, 4)
__version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
__author__ = "Vincent Driessen"
__contact__ = "vincent@datafox.nl"
__homepage__ = "http://github.com/nvie/python-drainers/"
#__docformat__ = "restructuredtext"
from base impor... | 24.176471 | 69 | 0.715328 |
8ef90631e9c5fdad23756e2bd6be8ac2da86ff93 | 8,386 | py | Python | src/utils.py | Minigrim0/DiscordReminderBot | 9b94c989fd3573fc2b2f8e2f389505bfa6e5eb85 | [
"MIT"
] | 2 | 2021-04-02T12:44:30.000Z | 2021-04-02T12:50:50.000Z | src/utils.py | Minigrim0/DiscordReminderBot | 9b94c989fd3573fc2b2f8e2f389505bfa6e5eb85 | [
"MIT"
] | 4 | 2021-04-02T22:54:20.000Z | 2021-04-26T09:02:36.000Z | src/utils.py | Minigrim0/DiscordReminderBot | 9b94c989fd3573fc2b2f8e2f389505bfa6e5eb85 | [
"MIT"
] | 2 | 2021-03-02T17:07:14.000Z | 2021-03-27T15:29:30.000Z | import discord
import re
from django.utils import timezone
from datetime import datetime
import datetime as dt
from discord_slash import SlashContext
from db.models import Reminder
from exceptions.bad_format_exception import BadFormatException
from decorators.log_this import log_this
from singleton.cog import Reminde... | 32.757813 | 110 | 0.622585 |
64cf88284d939d0021622e79be580cf9613e6c75 | 374 | py | Python | leetcode/python/easy/p383_canConstruct.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/easy/p383_canConstruct.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/easy/p383_canConstruct.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | class Solution:
def canConstruct(self, ransomNote: str, magazine: str) -> bool:
ransomNote = list(ransomNote)
magazine = list(magazine)
for i in ransomNote:
if i not in magazine:
return False
else:
magazine.remove(i)
return True... | 28.769231 | 67 | 0.566845 |
90666b0246878f4d12bca66e2f0c5fde8bb4fb34 | 1,371 | py | Python | wendy/models/table.py | AIFI-INC/wendy-framework | e752748428dad550eb9fa1833571c721c089bbc6 | [
"Apache-2.0"
] | null | null | null | wendy/models/table.py | AIFI-INC/wendy-framework | e752748428dad550eb9fa1833571c721c089bbc6 | [
"Apache-2.0"
] | 5 | 2021-12-11T18:39:59.000Z | 2021-12-12T02:34:25.000Z | wendy/models/table.py | AIFI-INC/wendy-framework | e752748428dad550eb9fa1833571c721c089bbc6 | [
"Apache-2.0"
] | null | null | null | from typing import List, Optional, Type
from tortoise import BaseDBAsyncClient, fields
from tortoise.models import Model
from tortoise.signals import post_delete, post_save, pre_delete, pre_save
__all__ = [
'Table'
]
class Table(Model):
id = fields.BigIntField(pk=True)
created_at = fields.DatetimeField(... | 24.482143 | 83 | 0.71116 |
a6d5c7f8fb8da6e9054af620d735f5e31ad75e9e | 2,225 | py | Python | app.py | whizzer0/equator | d4fea529d250b43466c4b937d1e008fe35a18138 | [
"MIT"
] | null | null | null | app.py | whizzer0/equator | d4fea529d250b43466c4b937d1e008fe35a18138 | [
"MIT"
] | null | null | null | app.py | whizzer0/equator | d4fea529d250b43466c4b937d1e008fe35a18138 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
from questioner import generateQuestions, processResults
app = Flask(__name__)
app.debug = True
questions = {}
@app.route("/example", methods=["GET"])
def example():
return render_template("example.html", data=None)
@app.route("/", methods=["GET"])
def formAll():
g... | 33.712121 | 221 | 0.737528 |
1d30ffda78e4f22d54519e7409ff31f410e44038 | 2,365 | py | Python | babylon_server/babylon/services/activity.py | ajponte/babylon | e743f5b3bb5b2eb864247414c4f51962eea9108e | [
"MIT"
] | null | null | null | babylon_server/babylon/services/activity.py | ajponte/babylon | e743f5b3bb5b2eb864247414c4f51962eea9108e | [
"MIT"
] | 2 | 2021-11-08T18:09:22.000Z | 2021-11-09T19:22:33.000Z | babylon_server/babylon/services/activity.py | ajponte/babylon | e743f5b3bb5b2eb864247414c4f51962eea9108e | [
"MIT"
] | null | null | null | from typing import List
from ..db import get_session
from ..db_models import Chase
from ..error import BabylonServerError
from ..api_models.all_activity import AllActivity
from ..api_models.chase_activity import ChaseActivity
def fetch_all_by_type(activity_type: str) -> dict:
"""
Fetch all activity for a giv... | 38.145161 | 98 | 0.656237 |
c889240a1b5c858d3efb9b0ee5ffeaf9b5aecee6 | 10,937 | py | Python | resources/lib/services/nfsession/session/access.py | Doctor-Eggs/plugin.video.netflix | 1372fd29c63ae4b933dcf7b2643c4483b4bda70b | [
"MIT"
] | 1 | 2020-10-21T21:30:11.000Z | 2020-10-21T21:30:11.000Z | resources/lib/services/nfsession/session/access.py | jurialmunkey/plugin.video.netflix | 0e599eb3465e67eb082d8b4048527ae32bfb0608 | [
"MIT"
] | null | null | null | resources/lib/services/nfsession/session/access.py | jurialmunkey/plugin.video.netflix | 0e599eb3465e67eb082d8b4048527ae32bfb0608 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix)
Copyright (C) 2018 Caphm (original implementation module)
Copyright (C) 2019 Stefano Gottardo - @CastagnaIT
Handle the authentication access
SPDX-License-Identifier: MIT
See LICENSES/MIT.md for more informat... | 43.748 | 118 | 0.65859 |
a6dd60b134f69926fbe6c48fdf0d135a9a4333ea | 7,228 | py | Python | modules/tools/localization/readinfo_and_draw.py | yujianyi/fusion_localization | c0057e29cbf690d6260f021080fd951c1a6b6baa | [
"Apache-2.0"
] | 2 | 2019-03-04T02:11:04.000Z | 2019-04-18T11:19:45.000Z | modules/tools/localization/readinfo_and_draw.py | yujianyi/fusion_localization | c0057e29cbf690d6260f021080fd951c1a6b6baa | [
"Apache-2.0"
] | 1 | 2019-03-15T08:37:53.000Z | 2019-03-15T08:37:53.000Z | modules/tools/localization/readinfo_and_draw.py | yujianyi/fusion_localization | c0057e29cbf690d6260f021080fd951c1a6b6baa | [
"Apache-2.0"
] | 1 | 2019-03-04T02:11:09.000Z | 2019-03-04T02:11:09.000Z | #!/usr/bin/python
# -*- coding: latin-1 -*-
import matplotlib.pyplot as plt
import numpy as np
import re
clock = 0
time = []
stationerror = []
lateralerror = []
headingerror = []
velocity_station_error = []
velocity_lateral_error = []
truevelocity_station = []
truevelocity_lateral = []
acceleration_station_error = [... | 29.145161 | 109 | 0.599198 |
c3b9f90905bc8cc13f9bf62ccb034e5674bfb5d6 | 257 | py | Python | test_grappelli/manage.py | bburan/django-autocomplete-light | 064676061b101d5d47655e8598b21cbaf7716ae8 | [
"MIT"
] | 1 | 2015-10-12T21:42:05.000Z | 2015-10-12T21:42:05.000Z | test_grappelli/manage.py | bburan/django-autocomplete-light | 064676061b101d5d47655e8598b21cbaf7716ae8 | [
"MIT"
] | 2 | 2021-03-31T18:52:30.000Z | 2021-12-13T19:50:13.000Z | test_grappelli/manage.py | bburan/django-autocomplete-light | 064676061b101d5d47655e8598b21cbaf7716ae8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_grappelli.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23.363636 | 78 | 0.77821 |
085934e1197016a112285e7cd573992c345d9c68 | 676 | py | Python | trac/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software cons... | 33.8 | 67 | 0.766272 |
2f2890db6805f26d71a068a470e886aa75b991e6 | 5,625 | py | Python | django_cte/cte.py | aspiredu/django-cte | e999216ce2e0dd784060a8285bfe9470a867f683 | [
"BSD-3-Clause"
] | null | null | null | django_cte/cte.py | aspiredu/django-cte | e999216ce2e0dd784060a8285bfe9470a867f683 | [
"BSD-3-Clause"
] | null | null | null | django_cte/cte.py | aspiredu/django-cte | e999216ce2e0dd784060a8285bfe9470a867f683 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
from django.db.models import Manager
from django.db.models.query import Q, QuerySet, ValuesIterable
from django.db.models.sql.datastructures import BaseTable
from .join import QJoin, INNER
from .meta import CTEColumnRef, CTEColumns
from .q... | 37.251656 | 79 | 0.662933 |
fe96885b55a48ae9425b570866863515526853d3 | 16,251 | py | Python | SMBcorr/mar_interp_daily.py | tsutterley/SMBcorr | 1c911d88483a4a29ce05b253b485b16b799fb66f | [
"MIT"
] | 2 | 2020-12-04T22:12:07.000Z | 2021-01-25T12:38:04.000Z | SMBcorr/mar_interp_daily.py | tsutterley/SMBcorr | 1c911d88483a4a29ce05b253b485b16b799fb66f | [
"MIT"
] | null | null | null | SMBcorr/mar_interp_daily.py | tsutterley/SMBcorr | 1c911d88483a4a29ce05b253b485b16b799fb66f | [
"MIT"
] | 4 | 2020-06-11T00:09:36.000Z | 2021-01-25T12:38:10.000Z | #!/usr/bin/env python
u"""
mar_interp_daily.py
Written by Tyler Sutterley (01/2021)
Interpolates and extrapolates daily MAR products to times and coordinates
INPUTS:
DIRECTORY: full path to the MAR data directory
<path_to_mar>/MARv3.11/Greenland/ERA_1958-2019-15km/daily_15km
<path_to_mar>/MARv3.11/... | 45.141667 | 79 | 0.61547 |
67731c5dbe92d7bb164a61ecfd95bb659430d259 | 2,819 | py | Python | BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | 8 | 2019-06-03T10:47:48.000Z | 2021-08-21T19:11:38.000Z | BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | 3 | 2018-04-21T07:59:33.000Z | 2018-04-23T02:06:01.000Z | ## @file
# This file is used to define class objects of INF file header.
# It will consumed by InfParser.
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accom... | 23.689076 | 79 | 0.567577 |
f0dd57f83c4e21a86aadb409fe5cba6815e460b5 | 1,888 | py | Python | bauh/view/core/gems.py | alesmuc/bauh | 5f9fbd7f38eea6f54b5d6a97848c1ee8b6a43ecb | [
"Zlib"
] | 507 | 2019-08-12T16:15:55.000Z | 2022-03-28T15:49:39.000Z | bauh/view/core/gems.py | octopusSD/bauh | c1f210fef87ddb4614b201ec2030330b71e43fe4 | [
"Zlib"
] | 176 | 2019-08-14T02:35:21.000Z | 2022-03-31T21:43:56.000Z | bauh/view/core/gems.py | octopusSD/bauh | c1f210fef87ddb4614b201ec2030330b71e43fe4 | [
"Zlib"
] | 57 | 2019-09-02T04:09:22.000Z | 2022-03-21T21:37:16.000Z | import inspect
import os
import pkgutil
from typing import List
from bauh import ROOT_DIR
from bauh.api.abstract.controller import SoftwareManager, ApplicationContext
from bauh.view.util import translation
def find_manager(member):
if not isinstance(member, str):
if inspect.isclass(member) and inspect.ge... | 34.327273 | 120 | 0.589513 |
2380bd0c4b863fb00a2314d7f51fa645934f96b0 | 901 | py | Python | __init__.py | pezon/hivedb | f4dc4a99420201fd550bf37ac8eb562934ca2609 | [
"Apache-2.0"
] | null | null | null | __init__.py | pezon/hivedb | f4dc4a99420201fd550bf37ac8eb562934ca2609 | [
"Apache-2.0"
] | null | null | null | __init__.py | pezon/hivedb | f4dc4a99420201fd550bf37ac8eb562934ca2609 | [
"Apache-2.0"
] | null | null | null | """hivedb - A DB API v2.0 compatible interface for HIVE CLI
This package is a wrapper around HIVE CLI. Until HiveThrift
stops sucking, it will continue to use HIVE CLI.
connect() -- connects to server
"""
__author__ = "Peter Pezon <peter.pezon@escapemg.com>"
version_info = (0,1,0)
__version__ = '0.1.0'
threadsafet... | 25.742857 | 64 | 0.690344 |
2ffe4957253cede46b54b058e967d6d37bad86a8 | 863 | py | Python | sql-cli/src/opensearch_sql_cli/__init__.py | zhongnansu/opensearch-sql | 6b651c13a1a6baa084ff1e279d19d100a2945b12 | [
"Apache-2.0"
] | null | null | null | sql-cli/src/opensearch_sql_cli/__init__.py | zhongnansu/opensearch-sql | 6b651c13a1a6baa084ff1e279d19d100a2945b12 | [
"Apache-2.0"
] | null | null | null | sql-cli/src/opensearch_sql_cli/__init__.py | zhongnansu/opensearch-sql | 6b651c13a1a6baa084ff1e279d19d100a2945b12 | [
"Apache-2.0"
] | null | null | null | """
SPDX-License-Identifier: Apache-2.0
The OpenSearch Contributors require contributions made to
this file be licensed under the Apache-2.0 license or a
compatible open source license.
Modifications Copyright OpenSearch Contributors. See
GitHub history for details.
"""
"""
Copyright 2020 Amazon.com, Inc. or its affi... | 33.192308 | 73 | 0.779838 |
1898507c8ee20c35b022507ea4cc100ba8ee3d9f | 1,627 | py | Python | bitfield/query.py | rystan/django-bitfield | 77b6cd9b88a66665aeeeea11a826e05c4420e79e | [
"Apache-2.0"
] | null | null | null | bitfield/query.py | rystan/django-bitfield | 77b6cd9b88a66665aeeeea11a826e05c4420e79e | [
"Apache-2.0"
] | 1 | 2018-09-04T15:50:05.000Z | 2018-09-04T15:50:05.000Z | bitfield/query.py | rystan/django-bitfield | 77b6cd9b88a66665aeeeea11a826e05c4420e79e | [
"Apache-2.0"
] | 3 | 2015-12-15T13:11:34.000Z | 2018-09-04T10:30:26.000Z | from __future__ import absolute_import
from bitfield.types import Bit, BitHandler
from django.db.models.lookups import Exact
class BitQueryLookupWrapper(Exact): # NOQA
def process_lhs(self, qn, connection, lhs=None):
lhs_sql, params = super(BitQueryLookupWrapper, self).process_lhs(
qn, conne... | 34.617021 | 101 | 0.610326 |
d146a0f435227dfa0ab6a02b9c243edc8e816a61 | 209 | py | Python | dashboard/core/admin.py | Aditya-0912/recon | 6e310cdd56caf678af54c27f2c3c97f56fb08119 | [
"MIT"
] | 9 | 2019-11-13T18:05:51.000Z | 2021-05-05T16:04:35.000Z | dashboard/core/admin.py | Aditya-0912/recon | 6e310cdd56caf678af54c27f2c3c97f56fb08119 | [
"MIT"
] | 9 | 2019-12-04T23:50:52.000Z | 2022-02-10T12:02:50.000Z | dashboard/core/admin.py | Aditya-0912/recon | 6e310cdd56caf678af54c27f2c3c97f56fb08119 | [
"MIT"
] | 7 | 2020-04-19T17:34:58.000Z | 2021-12-25T22:09:33.000Z | from django.contrib import admin
from .models import Employee
class EmployeeAdmin(admin.ModelAdmin):
list_display = [f.name for f in Employee._meta.fields]
admin.site.register(Employee, EmployeeAdmin)
| 20.9 | 58 | 0.789474 |
3a43aac7feae38d2d11419f4361f8aff046b2ad2 | 1,421 | py | Python | freezegun_tutorial.py | willismax/python-notes | 283db79ce59abc8e68c338ed3c8ba5d6dbf251d4 | [
"MIT"
] | 106 | 2017-05-02T10:25:50.000Z | 2022-03-23T14:57:28.000Z | freezegun_tutorial.py | willismax/python-notes | 283db79ce59abc8e68c338ed3c8ba5d6dbf251d4 | [
"MIT"
] | 2 | 2021-01-14T15:07:15.000Z | 2021-12-21T07:18:05.000Z | freezegun_tutorial.py | willismax/python-notes | 283db79ce59abc8e68c338ed3c8ba5d6dbf251d4 | [
"MIT"
] | 42 | 2017-07-31T07:07:38.000Z | 2021-12-26T09:36:55.000Z | # freezegun (https://github.com/spulec/freezegun)
# pip3 install freezegun
from freezegun import freeze_time
import datetime
import time
# Decorator
@freeze_time("2021-10-10")
def example_1():
assert datetime.datetime.now() == datetime.datetime(2021, 10, 10)
# Context manager
def example_2():
assert datetime... | 27.326923 | 79 | 0.68121 |
e7737da2a1b67774d22d8b2b18037aa08c49819d | 108 | py | Python | config/ie/ieMayaSetup.py | carlosg-ie/cortex | 4c866042bd2a6a6bb2076fbbe46a4e28ce54cc59 | [
"BSD-3-Clause"
] | null | null | null | config/ie/ieMayaSetup.py | carlosg-ie/cortex | 4c866042bd2a6a6bb2076fbbe46a4e28ce54cc59 | [
"BSD-3-Clause"
] | null | null | null | config/ie/ieMayaSetup.py | carlosg-ie/cortex | 4c866042bd2a6a6bb2076fbbe46a4e28ce54cc59 | [
"BSD-3-Clause"
] | null | null | null | import IECore
import IECoreMaya
IECoreMaya.Menus.createMenu( "IE", IECore.MenuDefinition(), "MayaWindow" )
| 21.6 | 74 | 0.787037 |
b5b5399386f746ffc831fe23a1f552955e559e04 | 5,238 | py | Python | zuul.d/octavia/tests/unit/amphorae/backends/agent/api_server/test_haproxy_compatibility.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/tests/unit/amphorae/backends/agent/api_server/test_haproxy_compatibility.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/tests/unit/amphorae/backends/agent/api_server/test_haproxy_compatibility.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Rackspace, US Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 45.155172 | 78 | 0.605956 |
7f3dd9198d60d52972a3342a0b442d792af86aad | 15,042 | py | Python | sklego/linear_model.py | janvdvegt/scikit-lego | 774e557c4d19f67ef54f3f0d1622c64ef9903b63 | [
"MIT"
] | null | null | null | sklego/linear_model.py | janvdvegt/scikit-lego | 774e557c4d19f67ef54f3f0d1622c64ef9903b63 | [
"MIT"
] | null | null | null | sklego/linear_model.py | janvdvegt/scikit-lego | 774e557c4d19f67ef54f3f0d1622c64ef9903b63 | [
"MIT"
] | null | null | null | import cvxpy as cp
import autograd.numpy as np
import pandas as pd
from autograd import grad
from autograd.test_util import check_grads
from deprecated.sphinx import deprecated
from scipy.special._ufuncs import expit
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn.linear_model.base import LinearClas... | 38.372449 | 118 | 0.643266 |
3251ac5ee39c524941aca09e00d1200c0cd062aa | 14,901 | py | Python | pages.py | jonas-sbit/BrickBreaker | 7f315f96ce9feffda3e3b371dde52d218b326bd3 | [
"BSD-Source-Code"
] | null | null | null | pages.py | jonas-sbit/BrickBreaker | 7f315f96ce9feffda3e3b371dde52d218b326bd3 | [
"BSD-Source-Code"
] | null | null | null | pages.py | jonas-sbit/BrickBreaker | 7f315f96ce9feffda3e3b371dde52d218b326bd3 | [
"BSD-Source-Code"
] | null | null | null | import pygame
import os
from pygame.sprite import RenderUpdates
from Player import Player
from UIElement import UIElement, BLUE, WHITE, TextElement
from DatabaseInteract import DatabaseInteract
from Brickbreaker import Brickbreaker
from GameState import GameState
from HighscorePage import highscore, show_top10
from num... | 34.413395 | 117 | 0.534595 |
48d0e67812503b89941d3b38fdac94ecd7ef8850 | 1,921 | py | Python | predictions/scale_predictions.py | arminHadzic/Panorama_Valhalla | e20e73b7b8256901d9e5065b7b9aa2c0988fea68 | [
"MIT"
] | null | null | null | predictions/scale_predictions.py | arminHadzic/Panorama_Valhalla | e20e73b7b8256901d9e5065b7b9aa2c0988fea68 | [
"MIT"
] | null | null | null | predictions/scale_predictions.py | arminHadzic/Panorama_Valhalla | e20e73b7b8256901d9e5065b7b9aa2c0988fea68 | [
"MIT"
] | 1 | 2019-08-03T00:58:58.000Z | 2019-08-03T00:58:58.000Z | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import fileinput
V_Training_Data = np.genfromtxt("versailles.csv", delimiter=",")
v_scores = V_Training_Data[:, 2]
v_scores = v_scores[1:]
plt.figure(1)
plt.scatter(range(len(v_scores)), v_scores, s=7, color="green")
plt.title("Versailles Route")... | 30.983871 | 86 | 0.738678 |
6e3c0a6590ce25e948dff32cba5902194e6604d1 | 492 | py | Python | src/hollow_rhombus_pattern/main.py | pranshuag9/my-hackerblocks-codes | 817d4d8085d62d4dbdd7f52828fcb4285353fbf7 | [
"MIT"
] | null | null | null | src/hollow_rhombus_pattern/main.py | pranshuag9/my-hackerblocks-codes | 817d4d8085d62d4dbdd7f52828fcb4285353fbf7 | [
"MIT"
] | null | null | null | src/hollow_rhombus_pattern/main.py | pranshuag9/my-hackerblocks-codes | 817d4d8085d62d4dbdd7f52828fcb4285353fbf7 | [
"MIT"
] | 1 | 2020-10-01T09:39:59.000Z | 2020-10-01T09:39:59.000Z | '''
@author: Pranshu Aggarwal
@problem: https://hack.codingblocks.com/app/practice/1/231/problem
'''
def hollow_rhombus_pattern(n):
row, start, end = 1, n, 2*n-1
for row in range(1, n+1, 1):
for col in range(1, end+1, 1):
if (col >= start and (row == 1 or row == n or col == start o... | 32.8 | 107 | 0.528455 |
a7caa56a8f710583e27b7342bebe233bf692c112 | 4,129 | py | Python | Project2.py | kushagradhi/tweet-sentiment | 12d859d80376e8438f6a034ecd5af98271292a29 | [
"MIT"
] | null | null | null | Project2.py | kushagradhi/tweet-sentiment | 12d859d80376e8438f6a034ecd5af98271292a29 | [
"MIT"
] | null | null | null | Project2.py | kushagradhi/tweet-sentiment | 12d859d80376e8438f6a034ecd5af98271292a29 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from sklearn.metrics import accuracy_score
from sklearn.model_selection import StratifiedKFold
from keras.utils import to_categorical
from PreProcessing import preProcessing
from NaiveBayes import NaiveBayes
from LogisticRegression import LogisticRegress
from NeuralNetwork import ... | 37.880734 | 107 | 0.61831 |
ddd4c997de692e89b8d7934ec275edc51f3b5e40 | 1,090 | py | Python | specs/basic_spec.py | OldhamMade/beanstalkctl | ebd400daf5fb6be18cde29af36e2f5eb0f90bcde | [
"MIT"
] | 2 | 2016-06-30T14:53:05.000Z | 2016-08-24T13:54:49.000Z | specs/basic_spec.py | OldhamMade/beanstalkctl | ebd400daf5fb6be18cde29af36e2f5eb0f90bcde | [
"MIT"
] | null | null | null | specs/basic_spec.py | OldhamMade/beanstalkctl | ebd400daf5fb6be18cde29af36e2f5eb0f90bcde | [
"MIT"
] | null | null | null | import beanstalkc
from .base_spec import BaseSpec
from beanstalkctl.base import BaseCommand
class BasicSpec(BaseSpec):
def setUp(self):
self.base_setup()
self.conn = beanstalkc.Connection(
host=self.beanstalkd_host,
port=self.beanstalkd_port)
def tearDown(self):
... | 26.585366 | 50 | 0.6 |
1c403c9cf4323607bc8c84f8108a5e434eb1c448 | 2,459 | py | Python | sympycore/matrices/functions.py | radovankavicky/pymaclab | 21da758f64ed0b62969c9289576f677e977cfd98 | [
"Apache-2.0"
] | 96 | 2015-01-25T05:59:56.000Z | 2021-12-29T14:05:22.000Z | sympycore/matrices/functions.py | 1zinnur9/pymaclab | 21da758f64ed0b62969c9289576f677e977cfd98 | [
"Apache-2.0"
] | 3 | 2015-12-17T19:25:46.000Z | 2018-06-19T07:05:20.000Z | sympycore/matrices/functions.py | 1zinnur9/pymaclab | 21da758f64ed0b62969c9289576f677e977cfd98 | [
"Apache-2.0"
] | 36 | 2016-01-31T15:22:01.000Z | 2021-03-29T07:03:07.000Z | """ Provides matrix utility functions.
"""
#
# Author: Pearu Peterson
# Created: March 2008
#
__docformat__ = "restructuredtext"
__all__ = ['eye', 'concatenate', 'jacobian']
from ..utils import MATRIX, MATRIX_DICT
from .algebra import MatrixDict, Matrix, MatrixBase
def jacobian(expr_list, var_list):
""" Return a... | 30.358025 | 93 | 0.544124 |
1865a8a708082055a72394d7a694117125db04a8 | 574 | py | Python | app/database/db.py | MattHolmes123/gift-wishlist-backend | 9a90abc3a3992747af5bfa19d6af948cb5d99b4a | [
"MIT"
] | null | null | null | app/database/db.py | MattHolmes123/gift-wishlist-backend | 9a90abc3a3992747af5bfa19d6af948cb5d99b4a | [
"MIT"
] | 1 | 2021-05-15T10:22:54.000Z | 2021-05-15T10:22:54.000Z | app/database/db.py | MattHolmes123/gift-wishlist-backend | 9a90abc3a3992747af5bfa19d6af948cb5d99b4a | [
"MIT"
] | null | null | null | from typing import Iterator
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session
from .utils import create_app_engine, create_session
# What all models derive from
Base = declarative_base()
# The database connection
engine = create_app_engine()
SessionLocal = create_session(eng... | 19.793103 | 55 | 0.722997 |
af15e80441224575e91c3af7bdbe3adfe1c0562b | 2,198 | py | Python | paddleaudio/examples/sound_classification/predict.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | paddleaudio/examples/sound_classification/predict.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | paddleaudio/examples/sound_classification/predict.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 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 appli... | 35.451613 | 127 | 0.731574 |
93c3f86384ef82ac623637321b53cefb2cd351a8 | 20,717 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.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 ... | 43.891949 | 127 | 0.65579 |
08770a06651a2583a46a49fbe7dbcd4afbdaa0bf | 3,447 | py | Python | Matrix.py | sinapsel/differentials | 32e758fa9e5e3f7bf5b1c1fda82730d03300acc1 | [
"MIT"
] | null | null | null | Matrix.py | sinapsel/differentials | 32e758fa9e5e3f7bf5b1c1fda82730d03300acc1 | [
"MIT"
] | null | null | null | Matrix.py | sinapsel/differentials | 32e758fa9e5e3f7bf5b1c1fda82730d03300acc1 | [
"MIT"
] | null | null | null | class Matrix:
def __init__(self, arr = [[0]], shape = (1,1), n = 1, m = 1, init_value = 0, cpy = None):
if cpy != None:
self._arr = cpy._arr
self._n = cpy._n
self._m = cpy._m
elif arr != [[0]]:
self._arr = arr
self._n = len(arr)
... | 35.90625 | 113 | 0.492312 |
f4b4d159b49c714d802aab8721c1ef86baae00f9 | 589 | py | Python | t/gws/t0000-is-up.py | tacr-iotcloud/server | c46fd292843acf25b3f03d927e6ed32bd9d05732 | [
"BSD-3-Clause"
] | 1 | 2020-09-30T06:41:47.000Z | 2020-09-30T06:41:47.000Z | t/gws/t0000-is-up.py | tacr-iotcloud/server | c46fd292843acf25b3f03d927e6ed32bd9d05732 | [
"BSD-3-Clause"
] | null | null | null | t/gws/t0000-is-up.py | tacr-iotcloud/server | c46fd292843acf25b3f03d927e6ed32bd9d05732 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python3
import config
config.import_libs()
import unittest
import socket
import websocket
class TestIsUp(unittest.TestCase):
"""
Connect to the gws server with TCP
"""
def test1_ws_port_is_open(self):
s = socket.socket()
s.connect((config.gws_host, config.gws_port))
s.close()
"""
Connect... | 19 | 71 | 0.735144 |
3191cffefbc63eff4ec53385fb5a857d4f0a7bcc | 28,972 | py | Python | mediapipe/util/sequence/media_sequence.py | saksham7778/mediapipe | 716f718ee318fc129e795b8874d01f74d7a37444 | [
"Apache-2.0"
] | 2 | 2019-10-17T13:39:23.000Z | 2019-10-17T13:41:19.000Z | mediapipe/util/sequence/media_sequence.py | shashimanyam/mediapipe | dc9216dc595585d495250d0692afe35985d816ff | [
"Apache-2.0"
] | null | null | null | mediapipe/util/sequence/media_sequence.py | shashimanyam/mediapipe | dc9216dc595585d495250d0692afe35985d816ff | [
"Apache-2.0"
] | 2 | 2020-08-18T03:49:45.000Z | 2022-02-08T05:13:05.000Z | """Copyright 2019 The MediaPipe Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 51.460036 | 80 | 0.765843 |
36bb358d22903b2a8d1fff7c2a667eb5863bfc27 | 2,505 | py | Python | scripts/sources/s_systematic_idiosyncratic_lfm.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2021-04-10T13:24:30.000Z | 2022-03-26T08:20:42.000Z | scripts/sources/s_systematic_idiosyncratic_lfm.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | null | null | null | scripts/sources/s_systematic_idiosyncratic_lfm.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2019-08-13T22:02:17.000Z | 2022-02-09T17:49:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.1.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # s_sy... | 36.304348 | 231 | 0.705788 |
5f4224da0426fa9c74cfc9d995a287e9184c13d8 | 1,792 | py | Python | src/videos/tests.py | imsubhamsingh/vibeon | 5ea67bb8dae0a0c28d36f81374eb4f046d842cf5 | [
"Apache-2.0"
] | null | null | null | src/videos/tests.py | imsubhamsingh/vibeon | 5ea67bb8dae0a0c28d36f81374eb4f046d842cf5 | [
"Apache-2.0"
] | 2 | 2021-07-19T18:41:46.000Z | 2022-02-10T11:43:07.000Z | src/videos/tests.py | imsubhamsingh/vibeon | 5ea67bb8dae0a0c28d36f81374eb4f046d842cf5 | [
"Apache-2.0"
] | null | null | null | from django.test import TestCase
from videos.models import Video, PublishStateOptions
from django.utils import timezone
from django.utils.text import slugify
class VideoModelTestCase(TestCase):
def setUp(self):
self.obj_a = Video.objects.create(title="Scam 1992")
self.obj_b = Video.objects.create(... | 34.461538 | 77 | 0.684152 |
9f15423d79788a5448430d4195ad21a951862daa | 1,905 | py | Python | src/commands/quote.py | Dragonsight91/RWTHufflepuffy | 2b98bd9c6854cd587704830edd5a639d1617b2ff | [
"MIT"
] | null | null | null | src/commands/quote.py | Dragonsight91/RWTHufflepuffy | 2b98bd9c6854cd587704830edd5a639d1617b2ff | [
"MIT"
] | 1 | 2020-02-27T22:04:53.000Z | 2020-02-27T22:04:53.000Z | src/commands/quote.py | Dragonsight91/RWTHufflepuffy | 2b98bd9c6854cd587704830edd5a639d1617b2ff | [
"MIT"
] | null | null | null | import discord
async def quote_handler(bot, message):
command = list(filter(lambda x : x != "" ,str(message.content).split(" ")))
devRole = discord.utils.get(message.guild.roles, name="Developer")
# nice try, but no
if len(command) <2:
message.channel.send(f"**:x: QUOTE - NO API SPECIFIED**\nP... | 46.463415 | 192 | 0.59895 |
8a8adb62dc462bb504102db42a990684728b54a7 | 22,662 | py | Python | venv/lib/python3.6/site-packages/celery/worker/request.py | kuldeep24680/recurring_payments | 79e589c3d3f4fb1a0791725065e2c068750ef6b2 | [
"MIT"
] | 3 | 2020-10-03T14:37:40.000Z | 2021-03-28T17:21:44.000Z | newenv/lib/python3.8/site-packages/celery/worker/request.py | palakshivlani-11/cryptorium | eebb78c061007519e527b3d18b8df6bc13679c46 | [
"Apache-2.0"
] | 9 | 2021-03-19T03:06:53.000Z | 2022-03-12T00:37:04.000Z | newenv/lib/python3.8/site-packages/celery/worker/request.py | palakshivlani-11/cryptorium | eebb78c061007519e527b3d18b8df6bc13679c46 | [
"Apache-2.0"
] | 1 | 2020-10-03T14:37:41.000Z | 2020-10-03T14:37:41.000Z | # -*- coding: utf-8 -*-
"""Task request.
This module defines the :class:`Request` class, that specifies
how tasks are executed.
"""
from __future__ import absolute_import, unicode_literals
import logging
import sys
from datetime import datetime
from time import time
from weakref import ref
from billiard.common impor... | 33.474151 | 84 | 0.607669 |
b4ca2b9a3e0b54cd0bf015679e23082342104265 | 26,478 | py | Python | QUANTAXIS_Monitor_GUI/MainWindow/QA_Gui_DateFetch_Task.py | xiongyixiaoyang/QUANTAXIS | 08441ce711e55385e2b01f80df17d34e7e89f564 | [
"MIT"
] | 2 | 2019-05-31T02:53:12.000Z | 2020-03-09T03:21:55.000Z | QUANTAXIS_Monitor_GUI/MainWindow/QA_Gui_DateFetch_Task.py | xiongyixiaoyang/QUANTAXIS | 08441ce711e55385e2b01f80df17d34e7e89f564 | [
"MIT"
] | null | null | null | QUANTAXIS_Monitor_GUI/MainWindow/QA_Gui_DateFetch_Task.py | xiongyixiaoyang/QUANTAXIS | 08441ce711e55385e2b01f80df17d34e7e89f564 | [
"MIT"
] | null | null | null |
from PyQt5.QtCore import QTimer, QThread, pyqtSignal
import os
import time
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5 import QtCore, QtGui, QtWidgets
from QUANTAXIS.QABacktest.QAAnalysis import QA_backtest_analysis_backtest
from QUANTAXIS.QAUtil import QA... | 35.92673 | 121 | 0.635093 |
0bc5501d1ef44f22a8f1b0aa4e0b0c374bef3859 | 786 | py | Python | test/language/templates/python/InstantiateVsDefaultTest.py | chenpeihua/zserio | c021d6f943f25c2eb7d91712eb7bd5de13f9c8bc | [
"BSD-3-Clause"
] | 2 | 2019-02-06T17:50:24.000Z | 2019-11-20T16:51:34.000Z | test/language/templates/python/InstantiateVsDefaultTest.py | chenpeihua/zserio | c021d6f943f25c2eb7d91712eb7bd5de13f9c8bc | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:25:51.000Z | 2019-11-25T18:09:39.000Z | test/language/templates/python/InstantiateVsDefaultTest.py | chenpeihua/zserio | c021d6f943f25c2eb7d91712eb7bd5de13f9c8bc | [
"BSD-3-Clause"
] | null | null | null | import unittest
import zserio
from testutils import getZserioApi
class InstantiateVsDefaultTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "templates.zs").instantiate_vs_default
def testReadWrite(self):
instantiateVsDefault = self.api.Instantiat... | 34.173913 | 79 | 0.725191 |
9b6df147f440b66e81f5f864db8a8df365f79b28 | 369 | py | Python | lib/plugins/create/templates/spotinst-python/handler.py | ezamlee/serverless | 3eae14efeb037280110b08712d1f613b0a1c1440 | [
"MIT"
] | 1 | 2019-01-16T12:06:32.000Z | 2019-01-16T12:06:32.000Z | lib/plugins/create/templates/spotinst-python/handler.py | ezamlee/serverless | 3eae14efeb037280110b08712d1f613b0a1c1440 | [
"MIT"
] | 9 | 2020-03-04T21:48:19.000Z | 2021-12-09T19:56:01.000Z | lib/plugins/create/templates/spotinst-python/handler.py | ezamlee/serverless | 3eae14efeb037280110b08712d1f613b0a1c1440 | [
"MIT"
] | null | null | null | # Implement your function here.
# The function will get the request as parameter.
# The function should return an object
def main(args):
queryparams = args.get("query", {})
body = args.get("body", {})
return {
'statusCode': 200,
'body': '{"hello":"from Python2.7 function"}',
'head... | 24.6 | 55 | 0.609756 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.