text
stringlengths
0
1.05M
meta
dict
"""Arithmetics for dense recursive polynomials in ``K[x]`` or ``K[X]``. """ from __future__ import print_function, division from sympy.core.compatibility import range from sympy.polys.densebasic import ( dup_slice, dup_LC, dmp_LC, dup_degree, dmp_degree, dup_strip, dmp_strip, dmp_zero_p, dmp_zero,...
{ "repo_name": "kaushik94/sympy", "path": "sympy/polys/densearith.py", "copies": "3", "size": "33487", "license": "bsd-3-clause", "hash": 5696039334643162000, "line_mean": 17.2192600653, "line_max": 82, "alpha_frac": 0.4332427509, "autogenerated": false, "ratio": 2.6938299412758426, "config_test...
"""Arithmetics for dense recursive polynomials in ``K[x]`` or ``K[X]``. """ from __future__ import print_function, division from sympy.polys.densebasic import ( dup_slice, dup_LC, dmp_LC, dup_degree, dmp_degree, dup_normal, dup_strip, dmp_strip, dmp_zero_p, dmp_zero, dmp_one_p, dmp_one, ...
{ "repo_name": "kmacinnis/sympy", "path": "sympy/polys/densearith.py", "copies": "2", "size": "33306", "license": "bsd-3-clause", "hash": 2594390899822181000, "line_mean": 17.1603053435, "line_max": 82, "alpha_frac": 0.4335254909, "autogenerated": false, "ratio": 2.689437984496124, "config_test"...
"""Arithmetics for dense recursive polynomials in `K[x]` or `K[X]`. """ from sympy.polys.densebasic import ( dup_LC, dmp_LC, dup_degree, dmp_degree, dup_normal, dmp_normal, dup_strip, dmp_strip, dmp_zero_p, dmp_zero, dmp_one_p, dmp_one, dmp_zeros ) from sympy.polys.polyerrors import ( ...
{ "repo_name": "tarballs-are-good/sympy", "path": "sympy/polys/densearith.py", "copies": "3", "size": "19747", "license": "bsd-3-clause", "hash": -2414432543870292500, "line_mean": 19.677486911, "line_max": 74, "alpha_frac": 0.471312098, "autogenerated": false, "ratio": 2.605145118733509, "confi...
"""Arithmetics for dense recursive polynomials in ``K[x]`` or ``K[X]``. """ from sympy.polys.densebasic import ( dup_LC, dmp_LC, dup_degree, dmp_degree, dup_normal, dup_strip, dmp_strip, dmp_zero_p, dmp_zero, dmp_one_p, dmp_one, dmp_ground, dmp_zeros) from sympy.polys.polyerrors import ( ...
{ "repo_name": "srjoglekar246/sympy", "path": "sympy/polys/densearith.py", "copies": "2", "size": "37290", "license": "bsd-3-clause", "hash": 7229165384753978000, "line_mean": 18.0255102041, "line_max": 75, "alpha_frac": 0.4542236525, "autogenerated": false, "ratio": 2.748581115943097, "config_t...
"""Arithmetics for dense recursive polynomials in ``K[x]`` or ``K[X]``. """ from sympy.polys.densebasic import ( dup_LC, dup_TC, dmp_LC, dup_degree, dmp_degree, dup_normal, dmp_normal, dup_strip, dmp_strip, dmp_zero_p, dmp_zero, dmp_one_p, dmp_one, dmp_ground, dmp_zeros) from sympy.polys.p...
{ "repo_name": "pernici/sympy", "path": "sympy/polys/densearith.py", "copies": "1", "size": "36749", "license": "bsd-3-clause", "hash": 4553368240760850400, "line_mean": 18.3517640864, "line_max": 75, "alpha_frac": 0.4612642521, "autogenerated": false, "ratio": 2.7073080889936643, "config_test":...
"""Arithmetic simplification module using sympy. This module simplifies symbolic expressions using only arithmetic operators. """ # pylint: disable=unused-import,exec-used import ast import sympy from copy import deepcopy from sspam.tools import asttools def run(expr_ast, nbits): 'Apply sympy arithmetic simplif...
{ "repo_name": "quarkslab/sspam", "path": "sspam/arithm_simpl.py", "copies": "1", "size": "2082", "license": "bsd-3-clause", "hash": -2522995492833082000, "line_mean": 32.0476190476, "line_max": 76, "alpha_frac": 0.6503362152, "autogenerated": false, "ratio": 3.602076124567474, "config_test": fa...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import NullFrequencyError, OutOfBoundsDatetime, PerformanceWarning import pandas as pd from pandas import ( DataFrame, Dat...
{ "repo_name": "kushalbhola/MyStuff", "path": "Practice/PythonApplication/env/Lib/site-packages/pandas/tests/arithmetic/test_timedelta64.py", "copies": "2", "size": "76159", "license": "apache-2.0", "hash": 5948132105776181000, "line_mean": 34.6716627635, "line_max": 88, "alpha_frac": 0.5701361625, ...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import OutOfBoundsDatetime, PerformanceWarning import pandas as pd from pandas import ( DataFrame, DatetimeIndex, NaT,...
{ "repo_name": "gfyoung/pandas", "path": "pandas/tests/arithmetic/test_timedelta64.py", "copies": "2", "size": "79397", "license": "bsd-3-clause", "hash": 534541911961175800, "line_mean": 34.9587862319, "line_max": 88, "alpha_frac": 0.5778178017, "autogenerated": false, "ratio": 3.570490623735216,...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for datetime64 and datetime64tz dtypes from datetime import datetime, timedelta from itertools import product, starmap import operator import warnings import numpy as np import pytest import pytz from pandas._...
{ "repo_name": "toobaz/pandas", "path": "pandas/tests/arithmetic/test_datetime64.py", "copies": "1", "size": "96004", "license": "bsd-3-clause", "hash": -8919672283907945000, "line_mean": 35.7409108305, "line_max": 87, "alpha_frac": 0.5623828174, "autogenerated": false, "ratio": 3.6321125907990313...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for datetime64 and datetime64tz dtypes from datetime import datetime, time, timedelta from itertools import product, starmap import operator import warnings import numpy as np import pytest import pytz from pa...
{ "repo_name": "jreback/pandas", "path": "pandas/tests/arithmetic/test_datetime64.py", "copies": "1", "size": "91671", "license": "bsd-3-clause", "hash": 5792500266418371000, "line_mean": 35.3485329104, "line_max": 88, "alpha_frac": 0.559773538, "autogenerated": false, "ratio": 3.662006151879519, ...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for datetime64 and datetime64tz dtypes from datetime import ( datetime, time, timedelta, ) from itertools import ( product, starmap, ) import operator import warnings import numpy as np impo...
{ "repo_name": "datapythonista/pandas", "path": "pandas/tests/arithmetic/test_datetime64.py", "copies": "2", "size": "91274", "license": "bsd-3-clause", "hash": -4406093311762539000, "line_mean": 35.1767736821, "line_max": 88, "alpha_frac": 0.5594473782, "autogenerated": false, "ratio": 3.66768464...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for numeric dtypes from collections import abc from decimal import Decimal from itertools import combinations import operator import numpy as np import pytest import pandas as pd from pandas import Index, Seri...
{ "repo_name": "cbertinato/pandas", "path": "pandas/tests/arithmetic/test_numeric.py", "copies": "1", "size": "39542", "license": "bsd-3-clause", "hash": -4483040166672664000, "line_mean": 36.2335216573, "line_max": 79, "alpha_frac": 0.5519700572, "autogenerated": false, "ratio": 3.547322149457253...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for object dtype from decimal import Decimal import operator import numpy as np import pytest import pandas as pd from pandas import Series, Timestamp from pandas.core import ops import pandas.util.testing as ...
{ "repo_name": "kushalbhola/MyStuff", "path": "Practice/PythonApplication/env/Lib/site-packages/pandas/tests/arithmetic/test_object.py", "copies": "2", "size": "10294", "license": "apache-2.0", "hash": 1729039999091011600, "line_mean": 31.3710691824, "line_max": 85, "alpha_frac": 0.55362347, "autoge...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for object dtype import datetime from decimal import Decimal import operator import numpy as np import pytest import pandas as pd from pandas import Series, Timestamp import pandas._testing as tm from pandas.c...
{ "repo_name": "jreback/pandas", "path": "pandas/tests/arithmetic/test_object.py", "copies": "2", "size": "12144", "license": "bsd-3-clause", "hash": 4664936065137660000, "line_mean": 31.384, "line_max": 86, "alpha_frac": 0.5627470356, "autogenerated": false, "ratio": 3.6655599154844554, "config...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for Period dtype import operator import numpy as np import pytest from pandas._libs.tslibs import IncompatibleFrequency, Period, Timestamp, to_offset from pandas.errors import PerformanceWarning import pandas...
{ "repo_name": "rs2/pandas", "path": "pandas/tests/arithmetic/test_period.py", "copies": "1", "size": "56440", "license": "bsd-3-clause", "hash": 5386055590892858000, "line_mean": 35.7926988266, "line_max": 88, "alpha_frac": 0.5589475549, "autogenerated": false, "ratio": 3.4676824772671417, "con...
import struct, sys from ast import literal_eval errno = 0 def parse(expr): out = [] tokens = expr.split() for token in tokens: if token == ' ': pass elif token.isdigit(): out.append( int(token) ) elif token in ['+', '-', '*', '/', '%', '...
{ "repo_name": "philipaconrad/mini-vm", "path": "examples/arith/arithc.py", "copies": "1", "size": "2255", "license": "mit", "hash": 4979442437776330000, "line_mean": 27.2857142857, "line_max": 112, "alpha_frac": 0.4740576497, "autogenerated": false, "ratio": 3.7583333333333333, "config_test": f...
"""Aritmetika na N, s razlikom što su + i * lijevo asocirani višemjesni. Uz implicitno množenje ako desni faktor počinje zagradom (npr. 2(3+1)=8). Implementiran je i optimizator, baš kao u originalnom aritmetika_N.py.""" from vepar import * from backend import Python_eval class T(TipoviTokena): PLUS, PUTA, OTVO...
{ "repo_name": "vedgar/ip", "path": "PJ/03_ar_N_višemjesni.py", "copies": "1", "size": "3067", "license": "unlicense", "hash": -4874865134944929000, "line_mean": 28.1826923077, "line_max": 79, "alpha_frac": 0.618121911, "autogenerated": false, "ratio": 2.3637071651090342, "config_test": true, ...
"""Aritmetika u Q, s deklaracijama varijabli, statičkim (sintaksnim) tipovima, i provjerom tipova (typechecking). Podržana su tri tipa, totalno uređena s obzirom na relaciju "biti podtip": nat (N), int (Z) i rat (Q).""" from vepar import * class T(TipoviTokena): NAT, INT, RAT, DIV, MOD = 'nat', 'int', 'rat', 'd...
{ "repo_name": "vedgar/ip", "path": "PJ/18_ar_Q_statyping.py", "copies": "1", "size": "5206", "license": "unlicense", "hash": -7495866693834366000, "line_mean": 30.8159509202, "line_max": 78, "alpha_frac": 0.5769379098, "autogenerated": false, "ratio": 2.52729044834308, "config_test": false, "...
"""Aritmetika u skupu racionalnih brojeva, s detekcijom grešaka. Po uzoru na https://web.math.pmf.unizg.hr/~veky/B/IP.k2p.17-09-08.pdf.""" from vepar import * import fractions class T(TipoviTokena): PLUS, MINUS, PUTA, KROZ, JEDNAKO, OTV, ZATV, NOVIRED = '+-*/=()\n' class BROJ(Token): def izračunaj(t...
{ "repo_name": "vedgar/ip", "path": "PJ/17_aritmetika_Q.py", "copies": "1", "size": "3229", "license": "unlicense", "hash": -837983516521369300, "line_mean": 28.2935779817, "line_max": 77, "alpha_frac": 0.5606013154, "autogenerated": false, "ratio": 2.475193798449612, "config_test": false, "ha...
"""Aritmética con curvas elípticas. Este módulo permite operar con el grupo de puntos de una curva elíptica. Para utilizar las funciones y las clases de este módulo, debe importarlo previamente: :: # reemplace ... por la función/clase que desea utilizar from ccepy.curvas_elipticas import ... Para operar con...
{ "repo_name": "ranea/ccepy", "path": "ccepy/curvas_elipticas.py", "copies": "1", "size": "23389", "license": "mit", "hash": 7565633026684312000, "line_mean": 34.7834101382, "line_max": 108, "alpha_frac": 0.5259497746, "autogenerated": false, "ratio": 3.025324675324675, "config_test": false, "...
"""Aritmética elemental con enteros y polinomios. Este módulo permite operar con enteros módulo un primo p y polinomios cuyos coeficientes sean enteros módulo un primo p. Para utilizar las funciones y las clases de este módulo, debe importarlo previamente: :: # reemplace ... por la función/clase que desea utiliz...
{ "repo_name": "ranea/ccepy", "path": "ccepy/aritmetica_elemental.py", "copies": "1", "size": "15736", "license": "mit", "hash": -4830021927142027000, "line_mean": 28.1598513011, "line_max": 80, "alpha_frac": 0.494390617, "autogenerated": false, "ratio": 3.073667711598746, "config_test": false, ...
"""ARK Survival RCON Interface. Connect, authenticate and transmit data to your favorite ARK Server. by Torgrim "Fable" Ruud - torgrim.ruud@gmail.com Class initialization requires host,port and password and will connect to the server unless specified. Upon connecting commences authentication. Through class inheritan...
{ "repo_name": "f4ble/pyarc", "path": "ark/rcon.py", "copies": "2", "size": "5976", "license": "apache-2.0", "hash": 4630517662447208000, "line_mean": 34.5714285714, "line_max": 124, "alpha_frac": 0.6599732262, "autogenerated": false, "ratio": 4.167364016736402, "config_test": false, "has_no_k...
import argparse import os import time import datetime cVersion = "0.1a" cWaitingTimeForPageUpdate = 5 # seconds cWaitingTimeForDownloadingToComplete = 10 # seconds def main(): ShowApplicationTitle() inputs = ProcessCommandLineInputs() print "Accessing Arlo webpage.." result = DownloadAllTodaysVideo(inputs.ac...
{ "repo_name": "Magoja/arloBackup", "path": "arloBackup.py", "copies": "1", "size": "6276", "license": "mit", "hash": -360480508765450200, "line_mean": 29.1778846154, "line_max": 112, "alpha_frac": 0.6854684512, "autogenerated": false, "ratio": 3.7990314769975786, "config_test": false, "has_no...
#arlobox.py # Netgear Arlo camera automation # Monitor the momentary toggle switch in the Raspberry Pi box, # or the armed state of an external security alarm system, # then change the arm/disarm mode of the Arlo cameras, # and set the lights on the box appropriately. #Copyright (c) 2016, Len Shustek #Open source b...
{ "repo_name": "LenShustek/ArloCamera", "path": "arlobox.py", "copies": "1", "size": "3823", "license": "mit", "hash": -4047601849973661700, "line_mean": 28.6356589147, "line_max": 103, "alpha_frac": 0.6275176563, "autogenerated": false, "ratio": 3.167357083678542, "config_test": false, "has_n...
"""ARMA and MA estimates, ARMA and MA PSD estimates. .. topic:: ARMA model and Power Spectral Densities. .. autosummary:: :nosignatures: arma_estimate ma arma2psd parma pma .. codeauthor:: Thomas Cokelaer 2011 :References: See [Marple]_ """ import numpy as np f...
{ "repo_name": "cokelaer/spectrum", "path": "src/spectrum/arma.py", "copies": "1", "size": "12018", "license": "bsd-3-clause", "hash": 4337537801384424400, "line_mean": 29.8946015424, "line_max": 85, "alpha_frac": 0.5681477783, "autogenerated": false, "ratio": 3.3692178301093354, "config_test": ...
'''ARMA process and estimation with scipy.signal.lfilter 2009-09-06: copied from try_signal.py reparameterized same as signal.lfilter (positive coefficients) Notes ----- * pretty fast * checked with Monte Carlo and cross comparison with statsmodels yule_walker for AR numbers are close but not identical to yule...
{ "repo_name": "rgommers/statsmodels", "path": "statsmodels/tsa/arima_process.py", "copies": "1", "size": "32823", "license": "bsd-3-clause", "hash": -7523990398813536000, "line_mean": 29.1959521619, "line_max": 94, "alpha_frac": 0.5996709624, "autogenerated": false, "ratio": 3.4219140950792326, ...
"""ARMA process and estimation with scipy.signal.lfilter Notes ----- * written without textbook, works but not sure about everything briefly checked and it looks to be standard least squares, see below * theoretical autocorrelation function of general ARMA Done, relatively easy to guess solution, time consuming t...
{ "repo_name": "jseabold/statsmodels", "path": "statsmodels/tsa/arima_process.py", "copies": "5", "size": "28643", "license": "bsd-3-clause", "hash": -5893312728923830000, "line_mean": 29.9989177489, "line_max": 84, "alpha_frac": 0.5959571274, "autogenerated": false, "ratio": 3.611069087241553, ...
""" ARM architecture definition. """ import io from ... import ir from ...binutils.assembler import BaseAssembler from ..arch import Architecture from ..arch_info import ArchInfo, TypeInfo from ..generic_instructions import Label, Alignment, RegisterUseDef from ..data_instructions import Db, Dd, Dcd2, data_isa from ..r...
{ "repo_name": "windelbouwman/ppci-mirror", "path": "ppci/arch/arm/arch.py", "copies": "1", "size": "17844", "license": "bsd-2-clause", "hash": -497073032770770700, "line_mean": 33.6485436893, "line_max": 79, "alpha_frac": 0.5226967048, "autogenerated": false, "ratio": 3.862337662337662, "config...
"""ARM inline assembler. This module allows creation of new functions in ARM assembler (machine language) which can be directly called from Python. The assembler syntax parsed by this module follows as closely as practical the offical ARM syntax """ from functools import partial as _partial import re as _re import c...
{ "repo_name": "stephanh42/armasm", "path": "armasm.py", "copies": "1", "size": "29874", "license": "mit", "hash": -1284570822462034000, "line_mean": 34.90625, "line_max": 134, "alpha_frac": 0.5745129544, "autogenerated": false, "ratio": 3.3748305467690916, "config_test": false, "has_no_keywor...
# Armon Dadgar # May 10th 2009 # # This file houses the code used for interactions between repy and the node manager. # Namely, it checks for a stopfile to inform us to terminate, and it periodically # writes a status file informing the NM of our status. # # This is used to write out our status import statusstorage #...
{ "repo_name": "SeattleTestbed/repy_v2", "path": "nmstatusinterface.py", "copies": "1", "size": "5993", "license": "mit", "hash": 5105458017284097000, "line_mean": 27.2688679245, "line_max": 92, "alpha_frac": 0.6701151343, "autogenerated": false, "ratio": 3.9794156706507304, "config_test": false...
# Armon Dadgar # # Creates python interface for windows api calls that are required # # According to MSDN most of these calls are Windows 2K Pro and up # Trying to replace the win32* stuff using ctypes # Ctypes enable us to call the Windows API which written in C import ctypes # Needed so that we can sleep import t...
{ "repo_name": "sburnett/seattle", "path": "repy/windows_api.py", "copies": "3", "size": "53904", "license": "mit", "hash": 5328903439403555000, "line_mean": 29.4027072758, "line_max": 167, "alpha_frac": 0.6872217275, "autogenerated": false, "ratio": 3.9058039272516485, "config_test": false, "...
# armor/advection/semiLagrangian.py # to calculate advected scalar (or vector too) fields # will develop into the semi-Lagrangian scheme # status: still under development import copy import time import os import scipy import numpy import numpy as np import numpy.ma as ma #import matplotlib import matplotlib.pyplot a...
{ "repo_name": "yaukwankiu/armor", "path": "advection/semiLagrangian.py", "copies": "1", "size": "6700", "license": "cc0-1.0", "hash": -6458999019293658000, "line_mean": 35.2162162162, "line_max": 105, "alpha_frac": 0.4849253731, "autogenerated": false, "ratio": 3.201146679407549, "config_test":...
# armor.geometry.edges # module for edge detecting and stuff import copy import numpy as np import numpy.ma as ma from scipy.signal import fftconvolve #from armor import pattern def find(a): """ use straightforward summing of mask criteria """ m1 = ma.zeros(a.matrix.shape) m2 = ma.zeros(a.matrix.s...
{ "repo_name": "yaukwankiu/armor", "path": "geometry/edges.py", "copies": "1", "size": "3878", "license": "cc0-1.0", "hash": -6307599924369710000, "line_mean": 32.1452991453, "line_max": 131, "alpha_frac": 0.5683341929, "autogenerated": false, "ratio": 3.051140833988985, "config_test": false, ...
# armor.geometry.transforms # functions: translation(arr, (a,b)) # linear(arr, matrix 2x2) # affine(arr, matrix 2x3) # in this module we compute the linear/affine transformations of arrays # it is done in two steps # 1. the corresponding coordinates are calculated # 2. ...
{ "repo_name": "yaukwankiu/armor", "path": "geometry/transforms.py", "copies": "1", "size": "17861", "license": "cc0-1.0", "hash": 1114190648917957100, "line_mean": 30.9516994633, "line_max": 147, "alpha_frac": 0.5270701528, "autogenerated": false, "ratio": 3.318038268623444, "config_test": fals...
# armor.kmeans.stormTracking.py # codes taken from armor.tests.trackingTest20140901 import numpy as np #from armor import objects4 as ob def stormTracking(a0, upperThreshold=40, lowerThreshold=20, lowerLimit1=10, upperLimit1=100000, lowerLimit2=30000, m...
{ "repo_name": "yaukwankiu/armor", "path": "kmeans/stormTracking.py", "copies": "1", "size": "2616", "license": "cc0-1.0", "hash": -2941465321128190500, "line_mean": 29.4186046512, "line_max": 122, "alpha_frac": 0.5718654434, "autogenerated": false, "ratio": 3.2019583843329253, "config_test": fa...
# armor/shiiba/regression2.py # adapted from regression.py # see regression.py for further remarks # with a change: c1,.., c6 -> c1,..,c9 # 19 February 2013. # to calculate the advection coefficiations after Shi-iba et al # Takasao T. and Shiiba M. 1984: Development of techniques for on-line forecasting of rainfall a...
{ "repo_name": "yaukwankiu/armor", "path": "shiiba/regression2.py", "copies": "1", "size": "21811", "license": "cc0-1.0", "hash": 1406079854444242400, "line_mean": 41.269379845, "line_max": 145, "alpha_frac": 0.4996102884, "autogenerated": false, "ratio": 3.15643994211288, "config_test": false, ...
# armor/spectral/powerSpec1.py # migrated from armor/test/ # 2014-06-17 # powerSpec1.py # test script for computing power spectrum # 2014-06-10 """ == Spectral analysis == 0. RADAR domain -> normalise to WRF domain tests to do - 1. average each 4x4 grid in RADAR then compare the spectrum of...
{ "repo_name": "yaukwankiu/armor", "path": "spectral/powerSpec1.py", "copies": "1", "size": "16676", "license": "cc0-1.0", "hash": -472652363812750900, "line_mean": 35.9, "line_max": 146, "alpha_frac": 0.535080355, "autogenerated": false, "ratio": 3.368888888888889, "config_test": true, "has_n...
# armor.texture.analysis.py # should work automatically """ script to analyse the texture and perform segmentation, given radar data pipeline: 1. dbz radar data -> armor.DBZ object 2. (filter bank) -> feature layers 3. (clustering) -> texture layers 4. (neighbour aggregation) -> segmentation ...
{ "repo_name": "yaukwankiu/armor", "path": "texture/analysis_0.py", "copies": "1", "size": "7735", "license": "cc0-1.0", "hash": 2358009601262023000, "line_mean": 34.3196347032, "line_max": 183, "alpha_frac": 0.5903038138, "autogenerated": false, "ratio": 3.678078934854969, "config_test": false,...
""" ArnoldC -> Python translator This file includes abstract model of blocks and statements. """ import reserved_words as rword #Abstract syntax model #--------------------- class Runnables(object): """Abstract definition of runnable blocks/statements""" def __init__(self): raise NotImplementedE...
{ "repo_name": "puhitaku/PynoldC", "path": "translator.py", "copies": "1", "size": "8531", "license": "mit", "hash": 1058452540661691500, "line_mean": 27.7239057239, "line_max": 91, "alpha_frac": 0.5059195874, "autogenerated": false, "ratio": 3.723701440419031, "config_test": false, "has_no_ke...
"""Arnoldi iteration eigensolver using ARPACK-NG. See also: https://github.com/opencollab/arpack-ng """ from ctypes import (byref, cdll, create_string_buffer, c_int, c_char, c_char_p, c_double, POINTER, sizeof) import ctypes.util import logging from typing import Optional, Tuple import sys impo...
{ "repo_name": "jmbr/diffusion-maps", "path": "diffusion_maps/gpu_eigensolver.py", "copies": "1", "size": "9523", "license": "mit", "hash": 1774400967809592800, "line_mean": 36.6403162055, "line_max": 79, "alpha_frac": 0.5977108054, "autogenerated": false, "ratio": 3.1988579106483037, "config_te...
'''A Robot Framework listener that sends information to a socket in JSON format This requires Python 2.6+ ''' import os import socket import sys import json from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler PORT = 8910 HOST = "localhost" # Robot expects the class to be the same as the fi...
{ "repo_name": "boakley/robotframework-workbench", "path": "rwb/misc/socket_listener.py", "copies": "1", "size": "3071", "license": "apache-2.0", "hash": 2710207237830152700, "line_mean": 29.1078431373, "line_max": 95, "alpha_frac": 0.5985021166, "autogenerated": false, "ratio": 3.754278728606357,...
# A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). # # The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right # corner of the grid (marked 'Finish' in the diagram below). # # How many possible unique paths are ther...
{ "repo_name": "jigarkb/CTCI", "path": "LeetCode/062-M-UniquePaths.py", "copies": "2", "size": "1244", "license": "mit", "hash": -2237396285817897500, "line_mean": 28.619047619, "line_max": 114, "alpha_frac": 0.5313504823, "autogenerated": false, "ratio": 3.2395833333333335, "config_test": false...
"""A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below). How many possible unique paths are there? Gri...
{ "repo_name": "rcanepa/cs-fundamentals", "path": "python/interview_questions/unique_paths.py", "copies": "1", "size": "1605", "license": "mit", "hash": 4877051687653773000, "line_mean": 23.3181818182, "line_max": 99, "alpha_frac": 0.53894081, "autogenerated": false, "ratio": 3.0455407969639468, ...
'''A robots.txt cache.''' from functools import partial import threading import time from cachetools import LRUCache from .policy import DefaultObjectPolicy, ReraiseExceptionPolicy from ..robots import Robots, AllowNone, Agent from .. import logger class ExpiringObject(object): '''Wrap an object that expires o...
{ "repo_name": "seomoz/reppy", "path": "reppy/cache/__init__.py", "copies": "1", "size": "3586", "license": "mit", "hash": -8436773746767240000, "line_mean": 31.6, "line_max": 86, "alpha_frac": 0.6196319018, "autogenerated": false, "ratio": 4.002232142857143, "config_test": false, "has_no_keyw...
"""A rough translation of an example from the Java Tutorial http://java.sun.com/docs/books/tutorial/ This example shows how to do very simple Canvas Drawing """ from java import applet, awt from pawt import GridBag class CoordinatesDemo(applet.Applet): def init(self): bag = GridBag(self) self.framedArea = Fr...
{ "repo_name": "nelmiux/CarnotKE", "path": "jyhton/Demo/applet/deprecated/CoordinatesDemo.py", "copies": "12", "size": "1581", "license": "apache-2.0", "hash": -5800794217332636000, "line_mean": 21.9130434783, "line_max": 68, "alpha_frac": 0.6799493991, "autogenerated": false, "ratio": 2.773684210...
"""A rough translation of an example from the Java Tutorial http://java.sun.com/docs/books/tutorial/ This example shows how to use List """ from java import applet, awt from java.awt.event import ItemEvent from pawt import GridBag class ListDemo(applet.Applet): def fillList(self, list, names): list.actionPerfor...
{ "repo_name": "babble/babble", "path": "include/jython/Demo/applet/ListDemo.py", "copies": "12", "size": "1524", "license": "apache-2.0", "hash": 2192309005405104600, "line_mean": 25.275862069, "line_max": 69, "alpha_frac": 0.6666666667, "autogenerated": false, "ratio": 2.770909090909091, "conf...
""" A route is a function that returns a dict consisting of {number: message} key/values. I figured it'd be nice to keep them separate from models, which seem strictly tied to database tables in django. The only thing the rest of SMS should see is the ROUTES dispatch table. routes are divided into the ...
{ "repo_name": "hwayne/safehouse", "path": "sms/routes/routes.py", "copies": "1", "size": "2245", "license": "apache-2.0", "hash": -6803259418297146000, "line_mean": 39.0892857143, "line_max": 80, "alpha_frac": 0.7024498886, "autogenerated": false, "ratio": 4.2120075046904315, "config_test": fal...
"""A routine for generating measurement records that can be fed to different estimators for comparison purposes """ from __future__ import division, print_function import numpy as np from model import HaarTestModel from qubit_dst.dst_povm_sampling import DSTDistribution from qinfer.smc import SMCUpdater from qinfer.r...
{ "repo_name": "jarthurgross/seq_mon_car", "path": "src/seq_mon_car/gen_meas_record.py", "copies": "1", "size": "2073", "license": "mit", "hash": 3881934599493820400, "line_mean": 39.6470588235, "line_max": 80, "alpha_frac": 0.6584659913, "autogenerated": false, "ratio": 4.001930501930502, "conf...
# A row measuring seven units in length has red blocks with a minimum # length of three units placed on it, such that any two red blocks # (which are allowed to be different lengths) are separated by at # least one black square. There are exactly seventeen ways of doing # this. # B B B B B B B R R R B B B B ...
{ "repo_name": "cloudzfy/euler", "path": "src/114.py", "copies": "1", "size": "1062", "license": "mit", "hash": 1203962665046048800, "line_mean": 28.5, "line_max": 75, "alpha_frac": 0.6016949153, "autogenerated": false, "ratio": 2.744186046511628, "config_test": false, "has_no_keywords": false...
# A row of five black square tiles is to have a number of its tiles # replaced with coloured oblong tiles chosen from red (length two), # green (length three), or blue (length four). # If red tiles are chosen there are exactly seven ways this can be # done. # R R K K K K R R K K K K R R K K K K R R # ...
{ "repo_name": "cloudzfy/euler", "path": "src/116.py", "copies": "1", "size": "1068", "license": "mit", "hash": 7128411921409622000, "line_mean": 26.3846153846, "line_max": 71, "alpha_frac": 0.643258427, "autogenerated": false, "ratio": 2.991596638655462, "config_test": false, "has_no_keywords...
# Arpegiattors import random from itertools import cycle from pprint import pformat from zope.interface import Interface, Attribute, implements from twisted.python import log from bl.debug import debug, DEBUG from bl.utils import getClock, exhaustCall __all__ = [ 'IArp', 'IndexedArp', 'AscArp', 'DescArp', 'Or...
{ "repo_name": "djfroofy/beatlounge", "path": "bl/arp.py", "copies": "1", "size": "11748", "license": "mit", "hash": -634913482918320100, "line_mean": 27.1052631579, "line_max": 79, "alpha_frac": 0.5498808308, "autogenerated": false, "ratio": 3.6360259981429897, "config_test": false, "has_no_k...
"""Arpegio's models.""" from __future__ import unicode_literals from django.utils.encoding import python_2_unicode_compatible from django.template.defaultfilters import slugify, striptags from django.utils.timezone import now from django.db import models @python_2_unicode_compatible class ContentMixin(models.Model):...
{ "repo_name": "arpegio-dj/arpegio", "path": "arpegio/core/models.py", "copies": "1", "size": "1900", "license": "bsd-3-clause", "hash": -7445711271289052000, "line_mean": 29.6451612903, "line_max": 75, "alpha_frac": 0.6705263158, "autogenerated": false, "ratio": 3.925619834710744, "config_test"...
"""Arpegio's templatetags.""" import re from django import template from django.utils.html import format_html from django.utils.safestring import mark_safe from django.template.defaultfilters import stringfilter register = template.Library() @register.filter() @stringfilter def more(text, url='#'): """Adds a '...
{ "repo_name": "arpegio-dj/arpegio", "path": "arpegio/core/templatetags/arpegio_tags.py", "copies": "1", "size": "1925", "license": "bsd-3-clause", "hash": -3521376082170638000, "line_mean": 32.7719298246, "line_max": 79, "alpha_frac": 0.6083116883, "autogenerated": false, "ratio": 3.3075601374570...
# ARP Suite - Run ARP Commands From Command Line import sys import arp_mitm as mitm import arp_sslstrip as sslstrip import arp_listen as listen import arp_request as request import arp_cache as cache import arp_reconnaissance as recon import arp_interactive as interactive if __name__ == "__main__": arguments = sys.ar...
{ "repo_name": "monkeesuit/school", "path": "Network Security/ARP/arp suite/py/arp.py", "copies": "1", "size": "7562", "license": "mit", "hash": -2187622124215015700, "line_mean": 31.3162393162, "line_max": 80, "alpha_frac": 0.632107908, "autogenerated": false, "ratio": 2.903993855606759, "confi...
#Arquivo que contem os parametros do jogo quantidade_jogadores = 2 #quantidade de Jogadores jogadores = [] #array que contem os jogadores(na ordem de jogo) tamanho_tabuleiro = 40 #tamanho do array do tabuleiro (sempre multiplo de 4 para o tabuleiro ficar quadrado) quantidade_dados = 2 #quantos dados serao usados quant...
{ "repo_name": "fcrozetta/Text-Based-Monopoly", "path": "Configuracoes.py", "copies": "1", "size": "1268", "license": "mit", "hash": 8191924199828407000, "line_mean": 38.65625, "line_max": 108, "alpha_frac": 0.7247634069, "autogenerated": false, "ratio": 2.3656716417910446, "config_test": false,...
arr = [0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF] def get_place(num): if num == 0xff: return 5 for index, i in enumerate(arr): if i > num: return index - (1 if num - arr[index - 1] <= i - num else 0) def color(num): if num%0xa0a0a == 0x80808: return 232 + int((num - 0x080808...
{ "repo_name": "CsTarepanda/cuiImage", "path": "old/tocol.py", "copies": "1", "size": "1086", "license": "mit", "hash": -666249832171712300, "line_mean": 20.2941176471, "line_max": 72, "alpha_frac": 0.4447513812, "autogenerated": false, "ratio": 3.1296829971181555, "config_test": false, "has_n...
arr = [-10, -5, 0, 5, 5.1, 11, 13, 21, 3, 4, -21, -10, -5, -1, 0] expect = [-5, 0, 5, 5.1, 11, 13, 21, -1, 4, -1, -10, -5, -1, 0, -1] def next_greatest_element_slow(arr: list) -> list: """ Get the Next Greatest Element (NGE) for all elements in a list. Maximum element present after the current one which i...
{ "repo_name": "TheAlgorithms/Python", "path": "data_structures/stacks/next_greater_element.py", "copies": "1", "size": "2861", "license": "mit", "hash": -248818529745682200, "line_mean": 28.193877551, "line_max": 85, "alpha_frac": 0.5704299196, "autogenerated": false, "ratio": 3.4763061968408264,...
# Arranged probability # # Problem 100 # # If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were # taken at random, it can be seen that the probability of taking two blue discs, P(BB) = (15/21)×(14/20) = 1/2. # The next such arrangement, for which there is exa...
{ "repo_name": "chjdev/euler", "path": "python/problem100.py", "copies": "1", "size": "1604", "license": "bsd-2-clause", "hash": 8523230152979735000, "line_mean": 35.4318181818, "line_max": 138, "alpha_frac": 0.6562694947, "autogenerated": false, "ratio": 2.6672212978369383, "config_test": false...
class Queue(object): def __init__(self, max_size): self.queue = [None] * (max_size + 1) self.enq = 0 self.deq = 0 self.n = 0 def increase(self, n): n += 1 if n >= len(self.queue): n -= len(self.queue) return n def enqueue(self, v): ...
{ "repo_name": "BartMassey/nb-misc", "path": "arrayqueue.py", "copies": "1", "size": "1163", "license": "mit", "hash": -7759576620189280000, "line_mean": 24.2608695652, "line_max": 54, "alpha_frac": 0.5662650602, "autogenerated": false, "ratio": 3.4277286135693217, "config_test": false, "has_n...
# Array based union find data structure # P: The array, which encodes the set membership of all the elements class UFarray: def __init__(self): # Array which holds label -> set equivalences self.P = [] # Name of the next label, when one is created self.label = 0 def makeLabel...
{ "repo_name": "spwhitt/cclabel", "path": "ufarray.py", "copies": "3", "size": "1751", "license": "unlicense", "hash": 1773855529449242000, "line_mean": 27.2419354839, "line_max": 68, "alpha_frac": 0.5242718447, "autogenerated": false, "ratio": 3.6103092783505155, "config_test": false, "has_no...
"""Array buffer class. @todo: Implement slicing to allow for C{glVertexAttribPointer} with C{size}, C{stride}, and C{pointer} parameters. @author: Stephan Wenger @date: 2012-02-29 """ import numpy as _np import glitter.raw as _gl from glitter.utils import buffer_dimensions_to_primitive, primitive_to_buffer_dimensio...
{ "repo_name": "swenger/glitter", "path": "glitter/arrays/arraybuffer.py", "copies": "1", "size": "2182", "license": "mit", "hash": 6779522705983344000, "line_mean": 37.2807017544, "line_max": 154, "alpha_frac": 0.6008249313, "autogenerated": false, "ratio": 3.781629116117851, "config_test": fal...
"""Array container types. A parray.type is used to create a data structure that describes an list of a particular subtype. The methods provided to a user expose a list-like interface to the user. A parray.type's interface inherits from ptype.container and will always have a .value that's a list. In most cases, a parra...
{ "repo_name": "arizvisa/syringe", "path": "lib/ptypes/parray.py", "copies": "1", "size": "47839", "license": "bsd-2-clause", "hash": 4398554643739254300, "line_mean": 37.149122807, "line_max": 182, "alpha_frac": 0.5524781036, "autogenerated": false, "ratio": 4.031942688579857, "config_test": tr...
"""Array data-type implementations (abstraction points for GL array types""" import ctypes import OpenGL from OpenGL import constants, plugins from OpenGL.arrays import formathandler from OpenGL import logs log = logs.getLog( 'OpenGL.arrays.arraydatatype' ) from OpenGL import acceleratesupport ADT = None if accelerat...
{ "repo_name": "frederica07/Dragon_Programming_Process", "path": "PyOpenGL-3.0.2/OpenGL/arrays/arraydatatype.py", "copies": "2", "size": "13457", "license": "bsd-2-clause", "hash": -8926495907233217000, "line_mean": 44.9283276451, "line_max": 100, "alpha_frac": 0.6131381437, "autogenerated": false, ...
"""Array definitions. Contains arrays, beamforming, and null-steering. """ import numpy as np import matplotlib.pyplot as plt import matplotlib.tri as tri from .geometry import GeometryMixin from .element import MonopoleElement class BaseArrayMixin(GeometryMixin): """Core array functionality, including plots...
{ "repo_name": "kastnerkyle/arrayprocessing", "path": "arrayprocessing/array.py", "copies": "1", "size": "5010", "license": "bsd-3-clause", "hash": -1060804765701736300, "line_mean": 32.6241610738, "line_max": 79, "alpha_frac": 0.6027944112, "autogenerated": false, "ratio": 3.426812585499316, "c...
# array generator for _mm512_permutexvar_epi8 def main(): arr = generate_array() code = render(arr) print code def generate_array(): shuffle_input_tbl = [0] * 64 src_index = 0 for i in xrange(0, 64, 4): # 32-bit input: [00000000|ccdddddd|bbbbcccc|aaaaaabb] # ...
{ "repo_name": "WojciechMula/base64simd", "path": "encode/script/permutexvar_parameters.py", "copies": "1", "size": "1085", "license": "bsd-2-clause", "hash": 4699333309745395000, "line_mean": 24.2325581395, "line_max": 76, "alpha_frac": 0.4912442396, "autogenerated": false, "ratio": 2.94037940379...
# array in Fortran starts from 0, in python starts from 0 # To avoid confusion for Python user, the phase and element index will +1 # import os import numpy as np # &&&& tq function &&&& from liboctqpy import pytq as ptq # ============= initialize def tqini(): ptq('ini',0,1.0,' ') return None # ============= read...
{ "repo_name": "dpttw/PyOC", "path": "libocpy.py", "copies": "1", "size": "10094", "license": "mit", "hash": 6131151084555855000, "line_mean": 27.3539325843, "line_max": 115, "alpha_frac": 0.6437487616, "autogenerated": false, "ratio": 2.865985235661556, "config_test": false, "has_no_keywords"...
"""Array interaction tools.""" # --- import -------------------------------------------------------------------------------------- import numpy as np from .. import exceptions as wt_exceptions # --- define -------------------------------------------------------------------------------------- __all__ = [ "c...
{ "repo_name": "wright-group/WrightTools", "path": "WrightTools/kit/_array.py", "copies": "1", "size": "11038", "license": "mit", "hash": 7743844782244333000, "line_mean": 25.280952381, "line_max": 99, "alpha_frac": 0.5549918463, "autogenerated": false, "ratio": 3.793127147766323, "config_test":...
# Array I/O to text files # # seb changed Numeric to numarray - 2003-Apr-07 # seb changed numarray to numpy - 2006-Jul-22 # Written by Konrad Hinsen <hinsen@cnrs-orleans.fr> # last revision: 2001-12-5 # """This module contains elementary support for I/O of one- and two-dimensional numerical arrays to and from plain...
{ "repo_name": "macronucleus/chromagnon", "path": "Chromagnon/Priithon/ArrayIO.py", "copies": "1", "size": "4907", "license": "mit", "hash": 1413770669290591000, "line_mean": 35.3481481481, "line_max": 87, "alpha_frac": 0.6588546974, "autogenerated": false, "ratio": 3.708994708994709, "config_te...
# array matching index (strength) to numerical value master_array = ['2','3','4','5','6','7','8','9','T','J','Q','K','A'] # pythonic hack to determine if an input string is an integer def test(s): try: return int(s) except ValueError: return -1 # function that returns the index of the numLegalAc...
{ "repo_name": "surgebiswas/poker", "path": "PokerBots_2017/sample_bot/prefloplogic.py", "copies": "1", "size": "1735", "license": "mit", "hash": -5605990529002182000, "line_mean": 35.9361702128, "line_max": 110, "alpha_frac": 0.6876080692, "autogenerated": false, "ratio": 3.0492091388400704, "c...
# Array methods which are called by the both the C-code for the method # and the Python code for the NumPy-namespace function from numpy.core import multiarray as mu from numpy.core import umath as um from numpy.core.numeric import asanyarray def _amax(a, axis=None, out=None, keepdims=False): return um.maximum.re...
{ "repo_name": "lthurlow/Network-Grapher", "path": "proj/external/numpy-1.7.0/numpy/core/_methods.py", "copies": "11", "size": "3842", "license": "mit", "hash": -7855904983546634000, "line_mean": 34.247706422, "line_max": 78, "alpha_frac": 0.5913586674, "autogenerated": false, "ratio": 3.358391608...
# Array methods which are called by the both the C-code for the method # and the Python code for the NumPy-namespace function #from numpy.core import multiarray as mu #from numpy.core import umath as um import _numpypy as mu um = mu from numpy.core.numeric import asanyarray def _amax(a, axis=None, out=None, keepdims=...
{ "repo_name": "ojii/sandlib", "path": "lib/lib_pypy/numpypy/core/_methods.py", "copies": "1", "size": "3874", "license": "bsd-3-clause", "hash": -6613248748276846000, "line_mean": 33.9009009009, "line_max": 78, "alpha_frac": 0.5918946825, "autogenerated": false, "ratio": 3.348314606741573, "con...
# Array methods which are called by the both the C-code for the method # and the Python code for the NumPy-namespace function import multiarray as mu import umath as um from numeric import asanyarray def _amax(a, axis=None, out=None, keepdims=False): return um.maximum.reduce(a, axis=axis, ...
{ "repo_name": "bussiere/pypyjs", "path": "website/demo/home/rfk/repos/pypy/lib_pypy/numpypy/core/_methods.py", "copies": "2", "size": "3799", "license": "mit", "hash": -3786545950004664300, "line_mean": 33.8532110092, "line_max": 78, "alpha_frac": 0.5888391682, "autogenerated": false, "ratio": 3....
""" Array of all possible menus """ menus = [] ########## Module wrapping menus and their creation ########## ## # @brief A class wrapping the menu objects. # # Note: These ARE the menus that go in the nav class Menu: ## # @brief Create a new menu object # # @param name Actual string for the appearing...
{ "repo_name": "aabmass/pswebsite_django", "path": "pswebsite/menus.py", "copies": "1", "size": "3447", "license": "apache-2.0", "hash": 1075642501937753700, "line_mean": 28.4615384615, "line_max": 73, "alpha_frac": 0.6141572382, "autogenerated": false, "ratio": 4.0174825174825175, "config_test"...
"""array of bits, represented as int in C++""" from collections import Sequence from ctypes import cdll bit_array = cdll.LoadLibrary('lib/lib_bit_array.so') class BitArray(Sequence): """an array of bits, wrapped C""" def __init__(self, length): assert length >= 0 self.length = length ...
{ "repo_name": "in3rtial/huffman", "path": "src/bit_array.py", "copies": "2", "size": "1626", "license": "cc0-1.0", "hash": -8206598734838193000, "line_mean": 27.5263157895, "line_max": 62, "alpha_frac": 0.5621156212, "autogenerated": false, "ratio": 3.7379310344827585, "config_test": false, "...
'''array of objects''' class A: def foo(self) -> string: return 'xxxx' class B(A): def foo(self) -> string: return 'hello' class C(A): def foo(self) -> string: return 'world' def push( arr:[]int, x:int ): arr.append( x ) def push2( arr:[]*A, x:*A ): arr.append( x ) def my...
{ "repo_name": "tempbottle/Rusthon", "path": "regtests/go/array_of_objects.py", "copies": "2", "size": "1228", "license": "bsd-3-clause", "hash": 3790739595576521700, "line_mean": 18.8225806452, "line_max": 88, "alpha_frac": 0.4991856678, "autogenerated": false, "ratio": 2.9805825242718447, "con...
"""Array operations """ # Copyright (c) 2013 Clarinova. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE.txt from numpy import * from ambry.geo import Point def std_norm(a): """Normalize to +-4 sigma on the range 0 to 1""" mean = a.mean() std ...
{ "repo_name": "kball/ambry", "path": "ambry/geo/array.py", "copies": "1", "size": "2178", "license": "bsd-2-clause", "hash": 3836112349127994000, "line_mean": 21.6875, "line_max": 81, "alpha_frac": 0.5101010101, "autogenerated": false, "ratio": 3.4245283018867925, "config_test": false, "has_n...
"""Array operations """ # Copyright (c) 2013 Clarinova. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE.txt from numpy import * from databundles.geo import Point def std_norm(a): """Normalize to +-4 sigma on the range 0 to 1""" mean = a.mean() ...
{ "repo_name": "treyhunner/databundles", "path": "databundles/geo/array.py", "copies": "1", "size": "2184", "license": "bsd-3-clause", "hash": -5572227541791771000, "line_mean": 21.75, "line_max": 81, "alpha_frac": 0.5114468864, "autogenerated": false, "ratio": 3.4285714285714284, "config_test":...
# Array ops # Given an array A of size n, print the number # of distinct elements in A for every frame of # size k def printKElems(A,k): for i in xrange(len(A)-k): print len( set([i:k+i+1]) ) # From a sorted array, find all A[i] + A[j] = 0 def findIfij(A): m = len(A)/2 if len(A)%2 != 0: m = m+ 1 pairs = [] ...
{ "repo_name": "adewynter/Tools", "path": "Algorithms/arrayOps.py", "copies": "1", "size": "2864", "license": "mit", "hash": 746480485796998400, "line_mean": 15.6569767442, "line_max": 60, "alpha_frac": 0.5597067039, "autogenerated": false, "ratio": 2.2712133227597144, "config_test": false, "h...
"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ __all__ = ["array2string", "set_printoptions", "get_printoptions"] __docformat__ = 'restructuredtext' # # Written by Konrad Hinsen <hinsenk@ere.umontreal.ca> # last revision: 1996-3-13 # modified by Jim Hugunin 1997-3-3 for...
{ "repo_name": "seibert/blaze-core", "path": "blaze/carray/arrayprint.py", "copies": "1", "size": "26135", "license": "bsd-2-clause", "hash": 1778063798763836000, "line_mean": 33.4788918206, "line_max": 91, "alpha_frac": 0.5414960781, "autogenerated": false, "ratio": 3.9852089051540105, "config_...
"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ __all__ = ["array2string", "array_str", "array_repr", "set_string_function", "set_printoptions", "get_printoptions", "printoptions", "format_float_positional", "format_float_scientific"] __docformat__ = ...
{ "repo_name": "numpy/numpy", "path": "numpy/core/arrayprint.py", "copies": "7", "size": "61625", "license": "bsd-3-clause", "hash": 7023058149433561000, "line_mean": 36.0342548077, "line_max": 83, "alpha_frac": 0.5930547667, "autogenerated": false, "ratio": 4.091150501228175, "config_test": fal...
"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ from __future__ import division, absolute_import, print_function __all__ = ["array2string", "array_str", "array_repr", "set_string_function", "set_printoptions", "get_printoptions", "format_float_positional", ...
{ "repo_name": "ryfeus/lambda-packs", "path": "Keras_tensorflow_nightly/source2.7/numpy/core/arrayprint.py", "copies": "2", "size": "57352", "license": "mit", "hash": -4653335198745969000, "line_mean": 36.5094833224, "line_max": 83, "alpha_frac": 0.5872332264, "autogenerated": false, "ratio": 4.14...
"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ from __future__ import division, absolute_import, print_function __all__ = ["array2string", "set_printoptions", "get_printoptions"] __docformat__ = 'restructuredtext' # # Written by Konrad Hinsen <hinsenk@ere.umontreal.ca> ...
{ "repo_name": "gmcastil/numpy", "path": "numpy/core/arrayprint.py", "copies": "1", "size": "25872", "license": "bsd-3-clause", "hash": 4814213765170498000, "line_mean": 33.0421052632, "line_max": 91, "alpha_frac": 0.5441017316, "autogenerated": false, "ratio": 3.9571734475374734, "config_test":...
"""Array printing function """ from __future__ import absolute_import, division, print_function __all__ = ["array2string", "set_printoptions", "get_printoptions"] __docformat__ = 'restructuredtext' from ...py2help import xrange # # Written by Konrad Hinsen <hinsenk@ere.umontreal.ca> # last revision: 1996-3-13 # mo...
{ "repo_name": "AbhiAgarwal/blaze", "path": "blaze/io/_printing/_arrayprint.py", "copies": "7", "size": "23372", "license": "bsd-3-clause", "hash": -7550935390355388000, "line_mean": 30.7554347826, "line_max": 80, "alpha_frac": 0.5571624166, "autogenerated": false, "ratio": 3.8108592858307517, "...
"""Array printing function """ from __future__ import absolute_import, division, print_function from ...py2help import xrange __all__ = ["array2string", "set_printoptions", "get_printoptions"] __docformat__ = 'restructuredtext' # # Written by Konrad Hinsen <hinsenk@ere.umontreal.ca> # last revision: 1996-3-13 # m...
{ "repo_name": "aaronmartin0303/blaze", "path": "blaze/io/_printing/_arrayprint.py", "copies": "2", "size": "23373", "license": "bsd-3-clause", "hash": -4295731572777492000, "line_mean": 30.7137042062, "line_max": 80, "alpha_frac": 0.5571385787, "autogenerated": false, "ratio": 3.811022338170553, ...
"""Arrays of variable-length arrays. Examples ======== Create a JaggedArray that stores link IDs for the links attached to the nodes of a 3x3 grid. >>> from landlab.utils.jaggedarray import JaggedArray >>> links_at_node = JaggedArray([ ... [0, 6], ... [1, 7, 0], ... [8, 1], ... [2, 9, 6], ... [3,...
{ "repo_name": "decvalts/landlab", "path": "landlab/utils/jaggedarray.py", "copies": "1", "size": "6829", "license": "mit", "hash": 50325160701264320, "line_mean": 24.9657794677, "line_max": 80, "alpha_frac": 0.491872895, "autogenerated": false, "ratio": 3.5456905503634477, "config_test": false,...
"""Arrays of variable-length arrays. Implements a JaggedArray class using numpy masked arrays. Examples ======== Create a JaggedArray that stores link IDs for the links attached to the nodes of a 3x3 grid. >>> from landlab.utils.jaggedarray_ma import JaggedArray >>> links_at_node = JaggedArray([ ... [0, 6], ......
{ "repo_name": "decvalts/landlab", "path": "landlab/utils/jaggedarray_ma.py", "copies": "1", "size": "6719", "license": "mit", "hash": -8999810821059787000, "line_mean": 25.557312253, "line_max": 74, "alpha_frac": 0.4978419408, "autogenerated": false, "ratio": 3.4813471502590674, "config_test": ...
# arrays.py 19/01/2016 D.J.Whale class Array(): def __init__(self, *args): self.data = [] if len(args) != 0: for a in args: if type(a)==list: for item in a: self.data.append(item) else: sel...
{ "repo_name": "whaleygeek/pc_parser", "path": "build/release/arrays.py", "copies": "2", "size": "1151", "license": "mit", "hash": 4193036217346688500, "line_mean": 22.9791666667, "line_max": 63, "alpha_frac": 0.4761077324, "autogenerated": false, "ratio": 3.749185667752443, "config_test": false...
""" Array support Ideas based on numpy ndarray, but limited functionality. Implementation heavily influenced by GDA scisoftpy, Copyright 2010 Diamond Light Source Ltd. @author: Kay Kasemir """ import math import org.csstudio.ndarray.NDType as NDType import org.csstudio.ndarray.NDArray as NDArray import org.csstudio...
{ "repo_name": "ESSICS/cs-studio", "path": "applications/scan/scan-plugins/org.csstudio.numjy/jython/numjy/ndarray.py", "copies": "3", "size": "18024", "license": "epl-1.0", "hash": -3145576177343833600, "line_mean": 30.4006968641, "line_max": 133, "alpha_frac": 0.5679094541, "autogenerated": false,...
""" Array support unit test @author: Kay Kasemir """ import unittest import math orig_int = int from numjy import * class ScanDataTest(unittest.TestCase): def testVersion(self): print version self.assertTrue(version_info > (0, 0)) def testCreateZeros(self): a = zeros(5) ...
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "applications/scan/scan-plugins/org.csstudio.numjy/jython/numjy_test.py", "copies": "3", "size": "15201", "license": "epl-1.0", "hash": -5402065485102217000, "line_mean": 31.9025974026, "line_max": 105, "alpha_frac": 0.4652983356, "autogenerate...
"""array_to_latex converts Numpy and Pandas arrays to formatted LaTeX.""" from setuptools import setup import os # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # s...
{ "repo_name": "josephcslater/array_to_latex", "path": "setup.py", "copies": "1", "size": "2458", "license": "mit", "hash": -2347454406275935000, "line_mean": 40.6610169492, "line_max": 79, "alpha_frac": 0.5687550854, "autogenerated": false, "ratio": 4.2822299651567945, "config_test": false, "...
""" Array utilities """ from __future__ import absolute_import import numpy as np def strides_from(shape, dtype, order='C'): """ Return strides as for continuous array shape `shape` and given `dtype` Parameters ---------- shape : sequence shape of array to calculate strides from dtype : dt...
{ "repo_name": "alexis-roche/nipy", "path": "nipy/utils/arrays.py", "copies": "3", "size": "1213", "license": "bsd-3-clause", "hash": -3136404276239238000, "line_mean": 27.2093023256, "line_max": 78, "alpha_frac": 0.5630667766, "autogenerated": false, "ratio": 3.7208588957055215, "config_test": ...
""" Array utilities """ import numpy as np def strides_from(shape, dtype, order='C'): """ Return strides as for continuous array shape `shape` and given `dtype` Parameters ---------- shape : sequence shape of array to calculate strides from dtype : dtype-like dtype specifier for ar...
{ "repo_name": "arokem/nipy", "path": "nipy/utils/arrays.py", "copies": "3", "size": "1174", "license": "bsd-3-clause", "hash": 4027894527222715400, "line_mean": 26.9523809524, "line_max": 78, "alpha_frac": 0.5562180579, "autogenerated": false, "ratio": 3.7034700315457414, "config_test": false, ...
"""Arridity""" import datetime from pandas.io.sql import read_sql import numpy as np import matplotlib.dates as mdates from pyiem.plot.use_agg import plt from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound def get_description(): """ Return a dict describing how to cal...
{ "repo_name": "akrherz/iem", "path": "htdocs/plotting/auto/scripts100/p149.py", "copies": "1", "size": "9852", "license": "mit", "hash": 3203322699647321600, "line_mean": 31.3016393443, "line_max": 78, "alpha_frac": 0.4935038571, "autogenerated": false, "ratio": 3.3682051282051284, "config_test...
arr = [ "37107287533902102798797998220837590246510135740250", "46376937677490009712648124896970078050417018260538", "74324986199524741059474233309513058123726617309629", "91942213363574161572522430563301811072406154908250", "23067588207539346171171980310421047513778063246676", "89261670696623633820136378418383684178734...
{ "repo_name": "parin2092/cook", "path": "euler/p13.py", "copies": "2", "size": "5700", "license": "mit", "hash": 4656719075403551000, "line_mean": 46.5, "line_max": 53, "alpha_frac": 0.9050877193, "autogenerated": false, "ratio": 2.2118742724097786, "config_test": false, "has_no_keywords": fa...
##Arrr, me mateys! Yer' challenge fer' today be a tough one. It be gettin awfully borein' on the high seas, so yer' job be to create a pirate based fightin' game! This game oughter' be turn based, and you oughter' be able to pick yer attacks every turn. The best game'll be winnin' some custom flair, and all the rest o'...
{ "repo_name": "ngmhprogramming/dailyprogrammer", "path": "Python/python_hard_5.py", "copies": "1", "size": "3324", "license": "mit", "hash": 5689617239030351000, "line_mean": 48.3636363636, "line_max": 349, "alpha_frac": 0.5767148014, "autogenerated": false, "ratio": 3.5286624203821657, "config...
ARRUMAR import Pmw import Tkinter as tk import matplotlib as mpl import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from os import chdir,listdir,path,getcwd class PlotWindow(): def __init__(self,shot=0,plo...
{ "repo_name": "CassioAmador/profile_tcabr", "path": "visualization_tools/plot_prof2.py", "copies": "1", "size": "5175", "license": "mit", "hash": -547969588773308500, "line_mean": 33.0526315789, "line_max": 98, "alpha_frac": 0.5785507246, "autogenerated": false, "ratio": 3.400131406044678, "con...
ARRUMAR """ Function: Evaluates the maximum density of the plasma, if it is lower than the maximum probing frequency. Try to find a jump in the group delay Authors: Cassio Amador (cassioamador at yahoo.com.br) Gilson Ronchi (gronchi at if.usp.br) TODO: choose best one and erase the other """ from os import pat...
{ "repo_name": "CassioAmador/profile_tcabr", "path": "src/proc_ne_max.py", "copies": "1", "size": "2727", "license": "mit", "hash": -2557700547420067300, "line_mean": 37.4084507042, "line_max": 93, "alpha_frac": 0.5137513751, "autogenerated": false, "ratio": 3.0744081172491544, "config_test": fa...
ARRUMAR """ Given a shot_number, it reads all files in 'prof_folder' to plot it. With a slider, it is possible to change time of profile with a mouse. author: Cassio Amador TODO: read from 'ini' file. ??? """ from os import chdir,listdir,path import pylab as p from input_explorer import inputExplorer from proc_prof...
{ "repo_name": "CassioAmador/profile_tcabr", "path": "visualization_tools/plot_prof4.py", "copies": "1", "size": "1414", "license": "mit", "hash": 979322776490369000, "line_mean": 23.3793103448, "line_max": 71, "alpha_frac": 0.6371994342, "autogenerated": false, "ratio": 2.72972972972973, "confi...
'''Arsenal API bulk node_groups.''' # Copyright 2015 CityGrid Media, 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 re...
{ "repo_name": "CityGrid/arsenal", "path": "server/arsenalweb/views/api/bulk_node_groups.py", "copies": "1", "size": "4689", "license": "apache-2.0", "hash": 380222964193164100, "line_mean": 38.075, "line_max": 127, "alpha_frac": 0.5886116443, "autogenerated": false, "ratio": 4.000853242320819, ...
'''Arsenal API data_centers.''' # Copyright 2015 CityGrid Media, 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 requir...
{ "repo_name": "CityGrid/arsenal", "path": "server/arsenalweb/views/api/data_centers.py", "copies": "1", "size": "8778", "license": "apache-2.0", "hash": 8244757016190514000, "line_mean": 32.632183908, "line_max": 119, "alpha_frac": 0.5830485304, "autogenerated": false, "ratio": 4.082790697674419,...