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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a1384974ccd700a4a2a547d6245e9c75c028797e | 14,123 | py | Python | greatcirclelibrary.py | nathanielselub/great-circle-library | 1f665245238c21cca614498320fd05d799654f98 | [
"MIT"
] | 1 | 2020-11-03T21:01:44.000Z | 2020-11-03T21:01:44.000Z | greatcirclelibrary.py | nathanielselub/great_circle_analysis_library | 1f665245238c21cca614498320fd05d799654f98 | [
"MIT"
] | null | null | null | greatcirclelibrary.py | nathanielselub/great_circle_analysis_library | 1f665245238c21cca614498320fd05d799654f98 | [
"MIT"
] | null | null | null | """A module to help analyze great circles in the CMB sky."""
import numpy as np
import healpy as hp
import camb
from scipy.optimize import differential_evolution
from scipy.spatial.transform import Rotation as R
from numba import guvectorize, int64, float64, prange, jit
NSIDE = 256
N_GC = 20000
N_P = 2000
PARS = camb... | 27.317215 | 83 | 0.604546 |
254b79618218a2f7ad7a817ca0db4f8a4d6c8dd2 | 6,230 | py | Python | hookbox/user.py | gameclosure/hookbox | c0087632b8035a1bff5c8dc55a2b64ba44c2cfbb | [
"MIT"
] | 10 | 2015-06-26T01:41:41.000Z | 2019-04-16T09:07:29.000Z | hookbox/user.py | play-co/hookbox | c0087632b8035a1bff5c8dc55a2b64ba44c2cfbb | [
"MIT"
] | null | null | null | hookbox/user.py | play-co/hookbox | c0087632b8035a1bff5c8dc55a2b64ba44c2cfbb | [
"MIT"
] | null | null | null | import eventlet
from errors import ExpectedException
try:
import json
except ImportError:
import simplejson as json
import datetime
def get_now():
return datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
class User(object):
_options = {
'reflective': True,
'moderated_message': True,
... | 42.380952 | 170 | 0.592616 |
eed5866335ce19bbb1271c4f76e26d5e9e6b7d3a | 5,477 | bzl | Python | bazel_tools/fat_cc_library.bzl | flokli/daml | 92f2dbf2eb8985290a3bb9702a3193e6f9296b22 | [
"Apache-2.0"
] | null | null | null | bazel_tools/fat_cc_library.bzl | flokli/daml | 92f2dbf2eb8985290a3bb9702a3193e6f9296b22 | [
"Apache-2.0"
] | null | null | null | bazel_tools/fat_cc_library.bzl | flokli/daml | 92f2dbf2eb8985290a3bb9702a3193e6f9296b22 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load("@os_info//:os_info.bzl", "is_darwin", "is_windows")
def _fat_cc_library_impl(ctx):
input_lib = ctx.attr.input_lib
cc_info = input_lib[CcInfo]
static_libs = []
... | 38.570423 | 109 | 0.622969 |
507280826d7d5cb43c822ac43cf98da6ec1f5ecf | 2,742 | py | Python | external/bayesopt/python/demo_quad.py | pchrapka/brain-modelling | f232b5a858e45f10b0b0735269010454129ab017 | [
"MIT"
] | 1 | 2017-10-13T19:37:52.000Z | 2017-10-13T19:37:52.000Z | external/bayesopt/python/demo_quad.py | pchrapka/brain-modelling | f232b5a858e45f10b0b0735269010454129ab017 | [
"MIT"
] | null | null | null | external/bayesopt/python/demo_quad.py | pchrapka/brain-modelling | f232b5a858e45f10b0b0735269010454129ab017 | [
"MIT"
] | 1 | 2019-11-25T12:22:05.000Z | 2019-11-25T12:22:05.000Z | #!/usr/bin/env python
# -------------------------------------------------------------------------
# This file is part of BayesOpt, an efficient C++ library for
# Bayesian optimization.
#
# Copyright (C) 2011-2015 Ruben Martinez-Cantin <rmcantin@unizar.es>
#
# BayesOpt is free software: you can redistribut... | 29.804348 | 77 | 0.667031 |
f4de3f19c87be81953805a4b77da4a4bf0195399 | 2,611 | py | Python | korbit/public_api.py | HoonJin/korbit-python | 496131d1320361e8ddf4e60ec8d7269ca8451afe | [
"MIT"
] | 24 | 2016-03-07T06:01:33.000Z | 2022-03-19T06:18:43.000Z | korbit/public_api.py | HoonJin/korbit-python | 496131d1320361e8ddf4e60ec8d7269ca8451afe | [
"MIT"
] | 1 | 2018-01-05T08:48:37.000Z | 2018-01-18T05:36:10.000Z | korbit/public_api.py | HoonJin/korbit-python | 496131d1320361e8ddf4e60ec8d7269ca8451afe | [
"MIT"
] | 13 | 2017-07-27T15:44:21.000Z | 2020-03-12T19:08:44.000Z | # -*- coding: utf-8 -*-
import requests
import json
import logging
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
class PublicAPI:
def __init__(self, production=True, version="v1", timeout=20):
self.__host = production and "https://api.korbit.co.kr/%s/" % v... | 35.283784 | 113 | 0.641134 |
7e4dc6f661b51bffd677607379a0f7dff4a9e51f | 7,054 | py | Python | tests/integration/test_specfile.py | packit/specfile | 66608618fc044c3dd3cd73353f75f5943d5681b0 | [
"MIT"
] | 2 | 2022-02-16T09:37:45.000Z | 2022-02-19T10:33:19.000Z | tests/integration/test_specfile.py | packit/specfile | 66608618fc044c3dd3cd73353f75f5943d5681b0 | [
"MIT"
] | 37 | 2021-11-23T12:21:06.000Z | 2022-03-31T11:20:34.000Z | tests/integration/test_specfile.py | packit/specfile | 66608618fc044c3dd3cd73353f75f5943d5681b0 | [
"MIT"
] | 2 | 2022-01-11T15:04:55.000Z | 2022-03-22T10:11:32.000Z | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import datetime
import subprocess
import pytest
import rpm
from flexmock import flexmock
from specfile.exceptions import SpecfileException
from specfile.prep import AutopatchMacro, AutosetupMacro, PatchMacro, SetupMacro
from specfile.sect... | 32.657407 | 95 | 0.595407 |
bdc8e37e0b1dae37410ec590cd90de4aac00570d | 37,058 | py | Python | sdks/python/apache_beam/transforms/trigger_test.py | dexterchan/beam | 01e500c2dd0d699aea0434154b69fd59d824700f | [
"Apache-2.0"
] | 1 | 2020-01-08T19:17:06.000Z | 2020-01-08T19:17:06.000Z | sdks/python/apache_beam/transforms/trigger_test.py | dexterchan/beam | 01e500c2dd0d699aea0434154b69fd59d824700f | [
"Apache-2.0"
] | 1 | 2019-09-16T06:43:55.000Z | 2019-09-16T06:43:55.000Z | sdks/python/apache_beam/transforms/trigger_test.py | dexterchan/beam | 01e500c2dd0d699aea0434154b69fd59d824700f | [
"Apache-2.0"
] | 1 | 2020-02-09T02:51:50.000Z | 2020-02-09T02:51:50.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... | 36.40275 | 80 | 0.618571 |
b63d6ab206eb531809a47a6c96f010262e52afea | 415 | py | Python | chat/migrations/0007_chatroom_name.py | yccye/CT_AI_web | 267553d3aaaef78f7dbdd652c0f1868ec60862c2 | [
"MulanPSL-1.0"
] | 5 | 2021-05-25T07:53:36.000Z | 2021-11-23T13:04:51.000Z | chat/migrations/0007_chatroom_name.py | yccye/CT_AI_web | 267553d3aaaef78f7dbdd652c0f1868ec60862c2 | [
"MulanPSL-1.0"
] | 1 | 2021-11-07T14:41:52.000Z | 2021-11-07T15:34:28.000Z | chat/migrations/0007_chatroom_name.py | yccye/CT_AI_web | 267553d3aaaef78f7dbdd652c0f1868ec60862c2 | [
"MulanPSL-1.0"
] | 2 | 2021-11-07T13:29:13.000Z | 2022-03-10T12:13:04.000Z | # Generated by Django 3.1.7 on 2021-05-28 11:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('chat', '0006_auto_20210527_1934'),
]
operations = [
migrations.AddField(
model_name='chatroom',
name='name',
... | 21.842105 | 84 | 0.607229 |
d7875d47de5f28f764f045da9ee42995cbc757df | 1,191 | py | Python | main.py | avidale/alice-stretching | 619c66ff14d5c2712b2fce82d84c05ebb8d3e545 | [
"MIT"
] | 2 | 2021-01-09T13:28:45.000Z | 2022-01-11T18:29:43.000Z | main.py | avidale/alice-stretching | 619c66ff14d5c2712b2fce82d84c05ebb8d3e545 | [
"MIT"
] | null | null | null | main.py | avidale/alice-stretching | 619c66ff14d5c2712b2fce82d84c05ebb8d3e545 | [
"MIT"
] | 1 | 2021-01-14T10:15:26.000Z | 2021-01-14T10:15:26.000Z | import logging
import os
import sentry_sdk
import tgalice
from tgalice.dialog import Context
from dm import StretchDM
logging.basicConfig(level=logging.DEBUG)
if os.getenv('SENTRY_DSN', None) is not None:
sentry_sdk.init(os.environ['SENTRY_DSN'])
class CustomLogger(tgalice.storage.message_logging.MongoMessage... | 28.357143 | 100 | 0.758186 |
f8b79daea70836555a77fce75ef0fc923e967272 | 278 | py | Python | torchplasma/linear/__init__.py | hdkai/Plasma | 1942d7fe5f6b41c9a16c8e2d1b6c7cf263307c39 | [
"Apache-2.0"
] | null | null | null | torchplasma/linear/__init__.py | hdkai/Plasma | 1942d7fe5f6b41c9a16c8e2d1b6c7cf263307c39 | [
"Apache-2.0"
] | null | null | null | torchplasma/linear/__init__.py | hdkai/Plasma | 1942d7fe5f6b41c9a16c8e2d1b6c7cf263307c39 | [
"Apache-2.0"
] | null | null | null | #
# Plasma
# Copyright (c) 2021 Yusuf Olokoba.
#
from .chromaticity import chromatic_adaptation
from .pointwise import contrast, exposure, saturation, color_balance
from .selective import selective_color
from .spectral import clarity, highlights, shadows, sharpen, texture | 30.888889 | 68 | 0.798561 |
7921d85b049e935aa1af15b11d8757ffadcc33d5 | 2,504 | py | Python | modules/exercise_gui_shop/authentication.py | PetkoAndreev/Python-advanced | 94fd0fa69b366b978921ee8d4e214d3d3b4335d6 | [
"MIT"
] | null | null | null | modules/exercise_gui_shop/authentication.py | PetkoAndreev/Python-advanced | 94fd0fa69b366b978921ee8d4e214d3d3b4335d6 | [
"MIT"
] | null | null | null | modules/exercise_gui_shop/authentication.py | PetkoAndreev/Python-advanced | 94fd0fa69b366b978921ee8d4e214d3d3b4335d6 | [
"MIT"
] | null | null | null | import json
from canvas import tk
from tkinter import Button, Entry, Label
from helpers import clean_screen
from products import render_products
def login(username, password):
with open('db/user_credentials_db.txt', 'r') as file:
lines = file.readlines()
for line in lines:
user, pas = ... | 35.771429 | 119 | 0.625399 |
e328418738bcded4e44bee0d41b21da2ea06947d | 29,721 | py | Python | src/NL_BERT/finetune.py | Anonym96/Negotiation_Learning | a819f2e688879c0afb3b17964f4fec9ab37161de | [
"MIT"
] | null | null | null | src/NL_BERT/finetune.py | Anonym96/Negotiation_Learning | a819f2e688879c0afb3b17964f4fec9ab37161de | [
"MIT"
] | null | null | null | src/NL_BERT/finetune.py | Anonym96/Negotiation_Learning | a819f2e688879c0afb3b17964f4fec9ab37161de | [
"MIT"
] | 1 | 2021-06-20T16:34:31.000Z | 2021-06-20T16:34:31.000Z | """
The main file used to train student and teacher models. Mainly based on [GitHub repository](https://github.com/intersun/PKD-for-BERT-Model-Compression) for [Patient Knowledge Distillation for BERT Model Compression](https://arxiv.org/abs/1908.09355).
"""
import logging
import os
import random
import pickle
import... | 53.168157 | 250 | 0.586555 |
4c0b3ab53bd0e0a437983858877aa1c6af1824d1 | 2,882 | py | Python | tests/keras/applications/applications_test.py | mikezsx/dlstudy | 6572934f9a7c4ba498300186c2d297994c43900d | [
"MIT"
] | 3 | 2018-01-27T06:15:26.000Z | 2019-12-27T16:51:54.000Z | tests/keras/applications/applications_test.py | candleinwindsteve/keras | 9eb7ecd3e525c9cff31ebd59a96794f212ca5e1e | [
"MIT"
] | null | null | null | tests/keras/applications/applications_test.py | candleinwindsteve/keras | 9eb7ecd3e525c9cff31ebd59a96794f212ca5e1e | [
"MIT"
] | 3 | 2020-02-24T15:16:05.000Z | 2020-05-09T05:29:53.000Z | import pytest
from keras.utils.test_utils import keras_test
from keras import applications
from keras import backend as K
@keras_test
def test_resnet50():
model = applications.ResNet50(weights=None)
assert model.output_shape == (None, 1000)
@keras_test
def test_resnet50_notop():
model = applications.Res... | 26.934579 | 84 | 0.703678 |
e5f3cf597f1d1f5628fc1ac3643ce5414512b73f | 8,709 | py | Python | src/dsc/thesis.py | ghw329/DDSC | 97262b7fe0f507a7860828060e43ae2e0c1f1495 | [
"MIT"
] | null | null | null | src/dsc/thesis.py | ghw329/DDSC | 97262b7fe0f507a7860828060e43ae2e0c1f1495 | [
"MIT"
] | null | null | null | src/dsc/thesis.py | ghw329/DDSC | 97262b7fe0f507a7860828060e43ae2e0c1f1495 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# --- Program internal modules -------------------------------------------
from __future__ import division
from dsc import DSC
import numpy as np
import pandas as pd
import click
import pickle
############ plotting
import matplotlib.pyplot as plt
plt.style.use('ggplot'... | 37.377682 | 109 | 0.584683 |
8792eafe59bbed1124bde4a3925c65867f4dfd34 | 2,227 | py | Python | src/chat/consumers.py | hafizsameed/django-realtime-chat-app | 88ed5a8bc06411ed770fe6cf9f12d71a97108fa6 | [
"MIT"
] | null | null | null | src/chat/consumers.py | hafizsameed/django-realtime-chat-app | 88ed5a8bc06411ed770fe6cf9f12d71a97108fa6 | [
"MIT"
] | 2 | 2020-06-06T01:45:47.000Z | 2021-06-10T22:48:29.000Z | src/chat/consumers.py | hafizsameed/django-realtime-chat-app | 88ed5a8bc06411ed770fe6cf9f12d71a97108fa6 | [
"MIT"
] | null | null | null | import asyncio
import json
from django.contrib.auth import get_user_model
from channels.consumer import AsyncConsumer
from channels.db import database_sync_to_async
from .models import Thread, ChatMessage
class ChatConsumer(AsyncConsumer):
async def websocket_connect(self, event):
print("connected", even... | 32.275362 | 80 | 0.597665 |
a36bd712c2820aab5d9337d67fdce9c3f9b5f961 | 247 | py | Python | sms_voting/admin.py | Fedor-Lyanguzov/Voting | 98f8fd958624fa9ba3835836c525fbb4abb6b5e5 | [
"MIT"
] | null | null | null | sms_voting/admin.py | Fedor-Lyanguzov/Voting | 98f8fd958624fa9ba3835836c525fbb4abb6b5e5 | [
"MIT"
] | 1 | 2021-12-04T11:43:25.000Z | 2021-12-04T11:43:25.000Z | sms_voting/admin.py | Fedor-Lyanguzov/Voting | 98f8fd958624fa9ba3835836c525fbb4abb6b5e5 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Poll, Bulletin
@admin.register(Poll)
class PollAdmin(admin.ModelAdmin):
fields = ('title', 'face_participants')
@admin.register(Bulletin)
class BulletinAdmin(admin.ModelAdmin):
pass
| 19 | 43 | 0.761134 |
371687637bd4acefcd2077142ab684d98afce408 | 4,604 | py | Python | mainEmberrite/people/characterClass.py | evvanErb/Emberrite | 1e65ef69188619684e093f01febc6f92f8b02716 | [
"Apache-2.0"
] | null | null | null | mainEmberrite/people/characterClass.py | evvanErb/Emberrite | 1e65ef69188619684e093f01febc6f92f8b02716 | [
"Apache-2.0"
] | null | null | null | mainEmberrite/people/characterClass.py | evvanErb/Emberrite | 1e65ef69188619684e093f01febc6f92f8b02716 | [
"Apache-2.0"
] | null | null | null | import random
#Character building class
class character:
def __init__(self,name,gender,age,race,classType,alignment,stats,health,maxHealth):
self.name = name
self.gender = gender
self.age = age
self.race = race
self.classType = classType
self.alignment = alignment
... | 28.073171 | 87 | 0.497828 |
f425ad008d52317cc0c7132e3ebfbb8a92c5ab23 | 5,686 | py | Python | package/tests/test_govee_parser.py | s-limo/bleparser | a1f5b55ab1c1185877ac50c45dd3685e11994cb2 | [
"MIT"
] | null | null | null | package/tests/test_govee_parser.py | s-limo/bleparser | a1f5b55ab1c1185877ac50c45dd3685e11994cb2 | [
"MIT"
] | null | null | null | package/tests/test_govee_parser.py | s-limo/bleparser | a1f5b55ab1c1185877ac50c45dd3685e11994cb2 | [
"MIT"
] | null | null | null | """The tests for the Govee ble_parser."""
from bleparser import BleParser
class TestGovee:
def test_Govee_H5051(self):
"""Test Govee H5051 parser."""
data_string = "043e1902010400aabb615960e30d0cff88ec00ba0af90f63020101b7"
data = bytes(bytearray.fromhex(data_string))
# pylint: dis... | 42.432836 | 116 | 0.646324 |
70a29a19d2f354e9501d0ffc0a29a32e75a5a804 | 6,980 | py | Python | app/templates/four_g_core/mme_user_data.py | kukkalli/orchestrator | 0b53e3f95c0a886a739cf08d611ea76c958bc691 | [
"Apache-2.0"
] | 1 | 2022-03-02T09:43:45.000Z | 2022-03-02T09:43:45.000Z | app/templates/four_g_core/mme_user_data.py | kukkalli/orchestrator | 0b53e3f95c0a886a739cf08d611ea76c958bc691 | [
"Apache-2.0"
] | null | null | null | app/templates/four_g_core/mme_user_data.py | kukkalli/orchestrator | 0b53e3f95c0a886a739cf08d611ea76c958bc691 | [
"Apache-2.0"
] | null | null | null | import logging
LOG = logging.getLogger(__name__)
class MMEUserData:
USERDATA = """#!/bin/bash
cat > /home/ubuntu/.ssh/authorized_keys << EOF
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAGxlZsduAGeKqz3UhzHeXiJOsRlBQTZIyOxA0DrXso9ncDveooDqUr+Xw5XZx44nHFNjWocoQowDdaA8jj0DYEs9wF5ELGj/rm... | 33.397129 | 268 | 0.743696 |
097f8a1842e4111c4e3ade7538b0d707be625cf3 | 6,732 | py | Python | app/analyzers/html_parsers/generic.py | MinistereSupRecherche/bso | 82467213f531d2aee3a08258c5eb9c4467470960 | [
"MIT"
] | 17 | 2019-10-21T13:14:46.000Z | 2022-01-14T16:32:07.000Z | app/analyzers/html_parsers/generic.py | MinistereSupRecherche/bso | 82467213f531d2aee3a08258c5eb9c4467470960 | [
"MIT"
] | 2 | 2021-03-31T19:19:09.000Z | 2021-12-13T20:22:00.000Z | app/analyzers/html_parsers/generic.py | MinistereSupRecherche/bso | 82467213f531d2aee3a08258c5eb9c4467470960 | [
"MIT"
] | 1 | 2021-05-17T06:47:04.000Z | 2021-05-17T06:47:04.000Z | import bs4
from bs4 import BeautifulSoup
import re
import datetime
from doi_utils import *
from app.utils.logger import create_logger
logger = create_logger(__name__)
affiliation_keywords = ['affiliation','affiliations','institution','institutions',\
'author','authors','country', 'auteur', 'au... | 37.608939 | 953 | 0.5918 |
f4df80bf881cee1b2dbe74cbb08065f404641f5a | 419 | py | Python | Section 4 - Regular Expression/regex3.py | nachordo/Hands-On-Natural-Language-Processing-with-Python | e37e25a41a122bdb9b4c5619c7651f33a9c09eb8 | [
"MIT"
] | null | null | null | Section 4 - Regular Expression/regex3.py | nachordo/Hands-On-Natural-Language-Processing-with-Python | e37e25a41a122bdb9b4c5619c7651f33a9c09eb8 | [
"MIT"
] | null | null | null | Section 4 - Regular Expression/regex3.py | nachordo/Hands-On-Natural-Language-Processing-with-Python | e37e25a41a122bdb9b4c5619c7651f33a9c09eb8 | [
"MIT"
] | null | null | null | # Introduction to Python Regular Expressions
# Importing Libraries
import re
pattern1 = "I love Avengers" #I love Justice League
print(re.sub(r"Avengers","Justice League",pattern1))
print(re.sub(r"[a-z]","0",pattern1,1,flags=re.I)) #re.I --- Case insensitive
#############################
print(re.sub(r"[a-z]","0"... | 24.647059 | 76 | 0.637232 |
ac1c85668a9bd509748b1a53906039614d33f427 | 95 | py | Python | modelflow/notused__init__.py | IbHansen/ModelFlow | 09b1f911332f3d0af700ec65d46e8d4a53335e19 | [
"X11"
] | 2 | 2019-06-13T15:50:42.000Z | 2019-06-13T15:51:05.000Z | modelflow/notused__init__.py | IbHansen/modelflow | 09b1f911332f3d0af700ec65d46e8d4a53335e19 | [
"X11"
] | null | null | null | modelflow/notused__init__.py | IbHansen/modelflow | 09b1f911332f3d0af700ec65d46e8d4a53335e19 | [
"X11"
] | 1 | 2019-05-10T09:35:59.000Z | 2019-05-10T09:35:59.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 29 09:54:51 2020
@author: bruger
"""
| 10.555556 | 36 | 0.515789 |
6e26bb70d4d4445b3c8cf3acd64316b9da1fe84e | 157 | py | Python | wush/web/__init__.py | wxnacy/wush | 30620144f7a6fb676d210dd9463b77894f956b38 | [
"MIT"
] | null | null | null | wush/web/__init__.py | wxnacy/wush | 30620144f7a6fb676d210dd9463b77894f956b38 | [
"MIT"
] | null | null | null | wush/web/__init__.py | wxnacy/wush | 30620144f7a6fb676d210dd9463b77894f956b38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: wxnacy@gmail.com
"""
"""
from .wush import Wapi
from .common import functions
__all__ = ['Wapi', ]
| 13.083333 | 29 | 0.630573 |
8847fb635670d68bdd2c499b95d710027817a6c8 | 237 | py | Python | learning/ecc/_init_.py | Han-xv/RGGCNet | 5b1ccf9be4bd1fe91381624ae0b4b7e16296df89 | [
"MIT"
] | 1 | 2020-03-26T08:41:11.000Z | 2020-03-26T08:41:11.000Z | learning/ecc/_init_.py | Han-xv/RGGCNet | 5b1ccf9be4bd1fe91381624ae0b4b7e16296df89 | [
"MIT"
] | null | null | null | learning/ecc/_init_.py | Han-xv/RGGCNet | 5b1ccf9be4bd1fe91381624ae0b4b7e16296df89 | [
"MIT"
] | 2 | 2020-03-25T11:47:29.000Z | 2020-03-26T08:42:25.000Z | from .GraphConvInfo import GraphConvInfo
from .GraphConvModule import GraphConvModule, GraphConvFunction
from .GraphPoolInfo import GraphPoolInfo
from .GraphPoolModule import GraphAvgPoolModule, GraphMaxPoolModule
from .utils import *
| 29.625 | 67 | 0.864979 |
d42222ed097811a46e0759bf8768769da7a98fa2 | 805 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/WGL/ATI/pixel_format_float.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/WGL/ATI/pixel_format_float.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/WGL/ATI/pixel_format_float.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''OpenGL extension ATI.pixel_format_float
This module customises the behaviour of the
OpenGL.raw.WGL.ATI.pixel_format_float to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ATI/pixel_format_float.txt
'''
from OpenGL imp... | 35 | 72 | 0.790062 |
8bf53f89bfd22feb0565b40a41992d1ad40a4ec1 | 552 | py | Python | samples/python/llist.py | peterzhou84/datastructure | 89cca5fcd887dc06ba16074999193367bcc825e3 | [
"MIT"
] | null | null | null | samples/python/llist.py | peterzhou84/datastructure | 89cca5fcd887dc06ba16074999193367bcc825e3 | [
"MIT"
] | null | null | null | samples/python/llist.py | peterzhou84/datastructure | 89cca5fcd887dc06ba16074999193367bcc825e3 | [
"MIT"
] | null | null | null | #coding=utf-8
'''
链表的示例,来源周海君老师
'''
class lnode:
def __init__(self,elem,nexte=None):
self.elem=elem
self.next=nexte
def inserhead(head,x): #在表头插入元素x
p=lnode(x)
p.next=head
head=p
return head
def printli(head):
p=head
# print(p.elem)
a=[]
while p!=None:
#print... | 17.25 | 39 | 0.572464 |
8c47b9afd6c078106102de57e44fe21711fbc135 | 4,545 | py | Python | pixloc/run_CMU.py | jkabalar/pixloc | f9ca721977a5c3246ee5cf40fe3a214fef7cf3f2 | [
"Apache-2.0"
] | 457 | 2021-03-17T00:39:33.000Z | 2022-03-30T02:38:19.000Z | pixloc/run_CMU.py | jkabalar/pixloc | f9ca721977a5c3246ee5cf40fe3a214fef7cf3f2 | [
"Apache-2.0"
] | 31 | 2021-03-17T07:35:34.000Z | 2022-03-31T07:07:56.000Z | pixloc/run_CMU.py | jkabalar/pixloc | f9ca721977a5c3246ee5cf40fe3a214fef7cf3f2 | [
"Apache-2.0"
] | 56 | 2021-03-17T05:55:09.000Z | 2022-03-15T01:38:35.000Z | import pickle
from . import set_logging_debug, logger
from .localization import RetrievalLocalizer, PoseLocalizer
from .utils.data import Paths, create_argparser, parse_paths, parse_conf
from .utils.io import write_pose_results, concat_results
default_paths = Paths(
query_images='slice{slice}/query/',
refere... | 32.697842 | 82 | 0.60484 |
106ce621fa17ecd41c95e704ece1b7a7d470aa5f | 167 | py | Python | settings.py | salmanwahed/salman-wahed.appspot.com | f854f4d023509e0cf4923ca1cddfaf2cc368799c | [
"Apache-2.0"
] | null | null | null | settings.py | salmanwahed/salman-wahed.appspot.com | f854f4d023509e0cf4923ca1cddfaf2cc368799c | [
"Apache-2.0"
] | null | null | null | settings.py | salmanwahed/salman-wahed.appspot.com | f854f4d023509e0cf4923ca1cddfaf2cc368799c | [
"Apache-2.0"
] | null | null | null | __author__ = 'salman'
SMTPserver = 'smtp.sendgrid.net'
USERNAME = "salmanwahed"
PASSWORD = "smw@$endGrid"
TO_ADDRESS = '<salman2312@gmail.com>'
text_subtype = 'plain' | 23.857143 | 37 | 0.736527 |
45de05ea3d776be3844762518a668797fe9b31af | 7,858 | py | Python | bluebottle/fsm/state.py | jayvdb/bluebottle | 305fea238e6aa831598a8b227223a1a2f34c4fcc | [
"BSD-3-Clause"
] | null | null | null | bluebottle/fsm/state.py | jayvdb/bluebottle | 305fea238e6aa831598a8b227223a1a2f34c4fcc | [
"BSD-3-Clause"
] | null | null | null | bluebottle/fsm/state.py | jayvdb/bluebottle | 305fea238e6aa831598a8b227223a1a2f34c4fcc | [
"BSD-3-Clause"
] | null | null | null | from builtins import str
from builtins import object
from django.utils.translation import ugettext_lazy as _
from django.dispatch import Signal
from future.utils import with_metaclass
from stripe.six import python_2_unicode_compatible
class TransitionNotPossible(Exception):
pass
@python_2_unicode_compatible
cla... | 29.103704 | 101 | 0.607152 |
cf74792c854b3c3776af91c7198f0f105d07eaaa | 2,173 | py | Python | wzrd/wzrd/users/migrations/0001_initial.py | umarochki/dwellers-and-donkeys | 0777b040754412402c0fd96048263087eff13b14 | [
"MIT"
] | null | null | null | wzrd/wzrd/users/migrations/0001_initial.py | umarochki/dwellers-and-donkeys | 0777b040754412402c0fd96048263087eff13b14 | [
"MIT"
] | null | null | null | wzrd/wzrd/users/migrations/0001_initial.py | umarochki/dwellers-and-donkeys | 0777b040754412402c0fd96048263087eff13b14 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-12-06 12:17
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0011_update_proxy_permissions'),
]
operations = [
migrations.CreateModel(
... | 54.325 | 266 | 0.638288 |
7ff4961905b010d31e8bcac0bc49fc5431deb1ca | 3,490 | py | Python | src/python2/request/device_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 7 | 2019-07-17T06:59:53.000Z | 2021-05-13T15:23:37.000Z | src/python2/request/device_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | null | null | null | src/python2/request/device_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 2 | 2020-06-30T13:06:59.000Z | 2021-06-03T09:47:35.000Z | # -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
from __future__ import unicode_literals
from .device_request import... | 37.526882 | 157 | 0.668768 |
185924c67023218c5de748c00417e1365f18f223 | 10,476 | py | Python | torchrec/distributed/planner/stats.py | mreso/torchrec | a06ad87676e1dfdfd529787c9cc4b023c02cbca2 | [
"BSD-3-Clause"
] | null | null | null | torchrec/distributed/planner/stats.py | mreso/torchrec | a06ad87676e1dfdfd529787c9cc4b023c02cbca2 | [
"BSD-3-Clause"
] | null | null | null | torchrec/distributed/planner/stats.py | mreso/torchrec | a06ad87676e1dfdfd529787c9cc4b023c02cbca2 | [
"BSD-3-Clause"
] | 1 | 2022-02-09T23:52:22.000Z | 2022-02-09T23:52:22.000Z | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import logging
from collections import defaultdict
from typing import Union, Tuple, Opti... | 37.017668 | 122 | 0.568347 |
5fb390b0b2fb46c0777352ad903ac8aff19d17a5 | 7,544 | py | Python | benchmarks/f3_wrong_hints/scaling_software_termination/15-2Nested_false-termination_30.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_software_termination/15-2Nested_false-termination_30.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_software_termination/15-2Nested_false-termination_30.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import Tuple, FrozenSet
from pysmt.environment import Environment as PysmtEnv
from pysmt.fnode import FNode
import pysmt.typing as types
from utils import symb_to_next
from hint import Hint, Location
def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode,
... | 31.302905 | 77 | 0.587487 |
212b996bcd031b2378d64f2d18a422bd5c431a05 | 3,801 | py | Python | lotrpc/rpcgen.py | wtnb75/lotrpc | 4209722d237eba8863bd777653a3390969552e8e | [
"MIT"
] | 1 | 2020-02-13T01:09:31.000Z | 2020-02-13T01:09:31.000Z | lotrpc/rpcgen.py | wtnb75/lotrpc | 4209722d237eba8863bd777653a3390969552e8e | [
"MIT"
] | null | null | null | lotrpc/rpcgen.py | wtnb75/lotrpc | 4209722d237eba8863bd777653a3390969552e8e | [
"MIT"
] | null | null | null | import os
import sys
import subprocess
import tempfile
import importlib
import click
import yaml
from logging import getLogger, basicConfig, DEBUG
import lotrpc.sunrpc.parse
import lotrpc.sunrpc.rpcgen
log = getLogger(__name__)
@click.group(invoke_without_command=True)
@click.pass_context
def cli(ctx):
if ctx.... | 30.653226 | 94 | 0.660089 |
f62b7c024de33d741e6fae7b5bd86f82493f12f5 | 4,942 | py | Python | nova/api/openstack/compute/contrib/instance_actions.py | nkrinner/nova | 1372397d4f5f8c155af6f1f4ab5dc68be00c9c01 | [
"Apache-2.0"
] | 1 | 2015-01-09T10:49:56.000Z | 2015-01-09T10:49:56.000Z | nova/api/openstack/compute/contrib/instance_actions.py | Semihalf/openstack-nova | ff6c7e806d12c4d00990b28438bd8b30e2b978ee | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/contrib/instance_actions.py | Semihalf/openstack-nova | ff6c7e806d12c4d00990b28438bd8b30e2b978ee | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Rackspace Hosting
# 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 require... | 38.015385 | 78 | 0.62849 |
a486ce7fc8c530bb8791e6a9740cd6991ed0200a | 2,383 | py | Python | netbox/extras/urls.py | aslafy-z/netbox | a5512dd4c46c005df8752fc330c1382ac22b31ea | [
"Apache-2.0"
] | 1 | 2021-09-23T00:06:51.000Z | 2021-09-23T00:06:51.000Z | netbox/extras/urls.py | aslafy-z/netbox | a5512dd4c46c005df8752fc330c1382ac22b31ea | [
"Apache-2.0"
] | 4 | 2021-06-08T22:29:06.000Z | 2022-03-12T00:48:51.000Z | netbox/extras/urls.py | aslafy-z/netbox | a5512dd4c46c005df8752fc330c1382ac22b31ea | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from extras import views
from extras.models import Tag
app_name = 'extras'
urlpatterns = [
# Tags
path('tags/', views.TagListView.as_view(), name='tag_list'),
path('tags/edit/', views.TagBulkEditView.as_view(), name='tag_bulk_edit'),
path('tags/delete/', views.TagBulkDel... | 51.804348 | 121 | 0.716744 |
afd2ed3325b41fbc1aca7883d011a81c7255b6ca | 2,122 | py | Python | hackerrank/dynamicAarray.py | shrijaltamrakar/Descent_py | 82cd89ebeca37d079fc5d072010d3a3120420b2a | [
"MIT"
] | 2 | 2018-11-17T10:03:25.000Z | 2019-01-24T08:40:10.000Z | hackerrank/dynamicAarray.py | shrijaltamrakar/Descent_py | 82cd89ebeca37d079fc5d072010d3a3120420b2a | [
"MIT"
] | 1 | 2021-06-02T00:16:58.000Z | 2021-06-02T00:16:58.000Z | hackerrank/dynamicAarray.py | shrijaltamrakar/Descent_py | 82cd89ebeca37d079fc5d072010d3a3120420b2a | [
"MIT"
] | 1 | 2020-10-03T08:22:40.000Z | 2020-10-03T08:22:40.000Z | """
____ _ _
| _ \ _ _ _ __ __ _ _ __ ___ (_) ___ / \ _ __ _ __ __ _ _ _
| | | | | | | '_ \ / _` | '_ ` _ \| |/ __| / _ \ | '__| '__/ _` | | | |
| |_| | |_| | | | | (_| | | | | | | | (__ / ___ \| | | | | (_| | |_| |
|____/ \__, |_| |_|... | 23.065217 | 156 | 0.530631 |
b50d1672eabccc117774a4ae4a783268e9619dea | 3,951 | py | Python | src/dimmer/dimmer.py | deklungel/iRulez | eca073d0af55f8bf7006bf37c2cd69116e926211 | [
"MIT"
] | 1 | 2018-03-21T15:08:22.000Z | 2018-03-21T15:08:22.000Z | src/dimmer/dimmer.py | deklungel/iRulez | eca073d0af55f8bf7006bf37c2cd69116e926211 | [
"MIT"
] | 1 | 2017-08-25T06:12:08.000Z | 2017-08-25T06:13:58.000Z | src/dimmer/dimmer.py | deklungel/iRulez | eca073d0af55f8bf7006bf37c2cd69116e926211 | [
"MIT"
] | 1 | 2020-07-23T11:57:06.000Z | 2020-07-23T11:57:06.000Z | import src.irulez.log as log
import src.irulez.constants as constants
import src.irulez.util as util
import paho.mqtt.client as mqtt
import src.irulez.configuration as configuration
import src.dimmer.processor as dimmer_processor
import src.dimmer.mqtt_sender as mqtt_sender
import src.output_status.ServiceClient as Ser... | 40.316327 | 114 | 0.747659 |
28e89953caba2ae7d1bd0c7665458c78ebac0006 | 35,884 | py | Python | src/ploomber/sources/notebooksource.py | Vinay26k/ploomber | dea26619662449beb62a4e0ba5c717b2357d1045 | [
"Apache-2.0"
] | null | null | null | src/ploomber/sources/notebooksource.py | Vinay26k/ploomber | dea26619662449beb62a4e0ba5c717b2357d1045 | [
"Apache-2.0"
] | null | null | null | src/ploomber/sources/notebooksource.py | Vinay26k/ploomber | dea26619662449beb62a4e0ba5c717b2357d1045 | [
"Apache-2.0"
] | null | null | null | """
On languages and kernels
------------------------
NotebookSource represents source code in a Jupyter notebook format (language
agnostic). Apart from .ipynb, we also support any other extension supported
by jupytext.
Given a notebook, we have to know which language it is written in to extract
upstream/product varia... | 34.305927 | 148 | 0.625237 |
b0704a0487fe62b838fa728b127c6f2a091a2355 | 5,061 | py | Python | tests/vfs/vshadow_file_entry.py | Defense-Cyber-Crime-Center/dfvfs | da2ccbc4c989ced5ad651057bd8f5a4b18af6d37 | [
"Apache-2.0"
] | 2 | 2016-02-18T12:46:26.000Z | 2022-03-13T03:05:05.000Z | tests/vfs/vshadow_file_entry.py | Defense-Cyber-Crime-Center/dfvfs | da2ccbc4c989ced5ad651057bd8f5a4b18af6d37 | [
"Apache-2.0"
] | null | null | null | tests/vfs/vshadow_file_entry.py | Defense-Cyber-Crime-Center/dfvfs | da2ccbc4c989ced5ad651057bd8f5a4b18af6d37 | [
"Apache-2.0"
] | 5 | 2016-12-18T08:05:39.000Z | 2019-11-19T21:18:00.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the file entry implementation using the pyvshadow."""
import os
import unittest
from dfvfs.path import os_path_spec
from dfvfs.path import qcow_path_spec
from dfvfs.path import vshadow_path_spec
from dfvfs.resolver import context
from dfvfs.vfs import vshadow_fil... | 34.903448 | 76 | 0.742343 |
d7d969d13441f34ff644b0751fe22652bfbe141b | 10,545 | py | Python | src/oscarcch/calculator.py | thelabnyc/django-oscar-cch | d98832c9cf642c6d241e3aaf4b1dc631c3d5ce0e | [
"0BSD"
] | null | null | null | src/oscarcch/calculator.py | thelabnyc/django-oscar-cch | d98832c9cf642c6d241e3aaf4b1dc631c3d5ce0e | [
"0BSD"
] | 14 | 2020-02-11T21:53:07.000Z | 2022-01-13T00:40:33.000Z | src/oscarcch/calculator.py | thelabnyc/django-oscar-cch | d98832c9cf642c6d241e3aaf4b1dc631c3d5ce0e | [
"0BSD"
] | 1 | 2016-05-31T10:02:38.000Z | 2016-05-31T10:02:38.000Z | from datetime import datetime
from decimal import Decimal
from . import exceptions, settings
import logging
import soap
logger = logging.getLogger(__name__)
POSTCODE_LEN = 5
PLUS4_LEN = 4
class CCHTaxCalculator(object):
"""
Simple interface between Python and the CCH Sales Tax Office SOAP API.
"""
... | 41.845238 | 123 | 0.621527 |
8eca530edb334f1f4a8b573a4e4ec1bdbb57b04d | 3,602 | py | Python | ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_request.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_request.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-smapi-model/ask_smapi_model/v0/catalog/upload/create_content_upload_request.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 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 "lice... | 33.663551 | 201 | 0.608828 |
41f3839deb5e6c4e67ead390ddf56bc5b889399d | 7,373 | py | Python | src/TheLanguage/Grammars/v0_0_1/Statements/TryStatement.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | null | null | null | src/TheLanguage/Grammars/v0_0_1/Statements/TryStatement.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | null | null | null | src/TheLanguage/Grammars/v0_0_1/Statements/TryStatement.py | davidbrownell/DavidBrownell_TheLanguage | 07170b448a0ebd7fa2325c9ccd4cefdb3cf7eb98 | [
"BSL-1.0"
] | 1 | 2021-06-18T18:58:57.000Z | 2021-06-18T18:58:57.000Z | # ----------------------------------------------------------------------
# |
# | TryStatement.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2021-10-14 11:16:28
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2021
# | Distributed und... | 35.109524 | 124 | 0.448122 |
bce592274f384a8d0954168f9a8bde8e5848be27 | 23,783 | py | Python | ciscoisesdk/api/v3_0_0/px_grid_node.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 36 | 2021-05-18T16:24:19.000Z | 2022-03-05T13:44:41.000Z | ciscoisesdk/api/v3_0_0/px_grid_node.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 15 | 2021-06-08T19:03:37.000Z | 2022-02-25T14:47:33.000Z | ciscoisesdk/api/v3_0_0/px_grid_node.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 6 | 2021-06-10T09:32:01.000Z | 2022-01-12T08:34:39.000Z | # -*- coding: utf-8 -*-
"""Cisco Identity Services Engine pxGridNode API wrapper.
Copyright (c) 2021 Cisco and/or its affiliates.
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 restricti... | 37.57188 | 128 | 0.57785 |
6546a21c4a1be9823f38073f2d22cd4b9e5cfc7b | 3,603 | py | Python | tools/vm-migrator/src/migrator/disk.py | marcosgm/professional-services | f332b425c2f3b6538ebf65afda7e67de3bed1b3d | [
"Apache-2.0"
] | 2 | 2021-11-22T20:36:44.000Z | 2021-11-22T20:36:57.000Z | tools/vm-migrator/src/migrator/disk.py | hyuatpc/professional-services | e5c811a8752e91fdf9f959a0414931010b0ea1ba | [
"Apache-2.0"
] | 16 | 2021-10-07T11:37:40.000Z | 2021-12-23T14:07:17.000Z | tools/vm-migrator/src/migrator/disk.py | hyuatpc/professional-services | e5c811a8752e91fdf9f959a0414931010b0ea1ba | [
"Apache-2.0"
] | 3 | 2021-12-29T10:31:05.000Z | 2022-01-06T11:37:28.000Z | #!/usr/bin/env python
# Copyright 2021 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 41.413793 | 81 | 0.592839 |
fd0833eb51977cdfbba7f5dc3cbd775e07139be9 | 1,591 | py | Python | frappe/desk/listview.py | linkmultiselect/frappe | 0871db97f6aa9738e6aff169ad2b9853980b0653 | [
"MIT"
] | null | null | null | frappe/desk/listview.py | linkmultiselect/frappe | 0871db97f6aa9738e6aff169ad2b9853980b0653 | [
"MIT"
] | null | null | null | frappe/desk/listview.py | linkmultiselect/frappe | 0871db97f6aa9738e6aff169ad2b9853980b0653 | [
"MIT"
] | null | null | null | # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
@frappe.whitelist()
def get_list_settings(doctype):
try:
return frappe.get_cached_doc("List View Setting", doctype)
except frappe.DoesNotExistError:
frappe.cl... | 27.912281 | 98 | 0.729101 |
3935d24fc9c615fb07e62f66e06c96547041f71e | 9,243 | py | Python | sickbeard/cherrypy/_cplogging.py | Branlala/docker-sickbeardfr | 3ac85092dc4cc8a4171fb3c83e9682162245e13e | [
"MIT"
] | null | null | null | sickbeard/cherrypy/_cplogging.py | Branlala/docker-sickbeardfr | 3ac85092dc4cc8a4171fb3c83e9682162245e13e | [
"MIT"
] | null | null | null | sickbeard/cherrypy/_cplogging.py | Branlala/docker-sickbeardfr | 3ac85092dc4cc8a4171fb3c83e9682162245e13e | [
"MIT"
] | null | null | null | """CherryPy logging."""
import datetime
import logging
# Silence the no-handlers "warning" (stderr write!) in stdlib logging
logging.Logger.manager.emittedNoHandlerWarning = 1
logfmt = logging.Formatter("%(message)s")
import os
import sys
import cherrypy
from cherrypy import _cperror
class LogManager(object):
... | 36.824701 | 86 | 0.54214 |
3b592d677ae3268b7d340320ae068f2889019dff | 1,134 | py | Python | src/gen_key_key.py | jasonhavenD/triplesKB | e591adcb60d2611eef361f8ec412ace817c683eb | [
"Apache-2.0"
] | 14 | 2019-05-13T09:43:56.000Z | 2022-01-23T02:18:28.000Z | src/gen_key_key.py | jasonhavenD/triplesKB | e591adcb60d2611eef361f8ec412ace817c683eb | [
"Apache-2.0"
] | 1 | 2020-10-26T03:34:09.000Z | 2020-10-26T06:17:10.000Z | src/gen_key_key.py | jasonhavenD/triplesKB | e591adcb60d2611eef361f8ec412ace817c683eb | [
"Apache-2.0"
] | 7 | 2019-05-27T01:51:24.000Z | 2021-07-12T02:42:12.000Z | # encoding = utf-8
import re
import loguru
import json
def compare(tpl):
'''
0:自己 1:上级 2:下级 3:同领域 -1:无关系
'''
x, y = tpl
if x == y:
return x, y, 0
elif len(x.split('.')) == len(y.split('.')):
xs = x.split('.')
ys = y.split('.')
for i in range(len(xs)... | 23.625 | 68 | 0.444444 |
6da13e058d64e3b6883e8873b2b74fde535c2441 | 470 | py | Python | src/niweb/apps/noclook/migrations/0012_role_slug.py | SUNET/ni | f652e230524346bf0801cdf8bbb6ee63f4985cc2 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/niweb/apps/noclook/migrations/0012_role_slug.py | SUNET/ni | f652e230524346bf0801cdf8bbb6ee63f4985cc2 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-24T12:41:11.000Z | 2020-03-31T10:10:04.000Z | src/niweb/apps/noclook/migrations/0012_role_slug.py | SUNET/ni | f652e230524346bf0801cdf8bbb6ee63f4985cc2 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-02-25T14:58:20.000Z | 2019-02-25T14:58:20.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-07-23 07:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('noclook', '0011_auto_20190719_1157'),
]
operations = [
migrations.AddField... | 22.380952 | 74 | 0.619149 |
68dc54c3660e40e58a67f741abff61f23bf81485 | 1,028 | py | Python | 13.py | tsbxmw/leetcode | e751311b8b5f2769874351717a22c35c19b48a36 | [
"MIT"
] | null | null | null | 13.py | tsbxmw/leetcode | e751311b8b5f2769874351717a22c35c19b48a36 | [
"MIT"
] | null | null | null | 13.py | tsbxmw/leetcode | e751311b8b5f2769874351717a22c35c19b48a36 | [
"MIT"
] | null | null | null | # 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。
# 字符 数值
# I 1
# V 5
# X 10
# L 50
# C 100
# D 500
# M 1000
# 例如, 罗马数字 2 写做 II ,即为两个并列的 1。12 写做 XII ,即为 X + II 。 27 写做 XXVII, 即为 XX + V + II 。
# 通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例... | 20.56 | 130 | 0.497082 |
ae0b5e4b8c9748b41b5f5b8c4aa66e8ba94da49f | 90 | py | Python | api_server/book_api/apps.py | roman-bezusiak/lamia-test-task-py | b56fb6fda51917a9c7c50bc1a07b942d358eefd1 | [
"MIT"
] | null | null | null | api_server/book_api/apps.py | roman-bezusiak/lamia-test-task-py | b56fb6fda51917a9c7c50bc1a07b942d358eefd1 | [
"MIT"
] | null | null | null | api_server/book_api/apps.py | roman-bezusiak/lamia-test-task-py | b56fb6fda51917a9c7c50bc1a07b942d358eefd1 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class BookApiConfig(AppConfig):
name = 'book_api'
| 15 | 33 | 0.755556 |
e052f3e9c9a67f9ef9bfba60d293fb3616889630 | 2,553 | py | Python | poetry/console/io/inputs/run_argv_input.py | uda/poetry | 30e3d7e33c20cbe2af8eda06e0db4888275caaa1 | [
"MIT"
] | 12,347 | 2019-12-12T07:07:32.000Z | 2022-03-31T21:08:50.000Z | poetry/console/io/inputs/run_argv_input.py | uda/poetry | 30e3d7e33c20cbe2af8eda06e0db4888275caaa1 | [
"MIT"
] | 3,483 | 2019-12-11T20:20:20.000Z | 2022-03-31T23:18:18.000Z | poetry/console/io/inputs/run_argv_input.py | uda/poetry | 30e3d7e33c20cbe2af8eda06e0db4888275caaa1 | [
"MIT"
] | 1,399 | 2019-12-12T12:27:46.000Z | 2022-03-31T09:12:53.000Z | from typing import List
from typing import Optional
from typing import Union
from cleo.io.inputs.argv_input import ArgvInput
from cleo.io.inputs.definition import Definition
class RunArgvInput(ArgvInput):
def __init__(
self, argv: Optional[List[str]] = None, definition: Optional[Definition] = None
) ... | 31.134146 | 87 | 0.533882 |
7c68a99efa93e7083d0902cc3d2ada5bc0108ca5 | 1,595 | py | Python | volume_cmf.py | EmreMicrosoft/piyasa-indikatorleri | fb5b4c256d173f12cb3d0659d36add75dfa7ce1f | [
"MIT"
] | null | null | null | volume_cmf.py | EmreMicrosoft/piyasa-indikatorleri | fb5b4c256d173f12cb3d0659d36add75dfa7ce1f | [
"MIT"
] | null | null | null | volume_cmf.py | EmreMicrosoft/piyasa-indikatorleri | fb5b4c256d173f12cb3d0659d36add75dfa7ce1f | [
"MIT"
] | null | null | null | # CMF (Chaikin Money Flow)
# http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:chaikin_money_flow_cmf
# Belirli bir dönemdeki Para Akışı Hacmi miktarını ölçer.
# Argümanlar:
# high(pandas.Series): veri kümesi 'Yüksek' sütunu.
# low(pandas.Series): veri kümesi 'Düşük' sütunu.
# clo... | 34.673913 | 101 | 0.631348 |
576d096d21a44591cc0da7b45b64d1773d4cbb3d | 1,595 | py | Python | pi/gpsf(old).py | AideTechBot/expo | b616512100e2449e795f8073871efc056b92742f | [
"MIT"
] | 2 | 2016-07-13T21:29:33.000Z | 2020-12-24T04:47:40.000Z | pi/gpsf(old).py | AideTechBot/expo | b616512100e2449e795f8073871efc056b92742f | [
"MIT"
] | 1 | 2018-04-24T20:29:10.000Z | 2018-04-24T20:29:10.000Z | pi/gpsf(old).py | AideTechBot/expo | b616512100e2449e795f8073871efc056b92742f | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
GPS.PY
written by: Manuel Dionne
credit to: the internet
"""
import wave
import PiFm
import time
import os
from subprocess import call
def send_data( filename, freq ):
call(["./pifm", filename, freq])
return
freq = 500.0
data_size = 0
frate = 11025.0 # framerate as a floa... | 20.448718 | 97 | 0.584953 |
4e97dee002fd3c43fcf199088a382c9113275037 | 418 | py | Python | qrgenerator/lib/BarcodeGenerator.py | saraclohisey/icecap-qrcode | c22875a99ba50065b62d370b3aa3dcc6ebeeafab | [
"MIT"
] | 2 | 2020-04-06T08:39:18.000Z | 2020-05-05T11:50:11.000Z | qrgenerator/lib/BarcodeGenerator.py | saraclohisey/icecap-qrcode | c22875a99ba50065b62d370b3aa3dcc6ebeeafab | [
"MIT"
] | 7 | 2021-03-31T19:45:55.000Z | 2022-03-12T00:22:43.000Z | qrgenerator/lib/BarcodeGenerator.py | saraclohisey/icecap-qrcode | c22875a99ba50065b62d370b3aa3dcc6ebeeafab | [
"MIT"
] | 2 | 2020-04-21T12:28:18.000Z | 2020-05-25T10:16:32.000Z | from barcode import Code39
from barcode.writer import ImageWriter
def generate(input_tuple, filename):
elements = list(input_tuple)
data_to_encode = "-".join(elements)
data_to_encode = data_to_encode.replace('_', '-')
print('Generating barcode for', data_to_encode)
print('Saving to', filename)
... | 29.857143 | 62 | 0.712919 |
a8afc35f86420c5c0c3d13b32b220384686518e3 | 607 | py | Python | common/rpc/buildserver.py | akshitdewan/cs61a-apps | 155f2afe98b238fb4b1c4ca1c79610ec55e826e6 | [
"MIT"
] | null | null | null | common/rpc/buildserver.py | akshitdewan/cs61a-apps | 155f2afe98b238fb4b1c4ca1c79610ec55e826e6 | [
"MIT"
] | null | null | null | common/rpc/buildserver.py | akshitdewan/cs61a-apps | 155f2afe98b238fb4b1c4ca1c79610ec55e826e6 | [
"MIT"
] | null | null | null | from common.rpc.utils import create_service, requires_master_secret
service = create_service(__name__)
@requires_master_secret
@service.route("/api/clear_queue")
def clear_queue(*, repo: str, pr_number: int):
...
@requires_master_secret
@service.route("/api/trigger_build")
def trigger_build_sync(*, pr_number: ... | 21.678571 | 67 | 0.746293 |
c7b187a3a663a73ad1dcb6b96597d02acd35a2be | 1,452 | py | Python | custom_loss.py | chenchr/PoseNet | d8c0d1071db21652a7cb4b2715747ef346c8f706 | [
"MIT"
] | 2 | 2018-05-09T03:35:42.000Z | 2018-05-10T00:13:56.000Z | custom_loss.py | chenchr/PoseNet | d8c0d1071db21652a7cb4b2715747ef346c8f706 | [
"MIT"
] | null | null | null | custom_loss.py | chenchr/PoseNet | d8c0d1071db21652a7cb4b2715747ef346c8f706 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
def normalize(vec):
divided = torch.sqrt(vec.pow(2).sum(dim=1, keepdim=True)) + 1e-8
return vec/divided
def custom_loss(estimate, target, qua_weight, t_weight, test=False):
# print("estimete: {}\ntarget: {}".format(estimate[0,:], target[0,:]))
#if test:
# qua_... | 46.83871 | 109 | 0.621901 |
b226636bda27aee98c88a65070ae3817b3c8d1f5 | 882 | py | Python | noise.py | mohamedsayed18/Neuroscience_Inno2021 | d321a69583333ec596079f0e69b4d4751ab37425 | [
"MIT"
] | null | null | null | noise.py | mohamedsayed18/Neuroscience_Inno2021 | d321a69583333ec596079f0e69b4d4751ab37425 | [
"MIT"
] | null | null | null | noise.py | mohamedsayed18/Neuroscience_Inno2021 | d321a69583333ec596079f0e69b4d4751ab37425 | [
"MIT"
] | null | null | null | """
Add Gaussian white noise
TODO:
Try the different D values(amplitude) for noise(1, 0.1, 0.01, 0.001)
"""
import numpy as np
import matplotlib.pyplot as plt
from morris_lecar import morris_lecar
class noisy_model(morris_lecar):
D = 0.01
def dv_dt(self, current):
self.I = current
return ((se... | 25.941176 | 109 | 0.604308 |
92e90f725fed9573cc3b9f10e029987b01b1b8e1 | 11,554 | py | Python | SMBcorr/racmo_extrap_mean.py | SmithB/SMBcorr | 7c35cf8383058986fd82b28beab3c5580f9f8667 | [
"MIT"
] | null | null | null | SMBcorr/racmo_extrap_mean.py | SmithB/SMBcorr | 7c35cf8383058986fd82b28beab3c5580f9f8667 | [
"MIT"
] | null | null | null | SMBcorr/racmo_extrap_mean.py | SmithB/SMBcorr | 7c35cf8383058986fd82b28beab3c5580f9f8667 | [
"MIT"
] | 1 | 2020-08-06T19:48:52.000Z | 2020-08-06T19:48:52.000Z | #!/usr/bin/env python
u"""
racmo_extrap_mean.py
Written by Tyler Sutterley (09/2019)
Interpolates and extrapolates downscaled RACMO products to times and coordinates
Uses fast nearest-neighbor search algorithms
https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.BallTree.html
https://scikit-learn.org/s... | 40.118056 | 81 | 0.648866 |
5519b61fbec384694a50ffe7fd7032f528145c29 | 3,353 | py | Python | teste/teste/settings.py | MillenaEDS/trabalhope | 659e29f9d5ea4f3f9a740a6952d432e22f282a60 | [
"Apache-2.0"
] | null | null | null | teste/teste/settings.py | MillenaEDS/trabalhope | 659e29f9d5ea4f3f9a740a6952d432e22f282a60 | [
"Apache-2.0"
] | 2 | 2020-06-05T18:10:20.000Z | 2021-06-10T20:06:29.000Z | teste/teste/settings.py | MillenaEDS/trabalholms | 659e29f9d5ea4f3f9a740a6952d432e22f282a60 | [
"Apache-2.0"
] | null | null | null | """
Django settings for teste project.
Generated by 'django-admin startproject' using Django 1.11.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
... | 24.122302 | 91 | 0.686848 |
9ebb1f5f9e8d7a3b3765d23b0ddaffb1e9755492 | 7,622 | py | Python | gammapy/irf/tests/test_energy_dispersion.py | qpiel/gammapy | cfb976909e63f4d5d578e1495245c0baad69482b | [
"BSD-3-Clause"
] | null | null | null | gammapy/irf/tests/test_energy_dispersion.py | qpiel/gammapy | cfb976909e63f4d5d578e1495245c0baad69482b | [
"BSD-3-Clause"
] | 1 | 2020-10-29T19:55:46.000Z | 2020-10-29T19:55:46.000Z | gammapy/irf/tests/test_energy_dispersion.py | qpiel/gammapy | cfb976909e63f4d5d578e1495245c0baad69482b | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from astropy.coordinates import Angle
import astropy.units as u
from ...utils.testin... | 36.295238 | 88 | 0.616505 |
3b31f70fa7fd06e546f8d29db1d342c921f3b03c | 14,535 | py | Python | test_compare.py | JeanCherubini/One-Shot-Object-Detection | 2098ad3e90cb4aa9f1dd188a40efa29927ac3ab1 | [
"MIT"
] | 376 | 2019-11-29T02:26:39.000Z | 2022-03-24T04:07:29.000Z | test_compare.py | JeanCherubini/One-Shot-Object-Detection | 2098ad3e90cb4aa9f1dd188a40efa29927ac3ab1 | [
"MIT"
] | 31 | 2019-12-03T08:05:19.000Z | 2022-03-15T06:33:05.000Z | test_compare.py | JeanCherubini/One-Shot-Object-Detection | 2098ad3e90cb4aa9f1dd188a40efa29927ac3ab1 | [
"MIT"
] | 78 | 2019-11-29T05:20:31.000Z | 2022-03-18T12:40:34.000Z | # --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
from __... | 35.712531 | 136 | 0.631441 |
9d028368be9d26a0695a3766715bd0849dfeedb2 | 1,986 | py | Python | tests/rules/test_scm_correction.py | RogueScholar/thefuck-termux | cc33d5fa0077b2b2323b8a62f3478ff8efef3fba | [
"MIT"
] | null | null | null | tests/rules/test_scm_correction.py | RogueScholar/thefuck-termux | cc33d5fa0077b2b2323b8a62f3478ff8efef3fba | [
"MIT"
] | null | null | null | tests/rules/test_scm_correction.py | RogueScholar/thefuck-termux | cc33d5fa0077b2b2323b8a62f3478ff8efef3fba | [
"MIT"
] | null | null | null | import pytest
from thefuck.rules.scm_correction import get_new_command
from thefuck.rules.scm_correction import match
from thefuck.types import Command
@pytest.fixture
def get_actual_scm_mock(mocker):
return mocker.patch("thefuck.rules.scm_correction._get_actual_scm",
return_value=None)
... | 27.205479 | 74 | 0.575529 |
7c9d18147bee0f9f5fa0371422cd10a8d7ad7ba8 | 12,914 | py | Python | gan_pytorch.py | ReyhaneAskari/negative_momentum_for_improved_game_dynamics | 84339c2dbbe8173cf8d004ef494700076908f18b | [
"MIT"
] | 6 | 2020-05-14T07:41:26.000Z | 2022-03-06T08:49:52.000Z | gan_pytorch.py | ReyhaneAskari/negative_momentum_for_improved_game_dynamics | 84339c2dbbe8173cf8d004ef494700076908f18b | [
"MIT"
] | 3 | 2020-12-28T07:51:20.000Z | 2021-01-25T06:51:29.000Z | gan_pytorch.py | ReyhaneAskari/negative_momentum_for_improved_game_dynamics | 84339c2dbbe8173cf8d004ef494700076908f18b | [
"MIT"
] | null | null | null | import random
import numpy as np
np.random.seed(1234)
import os
import torch
torch.manual_seed(1234)
torch.cuda.manual_seed_all(1234)
import torch.nn as nn
from torch.autograd import Variable
from torch.optim import SGD, Adam
from utils import Adamp as AdamPlus
import torch.autograd as autograd
from torch.optim.optimi... | 30.821002 | 77 | 0.598962 |
b446b3cebfbcde35897ae84f34d7209c56a3fed4 | 4,669 | py | Python | lib/demo/statstools.py | uogbuji/akara | d308bf745458c5b54a203af25faebca5f48311ca | [
"Apache-2.0"
] | 1 | 2018-05-24T06:13:53.000Z | 2018-05-24T06:13:53.000Z | lib/demo/statstools.py | uogbuji/akara | d308bf745458c5b54a203af25faebca5f48311ca | [
"Apache-2.0"
] | null | null | null | lib/demo/statstools.py | uogbuji/akara | d308bf745458c5b54a203af25faebca5f48311ca | [
"Apache-2.0"
] | 1 | 2020-09-18T13:14:02.000Z | 2020-09-18T13:14:02.000Z | # -*- encoding: utf-8 -*-
'''
See also:
'''
from __future__ import with_statement
import sys, time
import urllib, urlparse
import tempfile
import os
import re
import csv
import cgi
from cStringIO import StringIO
from gettext import gettext as _
from itertools import *
from functools import *
from subprocess import *
... | 31.33557 | 114 | 0.64532 |
66079fb1b5a8978813afc2b0ca918326b523f868 | 9,152 | py | Python | mutatio/share/kivy-examples/widgets/tabbed_panel_showcase.py | SmatMan/mutatio | e6e24c45054321f9cb753499f0842ee8c8969c56 | [
"MIT"
] | null | null | null | mutatio/share/kivy-examples/widgets/tabbed_panel_showcase.py | SmatMan/mutatio | e6e24c45054321f9cb753499f0842ee8c8969c56 | [
"MIT"
] | null | null | null | mutatio/share/kivy-examples/widgets/tabbed_panel_showcase.py | SmatMan/mutatio | e6e24c45054321f9cb753499f0842ee8c8969c56 | [
"MIT"
] | null | null | null | '''
TabbedPanel
============
Test of the widget TabbedPanel showing all capabilities.
'''
from kivy.app import App
from kivy.animation import Animation
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.tabbedpanel import TabbedPanel, TabbedPanelHeader
from kivy.factory import Factory
class St... | 28.779874 | 80 | 0.542177 |
4698200abf52958b493379a5c57599f1ff3c0ff5 | 16,331 | py | Python | qiskit/opflow/primitive_ops/pauli_sum_op.py | ewinston/qiskit-sdk-py | 4d64125aba4ff31f15d0054b90437bcef352782e | [
"Apache-2.0"
] | null | null | null | qiskit/opflow/primitive_ops/pauli_sum_op.py | ewinston/qiskit-sdk-py | 4d64125aba4ff31f15d0054b90437bcef352782e | [
"Apache-2.0"
] | 2 | 2022-03-30T10:09:44.000Z | 2022-03-30T10:09:45.000Z | qiskit/opflow/primitive_ops/pauli_sum_op.py | ewinston/qiskit-sdk-py | 4d64125aba4ff31f15d0054b90437bcef352782e | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 38.067599 | 99 | 0.609454 |
4d67acac46cf6b233c195f30d725fed3d2f2763d | 5,402 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_usage_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_usage_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_usage_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"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 may ... | 45.394958 | 134 | 0.653277 |
31dc6d15ec939d5bf40c53cedc738344a7bd965a | 1,394 | py | Python | Python Control Flow: Medical Insurance Project/script.py | dilanozer/Codecademy_DataScientist | 253a77d63ba45194e1c5e55723d0048863a57e7d | [
"MIT"
] | null | null | null | Python Control Flow: Medical Insurance Project/script.py | dilanozer/Codecademy_DataScientist | 253a77d63ba45194e1c5e55723d0048863a57e7d | [
"MIT"
] | null | null | null | Python Control Flow: Medical Insurance Project/script.py | dilanozer/Codecademy_DataScientist | 253a77d63ba45194e1c5e55723d0048863a57e7d | [
"MIT"
] | null | null | null | # Add your code here
def analyze_smoker(smoker_status):
if smoker_status == 1:
print("To lower your cost, you should consider quitting smoking.")
else:
print("Smoking is not an issue for you.")
def analyze_bmi(bmi_value):
if bmi_value > 30:
print("Your BMI is in the obese range. To lower your cos... | 48.068966 | 139 | 0.719512 |
bc10cd97de34a1cc78f77b5ebfb1178689ee4f77 | 8,575 | py | Python | app/user/utils.py | CityOfNewYork/NYCOpenRecords | 476a236a573e6f3a2f96c6537a30ee27b2bd3a2b | [
"Apache-2.0"
] | 37 | 2016-01-21T18:33:56.000Z | 2021-10-24T01:43:20.000Z | app/user/utils.py | CityOfNewYork/NYCOpenRecords | 476a236a573e6f3a2f96c6537a30ee27b2bd3a2b | [
"Apache-2.0"
] | 179 | 2016-01-21T21:33:31.000Z | 2022-02-15T21:31:35.000Z | app/user/utils.py | CityOfNewYork/NYCOpenRecords | 476a236a573e6f3a2f96c6537a30ee27b2bd3a2b | [
"Apache-2.0"
] | 13 | 2017-05-19T17:27:31.000Z | 2020-07-05T00:55:29.000Z | from datetime import datetime
from elasticsearch.helpers import bulk
from flask import current_app
from psycopg2 import OperationalError
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.orm import joinedload
from app import (
celery,
db,
es
)
from app.constants import (bulk_updates, event_type, ... | 37.609649 | 120 | 0.645248 |
9d8431a4f0b2fdb3400ce469604bea9a6d99ea9a | 11,513 | py | Python | networkapi/api_network/views/v3/networkv4.py | vinicius-marinho/GloboNetworkAPI | 94651d3b4dd180769bc40ec966814f3427ccfb5b | [
"Apache-2.0"
] | 73 | 2015-04-13T17:56:11.000Z | 2022-03-24T06:13:07.000Z | networkapi/api_network/views/v3/networkv4.py | leopoldomauricio/GloboNetworkAPI | 3b5b2e336d9eb53b2c113977bfe466b23a50aa29 | [
"Apache-2.0"
] | 99 | 2015-04-03T01:04:46.000Z | 2021-10-03T23:24:48.000Z | networkapi/api_network/views/v3/networkv4.py | shildenbrand/GloboNetworkAPI | 515d5e961456cee657c08c275faa1b69b7452719 | [
"Apache-2.0"
] | 64 | 2015-08-05T21:26:29.000Z | 2022-03-22T01:06:28.000Z | # -*- coding: utf-8 -*-
import logging
from django.db.transaction import commit_on_success
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from networkapi.api_equipment import permissions as perm_eqpt
from networkapi.api_network imp... | 32.614731 | 79 | 0.642578 |
33fa5caa0a894924155fcbc606b20425d0aae7d8 | 17,623 | py | Python | emailgen/themes.py | heqingy/emailgen | 17f5089bc8c7446c87a611083c9fefe37717fa39 | [
"Apache-2.0"
] | 2 | 2018-08-02T06:42:00.000Z | 2019-09-21T17:00:44.000Z | emailgen/themes.py | heqingy/emailgen | 17f5089bc8c7446c87a611083c9fefe37717fa39 | [
"Apache-2.0"
] | 2 | 2017-08-03T09:36:00.000Z | 2019-10-05T01:25:51.000Z | emailgen/themes.py | heqingy/emailgen | 17f5089bc8c7446c87a611083c9fefe37717fa39 | [
"Apache-2.0"
] | 4 | 2018-04-25T18:01:01.000Z | 2021-06-07T09:19:33.000Z |
DEFAULT_THEME = {
"name": "Default",
"html": """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/... | 36.638254 | 152 | 0.272258 |
74959afe627e5acf06f07b3e95f0979dc540e02f | 2,339 | py | Python | tools/cr/cr/actions/builder.py | SlimKatLegacy/android_external_chromium_org | ee480ef5039d7c561fc66ccf52169ead186f1bea | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2015-03-04T02:36:53.000Z | 2016-06-25T11:22:17.000Z | tools/cr/cr/actions/builder.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/cr/cr/actions/builder.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 4 | 2015-02-09T08:49:30.000Z | 2017-08-26T02:03:34.000Z | # Copyright 2013 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.
"""A module for the Builder base class."""
import cr
class Builder(cr.Action, cr.Plugin.Type):
"""Base class for implementing builders.
Builder imple... | 32.041096 | 79 | 0.728516 |
302fd1689fba5b0e1507a1fefc31bceb07f194a3 | 1,968 | py | Python | p330_patching_array.py | feigaochn/leetcode | abf0877fae02aa9c2549051f0b68df0ace952512 | [
"MIT"
] | null | null | null | p330_patching_array.py | feigaochn/leetcode | abf0877fae02aa9c2549051f0b68df0ace952512 | [
"MIT"
] | null | null | null | p330_patching_array.py | feigaochn/leetcode | abf0877fae02aa9c2549051f0b68df0ace952512 | [
"MIT"
] | null | null | null | # coding: utf-8
# author: Fei Gao <leetcode.com@feigao.xyz>
# Problem: patching array
#
# Given a sorted positive integer array nums and an integer n, add/patch
# elements to the array such that any number in range [1, n] inclusive can be
# formed by the sum of some elements in the array. Return the minimum number
# ... | 24.296296 | 78 | 0.526931 |
a969d27da9b6f671f6d56625e9fd8ae75009febd | 3,366 | py | Python | src/djangoreactredux/djrenv/lib/python3.5/site-packages/prospector/message.py | m2jobe/c_x | ba914449a9a85d82703895fc884733ca20454034 | [
"MIT"
] | 1 | 2019-11-01T11:45:22.000Z | 2019-11-01T11:45:22.000Z | src/djangoreactredux/djrenv/lib/python3.5/site-packages/prospector/message.py | m2jobe/c_x | ba914449a9a85d82703895fc884733ca20454034 | [
"MIT"
] | 7 | 2020-02-12T03:06:52.000Z | 2021-06-10T19:33:14.000Z | src/djangoreactredux/djrenv/lib/python3.5/site-packages/prospector/message.py | m2jobe/c_x | ba914449a9a85d82703895fc884733ca20454034 | [
"MIT"
] | 1 | 2019-11-01T11:38:54.000Z | 2019-11-01T11:38:54.000Z | # -*- coding: utf-8 -*-
import os
import sys
class Location(object):
def __init__(self, path, module, function, line, character, absolute_path=True):
if sys.version_info.major == 2 and isinstance(path, str):
# If this is not a unicode object, make it one! Some tools return
# paths... | 30.880734 | 105 | 0.592395 |
8f6889433136a50209823c1c24cd720003ea4d1b | 3,225 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/_auto_rest_url_mutli_collection_format_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/_auto_rest_url_mutli_collection_format_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/_auto_rest_url_mutli_collection_format_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"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 ... | 45.422535 | 104 | 0.694884 |
27cffb75223367a52adcb8a8587889820b60cad6 | 424 | py | Python | homeassistant/components/melcloud/const.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/melcloud/const.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | homeassistant/components/melcloud/const.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Constants for the MELCloud Climate integration."""
DOMAIN = "melcloud"
CONF_POSITION = "position"
ATTR_STATUS = "status"
ATTR_VANE_HORIZONTAL = "vane_horizontal"
ATTR_VANE_HORIZONTAL_POSITIONS = "vane_horizontal_positions"
ATTR_VANE_VERTICAL = "vane_vertical"
ATTR_VANE_VERTICAL_POSITIONS = "vane_vertical_position... | 28.266667 | 60 | 0.832547 |
514ac217e81a254fe238af6113192d9da04f13f3 | 1,040 | py | Python | util/trajectory.py | SwagJ/FCGF | 18cfb4d4e9f7a18487d6ef8941fcaeda387ab55f | [
"MIT"
] | null | null | null | util/trajectory.py | SwagJ/FCGF | 18cfb4d4e9f7a18487d6ef8941fcaeda387ab55f | [
"MIT"
] | null | null | null | util/trajectory.py | SwagJ/FCGF | 18cfb4d4e9f7a18487d6ef8941fcaeda387ab55f | [
"MIT"
] | null | null | null | import os
import numpy as np
class CameraPose:
def __init__(self, meta, mat):
self.metadata = meta
self.pose = mat
def __str__(self):
return 'metadata : ' + ' '.join(map(str, self.metadata)) + '\n' + \
"pose : " + "\n" + np.array_str(self.pose)
def read_trajectory(filename, dim=4):
traj ... | 26 | 84 | 0.586538 |
509f9ae9931271a2fa66ae7c3f289442ed22d3e1 | 395 | py | Python | BOJ/exaustive_search_boj/snow_white.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | BOJ/exaustive_search_boj/snow_white.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | BOJ/exaustive_search_boj/snow_white.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | # BOJ 2309
import sys
# 9명중 두명만 빼면 7명이기때문에 2명을 고르는것으로 접근
si = sys.stdin.readline
arr = [int(si()) for _ in range(9)]
res = []
s = sum(arr)
for i in range(9):
for j in range(9):
if i == j:
continue
if s - arr[i] - arr[j] == 100:
res = [arr[k] for k in range(9) if k != i and ... | 20.789474 | 65 | 0.513924 |
53140e05038c349ad9219f4bf139d602efa6aaa6 | 33,256 | py | Python | sdk/python/pulumi_azure_native/network/v20190201/application_gateway.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190201/application_gateway.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190201/application_gateway.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 71.059829 | 5,407 | 0.732259 |
b3725e700d793710cc0abe4b754dc6df865cf203 | 8,652 | py | Python | kubernetes/client/models/v1_policy_rule.py | venukarnati92/python-1 | 3fabf9ed9f4758fb5133975a58fc147471e91d9d | [
"Apache-2.0"
] | 1 | 2022-02-07T21:57:20.000Z | 2022-02-07T21:57:20.000Z | kubernetes/client/models/v1_policy_rule.py | venukarnati92/python-1 | 3fabf9ed9f4758fb5133975a58fc147471e91d9d | [
"Apache-2.0"
] | 1 | 2022-03-01T03:37:57.000Z | 2022-03-01T03:37:57.000Z | kubernetes/client/models/v1_policy_rule.py | venukarnati92/python-1 | 3fabf9ed9f4758fb5133975a58fc147471e91d9d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.22
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 36.661017 | 423 | 0.636385 |
79670921ffeca430a258b090b06d90f8406d663e | 4,922 | py | Python | avaya/loadIQ.py | nd1/odds-and-ends | 8be5c6dfab733038bb3b7a35eaa6ae4f630d2ace | [
"MIT"
] | null | null | null | avaya/loadIQ.py | nd1/odds-and-ends | 8be5c6dfab733038bb3b7a35eaa6ae4f630d2ace | [
"MIT"
] | null | null | null | avaya/loadIQ.py | nd1/odds-and-ends | 8be5c6dfab733038bb3b7a35eaa6ae4f630d2ace | [
"MIT"
] | null | null | null | '''
Load Avaya IQ report data to a MS SQL db.
Nicole Donnelly 20170530
'''
import os
import sys
import pandas as pd
from sqlalchemy import create_engine, text, types
def convert_time(x):
# change a hh:mm:ss string to number of seconds
times = x.split(':')
return (360*int(times[0])+60*int(times[1]))+in... | 39.063492 | 79 | 0.58208 |
a5edf1e3a1045a2c7f05264358693e44141638f2 | 532 | py | Python | jms_oidc_rp/__init__.py | east-district-f2c-shangqi/jumpserver-django-oidc-rp | d3df68f21d002b07ad7d6776b38256a042ea3831 | [
"MIT"
] | null | null | null | jms_oidc_rp/__init__.py | east-district-f2c-shangqi/jumpserver-django-oidc-rp | d3df68f21d002b07ad7d6776b38256a042ea3831 | [
"MIT"
] | null | null | null | jms_oidc_rp/__init__.py | east-district-f2c-shangqi/jumpserver-django-oidc-rp | d3df68f21d002b07ad7d6776b38256a042ea3831 | [
"MIT"
] | null | null | null | __version__ = '0.3.7.5'
# Deploying a new version:
# 1. remove the ".dev" from the current version number
# 2. create a new commit (eg. "Prepared 0.1.1 release")
# 3. run "git tag x.y.z" (eg. "git tag 0.1.1")
# 4. run "python setup.py sdist bdist_wheel upload"
# 5. bump the version (increment the version and append a ... | 38 | 88 | 0.68985 |
ef97678d071b0ca4a00b4fb16f80165b710b8f79 | 9,663 | py | Python | services/core/MasterDriverAgent/tests/test_modbus_driver.py | craig8/volttron | 2a954311d323effa3b79c2a53f6e8c3bb9664e1c | [
"Apache-2.0",
"BSD-2-Clause"
] | 1 | 2020-06-08T16:54:28.000Z | 2020-06-08T16:54:28.000Z | services/core/MasterDriverAgent/tests/test_modbus_driver.py | craig8/volttron | 2a954311d323effa3b79c2a53f6e8c3bb9664e1c | [
"Apache-2.0",
"BSD-2-Clause"
] | 8 | 2016-10-07T22:49:28.000Z | 2022-02-23T00:57:58.000Z | services/core/MasterDriverAgent/tests/test_modbus_driver.py | craig8/volttron | 2a954311d323effa3b79c2a53f6e8c3bb9664e1c | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | import pytest
import gevent
import logging
import time
from struct import pack, unpack
from volttron.platform import get_services_core, jsonapi
from master_driver.interfaces.modbus_tk.server import Server
from master_driver.interfaces.modbus_tk.client import Client, Field
from master_driver.interfaces.modbus_tk import... | 39.765432 | 114 | 0.650523 |
bac7fd08bde7e603fc5e9e032cbf0dbb92560d7e | 84 | py | Python | apps/setting/helper.py | zibinklin/weekly_self-evaluation | ed3c15e8261014ecc40068999e385860c0f8166e | [
"MIT"
] | null | null | null | apps/setting/helper.py | zibinklin/weekly_self-evaluation | ed3c15e8261014ecc40068999e385860c0f8166e | [
"MIT"
] | null | null | null | apps/setting/helper.py | zibinklin/weekly_self-evaluation | ed3c15e8261014ecc40068999e385860c0f8166e | [
"MIT"
] | null | null | null | import pandas as pd
def set(param):
activity = ''
achievement =''
pass
| 12 | 19 | 0.595238 |
b6f9f5f144a746fa3edfe7dc301f70916132991f | 4,880 | py | Python | volatility/volatility/plugins/gui/vtypes/vista.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | 2 | 2018-07-16T13:30:40.000Z | 2018-07-17T12:02:05.000Z | volatility/volatility/plugins/gui/vtypes/vista.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | volatility/volatility/plugins/gui/vtypes/vista.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the F... | 42.807018 | 116 | 0.559836 |
b858c29359da81b8929f41b33136b158111e7e8d | 2,698 | py | Python | python/ray/tune/result.py | haje01/ray | e1c9a869ed3eb83f41f142b841854192ce65f0c3 | [
"Apache-2.0"
] | 1 | 2019-10-07T17:20:01.000Z | 2019-10-07T17:20:01.000Z | python/ray/tune/result.py | GitHubBeinner/ray | d20696300e2c4aad90c0deece2b3af7e70fc6056 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/result.py | GitHubBeinner/ray | d20696300e2c4aad90c0deece2b3af7e70fc6056 | [
"Apache-2.0"
] | 2 | 2019-09-04T13:27:51.000Z | 2019-09-17T04:20:38.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
# yapf: disable
# __sphinx_doc_begin__
# (Optional/Auto-filled) training is terminated. Filled only if not provided.
DONE = "done"
# (Optional) Enum for user controlled checkpoint
SHOULD_CHECKPOINT ... | 29.977778 | 77 | 0.778354 |
6b7c7524366729aac07ffa9c4f5690c6edc372a4 | 161 | py | Python | src/Services/FaceRecognition/face_recognition/engines/__init__.py | Amir-Shamsi/facial-recognition-login-api | e37e9cdf63f98a53693b3d07a0fb79b1304d4ab9 | [
"CC0-1.0"
] | 8 | 2019-02-25T14:09:21.000Z | 2021-12-24T07:48:18.000Z | src/Services/FaceRecognition/face_recognition/engines/__init__.py | Amir-Shamsi/facial-recognition-login-api | e37e9cdf63f98a53693b3d07a0fb79b1304d4ab9 | [
"CC0-1.0"
] | 7 | 2019-03-20T14:40:34.000Z | 2021-10-03T13:13:09.000Z | src/Services/FaceRecognition/face_recognition/engines/__init__.py | Amir-Shamsi/facial-recognition-login-api | e37e9cdf63f98a53693b3d07a0fb79b1304d4ab9 | [
"CC0-1.0"
] | 3 | 2021-02-10T20:25:39.000Z | 2022-02-10T14:11:54.000Z | """
Defines engines for processing requests/responses to/from FacePP.
"""
from .base import BaseEngine
from .sync import SyncEngine
DefaultEngine = SyncEngine
| 17.888889 | 65 | 0.78882 |
3d8324d8985a6fa9ef3000282896c3d854c01fd9 | 1,743 | py | Python | studies/curso_em_video/ex059-criando-um-menu-de-opcoes.py | alexander-colaneri/Python | fbc84a2818d8324b712014e1a5abfc01474e49ea | [
"MIT"
] | null | null | null | studies/curso_em_video/ex059-criando-um-menu-de-opcoes.py | alexander-colaneri/Python | fbc84a2818d8324b712014e1a5abfc01474e49ea | [
"MIT"
] | null | null | null | studies/curso_em_video/ex059-criando-um-menu-de-opcoes.py | alexander-colaneri/Python | fbc84a2818d8324b712014e1a5abfc01474e49ea | [
"MIT"
] | null | null | null | class Calculadora():
'''Calcula números inseridos, de acordo com opções dadas.'''
def __init__(self):
self.x = 0
self.y = 0
self.menu = '''Escolha uma opção:
[ 1 ] somar
[ 2 ] multiplicar
[ 3 ] maior
[ 4 ] novos números
[ 5 ] sair do programa'''
def iniciar(self... | 29.542373 | 114 | 0.506598 |
be26ce63456970c81cd97f0c7c31be2b7239cc16 | 799 | py | Python | apps/badge/tests.py | lestrato/badgepack | 7432c0ead1d5f63dd509620a0bb06bd76828b590 | [
"MS-PL"
] | 3 | 2016-10-21T01:35:46.000Z | 2020-11-07T01:20:05.000Z | apps/badge/tests.py | lestrato/badgepack | 7432c0ead1d5f63dd509620a0bb06bd76828b590 | [
"MS-PL"
] | 31 | 2016-10-31T19:28:53.000Z | 2017-01-19T16:55:49.000Z | apps/badge/tests.py | lestrato/badgepack | 7432c0ead1d5f63dd509620a0bb06bd76828b590 | [
"MS-PL"
] | 1 | 2020-11-07T01:20:07.000Z | 2020-11-07T01:20:07.000Z | from django.test import TestCase
from badge.models import BadgeClass, BadgeInstance
from badge.forms import BadgeCreationForm, UserBadgeAssignForm, OneBadgeAssignForm, BadgeSetAvailabilityForm
from django.core.files.uploadedfile import SimpleUploadedFile
#
# class BadgeClassTestCase(TestCase):
#
# def test_forms... | 34.73913 | 108 | 0.659574 |
ad5896c91cda90df3886cba674cde084cb28c8ba | 5,375 | py | Python | gta_driver.py | GodelBose/GTAV_self_driving_network | 14156ab2f5f7033e6a2566dd58c9e6692088adf5 | [
"MIT"
] | 1 | 2017-08-21T11:44:03.000Z | 2017-08-21T11:44:03.000Z | gta_driver.py | GodelBose/GTAV_self_driving_network | 14156ab2f5f7033e6a2566dd58c9e6692088adf5 | [
"MIT"
] | null | null | null | gta_driver.py | GodelBose/GTAV_self_driving_network | 14156ab2f5f7033e6a2566dd58c9e6692088adf5 | [
"MIT"
] | null | null | null | import numpy as np
from grabscreen import grab_screen
import cv2
import time
import os
import pyxinput
import matplotlib.pyplot as plt
import pygame
from getkeys import key_check
from directkeys import PressKey,ReleaseKey, W, A, S, D
from keras.models import Model
class GTA_driver:
def __init__(self, data_gen, epoch... | 33.385093 | 181 | 0.691907 |
246f8dfa7481c9939a9fac4ae74430c948d64a31 | 9,273 | py | Python | yolox/data/data_augment.py | itec-hust/MusicYOLO | d980a0c0a3723a6c25772c2f7150a82baa1a4ec3 | [
"Apache-2.0"
] | 1 | 2022-01-29T15:47:50.000Z | 2022-01-29T15:47:50.000Z | yolox/data/data_augment.py | xk-wang/MusicYOLO | d980a0c0a3723a6c25772c2f7150a82baa1a4ec3 | [
"Apache-2.0"
] | null | null | null | yolox/data/data_augment.py | xk-wang/MusicYOLO | d980a0c0a3723a6c25772c2f7150a82baa1a4ec3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Copyright (c) Megvii, Inc. and its affiliates.
"""
Data augmentation functionality. Passed as callable transformations to
Dataset classes.
The data augmentation procedures were interpreted from @weiliu89's SSD paper
http://arxiv.org/abs/1512.02325
"""
import ... | 32.197917 | 93 | 0.548151 |
f4e7c86823c20db58285c8cc2d866ab0a07990c4 | 26,789 | py | Python | bikeshed/h/dom.py | kvark/bikeshed | d5538ca3371cf31be3b46f89b497e55d45859a0d | [
"CC0-1.0"
] | null | null | null | bikeshed/h/dom.py | kvark/bikeshed | d5538ca3371cf31be3b46f89b497e55d45859a0d | [
"CC0-1.0"
] | null | null | null | bikeshed/h/dom.py | kvark/bikeshed | d5538ca3371cf31be3b46f89b497e55d45859a0d | [
"CC0-1.0"
] | null | null | null | import collections
import hashlib
import re
import html5lib
from lxml import etree
from lxml.cssselect import CSSSelector
from lxml.html import tostring
from ..DefaultOrderedDict import DefaultOrderedDict
from ..messages import *
def flatten(arr):
for el in arr:
if isinstance(el, collections.Iterable) a... | 29.965324 | 146 | 0.597932 |
53e8b4b239957272469aa25420cb0b1b814742f7 | 48,591 | py | Python | openstack_dashboard/dashboards/project/instances/tables.py | sahil-awasthi/tcpro-wallaby | 5375f2da1d7548210a465a817ec74df4acf6e821 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/instances/tables.py | sahil-awasthi/tcpro-wallaby | 5375f2da1d7548210a465a817ec74df4acf6e821 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/instances/tables.py | sahil-awasthi/tcpro-wallaby | 5375f2da1d7548210a465a817ec74df4acf6e821 | [
"Apache-2.0"
] | 1 | 2022-03-31T15:13:27.000Z | 2022-03-31T15:13:27.000Z | # Copyright 2012 Nebula, 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 agree... | 36.811364 | 79 | 0.603383 |
69bcea51016c986c43081adc9aca49bdb2a59959 | 5,069 | py | Python | software/python/multirobot/robot/old/pi-20161009/robot-client-4.py | lucas137/trackedrobot | e315d2811e1f13d92aac079048e5931755335054 | [
"MIT"
] | null | null | null | software/python/multirobot/robot/old/pi-20161009/robot-client-4.py | lucas137/trackedrobot | e315d2811e1f13d92aac079048e5931755335054 | [
"MIT"
] | null | null | null | software/python/multirobot/robot/old/pi-20161009/robot-client-4.py | lucas137/trackedrobot | e315d2811e1f13d92aac079048e5931755335054 | [
"MIT"
] | null | null | null | #------------------------------------------------------------------------------
# robot-client-4.py
#------------------------------------------------------------------------------
#!/usr/bin/python3
# robot client emulator
from __future__ import print_function
import time # time-related functions
impor... | 35.950355 | 80 | 0.473072 |
ae105ef56fc8a9365fc211032af1a611140dcaea | 8,732 | py | Python | evaluation/ms_ssim/msssim_score_txt_consistency.py | pedroryzewski/TCC | ba5167928d5a14dc0c6e144d0927c050090950a6 | [
"MIT"
] | null | null | null | evaluation/ms_ssim/msssim_score_txt_consistency.py | pedroryzewski/TCC | ba5167928d5a14dc0c6e144d0927c050090950a6 | [
"MIT"
] | null | null | null | evaluation/ms_ssim/msssim_score_txt_consistency.py | pedroryzewski/TCC | ba5167928d5a14dc0c6e144d0927c050090950a6 | [
"MIT"
] | null | null | null | import sys
import os
import numpy as np
import torch
import torch.nn as nn
import argparse
from torch.utils.data import DataLoader
import random
import pickle
from scipy import signal
from scipy.ndimage.filters import convolve
proj_root = '.'
sys.path.insert(0, proj_root)
data_root = 'data'
model_root = 'models'
from... | 35.640816 | 113 | 0.60284 |
7de6a4f1c99f4e8d92a14b1bc542ea68cf5ef2ec | 6,530 | py | Python | holland/evolution/evolution.py | lambdalife/holland | 3ce9510aec92b409cae655c90721f5b1ca067637 | [
"MIT"
] | 1 | 2021-05-04T09:16:49.000Z | 2021-05-04T09:16:49.000Z | holland/evolution/evolution.py | lambdalife/holland | 3ce9510aec92b409cae655c90721f5b1ca067637 | [
"MIT"
] | 5 | 2018-10-13T02:09:36.000Z | 2019-11-13T22:27:41.000Z | holland/evolution/evolution.py | lambdalife/holland | 3ce9510aec92b409cae655c90721f5b1ca067637 | [
"MIT"
] | null | null | null | import math
import logging
from .evaluation import Evaluator
from .breeding import PopulationGenerator
from ..storage import StorageManager
class Evolver:
"""
Handles evolution for a population
:param fitness_function: the fitness function used to evaluate individuals; see :ref:`fitness-function`
:t... | 43.825503 | 240 | 0.675191 |
ebed74ca81d5277b7404f56c556064a95a943453 | 10,946 | py | Python | main.py | Atrix256/InverseDFTProblems | 1742ad3614d563ef67d0bac1be4b8728dba80f5f | [
"MIT"
] | 7 | 2021-12-29T08:35:24.000Z | 2021-12-31T16:07:28.000Z | main.py | Atrix256/InverseDFTProblems | 1742ad3614d563ef67d0bac1be4b8728dba80f5f | [
"MIT"
] | null | null | null | main.py | Atrix256/InverseDFTProblems | 1742ad3614d563ef67d0bac1be4b8728dba80f5f | [
"MIT"
] | null | null | null | import os
import imageio
import matplotlib.pyplot as plt
import numpy as np
import random
import sys
import cmath
import math
from PIL import Image, ImageFont, ImageDraw
os.makedirs("out", exist_ok=True)
sourceImgs = [
"bn8",
"bn16",
"bn32",
"bn64",
"bn128",
"bn256",
"bn10240",
]
generat... | 34.099688 | 104 | 0.53161 |
24d26879de388626eef38990af6b10e5717c0ade | 2,185 | py | Python | tensor2tensor/tpu/tpu_trainer_lib_test.py | webdeveloper0012/Tensor2tensor | 48bce065278eba461c8a2840e4132becbc822c7c | [
"Apache-2.0"
] | 9 | 2019-11-21T02:48:21.000Z | 2021-08-18T07:30:34.000Z | tensor2tensor/tpu/tpu_trainer_lib_test.py | webdeveloper0012/Tensor2tensor | 48bce065278eba461c8a2840e4132becbc822c7c | [
"Apache-2.0"
] | 3 | 2020-01-14T16:37:49.000Z | 2020-04-14T06:24:56.000Z | tensor2tensor/tpu/tpu_trainer_lib_test.py | webdeveloper0012/Tensor2tensor | 48bce065278eba461c8a2840e4132becbc822c7c | [
"Apache-2.0"
] | 1 | 2020-06-19T09:34:01.000Z | 2020-06-19T09:34:01.000Z | # coding=utf-8
# Copyright 2017 The Tensor2Tensor 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... | 32.132353 | 77 | 0.745538 |
5148c7a1dea90be18ab9dc7308493a09f82362d9 | 16,001 | py | Python | tests/bbo/unit/test_heuristics.py | ValentinGaut/shaman | 754e9eef3c097f3e58b0f06e7c08716bc1b11edd | [
"Apache-2.0"
] | null | null | null | tests/bbo/unit/test_heuristics.py | ValentinGaut/shaman | 754e9eef3c097f3e58b0f06e7c08716bc1b11edd | [
"Apache-2.0"
] | null | null | null | tests/bbo/unit/test_heuristics.py | ValentinGaut/shaman | 754e9eef3c097f3e58b0f06e7c08716bc1b11edd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 BULL SAS All rights reserved
"""
Tests each heuristic possible heuristic.
WARNING:
If you want to add a new heuristic, please use the following format when writing out
unittests:
- Create a test_my_heuristic.py file for unit testing of the methods included in the heuristic.
- Add a section in ... | 33.474895 | 102 | 0.583776 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.