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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79823fca6c81bcbe9748a6f00ea3fc4d690727da | 2,119 | pyde | Python | Lab 8/BouncingBallsRandomBonus/BouncingBallsRandomBonus.pyde | Cheezegami/HKU-ECTTP | 1bfeefbb6ed372128edd2e62602fe5c8d35bd0bd | [
"MIT"
] | null | null | null | Lab 8/BouncingBallsRandomBonus/BouncingBallsRandomBonus.pyde | Cheezegami/HKU-ECTTP | 1bfeefbb6ed372128edd2e62602fe5c8d35bd0bd | [
"MIT"
] | null | null | null | Lab 8/BouncingBallsRandomBonus/BouncingBallsRandomBonus.pyde | Cheezegami/HKU-ECTTP | 1bfeefbb6ed372128edd2e62602fe5c8d35bd0bd | [
"MIT"
] | null | null | null | # Made by Ronald van Egdom.
# For HKU Creative Programming with Python.
# Lab 4.
# Importing the GenericObject class.
from GenericObject import GenericObject
from ScoreBoard import ScoreBoard
# Variable to store objects.
objectList = [] # Array in which the objects are contained.
score = ScoreBoard()
# Creat... | 60.542857 | 192 | 0.730061 |
7982404ec9bf2f3a20433d7c2acdf4f9b6839387 | 2,294 | py | Python | tools/azure-devtools/src/azure_devtools/perfstress_tests/random_stream.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | tools/azure-devtools/src/azure_devtools/perfstress_tests/random_stream.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | tools/azure-devtools/src/azure_devtools/perfstress_tests/random_stream.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 27.97561 | 94 | 0.57585 |
798240dda3a10aa92cd8bf515a69c37a868be56c | 2,191 | py | Python | canica/algorithms/test/test_fastica.py | GaelVaroquaux/canica | 7414aaa8441e85ed5d0b36153ad554e6bc843713 | [
"BSD-3-Clause"
] | 13 | 2015-03-15T11:54:59.000Z | 2021-07-17T00:59:12.000Z | canica/algorithms/test/test_fastica.py | GaelVaroquaux/canica | 7414aaa8441e85ed5d0b36153ad554e6bc843713 | [
"BSD-3-Clause"
] | 1 | 2017-10-04T14:45:30.000Z | 2017-10-04T14:52:58.000Z | canica/algorithms/test/test_fastica.py | GaelVaroquaux/canica | 7414aaa8441e85ed5d0b36153ad554e6bc843713 | [
"BSD-3-Clause"
] | 10 | 2015-03-15T11:55:01.000Z | 2021-12-23T18:41:15.000Z | """
Test the fastica algorithm.
"""
import numpy as np
# No relative import to be able to run this file as a demo
#from ..fastica import fastica
#from ..common import center_and_norm
from canica.algorithms.fastica import fastica
from canica.algorithms.common import center_and_norm
def test_fastica(demo=False, figur... | 29.213333 | 75 | 0.596531 |
798241a7dab88a6fc76c5a4e433b8e97d8e12945 | 9,247 | py | Python | HAIA/dqn/cartpole/train_cartpole-v1.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | HAIA/dqn/cartpole/train_cartpole-v1.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | HAIA/dqn/cartpole/train_cartpole-v1.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | import gym
import random
import torch
import numpy as np
from collections import namedtuple, deque
import matplotlib.pyplot as plt
# pytorch imports
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import pandas as pd
env = gym.make("CartPole-v1")
env.seed(0)
print('State ... | 38.369295 | 128 | 0.631124 |
7982421d07b8b666fc8fc840123a2f47aa6edf14 | 860 | py | Python | client-hints/resources/echo-ua-client-hints-received.py | BasixKOR/wpt | aa27d567c10dcdb2aea6884d5155dfaaa177a800 | [
"BSD-3-Clause"
] | null | null | null | client-hints/resources/echo-ua-client-hints-received.py | BasixKOR/wpt | aa27d567c10dcdb2aea6884d5155dfaaa177a800 | [
"BSD-3-Clause"
] | 59 | 2022-01-19T21:35:57.000Z | 2022-03-30T21:35:27.000Z | client-hints/resources/echo-ua-client-hints-received.py | BasixKOR/wpt | aa27d567c10dcdb2aea6884d5155dfaaa177a800 | [
"BSD-3-Clause"
] | null | null | null | import importlib
client_hints_ua_list = importlib.import_module("client-hints.resources.clienthintslist").client_hints_ua_list
def main(request, response):
"""
Simple handler that sets a response header based on which client hint
request headers were received.
"""
response.headers.append(b"Access-Contro... | 35.833333 | 109 | 0.731395 |
79824306e5384c961d10bc8eebaa715ec10a2ab4 | 11,410 | py | Python | dashboard/modules/actor/tests/test_actor.py | yuanchi2807/ray | cf512254bb4bcd71ff1818dff5c868ab10c5f620 | [
"Apache-2.0"
] | null | null | null | dashboard/modules/actor/tests/test_actor.py | yuanchi2807/ray | cf512254bb4bcd71ff1818dff5c868ab10c5f620 | [
"Apache-2.0"
] | 2 | 2022-03-31T11:58:47.000Z | 2022-03-31T11:58:49.000Z | dashboard/modules/actor/tests/test_actor.py | yuanchi2807/ray | cf512254bb4bcd71ff1818dff5c868ab10c5f620 | [
"Apache-2.0"
] | 1 | 2022-03-27T09:01:59.000Z | 2022-03-27T09:01:59.000Z | import os
import sys
import logging
import requests
import time
import traceback
import ray
import pytest
import ray.dashboard.utils as dashboard_utils
import ray._private.gcs_pubsub as gcs_pubsub
from ray.dashboard.tests.conftest import * # noqa
from ray.dashboard.modules.actor import actor_consts
from ray._private.t... | 32.69341 | 87 | 0.577038 |
79824324f0a7e942e11a10ddb5e2e26b2a3cd3ec | 3,999 | py | Python | codecast_server.py | pitchaim/codecast | 883c543a49528e2baa7cd0d0ee20fe451af6e94b | [
"MIT"
] | null | null | null | codecast_server.py | pitchaim/codecast | 883c543a49528e2baa7cd0d0ee20fe451af6e94b | [
"MIT"
] | null | null | null | codecast_server.py | pitchaim/codecast | 883c543a49528e2baa7cd0d0ee20fe451af6e94b | [
"MIT"
] | null | null | null | import sys, os, subprocess
from socket import *
import ssl
from threading import Thread
import jack
class Server():
def __init__(self, password, client_table, sname):
self.password = password
self.client_table = client_table
self.sname = sname
self.max_clients = len(client_table)
... | 36.688073 | 96 | 0.517129 |
7982436c48e043ee34c787cbf6a074c0ebe32e7b | 954 | py | Python | src/easydmp/site/api/v1/urls.py | hmpf/easydmp | 650b241fedd839635335c1044f2d695f9c076e4c | [
"MIT"
] | 5 | 2018-09-25T15:48:39.000Z | 2020-06-04T11:56:36.000Z | src/easydmp/site/api/v1/urls.py | hmpf/easydmp | 650b241fedd839635335c1044f2d695f9c076e4c | [
"MIT"
] | 233 | 2018-01-10T17:28:41.000Z | 2022-03-30T09:38:03.000Z | src/easydmp/site/api/v1/urls.py | hmpf/easydmp | 650b241fedd839635335c1044f2d695f9c076e4c | [
"MIT"
] | 2 | 2019-02-07T10:34:09.000Z | 2019-03-12T07:25:09.000Z | from django.urls import include, path
from rest_framework_jwt.views import obtain_jwt_token
from rest_framework_jwt.views import refresh_jwt_token
from rest_framework_jwt.views import verify_jwt_token
from easydmp.auth.api.v1 import router as auth_router
from easydmp.dmpt.api.v1 import router as dmpt_router
from easy... | 31.8 | 78 | 0.797694 |
798243ed344506b17b2a9fe9907b894374f7064d | 17,847 | py | Python | distiller/quantization/quantizer.py | HatsuneMiku4/distiller | 8fbacb01ebcb7d70c5d3ecb6a88093e6c4d42137 | [
"Apache-2.0"
] | null | null | null | distiller/quantization/quantizer.py | HatsuneMiku4/distiller | 8fbacb01ebcb7d70c5d3ecb6a88093e6c4d42137 | [
"Apache-2.0"
] | null | null | null | distiller/quantization/quantizer.py | HatsuneMiku4/distiller | 8fbacb01ebcb7d70c5d3ecb6a88093e6c4d42137 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018 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... | 51.880814 | 139 | 0.646383 |
7982461082cb4856a388202c107fc4653b7f007d | 4,341 | py | Python | dashwellviz/figures.py | mharty3/t20-Dash_Well_Viz | b4ff59b9600d16f9d3cfed548fc29e35c350a2a9 | [
"Apache-2.0"
] | null | null | null | dashwellviz/figures.py | mharty3/t20-Dash_Well_Viz | b4ff59b9600d16f9d3cfed548fc29e35c350a2a9 | [
"Apache-2.0"
] | null | null | null | dashwellviz/figures.py | mharty3/t20-Dash_Well_Viz | b4ff59b9600d16f9d3cfed548fc29e35c350a2a9 | [
"Apache-2.0"
] | null | null | null | from plotly.subplots import make_subplots
import plotly.graph_objs as go
class WellLog:
"""Well log wrapper.
Args:
n_tracks (int): number of vertical tracks.
shared_yaxes (bool): shared Y axes for all tracks?
Other keyword arguments will be passed to plotly.make_subplots()
Attribute... | 32.886364 | 95 | 0.586731 |
79824692fcfa83f69770c6e6177c0b66ec79e9ee | 1,465 | py | Python | venv/lib/python3.8/site-packages/vsts/identity/v4_0/models/framework_identity_info.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/identity/v4_0/models/framework_identity_info.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/identity/v4_0/models/framework_identity_info.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 38.552632 | 95 | 0.520137 |
798247905003a17d429a97e6761def45aa7a60c1 | 6,738 | py | Python | keras_unet/models/custom_vnet.py | moritzknolle/keras-unet | 2d1ca670d341882cc1429df20dba431d2bfea6fa | [
"MIT"
] | 1 | 2020-02-13T05:45:24.000Z | 2020-02-13T05:45:24.000Z | keras_unet/models/custom_vnet.py | moritzknolle/keras-unet | 2d1ca670d341882cc1429df20dba431d2bfea6fa | [
"MIT"
] | null | null | null | keras_unet/models/custom_vnet.py | moritzknolle/keras-unet | 2d1ca670d341882cc1429df20dba431d2bfea6fa | [
"MIT"
] | null | null | null | from keras.models import Model
from keras.layers import (
BatchNormalization,
Conv3D,
Conv3DTranspose,
MaxPooling3D,
Dropout,
SpatialDropout3D,
UpSampling3D,
Input,
concatenate,
multiply,
add,
Activation,
)
def upsample_conv(filters, kernel_size, strides, padding):
... | 29.552632 | 150 | 0.657168 |
7982479e0c8e728967e796067fe1349ae4c39f0b | 9,057 | py | Python | social_auth/db/base.py | radicalgraphics/django-social-auth | 86aa7177a4cc4a3f3d23b6d11e93fd6dda1b653a | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | social_auth/db/base.py | radicalgraphics/django-social-auth | 86aa7177a4cc4a3f3d23b6d11e93fd6dda1b653a | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | social_auth/db/base.py | radicalgraphics/django-social-auth | 86aa7177a4cc4a3f3d23b6d11e93fd6dda1b653a | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | """Models mixins for Social Auth"""
import base64
import time
import re
from datetime import datetime, timedelta
from openid.association import Association as OIDAssociation
# django.contrib.auth and mongoengine.django.auth regex to validate usernames
# '^[\w@.+-_]+$', we use the opposite to clean invalid characters... | 34.048872 | 79 | 0.61135 |
798247ac196d513e5311d0deb7ec8a29e95c2404 | 141 | py | Python | cart/urls.py | Rockstreet/newsusman | 923a00beafb8a9f82a3acc0f3b2b183bf5bb3d52 | [
"MIT"
] | 1 | 2021-04-03T09:29:13.000Z | 2021-04-03T09:29:13.000Z | cart/urls.py | Zex0n/django-simple-cms | 097098dcea218697a53f9c04005c86a7680ee4e1 | [
"MIT"
] | null | null | null | cart/urls.py | Zex0n/django-simple-cms | 097098dcea218697a53f9c04005c86a7680ee4e1 | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
urlpatterns = [
# This pattern must always be the last
url('', include('easycart.urls'))
] | 23.5 | 42 | 0.687943 |
798248233e944b0abe2f84456f8211ecaedb270e | 5,069 | py | Python | nn.py | SSYoung/Gender-Census-ANN | 6d52949b6f5cf1dd731894afa07bc09d67136339 | [
"MIT"
] | null | null | null | nn.py | SSYoung/Gender-Census-ANN | 6d52949b6f5cf1dd731894afa07bc09d67136339 | [
"MIT"
] | null | null | null | nn.py | SSYoung/Gender-Census-ANN | 6d52949b6f5cf1dd731894afa07bc09d67136339 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
from CrossValidate import split_training_data
# datax = 10000
# testx = 5000
# data = np.random.randint(0,2,(datax, 100))
# labels = np.zeros((datax,2))
# test_data = np.random.randint(0,2,(testx, 100))
# test_labels = np.zeros((testx,2))
# for i in range(datax):
# if (data[... | 29.47093 | 94 | 0.670152 |
79824999cc8e50abe47bf39cf84786f6719b479d | 3,121 | py | Python | capi/type_checking.py | tcfuji/capi | 4c0f648216ae22d29c537318fb9a646d430cf310 | [
"MIT"
] | 6 | 2021-01-13T11:11:06.000Z | 2022-01-22T02:52:00.000Z | capi/type_checking.py | tcfuji/capi | 4c0f648216ae22d29c537318fb9a646d430cf310 | [
"MIT"
] | null | null | null | capi/type_checking.py | tcfuji/capi | 4c0f648216ae22d29c537318fb9a646d430cf310 | [
"MIT"
] | 2 | 2021-01-13T11:11:20.000Z | 2022-01-15T19:26:29.000Z | """Functions for runtime type checking. More strict but slower than availabe
static type checking. Off by default.
"""
import os
from typing import Any, Optional, Tuple
import torch
def assert_joint_probability(
x: torch.Tensor, shape: Tuple[int, ...], allow_improper: bool = False
) -> None:
"""Assert `x` is... | 28.117117 | 78 | 0.593079 |
79824a011bf7c99c0b8aeabedfd30c5789b083ff | 3,038 | py | Python | tictactoes/tic_tac_toe_10.py | SeanRavenhill/Python-Playground | bc638be8ec48fa54946395fd93a6944075438fb3 | [
"MIT"
] | null | null | null | tictactoes/tic_tac_toe_10.py | SeanRavenhill/Python-Playground | bc638be8ec48fa54946395fd93a6944075438fb3 | [
"MIT"
] | null | null | null | tictactoes/tic_tac_toe_10.py | SeanRavenhill/Python-Playground | bc638be8ec48fa54946395fd93a6944075438fb3 | [
"MIT"
] | null | null | null | # sets up initial empty grid
grid = [
[" ", " ", " "],
[" ", " ", " "],
[" ", " ", " "]
]
# used as an easy call for when you need to render out the grid
def print_board():
print("---------")
print("| " + grid[0][0] + " " + grid[0][1] + " " + grid[0][2] + " |")
print("| " + grid[1][0] + " " + ... | 29.495146 | 79 | 0.518762 |
79824d6d35205c93fe21441dcecb45d9a7106f2a | 16,529 | py | Python | GSAS-II-WONDER/imports/G2img_1TIF.py | WONDER-project/GSAS-II-WONDER-OSX | f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9 | [
"MIT"
] | null | null | null | GSAS-II-WONDER/imports/G2img_1TIF.py | WONDER-project/GSAS-II-WONDER-OSX | f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9 | [
"MIT"
] | null | null | null | GSAS-II-WONDER/imports/G2img_1TIF.py | WONDER-project/GSAS-II-WONDER-OSX | f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
########### SVN repository information ###################
# $Date: 2019-08-26 07:27:07 -0500 (Mon, 26 Aug 2019) $
# $Author: vondreele $
# $Revision: 4112 $
# $URL: https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2img_1TIF.py $
# $Id: G2img_1TIF.py 4112 2019-08-26 12:27:07Z vondreele ... | 43.843501 | 112 | 0.554359 |
79824d833227e0148c68b16a771801d3ed15aa4e | 1,449 | py | Python | azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/models/storage_account_check_name_availability_parameters.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/models/storage_account_check_name_availability_parameters.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/models/storage_account_check_name_availability_parameters.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | # 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 ... | 32.2 | 85 | 0.606625 |
79824f305af03ccf4f3d59c0b8dca820cb669f01 | 1,434 | py | Python | test/option--wf.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 1,403 | 2017-11-23T14:24:01.000Z | 2022-03-30T20:59:39.000Z | test/option--wf.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 3,708 | 2017-11-27T13:47:12.000Z | 2022-03-29T17:21:17.000Z | test/option--wf.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 281 | 2017-12-01T23:48:38.000Z | 2022-03-31T15:25:44.000Z | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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,
... | 34.142857 | 73 | 0.767782 |
79824fdd95f3956343b8b3e7b8920fae72265d01 | 1,481 | py | Python | pcat2py/class/2721df0c-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/2721df0c-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/2721df0c-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
################################################################################
# 2721df0c-5cc5-11e4-af55-00155d01fe08
#
# Justin Dierking
# justindierking@hardbitsolutions.com
# phnomcobra@gmail.com
#
# 10/24/2014 Original Construction
################################################################... | 38.973684 | 156 | 0.603646 |
798250e531c7778c3cc83b72fa89845e46e64b1f | 1,319 | py | Python | weekly/lambdas/05-caller-html-heatmap/caller_html_heatmap.py | visual-ds/cities-reports | 0cc509c7bf099a3ac01ea5de1062b69d3dfe255a | [
"MIT"
] | null | null | null | weekly/lambdas/05-caller-html-heatmap/caller_html_heatmap.py | visual-ds/cities-reports | 0cc509c7bf099a3ac01ea5de1062b69d3dfe255a | [
"MIT"
] | null | null | null | weekly/lambdas/05-caller-html-heatmap/caller_html_heatmap.py | visual-ds/cities-reports | 0cc509c7bf099a3ac01ea5de1062b69d3dfe255a | [
"MIT"
] | 2 | 2020-08-14T17:15:43.000Z | 2021-02-25T20:13:39.000Z | import json
import boto3
from datetime import datetime as dt
lambd = boto3.client('lambda')
def lambda_handler(event, context):
today = dt.fromtimestamp(event['timestamp'])
prefix = event['prefix']
event['report']['img']['files'] = []
for query in event['queries']:
if... | 33.820513 | 109 | 0.442002 |
7982517ba4681442448be20861482921aaf06e0f | 1,627 | py | Python | vendor/packages/translate-toolkit/translate/storage/po.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | null | null | null | vendor/packages/translate-toolkit/translate/storage/po.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 1 | 2021-12-13T20:55:07.000Z | 2021-12-13T20:55:07.000Z | vendor/packages/translate-toolkit/translate/storage/po.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 2 of t... | 37.837209 | 81 | 0.723417 |
7982519e08ed786bc44a70d7d3c6879206986de5 | 371 | py | Python | modoboa/limits/migrations/0002_auto_20151114_1518.py | HarshCasper/modoboa | a00baa0593107992f545ee3e89cd4346b9615a96 | [
"0BSD"
] | 1,602 | 2016-12-15T14:25:34.000Z | 2022-03-31T16:49:25.000Z | modoboa/limits/migrations/0002_auto_20151114_1518.py | sebageek/modoboa | 57f5d57ea60a57e8dcac970085dfc07082481fc6 | [
"0BSD"
] | 1,290 | 2016-12-14T15:39:05.000Z | 2022-03-31T13:49:09.000Z | modoboa/limits/migrations/0002_auto_20151114_1518.py | sebageek/modoboa | 57f5d57ea60a57e8dcac970085dfc07082481fc6 | [
"0BSD"
] | 272 | 2016-12-22T11:58:18.000Z | 2022-03-17T15:57:24.000Z | from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('limits', '0001_initial'),
]
operations = [
migrations.AlterModelTable(
name='limit',
table=None,
),
migrations.AlterModelTable(
name='lim... | 18.55 | 40 | 0.533693 |
79825221b477aa0ccaa16a4535f91efd46d183f6 | 3,760 | py | Python | diplomacy/environment/human_readable_actions.py | maayanorner/diplomacy | 9d843e9611cf691cf528a8251d0cdaed2be1e4ac | [
"Apache-2.0"
] | null | null | null | diplomacy/environment/human_readable_actions.py | maayanorner/diplomacy | 9d843e9611cf691cf528a8251d0cdaed2be1e4ac | [
"Apache-2.0"
] | null | null | null | diplomacy/environment/human_readable_actions.py | maayanorner/diplomacy | 9d843e9611cf691cf528a8251d0cdaed2be1e4ac | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 36.504854 | 81 | 0.722872 |
798252637f69905d273bb56d4a0f58076fe3d1ef | 23,270 | py | Python | shap/plots/summary.py | Ludecan/shap | 3a99aae8eecabbec95955830e1994887a97298d2 | [
"MIT"
] | 13 | 2019-07-04T11:40:24.000Z | 2021-09-10T09:54:36.000Z | shap/plots/summary.py | bstellato/shap | 575e791cce2f755b5bcebfb33d0fc9a57ff6e77c | [
"MIT"
] | null | null | null | shap/plots/summary.py | bstellato/shap | 575e791cce2f755b5bcebfb33d0fc9a57ff6e77c | [
"MIT"
] | 10 | 2019-09-09T13:56:49.000Z | 2021-10-01T20:08:35.000Z | """ Summary plots of SHAP values across a whole dataset.
"""
from __future__ import division
import warnings
import numpy as np
from scipy.stats import gaussian_kde
try:
import matplotlib.pyplot as pl
except ImportError:
warnings.warn("matplotlib could not be loaded!")
pass
from . import labels
from . imp... | 47.105263 | 145 | 0.567813 |
798253b8a89c5448969216e2baa8f5d90d3fd9ee | 429 | py | Python | p7e4.py | yannickbf-prog/python | da4bd2c8668966359b829a8ac2a896afeca2b150 | [
"MIT"
] | null | null | null | p7e4.py | yannickbf-prog/python | da4bd2c8668966359b829a8ac2a896afeca2b150 | [
"MIT"
] | null | null | null | p7e4.py | yannickbf-prog/python | da4bd2c8668966359b829a8ac2a896afeca2b150 | [
"MIT"
] | null | null | null | #Yannick p7e4 Escribe un programa que pida una frase, y le pase como parámetro a una función dicha frase. La función debe sustituir todos los espacios en blanco de una frase por un asterisco, y devolver el resultado para que el programa principal la imprima por pantalla
def nuevaFrase(frase1):
frase1 = fr... | 35.75 | 271 | 0.72028 |
798253b8bf0a440ccc99a6eed2e24e6beb360a15 | 9,023 | py | Python | mypy/test/testsubtypes.py | ooprathamm/mypy | 1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac | [
"PSF-2.0"
] | null | null | null | mypy/test/testsubtypes.py | ooprathamm/mypy | 1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac | [
"PSF-2.0"
] | null | null | null | mypy/test/testsubtypes.py | ooprathamm/mypy | 1ac9c77bb0b5b95a9b3ee8936ac74a52e6e641ac | [
"PSF-2.0"
] | null | null | null | from mypy.test.helpers import Suite, skip
from mypy.nodes import CONTRAVARIANT, INVARIANT, COVARIANT
from mypy.subtypes import is_subtype
from mypy.test.typefixture import TypeFixture, InterfaceTypeFixture
from mypy.types import Type
class SubtypingSuite(Suite):
def setUp(self) -> None:
self.fx =... | 43.589372 | 80 | 0.638036 |
7982545902e561a0e1dc3d7eb9478ef399061947 | 3,126 | py | Python | reinforcement_learning/reinforce.py | luckmoon/examples | 1b1ff9eb312643d7c35448086aec4b61ed5753d5 | [
"BSD-3-Clause"
] | 2,224 | 2018-11-20T01:04:40.000Z | 2022-03-28T14:19:13.000Z | reinforcement_learning/reinforce.py | ajfisch/examples | e128edac1d9ed96f58502d319737324c05640041 | [
"BSD-3-Clause"
] | 34 | 2019-03-07T11:41:45.000Z | 2022-03-21T23:02:25.000Z | reinforcement_learning/reinforce.py | ajfisch/examples | e128edac1d9ed96f58502d319737324c05640041 | [
"BSD-3-Clause"
] | 596 | 2018-11-20T01:29:28.000Z | 2022-03-28T08:24:55.000Z | import argparse
import gym
import numpy as np
from itertools import count
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.distributions import Categorical
parser = argparse.ArgumentParser(description='PyTorch REINFORCE example')
parser.add_argument('--gamma',... | 30.057692 | 86 | 0.62476 |
798254b80272b0adfcbb808b79281c9ca305241e | 97,571 | py | Python | spacy/language.py | johnmccain/spaCy | a9bd68ca93addbdac131ff9ee2836eef094ac844 | [
"MIT"
] | null | null | null | spacy/language.py | johnmccain/spaCy | a9bd68ca93addbdac131ff9ee2836eef094ac844 | [
"MIT"
] | null | null | null | spacy/language.py | johnmccain/spaCy | a9bd68ca93addbdac131ff9ee2836eef094ac844 | [
"MIT"
] | 1 | 2022-03-12T09:25:47.000Z | 2022-03-12T09:25:47.000Z | from typing import Iterator, Optional, Any, Dict, Callable, Iterable
from typing import Union, Tuple, List, Set, Pattern, Sequence
from typing import NoReturn, TYPE_CHECKING, TypeVar, cast, overload
from dataclasses import dataclass
import random
import itertools
import functools
from contextlib import contextmanager
... | 43.931112 | 125 | 0.609915 |
7982563821897c394af8ad1f3e1a90ca7b3251ec | 5,815 | py | Python | networkapi/auth/__init__.py | brunodevel/GloboNetworkAPI | ea8eebc0337636f9250e628cc392514934db8edd | [
"Apache-2.0"
] | null | null | null | networkapi/auth/__init__.py | brunodevel/GloboNetworkAPI | ea8eebc0337636f9250e628cc392514934db8edd | [
"Apache-2.0"
] | null | null | null | networkapi/auth/__init__.py | brunodevel/GloboNetworkAPI | ea8eebc0337636f9250e628cc392514934db8edd | [
"Apache-2.0"
] | null | null | null | # -*- coding: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 "Lice... | 31.263441 | 136 | 0.693035 |
798256fabc373699916640f31f751561fa9a4150 | 28,431 | py | Python | mne/beamformer/_lcmv.py | ArasAzimi/mne-python | 65e510049d81ae3517f63c27244eacbc5cc8d320 | [
"BSD-3-Clause"
] | null | null | null | mne/beamformer/_lcmv.py | ArasAzimi/mne-python | 65e510049d81ae3517f63c27244eacbc5cc8d320 | [
"BSD-3-Clause"
] | null | null | null | mne/beamformer/_lcmv.py | ArasAzimi/mne-python | 65e510049d81ae3517f63c27244eacbc5cc8d320 | [
"BSD-3-Clause"
] | null | null | null | """Compute Linearly constrained minimum variance (LCMV) beamformer."""
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Roman Goj <roman.goj@gmail.com>
# Britta Westner <britta.wstnr@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
from scipy import linalg
from ..io... | 39.65272 | 79 | 0.622665 |
7982572d85cb564ce2f1ec987a51252b6eb3e61d | 3,839 | py | Python | telemetry/telemetry/testing/run_tests_unittest.py | tdresser/catapult-csm | 8f69b07e80198c1af0d5bd368d8ad8ced968884a | [
"BSD-3-Clause"
] | 4 | 2017-12-29T03:17:40.000Z | 2021-07-04T03:28:11.000Z | telemetry/telemetry/testing/run_tests_unittest.py | tdresser/catapult-csm | 8f69b07e80198c1af0d5bd368d8ad8ced968884a | [
"BSD-3-Clause"
] | 1 | 2021-08-13T18:39:43.000Z | 2021-08-13T18:39:43.000Z | telemetry/telemetry/testing/run_tests_unittest.py | tdresser/catapult-csm | 8f69b07e80198c1af0d5bd368d8ad8ced968884a | [
"BSD-3-Clause"
] | 6 | 2017-12-05T07:15:08.000Z | 2021-07-04T03:28:13.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from telemetry.core import util
from telemetry.testing import run_tests
class MockArgs(object):
def __init__(self):
self.positional_... | 30.712 | 79 | 0.626205 |
798257b08bf9c6ff25c69628daadf819a1195d1d | 3,243 | py | Python | redisbench_admin/utils/results.py | OfirMos/redisbench-admin | eaa6368c9073e092e10b4cc57c9395d17854e04a | [
"Apache-2.0"
] | null | null | null | redisbench_admin/utils/results.py | OfirMos/redisbench-admin | eaa6368c9073e092e10b4cc57c9395d17854e04a | [
"Apache-2.0"
] | null | null | null | redisbench_admin/utils/results.py | OfirMos/redisbench-admin | eaa6368c9073e092e10b4cc57c9395d17854e04a | [
"Apache-2.0"
] | null | null | null | # Apache License Version 2.0
#
# Copyright (c) 2021., Redis Labs Modules
# All rights reserved.
#
import json
import logging
from redisbench_admin.run.redis_benchmark.redis_benchmark import (
redis_benchmark_from_stdout_csv_to_json,
)
from redisbench_admin.run.ycsb.ycsb import post_process_ycsb_results
def g... | 33.78125 | 87 | 0.657724 |
798257c8f65806568b8f8731104b237cf0c1c263 | 1,848 | py | Python | tests/test_helpers.py | bczsalba/PyTermGUI | 3e7cc741363e5ff37de552cf97c8f43405834cc3 | [
"MIT"
] | 40 | 2022-01-28T20:49:11.000Z | 2022-02-19T22:33:52.000Z | tests/test_helpers.py | bczsalba/PyTermGUI | 3e7cc741363e5ff37de552cf97c8f43405834cc3 | [
"MIT"
] | 12 | 2022-01-28T15:46:36.000Z | 2022-02-15T06:52:15.000Z | tests/test_helpers.py | bczsalba/PyTermGUI | 3e7cc741363e5ff37de552cf97c8f43405834cc3 | [
"MIT"
] | 5 | 2022-01-29T02:26:24.000Z | 2022-02-07T18:12:58.000Z | from pytermgui import tim, real_length, get_applied_sequences, break_line
def test_break_plain():
text = "123 12345 1234"
broken = break_line(text, 3)
assert list(broken) == ["123", " 12", "345", " 12", "34"]
def test_break_fancy():
text = tim.parse("[141 bold]Hello there[/ italic blue] whats up[cya... | 36.96 | 84 | 0.664502 |
79825876399ad900ee49082b762891177a0febe6 | 27,470 | py | Python | PET tumour segmentation code/PET_Segmentation-Copy1.py | akac0297/PETLAB | 950cc153ce230d12d752ad0d11111e7fc22d9e7d | [
"MIT"
] | null | null | null | PET tumour segmentation code/PET_Segmentation-Copy1.py | akac0297/PETLAB | 950cc153ce230d12d752ad0d11111e7fc22d9e7d | [
"MIT"
] | null | null | null | PET tumour segmentation code/PET_Segmentation-Copy1.py | akac0297/PETLAB | 950cc153ce230d12d752ad0d11111e7fc22d9e7d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
"""
Import modules
"""
import pathlib
import numpy as np
import SimpleITK as sitk
import matplotlib.pyplot as plt
from platipy.imaging.visualisation.tools import ImageVisualiser
from platipy.imaging.registration.registration import (
initial_registration,
fa... | 23.161889 | 139 | 0.728759 |
798259250823bc0b1865c80ce2494babff7e754d | 9,604 | py | Python | games/tensortrade_ohrnstein.py | qthequartermasterman/muzero-general | 757b9be796c1f7510993d078e4d897cd7f73dda2 | [
"MIT"
] | null | null | null | games/tensortrade_ohrnstein.py | qthequartermasterman/muzero-general | 757b9be796c1f7510993d078e4d897cd7f73dda2 | [
"MIT"
] | null | null | null | games/tensortrade_ohrnstein.py | qthequartermasterman/muzero-general | 757b9be796c1f7510993d078e4d897cd7f73dda2 | [
"MIT"
] | null | null | null | from .abstract_game import AbstractGame
import numpy as np
import torch
import os
import datetime
from .trading_envs import create_fourier_gbm_env, create_ornstein_uhlenbeck_env
class MuZeroConfig:
def __init__(self):
# More information is available here: https://github.com/werner-duvaud/muzero-general/... | 49.251282 | 224 | 0.668992 |
798259e37a981d036e0bbeaa30df62d410dc29a4 | 53 | py | Python | unittests/__init__.py | pathbreak/linode-cluster-toolkit | 280257436105703c9a122e7ed111a72efa79adfc | [
"MIT"
] | 11 | 2017-07-19T15:25:39.000Z | 2021-12-02T20:03:21.000Z | unittests/__init__.py | pathbreak/linode-cluster-toolkit | 280257436105703c9a122e7ed111a72efa79adfc | [
"MIT"
] | null | null | null | unittests/__init__.py | pathbreak/linode-cluster-toolkit | 280257436105703c9a122e7ed111a72efa79adfc | [
"MIT"
] | 1 | 2021-12-02T20:03:22.000Z | 2021-12-02T20:03:22.000Z | from .testclusterplan import *
from .secrets import * | 26.5 | 30 | 0.792453 |
79825a1a9d7bf708657f12622b0a41af277307b9 | 324 | py | Python | algorithms/min_stack_test.py | kainonly/leetcode | 83a84ad48d517eb7f1377cb2a3aa3fe763da6627 | [
"MIT"
] | null | null | null | algorithms/min_stack_test.py | kainonly/leetcode | 83a84ad48d517eb7f1377cb2a3aa3fe763da6627 | [
"MIT"
] | null | null | null | algorithms/min_stack_test.py | kainonly/leetcode | 83a84ad48d517eb7f1377cb2a3aa3fe763da6627 | [
"MIT"
] | null | null | null | import unittest
from .min_stack import MinStack
class Test(unittest.TestCase):
def test_example1(self):
n = MinStack()
n.push(-2)
n.push(0)
n.push(-3)
self.assertEqual(n.getMin(), -3)
n.pop()
self.assertEqual(n.top(), 0)
self.assertEqual(n.getMin(), ... | 21.6 | 40 | 0.564815 |
79825be2789eb0f676362a1824d8bcdb680e322f | 54,886 | py | Python | Wrappers/Python/test/test_functions.py | Asharits/CIL | 66848b021fb2c6daca71e276890152f34a87ba36 | [
"Apache-2.0"
] | 30 | 2021-05-18T08:54:01.000Z | 2022-03-24T17:42:31.000Z | Wrappers/Python/test/test_functions.py | Asharits/CIL | 66848b021fb2c6daca71e276890152f34a87ba36 | [
"Apache-2.0"
] | 301 | 2021-05-07T12:28:15.000Z | 2022-03-31T17:16:26.000Z | Wrappers/Python/test/test_functions.py | Asharits/CIL | 66848b021fb2c6daca71e276890152f34a87ba36 | [
"Apache-2.0"
] | 7 | 2021-09-05T20:45:11.000Z | 2022-03-10T21:16:37.000Z | # -*- coding: utf-8 -*-
# This work is part of the Core Imaging Library (CIL) developed by CCPi
# (Collaborative Computational Project in Tomographic Imaging), with
# substantial contributions by UKRI-STFC and University of Manchester.
# Licensed under the Apache License, Version 2.0 (the "License");
# you... | 36.08547 | 137 | 0.563386 |
79825c9d400fa748bbae2e216a96b13f65328ee1 | 4,577 | py | Python | research/slim/nets/cifarnet.py | thexa4/artificial-data-research-models | aa622469758a35ddaa8cf8af0cf14925a08293a2 | [
"Apache-2.0"
] | 1 | 2018-07-16T13:35:58.000Z | 2018-07-16T13:35:58.000Z | research/slim/nets/cifarnet.py | thexa4/artificial-data-research-models | aa622469758a35ddaa8cf8af0cf14925a08293a2 | [
"Apache-2.0"
] | null | null | null | research/slim/nets/cifarnet.py | thexa4/artificial-data-research-models | aa622469758a35ddaa8cf8af0cf14925a08293a2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 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... | 38.788136 | 80 | 0.666812 |
79825d70d1f69ebf0e3bda2cbb4d3981472373f3 | 8,537 | py | Python | pymc3/math.py | rsumner31/pymc3-2 | e824294ddfb45610536cad07394b8c290904c38d | [
"Apache-2.0"
] | null | null | null | pymc3/math.py | rsumner31/pymc3-2 | e824294ddfb45610536cad07394b8c290904c38d | [
"Apache-2.0"
] | null | null | null | pymc3/math.py | rsumner31/pymc3-2 | e824294ddfb45610536cad07394b8c290904c38d | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import sys
import theano.tensor as tt
# pylint: disable=unused-import
import theano
from theano.tensor import (
constant, flatten, zeros_like, ones_like, stack, concatenate, sum, prod,
lt, gt, le, ge, eq, neq, switch, clip, where, and_, or_, abs_, exp, log,
cos, sin, tan, cos... | 30.27305 | 94 | 0.604779 |
79825e71577b3761b2de95fa89ce91c18c165e33 | 96 | py | Python | StocksAPI/views/index.py | javapagar/DRF_REST_API | 85c1cb7b923610b42ac23e8bdad7d91fd0740283 | [
"MIT"
] | null | null | null | StocksAPI/views/index.py | javapagar/DRF_REST_API | 85c1cb7b923610b42ac23e8bdad7d91fd0740283 | [
"MIT"
] | null | null | null | StocksAPI/views/index.py | javapagar/DRF_REST_API | 85c1cb7b923610b42ac23e8bdad7d91fd0740283 | [
"MIT"
] | 1 | 2021-11-26T00:26:54.000Z | 2021-11-26T00:26:54.000Z | from django.http import HttpResponse
def index(request):
return HttpResponse('Hi there!')
| 16 | 36 | 0.75 |
79825ec741ae7ff311a0eb3921280dd95b1e5c69 | 6,074 | py | Python | Examples/RegistrationITKv4/ImageRegistration5.py | eile/ITK | 2f09e6e2f9e0a4a7269ac83c597f97b04f915dc1 | [
"Apache-2.0"
] | null | null | null | Examples/RegistrationITKv4/ImageRegistration5.py | eile/ITK | 2f09e6e2f9e0a4a7269ac83c597f97b04f915dc1 | [
"Apache-2.0"
] | null | null | null | Examples/RegistrationITKv4/ImageRegistration5.py | eile/ITK | 2f09e6e2f9e0a4a7269ac83c597f97b04f915dc1 | [
"Apache-2.0"
] | null | null | null | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | 33.744444 | 109 | 0.738064 |
79825ed7f39808b326b93eb774e27a3567073047 | 3,142 | py | Python | pydis_site/apps/api/migrations/0068_split_nomination_tables.py | Robin5605/site | 81aa42aa748cb228d7a09e6cf6b211484b654496 | [
"MIT"
] | 700 | 2018-11-17T15:56:51.000Z | 2022-03-30T22:53:17.000Z | pydis_site/apps/api/migrations/0068_split_nomination_tables.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 542 | 2018-11-17T13:39:42.000Z | 2022-03-31T11:24:00.000Z | pydis_site/apps/api/migrations/0068_split_nomination_tables.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 178 | 2018-11-21T09:06:56.000Z | 2022-03-31T07:43:28.000Z | # Generated by Django 3.0.11 on 2021-02-21 15:32
from django.apps.registry import Apps
from django.db import backends, migrations, models
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
import django.db.models.deletion
import pydis_site.apps.api.models.mixins
def migrate_nominations(apps: Apps, s... | 41.342105 | 119 | 0.62317 |
79826032857b21693d238140b1ce89c89433ed50 | 2,261 | py | Python | Functions/FuncWithMultipleArgs.py | Keerti-Gautam/PythonLearning | ed91b737e424ad87e75af987b53971d3ba5d073b | [
"MIT"
] | null | null | null | Functions/FuncWithMultipleArgs.py | Keerti-Gautam/PythonLearning | ed91b737e424ad87e75af987b53971d3ba5d073b | [
"MIT"
] | 1 | 2017-07-11T15:36:50.000Z | 2017-07-11T15:36:50.000Z | Functions/FuncWithMultipleArgs.py | Keerti-Gautam/PythonLearning | ed91b737e424ad87e75af987b53971d3ba5d073b | [
"MIT"
] | null | null | null | # You can define functions that take a variable number of positional args, which will be interpreted as a tuple by using *
# Writing args and kwargs are not necessary, you can write var or vars and it would work the same
def varargs(*args):
return args
print varargs(1, 2, 3) # => (1, 2, 3)
# You can define func... | 37.065574 | 163 | 0.704113 |
79826045ff28b23b49f687f03194f7e527e25911 | 1,630 | py | Python | renku/core/commands/clone.py | tcchrist/renku-python | 47d2b5f36b74d0d3d435e3f78373e52361361139 | [
"Apache-2.0"
] | null | null | null | renku/core/commands/clone.py | tcchrist/renku-python | 47d2b5f36b74d0d3d435e3f78373e52361361139 | [
"Apache-2.0"
] | null | null | null | renku/core/commands/clone.py | tcchrist/renku-python | 47d2b5f36b74d0d3d435e3f78373e52361361139 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2018-2020- Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in co... | 29.636364 | 75 | 0.715337 |
798261a436b410b86fc64363a69523fd29e1f451 | 19 | py | Python | engine/src/juliabox/plugins/sendmail_ses/__init__.py | shashi/JuliaBox | 10f65b3ed1b5b2ca703a4ff2c79940cc10c66c61 | [
"MIT"
] | 50 | 2016-09-09T02:17:09.000Z | 2022-03-15T17:16:20.000Z | engine/src/juliabox/plugins/sendmail_ses/__init__.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 58 | 2016-08-29T19:19:28.000Z | 2018-11-14T01:49:16.000Z | engine/src/juliabox/plugins/sendmail_ses/__init__.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 24 | 2016-09-27T18:20:54.000Z | 2022-01-02T09:37:44.000Z | __author__ = 'tan'
| 9.5 | 18 | 0.684211 |
798261d97e5f22a443c6a7f62ecf7814f09e5ca1 | 821 | py | Python | src/model/makeDatabaseConnection.py | lin483/Funny-Nations | 2bb1cd23a3d5f1e4a4854c73ac27f62c98127ef6 | [
"MIT"
] | 126 | 2022-01-15T02:29:07.000Z | 2022-03-30T09:57:40.000Z | src/model/makeDatabaseConnection.py | lin483/Funny-Nations | 2bb1cd23a3d5f1e4a4854c73ac27f62c98127ef6 | [
"MIT"
] | 18 | 2022-01-11T22:24:35.000Z | 2022-03-16T00:13:01.000Z | src/model/makeDatabaseConnection.py | lin483/Funny-Nations | 2bb1cd23a3d5f1e4a4854c73ac27f62c98127ef6 | [
"MIT"
] | 25 | 2022-01-22T15:06:27.000Z | 2022-03-01T04:34:19.000Z | import pymysql
import os
import configparser
from loguru import logger
from src.utils.readConfig import getMajorConfig
from pymysql import Connection
from pymysql.cursors import Cursor
from src.utils.readConfig import getMajorConfig
config = getMajorConfig()
def makeDatabaseConnection():
"""
After you use ... | 24.147059 | 76 | 0.669915 |
7982627793ff1515fb296ed06eb9e9ebf766316f | 1,298 | py | Python | python/pqauth/crypto.py | teddziuba/pqauth | b6322c704306342b0cdeed07d6a6dfe7faf7ca4c | [
"MIT"
] | 28 | 2015-07-03T19:56:32.000Z | 2022-03-31T04:45:26.000Z | python/pqauth/crypto.py | teddziuba/pqauth | b6322c704306342b0cdeed07d6a6dfe7faf7ca4c | [
"MIT"
] | null | null | null | python/pqauth/crypto.py | teddziuba/pqauth | b6322c704306342b0cdeed07d6a6dfe7faf7ca4c | [
"MIT"
] | 2 | 2017-05-29T14:40:56.000Z | 2017-12-20T02:30:38.000Z | from binascii import hexlify
import uuid
from Crypto.Cipher import PKCS1_OAEP
from Crypto.PublicKey import RSA
from Crypto.Random import random
from paramiko.rsakey import RSAKey as ParamikoRSAKey
def load_key_file(path, passphrase=None):
f = open(path, "rb")
try:
return rsa_key(f.read(), passphrase)... | 25.96 | 68 | 0.728043 |
7982638d947c1252bb163f55990e055011b03d2c | 27,961 | py | Python | pr_flow/gen_route.py | vagrantxiao/dirc_riscv | 0566fd3f7ff1640c7ae9dbb037907d20997aad24 | [
"MIT"
] | null | null | null | pr_flow/gen_route.py | vagrantxiao/dirc_riscv | 0566fd3f7ff1640c7ae9dbb037907d20997aad24 | [
"MIT"
] | null | null | null | pr_flow/gen_route.py | vagrantxiao/dirc_riscv | 0566fd3f7ff1640c7ae9dbb037907d20997aad24 | [
"MIT"
] | 1 | 2021-05-06T14:05:57.000Z | 2021-05-06T14:05:57.000Z | #!/usr/bin/env python
import os
import xml.etree.ElementTree
class direct_int:
def __init__(self, prflow_params):
self.prflow_params = prflow_params
def gen_routing(self):
os.system("rm -rf "+self.prflow_params['dest_dir'])
os.system("mkdir "+self.prflow_params['dest_dir'])
os.system("cp ./input... | 66.57381 | 158 | 0.596009 |
79826399a29fdcd0bf8003766ee026179416e1e3 | 3,006 | py | Python | fet_api_to_gcal/routes.py | 0x000c0ded/fet-to-calendar-api-manager | feff9b5dbe6109cf9d507bbf86867fb7717156c9 | [
"MIT"
] | 2 | 2019-08-25T10:04:20.000Z | 2019-10-25T07:50:23.000Z | fet_api_to_gcal/routes.py | 0x000c0ded/fet-to-calendar-api-manager | feff9b5dbe6109cf9d507bbf86867fb7717156c9 | [
"MIT"
] | null | null | null | fet_api_to_gcal/routes.py | 0x000c0ded/fet-to-calendar-api-manager | feff9b5dbe6109cf9d507bbf86867fb7717156c9 | [
"MIT"
] | 2 | 2019-10-25T07:50:13.000Z | 2020-06-28T20:29:11.000Z | import functools
import os
import flask
from flask import url_for, redirect, request, abort, render_template, Blueprint
import googleapiclient.discovery
from authlib.client import OAuth2Session
import google.oauth2.credentials
ACCESS_TOKEN_URI = 'https://www.googleapis.com/oauth2/v4/token'
AUTHORIZATION_URL = 'https:... | 29.762376 | 149 | 0.742848 |
7982640c352191e90a7fc2139bafd45db3e03194 | 558 | py | Python | trs_filer/ga4gh/trs/endpoints/utils.py | zagganas/trs-filer | 64b86dd37155319a171834fdd221abe1308cc107 | [
"Apache-2.0"
] | 8 | 2020-07-25T04:32:11.000Z | 2021-11-11T22:27:56.000Z | trs_filer/ga4gh/trs/endpoints/utils.py | zagganas/trs-filer | 64b86dd37155319a171834fdd221abe1308cc107 | [
"Apache-2.0"
] | 61 | 2020-07-08T02:33:39.000Z | 2022-03-21T15:34:32.000Z | trs_filer/ga4gh/trs/endpoints/utils.py | zagganas/trs-filer | 64b86dd37155319a171834fdd221abe1308cc107 | [
"Apache-2.0"
] | 4 | 2020-09-18T05:50:46.000Z | 2021-11-08T13:51:42.000Z | """Utility functions for endpoint controllers."""
from random import choice
import string
def generate_id(
charset: str = ''.join([string.ascii_letters, string.digits]),
length: int = 6,
) -> str:
"""Generate random string based on allowed set of characters.
Args:
charset: String of allowed ... | 25.363636 | 72 | 0.673835 |
79826476308513ae1cfeef0acd6e9e229eb433fe | 462 | py | Python | env/Lib/site-packages/plotly/validators/scatter3d/error_y/_traceref.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/scatter3d/error_y/_traceref.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/scatter3d/error_y/_traceref.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator):
def __init__(
self, plotly_name="traceref", parent_name="scatter3d.error_y", **kwargs
):
super(TracerefValidator, self).__init__(
plotly_name=plotly_name,
parent_... | 30.8 | 79 | 0.640693 |
798264980978e5a5a23686304f7f97caf44dea4d | 17,803 | py | Python | rest_registration/settings_fields.py | rarvolt/django-rest-registration | 56e6cf3055e1fd858e2a609112ef263784582fa4 | [
"MIT"
] | null | null | null | rest_registration/settings_fields.py | rarvolt/django-rest-registration | 56e6cf3055e1fd858e2a609112ef263784582fa4 | [
"MIT"
] | null | null | null | rest_registration/settings_fields.py | rarvolt/django-rest-registration | 56e6cf3055e1fd858e2a609112ef263784582fa4 | [
"MIT"
] | null | null | null | import datetime
from collections import OrderedDict, namedtuple
from textwrap import dedent
_Field = namedtuple('_Field', [
'name',
'default',
'help',
'import_string',
])
class Field(_Field):
def __new__(
cls, name, *,
default=None,
help=None, # pylint: disab... | 37.401261 | 108 | 0.622423 |
798264bb4fd4e4bae2affb96ebab6ed649490a2b | 973 | py | Python | Lib/site-packages/tensorflow_core/_api/v2/compat/v2/lookup/__init__.py | caiyongji/py36-tf2.0rc | c5b4b364ba14214534228570e58ef96b1a8bb6dc | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/site-packages/tensorflow_core/_api/v2/compat/v2/lookup/__init__.py | caiyongji/py36-tf2.0rc | c5b4b364ba14214534228570e58ef96b1a8bb6dc | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/site-packages/tensorflow_core/_api/v2/compat/v2/lookup/__init__.py | caiyongji/py36-tf2.0rc | c5b4b364ba14214534228570e58ef96b1a8bb6dc | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.lookup namespace.
"""
from __future__ import print_function as _print_function
import sys as _sys
from tensorflow._api.v2.compat.v2.lookup import experimental
from te... | 38.92 | 86 | 0.830421 |
7982654b1ca5bbf8f26247cc05e956bb923ac430 | 1,459 | py | Python | setup.py | danmichaelo/sruthi | c0fba512958d11d199946aa10583ee115cf45c69 | [
"MIT"
] | 4 | 2021-05-12T11:12:33.000Z | 2022-03-03T15:08:19.000Z | setup.py | danmichaelo/sruthi | c0fba512958d11d199946aa10583ee115cf45c69 | [
"MIT"
] | 11 | 2020-05-23T11:22:38.000Z | 2021-12-06T18:20:50.000Z | setup.py | danmichaelo/sruthi | c0fba512958d11d199946aa10583ee115cf45c69 | [
"MIT"
] | 2 | 2020-10-01T16:04:56.000Z | 2020-11-09T20:09:41.000Z | # -*- coding: utf-8 -*-
from codecs import open
from setuptools import setup, find_packages
import re
with open('sruthi/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('Cannot... | 33.159091 | 79 | 0.63331 |
79826786c918bd0216385cba3eae908b0744297f | 1,082 | py | Python | keras_transformer/keras_transformer/core/encoder_decoder/normalization/LayerNormalization.py | erelcan/keras-transformer | ae88985dd4f1b5f91737e80c7e9c3157b60b4c4f | [
"Apache-2.0"
] | 3 | 2021-02-14T17:10:59.000Z | 2021-02-14T18:09:17.000Z | keras_transformer/keras_transformer/core/encoder_decoder/normalization/LayerNormalization.py | erelcan/keras-transformer | ae88985dd4f1b5f91737e80c7e9c3157b60b4c4f | [
"Apache-2.0"
] | null | null | null | keras_transformer/keras_transformer/core/encoder_decoder/normalization/LayerNormalization.py | erelcan/keras-transformer | ae88985dd4f1b5f91737e80c7e9c3157b60b4c4f | [
"Apache-2.0"
] | null | null | null | from keras import backend as K
from keras.layers import Layer
from keras.initializers import Ones, Zeros
class LayerNormalization(Layer):
def __init__(self, eps=1e-6, **kwargs):
self._eps = eps
self._gamma = None
self._beta = None
super().__init__(**kwargs)
def build(self, inp... | 38.642857 | 111 | 0.661738 |
79826989e7cec856ca029fde137e593da2f9d32e | 3,336 | py | Python | layers.py | stnk20/Differentiable_Ascii_Art_Renderer | c1e9c97da3a31ccc189cfff1ada92d44fd14ce0a | [
"MIT"
] | 11 | 2020-07-05T01:20:04.000Z | 2022-01-12T09:07:55.000Z | layers.py | stnk20/Differentiable_Ascii_Art_Renderer | c1e9c97da3a31ccc189cfff1ada92d44fd14ce0a | [
"MIT"
] | null | null | null | layers.py | stnk20/Differentiable_Ascii_Art_Renderer | c1e9c97da3a31ccc189cfff1ada92d44fd14ce0a | [
"MIT"
] | 2 | 2020-07-07T00:31:48.000Z | 2020-12-05T12:36:16.000Z | import tensorflow as tf
from tensorflow.keras import backend as K
def combine_value_gradient(xv, xg):
# 値とgradientで別のフローを適用する
return tf.stop_gradient(xv)+tf.custom_gradient(lambda x: [K.zeros_like(x), lambda dy: dy])(xg)
def step(x):
return K.cast_to_floatx(K.greater(x, 0.0))
def gumbel_sigmoid(x, tau... | 35.489362 | 117 | 0.638489 |
798269b317e4f678c6407a11cc93dffba089955c | 10,532 | py | Python | scraper/test/test_scraper.py | SwapneelM/projectaeora | dc7a0b9b9434c136796d2fa02069b3c6bc09d35a | [
"MIT"
] | 6 | 2018-10-16T06:59:53.000Z | 2021-04-30T02:00:26.000Z | scraper/test/test_scraper.py | SwapneelM/projectaeora | dc7a0b9b9434c136796d2fa02069b3c6bc09d35a | [
"MIT"
] | null | null | null | scraper/test/test_scraper.py | SwapneelM/projectaeora | dc7a0b9b9434c136796d2fa02069b3c6bc09d35a | [
"MIT"
] | 2 | 2018-04-11T08:28:24.000Z | 2020-11-23T18:23:05.000Z | import unittest
from footsie import Scraper
from footsie import Sector, Company, News
from datetime import datetime, timedelta
class TestScraper(unittest.TestCase):
def setUp(self):
self.scraper = Scraper.Scraper()
self.company = self.scraper.get_company_data('BARC')
def test_com... | 45.396552 | 129 | 0.685435 |
798269bdac800c52b9d5aca2c3018c6885c14488 | 20,401 | py | Python | pytato/utils.py | isuruf/pytato | f9b17200a93d36578c3f36ef0571dd8070109c90 | [
"MIT"
] | null | null | null | pytato/utils.py | isuruf/pytato | f9b17200a93d36578c3f36ef0571dd8070109c90 | [
"MIT"
] | null | null | null | pytato/utils.py | isuruf/pytato | f9b17200a93d36578c3f36ef0571dd8070109c90 | [
"MIT"
] | null | null | null | from __future__ import annotations
__copyright__ = "Copyright (C) 2021 Kaushik Kulkarni"
__license__ = """
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 l... | 36.171986 | 110 | 0.590314 |
79826ca47b0e63c791b46ba427207043ef0e4293 | 1,431 | py | Python | 01-About_file_practice_option/03-about_openpyxl_excel_write.py | jiaxiaochu/Crawler | bb54d515dc217c27574b36124e16fd5b993775bd | [
"MIT"
] | null | null | null | 01-About_file_practice_option/03-about_openpyxl_excel_write.py | jiaxiaochu/Crawler | bb54d515dc217c27574b36124e16fd5b993775bd | [
"MIT"
] | 1 | 2020-08-27T10:25:38.000Z | 2020-08-27T10:25:38.000Z | 01-About_file_practice_option/03-about_openpyxl_excel_write.py | jiaxiaochu/Crawler | bb54d515dc217c27574b36124e16fd5b993775bd | [
"MIT"
] | null | null | null | # !/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
# -*- coding:utf-8 -*-
# @Author : Jiazhixiang
# @Time : 2019/12/11
import openpyxl
import datetime
# wb = openpyxl.Workbook() # 利用openpyxl.Workbook()函数创建新的workbook(工作薄)对象,就是创建新的空的Excel文件。
# ws = wb.active
# ws.title = 'new title'
# ws['A1'] = 42
# ws.a... | 24.254237 | 89 | 0.626136 |
79826dc8e75ecfcddd5239333cf2cbabaa4a9b02 | 429 | py | Python | oreilly/flat_dictionary.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | oreilly/flat_dictionary.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | oreilly/flat_dictionary.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | def flatten(dictionary):
if all(type(v) is str for v in dictionary.values()):
return dictionary
D = {}
for key in dictionary.keys():
if type(dictionary[key]) is str:
D[key] = dictionary[key]
elif len(dictionary[key])==0:
D[key] = ''
else:
E... | 30.642857 | 56 | 0.505828 |
79826dcf4f578bc1a505babbba4dfb1f766b9219 | 1,159 | py | Python | pyvisdk/do/general_host_error_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/general_host_error_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/general_host_error_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def GeneralHostErrorEvent(vim, *args, **kwargs):
'''This event is the general error event... | 34.088235 | 124 | 0.603969 |
79826f17a43d92e855898053572f41fadf43bf85 | 162 | py | Python | huaban/main.py | gantrol/pySpider | 5756b50f7d70ad55c6be8fccd9726d56d478138c | [
"MIT"
] | null | null | null | huaban/main.py | gantrol/pySpider | 5756b50f7d70ad55c6be8fccd9726d56d478138c | [
"MIT"
] | null | null | null | huaban/main.py | gantrol/pySpider | 5756b50f7d70ad55c6be8fccd9726d56d478138c | [
"MIT"
] | null | null | null | from scrapy.cmdline import execute
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
execute(['scrapy', 'crawl', 'beauty'])
| 23.142857 | 60 | 0.728395 |
798270081fb80704e35cb586a1817c803c82ca70 | 2,428 | py | Python | models/image_extractor.py | XDUxyLi/SCEN-master | 43c3cc60fb20054bb55c0d9d9eb4e1f6082a1377 | [
"MIT"
] | null | null | null | models/image_extractor.py | XDUxyLi/SCEN-master | 43c3cc60fb20054bb55c0d9d9eb4e1f6082a1377 | [
"MIT"
] | null | null | null | models/image_extractor.py | XDUxyLi/SCEN-master | 43c3cc60fb20054bb55c0d9d9eb4e1f6082a1377 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision import models
from torchvision.models.resnet import ResNet, BasicBlock
class ResNet18_conv(ResNet):
def __init__(self):
super(ResNet18_conv, self).__init__(BasicBlock, [2, 2, 2, 2])
def forward(self, x):
... | 30.35 | 99 | 0.610379 |
798270731e94433bf5f2aec22d2891de0531c78c | 24,970 | py | Python | intersight/models/hyperflex_app_catalog.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/models/hyperflex_app_catalog.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/models/hyperflex_app_catalog.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight OpenAPI specification.
The Cisco Intersight OpenAPI specification.
OpenAPI spec version: 1.0.9-1461
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class HyperflexAppCatal... | 36.399417 | 738 | 0.674049 |
798270d4509c1db120954bc9eab866f10bab8c3c | 3,339 | py | Python | src/NeoPixel.py | bitcointurm/Satoshi24 | 39b6b79b157cf57c3cac83574450658db9b9826e | [
"MIT"
] | 4 | 2019-11-05T20:37:52.000Z | 2019-11-18T16:23:12.000Z | src/NeoPixel.py | bitcointurm/Hector9000 | 39b6b79b157cf57c3cac83574450658db9b9826e | [
"MIT"
] | null | null | null | src/NeoPixel.py | bitcointurm/Hector9000 | 39b6b79b157cf57c3cac83574450658db9b9826e | [
"MIT"
] | 1 | 2019-12-01T19:59:49.000Z | 2019-12-01T19:59:49.000Z | import time
import board
import neopixel
PORT = board.D18
NUM = 12
NUMBASE = 5
pixels = neopixel.NeoPixel(PORT, NUM)
cols = [
(255, 0, 0),
(255, 63, 0),
(255, 120, 0),
(0, 255, 0),
(0, 255, 255),
(0, 0, 255),
(255, 0, 255)
]
col_neutral = (80, 80, 30)
NUMCOLS = len(cols)
def mode1():
... | 24.91791 | 104 | 0.524409 |
79827132a0894288e1b617abba1243c197ad4d30 | 7,377 | py | Python | redash/cli/data_sources.py | hgs847825/redash | 11d09b2f0945fb90898b68b730d12e7a52190251 | [
"BSD-2-Clause"
] | 4 | 2018-07-31T09:39:33.000Z | 2019-05-22T23:56:18.000Z | redash/cli/data_sources.py | hgs847825/redash | 11d09b2f0945fb90898b68b730d12e7a52190251 | [
"BSD-2-Clause"
] | 60 | 2019-05-31T06:11:35.000Z | 2021-06-25T15:20:33.000Z | redash/cli/data_sources.py | hgs847825/redash | 11d09b2f0945fb90898b68b730d12e7a52190251 | [
"BSD-2-Clause"
] | 8 | 2018-03-13T04:21:07.000Z | 2019-06-18T14:22:56.000Z | from __future__ import print_function
from sys import exit
import json
import click
from flask.cli import AppGroup
from sqlalchemy.orm.exc import NoResultFound
from redash import models
from redash.query_runner import query_runners
from redash.query_runner import get_configuration_schema_for_query_runner_type
from re... | 35.296651 | 79 | 0.61258 |
798271a94ad009d3dc4e032a4d86f9ed5de573b4 | 35,148 | py | Python | c7n/resources/appelb.py | MehdiZonjy/cloud-custodian | 9185eda70c4ee4d14190e62290ecfdf229ef42ff | [
"Apache-2.0"
] | 2 | 2017-09-20T15:43:40.000Z | 2018-12-22T12:03:07.000Z | c7n/resources/appelb.py | MehdiZonjy/cloud-custodian | 9185eda70c4ee4d14190e62290ecfdf229ef42ff | [
"Apache-2.0"
] | 2 | 2018-01-20T01:36:39.000Z | 2021-02-01T15:35:33.000Z | c7n/resources/appelb.py | MehdiZonjy/cloud-custodian | 9185eda70c4ee4d14190e62290ecfdf229ef42ff | [
"Apache-2.0"
] | 3 | 2017-09-21T13:36:46.000Z | 2021-09-20T16:38:29.000Z | # Copyright 2016-2018 Capital One Services, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 33.893925 | 109 | 0.602822 |
7982721e69186859b13729296d2fe2faa5c07764 | 2,596 | py | Python | tutorial/spiders/quotes_spider.py | AlexNizovoy/scrapy_tutorial | 0cf00b96340abe6d6a05c8a03efa9a290b3b583d | [
"Apache-2.0"
] | null | null | null | tutorial/spiders/quotes_spider.py | AlexNizovoy/scrapy_tutorial | 0cf00b96340abe6d6a05c8a03efa9a290b3b583d | [
"Apache-2.0"
] | null | null | null | tutorial/spiders/quotes_spider.py | AlexNizovoy/scrapy_tutorial | 0cf00b96340abe6d6a05c8a03efa9a290b3b583d | [
"Apache-2.0"
] | null | null | null | import scrapy
class QuotesSpider(scrapy.Spider):
name = 'quotes'
# def start_requests(self):
# urls = [
# 'http://quotes.toscrape.com/page/1/',
# 'http://quotes.toscrape.com/page/2/',
# ]
# for url in urls:
# yield scrapy.Request(url=url, callback=s... | 33.714286 | 74 | 0.573575 |
798273dff51ecf6134ee8ab6cf2ffb4a9cb8cd61 | 4,527 | py | Python | resources/micro_resource.py | adavila0703/warehouse-hub | 29778d605e372d6d6b41d05a3637edefb047f0bc | [
"MIT"
] | null | null | null | resources/micro_resource.py | adavila0703/warehouse-hub | 29778d605e372d6d6b41d05a3637edefb047f0bc | [
"MIT"
] | null | null | null | resources/micro_resource.py | adavila0703/warehouse-hub | 29778d605e372d6d6b41d05a3637edefb047f0bc | [
"MIT"
] | null | null | null | from flask_restful import Resource, reqparse
from flask import make_response, render_template, redirect
from models.micro_model import MicroModel
from datetime import datetime
import resources.home_resource as h
import sqlite3
from sqlite3 import OperationalError
class MicroResource(Resource):
"""Communication fo... | 34.295455 | 114 | 0.536117 |
7982743fa0f41f77af6f0a9ff2c8807ab067f258 | 573 | py | Python | session-1/tests/test_1.py | itamaro/CADL | b5de17485962577fc51156cd12da1b16d66dbb26 | [
"Apache-2.0"
] | 1,628 | 2016-07-19T22:21:56.000Z | 2022-02-27T15:19:45.000Z | session-1/tests/test_1.py | itamaro/CADL | b5de17485962577fc51156cd12da1b16d66dbb26 | [
"Apache-2.0"
] | 75 | 2016-07-22T02:05:05.000Z | 2019-05-20T21:00:34.000Z | session-1/tests/test_1.py | itamaro/CADL | b5de17485962577fc51156cd12da1b16d66dbb26 | [
"Apache-2.0"
] | 955 | 2016-07-22T00:10:52.000Z | 2022-02-24T15:06:09.000Z | import matplotlib
matplotlib.use('Agg')
from libs import utils
import numpy as np
def test_celeb():
files = utils.get_celeb_files()
assert(len(files) == 100)
def test_crop():
assert(utils.imcrop_tosquare(np.zeros((64, 23))).shape == (23, 23))
assert(utils.imcrop_tosquare(np.zeros((23, 53))).shape == ... | 28.65 | 76 | 0.657941 |
798274a48d8d1830bf733cd6fea6f790d2fc2121 | 1,091 | py | Python | rocketgram/api/inline_query_result_voice.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 16 | 2019-02-27T20:15:52.000Z | 2019-08-06T10:59:41.000Z | rocketgram/api/inline_query_result_voice.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 1 | 2022-01-16T13:56:45.000Z | 2022-01-16T13:56:45.000Z | rocketgram/api/inline_query_result_voice.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 3 | 2019-03-19T16:01:22.000Z | 2019-04-05T15:58:12.000Z | # Copyright (C) 2015-2022 by Vd.
# This file is part of Rocketgram, the modern Telegram bot framework.
# Rocketgram is released under the MIT License (see LICENSE).
from dataclasses import dataclass, field
from typing import Optional, List
from .inline_keyboard_markup import InlineKeyboardMarkup
from .inline_query_r... | 32.088235 | 69 | 0.775435 |
798274dcb2ccec7a63a0feab554b9fa669e6ec06 | 539 | py | Python | comment/migrations/0005_auto_20200528_0927.py | VotarkSocial/votarkAPI | eea10a64ac0b255c97078b90786fccb30d0a451e | [
"MIT"
] | 2 | 2020-06-14T08:25:29.000Z | 2021-09-22T07:48:11.000Z | comment/migrations/0005_auto_20200528_0927.py | suulcoder/votarkAPI | eea10a64ac0b255c97078b90786fccb30d0a451e | [
"MIT"
] | 10 | 2020-06-14T08:36:42.000Z | 2022-03-12T00:30:53.000Z | comment/migrations/0005_auto_20200528_0927.py | suulcoder/votarkAPI | eea10a64ac0b255c97078b90786fccb30d0a451e | [
"MIT"
] | 1 | 2021-09-22T07:48:17.000Z | 2021-09-22T07:48:17.000Z | # Generated by Django 3.0.4 on 2020-05-28 09:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('votarkUser', '0013_auto_20200511_2141'),
('comment', '0004_auto_20200520_2352'),
]
operations = [
m... | 25.666667 | 120 | 0.64564 |
7982752792a3490fdf7bd86001c2626209551062 | 337 | py | Python | setup.py | iherman/pySde-1.0 | 3cc7c56b47a0f60cf22d199577649f03fa0f5d40 | [
"W3C-20150513"
] | 2 | 2020-10-07T19:01:52.000Z | 2022-03-19T09:48:37.000Z | setup.py | iherman/pySde-1.0 | 3cc7c56b47a0f60cf22d199577649f03fa0f5d40 | [
"W3C-20150513"
] | null | null | null | setup.py | iherman/pySde-1.0 | 3cc7c56b47a0f60cf22d199577649f03fa0f5d40 | [
"W3C-20150513"
] | null | null | null | from setuptools import setup
setup(name="sde",
description="Structured Data Extractor Libray",
version="2.0",
author="Ivan Herman",
author_email="ivan@w3.org",
maintainer="Ivan Herman",
maintainer_email="ivan@w3.org",
packages=['pySde'],
requires = ['rdflib', 'pyrdfa3', 'pyMic... | 25.923077 | 58 | 0.637982 |
7982757779aec55c07f05cf400c9cf2d0525f4ad | 3,948 | py | Python | src/staking/dot/argparserUtil.py | luca590/StakingManager | eadd3fefb2174c6d407d0b6e620c7c738a601f73 | [
"MIT"
] | 1 | 2022-01-24T21:17:42.000Z | 2022-01-24T21:17:42.000Z | src/staking/dot/argparserUtil.py | luca590/StakingManager | eadd3fefb2174c6d407d0b6e620c7c738a601f73 | [
"MIT"
] | null | null | null | src/staking/dot/argparserUtil.py | luca590/StakingManager | eadd3fefb2174c6d407d0b6e620c7c738a601f73 | [
"MIT"
] | null | null | null | from common import MyHelpFormatter
def argument(*name_or_flags, **kwargs):
return [*name_or_flags], kwargs
def subcommand(parent, sub_help="", epilog="", required_args=None, optional_args=None):
if required_args is None:
required_args = []
def decorator(func):
parser = parent.add_parser... | 37.245283 | 120 | 0.579281 |
798275c00ad431193ac1de8f045e0826efa345bc | 1,060 | py | Python | swimmy/config.py | swimlane/swimmy | c8a5f463b30308eeac95479378fa9d07abe73125 | [
"MIT"
] | null | null | null | swimmy/config.py | swimlane/swimmy | c8a5f463b30308eeac95479378fa9d07abe73125 | [
"MIT"
] | null | null | null | swimmy/config.py | swimlane/swimmy | c8a5f463b30308eeac95479378fa9d07abe73125 | [
"MIT"
] | null | null | null | import os
class Config:
slack = {
'bot_username': os.environ.get('SLACK_BOT_USERNAME', 'swimmy'),
'bot_token': os.environ.get('SLACK_BOT_TOKEN', None),
'bot_signing_secret': os.environ.get('SLACK_BOT_SIGNING_SECRET', None)
}
swimlane = {
'host': os.environ.get('SWIMLANE_H... | 44.166667 | 95 | 0.686792 |
798275c6ef0b89a37f06a2603a5afa372953a50e | 7,580 | py | Python | csvkit/typeinference.py | dhatim/csvkit | 97e950f2b8fca4c657cccfa7a15f1541e8314059 | [
"MIT"
] | null | null | null | csvkit/typeinference.py | dhatim/csvkit | 97e950f2b8fca4c657cccfa7a15f1541e8314059 | [
"MIT"
] | 1 | 2018-09-21T23:30:21.000Z | 2018-09-21T23:30:21.000Z | csvkit/typeinference.py | dhatim/csvkit | 97e950f2b8fca4c657cccfa7a15f1541e8314059 | [
"MIT"
] | 1 | 2018-09-21T23:26:35.000Z | 2018-09-21T23:26:35.000Z | #!/usr/bin/env python
import datetime
from dateutil.parser import parse
import six
from csvkit.exceptions import InvalidValueForTypeException
NoneType = type(None)
NULL_VALUES = ('na', 'n/a', 'none', 'null', '.')
TRUE_VALUES = ('yes', 'y', 'true', 't')
FALSE_VALUES = ('no', 'n', 'false', 'f')
DEFAULT_DATETIME = d... | 37.156863 | 231 | 0.569525 |
798275c9dafe996f6c22d80aef80f8ee761d5612 | 3,444 | py | Python | src/structures/point.py | ed741/PathBench | 50fe138eb1f824f49fe1a862705e435a1c3ec3ae | [
"BSD-3-Clause"
] | 46 | 2020-12-25T04:09:15.000Z | 2022-03-25T12:32:42.000Z | src/structures/point.py | ed741/PathBench | 50fe138eb1f824f49fe1a862705e435a1c3ec3ae | [
"BSD-3-Clause"
] | 36 | 2020-12-21T16:10:02.000Z | 2022-01-03T01:42:01.000Z | src/structures/point.py | judicaelclair/PathBenchURO | 101e67674efdfa8e27e1cf7787dac9fdf99552fe | [
"BSD-3-Clause"
] | 11 | 2021-01-06T23:34:12.000Z | 2022-03-21T17:21:47.000Z | from typing import Union, Tuple, Callable, Any
import torch
import copy
import numpy as np
class Point(torch.Tensor):
"""
A point has a variable number of coordinates specified in the constructor.
Each point is immutable.
"""
__values: Union[Tuple[float, ...], Tuple[int, ...]]
__is_float: bool... | 33.115385 | 100 | 0.618467 |
798275f8653c1a92181e4860159af889f70a4f47 | 91,174 | py | Python | src/compas/datastructures/mesh/_mesh.py | yijiangh/compas | a9e86edf6b602f47ca051fccedcaa88a5e5d3600 | [
"MIT"
] | null | null | null | src/compas/datastructures/mesh/_mesh.py | yijiangh/compas | a9e86edf6b602f47ca051fccedcaa88a5e5d3600 | [
"MIT"
] | null | null | null | src/compas/datastructures/mesh/_mesh.py | yijiangh/compas | a9e86edf6b602f47ca051fccedcaa88a5e5d3600 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import pickle
import json
import collections
from copy import deepcopy
from ast import literal_eval
from math import pi
from compas.utilities import average
from compas.files import OBJ
from compas.files im... | 28.209777 | 246 | 0.513929 |
798276ba164e7b83f64a1abb5bb06dabcf07367e | 4,305 | py | Python | src/spacectl/modules/export_google_sheets/export_google_sheets_task.py | jihyungSong/spacectl | 29bfcb9a1c2b30de696b9ef21b0a4abe7e575e83 | [
"Apache-2.0"
] | null | null | null | src/spacectl/modules/export_google_sheets/export_google_sheets_task.py | jihyungSong/spacectl | 29bfcb9a1c2b30de696b9ef21b0a4abe7e575e83 | [
"Apache-2.0"
] | null | null | null | src/spacectl/modules/export_google_sheets/export_google_sheets_task.py | jihyungSong/spacectl | 29bfcb9a1c2b30de696b9ef21b0a4abe7e575e83 | [
"Apache-2.0"
] | null | null | null | import gspread
import json
import re
import string
import pandas as pd
import datetime
from spacectl.command.execute import _check_api_permissions, _get_service_and_resource, _get_client,_call_api, \
_parse_parameter
from spacectl.conf.my_conf import get_config, get_endpoint, get_template
from spacectl.lib.apply.t... | 37.112069 | 112 | 0.647619 |
798279317077023422d9139630dd906150f87375 | 3,851 | py | Python | lib/kb_jorg/kb_jorgImpl.py | jungbluth/kb_jorg | 628109c3a3387d1ccd48a68f32c5aa7d97fe045a | [
"MIT"
] | null | null | null | lib/kb_jorg/kb_jorgImpl.py | jungbluth/kb_jorg | 628109c3a3387d1ccd48a68f32c5aa7d97fe045a | [
"MIT"
] | null | null | null | lib/kb_jorg/kb_jorgImpl.py | jungbluth/kb_jorg | 628109c3a3387d1ccd48a68f32c5aa7d97fe045a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#BEGIN_HEADER
import os
import json
from kb_jorg.Utils.JorgUtil import JorgUtil
#END_HEADER
class kb_jorg:
'''
Module Name:
kb_jorg
Module Description:
A KBase module: kb_jorg
'''
######## WARNING FOR GEVENT USERS ####### noqa
# Since asynchronous IO can lea... | 37.754902 | 78 | 0.628149 |
798279e705522f5f01fb9963330fa75c3b87f78f | 1,127 | py | Python | main.py | Blastoise/Otp-Bomber | 29f49157e6141ce466a7952b7f409f397b0632db | [
"MIT"
] | 9 | 2021-03-10T12:08:27.000Z | 2022-02-05T07:25:28.000Z | main.py | Blastoise/OTP-Bomber | 29f49157e6141ce466a7952b7f409f397b0632db | [
"MIT"
] | null | null | null | main.py | Blastoise/OTP-Bomber | 29f49157e6141ce466a7952b7f409f397b0632db | [
"MIT"
] | null | null | null | import re
import os
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from services import *
print("Enter the number to be bombarded:")
phoneNumber = input()
# Checking whether 10 digits phone number or not
if not re.match(r"^[0-9]{10}$", phoneNumber):
print("Ente... | 24.5 | 79 | 0.74268 |
79827ae00ea5de58cf26be490d795c7a731d6b72 | 982 | py | Python | dash_daq/_imports_.py | MrTeale/dash-daq | 217999c4b4fa4bfa9ed3900d2f5e874e975e5af1 | [
"MIT"
] | null | null | null | dash_daq/_imports_.py | MrTeale/dash-daq | 217999c4b4fa4bfa9ed3900d2f5e874e975e5af1 | [
"MIT"
] | null | null | null | dash_daq/_imports_.py | MrTeale/dash-daq | 217999c4b4fa4bfa9ed3900d2f5e874e975e5af1 | [
"MIT"
] | null | null | null | from .BooleanSwitch import BooleanSwitch
from .ColorPicker import ColorPicker
from .DarkThemeProvider import DarkThemeProvider
from .DirectionCompass import DirectionCompass
from .Gauge import Gauge
from .GraduatedBar import GraduatedBar
from .Indicator import Indicator
from .Joystick import Joystick
from .Knob import ... | 25.179487 | 48 | 0.755601 |
79827b4cef136c7be3ce5652faa8c8cd648b4b33 | 119 | py | Python | player/admin.py | siddeshlc8/Software-Engineering-Project | f1b5c1ef029d1126b6446b53755b9c91b095d4a1 | [
"MIT"
] | 4 | 2021-01-11T09:10:49.000Z | 2022-03-20T09:39:41.000Z | player/admin.py | siddeshlc8/Software_Engineering_Project | f1b5c1ef029d1126b6446b53755b9c91b095d4a1 | [
"MIT"
] | 6 | 2020-06-05T22:33:29.000Z | 2022-01-13T01:33:17.000Z | player/admin.py | siddeshlc8/Software-Engineering-Project | f1b5c1ef029d1126b6446b53755b9c91b095d4a1 | [
"MIT"
] | 1 | 2022-03-20T09:39:31.000Z | 2022-03-20T09:39:31.000Z | from django.contrib import admin
from .models import Player
# Register your models here.
admin.site.register(Player)
| 17 | 32 | 0.798319 |
79827b89e31544a2b59d5883ce60bf0b26d72c9f | 14,678 | py | Python | toolkit4nlp/tokenizers.py | xv44586/toolkit4nlp | 0ca8c45efe4ad4c6dc20b47016a13326aadcd0bd | [
"Apache-2.0"
] | 94 | 2020-07-16T03:07:59.000Z | 2022-03-13T08:06:30.000Z | toolkit4nlp/tokenizers.py | xv44586/toolkit4nlp | 0ca8c45efe4ad4c6dc20b47016a13326aadcd0bd | [
"Apache-2.0"
] | 14 | 2020-11-24T04:26:26.000Z | 2021-09-13T02:44:51.000Z | toolkit4nlp/tokenizers.py | xv44586/toolkit4nlp | 0ca8c45efe4ad4c6dc20b47016a13326aadcd0bd | [
"Apache-2.0"
] | 17 | 2020-09-04T07:24:24.000Z | 2021-11-19T06:35:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2020/7/17
# @Author : mingming.xu
# @Email : xv44586@gmail.com
# @File : tokenizers.py
import six
import unicodedata
import json
import re
_open_ = open
is_py2 = six.PY2
if not is_py2:
basestring = str
def convert_to_str(text, encoding='utf-8', errors='ignore'):
"""... | 33.976852 | 500 | 0.584208 |
79827c1314ba765388942f76d1219ff3e63215e0 | 11,920 | py | Python | src/ralph/discovery/api_donpedro.py | jjagodzinski/ralph | 000a22bcc934dc2051e7a09ab1e84bd1c25a9e73 | [
"Apache-2.0"
] | null | null | null | src/ralph/discovery/api_donpedro.py | jjagodzinski/ralph | 000a22bcc934dc2051e7a09ab1e84bd1c25a9e73 | [
"Apache-2.0"
] | null | null | null | src/ralph/discovery/api_donpedro.py | jjagodzinski/ralph | 000a22bcc934dc2051e7a09ab1e84bd1c25a9e73 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import traceback
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization impor... | 32.043011 | 79 | 0.575755 |
79827d94eb7451f16de5a5166a1aef60c6a17151 | 18,288 | py | Python | rpython/jit/metainterp/opencoder.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | rpython/jit/metainterp/opencoder.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | rpython/jit/metainterp/opencoder.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 30 | 2018-08-20T03:16:34.000Z | 2022-01-12T17:39:22.000Z |
""" Storage format:
for each operation (inputargs numbered with negative numbers)
<opnum> [size-if-unknown-arity] [<arg0> <arg1> ...] [descr-or-snapshot-index]
Snapshot index for guards points to snapshot stored in _snapshots of trace
"""
from rpython.jit.metainterp.history import ConstInt, Const, ConstFloat, ConstP... | 36.213861 | 102 | 0.592028 |
79827e5e9f6d375f9f6877137c9fbb889e2a21ba | 2,706 | py | Python | tensorflow/python/distribute/client/metric_utils_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 1 | 2020-08-06T03:25:47.000Z | 2020-08-06T03:25:47.000Z | tensorflow/python/distribute/client/metric_utils_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/distribute/client/metric_utils_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 3 | 2017-05-17T08:44:52.000Z | 2021-08-18T05:37:12.000Z | # Lint as: python3
# Copyright 2020 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 requ... | 38.657143 | 80 | 0.74575 |
79827f58b1103e0b4dae20c7d9da8624314a1e21 | 1,357 | py | Python | tests/plugin/sw_flask/test_flask.py | c1ay/skywalking-python | 0246634b8e908b845e1540c6d2b70d9058794601 | [
"Apache-2.0"
] | null | null | null | tests/plugin/sw_flask/test_flask.py | c1ay/skywalking-python | 0246634b8e908b845e1540c6d2b70d9058794601 | [
"Apache-2.0"
] | null | null | null | tests/plugin/sw_flask/test_flask.py | c1ay/skywalking-python | 0246634b8e908b845e1540c6d2b70d9058794601 | [
"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 us... | 31.55814 | 102 | 0.745026 |
7982813a6021b56d88fed502c9aca4d01abb7372 | 765 | py | Python | mmdet/models/detectors/faster_rcnn_with_meta_embedding.py | Qianna00/mmdetection | 31e7dff4c61000002d27117543b85e68d2619b4c | [
"Apache-2.0"
] | 1 | 2021-08-01T08:44:35.000Z | 2021-08-01T08:44:35.000Z | mmdet/models/detectors/faster_rcnn_with_meta_embedding.py | Qianna00/mmdetection | 31e7dff4c61000002d27117543b85e68d2619b4c | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/faster_rcnn_with_meta_embedding.py | Qianna00/mmdetection | 31e7dff4c61000002d27117543b85e68d2619b4c | [
"Apache-2.0"
] | null | null | null | from ..builder import DETECTORS
from .two_stage_with_MetaEmbedding import TwoStageDetectorMetaEmbedding
@DETECTORS.register_module()
class FasterRCNNMetaEmbedding(TwoStageDetectorMetaEmbedding):
def __init__(self,
backbone,
rpn_head,
roi_head,
t... | 30.6 | 71 | 0.580392 |
798281b767a31813fa7e058d42d583e54c31ddfe | 62,131 | py | Python | meraki/api/batch/switch.py | joshand/dashboard-api-python | 0312daa0a422e45f6b608f94729a918a5038d0ee | [
"MIT"
] | null | null | null | meraki/api/batch/switch.py | joshand/dashboard-api-python | 0312daa0a422e45f6b608f94729a918a5038d0ee | [
"MIT"
] | null | null | null | meraki/api/batch/switch.py | joshand/dashboard-api-python | 0312daa0a422e45f6b608f94729a918a5038d0ee | [
"MIT"
] | null | null | null | class ActionBatchSwitch(object):
def __init__(self):
super(ActionBatchSwitch, self).__init__()
def cycleDeviceSwitchPorts(self, serial: str, ports: list):
"""
**Cycle a set of switch ports**
https://developer.cisco.com/meraki/api-v1/#!cycle-device-switch-ports
- serial (string): (required)
- ports (ar... | 41.064772 | 353 | 0.715311 |
7982824ac11331d158bce3364a0caac22ced09db | 2,897 | py | Python | modela/training/Notebook.py | metaprov/modela-python-sdk | 45ed040a241d07351886f785e224ffb3615a8c94 | [
"Apache-2.0"
] | 1 | 2022-03-05T23:21:20.000Z | 2022-03-05T23:21:20.000Z | modela/training/Notebook.py | metaprov/modela-python-sdk | 45ed040a241d07351886f785e224ffb3615a8c94 | [
"Apache-2.0"
] | null | null | null | modela/training/Notebook.py | metaprov/modela-python-sdk | 45ed040a241d07351886f785e224ffb3615a8c94 | [
"Apache-2.0"
] | null | null | null | import grpc
from github.com.metaprov.modelaapi.pkg.apis.training.v1alpha1.generated_pb2 import Notebook as MDNotebook
from github.com.metaprov.modelaapi.services.notebook.v1.notebook_pb2_grpc import NotebookServiceStub
from github.com.metaprov.modelaapi.services.notebook.v1.notebook_pb2 import CreateNotebookRequest, \
... | 33.686047 | 125 | 0.668623 |
7982825491b495075636b875ddade427649822bf | 29,216 | py | Python | modern_greek_inflexion/verb/verb_stemmer.py | PicusZeus/modern-greek-inflexion | 709f326f3b9ee87888aee3bacebb3da5c3bfd12a | [
"MIT"
] | null | null | null | modern_greek_inflexion/verb/verb_stemmer.py | PicusZeus/modern-greek-inflexion | 709f326f3b9ee87888aee3bacebb3da5c3bfd12a | [
"MIT"
] | null | null | null | modern_greek_inflexion/verb/verb_stemmer.py | PicusZeus/modern-greek-inflexion | 709f326f3b9ee87888aee3bacebb3da5c3bfd12a | [
"MIT"
] | null | null | null | import pickle
from modern_greek_accentuation.syllabify import modern_greek_syllabify, count_syllables
from modern_greek_accentuation.accentuation import is_accented, put_accent_on_the_antepenultimate, put_accent_on_the_penultimate, put_accent_on_the_ultimate, remove_all_diacritics, where_is_accent
from modern_greek_acc... | 42.526929 | 196 | 0.63164 |
798282d426cde3f51733d45a5772341ff9eff02d | 58,405 | py | Python | testcases/cloud_user/images/eustore/eustoretestsuite.py | tbeckham/eutester | 1440187150ce284bd87147e71ac7f0fda194b4d9 | [
"BSD-2-Clause"
] | null | null | null | testcases/cloud_user/images/eustore/eustoretestsuite.py | tbeckham/eutester | 1440187150ce284bd87147e71ac7f0fda194b4d9 | [
"BSD-2-Clause"
] | null | null | null | testcases/cloud_user/images/eustore/eustoretestsuite.py | tbeckham/eutester | 1440187150ce284bd87147e71ac7f0fda194b4d9 | [
"BSD-2-Clause"
] | null | null | null | # Software License Agreement (BSD License)
#
# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source ... | 43.847598 | 206 | 0.566767 |
798282f0c1699c7eb44066af0a0eb17130eeca2f | 12,470 | py | Python | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/ipv4_neighbor_address/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/ipv4_neighbor_address/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/ipv4_neighbor_address/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 38.018293 | 375 | 0.59599 |
798283a7d5f13481b8c51ad35ee2e7e17c446f94 | 4,076 | py | Python | cogs/TtsCog.py | W1kipedia/SwitchBot | 67e5f04534c7d897d563156a1c72e9faec7f7b65 | [
"Apache-2.0"
] | null | null | null | cogs/TtsCog.py | W1kipedia/SwitchBot | 67e5f04534c7d897d563156a1c72e9faec7f7b65 | [
"Apache-2.0"
] | null | null | null | cogs/TtsCog.py | W1kipedia/SwitchBot | 67e5f04534c7d897d563156a1c72e9faec7f7b65 | [
"Apache-2.0"
] | null | null | null | from better_profanity.better_profanity import Profanity
from gtts import gTTS
from discord.ext import commands
from better_profanity import profanity
import discord, os
profanity.load_censor_words_from_file("./data/profanity.txt")
class tts(commands.Cog):
def __init__(self, client):
self.client = client
... | 43.827957 | 158 | 0.636163 |
7982847d021ef05b8f39895905224f359fa1909a | 6,141 | py | Python | mmdet/lvis/lvis.py | apulis/lvis | b7bc8e089d7e3fd1c4f8c8af0ade06f80c081275 | [
"Apache-2.0"
] | null | null | null | mmdet/lvis/lvis.py | apulis/lvis | b7bc8e089d7e3fd1c4f8c8af0ade06f80c081275 | [
"Apache-2.0"
] | null | null | null | mmdet/lvis/lvis.py | apulis/lvis | b7bc8e089d7e3fd1c4f8c8af0ade06f80c081275 | [
"Apache-2.0"
] | null | null | null | """
API for accessing LVIS Dataset: https://lvisdataset.org.
LVIS API is a Python API that assists in loading, parsing and visualizing
the annotations in LVIS. In addition to this API, please download
images and annotations from the LVIS website.
"""
import json
import os
from collections import defaultdict
from urll... | 29.666667 | 81 | 0.575151 |
79828524e7462063d15ca871eb723d9cdba87b1a | 9,301 | py | Python | segmentation_models_pytorch/losses/_functional.py | vietnhatthai/segmentation_models.pytorch | 8bf52c7e862af006e76a23aae6aa17977d7f9a79 | [
"MIT"
] | 3 | 2022-03-15T07:36:58.000Z | 2022-03-16T03:05:59.000Z | segmentation_models_pytorch/losses/_functional.py | litvinich/segmentation_models.pytorch | 9052aa2a4f09a600f687120e69ad2b57c04cc0dd | [
"MIT"
] | null | null | null | segmentation_models_pytorch/losses/_functional.py | litvinich/segmentation_models.pytorch | 9052aa2a4f09a600f687120e69ad2b57c04cc0dd | [
"MIT"
] | 1 | 2022-01-12T12:33:43.000Z | 2022-01-12T12:33:43.000Z | import math
import numpy as np
from typing import Optional
import torch
import torch.nn.functional as F
__all__ = [
"focal_loss_with_logits",
"softmax_focal_loss_with_logits",
"soft_jaccard_score",
"soft_dice_score",
"wing_loss",
]
def to_tensor(x, dtype=None) -> torch.Tensor:
if isinstance... | 32.407666 | 109 | 0.632405 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.