hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e8b7ecfd892c91e2e7cc347f0a3dc3a6bf05e5cd | 3,686 | py | Python | dochome/views/auth.py | celelstine/documentManagerFlaskElasticSearch | 3333c3d67232def006888ebf582b01959f752492 | [
"Apache-2.0"
] | 1 | 2021-08-28T23:31:19.000Z | 2021-08-28T23:31:19.000Z | dochome/views/auth.py | celelstine/documentManagerFlaskElasticSearch | 3333c3d67232def006888ebf582b01959f752492 | [
"Apache-2.0"
] | null | null | null | dochome/views/auth.py | celelstine/documentManagerFlaskElasticSearch | 3333c3d67232def006888ebf582b01959f752492 | [
"Apache-2.0"
] | 2 | 2017-11-13T11:51:37.000Z | 2018-01-25T08:10:42.000Z | from flask_api import status
from flask import request
from datetime import datetime
from dochome.config import ES, elasticsearch
from dochome.utility import user_exist, encryt, toBytesString, toUnicode, comparePassword, createJWt
from app import app
@app.route('/login/', methods=['GET', 'POST'])
def login():
""... | 37.612245 | 117 | 0.538524 |
e8b7eecb4fda219c32a9543cfd3fb57ed2e5df42 | 7,112 | py | Python | yt_dlp/extractor/misskey/instances.py | Dluke77lnx/ytdl-patched | f8915da042a75596fb072e6656f5204f5eabea35 | [
"Unlicense"
] | 2 | 2021-12-22T18:51:50.000Z | 2021-12-22T18:53:22.000Z | yt_dlp/extractor/misskey/instances.py | Dluke77lnx/ytdl-patched | f8915da042a75596fb072e6656f5204f5eabea35 | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/misskey/instances.py | Dluke77lnx/ytdl-patched | f8915da042a75596fb072e6656f5204f5eabea35 | [
"Unlicense"
] | null | null | null | # coding: utf-8
# AUTOMATICALLY GENERATED FILE. DO NOT EDIT.
# Generated by ./devscripts/make_misskey_instance_list.py
from __future__ import unicode_literals
instances = {
# list of instances here
"0wo.ooo",
"49six.club",
"atto.town",
"b612.moe",
"beg.plead.help",
"beta.kokonect.link",
... | 22.794872 | 57 | 0.578881 |
e8b7fbcad292cf4dea29b022044177fe2f239651 | 1,344 | py | Python | pyrediseasyio/io/float_io.py | washad/PyRedisEasyIO | 30d566760aa622ae6e8fcc1fa4abdc79b6bda614 | [
"MIT"
] | null | null | null | pyrediseasyio/io/float_io.py | washad/PyRedisEasyIO | 30d566760aa622ae6e8fcc1fa4abdc79b6bda614 | [
"MIT"
] | null | null | null | pyrediseasyio/io/float_io.py | washad/PyRedisEasyIO | 30d566760aa622ae6e8fcc1fa4abdc79b6bda614 | [
"MIT"
] | null | null | null | from pyrediseasyio.io.numeric_io import NumericIO
from pyrediseasyio.io.single_io import SingleIO
from pyrediseasyio.abstract_reader_writer import AbstractReaderWriter
class FloatIO(NumericIO):
def __init__(self, name: str, addr: str = None, default: float = 0.0, **kwargs):
"""
:param name: A h... | 49.777778 | 115 | 0.673363 |
e8b83ae6bb53f6fc9b37393df4acc97cadec512d | 2,377 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 31.276316 | 94 | 0.732436 |
e8b86fc75d7e4073035fff6e21cd89c156be0ed5 | 1,859 | py | Python | tests/python/unittest/test_pass_inline.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/python/unittest/test_pass_inline.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/python/unittest/test_pass_inline.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.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... | 34.425926 | 62 | 0.648736 |
e8b8739a363846fcfb3638e8d7b8d33a24832e8f | 10,879 | py | Python | lbutils/lbutils/utils.py | akashphaniteja/Bio-BERT | b714a9bd9d67c8f9be6c0c58dd19709cd78542d5 | [
"CC0-1.0"
] | null | null | null | lbutils/lbutils/utils.py | akashphaniteja/Bio-BERT | b714a9bd9d67c8f9be6c0c58dd19709cd78542d5 | [
"CC0-1.0"
] | null | null | null | lbutils/lbutils/utils.py | akashphaniteja/Bio-BERT | b714a9bd9d67c8f9be6c0c58dd19709cd78542d5 | [
"CC0-1.0"
] | null | null | null | import re
import json
class DataCleaning:
"""
Class to extract numbers for evaluation
"""
def __init__(self, df, log = False):
""" Extracts annotations into a dataframe from Labelbox NER json Format
Parameters
----------
df : pandas.core.frame.Dataframe
D... | 32.091445 | 156 | 0.490578 |
e8b8740f30062f0196b6b43eb4ffd4c52a668756 | 3,696 | py | Python | sivtools/data_structures/linked_list.py | alysivji/sivtools | 570dba15e9669bc4e20e7dffc60fb2c70443456f | [
"MIT"
] | 6 | 2018-09-14T16:18:00.000Z | 2022-03-27T19:50:31.000Z | sivtools/data_structures/linked_list.py | alysivji/sivtools | 570dba15e9669bc4e20e7dffc60fb2c70443456f | [
"MIT"
] | 11 | 2018-01-31T14:18:54.000Z | 2020-06-09T00:46:45.000Z | sivtools/data_structures/linked_list.py | alysivji/sivtools | 570dba15e9669bc4e20e7dffc60fb2c70443456f | [
"MIT"
] | null | null | null | """Implementation of Python list using Linked List"""
from collections import abc
import numbers
class Node(object):
"""
Node that holds data and a link to the next node
"""
def __init__(self, data, next_=None):
self.data = data
self.next_ = next_
def __repr__(self): # pragma: ... | 26.589928 | 75 | 0.517857 |
e8b87e1912c0f52c283b4cd72807d6cd0e5c7e15 | 276 | py | Python | violas_client/lbrtypes/transaction/change_set.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/transaction/change_set.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/transaction/change_set.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from violas_client.canoser import Struct
from violas_client.lbrtypes.contract_event import ContractEvent
from violas_client.lbrtypes.write_set import WriteSet
class ChangeSet(Struct):
_fields = [
("write_set", WriteSet),
("events", [ContractEvent])
]
| 27.6 | 63 | 0.742754 |
e8b8978beb921e356be7c8f40c7e16b9446c33c8 | 659 | py | Python | datawinners/common/urlextension.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/common/urlextension.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/common/urlextension.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from django.http import Http404
def method_splitter(request, *args, **kwargs):
get_view = kwargs.pop('GET', None)
post_view = kwargs.pop('POST', None)
if request.method == 'GET' and get_view is not None:
return get_view(request, *args, **kwargs)
elif request.method == 'POST' and post_view is n... | 34.684211 | 60 | 0.663126 |
e8b898e5ba06096da71a56bc84073b2ef8f83c7b | 2,998 | py | Python | django_xsede_warehouse/processing_status/serializers.py | XSEDE/XSEDE_Information_Warehouse | 8b3aab42b7afd70ce69b9bf44551a0ded4491831 | [
"Apache-2.0"
] | 1 | 2019-10-29T22:50:29.000Z | 2019-10-29T22:50:29.000Z | django_xsede_warehouse/processing_status/serializers.py | XSEDE/XSEDE_Information_Warehouse | 8b3aab42b7afd70ce69b9bf44551a0ded4491831 | [
"Apache-2.0"
] | null | null | null | django_xsede_warehouse/processing_status/serializers.py | XSEDE/XSEDE_Information_Warehouse | 8b3aab42b7afd70ce69b9bf44551a0ded4491831 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from processing_status.models import *
from django.utils.encoding import iri_to_uri
from django.utils.http import urlquote
from django.urls import reverse
import copy
import json
class ProcessingRecord_DbSerializer(serializers.ModelSerializer):
class Meta:
model = Pro... | 46.123077 | 145 | 0.698466 |
e8b8d54c720d82ee17c70120fae229354a8b39c4 | 6,749 | py | Python | psy/client/client.py | aharabara/psyduck | e9e8d0b6465d5232f3787dc3988f09916bb93e38 | [
"MIT"
] | 1 | 2018-09-22T10:52:03.000Z | 2018-09-22T10:52:03.000Z | psy/client/client.py | aharabara/psyduck | e9e8d0b6465d5232f3787dc3988f09916bb93e38 | [
"MIT"
] | 2 | 2018-10-20T19:15:54.000Z | 2018-10-21T08:17:56.000Z | psy/client/client.py | aharabara/psyduck | e9e8d0b6465d5232f3787dc3988f09916bb93e38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding:utf-8
import os
import pickle
import socket
import sys
import time
from threading import Event, Thread
from typing import Tuple, List
from psy import network
from psy.client.message import Message
from psy.client.config import bus
from psy.client.config import logging
class Client:
... | 37.287293 | 106 | 0.577567 |
e8b8ebdec931f48c4bb238309c54beea6ae93097 | 2,358 | py | Python | examples/presentation/05_circus_with_story.py | sathiscode/trumania | bcf21c4f9e1ff0fe03fd9cbe2dc367f0df033fbc | [
"Apache-2.0"
] | 97 | 2018-01-15T19:29:31.000Z | 2022-03-11T00:27:34.000Z | examples/presentation/05_circus_with_story.py | sathiscode/trumania | bcf21c4f9e1ff0fe03fd9cbe2dc367f0df033fbc | [
"Apache-2.0"
] | 10 | 2018-01-15T22:44:55.000Z | 2022-02-18T09:44:10.000Z | examples/presentation/05_circus_with_story.py | sathiscode/trumania | bcf21c4f9e1ff0fe03fd9cbe2dc367f0df033fbc | [
"Apache-2.0"
] | 33 | 2018-01-15T19:34:23.000Z | 2022-03-05T22:39:33.000Z | import logging
import pandas as pd
from trumania.core import circus
import trumania.core.util_functions as util_functions
from trumania.core.operations import FieldLogger
from trumania.core.random_generators import SequencialGenerator, FakerGenerator, NumpyRandomGenerator
from trumania.core.random_generators import Co... | 28.071429 | 101 | 0.682782 |
e8b8f75dd646823a24a7b56a88edc6e139f140e7 | 2,512 | py | Python | savu/plugins/segmentation/evolving_contours/morph_snakes3D.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/segmentation/evolving_contours/morph_snakes3D.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/segmentation/evolving_contours/morph_snakes3D.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2019 Diamond Light Source 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 applicable law or agreed t... | 35.885714 | 157 | 0.718551 |
e8b9042073bc23f340ea64e290bcaeddfeb561a3 | 992 | py | Python | resources/algorithms/a_star/structures/graph.py | pBouillon/Telecom_PPII | dd4a1451c716c22162bd618554509b6618e27f57 | [
"MIT"
] | 1 | 2019-12-10T19:05:14.000Z | 2019-12-10T19:05:14.000Z | resources/algorithms/a_star/structures/graph.py | pBouillon/Telecom_PPII | dd4a1451c716c22162bd618554509b6618e27f57 | [
"MIT"
] | null | null | null | resources/algorithms/a_star/structures/graph.py | pBouillon/Telecom_PPII | dd4a1451c716c22162bd618554509b6618e27f57 | [
"MIT"
] | null | null | null | import json
from typing import List, Dict
from resources.algorithms.a_star.structures.edge import Edge
class Graph:
"""
"""
def __init__(self):
self._graph = dict()
def __str__(self) -> str:
render = ''
for edge in self._graph:
render += f'{edge.name} ->'
... | 23.069767 | 69 | 0.528226 |
e8b91c575f0e594137ee6f564b9037c632ae5853 | 29,071 | py | Python | summertime/model/third_party/HMNet/Models/Trainers/HMNetTrainer.py | techthiyanes/SummerTime | 7fd6b4d3eb5c41f117d2b3350611a8e040e48a1f | [
"Apache-2.0"
] | 178 | 2021-07-07T23:46:20.000Z | 2022-03-26T17:47:21.000Z | summertime/model/third_party/HMNet/Models/Trainers/HMNetTrainer.py | techthiyanes/SummerTime | 7fd6b4d3eb5c41f117d2b3350611a8e040e48a1f | [
"Apache-2.0"
] | 77 | 2021-06-18T21:44:53.000Z | 2022-02-20T00:23:06.000Z | summertime/model/third_party/HMNet/Models/Trainers/HMNetTrainer.py | techthiyanes/SummerTime | 7fd6b4d3eb5c41f117d2b3350611a8e040e48a1f | [
"Apache-2.0"
] | 19 | 2021-06-18T22:24:47.000Z | 2022-03-16T12:53:50.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from collections import defaultdict
from datetime import datetime
import os
import sys
import importlib
import json
import random
import numpy as np
import inspect
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.op... | 41.949495 | 159 | 0.551581 |
e8b9301454c0ce6791908c427380414b77ef8de1 | 12,362 | py | Python | python/pynq/iop/grove_imu.py | AEW2015/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 16 | 2017-03-14T20:28:40.000Z | 2021-11-02T12:45:15.000Z | python/pynq/iop/grove_imu.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 2 | 2017-12-04T05:46:35.000Z | 2018-11-30T21:40:45.000Z | python/pynq/iop/grove_imu.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 8 | 2017-03-30T22:00:43.000Z | 2020-09-08T12:49:39.000Z | # Copyright (c) 2016, Xilinx, 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of ... | 33.501355 | 79 | 0.54983 |
e8b94294b1b85849760356ca102df44603ae5a3f | 3,581 | py | Python | tensorflow/python/kernel_tests/sparse_tensor_dense_matmul_grad_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/kernel_tests/sparse_tensor_dense_matmul_grad_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/sparse_tensor_dense_matmul_grad_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.455446 | 80 | 0.677464 |
e8b99fc871977268c7e72a8862335ca53eff9f6f | 7,211 | py | Python | configurations/pl_blend4_convroll4_doublescale_fs5_no_dropout_33_66_sharded_2.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 628 | 2015-03-25T17:32:30.000Z | 2021-07-30T18:24:33.000Z | configurations/pl_blend4_convroll4_doublescale_fs5_no_dropout_33_66_sharded_2.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 4 | 2015-04-06T10:23:19.000Z | 2017-01-10T18:47:49.000Z | configurations/pl_blend4_convroll4_doublescale_fs5_no_dropout_33_66_sharded_2.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 253 | 2015-03-25T18:08:43.000Z | 2022-01-26T22:35:05.000Z | import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import data
import load
import nn_plankton
import dihedral
import tmp_dnn
import tta
patch_sizes = [(95, 95), (47, 47)]
augmentation_params = {
'zoom_range': (1 / 1.6, 1.6),
'rotation_range': (0, 360),
'shear_range': (-20... | 47.130719 | 186 | 0.725419 |
e8b9a5853bc3e059eca9286bbe6c74d61182ffa5 | 879 | py | Python | services/traction/acapy_wrapper/models/v20_cred_filter.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/models/v20_cred_filter.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/models/v20_cred_filter.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
from acapy_wrapper.models.ld_proof_vc_detail import LDProof... | 29.3 | 96 | 0.757679 |
e8b9bdbef05006efeea535f99d4fec7e703e5731 | 11,700 | py | Python | cartography/intel/gcp/crm.py | eRaMvn/cartography | 807e9216700d32f23739e3b5d227b32fd81aee19 | [
"Apache-2.0"
] | 1 | 2022-03-31T03:24:37.000Z | 2022-03-31T03:24:37.000Z | cartography/intel/gcp/crm.py | srics/cartography | 19a06766e304d657d956246179a2bb01a6d9aef6 | [
"Apache-2.0"
] | 1 | 2021-02-23T18:08:04.000Z | 2021-03-31T08:17:23.000Z | cartography/intel/gcp/crm.py | srics/cartography | 19a06766e304d657d956246179a2bb01a6d9aef6 | [
"Apache-2.0"
] | 1 | 2021-07-12T16:05:55.000Z | 2021-07-12T16:05:55.000Z | # Google Compute Resource Manager
# https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy
import logging
from string import Template
from googleapiclient.discovery import HttpError
from cartography.util import run_cleanup_job
from cartography.util import timeit
logger = logging.getLogger(_... | 40.344828 | 118 | 0.701624 |
e8b9deb7a9c1a05a62ef5526dafacd41d5fc3244 | 102,396 | py | Python | src/sage/categories/crystals.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/categories/crystals.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/categories/crystals.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | r"""
Crystals
TESTS:
Catch warnings produced by :func:`check_tkz_graph`::
sage: from sage.graphs.graph_latex import check_tkz_graph
sage: check_tkz_graph() # random
"""
#*****************************************************************************
# Copyright (C) 2010 Anne Schilling <anne at math.ucd... | 39.580982 | 554 | 0.496191 |
e8ba162ecaf81c3b2955be3d26afdf26a2650e23 | 925 | py | Python | ItemExtensions.py | EthanGroat/AnaTheAnaconda | 53ceee62b6035cc36faac6393908e123de64813c | [
"MIT"
] | 1 | 2019-04-17T18:54:09.000Z | 2019-04-17T18:54:09.000Z | ItemExtensions.py | EthanGroat/AnaTheAnaconda | 53ceee62b6035cc36faac6393908e123de64813c | [
"MIT"
] | null | null | null | ItemExtensions.py | EthanGroat/AnaTheAnaconda | 53ceee62b6035cc36faac6393908e123de64813c | [
"MIT"
] | 1 | 2019-04-17T21:25:28.000Z | 2019-04-17T21:25:28.000Z | from Item import *
class Segment(Item):
def __init__(self, game_handle, color=green, tricoordinates=(0, 0, 0), width=26):
super().__init__(game_handle, sprite=None,
coordinates=(tricoordinates[0], tricoordinates[1]),
width=width, color=color)
self... | 35.576923 | 100 | 0.662703 |
e8ba1886fc38bf09bd6ac14f6427cb3ee7c91cf3 | 41,459 | py | Python | nebula_website/views/db_stat.py | threathunterX/nebula_query_web | 9c73d82f7e6bc322ea2edfd86ff62727c49d7abb | [
"Apache-2.0"
] | 1 | 2019-05-01T09:42:31.000Z | 2019-05-01T09:42:31.000Z | unittests/nebula_website/views/db_stat.py | threathunterX/nebula_query_web | 9c73d82f7e6bc322ea2edfd86ff62727c49d7abb | [
"Apache-2.0"
] | null | null | null | unittests/nebula_website/views/db_stat.py | threathunterX/nebula_query_web | 9c73d82f7e6bc322ea2edfd86ff62727c49d7abb | [
"Apache-2.0"
] | 5 | 2019-06-24T05:48:54.000Z | 2022-02-18T03:34:30.000Z | # -*- coding: utf-8 -*-
import logging, traceback, csv, time
from os import path as opath
from datetime import datetime
from collections import Counter
import codecs
from nebula_website import utils
from nebula_website.cache import get_strategy_weigh
from nebula_website.models import db
import simplejson as json
fro... | 34.956998 | 406 | 0.576642 |
e8ba2bdd92406aefdf7d3c54b55fac59596e4ac4 | 10,452 | py | Python | tests/spacier/test_doc_extensions.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | tests/spacier/test_doc_extensions.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | tests/spacier/test_doc_extensions.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | import pytest
import spacy
from textacy import load_spacy_lang, make_spacy_doc
from textacy.spacier.doc_extensions import (
remove_doc_extensions,
set_doc_extensions,
_doc_extensions,
)
TEXT = """
Since the so-called "statistical revolution" in the late 1980s and mid 1990s, much Natural Language Processin... | 46.247788 | 751 | 0.655568 |
e8ba9c4d264fe6ebaddd4f2cc3e52c48005904a1 | 4,611 | py | Python | src/osmclient/sol005/pdud.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 2 | 2019-10-18T19:59:46.000Z | 2019-12-02T03:11:06.000Z | src/osmclient/sol005/pdud.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 33 | 2019-07-08T13:56:27.000Z | 2022-02-11T13:57:25.000Z | src/osmclient/sol005/pdud.py | qarawlus/tng-sdk-benchmark | 692490cae343288b0f7c93e3753e92bcaafabdd9 | [
"Apache-2.0"
] | 5 | 2019-08-26T13:00:20.000Z | 2019-10-12T17:35:31.000Z | # Copyright 2018 Telefonica
#
# 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 ... | 36.888 | 95 | 0.563869 |
e8bab123f4af09c70a61ebb26b725d1a706aadfb | 78,862 | py | Python | autotest/t505_test.py | GWSci/flopy | 5a17b879f46610f96a77e3be5da47965295dd20d | [
"BSD-3-Clause"
] | null | null | null | autotest/t505_test.py | GWSci/flopy | 5a17b879f46610f96a77e3be5da47965295dd20d | [
"BSD-3-Clause"
] | null | null | null | autotest/t505_test.py | GWSci/flopy | 5a17b879f46610f96a77e3be5da47965295dd20d | [
"BSD-3-Clause"
] | null | null | null | import os
import platform
import numpy as np
import flopy
import flopy.utils.binaryfile as bf
from flopy.mf6.data.mfdata import DataStorageType
from flopy.mf6.data.mfdatautil import ArrayUtil
from flopy.mf6.mfbase import FlopyException
from flopy.mf6.modflow.mfgwf import ModflowGwf
from flopy.mf6.modflow.m... | 49.44326 | 102 | 0.50544 |
e8bae09d4d5d7dcc0884351b561b267f53b47329 | 839 | py | Python | hackerrank/python/Algorithms/01_Warmup/04_AVeryBigSum/solution.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | hackerrank/python/Algorithms/01_Warmup/04_AVeryBigSum/solution.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | hackerrank/python/Algorithms/01_Warmup/04_AVeryBigSum/solution.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Problem URL: https://www.hackerrank.com/challenges/a-very-big-sum/problem
Level: Easy
Score: 10
Example:
5
1000000001 1000000002 1000000003 1000000004 1000000005
> 5000000015
"""
def solve(n, ar):
"""
Return the sum of the elements in array, ar of size n.
This is the same probl... | 25.424242 | 80 | 0.675805 |
e8bb00d6a0a8bfbd1854ac8ae24ee673c47edef5 | 10,582 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/19/train_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/19/train_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/19/train_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 35.871186 | 137 | 0.669155 |
e8bb112014fe3efd8a2635cacd0209794073fce1 | 1,617 | py | Python | py/util/log.py | PurdueMINDS/MCLV-RBM | 46b1f90b52447687983113f37a5ce2c66b8f0465 | [
"Apache-2.0"
] | 4 | 2018-07-21T14:36:09.000Z | 2021-01-27T15:40:04.000Z | py/util/log.py | PurdueMINDS/MCLV-RBM | 46b1f90b52447687983113f37a5ce2c66b8f0465 | [
"Apache-2.0"
] | null | null | null | py/util/log.py | PurdueMINDS/MCLV-RBM | 46b1f90b52447687983113f37a5ce2c66b8f0465 | [
"Apache-2.0"
] | 1 | 2018-07-21T14:36:10.000Z | 2018-07-21T14:36:10.000Z | # Copyright 2017 Bruno Ribeiro, Mayank Kakodkar, Pedro Savarese
#
# 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 applicabl... | 29.4 | 99 | 0.677798 |
e8bb124fa6ab0eb2c4c7c450e98e542c34267824 | 96 | py | Python | office365/sharepoint/change.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/sharepoint/change.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/sharepoint/change.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | from office365.runtime.client_object import ClientObject
class Change(ClientObject):
pass
| 16 | 56 | 0.8125 |
e8bb1412ea9687433e0da5e75ea961e5d9bbff6c | 503 | py | Python | app/api_v1/users.py | LambArchie/Competition-Manager | 7da4c8625f0bd0c1b002b4f2aef72529e1ede4c6 | [
"MIT"
] | null | null | null | app/api_v1/users.py | LambArchie/Competition-Manager | 7da4c8625f0bd0c1b002b4f2aef72529e1ede4c6 | [
"MIT"
] | 1 | 2021-06-14T14:48:06.000Z | 2021-06-14T15:42:40.000Z | app/api_v1/users.py | LambArchie/Competition-Manager | 7da4c8625f0bd0c1b002b4f2aef72529e1ede4c6 | [
"MIT"
] | null | null | null | """
Users API Routes
"""
from flask import jsonify
from app.api_v1 import bp
from app.api_v1.auth import token_auth
from app.api_v1.errors import error_response
from app.database.models import User
@bp.route('/users/<int:user_id>', methods=['GET'])
@token_auth.login_required
def get_user(user_id):
"""Returns user ... | 27.944444 | 55 | 0.727634 |
e8bb1fcd7cee0b10447b41939205f726ca20e83c | 249 | py | Python | chemoinformatics/molecule_web_database/manage.py | gorgitko/bioinformatics-chemoinformatics | b780783abe8ee7ccda88f92eacf1232c2456d046 | [
"MIT"
] | 2 | 2018-01-07T15:34:33.000Z | 2021-01-19T18:20:40.000Z | chemoinformatics/molecule_web_database/manage.py | gorgitko/bioinformatics-chemoinformatics | b780783abe8ee7ccda88f92eacf1232c2456d046 | [
"MIT"
] | null | null | null | chemoinformatics/molecule_web_database/manage.py | gorgitko/bioinformatics-chemoinformatics | b780783abe8ee7ccda88f92eacf1232c2456d046 | [
"MIT"
] | 1 | 2018-07-12T05:42:06.000Z | 2018-07-12T05:42:06.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "molinf.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.636364 | 70 | 0.771084 |
e8bb54a3c2d7505c23d53b6b6ad7a9970d72e337 | 983 | py | Python | ddisearch/geo/migrations/0002_load_geo_codes.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | ddisearch/geo/migrations/0002_load_geo_codes.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | ddisearch/geo/migrations/0002_load_geo_codes.py | emory-libraries/ddi-search | 7b44660a467f0d8295f628108dc7093b2afb3c98 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.core.management import call_command
def load_fixture(apps, schema_editor):
'Load geographic coutry, continent, and state codes from a fixture'
call_command('loaddata', 'geographic_codes', app_... | 29.787879 | 71 | 0.71414 |
e8bb8bfdabc181a92dd131b133877ce1e471d9b9 | 306 | py | Python | problems/190_reverse-bits.py | okuda-seminar/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | null | null | null | problems/190_reverse-bits.py | okuda-seminar/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | 170 | 2021-05-11T14:03:05.000Z | 2021-11-30T14:22:52.000Z | problems/190_reverse-bits.py | ryuji0123/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=190 lang=python3
#
# [190] Reverse Bits
#
# @lc code=start
class Solution:
def reverseBits(self, n: int) -> int:
"""
time : O(1)
space : O(1)
"""
return int((bin(n).replace("0b", "0" * (34 - len(str(bin(n))))))[::-1], 2)
# @lc code=end
| 18 | 82 | 0.493464 |
e8bbb05d1fe5601cfd0d54437ac59a513d569399 | 2,301 | gyp | Python | chrome/browser/resources/settings/settings_page/compiled_resources2.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | chrome/browser/resources/settings/settings_page/compiled_resources2.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/browser/resources/settings/settings_page/compiled_resources2.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # 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.
{
'targets': [
{
'target_name': 'main_page_behavior',
'dependencies': [
'settings_section',
'transition_behavior',
'... | 38.35 | 146 | 0.624946 |
e8bbc97d9604d0c7ebd2971ab7a49d27a445da9e | 7,959 | py | Python | docs/extensions/attributetable.py | RTa-technology/researchmap.py | 6aa427e1564644b20ba2001dfecf63457ef40463 | [
"MIT"
] | null | null | null | docs/extensions/attributetable.py | RTa-technology/researchmap.py | 6aa427e1564644b20ba2001dfecf63457ef40463 | [
"MIT"
] | null | null | null | docs/extensions/attributetable.py | RTa-technology/researchmap.py | 6aa427e1564644b20ba2001dfecf63457ef40463 | [
"MIT"
] | null | null | null | import importlib
import inspect
import os
import re
from collections import OrderedDict, namedtuple
from docutils import nodes
from sphinx import addnodes
from sphinx.locale import _
from sphinx.util.docutils import SphinxDirective
class attributetable(nodes.General, nodes.Element):
pass
class at... | 27.256849 | 93 | 0.634753 |
e8bbd6677c8237509f5e14821aed546817974a70 | 10,365 | py | Python | QUANTAXIS/QASU/main.py | simplezhang57/QUANTAXIS | 0fab23ee3cc4048a30b5eed3c311a5c9cdce8110 | [
"MIT"
] | 1 | 2021-01-19T08:33:35.000Z | 2021-01-19T08:33:35.000Z | QUANTAXIS/QASU/main.py | simplezhang57/QUANTAXIS | 0fab23ee3cc4048a30b5eed3c311a5c9cdce8110 | [
"MIT"
] | null | null | null | QUANTAXIS/QASU/main.py | simplezhang57/QUANTAXIS | 0fab23ee3cc4048a30b5eed3c311a5c9cdce8110 | [
"MIT"
] | 1 | 2021-01-19T06:13:44.000Z | 2021-01-19T06:13:44.000Z | #
# The MIT License (MIT)
#
# Copyright (c) 2016-2018 yutiansut/QUANTAXIS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to u... | 25.592593 | 129 | 0.691462 |
e8bc09bc464305a947b76b9baae02f8414be40ce | 1,099 | py | Python | repos/insider_stack.py | oneillryan93/bot-man | f644a02b0e819d92502799a561ac6272201b46ee | [
"MIT"
] | null | null | null | repos/insider_stack.py | oneillryan93/bot-man | f644a02b0e819d92502799a561ac6272201b46ee | [
"MIT"
] | null | null | null | repos/insider_stack.py | oneillryan93/bot-man | f644a02b0e819d92502799a561ac6272201b46ee | [
"MIT"
] | null | null | null | from aws_cdk import (
aws_iam as iam,
aws_lambda as l,
core
)
class InsiderStack(core.Stack):
def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
resource_layer = l.LayerVersion(
self, 'ResourceLa... | 32.323529 | 120 | 0.55869 |
e8bc30ab9c2aa53f25bf976d38cf11b577b173de | 412 | py | Python | testing/base.py | yarden-livnat/cyclus_gateway | 211410817a7d0c7cff98dc678624640fd54f92cd | [
"BSD-3-Clause"
] | null | null | null | testing/base.py | yarden-livnat/cyclus_gateway | 211410817a7d0c7cff98dc678624640fd54f92cd | [
"BSD-3-Clause"
] | null | null | null | testing/base.py | yarden-livnat/cyclus_gateway | 211410817a7d0c7cff98dc678624640fd54f92cd | [
"BSD-3-Clause"
] | null | null | null | from flask_testing import TestCase
from recyclus_gateway import db
from manage import app
class BaseTestCase(TestCase):
""" Base Tests """
def create_app(self):
app.config.from_object('recyclus_gateway.config.TestingConfig')
return app
def setUp(self):
db.create_all()
db.... | 20.6 | 71 | 0.660194 |
e8bc3e5db5284cc2280934227591e48a2fcec2e6 | 3,268 | py | Python | src/python/pants/util/s3_log_aggregator.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/util/s3_log_aggregator.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/util/s3_log_aggregator.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
from builtins import object
from collections import defaultdict
fro... | 30.830189 | 96 | 0.707772 |
e8bc47b86c4430edd8dc474505f756ee98a7c1dc | 8,593 | py | Python | appengine/monorail/features/test/commands_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/features/test/commands_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/features/test/commands_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"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 or at
# https://developers.google.com/open-source/licenses/bsd
"""Classes and functions that implement command-line-like issue updates."""
from __future__ imp... | 37.199134 | 78 | 0.68614 |
e8bc8c64b860750648478b711ced72d61bdeaa4f | 46,047 | py | Python | dace/properties.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | dace/properties.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | dace/properties.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import ast
from collections import OrderedDict
import copy
from dace.frontend.python.astutils import unparse, TaskletFreeSymbolVisitor
import json
import pydoc
import re
import sympy as sp
import numpy as np
import dace.subsets as sbs
import da... | 32.773665 | 100 | 0.562751 |
e8bc9b65f2ab1055d2fc8fb47565bc6fd0cdf0e3 | 230 | py | Python | settings/__init__.py | GingerNinja2962/wtc-lms-GUI | e65f5aa64919649690059da37f7bd608b823ca6a | [
"Apache-2.0"
] | 2 | 2021-04-08T11:08:12.000Z | 2021-05-20T11:02:26.000Z | settings/__init__.py | GingerNinja2962/wtc-lms-GUI | e65f5aa64919649690059da37f7bd608b823ca6a | [
"Apache-2.0"
] | null | null | null | settings/__init__.py | GingerNinja2962/wtc-lms-GUI | e65f5aa64919649690059da37f7bd608b823ca6a | [
"Apache-2.0"
] | 1 | 2021-04-08T11:08:15.000Z | 2021-04-08T11:08:15.000Z | print("\nModule Imported settingsMenu")
from settings.themeMenu import themeMenuClass
print(" - Imported class - themeMenuClass")
from settings.generalSettings import generalSettings
print(" - Imported class - generalSettings")
| 28.75 | 52 | 0.808696 |
e8bd0b262e65bbd2c34e092726429f18c31055ff | 4,420 | py | Python | modules/misobot.py | joinemm/Miso-Bot | e1cd92fe71fbfdd45487e57e495b8640596732d5 | [
"MIT"
] | null | null | null | modules/misobot.py | joinemm/Miso-Bot | e1cd92fe71fbfdd45487e57e495b8640596732d5 | [
"MIT"
] | null | null | null | modules/misobot.py | joinemm/Miso-Bot | e1cd92fe71fbfdd45487e57e495b8640596732d5 | [
"MIT"
] | null | null | null | import traceback
from time import time
from nextcord import Activity, ActivityType, AllowedMentions, Intents, Status
from nextcord.errors import Forbidden
from nextcord.ext import commands
from modules import cache, log, maria, util
from modules.help import EmbedHelpCommand
class MisoBot(commands.AutoShardedBot):
... | 35.934959 | 99 | 0.616516 |
e8bd4ee5841d24f23a6e80a2c1ac864879bcaa50 | 1,106 | py | Python | bph/tools/windows/upx.py | fortinet/ips-bph-framework | 145e14cced2181f388ade07d78b4f0e9452143dd | [
"Apache-2.0"
] | 21 | 2019-10-24T04:59:52.000Z | 2021-05-11T12:47:17.000Z | bph/tools/windows/upx.py | fortinet/ips-bph-framework | 145e14cced2181f388ade07d78b4f0e9452143dd | [
"Apache-2.0"
] | null | null | null | bph/tools/windows/upx.py | fortinet/ips-bph-framework | 145e14cced2181f388ade07d78b4f0e9452143dd | [
"Apache-2.0"
] | 9 | 2019-10-26T16:56:08.000Z | 2021-03-15T14:10:21.000Z | #!/usr/bin/python
#
# Copyright 2019 Fortinet Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.515152 | 88 | 0.719711 |
e8bd547fd62768bae5824c4e754040644d6fa7c6 | 2,460 | py | Python | arcsightrequesttracker/arcsightesm/esm.py | P1llus/arcsight-esm-requesttracker | ed528a4d564d8ebc3ac29a66aefe83307d0e6b0e | [
"MIT"
] | null | null | null | arcsightrequesttracker/arcsightesm/esm.py | P1llus/arcsight-esm-requesttracker | ed528a4d564d8ebc3ac29a66aefe83307d0e6b0e | [
"MIT"
] | null | null | null | arcsightrequesttracker/arcsightesm/esm.py | P1llus/arcsight-esm-requesttracker | ed528a4d564d8ebc3ac29a66aefe83307d0e6b0e | [
"MIT"
] | 3 | 2018-11-13T16:57:20.000Z | 2020-04-08T12:41:44.000Z | #!/usr/bin/python3
"""ArcSight ESM API Endpoints.
All API calls made to ArcSight ESM
"""
import os
import ConfigParser
import json
import requests
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(CURRENT_DIR)
CONFIG_FILE = ConfigParser.ConfigParser()
CONFIG_FILE.read(... | 31.139241 | 193 | 0.652846 |
e8bd74fd4a3ed172254f5705ebe9b784715c6b29 | 20,802 | py | Python | storm_control/sc_hardware/pointGrey/spinnaker.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T20:25:59.000Z | 2021-03-17T20:25:59.000Z | storm_control/sc_hardware/pointGrey/spinnaker.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | null | null | null | storm_control/sc_hardware/pointGrey/spinnaker.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T21:24:35.000Z | 2021-03-17T21:24:35.000Z | #!/usr/bin/env python
"""
Interface to Point Grey's PySpin Python module.
Tested with "Spinnaker 1.19 for Python 2 and 3 - Windows (64-bit)".
Updated to handle Spinnaker 2.0
Note: As currently written this is designed to work with 12 bit cameras. See
onImageEvent() in SpinImageEventHandler class.
Hazen 01/19
Jef... | 32.707547 | 127 | 0.623978 |
e8bda31d93ef235ec28a5c77ac20714e54d98355 | 174 | py | Python | eth/tools/_utils/git.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | eth/tools/_utils/git.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | eth/tools/_utils/git.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2019-01-29T21:09:31.000Z | 2019-01-29T21:09:31.000Z | import subprocess
from eth_utils import to_text
def get_version_from_git():
version = subprocess.check_output(["git", "describe"]).strip()
return to_text(version)
| 19.333333 | 66 | 0.747126 |
e8bda58e56f0d4b208f6dcf5baeb6a2399d179c2 | 4,830 | py | Python | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 34.014085 | 123 | 0.778261 |
e8bdcc93634c2d296e5f8907f5e97e26dd58a4ce | 913 | py | Python | python/ql/test/experimental/query-tests/Security/CWE-079/flask_mail.py | RasmusWL/ql | 298f4ab899dcb12414d4fd5112956b82effd140f | [
"MIT"
] | null | null | null | python/ql/test/experimental/query-tests/Security/CWE-079/flask_mail.py | RasmusWL/ql | 298f4ab899dcb12414d4fd5112956b82effd140f | [
"MIT"
] | 4 | 2022-02-17T06:25:43.000Z | 2022-02-23T15:55:30.000Z | python/ql/test/experimental/query-tests/Security/CWE-079/flask_mail.py | jketema/codeql | 09578015886a0c59c2d21c9d09d565742803a5a4 | [
"MIT"
] | null | null | null | from flask import request, Flask
from flask_mail import Mail, Message
app = Flask(__name__)
mail = Mail(app)
@app.route("/send")
def send():
msg = Message(subject="Subject",
sender="from@example.com",
recipients=["to@example.com"],
body="plain-text body",
... | 27.666667 | 105 | 0.6046 |
e8bdd216cea222d05aa074cc1f44ee31454572e0 | 8,535 | py | Python | tests/app/celery/test_service_callback_tasks.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | null | null | null | tests/app/celery/test_service_callback_tasks.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 51 | 2019-07-03T14:11:19.000Z | 2019-07-08T12:24:55.000Z | tests/app/celery/test_service_callback_tasks.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | null | null | null | import json
from datetime import datetime
import pytest
import requests_mock
from freezegun import freeze_time
from app import DATETIME_FORMAT, signer
from app.celery.service_callback_tasks import (
send_complaint_to_service,
send_delivery_status_to_service,
)
from tests.app.db import (
create_complaint,
... | 41.838235 | 126 | 0.728998 |
e8bdfce970edf34a451e34b583d8c352e7da4011 | 898 | py | Python | ulmo/util/__init__.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | ulmo/util/__init__.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | ulmo/util/__init__.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | from .misc import (
camel_to_underscore,
convert_date,
convert_datetime,
dict_from_dataframe,
dir_list,
download_if_new,
get_ulmo_dir,
mkdir_if_doesnt_exist,
module_with_dependency_errors,
module_with_deprecation_warnings,
open_file... | 28.0625 | 54 | 0.679287 |
e8be210415f6ef2f018f53d3f1f47b6d0fb0158c | 536 | py | Python | ilmulti/io/writer.py | rahulraj80/ilmulti | 7380815b3fa43bdda55f5d4681579f21477229dd | [
"MIT"
] | 20 | 2020-03-04T15:33:52.000Z | 2021-11-14T17:18:39.000Z | ilmulti/io/writer.py | rahulraj80/ilmulti | 7380815b3fa43bdda55f5d4681579f21477229dd | [
"MIT"
] | 7 | 2020-08-10T11:20:29.000Z | 2021-03-04T02:25:21.000Z | ilmulti/io/writer.py | rahulraj80/ilmulti | 7380815b3fa43bdda55f5d4681579f21477229dd | [
"MIT"
] | 6 | 2020-07-20T13:19:00.000Z | 2021-04-08T11:33:02.000Z | import os
MAX_BUF_SIZE=1024*1024
class ParallelWriter:
def __init__(self, prefix, name, src, tgt, buf_size=MAX_BUF_SIZE):
self.buf_size = buf_size
self.src = self.fp(prefix, name, src)
self.tgt = self.fp(prefix, name, tgt)
def fp(self, prefix, name, ext):
fname = '{}.{}'.form... | 26.8 | 70 | 0.613806 |
e8be2237c2bc7ee00d46d46fe8a261049d6538a2 | 1,204 | py | Python | master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_4/route_cipher_decrypt_prototype.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_4/route_cipher_decrypt_prototype.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_4/route_cipher_decrypt_prototype.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | """Decrypt a route cipher by inputing matrix & key."""
ciphertext = "16 12 8 4 0 1 5 9 13 17 18 14 10 6 2 3 7 11 15 19"
# split elements into words, not letters
cipherlist = list(ciphertext.split())
# initialize variables
COLS = 4
ROWS = 5
key = '-1 2 -3 4' # neg number means read UP column, vs. DOWN
translation_mat... | 29.365854 | 64 | 0.666113 |
e8be2e305871508731f30c7387def841deeeef99 | 3,824 | py | Python | pyramids/batching.py | leomauro/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 9 | 2015-09-04T22:33:40.000Z | 2019-04-11T14:05:11.000Z | pyramids/batching.py | leomauro/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 2 | 2015-09-04T22:31:44.000Z | 2017-07-29T04:11:53.000Z | pyramids/batching.py | hosford42/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 3 | 2015-10-14T12:41:26.000Z | 2022-01-08T19:43:47.000Z | # -*- coding: utf-8 -*-
"""Batchwise parser training and evaluation."""
from typing import NewType, NamedTuple, Callable, Iterable, Tuple, Optional
from pyramids.sample_utils import SampleSet, Input, Target
__all__ = [
'Attempt',
'Result',
'Failure',
'IndividualTally',
'BatchTally',
'Valida... | 39.42268 | 99 | 0.613232 |
e8be352905e2821127334fcdb1598c8e61d98914 | 249 | py | Python | pymath/kclosest/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | pymath/kclosest/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | pymath/kclosest/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | from typing import List
def k_closest(points: List[List[int]], k: int) -> List[List[int]]:
"""
Sort the points by distance, then take the closest K points.
"""
points.sort(key=lambda p: p[0] ** 2 + p[1] ** 2)
return points[:k]
| 24.9 | 66 | 0.606426 |
e8be401e9fbc8d60b941a75a8ce2bcc9d9284d7f | 430 | bzl | Python | third_party/jakarta_activation.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/jakarta_activation.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/jakarta_activation.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load(":import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "jakarta_activation_jakarta_activation_api",
artifact = "jakarta.activation:jakarta.activation-api:1.2.2",
artifact_sha256 = "a187a939103aef5849a7af84bd7e27be2d120c410af291437375ffe... | 43 | 93 | 0.769767 |
e8be7774458d24a7ed19a0bf9dc8b761232773db | 3,542 | py | Python | pyxtal_ml/descriptors/power_spectrum.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 11 | 2018-11-18T21:57:16.000Z | 2021-07-20T12:23:28.000Z | pyxtal_ml/descriptors/power_spectrum.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 34 | 2018-10-23T14:54:48.000Z | 2019-03-26T18:07:09.000Z | pyxtal_ml/descriptors/power_spectrum.py | qzhu2017/ML-Materials | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 3 | 2018-11-15T06:34:37.000Z | 2019-01-04T02:04:25.000Z | import numpy as np
from pymatgen.core.structure import Structure
from pymatgen.analysis.local_env import get_neighbors_of_site_with_index
import pyxtal_ml.descriptors.bond_order_params as bop
from optparse import OptionParser
class power_spectrum(object):
'''
Computes the power spectrum corresponding to each ... | 34.38835 | 83 | 0.58865 |
e8be9bd1362163d1b66b1395ede9182031ddb51f | 981 | py | Python | day14/day14_part2.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | 1 | 2020-12-05T12:39:03.000Z | 2020-12-05T12:39:03.000Z | day14/day14_part2.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | null | null | null | day14/day14_part2.py | Disi77/AdventOfCode2020 | aafe1b402e08976c2cade3c044ead811b67bcf71 | [
"WTFPL"
] | null | null | null | import re
from itertools import product
with open("day14_input.txt", encoding="utf-8", mode="r") as f:
input_data = [x.strip() for x in f.readlines()]
memory = {}
for row in input_data:
if "mask" in row:
mask = row[7:]
elif "mem" in row:
mem_address, mem_value = re.match(r"^mem\[([0-9]+)\... | 28.852941 | 88 | 0.551478 |
e8be9c7bfdbe80007c565ddaf8e793821a0c3f8b | 3,156 | py | Python | examples/library/liberty_server.py | ajaco56/ansible-websphere | d02c0749a1b37040a20ca5a8895d7d4c13b1d8aa | [
"MIT"
] | null | null | null | examples/library/liberty_server.py | ajaco56/ansible-websphere | d02c0749a1b37040a20ca5a8895d7d4c13b1d8aa | [
"MIT"
] | null | null | null | examples/library/liberty_server.py | ajaco56/ansible-websphere | d02c0749a1b37040a20ca5a8895d7d4c13b1d8aa | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Amir Mofasser <amir.mofasser@gmail.com> (@amimof)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import os
import subprocess
import platform
import datetime
#import time
def main():
# Read ... | 39.949367 | 142 | 0.639734 |
e8beb8b0e02d576e47808ab84e6e6594be79f423 | 8,716 | py | Python | test/gsod_test.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | test/gsod_test.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | test/gsod_test.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import ulmo
import test_util
def test_get_stations():
test_stations = [
('999999-94645', {
'FIPS': 'US',
'USAF': '999999',
'WBAN': '94645',
'begin': datetime.date(2002, 9, 20),
'call': 'E632',
'country': 'US',
... | 33.267176 | 85 | 0.474071 |
e8bec31847fb66e535bc57b4368e737eb04f82ac | 1,874 | py | Python | asynq/__init__.py | JelleZijlstra/asynq | e69469b7c3af62439c82434202a349c43da4159d | [
"Apache-2.0"
] | null | null | null | asynq/__init__.py | JelleZijlstra/asynq | e69469b7c3af62439c82434202a349c43da4159d | [
"Apache-2.0"
] | null | null | null | asynq/__init__.py | JelleZijlstra/asynq | e69469b7c3af62439c82434202a349c43da4159d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Quora, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 36.038462 | 94 | 0.795624 |
e8bed6035ed13bb26940e27f22f8b3627e8b66a1 | 6,162 | py | Python | python/app/thirdparty/dirsearch/thirdparty/ntlm_auth/compute_keys.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/thirdparty/dirsearch/thirdparty/ntlm_auth/compute_keys.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/thirdparty/dirsearch/thirdparty/ntlm_auth/compute_keys.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | # Copyright: (c) 2018, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
import hashlib
import hmac
from thirdparty.ntlm_auth.des import DES
from thirdparty.ntlm_auth.constants import NegotiateFlags
def _get_exchange_key_ntlm_v1(negotiate_flags, sess... | 38.037037 | 79 | 0.720383 |
e8bf0bde89802be4df890c7ed4deca4e18d85a7b | 2,865 | py | Python | my_work/ch1_algorithm_design_principles/big_o_notation.py | gabrielavirna/PythonDataStructuresAndAlgorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | 1 | 2019-01-22T04:59:02.000Z | 2019-01-22T04:59:02.000Z | my_work/ch1_algorithm_design_principles/big_o_notation.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | my_work/ch1_algorithm_design_principles/big_o_notation.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | """
Growth rates
-------------
(order low to high) (a.k.a. time complexity of a function/ complexity class of a function):
O(1) -- Constant -- append, get item, set item.
O(logn) -- Logarithmic -- Finding an element in a sorted array.
O(n) -- Linear -- copy, insert, delete, ite... | 35.8125 | 120 | 0.641885 |
e8bf0d7c3720054c601e030b0d2349ec6e127232 | 1,935 | py | Python | redisbench_admin/environments/oss_standalone.py | chayim/redisbench-admin | 11ca257c8d3f3af3cd1cd95ee2b2dedf366a807f | [
"Apache-2.0"
] | null | null | null | redisbench_admin/environments/oss_standalone.py | chayim/redisbench-admin | 11ca257c8d3f3af3cd1cd95ee2b2dedf366a807f | [
"Apache-2.0"
] | null | null | null | redisbench_admin/environments/oss_standalone.py | chayim/redisbench-admin | 11ca257c8d3f3af3cd1cd95ee2b2dedf366a807f | [
"Apache-2.0"
] | null | null | null | # BSD 3-Clause License
#
# Copyright (c) 2021., Redis Labs Modules
# All rights reserved.
#
import logging
import os
import subprocess
import redis
from redisbench_admin.utils.utils import wait_for_conn
def spin_up_local_redis(
binary,
port,
dbdir,
local_module_files,
configuration_parameters... | 25.12987 | 75 | 0.556072 |
e8bf32b33b461b708d5eabd1277884d47e31aca3 | 13,181 | py | Python | nova/tests/integrated/api_samples_test_base.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/integrated/api_samples_test_base.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/integrated/api_samples_test_base.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | 40.80805 | 79 | 0.527957 |
e8bf3ac83fe85231eda5c6966ea05365672ec57b | 1,239 | py | Python | pandayoda/yoda/PandaJob.py | PalNilsson/panda-yoda | cf3c3786ca8937c9a61730b6201edd5bfaeda022 | [
"Apache-2.0"
] | null | null | null | pandayoda/yoda/PandaJob.py | PalNilsson/panda-yoda | cf3c3786ca8937c9a61730b6201edd5bfaeda022 | [
"Apache-2.0"
] | 22 | 2018-07-26T15:54:36.000Z | 2019-05-27T09:28:48.000Z | pandayoda/yoda/PandaJob.py | PalNilsson/panda-yoda | cf3c3786ca8937c9a61730b6201edd5bfaeda022 | [
"Apache-2.0"
] | 3 | 2018-05-21T13:12:10.000Z | 2019-04-02T08:41:57.000Z | # 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
#
# Authors:
# - Taylor Childers (john.taylor.childers@cern.ch)
# - Paul Nilsson (paul.nilsson@cern.... | 25.8125 | 84 | 0.682809 |
e8bf61fc927ab5ed64e2d80296851fc193a985de | 4,625 | py | Python | influxdb_client/domain/telegraf.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/telegraf.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/telegraf.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from influxd... | 26.129944 | 141 | 0.548108 |
e8bfbb2197f88568a4048df654f5e158c7b256ed | 4,470 | py | Python | examples/tictactoeexample.py | toolforger/curtsies | 7f86c07d95aa22b004db9acf8f787e1abf49b581 | [
"MIT"
] | 93 | 2018-02-18T03:13:32.000Z | 2022-03-22T22:09:15.000Z | examples/tictactoeexample.py | toolforger/curtsies | 7f86c07d95aa22b004db9acf8f787e1abf49b581 | [
"MIT"
] | 48 | 2018-02-13T19:16:36.000Z | 2021-12-01T14:18:38.000Z | examples/tictactoeexample.py | toolforger/curtsies | 7f86c07d95aa22b004db9acf8f787e1abf49b581 | [
"MIT"
] | 19 | 2018-02-13T20:36:29.000Z | 2021-01-02T20:22:43.000Z | import sys
from curtsies.fmtfuncs import *
from curtsies import FullscreenWindow, Input, fsarray
class Board:
"""
>>> Board().rows
((' ', ' ', ' '), (' ', ' ', ' '), (' ', ' ', ' '))
>>> Board().columns
((' ', ' ', ' '), (' ', ' ', ' '), (' ', ' ', ' '))
>>> Board().turn
0
>>> Board().... | 33.609023 | 188 | 0.440268 |
e8bfe2464e8613864f5f50ad6fa6af843db3e284 | 11,532 | py | Python | ftpbrowser/src/FTPServerManager.py | pololoko111/enigma2-plugins | 79b4e5e15663bcda7d1b679769e10942915f5bf5 | [
"OLDAP-2.3"
] | null | null | null | ftpbrowser/src/FTPServerManager.py | pololoko111/enigma2-plugins | 79b4e5e15663bcda7d1b679769e10942915f5bf5 | [
"OLDAP-2.3"
] | null | null | null | ftpbrowser/src/FTPServerManager.py | pololoko111/enigma2-plugins | 79b4e5e15663bcda7d1b679769e10942915f5bf5 | [
"OLDAP-2.3"
] | null | null | null | # for localized messages
from . import _
# GUI (Screens)
from Components.ConfigList import ConfigListScreen
from Screens.MessageBox import MessageBox
from Screens.Screen import Screen
from Plugins.SystemPlugins.Toolkit.NTIVirtualKeyBoard import NTIVirtualKeyBoard
# GUI (Summary)
from Screens.Setup import SetupSummary... | 31 | 185 | 0.698318 |
e8bffb0559b5a36e502f66f3194504291fc2b1e8 | 1,485 | py | Python | opennode/cli/actions/sysresources.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 4 | 2015-05-21T20:21:26.000Z | 2020-12-18T06:50:06.000Z | opennode/cli/actions/sysresources.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | null | null | null | opennode/cli/actions/sysresources.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 1 | 2016-02-08T00:43:44.000Z | 2016-02-08T00:43:44.000Z | import re
from opennode.cli.actions.utils import execute
def get_cpu_count():
output = execute("cat /proc/cpuinfo | grep processor")
cpu_count = len(output.split("\n"))
return cpu_count
def get_cpu_usage_limit():
return 100 * get_cpu_count()
def get_ram_size_gb():
cmd_list = ["cat /proc/memin... | 28.018868 | 81 | 0.619529 |
e8c0194a286316604b7d3826cfc211f72b2e70e8 | 4,896 | py | Python | detectron/ops/collect_and_distribute_fpn_rpn_proposals.py | sitingshen/Detectron-ZZNet | 8cea7762ead8998be3ca0c1446bc2587439dcf38 | [
"Apache-2.0"
] | 23 | 2019-04-07T16:25:54.000Z | 2020-09-27T22:29:17.000Z | detectron/ops/collect_and_distribute_fpn_rpn_proposals.py | sitingshen/Detectron-ZZNet | 8cea7762ead8998be3ca0c1446bc2587439dcf38 | [
"Apache-2.0"
] | 4 | 2019-07-04T07:43:02.000Z | 2021-01-12T08:00:14.000Z | detectron/ops/collect_and_distribute_fpn_rpn_proposals.py | sitingshen/Detectron-ZZNet | 8cea7762ead8998be3ca0c1446bc2587439dcf38 | [
"Apache-2.0"
] | 4 | 2019-04-16T07:36:37.000Z | 2020-07-02T12:40:30.000Z | # Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 42.947368 | 79 | 0.684232 |
e8c027694b8b11002d722227f1264f61a335cfc5 | 1,540 | py | Python | freerad_manager/django_freeradius/admin_actions.py | fizzi/django-freeradius-manager | d81fe6ed28b9bdb135c52c4a422df2760f72d0cb | [
"Apache-2.0"
] | null | null | null | freerad_manager/django_freeradius/admin_actions.py | fizzi/django-freeradius-manager | d81fe6ed28b9bdb135c52c4a422df2760f72d0cb | [
"Apache-2.0"
] | null | null | null | freerad_manager/django_freeradius/admin_actions.py | fizzi/django-freeradius-manager | d81fe6ed28b9bdb135c52c4a422df2760f72d0cb | [
"Apache-2.0"
] | null | null | null | from django.contrib import messages
from django.contrib.admin.models import CHANGE, LogEntry
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext_lazy as _
def disable_action(modeladmin, request, queryset):
queryset.update(is_active=False)
ct = ContentType.o... | 46.666667 | 82 | 0.601948 |
e8c049a6ad9573bc805f956c0ea21bf283e3c196 | 10,355 | py | Python | graphinvent/gnn/modules.py | NikolasGialitsis/GraphINVENT | 3bbaf5f1ca8be93b5cc4d105f353b8c818959a03 | [
"MIT"
] | 2 | 2021-09-09T16:36:35.000Z | 2021-09-10T00:02:19.000Z | graphinvent/gnn/modules.py | NikolasGialitsis/GraphINVENT | 3bbaf5f1ca8be93b5cc4d105f353b8c818959a03 | [
"MIT"
] | null | null | null | graphinvent/gnn/modules.py | NikolasGialitsis/GraphINVENT | 3bbaf5f1ca8be93b5cc4d105f353b8c818959a03 | [
"MIT"
] | null | null | null | # load general packages and functions
import torch
# load program-specific functions
# (none)
# defines MPNN modules and readout functions, and APD readout functions
# define "BIG" constants (for masks)
BIG_NEGATIVE = -1e6
BIG_POSITIVE = 1e6
class GraphGather(torch.nn.Module):
""" GGNN readout function.
""... | 37.382671 | 103 | 0.639401 |
e8c04ae6546652d1ec86b0e9cd9b28eed0d081e5 | 2,303 | py | Python | musicapp/models.py | daniel-afana/MusicDB | c2c897d540e6e514403997510e91044f518c0328 | [
"MIT"
] | null | null | null | musicapp/models.py | daniel-afana/MusicDB | c2c897d540e6e514403997510e91044f518c0328 | [
"MIT"
] | null | null | null | musicapp/models.py | daniel-afana/MusicDB | c2c897d540e6e514403997510e91044f518c0328 | [
"MIT"
] | null | null | null | from django.db import models
from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
from rest_framework.authtoken.models import Token
from datetime import datetime
from django.core.exceptions import ValidationError
# Automatically generate a token whenever... | 30.302632 | 98 | 0.70343 |
e8c07df4e0365023f240b3187877684c03c9ffeb | 226 | py | Python | onadata/apps/main/signals.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/apps/main/signals.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/apps/main/signals.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
def set_api_permissions(sender, instance=None, created=False, **kwargs):
from onadata.libs.utils.user_auth import set_api_permissions_for_user
if created:
set_api_permissions_for_user(instance)
| 37.666667 | 73 | 0.778761 |
e8c0cca751d90f5c021212b73e1a4800dda1b53f | 30,032 | gyp | Python | chromeos/chromeos.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2017-02-01T08:49:08.000Z | 2018-02-03T06:14:48.000Z | chromeos/chromeos.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2016-07-11T15:19:20.000Z | 2017-04-02T20:38:55.000Z | chromeos/chromeos.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2012 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.
{
'variables': {
'chromium_code': 1,
# These files lists are shared with the GN build.
'chromeos_sources': [
'accelerometer/accelerom... | 39.515789 | 94 | 0.676145 |
e8c130bad6afd220a8a9688b93b9481addb9ef79 | 10,547 | py | Python | entity/recipe.py | tea2code/recipe_manager | 042741c81f6c2b5c28fabebb339f4d9a0680fd53 | [
"MIT"
] | 6 | 2015-03-10T22:34:45.000Z | 2020-11-21T02:29:27.000Z | entity/recipe.py | tea2code/recipe_manager | 042741c81f6c2b5c28fabebb339f4d9a0680fd53 | [
"MIT"
] | null | null | null | entity/recipe.py | tea2code/recipe_manager | 042741c81f6c2b5c28fabebb339f4d9a0680fd53 | [
"MIT"
] | 1 | 2020-11-21T02:35:37.000Z | 2020-11-21T02:35:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from entity import category as category_entity
from entity import image as image_entity
from entity import synonym as synonym_entity
from entity import tag as tag_entity
from entity import url as url_entity
from entity import user as user_entity
import os
class Recipe:
... | 35.511785 | 81 | 0.573244 |
e8c1330018823967d05f59a89f6c6ea5f387ba04 | 251 | py | Python | tql/algo_dl/keras/__init__.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/algo_dl/keras/__init__.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/algo_dl/keras/__init__.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : __init__.py
# @Time : 2019-06-19 19:50
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
| 20.916667 | 36 | 0.521912 |
e8c1cf54b2c61d0f54ab5cc7222165c9cb1dbc8e | 171,165 | py | Python | contrib/tools/cython/Cython/Compiler/PyrexTypes.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | contrib/tools/cython/Cython/Compiler/PyrexTypes.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | contrib/tools/cython/Cython/Compiler/PyrexTypes.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | 1 | 2018-08-06T14:13:12.000Z | 2018-08-06T14:13:12.000Z | #
# Cython/Python language types
#
from __future__ import absolute_import
import collections
import copy
import re
try:
reduce
except NameError:
from functools import reduce
from Cython.Utils import cached_function
from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode
from . import StringEnco... | 36.707056 | 137 | 0.610224 |
e8c220445cff955966ad8a7f00ce8edfe1bc4888 | 7,122 | py | Python | worker_images/worker.py | youkoulayley/worker_images | 56041de8defbff04101391016eb49a3437db5d7a | [
"MIT"
] | 2 | 2019-02-27T18:16:38.000Z | 2022-01-13T12:52:17.000Z | worker_images/worker.py | Youkoulayley/worker_images | 56041de8defbff04101391016eb49a3437db5d7a | [
"MIT"
] | 4 | 2021-03-18T21:41:01.000Z | 2022-03-11T23:41:07.000Z | worker_images/worker.py | Youkoulayley/worker_images | 56041de8defbff04101391016eb49a3437db5d7a | [
"MIT"
] | null | null | null | import hashlib
import logging
import json
import os
import sys
import urllib.request as curl
import urllib.error
import math
import traceback
from PIL import Image
logger = logging.getLogger('worker_images')
class WorkerImage:
def __init__(self, conf):
self.images_folder = conf.get('DEFAULT', 'images_fol... | 38.085561 | 143 | 0.538753 |
e8c2478daf9e9aeef64cba05bcf366aaff6b21c4 | 4,695 | py | Python | python_backend/models/lpdnet/api.py | reonho/capstone21 | 3c3fd09dbfa727bc69949024b0e5a74308c98fa3 | [
"MIT"
] | null | null | null | python_backend/models/lpdnet/api.py | reonho/capstone21 | 3c3fd09dbfa727bc69949024b0e5a74308c98fa3 | [
"MIT"
] | 1 | 2021-10-21T02:48:48.000Z | 2021-10-21T02:48:48.000Z | python_backend/models/lpdnet/api.py | reonho/capstone21 | 3c3fd09dbfa727bc69949024b0e5a74308c98fa3 | [
"MIT"
] | 6 | 2021-08-30T02:51:32.000Z | 2022-01-06T04:11:12.000Z | from app import app
from flask import request, send_file, make_response
from flask_cors import CORS, cross_origin
from utils.utils import crop_image, render_image, create_directories, save_image, check_request, filter_overlapping_bbox
import itertools
import cv2
import json
import os
CORS(app)
from .lpd_model_class i... | 34.021739 | 130 | 0.625346 |
e8c25205af680d375c8ec3bafde062fdb389ded8 | 7,432 | py | Python | tests/hardware/util_tests.py | lankes-fzj/qupulse | 46f00f70bc998b98ac1ae4721d1a9a1c10b675aa | [
"MIT"
] | null | null | null | tests/hardware/util_tests.py | lankes-fzj/qupulse | 46f00f70bc998b98ac1ae4721d1a9a1c10b675aa | [
"MIT"
] | null | null | null | tests/hardware/util_tests.py | lankes-fzj/qupulse | 46f00f70bc998b98ac1ae4721d1a9a1c10b675aa | [
"MIT"
] | null | null | null | import unittest
import itertools
import pytabor
import numpy as np
from qupulse.hardware.awgs.tabor import TaborSegment
from qupulse.hardware.util import voltage_to_uint16, make_combined_wave, find_positions
from . import dummy_modules
class VoltageToBinaryTests(unittest.TestCase):
def test_voltage_to_uint16... | 41.988701 | 118 | 0.63859 |
e8c266789875ad269a987c60f7067e24e0307a03 | 4,319 | py | Python | process_results/logistic_regress.py | benblack769/sound-eval | 01a49b28d389eb49c97eafaaca067308805e3463 | [
"MIT"
] | null | null | null | process_results/logistic_regress.py | benblack769/sound-eval | 01a49b28d389eb49c97eafaaca067308805e3463 | [
"MIT"
] | null | null | null | process_results/logistic_regress.py | benblack769/sound-eval | 01a49b28d389eb49c97eafaaca067308805e3463 | [
"MIT"
] | null | null | null | import argparse
import pandas
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Activation
import sklearn.linear_model
from sklearn import svm # To fit the svm classifier\
import os
PROPORTION_TEST = 0.2
def get_test_train(data1,data2):
assert 0 < PROPORTION_TEST < 1
... | 37.885965 | 119 | 0.71035 |
e8c287cc129cc4df66ecfe38951e749d2fff991c | 12,762 | py | Python | chem-axon-setup/compound_reg_pipeline/comp_reg_data_load.py | spatel-gfb/data-lake-as-code | a5479befd55998a24d535d572a78d803c678dd32 | [
"MIT-0"
] | null | null | null | chem-axon-setup/compound_reg_pipeline/comp_reg_data_load.py | spatel-gfb/data-lake-as-code | a5479befd55998a24d535d572a78d803c678dd32 | [
"MIT-0"
] | null | null | null | chem-axon-setup/compound_reg_pipeline/comp_reg_data_load.py | spatel-gfb/data-lake-as-code | a5479befd55998a24d535d572a78d803c678dd32 | [
"MIT-0"
] | null | null | null | import cx_Oracle
import os
import pandas as pd
import boto3
import base64
from botocore.exceptions import ClientError
import ast
import numpy as np
import hashlib
import sys
import logging
from datetime import datetime
import socket
"""
Create a logging function and initiate it.
"""
format_string = "%(asctime)s %(name... | 47.092251 | 127 | 0.613619 |
e8c2889b6c948deff9026052698c5a44d7bf1395 | 4,349 | py | Python | demo1/main.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | 1 | 2019-02-03T08:41:52.000Z | 2019-02-03T08:41:52.000Z | demo1/main.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | null | null | null | demo1/main.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.626761 | 74 | 0.732812 |
e8c2a2325ca63148eb62f8734929b7424db4da6d | 12,554 | py | Python | src/python/pants/backend/android/tasks/unpack_libraries.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/android/tasks/unpack_libraries.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/android/tasks/unpack_libraries.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from hashl... | 52.747899 | 99 | 0.706946 |
e8c2abd663a1607d178195410c9bc84410d5a8fa | 3,749 | py | Python | alipay/aop/api/domain/PortfolioDetailProductInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/PortfolioDetailProductInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/PortfolioDetailProductInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class PortfolioDetailProductInfo(object):
def __init__(self):
self._asset_category = None
self._product_abbr_name = None
self._product_code = None
self._product_id = Non... | 32.318966 | 87 | 0.626034 |
e8c2b8cd6203af2ae4c01b5159e717e691813a1d | 171 | py | Python | charts/admin.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | charts/admin.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | 10 | 2021-02-02T23:12:07.000Z | 2021-12-13T20:50:47.000Z | charts/admin.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import ChartType, ChartConfig
admin.site.register(ChartType)
admin.site.register(ChartConfig)
# Register your models here.
| 21.375 | 42 | 0.818713 |
e8c2cac0374da1fe86c487e880902994586e0ee0 | 6,812 | py | Python | tractags/model.py | idevat/trac-tags-plugin | 51577d2deb3016b9b89c18d5f9dd2ca0fecf57f6 | [
"MIT"
] | null | null | null | tractags/model.py | idevat/trac-tags-plugin | 51577d2deb3016b9b89c18d5f9dd2ca0fecf57f6 | [
"MIT"
] | null | null | null | tractags/model.py | idevat/trac-tags-plugin | 51577d2deb3016b9b89c18d5f9dd2ca0fecf57f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Jun Omae <jun66j5@gmail.com>
# Copyright (C) 2012,2013 Steffen Hoffmann <hoff.st@web.de>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
from datetime import datetime
fro... | 31.981221 | 78 | 0.565179 |
e8c2e2cc98b4571dacc70a1935d24c75de79ae95 | 37,107 | py | Python | rlkit/launchers/experiments/vitchyr/probabilistic_goal_reaching/launcher.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/launchers/experiments/vitchyr/probabilistic_goal_reaching/launcher.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/launchers/experiments/vitchyr/probabilistic_goal_reaching/launcher.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | from collections import OrderedDict
from functools import partial
import numpy as np
import torch
from gym.envs.robotics import FetchEnv
from matplotlib.ticker import ScalarFormatter
from torch import optim
from torch import nn
import rlkit.samplers.rollout_functions as rf
import rlkit.torch.pytorch_util as ptu
from ... | 37.218656 | 92 | 0.630636 |
e8c2e589a334d394ada060ce6ab5d04f8c464d76 | 6,910 | py | Python | hummingbot/client/command/start_command.py | RBUB-Yatirim/hummingbot | 6b278932d423110b70d723c2b11c6ddf668cb367 | [
"Apache-2.0"
] | 37 | 2020-07-08T03:44:26.000Z | 2022-01-16T12:35:26.000Z | hummingbot/client/command/start_command.py | RBUB-Yatirim/hummingbot | 6b278932d423110b70d723c2b11c6ddf668cb367 | [
"Apache-2.0"
] | 3 | 2021-04-13T10:40:05.000Z | 2021-05-09T16:15:42.000Z | hummingbot/client/command/start_command.py | RBUB-Yatirim/hummingbot | 6b278932d423110b70d723c2b11c6ddf668cb367 | [
"Apache-2.0"
] | 7 | 2020-07-08T04:13:39.000Z | 2021-03-22T09:47:26.000Z | #!/usr/bin/env python
import asyncio
import platform
import threading
import time
from typing import (
Optional,
Callable,
)
from os.path import dirname, join
from hummingbot.core.clock import (
Clock,
ClockMode
)
from hummingbot import init_logging
from hummingbot.client.config.config_helpers import (... | 43.734177 | 118 | 0.624747 |
e8c315f0450f1c4efa14f3297341bd227b0d70ae | 2,610 | py | Python | automaton/plugins/translate.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | 6 | 2016-01-05T09:14:57.000Z | 2021-05-17T20:46:46.000Z | automaton/plugins/translate.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | null | null | null | automaton/plugins/translate.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | 1 | 2018-12-18T02:37:24.000Z | 2018-12-18T02:37:24.000Z | from urllib2 import urlopen, URLError
from urllib import urlencode
import unicodedata
import automaton.lib.plugin
from automaton.lib.data.abbreviations import language_codes
# pylint: disable-msg=W0101
raise automaton.lib.plugin.PluginLoadError(
"Translations from google are now a paid service, this plugin must "
... | 33.037975 | 77 | 0.665134 |
e8c321bb9b9876f0d62ab51760d96f9865776f3b | 571 | py | Python | CHAPTER 14 (graph algorithm)/priority_queue_base_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 14 (graph algorithm)/priority_queue_base_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 14 (graph algorithm)/priority_queue_base_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | class PriorityQueueBase:
"""Abstract base class for a priority queue."""
class _Item:
"""Lightweight composite to store priority queue items."""
__slots__="_key","_value"
def __init__(self,k,v):
self._key = k
self._value = v
def __lt__(self,other):
... | 33.588235 | 87 | 0.583187 |
e8c33f591828b00c703d7873d8a326d57b9d1522 | 1,147 | py | Python | src/objectives/gym_control/critics.py | icaros-usc/dqd-rl | 83e3da62df37b45c4b8fc549c07f566797b5f685 | [
"MIT"
] | 6 | 2022-02-09T05:35:37.000Z | 2022-03-12T11:54:59.000Z | src/objectives/gym_control/critics.py | icaros-usc/dqd-rl | 83e3da62df37b45c4b8fc549c07f566797b5f685 | [
"MIT"
] | null | null | null | src/objectives/gym_control/critics.py | icaros-usc/dqd-rl | 83e3da62df37b45c4b8fc549c07f566797b5f685 | [
"MIT"
] | null | null | null | """Critics for gym environments."""
import torch
import torch.nn.functional as F
from torch import nn
class MLPCritic(nn.Module):
"""MLP critic for continuous control.
Adapted from TD3 code by Scott Fujimoto:
https://github.com/sfujim/TD3/blob/master/TD3.py
"""
def __init__(self, state_dim, acti... | 24.934783 | 56 | 0.567568 |
e8c353f4e27aa2370c612a1d9f17503fba8d6e02 | 9,763 | py | Python | moto/apigateway/responses.py | argos83/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:01:41.000Z | 2021-03-06T22:01:41.000Z | moto/apigateway/responses.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | null | null | null | moto/apigateway/responses.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2017-10-19T00:53:28.000Z | 2017-10-19T00:53:28.000Z | from __future__ import unicode_literals
import json
from moto.core.responses import BaseResponse
from .models import apigateway_backends
from .exceptions import StageNotFoundException
class APIGatewayResponse(BaseResponse):
def _get_param(self, key):
return json.loads(self.body.decode("ascii")).get(key... | 46.051887 | 165 | 0.652463 |
e8c3846289c5569443b826dc2b28658ed267c055 | 545 | py | Python | nomadgram/users/migrations/0003_auto_20171206_2349.py | yoojat/nomadgram | 8e4562b50c4b4b09c9771a6c2b601b9b2cf7bd71 | [
"MIT"
] | null | null | null | nomadgram/users/migrations/0003_auto_20171206_2349.py | yoojat/nomadgram | 8e4562b50c4b4b09c9771a6c2b601b9b2cf7bd71 | [
"MIT"
] | null | null | null | nomadgram/users/migrations/0003_auto_20171206_2349.py | yoojat/nomadgram | 8e4562b50c4b4b09c9771a6c2b601b9b2cf7bd71 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2017-12-06 14:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_auto_20171114_1328'),
]
operations = [
migrations.AlterField(... | 25.952381 | 148 | 0.612844 |
e8c3a92b1eb1d9204e8f802292e5f10ed0951afb | 2,220 | py | Python | zerver/lib/hotspots.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | null | null | null | zerver/lib/hotspots.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 4 | 2021-03-11T01:43:45.000Z | 2021-12-02T17:56:50.000Z | zerver/lib/hotspots.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 1 | 2021-01-07T23:27:52.000Z | 2021-01-07T23:27:52.000Z | from django.conf import settings
from zerver.models import UserProfile, UserHotspot
from typing import List, Text, Dict
ALL_HOTSPOTS = {
# TODO: Tag these for translation once we've finalized the content.
'intro_reply': {
'title': 'Reply to a message',
'description': 'Click anywhere on a messa... | 38.275862 | 102 | 0.627027 |
e8c3ad914f3bde6ae1f34da06cba58fc3f30e78b | 2,862 | py | Python | test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/headwithazurekeycredentialpolicy/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.428571 | 118 | 0.692872 |
e8c3f15e852f18a1d6015b7ef70ebad211597b42 | 9,328 | py | Python | experiments/2021-02-18-mutational-neighborhood/hpcc/generate_dominant_org_mutants.py | amlalejini/plastic-evolvability-avida | 909d944e52a102e09dd714a8b7e0f2274c4a8072 | [
"MIT"
] | 2 | 2021-09-16T14:47:43.000Z | 2021-10-31T04:55:16.000Z | experiments/2021-02-18-mutational-neighborhood/hpcc/generate_dominant_org_mutants.py | amlalejini/evolutionary-consequences-of-plasticity | 909d944e52a102e09dd714a8b7e0f2274c4a8072 | [
"MIT"
] | null | null | null | experiments/2021-02-18-mutational-neighborhood/hpcc/generate_dominant_org_mutants.py | amlalejini/evolutionary-consequences-of-plasticity | 909d944e52a102e09dd714a8b7e0f2274c4a8072 | [
"MIT"
] | 2 | 2020-08-19T20:01:14.000Z | 2020-12-21T21:24:12.000Z | import argparse
# Read in existing .spop file and return a list of dictionaries (one per organism)
def load_spop_file(filename):
pop = []
column_names = []
header_str = ''
with open(filename, 'r') as fp:
for line in fp:
line = line.strip()
if line == '': # Skip empty lin... | 39.029289 | 101 | 0.525193 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.