hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
78c1b7f61e3fc50cc977205fb5ca66127746a5ae | 13,384 | py | Python | cnn_scratch/cnn.py | subratpp/neuralnetworks | cf9719d59101b256f0f8737e44b6cf067be5d913 | [
"MIT"
] | null | null | null | cnn_scratch/cnn.py | subratpp/neuralnetworks | cf9719d59101b256f0f8737e44b6cf067be5d913 | [
"MIT"
] | null | null | null | cnn_scratch/cnn.py | subratpp/neuralnetworks | cf9719d59101b256f0f8737e44b6cf067be5d913 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import sys
import skimage.data
import matplotlib.pyplot as plt
import os
# In[2]:
# ===============================================================================1. Classes and Function Definitions
class convolution:
"""
Convlolution with ... | 32.643902 | 135 | 0.603781 |
715482abd177c0a48837e33190a6e557c95dae56 | 2,802 | py | Python | front_end/vmipl_communication/network_connection.py | FlorianWestphal/VMI-PL | 557db15e75cc47fe5256ba376dbe0c1c2dacf314 | [
"MIT"
] | null | null | null | front_end/vmipl_communication/network_connection.py | FlorianWestphal/VMI-PL | 557db15e75cc47fe5256ba376dbe0c1c2dacf314 | [
"MIT"
] | 1 | 2017-10-14T09:45:20.000Z | 2017-11-03T12:59:20.000Z | front_end/vmipl_communication/network_connection.py | FlorianWestphal/VMI-PL | 557db15e75cc47fe5256ba376dbe0c1c2dacf314 | [
"MIT"
] | null | null | null | import socket
class NetworkConnection ():
MAX_COMMAND_LENGTH = 5
MAX_SIZE_LENGTH = 5
START_COMMAND = "START"
SEND_OK = "SNDOK"
SIZE_OK = "SZEOK"
def __init__(self, sock=None):
if sock is None:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
else:
self.sock = sock
def connect(self, ... | 27.742574 | 67 | 0.751249 |
02370ce6454cf88289b4df92f96e82b9c74dc3f0 | 750 | py | Python | froide/foirequest/migrations/0017_auto_20180405_1626.py | OpendataCH/froide | 8136bac0d8caa56f9cfc7ba15480be987280e55d | [
"MIT"
] | null | null | null | froide/foirequest/migrations/0017_auto_20180405_1626.py | OpendataCH/froide | 8136bac0d8caa56f9cfc7ba15480be987280e55d | [
"MIT"
] | null | null | null | froide/foirequest/migrations/0017_auto_20180405_1626.py | OpendataCH/froide | 8136bac0d8caa56f9cfc7ba15480be987280e55d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-04-05 14:26
from __future__ import unicode_literals
from django.db import migrations, models
import froide.foirequest.models.attachment
import froide.helper.storage
class Migration(migrations.Migration):
dependencies = [
("foirequest", "0016_... | 25.862069 | 72 | 0.624 |
ec40b330c2e81ec257ae024f73f2cf792149a661 | 26,746 | py | Python | qa/rpc-tests/test_framework/util.py | r3vcoin-project/r3vcoin | 6f72edb47bae7011a08c9e2621c3955d3bb7ed26 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/util.py | r3vcoin-project/r3vcoin | 6f72edb47bae7011a08c9e2621c3955d3bb7ed26 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/util.py | r3vcoin-project/r3vcoin | 6f72edb47bae7011a08c9e2621c3955d3bb7ed26 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Helpful routines for regression testing
#
import os
import sys
from binascii import hexlify, unhex... | 37.406993 | 125 | 0.655313 |
a30c6f9f80466c44b297f2530860d5cc15c65d46 | 260 | py | Python | tests/common.py | cehbrecht/proto-lib-34e | ca2efce034a13802fb587eaa99a581f7a1ad9911 | [
"BSD-2-Clause"
] | null | null | null | tests/common.py | cehbrecht/proto-lib-34e | ca2efce034a13802fb587eaa99a581f7a1ad9911 | [
"BSD-2-Clause"
] | 11 | 2020-02-27T17:59:08.000Z | 2020-03-23T10:48:20.000Z | tests/common.py | cehbrecht/proto-lib-34e | ca2efce034a13802fb587eaa99a581f7a1ad9911 | [
"BSD-2-Clause"
] | 1 | 2020-02-21T13:43:18.000Z | 2020-02-21T13:43:18.000Z | import os
DEFAULT_CMIP5_ARCHIVE_BASE = "/badc/cmip5/data/"
def cmip5_archive_base():
if 'CMIP5_ARCHIVE_BASE' in os.environ:
return os.environ['CMIP5_ARCHIVE_BASE']
return DEFAULT_CMIP5_ARCHIVE_BASE
CMIP5_ARCHIVE_BASE = cmip5_archive_base()
| 21.666667 | 48 | 0.769231 |
788d80f215f550bd965ddf3247e40e346b3fbec4 | 971 | py | Python | covid19uk/data/assemble.py | sdwfrost/covid19uk | ffd59342d9daee2d819d2f7211afbe9713880612 | [
"MIT"
] | 10 | 2020-03-21T22:36:24.000Z | 2021-05-23T22:47:13.000Z | covid19uk/data/assemble.py | sdwfrost/covid19uk | ffd59342d9daee2d819d2f7211afbe9713880612 | [
"MIT"
] | 14 | 2020-03-27T19:24:51.000Z | 2021-07-21T12:41:23.000Z | covid19uk/data/assemble.py | sdwfrost/covid19uk | ffd59342d9daee2d819d2f7211afbe9713880612 | [
"MIT"
] | 13 | 2020-03-21T17:17:20.000Z | 2021-05-06T22:50:18.000Z | """Function responsible for assembling all data required
to instantiate the COVID19 model"""
import os
from covid19uk.model_spec import gather_data
def assemble_data(filename, config):
constant_data, observations = gather_data(config)
if os.path.exists(filename):
mode = "a"
else:
mode... | 29.424242 | 80 | 0.721936 |
bf0b9d3c185a7d9e655faee9b6142f105cf9cbf2 | 2,299 | py | Python | jdcloud_sdk/services/disk/apis/DescribeDisksRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/disk/apis/DescribeDisksRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/disk/apis/DescribeDisksRequest.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | null | null | null | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 27.698795 | 75 | 0.668117 |
9e97ee6d47a3cdd456bae5606cd09619dbd61da3 | 5,268 | py | Python | contrnp/npf/neuralproc/np.py | KKallidromitis/contr_np | 50c16281098cf4995182f843df794a03cde088ba | [
"MIT"
] | 1 | 2021-12-19T14:11:16.000Z | 2021-12-19T14:11:16.000Z | contrnp/npf/neuralproc/np.py | KKallidromitis/contr_np | 50c16281098cf4995182f843df794a03cde088ba | [
"MIT"
] | null | null | null | contrnp/npf/neuralproc/np.py | KKallidromitis/contr_np | 50c16281098cf4995182f843df794a03cde088ba | [
"MIT"
] | null | null | null | """Module for vanilla [conditional | latent] neural processes"""
import logging
from functools import partial
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import normal
from npf.architectures import MLP, merge_flat_input
from .base import LatentNeuralProcessFamily, Neu... | 31.927273 | 103 | 0.632688 |
80bc777bc7f61d405e493ce4f74aa67bb1c09cf0 | 7,951 | py | Python | fedml_api/data_preprocessing/stackoverflow_lr/data_loader.py | GabriJP/FedML | 9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988 | [
"Apache-2.0"
] | null | null | null | fedml_api/data_preprocessing/stackoverflow_lr/data_loader.py | GabriJP/FedML | 9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988 | [
"Apache-2.0"
] | null | null | null | fedml_api/data_preprocessing/stackoverflow_lr/data_loader.py | GabriJP/FedML | 9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import pickle
import torch.utils.data as data
import tqdm
from . import utils
from .dataset import StackOverflowDataset
from ..base import DataLoader, FederatedDataset, DistributedFederatedDataset
client_ids_train = None
client_ids_test = None
DEFAULT_TRAIN_CLIENTS_NUM = 342477
DEFAULT_TEST_... | 47.610778 | 119 | 0.648095 |
2a382242b321874f943852e41978d56a5d4b2696 | 125 | py | Python | qcodes/tests/validators/conftest.py | riju-pal/QCoDeS_riju | 816e76809160e9af457f6ef6d4aca1b0dd5eea82 | [
"MIT"
] | 223 | 2016-10-29T15:00:24.000Z | 2022-03-20T06:53:34.000Z | qcodes/tests/validators/conftest.py | M1racleShih/Qcodes | c03029a6968e16379155aadc8b083a02e01876a6 | [
"MIT"
] | 3,406 | 2016-10-25T10:44:50.000Z | 2022-03-31T09:47:35.000Z | qcodes/tests/validators/conftest.py | nikhartman/Qcodes | 042c5e25ab9e40b20c316b4055c4842844834d1e | [
"MIT"
] | 263 | 2016-10-25T11:35:36.000Z | 2022-03-31T08:53:20.000Z | class AClass:
def method_a(self):
raise RuntimeError('function should not get called')
def a_func():
pass
| 13.888889 | 60 | 0.656 |
c01ed3ec11690839b68ebac4262c9f94c0154568 | 6,941 | py | Python | pymanopt/solvers/particle_swarm.py | vishalbelsare/pymanopt | ca14b6d1c2cc9adb1f6a5561bfcc7047c267c60f | [
"BSD-3-Clause"
] | 459 | 2016-02-18T18:53:30.000Z | 2022-03-30T07:28:53.000Z | pymanopt/solvers/particle_swarm.py | vishalbelsare/pymanopt | ca14b6d1c2cc9adb1f6a5561bfcc7047c267c60f | [
"BSD-3-Clause"
] | 131 | 2016-02-19T16:17:44.000Z | 2022-03-21T09:27:11.000Z | pymanopt/solvers/particle_swarm.py | vishalbelsare/pymanopt | ca14b6d1c2cc9adb1f6a5561bfcc7047c267c60f | [
"BSD-3-Clause"
] | 127 | 2016-03-11T18:47:15.000Z | 2022-03-11T06:07:37.000Z | import time
import numpy as np
import numpy.random as rnd
from pymanopt.solvers.solver import Solver
from pymanopt.tools import printer
class ParticleSwarm(Solver):
"""
Particle swarm optimization method based on pso.m from the manopt
MATLAB package.
"""
def __init__(self, maxcostevals=None, ma... | 36.340314 | 79 | 0.543726 |
4cd8c4112ec63472f7ba85555de6c43d2c2c99c9 | 12,261 | py | Python | parsl/executors/swift_t.py | bnl-sdcc/parsl | 389f750de325a7a380fcf54a01f6a49926056b11 | [
"Apache-2.0"
] | 2 | 2019-02-25T16:43:30.000Z | 2019-03-04T17:25:00.000Z | parsl/executors/swift_t.py | bnl-sdcc/parsl | 389f750de325a7a380fcf54a01f6a49926056b11 | [
"Apache-2.0"
] | null | null | null | parsl/executors/swift_t.py | bnl-sdcc/parsl | 389f750de325a7a380fcf54a01f6a49926056b11 | [
"Apache-2.0"
] | 2 | 2019-04-30T13:46:23.000Z | 2019-06-04T16:14:46.000Z | """Sample Executor for integration with SwiftT.
This follows the model used by `EMEWS <http://www.mcs.anl.gov/~wozniak/papers/Cancer2_2016.pdf>`_
to some extent.
"""
from concurrent.futures import Future
import logging
import uuid
import threading
import queue
import multiprocessing as mp
from ipyparallel.serialize ... | 32.871314 | 151 | 0.547671 |
cd80c483e29001d20ff230450f36fad87d4889e1 | 2,060 | py | Python | plastic/plot.py | plastic-phy/plastic | 101dcfd2c4e32be432d46d89ab151f48e34d6458 | [
"MIT"
] | 1 | 2021-02-23T07:50:47.000Z | 2021-02-23T07:50:47.000Z | plastic/plot.py | plastic-phy/plastic | 101dcfd2c4e32be432d46d89ab151f48e34d6458 | [
"MIT"
] | 1 | 2021-02-23T08:59:23.000Z | 2021-03-25T09:13:43.000Z | plastic/plot.py | plastic-phy/plastic | 101dcfd2c4e32be432d46d89ab151f48e34d6458 | [
"MIT"
] | null | null | null |
from ._core.genotypematrix import GenotypeMatrix
from ._core.phylogenytree import PhylogenyTree, SASCPhylogeny
from matplotlib import pyplot as plt
def _build_colormap(unclustered, clustered):
mapping = dict()
for ix, l in enumerate(clustered):
for ll in l.split(','):
mapping[ll] = ix
... | 28.219178 | 123 | 0.65 |
1eedbe06e488126c6ba44e2643ead08d100ca53d | 2,905 | py | Python | selene/common/helpers.py | SimonBaars/selene | 8a826623ccc26819b17a798e1df1a31250553494 | [
"MIT"
] | null | null | null | selene/common/helpers.py | SimonBaars/selene | 8a826623ccc26819b17a798e1df1a31250553494 | [
"MIT"
] | null | null | null | selene/common/helpers.py | SimonBaars/selene | 8a826623ccc26819b17a798e1df1a31250553494 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2015-2020 Iakiv Kramarenko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modif... | 39.256757 | 115 | 0.698795 |
713abb77f4df19fa04fdbdd9d007ae76f4abacf4 | 2,467 | py | Python | examples/insert_delete_test-2.py | iambaim/pyEcholab | 6e165ad1a947e62fc233467631c445fe9ebcdad2 | [
"MIT"
] | null | null | null | examples/insert_delete_test-2.py | iambaim/pyEcholab | 6e165ad1a947e62fc233467631c445fe9ebcdad2 | [
"MIT"
] | null | null | null | examples/insert_delete_test-2.py | iambaim/pyEcholab | 6e165ad1a947e62fc233467631c445fe9ebcdad2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""insert_delete_test-2.py tests er, insertion and deletion of data. It generates
a simple synthetic processed_data object and deletes and inserts a few pings
and displays the data along the way.
It is primarily intended to test the ping_data/raw_data/processed_data classes.
"""
import numpy ... | 33.794521 | 81 | 0.754358 |
92f3f9e7ae9bad81ab6f89fb97c46fdd1f813957 | 9,183 | py | Python | ckanext/data_depositario/profiles/dcat.py | MonicaMigu/ckanext-data-depositario | 71ed9a527dde926fc603c87a5420b946d8f0cd23 | [
"MIT"
] | 2 | 2021-05-04T05:15:39.000Z | 2021-12-07T07:33:19.000Z | ckanext/data_depositario/profiles/dcat.py | MonicaMigu/ckanext-data-depositario | 71ed9a527dde926fc603c87a5420b946d8f0cd23 | [
"MIT"
] | 9 | 2019-02-11T08:00:59.000Z | 2021-12-17T06:20:53.000Z | ckanext/data_depositario/profiles/dcat.py | depositar-io/ckanext-data-depositario | b98f343d4beea0e22c8b029025bdb5ea963742d7 | [
"MIT"
] | 2 | 2021-01-18T04:52:37.000Z | 2021-04-12T14:20:55.000Z | from rdflib import URIRef, BNode, Literal
from rdflib.namespace import Namespace, RDF, XSD, DC, RDFS, SKOS, FOAF, DCTERMS
from ckantoolkit import config
from ckan.lib.helpers import markdown_extract
from ckanext.dcat.utils import resource_uri
from ckanext.dcat.profiles import RDFProfile, CleanedURIRef
DCAT = Namesp... | 35.183908 | 91 | 0.587172 |
de4a72b206a235948cc91757cca50e7015e6df26 | 72 | py | Python | longsgis/__init__.py | longavailable/voronoi-diagram-for-polygons | 03f8d2762623ba3c3d524006d662a60e07ce6212 | [
"MIT"
] | 20 | 2020-07-30T00:12:24.000Z | 2022-02-28T01:27:28.000Z | longsgis/__init__.py | longavailable/voronoi-diagram-for-polygons | 03f8d2762623ba3c3d524006d662a60e07ce6212 | [
"MIT"
] | 2 | 2020-07-30T00:31:29.000Z | 2021-06-28T04:45:35.000Z | longsgis/__init__.py | longavailable/voronoi-diagram-for-polygons | 03f8d2762623ba3c3d524006d662a60e07ce6212 | [
"MIT"
] | 6 | 2021-01-08T14:47:22.000Z | 2022-03-25T02:47:35.000Z | from .longsgis import voronoiDiagram4plg
from .longsgis import dropHoles | 36 | 40 | 0.875 |
e3c2dee24103bae5ddf6388a876f52acc6737f78 | 12,514 | py | Python | platipy/imaging/visualisation/surface_operations.py | SimonBiggs/platipy | 9c2f478d480bf878b26ec472c4097a4ab116ffbf | [
"Apache-2.0"
] | null | null | null | platipy/imaging/visualisation/surface_operations.py | SimonBiggs/platipy | 9c2f478d480bf878b26ec472c4097a4ab116ffbf | [
"Apache-2.0"
] | null | null | null | platipy/imaging/visualisation/surface_operations.py | SimonBiggs/platipy | 9c2f478d480bf878b26ec472c4097a4ab116ffbf | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 University of New South Wales, University of Sydney, Ingham Institute
# 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
# Unle... | 43.151724 | 224 | 0.700575 |
afedcadb49ea41d5c13a82e8c5e90b2add6d0187 | 4,132 | py | Python | mundiapi/models/get_period_response.py | hugocpolos/MundiAPI-PYTHON | 164545cc58bf18c946d5456e9ba4d55a378a339a | [
"MIT"
] | 10 | 2017-08-30T15:53:00.000Z | 2021-02-11T18:06:56.000Z | mundiapi/models/get_period_response.py | hugocpolos/MundiAPI-PYTHON | 164545cc58bf18c946d5456e9ba4d55a378a339a | [
"MIT"
] | 4 | 2018-05-05T15:15:09.000Z | 2021-12-22T00:52:41.000Z | mundiapi/models/get_period_response.py | hugocpolos/MundiAPI-PYTHON | 164545cc58bf18c946d5456e9ba4d55a378a339a | [
"MIT"
] | 7 | 2017-04-27T13:46:52.000Z | 2021-04-14T13:44:23.000Z | # -*- coding: utf-8 -*-
"""
mundiapi
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""
from mundiapi.api_helper import APIHelper
import mundiapi.models.get_subscription_response
class GetPeriodResponse(object):
"""Implementation of the 'GetPeriodResponse' ... | 36.245614 | 181 | 0.595837 |
9d8ae503549bb60aec7f9a2ab07fddc281fd02ba | 20,529 | py | Python | test/functional/wallet.py | Xerant/Alm-alpha | ee923d0bcd3e4c4f47195b12d4439156db823ca4 | [
"MIT"
] | 16 | 2017-11-12T06:11:29.000Z | 2022-03-04T14:34:03.000Z | test/functional/wallet.py | nanguapie/bitcoin | c0e51394139822137ca090f23e60cfe0cad4d123 | [
"MIT"
] | null | null | null | test/functional/wallet.py | nanguapie/bitcoin | c0e51394139822137ca090f23e60cfe0cad4d123 | [
"MIT"
] | 6 | 2017-11-13T05:11:23.000Z | 2019-04-09T18:22:34.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.... | 47.520833 | 181 | 0.642506 |
ef59377f99f6b22001f7efe7c649651f580eccfa | 930 | py | Python | CONTENT/PYTHON/LEETCODE/114_flatten_binary_tree_to_linked_list/flatten_binary_tree_TLE.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 13 | 2021-03-11T00:25:22.000Z | 2022-03-19T00:19:23.000Z | CONTENT/PYTHON/LEETCODE/114_flatten_binary_tree_to_linked_list/flatten_binary_tree_TLE.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 162 | 2021-03-09T01:52:11.000Z | 2022-03-12T01:09:07.000Z | CONTENT/PYTHON/LEETCODE/114_flatten_binary_tree_to_linked_list/flatten_binary_tree_TLE.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | class Solution(object):
def flatten(self, root):
"""
:type root: TreeNode
:rtype: void Do not return anything, modify root in-place instead.
"""
if not root:
return None
self.recurse(root)
def recurse(self, root):
# return the head and tail of... | 31 | 74 | 0.526882 |
82a0a27ca0ba331e7713fa49df85a75cb173aa50 | 68 | py | Python | chapter8/my_module.py | robonoriaki/Python_startbook | a0255983c65e64f1b1a2f55671333726c06ff4ce | [
"MIT"
] | null | null | null | chapter8/my_module.py | robonoriaki/Python_startbook | a0255983c65e64f1b1a2f55671333726c06ff4ce | [
"MIT"
] | null | null | null | chapter8/my_module.py | robonoriaki/Python_startbook | a0255983c65e64f1b1a2f55671333726c06ff4ce | [
"MIT"
] | null | null | null | #モジュールを作る
#引数で与えられた数値を二倍にする
def func(v):
i = v * 2
return i | 11.333333 | 17 | 0.617647 |
85ef69abc4697da1b847c92dbc79b16fae50eeb6 | 51,219 | py | Python | pysqream/dbapi.py | SQream/pysqream | a408033273c1c0f86c0eadbd56cb9e1a2fc7a0b9 | [
"BSD-3-Clause"
] | 3 | 2019-08-25T23:06:39.000Z | 2020-09-19T07:10:47.000Z | pysqream/dbapi.py | SQream/pysqream | a408033273c1c0f86c0eadbd56cb9e1a2fc7a0b9 | [
"BSD-3-Clause"
] | null | null | null | pysqream/dbapi.py | SQream/pysqream | a408033273c1c0f86c0eadbd56cb9e1a2fc7a0b9 | [
"BSD-3-Clause"
] | 4 | 2019-12-16T15:13:16.000Z | 2020-09-29T05:43:26.000Z | ''' ---- SQream Native Python API ---- '''
import socket, json, ssl, logging, time, traceback, asyncio, sys, array, _thread as thread, threading
from struct import pack, pack_into, unpack, error as struct_error
from datetime import datetime, date, time as t
import multiprocessing as mp
fro... | 33.194426 | 171 | 0.602413 |
60dd39141262e3d663ade8aa5cfbc36fc4a7ca98 | 3,146 | py | Python | tensorflow_graphics/notebooks/mesh_viewer.py | riyadhuddin/graphics | 07e6c59d5ffcec3a0009807a67aff5d35543ba91 | [
"Apache-2.0"
] | null | null | null | tensorflow_graphics/notebooks/mesh_viewer.py | riyadhuddin/graphics | 07e6c59d5ffcec3a0009807a67aff5d35543ba91 | [
"Apache-2.0"
] | null | null | null | tensorflow_graphics/notebooks/mesh_viewer.py | riyadhuddin/graphics | 07e6c59d5ffcec3a0009807a67aff5d35543ba91 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow 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 i... | 40.333333 | 80 | 0.63986 |
b5ecc898d54e780d121318e016fb9c1331c47982 | 3,788 | py | Python | medium/abbreviation/test_functions.py | KaShing96/hackerrank-challenges | 04f14027f03ad1eed890158b848c3ca96f0df4a0 | [
"MIT"
] | null | null | null | medium/abbreviation/test_functions.py | KaShing96/hackerrank-challenges | 04f14027f03ad1eed890158b848c3ca96f0df4a0 | [
"MIT"
] | null | null | null | medium/abbreviation/test_functions.py | KaShing96/hackerrank-challenges | 04f14027f03ad1eed890158b848c3ca96f0df4a0 | [
"MIT"
] | null | null | null | # === Imports ===
import pytest
import functions as fnc
from func_timeout import func_timeout as fo
from func_timeout.exceptions import FunctionTimedOut
from datetime import datetime
# === Variables ===
TIME_LIMIT = 10
# === Debug functions ===
def DEBUG(*args, **kwargs):
"""
Debug function.
"""
... | 22.152047 | 136 | 0.493928 |
5296ae6b2bad15b287bf0a86f268d55c1bb2c435 | 76 | py | Python | kdlreformat.py | tabatkins/kdlpy | d90fd5710af77242b89f92cabd428950a5a550e5 | [
"MIT"
] | 2 | 2021-11-16T15:51:27.000Z | 2021-12-17T07:51:49.000Z | kdlreformat.py | tabatkins/kdlpy | d90fd5710af77242b89f92cabd428950a5a550e5 | [
"MIT"
] | 3 | 2021-10-09T05:46:31.000Z | 2021-10-30T00:21:21.000Z | kdlreformat.py | tabatkins/kdlpy | d90fd5710af77242b89f92cabd428950a5a550e5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import kdl
if __name__ == "__main__":
kdl.cli()
| 10.857143 | 26 | 0.631579 |
f9fe445addccbe648f27ada9d7b67e5966ac9491 | 72,764 | py | Python | src/quo/buffer.py | chouette254/quo | 8979afd118e77d3d0f93f9fbe8711efada7158c5 | [
"MIT"
] | 1 | 2021-02-15T03:56:00.000Z | 2021-02-15T03:56:00.000Z | src/quo/buffer.py | chouette254/quo | 8979afd118e77d3d0f93f9fbe8711efada7158c5 | [
"MIT"
] | 3 | 2021-02-22T11:49:23.000Z | 2021-02-28T06:47:41.000Z | src/quo/buffer.py | secretuminc/quo | c4f77d52f015c612d32ed0fc2fc79545af598f10 | [
"MIT"
] | null | null | null | """
Data structures for the Buffer.
It holds the text, cursor position, history, etc...
"""
import asyncio
import logging
import os
import re
import shlex
import shutil
import subprocess
import tempfile
from collections import deque
from enum import Enum
from functools import wraps
from typing import (
Any,
Awa... | 36.093254 | 92 | 0.595047 |
698419fa1d7dcd94a9756803d9619a407ccafcbb | 10,507 | py | Python | cogs/colors.py | Yat-o/Aoi | 51215c2f9fa2049ceee224ab8997e7673cb6e3d6 | [
"MIT"
] | 5 | 2020-10-18T02:25:47.000Z | 2021-07-01T04:58:58.000Z | cogs/colors.py | Yat-o/Aoi | 51215c2f9fa2049ceee224ab8997e7673cb6e3d6 | [
"MIT"
] | 58 | 2020-09-26T03:16:23.000Z | 2021-11-01T18:41:56.000Z | cogs/colors.py | Yat-o/Aoi | 51215c2f9fa2049ceee224ab8997e7673cb6e3d6 | [
"MIT"
] | 5 | 2020-11-25T09:07:11.000Z | 2021-08-21T10:25:31.000Z | import colorsys
import io
import random
from typing import List, Optional, Union
from PIL import Image, ImageDraw
from PIL.ImageOps import grayscale, colorize
import aoi
import discord
from cog_helpers.colors import ColorService
from discord.ext import commands
from discord.ext.commands import Greedy
from libs.conver... | 42.711382 | 118 | 0.575521 |
3c67b14f736bc76c395919bb43283f960209ce9a | 62,721 | py | Python | release/stubs.min/System/Windows/Controls/__init___parts/DatePicker.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/System/Windows/Controls/__init___parts/DatePicker.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/System/Windows/Controls/__init___parts/DatePicker.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class DatePicker(Control,IResource,IAnimatable,IInputElement,IFrameworkInputElement,ISupportInitialize,IHaveResources,IQueryAmbient):
"""
Represents a control that allows the user to select a date.
DatePicker()
"""
def AddLogicalChild(self,*args):
"""
AddLogicalChild(self: FrameworkElement,child:... | 25.971429 | 215 | 0.720795 |
099a147378425ffe35cc4ef4a02301e34a3a0d2e | 4,858 | py | Python | ferris/components/oauth.py | markEarvin/sl-contest-tracker | dd24b6fb5913b7d1f4c6648ed6c25f4738867485 | [
"MIT"
] | null | null | null | ferris/components/oauth.py | markEarvin/sl-contest-tracker | dd24b6fb5913b7d1f4c6648ed6c25f4738867485 | [
"MIT"
] | null | null | null | ferris/components/oauth.py | markEarvin/sl-contest-tracker | dd24b6fb5913b7d1f4c6648ed6c25f4738867485 | [
"MIT"
] | null | null | null | from google.appengine.api import users
from decorator import decorator
from ferris.core.oauth2.session import Session as OAuth2Session
from ferris.core.oauth2.user_credentials import UserCredentials as OAuth2UserCredentials
from oauth2client.client import AccessTokenRefreshError
import httplib2
import webapp2
class O... | 37.953125 | 161 | 0.718197 |
5f25621730dfdbbd3562223d3068514f664f3eba | 3,631 | py | Python | src/gluonnlp/model/train/__init__.py | davisliang/gluon-nlp | 18a736dbb55c80c2de82d73b923c3cd3d9d53591 | [
"Apache-2.0"
] | 7 | 2019-12-05T02:49:07.000Z | 2020-08-17T01:11:59.000Z | src/gluonnlp/model/train/__init__.py | davisliang/gluon-nlp | 18a736dbb55c80c2de82d73b923c3cd3d9d53591 | [
"Apache-2.0"
] | null | null | null | src/gluonnlp/model/train/__init__.py | davisliang/gluon-nlp | 18a736dbb55c80c2de82d73b923c3cd3d9d53591 | [
"Apache-2.0"
] | 3 | 2021-03-12T04:41:00.000Z | 2021-03-12T04:41:24.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... | 37.822917 | 94 | 0.676398 |
8a85dbdc7a5071ff093e0663ce4bb9181acbd1b9 | 11,092 | py | Python | tests/test_flask_restx_mongo_controller_list_custom.py | lucafaggianelli/layabase | 90733c6b9efd56051dfce5c3d89bd4e657ce7b3f | [
"MIT"
] | 3 | 2019-12-02T23:29:44.000Z | 2019-12-31T00:55:01.000Z | tests/test_flask_restx_mongo_controller_list_custom.py | lucafaggianelli/layabase | 90733c6b9efd56051dfce5c3d89bd4e657ce7b3f | [
"MIT"
] | 29 | 2019-12-02T16:12:45.000Z | 2022-02-17T16:01:55.000Z | tests/test_flask_restx_mongo_controller_list_custom.py | lucafaggianelli/layabase | 90733c6b9efd56051dfce5c3d89bd4e657ce7b3f | [
"MIT"
] | 3 | 2020-01-02T10:58:47.000Z | 2022-02-17T10:55:18.000Z | import flask
import flask_restx
import pytest
import layabase
import layabase.mongo
@pytest.fixture
def controller() -> layabase.CRUDController:
class TestCollection:
__collection_name__ = "test"
key = layabase.mongo.Column(is_primary_key=True)
list_field = layabase.mongo.Column(list)
... | 36.728477 | 87 | 0.346917 |
919eb1dfa52b0ca5aef0a80594ac678591677b4a | 3,067 | py | Python | elifinokuzu/elifinokuzu/settings.py | caggri/elifin-okuzu | f4fda761b60ffee52728422b54eadd718b957449 | [
"MIT"
] | null | null | null | elifinokuzu/elifinokuzu/settings.py | caggri/elifin-okuzu | f4fda761b60ffee52728422b54eadd718b957449 | [
"MIT"
] | null | null | null | elifinokuzu/elifinokuzu/settings.py | caggri/elifin-okuzu | f4fda761b60ffee52728422b54eadd718b957449 | [
"MIT"
] | null | null | null | """
Django settings for elifinokuzu project.
Generated by 'django-admin startproject' using Django 2.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import o... | 25.558333 | 91 | 0.682752 |
053cf5b5ffc75fd2a050ea04ab1e1f8fc94d89ad | 11,403 | py | Python | config/settings/base.py | Kobi-Dadon/django_demo | e5c9a6bb8e64032540586321606520cd0d38d7be | [
"MIT"
] | null | null | null | config/settings/base.py | Kobi-Dadon/django_demo | e5c9a6bb8e64032540586321606520cd0d38d7be | [
"MIT"
] | null | null | null | config/settings/base.py | Kobi-Dadon/django_demo | e5c9a6bb8e64032540586321606520cd0d38d7be | [
"MIT"
] | null | null | null | """
Base settings to build other settings files upon.
"""
import environ
ROOT_DIR = (
environ.Path(__file__) - 3
) # (demo/config/settings/base.py - 3 = demo/)
APPS_DIR = ROOT_DIR.path("demo")
env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
if READ_DOT_ENV_FILE:
... | 40.293286 | 93 | 0.629045 |
12ecd6e3e36186718f3091df2b417bfb34054266 | 3,869 | py | Python | extract.py | rasmus-toftdahl-olesen/nibe-extract | ab8a0536190b77a58d8c7c62f47b8bbe89740408 | [
"Unlicense"
] | null | null | null | extract.py | rasmus-toftdahl-olesen/nibe-extract | ab8a0536190b77a58d8c7c62f47b8bbe89740408 | [
"Unlicense"
] | null | null | null | extract.py | rasmus-toftdahl-olesen/nibe-extract | ab8a0536190b77a58d8c7c62f47b8bbe89740408 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
# -*- encoding: utf-8 -*-
import socket
import sys
from typing import Dict, Tuple, Optional
import configparser
from pathlib import Path
import requests
from bs4 import BeautifulSoup
ALLOWED_UNITS = ['%', '°C', 'ºC', 'bar', 'Hz', 'h']
def send_gry(source_name, value):
message = '%s %s' % (so... | 29.761538 | 105 | 0.543293 |
457cd686680c2c0344def7a75b60fbaec5137b74 | 400 | py | Python | setup.py | gautamk/BlackNWhite | bf7ab09f1a666d2f8cabb049ef15aa160025a525 | [
"MIT"
] | 1 | 2015-11-06T00:01:29.000Z | 2015-11-06T00:01:29.000Z | setup.py | gautamk/BlackNWhite | bf7ab09f1a666d2f8cabb049ef15aa160025a525 | [
"MIT"
] | null | null | null | setup.py | gautamk/BlackNWhite | bf7ab09f1a666d2f8cabb049ef15aa160025a525 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='blacknwhite',
version='0.0.2',
packages=find_packages(),
license='http://opensource.org/licenses/MIT',
author='gautam',
author_email='gautam.nitheesh@gmail.com',
description='Simple opinionated Static Site generator',
install_requ... | 28.571429 | 59 | 0.6925 |
91ea5495fa8cadd0a7d073e5584731ef5f7fa511 | 463 | py | Python | data/scripts/templates/object/tangible/furniture/all/shared_bestine_quest_statue.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/furniture/all/shared_bestine_quest_statue.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/furniture/all/shared_bestine_quest_statue.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/furniture/all/shared_bestine_quest_statue.iff"
result.attribute_tem... | 27.235294 | 82 | 0.736501 |
9c20fe75d3ec8d89d31e98c7efe08e39bbac8424 | 12,192 | py | Python | sdk/python/pulumi_azure_native/automation/v20151031/get_runbook.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/automation/v20151031/get_runbook.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/automation/v20151031/get_runbook.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
fro... | 36.945455 | 390 | 0.643619 |
05c2e161db0ec82a11bc3bcfda73b1793506e4de | 1,739 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/generate_credentials_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/generate_credentials_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/generate_credentials_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"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 ... | 39.522727 | 119 | 0.630247 |
7a2e507171c1f1fb846727cedca63898d7cd606e | 28,076 | py | Python | sdk/python/pulumi_azure_native/network/v20170901/virtual_network.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20170901/virtual_network.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20170901/virtual_network.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"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
fro... | 56.37751 | 5,399 | 0.690341 |
2f49e8fe53ece9852bf4ef1617ba96ca3612689a | 11,370 | py | Python | facebook_business/adobjects/leadgenform.py | tony-fb/facebook-python-business-sdk | 3a86def6c7db05e5d8cb8266b6c3ef484ebf4f1e | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/leadgenform.py | tony-fb/facebook-python-business-sdk | 3a86def6c7db05e5d8cb8266b6c3ef484ebf4f1e | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/leadgenform.py | tony-fb/facebook-python-business-sdk | 3a86def6c7db05e5d8cb8266b6c3ef484ebf4f1e | [
"CNRI-Python"
] | 1 | 2018-09-24T14:04:48.000Z | 2018-09-24T14:04:48.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 35.981013 | 112 | 0.620493 |
3baa60654542a4c7bd1488c5dc04090384009b7f | 457 | py | Python | uninove/auditoria-web-02.py | dirleif/aprendendo-python | 94bd11d4588306121881149bbda9c615be951e2c | [
"MIT"
] | null | null | null | uninove/auditoria-web-02.py | dirleif/aprendendo-python | 94bd11d4588306121881149bbda9c615be951e2c | [
"MIT"
] | null | null | null | uninove/auditoria-web-02.py | dirleif/aprendendo-python | 94bd11d4588306121881149bbda9c615be951e2c | [
"MIT"
] | null | null | null | # script para inserir dados do login
import sqlite3
import hashlib
conn = sqlite3.connect('empresa.db')
cursor = conn.cursor()
vnome = input('Digite o nome para o login: ')
vsenha = input('Digite uma senha para o login: ')
# hash usando MD5
d = hashlib.md5()
d.update(vsenha.encode('utf-8'))
cursor.execute('insert into ... | 32.642857 | 70 | 0.704595 |
f47ad40a1be2dc1943f80a16782b1a4cb5418c54 | 2,112 | py | Python | addons/hr_recruitment_survey/tests/test_recruitment_survey.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/hr_recruitment_survey/tests/test_recruitment_survey.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/hr_recruitment_survey/tests/test_recruitment_survey.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import common
class TestRecruitmentSurvey(common.SingleTransactionCase):
@classmethod
def setUpClass(cls):
super(TestRecruitmentSurvey, cls).setUpClass()
# Create some sample d... | 45.913043 | 116 | 0.687027 |
34ddd4a3b6baad201b8092650e95fbdeafd707d2 | 1,291 | py | Python | Chapter 09/minimising-simple-linear-systems.py | arifmudi/Applying-Math-with-Python | abeb6b0a9bcfa8b21092b9793d4e691cf5a146bf | [
"MIT"
] | 34 | 2020-07-23T14:42:42.000Z | 2022-03-18T07:00:17.000Z | Chapter 09/minimising-simple-linear-systems.py | arifmudi/Applying-Math-with-Python | abeb6b0a9bcfa8b21092b9793d4e691cf5a146bf | [
"MIT"
] | null | null | null | Chapter 09/minimising-simple-linear-systems.py | arifmudi/Applying-Math-with-Python | abeb6b0a9bcfa8b21092b9793d4e691cf5a146bf | [
"MIT"
] | 31 | 2020-07-22T11:09:33.000Z | 2022-03-15T16:59:53.000Z |
import numpy as np
from scipy import optimize
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
A = np.array([
[2, 1], # 2*x0 + x1 <= 6
[-1, -1] # -x0 - x1 <= -4
])
b = np.array([6, -4])
x0_bounds = (-3, 14) # -3 <= x0 <= 14
x1_bounds = (2, 12) # 2 <= x1 <= 12
c = np.arra... | 21.881356 | 72 | 0.567777 |
6d616963d00bc618d86d27f541ff3b4ea6967f8a | 605 | py | Python | src/notes/migrations/0001_initial.py | ItanuRomero/smart-notes | 9d86c6250e9438fb4921218438fa161e3c4c4e02 | [
"MIT"
] | 1 | 2022-03-28T00:04:19.000Z | 2022-03-28T00:04:19.000Z | src/notes/migrations/0001_initial.py | ItanuRomero/smart-notes | 9d86c6250e9438fb4921218438fa161e3c4c4e02 | [
"MIT"
] | null | null | null | src/notes/migrations/0001_initial.py | ItanuRomero/smart-notes | 9d86c6250e9438fb4921218438fa161e3c4c4e02 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-25 15:06
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Notes',
fields=[
('id', models.BigAutoField... | 25.208333 | 117 | 0.566942 |
2dedafc5c6b9e5cde74d4a8e9d9916c2105a5279 | 5,561 | py | Python | src/ggrc/maintenance_views/maintenance.py | pbedn/ggrc-core | 12ae4720a430730835f1d02def62c0f6ef453521 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-20T14:51:26.000Z | 2020-05-20T14:51:26.000Z | src/ggrc/maintenance_views/maintenance.py | pbedn/ggrc-core | 12ae4720a430730835f1d02def62c0f6ef453521 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-05-10T16:27:21.000Z | 2022-03-02T05:49:41.000Z | src/ggrc/maintenance_views/maintenance.py | pbedn/ggrc-core | 12ae4720a430730835f1d02def62c0f6ef453521 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2016-08-23T10:51:19.000Z | 2016-08-23T10:51:19.000Z | # Copyright (C) 2019 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""View functions for maintenance"""
# pylint: disable=invalid-name
# pylint: disable=no-else-return
import re
from logging import getLogger
from ggrc.maintenance import maintenance_app
from ggrc import d... | 32.331395 | 78 | 0.695019 |
c9192e5271bd824ba9392adfe96b4e5c8566aefb | 474 | py | Python | brie/_cli/download.py | huangyh09/brie | 59563baafcdb95d1d75a81203e5cc29983f66c2f | [
"Apache-2.0"
] | 38 | 2017-01-06T00:18:46.000Z | 2022-01-25T19:44:10.000Z | brie/_cli/download.py | huangyh09/brie | 59563baafcdb95d1d75a81203e5cc29983f66c2f | [
"Apache-2.0"
] | 28 | 2017-01-11T09:12:57.000Z | 2022-02-14T14:53:48.000Z | brie/_cli/download.py | huangyh09/brie | 59563baafcdb95d1d75a81203e5cc29983f66c2f | [
"Apache-2.0"
] | 12 | 2018-02-13T20:23:00.000Z | 2022-01-05T18:39:19.000Z | import click
import brie
@click.command()
@click.pass_context
@click.argument("url")
@click.option(
"--dest", help="Destination path.", default=None, type=click.Path(exists=True)
)
@click.option(
"--verbose/--quiet", "-v/-q", help="Enable or disable verbose mode.", default=True
)
def download(ctx, url, dest,... | 26.333333 | 86 | 0.687764 |
e9f55708bee1ec7f498f6917b29c6c591915cf96 | 12,031 | py | Python | DQM/SiStripMonitorHardware/python/siStripFEDMonitor_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | DQM/SiStripMonitorHardware/python/siStripFEDMonitor_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | DQM/SiStripMonitorHardware/python/siStripFEDMonitor_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
siStripFEDMonitor = DQMEDAnalyzer('SiStripFEDMonitorPlugin',
#Raw data collection
RawDataTag = cms.untracked.InputTag('rawDataCollector'),
#Folder in DQM Store to write global histograms to
TopFolderName = c... | 45.059925 | 105 | 0.73161 |
6e35912a08e5d17dbb63dba794f61d10dc189924 | 11,343 | py | Python | validate_test_submission.py | agencyenterprise/neural-data-transformers | 39d0de79aef2b997dcb419a9d3f9cd81180ee57b | [
"Unlicense"
] | null | null | null | validate_test_submission.py | agencyenterprise/neural-data-transformers | 39d0de79aef2b997dcb419a9d3f9cd81180ee57b | [
"Unlicense"
] | null | null | null | validate_test_submission.py | agencyenterprise/neural-data-transformers | 39d0de79aef2b997dcb419a9d3f9cd81180ee57b | [
"Unlicense"
] | 1 | 2022-02-16T00:20:55.000Z | 2022-02-16T00:20:55.000Z | from collections import defaultdict
import logging
import os
from pathlib import Path
import click
import h5py
import numpy as np
import pandas as pd
from nlb_tools.make_tensors import h5_to_dict
from src.config.settings import settings
from src.data import NDTDataHandler
from src.inference import get_output_rates
... | 36.009524 | 88 | 0.694349 |
e4b80d4b678f2e636f3062f397af458fcdf753fb | 18,284 | py | Python | oregano_gui/text.py | Ergon-moe/Oregano | 88c912d769b663660b70bfb04485d747f37588f5 | [
"MIT"
] | null | null | null | oregano_gui/text.py | Ergon-moe/Oregano | 88c912d769b663660b70bfb04485d747f37588f5 | [
"MIT"
] | null | null | null | oregano_gui/text.py | Ergon-moe/Oregano | 88c912d769b663660b70bfb04485d747f37588f5 | [
"MIT"
] | 1 | 2021-07-04T10:52:42.000Z | 2021-07-04T10:52:42.000Z | import tty, sys
import curses, datetime, locale
from decimal import Decimal as PyDecimal
import getpass
import oregano
from oregano.address import Address
from oregano.util import format_satoshis, set_verbosity
from oregano.bitcoin import COIN, TYPE_ADDRESS
from oregano import Wallet, WalletStorage
_ = lambda x:x
... | 36.063116 | 151 | 0.532597 |
2a53a59e11fb66c3d2b00aaa4b26262b5359b481 | 254 | py | Python | medmanager/gestion_administrativa/doctype/impuesto/impuesto.py | dprodigy75/medicalmanager | 644eb95076437e5011c598d54023c9993fdb7e1a | [
"MIT"
] | null | null | null | medmanager/gestion_administrativa/doctype/impuesto/impuesto.py | dprodigy75/medicalmanager | 644eb95076437e5011c598d54023c9993fdb7e1a | [
"MIT"
] | null | null | null | medmanager/gestion_administrativa/doctype/impuesto/impuesto.py | dprodigy75/medicalmanager | 644eb95076437e5011c598d54023c9993fdb7e1a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Brandmand and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Impuesto(Document):
pass
| 23.090909 | 49 | 0.779528 |
02aca26ff6310f50169c9c0dd7eb77901e80b525 | 5,058 | py | Python | numba/tests/test_func_lifetime.py | uw-ipd/numba | 26dde2b28cadda403a5549a84dc1698900b23f74 | [
"BSD-2-Clause"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/tests/test_func_lifetime.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/tests/test_func_lifetime.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z |
from __future__ import print_function, absolute_import
import gc
import weakref
from numba import unittest_support as unittest
from numba.utils import IS_PY3
from numba import jit, types
from .support import TestCase
class Dummy(object):
def __add__(self, other):
return other + 5
def global_usecase1... | 29.928994 | 76 | 0.626335 |
133b36143dc82e7ce90b384e60ff6628d269dfb6 | 123,020 | py | Python | tools/shared.py | tido64/emscripten | 21c898cb04d940656cdda58bcd69c67806124d6b | [
"MIT"
] | null | null | null | tools/shared.py | tido64/emscripten | 21c898cb04d940656cdda58bcd69c67806124d6b | [
"MIT"
] | null | null | null | tools/shared.py | tido64/emscripten | 21c898cb04d940656cdda58bcd69c67806124d6b | [
"MIT"
] | null | null | null | from __future__ import print_function
from distutils.spawn import find_executable
from subprocess import PIPE, STDOUT
import atexit
import base64
import json
import logging
import math
import multiprocessing
import os
import re
import shlex
import shutil
import subprocess
import sys
import tempfile
from .toolchain_pr... | 39.993498 | 393 | 0.672988 |
a01fd1ec5b08d9a017c1408f05ca9e1ba5c59e7d | 2,704 | py | Python | python3/koans/about_inheritance.py | mh70cz/python_koans | 82d306ef1a1e2917239e4e1b6b2b9d85189a007e | [
"MIT"
] | 1 | 2020-05-24T00:14:52.000Z | 2020-05-24T00:14:52.000Z | python3/koans/about_inheritance.py | mh70cz/python_koans | 82d306ef1a1e2917239e4e1b6b2b9d85189a007e | [
"MIT"
] | null | null | null | python3/koans/about_inheritance.py | mh70cz/python_koans | 82d306ef1a1e2917239e4e1b6b2b9d85189a007e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutInheritance(Koan):
class Dog:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
def bark(self):
return "WOOF"
class Ch... | 30.044444 | 80 | 0.581361 |
98a336c1a006beef1d4315e45c814cca81b2a73b | 31,327 | py | Python | setup_app/utils/properties_utils.py | maduvena/jans-setup | 0e13ea5300b353c50f3313cf0e65108b2341a004 | [
"MIT"
] | null | null | null | setup_app/utils/properties_utils.py | maduvena/jans-setup | 0e13ea5300b353c50f3313cf0e65108b2341a004 | [
"MIT"
] | null | null | null | setup_app/utils/properties_utils.py | maduvena/jans-setup | 0e13ea5300b353c50f3313cf0e65108b2341a004 | [
"MIT"
] | null | null | null | import os
import sys
import json
import subprocess
import uuid
import glob
import urllib
import ssl
import re
import inspect
from setup_app import paths
from setup_app.utils import base
from setup_app.utils.cbm import CBM
from setup_app.static import InstallTypes, colors
from setup_app.config import Config
from setup... | 39.755076 | 204 | 0.558624 |
a270a9b57cacd9dc0144d373a268687111adaca2 | 3,776 | py | Python | huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/create_instance_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/create_instance_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/create_instance_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class CreateInstanceResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
... | 26.971429 | 79 | 0.567532 |
84b72d5d1d94959180b9d1df0e16ad6be48caf44 | 2,833 | py | Python | wrktoolbox/stores/fs.py | RobertoPrevato/wrktoolbox | 8ca7f33faa3a2968798c398d359360d1f1af91bf | [
"MIT"
] | 3 | 2020-04-08T08:54:26.000Z | 2021-07-27T16:29:39.000Z | wrktoolbox/stores/fs.py | RobertoPrevato/wrktoolbox | 8ca7f33faa3a2968798c398d359360d1f1af91bf | [
"MIT"
] | 2 | 2019-07-08T13:19:41.000Z | 2021-01-24T21:06:06.000Z | wrktoolbox/stores/fs.py | RobertoPrevato/wrktoolbox | 8ca7f33faa3a2968798c398d359360d1f1af91bf | [
"MIT"
] | 2 | 2020-11-03T07:54:53.000Z | 2021-01-22T11:59:05.000Z | import os
import uuid
import pickle
from abc import abstractmethod
from base64 import b64encode
from datetime import datetime
from rocore.json import dumps
from rocore.folders import ensure_folder
from wrktoolbox.benchmarks import BenchmarkOutputStore, BenchmarkOutput, BenchmarkConfig, BenchmarkSuite
class FileSystem... | 35.4125 | 108 | 0.693964 |
f83a2494029687038343de2900cc2ac7e19c8747 | 1,814 | py | Python | lib/spack/external/py/_process/cmdexec.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | lib/spack/external/py/_process/cmdexec.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | lib/spack/external/py/_process/cmdexec.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | import sys
import subprocess
import py
from subprocess import Popen, PIPE
def cmdexec(cmd):
""" return unicode output of executing 'cmd' in a separate process.
raise cmdexec.Error exeception if the command failed.
the exception will provide an 'err' attribute containing
the error-output from the comma... | 36.28 | 80 | 0.686329 |
85f307bd91bb0d2aca1fbbf36e68bc786c7b8271 | 1,008 | py | Python | test/helpers.py | cskau/grole | 74a6f2c2e79c0009bae5c8cc9627837be33ab170 | [
"MIT"
] | 6 | 2017-10-28T14:28:17.000Z | 2019-03-15T01:25:01.000Z | test/helpers.py | cskau/grole | 74a6f2c2e79c0009bae5c8cc9627837be33ab170 | [
"MIT"
] | 18 | 2017-09-09T21:13:24.000Z | 2020-12-20T09:14:25.000Z | test/helpers.py | cskau/grole | 74a6f2c2e79c0009bae5c8cc9627837be33ab170 | [
"MIT"
] | 1 | 2020-06-12T18:56:16.000Z | 2020-06-12T18:56:16.000Z | import asyncio
import io
a_wait = asyncio.new_event_loop().run_until_complete
class FakeReader():
def __init__(self, data=b''):
self.io = io.BytesIO(data)
self.len = len(data)
async def readline(self):
return self.io.readline()
async def readexactly(self, n):
data = self.... | 19.764706 | 54 | 0.589286 |
cbcdfb70f1a0c999da30c00475949088701e2c9e | 369 | py | Python | exercicios/Lista4/Q38.py | AlexandrePeBrito/CursoUdemyPython | 3de58cb30c9f333b32078309847179ff3f9d7e22 | [
"MIT"
] | null | null | null | exercicios/Lista4/Q38.py | AlexandrePeBrito/CursoUdemyPython | 3de58cb30c9f333b32078309847179ff3f9d7e22 | [
"MIT"
] | null | null | null | exercicios/Lista4/Q38.py | AlexandrePeBrito/CursoUdemyPython | 3de58cb30c9f333b32078309847179ff3f9d7e22 | [
"MIT"
] | null | null | null | #Peça ao usuário para digitar dez valores numéricos e ordene
#por ordem crescente esses valores, guardando-os num vetor.
#Ordene o valor assim que ele for digitado. Mostre ao final
#na tela os valores em ordem.
import random
vetorA=[]
for c in range(0,3):
n=random.randint(0,50)
#print(n)
vetorA.append(n)
... | 24.6 | 60 | 0.723577 |
e788d9509347368a89a1ce61a0325eff4d4ade6b | 971 | py | Python | totp.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 2 | 2015-06-01T18:33:38.000Z | 2018-11-21T19:40:37.000Z | totp.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 102 | 2015-01-20T17:26:52.000Z | 2017-12-28T17:32:51.000Z | totp.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 3 | 2020-03-02T06:54:18.000Z | 2021-01-07T16:36:35.000Z | import hmac
import time
import base64
import struct
import hashlib
def get_hotp(secret, counter):
"""Return the HMAC-Based One-Time Password for the the given secret (base32 encoded) and the counter.
>>> [get_hotp('GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ', i) for i in xrange(10)]
[755224, 287082, 359152, 969429, ... | 33.482759 | 109 | 0.69001 |
084911955a5542866411e070c552f83d90dde02f | 19,472 | py | Python | web2py/web2py/applications/invoice2py/controllers/appadmin.py | eddgt/web2py | 956c67754bbbdeaa5479f61d6a91ce0de87861e9 | [
"BSD-3-Clause"
] | null | null | null | web2py/web2py/applications/invoice2py/controllers/appadmin.py | eddgt/web2py | 956c67754bbbdeaa5479f61d6a91ce0de87861e9 | [
"BSD-3-Clause"
] | null | null | null | web2py/web2py/applications/invoice2py/controllers/appadmin.py | eddgt/web2py | 956c67754bbbdeaa5479f61d6a91ce0de87861e9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################
import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils
try:
import pygraphvi... | 33.805556 | 94 | 0.521415 |
b348817cbc861f57f478a350cf831d41f3be533e | 2,817 | py | Python | maranet/utils/checksum.py | D3f0/maranet | 07d34218d0a0b9025720dc7eb9d48bc651e50988 | [
"MIT"
] | null | null | null | maranet/utils/checksum.py | D3f0/maranet | 07d34218d0a0b9025720dc7eb9d48bc651e50988 | [
"MIT"
] | 2 | 2021-03-25T21:43:56.000Z | 2021-11-15T17:47:00.000Z | maranet/utils/checksum.py | D3f0/maranet | 07d34218d0a0b9025720dc7eb9d48bc651e50988 | [
"MIT"
] | null | null | null | #! /usr/bin/python
# -*- encoding: utf-8 -*-
'''
Mara checksum routines
'''
# TODO: Work wiht Streams instead of lists and Construct ULInt's
def make_cs(valor):
'''
Genra el checksum para la sumatoria
'''
valor &= 0xffff # Modulo 64k
cs_h, cs_l = valor >> 8, valor & 0xff # Parte alta, parte baja... | 28.454545 | 87 | 0.610934 |
9d882d488e9449e132290b44e9271aa98dfc141f | 3,093 | py | Python | video/cloud-client/analyze/video_detect_faces_beta.py | yshalabi/python-docs-samples | 591787c01d94102ba9205f998d95a05b39ccad2f | [
"Apache-2.0"
] | 2 | 2020-09-19T04:22:52.000Z | 2020-09-23T14:04:17.000Z | video/cloud-client/analyze/video_detect_faces_beta.py | yshalabi/python-docs-samples | 591787c01d94102ba9205f998d95a05b39ccad2f | [
"Apache-2.0"
] | 28 | 2020-08-20T21:36:30.000Z | 2021-06-21T18:05:17.000Z | video/cloud-client/analyze/video_detect_faces_beta.py | yshalabi/python-docs-samples | 591787c01d94102ba9205f998d95a05b39ccad2f | [
"Apache-2.0"
] | 2 | 2020-11-24T18:20:51.000Z | 2020-12-12T12:21:52.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.821429 | 80 | 0.655351 |
5b073961fe82bf4ea267d6672daf8e5ce663d955 | 40,461 | py | Python | ciscoisesdk/api/v3_1_0/external_radius_server.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 36 | 2021-05-18T16:24:19.000Z | 2022-03-05T13:44:41.000Z | ciscoisesdk/api/v3_1_0/external_radius_server.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 15 | 2021-06-08T19:03:37.000Z | 2022-02-25T14:47:33.000Z | ciscoisesdk/api/v3_1_0/external_radius_server.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 6 | 2021-06-10T09:32:01.000Z | 2022-01-12T08:34:39.000Z | # -*- coding: utf-8 -*-
"""Cisco Identity Services Engine ExternalRADIUSServer API wrapper.
Copyright (c) 2021 Cisco and/or its affiliates.
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... | 40.420579 | 128 | 0.552186 |
d0551e7b8f280c4904aaa17797c2c5e8b6f84f20 | 15,029 | py | Python | core/jobs_registry.py | the-known-anon/oppia | 92f66451a52d12e11728577cd50360cca0812c47 | [
"Apache-2.0"
] | 1 | 2020-10-11T07:56:09.000Z | 2020-10-11T07:56:09.000Z | core/jobs_registry.py | the-known-anon/oppia | 92f66451a52d12e11728577cd50360cca0812c47 | [
"Apache-2.0"
] | null | null | null | core/jobs_registry.py | the-known-anon/oppia | 92f66451a52d12e11728577cd50360cca0812c47 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 52.184028 | 80 | 0.854415 |
8b544c4e7ce2f0d0624e6e8c91cd34e72e434b39 | 2,076 | py | Python | lib/exabgp/bgp/message/update/attribute/sr/labelindex.py | opensourcerouting/exabgp | 2ba3ed23eae97f71372fcb437cf0c30bbffd1e2b | [
"BSD-3-Clause"
] | null | null | null | lib/exabgp/bgp/message/update/attribute/sr/labelindex.py | opensourcerouting/exabgp | 2ba3ed23eae97f71372fcb437cf0c30bbffd1e2b | [
"BSD-3-Clause"
] | null | null | null | lib/exabgp/bgp/message/update/attribute/sr/labelindex.py | opensourcerouting/exabgp | 2ba3ed23eae97f71372fcb437cf0c30bbffd1e2b | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
"""
sr/labelindex.py
Created by Evelio Vila 2017-02-16
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
"""
from struct import pack, unpack
from exabgp.util import concat_bytes
from exabgp.bgp.message.notification import Notify
from exabgp.bgp.message.update.attribute.sr.prefixsid import P... | 32.4375 | 95 | 0.487476 |
60fe55e4373b1691e6769f453fc677efe4928963 | 6,658 | py | Python | test/functional/feature_maxuploadtarget.py | sighttviewliu/michaellaoliu_coin | 5d6d3eb2e2a0d4273bd7108744e1a362339697a9 | [
"MIT"
] | 2 | 2018-12-05T12:47:59.000Z | 2019-06-27T12:01:59.000Z | test/functional/feature_maxuploadtarget.py | sighttviewliu/michaellaoliu_coin | 5d6d3eb2e2a0d4273bd7108744e1a362339697a9 | [
"MIT"
] | null | null | null | test/functional/feature_maxuploadtarget.py | sighttviewliu/michaellaoliu_coin | 5d6d3eb2e2a0d4273bd7108744e1a362339697a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Michaellaoliu Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test behavior of -maxuploadtarget.
* Verify that getdata requests for old blocks (>1week) are dr... | 39.164706 | 107 | 0.671974 |
d50be1b861dbd976d81eb62bf02e653c6ed71e92 | 622 | py | Python | chapter04/knock32.py | m-star18/NLP100 | e199814f81943f7fb693fd5fe87d6df21da07f5b | [
"MIT"
] | 1 | 2020-07-15T17:21:13.000Z | 2020-07-15T17:21:13.000Z | chapter04/knock32.py | m-star18/NLP100 | e199814f81943f7fb693fd5fe87d6df21da07f5b | [
"MIT"
] | 1 | 2021-05-04T01:04:57.000Z | 2021-05-04T01:05:32.000Z | chapter04/knock32.py | m-star18/NLP100 | e199814f81943f7fb693fd5fe87d6df21da07f5b | [
"MIT"
] | null | null | null | def parse_line(check):
res = []
for li in check.split('\n'):
if li == '':
return res
(surface, rest) = li.split('\t')
rest = rest.split(',')
parse_dict = {'surface': surface, 'base': rest[6], 'pos': rest[0], 'pos1': rest[1]}
res.append(parse_dict)
memo = []
... | 25.916667 | 91 | 0.512862 |
cf859002bf5179ab4129c95c1fca4f838f01a919 | 3,263 | py | Python | specutils/io/default_loaders/ascii.py | eblur/specutils | 570d3973dc7bd9570e7f60bf8b54819c2e4d1f07 | [
"BSD-3-Clause"
] | null | null | null | specutils/io/default_loaders/ascii.py | eblur/specutils | 570d3973dc7bd9570e7f60bf8b54819c2e4d1f07 | [
"BSD-3-Clause"
] | null | null | null | specutils/io/default_loaders/ascii.py | eblur/specutils | 570d3973dc7bd9570e7f60bf8b54819c2e4d1f07 | [
"BSD-3-Clause"
] | 1 | 2019-11-14T11:23:09.000Z | 2019-11-14T11:23:09.000Z | import os
import astropy.units as u
from astropy.nddata import StdDevUncertainty
from astropy.table import Table
from ... import Spectrum1D
from ..registers import data_loader
from ..parsing_utils import (generic_spectrum_from_table,
spectrum_from_column_mapping)
__all__ = ['ascii_ident... | 32.306931 | 83 | 0.674533 |
2e91dbe2529254382cf3157b5279f0f4d13f18ea | 552 | py | Python | contrib/awslambda/python/src/python/pants/contrib/awslambda/python/subsystems/lambdex.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | contrib/awslambda/python/src/python/pants/contrib/awslambda/python/subsystems/lambdex.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | contrib/awslambda/python/src/python/pants/contrib/awslambda/python/subsystems/lambdex.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.python.subsystems.python_tool_base import PythonToolBase
class Lambdex(PythonToolBase):
options_scope = "lambdex"
default_version = "lambdex==0.1.3"
# TODO... | 39.428571 | 80 | 0.753623 |
895e31c4856c001f43da4879d1f87ca98bb66430 | 1,492 | py | Python | flashcards.py | ankitchobdar/flask-getting-started | 33c59b5ef519feacf9be5b575c0cc857e4654222 | [
"Apache-2.0"
] | null | null | null | flashcards.py | ankitchobdar/flask-getting-started | 33c59b5ef519feacf9be5b575c0cc857e4654222 | [
"Apache-2.0"
] | null | null | null | flashcards.py | ankitchobdar/flask-getting-started | 33c59b5ef519feacf9be5b575c0cc857e4654222 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, render_template, abort, jsonify, request, redirect, url_for
from model import db, save_db
app = Flask(__name__)
@app.route('/')
def welcome():
return render_template(
"welcome.html",
cards=db
)
@app.route('/card/<int:index>')
def card_view(index):
try:
c... | 23.68254 | 84 | 0.598525 |
925b45468dcd0f680a1df4ef26df1dd30575e899 | 459 | py | Python | tests/context.py | gsohos/SeqGAN | 765bfa6966a6b947ebe9272de05975f0dd5a3596 | [
"MIT"
] | 41 | 2018-09-28T06:51:35.000Z | 2022-01-05T06:29:03.000Z | tests/context.py | gsohos/SeqGAN | 765bfa6966a6b947ebe9272de05975f0dd5a3596 | [
"MIT"
] | 2 | 2019-04-09T13:04:17.000Z | 2020-02-03T19:06:31.000Z | tests/context.py | gsohos/SeqGAN | 765bfa6966a6b947ebe9272de05975f0dd5a3596 | [
"MIT"
] | 14 | 2019-01-27T06:51:19.000Z | 2021-12-24T05:32:17.000Z | # -*- coding: utf-8 -*-
import sys
import os
import unittest
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from SeqGAN.utils import GeneratorPretrainingGenerator, DiscriminatorGenerator
from SeqGAN.models import GeneratorPretraining, Discriminator, Generator, DiscriminatorConv
from... | 32.785714 | 91 | 0.8061 |
ac4d63c8b0916f30ca996e164f0f63ea565cec15 | 1,415 | py | Python | cla_public/apps/base/tests/test_reasons_for_contacting.py | farrepa/cla_public | cc61c5d1c9a6b8a9b853c37a0214ade59214d2f2 | [
"MIT"
] | null | null | null | cla_public/apps/base/tests/test_reasons_for_contacting.py | farrepa/cla_public | cc61c5d1c9a6b8a9b853c37a0214ade59214d2f2 | [
"MIT"
] | null | null | null | cla_public/apps/base/tests/test_reasons_for_contacting.py | farrepa/cla_public | cc61c5d1c9a6b8a9b853c37a0214ade59214d2f2 | [
"MIT"
] | null | null | null | from random import choice
import unittest
from flask import url_for
from werkzeug.datastructures import MultiDict
from cla_public import app
from cla_public.apps.base.constants import REASONS_FOR_CONTACTING_CHOICES
from cla_public.apps.base.forms import ReasonsForContactingForm
from cla_public.apps.checker.api import... | 39.305556 | 118 | 0.715901 |
28743a69949e2b57d4b36236becc0a78a9aad00a | 10,335 | py | Python | myanimelist/session.py | junpet/python3-mal | 945c76bef987ab7c5135a8c98229e2017d2508cc | [
"WTFPL"
] | null | null | null | myanimelist/session.py | junpet/python3-mal | 945c76bef987ab7c5135a8c98229e2017d2508cc | [
"WTFPL"
] | null | null | null | myanimelist/session.py | junpet/python3-mal | 945c76bef987ab7c5135a8c98229e2017d2508cc | [
"WTFPL"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
from . import anime
from . import manga
from . import character
from . import person
from . import user
from . import club
from . import genre
from . import tag
from . import publication
from . import producer
from . import anime_list
from . import manga_l... | 30.576923 | 139 | 0.607063 |
43dff5c0004bee4abd1577666d2082e132fe8dfa | 809 | py | Python | SerialPort/SPOptions.py | Dennic/PyQt5-SerialPort-ComAssistant | 7f01e9de77bb2d6756d95170972244426be06741 | [
"MIT"
] | 4 | 2018-11-26T08:48:47.000Z | 2020-12-15T11:48:37.000Z | SerialPort/SPOptions.py | Dennic/PyQt5-SerialPort-ComAssistant | 7f01e9de77bb2d6756d95170972244426be06741 | [
"MIT"
] | null | null | null | SerialPort/SPOptions.py | Dennic/PyQt5-SerialPort-ComAssistant | 7f01e9de77bb2d6756d95170972244426be06741 | [
"MIT"
] | null | null | null |
import serial
class Parity:
PARITY_NAMES = ['奇','偶','无']
PARITYS = [serial.PARITY_ODD, serial.PARITY_EVEN, serial.PARITY_NONE]
@staticmethod
def getParity(i):
return Parity.PARITYS[i]
class ByteSize:
BYTESIZE_NAMES = ['5','6','7','8']
BYTESIZES = [serial.FIVEBITS, serial.SIXBITS, seri... | 26.966667 | 92 | 0.657602 |
8781614bc310fce6bcc77ae156594401a61e517b | 365 | py | Python | hdphmm/__init__.py | bencoscia/hdphmm | 2c65c58a69d31015652a2681bcd4b3d983704e28 | [
"MIT"
] | 1 | 2021-04-03T16:07:24.000Z | 2021-04-03T16:07:24.000Z | hdphmm/__init__.py | shirtsgroup/hdphmm | 2c65c58a69d31015652a2681bcd4b3d983704e28 | [
"MIT"
] | 1 | 2021-09-17T18:21:33.000Z | 2021-09-17T18:21:33.000Z | hdphmm/__init__.py | shirtsgroup/hdphmm | 2c65c58a69d31015652a2681bcd4b3d983704e28 | [
"MIT"
] | 2 | 2020-05-28T19:43:11.000Z | 2021-06-15T01:25:55.000Z | """
hdphmm
Determine latent states in multi-dimensional time series using the hierarchical Dirichlet process hidden Markov model
"""
# Add imports here
from .hdphmm import *
# Handle versioneer
from ._version import get_versions
versions = get_versions()
__version__ = versions['version']
__git_revision__ = versions['... | 24.333333 | 117 | 0.79726 |
bb347231cd47c12acca34f262d88832508e00d15 | 370 | py | Python | tkinter/__button__/button-askopenfilename/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | tkinter/__button__/button-askopenfilename/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | tkinter/__button__/button-askopenfilename/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z | #!/usr/bin/env python3
import tkinter as tk
from tkinter import filedialog
# --- functions ---
def on_click():
filename = filedialog.askopenfilename()
if filename:
print("Filename:", filename)
else:
print("Filename: not selected")
# --- main ---
root = tk.Tk()
tk.Button(root, text='Cli... | 16.818182 | 57 | 0.643243 |
49b61b5017afe302062f92ab2293a1cbbb980370 | 803 | py | Python | scripts/face_to_face1.py | GoodField55/pimouse_vision_control | de229fcceb02e9cd30c51af3b8c66cfe017d071b | [
"BSD-3-Clause"
] | null | null | null | scripts/face_to_face1.py | GoodField55/pimouse_vision_control | de229fcceb02e9cd30c51af3b8c66cfe017d071b | [
"BSD-3-Clause"
] | null | null | null | scripts/face_to_face1.py | GoodField55/pimouse_vision_control | de229fcceb02e9cd30c51af3b8c66cfe017d071b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#encoding: utf8
import rospy, cv2
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
class FaceToFace():
def __init__(self):
sub = rospy.Subscriber("/cv_camera/image_raw", Image, self.get_image)
self.bridge = CvBridge()
self.image_org = None
def get_i... | 23.617647 | 73 | 0.699875 |
bc92f779c68cd65f627b899587b200b0f7440312 | 17,569 | py | Python | manilaclient/tests/unit/test_shell.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | manilaclient/tests/unit/test_shell.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | manilaclient/tests/unit/test_shell.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | # 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, software
# distributed under the Li... | 37.946004 | 79 | 0.548295 |
1db5ce83fe7995881939ae03644de378581f5fbd | 7,750 | py | Python | engagement_prediction/channel_specific_predictor.py | avalanchesiqi/youtube-engagement | 0c3672869381afe5611a623163830ee4c3c25339 | [
"MIT"
] | 19 | 2018-06-01T15:26:54.000Z | 2022-02-13T17:39:39.000Z | engagement_prediction/channel_specific_predictor.py | avalanchesiqi/youtube-engagement | 0c3672869381afe5611a623163830ee4c3c25339 | [
"MIT"
] | null | null | null | engagement_prediction/channel_specific_predictor.py | avalanchesiqi/youtube-engagement | 0c3672869381afe5611a623163830ee4c3c25339 | [
"MIT"
] | 5 | 2019-10-15T00:31:19.000Z | 2022-02-12T08:26:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Predict engagement metrics from channel specific predictor.
Target: predict watch percentage
Usage: python channel_specific_predictor.py -i ./ -o ./output -f wp
Time: ~20M
Target: predict relative engagement
Usage: python channel_specific_predictor.py -i ./ -o ./outp... | 49.363057 | 152 | 0.512387 |
dce366606c7277598a0f398afa8d38c2944a62dc | 87 | py | Python | tbk/environments.py | AlvaroAbarca/python-tbk | 6458e2cca4c778428a71fe370d97577aa49b9aea | [
"MIT"
] | null | null | null | tbk/environments.py | AlvaroAbarca/python-tbk | 6458e2cca4c778428a71fe370d97577aa49b9aea | [
"MIT"
] | null | null | null | tbk/environments.py | AlvaroAbarca/python-tbk | 6458e2cca4c778428a71fe370d97577aa49b9aea | [
"MIT"
] | null | null | null |
DEVELOPMENT = 'DEVELOPMENT'
CERTIFICATION = 'CERTIFICATION'
PRODUCTION = 'PRODUCTION'
| 17.4 | 31 | 0.781609 |
0bd32aa048e5ab4cf0a0f22c6b9625d07ec22c2c | 15,814 | py | Python | dwdcdc/at2h.py | turkishmaid/dwdcdc | 4665b40930779080563226f5a0d44b7beeeb5670 | [
"MIT"
] | null | null | null | dwdcdc/at2h.py | turkishmaid/dwdcdc | 4665b40930779080563226f5a0d44b7beeeb5670 | [
"MIT"
] | null | null | null | dwdcdc/at2h.py | turkishmaid/dwdcdc | 4665b40930779080563226f5a0d44b7beeeb5670 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
Tooling for Air Temperature 2m, hourly.
"""
import logging
from ftplib import FTP
from pathlib import Path
from tempfile import TemporaryDirectory
from zipfile import ZipFile
import csv
from dataclasses import dataclass
from datetime import date, timedelta
from typing import ... | 41.506562 | 150 | 0.5602 |
442a1d318982f6636b06e0b074eaff6301012c3f | 7,718 | py | Python | tensorflow/python/keras/optimizer_v2/adadelta_test.py | cjohnchen/tensorflow | bc4a279ca963a901576a9a7a35b189dfae7f5c85 | [
"Apache-2.0"
] | 1 | 2019-03-03T22:46:40.000Z | 2019-03-03T22:46:40.000Z | tensorflow/python/keras/optimizer_v2/adadelta_test.py | meteozay/tensorflow | e3aa49701d60a006d09786f5a240530ee5f47e25 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/optimizer_v2/adadelta_test.py | meteozay/tensorflow | e3aa49701d60a006d09786f5a240530ee5f47e25 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.272727 | 118 | 0.624125 |
7191add11f80f191fc4656bc1ab503df1a9f5a8d | 7,065 | py | Python | finetune.py | mli0603/PSMNet | 52e36b09529225ffd38a1ceef86976087350b987 | [
"MIT"
] | 1 | 2021-09-30T06:41:10.000Z | 2021-09-30T06:41:10.000Z | finetune.py | mli0603/PSMNet | 52e36b09529225ffd38a1ceef86976087350b987 | [
"MIT"
] | null | null | null | finetune.py | mli0603/PSMNet | 52e36b09529225ffd38a1ceef86976087350b987 | [
"MIT"
] | null | null | null | from __future__ import print_function
import argparse
import os
import random
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.utils.data
from torch.autograd import Variable
import torch.nn.functional as F
import skimage
import ski... | 32.860465 | 120 | 0.656051 |
c5acf3a64c6809f0070fa5c3f68518fb1bd29543 | 604 | py | Python | Week 2/Largest Divisible Subset.py | Akram1234/June-LeetCoding-Challenge | 19131e9b5e12cc3cb19ab5b266fec730c25d5af3 | [
"MIT"
] | null | null | null | Week 2/Largest Divisible Subset.py | Akram1234/June-LeetCoding-Challenge | 19131e9b5e12cc3cb19ab5b266fec730c25d5af3 | [
"MIT"
] | null | null | null | Week 2/Largest Divisible Subset.py | Akram1234/June-LeetCoding-Challenge | 19131e9b5e12cc3cb19ab5b266fec730c25d5af3 | [
"MIT"
] | null | null | null |
class Solution:
def largestDivisibleSubset(self, nums: List[int]) -> List[int]:
n=len(nums)
if n==0:
return []
nums.sort(reverse=True)
l = [1 for _ in range(n)]
p = [-1 for _ in range(n)]
idx = 0
for i in range(1,n):
for j in range(0,i... | 26.26087 | 67 | 0.397351 |
b58c1809736bfcdc5afeaa1e9ec70caadd095155 | 1,443 | py | Python | nuke_stubs/nuke/nuke_classes/Keyer_Knob.py | sisoe24/Nuke-Python-Stubs | 79c53cf5cb7b38e15a34fd04f672b143d9d7dc85 | [
"MIT"
] | 1 | 2022-01-12T01:29:16.000Z | 2022-01-12T01:29:16.000Z | nuke_stubs/nuke/nuke_classes/Keyer_Knob.py | sisoe24/Nuke-Python-Stubs | 79c53cf5cb7b38e15a34fd04f672b143d9d7dc85 | [
"MIT"
] | null | null | null | nuke_stubs/nuke/nuke_classes/Keyer_Knob.py | sisoe24/Nuke-Python-Stubs | 79c53cf5cb7b38e15a34fd04f672b143d9d7dc85 | [
"MIT"
] | null | null | null | from numbers import Number
from typing import *
import nuke
from . import *
class Keyer_Knob(Array_Knob):
"""
Keyer_Knob
"""
def __hash__(self, ):
"""
Return hash(self).
"""
return None
def __init__(self, *args, **kwargs):
"""
Initialize self. See... | 20.323944 | 79 | 0.513514 |
1630b1243a50400ea8f9f3b779822abfdd9a97af | 518 | py | Python | molsysmt/physchem/volume.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | molsysmt/physchem/volume.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | molsysmt/physchem/volume.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | import numpy as np
from molsysmt._private.exceptions import *
def volume(molecular_system, selection='all', type='grantham'):
from molsysmt.basic import get
if type == 'grantham':
from .groups.volume import grantham as values
else:
raise NotImplementedError()
group_types = get(molecu... | 21.583333 | 87 | 0.681467 |
97ebbb5c501ef4e183de62b4b6b731366e2b0539 | 143 | py | Python | Algorithms/Python/Euclidean_gcd.py | Shaswat-2203/HacktoberfestForBeginners | 39d2862ced151493b93bf13f43d751f95a468198 | [
"MIT"
] | 115 | 2019-10-12T02:30:40.000Z | 2022-03-31T21:42:58.000Z | Algorithms/Python/Euclidean_gcd.py | Shaswat-2203/HacktoberfestForBeginners | 39d2862ced151493b93bf13f43d751f95a468198 | [
"MIT"
] | 37 | 2019-10-11T18:25:44.000Z | 2021-10-08T06:16:45.000Z | Algorithms/Python/Euclidean_gcd.py | Shaswat-2203/HacktoberfestForBeginners | 39d2862ced151493b93bf13f43d751f95a468198 | [
"MIT"
] | 481 | 2019-10-11T18:01:47.000Z | 2022-03-25T11:11:02.000Z | def gcd(a,b):
if (b == 0):
return a
return gcd(b, a%b)
a,b=map(int,input().split())
print("gcd of a and b is = ",gcd(a,b))
| 20.428571 | 38 | 0.496503 |
4c12bd1660b5305d0c8b97e4bd3ef6cc4ff4f691 | 1,564 | py | Python | tests/tasks/github/test_issues.py | louisditzel/prefect | b1a02fee623b965e756a38aa09059db780ab67eb | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-10T14:32:32.000Z | 2020-05-10T14:32:32.000Z | tests/tasks/github/test_issues.py | louisditzel/prefect | b1a02fee623b965e756a38aa09059db780ab67eb | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/tasks/github/test_issues.py | louisditzel/prefect | b1a02fee623b965e756a38aa09059db780ab67eb | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from unittest.mock import MagicMock
import pytest
import requests
import prefect
from prefect.tasks.github import OpenGitHubIssue
from prefect.utilities.configuration import set_temporary_config
class TestOpenGithubIssueInitialization:
def test_initializes_with_nothing_and_sets_defaults(self):
task = Op... | 33.276596 | 82 | 0.68798 |
ed5a61e9670d549fbff1985fad6fa5660e877973 | 17,731 | py | Python | libqtile/group.py | mikelward/qtile | 225cca581a1ec83a89f0e9bf5ed8d5dcca723750 | [
"MIT"
] | null | null | null | libqtile/group.py | mikelward/qtile | 225cca581a1ec83a89f0e9bf5ed8d5dcca723750 | [
"MIT"
] | null | null | null | libqtile/group.py | mikelward/qtile | 225cca581a1ec83a89f0e9bf5ed8d5dcca723750 | [
"MIT"
] | 1 | 2020-04-27T22:20:11.000Z | 2020-04-27T22:20:11.000Z | # Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2013 xarvh
# Copyright (c) 2013 roger
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2014 ramnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 dequis
# Copyright (c) 2015 Dario Giovannetti
# Copyright (c) 2015 Alexander Lozovskoy
#
# Permission is hereby g... | 35.533066 | 92 | 0.5844 |
94382728368bf753eb74deedee8f3ad4830d6aab | 4,281 | py | Python | barbican_ui/api/client.py | kleberrangel/barbican-ui | 8ff179777c863113133c7f2eadfd3e28ed5d2f36 | [
"Apache-2.0"
] | null | null | null | barbican_ui/api/client.py | kleberrangel/barbican-ui | 8ff179777c863113133c7f2eadfd3e28ed5d2f36 | [
"Apache-2.0"
] | null | null | null | barbican_ui/api/client.py | kleberrangel/barbican-ui | 8ff179777c863113133c7f2eadfd3e28ed5d2f36 | [
"Apache-2.0"
] | null | null | null | # 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, software
# d... | 24.889535 | 78 | 0.66036 |
841aa4fde5e2aa2004aba5707c39a946b8e22824 | 3,148 | py | Python | central_service/environment/experiences/core/generate_topo.py | netmsys/mpquic-rl | f9f9ce7a199c359baf0d5cdee063fbd5186f82c5 | [
"MIT"
] | 1 | 2020-04-30T19:20:01.000Z | 2020-04-30T19:20:01.000Z | central_service/evaluation/vanilla_testing/experiences/core/generate_topo.py | netmsys/mpquic-rl | f9f9ce7a199c359baf0d5cdee063fbd5186f82c5 | [
"MIT"
] | null | null | null | central_service/evaluation/vanilla_testing/experiences/core/generate_topo.py | netmsys/mpquic-rl | f9f9ce7a199c359baf0d5cdee063fbd5186f82c5 | [
"MIT"
] | null | null | null | # from __future__ import print_function
import math
LEFT_SUBNET = "leftSubnet"
RIGHT_SUBNET = "rightSubnet"
TOPO_TYPE = "topoType"
PATHS = "paths"
NETEM = "netem"
DEFAULT_LEFT_SUBNET = "10.0."
DEFAULT_RIGHT_SUBNET = "10.1."
DEFAULT_TOPO_TYPE = "MultiIf"
DEFAULT_PATHS = [{}, {}]
DEFAULT_NETEM = []
""" Path info """
... | 35.370787 | 157 | 0.665502 |
1712b77dff3b4a3aea1cfde12ac1201c14ec1061 | 237 | py | Python | Integer&FloatNumbers/7mathModuleTrigValue.py | palakbaphna/pyprac | 992770d5aed73c632a69b4bb22f471f35d083ee5 | [
"Apache-2.0"
] | null | null | null | Integer&FloatNumbers/7mathModuleTrigValue.py | palakbaphna/pyprac | 992770d5aed73c632a69b4bb22f471f35d083ee5 | [
"Apache-2.0"
] | null | null | null | Integer&FloatNumbers/7mathModuleTrigValue.py | palakbaphna/pyprac | 992770d5aed73c632a69b4bb22f471f35d083ee5 | [
"Apache-2.0"
] | null | null | null | # find the sin cos and tan value of the given value
from math import sin, cos, tan
x = float(input("x= ?"))
y = sin(x)
print("sin(%f) = %f" %(x, y))
z = cos(x)
print("Cos(%f) = %f" %(x,z))
a = tan(x)
print("tan(%f) = %f" %(x, a))
| 13.941176 | 51 | 0.527426 |
fd242cd767146294ff7706192edf6c510a12bacd | 1,677 | py | Python | datastoreUtil.py | prabhatks12/WebRTC_Flask | ebbb863628b9c1bc6998bd628386ee786d1b22b2 | [
"MIT"
] | 2 | 2019-11-19T13:29:04.000Z | 2019-12-14T18:57:46.000Z | datastoreUtil.py | prabhatks12/WebRTC_Flask | ebbb863628b9c1bc6998bd628386ee786d1b22b2 | [
"MIT"
] | 1 | 2021-07-02T17:22:20.000Z | 2021-07-02T17:22:20.000Z | datastoreUtil.py | prabhatks12/WebRTC_Flask | ebbb863628b9c1bc6998bd628386ee786d1b22b2 | [
"MIT"
] | null | null | null | from google.cloud import datastore
import pandas as pd
import numpy as np
import json
import os
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "add your json file path"
datastore_client = datastore.Client()
def uniqueDetail(user_name, user_email):
query = datastore_client.query(kind='user')
all_data = query.... | 25.8 | 73 | 0.624329 |
419642737581cc7f053d78c59d139613f3b6ac7e | 698 | py | Python | Scripts/SampleQ/BstConstruction/test_bstConstruction.py | hnava47/PythonDevelopment | f5a715fdca1dd3ab8dddbf918dcae987128af10b | [
"CNRI-Python"
] | null | null | null | Scripts/SampleQ/BstConstruction/test_bstConstruction.py | hnava47/PythonDevelopment | f5a715fdca1dd3ab8dddbf918dcae987128af10b | [
"CNRI-Python"
] | null | null | null | Scripts/SampleQ/BstConstruction/test_bstConstruction.py | hnava47/PythonDevelopment | f5a715fdca1dd3ab8dddbf918dcae987128af10b | [
"CNRI-Python"
] | null | null | null | import bstConstruction as bsc
import unittest as ut
BST = bsc.BST
class TestBst(ut.TestCase):
def test_case_one(self):
root = BST(10)
root.left = BST(5)
root.left.left = BST(2)
root.left.left.left = BST(1)
root.left.right = BST(5)
root.right = BST(15)
root.r... | 24.068966 | 57 | 0.591691 |
2edec9420234b966d0b1525d4df03500058f31d2 | 2,003 | py | Python | emission/net/usercache/formatters/android/motion_activity.py | trevor-wu/e-mission-server | 2e31986bd7c0faab7110b7eb69541b0b9eac62df | [
"BSD-3-Clause"
] | 1 | 2020-05-28T08:06:41.000Z | 2020-05-28T08:06:41.000Z | emission/net/usercache/formatters/android/motion_activity.py | trevor-wu/e-mission-server | 2e31986bd7c0faab7110b7eb69541b0b9eac62df | [
"BSD-3-Clause"
] | 21 | 2018-12-19T07:09:45.000Z | 2021-12-13T20:07:36.000Z | emission/net/usercache/formatters/android/motion_activity.py | trevor-wu/e-mission-server | 2e31986bd7c0faab7110b7eb69541b0b9eac62df | [
"BSD-3-Clause"
] | 2 | 2019-05-02T16:20:14.000Z | 2019-05-02T17:33:42.000Z | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import *
import logging
import emission.core.wrapper.motionactivity as ecwa
import em... | 32.836066 | 69 | 0.710934 |
d76498f34711f5f376333fe66a131d2c67589cc2 | 647 | py | Python | setup.py | GarryGaller/pipext | 6de71ddbd6dc7f1c8672eaefdbb7ca3e8db11389 | [
"MIT"
] | null | null | null | setup.py | GarryGaller/pipext | 6de71ddbd6dc7f1c8672eaefdbb7ca3e8db11389 | [
"MIT"
] | null | null | null | setup.py | GarryGaller/pipext | 6de71ddbd6dc7f1c8672eaefdbb7ca3e8db11389 | [
"MIT"
] | null | null | null | from setuptools import setup
import pipext
import sys
ver = sys.version_info
ver = '.'.join(map(str,[ver.major,ver.minor]))
setup(name = 'pipext',
version = pipext.__version__,
description = 'Expanding the functionality of pip',
long_description = open("README.rst").read(),
author = 'Garry Gal... | 30.809524 | 100 | 0.633694 |
f6aceffa280aa47aeb905d78465e01a879bf65ad | 269 | py | Python | common/moudle/waf_plugins/f5bigipltm.py | ziizhuwy/cify | 627ae74f6a27d803521df213e8644366dbba183f | [
"Apache-2.0"
] | 8 | 2018-10-11T16:05:14.000Z | 2020-12-30T08:21:15.000Z | common/moudle/waf_plugins/f5bigipltm.py | keven1z/cify | 627ae74f6a27d803521df213e8644366dbba183f | [
"Apache-2.0"
] | 1 | 2020-04-22T03:36:59.000Z | 2020-06-11T06:42:42.000Z | common/moudle/waf_plugins/f5bigipltm.py | ziizhuwy/cify | 627ae74f6a27d803521df213e8644366dbba183f | [
"Apache-2.0"
] | 4 | 2019-07-10T06:51:45.000Z | 2020-04-19T09:52:09.000Z | #!/usr/bin/env python
NAME = 'F5 BIG-IP LTM'
def is_waf(self):
detected = False
if self.match_cookie('^BIGipServer'):
return True
elif self.match_header(('X-Cnection', '^close$'), attack=True):
return True
else:
return False
| 17.933333 | 67 | 0.605948 |
7336e04b91db506e9a62269933dc9e969d5ed99e | 2,786 | py | Python | fundingrate/binance_funding_rate.py | jironghuang/fundingrate | f8cb048d9b752d8e9d8cc363f47870d1f6102dad | [
"MIT"
] | 7 | 2021-11-01T03:14:04.000Z | 2022-02-08T13:22:47.000Z | fundingrate/binance_funding_rate.py | jironghuang/fundingrate | f8cb048d9b752d8e9d8cc363f47870d1f6102dad | [
"MIT"
] | null | null | null | fundingrate/binance_funding_rate.py | jironghuang/fundingrate | f8cb048d9b752d8e9d8cc363f47870d1f6102dad | [
"MIT"
] | 2 | 2021-11-08T01:20:35.000Z | 2022-01-17T05:08:39.000Z | import requests
import pandas as pd
import datetime
class funding_binance(object):
# constructor
def __init__(self, ticker_list):
self.ticker_list = ticker_list
column_names = ["symbol", "fundingTime", "fundingRate"]
funding... | 42.212121 | 138 | 0.637473 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.