hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
05ea4177798cd1f28026aeb414ef628dc34b88e5 | 1,112 | py | Python | string_session.py | jefanya14/Bot | 2166a9cce2a595dd4dbe08f09c036c3757c1f25b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-11-28T16:04:59.000Z | 2021-11-28T16:04:59.000Z | string_session.py | jefanya14/Bot | 2166a9cce2a595dd4dbe08f09c036c3757c1f25b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 5 | 2021-11-28T21:14:32.000Z | 2021-11-29T09:20:22.000Z | string_session.py | jefanya14/Bot | 2166a9cce2a595dd4dbe08f09c036c3757c1f25b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-11-29T05:25:48.000Z | 2021-11-29T05:25:48.000Z | #!/usr/bin/env python3
# (c) https://t.me/TelethonChat/37677 and SpEcHiDe
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
from telethon.sessions import StringSession
from telethon.sync import TelegramClient
print("""... | 35.870968 | 78 | 0.751799 |
931dacfd2b4091d1a665f9f924f6370a03a61e62 | 13,015 | py | Python | ckan/logic/auth/get.py | salsadigitalauorg/ckan | 7586d78682c30f205027522214f33ee2bf413055 | [
"BSD-3-Clause"
] | null | null | null | ckan/logic/auth/get.py | salsadigitalauorg/ckan | 7586d78682c30f205027522214f33ee2bf413055 | [
"BSD-3-Clause"
] | null | null | null | ckan/logic/auth/get.py | salsadigitalauorg/ckan | 7586d78682c30f205027522214f33ee2bf413055 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
import ckan.logic as logic
import ckan.authz as authz
from ckan.common import _, config
from ckan.logic.auth import (get_package_object, get_group_object,
get_resource_object,
restrict_anon)
from ckan.lib.plugins import get_permission_labels
f... | 33.805195 | 111 | 0.695198 |
bfcbb8d9067a55f7143a875ffaa8444294c2f527 | 59,535 | py | Python | pirates/economy/TattooStoreGUI.py | ksmit799/POTCO-PS | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 8 | 2017-01-24T04:33:29.000Z | 2020-11-01T08:36:24.000Z | pirates/economy/TattooStoreGUI.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 1 | 2017-03-02T18:05:17.000Z | 2017-03-14T06:47:10.000Z | pirates/economy/TattooStoreGUI.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 11 | 2017-03-02T18:46:07.000Z | 2020-11-01T08:36:26.000Z | from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.gui.DirectGui import *
from panda3d.core import *
from pirates.piratesgui import PiratesGuiGlobals
from pirates.piratesgui import GuiPanel, RedeemCodeGUI
from pirates.piratesgui import GuiButton, DialogButton
from pirates.piratesbase import Pir... | 46.008501 | 1,110 | 0.599698 |
fb78d900e42ae2aa1d72de47c96fdd7792490648 | 137 | py | Python | src/highdicom/sc/__init__.py | pieper/highdicom | 4e299f99c9a94eb72006dd21909f7e8c22eb766e | [
"MIT"
] | null | null | null | src/highdicom/sc/__init__.py | pieper/highdicom | 4e299f99c9a94eb72006dd21909f7e8c22eb766e | [
"MIT"
] | null | null | null | src/highdicom/sc/__init__.py | pieper/highdicom | 4e299f99c9a94eb72006dd21909f7e8c22eb766e | [
"MIT"
] | null | null | null | """Package for creation of Secondary Capture (SC) Image instances."""
SOP_CLASS_UIDS = {
'1.2.840.10008.5.1.4.1.1.7', # SC Image
}
| 22.833333 | 69 | 0.649635 |
0c1b791c4160a723a10492e0ed341827424d9f9d | 5,866 | py | Python | setup.py | Archmonger/idom | b036f037578f7844e51751e4ea22ceac1c9fbf30 | [
"MIT"
] | null | null | null | setup.py | Archmonger/idom | b036f037578f7844e51751e4ea22ceac1c9fbf30 | [
"MIT"
] | null | null | null | setup.py | Archmonger/idom | b036f037578f7844e51751e4ea22ceac1c9fbf30 | [
"MIT"
] | 1 | 2022-01-20T13:10:25.000Z | 2022-01-20T13:10:25.000Z | from __future__ import print_function
import pipes
import shutil
import subprocess
import sys
import traceback
from distutils import log
from distutils.command.build import build # type: ignore
from distutils.command.sdist import sdist # type: ignore
from pathlib import Path
from setuptools import find_packages, se... | 32.230769 | 94 | 0.506648 |
1e0d62e9ccd1f60b7d5412e9bbb4c0f7313c5f3c | 1,006 | py | Python | kubernetes_asyncio/test/test_v1_tcp_socket_action.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | 1 | 2020-03-25T01:24:27.000Z | 2020-03-25T01:24:27.000Z | kubernetes_asyncio/test/test_v1_tcp_socket_action.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_v1_tcp_socket_action.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import u... | 24.536585 | 119 | 0.72664 |
5aefc72870b9647cdcfc77d5cd0367ab165737f8 | 5,817 | py | Python | sls/schedule_tags_api/common_bdd/schedule_tags_com_steps.py | aws-samples/amazon-ec2-rds-scheduling-tags-api-sls | 89bec948dc1b838e5518eb76ad571da8dea693f4 | [
"MIT-0"
] | null | null | null | sls/schedule_tags_api/common_bdd/schedule_tags_com_steps.py | aws-samples/amazon-ec2-rds-scheduling-tags-api-sls | 89bec948dc1b838e5518eb76ad571da8dea693f4 | [
"MIT-0"
] | null | null | null | sls/schedule_tags_api/common_bdd/schedule_tags_com_steps.py | aws-samples/amazon-ec2-rds-scheduling-tags-api-sls | 89bec948dc1b838e5518eb76ad571da8dea693f4 | [
"MIT-0"
] | null | null | null | """
Contains common behave steps for schedule tags api
"""
# pylint: disable = import-error,no-name-in-module,C0413,missing-function-docstring
import json
import requests
from behave import then, given
from schedule_tags_api.common_bdd import logger
from hamcrest import assert_that, equal_to
@given(u'{method} Sche... | 33.431034 | 101 | 0.694688 |
8ed1a42d2dd5e234c57aba5b3fa4468483c12ff1 | 3,991 | py | Python | exp/w2vector.py | CMWENLIU/fast_tensor | c1c74e27d72c63df6dca0dcf0a2693dff59dee7b | [
"MIT"
] | null | null | null | exp/w2vector.py | CMWENLIU/fast_tensor | c1c74e27d72c63df6dca0dcf0a2693dff59dee7b | [
"MIT"
] | null | null | null | exp/w2vector.py | CMWENLIU/fast_tensor | c1c74e27d72c63df6dca0dcf0a2693dff59dee7b | [
"MIT"
] | null | null | null | import os
import glob
import numpy as np
def loadGloveModel(gloveFile):
print ("Loading Glove Model")
f = open(gloveFile,'r')
model = {}
for line in f:
splitLine = line.split()
word = splitLine[0]
embedding = np.array([float(val) for val in splitLine[1:]])
model[word] =... | 34.704348 | 165 | 0.633175 |
b48e207f61ea05e795def899a6203c5414e144b7 | 303 | py | Python | pastepwn/analyzers/md5hashanalyzer.py | martin-bucinskas/pastepwn | c9485a8edd6a0dbe3dfe6c35e0a59613452c68cb | [
"MIT"
] | null | null | null | pastepwn/analyzers/md5hashanalyzer.py | martin-bucinskas/pastepwn | c9485a8edd6a0dbe3dfe6c35e0a59613452c68cb | [
"MIT"
] | null | null | null | pastepwn/analyzers/md5hashanalyzer.py | martin-bucinskas/pastepwn | c9485a8edd6a0dbe3dfe6c35e0a59613452c68cb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .regexanalyzer import RegexAnalyzer
class MD5HashAnalyzer(RegexAnalyzer):
"""Analyzer to match MD5 password hashes via regex"""
name = "MD5HashAnalyzer"
def __init__(self, actions):
regex = r"\b[a-f0-9]{32}\b"
super().__init__(actions, regex)
| 25.25 | 57 | 0.656766 |
bc5462f9d4ca722a430e8fb4c084a08b115da671 | 12,771 | py | Python | tests/store/model_registry/test_rest_store.py | adamreeve/mlflow | d0d307f7f7b49f013727191a672ae2139bf37343 | [
"Apache-2.0"
] | 1 | 2022-01-11T02:51:17.000Z | 2022-01-11T02:51:17.000Z | tests/store/model_registry/test_rest_store.py | adamreeve/mlflow | d0d307f7f7b49f013727191a672ae2139bf37343 | [
"Apache-2.0"
] | null | null | null | tests/store/model_registry/test_rest_store.py | adamreeve/mlflow | d0d307f7f7b49f013727191a672ae2139bf37343 | [
"Apache-2.0"
] | null | null | null | import unittest
from itertools import combinations
import json
import pytest
import uuid
from unittest import mock
import functools
from mlflow.entities.model_registry import RegisteredModelTag, ModelVersionTag
from mlflow.protos.model_registry_pb2 import (
CreateRegisteredModel,
UpdateRegisteredModel,
De... | 34.330645 | 100 | 0.623679 |
e2823d077e97afad869aa7107f9b460d9e940232 | 114 | py | Python | app/views.py | KFGisIT/gsa-bpa-django | a1772c0fb725c6604d6b550935160cfbd19f4f86 | [
"MIT-0",
"MIT"
] | null | null | null | app/views.py | KFGisIT/gsa-bpa-django | a1772c0fb725c6604d6b550935160cfbd19f4f86 | [
"MIT-0",
"MIT"
] | null | null | null | app/views.py | KFGisIT/gsa-bpa-django | a1772c0fb725c6604d6b550935160cfbd19f4f86 | [
"MIT-0",
"MIT"
] | null | null | null | from django.views.generic import TemplateView
class Home(TemplateView):
template_name = 'layout/home.html'
| 16.285714 | 45 | 0.77193 |
a65aebca4662618d42da104a18883530b6c0cbfc | 1,883 | py | Python | test/parser/unit_operators/testcases/Multinomial/Multinomial_generator.py | k4rth33k/dnnc-operators | a7fe3f1240c12b3438558def71fbfcd4520446c3 | [
"Apache-2.0"
] | 5 | 2019-08-16T14:35:17.000Z | 2020-07-11T23:59:22.000Z | test/parser/unit_operators/testcases/Multinomial/Multinomial_generator.py | k4rth33k/dnnc-operators | a7fe3f1240c12b3438558def71fbfcd4520446c3 | [
"Apache-2.0"
] | 6 | 2019-08-12T04:38:14.000Z | 2019-09-04T16:32:13.000Z | test/parser/unit_operators/testcases/Multinomial/Multinomial_generator.py | k4rth33k/dnnc-operators | a7fe3f1240c12b3438558def71fbfcd4520446c3 | [
"Apache-2.0"
] | 7 | 2019-08-15T13:29:00.000Z | 2019-09-09T17:08:04.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 ma... | 40.06383 | 93 | 0.725969 |
ccdde5b793f36930db7d8ea4686951ac8dba17f9 | 21,927 | py | Python | google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/transports/grpc_asyncio.py | LaudateCorpus1/python-iap | 1787cb00158f111915d0f9bb948abeceab75a6f4 | [
"Apache-2.0"
] | 1 | 2021-07-25T16:48:57.000Z | 2021-07-25T16:48:57.000Z | google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/transports/grpc_asyncio.py | LaudateCorpus1/python-iap | 1787cb00158f111915d0f9bb948abeceab75a6f4 | [
"Apache-2.0"
] | 28 | 2021-07-09T21:03:00.000Z | 2022-03-07T16:05:53.000Z | google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/transports/grpc_asyncio.py | LaudateCorpus1/python-iap | 1787cb00158f111915d0f9bb948abeceab75a6f4 | [
"Apache-2.0"
] | 2 | 2021-07-09T20:37:57.000Z | 2022-01-29T08:11:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 44.29697 | 106 | 0.64546 |
2124ece9b0e40058bb7022a495724f258ccad930 | 5,063 | py | Python | SZL2_Data_Clean.py | Johnzjy/SZL2 | 88e50b5aea404533ee41f4e6c33ae8a0508e2939 | [
"Unlicense"
] | null | null | null | SZL2_Data_Clean.py | Johnzjy/SZL2 | 88e50b5aea404533ee41f4e6c33ae8a0508e2939 | [
"Unlicense"
] | null | null | null | SZL2_Data_Clean.py | Johnzjy/SZL2 | 88e50b5aea404533ee41f4e6c33ae8a0508e2939 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 18 13:04:34 2019
@author:
"""
import os
import os.path
import re
import string
import sys
import time
output_dir="./";
PATH_7z_EXE= 'C:\Program Files (x86)\MyDrivers\DriverGenius'
SZL2_mode_dict={
"snap":"_snap_level_spot", #证券行情快照档位表 SecuritySnaps... | 28.931429 | 83 | 0.47936 |
873aaa30e84b13a5c7c7bfd8cd1f5c0389025492 | 1,231 | py | Python | cros_utils/timeline.py | jingpad-bsp/android_external_toolchain-utils | 6d59b0c61a2bfed55d783ee68978cf7352d6bc5e | [
"BSD-3-Clause"
] | null | null | null | cros_utils/timeline.py | jingpad-bsp/android_external_toolchain-utils | 6d59b0c61a2bfed55d783ee68978cf7352d6bc5e | [
"BSD-3-Clause"
] | null | null | null | cros_utils/timeline.py | jingpad-bsp/android_external_toolchain-utils | 6d59b0c61a2bfed55d783ee68978cf7352d6bc5e | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2012 Google Inc. All Rights Reserved.
#
"""Tools for recording and reporting timeline of benchmark_run."""
from __future__ import print_function
__author__ = 'yunlian@google.com (Yunlian Jiang)'
import time
class Event(object):
"""One event on the timeline."""
def __init__(self, name='', cur_time=... | 23.226415 | 67 | 0.651503 |
eabad429f6545b9aef914b495650fb80e6f138a9 | 768 | py | Python | tests/test_config.py | fakecoinbase/BitGFCslashbse | 61d72fba4886528064a7e41e5a71a753fa053473 | [
"MIT"
] | null | null | null | tests/test_config.py | fakecoinbase/BitGFCslashbse | 61d72fba4886528064a7e41e5a71a753fa053473 | [
"MIT"
] | null | null | null | tests/test_config.py | fakecoinbase/BitGFCslashbse | 61d72fba4886528064a7e41e5a71a753fa053473 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from bse import config, defaults, path
import pytest # type: ignore
def test_missing_netrc() -> None:
netrc = path.join(path.here(__file__), "this_file_does_not_exist")
cfg = config.new({defaults.ENV_NETRC: netrc})
with pytest.raises(FileNotFoundError):
cfg.readrc("machin... | 29.538462 | 70 | 0.682292 |
32ca034b829dc33947e9a7e01cd0ac906ae17050 | 13,937 | py | Python | Platforms/QemuQ35Pkg/Plugins/QemuRunner.py | spbrogan/mu_tiano_platforms | 9cdab75c50a92461bcb2f60827f11265b6e7ef5b | [
"BSD-2-Clause-Patent"
] | null | null | null | Platforms/QemuQ35Pkg/Plugins/QemuRunner.py | spbrogan/mu_tiano_platforms | 9cdab75c50a92461bcb2f60827f11265b6e7ef5b | [
"BSD-2-Clause-Patent"
] | null | null | null | Platforms/QemuQ35Pkg/Plugins/QemuRunner.py | spbrogan/mu_tiano_platforms | 9cdab75c50a92461bcb2f60827f11265b6e7ef5b | [
"BSD-2-Clause-Patent"
] | null | null | null | ##
# This plugin runs the QEMU command, monitoring for asserts
#
# Copyright (c) Microsoft Corporation
#
##
import logging
import os
import sys
import time
import shutil
import glob
import threading
import datetime
import subprocess
import xml.etree.ElementTree
from edk2toolext.environment import plug... | 45.25 | 190 | 0.558083 |
da783e03ee87bdca0307a999899d2b43981677cb | 38,411 | py | Python | google/ads/google_ads/v4/proto/resources/campaign_criterion_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v4/proto/resources/campaign_criterion_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v4/proto/resources/campaign_criterion_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v4/proto/resources/campaign_criterion.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf ... | 70.608456 | 4,854 | 0.798053 |
7c75a1a37cdf7f829f1f93160a38ae18feae6ad7 | 6,265 | py | Python | kubernetes/client/models/v1_scoped_resource_selector_requirement.py | fsduser/python | 2b20069ebc05283352fbdc95bbdca2b6133a4175 | [
"Apache-2.0"
] | 1 | 2021-10-15T13:05:45.000Z | 2021-10-15T13:05:45.000Z | kubernetes/client/models/v1_scoped_resource_selector_requirement.py | belajarqywok/python | b15bea16a87ad03136a4627941ac437582ea4657 | [
"Apache-2.0"
] | 10 | 2020-10-01T03:15:01.000Z | 2022-03-01T03:06:31.000Z | kubernetes/client/models/v1_scoped_resource_selector_requirement.py | belajarqywok/python | b15bea16a87ad03136a4627941ac437582ea4657 | [
"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.19
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 34.61326 | 246 | 0.632402 |
844916ddacafad661a08540eafdf974d7cb6a8eb | 23,237 | py | Python | olo/libs/decompiling.py | Ma233/olo | 54eb3bd4e1330a0467159f9c968557d471537621 | [
"Apache-2.0"
] | null | null | null | olo/libs/decompiling.py | Ma233/olo | 54eb3bd4e1330a0467159f9c968557d471537621 | [
"Apache-2.0"
] | null | null | null | olo/libs/decompiling.py | Ma233/olo | 54eb3bd4e1330a0467159f9c968557d471537621 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=E0213,E1121,E1101,C0301
# Copyright (c) 2016 Pony ORM, LLC. All rights reserved. team (at) ponyorm.com
#
# Most of the content of this file is copied from https://github.com/ponyorm/pony/blob/orm/pony/orm/decompiling.py
# and is released under the Apache 2.0 license: https://www.apache.org/licenses/L... | 33.873178 | 158 | 0.557344 |
cb264f7ea168f3385df582571ebcb75b25d6d28b | 2,293 | py | Python | vsts/vsts/git/v4_0/models/comment_thread_context.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/git/v4_0/models/comment_thread_context.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/git/v4_0/models/comment_thread_context.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 54.595238 | 125 | 0.635848 |
c8069338b722a0c85a5c32e5582a429c48e4f898 | 30,315 | py | Python | nilmtk/elecmeter.py | Agirljustsayhello/nilmtk | bf985f0f637460bd8df3bb1cbf17b81a20303826 | [
"Apache-2.0"
] | 1 | 2021-11-04T05:10:58.000Z | 2021-11-04T05:10:58.000Z | nilmtk/elecmeter.py | Agirljustsayhello/nilmtk | bf985f0f637460bd8df3bb1cbf17b81a20303826 | [
"Apache-2.0"
] | null | null | null | nilmtk/elecmeter.py | Agirljustsayhello/nilmtk | bf985f0f637460bd8df3bb1cbf17b81a20303826 | [
"Apache-2.0"
] | 1 | 2019-10-12T16:02:05.000Z | 2019-10-12T16:02:05.000Z | from __future__ import print_function, division
from warnings import warn
from collections import namedtuple
from copy import deepcopy
from itertools import izip
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import random
from .preprocessing import Clip
from .stats import TotalEnergy, GoodSecti... | 34.965398 | 96 | 0.590038 |
ae6ac21c36cbb8473847b9c2da1c400b8676efe3 | 644 | py | Python | pclinfmri/quality_assurance/__init__.py | neurospin/preclinicfmri | 637ba9f5f594ec837515e7364482f66c37ecf03f | [
"CECILL-B"
] | null | null | null | pclinfmri/quality_assurance/__init__.py | neurospin/preclinicfmri | 637ba9f5f594ec837515e7364482f66c37ecf03f | [
"CECILL-B"
] | null | null | null | pclinfmri/quality_assurance/__init__.py | neurospin/preclinicfmri | 637ba9f5f594ec837515e7364482f66c37ecf03f | [
"CECILL-B"
] | null | null | null | #! /usr/bin/env python
##########################################################################
# Nsap - Copyright (C) CEA, 2013
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# ... | 35.777778 | 80 | 0.572981 |
7e16e82eded845eb926c8f33f084ba62a12be19e | 4,398 | py | Python | sattle/settings.py | GeoscienceAustralia/sattle | 2d83f5eac071cbaabf533258a9b4b7f74a590cc5 | [
"Apache-2.0"
] | null | null | null | sattle/settings.py | GeoscienceAustralia/sattle | 2d83f5eac071cbaabf533258a9b4b7f74a590cc5 | [
"Apache-2.0"
] | null | null | null | sattle/settings.py | GeoscienceAustralia/sattle | 2d83f5eac071cbaabf533258a9b4b7f74a590cc5 | [
"Apache-2.0"
] | null | null | null | """
Django settings for this project.
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start de... | 29.918367 | 95 | 0.665075 |
b82c0ce68e7a40774d0e2a487f8a033f0431cc39 | 2,520 | py | Python | applications/HDF5Application/python_scripts/utils.py | Jacklwln/Kratos | 12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de | [
"BSD-4-Clause"
] | 1 | 2019-08-01T09:01:08.000Z | 2019-08-01T09:01:08.000Z | applications/HDF5Application/python_scripts/utils.py | Jacklwln/Kratos | 12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de | [
"BSD-4-Clause"
] | null | null | null | applications/HDF5Application/python_scripts/utils.py | Jacklwln/Kratos | 12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de | [
"BSD-4-Clause"
] | null | null | null | '''HDF5 process utilities.
license: HDF5Application/license.txt
'''
import KratosMultiphysics
def IsDistributed():
return KratosMultiphysics.DataCommunicator.GetDefault().IsDistributed()
def InsertSingleSetting(dest, key, parameters):
if dest.Has(key):
dest[key] = parameters
else:
dest.... | 42.711864 | 133 | 0.723016 |
bfd0247b92170783e360235e8a7d755202e9d005 | 912 | py | Python | go.py | kako57/typocalypse-bruteforcer | 77022a13225870cd96e43f39caa78f762fbcf1f7 | [
"MIT"
] | 1 | 2021-12-28T03:33:47.000Z | 2021-12-28T03:33:47.000Z | go.py | kako57/typocalypse-bruteforcer | 77022a13225870cd96e43f39caa78f762fbcf1f7 | [
"MIT"
] | null | null | null | go.py | kako57/typocalypse-bruteforcer | 77022a13225870cd96e43f39caa78f762fbcf1f7 | [
"MIT"
] | null | null | null | import keyboard
from time import sleep
PAUSE_FLAG = True
EXIT_FLAG = False
SLEEP_INTERVAL = 0.07 # in milliseconds
WORDLIST = []
WORDLIST_INDEX = 0
with open("wordlist.txt", "r") as f:
WORDLIST = f.readlines()
WORDLIST_LENGTH = len(WORDLIST)
def on_press_action(event):
global EXIT_FLAG, PAUSE_FLAG
if event.name... | 22.8 | 51 | 0.712719 |
3bd896c74b05ecb9c09d42c6ddece9eba5599f31 | 9,029 | py | Python | tests/test_field.py | velrest/django-localized-fields | d308e773cf01ce84b7c91e97fd905de2434e3516 | [
"MIT"
] | null | null | null | tests/test_field.py | velrest/django-localized-fields | d308e773cf01ce84b7c91e97fd905de2434e3516 | [
"MIT"
] | null | null | null | tests/test_field.py | velrest/django-localized-fields | d308e773cf01ce84b7c91e97fd905de2434e3516 | [
"MIT"
] | null | null | null | import json
from django.conf import settings
from django.db.utils import IntegrityError
from django.test import TestCase
from localized_fields.fields import LocalizedField
from localized_fields.forms import LocalizedFieldForm
from localized_fields.value import LocalizedValue
from .data import get_init_values
from .f... | 33.943609 | 79 | 0.663639 |
9bb631a11d86f1964a7c560bb8b8073a9fbcc1e8 | 12,201 | py | Python | scripts/glue_script/run_redshift_benchmark.py | aws-samples/cdk-glue-orchestrate-redshift | 9d517cf902628e639e29e926e4913d0886fc6b74 | [
"Apache-2.0"
] | 1 | 2021-12-07T02:25:02.000Z | 2021-12-07T02:25:02.000Z | scripts/glue_script/run_redshift_benchmark.py | aws-samples/cdk-glue-orchestrate-redshift | 9d517cf902628e639e29e926e4913d0886fc6b74 | [
"Apache-2.0"
] | null | null | null | scripts/glue_script/run_redshift_benchmark.py | aws-samples/cdk-glue-orchestrate-redshift | 9d517cf902628e639e29e926e4913d0886fc6b74 | [
"Apache-2.0"
] | 1 | 2022-02-25T08:06:48.000Z | 2022-02-25T08:06:48.000Z | #!/usr/bin/python
# This is the Glue python-shell script to perform benchmark test for Redshift: sequential test and concurrent test
# Author : Liulu He
# Version: 1.0
# -*- coding: UTF-8 -*-
"""
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version ... | 43.113074 | 232 | 0.57192 |
b5a858e8a130a031f20e7b15abaf7689549d31a0 | 2,984 | py | Python | get_past_orders.py | sudhagarc/aol-utils | 7cd3d0d8c99eb4014678ecd209fcbde7638fee75 | [
"MIT"
] | null | null | null | get_past_orders.py | sudhagarc/aol-utils | 7cd3d0d8c99eb4014678ecd209fcbde7638fee75 | [
"MIT"
] | null | null | null | get_past_orders.py | sudhagarc/aol-utils | 7cd3d0d8c99eb4014678ecd209fcbde7638fee75 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from eventbrite import Eventbrite
import json
class Event():
def __init__(self, eventbrite):
self.eventIds = []
self.eventbrite = eventbrite
def getAllEvents(self):
events = self.eventbrite.api("get", "/users/me/owned_events", {})
self.addEvents(events['e... | 28.419048 | 76 | 0.556635 |
f395822de851c7d72df70c051e926cc51d8d2248 | 1,640 | py | Python | source/Objects/XTRA_Input_Parameters.py | afarahi/XTRA | 6550b216264abaa3ed705835aca0981f2934e069 | [
"MIT"
] | 2 | 2018-11-01T12:38:56.000Z | 2019-10-22T07:02:54.000Z | source/Objects/XTRA_Input_Parameters.py | afarahi/XTRA | 6550b216264abaa3ed705835aca0981f2934e069 | [
"MIT"
] | null | null | null | source/Objects/XTRA_Input_Parameters.py | afarahi/XTRA | 6550b216264abaa3ed705835aca0981f2934e069 | [
"MIT"
] | null | null | null | import json
import sys
class Input_Parameters:
def __init__(self):
from Objects import Xray_Band_Class
from Objects import Temprature_scaling, Luminocity_scaling
with open('parameters/Cosmological_Parameters.json') as fp:
self._param = json.load(fp)
# Cosmology
... | 32.156863 | 70 | 0.620732 |
481106d6f824cd2c87a4cb37e7fdb5847e50c714 | 10,803 | py | Python | ref/views/envt_new.py | digitalfox/MAGE | 700833fff22c071a94a55cf1a92684d51dc9834e | [
"Apache-2.0"
] | null | null | null | ref/views/envt_new.py | digitalfox/MAGE | 700833fff22c071a94a55cf1a92684d51dc9834e | [
"Apache-2.0"
] | null | null | null | ref/views/envt_new.py | digitalfox/MAGE | 700833fff22c071a94a55cf1a92684d51dc9834e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
## Django imports
from django import forms
from django.shortcuts import render, render_to_response, redirect
from django.db.transaction import atomic
from django.contrib.auth.decorators import permission_required
## MAGE imports
from ref.models import ComponentImplementationClass, ImplementationDescri... | 46.564655 | 212 | 0.669536 |
39e90e7a538cae9206178c84d3088cb86064b183 | 588 | py | Python | qats/app/widgets.py | eneelo/qats | 9280e2487bde97874cc8857b2780ac830323f363 | [
"MIT"
] | null | null | null | qats/app/widgets.py | eneelo/qats | 9280e2487bde97874cc8857b2780ac830323f363 | [
"MIT"
] | null | null | null | qats/app/widgets.py | eneelo/qats | 9280e2487bde97874cc8857b2780ac830323f363 | [
"MIT"
] | 1 | 2020-10-29T13:40:47.000Z | 2020-10-29T13:40:47.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module with custom widgets
@author: perl
"""
from qtpy.QtWidgets import QTabWidget
class CustomTabWidget (QTabWidget):
"""
Custom tab widget to enable closing tabs
"""
def __init__(self, parent=None):
super().__init__(parent)
self.setT... | 21.777778 | 54 | 0.630952 |
ddda8a5c7585119aafcc8a218d3c58f6070447ab | 7,778 | py | Python | ws1920_sourcing_aggregation_old/LatencyVisualisation/app.py | amrohendawi/IIoT-monitoring-system | 94a77b803e7dfff5f0eca00809ade7fb7c489cb3 | [
"MIT"
] | null | null | null | ws1920_sourcing_aggregation_old/LatencyVisualisation/app.py | amrohendawi/IIoT-monitoring-system | 94a77b803e7dfff5f0eca00809ade7fb7c489cb3 | [
"MIT"
] | null | null | null | ws1920_sourcing_aggregation_old/LatencyVisualisation/app.py | amrohendawi/IIoT-monitoring-system | 94a77b803e7dfff5f0eca00809ade7fb7c489cb3 | [
"MIT"
] | null | null | null | from queue import Queue
from concurrent.futures import ThreadPoolExecutor
import threading
import time
from flask import Flask, request
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from traceback import print_exc
import requests as... | 34.264317 | 141 | 0.61134 |
e2ca662d81ebfc9300cabf994155091551ed93d5 | 617 | py | Python | exercises/Exercise5-2.py | ryancarr/PY4E | a77279cd51b251d6d1ccf35bd828d3af3d309780 | [
"Apache-2.0"
] | null | null | null | exercises/Exercise5-2.py | ryancarr/PY4E | a77279cd51b251d6d1ccf35bd828d3af3d309780 | [
"Apache-2.0"
] | null | null | null | exercises/Exercise5-2.py | ryancarr/PY4E | a77279cd51b251d6d1ccf35bd828d3af3d309780 | [
"Apache-2.0"
] | null | null | null | # Name : Exercise5-2.py
# Author : Ryan Carr
# Date : 02/03/19
# Purpose : Asks user for multiple numbers then tell user
# Minimum and Maximum value input
minimum = None
maximum = None
while True:
number = input('Enter a number: ')
if number == 'done':
break
try:
number =... | 20.566667 | 57 | 0.589951 |
258041af41e29525cf69a0ebf6c3a8cbe53e436d | 3,237 | py | Python | parlai/scripts/build_candidates.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 2 | 2017-09-20T21:49:51.000Z | 2018-08-12T06:58:10.000Z | parlai/scripts/build_candidates.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 7 | 2021-01-12T01:07:03.000Z | 2022-03-12T00:50:45.000Z | parlai/scripts/build_candidates.py | min942773/parlai_wandb | 1d9ba1a0df2199d0247cee8c4929a2598ac7e41a | [
"MIT"
] | 2 | 2020-10-29T18:14:33.000Z | 2020-11-07T09:46:23.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Build the candidate responses for a retrieval model.
## Examples
```bash
parlai build_candidates -t convai2 --outfi... | 29.972222 | 82 | 0.637319 |
4a333efc51eb35cf585e9f629f910a943c773070 | 74,545 | py | Python | fastmc/proto.py | phase/ApplePi | c04cfc67c18c54b3a8a72ff5e6ed2678bf4396c3 | [
"MIT"
] | 4 | 2016-02-12T06:19:27.000Z | 2021-09-24T22:44:48.000Z | fastmc/proto.py | CraftDevs/ApplePi | c04cfc67c18c54b3a8a72ff5e6ed2678bf4396c3 | [
"MIT"
] | 2 | 2016-02-10T01:28:31.000Z | 2017-01-10T04:06:32.000Z | fastmc/proto.py | CraftDevs/ApplePi | c04cfc67c18c54b3a8a72ff5e6ed2678bf4396c3 | [
"MIT"
] | 2 | 2016-02-09T20:42:29.000Z | 2017-01-10T14:50:58.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014, Florian Wesch <fw@dividuum.de>
# 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 copy... | 31.843229 | 111 | 0.573305 |
b624c3d1b17c655780f0867036454532ffa3fbb3 | 650 | py | Python | py2gds/connection.py | kingoodie/py2gds | 1c264968da13c7330e8181b54a8bcc3bf233dd1a | [
"MIT"
] | null | null | null | py2gds/connection.py | kingoodie/py2gds | 1c264968da13c7330e8181b54a8bcc3bf233dd1a | [
"MIT"
] | 1 | 2021-03-09T12:09:35.000Z | 2021-03-09T12:09:35.000Z | py2gds/connection.py | kingoodie/py2gds | 1c264968da13c7330e8181b54a8bcc3bf233dd1a | [
"MIT"
] | null | null | null | from abc import ABC
from dataclasses import dataclass
from typing import Any, Dict, List
from neo4j import Neo4jDriver, GraphDatabase
class Connection(ABC):
def execute(self, query: str) -> Any:
raise NotImplementedError
@dataclass(frozen=True)
class Neo4JDriverConnection(Connection):
driver: Neo4j... | 27.083333 | 83 | 0.703077 |
a3b66a9141ea86e26d0090430a28e9269599fa33 | 507 | py | Python | rlpy/gradnet/samples/combined/run.py | imandr/RLpy | f01cf7af47b6054e4e52d663ceafc463df6f6166 | [
"BSD-3-Clause"
] | null | null | null | rlpy/gradnet/samples/combined/run.py | imandr/RLpy | f01cf7af47b6054e4e52d663ceafc463df6f6166 | [
"BSD-3-Clause"
] | null | null | null | rlpy/gradnet/samples/combined/run.py | imandr/RLpy | f01cf7af47b6054e4e52d663ceafc463df6f6166 | [
"BSD-3-Clause"
] | null | null | null | from testenv import TestEnv
from rlpy import Agent
from ac_combined import Brain
env = TestEnv()
brain = Brain(env.ObservationSpec, env.ActionSpec)
agent = Agent(brain)
reward, history = agent.play_episode(env, max_steps=10)
print("--- episode reward=", reward, " history: ---")
for k, lst in history.items():
if... | 25.35 | 55 | 0.642998 |
43854ff89ea4ee2a80169a485165efeca1cd32a1 | 263 | py | Python | tests/artificial/transf_Anscombe/trend_PolyTrend/cycle_0/ar_/test_artificial_1024_Anscombe_PolyTrend_0__0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Anscombe/trend_PolyTrend/cycle_0/ar_/test_artificial_1024_Anscombe_PolyTrend_0__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Anscombe/trend_PolyTrend/cycle_0/ar_/test_artificial_1024_Anscombe_PolyTrend_0__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 0, transform = "Anscombe", sigma = 0.0, exog_count = 0, ar_order = 0); | 37.571429 | 163 | 0.730038 |
cc92272239454b263354805ed2f6c1d869951d06 | 133 | py | Python | Mundo1 - desafios-CEV/desafio-cev.024.py | JeffeSilva/EP-python | a4d8ccb727ab9e10785b2dfd219cff72e0d808f5 | [
"MIT"
] | 1 | 2021-01-07T12:43:48.000Z | 2021-01-07T12:43:48.000Z | Mundo1 - desafios-CEV/desafio-cev.024.py | JeffeSilva/EP-python | a4d8ccb727ab9e10785b2dfd219cff72e0d808f5 | [
"MIT"
] | null | null | null | Mundo1 - desafios-CEV/desafio-cev.024.py | JeffeSilva/EP-python | a4d8ccb727ab9e10785b2dfd219cff72e0d808f5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
cidade = str(input('Digite o nome da cidade: ')).strip().lower()
div = cidade.split()
print(div[0] in 'santo')
| 26.6 | 64 | 0.661654 |
5e00056c33db7e98d826409ab98aca5c0cf94b4e | 12,696 | py | Python | pandas/tests/indexing/test_datetime.py | dimithras/pandas | d321be6e2a43270625abf671d9e59f16529c4b48 | [
"BSD-3-Clause"
] | 1 | 2021-09-17T14:27:25.000Z | 2021-09-17T14:27:25.000Z | pandas/tests/indexing/test_datetime.py | BhavarthShah/pandas | efb068f25b911ff3009d5692eb831df35bb042e5 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/indexing/test_datetime.py | BhavarthShah/pandas | efb068f25b911ff3009d5692eb831df35bb042e5 | [
"BSD-3-Clause"
] | null | null | null | from datetime import date, datetime, timedelta
from dateutil import tz
import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, Index, Series, Timestamp, date_range
import pandas._testing as tm
class TestDatetimeIndex:
def test_setitem_with_datetime_tz(self):
# 16889
# ... | 33.235602 | 88 | 0.549779 |
04b77773c9cdff9dcbefc94ab82609cd0a1dbffc | 440 | py | Python | setup.py | eastene/aptardi | 0ab8b6ce20af8e1face8a71c3fc0bc2e5b825907 | [
"MIT"
] | null | null | null | setup.py | eastene/aptardi | 0ab8b6ce20af8e1face8a71c3fc0bc2e5b825907 | [
"MIT"
] | null | null | null | setup.py | eastene/aptardi | 0ab8b6ce20af8e1face8a71c3fc0bc2e5b825907 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(name='aptardi',
version='1.3.8',
description='Identify polyA sites',
author='Ryan Lusk',
author_email='ryan.lusk@cuanschutz.edu',
url='https://github.com/luskry/aptardi',
packages=['aptardi'],
package_dir={'aptardi': 'src/aptardi'},
... | 33.846154 | 77 | 0.647727 |
35a44d30d83bf7e4992c02b5561e9803a82dbbc4 | 16,790 | py | Python | pirates/leveleditor/worldData/tortuga_building_int_tavern.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 3 | 2021-02-25T06:38:13.000Z | 2022-03-22T07:00:15.000Z | pirates/leveleditor/worldData/tortuga_building_int_tavern.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | null | null | null | pirates/leveleditor/worldData/tortuga_building_int_tavern.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 1 | 2021-02-25T06:38:17.000Z | 2021-02-25T06:38:17.000Z | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.leveleditor.worldData.tortuga_building_int_tavern
from pandac.PandaModules import Point3, VBase3, Vec4, Vec3
objectStruct = {'In... | 2,398.571429 | 16,361 | 0.63919 |
667da021a803340c45971f37490e7eccfcd80ea4 | 33,937 | py | Python | lib/couchbase_cli.py | couchbase/testrunner | a23e4885fdf86d91b490e91e992e7445e61e9690 | [
"Apache-2.0"
] | 14 | 2015-02-06T02:47:57.000Z | 2020-03-14T15:06:05.000Z | lib/couchbase_cli.py | couchbase/testrunner | a23e4885fdf86d91b490e91e992e7445e61e9690 | [
"Apache-2.0"
] | 3 | 2019-02-27T19:29:11.000Z | 2021-06-02T02:14:27.000Z | lib/couchbase_cli.py | couchbase/testrunner | a23e4885fdf86d91b490e91e992e7445e61e9690 | [
"Apache-2.0"
] | 108 | 2015-03-26T08:58:49.000Z | 2022-03-21T05:21:39.000Z | from remote.remote_util import RemoteMachineShellConnection
from testconstants import COUCHBASE_FROM_4DOT6
class CouchbaseCLI:
def __init__(self, server, username=None, password=None, cb_version=None):
self.server = server
# Use the internal ip if it's defined when running a command on the remote ... | 47.200278 | 103 | 0.57536 |
16baf966fff8014dcb32e3cf22ddeb8121f3a7aa | 20,233 | py | Python | src/graphql/utilities/find_breaking_changes.py | ganwell/graphql-core-next | 0fb5b81fc0a1909bfe63df31657bc4de631676cf | [
"MIT"
] | null | null | null | src/graphql/utilities/find_breaking_changes.py | ganwell/graphql-core-next | 0fb5b81fc0a1909bfe63df31657bc4de631676cf | [
"MIT"
] | null | null | null | src/graphql/utilities/find_breaking_changes.py | ganwell/graphql-core-next | 0fb5b81fc0a1909bfe63df31657bc4de631676cf | [
"MIT"
] | null | null | null | from enum import Enum
from operator import attrgetter
from typing import Any, Dict, List, NamedTuple, Union, cast
from ..error import INVALID
from ..language import print_ast, visit, Visitor
from ..pyutils import inspect
from ..type import (
GraphQLEnumType,
GraphQLField,
GraphQLList,
GraphQLNamedType,... | 33.168852 | 88 | 0.632482 |
0931b9a2a4638c7b4fec4ae56d97103b2e8b6531 | 5,899 | py | Python | lib/modules/powershell/situational_awareness/network/powerview/get_group_member.py | Gui-Luz/Empire | 6f5eeff5f46dd085e1317cb09b39853a2fce5d13 | [
"BSD-3-Clause"
] | 5,720 | 2017-02-02T13:59:40.000Z | 2022-03-31T09:50:10.000Z | lib/modules/powershell/situational_awareness/network/powerview/get_group_member.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 866 | 2017-02-02T10:56:31.000Z | 2020-01-17T07:47:05.000Z | lib/modules/powershell/situational_awareness/network/powerview/get_group_member.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 2,181 | 2017-02-04T10:28:41.000Z | 2022-03-31T04:36:56.000Z | from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Get-DomainGroupMember',
'Author': ['@harmj0y'],
'Description': ('Returns the members of a given group, with the option to "Recurse" to find all effective grou... | 40.129252 | 165 | 0.475504 |
b8afba7d69e7d198567288af9cf16a5b332deffa | 3,946 | py | Python | homeassistant/components/vizio/__init__.py | yarikoptic/hass-core-gtdiehl-iotawatt | 32dfaccf1fab5ce6d7ab73a3dee7c9aa4c93351d | [
"Apache-2.0"
] | 1 | 2020-12-18T12:23:04.000Z | 2020-12-18T12:23:04.000Z | homeassistant/components/vizio/__init__.py | yarikoptic/hass-core-gtdiehl-iotawatt | 32dfaccf1fab5ce6d7ab73a3dee7c9aa4c93351d | [
"Apache-2.0"
] | 21 | 2021-05-12T06:43:10.000Z | 2022-03-31T06:10:38.000Z | homeassistant/components/vizio/__init__.py | karolperkowski/home-assistant | f11834d85c457151b3683e080cb5dfc8ad1ab301 | [
"Apache-2.0"
] | null | null | null | """The vizio component."""
from __future__ import annotations
import asyncio
from datetime import timedelta
import logging
from typing import Any
from pyvizio.const import APPS
from pyvizio.util import gen_apps_list_from_url
import voluptuous as vol
from homeassistant.components.media_player import DEVICE_CLASS_TV
f... | 31.31746 | 92 | 0.686771 |
882388671d5a47cba60703d3ab76f1038aa9ad4c | 1,414 | py | Python | baihe_api/baihe_api/baihe_admin/admin.py | DreamColl/WebBaihe | 6c5ee5f28433296bd339787e47edf87494f987ed | [
"MIT"
] | null | null | null | baihe_api/baihe_api/baihe_admin/admin.py | DreamColl/WebBaihe | 6c5ee5f28433296bd339787e47edf87494f987ed | [
"MIT"
] | null | null | null | baihe_api/baihe_api/baihe_admin/admin.py | DreamColl/WebBaihe | 6c5ee5f28433296bd339787e47edf87494f987ed | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.utils import timezone
from django.shortcuts import reverse
from baihe_api.apps.form_builder.models import BaiheForm, FormField
from baihe_api.apps.artical.models import Artical
class FieldsInline(admin.TabularInline):
model = FormField
extra = 1
class FormStatus... | 27.72549 | 67 | 0.636492 |
f6d32c183dbc395b1e748f6855bbeb671d34ef00 | 26,776 | py | Python | ocean_provider/routes.py | marcojrfurtado/ocean-provider-py-plus | 5dc6a683655ad5de24383aa7efd750b335910361 | [
"Apache-2.0"
] | null | null | null | ocean_provider/routes.py | marcojrfurtado/ocean-provider-py-plus | 5dc6a683655ad5de24383aa7efd750b335910361 | [
"Apache-2.0"
] | null | null | null | ocean_provider/routes.py | marcojrfurtado/ocean-provider-py-plus | 5dc6a683655ad5de24383aa7efd750b335910361 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
import json
import logging
import os
from eth_utils import add_0x_prefix
from flask import Blueprint, jsonify, request, Response
from ocean_lib.web3_internal.utils import add_ethereum_prefix_and_hash_msg
from ocean_lib.web3_internal.web... | 33.979695 | 110 | 0.624552 |
4a8bf78d6adfec5e03e297b3a3aa744799f6bd45 | 4,260 | py | Python | forest/drivers/gpm.py | wolfiex/forest | 9b9c2817bef90e0c0f0b7d306ca8d71bbe86ade3 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T16:23:52.000Z | 2020-10-27T16:23:52.000Z | forest/drivers/gpm.py | wolfiex/forest | 9b9c2817bef90e0c0f0b7d306ca8d71bbe86ade3 | [
"BSD-3-Clause"
] | 1 | 2020-06-19T14:20:08.000Z | 2020-06-19T14:20:08.000Z | forest/drivers/gpm.py | wolfiex/forest | 9b9c2817bef90e0c0f0b7d306ca8d71bbe86ade3 | [
"BSD-3-Clause"
] | 2 | 2020-06-14T11:50:17.000Z | 2020-06-14T17:40:25.000Z | """GPM driver"""
from functools import partial, lru_cache
import glob
import datetime as dt
import netCDF4
import numpy as np
import forest.view
import forest.geo
import forest.util
@lru_cache(maxsize=16)
def read_times(path):
"""Read time axis from a file"""
with netCDF4.Dataset(path) as dataset:
var... | 31.323529 | 78 | 0.576526 |
74cc9b595cc326a7c1c7243c6af06ffb2f07d7c2 | 2,775 | py | Python | core/utilities/scheduler.py | Smashulica/nebula8 | 010df165e3cc61e0154d20310fa972482ec0e7be | [
"Apache-2.0"
] | 19 | 2020-12-24T02:47:41.000Z | 2022-03-18T07:33:52.000Z | core/utilities/scheduler.py | Smashulica/nebula8 | 010df165e3cc61e0154d20310fa972482ec0e7be | [
"Apache-2.0"
] | 22 | 2020-09-29T04:56:29.000Z | 2022-03-18T14:10:27.000Z | core/utilities/scheduler.py | Smashulica/nebula8 | 010df165e3cc61e0154d20310fa972482ec0e7be | [
"Apache-2.0"
] | 15 | 2020-09-29T04:56:37.000Z | 2022-01-24T15:39:07.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright SquirrelNetwork
import asyncio
from time import time
from typing import Callable, List, Dict, Any
"""
=============
How to Use:
=============
test = Scheduler()
@test.repeat(3600, False)
async def handler():
It will be repeated at 16:30
It will be repeat... | 31.179775 | 84 | 0.524685 |
e2d02b41a172cae5c54683cd8577dc6a505246b3 | 109,931 | py | Python | xarray/core/variable.py | chrisroat/xarray | f75c3be583db377e1efe0fb90ece11e79bb4297e | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2019-09-27T02:29:25.000Z | 2021-01-10T12:52:16.000Z | xarray/core/variable.py | chrisroat/xarray | f75c3be583db377e1efe0fb90ece11e79bb4297e | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 13 | 2021-05-17T06:33:56.000Z | 2022-02-14T14:43:49.000Z | xarray/core/variable.py | chrisroat/xarray | f75c3be583db377e1efe0fb90ece11e79bb4297e | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2019-09-27T02:29:53.000Z | 2019-09-27T02:29:53.000Z | from __future__ import annotations
import copy
import itertools
import numbers
import warnings
from collections import defaultdict
from datetime import timedelta
from typing import (
TYPE_CHECKING,
Any,
Dict,
Hashable,
List,
Mapping,
Optional,
Sequence,
Tuple,
Union,
)
import n... | 36.668112 | 124 | 0.590161 |
497391f66536e1a4c62d197c67fca5267115b91e | 27 | py | Python | django_passwords/backends/http.py | aiakos/aiakos | a591e7ef13ab9e8e14b4d3569d43fce694c4150a | [
"BSD-2-Clause",
"MIT"
] | 4 | 2017-04-28T19:09:17.000Z | 2018-07-03T04:43:54.000Z | django_passwords/backends/http.py | aiakos/aiakos | a591e7ef13ab9e8e14b4d3569d43fce694c4150a | [
"BSD-2-Clause",
"MIT"
] | 2 | 2020-06-05T17:46:47.000Z | 2021-06-10T17:22:58.000Z | django_passwords/backends/http.py | aiakos/aiakos | a591e7ef13ab9e8e14b4d3569d43fce694c4150a | [
"BSD-2-Clause",
"MIT"
] | 2 | 2017-08-14T07:15:14.000Z | 2019-03-04T14:02:05.000Z | from .https import Backend
| 13.5 | 26 | 0.814815 |
e8b6ec7b4316752388e4a387c33933ee764811df | 4,062 | py | Python | badoo/web/workflow.py | vyahello/badoo-liker | fc880b46cab2c3eccc69171a8792b4f71bd4b7a9 | [
"MIT"
] | 14 | 2020-02-12T06:02:26.000Z | 2022-02-28T18:23:04.000Z | badoo/web/workflow.py | vyahello/badoo-liker | fc880b46cab2c3eccc69171a8792b4f71bd4b7a9 | [
"MIT"
] | 8 | 2020-03-21T10:48:01.000Z | 2021-06-13T20:05:33.000Z | badoo/web/workflow.py | vyahello/badoo-liker | fc880b46cab2c3eccc69171a8792b4f71bd4b7a9 | [
"MIT"
] | 2 | 2020-12-17T19:14:46.000Z | 2021-06-23T07:15:32.000Z | from enum import Enum
from selenium.common.exceptions import TimeoutException, NoSuchElementException
from badoo.connections.web import Browser
from badoo.setup import Credentials
from badoo.web.support.element import WebElement, Element
from badoo.web.support.page import (
LoginPage,
Url,
open_url,
Pag... | 29.649635 | 80 | 0.605613 |
3e03fc0ee935227e277bea8b75e8a46fad78e1c5 | 1,379 | py | Python | backend/api/models.py | paolodamico/moonshot | cc7780943e33ff180bca54eb92f1e9799aea1ee0 | [
"MIT"
] | null | null | null | backend/api/models.py | paolodamico/moonshot | cc7780943e33ff180bca54eb92f1e9799aea1ee0 | [
"MIT"
] | null | null | null | backend/api/models.py | paolodamico/moonshot | cc7780943e33ff180bca54eb92f1e9799aea1ee0 | [
"MIT"
] | null | null | null | import uuid
from typing import Dict
from django.core.validators import MinValueValidator
from django.db import models
PRODUCTS: Dict = {
"photoshoot": dict(amount=19999, currency="USD"),
"troubleshoot": dict(amount=399999, currency="GBP"),
"peashoot": dict(amount=1499, currency="USD"),
}
class Payment(m... | 29.340426 | 78 | 0.64322 |
baeeba1bb0ce4c823cdfec76e5a9564c437a6f89 | 113,401 | py | Python | src/sensory_cloud/generated/validate/validate_pb2.py | Sensory-Cloud/python-sdk | 1457987481a7fbddaa6dff6b5b935c1a2c0d7213 | [
"Apache-2.0"
] | 2 | 2022-01-11T21:49:33.000Z | 2022-02-15T23:53:41.000Z | src/sensory_cloud/generated/validate/validate_pb2.py | Sensory-Cloud/python-sdk | 1457987481a7fbddaa6dff6b5b935c1a2c0d7213 | [
"Apache-2.0"
] | null | null | null | src/sensory_cloud/generated/validate/validate_pb2.py | Sensory-Cloud/python-sdk | 1457987481a7fbddaa6dff6b5b935c1a2c0d7213 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: validate/validate.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from goo... | 49.780948 | 8,966 | 0.754059 |
cf51f5464b4e364c318ccf2e36c33a1888360c36 | 2,533 | py | Python | txt1.py | nullvideo/txt-fmt | d88cc956003d3c9a4cfd9dc8e39d9192185d742d | [
"MIT"
] | 1 | 2019-04-24T06:06:08.000Z | 2019-04-24T06:06:08.000Z | txt1.py | nullvideo/txt-fmt | d88cc956003d3c9a4cfd9dc8e39d9192185d742d | [
"MIT"
] | null | null | null | txt1.py | nullvideo/txt-fmt | d88cc956003d3c9a4cfd9dc8e39d9192185d742d | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2019 nullptr
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge,... | 34.69863 | 81 | 0.607975 |
aefe95d30ffe6f57f404c84eb1b235954f1f3fdb | 21,482 | py | Python | mathics/builtin/compile/ir.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/builtin/compile/ir.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/builtin/compile/ir.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | from functools import reduce
import itertools
from llvmlite import ir
import ctypes
from mathics.core.expression import Expression
from mathics.core.atoms import Integer, Real
from mathics.core.symbols import Symbol
from mathics.builtin.compile.types import int_type, real_type, bool_type, void_type
from mathics.built... | 34.152623 | 98 | 0.585234 |
051b8b915408612e645a7aaf5f398ce8dfcd0a52 | 6,437 | py | Python | VQ2D/vq2d/metrics/spatio_temporal_metrics.py | emulhall/episodic-memory | 27bafec6e09c108f0efe5ac899eabde9d1ac40cc | [
"MIT"
] | 27 | 2021-10-16T02:39:17.000Z | 2022-03-31T11:16:11.000Z | VQ2D/vq2d/metrics/spatio_temporal_metrics.py | emulhall/episodic-memory | 27bafec6e09c108f0efe5ac899eabde9d1ac40cc | [
"MIT"
] | 5 | 2022-03-23T04:53:36.000Z | 2022-03-29T23:39:07.000Z | VQ2D/vq2d/metrics/spatio_temporal_metrics.py | emulhall/episodic-memory | 27bafec6e09c108f0efe5ac899eabde9d1ac40cc | [
"MIT"
] | 13 | 2021-11-25T19:17:29.000Z | 2022-03-25T14:01:47.000Z | from collections import OrderedDict
from typing import Dict, List, Sequence
import numpy as np
import pandas as pd
from ..structures import ResponseTrack
from .utils import PRINT_FORMAT
from .utils import spatio_temporal_iou, interpolated_prec_rec
# These are modified versions of the ActivityNet evaluation toolkit
... | 36.367232 | 88 | 0.62902 |
6839a45746ab2766109b6d29712185014e5304d6 | 7,256 | py | Python | transformers/configuration_xlm.py | wietsedv/transformers | 8efc6dd544bf1a30d99d4b5abfc5e214699eab2b | [
"Apache-2.0"
] | 1 | 2019-11-20T06:01:32.000Z | 2019-11-20T06:01:32.000Z | transformers/configuration_xlm.py | wietsedv/transformers | 8efc6dd544bf1a30d99d4b5abfc5e214699eab2b | [
"Apache-2.0"
] | null | null | null | transformers/configuration_xlm.py | wietsedv/transformers | 8efc6dd544bf1a30d99d4b5abfc5e214699eab2b | [
"Apache-2.0"
] | 1 | 2021-07-14T18:53:48.000Z | 2021-07-14T18:53:48.000Z | # coding=utf-8
# Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team.
#
# 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
#
# Un... | 42.934911 | 121 | 0.659316 |
96a88045f748ed4269974adad66c87e83e17358d | 1,901 | py | Python | zhihu/zhihu/zhihu/middlewares.py | jfzhang95/web_spider | 9ad31d9cbbdf2a4bddfed8e649d5e0fa1b24d1b6 | [
"MIT"
] | null | null | null | zhihu/zhihu/zhihu/middlewares.py | jfzhang95/web_spider | 9ad31d9cbbdf2a4bddfed8e649d5e0fa1b24d1b6 | [
"MIT"
] | null | null | null | zhihu/zhihu/zhihu/middlewares.py | jfzhang95/web_spider | 9ad31d9cbbdf2a4bddfed8e649d5e0fa1b24d1b6 | [
"MIT"
] | 1 | 2020-05-16T06:55:36.000Z | 2020-05-16T06:55:36.000Z | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
class ZhihuSpiderMiddleware(object):
# Not all methods need to be defined. If a method is not defined,
# scrapy act... | 33.350877 | 78 | 0.672804 |
f555b37be33f43bf43a9dd3618def49c4b90ad63 | 5,993 | py | Python | hackjohn.py | teresatrow/jmt | 3a7aad0ad786abb30065aab1669a24f6321316b4 | [
"MIT"
] | 1 | 2020-01-24T02:03:20.000Z | 2020-01-24T02:03:20.000Z | hackjohn.py | teresatrow/jmt | 3a7aad0ad786abb30065aab1669a24f6321316b4 | [
"MIT"
] | null | null | null | hackjohn.py | teresatrow/jmt | 3a7aad0ad786abb30065aab1669a24f6321316b4 | [
"MIT"
] | null | null | null | """
Bot to monitor for southbound permit spaces on the John Muir Trail
Written by Daniel Himmelstein
Check whether any spaces are available for the
"Donohue Exit Quota and Trailhead Space Available".
This is for people hiking the John Muir Trail starting in Yosemite.
According to the reservations office,
the table is... | 32.928571 | 92 | 0.727849 |
2a8e942238799e0a21db68bcc849003ac97d7e64 | 6,034 | py | Python | starry/_plotting.py | rodluger/starry | da7fee48c5ef94278f0047be0579e2f13492cdd5 | [
"MIT"
] | 116 | 2018-02-23T19:47:15.000Z | 2022-02-21T04:43:46.000Z | starry/_plotting.py | rodluger/starry | da7fee48c5ef94278f0047be0579e2f13492cdd5 | [
"MIT"
] | 224 | 2018-02-26T00:41:51.000Z | 2022-03-29T10:38:16.000Z | starry/_plotting.py | rodluger/starry | da7fee48c5ef94278f0047be0579e2f13492cdd5 | [
"MIT"
] | 25 | 2018-02-26T18:14:36.000Z | 2021-11-30T01:00:56.000Z | # -*- coding: utf-8 -*-
from ._constants import *
import numpy as np
__all__ = [
"get_ortho_latitude_lines",
"get_ortho_longitude_lines",
"get_moll_latitude_lines",
"get_moll_longitude_lines",
"get_projection",
]
def RAxisAngle(axis=[0, 1, 0], theta=0):
""" """
cost = np.cos(theta)
s... | 28.870813 | 74 | 0.445973 |
8c321484dd8ac7f739b8d3ad1c9eab678b54e31a | 2,352 | py | Python | mc_verror.py | Vrroom/pacPlanning | cd149af0332c626521dabe95c3d2cfc706737272 | [
"MIT"
] | null | null | null | mc_verror.py | Vrroom/pacPlanning | cd149af0332c626521dabe95c3d2cfc706737272 | [
"MIT"
] | null | null | null | mc_verror.py | Vrroom/pacPlanning | cd149af0332c626521dabe95c3d2cfc706737272 | [
"MIT"
] | null | null | null | from constants import *
import sys
import random
from MarkovChainEsti import markovchainesti
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from MDPclass import myMDP
from util import *
def main(argv):
print(argv[1][argv[1].find('/')+1:])
mdpname = argv[1][argv[1].find('/')+1:]
lines = [lin... | 42 | 181 | 0.729592 |
4394dc0a6b8d47944b31552a8a9939b636e22684 | 891 | py | Python | study_management/rest_permissions.py | jdkizer9/ls2_app | 8b4c37b44a673d1919a0e52b72f529b7e1abd2e3 | [
"Apache-2.0"
] | null | null | null | study_management/rest_permissions.py | jdkizer9/ls2_app | 8b4c37b44a673d1919a0e52b72f529b7e1abd2e3 | [
"Apache-2.0"
] | 7 | 2020-02-05T04:57:01.000Z | 2022-02-10T06:51:23.000Z | study_management/rest_permissions.py | jdkizer9/ls2_app | 8b4c37b44a673d1919a0e52b72f529b7e1abd2e3 | [
"Apache-2.0"
] | null | null | null | from rest_framework import permissions
from .models import ParticipantAccountGenerator, ParticipantAccountToken
import logging
# Get an instance of a logger
logger = logging.getLogger(__name__)
## might also want to add a check for IPs
class ParticipantAccountGeneratorPermission(permissions.BasePermission):
de... | 28.741935 | 82 | 0.754209 |
3f04720eb76cc73fec5551fdf54e8880387a4139 | 5,882 | py | Python | ros/src/waypoint_updater/waypoint_updater.py | mahadirz/CarND-Capstone | 0b3532d339f5d7548a0a995b99b4fe56d06340bf | [
"MIT"
] | null | null | null | ros/src/waypoint_updater/waypoint_updater.py | mahadirz/CarND-Capstone | 0b3532d339f5d7548a0a995b99b4fe56d06340bf | [
"MIT"
] | null | null | null | ros/src/waypoint_updater/waypoint_updater.py | mahadirz/CarND-Capstone | 0b3532d339f5d7548a0a995b99b4fe56d06340bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
import numpy as np
import rospy
from geometry_msgs.msg import PoseStamped
from scipy.spatial import KDTree
from std_msgs.msg import Int32
from styx_msgs.msg import Lane, Waypoint
import os
import sys
currentdir = os.path.dirname(os.path.realpath(__file__))
styxdir = os.path.join(os.... | 33.611429 | 111 | 0.645359 |
bf98032b881d8ea80b81da81c17ed4133d396ce3 | 997 | py | Python | pyfyre/widgets/clickable.py | MrSluffy/pyfyre | e0b7fd32c230d8b2879123e8d2e91367b41e82f3 | [
"MIT"
] | null | null | null | pyfyre/widgets/clickable.py | MrSluffy/pyfyre | e0b7fd32c230d8b2879123e8d2e91367b41e82f3 | [
"MIT"
] | null | null | null | pyfyre/widgets/clickable.py | MrSluffy/pyfyre | e0b7fd32c230d8b2879123e8d2e91367b41e82f3 | [
"MIT"
] | null | null | null | from pyfyre.widgets.widget import Widget
class Clickable(Widget):
"""Creates a Clickable widget.
This wraps your widget into a clickable state. Just like InkWell
in Flutter. Every widget (except Button) has no built-in onClick method
so to allow then to be clickable, you must wrap them with this [Clic... | 32.16129 | 86 | 0.643932 |
a58cfdd89d6c4889f7d2c89cb233999e13ac6f46 | 5,985 | py | Python | vl/evaluate_logreg.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | 1 | 2018-02-23T16:49:30.000Z | 2018-02-23T16:49:30.000Z | vl/evaluate_logreg.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | null | null | null | vl/evaluate_logreg.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | null | null | null | import sys
import warnings
warnings.simplefilter('ignore', UserWarning)
from keras.models import Sequential
from keras.layers import Dense
import h5py
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
plt.switch_backend('agg')
import numpy as np
import pandas as pd
from vl.data imp... | 40.714286 | 132 | 0.668338 |
5623b94f89274b48ed37c5601e96ec590714b4be | 9,095 | py | Python | lite/examples/recommendation/ml/model/recommendation_model_launcher_keras.py | BIINNNN/capstone_firebase | ec190b67c8c395ef28e2a494b2fb4b04611edd77 | [
"Apache-2.0"
] | 2 | 2020-12-30T11:26:04.000Z | 2021-06-01T01:06:16.000Z | lite/examples/recommendation/ml/model/recommendation_model_launcher_keras.py | rishiraj/examples | 75f5fe09e252e512ac4208bd80e504229597e533 | [
"Apache-2.0"
] | 2 | 2021-08-21T08:12:07.000Z | 2021-08-31T04:58:04.000Z | lite/examples/recommendation/ml/model/recommendation_model_launcher_keras.py | rishiraj/examples | 75f5fe09e252e512ac4208bd80e504229597e533 | [
"Apache-2.0"
] | 8 | 2021-05-01T04:50:58.000Z | 2021-05-01T07:57:04.000Z | # Lint as: python3
# Copyright 2019 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... | 35.807087 | 100 | 0.719406 |
22a2a20bb6dfcdcda5d89891dd96d2df2f385d7e | 3,307 | py | Python | garjmcmctdem_utils/misc_utils.py | Neil-Symington/aem_interp_dash | f7c6f385838b455a2c1e9d3a1db5f675a327b8dd | [
"Apache-2.0"
] | 2 | 2020-09-08T05:38:23.000Z | 2021-04-25T11:37:12.000Z | garjmcmctdem_utils/misc_utils.py | Neil-Symington/aem_interp_dash | f7c6f385838b455a2c1e9d3a1db5f675a327b8dd | [
"Apache-2.0"
] | 2 | 2020-07-29T04:30:07.000Z | 2021-01-28T04:32:15.000Z | garjmcmctdem_utils/misc_utils.py | Neil-Symington/aem_interp_dash | f7c6f385838b455a2c1e9d3a1db5f675a327b8dd | [
"Apache-2.0"
] | 2 | 2020-12-02T02:10:00.000Z | 2021-04-25T11:39:03.000Z | #!/usr/bin/env python
#===============================================================================
# Copyright 2017 Geoscience Australia
#
# 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 ... | 28.508621 | 85 | 0.569701 |
2a66810278f712b5346661b8dfe9d31b3627c452 | 3,380 | py | Python | orbitdbapi/client.py | phillmac/py-orbit-db-http-client-dev | 5f806572cf78feda7faa43ce9025415518183921 | [
"MIT"
] | 1 | 2019-06-24T08:35:41.000Z | 2019-06-24T08:35:41.000Z | orbitdbapi/client.py | phillmac/py-orbit-db-http-client-dev | 5f806572cf78feda7faa43ce9025415518183921 | [
"MIT"
] | null | null | null | orbitdbapi/client.py | phillmac/py-orbit-db-http-client-dev | 5f806572cf78feda7faa43ce9025415518183921 | [
"MIT"
] | 1 | 2019-06-24T08:38:51.000Z | 2019-06-24T08:38:51.000Z | import json
import logging
from pprint import pformat
from urllib.parse import quote as urlquote
import httpx
from sseclient import SSEClient
from .db import DB
class OrbitDbAPI ():
def __init__ (self, **kwargs):
self.logger = logging.getLogger(__name__)
self.__config = kwargs
self.__bas... | 31.588785 | 91 | 0.601479 |
c013bb20fc0e1e671a60b7b7484266aa99ca8026 | 1,335 | py | Python | main.py | getsentry/sentry-defender-server | 4b61b03d6de4b1f5a13837590cd5839b042652f9 | [
"MIT"
] | null | null | null | main.py | getsentry/sentry-defender-server | 4b61b03d6de4b1f5a13837590cd5839b042652f9 | [
"MIT"
] | null | null | null | main.py | getsentry/sentry-defender-server | 4b61b03d6de4b1f5a13837590cd5839b042652f9 | [
"MIT"
] | null | null | null | import json
import itertools
import collections
import math
import flask
import requests
import sentry_sdk
_DATA_PREFIX = "data:"
sentry_sdk.init(
# DSN configured as envvar in google cloud run
traces_sample_rate=1.0
)
def main(request):
max_lines = int(request.args.get("max_lines", 1000))
upstream_... | 21.885246 | 79 | 0.604494 |
8933281bb368be1214339da4184b25af16891cde | 13,477 | py | Python | RADMC3D/sim_grid.py | vegajustin26/dyn-masses | 9ff73fcec53beac59557c95fb1e47dc22947a333 | [
"MIT"
] | null | null | null | RADMC3D/sim_grid.py | vegajustin26/dyn-masses | 9ff73fcec53beac59557c95fb1e47dc22947a333 | [
"MIT"
] | null | null | null | RADMC3D/sim_grid.py | vegajustin26/dyn-masses | 9ff73fcec53beac59557c95fb1e47dc22947a333 | [
"MIT"
] | 2 | 2019-10-02T20:55:36.000Z | 2020-07-06T14:41:50.000Z | import os
import sys
import yaml
import numpy as np
import scipy.constants as sc
from scipy.interpolate import interp1d
from stellarspectrum import stellarspectrum
class sim_grid:
# constants
msun = 1.989e33
lsun = 3.826e33
AU = sc.au * 1e2
mu = 2.37
m_p = sc.m_p * 1e3
kB = sc.k * 1e7
... | 40.963526 | 105 | 0.500037 |
e87031c91ebd9ce182403938ed9ea39f57377db8 | 11,576 | py | Python | tests/data/test_metapath_walker.py | xugangwu95/stellargraph | f26f7733235573f5def19da3329fc1d92fdd71ee | [
"Apache-2.0"
] | 1 | 2021-09-24T09:38:01.000Z | 2021-09-24T09:38:01.000Z | tests/data/test_metapath_walker.py | kjun9/stellargraph | 512e60a8f572a4bb432b0397a2b452251e167d8f | [
"Apache-2.0"
] | null | null | null | tests/data/test_metapath_walker.py | kjun9/stellargraph | 512e60a8f572a4bb432b0397a2b452251e167d8f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017-2018 Data61, CSIRO
#
# 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.984026 | 113 | 0.55952 |
d516aafa28191933427642c207f31b0b92ed40e7 | 29,168 | py | Python | yt_dlp/extractor/twitter.py | YuanHsing/yt-dlp | 38d86f4d45cf2b764f79141c602356fbb426a4b6 | [
"Unlicense"
] | 1 | 2021-12-13T14:12:47.000Z | 2021-12-13T14:12:47.000Z | yt_dlp/extractor/twitter.py | YuanHsing/yt-dlp | 38d86f4d45cf2b764f79141c602356fbb426a4b6 | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/twitter.py | YuanHsing/yt-dlp | 38d86f4d45cf2b764f79141c602356fbb426a4b6 | [
"Unlicense"
] | null | null | null | import re
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_parse_qs,
compat_urllib_parse_unquote,
compat_urllib_parse_urlparse,
)
from ..utils import (
dict_get,
ExtractorError,
format_field,
float_or_none,
int_or_none,
traverse_obj,
try_get,... | 41.668571 | 217 | 0.540798 |
da8d06762d646fd073618b098590c9caaabb51ba | 1,565 | py | Python | apps/api/src/hyp3_api/util.py | jhkennedy/hyp3 | b69fb47832ec9c69ae6a796b0351d994e09e3951 | [
"BSD-3-Clause"
] | 10 | 2021-02-02T15:39:57.000Z | 2022-01-22T01:00:04.000Z | apps/api/src/hyp3_api/util.py | jhkennedy/hyp3 | b69fb47832ec9c69ae6a796b0351d994e09e3951 | [
"BSD-3-Clause"
] | 86 | 2020-08-10T16:39:53.000Z | 2022-03-31T19:37:17.000Z | apps/api/src/hyp3_api/util.py | jhkennedy/hyp3 | b69fb47832ec9c69ae6a796b0351d994e09e3951 | [
"BSD-3-Clause"
] | 4 | 2020-10-06T19:56:39.000Z | 2021-12-20T18:36:16.000Z | import binascii
import json
from base64 import b64decode, b64encode
from datetime import datetime, timezone
from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse
import dynamo
class TokenDeserializeError(Exception):
"""Raised when paging results and `start_token` fails to deserialize"""
def get_g... | 28.454545 | 95 | 0.736102 |
cde626f18d19462e6ad2d30cdd41f40c6eda382b | 1,475 | py | Python | QFileDialogExample.py | jwlee95/adafruit_guide_fft-master | dabbeabdf667e5f239ddce08f17101f4f996b49a | [
"Unlicense",
"MIT"
] | null | null | null | QFileDialogExample.py | jwlee95/adafruit_guide_fft-master | dabbeabdf667e5f239ddce08f17101f4f996b49a | [
"Unlicense",
"MIT"
] | null | null | null | QFileDialogExample.py | jwlee95/adafruit_guide_fft-master | dabbeabdf667e5f239ddce08f17101f4f996b49a | [
"Unlicense",
"MIT"
] | null | null | null | import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class filedialogdemo(QWidget):
def __init__(self, parent=None):
super(filedialogdemo, self).__init__(parent)
layout = QVBoxLayout()
self.btn = QPushButton("QFileDialog static method demo")
self.btn.clicked.connect(sel... | 26.818182 | 80 | 0.587119 |
af9499a3bfd8951740e0c8752961e27bd701f77b | 1,679 | py | Python | src/main/python/jep/redirect_streams.py | seletz/jep | efde9b537b0fdd04b9618a0c03b05310b700d04b | [
"Zlib"
] | 210 | 2015-01-08T14:49:19.000Z | 2017-07-31T19:25:36.000Z | src/main/python/jep/redirect_streams.py | seletz/jep | efde9b537b0fdd04b9618a0c03b05310b700d04b | [
"Zlib"
] | 76 | 2015-01-05T19:30:30.000Z | 2017-08-02T16:23:52.000Z | src/main/python/jep/redirect_streams.py | seletz/jep | efde9b537b0fdd04b9618a0c03b05310b700d04b | [
"Zlib"
] | 40 | 2015-02-09T12:50:44.000Z | 2017-07-30T00:09:52.000Z | #
# Copyright (c) 2016-2021 JEP AUTHORS.
#
# This file is licensed under the the zlib/libpng License.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any
# damages arising from the use of this software.
#
# Permission is granted to anyon... | 32.921569 | 69 | 0.726027 |
20a99ffd88998a5ca3266725ae8daebb11ce84d9 | 805 | py | Python | manage.py | light-white/meeting | 464c1047d3cd9e620f9a4095f453186ef81cc854 | [
"Apache-2.0"
] | null | null | null | manage.py | light-white/meeting | 464c1047d3cd9e620f9a4095f453186ef81cc854 | [
"Apache-2.0"
] | null | null | null | manage.py | light-white/meeting | 464c1047d3cd9e620f9a4095f453186ef81cc854 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meeting.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | 35 | 77 | 0.642236 |
3ffb30882618f046e73c35d686da19bbf79c5947 | 1,093 | py | Python | demos/demo_dim_reduction.py | nfahlgren/hsi_toolkit_py | 3a03c58bbeaf7b323fa345a22531fa00c56e68b6 | [
"MIT"
] | 22 | 2019-02-07T03:55:37.000Z | 2021-09-26T06:47:07.000Z | demos/demo_dim_reduction.py | nfahlgren/hsi_toolkit_py | 3a03c58bbeaf7b323fa345a22531fa00c56e68b6 | [
"MIT"
] | 2 | 2020-04-14T18:21:23.000Z | 2020-11-11T08:07:38.000Z | demos/demo_dim_reduction.py | nfahlgren/hsi_toolkit_py | 3a03c58bbeaf7b323fa345a22531fa00c56e68b6 | [
"MIT"
] | 15 | 2019-02-07T03:56:59.000Z | 2022-02-24T07:42:57.000Z | from scipy.io import loadmat
from hsi_toolkit.dim_reduction import *
from hsi_toolkit.dev.dim_reduction.mnf import *
from hsi_toolkit.util import get_RGB
# Demo script that runs all dimensionality reduction methods in hsi_toolkit_py
#
# Inputs:
# img: hyperspectral data cube (n_row x n_col x n_bands)
# wavelengths: v... | 27.325 | 78 | 0.754803 |
38a6d90eb13f6ddfd8bb6578adc02d2d71f71bb0 | 5,603 | py | Python | tests/ozpcenter_api/test_api_listing_feedback.py | emosher/ozp-backend | d31d00bb8a28a8d0c999813f616b398f41516244 | [
"Apache-2.0"
] | 1 | 2018-10-05T17:03:01.000Z | 2018-10-05T17:03:01.000Z | tests/ozpcenter_api/test_api_listing_feedback.py | emosher/ozp-backend | d31d00bb8a28a8d0c999813f616b398f41516244 | [
"Apache-2.0"
] | 1 | 2017-01-06T19:20:32.000Z | 2017-01-06T19:20:32.000Z | tests/ozpcenter_api/test_api_listing_feedback.py | emosher/ozp-backend | d31d00bb8a28a8d0c999813f616b398f41516244 | [
"Apache-2.0"
] | 7 | 2016-12-16T15:42:05.000Z | 2020-09-05T01:11:27.000Z | from django.test import override_settings
from ozpcenter.scripts import sample_data_generator as data_gen
from tests.ozp.cases import APITestCase
from tests.ozpcenter.helper import APITestHelper
@override_settings(ES_ENABLED=False)
class ListingFeedbackApiTest(APITestCase):
@classmethod
def setUpTestData(cl... | 42.12782 | 100 | 0.663395 |
1dde72816d50fbd6e7db4876f5b407c95358bccc | 2,276 | py | Python | docs/conf.py | Cashiuus/nmap-manager | 6d53bb4464f6b74ca40d5685a44f36942e5462b0 | [
"MIT"
] | null | null | null | docs/conf.py | Cashiuus/nmap-manager | 6d53bb4464f6b74ca40d5685a44f36942e5462b0 | [
"MIT"
] | 9 | 2022-01-25T05:27:42.000Z | 2022-03-31T05:30:02.000Z | docs/conf.py | Cashiuus/nmap-manager | 6d53bb4464f6b74ca40d5685a44f36942e5462b0 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 36.126984 | 79 | 0.66696 |
d80aacc459735c53f848d1f1f10e8d95266c3941 | 64 | py | Python | store/bestbuy/__init__.py | ARMcK-hub/bestbot | 76f44cd67dc050637c494488b118066139693acd | [
"MIT"
] | 1 | 2021-11-13T07:37:26.000Z | 2021-11-13T07:37:26.000Z | store/bestbuy/__init__.py | ARMcK-hub/BestBot | 6071041fc63e4a3fb453c7addc95987ecb8d2f30 | [
"MIT"
] | 2 | 2022-02-24T08:16:14.000Z | 2022-02-28T00:09:00.000Z | store/bestbuy/__init__.py | ARMcK-hub/bestbot | 76f44cd67dc050637c494488b118066139693acd | [
"MIT"
] | null | null | null | from .bestbuy_item import BestBuyItem
__all__ = ["BestBuyItem"] | 21.333333 | 37 | 0.796875 |
acf514d3e333a166d7a0ba98160f2245b83e1af0 | 4,240 | py | Python | services/codespeed/fabfile.py | graingert/braid | 1df63c5d8b44e079487be2f0bf099108a77872e5 | [
"MIT"
] | 8 | 2015-10-18T11:02:54.000Z | 2019-03-29T18:33:18.000Z | services/codespeed/fabfile.py | graingert/braid | 1df63c5d8b44e079487be2f0bf099108a77872e5 | [
"MIT"
] | 214 | 2015-01-19T06:58:36.000Z | 2022-02-10T10:22:30.000Z | services/codespeed/fabfile.py | graingert/braid | 1df63c5d8b44e079487be2f0bf099108a77872e5 | [
"MIT"
] | 12 | 2015-02-08T17:32:13.000Z | 2020-10-25T22:22:59.000Z | """
Support for benchmark reporting.
"""
from StringIO import StringIO
import os
import random
from fabric.api import execute, run, settings, env, put, cd
from braid import git, cron, archive, utils
from braid.twisted import service
from braid.tasks import addTasks
from braid import config
__all__ = [ 'config' ]
... | 31.641791 | 87 | 0.547877 |
8c0f7e8a16a52ca7588a40cefb73428156a14f7d | 34,055 | py | Python | openair2/X2AP/MESSAGES/ASN1/asn1tostruct.py | shadansari/onos-cu-cp | 16cbf4828bd11e4c7319e7a009a26b6f39fde628 | [
"Apache-2.0"
] | 9 | 2019-09-09T19:57:39.000Z | 2022-02-16T02:03:51.000Z | openair2/X2AP/MESSAGES/ASN1/asn1tostruct.py | shadansari/onos-cu-cp | 16cbf4828bd11e4c7319e7a009a26b6f39fde628 | [
"Apache-2.0"
] | 2 | 2021-06-17T05:01:55.000Z | 2021-11-24T14:23:54.000Z | openair2/X2AP/MESSAGES/ASN1/asn1tostruct.py | shadansari/onos-cu-cp | 16cbf4828bd11e4c7319e7a009a26b6f39fde628 | [
"Apache-2.0"
] | 15 | 2019-12-27T00:55:51.000Z | 2022-03-28T02:13:45.000Z | import re, os, sys, string
import datetime
import getopt
import getpass
version = "1.0.2"
lines = ""
iesDefs = {}
ieofielist = {}
outdir = './'
filenames = []
verbosity = 0
prefix = ""
FAIL = '\033[91m'
WARN = '\033[93m'
ENDC = '\033[0m'
fileprefix = ""
fileprefix_first_upper = ""
def printFail(string):
sys.s... | 48.789398 | 216 | 0.545001 |
b0e955de41feb6c861402e09eb8e138d5aedd155 | 773 | py | Python | grout/migrations/0009_auto_20150429_1627.py | azavea/grout | 95a03fed19f8ac988fb6db95720f1ea3d16aee2c | [
"MIT"
] | 14 | 2018-09-05T01:07:36.000Z | 2020-09-08T22:25:30.000Z | grout/migrations/0009_auto_20150429_1627.py | azavea/grout | 95a03fed19f8ac988fb6db95720f1ea3d16aee2c | [
"MIT"
] | 9 | 2018-07-10T19:51:14.000Z | 2018-08-28T17:47:49.000Z | grout/migrations/0009_auto_20150429_1627.py | azavea/grout | 95a03fed19f8ac988fb6db95720f1ea3d16aee2c | [
"MIT"
] | 2 | 2018-09-05T09:37:37.000Z | 2020-07-08T15:38:41.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('grout', '0008_auto_20150429_1313'),
]
operations = [
migrations.AlterField(
model_name='itemschema',
... | 30.92 | 150 | 0.650712 |
6795a29a6f39182b8a230055c5a294c27c67dc66 | 2,244 | py | Python | portxpress/request/migrations/0001_initial.py | zoeinola/PortXpress | c69d9071e36a87942c3bba63a3ef079d06fe7baf | [
"MIT"
] | null | null | null | portxpress/request/migrations/0001_initial.py | zoeinola/PortXpress | c69d9071e36a87942c3bba63a3ef079d06fe7baf | [
"MIT"
] | null | null | null | portxpress/request/migrations/0001_initial.py | zoeinola/PortXpress | c69d9071e36a87942c3bba63a3ef079d06fe7baf | [
"MIT"
] | null | null | null | # Generated by Django 3.0.10 on 2020-11-21 21:36
import ckeditor_uploader.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
initial = True
dependenci... | 49.866667 | 188 | 0.64082 |
e32c47c5dd40cfe947483e92cb9873cda6a851a6 | 18,168 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-22T01:04:39.000Z | 2020-03-22T01:04:39.000Z | ansible/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-03-22T01:04:48.000Z | 2020-03-22T01:04:48.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | 37.305955 | 155 | 0.677125 |
560e08890ecc6bf4608862f9e639897feb51721b | 25,665 | py | Python | python3-virtualenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/shutil.py | GinaJame/Portfolio_MLH | 541709dcf034ddca885a8b08f9922dc352c113f8 | [
"MIT"
] | null | null | null | python3-virtualenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/shutil.py | GinaJame/Portfolio_MLH | 541709dcf034ddca885a8b08f9922dc352c113f8 | [
"MIT"
] | null | null | null | python3-virtualenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/shutil.py | GinaJame/Portfolio_MLH | 541709dcf034ddca885a8b08f9922dc352c113f8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
from os... | 30.26533 | 88 | 0.628521 |
3d20bf4688cb571ba667a07db9c58eba9a8ce77b | 2,243 | py | Python | infra/cifuzz/test_helpers.py | auvkone/oss-fuzz | dddfa6355993d0151e857aa3e4810cbd98c17a09 | [
"Apache-2.0"
] | 3 | 2018-02-21T20:17:08.000Z | 2021-03-13T01:34:20.000Z | infra/cifuzz/test_helpers.py | auvkone/oss-fuzz | dddfa6355993d0151e857aa3e4810cbd98c17a09 | [
"Apache-2.0"
] | 10 | 2020-08-06T11:48:16.000Z | 2021-06-28T10:17:12.000Z | infra/cifuzz/test_helpers.py | auvkone/oss-fuzz | dddfa6355993d0151e857aa3e4810cbd98c17a09 | [
"Apache-2.0"
] | 1 | 2018-01-12T03:50:33.000Z | 2018-01-12T03:50:33.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.985294 | 80 | 0.738297 |
fc256093457970bac722f76f5954aba3c5763c1f | 3,047 | py | Python | liquid/auth.py | js-mit/liquidmovies | 3e5f82e2e20bf532e055715e58c3361a4f4c487b | [
"MIT"
] | null | null | null | liquid/auth.py | js-mit/liquidmovies | 3e5f82e2e20bf532e055715e58c3361a4f4c487b | [
"MIT"
] | 2 | 2022-01-11T23:41:25.000Z | 2022-02-01T02:25:02.000Z | liquid/auth.py | js-mit/liquidmovies | 3e5f82e2e20bf532e055715e58c3361a4f4c487b | [
"MIT"
] | null | null | null | from typing import Optional
from flask import current_app as app
from flask_login import login_required, logout_user, current_user, login_user
from flask import render_template, request, redirect, url_for, flash
from .ui.forms import SignupForm, LoginForm
from .db import db_session
from .models import User
from . impor... | 27.7 | 77 | 0.650148 |
9e340fcc710d281793e2b89368944cc4f210d304 | 2,164 | py | Python | tests/v6/test_nodes.py | nanohest/elasticsearch-HQ | e7ee4858ca2f03d4d535ab9a377f79d2daa1d58d | [
"Apache-2.0"
] | 2 | 2019-11-13T06:17:38.000Z | 2019-11-13T06:21:39.000Z | tests/v6/test_nodes.py | rain1974/elasticsearch-HQ | 1936f4ae39ad55e7d006c694f0444a0b920bf167 | [
"Apache-2.0"
] | 3 | 2020-06-18T14:52:29.000Z | 2021-05-07T21:16:59.000Z | tests/v6/test_nodes.py | rain1974/elasticsearch-HQ | 1936f4ae39ad55e7d006c694f0444a0b920bf167 | [
"Apache-2.0"
] | 1 | 2019-06-04T17:36:28.000Z | 2019-06-04T17:36:28.000Z | __author__ = 'royrusso'
import jmespath
class TestNodes_v6:
def test_get_node_stats(self, fixture):
response = fixture.app.get('/api/nodes/%s/_stats' % fixture.cluster_v6_name)
assert 200 == response.status_code
res = fixture.get_response_data(response)
assert fixture.has_all_k... | 42.431373 | 160 | 0.666821 |
a8531ba187b45f3a0e9bf28112b9ce64ca0e148e | 11,713 | py | Python | generate-csvs/generate-fake-csv.generate-intermediary-vertices.py | Anant/dse-graph-supernode-generator | e09e7d17e281d867a0ddc1b4617dc2d6a1793552 | [
"Apache-2.0"
] | null | null | null | generate-csvs/generate-fake-csv.generate-intermediary-vertices.py | Anant/dse-graph-supernode-generator | e09e7d17e281d867a0ddc1b4617dc2d6a1793552 | [
"Apache-2.0"
] | null | null | null | generate-csvs/generate-fake-csv.generate-intermediary-vertices.py | Anant/dse-graph-supernode-generator | e09e7d17e281d867a0ddc1b4617dc2d6a1793552 | [
"Apache-2.0"
] | null | null | null | import csv
import math
import argparse
from faker import Faker
import datetime
import uuid
import os
import shutil
from pathlib import Path
current_file_abs_path = Path(__file__).parent.absolute()
fake = Faker('en_US')
class IntermediaryNodeGenerator():
"""
"""
supernode_uuids = []
# list of interm... | 42.904762 | 194 | 0.649535 |
fb13951d5820da7e3c92d6abd93c01e66021d9f7 | 686 | py | Python | feedler/endpoints.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 2 | 2020-10-29T16:27:21.000Z | 2021-06-07T12:47:46.000Z | feedler/endpoints.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 11 | 2017-05-09T10:50:28.000Z | 2021-12-15T17:01:23.000Z | feedler/endpoints.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 4 | 2017-04-24T13:06:55.000Z | 2021-06-04T02:18:32.000Z | # -*- coding: utf-8 -*-
from wagtail.api.v2.views import BaseAPIViewSet
from wagtail.api.v2.serializers import BaseSerializer
from wagtail.api.v2.filters import FieldsFilter, OrderingFilter, SearchFilter
from wagtail.api.v2.pagination import WagtailPagination
from .models import Entry
class EntrySerializer(BaseSeria... | 25.407407 | 77 | 0.695335 |
9668a709b533f7bdb58ded260c3e08fe85b9fd4e | 6,495 | py | Python | inference.py | shrookehab/Body-Language-and-Emotion-Recognition | a13068be1f8599fa2df6db925a98ac64fd2adf42 | [
"MIT"
] | null | null | null | inference.py | shrookehab/Body-Language-and-Emotion-Recognition | a13068be1f8599fa2df6db925a98ac64fd2adf42 | [
"MIT"
] | null | null | null | inference.py | shrookehab/Body-Language-and-Emotion-Recognition | a13068be1f8599fa2df6db925a98ac64fd2adf42 | [
"MIT"
] | 1 | 2022-02-27T13:34:24.000Z | 2022-02-27T13:34:24.000Z | import cv2
import numpy as np
import os
import torch
from torchvision import transforms
from emotic import Emotic
def process_images(context_norm, body_norm, image_context_path=None, image_context=None, image_body=None, bbox=None):
''' Prepare context and body image.
:param context_norm: List containing me... | 47.757353 | 171 | 0.74642 |
4abd13a36ff8adc71ccbeb527beb3d0399a9c1eb | 33,983 | py | Python | roles/common/templates/uug_ansible_wrapper.py | kylelaker/test-actions-temp | eb68a0e1aba0b288f60e94b9909fe6ca41141e72 | [
"MIT"
] | null | null | null | roles/common/templates/uug_ansible_wrapper.py | kylelaker/test-actions-temp | eb68a0e1aba0b288f60e94b9909fe6ca41141e72 | [
"MIT"
] | null | null | null | roles/common/templates/uug_ansible_wrapper.py | kylelaker/test-actions-temp | eb68a0e1aba0b288f60e94b9909fe6ca41141e72 | [
"MIT"
] | 1 | 2020-11-04T05:15:47.000Z | 2020-11-04T05:15:47.000Z | #!/usr/bin/env python3
"""
This tools creates a simple GUI for running ansible-pull with a
predetermined set of tags. It displays the output from the ansible-pull
command in a VTE within the GUI. It allows the user to override some things
in a configuration file (~/.config/vm_config). The branch to pull and the
URL to ... | 38.485844 | 108 | 0.629756 |
11469d31ec22b54928eda67d3c4acc0f85df0b2e | 3,535 | py | Python | Python/Zelle/Chapter11_DataCollections/ProgrammingExercises/3_ImprovedGPASort/ImprovedGPASort.py | jeffvswanson/CodingPractice | 9ea8e0dd504230cea0e8684b31ef22c3ed90d2fb | [
"MIT"
] | null | null | null | Python/Zelle/Chapter11_DataCollections/ProgrammingExercises/3_ImprovedGPASort/ImprovedGPASort.py | jeffvswanson/CodingPractice | 9ea8e0dd504230cea0e8684b31ef22c3ed90d2fb | [
"MIT"
] | null | null | null | Python/Zelle/Chapter11_DataCollections/ProgrammingExercises/3_ImprovedGPASort/ImprovedGPASort.py | jeffvswanson/CodingPractice | 9ea8e0dd504230cea0e8684b31ef22c3ed90d2fb | [
"MIT"
] | null | null | null | # improvedGPASort.py
# A program to sort student information by GPA, name, or credits.
"""Extend the gpasort program so that it allows the user to sort a file of
students based on GPA, name, or credits. Your program should prompt for the
input file, the field to sort on, and the output file."""
from gpaClass imp... | 32.136364 | 78 | 0.599151 |
47f634c2c0e63363e9880baa0b9638dff87ef69b | 444 | py | Python | packages/python/plotly/plotly/validators/layout/_extendiciclecolors.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/_extendiciclecolors.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/_extendiciclecolors.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ExtendiciclecolorsValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name="extendiciclecolors", parent_name="layout", **kwargs
):
super(ExtendiciclecolorsValidator, self).__init__(
plotly_name=plotly_name,
... | 31.714286 | 81 | 0.675676 |
f6095f8ea446becfe232211bc04862eb7abd7b3e | 1,124 | py | Python | tfdiffeq/fixed_grid.py | morgatron/tfdiffeq | ef646f85cbd0821749a03e7ab51e03e16798fab1 | [
"MIT"
] | 214 | 2019-02-10T08:24:12.000Z | 2022-03-31T06:15:05.000Z | tfdiffeq/fixed_grid.py | morgatron/tfdiffeq | ef646f85cbd0821749a03e7ab51e03e16798fab1 | [
"MIT"
] | 14 | 2019-03-02T14:56:29.000Z | 2021-12-28T13:06:45.000Z | tfdiffeq/fixed_grid.py | morgatron/tfdiffeq | ef646f85cbd0821749a03e7ab51e03e16798fab1 | [
"MIT"
] | 40 | 2019-03-03T12:55:09.000Z | 2022-02-11T02:14:47.000Z | from tfdiffeq import rk_common
from tfdiffeq.solvers import FixedGridODESolver
class Euler(FixedGridODESolver):
def step_func(self, func, t, dt, y):
return tuple(dt * f_ for f_ in func(t + self.eps, y))
@property
def order(self):
return 1
class Midpoint(FixedGridODESolver):
def ste... | 23.914894 | 94 | 0.6121 |
194a697b9ba9a216140af6e83cef76da6d2179d4 | 5,369 | py | Python | _app/update.py | johnbomidi/data-explorer-dash-app | 80df9928aa41a20d8098870662f444ba1fb1aa74 | [
"MIT"
] | null | null | null | _app/update.py | johnbomidi/data-explorer-dash-app | 80df9928aa41a20d8098870662f444ba1fb1aa74 | [
"MIT"
] | null | null | null | _app/update.py | johnbomidi/data-explorer-dash-app | 80df9928aa41a20d8098870662f444ba1fb1aa74 | [
"MIT"
] | null | null | null | import plotly.graph_objects as go
from dash import html, dash_table
from _app.gen import check_non_default_index, monotonic_cols_in_df, numeric_cols_in_df, datetime_strcols_in_df
def get_options(list_options):
dict_list = []
for i in list_options:
dict_list.append({'label': i, 'value': i})
return ... | 38.625899 | 128 | 0.481095 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.