repo_name
stringlengths
6
112
path
stringlengths
4
204
copies
stringlengths
1
3
size
stringlengths
4
6
content
stringlengths
714
891k
license
stringclasses
15 values
hash
int64
-9,223,135,201,861,841,000
9,223,183,049B
line_mean
float64
6
99.4
line_max
int64
17
1k
alpha_frac
float64
0.25
0.89
autogenerated
bool
1 class
adamrvfisher/TechnicalAnalysisLibrary
PriceRelativeRemoteSignalATROptimizerTwoAsset.py
1
7759
# -*- coding: utf-8 -*- """ Created on Wed Aug 30 19:07:37 2017 @author: AmatVictoriaCuramIII """ import numpy as np import random as rand import pandas as pd import time as t from DatabaseGrabber import DatabaseGrabber from YahooGrabber import YahooGrabber Empty = [] Dataset = pd.DataFrame() Portfolio =...
apache-2.0
-6,308,838,753,224,976,000
36.61194
101
0.608197
false
neutrons/FastGR
addie/processing/idl/table_handler.py
1
22403
from __future__ import (absolute_import, division, print_function) #import re import glob import os import numpy as np from qtpy.QtCore import (Qt) from qtpy.QtGui import (QCursor) from qtpy.QtWidgets import (QFileDialog, QMenu, QMessageBox, QTableWidgetSelectionRange) import addie.processing.idl.populate_master_table...
mit
796,581,622,623,209,200
39.148746
120
0.573138
false
ryanjmccall/nupic.research
union_pooling/union_pooling/experiments/union_sdr_overlap/plot_experiment.py
4
4392
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
gpl-3.0
-4,415,004,528,747,624,400
30.826087
77
0.673042
false
AhmedHani/Kaggle-Machine-Learning-Competitions
Medium/Toxic Comment Classification Challenge/train_ffnn.py
1
1063
import numpy as np import pandas as pd from keras.models import Model from keras.layers import Dense, Embedding, Input from keras.layers import LSTM, Bidirectional, GlobalMaxPool1D, Dropout from keras.preprocessing import text, sequence from keras.callbacks import EarlyStopping, ModelCheckpoint max_features = 20000 m...
mit
61,240,177,327,376,260
35.689655
88
0.775165
false
ecervera/mindstorms-nb
nxt/functions.py
1
7333
import json import shutil from IPython.core.display import display, HTML def configure(n): config = { 'version' : 'nxt', 'number' : n } with open('../task/robot_config.json', 'w') as f: json.dump(config, f) shutil.copyfile('./functions.py', '../task/functions.py') print("\x...
mit
-1,915,779,626,699,435,000
34.634146
346
0.609309
false
leojohnthomas/ahkab
ekv.py
1
25762
# -*- coding: iso-8859-1 -*- # ekv.py # Partial implementation of the EKV 3.0 MOS transistor model # Copyright 2010 Giuseppe Venturini # # The EKV model was developed by Matthias Bucher, Christophe Lallement, # Christian Enz, Fabien Théodoloz, François Krummenacher at the Electronics # Laboratories, Swiss Federal In...
gpl-2.0
2,957,746,477,690,178,000
33.296937
251
0.636914
false
ceroytres/RBM
binary_RBM.py
1
4503
from __future__ import print_function import numpy as np from numba import jit class binary_RBM(object): def __init__(self,n_visible=None,n_hidden=256,batchSize=256,lr=0.1,alpha=0, mu=.95,epochs=1,k=10): self.n_hidden=n_hidden self.n_visible=n_visible self.batchSize=batch...
mit
-6,674,141,656,296,916,000
28.431373
90
0.487897
false
bloyl/mne-python
mne/channels/tests/test_layout.py
4
14417
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # # License: Simplified BSD import copy import os.path as op import numpy as np from numpy.testing im...
bsd-3-clause
-6,684,274,647,835,185,000
38.283379
79
0.623569
false
mailund/pairwise-IM
IMSystem.py
1
3547
from numpy import matrix from scipy.linalg import expm ## Constants used as indices in rate and transition matrices LINEAGES_IN_SEP_POPS = 0 LINEAGES_IN_POP_1 = 1 LINEAGES_IN_POP_2 = 2 COALESCED = 3 NOT_COALESCED = [0,1,2] def make_rate_matrix(c1, c2, m12, m21): '''Create a rate matrix based on coalescence rates ...
gpl-3.0
5,477,560,428,867,526,000
36.336842
95
0.572597
false
ky822/Data_Bootcamp
Code/Python/WB_wdi_all.py
2
2294
""" Messing around with World Bank data. We start by reading in the whole WDI from the online csv. Since the online file is part of a zipped collection, this turned into an exploration of how to handle zip files -- see Section 1. Section 2 (coming) does slicing and plotting. Prepared for the NYU Course "Data Boo...
mit
3,442,475,768,866,982,000
30.424658
102
0.709677
false
AtsushiSakai/jsk_visualization_packages
jsk_rqt_plugins/src/jsk_rqt_plugins/hist.py
1
7882
#!/usr/bin/env python from rqt_gui_py.plugin import Plugin from python_qt_binding import loadUi from python_qt_binding.QtCore import Qt, QTimer, qWarning, Slot from python_qt_binding.QtGui import QAction, QIcon, QMenu, QWidget from python_qt_binding.QtGui import QWidget, QVBoxLayout, QSizePolicy, QColor from rqt_py_com...
mit
4,489,442,462,833,596,400
39.214286
113
0.632581
false
guziy/basemap
examples/save_background.py
2
1364
from __future__ import (absolute_import, division, print_function) import matplotlib, sys matplotlib.use('Agg') from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # this example shows how to save a map background and # reuse it in another figure. # make sure we have all the same properties on a...
gpl-2.0
4,759,339,645,438,496,000
32.268293
66
0.76173
false
vatsan/pandas_via_psql
setup.py
2
4301
from setuptools import setup, find_packages from distutils.util import convert_path import os,sys from fnmatch import fnmatchcase # Provided as an attribute, so you can append to these instead # of replicating them: standard_exclude = ('*.pyc', '*$py.class', '*~', '.*', '*.bak') standard_exclude_directories = ('.*', '...
bsd-2-clause
-4,267,674,333,726,588,400
40.355769
95
0.549872
false
stephane-caron/pymanoid
examples/contact_stability/zmp_support_area.py
3
5631
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2020 Stephane Caron <stephane.caron@normalesup.org> # # This file is part of pymanoid <https://github.com/stephane-caron/pymanoid>. # # pymanoid is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public Lic...
gpl-3.0
-3,208,270,963,893,853,000
30.110497
79
0.640206
false
rema-git/lichtmalen
image_to_tpm2.py
1
3589
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Mon Oct 27 00:33:17 2014 @author: Reinhardt A.W. Maier <rema@zaehlwerk.net> """ import os import argparse import binascii import numpy as np import Image as pil #import textwrap #import matplotlib.pyplot as plt def tpm2(image, lastFrameBlack=False): """ ...
gpl-3.0
-8,740,749,091,339,044,000
28.178862
111
0.629145
false
activitynet/ActivityNet
Evaluation/get_ava_active_speaker_performance.py
1
8421
r"""Compute active speaker detection performance for the AVA dataset. Please send any questions about this code to the Google Group ava-dataset-users: https://groups.google.com/forum/#!forum/ava-dataset-users Example usage: python -O get_ava_active_speaker_performance.py \ -g testdata/eval.csv \ -p testdata/predictio...
mit
-3,192,975,491,083,719,000
33.093117
80
0.676879
false
CCS-Lab/hBayesDM
Python/hbayesdm/models/_pst_Q.py
1
10143
from typing import Sequence, Union, Any from collections import OrderedDict from numpy import Inf, exp import pandas as pd from hbayesdm.base import TaskModel from hbayesdm.preprocess_funcs import pst_preprocess_func __all__ = ['pst_Q'] class PstQ(TaskModel): def __init__(self, **kwargs): super().__ini...
gpl-3.0
-2,116,428,267,287,271,000
42.161702
566
0.643104
false
linebp/pandas
pandas/tests/dtypes/test_inference.py
1
35947
# -*- coding: utf-8 -*- """ These the test the public routines exposed in types/common.py related to inference and not otherwise tested in types/test_common.py """ from warnings import catch_warnings import collections import re from datetime import datetime, date, timedelta, time from decimal import Decimal import n...
bsd-3-clause
3,442,768,526,486,067,000
33.300573
79
0.567919
false
Ernestyj/PyStudy
finance/DaysTest/MICAnalysis.py
1
4363
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from minepy import MINE import pandas as pd import seaborn as sns import matplotlib.pyplot as plt sns.set(style="white", context="talk") from sklearn import preprocessing pd.set_option('display.max_rows', 500) pd.set_option('display.max_columns', 30) p...
apache-2.0
-3,788,239,183,814,603,000
29.06993
104
0.604327
false
LouisPlisso/analysis_tools
complements.py
1
51874
#!/usr/bin/env python """Module to provide missing stats for streaming analysis """ from __future__ import division, print_function from operator import concat, itemgetter from collections import defaultdict from itertools import islice, cycle from random import random from tempfile import NamedTemporaryFile import os...
gpl-3.0
7,636,610,822,924,463,000
48.640191
81
0.471758
false
elsehow/moneybot
moneybot/fund.py
1
6641
# -*- coding: utf-8 -*- from datetime import datetime from logging import getLogger from time import sleep from time import time from typing import Generator from copy import deepcopy import pandas as pd from pyloniex.errors import PoloniexServerError from moneybot.market.adapters import MarketAdapter from moneybot.s...
bsd-3-clause
-663,076,200,772,912,300
38.064706
94
0.596597
false
jdhp-sap/sap-cta-data-pipeline
utils/simtel_to_fits_nectarcam.py
2
15361
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
mit
4,052,761,697,814,277,600
43.909357
177
0.528094
false
X-DataInitiative/tick
examples/plot_prox_example.py
2
1432
""" ============================== Examples of proximal operators ============================== Plot examples of proximal operators available in tick """ import numpy as np import matplotlib.pyplot as plt from tick.prox import ProxL1, ProxElasticNet, ProxL2Sq, \ ProxPositive, ProxSlope, ProxTV, ProxZero, ProxBina...
bsd-3-clause
2,166,794,253,541,222,400
28.833333
76
0.617318
false
byuflowlab/vawt-wake-model
wake_model/validation/tescione_val.py
2
34805
import numpy as np import matplotlib.pyplot as plt import csv from VAWT_Wake_Model import velocity_field from scipy.io import loadmat from numpy import fabs from os import path from matplotlib import rcParams rcParams['font.family'] = 'Times New Roman' rom = True # rom = False r = 0.5 # radius v = 1.0 # velocity v...
mit
3,470,095,439,570,599,400
42.724874
696
0.594139
false
hchim/stockanalyzer
analysis/indicators.py
1
13443
import pandas as pd import numpy as np from analysis.basic import compute_daily_returns import math def sma(prices, params): """ Calculate the simple moving average indicator. Parameters ---------- prices: DataFrame params: dict e.g. {"windows": [5, 10]} Returns ---------...
mit
4,074,898,968,506,970,000
26.050302
97
0.583054
false
CVerhoosel/nutils
examples/burgers.py
1
3390
#! /usr/bin/python3 # # In this script we solve the Burgers equation on a 1D or 2D periodic dommain, # starting from a centered Gaussian and convecting in the positive direction of # the first coordinate. import nutils, numpy # The main function defines the parameter space for the script. Configurable # parameters ar...
mit
8,277,718,623,519,437,000
41.375
154
0.70708
false
burakbayramli/dersblog
vision/vision_02/plot3d.py
2
2141
from mpl_toolkits.mplot3d import axes3d from matplotlib.patches import Circle, PathPatch import matplotlib.pyplot as plt from matplotlib.transforms import Affine2D from mpl_toolkits.mplot3d import art3d import numpy as np def plot_vector(fig, orig, v, color='blue'): ax = fig.gca(projection='3d') orig = np.array(...
gpl-3.0
8,619,222,826,841,033,000
35.288136
89
0.632882
false
duttashi/Data-Analysis-Visualization
scripts/general/anovaTest.py
1
6339
# Importing the required libraries # Note %matplotlib inline works only for ipython notebook. It will not work for PyCharm. It is used to show the plot distributions #%matplotlib inline import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import statsmodels.formula.api as smf imp...
mit
4,783,858,996,819,061,000
44.934783
132
0.762108
false
DTMilodowski/LiDAR_canopy
src/PAI_limitations_figures.py
1
22708
#=============================================================================== # PAI_limitations_figures.py # D.T.Milodowski, November 2017 #------------------------------------------------------------------------------- # This function contains the scripts used to produce the figures in the paper: # "Point density i...
gpl-3.0
4,718,651,781,681,082,000
39.695341
173
0.664259
false
camallen/aggregation
experimental/chicago/aggregation.py
2
6819
#!/usr/bin/env python __author__ = 'greghines' import numpy as np import matplotlib.pyplot as plt import csv import sys import os import pymongo import matplotlib.cbook as cbook import random import bisect animals = [u'bike', u'grayFox', u'livestock', u'foxSquirrel', u'deer', u'rat', u'mink', u'human', u'beaver', u'mo...
apache-2.0
2,238,402,340,212,246,000
28.266094
363
0.63895
false
JustinNoel1/ML-Course
bayes/bayesian-regression/python/bayreg.py
1
3784
#Implementation of Bayesian polynomial regression using pymc3 from pymc3 import * import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import PolynomialFeatures import pandas as pd import theano from scipy.stats.kde import gaussian_kde # set sample size NUM_SAMPLES = 200 # set desired stand...
apache-2.0
3,971,333,095,095,953,400
34.698113
237
0.647199
false
karstenw/nodebox-pyobjc
examples/Extended Application/matplotlib/examples/statistics/hist.py
1
3990
""" ========== Histograms ========== Demonstrates how to plot histograms with matplotlib. """ import matplotlib.pyplot as plt import numpy as np from matplotlib import colors # from matplotlib.ticker import PercentFormatter # nodebox section if __name__ == '__builtin__': # were in nodebox import os impor...
mit
5,362,261,448,032,349,000
28.555556
82
0.607018
false
dashmoment/facerecognition
py/apps/scripts/preprocessing_experiments.py
2
5764
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) Philipp Wagner. All rights reserved. # Licensed under the BSD license. See LICENSE file in the project root for full license information. import sys, os sys.path.append("../..") # facerec from facerec.feature import Fisherfaces, PCA, SpatialHistogram, Iden...
bsd-3-clause
7,224,324,888,766,617,000
37.172185
125
0.629077
false
wangsix/cluster
bins/xmeans_demo.py
1
2365
''' Created on Mar 15, 2012 @author: Wang ''' import numpy as np from scipy.cluster.vq import * import pylab import matplotlib.pyplot as plt import cluster plt.figure() class1 = np.array(np.random.standard_normal((2,2))) + np.array([5,5]) class2 = np.array(np.random.standard_normal((1,2))) class3 = np.array(np.ran...
gpl-3.0
944,239,356,310,498,200
38.433333
81
0.663002
false
zehpunktbarron/iOSMAnalyzer
scripts/c6_landuse.py
1
3381
# -*- coding: utf-8 -*- #!/usr/bin/python2.7 #description :This file creates a plot: Calculates the development of all objects with a "landuse"-tag #author :Christopher Barron @ http://giscience.uni-hd.de/ #date :19.01.2013 #version :0.1 #usage :python pyscript.py #==========...
gpl-3.0
5,170,037,965,798,347,000
27.411765
131
0.677906
false
KellyBlack/Precalculus
functions/img/composition.py
1
1856
#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.path as path from matplotlib.patches import FancyArrowPatch from matplotlib.patches import Ellipse import math import sys from BasicPlot import BasicPlot plotter = BasicPlot() plt.figure(num=1,...
gpl-3.0
-7,112,809,213,044,979,000
28.460317
66
0.637392
false
bwvdnbro/HydroCodeSpherical1D
paper_workflows/fig_convergence_seed.py
1
3451
import numpy as np import matplotlib matplotlib.use("Agg") import pylab as pl import scipy.special.lambertw as lambertw import sys if len(sys.argv) < 2: print "Usage: python fig_convergence_seed.py amplitude" exit() amplitude = float(sys.argv[1]) pl.rcParams["text.usetex"] = True pl.rcParams["figure.figsize"] = ...
agpl-3.0
-8,984,461,688,933,214,000
26.830645
80
0.580122
false
JiaMingLin/de-identification
test/test_measure_func.py
1
1068
import common.constant as c from django.test import TestCase from common.data_utilities import DataUtils from utility_measure.measure_func import UserQuery TEST_DATA_PATH = c.TEST_ORIGIN_DATA_PATH class TestMeasureFunc(TestCase): def setUp(self): self.queries = [ "Age > 50 and workclass == 'Self-emp-not-inc'", ...
apache-2.0
-6,687,662,837,570,749,000
38.592593
89
0.716292
false
yousrabk/mne-python
mne/viz/epochs.py
2
60751
"""Functions to plot epochs data """ # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Jaakko Leppakangas <jaeilepp@student.jyu.f...
bsd-3-clause
-2,441,897,527,907,268,600
39.392952
79
0.544682
false
romain-fontugne/disco
src/plotFunctions.py
1
16050
from __future__ import division import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import matplotlib.dates as mdates #plt=matplotlib.pyplot import datetime as dt from datetime import datetime import numpy as np import traceback import os import pandas as pd import threading import operator fr...
gpl-3.0
1,524,251,697,561,568,300
34.274725
150
0.516449
false
ericmjl/bokeh
examples/app/movies/main.py
1
4195
import sqlite3 as sql from os.path import dirname, join import numpy as np import pandas.io.sql as psql from bokeh.io import curdoc from bokeh.layouts import column, layout from bokeh.models import ColumnDataSource, Div, Select, Slider, TextInput from bokeh.plotting import figure from bokeh.sampledata.movies_data imp...
bsd-3-clause
6,006,346,634,513,225,000
35.163793
121
0.65435
false
keras-team/keras-io
examples/timeseries/timeseries_weather_forecasting.py
1
11224
""" Title: Timeseries forecasting for weather prediction Authors: [Prabhanshu Attri](https://prabhanshu.com/github), [Yashika Sharma](https://github.com/yashika51), [Kristi Takach](https://github.com/ktakattack), [Falak Shah](https://github.com/falaktheoptimist) Date created: 2020/06/23 Last modified: 2020/07/20 Descri...
apache-2.0
-1,283,266,379,708,159,700
28.382199
252
0.663845
false
rohandavidg/CONCORD-VCF
bin/csv_to_dict.py
1
1860
#!/dlmp/sandbox/cgslIS/rohan/Python-2.7.11/python """ this script converts a csv to dict """ import pandas as pd import numpy as np import re import pprint import warnings from collections import defaultdict warnings.filterwarnings("ignore") def main(csv_file): vcf_dict, snp_dict, indel_dict = parse_csv(csv_file...
mit
2,124,828,647,953,762,800
34.09434
136
0.610215
false
meisamhe/GPLshared
Research_Projects_UTD/Tensorflow_tutorial/tensor_flow.py
1
1071
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333) sess = tf.InteractiveSession(gpu_options=gpu_options) import tensorflow as tf import numpy as np import edward as ed import numpy as np import tensorflow as tf from edward.models import Normal from edward.util import rbf from edward.models import ...
gpl-3.0
-8,821,327,175,027,198,000
22.282609
66
0.712418
false
wilseypa/warped2-models
scripts/plotChains.py
1
12067
#!/usr/bin/python # Calculates statistics and plots the chain metrics from raw data from __future__ import print_function import csv import os, sys import numpy as np import scipy as sp import scipy.stats as sps import pandas as pd import re, shutil, tempfile import itertools, operator import subprocess import Gnuplo...
mit
1,226,787,144,049,247,200
35.128743
108
0.555648
false
yhat/ggplot
docs/examples.py
1
13564
from ggplot import * import uuid import seaborn as sns import pandas as pd import numpy as np tips = sns.load_dataset('tips') import sys p = ggplot(mtcars, aes(x='mpg', y='cyl', color='steelblue')) + geom_point() p.save("./examples/example-" + str(uuid.uuid4()) + ".png") p = ggplot(mtcars, aes(x='mpg', y='cyl')) + ge...
bsd-2-clause
-3,096,100,790,687,385,000
48.323636
240
0.605352
false
gfyoung/pandas
pandas/util/_test_decorators.py
1
8663
""" This module provides decorator functions which can be applied to test objects in order to skip those objects when certain conditions occur. A sample use case is to detect if the platform is missing ``matplotlib``. If so, any test objects which require ``matplotlib`` and decorated with ``@td.skip_if_no_mpl`` will be...
bsd-3-clause
-5,316,504,105,834,613,000
28.769759
88
0.663973
false
dattalab/d_code
plotting/plottingRoutines.py
1
6205
import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats __all__ = ['plot_avg_and_sem', 'plot_array', 'imshow_array', 'plot_avg_and_comps', 'plot_array_xy'] def plot_avg_and_sem(npArray, axis=1): """This routine takes a multidimenionsal numpy array and an axis and then plots the average...
mit
3,045,821,880,977,947,600
34.255682
124
0.612409
false
Svolcano/python_exercise
dianhua/endday_batch/update_9999_to_-1.py
1
2813
# -*- coding: utf-8 -*- """ Created on Wed May 30 11:09:10 2018 @author: huang """ import pymongo import time import datetime import json import sys import getopt import pandas as pd import numpy as np np.seterr(divide='ignore', invalid='ignore') sys.path.append('../') stdout = sys.stdout reload(sys...
mit
-4,865,315,491,329,630,000
29.920455
100
0.57036
false
AminMahpour/Wigman
main.py
1
4824
#!/usr/bin/env python3 import operator import pyBigWig import sys import matplotlib.pyplot as pp import numpy as np from tqdm import tqdm # added def parseconfig(conf_file): config = open(conf_file, mode="r") bed_line = [] bw_line =[] pdf_file = "" for line in config: line=line.strip("\...
gpl-2.0
4,575,110,508,619,404,300
28.777778
119
0.524461
false
planetarymike/IDL-Colorbars
IDL_py_test/033_Blue-Red.py
1
5972
from matplotlib.colors import LinearSegmentedColormap from numpy import nan, inf cm_data = [[0., 0., 0.513725], [0., 0., 0.513725], [0., 0., 0.529412], [0., 0., 0.545098], [0., 0., 0.560784], [0., 0., 0.576471], [0., 0., 0.592157], [0., 0., 0.607843], [0., 0., 0.623529], [0., 0., 0.639216], [0., 0., 0.654902], [0., 0.,...
gpl-2.0
427,885,498,026,020,350
20.79562
69
0.496651
false
alexholcombe/spatiotopic-motion
plotHelpers.py
1
12084
from psychopy import visual, data, logging from psychopy.misc import fromFile import itertools from math import log from copy import deepcopy import pandas as pd from pandas import DataFrame import pylab, scipy import numpy as np from calcUnderOvercorrect import calcOverCorrected def agrestiCoull95CI(x, nTrials): ...
mit
-7,298,490,796,033,904,000
49.35
168
0.66708
false
cchayward/ALMAHerschelDSFG
Code/dnda.py
1
3270
""" Shane Bussmann 2014 August 20 Plot dN/dA as a function of angular separation from the center of light. dN = number of objects between radius 1 and radius 2. dA = area between radius 1 and radius 2. """ from astropy.table import Table import matplotlib import matplotlib.pyplot as plt from pylab import savefig...
mit
1,041,237,110,525,958,500
27.434783
86
0.710703
false
walkerps/ICGPM
model.py
1
3369
import pandas as pd import numpy as np import re from nltk import word_tokenize from nltk.corpus import wordnet import pickle def feature_extraction_approach_2(name): consonants = ['b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z'] vowels = ['a','e','i','o','u'] bobua_consonants = ...
apache-2.0
-1,384,336,063,342,586,000
30.495327
178
0.658356
false
FedoraScientific/salome-gui
tools/CurvePlot/src/python/views/XYView.py
1
25807
import matplotlib.pyplot as plt import matplotlib.colors as colors from View import View from CurveView import CurveView from utils import Logger, trQ from PlotWidget import PlotWidget from PlotSettings import PlotSettings from pyqtside import QtGui, QtCore from pyqtside.QtCore import QObject from matplotlib.figure im...
lgpl-2.1
6,267,137,297,581,451,000
35.762108
122
0.648119
false
mohanprasath/Course-Work
data_analysis/uh_data_analysis_with_python/hy-data-analysis-with-python-spring-2020/part04-e16_split_date/test/test_split_date.py
1
2526
#!/usr/bin/env python3 import unittest from unittest.mock import patch import numpy as np import pandas as pd from tmc import points from tmc.utils import load, get_out, patch_helper module_name="src.split_date" split_date = load(module_name, "split_date") main = load(module_name, "main") ph = patch_helper(module_n...
gpl-3.0
-8,878,842,569,421,881,000
37.861538
110
0.583531
false
priyesh16/thesis
scratch/runall.py
1
3159
#!/usr/bin/python import sys import os import getopt import subprocess from subprocess import call import re import numpy as np import matplotlib.pyplot as plt from operator import itemgetter nodelist = [] dijhops = [] airhops = [] files = [] #comblist = [] def sortlist(comblist): comblist = sorted(comblist,key...
gpl-2.0
3,099,603,084,124,216,000
23.679688
96
0.60114
false
VicenteYanez/GFA
gfa/field_analysis/fun_fig.py
1
5557
#! /usr/bin/env python3 "Function to plot the examples script" import pdb import cartopy.crs as ccrs import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import griddata def greater_absolute(value1, value2): if abs(value1) >= abs(value2): return np.array([-value1, value1]) else...
gpl-3.0
6,889,460,577,200,876,000
26.102439
70
0.566955
false
sahilTakiar/spark
python/pyspark/sql/tests.py
1
276859
# -*- encoding: utf-8 -*- # # 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 ...
apache-2.0
-8,004,263,089,135,259,000
41.616225
100
0.578001
false
ChenglongChen/Kaggle_HomeDepot
Code/Igor&Kostia/text_processing.py
1
63488
# -*- coding: utf-8 -*- """ Initial text preprocessing. Although text processing can be technically done within feature generation functions, we found it to be very efficient to make all preprocessing first and only then move to feature generation. It is because the same processed text is used as an input to generate...
mit
-6,932,427,172,720,892,000
49.267617
266
0.608824
false
vsjha18/finplots
rsi.py
1
5108
""" This module plots Relative Strength Index on a given axis of matplotlib. All the style attributes are passed through argument so that it can be independently used as general purpose library in most of the trivial situations. However for ease of use we have one more sugar api which needs onl...
gpl-3.0
-3,049,561,174,342,176,300
33.986301
73
0.599452
false
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/doc/mpl_examples/event_handling/poly_editor.py
3
5397
""" This is an example to show how to build cross-GUI applications using matplotlib event handling to interact with objects on the canvas """ import numpy as np from matplotlib.lines import Line2D from matplotlib.artist import Artist from matplotlib.mlab import dist_point_to_segment class PolygonInteractor: """ ...
mit
106,231,732,139,781,250
31.512048
117
0.593107
false
acbecker/BART
samplers.py
1
24227
""" This file contains the class definition for the sampler MCMCSample classes. """ __author__ = 'Brandon C. Kelly' import numpy as np import progressbar from matplotlib import pyplot as plt import acor class MCMCSample(object): """ Class object for parameter samples generated by a yamcmc++ sampler. This cl...
mit
-7,085,109,834,660,766,000
42.339893
120
0.599909
false
Ziqi-Li/bknqgis
pandas/pandas/conftest.py
7
2021
import pytest import numpy import pandas import pandas.util.testing as tm def pytest_addoption(parser): parser.addoption("--skip-slow", action="store_true", help="skip slow tests") parser.addoption("--skip-network", action="store_true", help="skip network tests") ...
gpl-2.0
-5,245,325,280,974,097,000
29.164179
78
0.6571
false
jcchin/MagnePlane
src/hyperloop/Python/mission/tests/test_straight_track.py
3
6317
from __future__ import division, print_function, absolute_import import unittest import numpy as np try: from openmdao.api import pyOptSparseDriver except: pyOptSparseDriver = None from openmdao.api import ScipyOptimizer from pointer.components import Problem, Trajectory, CollocationPhase from hyperloop.Py...
apache-2.0
2,626,302,035,135,182,000
42.267123
79
0.523983
false
hdoria/HnTool
HnTool/output/html.py
1
8712
# -*- coding: utf-8 -*- # # HnTool - output module - html # Copyright (C) 2009-2010 Authors # Authors: # * Hugo Doria <mail at hugodoria dot org> # * Aurelio A. Heckert <aurium at gmail dot com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publ...
gpl-2.0
-7,514,285,492,901,710,000
34.851852
143
0.473485
false
alorenzo175/pvlib-python
pvlib/forecast.py
1
37917
''' The 'forecast' module contains class definitions for retreiving forecasted data from UNIDATA Thredd servers. ''' import datetime from netCDF4 import num2date import numpy as np import pandas as pd from requests.exceptions import HTTPError from xml.etree.ElementTree import ParseError from pvlib.location import Loca...
bsd-3-clause
9,113,747,094,163,487,000
31.602752
79
0.57341
false
MorganR/gaussian-processes
main.py
1
2611
# Main test file import numpy as np import matplotlib.pyplot as plt from model_tester import ModelTester, import_model_tester from data_holder import DataHolder, get_mnist_data from svgp_tester import SvgpTester from vgp_tester import VgpTester from mcmc_tester import McmcTester num_per_digits = [0] num_inducing_input...
mit
-2,337,207,912,695,031,300
34.780822
89
0.613558
false
cggh/scikit-allel
allel/stats/diversity.py
1
38740
# -*- coding: utf-8 -*- import logging import numpy as np from allel.model.ndarray import SortedIndex, AlleleCountsArray from allel.model.util import locate_fixed_differences from allel.util import asarray_ndim, ignore_invalid, check_dim0_aligned, \ ensure_dim1_aligned, mask_inaccessible from allel.stats.window...
mit
9,152,583,474,148,451,000
33.374445
97
0.549535
false
cosmir/dev-set-builder
audioset/util.py
1
2590
from joblib import Parallel, delayed import numpy as np import os import pandas as pd import tensorflow as tf from audioset import AUDIO_EMBEDDING_FEATURE_NAME, LABELS from audioset import START_TIME, TIME, VIDEO_ID def filebase(fname): return os.path.splitext(os.path.basename(fname))[0] def safe_makedirs(dpat...
mit
4,450,234,088,858,610,700
30.975309
79
0.657529
false
kubeflow/pipelines
components/PyTorch/pytorch-kfp-components/pytorch_kfp_components/components/visualization/executor.py
1
9980
#!/usr/bin/env/python3 # # Copyright (c) Facebook, Inc. and its affiliates. # 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...
apache-2.0
7,535,007,747,309,917,000
33.895105
79
0.594088
false
OpenPIV/openpiv-python
openpiv/windef.py
2
32332
# -*- coding: utf-8 -*- """ Created on Fri Oct 4 14:04:04 2019 @author: Theo @modified: Alex, Erich """ import os import numpy as np import scipy.ndimage as scn from scipy.interpolate import RectBivariateSpline import matplotlib.pyplot as plt from openpiv.tools import imread, Multiprocesser, display_vector_field, ...
gpl-3.0
5,857,745,627,380,246,000
33.17759
79
0.592973
false
gfyoung/pandas
pandas/core/strings/base.py
2
4702
import abc from typing import Pattern, Union import numpy as np from pandas._typing import Scalar class BaseStringArrayMethods(abc.ABC): """ Base class for extension arrays implementing string methods. This is where our ExtensionArrays can override the implementation of Series.str.<method>. We don'...
bsd-3-clause
-1,347,311,179,181,504,800
19.897778
81
0.595917
false
openbermuda/karmapi
karmapi/sunny.py
1
1858
from karmapi import pigfarm import curio import random from pathlib import Path class Sunspot(pigfarm.MagicCarpet): def compute_data(self): pass def plot(self): jup = 11.86 nep = 164.8 sat = 29.4571 x = (1/jup - 1/sat) jupsat = 1/(2 * x) x = (1...
gpl-3.0
-1,704,182,033,431,231,000
19.876404
105
0.492465
false
schae234/Camoco
camoco/__init__.py
1
1676
""" Camoco Library - CoAnalysis of Molecular Components CacheMoneyCorn """ __license__ = """ The "MIT" License Copyright (c) 2017-2019 Robert Schaefer 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 ...
mit
-8,831,807,908,612,434,000
26.032258
79
0.78043
false
NicWayand/xray
xarray/test/test_dataset.py
1
113381
# -*- coding: utf-8 -*- from copy import copy, deepcopy from textwrap import dedent try: import cPickle as pickle except ImportError: import pickle try: import dask.array as da except ImportError: pass import numpy as np import pandas as pd import pytest from xarray import (align, broadcast, concat, m...
apache-2.0
8,000,172,576,457,245,000
40.165214
165
0.537413
false
rynecarbone/power_ranker
power_ranker/web/power_plot.py
1
5155
#!/usr/bin/env python """Create box-plot of power rankings vs points scored""" import logging from pathlib import Path import pandas as pd from plotnine import * import warnings __author__ = 'Ryne Carbone' logger = logging.getLogger(__name__) def get_team_scores(df_schedule, team, week): """Get all scores for a...
mit
-1,320,269,196,353,959,400
36.904412
111
0.634724
false
dbarbier/ot-svn
python/doc/sphinxext/numpydoc/plot_directive.py
3
20539
""" A special directive for generating a matplotlib plot. .. warning:: This is a hacked version of plot_directive.py from Matplotlib. It's very much subject to change! Usage ----- Can be used like this:: .. plot:: examples/example.py .. plot:: import matplotlib.pyplot as plt plt.plot...
gpl-3.0
-3,953,456,890,394,788,400
29.932229
83
0.534544
false
boland1992/seissuite_iran
seissuite/sort_later/pointshape.py
2
2014
# -*- coding: utf-8 -*- """ Created on Mon Jun 20 12:28:32 2015 @author: boland """ import sys sys.path.append("/home/boland/Anaconda/lib/python2.7/site-packages") import fiona import shapefile from shapely import geometry import numpy as np import matplotlib.pyplot as plt import pyproj import datetime from matplotli...
gpl-3.0
-5,387,212,902,189,082,000
25.5
112
0.638034
false
damonge/CoLoRe
examples/simple/read_skewers.py
1
1672
import numpy as np from astropy.io import fits import matplotlib.pyplot as plt hdulist = fits.open('out_srcs_s1_0.fits') # First HDU contains the source catalog print(hdulist[1].header.keys) plt.figure() plt.hist(hdulist[1].data['Z_COSMO'], bins=100) print(" ") # Second HDU contains the density skewers as a FITS ima...
gpl-3.0
-3,835,317,680,419,938,300
33.122449
78
0.675837
false
Procrat/som
som/basic_som.py
1
8023
#!/usr/bin/env python # encoding: utf-8 """A regular SOM.""" from collections import UserList from .som import normalize from .som import SOM, Topology, Node from itertools import chain, islice from random import choice from math import exp import numpy as np import matplotlib.pyplot as plt class BasicSOM(SOM): ...
mit
1,099,930,361,131,690,900
37.204762
80
0.589056
false
Ecam-Eurobot-2017/main
code/raspberrypi/graphmap/graphmap.py
1
16765
import math import os.path import operator import pprint import networkx as nx from .utils import GraphUtils class GraphMap: CACHE_PATH = 'graphmap.data' def __init__(self, nodes, triangles, cache=True): """ nodes represent the (x, y) address of nodes in the graph. triangles give the ...
mit
3,210,404,997,343,590,000
40.395062
113
0.53224
false
Kitware/minerva
gaia_tasks/inputs.py
1
7301
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. and Epidemico Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You ma...
apache-2.0
1,753,931,356,030,654,700
36.634021
98
0.567457
false
FEniCS/dolfin
test/unit/python/mesh/test_mesh_quality.py
1
3815
#!/usr/bin/env py.test "Unit tests for the MeshQuality class" # Copyright (C) 2013 Garth N. Wells # # This file is part of DOLFIN. # # DOLFIN 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 Foundation, either ver...
lgpl-3.0
-8,000,715,879,390,831,000
29.52
77
0.675491
false
bellwethers-in-se/defects
src/tca_vs_seer.py
1
1139
""" Compares TCA with Bellwether Method (SEER to be added) """ from __future__ import print_function, division import os import sys root = os.path.join(os.getcwd().split('src')[0], 'src') if root not in sys.path: sys.path.append(root) from SEER.SEER import seer_jur from TCA.execute import tca_jur import multipro...
mit
-1,644,647,821,626,126,300
26.780488
93
0.656716
false
suriyan/ethnicolr
ethnicolr/census_ln.py
1
3561
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse import pandas as pd from pkg_resources import resource_filename from .utils import column_exists, fixup_columns CENSUS2000 = resource_filename(__name__, "data/census/census_2000.csv") CENSUS2010 = resource_filename(__name__, "data/census/censu...
mit
-221,643,584,409,173,700
30.794643
78
0.564448
false
madphysicist/numpy
numpy/fft/_pocketfft.py
2
52860
""" Discrete Fourier Transforms Routines in this module: fft(a, n=None, axis=-1, norm="backward") ifft(a, n=None, axis=-1, norm="backward") rfft(a, n=None, axis=-1, norm="backward") irfft(a, n=None, axis=-1, norm="backward") hfft(a, n=None, axis=-1, norm="backward") ihfft(a, n=None, axis=-1, norm="backward") fftn(a, ...
bsd-3-clause
2,631,187,690,599,615,000
36.172996
90
0.611313
false
aenon/company_10k_analysis
src/company_10k_classifier.py
1
9700
# -*- coding: utf-8 -*- """ Created on Mon Mar 07 22:45:13 2016 @author: Team 6 10-K Classifier """ #Importing required modules import os import re import pandas as pd import numpy as np from nltk.corpus import stopwords from sklearn.cross_validation import train_test_split from sklearn.feature_extractio...
bsd-2-clause
3,822,367,098,476,669,000
37.917695
124
0.719897
false
JakeColtman/bartpy
tests/test_proposer.py
1
2445
import unittest from bartpy.data import make_bartpy_data from bartpy.samplers.unconstrainedtree.proposer import uniformly_sample_grow_mutation, uniformly_sample_prune_mutation from bartpy.split import Split from bartpy.tree import LeafNode, Tree, DecisionNode import pandas as pd import numpy as np class TestPruneTr...
mit
-8,221,925,809,584,134,000
40.440678
125
0.693252
false
edux300/research
script_create_inbreast_dataset.py
1
6409
# -*- coding: utf-8 -*- """ Created on Wed Aug 2 14:16:54 2017 @author: eduardo """ import read_inbreast as readin import os from matplotlib import pyplot as plt import numpy as np import time import sys import pickle patch_size = 76 safe_padding = 40 inv_resize_factor = 12 resize_factor = float(1/inv_resize_fact...
apache-2.0
-8,263,579,726,650,916,000
30.571429
141
0.565455
false
cggh/scikit-allel
allel/stats/ld.py
1
9253
# -*- coding: utf-8 -*- import numpy as np from allel.stats.window import windowed_statistic from allel.util import asarray_ndim, ensure_square from allel.chunked import get_blen_array from allel.compat import memoryview_safe from allel.opt.stats import gn_pairwise_corrcoef_int8, gn_pairwise2_corrcoef_int8, \ gn_...
mit
-6,201,206,898,779,084,000
31.017301
84
0.590727
false
ecotox/pacfm
pacfm/controller/tools/circos/building/assembler.py
1
3304
from collections import OrderedDict from pandas import DataFrame from pacfm.model import Coordinate, Chromosome, Ideogram from pacfm.model import LinkCoordinate class Assembler(object): """ assembles the circos abundance map structure. biodb_selector: biodb.Selector instance abundance...
mit
-4,182,199,072,962,714,000
29.036364
79
0.537228
false
foreversand/QSTK
Examples/Validation.py
1
5524
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on February, 9, 2013 @author: Sourabh Bajaj @contact: sourabhbajaj@gatech.edu @summary: Python Validation Scr...
bsd-3-clause
5,958,295,362,151,716,000
29.351648
86
0.708726
false
bsautermeister/machine-learning-examples
visualization/keras/vgg16_visualize_convnet_activation_heatmap.py
1
4158
import argparse import os import sys import cv2 import matplotlib.pyplot as plt import numpy as np from tensorflow.contrib.keras import applications from tensorflow.contrib.keras import backend as K from tensorflow.contrib.keras import preprocessing import cnn_classification.keras.dogs_cats_dataset as dataset import ...
mit
-6,352,257,524,204,803,000
33.363636
118
0.669072
false
huazhisong/race_code
baidu_xijiao/codes/input_helper.py
1
8436
# 100中图片 # %% from sklearn.preprocessing import label_binarize import tensorflow as tf import numpy as np import os # %% file = 'train_data.txt' # change data to real predictions def get_real_label(data, file = 'train_data.txt', trainable=True): ''' Args: data: predi Returns: list of images...
gpl-3.0
9,115,338,627,568,042,000
33.54918
97
0.539739
false
MartinThoma/algorithms
ML/movielens-20m/ml-20m/movies_analysis.py
1
2395
from collections import Counter from itertools import combinations import clana.io import clana.visualize_cm import networkx as nx import numpy as np import pandas as pd import progressbar # Load the data df = pd.read_csv("movies.csv") df["genres"] = df["genres"].str.split("|") # Analyze the data list_values = [valu...
mit
2,289,728,226,151,431,200
29.705128
87
0.65929
false
cython-testbed/pandas
pandas/tseries/offsets.py
1
81716
# -*- coding: utf-8 -*- from datetime import date, datetime, timedelta import functools import operator from pandas.compat import range from pandas import compat import numpy as np from pandas.core.dtypes.generic import ABCPeriod from pandas.core.tools.datetimes import to_datetime import pandas.core.common as com # ...
bsd-3-clause
8,722,054,524,984,704,000
32.231395
79
0.557431
false
dr-leo/pandaSDMX
pandasdmx/tests/test_insee.py
1
4267
# TODO tidy these tests to use fixtures/methods from pandasdmx.tests from collections import OrderedDict import pytest import pandasdmx from pandasdmx import Request from .data import BASE_PATH as test_data_path test_data_path = test_data_path / "INSEE" DATAFLOW_FP = test_data_path / "dataflow.xml" DATASETS = { ...
apache-2.0
-5,387,207,897,127,990,000
31.325758
88
0.597141
false
jenniyanjie/sg-stock-related
version3/jsonwebretrieve.py
1
2109
import os, re, sys, time, datetime, copy, calendar import pandas, pdb import simplejson as json from pattern.web import URL, extension, cache, plaintext, Newsfeed class WebJsonRetrieval(object): """ General object to retrieve json file from the web. Would require only the first tag so after that c...
mit
-1,144,586,067,000,230,100
29.57971
84
0.573732
false
twhyntie/coding-challenges
cernatschool/helpers.py
1
9886
#!/usr/bin/env python # -*- coding: utf-8 -*- #...for the logging. import logging as lg #...for the MATH. import numpy as np #...for the data analysis. import pandas as pd #...for the least squares stuff. from scipy.optimize import leastsq #...for the plotting. import pylab as plt #...for the colours. from matplo...
apache-2.0
-2,826,983,471,519,716,400
28.598802
139
0.553308
false