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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c06e23ed799b3c26013ae87b60031567becb3c33 | 15,687 | py | Python | app.py | G-Radhika/BooksCatalogApp | 595a84b55086e4ee05c2b3b1107fa8d3506ca965 | [
"MIT"
] | null | null | null | app.py | G-Radhika/BooksCatalogApp | 595a84b55086e4ee05c2b3b1107fa8d3506ca965 | [
"MIT"
] | null | null | null | app.py | G-Radhika/BooksCatalogApp | 595a84b55086e4ee05c2b3b1107fa8d3506ca965 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect
from flask import jsonify, url_for, flash, session as login_session
from sqlalchemy import create_engine, asc
from sqlalchemy.orm import sessionmaker
from database_setup import Base, BookSeries, IndividualBook, User
import random
import string
# imports... | 42.860656 | 207 | 0.671894 |
f92f2efed4ddc52b04e5f912d2d90c9dd2642839 | 10,135 | py | Python | func/train_eval_ops.py | gongda0e/AVT | d6a7032b86416e852c76cc04a20ccabe34f111dc | [
"Apache-2.0"
] | 102 | 2021-09-24T03:49:34.000Z | 2022-03-29T19:55:50.000Z | func/train_eval_ops.py | gongda0e/AVT | d6a7032b86416e852c76cc04a20ccabe34f111dc | [
"Apache-2.0"
] | 32 | 2021-10-02T04:31:39.000Z | 2022-03-16T05:46:30.000Z | func/train_eval_ops.py | gongda0e/AVT | d6a7032b86416e852c76cc04a20ccabe34f111dc | [
"Apache-2.0"
] | 19 | 2021-09-25T01:57:37.000Z | 2022-03-15T07:02:37.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
"""
Modular implementation of the basic train ops
"""
from typing import Dict, Union, Tuple
import torch
import torch.nn as nn
import hydra
from hydra.types import TargetConf
from common import utils
from datasets.base_video_dataset import FUTURE_PREFIX
from models.... | 43.685345 | 83 | 0.551554 |
9f6dc01827aeac22b6a3b84669a4595bb6cb8a35 | 17,135 | py | Python | src/python/joint_state_publisher.py | quan-dao/ECN-MANIP | 4b455cb5e0db06d9e24b1a70dd7289a68f29067f | [
"MIT"
] | null | null | null | src/python/joint_state_publisher.py | quan-dao/ECN-MANIP | 4b455cb5e0db06d9e24b1a70dd7289a68f29067f | [
"MIT"
] | null | null | null | src/python/joint_state_publisher.py | quan-dao/ECN-MANIP | 4b455cb5e0db06d9e24b1a70dd7289a68f29067f | [
"MIT"
] | 3 | 2018-11-08T13:32:15.000Z | 2021-09-13T23:33:37.000Z | #!/usr/bin/env python
import rospy
import random
from python_qt_binding.QtCore import pyqtSlot
from python_qt_binding.QtCore import Qt
from python_qt_binding.QtCore import Signal
from python_qt_binding.QtGui import QFont
from python_qt_binding.QtWidgets import QApplication
from python_qt_binding.QtWidgets import QHBo... | 38.854875 | 120 | 0.564634 |
f90f5d930fb15540a14e95e705f189dfa2f40acc | 1,424 | py | Python | test/functional/wallet_resendwallettransactions.py | torunxxx001/MyOriginalCoin | 7f0558d07d065f1d89b7998d6beb088b8e941e7d | [
"MIT"
] | null | null | null | test/functional/wallet_resendwallettransactions.py | torunxxx001/MyOriginalCoin | 7f0558d07d065f1d89b7998d6beb088b8e941e7d | [
"MIT"
] | null | null | null | test/functional/wallet_resendwallettransactions.py | torunxxx001/MyOriginalCoin | 7f0558d07d065f1d89b7998d6beb088b8e941e7d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test resendwallettransactions RPC."""
from test_framework.test_framework import MyOriginalCoinTestFram... | 43.151515 | 151 | 0.742275 |
6830f7381beee5c886faf15a83c033172ec363e5 | 3,768 | py | Python | app.py | srdg/GRAider | 4850002b5794dd34538b62acc1489be0fc43b407 | [
"MIT"
] | null | null | null | app.py | srdg/GRAider | 4850002b5794dd34538b62acc1489be0fc43b407 | [
"MIT"
] | null | null | null | app.py | srdg/GRAider | 4850002b5794dd34538b62acc1489be0fc43b407 | [
"MIT"
] | null | null | null | try:
from tkinter import *
except:
import subprocess
subprocess.call(['pip3','install','tkinter'])
from tkinter import font
import shutil
import os, sys
import urllib.request
import requests
class downloadGradeCard():
def __init__(self,master):
'''
initializes and sets up UI requires the user to mention
s... | 34.254545 | 115 | 0.669851 |
0da3affe055e9cddc72a6e450dbb6e0ef4dda1ac | 2,506 | py | Python | cosmic-core/systemvm/patches/centos7/opt/cosmic/startup/setup_ssvm.py | RobbertJanSW/cosmic | 08cfd7be26bbd943de8a49c04042a7e08638b214 | [
"Apache-2.0"
] | null | null | null | cosmic-core/systemvm/patches/centos7/opt/cosmic/startup/setup_ssvm.py | RobbertJanSW/cosmic | 08cfd7be26bbd943de8a49c04042a7e08638b214 | [
"Apache-2.0"
] | null | null | null | cosmic-core/systemvm/patches/centos7/opt/cosmic/startup/setup_ssvm.py | RobbertJanSW/cosmic | 08cfd7be26bbd943de8a49c04042a7e08638b214 | [
"Apache-2.0"
] | null | null | null | import logging
import os
from utils import Utils
def setup_html():
html_dir = "/var/www/html/copy"
if not os.path.isdir(html_dir):
os.makedirs(html_dir, 0o755, True)
def setup_iptable_rules(cmdline):
iptables_rules = """
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0... | 25.571429 | 83 | 0.618117 |
5684f1976bb22fffb5b49debd8914197c130e4ea | 956 | py | Python | openstack_dashboard/dashboards/project/volumes/panel.py | ameoba/horizon | ff9e367c98a8bb79f10914abffaaa04b0a461819 | [
"Apache-2.0"
] | 2 | 2019-12-29T09:20:13.000Z | 2020-01-01T13:12:34.000Z | openstack_dashboard/dashboards/project/volumes/panel.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 1 | 2015-03-12T01:03:44.000Z | 2015-03-12T01:03:44.000Z | openstack_dashboard/dashboards/project/volumes/panel.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 30.83871 | 78 | 0.736402 |
963426f7641e12509298f2e5b683006f7272e0f7 | 3,338 | py | Python | Smart Buy/myproject/settings.py | chandankeshri1812/IEEE-Megaproject | 081479294d90914625315f9f2ce8a9e2020f3e00 | [
"MIT"
] | 8 | 2022-01-07T14:07:07.000Z | 2022-02-05T04:03:07.000Z | Smart Buy/myproject/settings.py | chandankeshri1812/IEEE-Megaproject | 081479294d90914625315f9f2ce8a9e2020f3e00 | [
"MIT"
] | 41 | 2022-01-08T08:42:08.000Z | 2022-02-28T01:49:15.000Z | Smart Buy/myproject/settings.py | chandankeshri1812/IEEE-Megaproject | 081479294d90914625315f9f2ce8a9e2020f3e00 | [
"MIT"
] | 50 | 2022-01-07T13:15:15.000Z | 2022-02-25T04:35:15.000Z | """
Django settings for myproject project.
Generated by 'django-admin startproject' using Django 4.0.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pathlib... | 25.875969 | 91 | 0.704314 |
aa5eaa34d2ce9770466e260eb750ade08ba62275 | 1,163 | py | Python | setup.py | LysandreJik/doc-builder | 6f689181aafb70b98a0c1035e202311e60f07f6c | [
"Apache-2.0"
] | null | null | null | setup.py | LysandreJik/doc-builder | 6f689181aafb70b98a0c1035e202311e60f07f6c | [
"Apache-2.0"
] | null | null | null | setup.py | LysandreJik/doc-builder | 6f689181aafb70b98a0c1035e202311e60f07f6c | [
"Apache-2.0"
] | null | null | null | # Doc-builder package setup.
# The line above is checked by some of the utilities in this repo, do not change it.
from setuptools import find_packages, setup
install_requires = ["tqdm", "pyyaml", "packaging", "nbformat"]
extras = {}
extras["transformers"] = ["transformers[dev]"]
extras["testing"] = ["pytest", "pyte... | 34.205882 | 96 | 0.692175 |
82f9cf71e3a867a6c4797754199353d7ee0dc887 | 782 | py | Python | checkov/terraform/checks/resource/aws/S3ObjectCopyEncryptedWithCMK.py | jamesholland-uk/checkov | d73fd4bd7096d48ab3434a92a177bcc55605460a | [
"Apache-2.0"
] | 1 | 2021-02-13T15:24:42.000Z | 2021-02-13T15:24:42.000Z | checkov/terraform/checks/resource/aws/S3ObjectCopyEncryptedWithCMK.py | jamesholland-uk/checkov | d73fd4bd7096d48ab3434a92a177bcc55605460a | [
"Apache-2.0"
] | 7 | 2021-04-12T06:54:07.000Z | 2022-03-21T14:04:14.000Z | checkov/terraform/checks/resource/aws/S3ObjectCopyEncryptedWithCMK.py | jamesholland-uk/checkov | d73fd4bd7096d48ab3434a92a177bcc55605460a | [
"Apache-2.0"
] | 1 | 2021-12-16T03:09:55.000Z | 2021-12-16T03:09:55.000Z | from checkov.common.models.consts import ANY_VALUE
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
from checkov.common.models.enums import CheckCategories
class S3ObjectCopyEncryptedWithCMK(BaseResourceValueCheck):
def __init__(self):
name = "Ensure S3 Object... | 35.545455 | 106 | 0.762148 |
a575a6dac2fdc58854714d382eb1feed82a07352 | 2,270 | py | Python | ooobuild/lo/drawing/framework/basic_pane_factory.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/drawing/framework/basic_pane_factory.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/drawing/framework/basic_pane_factory.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 42.830189 | 356 | 0.76696 |
2939e2770fb523882a5ceec188838d06d210e1d9 | 43,599 | py | Python | sdk/core/azure-core/tests/test_basic_transport.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/core/azure-core/tests/test_basic_transport.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/core/azure-core/tests/test_basic_transport.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license information.
# -------------------------------------------------------------------------
from six.mo... | 36.423559 | 149 | 0.641941 |
68b0edb448645cc1ec3735e533a8e694e11aa872 | 8,543 | py | Python | train_abstractor.py | silenceliang/Cascading-agents-hybridSum | 6c127df51bd8cc926878f62ebdb66bc1042bb58c | [
"MIT"
] | 1 | 2020-02-23T15:38:18.000Z | 2020-02-23T15:38:18.000Z | train_abstractor.py | silenceliang/CascadingAgentsHybridSum | 6c127df51bd8cc926878f62ebdb66bc1042bb58c | [
"MIT"
] | null | null | null | train_abstractor.py | silenceliang/CascadingAgentsHybridSum | 6c127df51bd8cc926878f62ebdb66bc1042bb58c | [
"MIT"
] | null | null | null | """ train the abstractor"""
import argparse
import json
import os
from os.path import join, exists
import pickle as pkl
from cytoolz import compose
import torch
from torch import optim
from torch.nn import functional as F
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch.utils.data import DataLoader
... | 38.138393 | 99 | 0.638886 |
71503e0df20e900fa7f9883d5159fc985aa88ac9 | 518 | py | Python | formatter.py | pooran/githubot | 87afe422cb4ac6e3888324e67c50aeeff81f9527 | [
"MIT"
] | 2 | 2018-03-08T16:57:54.000Z | 2018-12-14T23:48:33.000Z | formatter.py | pooran/githubot | 87afe422cb4ac6e3888324e67c50aeeff81f9527 | [
"MIT"
] | null | null | null | formatter.py | pooran/githubot | 87afe422cb4ac6e3888324e67c50aeeff81f9527 | [
"MIT"
] | 3 | 2018-09-01T16:17:07.000Z | 2021-10-13T03:41:13.000Z | import re
def format_issue(author, number, title, text, url):
max_length = 4000
if len(title + text) > max_length:
text = text[:max_length - len(title)] + '...'
string = ('<b>Issue #{}</b>\n'
'<b>Título:</b> {}\n'
'<b>Autor:</b> {}\n\n'
'{}\n\n'
... | 27.263158 | 73 | 0.449807 |
0325cc5c74249fc957fecf49949974ad375ea887 | 5,423 | py | Python | lib/os/__init__.py | wangwansan/grumpy | aff3b3ff62a34c5baa9783307764f640df021337 | [
"Apache-2.0"
] | 11,252 | 2017-01-04T16:19:12.000Z | 2022-03-31T13:42:31.000Z | lib/os/__init__.py | wangwansan/grumpy | aff3b3ff62a34c5baa9783307764f640df021337 | [
"Apache-2.0"
] | 301 | 2017-01-04T17:34:00.000Z | 2022-03-15T21:40:21.000Z | lib/os/__init__.py | wangwansan/grumpy | aff3b3ff62a34c5baa9783307764f640df021337 | [
"Apache-2.0"
] | 819 | 2017-01-04T17:26:26.000Z | 2022-03-20T14:11:28.000Z | # Copyright 2016 Google 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
#
# Unless required by applicable law or a... | 26.072115 | 78 | 0.678776 |
678b32f7a9fb0553d6b1753a5ea827c3bd12858a | 2,005 | py | Python | 2021/day25.py | mbcollins2/aoc | b94380fd5e92b4fe9f4af654e7762174c1c6ac91 | [
"MIT"
] | null | null | null | 2021/day25.py | mbcollins2/aoc | b94380fd5e92b4fe9f4af654e7762174c1c6ac91 | [
"MIT"
] | 3 | 2021-12-15T19:12:38.000Z | 2021-12-15T19:14:42.000Z | 2021/day25.py | mbcollins2/aoc | b94380fd5e92b4fe9f4af654e7762174c1c6ac91 | [
"MIT"
] | null | null | null | from util.util import base
from util import grid
from collections import defaultdict
class solve_day(base):
def __init__(self, type='data'):
super().__init__(type=type)
self.data = grid.parse_as_grid(self.data, dtype='str')
def get_moves(self, dir):
moves = defaultdict(str)
f... | 27.847222 | 73 | 0.458853 |
b79e6501a7f82561d1ab03a6129fde115713c666 | 17,243 | py | Python | octis/dataset/dataset.py | atypon/OCTIS | ff49bb3785197ca929c5626a3f04fbb917de2376 | [
"MIT"
] | null | null | null | octis/dataset/dataset.py | atypon/OCTIS | ff49bb3785197ca929c5626a3f04fbb917de2376 | [
"MIT"
] | null | null | null | octis/dataset/dataset.py | atypon/OCTIS | ff49bb3785197ca929c5626a3f04fbb917de2376 | [
"MIT"
] | null | null | null | import codecs
import json
import pickle
from os.path import join, exists
from pathlib import Path
import pandas as pd
from octis.dataset.downloader import get_data_home, _pkl_filepath, download_dataset
class Dataset:
"""
Dataset handles a dataset and offers methods to access, save and edit the dataset data
... | 36.377637 | 114 | 0.544801 |
4bb8e2093657109726e544796caf330dd10af5bf | 1,235 | py | Python | Angle_model_file/detect_img.py | HAIbingshuai/chinese_ocr | 36c06226b3762b2e516427579f2c2614770e60ae | [
"MIT"
] | 21 | 2019-11-16T15:12:17.000Z | 2022-02-24T03:08:44.000Z | Angle_model_file/detect_img.py | HAIbingshuai/chinese_ocr | 36c06226b3762b2e516427579f2c2614770e60ae | [
"MIT"
] | 1 | 2019-12-03T00:41:09.000Z | 2020-10-16T13:46:11.000Z | Angle_model_file/detect_img.py | HAIbingshuai/chinese_ocr | 36c06226b3762b2e516427579f2c2614770e60ae | [
"MIT"
] | 3 | 2019-12-10T02:43:20.000Z | 2021-05-12T07:31:41.000Z | # coding=utf-8 python3.6
# ================================================================
# Copyright (C) 2019 * Ltd. All rights reserved.
# license='MIT License'
# Author : haibingshuai
# Created date: 2019/11/8 9:38
# Description :
# ================================================================
... | 25.204082 | 66 | 0.519028 |
935eb517e05278cc10295b753607fdcd06ec500b | 3,409 | py | Python | modeling/backbones/resnet.py | CHENGY12/APNet | 95fc5b5893d562fe57600f9a1df589cf3711ee7b | [
"MIT"
] | 31 | 2021-07-29T15:52:33.000Z | 2022-03-17T07:01:48.000Z | modeling/backbones/resnet.py | Mawandasmat/APNet | 8ba6e078ff062415b2b2b34115bbadb4cfd6e827 | [
"MIT"
] | 7 | 2021-09-02T08:54:40.000Z | 2022-02-10T16:56:43.000Z | modeling/backbones/resnet.py | Mawandasmat/APNet | 8ba6e078ff062415b2b2b34115bbadb4cfd6e827 | [
"MIT"
] | 5 | 2021-08-30T00:55:18.000Z | 2021-10-19T03:13:11.000Z |
import math
import torch
from torch import nn
class Bottleneck(nn.Module):
expansion = 4
def __init__(self, inplanes, planes, stride=1, downsample=None):
super(Bottleneck, self).__init__()
self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, bias=False)
self.bn1 = nn.BatchNorm2d(... | 31.859813 | 77 | 0.565855 |
ffeb0bcfbaa095d5f3c6c5a007d61e5e56a570fc | 21,269 | py | Python | core/controllers/topic_viewer_test.py | abhinavrastogi2627/oppia | 1a6321c18cb57653787e9fed395a32eae33fbecb | [
"Apache-2.0"
] | null | null | null | core/controllers/topic_viewer_test.py | abhinavrastogi2627/oppia | 1a6321c18cb57653787e9fed395a32eae33fbecb | [
"Apache-2.0"
] | null | null | null | core/controllers/topic_viewer_test.py | abhinavrastogi2627/oppia | 1a6321c18cb57653787e9fed395a32eae33fbecb | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Oppia 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 ... | 44.966173 | 78 | 0.619493 |
eba5a441d78efa329f1bc931e66bad1f9d4556a0 | 806 | py | Python | globalitc/globalitc/urls.py | Ghevondyan04/new_globalitc.am | 7afffe58143590987b9e16a9d575bfa49ce3ef08 | [
"Apache-2.0"
] | null | null | null | globalitc/globalitc/urls.py | Ghevondyan04/new_globalitc.am | 7afffe58143590987b9e16a9d575bfa49ce3ef08 | [
"Apache-2.0"
] | null | null | null | globalitc/globalitc/urls.py | Ghevondyan04/new_globalitc.am | 7afffe58143590987b9e16a9d575bfa49ce3ef08 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from home_page.views import home_view, services_list_view, fac_program_view, fac_web_program_view, fac_multimedia_view
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
... | 42.421053 | 118 | 0.766749 |
b51d3979c662b2e11a126bfe14ae18a7c30e3266 | 34,449 | py | Python | ansible/lib/ansible/modules/core/files/unarchive.py | kiv-box/redis | 966a0c3f0a51282cd173b42a6e249d23f4e89dec | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/modules/core/files/unarchive.py | kiv-box/redis | 966a0c3f0a51282cd173b42a6e249d23f4e89dec | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/modules/core/files/unarchive.py | kiv-box/redis | 966a0c3f0a51282cd173b42a6e249d23f4e89dec | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2013, Dylan Martin <dmartin@seattlecentral.edu>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2016, Dag Wieers <dag@wieers.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redist... | 39.596552 | 223 | 0.568812 |
7d527ce1c0c35b42b2044c8b81d4fdaefbf15120 | 919 | py | Python | Lab06_GUI/exercise-42.py | rodrigoc-silva/Python-course | 327b20738a4b383510faddc0ec26a54be1bbd717 | [
"MIT"
] | null | null | null | Lab06_GUI/exercise-42.py | rodrigoc-silva/Python-course | 327b20738a4b383510faddc0ec26a54be1bbd717 | [
"MIT"
] | null | null | null | Lab06_GUI/exercise-42.py | rodrigoc-silva/Python-course | 327b20738a4b383510faddc0ec26a54be1bbd717 | [
"MIT"
] | null | null | null |
#this program demostrates a Button widget.
#When the user clicks the button, an info
#dialog box is displayed.
import tkinter
import tkinter.messagebox
class MyGUI:
def __init__(self):
#create the main widget
self.main_window = tkinter.Tk()
#create a button widget.
#The d... | 28.71875 | 81 | 0.595212 |
1cd0739cef82578ff8ae876d4ff8e164a3172dd4 | 11,950 | py | Python | cde-root/usr/lib64/python2.4/site-packages/Bio/PDB/Polypeptide.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | null | null | null | cde-root/usr/lib64/python2.4/site-packages/Bio/PDB/Polypeptide.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | null | null | null | cde-root/usr/lib64/python2.4/site-packages/Bio/PDB/Polypeptide.py | NirBenTalLab/proorigami-cde-package | 273379075830a9b94d3f2884661a54f853777ff6 | [
"MIT"
] | null | null | null | # Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
from types import StringType
from Bio.Alphabet import ProteinAlphabet
from Bio.Seq import... | 28.117647 | 82 | 0.533389 |
57bda62ab5e60118f2299455fdc87eaab4ef3052 | 3,162 | py | Python | chroma_core/management/__init__.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | chroma_core/management/__init__.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | chroma_core/management/__init__.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import django.contrib.auth.models
from django.contrib.contenttypes.models import ContentType
import django.contrib.auth as auth
from south.signals import post_migrate
i... | 43.315068 | 117 | 0.71284 |
4ebc15ef7053cdf1bbb12427c8c93e5db1b85655 | 5,246 | py | Python | test/gtest_xml_outfiles_test.py | CM-Archive/android_external_gtest | 75f109c3120bf78ee89124f1f21b50ea24225236 | [
"BSD-3-Clause"
] | 1 | 2019-01-31T05:16:59.000Z | 2019-01-31T05:16:59.000Z | test/gtest_xml_outfiles_test.py | CM-Archive/android_external_gtest | 75f109c3120bf78ee89124f1f21b50ea24225236 | [
"BSD-3-Clause"
] | null | null | null | test/gtest_xml_outfiles_test.py | CM-Archive/android_external_gtest | 75f109c3120bf78ee89124f1f21b50ea24225236 | [
"BSD-3-Clause"
] | 1 | 2019-01-31T05:17:00.000Z | 2019-01-31T05:17:00.000Z | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# 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 list... | 38.859259 | 140 | 0.727221 |
fa936cb125d27698927a89093b09a059c5d97cd9 | 931 | py | Python | gfootball/agent.py | level-antoine/football | 516f63da0ea4696f4c8b6668c65ac4b20385a8fa | [
"Apache-2.0"
] | null | null | null | gfootball/agent.py | level-antoine/football | 516f63da0ea4696f4c8b6668c65ac4b20385a8fa | [
"Apache-2.0"
] | null | null | null | gfootball/agent.py | level-antoine/football | 516f63da0ea4696f4c8b6668c65ac4b20385a8fa | [
"Apache-2.0"
] | 1 | 2022-03-02T14:01:00.000Z | 2022-03-02T14:01:00.000Z | import time
import gfootball.env as football_env
import random
class Agent:
def __init__(self):
pass
if __name__ == '__main__':
env = football_env.create_environment(env_name='1_vs_1_easy', representation='extracted', render=True)
state = env.reset()
action_simple = ... | 23.275 | 106 | 0.531686 |
ad1e78ba07a6af53098a2914b156e1a4d2a0e850 | 40,422 | py | Python | flow/coderepo/github/github.py | jander99/flow | 33c418547e3693bf277fd6d089d5f3242c83e14a | [
"Apache-2.0"
] | null | null | null | flow/coderepo/github/github.py | jander99/flow | 33c418547e3693bf277fd6d089d5f3242c83e14a | [
"Apache-2.0"
] | null | null | null | flow/coderepo/github/github.py | jander99/flow | 33c418547e3693bf277fd6d089d5f3242c83e14a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# github.py
import json
import os
import re
import shutil
import subprocess
import tarfile
import time
import requests
from flow.buildconfig import BuildConfig
from flow.coderepo.code_repo_abc import Code_Repo
import flow.utils.commons as cicommons
import flow.utils.commons as commons
from flow.uti... | 43.79415 | 229 | 0.597125 |
8ec9a1b7243ca1684da9a8a412738ef444351e5d | 936 | py | Python | Machine Learning Algorithms/a. Linear Regression/other works/Medical Cost Personal Datasets/MCPD Linear Regression Study.py | kerimmstfdemir/Machine_Learning_Algorithms_with_Python | 8e12b7d1ff437fccb543075d7757dbb2ba99f2a1 | [
"MIT"
] | null | null | null | Machine Learning Algorithms/a. Linear Regression/other works/Medical Cost Personal Datasets/MCPD Linear Regression Study.py | kerimmstfdemir/Machine_Learning_Algorithms_with_Python | 8e12b7d1ff437fccb543075d7757dbb2ba99f2a1 | [
"MIT"
] | null | null | null | Machine Learning Algorithms/a. Linear Regression/other works/Medical Cost Personal Datasets/MCPD Linear Regression Study.py | kerimmstfdemir/Machine_Learning_Algorithms_with_Python | 8e12b7d1ff437fccb543075d7757dbb2ba99f2a1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 16:09:03 2020
@author: Kerim Demir
"""
#import libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
#import data
received_dataset = pd.read_csv("insurance/insurance.csv")
dataset = received_... | 15.864407 | 57 | 0.725427 |
fc77bd05a1e67e84e0663b92ee98d589a9ac19f5 | 1,175 | wsgi | Python | wsgi/playdoh.wsgi | ANKIT-KS/fjord | fec88521d3179e11bc6d7a35587092167be02c48 | [
"BSD-3-Clause"
] | null | null | null | wsgi/playdoh.wsgi | ANKIT-KS/fjord | fec88521d3179e11bc6d7a35587092167be02c48 | [
"BSD-3-Clause"
] | null | null | null | wsgi/playdoh.wsgi | ANKIT-KS/fjord | fec88521d3179e11bc6d7a35587092167be02c48 | [
"BSD-3-Clause"
] | null | null | null | # This gets used by stage/prod to set up the WSGI application for stage/prod
# use. We do some minor environment setup and then have `fjord/wsgi.py` do
# the rest.
import os
import site
# Set up NewRelic stuff.
try:
import newrelic.agent
except ImportError:
newrelic = False
if newrelic:
newrelic_ini = o... | 26.111111 | 79 | 0.748085 |
4594d8bd7036f8def7c6155d365fe862af456356 | 348 | py | Python | backend/src/asset_manager/data/schemas/asset.py | JonathanLoscalzo/asset-license-dev-demo | 522c1d531e508ae7e85b212f804eee505d284b2b | [
"Xnet",
"X11"
] | null | null | null | backend/src/asset_manager/data/schemas/asset.py | JonathanLoscalzo/asset-license-dev-demo | 522c1d531e508ae7e85b212f804eee505d284b2b | [
"Xnet",
"X11"
] | null | null | null | backend/src/asset_manager/data/schemas/asset.py | JonathanLoscalzo/asset-license-dev-demo | 522c1d531e508ae7e85b212f804eee505d284b2b | [
"Xnet",
"X11"
] | null | null | null | from typing import Optional
from asset_manager.data.schemas.base import BaseMongoModel, PydanticObjectId
from asset_manager.models.models import TypeAssetEnum, uid
class AssetMongo(BaseMongoModel):
id: uid
brand: str
model: str
type: TypeAssetEnum
user: Optional[PydanticObjectId]
class Conf... | 20.470588 | 76 | 0.75 |
f9525ac6914d5dbd62e558ea5a3fe758a07fd542 | 6,210 | py | Python | tests/cli/test_experiment.py | deeplearninc/auger-ai | b50af35e8ea28b528ec233a2f4a8d4e412059be9 | [
"MIT"
] | null | null | null | tests/cli/test_experiment.py | deeplearninc/auger-ai | b50af35e8ea28b528ec233a2f4a8d4e412059be9 | [
"MIT"
] | 25 | 2019-07-09T04:26:19.000Z | 2020-07-21T06:43:25.000Z | tests/cli/test_experiment.py | deeplearninc/auger-ai | b50af35e8ea28b528ec233a2f4a8d4e412059be9 | [
"MIT"
] | 1 | 2019-07-09T15:19:13.000Z | 2019-07-09T15:19:13.000Z | import os
import pytest
from auger.cli.cli import cli
from .utils import interceptor, ORGANIZATIONS, PROJECTS
PROJECT_FILE = {
'data': {
'name': 'iris-1.csv',
'id': 1256,
'statistics': {
'columns_count': 5, 'count': 150,
'stat_data': [{
'datatype':... | 34.5 | 126 | 0.583575 |
813c20327cbe42cebe3e1557e2ecd69d712c4b58 | 1,258 | py | Python | dolphin_doc_lib/process_test.py | jianzhoufeng/dolphin-doc | 65def92b21bcde6a962458753e59002c2ac125b5 | [
"Apache-2.0"
] | 1 | 2019-09-04T10:28:46.000Z | 2019-09-04T10:28:46.000Z | dolphin_doc_lib/process_test.py | zhongbiaodev/dolphin-doc | d4134bdca2224f34a40a22277e8435edbfa393f6 | [
"Apache-2.0"
] | 1 | 2019-09-22T10:15:24.000Z | 2019-09-22T10:15:24.000Z | dolphin_doc_lib/process_test.py | jianzhoufeng/dolphin-doc | 65def92b21bcde6a962458753e59002c2ac125b5 | [
"Apache-2.0"
] | 1 | 2019-09-07T03:37:31.000Z | 2019-09-07T03:37:31.000Z | "Unit test for process"
from typing import cast
from dolphin_doc_lib.base.text import TextParagraph, TextSegment
from dolphin_doc_lib.process import process, Content, ContentSource
from dolphin_doc_lib.base.doc import Doc
def test_plain_text():
text = "paragraph 1\nparagraph 2\n\n \n \nparagraph 3\n"
doc =... | 38.121212 | 74 | 0.735294 |
6194a226533105a99b04750c80b72a986e3432c3 | 4,633 | py | Python | xlsxwriter/test/worksheet/test_worksheet09.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-25T06:08:09.000Z | 2019-11-01T02:33:56.000Z | xlsxwriter/test/worksheet/test_worksheet09.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2019-07-14T00:29:05.000Z | 2019-11-26T06:16:46.000Z | xlsxwriter/test/worksheet/test_worksheet09.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ..helperfunctions import _xml_to_list
from ...worksheet import Worksheet
from ...format ... | 34.834586 | 171 | 0.529031 |
e2e1117c03a9a899e70fcbfa3e569f714c8041d7 | 5,887 | py | Python | ykman/cli/apdu.py | maxthomas/yubikey-manager | 79bf111093401dbbe18ef7627d45e8c472ba17dd | [
"BSD-2-Clause"
] | null | null | null | ykman/cli/apdu.py | maxthomas/yubikey-manager | 79bf111093401dbbe18ef7627d45e8c472ba17dd | [
"BSD-2-Clause"
] | null | null | null | ykman/cli/apdu.py | maxthomas/yubikey-manager | 79bf111093401dbbe18ef7627d45e8c472ba17dd | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2020 Yubico AB
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditi... | 34.226744 | 88 | 0.618312 |
c178333c7f8850f50e1b427c9e8297d3d9e8b8bb | 5,074 | py | Python | mars/tensor/random/vonmises.py | haijohn/mars | 672b3a33a70565f01b1a3f508908445491d85acf | [
"Apache-2.0"
] | 1 | 2021-06-10T02:43:01.000Z | 2021-06-10T02:43:01.000Z | mars/tensor/random/vonmises.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | mars/tensor/random/vonmises.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# 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-... | 35.985816 | 88 | 0.667915 |
378645c49022aafce008b388a896d2de3586a77d | 1,459 | py | Python | Configuration/GenProduction/python/ThirteenTeV/GMSB_noSLHA/GMSB_L250TeV_Ctau200cm_Pythia8_13TeV_cff.py | zhangzc11/cms-gmsb-sps8-configs | 838e6aac1d13251e050c0ee8c4ed26ca0c6cef7e | [
"Apache-2.0"
] | null | null | null | Configuration/GenProduction/python/ThirteenTeV/GMSB_noSLHA/GMSB_L250TeV_Ctau200cm_Pythia8_13TeV_cff.py | zhangzc11/cms-gmsb-sps8-configs | 838e6aac1d13251e050c0ee8c4ed26ca0c6cef7e | [
"Apache-2.0"
] | null | null | null | Configuration/GenProduction/python/ThirteenTeV/GMSB_noSLHA/GMSB_L250TeV_Ctau200cm_Pythia8_13TeV_cff.py | zhangzc11/cms-gmsb-sps8-configs | 838e6aac1d13251e050c0ee8c4ed26ca0c6cef7e | [
"Apache-2.0"
] | null | null | null | with open("/cvmfs/cms.cern.ch/phys_generator/gridpacks/slc6_amd64_gcc481/13TeV/madgraph/GMSB_SHLA/GMSB_Lambda250TeV_CTau200cm.slha") as f:
SLHA_TABLE = f.read()
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP5... | 42.911765 | 138 | 0.632625 |
8e324c46337721d269fb542f86512c62f9b4ce3f | 410 | py | Python | utils/tool.py | HKUNLP/UnifiedSKG | 49a2ff950bb312b980c22ad72b11520db72ab6a3 | [
"Apache-2.0"
] | 191 | 2021-12-14T11:33:09.000Z | 2022-03-31T09:20:41.000Z | utils/tool.py | HKUNLP/UnifiedSKG | 49a2ff950bb312b980c22ad72b11520db72ab6a3 | [
"Apache-2.0"
] | 7 | 2022-01-20T05:41:51.000Z | 2022-03-20T06:43:22.000Z | utils/tool.py | HKUNLP/UnifiedSKG | 49a2ff950bb312b980c22ad72b11520db72ab6a3 | [
"Apache-2.0"
] | 22 | 2021-12-14T12:59:42.000Z | 2022-03-29T03:45:51.000Z | import importlib
def get_model(model):
Model = importlib.import_module('models.{}'.format(model)).Model
return Model
def get_constructor(constructor):
Constructor = importlib.import_module('{}'.format(constructor)).Constructor
return Constructor
def get_evaluator(evaluate_tool):
EvaluateTool =... | 24.117647 | 83 | 0.758537 |
db5ee61de20d488f4996518cc833ad1bdfe6d294 | 419 | py | Python | setup.py | docloud/luna.sso | a62c0ee788b72b39340165e41de16e248eb5edad | [
"MIT"
] | null | null | null | setup.py | docloud/luna.sso | a62c0ee788b72b39340165e41de16e248eb5edad | [
"MIT"
] | null | null | null | setup.py | docloud/luna.sso | a62c0ee788b72b39340165e41de16e248eb5edad | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
entry_points = [
]
setup(
name='luna.sso',
version='0.0.1',
description='Luna Project',
url='http://github.com/luna/luna',
include_package_data=True,
packages=find_packages(),
entry_points={"console_scripts": entry_points},... | 22.052632 | 58 | 0.675418 |
0d366264faa390921804bbe6ad027f89493a81a2 | 696 | py | Python | submit/migrations/versions/344c3f86394c_add_is_locked_field_.py | xavierholt/submit-cs | 70724b5dbc02d87e4b0e06c4ca4593be104919d6 | [
"BSD-2-Clause"
] | 10 | 2015-02-09T12:09:35.000Z | 2021-07-20T00:44:09.000Z | submit/migrations/versions/344c3f86394c_add_is_locked_field_.py | xavierholt/submit-cs | 70724b5dbc02d87e4b0e06c4ca4593be104919d6 | [
"BSD-2-Clause"
] | 20 | 2015-01-31T01:16:23.000Z | 2018-02-23T19:01:26.000Z | submit/migrations/versions/344c3f86394c_add_is_locked_field_.py | xavierholt/submit-cs | 70724b5dbc02d87e4b0e06c4ca4593be104919d6 | [
"BSD-2-Clause"
] | 6 | 2015-02-09T12:09:35.000Z | 2021-05-04T03:03:48.000Z | """Add is_locked field to testable.
Revision ID: 344c3f86394c
Revises: 15e554bd88aa
Create Date: 2013-10-14 21:02:27.239190
"""
# revision identifiers, used by Alembic.
revision = '344c3f86394c'
down_revision = '15e554bd88aa'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto gene... | 24.857143 | 77 | 0.662356 |
c7c1eeb58b6b31926536b9ce01e58cc5ed500222 | 978 | py | Python | kubernetes/test/test_v1beta1_token_review.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | 1 | 2019-07-12T05:38:06.000Z | 2019-07-12T05:38:06.000Z | kubernetes/test/test_v1beta1_token_review.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_token_review.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | 1 | 2021-05-18T12:25:56.000Z | 2021-05-18T12:25:56.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.733333 | 105 | 0.713701 |
32dc1702bb5bd934d7588dee9298dde14e0b8f0f | 1,638 | py | Python | setup.py | Global19-atlassian-net/hyperledger-py | f24e9cc409b50628b911950466786be6fe74f09f | [
"Apache-2.0"
] | 73 | 2016-04-19T06:49:59.000Z | 2020-04-24T16:55:53.000Z | setup.py | Global19-atlassian-net/hyperledger-py | f24e9cc409b50628b911950466786be6fe74f09f | [
"Apache-2.0"
] | 12 | 2016-06-01T03:46:25.000Z | 2018-01-11T02:35:13.000Z | setup.py | yeasy/hyperledger-py | f24e9cc409b50628b911950466786be6fe74f09f | [
"Apache-2.0"
] | 45 | 2016-04-19T03:24:35.000Z | 2020-07-31T17:10:02.000Z | #!/usr/bin/env python
import os
from setuptools import setup
from hyperledger import version
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
requirements = [
'requests >= 2.5.0',
'six >= 1.4.0',
# 'websocket-client >= 0.32.0',
]
exec(open('hyperledger/version.py').read())
with o... | 28.736842 | 61 | 0.64591 |
3b66adf46c30955c6c7241943b506f820dbc57e4 | 14,807 | py | Python | tests/conftest.py | uuip/redis-py | 8638d24f1480a747e90467dc9950a278a895182d | [
"MIT"
] | null | null | null | tests/conftest.py | uuip/redis-py | 8638d24f1480a747e90467dc9950a278a895182d | [
"MIT"
] | null | null | null | tests/conftest.py | uuip/redis-py | 8638d24f1480a747e90467dc9950a278a895182d | [
"MIT"
] | null | null | null | import argparse
import random
import time
from typing import Callable, TypeVar
from unittest.mock import Mock
from urllib.parse import urlparse
import pytest
from packaging.version import Version
import redis
from redis.backoff import NoBackoff
from redis.connection import parse_url
from redis.exceptions import Redis... | 32.049784 | 87 | 0.662119 |
d3dbd1137b4c46e78024d66be5f2b97ce124c7b0 | 21,077 | py | Python | mivisionx_calibration_tool.py | kiritigowda/MIVisionX-calibration-tool | d67d5ff36d8db0b09aa14d5cba4a53d620f0226c | [
"MIT"
] | 1 | 2019-10-24T13:47:25.000Z | 2019-10-24T13:47:25.000Z | mivisionx_calibration_tool.py | kiritigowda/MIVisionX-calibration-tool | d67d5ff36d8db0b09aa14d5cba4a53d620f0226c | [
"MIT"
] | null | null | null | mivisionx_calibration_tool.py | kiritigowda/MIVisionX-calibration-tool | d67d5ff36d8db0b09aa14d5cba4a53d620f0226c | [
"MIT"
] | 3 | 2019-08-02T17:02:51.000Z | 2019-12-05T08:56:04.000Z | __author__ = "Kiriti Nagesh Gowda"
__copyright__ = "Copyright 2019, AMD MIVisionX"
__license__ = "MIT"
__version__ = "0.9.0"
__maintainer__ = "Kiriti Nagesh Gowda"
__email__ = "Kiriti.NageshGowda@amd.com"
__status__ = "ALPHA"
__script_name__ = "MIVisionX Calibration Tool"
import argparse
imp... | 41.408644 | 146 | 0.69787 |
27fe33b13760598918be8fd06be21302084c12dc | 17,691 | py | Python | pycql/integrations/django/filters.py | tomkralidis/pycql | 35cea1ee462e06b75bbe47bf766e8f0bf79b0018 | [
"MIT"
] | 10 | 2019-09-18T13:29:17.000Z | 2021-07-15T18:21:54.000Z | pycql/integrations/django/filters.py | tomkralidis/pycql | 35cea1ee462e06b75bbe47bf766e8f0bf79b0018 | [
"MIT"
] | 6 | 2019-09-18T14:55:57.000Z | 2021-08-30T21:43:46.000Z | pycql/integrations/django/filters.py | tomkralidis/pycql | 35cea1ee462e06b75bbe47bf766e8f0bf79b0018 | [
"MIT"
] | 4 | 2020-05-13T12:35:12.000Z | 2021-06-29T10:37:11.000Z | # ------------------------------------------------------------------------------
#
# Project: pycql <https://github.com/geopython/pycql>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
#
# ------------------------------------------------------------------------------
# Copyright (C) 2019 EOX IT Services GmbH
#
# ... | 33.826004 | 86 | 0.561246 |
5c748f1d963e25045b7d09340d89d2abf55e9130 | 1,750 | py | Python | app/core/models.py | elam91/recipe-app-api | 0a30e9f7928ae737c26da20ecc4cce0570709fbb | [
"MIT"
] | null | null | null | app/core/models.py | elam91/recipe-app-api | 0a30e9f7928ae737c26da20ecc4cce0570709fbb | [
"MIT"
] | null | null | null | app/core/models.py | elam91/recipe-app-api | 0a30e9f7928ae737c26da20ecc4cce0570709fbb | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **extra_fields):
"""Creates and saves a new user"""
if not ... | 28.688525 | 76 | 0.677714 |
5642c2345debf2f20442b2bda22099eb2f8a601a | 2,692 | py | Python | data_sources/collect_list_of_beaches.py | Mithul/spaceapps | 933a58af940cc0de2070b6d3f069a3c64a22be96 | [
"MIT"
] | null | null | null | data_sources/collect_list_of_beaches.py | Mithul/spaceapps | 933a58af940cc0de2070b6d3f069a3c64a22be96 | [
"MIT"
] | null | null | null | data_sources/collect_list_of_beaches.py | Mithul/spaceapps | 933a58af940cc0de2070b6d3f069a3c64a22be96 | [
"MIT"
] | null | null | null | import json
from bs4 import BeautifulSoup
from pymongo import *
import requests
import pdb
import LatLon
req = requests.get("https://en.wikipedia.org/wiki/List_of_beaches")
soup = BeautifulSoup(req.text,'html.parser')
ul = soup.find_all('ul')[3:94]
all_links = []
for u in ul:
links = u.find_all('a')
fo... | 33.234568 | 150 | 0.533432 |
ffb6161a8d042e3926de262758424c40c0f2b7ce | 14,114 | py | Python | official/vision/beta/tasks/retinanet.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | official/vision/beta/tasks/retinanet.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | official/vision/beta/tasks/retinanet.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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... | 40.210826 | 90 | 0.675783 |
8a0b06919976e3ffd2664b4a50e362df093c61f6 | 10,334 | py | Python | src/deepke/name_entity_re/few_shot/module/train.py | zjunlp/deepke-dre | 0de6bdb4d03e5b36b84e93a509788b6fa9bbbce9 | [
"MIT"
] | 3 | 2022-02-18T05:03:02.000Z | 2022-03-19T12:32:16.000Z | src/deepke/name_entity_re/few_shot/module/train.py | zjunlp/deepke-dre | 0de6bdb4d03e5b36b84e93a509788b6fa9bbbce9 | [
"MIT"
] | null | null | null | src/deepke/name_entity_re/few_shot/module/train.py | zjunlp/deepke-dre | 0de6bdb4d03e5b36b84e93a509788b6fa9bbbce9 | [
"MIT"
] | null | null | null | import torch
from torch import optim
from tqdm import tqdm
from ..utils import convert_preds_to_outputs, write_predictions
import random
class Trainer(object):
def __init__(self, train_data=None, dev_data=None, test_data=None, model=None, process=None, args=None, logger=None, loss=None, metrics=None, writer=None) ... | 49.682692 | 167 | 0.570544 |
dc0e4e2d7a484ff56e62d9c50041f9f254b128de | 2,695 | py | Python | beagle/building/loader.py | FernandoGaGu/beagle | b1c968ec84d560e9903a582413e6334fcf447735 | [
"BSD-3-Clause"
] | 1 | 2020-12-27T15:58:14.000Z | 2020-12-27T15:58:14.000Z | beagle/building/loader.py | FernandoGaGu/beagle | b1c968ec84d560e9903a582413e6334fcf447735 | [
"BSD-3-Clause"
] | null | null | null | beagle/building/loader.py | FernandoGaGu/beagle | b1c968ec84d560e9903a582413e6334fcf447735 | [
"BSD-3-Clause"
] | null | null | null | from ..fitness import Fitness
from ..population import Population
from ..report import Report, MOEAReport
from ..algorithm import Algorithm
from ..exceptions import UnrecognisedParameter
from .basic import basic_ga_1, basic_ga_2
from .nsga2 import nsga2
from .spea2 import spea2
NSGA2_ID = 'NSGA2'
SPEA2_ID = 'SPEA2'
A... | 36.917808 | 118 | 0.715399 |
b62cd451ff7df9af5c1129f4885678cf4af82765 | 7,812 | py | Python | CodonSubstitution/build/biopython/Bio/SeqIO/FastaIO.py | JackCurragh/DARNED | 13963d129bd8f69fb1106ad1f47394b3211a939c | [
"MIT"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | CodonSubstitution/build/biopython/Bio/SeqIO/FastaIO.py | JackCurragh/DARNED | 13963d129bd8f69fb1106ad1f47394b3211a939c | [
"MIT"
] | null | null | null | CodonSubstitution/build/biopython/Bio/SeqIO/FastaIO.py | JackCurragh/DARNED | 13963d129bd8f69fb1106ad1f47394b3211a939c | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | # Copyright 2006-2009 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# This module is for reading and writing FASTA format files as SeqRecord
# objects. The co... | 35.834862 | 119 | 0.611367 |
5f409391616e463a98d2d80e3b677bd331748c33 | 3,235 | py | Python | url_migration/tests/test_resolver.py | riklaunim/django-url-migration | 0d1115d02b64a895934ecdd7387e65b34b3d68e7 | [
"BSD-3-Clause"
] | 4 | 2017-04-28T18:58:31.000Z | 2017-10-04T07:32:47.000Z | url_migration/tests/test_resolver.py | riklaunim/django-url-migration | 0d1115d02b64a895934ecdd7387e65b34b3d68e7 | [
"BSD-3-Clause"
] | 3 | 2021-04-23T11:30:49.000Z | 2021-04-26T14:12:29.000Z | url_migration/tests/test_resolver.py | riklaunim/django-url-migration | 0d1115d02b64a895934ecdd7387e65b34b3d68e7 | [
"BSD-3-Clause"
] | 1 | 2021-04-23T11:07:36.000Z | 2021-04-23T11:07:36.000Z | from unittest import mock
from django import test
from .. import models
from .. import views
from . import factories
class TestUrlResolverIntegration(test.TestCase):
def test_if_url_is_resolved(self):
factories.UrlMappingFactory(source_url='/bar', target_url='/foo')
response = self.client.get('/... | 35.944444 | 74 | 0.643277 |
5dde6523ade23b141b81dd1e07eb6ea734c0b560 | 38,015 | py | Python | venv/Lib/site-packages/twilio/rest/taskrouter/v1/workspace/task/reservation.py | Kenny-Z/IOT-Message-Board-with-Face-Recognition | 81b9a778ebf850b9f78e5d18a52720bd78593565 | [
"MIT"
] | 4 | 2020-11-13T02:31:25.000Z | 2020-12-24T22:04:30.000Z | twilio/rest/taskrouter/v1/workspace/task/reservation.py | Sephra1/twilio-python | 7dd04209e2d38a31c2783ee8f8ae8be6222a43f2 | [
"MIT"
] | 7 | 2020-06-06T01:19:11.000Z | 2021-06-10T19:42:05.000Z | bot/lib/python3.7/site-packages/twilio/rest/taskrouter/v1/workspace/task/reservation.py | carlosrh18/DavinciBot | d73a6b7f68d7bab25d134d3f85c6b63a86c206c5 | [
"MIT"
] | 1 | 2020-08-27T01:33:19.000Z | 2020-08-27T01:33:19.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import... | 50.085639 | 182 | 0.68886 |
a0722f59de3763d8e3638aae4f25355508df57eb | 270 | py | Python | src/chapter6/exercise5.py | Group3BCS1/BCS-2021 | b8ee8f900e3fd23822844e10fb2c6475a4f3400a | [
"MIT"
] | null | null | null | src/chapter6/exercise5.py | Group3BCS1/BCS-2021 | b8ee8f900e3fd23822844e10fb2c6475a4f3400a | [
"MIT"
] | null | null | null | src/chapter6/exercise5.py | Group3BCS1/BCS-2021 | b8ee8f900e3fd23822844e10fb2c6475a4f3400a | [
"MIT"
] | 2 | 2021-06-11T08:18:48.000Z | 2021-06-12T20:31:44.000Z | word = 'X-DSPAM-Confidence: 0.8475'
# Finds the colon character
atpos = word.find(':')
# Extracts portion after colon
var_float = word [atpos + 1:]
# Converts to floating point number
var_float = float(var_float)
print(f'This is a floating point number {var_float}') | 33.75 | 55 | 0.72963 |
c68bcc1bfdd00695d0138fbfb4c63aec658ecf13 | 3,377 | py | Python | q/protocol.py | rymurr/q | af44753108d2c569d520b6c1ef719a4e0b616f3e | [
"MIT"
] | null | null | null | q/protocol.py | rymurr/q | af44753108d2c569d520b6c1ef719a4e0b616f3e | [
"MIT"
] | null | null | null | q/protocol.py | rymurr/q | af44753108d2c569d520b6c1ef719a4e0b616f3e | [
"MIT"
] | null | null | null | '''
Primary source of kdb ipc protocol definitions
here we define all the q data types and their on the wire form
A parser is used to convert between the python format and kdb/q format
types are found here:
http://www.kx.com/q/d/q1.htm
Note on dates and times
dates are number of days since Jan 1 2000
time... | 32.161905 | 93 | 0.517619 |
b65ef215969f9d3a248c8538f776589a5f306c73 | 4,890 | py | Python | testsuite/python-imageoutput/src/test_imageoutput.py | Nedra1998/oiio | 1a105a6496606a6070df0a5ae5ab64416803e02e | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | testsuite/python-imageoutput/src/test_imageoutput.py | Nedra1998/oiio | 1a105a6496606a6070df0a5ae5ab64416803e02e | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | testsuite/python-imageoutput/src/test_imageoutput.py | Nedra1998/oiio | 1a105a6496606a6070df0a5ae5ab64416803e02e | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
import OpenImageIO as oiio
import numpy as np
# Read the one subimage from input then write it to output using
# write_image, write_scanlines, write_scanline, write_tile, or write_tiles,
# depending on the 'method' arg... | 39.12 | 76 | 0.600818 |
57b86119c931246e4ca06d032a20b189278b76f0 | 1,072 | py | Python | onlinecourse/admin.py | jcampbellaccount/ibm-developer-skills-network-final-cloud-app-with-database | e43b264eeb3f19199077e8502ae3af1ccab4a743 | [
"Apache-2.0"
] | null | null | null | onlinecourse/admin.py | jcampbellaccount/ibm-developer-skills-network-final-cloud-app-with-database | e43b264eeb3f19199077e8502ae3af1ccab4a743 | [
"Apache-2.0"
] | null | null | null | onlinecourse/admin.py | jcampbellaccount/ibm-developer-skills-network-final-cloud-app-with-database | e43b264eeb3f19199077e8502ae3af1ccab4a743 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# <HINT> Import any new Models here
from .models import Course, Lesson, Instructor, Learner, Question, Choice
class QuestionInline(admin.StackedInline):
model = Question
extra = 5
class ChoiceInline(admin.StackedInline):
model = Choice
extra = 5
class LessonInline(adm... | 24.930233 | 73 | 0.738806 |
759a8a57a9590ed2963d29e2ad70c9267e4e6b29 | 99 | py | Python | importcrdata/apps.py | JZ1999/crelectoralregister | dd5e314608a8a715ae7c29014b9ff87dab585980 | [
"Apache-2.0"
] | null | null | null | importcrdata/apps.py | JZ1999/crelectoralregister | dd5e314608a8a715ae7c29014b9ff87dab585980 | [
"Apache-2.0"
] | 8 | 2019-12-04T22:53:01.000Z | 2022-02-10T07:54:51.000Z | importcrdata/apps.py | JZ1999/crelectoralregister | dd5e314608a8a715ae7c29014b9ff87dab585980 | [
"Apache-2.0"
] | 1 | 2019-06-21T15:09:56.000Z | 2019-06-21T15:09:56.000Z | from django.apps import AppConfig
class ImportcrdataConfig(AppConfig):
name = 'importcrdata'
| 16.5 | 36 | 0.777778 |
0149487795819c0262e4c74300873349225eb122 | 481 | py | Python | temboo/core/Library/CorpWatch/Relationships/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | temboo/core/Library/CorpWatch/Relationships/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | null | null | null | temboo/core/Library/CorpWatch/Relationships/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | from temboo.Library.CorpWatch.Relationships.CompanyChildren import CompanyChildren, CompanyChildrenInputSet, CompanyChildrenResultSet, CompanyChildrenChoreographyExecution
from temboo.Library.CorpWatch.Relationships.CompanyParents import CompanyParents, CompanyParentsInputSet, CompanyParentsResultSet, CompanyParentsCho... | 120.25 | 171 | 0.912682 |
0fd4bee75e332bf7bc38a260bb4dddf478ca1c4f | 3,498 | py | Python | filepart/__init__.py | UnknownPlayer78/filepart | 0ebb3a4428b1d415185b13be24034f688ac6185b | [
"MIT"
] | 1 | 2020-01-18T14:13:43.000Z | 2020-01-18T14:13:43.000Z | filepart/__init__.py | UnknownPlayer78/filepart | 0ebb3a4428b1d415185b13be24034f688ac6185b | [
"MIT"
] | null | null | null | filepart/__init__.py | UnknownPlayer78/filepart | 0ebb3a4428b1d415185b13be24034f688ac6185b | [
"MIT"
] | null | null | null | import sys, getopt
from .__main__ import __version__
from os.path import exists, isfile
from .utils import parse_size
from .utils import Help
from .wizard import Wizard
from .split import Splitter
from .build import Builder
# TODO wizard file not found (check for .part file exists)
# -> file.ext -> check for sta... | 28.209677 | 112 | 0.450543 |
92ea3966b0f87d0effd8e95d039615f6012482c9 | 3,058 | py | Python | homeassistant/components/sensor/zwave.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/sensor/zwave.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/sensor/zwave.py | shire210/home-assistant | 63cd8bbee6f1b74ae9c6c249ac820119a8a573d8 | [
"Apache-2.0"
] | null | null | null | """
Interfaces with Z-Wave sensors.
For more details about this platform, please refer to the documentation
at https://home-assistant.io/components/sensor.zwave/
"""
import logging
# Because we do not compile openzwave on CI
# pylint: disable=import-error
from homeassistant.components.sensor import DOMAIN
from homeass... | 31.204082 | 103 | 0.690974 |
590e630cb10ec47be4d25ae9b8259d01da28e8cc | 18,624 | py | Python | spidey_simulation/spidey_py/spidey_python/omniverse/robot/articulated_object.py | JasonJZLiu/Spidey-Quadruped | 74c1817f997b354bae4fffd2728f2cc94947062c | [
"MIT"
] | 5 | 2021-06-14T03:12:18.000Z | 2021-12-23T12:58:56.000Z | spidey_simulation/spidey_py/spidey_python/omniverse/robot/articulated_object.py | JasonJZLiu/Spidey-Quadruped | 74c1817f997b354bae4fffd2728f2cc94947062c | [
"MIT"
] | null | null | null | spidey_simulation/spidey_py/spidey_python/omniverse/robot/articulated_object.py | JasonJZLiu/Spidey-Quadruped | 74c1817f997b354bae4fffd2728f2cc94947062c | [
"MIT"
] | null | null | null | """
@author Mayank Mittal
@email mittalma@ethz.ch
@brief Implementation of an articulated object.
"""
# python
import os
import numpy as np
import scipy.spatial.transform as tf
from typing import Optional, List
# omniverse
from pxr import Usd, UsdGeom, Gf, Semantics
import omni.isaac.dynamic_control._dy... | 40.311688 | 125 | 0.628329 |
d64ae0a62a7cf4f7f2c63334793249f295a4af74 | 2,476 | py | Python | proj/archs/cluster/net5g_two_head.py | zqma/IIC | 9d4e30b51535c6ca381389d9c22ce45be4d11883 | [
"MIT"
] | null | null | null | proj/archs/cluster/net5g_two_head.py | zqma/IIC | 9d4e30b51535c6ca381389d9c22ce45be4d11883 | [
"MIT"
] | null | null | null | proj/archs/cluster/net5g_two_head.py | zqma/IIC | 9d4e30b51535c6ca381389d9c22ce45be4d11883 | [
"MIT"
] | null | null | null | import torch.nn as nn
from .net5g import ClusterNet5gTrunk
from .residual import BasicBlock, ResNet
# resnet34 and full channels
__all__ = ["ClusterNet5gTwoHead"]
class ClusterNet5gTwoHeadHead(nn.Module):
def __init__(self, config, output_k, semisup=False):
super(ClusterNet5gTwoHeadHead, self).__init__... | 30.195122 | 81 | 0.607835 |
4199be6b5d4205a76b1333d1a62ff4364bad69a4 | 9,759 | py | Python | spacegraphcats/search/search_utils.py | rhysnewell/spacegraphcats | e4d8b29171af0d1c8507066021be3b6a50c7802b | [
"BSD-3-Clause"
] | null | null | null | spacegraphcats/search/search_utils.py | rhysnewell/spacegraphcats | e4d8b29171af0d1c8507066021be3b6a50c7802b | [
"BSD-3-Clause"
] | null | null | null | spacegraphcats/search/search_utils.py | rhysnewell/spacegraphcats | e4d8b29171af0d1c8507066021be3b6a50c7802b | [
"BSD-3-Clause"
] | null | null | null | import collections
import csv
import os
import sqlite3
import numpy
from screed.screedRecord import Record
from screed.utils import to_str
from sourmash import MinHash
from spacegraphcats.utils.bgzf.bgzf import BgzfReader
from . import MPHF_KmerIndex
def sqlite_get_max_offset(cursor):
cursor.execute("SELECT max... | 29.572727 | 141 | 0.613895 |
22ee5b16e3a779bd422a65e15e655aeed02b07b3 | 266 | py | Python | src/wechaty_plugin_contrib/__init__.py | fish-ball/python-wechaty-plugin-contrib | ae2226300d87f1d13b52215a11a73618e0567d72 | [
"Apache-2.0"
] | null | null | null | src/wechaty_plugin_contrib/__init__.py | fish-ball/python-wechaty-plugin-contrib | ae2226300d87f1d13b52215a11a73618e0567d72 | [
"Apache-2.0"
] | null | null | null | src/wechaty_plugin_contrib/__init__.py | fish-ball/python-wechaty-plugin-contrib | ae2226300d87f1d13b52215a11a73618e0567d72 | [
"Apache-2.0"
] | null | null | null | """import all plugins"""
from wechaty_plugin_contrib.ding_dong_plugin import DingDongPlugin
from wechaty_plugin_contrib.daily_plugin import (
DailyPluginOptions,
DailyPlugin
)
__all__ = [
'DingDongPlugin',
'DailyPluginOptions',
'DailyPlugin'
]
| 19 | 66 | 0.755639 |
7c942090eb7f092b1b3ef8781dcf5021f9fbc35e | 3,003 | py | Python | aegea/flow_logs.py | jshoe/aegea | dfcb46672a703e831961dc5dd1c6f36488374555 | [
"Apache-2.0"
] | null | null | null | aegea/flow_logs.py | jshoe/aegea | dfcb46672a703e831961dc5dd1c6f36488374555 | [
"Apache-2.0"
] | null | null | null | aegea/flow_logs.py | jshoe/aegea | dfcb46672a703e831961dc5dd1c6f36488374555 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import os, sys, argparse
from botocore.exceptions import ClientError
from .ls import register_parser, register_listing_parser, grep, add_time_bound_args
from .util import Timestamp, paginate, hashabledict
from .util.printing import for... | 47.666667 | 119 | 0.689977 |
6b32c6147c7208216630b5da677a4bb72525200c | 4,697 | py | Python | examples/working_with_files/concatenate_files.py | LiamBindle/gcpy | 64ac8f236ecc11da88d874c558463dd5f8cc6503 | [
"NCSA",
"Apache-2.0",
"MIT"
] | 1 | 2020-02-20T23:41:26.000Z | 2020-02-20T23:41:26.000Z | examples/working_with_files/concatenate_files.py | LiamBindle/gcpy | 64ac8f236ecc11da88d874c558463dd5f8cc6503 | [
"NCSA",
"Apache-2.0",
"MIT"
] | null | null | null | examples/working_with_files/concatenate_files.py | LiamBindle/gcpy | 64ac8f236ecc11da88d874c558463dd5f8cc6503 | [
"NCSA",
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
This Python script concatenates several individual netCDF files
into a single netCDF file using xarray.
Calling sequence:
./concatentate_files.py
Remarks:
If you have several individual files with one variable per file,
you should consider concatenating them into a single file.
... | 30.699346 | 75 | 0.648073 |
067b11b2c7d2dcadeded241ea22612126a0a8b65 | 274 | py | Python | config.py | banan039pl/flask_leaderboard | 832c7039f0697c5004a35b67d01957c718e5d4ef | [
"MIT"
] | 5 | 2020-06-15T02:56:39.000Z | 2021-12-28T19:18:18.000Z | config.py | banan039pl/flask_leaderboard | 832c7039f0697c5004a35b67d01957c718e5d4ef | [
"MIT"
] | 2 | 2019-12-01T15:50:05.000Z | 2021-12-17T07:54:23.000Z | config.py | banan039pl/flask_leaderboard | 832c7039f0697c5004a35b67d01957c718e5d4ef | [
"MIT"
] | 9 | 2020-01-19T11:21:33.000Z | 2022-02-22T06:28:52.000Z | import os
basedir = os.path.abspath(os.path.dirname(__file__))
print(basedir)
class Config(object):
# ...
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False | 30.444444 | 65 | 0.693431 |
42b1dcf864839aee4d3bd7f0d8eb1e786f00123f | 12,192 | py | Python | tensorlayer/layers/normalization.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | tensorlayer/layers/normalization.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | tensorlayer/layers/normalization.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from .core import *
from .. import _logging as logging
import tensorflow as tf
__all__ = [
'LocalResponseNormLayer',
'BatchNormLayer',
'InstanceNormLayer',
'LayerNormLayer',
]
class LocalResponseNormLayer(Layer):
"""The :class:`LocalResponseNormLayer` layer is for Local R... | 39.97377 | 186 | 0.594242 |
9fc7f5937bcae855c1b8166dcf6331c36b7aa350 | 25,149 | py | Python | Packs/Base/Scripts/DBotFindSimilarIncidentsByIndicators/DBotFindSimilarIncidentsByIndicators.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Base/Scripts/DBotFindSimilarIncidentsByIndicators/DBotFindSimilarIncidentsByIndicators.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Base/Scripts/DBotFindSimilarIncidentsByIndicators/DBotFindSimilarIncidentsByIndicators.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
from sklearn.base import BaseEstimator, TransformerMixin
import pandas as pd
import numpy as np
from collections import Counter
import re
import math
from typing import List, Dict
STATUS_DICT = {
0: "Pending",
... | 41.706468 | 130 | 0.679351 |
a535cc8dcd8d6d31206b2ce52ec495f9ecda7d7e | 150 | py | Python | bin/ominoes/pentominoes-eye.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | bin/ominoes/pentominoes-eye.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | bin/ominoes/pentominoes-eye.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | 1 | 2022-01-02T16:54:14.000Z | 2022-01-02T16:54:14.000Z | #!/usr/bin/env python
# $Id$
"""? solutions"""
import puzzler
from puzzler.puzzles.pentominoes import PentominoesEye as puzzle
puzzler.run(puzzle)
| 15 | 64 | 0.746667 |
0c9792ae4ecebab8c55d363de60de93ddb74b28c | 311 | py | Python | website/__init__.py | andrequeiroz2/targit | 7e42b8e40d492c1cd17c14b0300cfa5c000df2b9 | [
"MIT"
] | null | null | null | website/__init__.py | andrequeiroz2/targit | 7e42b8e40d492c1cd17c14b0300cfa5c000df2b9 | [
"MIT"
] | null | null | null | website/__init__.py | andrequeiroz2/targit | 7e42b8e40d492c1cd17c14b0300cfa5c000df2b9 | [
"MIT"
] | null | null | null | ## -- Script inicial do módulo website --
## Não é necessário alterar nada nesse arquivo
from flask import Flask
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secretkey'
from .views import views
app.register_blueprint(views, url_prefix='/')
return app | 22.214286 | 50 | 0.665595 |
9bd21cba149be094afc6b4534541036ced792921 | 9,642 | py | Python | purple/keyboard/sweep/layout/soar.py | a8ksh4/purple | 11460cc44cda7edf6f8fce5a5c841d4b04a47741 | [
"MIT"
] | null | null | null | purple/keyboard/sweep/layout/soar.py | a8ksh4/purple | 11460cc44cda7edf6f8fce5a5c841d4b04a47741 | [
"MIT"
] | null | null | null | purple/keyboard/sweep/layout/soar.py | a8ksh4/purple | 11460cc44cda7edf6f8fce5a5c841d4b04a47741 | [
"MIT"
] | null | null | null | from adafruit_hid.keycode import Keycode
from adafruit_hid.mouse import Mouse
from purple.action import Action, Lock, MouseMove, MousePress, OneShot, Press, ToLayer
from purple.helpers import key
from purple.layer import Layer
class Layout:
auto_mod = []
layers = [
Layer( # Base
{
... | 48.69697 | 99 | 0.505289 |
bae25105d78be674f0a2ca4bcba7a12d8636ee7a | 11,998 | py | Python | designate_tempest_plugin/tests/api/v2/test_transfer_request.py | izadorozhna/designate-tempest-plugin | c1708fc0c878ea3fa544454c7e96c58581478853 | [
"Apache-2.0"
] | null | null | null | designate_tempest_plugin/tests/api/v2/test_transfer_request.py | izadorozhna/designate-tempest-plugin | c1708fc0c878ea3fa544454c7e96c58581478853 | [
"Apache-2.0"
] | null | null | null | designate_tempest_plugin/tests/api/v2/test_transfer_request.py | izadorozhna/designate-tempest-plugin | c1708fc0c878ea3fa544454c7e96c58581478853 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 NEC Corporation. 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 ... | 43.158273 | 79 | 0.681197 |
54f0026203e6d9d3428efedfd03cff9f4452df68 | 3,221 | py | Python | selfdrive/controls/lib/lane_planner.py | funk222/openpilot | f6d3a507a6aa568c30a2af097d94c61a65d7dc6a | [
"MIT"
] | null | null | null | selfdrive/controls/lib/lane_planner.py | funk222/openpilot | f6d3a507a6aa568c30a2af097d94c61a65d7dc6a | [
"MIT"
] | null | null | null | selfdrive/controls/lib/lane_planner.py | funk222/openpilot | f6d3a507a6aa568c30a2af097d94c61a65d7dc6a | [
"MIT"
] | 1 | 2020-01-14T03:05:37.000Z | 2020-01-14T03:05:37.000Z | from common.numpy_fast import interp
import numpy as np
from cereal import log
CAMERA_OFFSET = 0.00 # m from center car to camera
def compute_path_pinv(l=50):
deg = 3
x = np.arange(l*1.0)
X = np.vstack(tuple(x**n for n in range(deg, -1, -1))).T
pinv = np.linalg.pinv(X)
return pinv
def model_polyfit(point... | 35.788889 | 111 | 0.68488 |
2041745c5c4aa16ecfdbfa4c2cff16ed721d65c6 | 39,805 | py | Python | shapash/explainer/smart_explainer.py | GAP01/shapash | 4223278b91a4456bf334deb26220a6501a282f13 | [
"Apache-2.0"
] | null | null | null | shapash/explainer/smart_explainer.py | GAP01/shapash | 4223278b91a4456bf334deb26220a6501a282f13 | [
"Apache-2.0"
] | null | null | null | shapash/explainer/smart_explainer.py | GAP01/shapash | 4223278b91a4456bf334deb26220a6501a282f13 | [
"Apache-2.0"
] | null | null | null | """
Smart explainer module
"""
import logging
import copy
import pandas as pd
import numpy as np
from shapash.webapp.smart_app import SmartApp
from shapash.utils.io import save_pickle
from shapash.utils.io import load_pickle
from shapash.utils.transform import inverse_transform, apply_postprocessing
from shapash.utils.... | 39.924774 | 122 | 0.616656 |
fa576414e811b144e70930efd78051478bbfc481 | 805 | py | Python | logs/migrations/0001_initial.py | afg984/nthucourses | 9f28f8e9480b9d7a9db1f9c023955fb23b1a28aa | [
"BSD-3-Clause"
] | null | null | null | logs/migrations/0001_initial.py | afg984/nthucourses | 9f28f8e9480b9d7a9db1f9c023955fb23b1a28aa | [
"BSD-3-Clause"
] | null | null | null | logs/migrations/0001_initial.py | afg984/nthucourses | 9f28f8e9480b9d7a9db1f9c023955fb23b1a28aa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Log',
fields=[
('id', models.AutoField(primary_... | 30.961538 | 114 | 0.567702 |
7877b4a5681246924fd790db4485244ed9b35f3c | 890 | py | Python | readthedocs/builds/migrations/0043_add_cancelled_state.py | yarons/readthedocs.org | 05c99a0adc222a1d48654d305b492ec142c3026b | [
"MIT"
] | 4,054 | 2015-01-01T00:58:07.000Z | 2019-06-28T05:50:49.000Z | readthedocs/builds/migrations/0043_add_cancelled_state.py | yarons/readthedocs.org | 05c99a0adc222a1d48654d305b492ec142c3026b | [
"MIT"
] | 4,282 | 2015-01-01T21:38:49.000Z | 2019-06-28T15:41:00.000Z | readthedocs/builds/migrations/0043_add_cancelled_state.py | yarons/readthedocs.org | 05c99a0adc222a1d48654d305b492ec142c3026b | [
"MIT"
] | 3,224 | 2015-01-01T07:38:45.000Z | 2019-06-28T09:19:10.000Z | # Generated by Django 3.2.13 on 2022-05-04 11:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("builds", "0042_version_state"),
]
operations = [
migrations.AlterField(
model_name="build",
name="state",
... | 26.969697 | 49 | 0.44382 |
73ac13439dcb5cb60cc320b3fa4ba6c274e2430d | 23,827 | py | Python | pytorch_widedeep/callbacks.py | 5uperpalo/pytorch-widedeep | c95c327671a21780f33f3fefdeba8e2c96aa426b | [
"MIT"
] | null | null | null | pytorch_widedeep/callbacks.py | 5uperpalo/pytorch-widedeep | c95c327671a21780f33f3fefdeba8e2c96aa426b | [
"MIT"
] | null | null | null | pytorch_widedeep/callbacks.py | 5uperpalo/pytorch-widedeep | c95c327671a21780f33f3fefdeba8e2c96aa426b | [
"MIT"
] | null | null | null | """
Code here is mostly based on the code from the torchsample and Keras packages
CREDIT TO THE TORCHSAMPLE AND KERAS TEAMS
"""
import os
import datetime
import warnings
import numpy as np
import torch
from torch.optim.lr_scheduler import ReduceLROnPlateau
from pytorch_widedeep.wdtypes import * # noqa: F403
def _... | 36.544479 | 121 | 0.573467 |
59b2aa9528090042793fe6036ef512d830b76093 | 1,182 | py | Python | test/e2e/test_apply_metadata.py | ImageMarkup/isic-archive | 7cd8097886d685ec629e2fcba079271fb77d028f | [
"Apache-2.0"
] | 42 | 2015-12-12T14:05:46.000Z | 2022-03-26T15:20:39.000Z | test/e2e/test_apply_metadata.py | ImageMarkup/isic-archive | 7cd8097886d685ec629e2fcba079271fb77d028f | [
"Apache-2.0"
] | 494 | 2015-07-09T16:14:12.000Z | 2021-03-09T09:37:36.000Z | test/e2e/test_apply_metadata.py | ImageMarkup/uda | d221af3368baf3a06ecab67e69e9d0077426c8f9 | [
"Apache-2.0"
] | 12 | 2015-08-20T14:20:48.000Z | 2020-10-20T01:14:44.000Z | from girder.models.user import User
from isic_archive.models.dataset import Dataset
from isic_archive.models.image import Image
def test_apply_metadata(session, dataset_id):
user = list(User().getAdmins())[0]
dataset = Dataset().load(dataset_id, force=True)
image = Dataset().addImage(
dataset, op... | 39.4 | 100 | 0.650592 |
b649bf93b519105865f936afa04309a44ee11c21 | 52 | py | Python | Question 41 - 50/Q50.py | debdutgoswami/python-semester-practical | 9abdc9091d825a2425b36437f6f8fe6806ac84f2 | [
"MIT"
] | null | null | null | Question 41 - 50/Q50.py | debdutgoswami/python-semester-practical | 9abdc9091d825a2425b36437f6f8fe6806ac84f2 | [
"MIT"
] | null | null | null | Question 41 - 50/Q50.py | debdutgoswami/python-semester-practical | 9abdc9091d825a2425b36437f6f8fe6806ac84f2 | [
"MIT"
] | null | null | null | l = [45, 52, 45, 65, 79]
l = list(set(l))
print(l) | 10.4 | 24 | 0.5 |
21d97e4b8b4dc36458693fe195998ec453412f8f | 4,600 | py | Python | pyIsoDep/functions/batemansolvers.py | MattKrecicki/PYTHON-ISOTOPIC-DEPLETION-PACKAGE | ccad214de8721aa9b499ef70cd39966f18bceb76 | [
"MIT"
] | null | null | null | pyIsoDep/functions/batemansolvers.py | MattKrecicki/PYTHON-ISOTOPIC-DEPLETION-PACKAGE | ccad214de8721aa9b499ef70cd39966f18bceb76 | [
"MIT"
] | null | null | null | pyIsoDep/functions/batemansolvers.py | MattKrecicki/PYTHON-ISOTOPIC-DEPLETION-PACKAGE | ccad214de8721aa9b499ef70cd39966f18bceb76 | [
"MIT"
] | null | null | null | """batemansolvers
Three solvers are enabled here to solve the Bateman equations:
(1) ODEINT solver
-----------------
Integrate a system of ordinary differential equations
(2) EXPM solver
---------------
Compute the matrix exponential using Pade approximation
(3) CRAM solver
---------------
CHBV computes the direct a... | 33.823529 | 79 | 0.646957 |
bdc4a9c0683d9a7dcd541758afe48602384b224b | 36,656 | py | Python | synapse/rest/client/account.py | Fizzadar/synapse | 6b46c3eb3d526d903e1e4833b2e8ae9b73de8502 | [
"Apache-2.0"
] | null | null | null | synapse/rest/client/account.py | Fizzadar/synapse | 6b46c3eb3d526d903e1e4833b2e8ae9b73de8502 | [
"Apache-2.0"
] | null | null | null | synapse/rest/client/account.py | Fizzadar/synapse | 6b46c3eb3d526d903e1e4833b2e8ae9b73de8502 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015, 2016 OpenMarket Ltd
# Copyright 2017 Vector Creations Ltd
# Copyright 2018 New Vector Ltd
#
# 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/licen... | 38.954304 | 94 | 0.636158 |
7982bbb93cc579623c501401bddc35f0c0f0ad1d | 670 | py | Python | Lib/site-packages/traitlets/utils/bunch.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/traitlets/utils/bunch.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/traitlets/utils/bunch.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """Yet another implementation of bunch
attribute-access of items on a dict.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
class Bunch(dict): # type:ignore[type-arg]
"""A dict with attribute-access"""
def __getattr__(self, key):
try:
... | 24.814815 | 71 | 0.638806 |
dee20f0ca68e4575842d172e514e10be131d0af5 | 1,334 | py | Python | setup.py | dinceraslancom/internetdownloadmanager | 35d2c57c4fadb93b57952f4e5584546731a082d4 | [
"Apache-2.0"
] | 10 | 2019-12-10T13:51:07.000Z | 2021-08-16T13:27:47.000Z | setup.py | dinceraslancom/internetdownloadmanager | 35d2c57c4fadb93b57952f4e5584546731a082d4 | [
"Apache-2.0"
] | null | null | null | setup.py | dinceraslancom/internetdownloadmanager | 35d2c57c4fadb93b57952f4e5584546731a082d4 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
requires = [
'chardet>=3.0.2,<3.1.0',
'idna>=2.5,<2.9',
'urllib3>=1.21.1,<1.26,!=1.25.0,!=1.25.1',
'certifi>=2017.4.17',
'requests>=2.22.0',
]
with open("README.rst", "r", encoding="utf8") as f:
readme = f.read()
with open("HISTORY.rst", "r", encodi... | 31.023256 | 78 | 0.613943 |
4ca3cc064795e84e8a8f092b3e424a25c8dc6aa0 | 487 | py | Python | 83/removeduplicatiesfromsortedlinkedlist.py | cccccccccccccc/Myleetcode | fb3fa6df7c77feb2d252feea7f3507569e057c70 | [
"Apache-2.0"
] | null | null | null | 83/removeduplicatiesfromsortedlinkedlist.py | cccccccccccccc/Myleetcode | fb3fa6df7c77feb2d252feea7f3507569e057c70 | [
"Apache-2.0"
] | null | null | null | 83/removeduplicatiesfromsortedlinkedlist.py | cccccccccccccc/Myleetcode | fb3fa6df7c77feb2d252feea7f3507569e057c70 | [
"Apache-2.0"
] | null | null | null | # Definition for singly-linked list.
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def deleteDuplicates(self, head: ListNode) -> ListNode:
if head is None or head.next is None:
return head
cur = head
whil... | 30.4375 | 59 | 0.554415 |
c6b107d5f51d7704c7e7742336fc49cb91579cc4 | 3,721 | py | Python | VWCemail.py | DennisH3/Virtual-Water-Cooler | 4f62ab890c54a20d619a6d58fbef9fd84f22ce1b | [
"MIT"
] | null | null | null | VWCemail.py | DennisH3/Virtual-Water-Cooler | 4f62ab890c54a20d619a6d58fbef9fd84f22ce1b | [
"MIT"
] | 2 | 2020-11-24T13:59:49.000Z | 2020-12-04T19:32:42.000Z | VWCemail.py | DennisH3/Virtual-Water-Cooler | 4f62ab890c54a20d619a6d58fbef9fd84f22ce1b | [
"MIT"
] | 2 | 2020-11-24T12:36:45.000Z | 2020-11-25T14:56:22.000Z |
# coding: utf-8
# In[ ]:
# Pip Installs
#!pip install pywin32
# In[ ]:
import pandas as pd
from IPython.display import display
import win32com.client as win32
import time
# In[ ]:
"""
Desc:
Function that sends an email.
Params: recipients (string), subject (string), text (string)
Output: An emai... | 26.769784 | 105 | 0.596345 |
f5bef131802030115074e01d8a8d8f9f7edb8667 | 369 | py | Python | section_cmab/algorithms/lrfu.py | myron0330/caching-research | adb61e6d7246af13d4428254d456618cd6ccf0dc | [
"MIT"
] | null | null | null | section_cmab/algorithms/lrfu.py | myron0330/caching-research | adb61e6d7246af13d4428254d456618cd6ccf0dc | [
"MIT"
] | null | null | null | section_cmab/algorithms/lrfu.py | myron0330/caching-research | adb61e6d7246af13d4428254d456618cd6ccf0dc | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
# **********************************************************************************#
# File:
# **********************************************************************************#
from __future__ import division
def lfu(x):
"""
Lfu function
"""
return 1
def lru(x):
"... | 18.45 | 85 | 0.254743 |
ae6a0695f5bf250b3c7ac7a4ea833f270582af2c | 1,449 | py | Python | nativecompile.py | antimatter15/microwave | aef41f6b57e3171ca22c12422c0a05e17cc002c6 | [
"Apache-2.0"
] | 1 | 2017-03-08T18:45:50.000Z | 2017-03-08T18:45:50.000Z | nativecompile.py | antimatter15/microwave | aef41f6b57e3171ca22c12422c0a05e17cc002c6 | [
"Apache-2.0"
] | null | null | null | nativecompile.py | antimatter15/microwave | aef41f6b57e3171ca22c12422c0a05e17cc002c6 | [
"Apache-2.0"
] | null | null | null | #/usr/bin/python
import httplib, urllib, fileinput, sys, re
print "Reading Developement HTML"
prefix = './'
codes = open(prefix+'native.html','r').read()
compile_regex = r'START_JS(.*?)END_JS'
js = ''
for match in re.finditer(compile_regex, codes, re.DOTALL):
print "Found script compile block"
includetext = match.... | 31.5 | 67 | 0.668737 |
13d005db04e6d2496073ed7dd6b35cf8d9e21343 | 2,605 | py | Python | test/IECore/TypedPrimitiveOp.py | gcodebackups/cortex-vfx | 72fa6c6eb3327fce4faf01361c8fcc2e1e892672 | [
"BSD-3-Clause"
] | 5 | 2016-07-26T06:09:28.000Z | 2022-03-07T03:58:51.000Z | test/IECore/TypedPrimitiveOp.py | turbosun/cortex | 4bdc01a692652cd562f3bfa85f3dae99d07c0b15 | [
"BSD-3-Clause"
] | null | null | null | test/IECore/TypedPrimitiveOp.py | turbosun/cortex | 4bdc01a692652cd562f3bfa85f3dae99d07c0b15 | [
"BSD-3-Clause"
] | 3 | 2015-03-25T18:45:24.000Z | 2020-02-15T15:37:18.000Z | ##########################################################################
#
# Copyright (c) 2007, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribu... | 37.753623 | 79 | 0.702111 |
b887a82a2e6404b6cf33bd37dca2ad5e543a6c49 | 53 | py | Python | pydeeplator/_version.py | sunhailin-Leo/deepL-translator-api | 20aa5347ce5fa9be116488c729bb389602e229f5 | [
"MIT"
] | 18 | 2020-04-02T06:07:51.000Z | 2022-01-19T12:54:43.000Z | pydeeplator/_version.py | sunhailin-Leo/deepL-translator-api | 20aa5347ce5fa9be116488c729bb389602e229f5 | [
"MIT"
] | 3 | 2020-04-07T04:48:23.000Z | 2022-01-19T12:55:40.000Z | pydeeplator/_version.py | sunhailin-Leo/deepL-translator-api | 20aa5347ce5fa9be116488c729bb389602e229f5 | [
"MIT"
] | 3 | 2020-04-27T04:15:59.000Z | 2021-02-12T04:02:46.000Z | __version__ = "0.0.2"
__author__ = "sunhailin-Leo"
| 17.666667 | 29 | 0.679245 |
eece5b6be4f9a6c959d7890085dc9ca69487e6f6 | 2,053 | py | Python | common_python/testing/helpers.py | ScienceStacks/PythonCommon | 2732f928e13592f2089269731c8e2b04f856a77d | [
"MIT"
] | 1 | 2019-03-26T20:30:08.000Z | 2019-03-26T20:30:08.000Z | common_python/testing/helpers.py | ScienceStacks/PythonCommon | 2732f928e13592f2089269731c8e2b04f856a77d | [
"MIT"
] | 1 | 2019-05-31T21:59:30.000Z | 2019-05-31T21:59:30.000Z | common_python/testing/helpers.py | ScienceStacks/PythonCommon | 2732f928e13592f2089269731c8e2b04f856a77d | [
"MIT"
] | null | null | null | """ Helpers for Tests. """
import os.path
import pandas as pd
DEBUG = True
def isValidDataFrame(df, expected_columns, min_rows=1,
nan_columns=None, key=None,
valid_dict=None):
"""
Simple test of a data frame.
a) Contains the expected columns
b) Has a minimum number of rows
c) Does not contain n... | 23.597701 | 70 | 0.632245 |
d05007e2dce7d45e935e832d7ff1822bd7f71a53 | 1,214 | py | Python | helm-chart/images/kubessh/kubessh_config.py | yuvipanda/kubessh | ba6350b671f37d1bdcc7db9c19d39c26fef6ef85 | [
"Apache-2.0"
] | 33 | 2018-04-03T17:43:55.000Z | 2022-01-10T19:36:36.000Z | helm-chart/images/kubessh/kubessh_config.py | yuvipanda/kubessh | ba6350b671f37d1bdcc7db9c19d39c26fef6ef85 | [
"Apache-2.0"
] | 30 | 2018-04-03T20:16:11.000Z | 2020-11-23T06:20:42.000Z | helm-chart/images/kubessh/kubessh_config.py | kubessh/kubessh | ba6350b671f37d1bdcc7db9c19d39c26fef6ef85 | [
"Apache-2.0"
] | 5 | 2020-04-16T15:01:46.000Z | 2020-11-28T01:49:56.000Z | from ruamel.yaml import YAML
from kubessh.authentication.github import GitHubAuthenticator
from kubessh.authentication.gitlab import GitLabAuthenticator
from kubessh.authentication.dummy import DummyAuthenticator
yaml = YAML()
c.KubeSSH.host_key_path = '/etc/kubessh/secrets/kubessh.host-key'
c.KubeSSH.debug = True
w... | 36.787879 | 90 | 0.757002 |
b2a868e3b0f668de6ba15a4add3eaf29595f4583 | 1,096 | py | Python | base-excel/Demo1.py | meteor1993/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 83 | 2019-10-15T06:54:06.000Z | 2022-03-28T14:08:21.000Z | base-excel/Demo1.py | wenxuefeng3930/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 1 | 2020-04-16T08:13:19.000Z | 2020-07-14T01:52:46.000Z | base-excel/Demo1.py | wenxuefeng3930/python-learning | 4ee574c9360caf6e63bb6ee2ef31fa6a9918fa40 | [
"MIT"
] | 74 | 2019-11-02T08:10:36.000Z | 2022-02-19T12:23:36.000Z | import xlsxwriter
import datetime
workbook = xlsxwriter.Workbook('demo.xlsx')
sheet1 = workbook.add_worksheet('test_sheet')
workfomat = workbook.add_format()
# 字体加粗
workfomat.set_bold(True)
# 单元格边框宽度
workfomat.set_border(1)
# 对齐方式
workfomat.set_align('left')
# 格式化数据格式为小数点后两位
workfomat.set_num_format('... | 24.355556 | 80 | 0.655109 |
3fb027e6f1ccd8038e26ce54c7f80ff4275d30c0 | 1,153 | py | Python | setup.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | setup.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | setup.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from setuptools import setup, find_packages
from marqeta.version import __version__
with open('requirements.txt', 'r') as requirements:
install_requires = requirements.read()
with open('README.md') as f:
long_description = f.read()
setup(
name="marqeta",
version=__version__,
description="Marqeta ... | 32.027778 | 71 | 0.660885 |
a4e6f31ae88411363b680e641a5b521ba2d032c1 | 287 | py | Python | test/espnet2/bin/test_enh_scoring.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 5,053 | 2017-12-13T06:21:41.000Z | 2022-03-31T13:38:29.000Z | test/espnet2/bin/test_enh_scoring.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 3,666 | 2017-12-14T05:58:50.000Z | 2022-03-31T22:11:49.000Z | test/espnet2/bin/test_enh_scoring.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 1,709 | 2017-12-13T01:02:42.000Z | 2022-03-31T11:57:45.000Z | from argparse import ArgumentParser
import pytest
from espnet2.bin.enh_scoring import get_parser
from espnet2.bin.enh_scoring import main
def test_get_parser():
assert isinstance(get_parser(), ArgumentParser)
def test_main():
with pytest.raises(SystemExit):
main()
| 17.9375 | 51 | 0.766551 |
03695a84bd5fa9630bf6c787f19ddc47a5103a76 | 4,003 | py | Python | dependencies/panda/Panda3D-1.10.0-x64/direct/showbase/Job.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 3 | 2018-03-09T12:07:29.000Z | 2021-02-25T06:50:25.000Z | direct/src/showbase/Job.py | Sinkay/panda3d | 16bfd3750f726a8831771b81649d18d087917fd5 | [
"PHP-3.01",
"PHP-3.0"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | direct/src/showbase/Job.py | Sinkay/panda3d | 16bfd3750f726a8831771b81649d18d087917fd5 | [
"PHP-3.01",
"PHP-3.0"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | from direct.showbase.DirectObject import DirectObject
if __debug__:
from panda3d.core import PStatCollector
class Job(DirectObject):
# Base class for cpu-intensive or non-time-critical operations that
# are run through the JobManager.
# values to yield from your run() generator method
Done = obje... | 30.792308 | 85 | 0.587559 |
ffd1f7252f8490538850365c3e9142cb7070edb4 | 1,091 | py | Python | xos/synchronizer/veg-synchronizer.py | opencord/vEG | 3f332f376b800ca5e486a14a6ecf55f0b2974e50 | [
"Apache-2.0"
] | 3 | 2017-09-13T09:45:59.000Z | 2018-01-26T03:02:34.000Z | xos/synchronizer/veg-synchronizer.py | opencord/vEG | 3f332f376b800ca5e486a14a6ecf55f0b2974e50 | [
"Apache-2.0"
] | null | null | null | xos/synchronizer/veg-synchronizer.py | opencord/vEG | 3f332f376b800ca5e486a14a6ecf55f0b2974e50 | [
"Apache-2.0"
] | null | null | null |
# Copyright 2017-present Open Networking Foundation
#
# 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 ag... | 31.171429 | 104 | 0.767186 |
eeb3ad84b0dc55300a5ccc598a712ac2995deb82 | 7,886 | py | Python | docs/conf.py | ebborchers/kaggle_petfinder | 4a5992a718e0e323e943824c7a0227e0ff98128d | [
"FTL"
] | null | null | null | docs/conf.py | ebborchers/kaggle_petfinder | 4a5992a718e0e323e943824c7a0227e0ff98128d | [
"FTL"
] | null | null | null | docs/conf.py | ebborchers/kaggle_petfinder | 4a5992a718e0e323e943824c7a0227e0ff98128d | [
"FTL"
] | null | null | null | # -*- coding: utf-8 -*-
#
# petfinder_kaggle documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration valu... | 32.187755 | 99 | 0.710373 |
b994043f502a756e5c47402e7c7679f129c5d331 | 74,756 | py | Python | instabot/api/api.py | Tkd-Alex/instabot | 230eba37c2d9f229bf9f08eb804a166a26c1d60e | [
"Apache-2.0"
] | 5 | 2019-08-15T14:47:56.000Z | 2021-11-24T10:53:15.000Z | instabot/api/api.py | Tkd-Alex/instabot | 230eba37c2d9f229bf9f08eb804a166a26c1d60e | [
"Apache-2.0"
] | null | null | null | instabot/api/api.py | Tkd-Alex/instabot | 230eba37c2d9f229bf9f08eb804a166a26c1d60e | [
"Apache-2.0"
] | 2 | 2019-08-23T23:39:21.000Z | 2021-04-18T19:18:39.000Z | import base64
import datetime
import hashlib
import hmac
import json
import logging
import os
import random
import sys
import time
import uuid
import pytz
import requests
import requests.utils
import six.moves.urllib as urllib
from requests_toolbelt import MultipartEncoder
from tqdm import tqdm
from . import config, ... | 39.637328 | 4,772 | 0.587565 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.