hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a256e2861f9e5f69b0764bd1da15c3a4f122e6c | 5,804 | py | Python | optur/utils/sorted_trials.py | ytsmiling/optur | cbc56c60b322ea764592f01758798f745199b455 | [
"MIT"
] | 1 | 2022-01-19T09:18:15.000Z | 2022-01-19T09:18:15.000Z | optur/utils/sorted_trials.py | ytsmiling/optur | cbc56c60b322ea764592f01758798f745199b455 | [
"MIT"
] | null | null | null | optur/utils/sorted_trials.py | ytsmiling/optur | cbc56c60b322ea764592f01758798f745199b455 | [
"MIT"
] | null | null | null | import math
from typing import Callable, List, Optional, Sequence
from optur.proto.study_pb2 import Target, Trial
class TrialQualityFilter:
def __init__(self, *, filter_unknown: bool = True) -> None:
self._filter_unknown = filter_unknown
def __call__(self, trial: Trial) -> bool:
if self._fil... | 37.934641 | 97 | 0.634218 |
4a256eaff9bf2e9cfaea27f82b899bc93570419e | 506 | py | Python | app/airtable/attachment.py | WildflowerSchools/wf-airtable-api | 963021e5108462d33efa222fedb00890e1788ad6 | [
"MIT"
] | null | null | null | app/airtable/attachment.py | WildflowerSchools/wf-airtable-api | 963021e5108462d33efa222fedb00890e1788ad6 | [
"MIT"
] | null | null | null | app/airtable/attachment.py | WildflowerSchools/wf-airtable-api | 963021e5108462d33efa222fedb00890e1788ad6 | [
"MIT"
] | null | null | null | from typing import Dict, Optional
from pydantic import BaseModel, HttpUrl
class AirtableAttachmentThumbnailDetails(BaseModel):
url: HttpUrl
width: int
height: int
class AirtableAttachmentThumbnails(BaseModel):
__root__: Dict[str, AirtableAttachmentThumbnailDetails]
class AirtableAttachment(BaseMod... | 21.083333 | 59 | 0.749012 |
4a256f09714ee78fae14e0756af07cca3fc68286 | 665 | py | Python | src/manage.py | PrashanjeetH/Django-Dynamic-filters | 7e957a9ca0bb2296199ffef0efd13653bedb58a3 | [
"MIT"
] | null | null | null | src/manage.py | PrashanjeetH/Django-Dynamic-filters | 7e957a9ca0bb2296199ffef0efd13653bedb58a3 | [
"MIT"
] | null | null | null | src/manage.py | PrashanjeetH/Django-Dynamic-filters | 7e957a9ca0bb2296199ffef0efd13653bedb58a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'DjFilters.settings')
try:
from django.core.management import execute_from_command_line
except Im... | 28.913043 | 73 | 0.679699 |
4a256f943aa8304d6b2f590446dcf70d70e9d802 | 1,445 | py | Python | tree/pathsum3.py | manikandan-ravikiran/Leetcode_August_Challenge | 739625ceea0b108b5bbf5fe190a668e798c23039 | [
"Apache-2.0"
] | null | null | null | tree/pathsum3.py | manikandan-ravikiran/Leetcode_August_Challenge | 739625ceea0b108b5bbf5fe190a668e798c23039 | [
"Apache-2.0"
] | null | null | null | tree/pathsum3.py | manikandan-ravikiran/Leetcode_August_Challenge | 739625ceea0b108b5bbf5fe190a668e798c23039 | [
"Apache-2.0"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def pathSum(self, root: TreeNode, sum: int) -> int:
def preorder(node: TreeNode, curr_sum) -> None:
... | 32.840909 | 69 | 0.502422 |
4a25703eb0f37a8ea4f28ec74072e56e87c323f4 | 668 | py | Python | Algorithms/Strings/Pangrams.py | gelaim/HackerRank | 8b0e51d064a390f6112d54166942db440c88b579 | [
"MIT"
] | null | null | null | Algorithms/Strings/Pangrams.py | gelaim/HackerRank | 8b0e51d064a390f6112d54166942db440c88b579 | [
"MIT"
] | null | null | null | Algorithms/Strings/Pangrams.py | gelaim/HackerRank | 8b0e51d064a390f6112d54166942db440c88b579 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'pangrams' function below.
#
# The function is expected to return a STRING.
# The function accepts STRING s as parameter.
#
def pangrams(s):
# Write your code here
letters = set(x for x in 'abcdefghijklmnopqrstuvwxyz')
... | 18.555556 | 58 | 0.615269 |
4a257061c7e519913663649c2dc7c53461ede1fa | 20,899 | py | Python | Providers/nxOMSAutomationWorker/automationworker/scripts/onboarding.py | vtolao/PowerShell-DSC-for-Linux | c591267d82456e98c4cf854bd7d153ec2a7c8070 | [
"MIT"
] | 1 | 2019-04-17T14:45:48.000Z | 2019-04-17T14:45:48.000Z | Providers/nxOMSAutomationWorker/automationworker/scripts/onboarding.py | vtolao/PowerShell-DSC-for-Linux | c591267d82456e98c4cf854bd7d153ec2a7c8070 | [
"MIT"
] | null | null | null | Providers/nxOMSAutomationWorker/automationworker/scripts/onboarding.py | vtolao/PowerShell-DSC-for-Linux | c591267d82456e98c4cf854bd7d153ec2a7c8070 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
#
# Copyright (C) Microsoft Corporation, All rights reserved.
import ConfigParser
import base64
import datetime
import os
import re
import shutil
import socket
import subprocess
import sys
from optparse import OptionParser
# append worker binary source path
sys.path.append(os.path.dirname(os.pa... | 44.847639 | 177 | 0.698646 |
4a2570c33ff0beb34fbb919cea6b3ae21c53ead5 | 1,618 | py | Python | leetcode-algorithms/237. Delete Node in a Linked List/237.delete-node-in-a-linked-list.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | leetcode-algorithms/237. Delete Node in a Linked List/237.delete-node-in-a-linked-list.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | leetcode-algorithms/237. Delete Node in a Linked List/237.delete-node-in-a-linked-list.py | cnyy7/LeetCode_EY | 44e92f102b61f5e931e66081ed6636d7ecbdefd4 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=237 lang=python3
#
# [237] Delete Node in a Linked List
#
# https://leetcode.com/problems/delete-node-in-a-linked-list/description/
#
# algorithms
# Easy (53.89%)
# Likes: 834
# Dislikes: 3998
# Total Accepted: 305.5K
# Total Submissions: 556.4K
# Testcase Example: '[4,5,1,9]... | 23.114286 | 80 | 0.618665 |
4a2570e11de2589db4dfa6648978d1efe98c325e | 1,810 | py | Python | env/lib/python3.8/site-packages/ask_sdk_model/permission_status.py | adamash99/alexa-play-pot-of-greed | dc2d18dae55692a4bf1becb72685a5777870c643 | [
"MIT"
] | 90 | 2018-09-19T21:56:42.000Z | 2022-03-30T11:25:21.000Z | ask-sdk-model/ask_sdk_model/permission_status.py | ishitaojha/alexa-apis-for-python | a68f94b7a0e41f819595d6fe56e800403e8a4194 | [
"Apache-2.0"
] | 11 | 2018-09-23T12:16:48.000Z | 2021-06-10T19:49:45.000Z | ask-sdk-model/ask_sdk_model/permission_status.py | ishitaojha/alexa-apis-for-python | a68f94b7a0e41f819595d6fe56e800403e8a4194 | [
"Apache-2.0"
] | 28 | 2018-09-19T22:30:38.000Z | 2022-02-22T22:57:07.000Z | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 27.014925 | 96 | 0.645856 |
4a2571bb532ed59190ee41ff0ebd3a0192551cfb | 16,050 | py | Python | bin/coldstakepool_prepare.py | AllienWorks/particl-coldstakepool | 16ef959adf4fc8c30d0c5c807439ee41d1f97810 | [
"MIT"
] | null | null | null | bin/coldstakepool_prepare.py | AllienWorks/particl-coldstakepool | 16ef959adf4fc8c30d0c5c807439ee41d1f97810 | [
"MIT"
] | null | null | null | bin/coldstakepool_prepare.py | AllienWorks/particl-coldstakepool | 16ef959adf4fc8c30d0c5c807439ee41d1f97810 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2018-2019 The Particl Core developers
# Distributed under the MIT software license, see the accompanying
# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
"""
Minimal example of starting a Particl stake pool.
1. Download and veri... | 38.123515 | 202 | 0.634517 |
4a2572c846548c847117be633b77f43b19aabea6 | 1,523 | py | Python | felpy/model/materials/phase_mask.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 1 | 2021-03-15T14:04:19.000Z | 2021-03-15T14:04:19.000Z | felpy/model/materials/phase_mask.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 2 | 2021-11-27T11:55:48.000Z | 2021-11-27T11:56:26.000Z | felpy/model/materials/phase_mask.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
FELPY
__author__ = "Trey Guest"
__credits__ = ["Trey Guest"]
__license__ = "EuXFEL"
__version__ = "1.0.1"
__maintainer__ = "Trey Guest"
__email__ = "twguest@students.latrobe.edu.au"
__status__ = "Developement"
"""
import numpy as np
from wpg.srwlib import SRWLOptD ... | 25.813559 | 83 | 0.645437 |
4a2572e4f940de20047f7aa275c539e3c49bd71f | 290 | py | Python | nere/re_models/__init__.py | WangShengguang/NERE | 4b8166aa348b9db207bb9a1e1da6eed5d567ae6f | [
"MIT"
] | null | null | null | nere/re_models/__init__.py | WangShengguang/NERE | 4b8166aa348b9db207bb9a1e1da6eed5d567ae6f | [
"MIT"
] | null | null | null | nere/re_models/__init__.py | WangShengguang/NERE | 4b8166aa348b9db207bb9a1e1da6eed5d567ae6f | [
"MIT"
] | 1 | 2021-08-21T09:21:21.000Z | 2021-08-21T09:21:21.000Z | from .acnn import ACNN
from .att_bilstm import ATT_BiLSTM
from .bert_multitask import BERTMultitask
from .bert_softmax import BERTSoftmax
from .bilstm import BiLSTM
from .bilstm_att import BiLSTM_ATT
__all__ = ["ACNN", "BERTSoftmax", "BERTMultitask", "ATT_BiLSTM", "BiLSTM", "BiLSTM_ATT"]
| 32.222222 | 88 | 0.796552 |
4a25748f9260feca54c0ada9a316bb3aff6f76c9 | 1,692 | py | Python | appengine/findit/model/base_try_job_data.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/findit/model/base_try_job_data.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/model/base_try_job_data.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from google.appengine.ext import ndb
from model.base_try_job import BaseTryJob
class BaseTryJobData(ndb.Model):
"""Represents a tryjob's metadata."""
... | 31.924528 | 78 | 0.763002 |
4a25752166105f4401ffd723875af7003fafbbd2 | 2,598 | py | Python | api.py | zhengsl/SmartInvetory | 8b0229b1acf075096d2edac53951fc81acecbeb5 | [
"Apache-2.0"
] | null | null | null | api.py | zhengsl/SmartInvetory | 8b0229b1acf075096d2edac53951fc81acecbeb5 | [
"Apache-2.0"
] | null | null | null | api.py | zhengsl/SmartInvetory | 8b0229b1acf075096d2edac53951fc81acecbeb5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from dao_base import *
from flask import jsonify
@app.route('/smartinventory/decision/base/province?name=<names>', methods=['GET'])
def get_base_province(names):
if names == 'all':
return jsonify(query_province_all())
else:
result = []
for... | 27.638298 | 101 | 0.694765 |
4a25752b1de9a1d720e7004b3e6324f6d2976046 | 1,081 | py | Python | param.py | facebookresearch/neuromorph | e6e6433537bc42d9150bcad931d6fbd4aea3f751 | [
"BSD-2-Clause"
] | 28 | 2021-11-01T19:14:30.000Z | 2022-01-13T04:53:24.000Z | param.py | marvin-eisenberger/neuromorph | e6e6433537bc42d9150bcad931d6fbd4aea3f751 | [
"BSD-2-Clause"
] | 1 | 2022-02-24T18:06:05.000Z | 2022-02-24T18:06:05.000Z | param.py | marvin-eisenberger/neuromorph | e6e6433537bc42d9150bcad931d6fbd4aea3f751 | [
"BSD-2-Clause"
] | 4 | 2021-11-30T12:09:52.000Z | 2022-01-17T15:13:24.000Z | # 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.
import torch
import pathlib
import os
from datetime import datetime
path_curr = str(pathlib.Path(__file__).parent.absolute())
device = torch.... | 27.717949 | 69 | 0.749306 |
4a25754a88d98bd0b88562f9d9ebbeebd449a020 | 10,896 | py | Python | doc/conf.py | baztian/jpype | 034d44e6c719995c25e9cd61348ebc1860030a9b | [
"Apache-2.0"
] | null | null | null | doc/conf.py | baztian/jpype | 034d44e6c719995c25e9cd61348ebc1860030a9b | [
"Apache-2.0"
] | null | null | null | doc/conf.py | baztian/jpype | 034d44e6c719995c25e9cd61348ebc1860030a9b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# JPype documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 26 20:16:40 2014.
#
# 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... | 30.866856 | 122 | 0.709435 |
4a25755b452adc4c207c377deb9f8adfae71cf3d | 3,118 | py | Python | Beat-The-Roulette.py | robyg72/BeatTheRoulette | c9dc548edf9ba04c8fab224f99e2b6efa2887e85 | [
"MIT"
] | null | null | null | Beat-The-Roulette.py | robyg72/BeatTheRoulette | c9dc548edf9ba04c8fab224f99e2b6efa2887e85 | [
"MIT"
] | null | null | null | Beat-The-Roulette.py | robyg72/BeatTheRoulette | c9dc548edf9ba04c8fab224f99e2b6efa2887e85 | [
"MIT"
] | null | null | null | # percentuale di pari e dispari
# percentuale di rossi e neri
# percentuale dozzina
reds = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36]
blacks = [2, 6, 4, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35]
class Outcome(object):
def __init__(self, number):
# store the numbe... | 29.695238 | 115 | 0.480757 |
4a2575ddd78fee5390f03a021e0690d51d32542c | 1,863 | py | Python | phenum/numerics.py | wsmorgan/phonon-enumeration | 5d7a8d8e3403cc387bdd58cf98a23e4751ea34dd | [
"MIT-0"
] | 5 | 2016-06-17T05:39:27.000Z | 2021-05-30T21:02:08.000Z | phenum/numerics.py | wsmorgan/phonon-enumeration | 5d7a8d8e3403cc387bdd58cf98a23e4751ea34dd | [
"MIT-0"
] | 66 | 2016-04-02T05:02:08.000Z | 2018-07-05T19:43:09.000Z | phenum/numerics.py | wsmorgan/phonon-enumeration | 5d7a8d8e3403cc387bdd58cf98a23e4751ea34dd | [
"MIT-0"
] | 5 | 2017-03-15T21:28:44.000Z | 2020-01-09T14:44:45.000Z | """Numerical methods for mathematical functions neede for the program"""
import numpy as np
#This method finds the factorial of a given number(num).
#The method calls for an integer input num
#The method returns the factorial(represented as fact in the method)
def factorial(num):
"""Finds the factorial of the inpu... | 25.875 | 72 | 0.57971 |
4a2575f061410c28d0360ed40f76cf49b9db4be6 | 168 | py | Python | adoteaqui/adoteaqui/ext/bcrypt.py | eduardooarruda/AdoteAqui2 | 8b329f9a4b4a6d29158f490ccc59791de7c717a4 | [
"MIT"
] | null | null | null | adoteaqui/adoteaqui/ext/bcrypt.py | eduardooarruda/AdoteAqui2 | 8b329f9a4b4a6d29158f490ccc59791de7c717a4 | [
"MIT"
] | null | null | null | adoteaqui/adoteaqui/ext/bcrypt.py | eduardooarruda/AdoteAqui2 | 8b329f9a4b4a6d29158f490ccc59791de7c717a4 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bcrypt import Bcrypt
from typing import NoReturn
bcrypt = Bcrypt()
def init_app(app : Flask) -> NoReturn:
bcrypt.init_app(app) | 18.666667 | 38 | 0.761905 |
4a257626ef7a2dff9d1a9419ef8bb6383fa4ffc7 | 2,594 | py | Python | aliyun-python-sdk-rtc/aliyunsdkrtc/request/v20180111/CreateSubscribeRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-rtc/aliyunsdkrtc/request/v20180111/CreateSubscribeRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-rtc/aliyunsdkrtc/request/v20180111/CreateSubscribeRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.25641 | 74 | 0.743254 |
4a25767157beebd1d3225c64c93e2f6109f97ad3 | 7,125 | py | Python | transformations/contextual_meaning_perturbation/transformation.py | vadesecure/NL-Augmenter | f8419db984bd501ec0cc61d167f53fe3e2410f99 | [
"MIT"
] | null | null | null | transformations/contextual_meaning_perturbation/transformation.py | vadesecure/NL-Augmenter | f8419db984bd501ec0cc61d167f53fe3e2410f99 | [
"MIT"
] | null | null | null | transformations/contextual_meaning_perturbation/transformation.py | vadesecure/NL-Augmenter | f8419db984bd501ec0cc61d167f53fe3e2410f99 | [
"MIT"
] | null | null | null | import itertools
import logging
import random
from collections import defaultdict
import spacy
from transformers import pipeline
from interfaces.SentenceOperation import SentenceOperation
from tasks.TaskTypes import TaskType
class ContextualMeaningPerturbation(SentenceOperation):
tasks = [
TaskType.TEXT... | 35.984848 | 134 | 0.595789 |
4a2577b9d6bdbcff6a0d5f99bb2aad8e5ec77981 | 3,186 | py | Python | mainsite/data.py | jazzyeagle/chatbot_website | 47da27f85907b5f3f7ea94bffd343a6322b8f39a | [
"BSD-3-Clause"
] | null | null | null | mainsite/data.py | jazzyeagle/chatbot_website | 47da27f85907b5f3f7ea94bffd343a6322b8f39a | [
"BSD-3-Clause"
] | null | null | null | mainsite/data.py | jazzyeagle/chatbot_website | 47da27f85907b5f3f7ea94bffd343a6322b8f39a | [
"BSD-3-Clause"
] | 1 | 2022-03-05T15:08:45.000Z | 2022-03-05T15:08:45.000Z | from django.db.models.functions import Lower
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
from mainsite.models import *
from show.models import *
from users import data
from result import ResultFlag, Result
def index(request):
if 'user_id' in request.session:... | 32.845361 | 88 | 0.542687 |
4a257889613aecb943ca4a10604834bec432b45f | 2,365 | py | Python | typer.py | Jaasim2008/Ultra-Typer-V2 | 14c5b8994fb0b3deab2bad1cda685ffc92ce61fe | [
"MIT"
] | null | null | null | typer.py | Jaasim2008/Ultra-Typer-V2 | 14c5b8994fb0b3deab2bad1cda685ffc92ce61fe | [
"MIT"
] | null | null | null | typer.py | Jaasim2008/Ultra-Typer-V2 | 14c5b8994fb0b3deab2bad1cda685ffc92ce61fe | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import messagebox
from json_manager import *
from pynput.keyboard import Key, Controller
import time
root = Tk()
root.title('Ultra Typer v2')
root.geometry('700x400')
my_icon = PhotoImage(file='keyboard.png')
root.iconphoto(False, my_icon)
dark_col = '#3d3d3d'
root.config... | 31.118421 | 120 | 0.629598 |
4a2578bb97cb1d5070a67bb8a82d675e22e581b2 | 1,594 | py | Python | main.py | HaoZhang1018/MFF-GAN_Inf2020 | 2f674c8aa00613e4637b8b12c772323b872fa9b4 | [
"MIT"
] | 12 | 2020-10-19T08:45:08.000Z | 2022-03-08T12:56:08.000Z | main.py | HaoZhang1018/MFF-GAN_TF2 | 0a67caadac0558146da620058f419e630063d93d | [
"MIT"
] | 2 | 2020-12-01T22:32:49.000Z | 2022-01-29T09:51:41.000Z | main.py | HaoZhang1018/MFF-GAN_TF2 | 0a67caadac0558146da620058f419e630063d93d | [
"MIT"
] | 3 | 2020-10-19T08:45:31.000Z | 2022-02-10T07:56:09.000Z | # -*- coding: utf-8 -*-
from model import CGAN
from utils import input_setup
import numpy as np
import tensorflow as tf
import pprint
import os
flags = tf.app.flags
flags.DEFINE_integer("epoch", 20, "Number of epoch [10]")
flags.DEFINE_integer("batch_size", 32, "The size of batch images [128]")
flags.DEFINE_integer(... | 34.652174 | 99 | 0.699498 |
4a2578d409ea7556318f5e88e383dc68ca7ad965 | 8,735 | py | Python | scripts/regenerate_feedstock.py | janschulz/conda-forge.github.io | 0d73991264b778e6759ceec8bea9ff915595ba78 | [
"BSD-3-Clause"
] | null | null | null | scripts/regenerate_feedstock.py | janschulz/conda-forge.github.io | 0d73991264b778e6759ceec8bea9ff915595ba78 | [
"BSD-3-Clause"
] | null | null | null | scripts/regenerate_feedstock.py | janschulz/conda-forge.github.io | 0d73991264b778e6759ceec8bea9ff915595ba78 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env conda-execute
"""
This script is used to manage the feedstocks by regenerating the content (from conda-smithy).
The first feedstock found which needed re-generating will then have a branch pushed and a pull request open.
Whilst it is out of date, the following pseudo code was used to outline this modul... | 38.995536 | 194 | 0.666857 |
4a2578e257354af6778382a0bfc368377e2379ac | 1,423 | py | Python | area51/forms.py | tailorv/neighbourshood | f9470ba1f9bb8c995d0b8ae93e90316285226026 | [
"Unlicense"
] | 1 | 2020-10-31T16:19:23.000Z | 2020-10-31T16:19:23.000Z | area51/forms.py | tailorv/neighbourshood | f9470ba1f9bb8c995d0b8ae93e90316285226026 | [
"Unlicense"
] | null | null | null | area51/forms.py | tailorv/neighbourshood | f9470ba1f9bb8c995d0b8ae93e90316285226026 | [
"Unlicense"
] | null | null | null | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Profile, Post, Business, Services, Neighbourhood
class UserRegisterForm(UserCreationForm):
email = forms.EmailField()
class Meta:
model = User
fields ... | 28.46 | 76 | 0.663387 |
4a257ce263366e958e45f853c44bd1e43701491e | 8,310 | py | Python | examples/microjson/mutants/CRP_Num_mutant_1486201294.py | Anirban166/tstl | 73dac02f084b10e1bf2f172a5d1306bb5fbd7f7e | [
"Apache-2.0"
] | 90 | 2015-04-07T10:26:53.000Z | 2022-03-07T15:14:57.000Z | examples/microjson/mutants/CRP_Num_mutant_1486201294.py | Anirban166/tstl | 73dac02f084b10e1bf2f172a5d1306bb5fbd7f7e | [
"Apache-2.0"
] | 14 | 2015-10-13T16:25:59.000Z | 2021-01-21T18:31:03.000Z | examples/microjson/mutants/CRP_Num_mutant_1486201294.py | Anirban166/tstl | 73dac02f084b10e1bf2f172a5d1306bb5fbd7f7e | [
"Apache-2.0"
] | 32 | 2015-04-07T10:41:29.000Z | 2022-02-26T05:17:28.000Z | import math
import StringIO
import types
__pychecker__ = 'no-returnvalues'
WS = set([' ', '\t', '\r', '\n', '\x08', '\x0c'])
DIGITS = set([str(i) for i in range(0, 10)])
NUMSTART = DIGITS.union(['.', '-', '+'])
NUMCHARS = NUMSTART.union(['e', 'E'])
ESC_MAP = {'n': '\n', 't': '\t', 'r': '\r', 'b': '\x08', 'f': '\x0c'}
R... | 27.885906 | 178 | 0.526354 |
4a257da54ffc485c8a9cf6c68bfb81426d784fae | 558 | py | Python | jolokia/exceptions.py | minsis/python-jolokia | 10d275b8507fec4ea340b112864c7e6068540e58 | [
"Apache-2.0"
] | null | null | null | jolokia/exceptions.py | minsis/python-jolokia | 10d275b8507fec4ea340b112864c7e6068540e58 | [
"Apache-2.0"
] | null | null | null | jolokia/exceptions.py | minsis/python-jolokia | 10d275b8507fec4ea340b112864c7e6068540e58 | [
"Apache-2.0"
] | null | null | null | """Custom exceptions for for various modules in Jolokia Python client"""
class UrlNotSpecifiedException(Exception):
"""Indicates that Jolokia agent URL has not been provided"""
pass
class MalformedUrlException(Exception):
"""Indicates that the Jolokia agent URL is malformed"""
pass
class IllegalAr... | 25.363636 | 74 | 0.75448 |
4a257e6247d44b7cd16c58b7f104a309577b31af | 2,616 | py | Python | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters_py3.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | null | null | null | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters_py3.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_update_parameters_py3.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.6 | 153 | 0.655581 |
4a257f3bb55c6b0f3b0e9b1d09fab92cd787b206 | 1,865 | py | Python | utilities/scm_enums.py | daotranminh/SCM | 6681a49999cbd089032e25a441572e9a1f166897 | [
"MIT"
] | null | null | null | utilities/scm_enums.py | daotranminh/SCM | 6681a49999cbd089032e25a441572e9a1f166897 | [
"MIT"
] | null | null | null | utilities/scm_enums.py | daotranminh/SCM | 6681a49999cbd089032e25a441572e9a1f166897 | [
"MIT"
] | null | null | null | from enum import IntEnum
class ErrorCodes(IntEnum):
SUCCESS = 0
ERROR_ADD_MATERIAL_FAILED = 1
ERROR_ADD_MATERIAL_VERSION_FAILED = 2
ERROR_ADD_CUSTOMER_FAILED = 3
ERROR_ADD_TASTE_FAILED = 4
ERROR_ADD_TOPIC_FAILED = 5
ERROR_UPDATE_TOPIC_FAILED = 6
ERROR_ADD_MATERIAL_SUBFORMULA_FAILED = 7
... | 30.57377 | 58 | 0.775335 |
4a257f40bfc1b2f7260b0bfba29fc7e221bfb4fd | 6,942 | py | Python | cmd/clusterctl/hack/local-overrides.py | colinlodter/cluster-api | 3c4dff9e48320437fa7a205ee23c143f27cf52eb | [
"Apache-2.0"
] | null | null | null | cmd/clusterctl/hack/local-overrides.py | colinlodter/cluster-api | 3c4dff9e48320437fa7a205ee23c143f27cf52eb | [
"Apache-2.0"
] | null | null | null | cmd/clusterctl/hack/local-overrides.py | colinlodter/cluster-api | 3c4dff9e48320437fa7a205ee23c143f27cf52eb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.34555 | 137 | 0.673581 |
4a257f6cfaaf937edd2f7e4a2744ee5a99463e05 | 1,051 | py | Python | src/battle_CUI.py | srpkdyy/reversi | 93977f1d1787e78e80a3fecb6753747ba3eed979 | [
"MIT"
] | null | null | null | src/battle_CUI.py | srpkdyy/reversi | 93977f1d1787e78e80a3fecb6753747ba3eed979 | [
"MIT"
] | null | null | null | src/battle_CUI.py | srpkdyy/reversi | 93977f1d1787e78e80a3fecb6753747ba3eed979 | [
"MIT"
] | null | null | null | from envs.board import Board
from agents.human import Human
from agents.randomer import Randomer
def main():
field = Board()
field.render()
#player1 = Human()
player1 = Randomer()
player2 = Randomer()
#player2 = Human()
players = (player1, player2)
field.setup_player(player1)
fi... | 21.44898 | 66 | 0.597526 |
4a25804993fbb63265dd3676581c6547134a169d | 622 | py | Python | leetcode-python/num001.py | shuaizi/leetcode | c943410575f380a00335bf5ac8d361af53a92d78 | [
"Apache-2.0"
] | null | null | null | leetcode-python/num001.py | shuaizi/leetcode | c943410575f380a00335bf5ac8d361af53a92d78 | [
"Apache-2.0"
] | null | null | null | leetcode-python/num001.py | shuaizi/leetcode | c943410575f380a00335bf5ac8d361af53a92d78 | [
"Apache-2.0"
] | null | null | null | __author__ = 'shuai'
class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
for i in range(len(nums) - 1):
for j in range(i+1, len(nums)):
if nums[i] + nums[j] == target:
... | 25.916667 | 49 | 0.466238 |
4a25807d9b3fd18292d98ba58abd64f0c19852ad | 1,931 | py | Python | onmt/models/model.py | kanghj/OpenNMT-py | 759d5b5a663ee8de3da781ba57f19b3873024753 | [
"MIT"
] | null | null | null | onmt/models/model.py | kanghj/OpenNMT-py | 759d5b5a663ee8de3da781ba57f19b3873024753 | [
"MIT"
] | null | null | null | onmt/models/model.py | kanghj/OpenNMT-py | 759d5b5a663ee8de3da781ba57f19b3873024753 | [
"MIT"
] | null | null | null | """ Onmt NMT Model base class definition """
import torch.nn as nn
class NMTModel(nn.Module):
"""
Core trainable object in OpenNMT. Implements a trainable interface
for a simple, generic encoder + decoder model.
Args:
encoder (:obj:`EncoderBase`): an encoder object
decoder (:obj:`RNNDecod... | 37.862745 | 79 | 0.58985 |
4a2581fc941294530b98a445ee1e897c468d04e8 | 2,159 | py | Python | moderngl_window/context/sdl2/keys.py | minuJeong/moderngl-window | 6386478f1e6b07cefda8f4d9324d972ab88b34ec | [
"MIT"
] | null | null | null | moderngl_window/context/sdl2/keys.py | minuJeong/moderngl-window | 6386478f1e6b07cefda8f4d9324d972ab88b34ec | [
"MIT"
] | null | null | null | moderngl_window/context/sdl2/keys.py | minuJeong/moderngl-window | 6386478f1e6b07cefda8f4d9324d972ab88b34ec | [
"MIT"
] | null | null | null | # flake8: noqa E741
import sdl2
from moderngl_window.context.base import BaseKeys
class Keys(BaseKeys):
"""
Namespace mapping SDL2 specific key constants
"""
ACTION_PRESS = sdl2.SDL_KEYDOWN
ACTION_RELEASE = sdl2.SDL_KEYUP
ESCAPE = sdl2.SDLK_ESCAPE
SPACE = sdl2.SDLK_SPACE
... | 23.725275 | 50 | 0.621121 |
4a25823b958cf34775ee722649353a1de7e89270 | 396 | py | Python | mi/types/bot.py | gitter-badger/Mi.py | ef6611c93c8a5237ec9d51ff89e845b85771e070 | [
"MIT"
] | 13 | 2021-09-14T02:47:23.000Z | 2022-02-27T16:48:09.000Z | mi/types/bot.py | gitter-badger/Mi.py | ef6611c93c8a5237ec9d51ff89e845b85771e070 | [
"MIT"
] | 62 | 2021-08-28T10:56:55.000Z | 2022-03-30T06:47:28.000Z | mi/types/bot.py | gitter-badger/Mi.py | ef6611c93c8a5237ec9d51ff89e845b85771e070 | [
"MIT"
] | 3 | 2021-12-23T20:10:57.000Z | 2022-03-30T13:19:49.000Z | from abc import ABC, abstractmethod
from typing import Any, Dict, Optional
class AbstractBotBase(ABC):
@abstractmethod
async def dispatch(self, event_name: Optional[str] = None, *args: tuple[Any], **kwargs: Dict[Any, Any]):
pass
@abstractmethod
async def event_dispatch(self, event_name: Optio... | 30.461538 | 114 | 0.686869 |
4a2582f160a80b3740fa3a3c0dd02621d7bb623a | 21,609 | py | Python | src/PacketCapture.py | sanaakhelloqi/pcapstats | a4135948ec345c46cc20b21c2b1a870df8cafa7e | [
"Apache-2.0"
] | null | null | null | src/PacketCapture.py | sanaakhelloqi/pcapstats | a4135948ec345c46cc20b21c2b1a870df8cafa7e | [
"Apache-2.0"
] | null | null | null | src/PacketCapture.py | sanaakhelloqi/pcapstats | a4135948ec345c46cc20b21c2b1a870df8cafa7e | [
"Apache-2.0"
] | null | null | null | import libs.mlvideos as mlvideos
from src.datamodel.Packet import Packets
from typing import List, Union
from decimal import Decimal
from pathlib import Path
import math
import collections
import pandas as pd
import numpy as np
from scipy import stats
import networkx as nx
class PacketCapture:
def __init__(self... | 37.646341 | 113 | 0.601138 |
4a25835f0ca4e0e4241eda45c82c17075b38ef8d | 1,242 | py | Python | pluto/__main__.py | barrachri/pluto | fa97bfb808af35effcf8c17258c7a390e76f5ea1 | [
"MIT"
] | null | null | null | pluto/__main__.py | barrachri/pluto | fa97bfb808af35effcf8c17258c7a390e76f5ea1 | [
"MIT"
] | null | null | null | pluto/__main__.py | barrachri/pluto | fa97bfb808af35effcf8c17258c7a390e76f5ea1 | [
"MIT"
] | null | null | null | import os
from aiohttp import web
import aiohttp
from gidgethub import routing, sansio
from gidgethub import aiohttp as gh_aiohttp
from . import pull_request
from . import comments
router = routing.Router(pull_request.router, comments.router)
async def test(request):
return web.Response(status=200, text="Hell... | 25.346939 | 61 | 0.683575 |
4a2583daf248e83df871f7da84adf29d792207f6 | 1,023 | py | Python | l5kit/l5kit/data/__init__.py | cedricxie/l5kit | d21644e20f642c5160fee24028dc34d5abb4bf4e | [
"Apache-2.0"
] | null | null | null | l5kit/l5kit/data/__init__.py | cedricxie/l5kit | d21644e20f642c5160fee24028dc34d5abb4bf4e | [
"Apache-2.0"
] | null | null | null | l5kit/l5kit/data/__init__.py | cedricxie/l5kit | d21644e20f642c5160fee24028dc34d5abb4bf4e | [
"Apache-2.0"
] | null | null | null | from .combine import get_combined_scenes
from .filter import (
filter_agents_by_frames,
filter_agents_by_labels,
filter_tl_faces_by_frames,
filter_tl_faces_by_status,
get_agent_by_track_id,
)
from .labels import PERCEPTION_LABEL_TO_INDEX, PERCEPTION_LABELS, TL_FACE_LABEL_TO_INDEX, TL_FACE_LABELS
fro... | 28.416667 | 104 | 0.761486 |
4a25846238f6e1a30ca9529d9a8a8030a24ee8aa | 68,616 | py | Python | Lib/idlelib/configdialog.py | madcoder2k17/cpython | 34b54873b51a1ebee2a3c57b7205537b4f33128d | [
"PSF-2.0"
] | null | null | null | Lib/idlelib/configdialog.py | madcoder2k17/cpython | 34b54873b51a1ebee2a3c57b7205537b4f33128d | [
"PSF-2.0"
] | null | null | null | Lib/idlelib/configdialog.py | madcoder2k17/cpython | 34b54873b51a1ebee2a3c57b7205537b4f33128d | [
"PSF-2.0"
] | null | null | null | """IDLE Configuration Dialog: support user customization of IDLE by GUI
Customize font faces, sizes, and colorization attributes. Set indentation
defaults. Customize keybindings. Colorization and keybindings can be
saved as user defined sets. Select startup options including shell/editor
and default window size. ... | 46.112903 | 86 | 0.625189 |
4a25849c673bc1461f13ec1608020a6200603d0a | 1,975 | py | Python | oscar/apps/dashboard/partners/app.py | radicalgraphics/django-oscar | 0e15a14a5408007f148f080577486e51702ddcc9 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/dashboard/partners/app.py | radicalgraphics/django-oscar | 0e15a14a5408007f148f080577486e51702ddcc9 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/dashboard/partners/app.py | radicalgraphics/django-oscar | 0e15a14a5408007f148f080577486e51702ddcc9 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import patterns, url
from oscar.core.application import Application
from oscar.apps.dashboard.partners import views
class PartnersDashboardApplication(Application):
name = None
default_permissions = ['is_staff', ]
list_view = views.PartnerListView
create_view = views.PartnerCre... | 39.5 | 77 | 0.618734 |
4a2586a52f206a50fcdce6475dd847f89f7b5080 | 2,472 | py | Python | dispatch-engine/app/apis/dispatch/engine.py | rednafi/dispatch-engine | fd32d373f9e14e99151f5fcd9b3185f72fed4133 | [
"MIT"
] | null | null | null | dispatch-engine/app/apis/dispatch/engine.py | rednafi/dispatch-engine | fd32d373f9e14e99151f5fcd9b3185f72fed4133 | [
"MIT"
] | null | null | null | dispatch-engine/app/apis/dispatch/engine.py | rednafi/dispatch-engine | fd32d373f9e14e99151f5fcd9b3185f72fed4133 | [
"MIT"
] | null | null | null | """
This is the heart of the source code that makes everything else tick.
Class Description:
------------------
Class Algo implements the parcel dispatch algorithm
Class DispatchEngine applies the algorithm on real data
"""
import csv
from contextlib import suppress
from typing import Any, Dict, Generator, L... | 30.518519 | 86 | 0.6161 |
4a2586a740a2731d0bf1f994a70c78ba602b283c | 18,671 | py | Python | metadata/profiles/spot6_ortho.py | DREAM-ODA-OS/tools | 66090fc9c39b35b4ef439d4dfe26ac1349d9c5f2 | [
"MIT"
] | null | null | null | metadata/profiles/spot6_ortho.py | DREAM-ODA-OS/tools | 66090fc9c39b35b4ef439d4dfe26ac1349d9c5f2 | [
"MIT"
] | null | null | null | metadata/profiles/spot6_ortho.py | DREAM-ODA-OS/tools | 66090fc9c39b35b4ef439d4dfe26ac1349d9c5f2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#------------------------------------------------------------------------------
#
# sensor metadata-extraction profiles - spot6 ortho-product
#
# Project: XML Metadata Handling
# Authors: Martin Paces <martin.paces@eox.at>
#
#-----------------------------------------------------------------------... | 42.146727 | 105 | 0.557817 |
4a2587189f08a9a33226d3f5deb5fa42c4bd910b | 12,461 | py | Python | ros/catkin_ws/src/puzzlebot_nav2d/src/pure_pursuit_bt_template.py | robotica-cem/mobile-robots-module | 892b464178d417182e3765d44aa5a84c22730298 | [
"BSD-2-Clause"
] | null | null | null | ros/catkin_ws/src/puzzlebot_nav2d/src/pure_pursuit_bt_template.py | robotica-cem/mobile-robots-module | 892b464178d417182e3765d44aa5a84c22730298 | [
"BSD-2-Clause"
] | null | null | null | ros/catkin_ws/src/puzzlebot_nav2d/src/pure_pursuit_bt_template.py | robotica-cem/mobile-robots-module | 892b464178d417182e3765d44aa5a84c22730298 | [
"BSD-2-Clause"
] | 2 | 2022-03-09T16:57:15.000Z | 2022-03-11T18:39:31.000Z | #!/usr/bin/env python
import sys
import rospy
import numpy as np
from functools import partial
import tf2_ros
import geometry_msgs.msg
from tf2_geometry_msgs import PointStamped
import py_trees
def go_to_point_controller(x, y, vmax, Kth, alpha):
"""
Calculates the desired linear- and angular velocities to mo... | 32.033419 | 91 | 0.539443 |
4a25879b3b9821620d7aacc564df1c717b81e8c1 | 3,445 | py | Python | python/names.py | tmcombi/tmcombi | 976d3f333c01104e5efcabd8834854ad7677ea73 | [
"MIT"
] | null | null | null | python/names.py | tmcombi/tmcombi | 976d3f333c01104e5efcabd8834854ad7677ea73 | [
"MIT"
] | null | null | null | python/names.py | tmcombi/tmcombi | 976d3f333c01104e5efcabd8834854ad7677ea73 | [
"MIT"
] | 3 | 2019-03-31T19:04:20.000Z | 2020-01-13T22:32:09.000Z | import unittest
import re
import sys
class Feature:
def __init__(self):
self.name = 'target'
self.type = ''
self.values = []
def dump(self, out_stream=sys.stdout):
print(self.name + ': ', end='', file=out_stream)
if self.type == 'categorical':
print(', '.jo... | 30.486726 | 80 | 0.543977 |
4a2587c5e149be72f213194eab1e14c14ca53339 | 2,480 | py | Python | tools/state_graph.py | citrix-openstack-build/taskflow | a285c3c39f85e8c7fb6837a8a99f3cdacbe3fea0 | [
"Apache-2.0"
] | null | null | null | tools/state_graph.py | citrix-openstack-build/taskflow | a285c3c39f85e8c7fb6837a8a99f3cdacbe3fea0 | [
"Apache-2.0"
] | null | null | null | tools/state_graph.py | citrix-openstack-build/taskflow | a285c3c39f85e8c7fb6837a8a99f3cdacbe3fea0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__),
os.pardir))
sys.path.insert(0, top_dir)
import optparse
import subprocess
import tempfile
import networkx as nx
from taskflow import states
from taskflow.utils import ... | 30.243902 | 74 | 0.594758 |
4a2588423ca126a16652a75edd3ee516b30cce8f | 1,839 | py | Python | src/data/game_logs.py | robsfletch/bts | c03d821b048fdc2b2735fd77bd193443d40468fc | [
"MIT"
] | null | null | null | src/data/game_logs.py | robsfletch/bts | c03d821b048fdc2b2735fd77bd193443d40468fc | [
"MIT"
] | null | null | null | src/data/game_logs.py | robsfletch/bts | c03d821b048fdc2b2735fd77bd193443d40468fc | [
"MIT"
] | null | null | null | import pandas as pd
import glob
from pathlib import Path
import click
import logging
@click.command()
@click.argument('input_filepath', type=click.Path(exists=True))
@click.argument('output_filepath', type=click.Path())
def main(input_filepath, output_filepath):
"""clean game_logs"""
df = read_data(input_filep... | 31.169492 | 74 | 0.643828 |
4a2589692e79d07e24145e58412ae10440c2b649 | 686 | py | Python | yidianzixun/splash_test/items.py | zfanai/scrapy-study | 9db78e37e594166ecbf599a37771022a9c99e758 | [
"Apache-2.0"
] | null | null | null | yidianzixun/splash_test/items.py | zfanai/scrapy-study | 9db78e37e594166ecbf599a37771022a9c99e758 | [
"Apache-2.0"
] | null | null | null | yidianzixun/splash_test/items.py | zfanai/scrapy-study | 9db78e37e594166ecbf599a37771022a9c99e758 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
#import scrapy
from scrapy.item import Item, Field
class DmozItem(Item):
# define the fields for your item here like:
name = Field()
description = Field()
... | 19.6 | 51 | 0.638484 |
4a258a152e13390926f23b71f8c141ac46288bd8 | 1,873 | py | Python | MimeWriter.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | 1 | 2020-03-12T16:44:10.000Z | 2020-03-12T16:44:10.000Z | MimeWriter.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | null | null | null | MimeWriter.py | theclashingfritz/Cog-Invasion-Online-Dump | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: MimeWriter
import mimetools
__all__ = [
'MimeWriter']
import warnings
warnings.warn('the MimeWriter module is deprecated; use the email... | 29.730159 | 106 | 0.588361 |
4a258b1c203047319fb9ceb1696b461fdc9981a6 | 8,317 | py | Python | libcloud/test/dns/test_digitalocean.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | null | null | null | libcloud/test/dns/test_digitalocean.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | 1 | 2021-12-06T12:29:13.000Z | 2021-12-06T12:29:13.000Z | libcloud/test/dns/test_digitalocean.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | 1 | 2019-08-05T10:12:02.000Z | 2019-08-05T10:12:02.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 35.695279 | 88 | 0.635085 |
4a258b9013113f36df8b5c02f8b69c98b857fde0 | 1,540 | py | Python | tmt/plugins.py | RHEmployee/tmt | a21483016cff4ac6959e3294078c16301c9a9778 | [
"MIT"
] | null | null | null | tmt/plugins.py | RHEmployee/tmt | a21483016cff4ac6959e3294078c16301c9a9778 | [
"MIT"
] | null | null | null | tmt/plugins.py | RHEmployee/tmt | a21483016cff4ac6959e3294078c16301c9a9778 | [
"MIT"
] | null | null | null | # coding: utf-8
""" Handle Steps Plugins """
import importlib
import os
import pkgutil
import sys
import fmf
import tmt
log = fmf.utils.Logging('tmt').logger
def explore():
""" Explore all available plugins """
# Check all tmt steps for native plugins
root = os.path.dirname(os.path.realpath(tmt.__fi... | 27.017544 | 74 | 0.614286 |
4a258bfbdc6270773b858b60a11d0663f8886af6 | 3,499 | py | Python | compiler/modules/hierarchical_predecode4x16.py | marwaneltoukhy/OpenRAM | ed9d32c7bc105db2a438d36d4b2d852152a79e3b | [
"BSD-3-Clause"
] | 1 | 2020-07-05T16:08:47.000Z | 2020-07-05T16:08:47.000Z | compiler/modules/hierarchical_predecode4x16.py | marwaneltoukhy/OpenRAM | ed9d32c7bc105db2a438d36d4b2d852152a79e3b | [
"BSD-3-Clause"
] | null | null | null | compiler/modules/hierarchical_predecode4x16.py | marwaneltoukhy/OpenRAM | ed9d32c7bc105db2a438d36d4b2d852152a79e3b | [
"BSD-3-Clause"
] | null | null | null | # See LICENSE for licensing information.
#
# Copyright (c) 2016-2019 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
from hierarchical_predecode import hierarchical_... | 53.830769 | 101 | 0.446127 |
4a258d49102f09a24351d9370b7f2b54fa566347 | 1,399 | py | Python | src/rest_framework_api_key/migrations/0001_initial.py | LundIT/djangorestframework-api-key | 20f4e539140020d88c872249c87a2704ca29e6e7 | [
"MIT"
] | null | null | null | src/rest_framework_api_key/migrations/0001_initial.py | LundIT/djangorestframework-api-key | 20f4e539140020d88c872249c87a2704ca29e6e7 | [
"MIT"
] | null | null | null | src/rest_framework_api_key/migrations/0001_initial.py | LundIT/djangorestframework-api-key | 20f4e539140020d88c872249c87a2704ca29e6e7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.14 on 2022-02-15 20:00
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='APIKey',
fields=[
('id', models.CharField(... | 42.393939 | 172 | 0.59614 |
4a258d518c0b6e791759d5df813e93f2b66f84ea | 7,222 | py | Python | racklay/model.py | AnuragSahu/RackLay | 8d32eae4642cbaaed57a5b33d1293a1b8d6bff1d | [
"MIT"
] | null | null | null | racklay/model.py | AnuragSahu/RackLay | 8d32eae4642cbaaed57a5b33d1293a1b8d6bff1d | [
"MIT"
] | null | null | null | racklay/model.py | AnuragSahu/RackLay | 8d32eae4642cbaaed57a5b33d1293a1b8d6bff1d | [
"MIT"
] | null | null | null | from collections import OrderedDict
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from .resnet_encoder import ResnetEncoder
# Utils
class ConvBlock(nn.Module):
"""Layer to perform a convolution followed by ELU
"""
def __init__(self, in_channels, out_channels):
super... | 30.217573 | 155 | 0.562033 |
4a258d7486777bf0a079bd9763fe361fa766b0bb | 8,841 | py | Python | d7a/alp/test/command_factory.py | L-I-Am/pyd7a | 7e3dd6ff71c92df72570d6b852ca74cc5af50707 | [
"Apache-2.0"
] | 9 | 2016-05-12T20:11:30.000Z | 2020-08-18T05:46:15.000Z | d7a/alp/test/command_factory.py | L-I-Am/pyd7a | 7e3dd6ff71c92df72570d6b852ca74cc5af50707 | [
"Apache-2.0"
] | 2 | 2018-01-14T12:39:06.000Z | 2019-11-25T09:11:08.000Z | d7a/alp/test/command_factory.py | L-I-Am/pyd7a | 7e3dd6ff71c92df72570d6b852ca74cc5af50707 | [
"Apache-2.0"
] | 7 | 2016-09-06T11:08:15.000Z | 2020-10-27T10:29:24.000Z | #
# Copyright (c) 2015-2021 University of Antwerp, Aloxy NV.
#
# This file is part of pyd7a.
# See https://github.com/Sub-IoT/pyd7a for further info.
#
# 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 Lice... | 46.777778 | 126 | 0.754213 |
4a258d75fc92752f9834c8a470c11eacaea2800a | 339 | py | Python | backend/dating/admin.py | crowdbotics-apps/friendmates-31875 | 5018d878c2fd7b07f9fff24b02a704b4838b3e15 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/dating/admin.py | crowdbotics-apps/friendmates-31875 | 5018d878c2fd7b07f9fff24b02a704b4838b3e15 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/dating/admin.py | crowdbotics-apps/friendmates-31875 | 5018d878c2fd7b07f9fff24b02a704b4838b3e15 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.contrib import admin
from .models import Setting, Profile, Inbox, Dislike, Match, UserPhoto, Like
admin.site.register(UserPhoto)
admin.site.register(Setting)
admin.site.register(Profile)
admin.site.register(Like)
admin.site.register(Dislike)
admin.site.register(Match)
admin.site.register(Inbox)
# Register... | 26.076923 | 76 | 0.80531 |
4a258e0d7f95c3b2d9cb0b4b45edfbf0e68eb0f6 | 1,050 | py | Python | code_week12_713_719/interleaving_string_hard.py | dylanlee101/leetcode | b059afdadb83d504e62afd1227107de0b59557af | [
"Apache-2.0"
] | null | null | null | code_week12_713_719/interleaving_string_hard.py | dylanlee101/leetcode | b059afdadb83d504e62afd1227107de0b59557af | [
"Apache-2.0"
] | null | null | null | code_week12_713_719/interleaving_string_hard.py | dylanlee101/leetcode | b059afdadb83d504e62afd1227107de0b59557af | [
"Apache-2.0"
] | null | null | null | '''
给定三个字符串 s1, s2, s3, 验证 s3 是否是由 s1 和 s2 交错组成的。
示例 1:
输入: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac"
输出: true
示例 2:
输入: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbbaccc"
输出: false
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/interleaving-string
'''
class Solution:
def isInterleave(self, s1: str, s2: s... | 25 | 79 | 0.438095 |
4a2590d175faa793b0e6418ec12b11fd4414dc3b | 1,379 | py | Python | examples/FreeCAD/Ex019_Counter_Sunk_Holes.py | justbuchanan/cadquery | 7ac64a7280490d99d26f4f12a1ff590370d7e8ba | [
"Apache-2.0"
] | null | null | null | examples/FreeCAD/Ex019_Counter_Sunk_Holes.py | justbuchanan/cadquery | 7ac64a7280490d99d26f4f12a1ff590370d7e8ba | [
"Apache-2.0"
] | null | null | null | examples/FreeCAD/Ex019_Counter_Sunk_Holes.py | justbuchanan/cadquery | 7ac64a7280490d99d26f4f12a1ff590370d7e8ba | [
"Apache-2.0"
] | null | null | null | #File: Ex019_Counter_Sunk_Holes.py
#To use this example file, you need to first follow the "Using CadQuery From Inside FreeCAD"
#instructions here: https://github.com/dcowden/cadquery#installing----using-cadquery-from-inside-freecad
#You run this example by typing the following in the FreeCAD python console, making su... | 44.483871 | 114 | 0.774474 |
4a2591ebe14d89c02f28805a27a66e8d727400cd | 1,625 | py | Python | biobb_adapters/pycompss/biobb_chemistry/acpype/acpype_params_gmx.py | bioexcel/biobb_adapters | 45f32feac328cb05f28038b2b00a7416fcae3178 | [
"Apache-2.0"
] | null | null | null | biobb_adapters/pycompss/biobb_chemistry/acpype/acpype_params_gmx.py | bioexcel/biobb_adapters | 45f32feac328cb05f28038b2b00a7416fcae3178 | [
"Apache-2.0"
] | 4 | 2019-03-04T15:22:06.000Z | 2021-09-24T14:43:48.000Z | biobb_adapters/pycompss/biobb_chemistry/acpype/acpype_params_gmx.py | bioexcel/biobb_adapters | 45f32feac328cb05f28038b2b00a7416fcae3178 | [
"Apache-2.0"
] | 2 | 2020-09-08T05:26:23.000Z | 2022-03-28T07:09:20.000Z | # Python
import os
import sys
import traceback
# Pycompss
from pycompss.api.task import task
from pycompss.api.parameter import FILE_IN, FILE_OUT
# Adapters commons pycompss
from biobb_adapters.pycompss.biobb_commons import task_config
# Wrapped Biobb
from biobb_chemistry.acpype.acpype_params_gmx import AcpypeParamsGMX... | 40.625 | 187 | 0.763077 |
4a259257865ba557a5e89dc34ab9c7f4f6fff407 | 3,330 | py | Python | ckanext/geoview/controllers/service_proxy.py | davidread/ckanext-geoview | ceefb65c89cd7449a84659ee8678ae122d68cd02 | [
"MIT"
] | 1 | 2018-05-03T14:03:40.000Z | 2018-05-03T14:03:40.000Z | ckanext/geoview/controllers/service_proxy.py | davidread/ckanext-geoview | ceefb65c89cd7449a84659ee8678ae122d68cd02 | [
"MIT"
] | null | null | null | ckanext/geoview/controllers/service_proxy.py | davidread/ckanext-geoview | ceefb65c89cd7449a84659ee8678ae122d68cd02 | [
"MIT"
] | null | null | null | from logging import getLogger
import urlparse
import requests
import ckan.logic as logic
import ckan.lib.base as base
log = getLogger(__name__)
MAX_FILE_SIZE = 3 * 1024 * 1024 # 1MB
CHUNK_SIZE = 512
def proxy_service(self, context, data_dict):
''' Chunked proxy for resources. To make sure that the file is not... | 39.642857 | 85 | 0.63964 |
4a2592a8c730e8afdb0936dee405f06d5b948c4a | 2,265 | py | Python | MODULES/Discovery_RemoteSystemDiscovery_GetNetComputer.py | FunnyWolf/viperpython | ba794ee74079285be32191e898daa3e56305c8be | [
"BSD-3-Clause"
] | 42 | 2021-01-20T15:30:33.000Z | 2022-03-31T07:51:11.000Z | MODULES/Discovery_RemoteSystemDiscovery_GetNetComputer.py | FunnyWolf/viperpython | ba794ee74079285be32191e898daa3e56305c8be | [
"BSD-3-Clause"
] | 2 | 2021-08-17T00:16:33.000Z | 2022-02-21T11:37:45.000Z | MODULES/Discovery_RemoteSystemDiscovery_GetNetComputer.py | FunnyWolf/viperpython | ba794ee74079285be32191e898daa3e56305c8be | [
"BSD-3-Clause"
] | 28 | 2021-01-22T05:06:39.000Z | 2022-03-31T03:27:42.000Z | # -*- coding: utf-8 -*-
# @File : SimplePostPowershellModule.py
# @Date : 2019/1/12
# @Desc :
from Lib.ModuleAPI import *
class PostModule(PostMSFPowershellFunctionModule):
NAME_ZH = "获取域内主机名"
DESC_ZH = "模块获取主机所在域的所有域主机名,如果主机不在域中,脚本可能报错."
NAME_EN = "Get the hostname in the domain"
DESC_EN = "The ... | 38.389831 | 174 | 0.606623 |
4a2592c25d233040e3bbdc883b2ac12fd61a4702 | 10,131 | py | Python | engine/common/common_request_process.py | datapunk2078/torro_community | 97a97c9d089b0a7b47ccdc28e4e077da36d4b85c | [
"MIT"
] | null | null | null | engine/common/common_request_process.py | datapunk2078/torro_community | 97a97c9d089b0a7b47ccdc28e4e077da36d4b85c | [
"MIT"
] | null | null | null | engine/common/common_request_process.py | datapunk2078/torro_community | 97a97c9d089b0a7b47ccdc28e4e077da36d4b85c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*
"""
@author:li-boss
@file_name: common_request_process.py
@create date: 2019-10-27 14:08
@blog https://leezhonglin.github.io
@csdn https://blog.csdn.net/qq_33196814
@file_description:请求处理
"""
import json
from json import JSONDecodeError
from common.common_api_version import a... | 31.659375 | 94 | 0.506169 |
4a259356256bf8a59000df1ef418e32d7b8a73ea | 1,308 | py | Python | PythonRearrangement/fittest.py | QuantumQuadrate/Rearrangement | 5f8d64bd18a471a488747ed8d17b00304b4ab293 | [
"MIT"
] | null | null | null | PythonRearrangement/fittest.py | QuantumQuadrate/Rearrangement | 5f8d64bd18a471a488747ed8d17b00304b4ab293 | [
"MIT"
] | 1 | 2019-06-18T23:13:45.000Z | 2019-06-18T23:13:45.000Z | PythonRearrangement/fittest.py | QuantumQuadrate/Rearrangement | 5f8d64bd18a471a488747ed8d17b00304b4ab293 | [
"MIT"
] | 2 | 2019-05-23T15:52:20.000Z | 2021-07-03T15:25:19.000Z | import numpy as np
from scipy.optimize import curve_fit
def getfitparams(fitdata):
"""
Generates fitting parameters to estimate frequencies of the lattice sites from provided values.
fitdata is of the form [(siteNum, fX,fY),...].
"""
def func(X,a,b,c):
x,y = X
return a*x+b*y+c
... | 23.781818 | 99 | 0.619266 |
4a259805fed00bb05917fa83c33d40a61adeb1a9 | 754 | py | Python | API e JSON/PYTHON_EXE.py | DouglasCarvalhoPereira/Especializaco-Python | 7dface66ef0c86e183e5a5f1a2c9e6f753647d69 | [
"MIT"
] | null | null | null | API e JSON/PYTHON_EXE.py | DouglasCarvalhoPereira/Especializaco-Python | 7dface66ef0c86e183e5a5f1a2c9e6f753647d69 | [
"MIT"
] | null | null | null | API e JSON/PYTHON_EXE.py | DouglasCarvalhoPereira/Especializaco-Python | 7dface66ef0c86e183e5a5f1a2c9e6f753647d69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Python para exe com códigos simples
#
# ### Códigos que não interagem com outros arquivos ou ferramentas do computador
#
# Usaremos abiblioteca pyinstaller
#
# - Passo 1 - Instalar o pyinstaller
# - Passo 2 - Executar o pyinstaller
#
#
# pyinstaller -w nome_do_arquivo.py
... | 19.333333 | 117 | 0.742706 |
4a2598f7c1ae94d2f328aa46608d0db4307408ef | 260 | py | Python | test_pair_to_number.py | clean-code-craft-tcq-2/well-named-in-py-Mageshwari-Kannan | 43496100ed66ec94c01100aa391c449ff561fd25 | [
"MIT"
] | null | null | null | test_pair_to_number.py | clean-code-craft-tcq-2/well-named-in-py-Mageshwari-Kannan | 43496100ed66ec94c01100aa391c449ff561fd25 | [
"MIT"
] | null | null | null | test_pair_to_number.py | clean-code-craft-tcq-2/well-named-in-py-Mageshwari-Kannan | 43496100ed66ec94c01100aa391c449ff561fd25 | [
"MIT"
] | null | null | null | from get_pair_number_from_color import get_pair_number_from_color
def test_pair_to_number(major_color, minor_color, expected_pair_number):
pair_number = get_pair_number_from_color(major_color, minor_color)
assert(pair_number == expected_pair_number)
| 43.333333 | 73 | 0.853846 |
4a25992c9138a01d0e5aa601f434d519af07594a | 6,003 | py | Python | huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/model/show_instance_status_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/model/show_instance_status_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/model/show_instance_status_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ShowInstanceStatusResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map... | 27.410959 | 112 | 0.597701 |
4a2599c76ff3c653b200271c81d0b9912d0d81d3 | 57,780 | py | Python | tweepy/api.py | jefigo/tweepy | 8811332fe96f4eaf30b2477641338dd4cbf60631 | [
"MIT"
] | 1 | 2020-10-30T09:15:19.000Z | 2020-10-30T09:15:19.000Z | tweepy/api.py | dsogo/tweepy | 64b42e560a71d3bbcf9cb47f039e158a860eb979 | [
"MIT"
] | null | null | null | tweepy/api.py | dsogo/tweepy | 64b42e560a71d3bbcf9cb47f039e158a860eb979 | [
"MIT"
] | 1 | 2022-01-15T16:04:14.000Z | 2022-01-15T16:04:14.000Z | # Tweepy
# Copyright 2009-2020 Joshua Roesslein
# See LICENSE for details.
import imghdr
import mimetypes
import os
import six
from tweepy.binder import bind_api, pagination
from tweepy.error import TweepError
from tweepy.parsers import ModelParser, Parser
from tweepy.utils import list_to_csv
class API(object):
... | 39.766001 | 163 | 0.562461 |
4a2599ec80382411ffca42f201b08226ae28e28a | 329 | py | Python | explicalib/calibration/evaluation/metrics/confidence/__init__.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | 2 | 2021-11-30T18:44:11.000Z | 2021-11-30T18:44:19.000Z | explicalib/calibration/evaluation/metrics/confidence/__init__.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | explicalib/calibration/evaluation/metrics/confidence/__init__.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: nicolas.posocco
"""
# confidence_ece estimators
from .direct_confidence_ece import direct_confidence_ece
from .confidence_ece import confidence_ece
from .confidence_ece_a import confidence_ece_a
from .confidence_ece_c import confidence_ece_c
from .confidence_ece_ac import confidenc... | 27.416667 | 56 | 0.826748 |
4a259b65c4db659f5f5954fde7d473bb52213eba | 1,852 | py | Python | alembic/versions/28df99db32ca_create_mod_release_artifact_table.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | 1 | 2021-01-03T00:20:07.000Z | 2021-01-03T00:20:07.000Z | alembic/versions/28df99db32ca_create_mod_release_artifact_table.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | null | null | null | alembic/versions/28df99db32ca_create_mod_release_artifact_table.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | null | null | null | """Create mod_release_artifact table.
Revision ID: 28df99db32ca
Revises: 8e07c57c53c1
Create Date: 2020-04-15 18:12:20.554994
"""
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from alembic import op
# revision identifiers, used by Alembic.
revision = "28df99db32ca"
down_revision = "8e07c57c53c1... | 29.396825 | 84 | 0.62635 |
4a259b9b1ba7f3d0ababf401245ce6f4f79f382d | 2,175 | py | Python | Src/Hosts/Silverlight/Tests/tests/regressions/test_net.py | jdhardy/dlr | dca078fbf9d103fad4dcabda76795a23d82106bc | [
"Apache-2.0"
] | null | null | null | Src/Hosts/Silverlight/Tests/tests/regressions/test_net.py | jdhardy/dlr | dca078fbf9d103fad4dcabda76795a23d82106bc | [
"Apache-2.0"
] | null | null | null | Src/Hosts/Silverlight/Tests/tests/regressions/test_net.py | jdhardy/dlr | dca078fbf9d103fad4dcabda76795a23d82106bc | [
"Apache-2.0"
] | null | null | null | from System import Uri, AsyncCallback
from System.IO import StreamReader
from System.Net import WebRequest
from System.Windows.Browser import HtmlPage
import time
import unittest
from System.Windows.Threading import Dispatcher
from System.Threading import ManualResetEvent, Thread, ThreadStart
are = ManualResetEvent(Fa... | 33.461538 | 153 | 0.731954 |
4a259bba641f019255af1e4fb9d505e6759af4d5 | 1,589 | py | Python | synapse/rest/client/v1/initial_sync.py | rzr/synapse | 16026e60c5381abcfea12f55b57f8d0ce474c402 | [
"Apache-2.0"
] | null | null | null | synapse/rest/client/v1/initial_sync.py | rzr/synapse | 16026e60c5381abcfea12f55b57f8d0ce474c402 | [
"Apache-2.0"
] | null | null | null | synapse/rest/client/v1/initial_sync.py | rzr/synapse | 16026e60c5381abcfea12f55b57f8d0ce474c402 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket 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-2.0
#
# Unless required by applica... | 35.311111 | 74 | 0.733166 |
4a259dac6d83cf604ebb4ad37fe3e80ec31395de | 18,306 | py | Python | homeassistant/components/isy994/binary_sensor.py | mikan-megane/core | 837220cce40890e296920d33a623adbc11bd15a6 | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/isy994/binary_sensor.py | mikan-megane/core | 837220cce40890e296920d33a623adbc11bd15a6 | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/isy994/binary_sensor.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 6 | 2018-02-04T03:48:55.000Z | 2022-01-24T20:37:04.000Z | """Support for ISY994 binary sensors."""
from __future__ import annotations
from datetime import timedelta
from pyisy.constants import (
CMD_OFF,
CMD_ON,
ISY_VALUE_UNKNOWN,
PROTO_INSTEON,
PROTO_ZWAVE,
)
from pyisy.nodes import Group, Node
from homeassistant.components.binary_sensor import (
D... | 37.822314 | 86 | 0.644925 |
4a259dd0d1bbe036115006893111ba8f7bbff167 | 341 | py | Python | ledger/urls.py | moileretour/joatu | 9d18cb58b4280235688e269be6fd2d34b77ccead | [
"MIT"
] | 1 | 2018-05-01T04:54:36.000Z | 2018-05-01T04:54:36.000Z | ledger/urls.py | moileretour/joatu | 9d18cb58b4280235688e269be6fd2d34b77ccead | [
"MIT"
] | null | null | null | ledger/urls.py | moileretour/joatu | 9d18cb58b4280235688e269be6fd2d34b77ccead | [
"MIT"
] | 3 | 2018-04-13T18:28:32.000Z | 2018-05-01T01:38:38.000Z | from django.urls import path
from . import views
from ledger.views import ListGlobalOperationsView,ListUserOperationsView
app_name = 'ledger'
urlpatterns=[
path('operations_global/', ListGlobalOperationsView.as_view(), name='globaloperations'),
path('operations_user/', ListUserOperationsView.as_view(), name... | 28.416667 | 92 | 0.788856 |
4a259fc9b3d803e7c68dacab166c4c9df27bc402 | 2,227 | py | Python | celery/events/dumper.py | coderanger/celery | b34074a5840086dd2a1e04e241fd9b6fabc0a570 | [
"BSD-3-Clause"
] | 1 | 2020-12-29T06:25:25.000Z | 2020-12-29T06:25:25.000Z | celery/events/dumper.py | coderanger/celery | b34074a5840086dd2a1e04e241fd9b6fabc0a570 | [
"BSD-3-Clause"
] | null | null | null | celery/events/dumper.py | coderanger/celery | b34074a5840086dd2a1e04e241fd9b6fabc0a570 | [
"BSD-3-Clause"
] | null | null | null | import sys
from datetime import datetime
from celery.app import app_or_default
from celery.datastructures import LocalCache
from celery.events import EventReceiver
TASK_NAMES = LocalCache(0xFFF)
HUMAN_TYPES = {"worker-offline": "shutdown",
"worker-online": "started",
"worker-heartbeat... | 32.75 | 76 | 0.541536 |
4a259fcf0e33cddfec92237169378e9ef4ad5e5f | 282 | py | Python | buggy_django_app/users/apps.py | AndrewGHC/buggy_django_app | f5f0b8e58b993c60c2a98ac1874f320c0c2e4ace | [
"MIT"
] | null | null | null | buggy_django_app/users/apps.py | AndrewGHC/buggy_django_app | f5f0b8e58b993c60c2a98ac1874f320c0c2e4ace | [
"MIT"
] | null | null | null | buggy_django_app/users/apps.py | AndrewGHC/buggy_django_app | f5f0b8e58b993c60c2a98ac1874f320c0c2e4ace | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class UsersConfig(AppConfig):
name = 'buggy_django_app.users'
verbose_name = "Users"
def ready(self):
"""Override this to put in:
Users system checks
Users signal registration
"""
pass
| 20.142857 | 37 | 0.606383 |
4a259ff82ff3ca5c2975fc11d7d4e841e5865c08 | 1,870 | py | Python | samples/64 Native-Contain.py | acbocai/jeb_script | 5d918a2abb7e50fbbb4c571122741d52b20959fd | [
"BSD-2-Clause"
] | 25 | 2020-10-27T11:26:02.000Z | 2022-03-31T01:40:20.000Z | samples/64 Native-Contain.py | acbocai/jeb_script | 5d918a2abb7e50fbbb4c571122741d52b20959fd | [
"BSD-2-Clause"
] | null | null | null | samples/64 Native-Contain.py | acbocai/jeb_script | 5d918a2abb7e50fbbb4c571122741d52b20959fd | [
"BSD-2-Clause"
] | 9 | 2020-12-10T20:13:23.000Z | 2022-03-04T07:09:14.000Z | # -*- coding: utf-8 -*-
from com.pnfsoftware.jeb.client.api import IClientContext
from com.pnfsoftware.jeb.core import IRuntimeProject
from com.pnfsoftware.jeb.core.units import IUnit, INativeCodeUnit
from com.pnfsoftware.jeb.core.units.code import EntryPointDescription
from com.pnfsoftware.jeb.core.units.code.asm.anal... | 41.555556 | 165 | 0.659893 |
4a25a04981bce981f3a9543380bcbd3612978589 | 8,993 | py | Python | interactions/ext/enhanced/commands.py | Toricane/better-interactions | 6146945b7a1b818668a8ddca0282bd1900772205 | [
"MIT"
] | 2 | 2022-02-16T16:49:11.000Z | 2022-02-21T18:29:11.000Z | interactions/ext/enhanced/commands.py | Toricane/better-interactions | 6146945b7a1b818668a8ddca0282bd1900772205 | [
"MIT"
] | 1 | 2022-03-10T01:16:02.000Z | 2022-03-11T03:44:40.000Z | interactions/ext/enhanced/commands.py | Toricane/better-interactions | 6146945b7a1b818668a8ddca0282bd1900772205 | [
"MIT"
] | 1 | 2022-03-07T05:06:01.000Z | 2022-03-07T05:06:01.000Z | """
commands
Content:
* command: enhanced command decorator
* extension_command: enhanced extension command decorator
* autodefer: autodefer decorator
GitHub: https://github.com/interactions-py/enhanced/blob/main/interactions/ext/enhanced/commands.py
(c) 2022 interactions-py.
"""
from asyncio import Task, get_runni... | 34.992218 | 126 | 0.628934 |
4a25a095af3783bcbe92807684f8134b2c43323d | 2,693 | py | Python | sdk/python/pulumi_azure_native/machinelearningservices/v20180301preview/list_machine_learning_compute_keys.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/machinelearningservices/v20180301preview/list_machine_learning_compute_keys.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/machinelearningservices/v20180301preview/list_machine_learning_compute_keys.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 39.028986 | 192 | 0.705533 |
4a25a0b455c22974db1bf1b0745f14fba0b48b9a | 1,449 | py | Python | python/flare/revil_string_decrypt.py | clayne/flare-ida | b5b3993bdd224b7d6d7bd524045195550c156c44 | [
"Apache-2.0"
] | 1,471 | 2015-01-12T07:00:10.000Z | 2021-09-20T04:30:20.000Z | python/flare/revil_string_decrypt.py | clayne/flare-ida | b5b3993bdd224b7d6d7bd524045195550c156c44 | [
"Apache-2.0"
] | 80 | 2015-01-12T08:28:28.000Z | 2021-08-23T13:33:03.000Z | python/flare/revil_string_decrypt.py | clayne/flare-ida | b5b3993bdd224b7d6d7bd524045195550c156c44 | [
"Apache-2.0"
] | 427 | 2015-01-03T05:39:27.000Z | 2021-09-07T01:49:16.000Z | ############################################
# Copyright (C) 2021 FireEye, Inc.
#
# Author: Chuong Dong
#
# revil_string_decrypt is an IDAPython script that uses flare-emu (which combines Unicorn and
# IDA Pro) to automate string decryption for REvil ransomware samples.
#
# Dependencies:
# https://github.com/fireeye/fl... | 30.829787 | 107 | 0.68668 |
4a25a1282f91054de0829055d595b31806dc3575 | 3,473 | py | Python | nebulae/fuel/tank_pt.py | SeriaZheng/Nebulae | 27a0b78560e66f6ad6540ee7e04c29e03e632bbd | [
"MIT"
] | 2 | 2021-12-24T08:28:44.000Z | 2022-01-05T09:03:32.000Z | nebulae/fuel/tank_pt.py | SeriaZheng/Nebulae | 27a0b78560e66f6ad6540ee7e04c29e03e632bbd | [
"MIT"
] | null | null | null | nebulae/fuel/tank_pt.py | SeriaZheng/Nebulae | 27a0b78560e66f6ad6540ee7e04c29e03e632bbd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Created by Seria at 02/11/2018 3:38 PM
Email: zzqsummerai@yeah.net
_ooOoo_
o888888888o
o88`_ . _`88o
(| 0 0 |)
O \ 。 / O
_____/`-----‘\_____
.’ \|| _ _ ||/ `.
... | 36.177083 | 103 | 0.476533 |
4a25a3cd669ee1b7b4435440c4059bed6fc8327b | 51,386 | py | Python | nova/tests/unit/api/openstack/compute/test_server_actions.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-08-14T02:20:59.000Z | 2020-08-14T02:20:59.000Z | nova/tests/unit/api/openstack/compute/test_server_actions.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:04:16.000Z | 2021-12-13T20:45:03.000Z | nova/tests/unit/api/openstack/compute/test_server_actions.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-07-24T02:31:45.000Z | 2020-07-24T02:31:45.000Z | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 40.557222 | 79 | 0.574008 |
4a25a44859dc73e781db02056775a29fbafb5bc4 | 951 | py | Python | examples/basic/tweaks1.py | sflinter/hypergraph | c3108ee51361d2e4b8ddc7eced1953f1548ce8d8 | [
"Apache-2.0"
] | 1 | 2020-12-17T11:17:56.000Z | 2020-12-17T11:17:56.000Z | examples/basic/tweaks1.py | sflinter/hypergraph | c3108ee51361d2e4b8ddc7eced1953f1548ce8d8 | [
"Apache-2.0"
] | null | null | null | examples/basic/tweaks1.py | sflinter/hypergraph | c3108ee51361d2e4b8ddc7eced1953f1548ce8d8 | [
"Apache-2.0"
] | null | null | null | import hypergraph as hg
from hypergraph.genetic import GeneticOperators
@hg.function()
# TODO @hg.decl_tweaks(z=hg.tweak(hg.LogUniform(), name='z'))
def test1(x, y):
return x+y
@hg.aggregator()
def mygraph1():
n1 = {'x': 2, 'y': hg.tweak(hg.LogUniform(), name="y1")}
n2 = {'x': 1, 'y': hg.tweak(hg.LogUni... | 26.416667 | 74 | 0.70347 |
4a25a45cc3eddc2a4d09df8d93216e165a277a4d | 1,457 | py | Python | api_app/models/domain/airlock_resource.py | chboudry/AzureTRE | 79011378f19ce0e1030b05937bfb0f5f685bfab9 | [
"MIT"
] | null | null | null | api_app/models/domain/airlock_resource.py | chboudry/AzureTRE | 79011378f19ce0e1030b05937bfb0f5f685bfab9 | [
"MIT"
] | null | null | null | api_app/models/domain/airlock_resource.py | chboudry/AzureTRE | 79011378f19ce0e1030b05937bfb0f5f685bfab9 | [
"MIT"
] | null | null | null | from enum import Enum
from typing import List
from pydantic import Field
from models.domain.azuretremodel import AzureTREModel
from resources import strings
class AirlockRequestStatus(str, Enum):
"""
Airlock Request status
"""
Draft = strings.AIRLOCK_RESOURCE_STATUS_DRAFT
Submitted = strings.AIRLO... | 29.14 | 82 | 0.750172 |
4a25a49d75df98ed5c35ebe0a8a6078050175f60 | 405 | py | Python | wolf_chat_proj/wolf_chat_proj/asgi.py | dharanish-v/wolf-chat | f3ef1a020e27ea8cf18b142bcb3f7b1c6121144d | [
"MIT"
] | null | null | null | wolf_chat_proj/wolf_chat_proj/asgi.py | dharanish-v/wolf-chat | f3ef1a020e27ea8cf18b142bcb3f7b1c6121144d | [
"MIT"
] | null | null | null | wolf_chat_proj/wolf_chat_proj/asgi.py | dharanish-v/wolf-chat | f3ef1a020e27ea8cf18b142bcb3f7b1c6121144d | [
"MIT"
] | null | null | null | """
ASGI config for wolf_chat_proj project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANG... | 23.823529 | 78 | 0.792593 |
4a25a5a46cd9aefd861616a8c544d9b91f0f9c8c | 668 | py | Python | sha224.py | deadcodesoc/pycommoncrypto | 691cffbdd7817643d794bc618dd3ad7b4e5a78a8 | [
"MIT"
] | null | null | null | sha224.py | deadcodesoc/pycommoncrypto | 691cffbdd7817643d794bc618dd3ad7b4e5a78a8 | [
"MIT"
] | null | null | null | sha224.py | deadcodesoc/pycommoncrypto | 691cffbdd7817643d794bc618dd3ad7b4e5a78a8 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import _commoncrypto
digest2hex = lambda s: ''.join([hex(ord(x))[2:].zfill(2) for x in s])
def sha224(handler):
ctx = _commoncrypto.SHA224_Init()
while True:
line = handler.readline(1024)
if len(line) == 0: break
_commoncrypto.SHA224_Update(ctx, line)
... | 23.857143 | 69 | 0.556886 |
4a25a5a7fd9910b4efb69d17ae49240a89a139a2 | 274 | py | Python | exe052a.py | Alexmachado81/ExerciciosPython_Resolvidos | 2774ba742788eb7b545f3f85e9438deb68a983d4 | [
"MIT"
] | null | null | null | exe052a.py | Alexmachado81/ExerciciosPython_Resolvidos | 2774ba742788eb7b545f3f85e9438deb68a983d4 | [
"MIT"
] | null | null | null | exe052a.py | Alexmachado81/ExerciciosPython_Resolvidos | 2774ba742788eb7b545f3f85e9438deb68a983d4 | [
"MIT"
] | null | null | null | numero = int(input('Informe um numero: '))
soma =0
for c in range(1,numero+1):
if numero % c == 0:
soma = soma +1
if soma == 2:
print(' Este numero informado {} é primo'.format(numero))
else:
print(' Este numero informado {}, não é primo'.format(numero)) | 30.444444 | 66 | 0.620438 |
4a25a5fca94695380432534c77527bebbaf79246 | 521 | py | Python | tests/test_multicore.py | umbibio/gbnet | 0e478d764cfa02eaed3e32d11d03c240c78e2ff6 | [
"MIT"
] | null | null | null | tests/test_multicore.py | umbibio/gbnet | 0e478d764cfa02eaed3e32d11d03c240c78e2ff6 | [
"MIT"
] | null | null | null | tests/test_multicore.py | umbibio/gbnet | 0e478d764cfa02eaed3e32d11d03c240c78e2ff6 | [
"MIT"
] | 1 | 2019-06-10T16:19:58.000Z | 2019-06-10T16:19:58.000Z | import gbnet
import pandas as pd
import pickle
rp = gbnet.aux.Reporter()
rp.report("Init")
file_paths = [f"gbnet_{v}.csv" for v in ["ents", "rels", "evid"]]
dfs = [pd.read_csv(fp) for fp in file_paths]
model = gbnet.models.ORNORModel(*dfs, nchains=3)
rp.report("Model loaded")
# rp.report("Init sampling singl... | 24.809524 | 66 | 0.702495 |
4a25a628823d2f8010a135348842d1e5648a469a | 7,751 | py | Python | integration-tests/test/conftest.py | MicrohexHQ/rchain | a1b047479ac08f2f307f053960c102d81f9ee956 | [
"Apache-2.0"
] | null | null | null | integration-tests/test/conftest.py | MicrohexHQ/rchain | a1b047479ac08f2f307f053960c102d81f9ee956 | [
"Apache-2.0"
] | null | null | null | integration-tests/test/conftest.py | MicrohexHQ/rchain | a1b047479ac08f2f307f053960c102d81f9ee956 | [
"Apache-2.0"
] | null | null | null | import os
import time
from random import Random
import tempfile
import logging
import contextlib
from collections import defaultdict
from typing import (
Any,
List,
Generator,
Dict,
Optional,
)
import pytest
from _pytest.terminal import TerminalReporter
from _pytest.reports import TestReport
from _... | 41.897297 | 305 | 0.73268 |
4a25a6b189ea89f851e3c9c72a56301d37585d49 | 8,474 | py | Python | pgmpy/factors/continuous/discretize.py | vwxyzjn/pgmpy | 32421fcf0cd4be487871d86dddebeda6556cd292 | [
"MIT"
] | null | null | null | pgmpy/factors/continuous/discretize.py | vwxyzjn/pgmpy | 32421fcf0cd4be487871d86dddebeda6556cd292 | [
"MIT"
] | null | null | null | pgmpy/factors/continuous/discretize.py | vwxyzjn/pgmpy | 32421fcf0cd4be487871d86dddebeda6556cd292 | [
"MIT"
] | 1 | 2021-11-05T03:27:56.000Z | 2021-11-05T03:27:56.000Z | from __future__ import division
from abc import ABCMeta, abstractmethod
import numpy as np
from scipy import integrate
class BaseDiscretizer(ABCMeta):
"""
Base class for the discretizer classes in pgmpy. The discretizer
classes are used to discretize a continuous random variable
distribution into di... | 32.592308 | 99 | 0.597829 |
4a25a754bcb7ee057441f2dacb1c8ee698b8f6c4 | 165 | py | Python | src/mbed_tools/sterm/__init__.py | cyliangtw/mbed-tools | 69c600c0a5ac1eb0d52b481b5ba020da8bb73d33 | [
"Apache-2.0"
] | 39 | 2020-04-03T13:52:34.000Z | 2022-03-23T13:08:22.000Z | src/mbed_tools/sterm/__init__.py | cyliangtw/mbed-tools | 69c600c0a5ac1eb0d52b481b5ba020da8bb73d33 | [
"Apache-2.0"
] | 306 | 2020-02-06T18:08:43.000Z | 2022-03-25T14:50:18.000Z | src/mbed_tools/sterm/__init__.py | cyliangtw/mbed-tools | 69c600c0a5ac1eb0d52b481b5ba020da8bb73d33 | [
"Apache-2.0"
] | 23 | 2020-03-17T11:42:23.000Z | 2022-01-30T02:56:18.000Z | #
# Copyright (c) 2020-2021 Arm Limited and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Package containing sterm functionality."""
| 27.5 | 76 | 0.751515 |
4a25a7f3a81c5d9e118d139427e3b5dc5ba1f135 | 2,567 | py | Python | app/metric/aggregator.py | IvanoBilenchi/umlens | 7d0c621038209567ad6b8df5e6f14f413d417f22 | [
"MIT"
] | null | null | null | app/metric/aggregator.py | IvanoBilenchi/umlens | 7d0c621038209567ad6b8df5e6f14f413d417f22 | [
"MIT"
] | null | null | null | app/metric/aggregator.py | IvanoBilenchi/umlens | 7d0c621038209567ad6b8df5e6f14f413d417f22 | [
"MIT"
] | 1 | 2020-12-01T10:49:03.000Z | 2020-12-01T10:49:03.000Z | from typing import Dict, List, Optional, Type
from app.cycle.finder import CycleFinder
from app.pattern.finder import PatternFinder
from app.uml.model import Diagram
from app.util.decorators import memoized
from .model import (
AvgInheritanceDepth, AvgMethodsPerClass, AvgRelationshipsPerClass, Classes, ClassesInCy... | 42.081967 | 99 | 0.691858 |
4a25a96badd47db09f10e307b6c2c119edb9be64 | 627 | py | Python | virtual/lib/python3.8/site-packages/pyuploadcare/__init__.py | Carolwanzuu/The_Awwward | 37e4a49bd15e5db320d1940aac346fd1bb939113 | [
"MIT"
] | 1 | 2021-01-31T09:33:34.000Z | 2021-01-31T09:33:34.000Z | virtual/lib/python3.8/site-packages/pyuploadcare/__init__.py | AokoMercyline/E-commerce | 833ad9fd5777e35146dfccf809e78e3c94d997a8 | [
"MIT"
] | 8 | 2021-03-19T11:24:02.000Z | 2022-03-12T00:34:31.000Z | virtual/lib/python3.8/site-packages/pyuploadcare/__init__.py | AokoMercyline/E-commerce | 833ad9fd5777e35146dfccf809e78e3c94d997a8 | [
"MIT"
] | 1 | 2020-11-04T08:35:12.000Z | 2020-11-04T08:35:12.000Z | # coding: utf-8
"""
PyUploadcare: a Python library for Uploadcare
Usage example::
>>> import pyuploadcare
>>> pyuploadcare.conf.pub_key = 'demopublickey'
>>> pyuploadcare.conf.secret = 'demoprivatekey'
>>> file_ = pyuploadcare.File('6c5e9526-b0fe-4739-8975-72e8d5ee6342')
>>> file_.cdn_url
http... | 25.08 | 75 | 0.735247 |
4a25aaac8f4e4abe457ee339dc3fe684590eaf30 | 809 | py | Python | xepacrawler/xepacrawler/pipelines.py | jpchagas/xepa-crawler | 9f80418a1a8e1d21fdf00e2cf3fc5c6ac9e40d9b | [
"Apache-2.0"
] | null | null | null | xepacrawler/xepacrawler/pipelines.py | jpchagas/xepa-crawler | 9f80418a1a8e1d21fdf00e2cf3fc5c6ac9e40d9b | [
"Apache-2.0"
] | null | null | null | xepacrawler/xepacrawler/pipelines.py | jpchagas/xepa-crawler | 9f80418a1a8e1d21fdf00e2cf3fc5c6ac9e40d9b | [
"Apache-2.0"
] | null | null | null | import requests
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
class XepacrawlerPipeline:
def process_item(self, item, spid... | 36.772727 | 71 | 0.599506 |
4a25aae7da9d1c933474ab73cc88f48e84bb2b08 | 17,761 | py | Python | synapse/tests/test_lib_node.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | 1 | 2021-02-15T22:07:05.000Z | 2021-02-15T22:07:05.000Z | synapse/tests/test_lib_node.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | synapse/tests/test_lib_node.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | import collections
import synapse.exc as s_exc
import synapse.common as s_common
import synapse.lib.node as s_node
import synapse.tests.utils as s_t_utils
from synapse.tests.utils import alist
class NodeTest(s_t_utils.SynTest):
async def test_pack(self):
form = 'test:str'
valu = 'cool'
... | 42.592326 | 118 | 0.500084 |
4a25ab120d21b4f40dca2116ee4f958e505340f6 | 1,213 | py | Python | bin/attacks/http.py | R3tr074/Burn-Byte | 6e82aa2d38460ffc299c387a652a1441aef49240 | [
"CC0-1.0"
] | 50 | 2020-10-04T07:25:35.000Z | 2022-02-24T03:52:16.000Z | bin/attacks/http.py | R3tr074/Burn-Byte | 6e82aa2d38460ffc299c387a652a1441aef49240 | [
"CC0-1.0"
] | 4 | 2021-06-08T13:17:18.000Z | 2022-01-13T13:37:37.000Z | bin/attacks/http.py | R3tr074/Burn-Byte | 6e82aa2d38460ffc299c387a652a1441aef49240 | [
"CC0-1.0"
] | 4 | 2020-10-05T02:32:06.000Z | 2021-01-31T23:25:47.000Z | import random
import requests
from rich.console import Console
from bin.addons.utils import random_useragent
# Define styled print
print = Console().print
red = "red3"
green = "green1"
yellow = "yellow1"
# Load user agents
user_agents = []
for _ in range(30):
user_agents.append(random_useragent())
# Headers
hea... | 26.369565 | 95 | 0.61418 |
4a25abfefd2253de7451fa0682a7cba285780063 | 2,914 | py | Python | src/networking/auth/exceptions.py | ca1f/mcidle-python | 53f3ce3644f46ee28ea7dc2199ad8ac9d44f1ef5 | [
"MIT"
] | 35 | 2018-12-04T14:54:00.000Z | 2021-12-12T21:09:12.000Z | src/networking/auth/exceptions.py | ca1f/mcidle-python | 53f3ce3644f46ee28ea7dc2199ad8ac9d44f1ef5 | [
"MIT"
] | 7 | 2019-03-05T21:55:28.000Z | 2021-03-07T23:06:50.000Z | src/networking/auth/exceptions.py | ca1f/mcidle-python | 53f3ce3644f46ee28ea7dc2199ad8ac9d44f1ef5 | [
"MIT"
] | 9 | 2019-06-17T03:05:56.000Z | 2020-10-23T10:21:58.000Z | """ Boilerplate from https://github.com/ammaraskar/pyCraft/blob/master/minecraft/exceptions.py """
class YggdrasilError(Exception):
"""
Base `Exception` for the Yggdrasil authentication service.
:param str message: A human-readable string representation of the error.
:param int status_code: Initial valu... | 36.886076 | 98 | 0.697666 |
4a25acb0af0153572842046fa2485721e959b2fc | 43,391 | py | Python | salt/modules/capirca_acl.py | major0/salt | 2019cc89602d296d060e24111df8f9702a8c6bc9 | [
"Apache-2.0"
] | null | null | null | salt/modules/capirca_acl.py | major0/salt | 2019cc89602d296d060e24111df8f9702a8c6bc9 | [
"Apache-2.0"
] | null | null | null | salt/modules/capirca_acl.py | major0/salt | 2019cc89602d296d060e24111df8f9702a8c6bc9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Capirca ACL
============
Generate ACL (firewall) configuration for network devices.
.. versionadded:: 2017.7.0
:codeauthor: Mircea Ulinic <mircea@cloudflare.com> & Robert Ankeny <robankeny@google.com>
:maturity: new
:depends: capirca
:platform: unix
Dependencies
------------
The ... | 34.657348 | 134 | 0.553341 |
4a25ad2ca1c0ee97af698594ab0aa80ce1cf71f0 | 7,000 | py | Python | src/secml/data/c_dataset_header.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 63 | 2020-04-20T16:31:16.000Z | 2022-03-29T01:05:35.000Z | src/secml/data/c_dataset_header.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 5 | 2020-04-21T11:31:39.000Z | 2022-03-24T13:42:56.000Z | src/secml/data/c_dataset_header.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 8 | 2020-04-21T09:16:42.000Z | 2022-02-23T16:28:43.000Z | """
.. module:: CDatasetHeader
:synopsis: Header with extra dataset attributes.
.. moduleauthor:: Marco Melis <marco.melis@unica.it>
"""
from secml.core import CCreator
from secml.core.attr_utils import is_writable
from secml.core.type_utils import is_list
from secml.array import CArray
class CDatasetHeader(CCre... | 33.018868 | 86 | 0.572143 |
4a25ae46383b446cc762a5d1f19c2cd033430dab | 1,393 | py | Python | passGen.py | y-mathur-i/Password-generator | 17489aec5caddfa0f67508c9e2554962f3fc72fc | [
"MIT"
] | null | null | null | passGen.py | y-mathur-i/Password-generator | 17489aec5caddfa0f67508c9e2554962f3fc72fc | [
"MIT"
] | null | null | null | passGen.py | y-mathur-i/Password-generator | 17489aec5caddfa0f67508c9e2554962f3fc72fc | [
"MIT"
] | null | null | null | import random
import string
def passwordGen(length, num=False, strength='Weak'):
"""length of password,
num if want a number,
strength(weak,strong,very) """
lower = string.ascii_lowercase
upper = string.ascii_uppercase
digits = string.digits
letter = lower + upper
punctuati... | 29.020833 | 53 | 0.521895 |
4a25aedf8935ac3e72a86e9c74ca5628c3bbe484 | 4,446 | py | Python | spotty/providers/aws/config/validation.py | cyaaronk/spotty | 69adf6371fcf80c6f739616ea5ef9de0f875e434 | [
"MIT"
] | null | null | null | spotty/providers/aws/config/validation.py | cyaaronk/spotty | 69adf6371fcf80c6f739616ea5ef9de0f875e434 | [
"MIT"
] | null | null | null | spotty/providers/aws/config/validation.py | cyaaronk/spotty | 69adf6371fcf80c6f739616ea5ef9de0f875e434 | [
"MIT"
] | null | null | null | from schema import Schema, Optional, And, Regex, Or, Use
from spotty.config.validation import validate_config, get_instance_parameters_schema
def validate_instance_parameters(params: dict):
from spotty.providers.aws.config.instance_config import VOLUME_TYPE_EBS
instance_parameters = {
'region': And(s... | 51.697674 | 115 | 0.552182 |
4a25afbf63b5a90156568d659f9b7fe52dfe55b0 | 11,800 | py | Python | pycolab/examples/extraterrestrial_marauders.py | simonalford42/pycolab | 2c6a6c9d4a86522ab3e2208b3e87f2eb3bb580cf | [
"Apache-2.0"
] | 666 | 2017-11-16T16:45:23.000Z | 2022-03-24T11:48:59.000Z | pycolab/examples/extraterrestrial_marauders.py | simonalford42/pycolab | 2c6a6c9d4a86522ab3e2208b3e87f2eb3bb580cf | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:49.000Z | 2022-03-12T00:59:45.000Z | rlpyt/envs/pycolab/pycolab/examples/extraterrestrial_marauders.py | williamd4112/curiosity_baselines | 45939f3f24c53cfff5153ef012486a6a058660be | [
"MIT"
] | 124 | 2017-11-17T15:01:17.000Z | 2022-02-03T16:52:26.000Z | # Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 41.549296 | 82 | 0.644576 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.