repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
javiercantero/streamlink | src/streamlink/plugins/tv5monde.py | 1 | 2401 | import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import http, validate
from streamlink.stream import HLSStream, HTTPStream, RTMPStream
from streamlink.utils import parse_json
from streamlink.plugins.common_jwplayer import _js_to_json
class TV5Monde(Plugin):
_url_re = re.compile(r'http://... | bsd-2-clause | -9,086,185,595,071,028,000 | 29.782051 | 90 | 0.540608 | false |
Shinichi-Nakagawa/xp2015_baseball_tools | service/storage.py | 1 | 1676 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Shinichi Nakagawa'
from configparser import ConfigParser
from boto3.session import Session
import glob
import os
class Storage(object):
def __init__(self, config_file):
"""
init
:param config_file: Application config file
... | mit | 4,140,903,514,542,236,700 | 33.204082 | 113 | 0.575179 | false |
techjacker/sitemapgenerator | sitemapgenerator/crawler.py | 1 | 3955 | import re
import requests
from bs4 import BeautifulSoup
from time import sleep
from random import randint
from numbers import Number
import functools
def handle_requests_failures(func):
'''
This decorator handles request.excptions
'''
@functools.wraps(func)
def wrapper(self, *args, **kw):
... | mit | 4,129,940,450,796,477,400 | 30.64 | 79 | 0.566877 | false |
qunying/gps | share/support/core/vcs/mercurial.py | 1 | 2725 | """
Mercurial CVS support plugin
Provides support for the Mercurial configuration management system.
It integrates into GPS's VCS support, and uses the same menus
as all other VCS systems supported by GPS.
You can easily edit this file if you would like to customize
the mercurial commands that are sent for each of th... | gpl-3.0 | -4,390,281,981,889,278,500 | 31.058824 | 77 | 0.604771 | false |
troych/PlexKodiConnect | contextmenu.py | 1 | 1380 | # -*- coding: utf-8 -*-
###############################################################################
import logging
import os
import sys
import xbmc
import xbmcaddon
###############################################################################
_addon = xbmcaddon.Addon(id='plugin.video.plexkodiconnect')
try:
... | gpl-2.0 | 6,899,344,392,238,884,000 | 25.538462 | 79 | 0.454348 | false |
danielhkl/matplotlib2tikz | matplotlib2tikz/color.py | 1 | 2761 | # -*- coding: utf-8 -*-
#
import matplotlib as mpl
import numpy
def mpl_color2xcolor(data, matplotlib_color):
'''Translates a matplotlib color specification into a proper LaTeX xcolor.
'''
# Convert it to RGBA.
my_col = numpy.array(mpl.colors.ColorConverter().to_rgba(matplotlib_color))
# If the a... | mit | 2,779,563,172,198,260,700 | 36.310811 | 79 | 0.560666 | false |
open2c/cooltools | cooltools/cli/dump_cworld.py | 1 | 2380 | import click
from . import cli
from .. import io
@cli.command()
@click.argument(
"cool_paths",
metavar="COOL_PATHS",
type=str,
nargs=-1
)
@click.argument(
"out_path",
metavar="OUT_PATH",
type=click.Path(exists=False, writable=True),
nargs=1,
)
@click.option(
"--cworld-type",
he... | mit | 28,392,404,168,664,796 | 30.733333 | 90 | 0.611765 | false |
eResearchSA/reporting-unified | unified/models/hnas.py | 1 | 9940 | from sqlalchemy.sql import func
from . import db, id_column, to_dict, SnapshotMothods
class Owner(db.Model):
"""Storage Account/Owner"""
id = id_column()
name = db.Column(db.String(64), unique=True, nullable=False)
virtual_volume_usage = db.relationship("VirtualVolumeUsage",
... | apache-2.0 | -236,425,678,749,025,100 | 37.527132 | 97 | 0.547485 | false |
pjamesjoyce/lcopt | lcopt/interact.py | 1 | 48802 | from flask import Flask, request, render_template, redirect, send_file
import webbrowser
import json
from ast import literal_eval
from lcopt.io import exchange_factory
from collections import OrderedDict
from itertools import groupby
import xlsxwriter
from io import BytesIO
import os
from lcopt.bw2_export import Bw2Ex... | bsd-3-clause | 9,004,957,291,227,467,000 | 40.498299 | 243 | 0.546863 | false |
HybridF5/jacket | jacket/tests/compute/unit/virt/ironic/test_patcher.py | 1 | 5947 | # Copyright 2014 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | 6,840,993,694,003,473,000 | 44.746154 | 78 | 0.591222 | false |
vanessajurtz/lasagne4bio | secondary_proteins_prediction/predict.py | 1 | 2125 | import sys
import numpy as np
import importlib
import lasagne as nn
import theano
from theano import tensor as T
import os
import glob
import data
import utils
if not (2 <= len(sys.argv) <= 3):
sys.exit("Usage: python predict.py <metadata_path> [subset=test]")
sym_y = T.imatrix('target_output')
sym_x = T.tensor3... | gpl-3.0 | 356,573,002,627,405,200 | 23.709302 | 140 | 0.653647 | false |
wwmm/wwplot | WWplot/fit.py | 1 | 1679 | # -*- coding: utf-8 -*-
import scipy.odr
from numpy import *
from PySide2.QtCore import QObject, Signal
class Fit(QObject):
finished = Signal()
def __init__(self, maxit=1000):
QObject.__init__(self)
self.maxit = maxit
self.ready = False
self.x, self.xerr = [], []
se... | gpl-3.0 | 5,255,284,062,352,769,000 | 22.985714 | 95 | 0.54735 | false |
toast38coza/DJProcess | process/tasks/google_natural_language/test_extract_sentiment.py | 1 | 1090 | from google.cloud import language
client = language.Client()
import csv
def get_sentiment(message):
doc = client.document_from_text(message)
f_in = open('/Users/toast38coza/Downloads/verbatims.csv', 'rb')
f_out = open('/Users/toast38coza/Downloads/verbatims-new.csv', 'wb')
reader = csv.reader(f_in)
writer = csv.w... | mit | -7,063,101,933,839,828,000 | 27.684211 | 99 | 0.637615 | false |
mystic123/DeepLearning | Basics/optimizers.py | 1 | 7742 | import numpy as np
class Optimizer:
"""
Optimizer class
"""
def __init__(self, net, cost, learning_rate, *args, **kwargs):
self.net = net
self.cost = cost
self.learning_rate = learning_rate
def compute_gradients(self, batch, y, *args, **kwargs):
zs, as_ = self.net... | mit | 7,283,492,937,311,258,000 | 31.393305 | 112 | 0.580728 | false |
Miserlou/OpenWatch | openwatch/settings.py | 1 | 4279 | import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
BASE_URL = 'http://www.openwatch.net'
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
... | apache-2.0 | 7,432,822,318,124,921,000 | 31.416667 | 122 | 0.707175 | false |
krattai/noo-ebs | docs/zeroMQ-guide2/examples/Python/ticlient.py | 1 | 1692 | """
Titanic client example
Implements client side of http:rfc.zeromq.org/spec:9
Author : Min RK <benjaminrk@gmail.com>
"""
import sys
import time
from mdcliapi import MajorDomoClient
def service_call (session, service, request):
"""Calls a TSP service
Returns reponse if successful (status code 200 OK),... | bsd-2-clause | 7,430,159,579,871,229,000 | 24.651515 | 68 | 0.560284 | false |
kamailio/kamcli | kamcli/commands/cmd_uacreg.py | 1 | 6162 | import click
from sqlalchemy import create_engine
from kamcli.ioutils import ioutils_dbres_print
from kamcli.cli import pass_context
from kamcli.iorpc import command_ctl
@click.group(
"uacreg",
help="Manage uac remote registrations",
short_help="Manage uac registrations",
)
@pass_context
def cli(ctx):
... | gpl-2.0 | -7,870,042,269,228,062,000 | 28.342857 | 79 | 0.595099 | false |
Jonadabe/letsencrypt | letsencrypt/achallenges.py | 1 | 2725 | """Client annotated ACME challenges.
Please use names such as ``achall`` to distiguish from variables "of type"
:class:`acme.challenges.Challenge` (denoted by ``chall``)
and :class:`.ChallengeBody` (denoted by ``challb``)::
from acme import challenges
from acme import messages
from letsencrypt import achallenge... | apache-2.0 | 8,463,762,847,026,909,000 | 28.619565 | 80 | 0.681835 | false |
edx/i18n-tools | tests/test_changed.py | 1 | 2745 | from os import remove
from shutil import copyfile
import ddt
from unittest import mock
from i18n.changed import Changed
from . import I18nToolTestCase, MOCK_APPLICATION_DIR
@ddt.ddt
class TestChanged(I18nToolTestCase):
"""
Tests functionality of i18n/changed.py
"""
def setUp(self):
super().s... | apache-2.0 | 2,824,621,743,089,920,000 | 35.118421 | 113 | 0.621858 | false |
gcasey/cosmotrack | scripts/configParsers.py | 1 | 4387 | ################################################################################
#
# Copyright 2013 Kitware, 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... | apache-2.0 | 5,939,486,349,299,386,000 | 27.303226 | 98 | 0.565079 | false |
letouriste001/SmartForest_2.0 | python3.4Smartforest/lib/python3.4/site-packages/django/utils/translation/trans_null.py | 1 | 1408 | # These are versions of the functions in django.utils.translation.trans_real
# that don't actually do anything. This is purely for performance, so that
# settings.USE_I18N = False can use this module rather than trans_real.py.
from django.conf import settings
from django.utils.encoding import force_text
def ngettext... | mit | -7,491,722,357,305,650,000 | 23.701754 | 77 | 0.721591 | false |
ProjectQ-Framework/ProjectQ | projectq/setups/decompositions/h2rx.py | 1 | 2023 | # -*- coding: utf-8 -*-
# Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# 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
#
# ... | apache-2.0 | -7,079,851,581,845,540,000 | 33.87931 | 76 | 0.69303 | false |
montyly/manticore | manticore/native/state.py | 1 | 2684 | from ..core.state import StateBase, Concretize, TerminateState
from ..native.memory import ConcretizeMemory, MemoryException
class State(StateBase):
@property
def cpu(self):
"""
Current cpu state
"""
return self._platform.current
@property
def mem(self):
"""
... | apache-2.0 | -261,491,013,077,682,460 | 35.27027 | 107 | 0.643443 | false |
houshengbo/nova_vmware_compute_driver | nova/tests/matchers.py | 1 | 14525 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not ... | apache-2.0 | -1,041,197,624,686,391,300 | 32.08656 | 78 | 0.553253 | false |
VerifiableRobotics/controller-arena | src/controllerarena/controllers/refVec.py | 1 | 4049 | # code for python reference dipole vector field controller
# these functions require stuff
#from mathFuns import *
from numpy import *
from math import *
class refVec:
# define the constructor
def __init__(self, q_0, controller_flag):
# Initialize controller state
self.phi_prev = None
sel... | bsd-3-clause | -3,581,265,295,090,304,000 | 33.606838 | 147 | 0.535935 | false |
tensorflow/datasets | tensorflow_datasets/summarization/newsroom.py | 1 | 4417 | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | apache-2.0 | 6,486,932,188,809,753,000 | 31.007246 | 91 | 0.655649 | false |
acsis-project/emissions | emissions/python/periodic_1960/regrid_OC_biomass_emissions_n96e_360d_1960.py | 1 | 7191 | #!/usr/bin/env python
##############################################################################################
#
#
# regrid_emissions_N96e.py
#
#
# Requirements:
# Iris 1.10, cf_units, numpy
#
#
# This Python script has been written by N.L. Abraham as part of the UKCA Tutorials:
# http://www.ukca.ac.uk/wiki... | gpl-3.0 | 508,121,574,114,016,400 | 41.550296 | 134 | 0.715339 | false |
Azure/azure-sdk-for-python | sdk/servicebus/azure-servicebus/tests/livetest/test_errors.py | 1 | 1336 | import logging
from uamqp import errors as AMQPErrors, constants as AMQPConstants
from azure.servicebus.exceptions import (
_create_servicebus_exception,
ServiceBusConnectionError,
ServiceBusError
)
def test_link_idle_timeout():
logger = logging.getLogger("testlogger")
amqp_error = AMQPErrors.Lin... | mit | 5,185,030,741,937,892,000 | 39.484848 | 167 | 0.776946 | false |
codywilbourn/streamparse | streamparse/run.py | 1 | 1924 | """
Helper script for starting up bolts and spouts.
"""
import argparse
import importlib
import os
import sys
from pystorm.component import _SERIALIZERS
RESOURCES_PATH = 'resources'
def main():
"""main entry point for Python bolts and spouts"""
parser = argparse.ArgumentParser(description='Run a bolt/spout ... | apache-2.0 | 6,012,932,336,202,372,000 | 38.265306 | 80 | 0.539501 | false |
uni2u/neutron | neutron/db/metering/metering_db.py | 1 | 10691 | # Copyright (C) 2013 eNovance SAS <licensing@enovance.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 applicabl... | apache-2.0 | -8,351,349,277,479,719,000 | 42.283401 | 79 | 0.549341 | false |
psychopy/psychopy | psychopy/tests/test_misc/test_microphone.py | 1 | 7457 | from __future__ import division
from builtins import object
from past.utils import old_div
import pytest
import shutil, os, glob
from tempfile import mkdtemp
from os.path import abspath, dirname, join
from psychopy import microphone
from psychopy.microphone import _getFlacPath
from psychopy import core
from psychopy.... | gpl-3.0 | 2,128,300,330,127,985,700 | 32.895455 | 92 | 0.636449 | false |
Martin456/eve | eve/render.py | 1 | 15213 | # -*- coding: utf-8 -*-
"""
eve.render
~~~~~~~~~~
Implements proper, automated rendering for Eve responses.
:copyright: (c) 2017 by Nicola Iarocci.
:license: BSD, see LICENSE for more details.
"""
import re
import time
import datetime
import simplejson as json
from werkzeug import utils
from fun... | bsd-3-clause | -5,451,845,274,095,905,000 | 30.69375 | 79 | 0.602248 | false |
nwspeete-ibm/openwhisk | core/pythonAction/cli/wskrule.py | 1 | 5355 | #
# Copyright 2015-2016 IBM Corporation
#
# 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 wr... | apache-2.0 | 3,352,856,487,309,075,500 | 40.835938 | 130 | 0.620355 | false |
erudit/zenon | tests/unit/apps/public/search/test_utils.py | 1 | 3018 | import pytest
from django.http.request import QueryDict
from apps.public.search.forms import SearchForm
from apps.public.search.utils import get_search_elements
class FakeSolrData:
def get_search_form_facets(self):
return {
'disciplines': [],
'languages': [
('fr',... | gpl-3.0 | -2,187,604,127,645,334,000 | 27.638095 | 74 | 0.460925 | false |
psf/black | tests/data/cantfit.py | 1 | 4107 | # long variable name
this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 0
this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 1 # with a comment
this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
1, 2, 3... | mit | 2,691,835,164,074,515,500 | 37.383178 | 126 | 0.702703 | false |
JulyKikuAkita/PythonPrac | cs15211/SwapAdjacentinLRString.py | 1 | 5766 | __source__ = 'https://leetcode.com/problems/swap-adjacent-in-lr-string/'
# Time: O(N)
# Space: O(1)
#
# Description: Leetcode # 777. Swap Adjacent in LR String
#
# In a string composed of 'L', 'R', and 'X' characters, like "RXXLRXRXL",
# a move consists of either replacing one occurrence of "XL" with "LX",
# or replac... | apache-2.0 | 7,551,753,896,796,756,000 | 30.681319 | 109 | 0.4889 | false |
siusoon/Python_SPEEDSHOW | checkinactivity.py | 1 | 1953 | # logic: detect idle time from mac os (mouse and keyboard) and force to go to a specific website
# to run the program, administrator needs to set the sleeptime, temp_idle_value and url
# Firefox should be the default browser, hide all other applications and docking on the screen
# set no screensaver
# install fullscre... | unlicense | -1,857,018,180,525,671,700 | 31.016393 | 199 | 0.680492 | false |
almeidapaulopt/frappe | frappe/utils/boilerplate.py | 1 | 9260 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals, print_function
from six.moves import input
import frappe, os, re
from frappe.utils import touch_file, encode, cstr
def make_boilerplate(dest, app_name):
if not os.path.exists... | mit | 8,096,362,969,132,424,000 | 28.303797 | 117 | 0.653888 | false |
mrakitin/coding | route_tables_update/add_route.py | 1 | 1944 | __author__ = 'mrakitin'
import os
import socket
import subprocess
address_to_route = None
qsh_ip = '192.12.90.0'
qsh_ip_mask = '255.255.255.0'
# Find IP address provided by SBU VPN:
ips_dict = {}
for i in socket.getaddrinfo(socket.gethostname(), None):
ip = i[4][0]
try:
socket.inet_aton(ip)
... | gpl-2.0 | 4,063,799,232,763,459,000 | 28.907692 | 101 | 0.609053 | false |
moio/spacewalk | backend/server/rhnServer/server_wrapper.py | 1 | 3967 | #
# Copyright (c) 2008--2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 | -8,041,331,313,070,005,000 | 35.394495 | 88 | 0.663222 | false |
SalesforceEng/Providence | Empire/cloudservices/github/GithubAPI.py | 1 | 5227 | '''
Copyright (c) 2015, Salesforce.com, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the foll... | bsd-3-clause | -3,992,668,494,168,806,400 | 44.850877 | 755 | 0.664817 | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/__init__.py | 1 | 19006 | """Authentication middleware
This module provides one piece of middleware named
``authkit.authenticate.middleware`` which is used to intercept responses with
a specified status code, present a user with a means of authenticating
themselves and handle the sign in process.
Each of the authentication methods supported... | bsd-3-clause | 4,010,506,043,394,868,000 | 37.318548 | 84 | 0.620225 | false |
noahbenson/neuropythy | neuropythy/graphics/__init__.py | 1 | 1109 | ####################################################################################################
# neuropythy/graphics/__init__.py
# Simple tools for making matplotlib/pyplot graphics with neuropythy.
# By Noah C. Benson
'''
The neuropythy.graphics package contains definitions of the various tools for making plots... | agpl-3.0 | -797,286,915,728,350,000 | 49.409091 | 100 | 0.678088 | false |
NMisko/monkalot | bot/commands/speech_cleverbot.py | 1 | 1114 | """Commands: "@[botname] XXXXX"."""
from cleverwrap import CleverWrap
from bot.commands.abstract.speech import Speech, Chatbot
class CleverbotSpeech(Speech):
"""Natural language by using cleverbot."""
def __init__(self, bot):
"""Initialize variables."""
if "cleverbot_key" in bot.config and b... | mit | 3,116,736,034,507,032,600 | 29.108108 | 79 | 0.618492 | false |
SukkoPera/audiotrans | AudioTrans/Encoder.py | 1 | 2300 | #!/usr/bin/env python
###########################################################################
# Copyright (C) 2008-2016 by SukkoPera #
# software@sukkology.net #
# ... | gpl-3.0 | -316,361,670,134,837,250 | 45.938776 | 129 | 0.508696 | false |
elena/django | tests/cache/tests.py | 9 | 104310 | # Unit tests for cache framework
# Uses whatever cache backend is set in the test settings file.
import copy
import io
import os
import pickle
import re
import shutil
import sys
import tempfile
import threading
import time
import unittest
import warnings
from pathlib import Path
from unittest import mock, skipIf
from ... | bsd-3-clause | 2,060,232,267,471,206,400 | 39.023033 | 115 | 0.620804 | false |
ingadhoc/website | payment_todopago/todopago/test/GetCredentialsTest.py | 1 | 3238 | # pylint: disable-all
# flake8: noqa
import sys
sys.path.append("..")
from todopagoconnector import TodoPagoConnector
from CredentialsData import CredentialsData
import unittest
from unittest import TestCase
if sys.version_info[0] >= 3:
from unittest.mock import patch, Mock
else:
from mock import patch, Mock, M... | agpl-3.0 | 5,073,129,623,555,999,000 | 32.040816 | 111 | 0.662446 | false |
google/autocjk | src/model.py | 1 | 14838 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 932,325,098,372,212,200 | 35.278729 | 100 | 0.612616 | false |
wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/python-graph/tests/unittests-sorting.py | 1 | 3085 | # Copyright (c) Pedro Matiello <pmatiello@gmail.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, m... | bsd-3-clause | -1,540,136,428,661,142,300 | 33.288889 | 67 | 0.628525 | false |
mahmoud/wapiti | wapiti/operations/feedback.py | 1 | 1807 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from base import QueryOperation
from params import SingleParam, StaticParam
from utils import OperationExample
#class GetFeedbackV4(QueryOperation):
# """
# This API is no longer available (on en or de wikipedia). As of
# 3/9/2013, this API do... | bsd-3-clause | -2,002,363,507,429,485,600 | 33.75 | 76 | 0.630327 | false |
irinabov/debian-qpid-python | qpid/selector.py | 2 | 6778 | #
# 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... | apache-2.0 | -213,931,680,745,974,880 | 29.949772 | 94 | 0.638241 | false |
django-inplaceedit/django-inplaceedit | inplaceeditform/settings.py | 1 | 2626 | # -*- coding: utf-8 -*-
# Copyright (c) 2010-2013 by Yaco Sistemas <goinnn@gmail.com>
# 2015 by Pablo Martín <goinnn@gmail.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundatio... | lgpl-3.0 | 6,846,049,735,984,986,000 | 60.046512 | 117 | 0.726476 | false |
kohnle-lernmodule/palama | exe/engine/idevicestore.py | 1 | 36506 | # ===========================================================================
# eXe
# Copyright 2004-2006, University of Auckland
# Copyright 2004-2008 eXe Project, http://eXeLearning.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | gpl-2.0 | -7,368,021,126,483,378,000 | 45.742638 | 116 | 0.594478 | false |
seung-lab/neuroglancer | python/neuroglancer/tool/agglomeration_split_tool.py | 1 | 29368 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import collections
import uuid
import copy
import heapq
import json
import re
import sqlite3
import logging
import os
import numpy as np
import six
import neuroglancer
debug_graph = False
verbose_merging = False
def normalize_edge((id_a,... | apache-2.0 | -3,544,483,489,328,351,700 | 35.078624 | 117 | 0.583662 | false |
kenny1352/ratemyhistory | project/server.py | 1 | 16356 | import os
import uuid
import psycopg2
import psycopg2.extras
import crypt, getpass, pwd
import time
import smtplib, json
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from datetime import date
from flask import Flask, redirect, url_for,session, render_template, jsonify, request
fro... | apache-2.0 | 4,584,796,409,708,986,000 | 32.587269 | 231 | 0.590548 | false |
josenavas/QiiTa | qiita_pet/handlers/study_handlers/sample_template.py | 1 | 18227 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | -9,172,197,313,224,403,000 | 34.80943 | 79 | 0.594009 | false |
dabrahams/zeroinstall | tests/testdownload.py | 1 | 15513 | #!/usr/bin/env python
from __future__ import with_statement
from basetest import BaseTest
import sys, tempfile, os
from StringIO import StringIO
import unittest, signal
from logging import getLogger, WARN, ERROR
from contextlib import contextmanager
sys.path.insert(0, '..')
os.environ["http_proxy"] = "localhost:8000"... | lgpl-2.1 | 3,751,625,645,233,192,400 | 33.245033 | 133 | 0.713982 | false |
venicegeo/eventkit-cloud | eventkit_cloud/core/tests/test_models.py | 1 | 5605 | # -*- coding: utf-8 -*-
from unittest.mock import patch, MagicMock
from eventkit_cloud.auth.models import OAuth
from eventkit_cloud.core.models import AttributeClass, update_all_attribute_classes_with_user, \
update_all_users_with_attribute_class, get_users_from_attribute_class, validate_user_attribute_class, \
... | bsd-3-clause | 4,534,848,612,090,168,000 | 46.905983 | 107 | 0.685816 | false |
verificarlo/verificarlo | src/tools/ci/vfc_ci_report/inspect_runs.py | 1 | 24408 | #############################################################################
# #
# This file is part of Verificarlo. #
# #
# Copyr... | gpl-3.0 | -3,457,770,372,378,908,000 | 36.602465 | 81 | 0.56585 | false |
lhfei/spark-in-action | spark-2.x/src/main/python/mllib/binary_classification_metrics_example.py | 1 | 2177 | #
# 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 n... | apache-2.0 | -8,696,846,894,260,542,000 | 36.875 | 92 | 0.725769 | false |
UITools/saleor | tests/dashboard/test_staff.py | 1 | 7623 | from django.contrib.auth.tokens import default_token_generator
from django.core import mail
from django.templatetags.static import static
from django.urls import reverse
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
from templated_email import send_templated_mail
fro... | bsd-3-clause | 4,133,092,150,845,388,000 | 36.737624 | 77 | 0.681228 | false |
linkhub-sdk/popbill.fax.example.py | getFaxResult.py | 1 | 2664 | # -*- coding: utf-8 -*-
# code for console Encoding difference. Dont' mind on it
import sys
import imp
imp.reload(sys)
try:
sys.setdefaultencoding('UTF8')
except Exception as E:
pass
import testValue
from popbill import FaxService, PopbillException
faxService = FaxService(testValue.LinkID, testValue.SecretK... | mit | 2,274,178,893,654,013,200 | 36.737705 | 82 | 0.617289 | false |
coleifer/scout | scout/validator.py | 1 | 2599 | import json
import sys
from flask import request
from scout.constants import PROTECTED_KEYS
from scout.exceptions import error
from scout.models import Index
if sys.version_info[0] == 2:
json_load = lambda d: json.loads(d)
else:
json_load = lambda d: json.loads(d.decode('utf-8') if isinstance(d, bytes)
... | mit | 5,230,470,322,012,655,000 | 30.313253 | 78 | 0.569065 | false |
ov1d1u/tv-maxe-ng | tv-maxe/tvmaxe.py | 1 | 3058 | #!/usr/bin/env python3
import sys
import os
import logger
import logging
import argparse
from os.path import isfile, join, splitext
from importlib import import_module
from PyQt5 import QtCore, QtWidgets, uic
from PyQt5.QtGui import QIcon, QPixmap
from settingsmanager import SettingsManager
from mainwindow import TVMa... | lgpl-3.0 | 2,025,557,249,018,245,600 | 32.615385 | 99 | 0.611511 | false |
projecthamster/experiments | pulse.py | 1 | 3779 | #!/usr/bin/env python
# - coding: utf-8 -
# Copyright (C) 2010 Toms Bauģis <toms.baugis at gmail.com>
"""
Demo of a a timer based ripple running through nodes and initiating
sub-animations. Not sure where this could come handy.
"""
from gi.repository import Gtk as gtk
from lib import graphics
from lib.pytwee... | mit | 8,402,965,764,535,398,000 | 31.568966 | 108 | 0.543409 | false |
RianFuro/vint | test/unit/vint/linting/test_cli.py | 1 | 1647 | import unittest
from vint.compat.unittest import mock
from vint.linting.cli import CLI
from vint.bootstrap import import_all_policies
class TestCLI(unittest.TestCase):
@classmethod
def setUpClass(cls):
# For test_start_with_invalid_file_path.
# The test case want to load saveral policies.
... | mit | 7,550,699,786,045,907,000 | 26.45 | 91 | 0.625987 | false |
Linutronix/elbe | elbepack/debianize/panels/kernel.py | 1 | 3110 | # ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2016-2017 John Ogness <john.ogness@linutronix.de>
# Copyright (c) 2016-2017 Manuel Traut <manut@linutronix.de>
# Copyright (c) 2017 Torben Hohn <torben.hohn@linutronix.de>
# Copyright (c) 2019 Olivier Dion <dion@linutronix.de>
#
# SPDX-License-Identi... | gpl-3.0 | -3,399,240,221,416,125,000 | 32.804348 | 84 | 0.587781 | false |
jameinel/juju | acceptancetests/assess_cloud_display.py | 1 | 4632 | #!/usr/bin/env python
from __future__ import print_function
import os
from argparse import ArgumentParser
from contextlib import contextmanager
from copy import deepcopy
from difflib import ndiff
from pprint import pformat
import sys
import yaml
from jujupy import client_from_config
from utility import (
add_ar... | agpl-3.0 | 991,493,918,524,038,700 | 31.391608 | 108 | 0.643351 | false |
yephper/django | django/bin/roub/home/migrations/0007_auto_20160414_1100.py | 1 | 2138 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-04-14 03:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0006_auto_20160414_1055'),
]
operations = [
migrations.CreateModel(
... | bsd-3-clause | -564,066,498,514,451,000 | 49.5 | 114 | 0.588119 | false |
cechrist/cardoon | cardoon/devices/autoThermal.py | 1 | 6405 | """
Generates an electrothermal device from a nonlinear device class
One assumption is that the base class defines numTerms directly in the
class definition and it is not changed in process_params().
-------------------------------------------------------------------
Copyright Carlos Christoffersen <c.christoffersen@... | gpl-3.0 | -7,248,309,319,612,847,000 | 37.353293 | 80 | 0.560812 | false |
pylonsoflight/kea | interfaces/rectangular/rectangular.py | 1 | 30689 | # rectangular
# Created by Rains Jordan
# Last updated 12/4/14
#
# Non-standard shortcuts:
# Ctrl+Home, Ctrl+End: Move to start/end of playlist column view, if the window size is
# too small.
#
# Notes:
# This is a simple demonstration of a sample kea interface, using a standard windowed interface
# with a track ... | gpl-3.0 | -4,665,944,476,377,647,000 | 40.641791 | 273 | 0.733064 | false |
jesuscript/topo-mpi | topo/sheet/lissom.py | 1 | 18697 | """
LISSOM and related sheet classes.
$Id$
"""
__version__='$Revision$'
from numpy import zeros,ones
import copy
import param
import topo
from topo.base.projection import Projection
from topo.base.sheet import activity_type
from topo.base.simulation import EPConnectionEvent
from topo.transferfn.basic import Piecew... | bsd-3-clause | 2,643,544,422,502,129,000 | 42.080645 | 156 | 0.643686 | false |
jffifa/kyotogang-toolset | kotori/gconf.py | 1 | 3723 | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
import sys
import os
import urlparse
import urllib
class GConf:
"""global configuration
"""
GROUP_ID = '10079277'
# encodings
SHELL_ENCODING = sys.stdout.encoding
INTERNAL_ENCODING = 'utf_8'
# debug mode
DEBUG = False
# global d... | mit | 5,599,428,392,297,824,000 | 25.978261 | 120 | 0.551974 | false |
internap/almanach | tests/api/test_api_authentication.py | 1 | 1252 | # Copyright 2016 Internap.
#
# 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... | apache-2.0 | -9,071,383,592,736,127,000 | 36.939394 | 95 | 0.676518 | false |
sjl767/woo | scripts/test-OLD/clump-hopper-viscoelastic.py | 1 | 3251 | # -*- coding: utf-8
from woo import utils,pack,export,qt
import gts,os,random,itertools
from numpy import *
import woo.log
#woo.log.setLevel('NewtonIntegrator',woo.log.TRACE)
# Parameters
tc=0.001# collision time
en=.3 # normal restitution coefficient
es=.3 # tangential restitution coefficient
frictionAngle=radi... | gpl-2.0 | 8,081,068,913,472,389,000 | 41.776316 | 168 | 0.725008 | false |
iesugrace/book-reader | lib/noter.py | 1 | 3267 | from record import Record
from recorder import Recorder
from timeutils import isotime
import time
import interact
import os
class Noter(Recorder):
def __init__(self, db_path, book_name):
Recorder.__init__(self, db_path)
self.book_name = book_name
def make_makers(self):
makers = []
... | gpl-2.0 | -4,272,964,902,325,736,400 | 32.680412 | 75 | 0.565657 | false |
taion/flask-jsonapiview | setup.py | 1 | 1714 | from setuptools import setup
EXTRAS_REQUIRE = {
"docs": ("sphinx", "pallets-sphinx-themes"),
"jwt": ("PyJWT>=1.4.0", "cryptography>=2.0.0"),
"tests": ("coverage", "psycopg2-binary", "pytest"),
}
EXTRAS_REQUIRE["dev"] = (
EXTRAS_REQUIRE["docs"] + EXTRAS_REQUIRE["tests"] + ("tox",)
)
setup(
name="Fl... | mit | 8,034,599,104,357,237,000 | 31.961538 | 71 | 0.572929 | false |
Ivehui/DQN | dqn.py | 1 | 2248 | '''
@author Ivehui
@time 2016/06/05
@function: reinforcement agent
'''
import random
import caffe
import parameters as pms
import numpy as np
class DqnAgent(object):
def __init__(self, action_space, model=pms.newModel):
self.action_space = action_space
actionSolver = None
actionSolver = ca... | mit | -2,411,459,686,163,328,000 | 37.758621 | 84 | 0.566726 | false |
giordi91/python_misc | widgets/plotWidget/colorWidget.py | 1 | 11019 |
from PySide import QtGui , QtCore
import math
#this is just a color picker
class ColorWidget(QtGui.QWidget):
colorChangedSignal = QtCore.Signal(int , int ,int)
def __init__(self, parent = None , color = [255,0,0]):
QtGui.QWidget.__init__(self,parent)
self.width ... | mit | -1,275,120,345,756,301,000 | 41.544402 | 89 | 0.631909 | false |
MTgeophysics/mtpy | mtpy/uofa/bayesian1d.py | 1 | 2557 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 31.07.2013
@author: LK@UofA
mtpy/uofa/bayesian1d.py
Module for handling the UofA Bayesian 1D inversion/modelling code.
"""
import os
import sys
import os.path as op
import mtpy.utils.filehandling as MTfh
import mtpy.core.edi as EDI
import mtpy.utils.exce... | gpl-3.0 | 8,232,908,212,395,492,000 | 27.098901 | 99 | 0.539304 | false |
steveblamey/nautilus-archive | setup.py | 1 | 1285 | #!/usr/bin/env python
# coding: utf-8
from os import path
from distutils.core import setup
PROJECT_DIR = path.dirname(__file__)
extension = [
('/usr/share/nautilus-python/extensions',
[path.join(PROJECT_DIR, 'extension', 'nautilus-archive.py')]),
('/usr/share/icons/hicolor/48x48/emblems',
[path.joi... | gpl-3.0 | -5,443,317,509,589,844,000 | 31.948718 | 79 | 0.632685 | false |
zachjanicki/osf.io | api/base/urls.py | 1 | 1810 | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.views.generic.base import RedirectView
from settings import API_BASE
from . import views
base_pattern = '^{}'.format(API_BASE)
urlpatterns = [
url(base_pattern,
include(
... | apache-2.0 | -8,062,880,710,388,205,000 | 45.410256 | 102 | 0.59779 | false |
srmagura/potential | ps/grid.py | 1 | 8094 | import numpy as np
from ps.extend import EType
class PsGrid:
# FIXME old way is deprecated
'''def ps_construct_grids(self, scheme_order):
self.construct_grids(scheme_order)
R = self.R # remove eventually?
a = self.a
self.all_Mplus = {0: set(), 1: set(), 2: set()}
self... | gpl-3.0 | -3,562,702,645,237,333,000 | 29.659091 | 88 | 0.407833 | false |
a358003542/expython | expython/pattern/__init__.py | 1 | 1439 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import UserList
import logging
logger = logging.getLogger(__name__)
class CycleList(UserList):
"""
一个无限循环输出元素的可迭代对象,如果是on-fly模式
(主要指for循环中的删除动作)推荐使用 `remove_item` 方法
"""
def __init__(self, data):
super().__init... | mit | 2,960,627,695,356,223,500 | 20.089286 | 44 | 0.497166 | false |
p4lang/p4app | docker/scripts/mininet/p4_mininet.py | 1 | 5757 | # Copyright 2013-present Barefoot Networks, 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 agre... | apache-2.0 | 1,125,914,588,463,093,400 | 35.436709 | 92 | 0.57061 | false |
iaz3/ModReader | modreader/game/__init__.py | 1 | 1209 | # !/usr/bin/env python3
"""
Game Support Modules should be located in this package
Names should be all lowercase, unique, and code should follow the template,
The template represents the bare miniumum API you are required to conform to.
You are allowed to add new files and extend it.
"""
# ====================== GPL ... | gpl-3.0 | 4,860,691,471,080,183,000 | 38 | 80 | 0.679074 | false |
zhanglab/psamm | psamm/gapfill.py | 1 | 11063 | # This file is part of PSAMM.
#
# PSAMM is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PSAMM is distributed in the hope that it wi... | gpl-3.0 | 1,452,733,391,583,776,800 | 39.375912 | 79 | 0.657417 | false |
notapresent/rtrss | tests/test_localdirectory_storage.py | 1 | 2009 | import unittest
from testfixtures import TempDirectory
from tests import random_key
from rtrss.storage.localdirectory import LocalDirectoryStorage, mkdir_p
class LocalDirectoryStorageTestCase(unittest.TestCase):
test_key = 'some random key'
test_value = 'some random value'
def setUp(self):
self... | apache-2.0 | 1,940,752,862,690,465,300 | 30.888889 | 76 | 0.652066 | false |
novafloss/ci-formula | _states/jenkins_job.py | 1 | 1441 | # -*- coding: utf-8 -*-
import os
def _recreate_job_check(old, new):
old_cls = old.splitlines()[-1]
new_cls = new.splitlines()[-1]
return old_cls != new_cls
def present(name, source, template=None, context=None):
update_or_create_xml = __salt__['jenkins.update_or_create_xml'] # noqa
get_file_s... | mit | 5,004,029,649,107,946,000 | 23.844828 | 75 | 0.530881 | false |
VU-Cog-Sci/PRF_experiment | ColorMatcherSession.py | 1 | 3743 | from __future__ import division
from psychopy import visual, core, misc, event
import numpy as np
from IPython import embed as shell
from math import *
import os, sys, time, pickle
import pygame
from pygame.locals import *
# from pygame import mixer, time
import Quest
sys.path.append( 'exp_tools' )
# sys.path.append... | mit | 2,694,495,617,494,793,700 | 40.131868 | 247 | 0.711996 | false |
jbalogh/zamboni | apps/devhub/tests/test_helpers.py | 1 | 7159 | # -*- coding: utf8 -*-
import unittest
import urllib
from django.utils import translation
from mock import Mock
from nose.tools import eq_
from pyquery import PyQuery as pq
import amo
import amo.tests
from amo.urlresolvers import reverse
from amo.tests.test_helpers import render
from addons.models import Addon
from ... | bsd-3-clause | -6,397,185,273,978,489,000 | 32.995238 | 79 | 0.557081 | false |
systers/postorius | copybump.py | 1 | 2797 | #! /usr/bin/env python3
import os
import re
import sys
import stat
import datetime
FSF = 'by the Free Software Foundation, Inc.'
this_year = datetime.date.today().year
pyre_c = re.compile(r'# Copyright \(C\) ((?P<start>\d{4})-)?(?P<end>\d{4})')
pyre_n = re.compile(r'# Copyright ((?P<start>\d{4})-)?(?P<end>\d{4})')
n... | gpl-3.0 | 5,930,184,830,484,723,000 | 28.135417 | 80 | 0.490526 | false |
pewen/ten | ten/post.py | 1 | 2525 | """
Post processing tools
"""
import os
import numpy as np
def extrac4dir(dir_path, search):
"""
Extrar the epsilon, mean free path, total time and efficienci of all file in some directory.
Parameters
----------
dir_path : str
Path to the directory with the outputs files.
search : list
... | mit | -8,547,275,649,797,289,000 | 27.681818 | 96 | 0.479398 | false |
AstroFloyd/SolTrack | Python/soltrack/riseset.py | 2 | 8500 |
"""SolTrack: a simple, free, fast and accurate C routine to compute the position of the Sun.
Copyright (c) 2014-2020 Marc van der Sluys, Paul van Kan and Jurgen Reintjes,
Sustainable Energy research group, HAN University of applied sciences, Arnhem, The Netherlands
This file is part of the SolTrack packa... | lgpl-3.0 | 6,757,125,456,409,840,000 | 42.814433 | 173 | 0.597882 | false |
asd43/Structural-Variation | popgen/mergeBD2bed.py | 1 | 1961 | #!/usr/bin/env python3
# Copyright (c) 2017 Genome Research Ltd.
# Author: Alistair Dunham
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the Licens... | gpl-3.0 | 1,119,849,092,429,157,500 | 39.020408 | 162 | 0.684345 | false |
maltsev/LatexWebOffice | app/tests/server/views/test_document.py | 1 | 4826 | # -*- coding: utf-8 -*-
"""
* Purpose : Test der Dokument- und Projektverwaltung (app/view/documents.py)
* Creation Date : 20-11-2014
* Last Modified : Mi 26 Nov 2014 14:58:13 CET
* Author : mattis
* Coauthors : christian
* Sprintnumber : 2
* Backlog entry : -
"""
from app.common.constants import ERROR_MESSAG... | gpl-3.0 | -6,987,938,852,695,280,000 | 37.134921 | 120 | 0.619484 | false |
swayf/doit | tests/test_runner.py | 1 | 25023 | import os
from multiprocessing import Queue
import pytest
from mock import Mock
from doit.dependency import Dependency
from doit.task import Task
from doit.control import TaskDispatcher, ExecNode
from doit import runner
# sample actions
def my_print(*args):
pass
def _fail():
return False
def _error():
r... | mit | -4,764,168,194,960,022,000 | 37.378834 | 82 | 0.581785 | false |
francois-berder/PyLetMeCreate | letmecreate/click/joystick.py | 1 | 1291 | #!/usr/bin/env python3
"""Python binding of Joystick wrapper of LetMeCreate library."""
import ctypes
_LIB = ctypes.CDLL('libletmecreate_click.so')
def get_x():
"""Returns the X position of the joystick.
Note: An exception is thrown if it fails to read the X position from the
chip.
"""
pos_x = ... | bsd-3-clause | -7,252,341,453,528,857,000 | 26.468085 | 76 | 0.625871 | false |
GoogleCloudPlatform/appengine-config-transformer | yaml_conversion/lib/google/appengine/api/yaml_listener.py | 1 | 7849 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 6,397,356,658,310,916,000 | 33.884444 | 79 | 0.706842 | false |
shichao-an/leetcode-python | product_of_array_except_self/solution4.py | 1 | 1363 |
"""
Given an array of n integers where n > 1, nums, return an array output such
that output[i] is equal to the product of all the elements of nums except
nums[i].
Solve it without division and in O(n).
For example, given [1,2,3,4], return [24,12,8,6].
Follow up:
Could you solve it with constant space complexity? (N... | bsd-2-clause | -8,392,910,952,196,059,000 | 25.72549 | 76 | 0.58474 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.