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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1bc46a5cd34bc25b5f042367d6d6e736bb6e4d | 640 | py | Python | manage.py | yuanxu-li/django-script-runner | 8224d8624bb4d1679d72f44e3c4dc772f6893424 | [
"MIT"
] | null | null | null | manage.py | yuanxu-li/django-script-runner | 8224d8624bb4d1679d72f44e3c4dc772f6893424 | [
"MIT"
] | null | null | null | manage.py | yuanxu-li/django-script-runner | 8224d8624bb4d1679d72f44e3c4dc772f6893424 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_script_runner.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | 29.090909 | 84 | 0.689063 |
4a1bc4c25cbf4bb18b5c59f3187030e23b77ed6e | 992 | py | Python | db/urls.py | housepig7/ops | ed1dc6f6e160e2a4a414c1eeeee78ded02597013 | [
"Apache-2.0"
] | 394 | 2017-09-08T04:19:06.000Z | 2022-03-25T16:43:22.000Z | db/urls.py | kevin4shey/autoops | 5e717a2d86dd37cd2cfaf6db3d9613a0c41c49ae | [
"Apache-2.0"
] | 9 | 2017-10-11T02:20:55.000Z | 2022-03-25T09:43:08.000Z | db/urls.py | kevin4shey/autoops | 5e717a2d86dd37cd2cfaf6db3d9613a0c41c49ae | [
"Apache-2.0"
] | 218 | 2017-09-10T08:10:55.000Z | 2022-03-16T08:54:27.000Z | from django.urls import path
from .import views
urlpatterns = [
path('db.html',views.DbListAll.as_view(),name='db_list'),
path('db-add.html',views.DbAdd.as_view(),name='db_add'),
path('db-del.html',views.DbDel.as_view(),name='db_del'),
path('db-all-del.html',views.db_all_del,name='db_all_del'),
p... | 41.333333 | 94 | 0.684476 |
4a1bc4fb2fb9e3fb69f8b71f0817744b9264625a | 3,574 | py | Python | day14/day14.py | tomp/AOC-2020 | c7b8313f883b6285f118d281d99c4b32b0497289 | [
"MIT"
] | null | null | null | day14/day14.py | tomp/AOC-2020 | c7b8313f883b6285f118d281d99c4b32b0497289 | [
"MIT"
] | null | null | null | day14/day14.py | tomp/AOC-2020 | c7b8313f883b6285f118d281d99c4b32b0497289 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Advent of Code 2020 - day 14
#
from pathlib import Path
import re
INPUTFILE = "input.txt"
SAMPLE_INPUT = """
mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X
mem[8] = 11
mem[7] = 101
mem[8] = 0
"""
SAMPLE_INPUT2 = """
mask = 000000000000000000000000000000X1001X
mem[42] = 100
mask = 00000000000... | 23.207792 | 62 | 0.582261 |
4a1bc5d4be7fcdae10edc300815954f27c45f90a | 9,101 | py | Python | tests/benchmarks/test_benchmark_ddpg.py | shadiakiki1986/garage | 095bb5d25b32df1d44b47e99a78a9b01796941d9 | [
"MIT"
] | 3 | 2019-08-11T22:26:55.000Z | 2020-11-28T10:23:50.000Z | tests/benchmarks/test_benchmark_ddpg.py | shadiakiki1986/garage | 095bb5d25b32df1d44b47e99a78a9b01796941d9 | [
"MIT"
] | null | null | null | tests/benchmarks/test_benchmark_ddpg.py | shadiakiki1986/garage | 095bb5d25b32df1d44b47e99a78a9b01796941d9 | [
"MIT"
] | 2 | 2019-08-11T22:30:14.000Z | 2021-03-25T02:57:50.000Z | """
This script creates a regression test over garage-DDPG and baselines-DDPG.
It get Mujoco1M benchmarks from baselines benchmark, and test each task in
its trail times on garage model and baselines model. For each task, there will
be `trail` times with different random seeds. For each trail, there will be two
log di... | 32.045775 | 87 | 0.637073 |
4a1bc62c849b8107722256c0d742b6b77f939f73 | 9,307 | py | Python | utils/losses.py | Yangzhouzhou/GoalGAN | 943c30101b251297a2ac0acb6390124147496f80 | [
"MIT"
] | 1 | 2021-05-07T13:38:55.000Z | 2021-05-07T13:38:55.000Z | utils/losses.py | Yangzhouzhou/GoalGAN | 943c30101b251297a2ac0acb6390124147496f80 | [
"MIT"
] | null | null | null | utils/losses.py | Yangzhouzhou/GoalGAN | 943c30101b251297a2ac0acb6390124147496f80 | [
"MIT"
] | null | null | null | import torch
import random
from matplotlib.path import Path
import numpy as np
import torch.nn as nn
class GANLoss(nn.Module):
"""Define different GAN objectives.
The GANLoss class abstracts away the need to create the target label tensor
that has the same size as the input.
"""
def __init__(sel... | 36.498039 | 156 | 0.629204 |
4a1bc6c53883fd6cdf38ec43faef3450b260d0a8 | 4,722 | bzl | Python | third_party/glog/bazel/glog.bzl | Beam-wi/crc32c | 8ebe547554cb287c4db332e95c44bc5fc628b330 | [
"BSD-3-Clause"
] | 1 | 2020-10-05T13:20:44.000Z | 2020-10-05T13:20:44.000Z | third_party/glog/bazel/glog.bzl | Beam-wi/crc32c | 8ebe547554cb287c4db332e95c44bc5fc628b330 | [
"BSD-3-Clause"
] | null | null | null | third_party/glog/bazel/glog.bzl | Beam-wi/crc32c | 8ebe547554cb287c4db332e95c44bc5fc628b330 | [
"BSD-3-Clause"
] | null | null | null | # Implement a macro glog_library() that the BUILD file can load.
# By default, glog is built with gflags support. You can change this behavior
# by using glog_library(with_gflags=0)
#
# This file is inspired by the following sample BUILD files:
# https://github.com/google/glog/issues/61
# https://github.c... | 31.691275 | 92 | 0.5072 |
4a1bc6cbf562efada32cd07ae789b50c4a2dab8e | 4,707 | py | Python | sdk/lusid/models/instrument_id_value.py | bogdanLicaFinbourne/lusid-sdk-python-preview | f0f91f992e0417733c4c8abd2674d080a52b6890 | [
"MIT"
] | null | null | null | sdk/lusid/models/instrument_id_value.py | bogdanLicaFinbourne/lusid-sdk-python-preview | f0f91f992e0417733c4c8abd2674d080a52b6890 | [
"MIT"
] | null | null | null | sdk/lusid/models/instrument_id_value.py | bogdanLicaFinbourne/lusid-sdk-python-preview | f0f91f992e0417733c4c8abd2674d080a52b6890 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.2863
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class InstrumentIdValue(object):
"""NOTE: This clas... | 29.603774 | 157 | 0.586786 |
4a1bc6d0adfd007a8cbceb7597074d17f8f8cd03 | 24,163 | py | Python | scripts/plot_network.py | ebbekyhl/pypsa-eur-sec | f4e1d28be30f845bad513a11141eb318ff2a5bff | [
"MIT"
] | null | null | null | scripts/plot_network.py | ebbekyhl/pypsa-eur-sec | f4e1d28be30f845bad513a11141eb318ff2a5bff | [
"MIT"
] | null | null | null | scripts/plot_network.py | ebbekyhl/pypsa-eur-sec | f4e1d28be30f845bad513a11141eb318ff2a5bff | [
"MIT"
] | null | null | null | import pypsa
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
from matplotlib.legend_handler import HandlerPatch
from matplotlib.patches import Circle, Ellipse
from make_summary import assign_carriers
from plot_summary import rename_techs, preferred_order
from helper ... | 32.741192 | 175 | 0.602284 |
4a1bc7aa25c7c9b64466ea69204111032cc2e618 | 1,484 | py | Python | main.py | DevangJain/gpytranslator-bot | e6347fef0088154ce2a15f3679cef1a3808d82bb | [
"MIT"
] | null | null | null | main.py | DevangJain/gpytranslator-bot | e6347fef0088154ce2a15f3679cef1a3808d82bb | [
"MIT"
] | null | null | null | main.py | DevangJain/gpytranslator-bot | e6347fef0088154ce2a15f3679cef1a3808d82bb | [
"MIT"
] | null | null | null | from pyrogram import Client, filters
from config import API_ID, API_HASH, TOKEN, sudofilter
import os, sys
from threading import Thread
from datetime import datetime
from db.functions import get_users_count
bot = Client(
":memory:",
api_id=API_ID,
api_hash=API_HASH,
bot_token=TOKEN,
plugins=dict(ro... | 23.935484 | 79 | 0.694744 |
4a1bc83a86b9e65e63e29fe17bbace1adb4100a9 | 2,634 | py | Python | funcx_sdk/tests/integration/test_web_client_exceptions.py | funcx-faas/funcx | 50ecfdb35646a14387e5caf280028e9e9eaacb66 | [
"Apache-2.0"
] | null | null | null | funcx_sdk/tests/integration/test_web_client_exceptions.py | funcx-faas/funcx | 50ecfdb35646a14387e5caf280028e9e9eaacb66 | [
"Apache-2.0"
] | null | null | null | funcx_sdk/tests/integration/test_web_client_exceptions.py | funcx-faas/funcx | 50ecfdb35646a14387e5caf280028e9e9eaacb66 | [
"Apache-2.0"
] | null | null | null | import pytest
import responses
import funcx
from funcx.sdk.web_client import FuncxWebClient
@pytest.fixture(autouse=True)
def mocked_responses():
"""
All tests enable `responses` patching of the `requests` package, replacing
all HTTP calls.
"""
responses.start()
yield
responses.stop()
... | 28.021277 | 78 | 0.634776 |
4a1bc8e8baa2319431dcb92af9befa613c1ce81b | 6,841 | py | Python | useful_tool/label_generator.py | SuSir1996/MU-GAN | 9584dc10a70a0da1affb080657b5aed30a242374 | [
"MIT"
] | 9 | 2020-09-10T18:26:24.000Z | 2021-06-06T07:17:45.000Z | useful_tool/label_generator.py | SuSir1996/MU-GAN | 9584dc10a70a0da1affb080657b5aed30a242374 | [
"MIT"
] | 1 | 2021-03-08T09:18:05.000Z | 2021-03-08T09:18:05.000Z | useful_tool/label_generator.py | SuSir1996/MU-GAN | 9584dc10a70a0da1affb080657b5aed30a242374 | [
"MIT"
] | 3 | 2020-09-14T03:24:37.000Z | 2021-05-31T06:31:26.000Z | # coding:utf-8
# Copyright (C) 2018 Elvis Yu-Jing Lin <elvisyjlin@gmail.com>
#
# This work is licensed under the MIT License. To view a copy of this license,
# visit https://opensource.org/licenses/MIT.
"""Entry point for testing AttGAN network."""
import numpy as np
import argparse
import json
import os
from os.path... | 44.135484 | 152 | 0.581494 |
4a1bc9b508b81922d7ae6ea63decca5b58e456b4 | 21,650 | py | Python | ui_readingorderwidget.py | SkyrookieYu/AEditor | 50972d6d2b84adbc595d84c79d2a8d3ec41ac942 | [
"MIT",
"BSD-3-Clause"
] | 5 | 2021-09-27T03:40:33.000Z | 2021-12-11T01:04:50.000Z | ui_readingorderwidget.py | SkyrookieYu/AEditor | 50972d6d2b84adbc595d84c79d2a8d3ec41ac942 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | ui_readingorderwidget.py | SkyrookieYu/AEditor | 50972d6d2b84adbc595d84c79d2a8d3ec41ac942 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-09-27T17:19:11.000Z | 2021-09-27T17:19:11.000Z | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'ReadingOrderWidget.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
#######... | 35.203252 | 129 | 0.662864 |
4a1bc9dc1765e229c342f35fe05d75b919eb146c | 199 | py | Python | AdvancedJan2022/StacksAndQueues/hot_potato.py | ayk-dev/python-advanced-Jan2022 | 30aecbe1faf45b6b77ef1fe6ee94fe832c462eff | [
"MIT"
] | null | null | null | AdvancedJan2022/StacksAndQueues/hot_potato.py | ayk-dev/python-advanced-Jan2022 | 30aecbe1faf45b6b77ef1fe6ee94fe832c462eff | [
"MIT"
] | null | null | null | AdvancedJan2022/StacksAndQueues/hot_potato.py | ayk-dev/python-advanced-Jan2022 | 30aecbe1faf45b6b77ef1fe6ee94fe832c462eff | [
"MIT"
] | null | null | null | from collections import deque
kids = deque(input().split())
nth_toss = int(input())
while len(kids) > 1:
kids.rotate(-nth_toss)
print(f'Removed {kids.pop()}')
print(f'Last is {kids[0]}')
| 16.583333 | 34 | 0.648241 |
4a1bcac6419f1a70949463866cd3c481bca368dc | 11,699 | py | Python | echopype/preprocess/api.py | mbdunn/echopype | a53290801d1ca062d45c00ca2c541d54682dd40a | [
"Apache-2.0"
] | null | null | null | echopype/preprocess/api.py | mbdunn/echopype | a53290801d1ca062d45c00ca2c541d54682dd40a | [
"Apache-2.0"
] | null | null | null | echopype/preprocess/api.py | mbdunn/echopype | a53290801d1ca062d45c00ca2c541d54682dd40a | [
"Apache-2.0"
] | null | null | null | """
Functions for enhancing the spatial and temporal coherence of data.
"""
import numpy as np
import pandas as pd
from ..utils.prov import echopype_prov_attrs
from .noise_est import NoiseEst
def _check_range_uniqueness(ds):
"""Check if range (``echo_range``) changes across ping in a given frequency channel."""... | 38.738411 | 117 | 0.649714 |
4a1bcae4e22f0d606034e05e3b27117cab8a531f | 5,100 | py | Python | tacker/nfvo/nfvo_plugin.py | priya-pp/Priya | c6615cc4b26370566eaa929ef61bfdb5205ec2af | [
"Apache-2.0"
] | 3 | 2016-03-01T12:26:07.000Z | 2016-08-03T06:24:59.000Z | tacker/nfvo/nfvo_plugin.py | priya-pp/Priya | c6615cc4b26370566eaa929ef61bfdb5205ec2af | [
"Apache-2.0"
] | 24 | 2015-10-21T19:09:02.000Z | 2021-08-02T11:27:26.000Z | tacker/nfvo/nfvo_plugin.py | priya-pp/Priya | c6615cc4b26370566eaa929ef61bfdb5205ec2af | [
"Apache-2.0"
] | 12 | 2016-02-16T15:01:46.000Z | 2017-03-13T10:01:16.000Z | # Copyright 2016 Brocade Communications System, Inc.
# All Rights Reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | 37.777778 | 79 | 0.628039 |
4a1bcb7ce34502bd20556351bc9d508ee4a90e3f | 1,832 | py | Python | Dataset/Leetcode/train/15/419.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/15/419.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/15/419.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution(object):
def generateQueryIndex(self, l):
d = dict()
for i, v in enumerate(l):
if v in d:
d[v].append(i)
else:
d[v] = [i]
return d
def preDelRep(self, sortedList):
i=0
j=1
llen = len(sort... | 29.079365 | 100 | 0.444323 |
4a1bcb8b5674d57a8db8399fd8c40a9feb9c7cc2 | 8,984 | py | Python | velo_payments/models/webhooks_response.py | velopaymentsapi/velo-python | 59b39555e9714139b4bf697151cc7d15f6dd510e | [
"Apache-2.0"
] | null | null | null | velo_payments/models/webhooks_response.py | velopaymentsapi/velo-python | 59b39555e9714139b4bf697151cc7d15f6dd510e | [
"Apache-2.0"
] | null | null | null | velo_payments/models/webhooks_response.py | velopaymentsapi/velo-python | 59b39555e9714139b4bf697151cc7d15f6dd510e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Velo Payments APIs
## Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor.... | 54.448485 | 4,651 | 0.68199 |
4a1bcbdddefa007d03c60bf6164f10fcd9f4cf8d | 10,644 | py | Python | src/whylogs/mlflow/patcher.py | cswarth/whylogs | 6805b252f1d07efde84836d3924949f7ec2d97b1 | [
"Apache-2.0"
] | 603 | 2020-07-31T23:26:10.000Z | 2022-03-31T23:05:36.000Z | src/whylogs/mlflow/patcher.py | cswarth/whylogs | 6805b252f1d07efde84836d3924949f7ec2d97b1 | [
"Apache-2.0"
] | 284 | 2021-03-02T21:28:03.000Z | 2022-03-31T22:36:08.000Z | src/whylogs/mlflow/patcher.py | cswarth/whylogs | 6805b252f1d07efde84836d3924949f7ec2d97b1 | [
"Apache-2.0"
] | 39 | 2020-08-14T21:22:08.000Z | 2022-03-29T20:24:54.000Z | import datetime
import logging
import os
from typing import Dict, Optional
import pandas as pd
from whylogs import __version__ as whylogs_version
from whylogs import get_or_create_session
from whylogs.app.logger import Logger
logger = logging.getLogger(__name__)
_mlflow = None
_original_end_run = None
_active_whylo... | 34.67101 | 140 | 0.677753 |
4a1bcefef91658931cf6cc057cfc05c5ac9be753 | 14,020 | py | Python | scripts/ai/alpha_beta_pruning.py | AlfonsoXIII/chess_manager | bb0800c4992604a9c69c32ac91e65e97507ea1b0 | [
"MIT"
] | 1 | 2021-09-25T22:48:09.000Z | 2021-09-25T22:48:09.000Z | scripts/ai/alpha_beta_pruning.py | AlfonsoXIII/chess_manager | bb0800c4992604a9c69c32ac91e65e97507ea1b0 | [
"MIT"
] | null | null | null | scripts/ai/alpha_beta_pruning.py | AlfonsoXIII/chess_manager | bb0800c4992604a9c69c32ac91e65e97507ea1b0 | [
"MIT"
] | null | null | null | #Mòduls importats
from copy import deepcopy
from math import inf
import numpy
import concurrent.futures
from numpy.core.defchararray import asarray
#Scripts importats
import scripts.ai.movements as movements
#import movements
def Evaluate_Position(board):
board_value = 0
chess_value = {"P":1000, "N":2000, "... | 42.484848 | 148 | 0.300927 |
4a1bcfd976c423f63243ff306af7edac1b3fd0bc | 1,550 | py | Python | var/spack/repos/builtin/packages/py-psyclone/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/py-psyclone/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/py-psyclone/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#
from spack import *
class PyPsyclone(PythonPackage):
"""Code generation for the PSyKAl framework from the GungHo p... | 35.227273 | 73 | 0.667097 |
4a1bd002699603e9e8e7d4b35bf7e6b380443fbe | 2,390 | py | Python | python/oneflow/nn/functional/__init__.py | mosout/oneflow | afbb221d900f1a340568ae2462b2022f8fcc4b3d | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/functional/__init__.py | mosout/oneflow | afbb221d900f1a340568ae2462b2022f8fcc4b3d | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/functional/__init__.py | mosout/oneflow | afbb221d900f1a340568ae2462b2022f8fcc4b3d | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 36.769231 | 88 | 0.838494 |
4a1bd0418cce2990cbe012de09523d1ce6efaba2 | 335 | py | Python | src/python/hello_world/messages/greeting.py | StephanErb/pexample | 4d74de6ef15d09e3b3f574eb70b9d3b97fe72233 | [
"Apache-2.0"
] | 17 | 2017-12-28T18:05:53.000Z | 2022-03-07T09:45:40.000Z | src/python/hello_world/messages/greeting.py | StephanErb/pexample | 4d74de6ef15d09e3b3f574eb70b9d3b97fe72233 | [
"Apache-2.0"
] | null | null | null | src/python/hello_world/messages/greeting.py | StephanErb/pexample | 4d74de6ef15d09e3b3f574eb70b9d3b97fe72233 | [
"Apache-2.0"
] | 2 | 2017-12-28T17:14:17.000Z | 2020-03-25T17:46:37.000Z | from colors import green
from hello_world.messages.animals import cow, unicorn
def greet(greetee, mode):
greeting = green("Hello {}!".format(greetee))
if mode == "cow":
return cow(greeting)
elif mode == "unicorn":
return unicorn(greeting)
else:
assert mode == "plain"
r... | 22.333333 | 53 | 0.632836 |
4a1bd0419c9d87cf633240318192f65e73f7f1be | 2,092 | py | Python | setup.py | xfiderek/darts | 8c36269f9eb8cf59afa8dbbedb5814cdbba124ee | [
"Apache-2.0"
] | null | null | null | setup.py | xfiderek/darts | 8c36269f9eb8cf59afa8dbbedb5814cdbba124ee | [
"Apache-2.0"
] | null | null | null | setup.py | xfiderek/darts | 8c36269f9eb8cf59afa8dbbedb5814cdbba124ee | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from setuptools import setup, find_packages
def read_requirements(path):
return list(Path(path).read_text().splitlines())
base_reqs = read_requirements('requirements/core.txt')
pmdarima_reqs = read_requirements('requirements/pmdarima.txt')
torch_reqs = read_requirements('requirements/to... | 31.223881 | 91 | 0.630975 |
4a1bd0d832eb2fbc1b28b6a84ebdfc24bc721f26 | 5,914 | py | Python | xmodaler/modeling/decoder/meshed_decoder.py | cclauss/xmodaler | 1368fba6c550e97008628edbf01b59a0a6c8fde5 | [
"Apache-2.0"
] | 830 | 2021-06-26T07:16:33.000Z | 2022-03-25T10:31:32.000Z | xmodaler/modeling/decoder/meshed_decoder.py | kevinjunwei/xmodaler | 3e128a816876988c5fb07d842fde4a140e699dde | [
"Apache-2.0"
] | 28 | 2021-08-19T12:39:02.000Z | 2022-03-14T13:04:19.000Z | xmodaler/modeling/decoder/meshed_decoder.py | kevinjunwei/xmodaler | 3e128a816876988c5fb07d842fde4a140e699dde | [
"Apache-2.0"
] | 85 | 2021-08-15T06:58:29.000Z | 2022-02-19T07:30:56.000Z | # Copyright 2021 JD.com, Inc., JD AI
"""
@author: Jianjie Luo
@contact: jianjieluo.sysu@gmail.com
"""
import torch
from torch import nn
from xmodaler.config import configurable
from xmodaler.config import CfgNode as CN
from xmodaler.config import kfg
from ..layers.multihead_attention import MultiHeadAttention
from ..l... | 36.060976 | 123 | 0.584207 |
4a1bd1913379dc510a1e4bb5a8bccb4ba138ce3e | 6,664 | py | Python | drf_spreadsheets/renderers.py | joshuadavidthomas/drf-spreadsheets | 179304c124dd3107b367559bfd2121a724b44174 | [
"BSD-2-Clause"
] | 7 | 2020-09-15T17:51:50.000Z | 2022-03-27T05:53:21.000Z | drf_spreadsheets/renderers.py | joshuadavidthomas/drf-spreadsheets | 179304c124dd3107b367559bfd2121a724b44174 | [
"BSD-2-Clause"
] | 4 | 2020-09-15T15:56:17.000Z | 2022-03-03T05:14:21.000Z | drf_spreadsheets/renderers.py | joshuadavidthomas/drf-spreadsheets | 179304c124dd3107b367559bfd2121a724b44174 | [
"BSD-2-Clause"
] | 2 | 2020-11-13T15:03:57.000Z | 2022-02-10T16:46:19.000Z | import csv
import json
from abc import ABC
from io import StringIO
from openpyxl import Workbook
from openpyxl.writer.excel import save_virtual_workbook
from rest_framework.renderers import BaseRenderer
class SpreadsheetRenderer(BaseRenderer, ABC):
level_sep = "."
def render_table(self, data, renderer_contex... | 33.827411 | 89 | 0.573379 |
4a1bd29f09dc7127fefb4a1ee7f9d80341dee69b | 1,878 | py | Python | setup.py | sanjaysiddhanti/injector | e6d55adf6f3bf11443ea95e935eac80966ca4bbf | [
"BSD-3-Clause"
] | null | null | null | setup.py | sanjaysiddhanti/injector | e6d55adf6f3bf11443ea95e935eac80966ca4bbf | [
"BSD-3-Clause"
] | null | null | null | setup.py | sanjaysiddhanti/injector | e6d55adf6f3bf11443ea95e935eac80966ca4bbf | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, Command
import sys
import warnings
warnings.filterwarnings("always", module=__name__)
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno ... | 25.378378 | 93 | 0.656017 |
4a1bd315cf00c10b73f28031f268816796f8cb1e | 929 | py | Python | pretalx_public_voting/signals.py | astroidex/pretalx-public-voting | d3de2ab4954e1ee0bcb783cf0d9e97c44a8db620 | [
"Apache-2.0"
] | 1 | 2020-05-29T12:31:31.000Z | 2020-05-29T12:31:31.000Z | pretalx_public_voting/signals.py | astroidex/pretalx-public-voting | d3de2ab4954e1ee0bcb783cf0d9e97c44a8db620 | [
"Apache-2.0"
] | 14 | 2020-06-28T08:06:31.000Z | 2022-01-21T09:35:10.000Z | pretalx_public_voting/signals.py | astroidex/pretalx-public-voting | d3de2ab4954e1ee0bcb783cf0d9e97c44a8db620 | [
"Apache-2.0"
] | 3 | 2020-09-27T18:55:01.000Z | 2021-12-06T05:28:00.000Z | from django.dispatch import receiver
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from pretalx.common.signals import register_data_exporters
from pretalx.orga.signals import nav_event_settings
@receiver(nav_event_settings)
def public_voting_settings(sender, request, **kwargs)... | 30.966667 | 72 | 0.692142 |
4a1bd3fb3060a2b1896fa9d084981d90b001ce2e | 8,511 | py | Python | plugins/modules/env_auth_info.py | nmarian85/cloudera.cloud | 817fc1a5400c1f43614c886bce1770076c1e91d1 | [
"Apache-2.0"
] | 11 | 2021-05-05T19:44:14.000Z | 2021-08-23T20:22:55.000Z | plugins/modules/env_auth_info.py | nmarian85/cloudera.cloud | 817fc1a5400c1f43614c886bce1770076c1e91d1 | [
"Apache-2.0"
] | 19 | 2021-05-18T11:02:05.000Z | 2022-03-19T17:25:56.000Z | plugins/modules/env_auth_info.py | nmarian85/cloudera.cloud | 817fc1a5400c1f43614c886bce1770076c1e91d1 | [
"Apache-2.0"
] | 18 | 2021-05-05T17:29:49.000Z | 2022-02-10T10:46:54.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2021 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LIC... | 30.949091 | 115 | 0.634356 |
4a1bd400d2094bddce0a359a5fba04350257108b | 3,805 | py | Python | tests/functional/test_retrieval.py | janvainer/metrics | 165cff0d22639bd7c6d66cd73d6bb2a9d0c8f698 | [
"Apache-2.0"
] | null | null | null | tests/functional/test_retrieval.py | janvainer/metrics | 165cff0d22639bd7c6d66cd73d6bb2a9d0c8f698 | [
"Apache-2.0"
] | null | null | null | tests/functional/test_retrieval.py | janvainer/metrics | 165cff0d22639bd7c6d66cd73d6bb2a9d0c8f698 | [
"Apache-2.0"
] | null | null | null | import math
import numpy as np
import pytest
import torch
from sklearn.metrics import average_precision_score as sk_average_precision
from tests.helpers import seed_all
from tests.retrieval.test_mrr import _reciprocal_rank as reciprocal_rank
from torchmetrics.functional.retrieval.average_precision import retrieval_av... | 39.635417 | 116 | 0.704862 |
4a1bd46d9bb8fe058121c172e0584af0c00ffe48 | 450,753 | py | Python | modules/s3db/hrm.py | aeturnum/new_eden | 01b603b2797dc5b3fa82d9ae32c23016c07c0f44 | [
"MIT"
] | null | null | null | modules/s3db/hrm.py | aeturnum/new_eden | 01b603b2797dc5b3fa82d9ae32c23016c07c0f44 | [
"MIT"
] | null | null | null | modules/s3db/hrm.py | aeturnum/new_eden | 01b603b2797dc5b3fa82d9ae32c23016c07c0f44 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Sahana Eden Human Resources Management
@copyright: 2011-2019 (c) Sahana Software Foundation
@license: MIT
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 S... | 42.896174 | 233 | 0.426438 |
4a1bd4a7d4bd5794894b1f3ad4e18d0c0bc8aeda | 7,750 | py | Python | dialmycalls_client/models/update_contact_by_id_parameters.py | dialmycalls/python-sdk-v2 | ab6ac61d305ea1729b618bc2530d6101136aa6ea | [
"Apache-2.0"
] | 2 | 2020-07-29T08:51:36.000Z | 2021-01-21T11:18:24.000Z | dialmycalls_client/models/update_contact_by_id_parameters.py | dialmycalls/python-sdk-v2 | ab6ac61d305ea1729b618bc2530d6101136aa6ea | [
"Apache-2.0"
] | null | null | null | dialmycalls_client/models/update_contact_by_id_parameters.py | dialmycalls/python-sdk-v2 | ab6ac61d305ea1729b618bc2530d6101136aa6ea | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
DialMyCalls API
The DialMyCalls API
OpenAPI spec version: 2.0.1
Contact: support@dialmycalls.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compli... | 27.48227 | 120 | 0.583355 |
4a1bd4e5d2c231c564768000cdbc2b91db7ca3ce | 12,123 | py | Python | vqvae/eicu_train_eval.py | metodmove/finTDPSOM | d2343b67099c10d2baface241c0543b5f004727c | [
"MIT"
] | 35 | 2020-04-01T07:49:34.000Z | 2021-11-24T19:45:49.000Z | vqvae/eicu_train_eval.py | metodmove/finTDPSOM | d2343b67099c10d2baface241c0543b5f004727c | [
"MIT"
] | 1 | 2019-10-29T13:47:39.000Z | 2019-11-19T11:15:24.000Z | vqvae/eicu_train_eval.py | metodmove/finTDPSOM | d2343b67099c10d2baface241c0543b5f004727c | [
"MIT"
] | 16 | 2020-03-20T04:57:59.000Z | 2022-03-31T07:32:44.000Z | ''' VQ-VAE training/evaluation on the eICU data-set'''
import os
from glob import glob
import pickle
import argparse
import ipdb
import csv
import random
import sys
import timeit
import numpy as np
import numpy.random as nprand
import h5py
from tqdm import tqdm, trange
from ipywidgets import interact, interactive, f... | 43.923913 | 127 | 0.636229 |
4a1bd5b839c3df4c1eb0380aa9a274bcbe981133 | 2,141 | py | Python | fhir/resources/tests/test_binary.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 144 | 2019-05-08T14:24:43.000Z | 2022-03-30T02:37:11.000Z | fhir/resources/tests/test_binary.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 82 | 2019-05-13T17:43:13.000Z | 2022-03-30T16:45:17.000Z | fhir/resources/tests/test_binary.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 48 | 2019-04-04T14:14:53.000Z | 2022-03-30T06:07:31.000Z | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/Binary
Release: R4
Version: 4.0.1
Build ID: 9346c8cc45
Last updated: 2019-11-01T09:29:23.356+11:00
"""
from pydantic.validators import bytes_validator # noqa: F401
from .. import fhirtypes # noqa: F401
from .. import binary
def impl_binar... | 28.932432 | 87 | 0.677721 |
4a1bd609a4b4a0009fbbab8986d19eb552a80dae | 4,431 | py | Python | src/main/resources/pytz/zoneinfo/America/Fort_Wayne.py | TheEin/swagger-maven-plugin | cf93dce2d5c8d3534f4cf8c612b11e2d2313871b | [
"Apache-2.0"
] | 65 | 2015-11-14T13:46:01.000Z | 2021-08-14T05:54:04.000Z | lib/pytz/zoneinfo/America/Fort_Wayne.py | tjsavage/polymer-dashboard | 19bc467f1206613f8eec646b6f2bc43cc319ef75 | [
"CNRI-Python",
"Linux-OpenIB"
] | 13 | 2016-03-31T20:00:17.000Z | 2021-08-20T14:52:31.000Z | lib/pytz/zoneinfo/America/Fort_Wayne.py | tjsavage/polymer-dashboard | 19bc467f1206613f8eec646b6f2bc43cc319ef75 | [
"CNRI-Python",
"Linux-OpenIB"
] | 20 | 2015-03-18T08:41:37.000Z | 2020-12-18T02:58:30.000Z | '''tzinfo timezone information for America/Fort_Wayne.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Fort_Wayne(DstTzInfo):
'''America/Fort_Wayne timezone definition. See datetime.tzinfo for details'''
zone = 'America/F... | 20.419355 | 81 | 0.571203 |
4a1bd6fcee6e349d57aa677080a49e59c4730c8b | 451 | py | Python | jobs/nro-update/tests/conftest.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 4 | 2018-10-05T23:41:05.000Z | 2019-06-19T16:17:50.000Z | jobs/nro-update/tests/conftest.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 635 | 2018-05-31T04:12:46.000Z | 2022-03-31T18:45:42.000Z | jobs/nro-update/tests/conftest.py | rarmitag/namex | 1b308bf96130619d4a61d44e075cc7ab177dc6cd | [
"Apache-2.0"
] | 71 | 2018-05-14T20:47:55.000Z | 2022-03-31T23:08:30.000Z | import pytest
from pytest_mock import mocker
from flask import current_app
from nro.app import create_app
from config import Config
@pytest.fixture(scope="session")
def app(request):
"""
Returns session-wide application.
"""
app = create_app(Config)
return app
@pytest.fixture(scope="session")... | 16.703704 | 43 | 0.685144 |
4a1bd92850e9e3f12e5ea5607093b50a193ad87b | 1,066 | py | Python | day 02/day02_part1.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | 2 | 2020-12-17T18:49:20.000Z | 2021-02-20T16:48:14.000Z | day 02/day02_part1.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | null | null | null | day 02/day02_part1.py | MischaDy/PyAdventOfCode2020 | 3e0a1a61ac930d7e30a0104ac617008297508fcb | [
"CC0-1.0"
] | 3 | 2020-12-20T19:08:32.000Z | 2020-12-26T22:11:15.000Z | RUN_TEST = False
TEST_SOLUTION = 2
TEST_INPUT_FILE = 'test_input_day_02.txt'
INPUT_FILE = 'input_day_02.txt'
ARGS = []
def main_part1(input_file, ):
with open(input_file) as file:
lines = list(map(lambda line: line.rstrip(), file.readlines()))
rule_pw_tuples = list(map(lambda line: line.split(': '), ... | 28.052632 | 72 | 0.695122 |
4a1bd9574db79337450655d744fcab466a01fe3e | 4,152 | py | Python | python/smap/archiver/tscache.py | carlosduarteroa/smap | 5760631dfaf3e85da26ce68bf542bf254bb92c80 | [
"BSD-2-Clause"
] | null | null | null | python/smap/archiver/tscache.py | carlosduarteroa/smap | 5760631dfaf3e85da26ce68bf542bf254bb92c80 | [
"BSD-2-Clause"
] | null | null | null | python/smap/archiver/tscache.py | carlosduarteroa/smap | 5760631dfaf3e85da26ce68bf542bf254bb92c80 | [
"BSD-2-Clause"
] | null | null | null | """
Copyright (c) 2011, 2012, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this l... | 34.032787 | 91 | 0.635116 |
4a1bd9e9ac0c7cf58a1f1e7c2302a83cb9ca0787 | 677 | py | Python | FrendlyModule.py | RouSage/magistrprog | c0ea7fc134b5c33d0605052667a8335c9344dcd3 | [
"MIT"
] | null | null | null | FrendlyModule.py | RouSage/magistrprog | c0ea7fc134b5c33d0605052667a8335c9344dcd3 | [
"MIT"
] | null | null | null | FrendlyModule.py | RouSage/magistrprog | c0ea7fc134b5c33d0605052667a8335c9344dcd3 | [
"MIT"
] | 1 | 2020-07-07T09:26:59.000Z | 2020-07-07T09:26:59.000Z | from NPCModule import NPC
class Frendly(NPC):
def __init__(self,ID, TYPE, MainList, x, y, MainPick,name, hp, protection, imunitet, interaction, isFrendly, Dialog = 0, Scene = 0, LeftANIM, RightANIM):
NPC.__init__(self, ID, TYPE, MainList, x, y, MainPick, name, hp, protection, imunitet, interaction, isFrend... | 30.772727 | 157 | 0.676514 |
4a1bda9d6b5f496d19a132e3204ef845aaa64f08 | 66 | py | Python | send_mail/celery_tasks/email_task/__init__.py | ruoyunruyan/send_email | bb5c19b7750bbb3798f7ec6843f68d959375ca53 | [
"MIT"
] | null | null | null | send_mail/celery_tasks/email_task/__init__.py | ruoyunruyan/send_email | bb5c19b7750bbb3798f7ec6843f68d959375ca53 | [
"MIT"
] | null | null | null | send_mail/celery_tasks/email_task/__init__.py | ruoyunruyan/send_email | bb5c19b7750bbb3798f7ec6843f68d959375ca53 | [
"MIT"
] | null | null | null | # Time: 2019/9/9 18:55
# Author jzh
# File __init__.py.py
| 11 | 24 | 0.590909 |
4a1bdb89cd585c788eaf26cf2abfbc0226ba8dec | 1,441 | py | Python | src/cogs/events/onMemberRemove/onMemberRemove.py | End313234/Logs-Bot | a80b506c3fb6d4906e5a24dd32ee09162e4c4eca | [
"Apache-2.0"
] | 4 | 2021-06-16T01:02:37.000Z | 2021-08-24T12:56:30.000Z | src/cogs/events/onMemberRemove/onMemberRemove.py | End313234/Logs-Bot | a80b506c3fb6d4906e5a24dd32ee09162e4c4eca | [
"Apache-2.0"
] | null | null | null | src/cogs/events/onMemberRemove/onMemberRemove.py | End313234/Logs-Bot | a80b506c3fb6d4906e5a24dd32ee09162e4c4eca | [
"Apache-2.0"
] | 1 | 2021-06-13T02:06:57.000Z | 2021-06-13T02:06:57.000Z | import json
import discord
from discord.ext import commands
import sqlite3
import datetime
class onMemberRemove(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_member_remove(self, member):
c = self.client.connection.curs... | 33.511628 | 169 | 0.594726 |
4a1bdbb0151a4e0bdb713e4312ebfef03f20a10d | 962 | py | Python | var/spack/repos/builtin/packages/libmpdclient/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/libmpdclient/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/libmpdclient/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Libmpdclient(MesonPackage):
"""Libmpdclient is a C library which implements the Mu... | 45.809524 | 94 | 0.788981 |
4a1bdcbd1ebe5c02d60af8cea8f760f05c8f1f21 | 272 | py | Python | much_faster_model/heartbeat.py | ShivamShrirao/RA26_TheSixthSense_WIMDR | f7c6ecabac56f7504e9696db65174347e9209740 | [
"Apache-2.0"
] | null | null | null | much_faster_model/heartbeat.py | ShivamShrirao/RA26_TheSixthSense_WIMDR | f7c6ecabac56f7504e9696db65174347e9209740 | [
"Apache-2.0"
] | null | null | null | much_faster_model/heartbeat.py | ShivamShrirao/RA26_TheSixthSense_WIMDR | f7c6ecabac56f7504e9696db65174347e9209740 | [
"Apache-2.0"
] | 2 | 2020-09-03T09:22:18.000Z | 2020-09-09T15:13:35.000Z | from time import sleep
import requests
import sys
API_ENDPOINT = "http://annotate.ret2rop.com:31896/monitoring/"
uid = sys.argv[1]
data = {"uid": uid, "auth-token": "ENTER_AUTH_TOKEN"}
while True:
r = requests.post(url = API_ENDPOINT, data = data)
print(r)
sleep(60) | 20.923077 | 62 | 0.716912 |
4a1bde3f5e0ee5e78b92aedd07c14523b15ce10c | 68,765 | py | Python | tensorflow/python/eager/function_test.py | hex41434/tensorflow | f8655c08cfe3bd99ec1703211e1c9154a14a6150 | [
"Apache-2.0"
] | 1 | 2019-01-31T13:45:18.000Z | 2019-01-31T13:45:18.000Z | tensorflow/python/eager/function_test.py | TranHuuHoang/tensorflow | 50125bf0d8ee9f47b868211f62cb545c5701a032 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/function_test.py | TranHuuHoang/tensorflow | 50125bf0d8ee9f47b868211f62cb545c5701a032 | [
"Apache-2.0"
] | 1 | 2018-09-22T03:59:44.000Z | 2018-09-22T03:59:44.000Z | # Copyright 2017 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... | 31.242617 | 80 | 0.659652 |
4a1bdea7301ae3c5f98fcfc3f950c981f162c6d1 | 13,704 | py | Python | rotkehlchen/tests/api/test_aave.py | davbre/rotki | bab693a98a1834df2f983db100e293bd5a44ab0c | [
"BSD-3-Clause"
] | 1 | 2021-04-01T20:40:17.000Z | 2021-04-01T20:40:17.000Z | rotkehlchen/tests/api/test_aave.py | davbre/rotki | bab693a98a1834df2f983db100e293bd5a44ab0c | [
"BSD-3-Clause"
] | null | null | null | rotkehlchen/tests/api/test_aave.py | davbre/rotki | bab693a98a1834df2f983db100e293bd5a44ab0c | [
"BSD-3-Clause"
] | null | null | null | import random
import warnings as test_warnings
from contextlib import ExitStack
from http import HTTPStatus
import pytest
import requests
from rotkehlchen.api.server import APIServer
from rotkehlchen.constants.misc import ZERO
from rotkehlchen.fval import FVal
from rotkehlchen.serialization.serialize import process_r... | 41.908257 | 151 | 0.713441 |
4a1bdf68fe10d8bcab1f115d15faf77eb60a939a | 3,288 | py | Python | bidding_round/bidding_round_helper.py | gitCincta/StockTool | 2ae604774cd8c271ffc49a4a39fcc412bcaf4577 | [
"Apache-2.0"
] | null | null | null | bidding_round/bidding_round_helper.py | gitCincta/StockTool | 2ae604774cd8c271ffc49a4a39fcc412bcaf4577 | [
"Apache-2.0"
] | null | null | null | bidding_round/bidding_round_helper.py | gitCincta/StockTool | 2ae604774cd8c271ffc49a4a39fcc412bcaf4577 | [
"Apache-2.0"
] | null | null | null | __author__ = 'laurens'
from django.utils import timezone
from datetime import timedelta, datetime
from home.date_time_constants import *
from bidding_round.bidding_round_errors import *
def get_start_date_third_party():
return get_first_monday_of_month()
def get_end_date_third_party():
delta = timedelta(da... | 28.591304 | 88 | 0.724453 |
4a1bdfc3237555b3a30b59c9e7f6a22566e7553d | 18,769 | py | Python | aispace/layers/adapters/model_adapters.py | SmileGoat/AiSpace | 35fc120667e4263c99b300815e0bf018f5064a40 | [
"Apache-2.0"
] | 32 | 2020-01-16T07:59:03.000Z | 2022-03-31T09:24:00.000Z | aispace/layers/adapters/model_adapters.py | SmileGoat/AiSpace | 35fc120667e4263c99b300815e0bf018f5064a40 | [
"Apache-2.0"
] | 9 | 2020-06-05T03:27:06.000Z | 2022-03-12T01:00:17.000Z | aispace/layers/adapters/model_adapters.py | SmileGoat/AiSpace | 35fc120667e4263c99b300815e0bf018f5064a40 | [
"Apache-2.0"
] | 3 | 2020-06-09T02:22:50.000Z | 2021-07-19T06:07:07.000Z | # -*- coding: utf-8 -*-
# @Time : 2019-11-28 13:57
# @Author : yingyuankai
# @Email : yingyuankai@aliyun.com
# @File : tf_model_adapters.py
import re
import numpy as np
from collections import OrderedDict
import tensorflow as tf
__all__ = [
"tf_huggingface_bert_adapter",
"tf_huggingface_ernie_adapte... | 45.445521 | 126 | 0.656561 |
4a1bdfd93b9a41a34bd9e0da20b473be676007ea | 32,765 | py | Python | corner_cubes_3d_laser/cut.py | agupta231/fractal_prints | 5758b1e04834d8fad4a71103052a6a0ad2705f3a | [
"MIT"
] | 1 | 2019-11-19T06:56:08.000Z | 2019-11-19T06:56:08.000Z | corner_cubes_3d_laser/cut.py | agupta231/fractal_prints | 5758b1e04834d8fad4a71103052a6a0ad2705f3a | [
"MIT"
] | null | null | null | corner_cubes_3d_laser/cut.py | agupta231/fractal_prints | 5758b1e04834d8fad4a71103052a6a0ad2705f3a | [
"MIT"
] | null | null | null | # Program by Ankur Gupta
# www.github.com/agupta231
# Feb 2017
#
#
# 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,... | 46.607397 | 124 | 0.617641 |
4a1be25aab217f41448237d7a20737c7468fd095 | 7,867 | py | Python | core/triplet_mining_online.py | huynhnhathao/hum_to_find | a0d7ec4bab1a7e2f7175956ff2721e23e2448840 | [
"MIT"
] | 1 | 2021-12-22T07:30:18.000Z | 2021-12-22T07:30:18.000Z | core/triplet_mining_online.py | huynhnhathao/hum_to_find | a0d7ec4bab1a7e2f7175956ff2721e23e2448840 | [
"MIT"
] | null | null | null | core/triplet_mining_online.py | huynhnhathao/hum_to_find | a0d7ec4bab1a7e2f7175956ff2721e23e2448840 | [
"MIT"
] | 1 | 2022-01-28T02:36:17.000Z | 2022-01-28T02:36:17.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: triplet_loss.ipynb (unless otherwise specified).
__all__ = ['batch_hard_triplet_loss', 'batch_all_triplet_loss']
# Cell
import torch
import torch.nn.functional as F
def _pairwise_distances(embeddings, squared=False):
"""Compute the 2D matrix of distances between all the... | 41.624339 | 100 | 0.703318 |
4a1be26512af245c147be4798822a030cbbaf68c | 607 | py | Python | server.py | AdamSpannbauer/jump_punch | 0e2e78997a7ea34cc90ae7bb9cd01b7aa3ef089a | [
"MIT"
] | null | null | null | server.py | AdamSpannbauer/jump_punch | 0e2e78997a7ea34cc90ae7bb9cd01b7aa3ef089a | [
"MIT"
] | 2 | 2021-03-25T10:49:01.000Z | 2021-04-01T17:17:17.000Z | server.py | AdamSpannbauer/jump_punch | 0e2e78997a7ea34cc90ae7bb9cd01b7aa3ef089a | [
"MIT"
] | null | null | null | import socket
from network_utils import get_host_name, PORT, FORMAT
SERVER = get_host_name()
server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
server.bind((SERVER, PORT))
def respond(data, addr):
msg = f'you said "{data.decode(FORMAT)}"'
server.sendto(msg.encode(FORMAT), addr)
def start_server():
... | 22.481481 | 60 | 0.672158 |
4a1be38609cb5325ac18706bfe9ec4124e349402 | 5,113 | py | Python | arca/backend/venv.py | encukou/arca | edc3e81d27a5c194da10d54402923c27085e0e96 | [
"MIT"
] | 6 | 2017-09-25T00:43:01.000Z | 2018-09-05T07:59:08.000Z | arca/backend/venv.py | encukou/arca | edc3e81d27a5c194da10d54402923c27085e0e96 | [
"MIT"
] | 41 | 2017-10-05T21:10:11.000Z | 2019-09-10T16:48:22.000Z | arca/backend/venv.py | encukou/arca | edc3e81d27a5c194da10d54402923c27085e0e96 | [
"MIT"
] | 2 | 2019-12-09T15:12:17.000Z | 2019-12-09T20:00:53.000Z | import shlex
import shutil
import subprocess
from pathlib import Path
from typing import Optional
from venv import EnvBuilder
from git import Repo
from arca.exceptions import BuildError, BuildTimeoutError
from arca.utils import logger
from .base import BaseRunInSubprocessBackend, RequirementsOptions
class VenvBacke... | 42.256198 | 118 | 0.599061 |
4a1be3cefc84ce8b72e6eb21e17e5de26c97a69a | 500 | py | Python | drift_detection/__init__.py | JanSurft/tornado | 2c07686c5358d2bcb15d6edac3126ad9346c3c76 | [
"MIT"
] | 103 | 2017-10-01T20:24:58.000Z | 2022-03-16T09:09:10.000Z | drift_detection/__init__.py | JanSurft/tornado | 2c07686c5358d2bcb15d6edac3126ad9346c3c76 | [
"MIT"
] | 2 | 2019-09-17T11:06:26.000Z | 2021-11-08T23:57:46.000Z | drift_detection/__init__.py | JanSurft/tornado | 2c07686c5358d2bcb15d6edac3126ad9346c3c76 | [
"MIT"
] | 28 | 2018-12-18T00:43:10.000Z | 2022-03-04T08:39:47.000Z | from drift_detection.adwin import ADWINChangeDetector
from drift_detection.cusum import CUSUM
from drift_detection.ddm import DDM
from drift_detection.eddm import EDDM
from drift_detection.fhddm import FHDDM
from drift_detection.fhddms import FHDDMS
from drift_detection.hddm_a import HDDM_A_test
from drift_detec... | 41.666667 | 63 | 0.868 |
4a1be43e80c8e006a1f2375707f91f3ee8de653d | 4,058 | py | Python | texasholdem/lobby/views/page_views.py | stricoff92/games-hub | 23bbd308fc12e214abd8813607ce92fd0a20fa8c | [
"MIT"
] | null | null | null | texasholdem/lobby/views/page_views.py | stricoff92/games-hub | 23bbd308fc12e214abd8813607ce92fd0a20fa8c | [
"MIT"
] | 5 | 2021-03-19T04:38:06.000Z | 2021-09-22T19:10:42.000Z | texasholdem/lobby/views/page_views.py | stricoff92/games-hub | 23bbd308fc12e214abd8813607ce92fd0a20fa8c | [
"MIT"
] | null | null | null |
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponseBadRequest, HttpResponse
from django.shortcuts import render, redirect, get_object_or_404
from rest_framework import status
from lobby.forms import LoginForm, Regis... | 30.283582 | 83 | 0.639724 |
4a1be544e14d104bba3319b17e9de5e1f5c78777 | 1,997 | py | Python | axf_1905/common/func.py | passed-by/axf | 9f8fa77f856703f733db3bad5be37eea33de37bd | [
"MIT"
] | 2 | 2019-12-03T01:40:10.000Z | 2019-12-03T01:43:18.000Z | axf_1905/common/func.py | passed-by/axf | 9f8fa77f856703f733db3bad5be37eea33de37bd | [
"MIT"
] | 3 | 2020-06-05T23:01:05.000Z | 2021-06-08T20:23:20.000Z | axf_1905/common/func.py | passed-by/axf | 9f8fa77f856703f733db3bad5be37eea33de37bd | [
"MIT"
] | 1 | 2020-08-04T22:45:10.000Z | 2020-08-04T22:45:10.000Z | import json
from django.conf import settings
from django.core.mail import send_mail
from qiniu import Auth, put_file
from django_redis import get_redis_connection
from worker import celery_app
def upload_to_qiniu(filename, localfile):
# 需要填写你的 Access Key 和 Secret Key
access_key = 'bbs0RlgZlWGB_PwIyKrZQVFdZvwe... | 25.602564 | 86 | 0.651477 |
4a1be55cb30964b1bf4b3e44c488a897aeb01278 | 416 | py | Python | src/maypy/distributions/specific/exponential_norm.py | MVilstrup/maypy | a246da085ac22f8680d82be334cab39c7b5a454a | [
"MIT"
] | null | null | null | src/maypy/distributions/specific/exponential_norm.py | MVilstrup/maypy | a246da085ac22f8680d82be334cab39c7b5a454a | [
"MIT"
] | null | null | null | src/maypy/distributions/specific/exponential_norm.py | MVilstrup/maypy | a246da085ac22f8680d82be334cab39c7b5a454a | [
"MIT"
] | null | null | null | from maypy.distributions.distribution import Distribution
import scipy.stats as st
class ExponentialNorm(Distribution):
def __init__(self, data, num_samples=-1, args=None, loc=None, scale=None, experiment=None):
Distribution.__init__(self, data, st.exponnorm, num_samples, args, loc, scale, experiment)
... | 37.818182 | 98 | 0.742788 |
4a1be5bf10bd90fa0fac1c751ea021fb2b1fefbe | 166 | py | Python | Source/mtm/log/LogStreamStdout.py | fairhopeweb/Projeny | 4c11ab8f3d2c91765bdf50766f39b2df1d208467 | [
"MIT"
] | 752 | 2016-01-09T04:56:10.000Z | 2022-02-13T14:13:53.000Z | Source/mtm/log/LogStreamStdout.py | fairhopeweb/Projeny | 4c11ab8f3d2c91765bdf50766f39b2df1d208467 | [
"MIT"
] | 86 | 2016-01-08T22:48:27.000Z | 2019-10-02T03:15:49.000Z | Source/mtm/log/LogStreamStdout.py | fairhopeweb/Projeny | 4c11ab8f3d2c91765bdf50766f39b2df1d208467 | [
"MIT"
] | 108 | 2016-01-10T20:43:52.000Z | 2021-09-17T22:46:26.000Z |
import sys
class LogStreamStdout:
def log(self, logType, message):
sys.stdout.write('\n')
sys.stdout.write(message)
sys.stdout.flush()
| 16.6 | 36 | 0.620482 |
4a1be6085883c778993f64a8343971bec1335935 | 103 | py | Python | python/testData/completion/classNameFromVarNameChained.after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/completion/classNameFromVarNameChained.after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/completion/classNameFromVarNameChained.after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | class Product:
def doStuff(self): pass
class C:
def foo(self):
self.product.doStuff()
| 14.714286 | 30 | 0.621359 |
4a1be73f26a3d94bde12c7f0440a95115f088232 | 61,325 | py | Python | pypy/interpreter/astcompiler/test/test_astbuilder.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-06-02T23:02:09.000Z | 2021-06-02T23:02:09.000Z | pypy/interpreter/astcompiler/test/test_astbuilder.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-03-30T18:08:41.000Z | 2021-03-30T18:08:41.000Z | pypy/interpreter/astcompiler/test/test_astbuilder.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | # -*- coding: utf-8 -*-
import random
import string
import sys
import pytest
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.pyparser import pyparse
from pypy.interpreter.pyparser.error import SyntaxError
from pypy.interpreter.astcompiler.astbuilder import ast_from_node
from pypy.interpreter.astc... | 40.532056 | 87 | 0.573812 |
4a1be8176be9d4cf2aa49a250ad240986b1096d5 | 22,569 | py | Python | software/glasgow/device/hardware.py | emilazy/Glasgow | 4575ad07ccce76b0b92d29a76fc18a3700a68823 | [
"Apache-2.0",
"0BSD"
] | null | null | null | software/glasgow/device/hardware.py | emilazy/Glasgow | 4575ad07ccce76b0b92d29a76fc18a3700a68823 | [
"Apache-2.0",
"0BSD"
] | null | null | null | software/glasgow/device/hardware.py | emilazy/Glasgow | 4575ad07ccce76b0b92d29a76fc18a3700a68823 | [
"Apache-2.0",
"0BSD"
] | null | null | null | import re
import time
import struct
import logging
import usb1
import asyncio
import threading
from fx2 import VID_CYPRESS, PID_FX2, REQ_RAM, REG_CPUCS
from fx2.format import input_data
from ..support.logging import *
from . import GlasgowDeviceError
from .config import GlasgowConfig
__all__ = ["GlasgowHardwareDevic... | 42.34334 | 99 | 0.573796 |
4a1be844ec89a46b64a19ffc4cb56cb6e71c2550 | 8,077 | py | Python | shared/auth-manager.py | yva/isolate | dd44d3ce4ec2c3b1d445d6fa276e084b7a8f3f71 | [
"MIT"
] | 1 | 2018-09-21T14:03:39.000Z | 2018-09-21T14:03:39.000Z | shared/auth-manager.py | yva/isolate | dd44d3ce4ec2c3b1d445d6fa276e084b7a8f3f71 | [
"MIT"
] | null | null | null | shared/auth-manager.py | yva/isolate | dd44d3ce4ec2c3b1d445d6fa276e084b7a8f3f71 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
import json
from time import time
import argparse
from redis import Redis
import logging
from IsolateCore import IsolateGeoIP, is_valid_ipv6_address, is_valid_ipv4_address, is_valid_fqdn
LOGGER = logging.getLogger('auth-manager')
LOG_FORMAT ... | 40.792929 | 123 | 0.597499 |
4a1be889046639b98fa0020d333e200f5fead4b8 | 397 | py | Python | wisdompets/wsgi.py | Chansazm/Project_30_Pet_Webapp | 7f14fabbb58c30cd8049b85cdfab5954fa6fbe3a | [
"MIT"
] | 1 | 2021-05-14T21:23:07.000Z | 2021-05-14T21:23:07.000Z | wisdompets/wsgi.py | Chansazm/Project_30_Pet_Webapp | 7f14fabbb58c30cd8049b85cdfab5954fa6fbe3a | [
"MIT"
] | 5 | 2020-06-06T14:51:39.000Z | 2021-09-22T19:14:55.000Z | wisdompets/wsgi.py | Chansazm/Project_30_Pet_Webapp | 7f14fabbb58c30cd8049b85cdfab5954fa6fbe3a | [
"MIT"
] | null | null | null | """
WSGI config for wisdompets project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
4a1be8f753aa0807961b76db29aa96d5cf24d8d4 | 7,454 | py | Python | src/main/python/transformer/util.py | phohenecker/pytorch-transformer | 211406d82ac04a7b473bcdebda77cc3c2e9af0cf | [
"BSD-2-Clause"
] | 50 | 2018-12-10T20:37:06.000Z | 2022-02-25T11:36:03.000Z | src/main/python/transformer/util.py | grisoniFr/pytorch-transformer | 211406d82ac04a7b473bcdebda77cc3c2e9af0cf | [
"BSD-2-Clause"
] | 3 | 2019-07-09T12:15:52.000Z | 2021-04-08T07:44:40.000Z | src/main/python/transformer/util.py | grisoniFr/pytorch-transformer | 211406d82ac04a7b473bcdebda77cc3c2e9af0cf | [
"BSD-2-Clause"
] | 9 | 2019-06-28T04:33:31.000Z | 2021-01-27T06:07:28.000Z | # -*- coding: utf-8 -*-
"""This module provides various utility functions."""
import itertools
import numbers
import numpy as np
import torch
from torch import nn
__author__ = "Patrick Hohenecker"
__copyright__ = (
"Copyright (c) 2018, Patrick Hohenecker\n"
"All rights reserved.\n"
"\n"
... | 44.106509 | 120 | 0.66528 |
4a1be90e5ec94ecc38c2d14ee0de487ed172462b | 2,036 | py | Python | ytdown.py | JWarcholC/yt-music-downloader | 30dc24ede51c34004ceab1fc60da18bdd7504044 | [
"MIT"
] | null | null | null | ytdown.py | JWarcholC/yt-music-downloader | 30dc24ede51c34004ceab1fc60da18bdd7504044 | [
"MIT"
] | null | null | null | ytdown.py | JWarcholC/yt-music-downloader | 30dc24ede51c34004ceab1fc60da18bdd7504044 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from __future__ import absolute_import, unicode_literals
import os
import sys
import youtube_dl
# prepare cleaning instruction
clean = ""
if os.system == "Windows":
clean = "cls"
else:
clean = "clear"
# progress bar
def hook(d):
if d['status'] == 'finished':
print('Done downlo... | 21.208333 | 63 | 0.540275 |
4a1be9d0b07e8fcd0244c90129670ebf11c226e2 | 6,670 | py | Python | examples/dpr_encoder.py | tstadel/FARM | 0d6f250ad8a59a63f9f5378ac250355510ca0cac | [
"Apache-2.0"
] | 1 | 2021-04-19T12:21:38.000Z | 2021-04-19T12:21:38.000Z | examples/dpr_encoder.py | tstadel/FARM | 0d6f250ad8a59a63f9f5378ac250355510ca0cac | [
"Apache-2.0"
] | null | null | null | examples/dpr_encoder.py | tstadel/FARM | 0d6f250ad8a59a63f9f5378ac250355510ca0cac | [
"Apache-2.0"
] | null | null | null | # fmt: off
import logging
import os
import pprint
from pathlib import Path
import argparse
from farm.data_handler.data_silo import DataSilo
from farm.data_handler.processor import TextSimilarityProcessor
from farm.modeling.biadaptive_model import BiAdaptiveModel
from farm.modeling.language_model import LanguageModel
... | 43.032258 | 162 | 0.664318 |
4a1bea14859e4d975579d03b8986d833ad2d79c6 | 1,166 | py | Python | polarimeter/test_polarimeter.py | malgorzatakim/polarimeter | 22af7325c9e61f3d75cb0757776c501e5116eb36 | [
"MIT"
] | null | null | null | polarimeter/test_polarimeter.py | malgorzatakim/polarimeter | 22af7325c9e61f3d75cb0757776c501e5116eb36 | [
"MIT"
] | null | null | null | polarimeter/test_polarimeter.py | malgorzatakim/polarimeter | 22af7325c9e61f3d75cb0757776c501e5116eb36 | [
"MIT"
] | null | null | null | from __future__ import division
import unittest
from polarimeter import Polarimeter
from data_acquirers import SimulatedDataAcquirer
class Test(unittest.TestCase):
"""Tests for polarimeter.py"""
def test_measure(self):
"""Test p.measure() with SimulatedDataAcquirer"""
phase_difference = 14
... | 34.294118 | 105 | 0.697256 |
4a1bea446c1bbe1072fad37e338cb525d049e74a | 9,698 | py | Python | pymanip/nisyscfg/_lib/types.py | lcarde/pymanip | d6f0b90b678d6f508d86d2d3ba3b580615c9566f | [
"CECILL-B"
] | null | null | null | pymanip/nisyscfg/_lib/types.py | lcarde/pymanip | d6f0b90b678d6f508d86d2d3ba3b580615c9566f | [
"CECILL-B"
] | 1 | 2019-05-28T17:59:34.000Z | 2019-05-28T17:59:34.000Z | pymanip/nisyscfg/_lib/types.py | lcarde/pymanip | d6f0b90b678d6f508d86d2d3ba3b580615c9566f | [
"CECILL-B"
] | 5 | 2019-01-28T14:18:17.000Z | 2022-03-31T16:12:03.000Z | """
Types used by NI System Configuration
"""
import ctypes
from pymanip.nisyscfg._lib.constants import NISysCfgResourceProperty as rp
from pymanip.nisyscfg._lib.constants import NISYSCFG_SIMPLE_STRING_LENGTH
NISysCfgEnumExpertHandle = ctypes.c_void_p
NISysCfgSessionHandle = ctypes.c_void_p
NISysCfgBool = ctypes.c_... | 34.147887 | 86 | 0.661786 |
4a1beb07214c3f855f79b3561d3826168a479003 | 4,347 | py | Python | Backend/ecommerc/ecommerc/settings.py | MrSolimanKing/ImageHashSimilarity | c0a47ef2c1389ce05a2c3cea183d48c63b08c255 | [
"MIT"
] | 1 | 2022-01-02T06:55:07.000Z | 2022-01-02T06:55:07.000Z | Backend/ecommerc/ecommerc/settings.py | MrSolimanKing/ImageHashSimilarity | c0a47ef2c1389ce05a2c3cea183d48c63b08c255 | [
"MIT"
] | null | null | null | Backend/ecommerc/ecommerc/settings.py | MrSolimanKing/ImageHashSimilarity | c0a47ef2c1389ce05a2c3cea183d48c63b08c255 | [
"MIT"
] | null | null | null | """
Django settings for ecommerc project.
Generated by 'django-admin startproject' using Django 3.2.9.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
... | 25.875 | 92 | 0.669657 |
4a1bebb483684ea435bf65f91ea07ca8dc5eea25 | 6,802 | py | Python | examples/peering_mesh.py | cohesive/python-cohesivenet-sdk | 5620acfa669ff97c94d9aa04a16facda37d648c1 | [
"MIT"
] | null | null | null | examples/peering_mesh.py | cohesive/python-cohesivenet-sdk | 5620acfa669ff97c94d9aa04a16facda37d648c1 | [
"MIT"
] | null | null | null | examples/peering_mesh.py | cohesive/python-cohesivenet-sdk | 5620acfa669ff97c94d9aa04a16facda37d648c1 | [
"MIT"
] | null | null | null | import os
from datetime import datetime
from cohesivenet import Logger
from cohesivenet.macros import connect, config, admin, peering, routing, state
Logger.silence_urllib3()
Logger.set_stream_handler(os.getenv("COHESIVE_LOG_LEVEL", "info").lower())
TOPOLOGY = "VNS3 Peering Mesh Example"
def print_log(message, lev... | 34.527919 | 124 | 0.677595 |
4a1bebd6e8926e48e7217a0d9cd4272b6612a561 | 76 | py | Python | elasticsearch_forwarder/modules/module.py | guillermomolina/elasticsearch-forwarder | c1446e2e6d047ac80e0948ee7b949bd467269d1e | [
"Apache-2.0"
] | null | null | null | elasticsearch_forwarder/modules/module.py | guillermomolina/elasticsearch-forwarder | c1446e2e6d047ac80e0948ee7b949bd467269d1e | [
"Apache-2.0"
] | null | null | null | elasticsearch_forwarder/modules/module.py | guillermomolina/elasticsearch-forwarder | c1446e2e6d047ac80e0948ee7b949bd467269d1e | [
"Apache-2.0"
] | null | null | null | class Module:
def __init__(self, config):
self.config = config
| 15.2 | 31 | 0.631579 |
4a1becb16ef1adb94a3c0cdf7fec042b62c82404 | 379 | py | Python | modules/ui/qt.py | kkerwin1/everscan | 413012ceee22be1580fcf552fbb25def0aed32f0 | [
"BSD-2-Clause"
] | null | null | null | modules/ui/qt.py | kkerwin1/everscan | 413012ceee22be1580fcf552fbb25def0aed32f0 | [
"BSD-2-Clause"
] | null | null | null | modules/ui/qt.py | kkerwin1/everscan | 413012ceee22be1580fcf552fbb25def0aed32f0 | [
"BSD-2-Clause"
] | null | null | null | # everscan/modules/ui/qt.py
from modules.ui.uiErrors import UIInitializeError
class QtUiManager:
"""
Facilitates communication between parent and child modules.
"""
def __init__(self, manager):
self.m_manager = manager
# Qt UI is not yet implemented.
# Qt UI will be t... | 27.071429 | 63 | 0.667546 |
4a1bed0a194a5e9c6c24444c910b5d5ce77fe0fe | 1,389 | py | Python | flask/tests/test_upload.py | imsardine/learning | 925841ddd93d60c740a62e12d9f57ef15b6e0a20 | [
"MIT"
] | null | null | null | flask/tests/test_upload.py | imsardine/learning | 925841ddd93d60c740a62e12d9f57ef15b6e0a20 | [
"MIT"
] | null | null | null | flask/tests/test_upload.py | imsardine/learning | 925841ddd93d60c740a62e12d9f57ef15b6e0a20 | [
"MIT"
] | null | null | null | import requests
import base64
def test_upload(workspace, testdata):
workspace.src('upload.py', r"""
import base64
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/', methods=['POST'])
def upload():
files = []
for name in request.files:
f... | 32.302326 | 97 | 0.573794 |
4a1bee225ecc06b62f68b37c288355483224f097 | 559 | py | Python | src/main/controllers/launcher.py | cauwt/CarDataCrawler | 15d0896d29fb059b0d5a9b9a4e6f5de87092242c | [
"Apache-2.0"
] | 1 | 2018-11-06T03:15:22.000Z | 2018-11-06T03:15:22.000Z | src/main/controllers/launcher.py | cauwt/CarDataCrawler | 15d0896d29fb059b0d5a9b9a4e6f5de87092242c | [
"Apache-2.0"
] | null | null | null | src/main/controllers/launcher.py | cauwt/CarDataCrawler | 15d0896d29fb059b0d5a9b9a4e6f5de87092242c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------------------------------------------------
# file: launcher
# author: eva
# date: 2018/1/8
# version:
# description:
# ----------------------------------------------------------------------------... | 27.95 | 120 | 0.384615 |
4a1bee3b6fc609efa0f26b4f0cf26a68827dae06 | 4,033 | py | Python | DetectionHub/engine/inference.py | Miracle1991/DetectionHub | 09e111fcd05b0f021c98256f1c4678216c841f70 | [
"MIT"
] | 2 | 2020-05-19T08:04:25.000Z | 2020-05-19T08:04:34.000Z | DetectionHub/engine/inference.py | Miracle1991/DetectionHub | 09e111fcd05b0f021c98256f1c4678216c841f70 | [
"MIT"
] | null | null | null | DetectionHub/engine/inference.py | Miracle1991/DetectionHub | 09e111fcd05b0f021c98256f1c4678216c841f70 | [
"MIT"
] | 1 | 2020-06-13T12:33:08.000Z | 2020-06-13T12:33:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import logging
import time
import os
import torch
from tqdm import tqdm
from DetectionHub.config import cfg
from DetectionHub.data.datasets.evaluation import evaluate
from ..utils.comm import is_main_process, get_world_size
from ..utils.comm impo... | 33.330579 | 96 | 0.65212 |
4a1bee5e42e080d684ffeb3232b8c5b8ee26beeb | 1,735 | py | Python | testing.py | miskimit/pyScript | 89139615f95c86178cfdb072945942de3be405b7 | [
"MIT"
] | null | null | null | testing.py | miskimit/pyScript | 89139615f95c86178cfdb072945942de3be405b7 | [
"MIT"
] | null | null | null | testing.py | miskimit/pyScript | 89139615f95c86178cfdb072945942de3be405b7 | [
"MIT"
] | null | null | null | """ import cv2
image1 = cv2.imread("C:/Users/faruk/Pictures/pp.jpg")
image2 = cv2.imread("C:/Users/faruk/Pictures/gris.jpeg")
savepath = "C:/Users/faruk/Desktop/pyScript/testing.jpg"
pt1 = (20, 40)
pt2 = (190, 400)
color = (145, 22, 65)
#result = cv2.arrowedLine(image1, pt1, pt2, color, 3)
#result = cv2.circle(image... | 27.983871 | 65 | 0.663401 |
4a1bef4a60e5f9957aab8fde016693c669cb6294 | 1,978 | py | Python | enable_testing.py | ck0t0/SpotifyAPI | 1e6a646408a7fbc65106448fad9f7dafa533281b | [
"MIT"
] | null | null | null | enable_testing.py | ck0t0/SpotifyAPI | 1e6a646408a7fbc65106448fad9f7dafa533281b | [
"MIT"
] | null | null | null | enable_testing.py | ck0t0/SpotifyAPI | 1e6a646408a7fbc65106448fad9f7dafa533281b | [
"MIT"
] | null | null | null | import sys, os, re
use_test = sys.argv[1].lower()
project_directory = os.getcwd()
# ensure the working directory is the SpotifyAPI package
package_file = os.path.join(project_directory, "Package.swift")
if not os.path.exists(package_file):
print(
"Expected to find Package.swift file in the working direct... | 29.969697 | 79 | 0.686047 |
4a1bf00d742d8f15247f250cfb91f358720b13b5 | 2,289 | py | Python | djpagan/core/tests/test_sql.py | carthage-college/django-djpagan | bdc6f07e6822fb982b96fd68ea6b69d897b29b09 | [
"MIT"
] | null | null | null | djpagan/core/tests/test_sql.py | carthage-college/django-djpagan | bdc6f07e6822fb982b96fd68ea6b69d897b29b09 | [
"MIT"
] | 8 | 2020-06-05T19:15:10.000Z | 2021-11-30T19:32:09.000Z | djpagan/core/tests/test_sql.py | carthage-college/django-djpagan | bdc6f07e6822fb982b96fd68ea6b69d897b29b09 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.test import TestCase
from django_webtest import WebTest
from django.contrib.auth.models import User
from django.contrib.auth.models import Group
from django.core.urlresolvers import reverse
from djpagan.core.sql import ACCOUNT_NOTES
from djpagan.core.sql import PROGRAM_ENRO... | 24.094737 | 58 | 0.633028 |
4a1bf06d3aa964f035de80374898afb2a775d139 | 12,168 | py | Python | tests/cli/k8s/test_k8s.py | yourmoonlight/maro | 4fbe556f3ae1817995f90cb529e9ca6191f67d7f | [
"MIT"
] | 1 | 2021-01-13T06:41:51.000Z | 2021-01-13T06:41:51.000Z | tests/cli/k8s/test_k8s.py | chaosddp/maro | 3d6715649467d49a83886c1fd4ae9b41ff012a50 | [
"MIT"
] | null | null | null | tests/cli/k8s/test_k8s.py | chaosddp/maro | 3d6715649467d49a83886c1fd4ae9b41ff012a50 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import ast
import json
import logging
import os
import platform
import shutil
import time
import unittest
import uuid
import yaml
from maro.cli.utils.executors.azure_executor import AzureExecutor
from maro.cli.utils.params import GlobalParams,... | 40.291391 | 120 | 0.651216 |
4a1bf1dac3ea8c835e7f5ba61396f2eadfc5445b | 14,924 | py | Python | docs/organizations/backends/defaults.py | lozpdata/ORGI | bfc22331484d371aa812387951096393eb19919d | [
"BSD-2-Clause"
] | null | null | null | docs/organizations/backends/defaults.py | lozpdata/ORGI | bfc22331484d371aa812387951096393eb19919d | [
"BSD-2-Clause"
] | null | null | null | docs/organizations/backends/defaults.py | lozpdata/ORGI | bfc22331484d371aa812387951096393eb19919d | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2012-2019, Ben Lopatin and contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright ... | 38.763636 | 91 | 0.644867 |
4a1bf24fc43bf917a2ec4eec51e5db72039c44e7 | 668 | py | Python | apps/comics/migrations/0024_auto_20190623_1826.py | pennomi/comics | 1ec4a8a28a7ab8fe6590b9c95ca240e83b1f4186 | [
"MIT"
] | 50 | 2018-09-14T20:43:07.000Z | 2022-02-02T03:16:12.000Z | apps/comics/migrations/0024_auto_20190623_1826.py | pennomi/comics | 1ec4a8a28a7ab8fe6590b9c95ca240e83b1f4186 | [
"MIT"
] | null | null | null | apps/comics/migrations/0024_auto_20190623_1826.py | pennomi/comics | 1ec4a8a28a7ab8fe6590b9c95ca240e83b1f4186 | [
"MIT"
] | 7 | 2018-10-16T19:22:55.000Z | 2022-01-05T02:01:44.000Z | # Generated by Django 2.2.2 on 2019-06-23 18:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comics', '0023_auto_20190507_1527'),
]
operations = [
migrations.AddField(
model_name='comic',
name='adsense_ad_slot... | 27.833333 | 109 | 0.618263 |
4a1bf41432d5fdbc0f770d2964805239fee659ff | 8,682 | py | Python | embeddings/CBOW/code_draft.py | Ashafix/NLP | ce8e3f1499a90c05730db9041633b24b1272d8c6 | [
"MIT"
] | 103 | 2018-12-21T03:45:37.000Z | 2022-02-21T04:43:13.000Z | embeddings/CBOW/code_draft.py | Ashafix/NLP | ce8e3f1499a90c05730db9041633b24b1272d8c6 | [
"MIT"
] | 5 | 2019-04-16T12:31:30.000Z | 2020-04-14T15:11:13.000Z | embeddings/CBOW/code_draft.py | Ashafix/NLP | ce8e3f1499a90c05730db9041633b24b1272d8c6 | [
"MIT"
] | 57 | 2019-01-25T04:56:16.000Z | 2022-01-18T04:55:15.000Z | import tensorflow as tf
import numpy as np
from collections import Counter
import random
import utils
from os.path import isfile, isdir
from tqdm import tqdm
from urllib.request import urlretrieve
import zipfile
import time
flags = tf.app.flags
flags.DEFINE_integer('window_size', 5, 'window size')
flags.DEFINE_integer... | 38.415929 | 110 | 0.641672 |
4a1bf44d65511a554f23f8dc0afd6270b17d14d1 | 5,343 | py | Python | tests/test_core/test_repo_manager.py | insolite/mergeit | 27ca0eacab9b1d2fe6bafe5a43184a80e6169cb5 | [
"MIT"
] | 2 | 2016-07-04T13:32:30.000Z | 2016-07-16T02:51:54.000Z | tests/test_core/test_repo_manager.py | insolite/mergeit | 27ca0eacab9b1d2fe6bafe5a43184a80e6169cb5 | [
"MIT"
] | 1 | 2016-08-06T12:47:28.000Z | 2016-08-06T12:47:28.000Z | tests/test_core/test_repo_manager.py | insolite/mergeit | 27ca0eacab9b1d2fe6bafe5a43184a80e6169cb5 | [
"MIT"
] | null | null | null | import os.path
import shutil
from unittest.mock import MagicMock, ANY, patch
from git import Repo
from mergeit.core import repo_manager
from mergeit.core.push_handler import DEFAULT_REMOTE
from mergeit.core.repo_manager import RepoManager
from tests.common import MergeitTest
REPO_NAME = 'test_repo'
WORKSPACE = 'fix... | 34.470968 | 95 | 0.671159 |
4a1bf4c8ef42ffa3a314fed786407f9a4db03f66 | 998 | py | Python | discovery-infra/tests/conftest.py | rollandf/assisted-test-infra | f2d3411ceb0838f3045e4ad88f2686bed516cf8f | [
"Apache-2.0"
] | 27 | 2020-06-26T13:38:14.000Z | 2022-03-13T11:06:34.000Z | discovery-infra/tests/conftest.py | cdvultur/assisted-test-infra | a3deeeac975c9be087c7177827d991d1680b720a | [
"Apache-2.0"
] | 1,559 | 2020-06-27T15:36:37.000Z | 2022-03-31T22:58:50.000Z | discovery-infra/tests/conftest.py | rollandf/assisted-test-infra | f2d3411ceb0838f3045e4ad88f2686bed516cf8f | [
"Apache-2.0"
] | 83 | 2020-06-26T09:24:43.000Z | 2022-03-08T23:19:59.000Z | import logging
from typing import List
import pytest
from _pytest.nodes import Item
from test_infra import utils
from tests.config import global_variables
@pytest.fixture(scope="session")
def api_client():
logging.info('--- SETUP --- api_client\n')
yield global_variables.get_api_client()
def get_available_... | 29.352941 | 112 | 0.757515 |
4a1bf4c902856b63152853ff2f14c13286778d00 | 1,944 | py | Python | server.py | MxFxM/PongGamePythonMqtt | 4dd733b7b997a60f2a82a39f2a9143168a9c6ffb | [
"MIT"
] | null | null | null | server.py | MxFxM/PongGamePythonMqtt | 4dd733b7b997a60f2a82a39f2a9143168a9c6ffb | [
"MIT"
] | null | null | null | server.py | MxFxM/PongGamePythonMqtt | 4dd733b7b997a60f2a82a39f2a9143168a9c6ffb | [
"MIT"
] | null | null | null | import paho.mqtt.client as mqtt
import paho.mqtt.publish as publish
BROKER_IP = "192.168.178.61" # this is my local mqtt broker
BROKER_PORT = 1883 # standard mqtt broker port
BROKER_TOPIC = "Games/Pong"
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, user... | 36 | 117 | 0.669239 |
4a1bf4cfdcd3a98faac19deb3c833ca9e51d6f66 | 19,702 | py | Python | setuptools/tests/test_config.py | AntyMew/setuptools | 8d8ff9cf07118ffb2bf376261b98fc333086b7ea | [
"MIT"
] | null | null | null | setuptools/tests/test_config.py | AntyMew/setuptools | 8d8ff9cf07118ffb2bf376261b98fc333086b7ea | [
"MIT"
] | null | null | null | setuptools/tests/test_config.py | AntyMew/setuptools | 8d8ff9cf07118ffb2bf376261b98fc333086b7ea | [
"MIT"
] | null | null | null | import contextlib
import pytest
from distutils.errors import DistutilsOptionError, DistutilsFileError
from setuptools.dist import Distribution
from setuptools.config import ConfigHandler, read_configuration
class ErrConfigHandler(ConfigHandler):
"""Erroneous handler. Fails to implement required methods."""
def ... | 31.931929 | 78 | 0.505735 |
4a1bf53fd5eab05a8253a08b420f61c373a76f78 | 1,288 | py | Python | qiita_db/handlers/tests/test_util.py | smruthi98/qiita | 8514d316670919e074a927226f985b56dba815f6 | [
"BSD-3-Clause"
] | 96 | 2015-01-10T23:40:03.000Z | 2021-01-04T09:07:16.000Z | qiita_db/handlers/tests/test_util.py | smruthi98/qiita | 8514d316670919e074a927226f985b56dba815f6 | [
"BSD-3-Clause"
] | 2,304 | 2015-01-01T17:46:14.000Z | 2021-01-07T02:38:52.000Z | qiita_db/handlers/tests/test_util.py | smruthi98/qiita | 8514d316670919e074a927226f985b56dba815f6 | [
"BSD-3-Clause"
] | 68 | 2015-02-18T21:42:31.000Z | 2020-12-01T19:08:57.000Z | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 31.414634 | 79 | 0.592391 |
4a1bf57a4d6ee36d72ad918eba285cf35f1c80bf | 889 | py | Python | pandagg/node/query/_parameter_clause.py | alk-lbinet/pandagg | 542350f84ca4497ab4a5f01b054aff2385f6827e | [
"Apache-2.0"
] | null | null | null | pandagg/node/query/_parameter_clause.py | alk-lbinet/pandagg | 542350f84ca4497ab4a5f01b054aff2385f6827e | [
"Apache-2.0"
] | null | null | null | pandagg/node/query/_parameter_clause.py | alk-lbinet/pandagg | 542350f84ca4497ab4a5f01b054aff2385f6827e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pandagg.node.query.abstract import ParentParameterClause
class Filter(ParentParameterClause):
KEY = "filter"
MULTIPLE = True
class Must(ParentParameterClause):
KEY = "must"
MULTIPLE = True
class MustNot(ParentParameterClause):
KEY = "must_not... | 17.431373 | 63 | 0.695163 |
4a1bf5ff141e49f5e0f6240afef2613705243299 | 1,822 | py | Python | DQN-tensorflow/config.py | donghaiwang/AI | fec21197c0f09cbed07742e974b5b9266c7525e2 | [
"MIT"
] | 17 | 2018-08-18T06:01:35.000Z | 2021-04-01T06:30:26.000Z | DQN-tensorflow/config.py | donghaiwang/AI | fec21197c0f09cbed07742e974b5b9266c7525e2 | [
"MIT"
] | 2 | 2019-07-30T07:00:23.000Z | 2019-07-30T13:06:50.000Z | DQN-tensorflow/config.py | donghaiwang/AI | fec21197c0f09cbed07742e974b5b9266c7525e2 | [
"MIT"
] | 5 | 2018-08-18T07:08:15.000Z | 2021-05-27T12:00:05.000Z | # 智能体的配置文件
class AgentConfig(object):
scale = 10000
display = False # 是否显示游戏画面
max_step = 5000 * scale
memory_size = 60 * scale # 内存大小(原来是:100*scale)
batch_size = 32
random_start = 30 # 0-29个游戏(随机选择)
cnn_format = 'NCHW' # GPU的输入图片格式
discount =... | 25.305556 | 78 | 0.613611 |
4a1bf61f83cd721b552fba840b0996d47935ccee | 9,508 | py | Python | texar/baseline_seq2seq_attn_ot.py | venescu/OT-Seq2Seq | 04eb796aaca0940b965abc94169fc6f2c21f7d11 | [
"MIT"
] | null | null | null | texar/baseline_seq2seq_attn_ot.py | venescu/OT-Seq2Seq | 04eb796aaca0940b965abc94169fc6f2c21f7d11 | [
"MIT"
] | null | null | null | texar/baseline_seq2seq_attn_ot.py | venescu/OT-Seq2Seq | 04eb796aaca0940b965abc94169fc6f2c21f7d11 | [
"MIT"
] | null | null | null | # Copyright 2018 The Texar Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 36.429119 | 80 | 0.619689 |
4a1bf64bcdc900ed5e1a95acc8348668e9e3081c | 296 | py | Python | create_config_file/hosts.py | fujiawei-dev/tookit-py | 5ab3a18a41885f6166150cc27183621b96f8f991 | [
"BSD-3-Clause"
] | null | null | null | create_config_file/hosts.py | fujiawei-dev/tookit-py | 5ab3a18a41885f6166150cc27183621b96f8f991 | [
"BSD-3-Clause"
] | null | null | null | create_config_file/hosts.py | fujiawei-dev/tookit-py | 5ab3a18a41885f6166150cc27183621b96f8f991 | [
"BSD-3-Clause"
] | null | null | null | """
Date: 2022.02.03 12:21
Description: Omit
LastEditors: Rustle Karl
LastEditTime: 2022.02.03 12:21
"""
from .common import is_windows, writer
def hosts():
if is_windows():
conf = "C:\\Windows\\System32\\drivers\\etc\\hosts"
else:
conf = "/etc/hosts"
writer(conf)
| 17.411765 | 59 | 0.638514 |
4a1bf672f30aa0363a7ab95ba9b95115f87e51af | 4,327 | py | Python | contrib/seeds/generate-seeds.py | PIVXLITE/PivxLite | 838000d7284190b17ad58742d321769ef8d7e0e8 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | PIVXLITE/PivxLite | 838000d7284190b17ad58742d321769ef8d7e0e8 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | PIVXLITE/PivxLite | 838000d7284190b17ad58742d321769ef8d7e0e8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | 31.355072 | 98 | 0.581465 |
4a1bf6ad0a81b87b3017c0052c25496b864e6ca4 | 710 | py | Python | src/atcoder/dp/n/sol_4.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 1 | 2021-07-11T03:20:10.000Z | 2021-07-11T03:20:10.000Z | src/atcoder/dp/n/sol_4.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | 39 | 2021-07-10T05:21:09.000Z | 2021-12-15T06:10:12.000Z | src/atcoder/dp/n/sol_4.py | kagemeka/competitive-programming | c70fe481bcd518f507b885fc9234691d8ce63171 | [
"MIT"
] | null | null | null | import typing
import sys
import numpy as np
import numba as nb
@nb.njit(
(nb.i8, nb.i8[:]),
cache=True,
)
def solve(
n: int,
a: np.array,
) -> typing.NoReturn:
dp = np.zeros(
(n + 1, n + 1),
dtype=np.int64,
)
s = np.zeros(n + 1, np.int64)
s[1:] = a
s = s.cumsum()
for w in range(2, n + 1... | 14.489796 | 31 | 0.456338 |
4a1bf71c67244c0379af6061c0a2b0f7b18c28e4 | 1,725 | py | Python | allauthdemo/auth/admin.py | amangupta712/demo-allauth-bootstrap | e43d1a7094f382753840cb1cb639b3f86b5bfd7c | [
"MIT"
] | null | null | null | allauthdemo/auth/admin.py | amangupta712/demo-allauth-bootstrap | e43d1a7094f382753840cb1cb639b3f86b5bfd7c | [
"MIT"
] | null | null | null | allauthdemo/auth/admin.py | amangupta712/demo-allauth-bootstrap | e43d1a7094f382753840cb1cb639b3f86b5bfd7c | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as DjangoUserAdmin
from django.utils.translation import ugettext_lazy as _
from .models import User, UserProfile
from .forms import UserAdminForm
class UserProfileAdmin(admin.ModelAdmin):
search_fields = ('user', 'dob')
orderin... | 28.278689 | 91 | 0.629565 |
4a1bf7897ebe0091ae32f7249d8b9a89deccfafb | 33,906 | py | Python | Thesis@3.9.1/Lib/site-packages/wrapt/wrappers.py | nverbois/TFE21-232 | 7113837b5263b5c508bfc6903cb6982b48aa7ee4 | [
"MIT"
] | null | null | null | Thesis@3.9.1/Lib/site-packages/wrapt/wrappers.py | nverbois/TFE21-232 | 7113837b5263b5c508bfc6903cb6982b48aa7ee4 | [
"MIT"
] | null | null | null | Thesis@3.9.1/Lib/site-packages/wrapt/wrappers.py | nverbois/TFE21-232 | 7113837b5263b5c508bfc6903cb6982b48aa7ee4 | [
"MIT"
] | null | null | null | import os
import sys
import functools
import operator
import weakref
import inspect
PY2 = sys.version_info[0] == 2
if PY2:
string_types = (basestring,)
else:
string_types = (str,)
def with_metaclass(meta, *bases):
"""Create a base class with a metaclass."""
return meta("NewBase", bases, {})
class ... | 34.110664 | 87 | 0.646523 |
4a1bf7e6dc7d82bcc9f22151c0512bcd1e4475e6 | 2,555 | py | Python | python/crc/crc32.py | kpadron/codec | f0a7346a6087240e52d71f81c0d1797d2cdeb471 | [
"MIT"
] | null | null | null | python/crc/crc32.py | kpadron/codec | f0a7346a6087240e52d71f81c0d1797d2cdeb471 | [
"MIT"
] | null | null | null | python/crc/crc32.py | kpadron/codec | f0a7346a6087240e52d71f81c0d1797d2cdeb471 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
CRC32_POLYNOMIAL = 0xEDB88320
CRC32C_POLYNOMIAL = 0x82F63B78
class CrcTable:
"""CRC lookup table that utilizes memoization.
"""
def __init__(self, polynomial: int = CRC32_POLYNOMIAL):
"""Initialize a CrcTable instance with the specified CRC polynomial.
"""
se... | 26.340206 | 79 | 0.635616 |
4a1bf912434c869a3d7f003c52e132f97b3cf8f3 | 41 | py | Python | SL-GCN/graph/__init__.py | SnorlaxSE/CVPR21Chal-SLR | 680f911131ca03559fb06d578f38d006f87aa478 | [
"CC0-1.0"
] | 85 | 2021-03-17T06:17:01.000Z | 2022-03-30T12:52:37.000Z | SL-GCN/graph/__init__.py | SnorlaxSE/CVPR21Chal-SLR | 680f911131ca03559fb06d578f38d006f87aa478 | [
"CC0-1.0"
] | 21 | 2021-03-21T18:41:27.000Z | 2022-03-24T08:16:47.000Z | SL-GCN/graph/__init__.py | SnorlaxSE/CVPR21Chal-SLR | 680f911131ca03559fb06d578f38d006f87aa478 | [
"CC0-1.0"
] | 28 | 2021-03-20T09:04:47.000Z | 2022-03-15T02:29:06.000Z | from . import tools
from . import sign_27 | 20.5 | 21 | 0.780488 |
4a1bf950e6ddbaf9b03c226eaca1393bf58e028a | 720 | py | Python | emo/dishes/models.py | EasyMealOrder/backEnd | 3b7b2def08784a8aae863c941dc3cd0706a85b5d | [
"MIT"
] | null | null | null | emo/dishes/models.py | EasyMealOrder/backEnd | 3b7b2def08784a8aae863c941dc3cd0706a85b5d | [
"MIT"
] | 4 | 2018-06-20T08:10:35.000Z | 2018-06-23T05:18:02.000Z | emo/dishes/models.py | EasyMealOrder/backEnd | 3b7b2def08784a8aae863c941dc3cd0706a85b5d | [
"MIT"
] | null | null | null | # coding:utf-8
from django.db import models
# Create your models here.
# The category of dishes
class Category(models.Model):
dtype = models.CharField('类型',max_length = 256,primary_key=True)
def __str__(self):
return self.dtype
#一道菜的详情
class Dishes(models.Model):
name = models.CharField(... | 26.666667 | 77 | 0.677778 |
4a1bf9d02d86498aac8fd6b706ecbc5b43754eaa | 1,214 | py | Python | art_app/forms.py | kyeugh/cop4710-artsite | 78576b4853bc2571fd560816dadbc8db5a6ae2bb | [
"MIT"
] | null | null | null | art_app/forms.py | kyeugh/cop4710-artsite | 78576b4853bc2571fd560816dadbc8db5a6ae2bb | [
"MIT"
] | null | null | null | art_app/forms.py | kyeugh/cop4710-artsite | 78576b4853bc2571fd560816dadbc8db5a6ae2bb | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import UserCreationForm
from .models import Artwork, Artist, Collection
class RegistrationForm(UserCreationForm):
pronouns = forms.ChoiceField(
choices=(
(1, "they/them"),
(2, "h... | 24.77551 | 77 | 0.594728 |
4a1bfa78a47514f2bf7149fe34e086bb73f9443b | 172 | py | Python | pushpull/websocket/auth.py | elastic-coders/pushpull | 83c652d2d265481001e318cf58ba7a5d5391c57c | [
"MIT"
] | 3 | 2018-04-18T15:15:02.000Z | 2019-07-04T09:47:50.000Z | pushpull/websocket/auth.py | elastic-coders/pushpull | 83c652d2d265481001e318cf58ba7a5d5391c57c | [
"MIT"
] | 10 | 2016-07-24T20:55:53.000Z | 2017-10-05T08:05:41.000Z | pushpull/websocket/auth.py | elastic-coders/pushpull | 83c652d2d265481001e318cf58ba7a5d5391c57c | [
"MIT"
] | 3 | 2017-02-17T03:06:10.000Z | 2021-02-09T10:03:49.000Z | def encode_auth_querystring_param(token):
return {'http-authorization': token}
def decode_auth_querystring_param(params):
return params.get('http-authorization')
| 24.571429 | 43 | 0.784884 |
4a1bfa92a2b682e4237c4765a27282a1f5e1d276 | 428 | py | Python | examples/bokeh/bokeh_plot_pair_point_estimate.py | zaxtax/arviz | c78deefeeb355d3cee11a93fc148f9198dde8b35 | [
"Apache-2.0"
] | 1,159 | 2018-04-03T08:50:54.000Z | 2022-03-31T18:03:52.000Z | examples/bokeh/bokeh_plot_pair_point_estimate.py | zaxtax/arviz | c78deefeeb355d3cee11a93fc148f9198dde8b35 | [
"Apache-2.0"
] | 1,656 | 2018-03-23T14:15:05.000Z | 2022-03-31T14:00:28.000Z | examples/bokeh/bokeh_plot_pair_point_estimate.py | zaxtax/arviz | c78deefeeb355d3cee11a93fc148f9198dde8b35 | [
"Apache-2.0"
] | 316 | 2018-04-03T14:25:52.000Z | 2022-03-25T10:41:29.000Z | """
Point Estimate Pairplot
=======================
_thumb: .2, .5
"""
import arviz as az
centered = az.load_arviz_data("centered_eight")
coords = {"school": ["Choate", "Deerfield"]}
ax = az.plot_pair(
centered,
var_names=["mu", "theta"],
kind=["scatter", "kde"],
kde_kwargs={"fill_last": False},
... | 18.608696 | 47 | 0.588785 |
4a1bfa9376a9af2af9f4f2608eb7cfcfb6a6b1b0 | 54,575 | py | Python | tensorflow/retrain.py | VanAndelInstitute/pipelines | cdef81497c1282ae72f4fecd46295d4f4a8e8653 | [
"MIT"
] | 39 | 2018-03-26T09:32:25.000Z | 2020-02-28T06:32:34.000Z | tensorflow/retrain.py | VanAndelInstitute/pipelines | cdef81497c1282ae72f4fecd46295d4f4a8e8653 | [
"MIT"
] | 3 | 2018-11-16T18:07:31.000Z | 2020-03-04T05:42:08.000Z | tensorflow/retrain.py | VanAndelInstitute/pipelines | cdef81497c1282ae72f4fecd46295d4f4a8e8653 | [
"MIT"
] | 9 | 2018-07-13T14:24:02.000Z | 2020-01-25T14:40:32.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.126601 | 110 | 0.695355 |
4a1bfaf3ea930dd40de53cacfa3ebf55f0013b4e | 224 | py | Python | tests/test_version.py | Orange-OpenSource/python-onapsdk | 5b2dad4739b534b9a7159802c18cf486053b9353 | [
"Apache-2.0"
] | 4 | 2020-06-13T04:51:27.000Z | 2021-01-06T15:00:51.000Z | tests/test_version.py | Orange-OpenSource/python-onapsdk | 5b2dad4739b534b9a7159802c18cf486053b9353 | [
"Apache-2.0"
] | 5 | 2019-11-26T16:15:15.000Z | 2021-04-08T08:03:18.000Z | tests/test_version.py | Orange-OpenSource/python-onapsdk | 5b2dad4739b534b9a7159802c18cf486053b9353 | [
"Apache-2.0"
] | 8 | 2020-08-28T10:56:02.000Z | 2022-02-11T17:06:03.000Z | #!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
"""Test version module."""
import onapsdk.version as version
def test_version():
"""Check version is the right one."""
assert version.__version__ == '9.0.0'
| 22.4 | 39 | 0.705357 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.